%PDF- %PDF-
Direktori : /var/www/projetos/suporte.iigd.com.br.old/public/lib/ |
Current File : /var/www/projetos/suporte.iigd.com.br.old/public/lib/tinymce.min.js |
(()=>{var e={476:()=>{tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 012 2 2 2 0 01-2 2 2 2 0 01-2-2c0-1.1.9-2 2-2zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 01-1-1v-5c0-.6-.4-1-1-1a1 1 0 00-1 1v5c0 .6-.4 1-1 1a1 1 0 01-1-1V9H4a1 1 0 110-2h16c.6 0 1 .4 1 1s-.4 1-1 1z" fill-rule="nonzero"/></svg>',"action-next":'<svg width="24" height="24"><path fill-rule="nonzero" d="M5.7 7.3a1 1 0 00-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 10-1.4-1.4L12 13.6 5.7 7.3z"/></svg>',"action-prev":'<svg width="24" height="24"><path fill-rule="nonzero" d="M18.3 15.7a1 1 0 001.4-1.4L12 6.6l-7.7 7.7a1 1 0 001.4 1.4L12 9.4l6.3 6.3z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-justify":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-left":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5L13 7H5a1 1 0 110-2h9.2zm4 0h.8a1 1 0 010 2h-2l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h6.8zm4 0H19a1 1 0 010 2h-4.4l1.2-2zm-6.4 4l-1.2 2H5a1 1 0 010-2h4.4zm4 0H19a1 1 0 010 2h-6.8l1.2-2zM7 17l-1.2 2H5a1 1 0 010-2h2zm4 0h8a1 1 0 010 2H9.8l1.2-2zm5.2-13.5l1.3.7-9.7 16.3-1.3-.7 9.7-16.3z" fill-rule="evenodd"/></svg>',"align-right":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="M5.6 13l12 6a1 1 0 001.4-1V6a1 1 0 00-1.4-.9l-12 6a1 1 0 000 1.8z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="M18.5 13l-12 6A1 1 0 015 18V6a1 1 0 011.4-.9l12 6a1 1 0 010 1.8z" fill-rule="evenodd"/></svg>',bold:'<svg width="24" height="24"><path d="M7.8 19c-.3 0-.5 0-.6-.2l-.2-.5V5.7c0-.2 0-.4.2-.5l.6-.2h5c1.5 0 2.7.3 3.5 1 .7.6 1.1 1.4 1.1 2.5a3 3 0 01-.6 1.9c-.4.6-1 1-1.6 1.2.4.1.9.3 1.3.6s.8.7 1 1.2c.4.4.5 1 .5 1.6 0 1.3-.4 2.3-1.3 3-.8.7-2.1 1-3.8 1H7.8zm5-8.3c.6 0 1.2-.1 1.6-.5.4-.3.6-.7.6-1.3 0-1.1-.8-1.7-2.3-1.7H9.3v3.5h3.4zm.5 6c.7 0 1.3-.1 1.7-.4.4-.4.6-.9.6-1.5s-.2-1-.7-1.4c-.4-.3-1-.4-2-.4H9.4v3.8h4z" fill-rule="evenodd"/></svg>',bookmark:'<svg width="24" height="24"><path d="M6 4v17l6-4 6 4V4c0-.6-.4-1-1-1H7a1 1 0 00-1 1z" fill-rule="nonzero"/></svg>',"border-style":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="2" x="3" y="6" rx="1"/><rect width="2.8" height="2" x="3" y="16" rx="1"/><rect width="2.8" height="2" x="6.8" y="16" rx="1"/><rect width="2.8" height="2" x="10.6" y="16" rx="1"/><rect width="2.8" height="2" x="14.4" y="16" rx="1"/><rect width="2.8" height="2" x="18.2" y="16" rx="1"/><rect width="8" height="2" x="3" y="11" rx="1"/><rect width="8" height="2" x="13" y="11" rx="1"/></g></svg>',"border-width":'<svg width="24" height="24"><g fill-rule="evenodd"><rect width="18" height="5" x="3" y="5" rx="1"/><rect width="18" height="3.5" x="3" y="11.5" rx="1"/><rect width="18" height="2" x="3" y="17" rx="1"/></g></svg>',brightness:'<svg width="24" height="24"><path d="M12 17c.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3zm0-10a1 1 0 01-.7-.3A1 1 0 0111 6V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v1c0 .3-.1.5-.3.7a1 1 0 01-.7.3zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3h-1a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1zM7 12c0 .3-.1.5-.3.7a1 1 0 01-.7.3H5a1 1 0 01-.7-.3A1 1 0 014 12c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1c.3 0 .5.1.7.3.2.2.3.4.3.7zm10 3.5l.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 01-.8.3 1 1 0 01-.6-.3l-.8-.7a1 1 0 01-.3-.8c0-.2.1-.5.3-.7a1 1 0 011.4 0zm-10-7l-.7-.8a1 1 0 01-.3-.6c0-.3.1-.6.3-.8.2-.2.5-.3.8-.3.2 0 .5.1.7.3l.7.7c.2.2.3.5.3.8 0 .2-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.8-.3zm10 0a1 1 0 01-.8.3 1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.6.3-.8l.8-.7c.1-.2.4-.3.6-.3.3 0 .6.1.8.3.2.2.3.5.3.8 0 .2-.1.5-.3.7l-.7.7zm-10 7c.2-.2.5-.3.8-.3.2 0 .5.1.7.3a1 1 0 010 1.4l-.8.8a1 1 0 01-.6.3 1 1 0 01-.8-.3 1 1 0 01-.3-.8c0-.2.1-.5.3-.6l.7-.8zM12 8a4 4 0 013.7 2.4 4 4 0 010 3.2A4 4 0 0112 16a4 4 0 01-3.7-2.4 4 4 0 010-3.2A4 4 0 0112 8zm0 6.5c.7 0 1.3-.2 1.8-.7.5-.5.7-1.1.7-1.8s-.2-1.3-.7-1.8c-.5-.5-1.1-.7-1.8-.7s-1.3.2-1.8.7c-.5.5-.7 1.1-.7 1.8s.2 1.3.7 1.8c.5.5 1.1.7 1.8.7z" fill-rule="evenodd"/></svg>',browse:'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9.4l-2.3 2.3a1 1 0 11-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 01-1.4 1.4L13 13.4V20a1 1 0 01-2 0v-6.6z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 110 14.8 7.4 7.4 0 010-14.8zM12 3a9 9 0 100 18 9 9 0 000-18zm0 8L14.8 8l1 1.1-2.7 2.8 2.7 2.7-1.1 1.1-2.7-2.7-2.7 2.7-1-1.1 2.6-2.7-2.7-2.7 1-1.1 2.8 2.7z" fill-rule="nonzero"/></svg>',"cell-background-color":'<svg width="24" height="24"><path d="M15.7 2l1.6 1.6-2.7 2.6 5.9 5.8c.7.7.7 1.7 0 2.4l-6.3 6.1a1.7 1.7 0 01-2.4 0l-6.3-6.1c-.7-.7-.7-1.7 0-2.4L15.7 2zM18 12l-4.5-4L9 12h9zM4 16s2 2.4 2 3.8C6 21 5.1 22 4 22s-2-1-2-2.2C2 18.4 4 16 4 16z"/></svg>',"cell-border-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M5 13v5h2v2H5a2 2 0 01-2-2v-5h2zm8-7V4h6a2 2 0 012 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1l.1-.1.1.1.2.3.2.2.2.2c.4.6.8 1.2.8 1.7 0 .8-.7 1.5-1.5 1.5S9 21.3 9 20.5c0-.5.4-1.1.8-1.7l.2-.2.2-.2.2-.3z"/><path d="M13 11l-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="M18.4 8l1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 01-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8zm1.6 7l-3-3-3 3h6z"/></g></svg>',"change-case":'<svg width="24" height="24"><path d="M18.4 18.2v-.6c-.5.8-1.3 1.2-2.4 1.2-2.2 0-3.3-1.6-3.3-4.8 0-3.1 1-4.7 3.3-4.7 1.1 0 1.8.3 2.4 1.1v-.6c0-.5.4-.8.8-.8s.8.3.8.8v8.4c0 .5-.4.8-.8.8a.8.8 0 01-.8-.8zm-2-7.4c-1.3 0-1.8.9-1.8 3.2 0 2.4.5 3.3 1.7 3.3 1.3 0 1.8-.9 1.8-3.2 0-2.4-.5-3.3-1.7-3.3zM10 15.7H5.5l-.8 2.6a1 1 0 01-1 .7h-.2a.7.7 0 01-.7-1l4-12a1 1 0 012 0l4 12a.7.7 0 01-.8 1h-.2a1 1 0 01-1-.7l-.8-2.6zm-.3-1.5l-2-6.5-1.9 6.5h3.9z" fill-rule="evenodd"/></svg>',"character-count":'<svg width="24" height="24"><path d="M4 11.5h16v1H4v-1zm4.8-6.8V10H7.7V5.8h-1v-1h2zM11 8.3V9h2v1h-3V7.7l2-1v-.9h-2v-1h3v2.4l-2 1zm6.3-3.4V10h-3.1V9h2.1V8h-2.1V6.8h2.1v-1h-2.1v-1h3.1zM5.8 16.4c0-.5.2-.8.5-1 .2-.2.6-.3 1.2-.3l.8.1c.2 0 .4.2.5.3l.4.4v2.8l.2.3H8.2v-.1-.2l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 01-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 00-.5-.1 1 1 0 00-.4 0l-.3.4h-1zm2.3.8h-.2l-.2.1-.4.1a1 1 0 00-.4.2l-.2.2.1.3.5.1h.4l.4-.4v-.6zm2-3.4h1.2v1.7l.5-.3h.5c.5 0 .9.1 1.2.5.3.4.5.8.5 1.4 0 .6-.2 1.1-.5 1.5-.3.4-.7.6-1.3.6l-.6-.1-.4-.4v.4h-1.1v-5.4zm1.1 3.3c0 .3 0 .6.2.8a.7.7 0 001.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 00-.6-.3l-.6.3-.2.8zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 00-.5-.2c-.3 0-.5.1-.6.3l-.2.9c0 .3 0 .6.2.8.1.2.3.3.6.3.2 0 .4 0 .5-.2l.2-.4h1.1c0 .5-.3.8-.6 1.1a2 2 0 01-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 01-.5-1.4c0-.6.1-1.1.5-1.5.3-.4.8-.5 1.4-.5.5 0 1 0 1.2.3.4.3.5.7.5 1.2h-1v-.1z" fill-rule="evenodd"/></svg>',"checklist-rtl":'<svg width="24" height="24"><path d="M5 17h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 110-2zm14.2 11c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L18 8c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checklist:'<svg width="24" height="24"><path d="M11 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8a1 1 0 010 2h-8a1 1 0 010-2zM7.2 16c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 20c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 14c-.2.3-.7.4-1 0l-1.3-1.3a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8zm0-6c.2-.4.6-.5.9-.3.3.2.4.6.2 1L6 8c-.2.3-.7.4-1 0L3.8 6.9a.7.7 0 010-1c.3-.2.7-.2 1 0l.7.9 1.7-2.8z" fill-rule="evenodd"/></svg>',checkmark:'<svg width="24" height="24"><path d="M18.2 5.4a1 1 0 011.6 1.2l-8 12a1 1 0 01-1.5.1l-5-5a1 1 0 111.4-1.4l4.1 4.1 7.4-11z" fill-rule="nonzero"/></svg>',"chevron-down":'<svg width="10" height="10"><path d="M8.7 2.2c.3-.3.8-.3 1 0 .4.4.4.9 0 1.2L5.7 7.8c-.3.3-.9.3-1.2 0L.2 3.4a.8.8 0 010-1.2c.3-.3.8-.3 1.1 0L5 6l3.7-3.8z" fill-rule="nonzero"/></svg>',"chevron-left":'<svg width="10" height="10"><path d="M7.8 1.3L4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 010-1.2L6.6.2C7 0 7.4 0 7.8.2c.3.3.3.8 0 1.1z" fill-rule="nonzero"/></svg>',"chevron-right":'<svg width="10" height="10"><path d="M2.2 1.3a.8.8 0 010-1c.4-.4.9-.4 1.2 0l4.4 4.1c.3.4.3.9 0 1.2L3.4 9.8c-.3.3-.8.3-1.2 0a.8.8 0 010-1.1L6 5 2.2 1.3z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8L5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 010-1.2l4.1-4.4c.3-.3.9-.3 1.2 0l4.2 4.4c.3.3.3.9 0 1.2-.3.3-.8.3-1.1 0z" fill-rule="nonzero"/></svg>',close:'<svg width="24" height="24"><path d="M17.3 8.2L13.4 12l3.9 3.8a1 1 0 01-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 01-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 011.5-1.5l3.8 3.9 3.8-3.9a1 1 0 011.5 1.5z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 01-.8 2 2.8 2.8 0 01.8 2v1.7c0 .3.1.6.4.8.2.3.5.4.8.4.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.7 0-1.4-.3-2-.8-.5-.6-.8-1.3-.8-2V15c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4v-.8c0-.2.2-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V9.3c0-.7.3-1.4.8-2 .6-.5 1.3-.8 2-.8.3 0 .4.2.4.4v.8c0 .2-.1.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8V11zm9.8 0V9.3c0-.3-.1-.6-.4-.8-.2-.3-.5-.4-.8-.4a.4.4 0 01-.4-.4V7c0-.2.1-.4.4-.4.7 0 1.4.3 2 .8.5.6.8 1.3.8 2V11c0 .3.1.6.4.8.2.3.5.4.8.4.2 0 .4.2.4.4v.8c0 .2-.2.4-.4.4-.3 0-.6.1-.8.4-.3.2-.4.5-.4.8v1.7c0 .7-.3 1.4-.8 2-.6.5-1.3.8-2 .8a.4.4 0 01-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 01.8-2 2.8 2.8 0 01-.8-2zm-3.3-.4c0 .4-.1.8-.5 1.1-.3.3-.7.5-1.1.5-.4 0-.8-.2-1.1-.5-.4-.3-.5-.7-.5-1.1 0-.5.1-.9.5-1.2.3-.3.7-.4 1.1-.4.4 0 .8.1 1.1.4.4.3.5.7.5 1.2zM12 13c.4 0 .8.1 1.1.5.4.3.5.7.5 1.1 0 1-.1 1.6-.5 2a3 3 0 01-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 01-.5-.5V17a3 3 0 001-.2l.6-.6c-.6 0-1-.2-1.3-.5-.2-.3-.3-.7-.3-1 0-.5.1-1 .5-1.2.3-.4.7-.5 1.1-.5z" fill-rule="evenodd"/></svg>',"color-levels":'<svg width="24" height="24"><path d="M17.5 11.4A9 9 0 0118 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 01-3.7 3 5.7 5.7 0 01-3.2 0A5.9 5.9 0 017.6 18a6.2 6.2 0 01-1.4-2.6 6.7 6.7 0 010-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 012.3-4A20 20 0 0112 4a26.4 26.4 0 013.2 3.4 18.2 18.2 0 012.3 4zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 00-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 01-1.3 3 5.3 5.3 0 01-2.3 1.5 4.9 4.9 0 01-2 .1 4.3 4.3 0 002.4.8 4 4 0 002-.6 4 4 0 001.5-1.5z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 000 18 1.5 1.5 0 001.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 005-5c0-4.4-4-8-9-8zm-5.5 9a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3-4a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm5 0a1.5 1.5 0 110-3 1.5 1.5 0 010 3zm3 4a1.5 1.5 0 110-3 1.5 1.5 0 010 3z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3L3 21" fill-rule="evenodd"/></svg>',"color-swatch":'<svg width="24" height="24"><rect x="3" y="3" width="18" height="18" rx="1" fill-rule="evenodd"/></svg>',"comment-add":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/><path d="M13 10h2a1 1 0 010 2h-2v2a1 1 0 01-2 0v-2H9a1 1 0 010-2h2V8a1 1 0 012 0v2z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="M9 19l3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 00-1 1v10c0 .6.4 1 1 1h4v2zm-2 4v-4H5a3 3 0 01-3-3V6a3 3 0 013-3h14a3 3 0 013 3v10a3 3 0 01-3 3h-6.4L7 23z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-6 8a6 6 0 006 6V6a6 6 0 00-6 6z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 00-2 2v11h2V5h10V3zm1 4a2 2 0 012 2v10a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7zm0 12V9h-7v10h7z" fill-rule="nonzero"/></svg>',crop:'<svg width="24" height="24"><path d="M17 8v7h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v2c0 .6-.4 1-1 1a1 1 0 01-1-1v-2H7V9H5a1 1 0 110-2h2V5c0-.6.4-1 1-1s1 .4 1 1v2h7l3-3 1 1-3 3zM9 9v5l5-5H9zm1 6h5v-5l-5 5z" fill-rule="evenodd"/></svg>',"cut-column":'<svg width="24" height="24"><path fill-rule="evenodd" d="M7.2 4.5c.9 0 1.6.4 2.2 1A3.7 3.7 0 0110.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 012 0c.4 0 .7.3 1 .5L17 8h4v13h-6V10l-1.5 1.5.5.5v4l-2.5-2.5-1 1v.5c0 .4 0 .8-.3 1.2-.2.5-.4.9-.8 1.2-.6.7-1.3 1-2.2 1-.8.2-1.5 0-2-.6l-.5-.8-.2-1c0-.4 0-.8.3-1.2A3.9 3.9 0 017 12.7c.5-.2 1-.3 1.5-.2l1-1-1-1c-.5 0-1 0-1.5-.2-.5-.1-1-.4-1.4-.9-.4-.3-.6-.7-.8-1.2L4.5 7c0-.4 0-.7.2-1 0-.3.3-.6.5-.8.5-.5 1.2-.8 2-.7zm12.3 5h-3v10h3v-10zM8 13.8h-.3l-.4.2a2.8 2.8 0 00-.7.4v.1a2.8 2.8 0 00-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 00.8-.3 2.4 2.4 0 00.7-.7 2.5 2.5 0 00.3-.8 1.5 1.5 0 000-.8 1 1 0 00-.2-.4 1 1 0 00-.5-.2H8zm3.5-3.7c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zM7 5.8h-.4a1 1 0 00-.5.3 1 1 0 00-.2.5v.7a2.5 2.5 0 00.3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 000-.8 2.6 2.6 0 00-.3-.8A2.5 2.5 0 007.7 6l-.4-.1H7z"/></svg>',"cut-row":'<svg width="24" height="24"><path fill-rule="evenodd" d="M22 3v5H9l3 3 2-2h4l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8.7.6 1 1.3 1 2.2.2.8 0 1.5-.6 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l2 2V3h14zM8.5 15.3h-.3a2.6 2.6 0 00-.8.4 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3L9 18V18l.4-.4.2-.4.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2h-.5zm7 0H15a1 1 0 00-.4.3 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4a2.8 2.8 0 00.5.7h.1a2.8 2.8 0 00.8.6l.4.1h.7l.5-.2.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3h-.3zM12 11.6c-.4 0-.7.1-1 .4-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4s.7-.1 1-.4c.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4zm8.5-7.1h-11v2h11v-2z"/></svg>',cut:'<svg width="24" height="24"><path d="M18 15c.6.7 1 1.4 1 2.3 0 .8-.2 1.5-.7 2l-.8.5-1 .2c-.4 0-.8 0-1.2-.3a3.9 3.9 0 01-2.1-2.2c-.2-.5-.3-1-.2-1.5l-1-1-1 1c0 .5 0 1-.2 1.5-.1.5-.4 1-.9 1.4-.3.4-.7.6-1.2.8l-1.2.3c-.4 0-.7 0-1-.2-.3 0-.6-.3-.8-.5-.5-.5-.8-1.2-.7-2 0-.9.4-1.6 1-2.2A3.7 3.7 0 018.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 010-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 010 2c0 .4-.3.7-.5 1l-4 4 1 1h.5c.4 0 .8 0 1.2.3.5.2.9.4 1.2.8zm-8.5 2.2l.1-.4v-.3-.4a1 1 0 00-.2-.5 1 1 0 00-.4-.2 1.6 1.6 0 00-.8 0 2.6 2.6 0 00-.8.3 2.5 2.5 0 00-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 00.8-.3 2.8 2.8 0 001-1zm2.5-2.8c.4 0 .7-.1 1-.4.3-.3.4-.6.4-1s-.1-.7-.4-1c-.3-.3-.6-.4-1-.4s-.7.1-1 .4c-.3.3-.4.6-.4 1s.1.7.4 1c.3.3.6.4 1 .4zm5.4 4l.2-.5v-.4-.3a2.6 2.6 0 00-.3-.8 2.4 2.4 0 00-.7-.7 2.5 2.5 0 00-.8-.3 1.5 1.5 0 00-.8 0 1 1 0 00-.4.2 1 1 0 00-.2.5 1.5 1.5 0 000 .7v.4l.3.4.3.4a2.8 2.8 0 00.8.5l.4.1h.7l.5-.2z" fill-rule="evenodd"/></svg>',"document-properties":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',drag:'<svg width="24" height="24"><path d="M13 5h2v2h-2V5zm0 4h2v2h-2V9zM9 9h2v2H9V9zm4 4h2v2h-2v-2zm-4 0h2v2H9v-2zm0 4h2v2H9v-2zm4 0h2v2h-2v-2zM9 5h2v2H9V5z" fill-rule="evenodd"/></svg>',"duplicate-column":'<svg width="24" height="24"><path d="M17 6v16h-7V6h7zm-2 2h-3v12h3V8zm-2-6v2H8v15H6V2h7z"/></svg>',"duplicate-row":'<svg width="24" height="24"><path d="M22 11v7H6v-7h16zm-2 2H8v3h12v-3zm-1-6v2H4v5H2V7h17z"/></svg>',duplicate:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M16 3v2H6v11H4V5c0-1.1.9-2 2-2h10zm3 8h-2V9h-7v10h9a2 2 0 01-2 2h-7a2 2 0 01-2-2V9c0-1.2.9-2 2-2h7a2 2 0 012 2v2z"/><path d="M17 14h1a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1h-1a1 1 0 010-2h1v-1a1 1 0 012 0v1z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19.8 8.8l-9.4 9.4c-.2.2-.5.4-.9.4l-5.4 1.2 1.2-5.4.5-.8 9.4-9.4c.7-.7 1.8-.7 2.5 0l2.1 2.1c.7.7.7 1.8 0 2.5zm-2-.2l1-.9v-.3l-2.2-2.2a.3.3 0 00-.3 0l-1 1L18 8.5zm-1 1l-2.5-2.4-6 6 2.5 2.5 6-6zm-7 7.1l-2.6-2.4-.3.3-.1.2-.7 3 3.1-.6h.1l.4-.5z"/></svg>',"edit-image":'<svg width="24" height="24"><path d="M18 16h2V7a2 2 0 00-2-2H7v2h11v9zM6 17h15a1 1 0 010 2h-1v1a1 1 0 01-2 0v-1H6a2 2 0 01-2-2V7H3a1 1 0 110-2h1V4a1 1 0 112 0v13zm3-5.3l1.3 2 3-4.7 3.7 6H7l2-3.3z" fill-rule="nonzero"/></svg>',"embed-page":'<svg width="24" height="24"><path d="M19 6V5H5v14h2A13 13 0 0119 6zm0 1.4c-.8.8-1.6 2.4-2.2 4.6H19V7.4zm0 5.6h-2.4c-.4 1.8-.6 3.8-.6 6h3v-6zm-4 6c0-2.2.2-4.2.6-6H13c-.7 1.8-1.1 3.8-1.1 6h3zm-4 0c0-2.2.4-4.2 1-6H9.6A12 12 0 008 19h3zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 00-4 4.5h2.2zm-3.4 0a12 12 0 012.8-4 12 12 0 00-5 4h2.2z" fill-rule="nonzero"/></svg>',embed:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm4.8 2.6l5.6 4a.5.5 0 010 .8l-5.6 4A.5.5 0 019 16V8a.5.5 0 01.8-.4z" fill-rule="nonzero"/></svg>',emoji:'<svg width="24" height="24"><path d="M9 11c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 00-1 1c0 .6.4 1 1 1zm-3 5.5c2.1 0 4-1.5 4.4-3.5H7.6c.5 2 2.3 3.5 4.4 3.5zM12 4a8 8 0 100 16 8 8 0 000-16zm0 14.5a6.5 6.5 0 110-13 6.5 6.5 0 010 13z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3L18 7v1h-5V5H7v14h9a1 1 0 012 0c0 1-.8 2-1.9 2H7c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2h7.5z"/><path d="M18.1 12c.5 0 .9.4.9 1 0 .5-.3 1-.8 1h-7.3c-.5 0-.9-.4-.9-1 0-.5.3-1 .8-1h7.3z"/><path d="M16.4 9.2a1 1 0 011.4.2l2.4 3.6-2.4 3.6a1 1 0 01-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 01.2-1.4z"/></g></svg>',fill:'<svg width="24" height="26"><path d="M16.6 12l-9-9-1.4 1.4 2.4 2.4-5.2 5.1c-.5.6-.5 1.6 0 2.2L9 19.6a1.5 1.5 0 002.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2zM5.2 13L10 8.2l4.8 4.8H5.2zM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 002-2c0-1.3-2-3.5-2-3.5z" fill-rule="nonzero"/></svg>',"flip-horizontally":'<svg width="24" height="24"><path d="M14 19h2v-2h-2v2zm4-8h2V9h-2v2zM4 7v10c0 1.1.9 2 2 2h3v-2H6V7h3V5H6a2 2 0 00-2 2zm14-2v2h2a2 2 0 00-2-2zm-7 16h2V3h-2v18zm7-6h2v-2h-2v2zm-4-8h2V5h-2v2zm4 12a2 2 0 002-2h-2v2z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5zm8 4v2h2v-2h-2zm4-14H7a2 2 0 00-2 2v3h2V6h10v3h2V6a2 2 0 00-2-2zm2 14h-2v2a2 2 0 002-2zM3 11v2h18v-2H3zm6 7v2h2v-2H9zm8-4v2h2v-2h-2zM5 18c0 1.1.9 2 2 2v-2H5z" fill-rule="nonzero"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 00-1 1v4c0 .6.5 1 1 1h12c.6 0 1-.4 1-1V7h1v4H9v9c0 .6.4 1 1 1h2c.6 0 1-.4 1-1v-7h8V5h-3z" fill-rule="nonzero"/></svg>',format:'<svg width="24" height="24"><path fill-rule="evenodd" d="M17 5a1 1 0 010 2h-4v11a1 1 0 01-2 0V7H7a1 1 0 110-2h10z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="M15.3 10l-1.2-1.3 2.9-3h-2.3a.9.9 0 110-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 11-1.8 0V7l-2.9 3zm0 4l3 3v-2.3a.9.9 0 111.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 110-1.8H17l-3-2.9 1.3-1.2zM10 15.4l-2.9 3h2.3a.9.9 0 110 1.7H5a.9.9 0 01-.9-.9v-4.4a.9.9 0 111.8 0V17l2.9-3 1.2 1.3zM8.7 10L5.7 7v2.3a.9.9 0 01-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 010 1.8H7l3 2.9-1.3 1.2z" fill-rule="nonzero"/></svg>',gallery:'<svg width="24" height="24"><path fill-rule="nonzero" d="M5 15.7l2.3-2.2c.3-.3.7-.3 1 0L11 16l5.1-5c.3-.4.8-.4 1 0l2 1.9V8H5v7.7zM5 18V19h3l1.8-1.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 01-1-1V7c0-.6.4-1 1-1zm6 7a2 2 0 110-4 2 2 0 010 4zM4.5 4h15a.5.5 0 110 1h-15a.5.5 0 010-1zm2-2h11a.5.5 0 110 1h-11a.5.5 0 010-1z"/></svg>',gamma:'<svg width="24" height="24"><path d="M4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm1 2v14h14V5H5zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 00-.4-.8l-.1-.2H8 8v-1l.3-.1.3-.1h.7a1 1 0 01.6.5l.1.3a8.5 8.5 0 01.3.6l1.9 4.6 2-5.2a1 1 0 011-.6.5.5 0 01.5.6L13 14v2.8a.7.7 0 01-1.4 0z" fill-rule="nonzero"/></svg>',help:'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M12 5.5a6.5 6.5 0 00-6 9 6.3 6.3 0 001.4 2l1 1a6.3 6.3 0 003.6 1 6.5 6.5 0 006-9 6.3 6.3 0 00-1.4-2l-1-1a6.3 6.3 0 00-3.6-1zM12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4z"/><path d="M9.6 9.7a.7.7 0 01-.7-.8c0-1.1 1.5-1.8 3.2-1.8 1.8 0 3.2.8 3.2 2.4 0 1.4-.4 2.1-1.5 2.8-.2 0-.3.1-.3.2a2 2 0 00-.8.8.8.8 0 01-1.4-.6c.3-.7.8-1 1.3-1.5l.4-.2c.7-.4.8-.6.8-1.5 0-.5-.6-.9-1.7-.9-.5 0-1 .1-1.4.3-.2 0-.3.1-.3.2v-.2c0 .4-.4.8-.8.8z" fill-rule="nonzero"/><circle cx="12" cy="16" r="1"/></g></svg>',"highlight-bg-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-highlight-bg-color__color" d="M3 18h18v3H3z"/><path fill-rule="nonzero" d="M7.7 16.7H3l3.3-3.3-.7-.8L10.2 8l4 4.1-4 4.2c-.2.2-.6.2-.8 0l-.6-.7-1.1 1.1zm5-7.5L11 7.4l3-2.9a2 2 0 012.6 0L18 6c.7.7.7 2 0 2.7l-2.9 2.9-1.8-1.8-.5-.6"/></g></svg>',home:'<svg width="24" height="24"><path fill-rule="nonzero" d="M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z"/></svg>',"horizontal-rule":'<svg width="24" height="24"><path d="M4 11h16v2H4z" fill-rule="evenodd"/></svg>',"image-options":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="M5 15.7l3.3-3.2c.3-.3.7-.3 1 0L12 15l4.1-4c.3-.4.8-.4 1 0l2 1.9V5H5v10.7zM5 18V19h3l2.8-2.9-2-2L5 17.9zm14-3l-2.5-2.4-6.4 6.5H19v-4zM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 01-1-1V4c0-.6.4-1 1-1zm6 8a2 2 0 100-4 2 2 0 000 4z" fill-rule="nonzero"/></svg>',indent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 015.7 2.3A8 8 0 1112 4zm-1 3v2h2V7h-2zm3 10v-1h-1v-5h-3v1h1v4h-1v1h4z" fill-rule="evenodd"/></svg>',"insert-character":'<svg width="24" height="24"><path d="M15 18h4l1-2v4h-6v-3.3l1.4-1a6 6 0 001.8-2.9 6.3 6.3 0 00-.1-4.1 5.8 5.8 0 00-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 00-3.9 1.8 6.3 6.3 0 00-1.3 6 6.2 6.2 0 001.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 014 11c0-1 .2-1.9.6-2.7A7 7 0 016.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 015.7 2 7 7 0 011.7 2.3 6 6 0 01.2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 01-3.6 2.5v.5z" fill-rule="evenodd"/></svg>',"insert-time":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M12 19a7 7 0 100-14 7 7 0 000 14zm0 2a9 9 0 110-18 9 9 0 010 18z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 00-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3L16.5 18a5.8 5.8 0 01-3.1 1.9 6.1 6.1 0 01-5.5-1.6A5.8 5.8 0 016 14v-.3l.1-1.2A13.9 13.9 0 017.7 9l-3-3 .7-.8 2.8 2.9 9 8.9 1.5 1.6-.7.6zm0-5.5v.3l-.1 1.1-.4 1-1.2-1.2a4.3 4.3 0 00.2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 00-3-4.2L12 6a26.1 26.1 0 00-2.2 2.5l-1-1a20.9 20.9 0 012.9-3.3L12 4l1 .8a22.2 22.2 0 014 5.4c.6 1.2 1 2.4 1 3.6z" fill-rule="evenodd"/></svg>',italic:'<svg width="24" height="24"><path d="M16.7 4.7l-.1.9h-.3c-.6 0-1 0-1.4.3-.3.3-.4.6-.5 1.1l-2.1 9.8v.6c0 .5.4.8 1.4.8h.2l-.2.8H8l.2-.8h.2c1.1 0 1.8-.5 2-1.5l2-9.8.1-.5c0-.6-.4-.8-1.4-.8h-.3l.2-.9h5.8z" fill-rule="evenodd"/></svg>',language:'<svg width="24" height="24"><path d="M12 3a9 9 0 110 18 9 9 0 010-18zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 003.2-2.1l-.2-.2a6 6 0 00-1-.6zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 01-2-2.8zm3.6-.8c-.8 0-1.6.1-2.2.3.5 1 1.2 1.9 2.1 2.7zm1.5 0v3c.9-.8 1.6-1.7 2.1-2.7-.6-.2-1.4-.3-2.1-.3zm-6-2.7H4.5c.2 1 .5 2.1 1 3h.3l1.3-1a10 10 0 01-.3-2zm12.7 0h-2.3c0 .7-.1 1.4-.3 2l1.6 1.1c.5-1 .9-2 1-3.1zm-3.8 0h-3V14c1 0 2 .1 2.7.4.2-.5.3-1 .3-1.6zm-4.4 0h-3l.3 1.6c.8-.3 1.7-.4 2.7-.4v-1.3zm-5.5-5c-.7 1-1.1 2.2-1.3 3.5h2.3c0-1 .2-1.8.5-2.6l-1.5-1zm2.9 1.4v.1c-.2.6-.4 1.3-.4 2h3V9.4c-1 0-1.8-.1-2.6-.3zm6.6 0h-.1l-2.4.3v1.8h3l-.5-2.1zm3-1.4l-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 00-1.3-3.5zm-9 0l2 .2V5.5a9 9 0 00-2 2.2zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 00-2-2.3zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 011.9-2.5zm4.4 0l.1.1a10 10 0 011.8 2.4l1.1-.7a7.5 7.5 0 00-3-1.8z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zm0 4a1 1 0 01.1 2H13a1 1 0 01-.1-2H21zM7 3.6l3.7 3.7a1 1 0 01-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 011.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 011.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 01-1.3 0h-.1a1 1 0 010-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="M15 9l-8 8H4v-3l8-8 3 3zm1-1l-3-3 1-1h1c-.2 0 0 0 0 0l2 2s0 .2 0 0v1l-1 1zM4 18h16v2H4v-2z" fill-rule="evenodd"/></svg>',link:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2.1 2a2 2 0 102.7 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2-2a2 2 0 10-2.6-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2z" fill-rule="nonzero"/></svg>',"list-bull-circle":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M11 16a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 26a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6zM11 36a2 2 0 100-4 2 2 0 000 4zm0 1a3 3 0 110-6 3 3 0 010 6z" fill-rule="nonzero"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-default":'<svg width="48" height="48"><g fill-rule="evenodd"><circle cx="11" cy="14" r="3"/><circle cx="11" cy="24" r="3"/><circle cx="11" cy="34" r="3"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-bull-square":'<svg width="48" height="48"><g fill-rule="evenodd"><path d="M8 11h6v6H8zM8 21h6v6H8zM8 31h6v6H8z"/><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/></g></svg>',"list-num-default-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 17v-4.8l-1.6 1v-1.1l1.6-1h1.2V17zM33.3 17.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm1.7 5.7c0-1.2 1-2 2.2-2 1.3 0 2.1.8 2.1 1.8 0 .7-.3 1.2-1.3 2.2l-1.2 1v.2h2.6v1h-4.3v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H35zm-1.7 4.3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm3.2 7.3v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H35c0-1.1 1-1.8 2.2-1.8 1.2 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.7.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .6 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm-3.3 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-default":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10 17v-4.8l-1.5 1v-1.1l1.6-1h1.2V17h-1.2zm3.6.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-5 5.7c0-1.2.8-2 2.1-2s2.1.8 2.1 1.8c0 .7-.3 1.2-1.4 2.2l-1.1 1v.2h2.6v1H8.6v-.9l2-1.9c.8-.8 1-1.1 1-1.5 0-.5-.4-.8-1-.8-.5 0-.9.3-.9.9H8.5zm6.3 4.3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM10 34.4v-1h.7c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7s-1 .3-1 .8H8.6c0-1.1 1-1.8 2.2-1.8 1.3 0 2.1.6 2.1 1.6 0 .7-.4 1.2-1 1.3v.1c.8.1 1.3.7 1.3 1.4 0 1-1 1.9-2.4 1.9-1.3 0-2.2-.8-2.3-2h1.2c0 .6.5 1 1.1 1 .7 0 1-.4 1-1 0-.5-.3-.8-1-.8h-.7zm4.7 2.7c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7z"/></g></svg>',"list-num-lower-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M36.5 16c-.9 0-1.5-.5-1.5-1.3s.6-1.3 1.8-1.4h1v-.4c0-.4-.2-.6-.7-.6-.4 0-.7.1-.8.4h-1.1c0-.8.8-1.4 2-1.4S39 12 39 13V16h-1.2v-.6c-.3.4-.8.7-1.4.7zm.4-.8c.6 0 1-.4 1-.9V14h-1c-.5.1-.7.3-.7.6 0 .4.3.6.7.6zM33.1 16.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zM37.7 26c-.7 0-1.2-.2-1.5-.7v.7H35v-6.3h1.2v2.5c.3-.5.8-.9 1.5-.9 1.1 0 1.8 1 1.8 2.4 0 1.5-.7 2.4-1.8 2.4zm-.5-3.6c-.6 0-1 .5-1 1.3s.4 1.4 1 1.4c.7 0 1-.6 1-1.4 0-.8-.3-1.3-1-1.3zM33.2 26.1c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm6 7h-1c-.1-.5-.4-.8-1-.8s-1 .5-1 1.4c0 1 .4 1.4 1 1.4.5 0 .9-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm-6.1 3c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.3 15.2c.5 0 1-.4 1-.9V14h-1c-.5.1-.8.3-.8.6 0 .4.3.6.8.6zm-.4.9c-1 0-1.5-.6-1.5-1.4 0-.8.6-1.3 1.7-1.4h1.1v-.4c0-.4-.2-.6-.7-.6-.5 0-.8.1-.9.4h-1c0-.8.8-1.4 2-1.4 1.1 0 1.8.6 1.8 1.6V16h-1.1v-.6h-.1c-.2.4-.7.7-1.3.7zm4.6 0c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-3.2 10c-.6 0-1.2-.3-1.4-.8v.7H8.5v-6.3H10v2.5c.3-.5.8-.9 1.4-.9 1.2 0 1.9 1 1.9 2.4 0 1.5-.7 2.4-1.9 2.4zm-.4-3.7c-.7 0-1 .5-1 1.3s.3 1.4 1 1.4c.6 0 1-.6 1-1.4 0-.8-.4-1.3-1-1.3zm4 3.7c-.5 0-.7-.3-.7-.7 0-.4.2-.7.7-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-2.2 7h-1.2c0-.5-.4-.8-.9-.8-.6 0-1 .5-1 1.4 0 1 .4 1.4 1 1.4.5 0 .8-.2 1-.7h1c0 1-.8 1.7-2 1.7-1.4 0-2.2-.9-2.2-2.4s.8-2.4 2.2-2.4c1.2 0 2 .7 2 1.7zm1.8 3c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M37.4 16c-1.2 0-2-.8-2-2.3 0-1.5.8-2.4 2-2.4.6 0 1 .4 1.3 1v-.9H40v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1-.7h-.2c-.2.4-.7.8-1.3.8zm.3-1c.6 0 1-.5 1-1.3s-.4-1.3-1-1.3-1 .5-1 1.3.4 1.4 1 1.4zM33.3 16.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM36 21.9c0-1.5.8-2.3 2.1-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.9 1.3.9.3 1.3.8 1.3 1.7 0 1.2-.7 1.9-1.8 1.9-.6 0-1.1-.3-1.4-.8v2.2H36V22zm1.8 1.2v-1h.3c.5 0 .9-.2.9-.7 0-.5-.3-.8-.9-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1 1.3s1-.4 1-1-.4-1-1.2-1h-.3zM33.3 26.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zM37.1 34.6L34.8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.2.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zM33.3 36.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-greek":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M10.5 15c.7 0 1-.5 1-1.3s-.3-1.3-1-1.3c-.5 0-.9.5-.9 1.3s.4 1.4 1 1.4zm-.3 1c-1.1 0-1.8-.8-1.8-2.3 0-1.5.7-2.4 1.8-2.4.7 0 1.1.4 1.3 1h.1v-.9h1.2v3.2c0 .4.1.5.4.5h.2v.9h-.6c-.6 0-1-.2-1.1-.7h-.1c-.2.4-.7.8-1.4.8zm5 .1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.7-.7.5 0 .8.3.8.7 0 .4-.3.7-.8.7zm-4.9 7v-1h.3c.6 0 1-.2 1-.7 0-.5-.4-.8-1-.8-.5 0-.8.3-.8 1v2.2c0 .8.4 1.3 1.1 1.3.6 0 1-.4 1-1s-.5-1-1.3-1h-.3zM8.6 22c0-1.5.7-2.3 2-2.3 1.2 0 2 .6 2 1.6 0 .6-.3 1-.8 1.3.8.3 1.3.8 1.3 1.7 0 1.2-.8 1.9-1.9 1.9-.6 0-1.1-.3-1.3-.8v2.2H8.5V22zm6.2 4.2c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm-4.5 8.5L8 30h1.4l1.7 3.5 1.7-3.5h1.1l-2.2 4.6v.1c.5.8.7 1.4.7 1.8 0 .4-.1.8-.4 1-.2.2-.6.3-1 .3-.9 0-1.3-.4-1.3-1.2 0-.5.2-1 .5-1.7l.1-.2zm.7 1a2 2 0 00-.4.9c0 .3.1.4.4.4.3 0 .4-.1.4-.4 0-.2-.1-.6-.4-1zm4.5.5c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-lower-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M32.9 16v-1.2h-1.3V16H33zm0 10v-1.2h-1.3V26H33zm0 10v-1.2h-1.3V36H33z"/><path fill-rule="nonzero" d="M36 21h-1.5v5H36zM36 31h-1.5v5H36zM39 21h-1.5v5H39zM39 31h-1.5v5H39zM42 31h-1.5v5H42zM36 11h-1.5v5H36zM36 19h-1.5v1H36zM36 29h-1.5v1H36zM39 19h-1.5v1H39zM39 29h-1.5v1H39zM42 29h-1.5v1H42zM36 9h-1.5v1H36z"/></g></svg>',"list-num-lower-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 16v-1.2h1.3V16H15zm0 10v-1.2h1.3V26H15zm0 10v-1.2h1.3V36H15z"/><path fill-rule="nonzero" d="M12 21h1.5v5H12zM12 31h1.5v5H12zM9 21h1.5v5H9zM9 31h1.5v5H9zM6 31h1.5v5H6zM12 11h1.5v5H12zM12 19h1.5v1H12zM12 29h1.5v1H12zM9 19h1.5v1H9zM9 29h1.5v1H9zM6 29h1.5v1H6zM12 9h1.5v1H12z"/></g></svg>',"list-num-upper-alpha-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M39.3 17l-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3zm-1.6-4.7l-.7 2.3h1.6l-.8-2.3zM33.4 17c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zm4.7 9.9h-2.7v-6H38c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zm-1.4-5v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4h1.1c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9h-1.1V26zM33 27.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm4.9 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm-4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-alpha":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M12.6 17l-.5-1.4h-2L9.5 17H8.3l2-6H12l2 6h-1.3zM11 12.3l-.7 2.3h1.6l-.8-2.3zm4.7 4.8c-.4 0-.7-.3-.7-.7 0-.4.3-.7.7-.7.5 0 .7.3.7.7 0 .4-.2.7-.7.7zM11.4 27H8.7v-6h2.6c1.2 0 1.9.6 1.9 1.5 0 .6-.5 1.2-1 1.3.7.1 1.3.7 1.3 1.5 0 1-.8 1.7-2 1.7zM10 22v1.5h1c.6 0 1-.3 1-.8 0-.4-.4-.7-1-.7h-1zm0 4H11c.7 0 1.1-.3 1.1-.8 0-.6-.4-.9-1.1-.9H10V26zm5.4 1.1c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7zm-4.1 10c-1.8 0-2.8-1.1-2.8-3.1s1-3.1 2.8-3.1c1.4 0 2.5.9 2.6 2.2h-1.3c0-.7-.6-1.1-1.3-1.1-1 0-1.6.7-1.6 2s.6 2 1.6 2c.7 0 1.2-.4 1.4-1h1.2c-.1 1.3-1.2 2.2-2.6 2.2zm4.5 0c-.5 0-.8-.3-.8-.7 0-.4.3-.7.8-.7.4 0 .7.3.7.7 0 .4-.3.7-.7.7z"/></g></svg>',"list-num-upper-roman-rtl":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M8 12h22v4H8zM8 22h22v4H8zM8 32h22v4H8z"/><path d="M31.6 17v-1.2H33V17h-1.3zm0 10v-1.2H33V27h-1.3zm0 10v-1.2H33V37h-1.3z"/><path fill-rule="nonzero" d="M34.5 20H36v7h-1.5zM34.5 30H36v7h-1.5zM37.5 20H39v7h-1.5zM37.5 30H39v7h-1.5zM40.5 30H42v7h-1.5zM34.5 10H36v7h-1.5z"/></g></svg>',"list-num-upper-roman":'<svg width="48" height="48"><g fill-rule="evenodd"><path opacity=".2" d="M18 12h22v4H18zM18 22h22v4H18zM18 32h22v4H18z"/><path d="M15.1 17v-1.2h1.3V17H15zm0 10v-1.2h1.3V27H15zm0 10v-1.2h1.3V37H15z"/><path fill-rule="nonzero" d="M12 20h1.5v7H12zM12 30h1.5v7H12zM9 20h1.5v7H9zM9 30h1.5v7H9zM6 30h1.5v7H6zM12 10h1.5v7H12z"/></g></svg>',lock:'<svg width="24" height="24"><path d="M16.3 11c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H8V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h.3zM10 8v3h4V8a1 1 0 00-.3-.7A1 1 0 0013 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 017.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L11 5zM4.4 16.2L6.2 15l-1.8-1.2a1 1 0 011.2-1.6l3 2a1 1 0 010 1.6l-3 2a1 1 0 11-1.2-1.6z" fill-rule="evenodd"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm12 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2zm-6 0a2 2 0 00-2 2c0 1.1.9 2 2 2a2 2 0 002-2 2 2 0 00-2-2z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 00-2 2v14c0 1.1.9 2 2 2h10a2 2 0 002-2V7.6L14.4 3zM17 19H7V5h6v4h4v10z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="M15 13l2-2v8H5V7h8l-2 2H7v8h8v-4zm4-8v5.5l-2-2-5.6 5.5H10v-1.4L15.5 7l-2-2H19z" fill-rule="evenodd"/></svg>',"non-breaking":'<svg width="24" height="24"><path d="M11 11H8a1 1 0 110-2h3V6c0-.6.4-1 1-1s1 .4 1 1v3h3c.6 0 1 .4 1 1s-.4 1-1 1h-3v3c0 .6-.4 1-1 1a1 1 0 01-1-1v-3zm10 4v5H3v-5c0-.6.4-1 1-1s1 .4 1 1v3h14v-3c0-.6.4-1 1-1s1 .4 1 1z" fill-rule="evenodd"/></svg>',notice:'<svg width="24" height="24"><path d="M17.8 9.8L15.4 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7l2.3 5.8zm0 0l2.2 5.7-2.3-5.8zM13 17v-2h-2v2h2zm0-4V7h-2v6h2z" fill-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 010-2zm0-6h8a1 1 0 010 2H6a1 1 0 110-2zm13-1v3.5a.5.5 0 11-1 0V5h-.5a.5.5 0 110-1H19zm-1 8.8l.2.2h1.3a.5.5 0 110 1h-1.6a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2h-1.3a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zm2 4.2v2c0 .6-.4 1-1 1h-1.5a.5.5 0 010-1h1.2a.3.3 0 100-.6h-1.3a.4.4 0 110-.8h1.3a.3.3 0 000-.6h-1.2a.5.5 0 110-1H19c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',"ordered-list":'<svg width="24" height="24"><path d="M10 17h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 110-2zM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 01-.5-.5V5h-.5a.5.5 0 010-1H6zm-1 8.8l.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 01-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 00-.2-.2H4.5a.5.5 0 01-.5-.5c0-.3.2-.5.5-.5h1.6c.5 0 .9.4.9 1v.1c0 .4-.3.8-.6 1l-1.2.4-.2.3zM7 17v2c0 .6-.4 1-1 1H4.5a.5.5 0 010-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 110-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 110-1H6c.6 0 1 .4 1 1z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4L1 13l6.4 6.5 6.5-6.5-6.5-6.5zM3.7 13l3.6-3.7L11 13l-3.7 3.7-3.6-3.7zM12 6l2.8 2.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0L9.2 5.7a.8.8 0 010-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 11-4.3 16.9l1.5-1.5A7 7 0 1013 6h-1z" fill-rule="nonzero"/></svg>',outdent:'<svg width="24" height="24"><path d="M7 5h12c.6 0 1 .4 1 1s-.4 1-1 1H7a1 1 0 110-2zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 010-2zm-5 4h12a1 1 0 010 2H7a1 1 0 010-2zm1.6-3.8a1 1 0 01-1.2 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 011.2 1.6L6.8 12l1.8 1.2z" fill-rule="evenodd"/></svg>',"page-break":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M5 11c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 010-2zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1zM6 22a1 1 0 01-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 01-1-1v-5H7v5c0 .6-.4 1-1 1z"/></g></svg>',paragraph:'<svg width="24" height="24"><path fill-rule="evenodd" d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm8 7v12h-6V8h6zm-1.5 1.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm-2 7v12H4V8h6zM8.5 9.5h-3v9h3v-9zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 11v5H8v-5h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 012.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h12v-4h2v4c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0112 1zm10 7v5H8V8h14zm-1.5 1.5h-11v2h11v-2zM12 3a1 1 0 100 2 1 1 0 000-2z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1zm0 9h6v2h-.5l-.5-1h-1v4h.8v1h-3.6v-1h.8v-4h-1l-.5 1H12v-2z" fill-rule="nonzero"/></svg>',paste:'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 01-1-1V5H6v13h3V9h9zM9 20H6a2 2 0 01-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0112 1a3 3 0 012.8 2H18a2 2 0 012 2v4h1v12H9v-1zm1.5-9.5v9h9v-9h-9zM12 3a1 1 0 00-1 1c0 .5.4 1 1 1s1-.5 1-1-.4-1-1-1z" fill-rule="nonzero"/></svg>',"permanent-pen":'<svg width="24" height="24"><path d="M10.5 17.5L8 20H3v-3l3.5-3.5a2 2 0 010-3L14 3l1 1-7.3 7.3a1 1 0 000 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 01-2.8 0l-.1-.1z" fill-rule="nonzero"/></svg>',plus:'<svg width="24" height="24"><path d="M12 4c.5 0 1 .4 1 .9V11h6a1 1 0 01.1 2H13v6a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H11V5c0-.6.4-1 1-1z"/></svg>',preferences:'<svg width="24" height="24"><path d="M20.1 13.5l-1.9.2a5.8 5.8 0 01-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 01-1.4 0l-1.5-1.2a6.2 6.2 0 01-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 01-1-.9l-.2-1.9a5.8 5.8 0 01-1.5-.6l-1.5 1.2a1 1 0 01-1.4 0l-.7-.7a1 1 0 010-1.4l1.2-1.5a6.2 6.2 0 01-.6-1.5l-1.9-.2a1 1 0 01-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 01.6-1.5L5.2 7.3a1 1 0 010-1.4l.7-.7a1 1 0 011.4 0l1.5 1.2a6.2 6.2 0 011.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 011.5.6l1.5-1.2a1 1 0 011.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 01.6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1zM12 15a3 3 0 100-6 3 3 0 000 6z" fill-rule="evenodd"/></svg>',preview:'<svg width="24" height="24"><path d="M3.5 12.5c.5.8 1.1 1.6 1.8 2.3 2 2 4.2 3.2 6.7 3.2s4.7-1.2 6.7-3.2a16.2 16.2 0 002.1-2.8 15.7 15.7 0 00-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 00-6.7 3.2A16.2 16.2 0 003.2 12c0 .2.2.3.3.5zm-2.4-1l.7-1.2L4 7.8C6.2 5.4 8.9 4 12 4c3 0 5.8 1.4 8.1 3.8a18.2 18.2 0 012.8 3.7v1l-.7 1.2-2.1 2.5c-2.3 2.4-5 3.8-8.1 3.8-3 0-5.8-1.4-8.1-3.8a18.2 18.2 0 01-2.8-3.7 1 1 0 010-1zm12-3.3a2 2 0 102.7 2.6 4 4 0 11-2.6-2.6z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 00-3 3v6h2v3h14v-3h2v-6a3 3 0 00-3-3zm-1 10H7v-4h10v4zm.5-5c-.8 0-1.5-.7-1.5-1.5s.7-1.5 1.5-1.5 1.5.7 1.5 1.5-.7 1.5-1.5 1.5zm.5-8H6v2h12V5z" fill-rule="nonzero"/></svg>',quote:'<svg width="24" height="24"><path d="M7.5 17h.9c.4 0 .7-.2.9-.6L11 13V8c0-.6-.4-1-1-1H6a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 00-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 00.8 1.3z" fill-rule="nonzero"/></svg>',redo:'<svg width="24" height="24"><path d="M17.6 10H12c-2.8 0-4.4 1.4-4.9 3.5-.4 2 .3 4 1.4 4.6a1 1 0 11-1 1.8c-2-1.2-2.9-4.1-2.3-6.8.6-3 3-5.1 6.8-5.1h5.6l-3.3-3.3a1 1 0 111.4-1.4l5 5a1 1 0 010 1.4l-5 5a1 1 0 01-1.4-1.4l3.3-3.3z" fill-rule="nonzero"/></svg>',reload:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M5 22.1l-1.2-4.7v-.2a1 1 0 011-1l5 .4a1 1 0 11-.2 2l-2.2-.2a7.8 7.8 0 008.4.2 7.5 7.5 0 003.5-6.4 1 1 0 112 0 9.5 9.5 0 01-4.5 8 9.9 9.9 0 01-10.2 0l.4 1.4a1 1 0 11-2 .5zM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 00-9.5-1 7.5 7.5 0 00-3.6 7 1 1 0 01-2 0 9.5 9.5 0 014.5-8.6 10 10 0 0110.9.3l-.3-1a1 1 0 012-.5l1.1 4.8a1 1 0 01-1 1.2l-5-.4a1 1 0 01-.9-1z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 010 .2l-2.6 10a1 1 0 01-1 .8h-.2a.8.8 0 01-.8-1l2.6-10H8a1 1 0 110-2h9a1 1 0 010 2h-3.8zM5 18h7a1 1 0 010 2H5a1 1 0 010-2zm13 1.5L16.5 18 15 19.5a.7.7 0 01-1-1l1.5-1.5-1.5-1.5a.7.7 0 011-1l1.5 1.5 1.5-1.5a.7.7 0 011 1L17.5 17l1.5 1.5a.7.7 0 01-1 1z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 010 2h-1v9a3 3 0 01-3 3H9a3 3 0 01-3-3V9H5a1 1 0 110-2h3V6a3 3 0 013-3h2a3 3 0 013 3v1zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 00-1 1v1h4zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9zm-7 3a1 1 0 012 0v4a1 1 0 01-2 0v-4zm4 0a1 1 0 012 0v4a1 1 0 01-2 0v-4z" fill-rule="nonzero"/></svg>',"resize-handle":'<svg width="10" height="10"><g fill-rule="nonzero"><path d="M8.1 1.1A.5.5 0 119 2l-7 7A.5.5 0 111 8l7-7zM8.1 5.1A.5.5 0 119 6l-3 3A.5.5 0 115 8l3-3z"/></g></svg>',resize:'<svg width="24" height="24"><path d="M4 5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h6c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 01-.7.3H7.4L18 16.6V13c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3.3 0 .5.1.7.3.2.2.3.4.3.7v6c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-6a1 1 0 01-.7-.3 1 1 0 01-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 01-.7.3 1 1 0 01-.7-.3A1 1 0 014 11V5z" fill-rule="evenodd"/></svg>',"restore-draft":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M17 13c0 .6-.4 1-1 1h-4V8c0-.6.4-1 1-1s1 .4 1 1v4h2c.6 0 1 .4 1 1z"/><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 010 2H3a1 1 0 01-1-1V5a1 1 0 112 0v3l2.5-2.4a9.2 9.2 0 0110.8-1.5A9 9 0 0113.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 111.3-1.5 7.2 7.2 0 0011.6-3.7 7 7 0 00-3.5-7.7A7.2 7.2 0 008 7L4.7 10z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 012 0v6c0 .6-.4 1-1 1h-6a1 1 0 010-2h4.3L16 7A7.2 7.2 0 007.7 6a7 7 0 003 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 011.4 1.5A9.2 9.2 0 012.2 14c-.9-3.9 1-8 4.5-9.9 3.5-1.9 8-1.3 10.8 1.5L20 8z" fill-rule="nonzero"/></svg>',rtl:'<svg width="24" height="24"><path d="M8 5h8v2h-2v12h-2V7h-2v12H8v-7c-.5 0-1 0-1.4-.3A3.4 3.4 0 014.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L8 5zm12 11.2a1 1 0 11-1 1.6l-3-2a1 1 0 010-1.6l3-2a1 1 0 111 1.6L18.4 15l1.8 1.2z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 012 2v2a2 2 0 01-2 2H5a2 2 0 01-2-2v-2c0-1.1.9-2 2-2zm0 2v2h14v-2H5zm10 0h2v2h-2v-2zm-4-6.4L8.7 9.3a1 1 0 10-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 10-1.4-1.4L13 11.6V4a1 1 0 00-2 0v7.6z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 00-2 2zm0 8h2v-2H3v2zm4 8h2v-2H7v2zM3 9h2V7H3v2zm10-6h-2v2h2V3zm6 0v2h2a2 2 0 00-2-2zM5 21v-2H3c0 1.1.9 2 2 2zm-2-4h2v-2H3v2zM9 3H7v2h2V3zm2 18h2v-2h-2v2zm8-8h2v-2h-2v2zm0 8a2 2 0 002-2h-2v2zm0-12h2V7h-2v2zm0 8h2v-2h-2v2zm-4 4h2v-2h-2v2zm0-16h2V3h-2v2zM7 17h10V7H7v10zm2-8h6v6H9V9z" fill-rule="nonzero"/></svg>',selected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm3.6 10.9L7 12.3a.7.7 0 00-1 1L9.6 17 18 8.6a.7.7 0 000-1 .7.7 0 00-1 0l-7.4 7.3z"/></svg>',settings:'<svg width="24" height="24"><path d="M11 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V8H5a1 1 0 110-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.5V6zM8 8h2V6H8v2zm9 2.8v.2h2c.6 0 1 .4 1 1s-.4 1-1 1h-2v.3c0 .2 0 .3-.2.5l-.6.2h-2.4c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V13H5a1 1 0 010-2h8v-.3c0-.2 0-.3.2-.5l.6-.2h2.4c.3 0 .4 0 .6.2l.2.6zM14 13h2v-2h-2v2zm-3 2.8v.2h8c.6 0 1 .4 1 1s-.4 1-1 1h-8v.3c0 .2 0 .3-.2.5l-.6.2H7.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6V18H5a1 1 0 010-2h2v-.3c0-.2 0-.3.2-.5l.5-.2h2.5c.3 0 .4 0 .6.2l.2.6zM8 18h2v-2H8v2z" fill-rule="evenodd"/></svg>',sharpen:'<svg width="24" height="24"><path d="M16 6l4 4-8 9-8-9 4-4h8zm-4 10.2l5.5-6.2-.1-.1H12v-.3h5.1l-.2-.2H12V9h4.6l-.2-.2H12v-.3h4.1l-.2-.2H12V8h3.6l-.2-.2H8.7L6.5 10l.1.1H12v.3H6.9l.2.2H12v.3H7.3l.2.2H12v.3H7.7l.3.2h4v.3H8.2l.2.2H12v.3H8.6l.3.2H12v.3H9l.3.2H12v.3H9.5l.2.2H12v.3h-2l.2.2H12v.3h-1.6l.2.2H12v.3h-1.1l.2.2h.9v.3h-.7l.2.2h.5v.3h-.3l.3.2z" fill-rule="evenodd"/></svg>',sourcecode:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M9.8 15.7c.3.3.3.8 0 1-.3.4-.9.4-1.2 0l-4.4-4.1a.8.8 0 010-1.2l4.4-4.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L6 12l3.8 3.7zM14.2 15.7c-.3.3-.3.8 0 1 .4.4.9.4 1.2 0l4.4-4.1c.3-.3.3-.9 0-1.2l-4.4-4.2a.8.8 0 00-1.2 0c-.3.3-.3.8 0 1.1L18 12l-3.8 3.7z"/></g></svg>',"spell-check":'<svg width="24" height="24"><path d="M6 8v3H5V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h2c.3 0 .5.1.7.3.2.2.3.4.3.7v6H8V8H6zm0-3v2h2V5H6zm13 0h-3v5h3v1h-3a1 1 0 01-.7-.3 1 1 0 01-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1zm-5 1.5l-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 01-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5zM13 10V8h-2v2h2zm0-3V5h-2v2h2zm3 5l1 1-6.5 7L7 15.5l1.3-1 2.2 2.2L16 12z" fill-rule="evenodd"/></svg>',"strike-through":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M15.6 8.5c-.5-.7-1-1.1-1.3-1.3-.6-.4-1.3-.6-2-.6-2.7 0-2.8 1.7-2.8 2.1 0 1.6 1.8 2 3.2 2.3 4.4.9 4.6 2.8 4.6 3.9 0 1.4-.7 4.1-5 4.1A6.2 6.2 0 017 16.4l1.5-1.1c.4.6 1.6 2 3.7 2 1.6 0 2.5-.4 3-1.2.4-.8.3-2-.8-2.6-.7-.4-1.6-.7-2.9-1-1-.2-3.9-.8-3.9-3.6C7.6 6 10.3 5 12.4 5c2.9 0 4.2 1.6 4.7 2.4l-1.5 1.1z"/><path d="M5 11h14a1 1 0 010 2H5a1 1 0 010-2z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="M10.4 10l4.6 4.6-1.4 1.4L9 11.4 4.4 16 3 14.6 7.6 10 3 5.4 4.4 4 9 8.6 13.6 4 15 5.4 10.4 10zM21 19h-5v-1l1-.8 1.7-1.6c.3-.4.5-.8.5-1.2 0-.3 0-.6-.2-.7-.2-.2-.5-.3-.9-.3a2 2 0 00-.8.2l-.7.3-.4-1.1 1-.6 1.2-.2c.8 0 1.4.3 1.8.7.4.4.6.9.6 1.5s-.2 1.1-.5 1.6a8 8 0 01-1.3 1.3l-.6.6h2.6V19z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4L10.4 14l4.6 4.6-1.4 1.4L9 15.4 4.4 20 3 18.6 7.6 14 3 9.4 4.4 8 9 12.6 13.6 8 15 9.4zm5.9 1.6h-5v-1l1-.8 1.7-1.6c.3-.5.5-.9.5-1.3 0-.3 0-.5-.2-.7-.2-.2-.5-.3-.9-.3l-.8.2-.7.4-.4-1.2c.2-.2.5-.4 1-.5.3-.2.8-.2 1.2-.2.8 0 1.4.2 1.8.6.4.4.6 1 .6 1.6 0 .5-.2 1-.5 1.5l-1.3 1.4-.6.5h2.6V11z" fill-rule="nonzero"/></svg>',"table-caption":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="12" height="2" x="3" y="4" rx="1"/><path d="M19 8a2 2 0 012 2v8a2 2 0 01-2 2H5a2 2 0 01-2-2v-8c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></g></svg>',"table-cell-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M13 4v9H3V6c0-1.1.9-2 2-2h8zm-2 2H5v5h6V6z"/><path fill-rule="nonzero" d="M13 4h6a2 2 0 012 2v7h-8v-2h6V6h-6V4z" opacity=".2"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/><path fill-rule="nonzero" d="M3 13v5c0 1.1.9 2 2 2h8v-7h-2v5H5v-5H3z" opacity=".2"/></g></svg>',"table-cell-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8 0h-6v5h6v-5zm-8-7H5v5h6V6z"/></svg>',"table-cell-select-all":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z" opacity=".2"/></g></svg>',"table-cell-select-inner":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v12h14V6z" opacity=".2"/><path d="M13 6v5h6v2h-6v5h-2v-5H5v-2h6V6h2z"/></g></svg>',"table-classes":'<svg width="24" height="24"><g fill-rule="evenodd"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v7h-8v7H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 9H5v5h6v-5zm8-7h-6v5h6V6zm-8 0H5v5h6V6z"/><path d="M18 20l-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3 .2-2.3 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2zm.3.5l1 1.2-3 2.3 3 2.3-1 1.2L12 13l-3.3 2.6-1-1.2 3-2.3-3-2.3 1-1.2L12 11l3.3-2.5z"/></svg>',"table-delete-row":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6zm-4.7 1.8l1.2 1L13 12l2.6 3.3-1.2 1-2.3-3-2.3 3-1.2-1L11 12 8.5 8.7l1.2-1 2.3 3 2.3-3z"/></svg>',"table-delete-table":'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 6v12h14V6H5z"/><path d="M14.4 8.6l1 1-2.3 2.4 2.3 2.4-1 1-2.4-2.3-2.4 2.3-1-1 2.3-2.4-2.3-2.4 1-1 2.4 2.3z"/></g></svg>',"table-insert-column-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M20 4c.6 0 1 .4 1 1v2a1 1 0 01-2 0V6h-8v12h8v-1a1 1 0 012 0v2c0 .5-.4 1-.9 1H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h15zM9 13H5v5h4v-5zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H17v2a1 1 0 01-2 .1V13h-2a1 1 0 01-.1-2H15V9c0-.6.4-1 1-1zM9 6H5v5h4V6z"/></svg>',"table-insert-column-before":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H4a1 1 0 01-1-1v-2a1 1 0 012 0v1h8V6H5v1a1 1 0 11-2 0V5c0-.6.4-1 1-1h15zm0 9h-4v5h4v-5zM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 01.1 2H9v2a1 1 0 01-2 .1V13H5a1 1 0 01-.1-2H7V9c0-.6.4-1 1-1zm11-2h-4v5h4V6z"/></svg>',"table-insert-row-above":'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4a1 1 0 110 2H5v6h14V6h-1a1 1 0 010-2h2c.6 0 1 .4 1 1v13a2 2 0 01-2 2H5a2 2 0 01-2-2V5c0-.6.4-1 1-1h2zm5 10H5v4h6v-4zm8 0h-6v4h6v-4zM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 010 2h-2v2a1 1 0 01-2 .1V8H9a1 1 0 010-2h2V4c0-.6.4-1 1-1z"/></svg>',"table-insert-row-after":'<svg width="24" height="24"><path fill-rule="nonzero" d="M12 13c.5 0 1 .4 1 .9V16h2a1 1 0 01.1 2H13v2a1 1 0 01-2 .1V18H9a1 1 0 01-.1-2H11v-2c0-.6.4-1 1-1zm6 7a1 1 0 010-2h1v-6H5v6h1a1 1 0 010 2H4a1 1 0 01-1-1V6c0-1.1.9-2 2-2h14a2 2 0 012 2v13c0 .5-.4 1-.9 1H18zM11 6H5v4h6V6zm8 0h-6v4h6V6z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm0 9h-4v5h4v-5zm-6 0H9v5h4v-5zm0-7H9v5h4V6zm6 0h-4v5h4V6z"/></svg>',"table-merge-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15.5V18h3v-2.5H5zm14-5h-9V18h9v-7.5zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6zm-8 7.5h3v-3H5v3z"/></svg>',"table-row-numbering-rtl":'<svg width="24" height="24"><path d="M6 4a2 2 0 00-2 2v13c0 1.1.9 2 2 2h12a2 2 0 002-2V6a2 2 0 00-2-2H6zm0 12h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 11h8v3H6v-3zm11 0c.6 0 1 .4 1 1v1a1 1 0 01-2 0v-1c0-.6.4-1 1-1zM6 6h8v3H6V6zm11 0c.6 0 1 .4 1 1v1a1 1 0 11-2 0V7c0-.6.4-1 1-1z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 012 2v13a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2h12zm0 12h-8v3h8v-3zM7 16a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8v-3zM7 11a1 1 0 00-1 1v1a1 1 0 002 0v-1c0-.6-.4-1-1-1zm11-5h-8v3h8V6zM7 6a1 1 0 00-1 1v1a1 1 0 102 0V7c0-.6-.4-1-1-1z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 15v3h6v-3H5zm14 0h-6v3h6v-3zm0-9h-6v3h6V6zM5 9h6V6H5v3z"/></svg>',"table-split-cells":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM8 15.5H5V18h3v-2.5zm11-5h-9V18h9v-7.5zm-2.5 1l1 1-2 2 2 2-1 1-2-2-2 2-1-1 2-2-2-2 1-1 2 2 2-2zm-8.5-1H5v3h3v-3zM19 6h-4v2.5h4V6zM8 6H5v2.5h3V6zm5 0h-3v2.5h3V6z"/></svg>',"table-top-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zm-8 11H5v3h6v-3zm8 0h-6v3h6v-3zm0-5h-6v3h6v-3zM5 13h6v-3H5v3z"/></svg>',table:'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 012 2v12a2 2 0 01-2 2H5a2 2 0 01-2-2V6c0-1.1.9-2 2-2h14zM5 14v4h6v-4H5zm14 0h-6v4h6v-4zm0-6h-6v4h6V8zM5 12h6V8H5v4z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14zM9 16v-4a5 5 0 116 0v4h4a2 2 0 012 2v3H3v-3c0-1.1.9-2 2-2h4zm4 0v-5l.8-.6a3 3 0 10-3.6 0l.8.6v5h2z" fill-rule="nonzero"/></svg>',"temporary-placeholder":'<svg width="24" height="24"><g fill-rule="evenodd"><path d="M9 7.6V6h2.5V4.5a.5.5 0 111 0V6H15v1.6a8 8 0 11-6 0zm-2.6 5.3a.5.5 0 00.3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 013.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 00-4.1 3.7z"/><circle cx="14" cy="4" r="1"/><circle cx="12" cy="2" r="1"/><circle cx="10" cy="4" r="1"/></g></svg>',"text-color":'<svg width="24" height="24"><g fill-rule="evenodd"><path id="tox-icon-text-color__color" d="M3 18h18v3H3z"/><path d="M8.7 16h-.8a.5.5 0 01-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 01-.5.6h-.8a.5.5 0 01-.4-.4l-.7-2.2c0-.3-.3-.4-.5-.4h-3.4c-.2 0-.4.1-.5.4l-.7 2.2c0 .3-.2.4-.4.4zm2.6-7.6l-.6 2a.5.5 0 00.5.6h1.6a.5.5 0 00.5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4z"/></g></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 110-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 110-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 010-2zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="M12.7 14.3l-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 010-1l3.1-3A12.4 12.4 0 016.7 9H8a10.1 10.1 0 001.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 110-1.5h4.4v-.7c0-.4.3-.8.7-.8.4 0 .7.4.7.8v.7H15c.4 0 .8.3.8.7 0 .4-.4.8-.8.8h-1.4a12.3 12.3 0 01-1 2.4 13.5 13.5 0 01-1.7 2.3l1.9 1.8zm4.3-3l2.7 7.3a.5.5 0 01-.4.7 1 1 0 01-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 01-1 .7.5.5 0 01-.4-.7l2.7-7.4a1 1 0 012 0zm-2.2 4.4h2.4L16 12.5l-1.2 3.2z" fill-rule="evenodd"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 01-.4 1.8l-1 1.4a5.3 5.3 0 01-5.5 1 5 5 0 01-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 01-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 002.2.8 3.4 3.4 0 002.2-.8c.3-.2.4-.5.6-.8l.2-.9V6c0-.6.4-1 1-1zM8 17h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 010-2z" fill-rule="evenodd"/></svg>',undo:'<svg width="24" height="24"><path d="M6.4 8H12c3.7 0 6.2 2 6.8 5.1.6 2.7-.4 5.6-2.3 6.8a1 1 0 01-1-1.8c1.1-.6 1.8-2.7 1.4-4.6-.5-2.1-2.1-3.5-4.9-3.5H6.4l3.3 3.3a1 1 0 11-1.4 1.4l-5-5a1 1 0 010-1.4l5-5a1 1 0 011.4 1.4L6.4 8z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 011.4 1.4l-2 2a2 2 0 102.6 2.8l4.8-4.8a1 1 0 000-1.4 1 1 0 111.4-1.3 2.9 2.9 0 010 4L9.6 20a3.9 3.9 0 01-5.5-5.5l2-2zm11.6-.6a1 1 0 01-1.4-1.4l2.1-2a2 2 0 10-2.7-2.8L11 10.3a1 1 0 000 1.4A1 1 0 119.6 13a2.9 2.9 0 010-4L14.4 4a3.9 3.9 0 015.5 5.5l-2 2zM7.6 6.3a.8.8 0 01-1 1.1L3.3 4.2a.7.7 0 111-1l3.2 3.1zM5.1 8.6a.8.8 0 010 1.5H3a.8.8 0 010-1.5H5zm5-3.5a.8.8 0 01-1.5 0V3a.8.8 0 011.5 0V5zm6 11.8a.8.8 0 011-1l3.2 3.2a.8.8 0 01-1 1L16 17zm-2.2 2a.8.8 0 011.5 0V21a.8.8 0 01-1.5 0V19zm5-3.5a.7.7 0 110-1.5H21a.8.8 0 010 1.5H19z" fill-rule="nonzero"/></svg>',unlock:'<svg width="24" height="24"><path d="M16 5c.8 0 1.5.3 2.1.9.6.6.9 1.3.9 2.1v3h-2V8a1 1 0 00-.3-.7A1 1 0 0016 7h-2a1 1 0 00-.7.3 1 1 0 00-.3.7v3h.3c.2 0 .3 0 .5.2l.2.6v7.4c0 .3 0 .4-.2.6l-.6.2H4.8c-.3 0-.4 0-.6-.2a.7.7 0 01-.2-.6v-7.4c0-.3 0-.4.2-.6l.5-.2H11V8c0-.8.3-1.5.9-2.1.6-.6 1.3-.9 2.1-.9h2z" fill-rule="evenodd"/></svg>',"unordered-list":'<svg width="24" height="24"><path d="M11 5h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 010-2zM4.5 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1zm0 6c0-.4.1-.8.4-1 .3-.4.7-.5 1.1-.5.4 0 .8.1 1 .4.4.3.5.7.5 1.1 0 .4-.1.8-.4 1-.3.4-.7.5-1.1.5-.4 0-.8-.1-1-.4-.4-.3-.5-.7-.5-1.1z" fill-rule="evenodd"/></svg>',unselected:'<svg width="24" height="24"><path fill-rule="nonzero" d="M6 4h12a2 2 0 012 2v12a2 2 0 01-2 2H6a2 2 0 01-2-2V6c0-1.1.9-2 2-2zm0 1a1 1 0 00-1 1v12c0 .6.4 1 1 1h12c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H6z"/></svg>',upload:'<svg width="24" height="24"><path d="M18 19v-2a1 1 0 012 0v3c0 .6-.4 1-1 1H5a1 1 0 01-1-1v-3a1 1 0 012 0v2h12zM11 6.4L8.7 8.7a1 1 0 01-1.4-1.4l4-4a1 1 0 011.4 0l4 4a1 1 0 11-1.4 1.4L13 6.4V16a1 1 0 01-2 0V6.4z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 110-24 12 12 0 010 24zm-8.7-5.3a11 11 0 0017.4 0C19.4 16.3 14.6 15 12 15c-2.6 0-7.4 1.3-8.7 3.7zM12 13c2.2 0 4-2 4-4.5S14.2 4 12 4 8 6 8 8.5 9.8 13 12 13z" fill-rule="nonzero"/></svg>',"vertical-align":'<svg width="24" height="24"><g fill-rule="nonzero"><rect width="18" height="2" x="3" y="11" rx="1"/><path d="M12 2c.6 0 1 .4 1 1v4l2-1.3a1 1 0 011.2 1.5l-.1.1-4.1 3-4-3a1 1 0 011-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8l4 2.9a1 1 0 01-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 01-1-1v-4l-2 1.3a1 1 0 01-1.2-.1l-.1-.1a1 1 0 01.1-1.3l.1-.1 4.1-3z"/></g></svg>',visualblocks:'<svg width="24" height="24"><path d="M9 19v2H7v-2h2zm-4 0v2a2 2 0 01-2-2h2zm8 0v2h-2v-2h2zm8 0a2 2 0 01-2 2v-2h2zm-4 0v2h-2v-2h2zM15 7a1 1 0 010 2v7a1 1 0 01-2 0V9h-1v7a1 1 0 01-2 0v-4a2.5 2.5 0 01-.2-5H15zM5 15v2H3v-2h2zm16 0v2h-2v-2h2zM5 11v2H3v-2h2zm16 0v2h-2v-2h2zM5 7v2H3V7h2zm16 0v2h-2V7h2zM5 3v2H3c0-1.1.9-2 2-2zm8 0v2h-2V3h2zm6 0a2 2 0 012 2h-2V3zM9 3v2H7V3h2zm8 0v2h-2V3h2z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 010 2h-1v11a1 1 0 01-2 0V7h-2v11a1 1 0 01-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 016.8 10a3.3 3.3 0 010-2.8 3.4 3.4 0 011.8-1.8L10 5z" fill-rule="evenodd"/></svg>',warning:'<svg width="24" height="24"><path d="M19.8 18.3c.2.5.3.9 0 1.2-.1.3-.5.5-1 .5H5.2c-.5 0-.9-.2-1-.5-.3-.3-.2-.7 0-1.2L11 4.7l.5-.5.5-.2c.2 0 .3 0 .5.2.2 0 .3.3.5.5l6.8 13.6zM12 18c.3 0 .5-.1.7-.3.2-.2.3-.4.3-.7a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3zm.7-3l.3-4a1 1 0 00-.3-.7 1 1 0 00-.7-.3 1 1 0 00-.7.3 1 1 0 00-.3.7l.3 4h1.4z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-1-9a1 1 0 012 0v6a1 1 0 01-2 0V8zm-2 4a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 111.4-1.4l4.3 4.4a1 1 0 01-1.4 1.4l-4.4-4.3zm-5-.3a6 6 0 100-12 6 6 0 000 12zm-3-5a1 1 0 010-2h6a1 1 0 010 2H8z" fill-rule="nonzero"/></svg>'}})},477:(e,t,o)=>{o(478)},478:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.ModelManager");const t=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const o=e=>{const o=typeof e;if(e===null){return"null"}else if(o==="object"&&Array.isArray(e)){return"array"}else if(o==="object"&&t(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return o}};const n=e=>t=>o(t)===e;const s=e=>t=>typeof t===e;const r=e=>t=>e===t;const a=n("string");const c=n("object");const i=n("array");const l=r(null);const d=s("boolean");const u=e=>e===null||e===undefined;const f=e=>!u(e);const m=s("function");const g=s("number");const p=()=>{};const h=(e,t)=>(...o)=>e(t.apply(null,o));const y=(e,t)=>o=>e(t(o));const b=e=>()=>e;const v=e=>e;const k=(e,t)=>e===t;function w(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const _=e=>t=>!e(t);const x=e=>()=>{throw new Error(e)};const z=e=>e();const C=b(false);const S=b(true);class T{constructor(e,t){this.tag=e;this.value=t}static some(e){return new T(true,e)}static none(){return T.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return T.some(e(this.value))}else{return T.none()}}bind(e){if(this.tag){return e(this.value)}else{return T.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return T.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return f(e)?T.some(e):T.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}T.singletonNone=new T(false);const O=Array.prototype.slice;const E=Array.prototype.indexOf;const D=Array.prototype.push;const A=(e,t)=>E.call(e,t);const M=(e,t)=>A(e,t)>-1;const N=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return true}}return false};const R=(e,t)=>{const o=[];for(let n=0;n<e;n++){o.push(t(n))}return o};const B=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const L=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const H=(e,t)=>{for(let o=e.length-1;o>=0;o--){const n=e[o];t(n,o)}};const I=(e,t)=>{const o=[];const n=[];for(let s=0,r=e.length;s<r;s++){const r=e[s];const a=t(r,s)?o:n;a.push(r)}return{pass:o,fail:n}};const P=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const F=(e,t,o)=>{H(e,((e,n)=>{o=t(o,e,n)}));return o};const V=(e,t,o)=>{L(e,((e,n)=>{o=t(o,e,n)}));return o};const j=(e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){return T.some(s)}else if(o(s,n)){break}}return T.none()};const U=(e,t)=>j(e,t,C);const q=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return T.some(o)}}return T.none()};const W=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!i(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}D.apply(t,e[o])}return t};const $=(e,t)=>W(B(e,t));const G=(e,t)=>{for(let o=0,n=e.length;o<n;++o){const n=e[o];if(t(n,o)!==true){return false}}return true};const K=e=>{const t=O.call(e,0);t.reverse();return t};const X=(e,t)=>{const o={};for(let n=0,s=e.length;n<s;n++){const s=e[n];o[String(s)]=t(s,n)}return o};const Y=(e,t)=>{const o=O.call(e,0);o.sort(t);return o};const J=(e,t)=>t>=0&&t<e.length?T.some(e[t]):T.none();const Q=e=>J(e,0);const Z=e=>J(e,e.length-1);const ee=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return T.none()};const te=Object.keys;const oe=Object.hasOwnProperty;const ne=(e,t)=>{const o=te(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const se=(e,t)=>re(e,((e,o)=>({k:o,v:t(e,o)})));const re=(e,t)=>{const o={};ne(e,((e,n)=>{const s=t(e,n);o[s.k]=s.v}));return o};const ae=e=>(t,o)=>{e[o]=t};const ce=(e,t,o,n)=>{const s={};ne(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const ie=(e,t)=>{const o={};ce(e,t,ae(o),p);return o};const le=(e,t)=>{const o=[];ne(e,((e,n)=>{o.push(t(e,n))}));return o};const de=e=>le(e,v);const ue=(e,t)=>fe(e,t)?T.from(e[t]):T.none();const fe=(e,t)=>oe.call(e,t);const me=(e,t)=>fe(e,t)&&e[t]!==undefined&&e[t]!==null;const ge=e=>{for(const t in e){if(oe.call(e,t)){return false}}return true};typeof window!=="undefined"?window:Function("return this;")();const pe=8;const he=9;const ye=11;const be=1;const ve=3;const ke=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const we=e=>e.dom.nodeType;const _e=e=>t=>we(t)===e;const xe=e=>we(e)===pe||ke(e)==="#comment";const ze=_e(be);const Ce=_e(ve);const Se=_e(he);const Te=_e(ye);const Oe=e=>t=>ze(t)&&ke(t)===e;const Ee=(e,t,o)=>{if(a(o)||d(o)||g(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const De=(e,t,o)=>{Ee(e.dom,t,o)};const Ae=(e,t)=>{const o=e.dom;ne(t,((e,t)=>{Ee(o,t,e)}))};const Me=(e,t)=>{ne(t,((t,o)=>{t.fold((()=>{Be(e,o)}),(t=>{Ee(e.dom,o,t)}))}))};const Ne=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?undefined:o};const Re=(e,t)=>T.from(Ne(e,t));const Be=(e,t)=>{e.dom.removeAttribute(t)};const Le=e=>V(e.dom.attributes,((e,t)=>{e[t.name]=t.value;return e}),{});const He=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return Fe(n.childNodes[0])};const Ie=(e,t)=>{const o=t||document;const n=o.createElement(e);return Fe(n)};const Pe=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return Fe(n)};const Fe=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const Ve=(e,t,o)=>T.from(e.dom.elementFromPoint(t,o)).map(Fe);const je={fromHtml:He,fromTag:Ie,fromText:Pe,fromDom:Fe,fromPoint:Ve};const Ue=(e,t)=>{const o=e.dom;if(o.nodeType!==be){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};const qe=e=>e.nodeType!==be&&e.nodeType!==he&&e.nodeType!==ye||e.childElementCount===0;const We=(e,t)=>{const o=t===undefined?document:t.dom;return qe(o)?[]:B(o.querySelectorAll(e),je.fromDom)};const $e=(e,t)=>{const o=t===undefined?document:t.dom;return qe(o)?T.none():T.from(o.querySelector(e)).map(je.fromDom)};const Ge=(e,t)=>e.dom===t.dom;const Ke=(e,t)=>{const o=e.dom;const n=t.dom;return o===n?false:o.contains(n)};const Xe=Ue;const Ye=e=>je.fromDom(e.dom.ownerDocument);const Je=e=>Se(e)?e:Ye(e);const Qe=e=>je.fromDom(Je(e).dom.documentElement);const Ze=e=>je.fromDom(Je(e).dom.defaultView);const et=e=>T.from(e.dom.parentNode).map(je.fromDom);const tt=e=>T.from(e.dom.parentElement).map(je.fromDom);const ot=(e,t)=>{const o=m(t)?t:C;let n=e.dom;const s=[];while(n.parentNode!==null&&n.parentNode!==undefined){const e=n.parentNode;const t=je.fromDom(e);s.push(t);if(o(t)===true){break}else{n=e}}return s};const nt=e=>T.from(e.dom.previousSibling).map(je.fromDom);const st=e=>T.from(e.dom.nextSibling).map(je.fromDom);const rt=e=>B(e.dom.childNodes,je.fromDom);const at=(e,t)=>{const o=e.dom.childNodes;return T.from(o[t]).map(je.fromDom)};const ct=e=>at(e,0);const it=(e,t)=>{const o=et(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))};const lt=(e,t)=>{const o=st(e);o.fold((()=>{const o=et(e);o.each((e=>{ut(e,t)}))}),(e=>{it(e,t)}))};const dt=(e,t)=>{const o=ct(e);o.fold((()=>{ut(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))};const ut=(e,t)=>{e.dom.appendChild(t.dom)};const ft=(e,t,o)=>{at(e,o).fold((()=>{ut(e,t)}),(e=>{it(e,t)}))};const mt=(e,t)=>{it(e,t);ut(t,e)};const gt=(e,t)=>{L(t,((o,n)=>{const s=n===0?e:t[n-1];lt(s,o)}))};const pt=(e,t)=>{L(t,(t=>{ut(e,t)}))};const ht=e=>{e.dom.textContent="";L(rt(e),(e=>{yt(e)}))};const yt=e=>{const t=e.dom;if(t.parentNode!==null){t.parentNode.removeChild(t)}};const bt=e=>{const t=rt(e);if(t.length>0){gt(e,t)}yt(e)};const vt=(e,t)=>je.fromDom(e.dom.cloneNode(t));const kt=e=>vt(e,false);const wt=e=>vt(e,true);const _t=(e,t)=>{const o=je.fromTag(t);const n=Le(e);Ae(o,n);return o};const xt=(e,t)=>{const o=_t(e,t);const n=rt(wt(e));pt(o,n);return o};const zt=(e,t)=>{const o=_t(e,t);lt(e,o);const n=rt(e);pt(o,n);yt(e);return o};const Ct=["tfoot","thead","tbody","colgroup"];const St=e=>M(Ct,e);const Tt=(e,t)=>({rows:e,columns:t});const Ot=(e,t)=>({row:e,column:t});const Et=(e,t,o)=>({element:e,rowspan:t,colspan:o});const Dt=(e,t,o,n)=>({element:e,rowspan:t,colspan:o,isNew:n});const At=(e,t,o,n,s,r)=>({element:e,rowspan:t,colspan:o,row:n,column:s,isLocked:r});const Mt=(e,t,o)=>({element:e,cells:t,section:o});const Nt=(e,t,o,n)=>({element:e,cells:t,section:o,isNew:n});const Rt=(e,t,o)=>({element:e,isNew:t,isLocked:o});const Bt=(e,t,o,n)=>({element:e,cells:t,section:o,isNew:n});const Lt=(e,t,o,n)=>({startRow:e,startCol:t,finishRow:o,finishCol:n});const Ht=(e,t,o)=>({element:e,colspan:t,column:o});const It=(e,t)=>({element:e,columns:t});const Pt=e=>Te(e)&&f(e.dom.host);const Ft=m(Element.prototype.attachShadow)&&m(Node.prototype.getRootNode);const Vt=b(Ft);const jt=Ft?e=>je.fromDom(e.dom.getRootNode()):Je;const Ut=e=>{const t=jt(e);return Pt(t)?T.some(t):T.none()};const qt=e=>je.fromDom(e.dom.host);const Wt=e=>{if(Vt()&&f(e.target)){const t=je.fromDom(e.target);if(ze(t)&&$t(t)){if(e.composed&&e.composedPath){const t=e.composedPath();if(t){return Q(t)}}}}return T.from(e.target)};const $t=e=>f(e.dom.shadowRoot);const Gt=e=>{const t=Ce(e)?e.dom.parentNode:e.dom;if(t===undefined||t===null||t.ownerDocument===null){return false}const o=t.ownerDocument;return Ut(je.fromDom(t)).fold((()=>o.body.contains(t)),y(Gt,qt))};const Kt=()=>Xt(je.fromDom(document));const Xt=e=>{const t=e.dom.body;if(t===null||t===undefined){throw new Error("Body is not available yet")}return je.fromDom(t)};const Yt=(e,t,o)=>P(ot(e,o),t);const Jt=(e,t)=>P(rt(e),t);const Qt=(e,t)=>{let o=[];L(rt(e),(e=>{if(t(e)){o=o.concat([e])}o=o.concat(Qt(e,t))}));return o};const Zt=(e,t,o)=>Yt(e,(e=>Ue(e,t)),o);const eo=(e,t)=>Jt(e,(e=>Ue(e,t)));const to=(e,t)=>We(t,e);var oo=(e,t,o,n,s)=>{if(e(o,n)){return T.some(o)}else if(m(s)&&s(o)){return T.none()}else{return t(o,n,s)}};const no=(e,t,o)=>{let n=e.dom;const s=m(o)?o:C;while(n.parentNode){n=n.parentNode;const e=je.fromDom(n);if(t(e)){return T.some(e)}else if(s(e)){break}}return T.none()};const so=(e,t,o)=>{const n=(e,t)=>t(e);return oo(n,no,e,t,o)};const ro=(e,t)=>{const o=e=>t(je.fromDom(e));const n=U(e.dom.childNodes,o);return n.map(je.fromDom)};const ao=(e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const s=je.fromDom(e.childNodes[n]);if(t(s)){return T.some(s)}const r=o(e.childNodes[n]);if(r.isSome()){return r}}return T.none()};return o(e.dom)};const co=(e,t,o)=>no(e,(e=>Ue(e,t)),o);const io=(e,t)=>ro(e,(e=>Ue(e,t)));const lo=(e,t)=>$e(t,e);const uo=(e,t,o)=>{const n=(e,t)=>Ue(e,t);return oo(n,co,e,t,o)};const fo=(e,t,o=k)=>e.exists((e=>o(e,t)));const mo=e=>{const t=[];const o=e=>{t.push(e)};for(let t=0;t<e.length;t++){e[t].each(o)}return t};const go=(e,t)=>e!==undefined&&e!==null?t(e):T.none();const po=(e,t)=>e?T.some(t):T.none();const ho=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t;const yo=(e,t)=>e.indexOf(t)!==-1;const bo=(e,t)=>ho(e,t,0);const vo=(e,t)=>ho(e,t,e.length-t.length);const ko=e=>t=>t.replace(e,"");const wo=ko(/^\s+|\s+$/g);const _o=e=>e.length>0;const xo=e=>{const t=parseFloat(e);return isNaN(t)?T.none():T.some(t)};const zo=e=>e.style!==undefined&&m(e.style.getPropertyValue);const Co=(e,t,o)=>{if(!a(o)){console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e);throw new Error("CSS value must be a string: "+o)}if(zo(e)){e.style.setProperty(t,o)}};const So=(e,t)=>{if(zo(e)){e.style.removeProperty(t)}};const To=(e,t,o)=>{const n=e.dom;Co(n,t,o)};const Oo=(e,t)=>{const o=e.dom;ne(t,((e,t)=>{Co(o,t,e)}))};const Eo=(e,t)=>{const o=e.dom;const n=window.getComputedStyle(o);const s=n.getPropertyValue(t);return s===""&&!Gt(e)?Do(o,t):s};const Do=(e,t)=>zo(e)?e.style.getPropertyValue(t):"";const Ao=(e,t)=>{const o=e.dom;const n=Do(o,t);return T.from(n).filter((e=>e.length>0))};const Mo=(e,t)=>{const o=e.dom;So(o,t);if(fo(Re(e,"style").map(wo),"")){Be(e,"style")}};const No=(e,t)=>{const o=e.dom;const n=t.dom;if(zo(o)&&zo(n)){n.style.cssText=o.style.cssText}};const Ro=(e,t,o=0)=>Re(e,t).map((e=>parseInt(e,10))).getOr(o);const Bo=(e,t)=>Ro(e,t,1);const Lo=e=>{if(Oe("col")(e)){return Ro(e,"span",1)>1}else{return Bo(e,"colspan")>1}};const Ho=e=>Bo(e,"rowspan")>1;const Io=(e,t)=>parseInt(Eo(e,t),10);const Po=b(10);const Fo=b(10);const Vo=(e,t)=>jo(e,t,S);const jo=(e,t,o)=>$(rt(e),(e=>{if(Ue(e,t)){return o(e)?[e]:[]}else{return jo(e,t,o)}}));const Uo=(e,t,o=C)=>{if(o(t)){return T.none()}if(M(e,ke(t))){return T.some(t)}const n=e=>Ue(e,"table")||o(e);return co(t,e.join(","),n)};const qo=(e,t)=>Uo(["td","th"],e,t);const Wo=e=>Vo(e,"th,td");const $o=e=>{if(Ue(e,"colgroup")){return eo(e,"col")}else{return $(Xo(e),(e=>eo(e,"col")))}};const Go=(e,t)=>uo(e,"table",t);const Ko=e=>Vo(e,"tr");const Xo=e=>Go(e).fold(b([]),(e=>eo(e,"colgroup")));const Yo=(e,t)=>B(e,(e=>{if(ke(e)==="colgroup"){const t=B($o(e),(e=>{const t=Ro(e,"span",1);return Et(e,1,t)}));return Mt(e,t,"colgroup")}else{const o=B(Wo(e),(e=>{const t=Ro(e,"rowspan",1);const o=Ro(e,"colspan",1);return Et(e,t,o)}));return Mt(e,o,t(e))}}));const Jo=e=>et(e).map((e=>{const t=ke(e);return St(t)?t:"tbody"})).getOr("tbody");const Qo=e=>{const t=Ko(e);const o=Xo(e);const n=[...o,...t];return Yo(n,Jo)};const Zo=(e,t)=>Yo(e,(()=>t));const en=e=>{let t=false;let o;return(...n)=>{if(!t){t=true;o=e.apply(null,n)}return o}};const tn=(e,t,o,n)=>{const s=e.isiOS()&&/ipad/i.test(o)===true;const r=e.isiOS()&&!s;const a=e.isiOS()||e.isAndroid();const c=a||n("(pointer:coarse)");const i=s||!r&&a&&n("(min-device-width:768px)");const l=r||a&&!i;const d=t.isSafari()&&e.isiOS()&&/safari/i.test(o)===false;const u=!l&&!i&&!d;return{isiPad:b(s),isiPhone:b(r),isTablet:b(i),isPhone:b(l),isTouch:b(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:b(d),isDesktop:b(u)}};const on=(e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t)){return n}}return undefined};const nn=(e,t)=>{const o=on(e,t);if(!o){return{major:0,minor:0}}const n=e=>Number(t.replace(o,"$"+e));return an(n(1),n(2))};const sn=(e,t)=>{const o=String(t).toLowerCase();if(e.length===0){return rn()}return nn(e,o)};const rn=()=>an(0,0);const an=(e,t)=>({major:e,minor:t});const cn={nu:an,detect:sn,unknown:rn};const ln=(e,t)=>ee(t.brands,(t=>{const o=t.brand.toLowerCase();return U(e,(e=>{var t;return o===((t=e.brand)===null||t===void 0?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:cn.nu(parseInt(t.version,10),0)})))}));const dn=(e,t)=>{const o=String(t).toLowerCase();return U(e,(e=>e.search(o)))};const un=(e,t)=>dn(e,t).map((e=>{const o=cn.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const fn=(e,t)=>dn(e,t).map((e=>{const o=cn.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const mn=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/;const gn=e=>t=>yo(t,e);const pn=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>yo(e,"edge/")&&yo(e,"chrome")&&yo(e,"safari")&&yo(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,mn],search:e=>yo(e,"chrome")&&!yo(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>yo(e,"msie")||yo(e,"trident")},{name:"Opera",versionRegexes:[mn,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:gn("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:gn("firefox")},{name:"Safari",versionRegexes:[mn,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(yo(e,"safari")||yo(e,"mobile/"))&&yo(e,"applewebkit")}];const hn=[{name:"Windows",search:gn("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>yo(e,"iphone")||yo(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:gn("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:gn("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:gn("linux"),versionRegexes:[]},{name:"Solaris",search:gn("sunos"),versionRegexes:[]},{name:"FreeBSD",search:gn("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:gn("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}];const yn={browsers:b(pn),oses:b(hn)};const bn="Edge";const vn="Chromium";const kn="IE";const wn="Opera";const _n="Firefox";const xn="Safari";const zn=()=>Cn({current:undefined,version:cn.unknown()});const Cn=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isEdge:n(bn),isChromium:n(vn),isIE:n(kn),isOpera:n(wn),isFirefox:n(_n),isSafari:n(xn)}};const Sn={unknown:zn,nu:Cn,edge:b(bn),chromium:b(vn),ie:b(kn),opera:b(wn),firefox:b(_n),safari:b(xn)};const Tn="Windows";const On="iOS";const En="Android";const Dn="Linux";const An="macOS";const Mn="Solaris";const Nn="FreeBSD";const Rn="ChromeOS";const Bn=()=>Ln({current:undefined,version:cn.unknown()});const Ln=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isWindows:n(Tn),isiOS:n(On),isAndroid:n(En),isMacOS:n(An),isLinux:n(Dn),isSolaris:n(Mn),isFreeBSD:n(Nn),isChromeOS:n(Rn)}};const Hn={unknown:Bn,nu:Ln,windows:b(Tn),ios:b(On),android:b(En),linux:b(Dn),macos:b(An),solaris:b(Mn),freebsd:b(Nn),chromeos:b(Rn)};const In=(e,t,o)=>{const n=yn.browsers();const s=yn.oses();const r=t.bind((e=>ln(n,e))).orThunk((()=>un(n,e))).fold(Sn.unknown,Sn.nu);const a=fn(s,e).fold(Hn.unknown,Hn.nu);const c=tn(a,r,e,o);return{browser:r,os:a,deviceType:c}};const Pn={detect:In};const Fn=e=>window.matchMedia(e).matches;let Vn=en((()=>Pn.detect(navigator.userAgent,T.from(navigator.userAgentData),Fn)));const jn=()=>Vn();const Un=(e,t)=>{const o=(t,o)=>{if(!g(o)&&!o.match(/^[0-9]+$/)){throw new Error(e+".set accepts only positive integer values. Value was "+o)}const n=t.dom;if(zo(n)){n.style[e]=o+"px"}};const n=o=>{const n=t(o);if(n<=0||n===null){const t=Eo(o,e);return parseFloat(t)||0}return n};const s=n;const r=(e,t)=>V(t,((t,o)=>{const n=Eo(e,o);const s=n===undefined?0:parseInt(n,10);return isNaN(s)?t:t+s}),0);const a=(e,t,o)=>{const n=r(e,o);const s=t>n?t-n:0;return s};return{set:o,get:n,getOuter:s,aggregate:r,max:a}};const qn=(e,t)=>xo(e).getOr(t);const Wn=(e,t,o)=>qn(Eo(e,t),o);const $n=(e,t,o,n)=>{const s=Wn(e,`padding-${o}`,0);const r=Wn(e,`padding-${n}`,0);const a=Wn(e,`border-${o}-width`,0);const c=Wn(e,`border-${n}-width`,0);return t-s-r-a-c};const Gn=(e,t)=>{const o=e.dom;const n=o.getBoundingClientRect().width||o.offsetWidth;return t==="border-box"?n:$n(e,n,"left","right")};const Kn=e=>Wn(e,"height",e.dom.offsetHeight);const Xn=e=>Wn(e,"width",e.dom.offsetWidth);const Yn=e=>Gn(e,"content-box");const Jn=Un("width",(e=>e.dom.offsetWidth));const Qn=e=>Jn.get(e);const Zn=e=>Jn.getOuter(e);const es=Yn;const ts=Xn;const os=(e,t,o)=>{const n=e.cells;const s=n.slice(0,t);const r=n.slice(t);const a=s.concat(o).concat(r);return rs(e,a)};const ns=(e,t,o)=>os(e,t,[o]);const ss=(e,t,o)=>{const n=e.cells;n[t]=o};const rs=(e,t)=>Bt(e.element,t,e.section,e.isNew);const as=(e,t)=>{const o=e.cells;const n=B(o,t);return Bt(e.element,n,e.section,e.isNew)};const cs=(e,t)=>e.cells[t];const is=(e,t)=>cs(e,t).element;const ls=e=>e.cells.length;const ds=e=>{const t=I(e,(e=>e.section==="colgroup"));return{rows:t.fail,cols:t.pass}};const us=(e,t,o)=>{const n=B(e.cells,o);return Bt(t(e.element),n,e.section,true)};const fs="data-snooker-locked-cols";const ms=e=>Re(e,fs).bind((e=>T.from(e.match(/\d+/g)))).map((e=>X(e,S)));const gs=e=>{const t=V(ds(e).rows,((e,t)=>{L(t.cells,((t,o)=>{if(t.isLocked){e[o]=true}}));return e}),{});const o=le(t,((e,t)=>parseInt(t,10)));return Y(o)};const ps=(e,t)=>e+","+t;const hs=(e,t,o)=>T.from(e.access[ps(t,o)]);const ys=(e,t,o)=>{const n=bs(e,(e=>o(t,e.element)));return n.length>0?T.some(n[0]):T.none()};const bs=(e,t)=>{const o=$(e.all,(e=>e.cells));return P(o,t)};const vs=e=>{const t={};let o=0;L(e.cells,(e=>{const n=e.colspan;R(n,(s=>{const r=o+s;t[r]=Ht(e.element,n,r)}));o+=n}));return t};const ks=e=>{const t={};const o=[];const n=Q(e).map((e=>e.element)).bind(Go);const s=n.bind(ms).getOr({});let r=0;let a=0;let c=0;const{pass:i,fail:l}=I(e,(e=>e.section==="colgroup"));L(l,(e=>{const n=[];L(e.cells,(e=>{let o=0;while(t[ps(c,o)]!==undefined){o++}const r=me(s,o.toString());const i=At(e.element,e.rowspan,e.colspan,c,o,r);for(let n=0;n<e.colspan;n++){for(let s=0;s<e.rowspan;s++){const e=c+s;const r=o+n;const l=ps(e,r);t[l]=i;a=Math.max(a,r+1)}}n.push(i)}));r++;o.push(Mt(e.element,n,e.section));c++}));const{columns:d,colgroups:u}=Z(i).map((e=>{const t=vs(e);const o=It(e.element,de(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}})));const f=Tt(r,a);return{grid:f,access:t,all:o,columns:d,colgroups:u}};const ws=e=>{const t=Qo(e);return ks(t)};const _s=e=>$(e.all,(e=>e.cells));const xs=e=>de(e.columns);const zs=e=>te(e.columns).length>0;const Cs=(e,t)=>T.from(e.columns[t]);const Ss={fromTable:ws,generate:ks,getAt:hs,findItem:ys,filterItems:bs,justCells:_s,justColumns:xs,hasColumns:zs,getColumnAt:Cs};const Ts=(e,t=S)=>{const o=e.grid;const n=R(o.columns,v);const s=R(o.rows,v);return B(n,(o=>{const n=()=>$(s,(t=>Ss.getAt(e,t,o).filter((e=>e.column===o)).toArray()));const r=e=>e.colspan===1&&t(e.element);const a=()=>Ss.getAt(e,0,o);return Os(n,r,a)}))};const Os=(e,t,o)=>{const n=e();const s=U(n,t);const r=s.orThunk((()=>T.from(n[0]).orThunk(o)));return r.map((e=>e.element))};const Es=e=>{const t=e.grid;const o=R(t.rows,v);const n=R(t.columns,v);return B(o,(t=>{const o=()=>$(n,(o=>Ss.getAt(e,t,o).filter((e=>e.row===t)).fold(b([]),(e=>[e]))));const s=e=>e.rowspan===1;const r=()=>Ss.getAt(e,t,0);return Os(o,s,r)}))};const Ds=(e,t)=>{if(t<0||t>=e.length-1){return T.none()}const o=e[t].fold((()=>{const o=K(e.slice(0,t));return ee(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>T.some({value:e,delta:0})));const n=e[t+1].fold((()=>{const o=e.slice(t+1);return ee(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>T.some({value:e,delta:1})));return o.bind((e=>n.map((t=>{const o=t.delta+e.delta;return Math.abs(t.value-e.value)/o}))))};const As=(e,t)=>o=>Ms(o)==="rtl"?t:e;const Ms=e=>Eo(e,"direction")==="rtl"?"rtl":"ltr";const Ns=Un("height",(e=>{const t=e.dom;return Gt(e)?t.getBoundingClientRect().height:t.offsetHeight}));const Rs=e=>Ns.get(e);const Bs=e=>Ns.getOuter(e);const Ls=Kn;const Hs=(e,t)=>{const o=(o,n)=>Hs(e+o,t+n);return{left:e,top:t,translate:o}};const Is=Hs;const Ps=e=>{const t=e.getBoundingClientRect();return Is(t.left,t.top)};const Fs=(e,t)=>{if(e!==undefined){return e}else{return t!==undefined?t:0}};const Vs=e=>{const t=e.dom.ownerDocument;const o=t.body;const n=t.defaultView;const s=t.documentElement;if(o===e.dom){return Is(o.offsetLeft,o.offsetTop)}const r=Fs(n===null||n===void 0?void 0:n.pageYOffset,s.scrollTop);const a=Fs(n===null||n===void 0?void 0:n.pageXOffset,s.scrollLeft);const c=Fs(s.clientTop,o.clientTop);const i=Fs(s.clientLeft,o.clientLeft);return js(e).translate(a-i,r-c)};const js=e=>{const t=e.dom;const o=t.ownerDocument;const n=o.body;if(n===t){return Is(n.offsetLeft,n.offsetTop)}if(!Gt(e)){return Is(0,0)}return Ps(t)};const Us=(e,t)=>({row:e,y:t});const qs=(e,t)=>({col:e,x:t});const Ws=e=>{const t=Vs(e);return t.left+Zn(e)};const $s=e=>Vs(e).left;const Gs=(e,t)=>qs(e,$s(t));const Ks=(e,t)=>qs(e,Ws(t));const Xs=e=>Vs(e).top;const Ys=(e,t)=>Us(e,Xs(t));const Js=(e,t)=>Us(e,Xs(t)+Bs(t));const Qs=(e,t,o)=>{if(o.length===0){return[]}const n=B(o.slice(1),((t,o)=>t.map((t=>e(o,t)))));const s=o[o.length-1].map((e=>t(o.length-1,e)));return n.concat([s])};const Zs=e=>-e;const er={delta:v,positions:e=>Qs(Ys,Js,e),edge:Xs};const tr={delta:v,edge:$s,positions:e=>Qs(Gs,Ks,e)};const or={delta:Zs,edge:Ws,positions:e=>Qs(Ks,Gs,e)};const nr=As(tr,or);const sr={delta:(e,t)=>nr(t).delta(e,t),positions:(e,t)=>nr(t).positions(e,t),edge:e=>nr(e).edge(e)};const rr={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]};const ar=(()=>{const e="[0-9]+";const t="[+-]?"+e;const o="[eE]"+t;const n="\\.";const s=e=>`(?:${e})?`;const r=["Infinity",e+n+s(e)+s(o),n+e+s(o),e+s(o)].join("|");const a=`[+-]?(?:${r})`;return new RegExp(`^(${a})(.*)$`)})();const cr=(e,t)=>N(t,(t=>N(rr[t],(t=>e===t))));const ir=(e,t)=>{const o=T.from(ar.exec(e));return o.bind((e=>{const o=Number(e[1]);const n=e[2];if(cr(n,t)){return T.some({value:o,unit:n})}else{return T.none()}}))};const lr=/(\d+(\.\d+)?)%/;const dr=/(\d+(\.\d+)?)px|em/;const ur=Oe("col");const fr=(e,t,o)=>{const n=tt(e).getOrThunk((()=>Xt(Ye(e))));return t(e)/o(n)*100};const mr=(e,t)=>{To(e,"width",t+"px")};const gr=(e,t)=>{To(e,"width",t+"%")};const pr=(e,t)=>{To(e,"height",t+"px")};const hr=e=>Ls(e)+"px";const yr=(e,t,o,n)=>{const s=Go(e).map((e=>{const n=o(e);return Math.floor(t/100*n)})).getOr(t);n(e,s);return s};const br=(e,t,o,n)=>{const s=parseFloat(e);return vo(e,"%")&&ke(t)!=="table"?yr(t,s,o,n):s};const vr=e=>{const t=hr(e);if(!t){return Rs(e)}return br(t,e,Rs,pr)};const kr=(e,t,o)=>{const n=o(e);const s=Bo(e,t);return n/s};const wr=(e,t)=>Ao(e,t).orThunk((()=>Re(e,t).map((e=>e+"px"))));const _r=e=>wr(e,"width");const xr=e=>wr(e,"height");const zr=e=>fr(e,Qn,es);const Cr=e=>ur(e)?Qn(e):ts(e);const Sr=e=>kr(e,"rowspan",vr);const Tr=e=>{const t=_r(e);return t.bind((e=>ir(e,["fixed","relative","empty"])))};const Or=(e,t,o)=>{To(e,"width",t+o)};const Er=e=>Qn(e)+"px";const Dr=e=>fr(e,Qn,es)+"%";const Ar=e=>_r(e).exists((e=>lr.test(e)));const Mr=e=>_r(e).exists((e=>dr.test(e)));const Nr=e=>_r(e).isNone();const Rr=b(lr);const Br=Oe("col");const Lr=e=>_r(e).getOrThunk((()=>Cr(e)+"px"));const Hr=e=>xr(e).getOrThunk((()=>Sr(e)+"px"));const Ir=e=>B(Ss.justColumns(e),(e=>T.from(e.element)));const Pr=e=>{const t=jn().browser;const o=t.isChromium()||t.isFirefox();return Br(e)?o:true};const Fr=(e,t,o,n,s,r)=>e.filter(n).fold((()=>r(Ds(o,t))),(e=>s(e)));const Vr=(e,t,o,n)=>{const s=Ts(e);const r=Ss.hasColumns(e)?Ir(e):s;const a=[T.some(sr.edge(t))].concat(B(sr.positions(s,t),(e=>e.map((e=>e.x)))));const c=_(Lo);return B(r,((e,t)=>Fr(e,t,a,c,(e=>{if(Pr(e)){return o(e)}else{const e=go(s[t],v);return Fr(e,t,a,c,(e=>n(T.some(Qn(e)))),n)}}),n)))};const jr=e=>e.map((e=>e+"px")).getOr("");const Ur=(e,t)=>Vr(e,t,Lr,jr);const qr=(e,t,o)=>Vr(e,t,zr,(e=>e.fold((()=>o.minCellWidth()),(e=>e/o.pixelWidth()*100))));const Wr=(e,t,o)=>Vr(e,t,Cr,(e=>e.getOrThunk(o.minCellWidth)));const $r=(e,t,o,n,s)=>{const r=Es(e);const a=[T.some(o.edge(t))].concat(B(o.positions(r,t),(e=>e.map((e=>e.y)))));return B(r,((e,t)=>Fr(e,t,a,_(Ho),n,s)))};const Gr=(e,t,o)=>$r(e,t,o,Sr,(e=>e.getOrThunk(Fo)));const Kr=(e,t,o)=>$r(e,t,o,Hr,jr);const Xr=(e,t)=>()=>{if(Gt(e)){return t(e)}else{return parseFloat(Ao(e,"width").getOr("0"))}};const Yr=e=>{const t=Xr(e,Qn);const o=b(0);const n=(t,o)=>Wr(t,e,o);return{width:t,pixelWidth:t,getWidths:n,getCellDelta:o,singleColumnWidth:b([0]),minCellWidth:o,setElementWidth:p,adjustTableWidth:p,isRelative:true,label:"none"}};const Jr=e=>{const t=Xr(e,(e=>parseFloat(Dr(e))));const o=Xr(e,Qn);const n=e=>e/o()*100;const s=(e,t)=>[100-e];const r=()=>Po()/o()*100;const a=o=>{const n=t();const s=o/100*n;const r=n+s;gr(e,r)};const c=(t,o)=>qr(t,e,o);return{width:t,pixelWidth:o,getWidths:c,getCellDelta:n,singleColumnWidth:s,minCellWidth:r,setElementWidth:gr,adjustTableWidth:a,isRelative:true,label:"percent"}};const Qr=e=>{const t=Xr(e,Qn);const o=v;const n=(e,t)=>{const o=Math.max(Po(),e+t);return[o-e]};const s=o=>{const n=t()+o;mr(e,n)};const r=(t,o)=>Wr(t,e,o);return{width:t,pixelWidth:t,getWidths:r,getCellDelta:o,singleColumnWidth:n,minCellWidth:Po,setElementWidth:mr,adjustTableWidth:s,isRelative:false,label:"pixel"}};const Zr=(e,t)=>{const o=Rr().exec(t);if(o!==null){return Jr(e)}else{return Qr(e)}};const ea=e=>{const t=_r(e);return t.fold((()=>Yr(e)),(t=>Zr(e,t)))};const ta={getTableSize:ea,pixelSize:Qr,percentageSize:Jr,noneSize:Yr};const oa=(e,t,o,n,s,r)=>({minRow:e,minCol:t,maxRow:o,maxCol:n,allCells:s,selectedCells:r});const na=(e,t)=>{const o=e.grid.columns;const n=e.grid.rows;let s=n;let r=o;let a=0;let c=0;const i=[];const l=[];ne(e.access,(e=>{i.push(e);if(t(e)){l.push(e);const t=e.row;const o=t+e.rowspan-1;const n=e.column;const i=n+e.colspan-1;if(t<s){s=t}else if(o>a){a=o}if(n<r){r=n}else if(i>c){c=i}}}));return oa(s,r,a,c,i,l)};const sa=(e,t,o)=>{const n=e[o].element;const s=je.fromTag("td");ut(s,je.fromTag("br"));const r=t?ut:dt;r(n,s)};const ra=(e,t,o,n)=>{const s=P(e,(e=>e.section!=="colgroup"));const r=t.grid.columns;const a=t.grid.rows;for(let e=0;e<a;e++){let a=false;for(let c=0;c<r;c++){if(!(e<o.minRow||e>o.maxRow||c<o.minCol||c>o.maxCol)){const o=Ss.getAt(t,e,c).filter(n).isNone();if(o){sa(s,a,e)}else{a=true}}}}};const aa=(e,t,o,n)=>{ne(o.columns,(e=>{if(e.column<t.minCol||e.column>t.maxCol){yt(e.element)}}));const s=P(Vo(e,"tr"),(e=>e.dom.childElementCount===0));L(s,yt);if(t.minCol===t.maxCol||t.minRow===t.maxRow){L(Vo(e,"th,td"),(e=>{Be(e,"rowspan");Be(e,"colspan")}))}Be(e,fs);Be(e,"data-snooker-col-series");const r=ta.getTableSize(e);r.adjustTableWidth(n)};const ca=(e,t,o,n)=>{if(n.minCol===0&&t.grid.columns===n.maxCol+1){return 0}const s=Wr(t,e,o);const r=V(s,((e,t)=>e+t),0);const a=V(s.slice(n.minCol,n.maxCol+1),((e,t)=>e+t),0);const c=a/r*o.pixelWidth();const i=c-o.pixelWidth();return o.getCellDelta(i)};const ia=(e,t)=>{const o=e=>Ue(e.element,t);const n=wt(e);const s=Qo(n);const r=ta.getTableSize(e);const a=Ss.generate(s);const c=na(a,o);const i="th:not("+t+")"+",td:not("+t+")";const l=jo(n,"th,td",(e=>Ue(e,i)));L(l,yt);ra(s,a,c,o);const d=Ss.fromTable(e);const u=ca(e,d,r,c);aa(n,c,a,u);return n};const la=" ";const da=(e,t)=>{const o=o=>{if(!e(o)){throw new Error("Can only get "+t+" value of a "+t+" node")}return n(o).getOr("")};const n=t=>e(t)?T.from(t.dom.nodeValue):T.none();const s=(o,n)=>{if(!e(o)){throw new Error("Can only set raw "+t+" value of a "+t+" node")}o.dom.nodeValue=n};return{get:o,getOption:n,set:s}};const ua=da(Ce,"text");const fa=e=>ua.get(e);const ma=e=>ua.getOption(e);const ga=(e,t)=>ua.set(e,t);const pa=e=>ke(e)==="img"?1:ma(e).fold((()=>rt(e).length),(e=>e.length));const ha=e=>ma(e).filter((e=>e.trim().length!==0||e.indexOf(la)>-1)).isSome();const ya=["img","br"];const ba=e=>{const t=ha(e);return t||M(ya,ke(e))};const va=e=>ao(e,ba);const ka=e=>wa(e,ba);const wa=(e,t)=>{const o=e=>{const n=rt(e);for(let e=n.length-1;e>=0;e--){const s=n[e];if(t(s)){return T.some(s)}const r=o(s);if(r.isSome()){return r}}return T.none()};return o(e)};const _a={scope:["row","col"]};const xa=e=>()=>{const t=je.fromTag("td",e.dom);ut(t,je.fromTag("br",e.dom));return t};const za=e=>()=>je.fromTag("col",e.dom);const Ca=e=>()=>je.fromTag("colgroup",e.dom);const Sa=e=>()=>je.fromTag("tr",e.dom);const Ta=(e,t,o)=>{const n=xt(e,t);ne(o,((e,t)=>{if(e===null){Be(n,t)}else{De(n,t,e)}}));return n};const Oa=e=>e;const Ea=(e,t,o)=>{const n=va(e);return n.map((n=>{const s=o.join(",");const r=Zt(n,s,(t=>Ge(t,e)));return F(r,((e,t)=>{const o=kt(t);Be(o,"contenteditable");ut(e,o);return o}),t)})).getOr(t)};const Da=(e,t)=>{ne(_a,((o,n)=>Re(e,n).filter((e=>M(o,e))).each((e=>De(t,n,e)))))};const Aa=(e,t,o)=>{const n=(e,t)=>{No(e.element,t);Mo(t,"height");if(e.colspan!==1){Mo(t,"width")}};const s=s=>{const r=je.fromTag(ke(s.element),t.dom);const a=o.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]);const c=a.length>0?Ea(s.element,r,a):r;ut(c,je.fromTag("br"));n(s,r);Da(s.element,r);e(s.element,r);return r};const r=o=>{const s=je.fromTag(ke(o.element),t.dom);n(o,s);e(o.element,s);return s};return{col:r,colgroup:Ca(t),row:Sa(t),cell:s,replace:Ta,colGap:za(t),gap:xa(t)}};const Ma=e=>({col:za(e),colgroup:Ca(e),row:Sa(e),cell:xa(e),replace:Oa,colGap:za(e),gap:xa(e)});const Na=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;return rt(je.fromDom(n))};const Ra=e=>B(e,je.fromDom);const Ba=e=>je.fromDom(e.getBody());const La=e=>t=>Ge(t,Ba(e));const Ha=e=>{Be(e,"data-mce-style");const t=e=>Be(e,"data-mce-style");L(Wo(e),t);L($o(e),t);L(Ko(e),t)};const Ia=e=>je.fromDom(e.selection.getStart());const Pa=e=>e.getBoundingClientRect().width;const Fa=e=>e.getBoundingClientRect().height;const Va=(e,t)=>{const o=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width");return T.from(o).filter(_o)};const ja=e=>/^(\d+(\.\d+)?)%$/.test(e);const Ua=e=>/^(\d+(\.\d+)?)px$/.test(e);const qa=(e,t)=>{const o=t.column;const n=t.column+t.colspan-1;const s=t.row;const r=t.row+t.rowspan-1;return o<=e.finishCol&&n>=e.startCol&&(s<=e.finishRow&&r>=e.startRow)};const Wa=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow;const $a=(e,t)=>{let o=true;const n=w(Wa,t);for(let s=t.startRow;s<=t.finishRow;s++){for(let r=t.startCol;r<=t.finishCol;r++){o=o&&Ss.getAt(e,s,r).exists(n)}}return o?T.some(t):T.none()};const Ga=(e,t)=>Lt(Math.min(e.row,t.row),Math.min(e.column,t.column),Math.max(e.row+e.rowspan-1,t.row+t.rowspan-1),Math.max(e.column+e.colspan-1,t.column+t.colspan-1));const Ka=(e,t,o)=>{const n=Ss.findItem(e,t,Ge);const s=Ss.findItem(e,o,Ge);return n.bind((e=>s.map((t=>Ga(e,t)))))};const Xa=(e,t,o)=>Ka(e,t,o).bind((t=>$a(e,t)));const Ya=(e,t,o,n)=>Ss.findItem(e,t,Ge).bind((t=>{const s=o>0?t.row+t.rowspan-1:t.row;const r=n>0?t.column+t.colspan-1:t.column;const a=Ss.getAt(e,s+o,r+n);return a.map((e=>e.element))}));const Ja=(e,t,o)=>Ka(e,t,o).map((t=>{const o=Ss.filterItems(e,w(qa,t));return B(o,(e=>e.element))}));const Qa=(e,t)=>{const o=(e,t)=>Ke(t,e);return Ss.findItem(e,t,o).map((e=>e.element))};const Za=(e,t,o)=>Go(e).bind((n=>{const s=nc(n);return Ya(s,e,t,o)}));const ec=(e,t,o)=>{const n=nc(e);return Ja(n,t,o)};const tc=(e,t,o,n,s)=>{const r=nc(e);const a=Ge(e,o)?T.some(t):Qa(r,t);const c=Ge(e,s)?T.some(n):Qa(r,n);return a.bind((e=>c.bind((t=>Ja(r,e,t)))))};const oc=(e,t,o)=>{const n=nc(e);return Xa(n,t,o)};const nc=Ss.fromTable;var sc=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];var rc=()=>{const e=e=>je.fromDom(e.dom.cloneNode(false));const t=e=>Je(e).dom;const o=e=>{if(!ze(e)){return false}if(ke(e)==="body"){return true}return M(sc,ke(e))};const n=e=>{if(!ze(e)){return false}return M(["br","img","hr","input"],ke(e))};const s=e=>ze(e)&&Ne(e,"contenteditable")==="false";const r=(e,t)=>e.dom.compareDocumentPosition(t.dom);const a=(e,t)=>{const o=Le(e);Ae(t,o)};const c=e=>{const t=ke(e);return M(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)};const i=e=>ze(e)?Re(e,"lang"):T.none();return{up:b({selector:co,closest:uo,predicate:no,all:ot}),down:b({selector:to,predicate:Qt}),styles:b({get:Eo,getRaw:Ao,set:To,remove:Mo}),attrs:b({get:Ne,set:De,remove:Be,copyTo:a}),insert:b({before:it,after:lt,afterAll:gt,append:ut,appendAll:pt,prepend:dt,wrap:mt}),remove:b({unwrap:bt,remove:yt}),create:b({nu:je.fromTag,clone:e,text:je.fromText}),query:b({comparePosition:r,prevSibling:nt,nextSibling:st}),property:b({children:rt,name:ke,parent:et,document:t,isText:Ce,isComment:xe,isElement:ze,isSpecial:c,getLanguage:i,getText:fa,setText:ga,isBoundary:o,isEmptyTag:n,isNonEditable:s}),eq:Ge,is:Xe}};const ac=(e,t,o,n)=>{const s=o[0];const r=o.slice(1);return n(e,t,s,r)};const cc=(e,t,o)=>o.length>0?ac(e,t,o,ic):T.none();const ic=(e,t,o,n)=>{const s=t(e,o);return F(n,((o,n)=>{const s=t(e,n);return lc(e,o,s)}),s)};const lc=(e,t,o)=>t.bind((t=>o.filter(w(e.eq,t))));const dc=(e,t)=>w(e.eq,t);const uc=(e,t,o,n=C)=>{const s=[t].concat(e.up().all(t));const r=[o].concat(e.up().all(o));const a=e=>{const t=q(e,n);return t.fold((()=>e),(t=>e.slice(0,t+1)))};const c=a(s);const i=a(r);const l=U(c,(t=>N(i,dc(e,t))));return{firstpath:c,secondpath:i,shared:l}};const fc=cc;const mc=uc;const gc=rc();const pc=(e,t)=>fc(gc,((t,o)=>e(o)),t);const hc=(e,t,o)=>mc(gc,e,t,o);const yc=e=>co(e,"table");const bc=(e,t,o)=>{const n=e=>t=>o!==undefined&&o(t)||Ge(t,e);if(Ge(e,t)){return T.some({boxes:T.some([e]),start:e,finish:t})}else{return yc(e).bind((s=>yc(t).bind((r=>{if(Ge(s,r)){return T.some({boxes:ec(s,e,t),start:e,finish:t})}else if(Ke(s,r)){const o=Zt(t,"td,th",n(s));const a=o.length>0?o[o.length-1]:t;return T.some({boxes:tc(s,e,s,t,r),start:e,finish:a})}else if(Ke(r,s)){const o=Zt(e,"td,th",n(r));const a=o.length>0?o[o.length-1]:e;return T.some({boxes:tc(r,e,s,t,r),start:e,finish:a})}else{return hc(e,t).shared.bind((a=>uo(a,"table",o).bind((o=>{const a=Zt(t,"td,th",n(o));const c=a.length>0?a[a.length-1]:t;const i=Zt(e,"td,th",n(o));const l=i.length>0?i[i.length-1]:e;return T.some({boxes:tc(o,e,s,t,r),start:l,finish:c})}))))}}))))}};const vc=(e,t)=>{const o=to(e,t);return o.length>0?T.some(o):T.none()};const kc=(e,t)=>U(e,(e=>Ue(e,t)));const wc=(e,t,o)=>lo(e,t).bind((t=>lo(e,o).bind((e=>pc(yc,[t,e]).map((o=>({first:t,last:e,table:o})))))));const _c=(e,t)=>co(e,"table").bind((o=>lo(o,t).bind((t=>bc(t,e).bind((e=>e.boxes.map((t=>({boxes:t,start:e.start,finish:e.finish})))))))));const xc=(e,t,o,n,s)=>kc(e,s).bind((e=>Za(e,t,o).bind((e=>_c(e,n)))));const zc=(e,t)=>vc(e,t);const Cc=(e,t,o)=>wc(e,t,o).bind((t=>{const o=t=>Ge(e,t);const n="thead,tfoot,tbody,table";const s=co(t.first,n,o);const r=co(t.last,n,o);return s.bind((e=>r.bind((o=>Ge(e,o)?oc(t.table,t.first,t.last):T.none()))))}));const Sc=v;const Tc=e=>{const t=(e,t)=>Re(e,t).exists((e=>parseInt(e,10)>1));const o=e=>t(e,"rowspan")||t(e,"colspan");return e.length>0&&G(e,o)?T.some(e):T.none()};const Oc=(e,t,o)=>{if(t.length<=1){return T.none()}else{return Cc(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t})))}};const Ec="data-mce-selected";const Dc="td["+Ec+"],th["+Ec+"]";const Ac="["+Ec+"]";const Mc="data-mce-first-selected";const Nc="td["+Mc+"],th["+Mc+"]";const Rc="data-mce-last-selected";const Bc="td["+Rc+"],th["+Rc+"]";const Lc=Ac;const Hc={selected:Ec,selectedSelector:Dc,firstSelected:Mc,firstSelectedSelector:Nc,lastSelected:Rc,lastSelectedSelector:Bc};const Ic=(e,t,o)=>({element:o,mergable:Oc(t,e,Hc),unmergable:Tc(e),selection:Sc(e)});const Pc=(e,t,o)=>({element:e,clipboard:t,generators:o});const Fc=(e,t,o,n)=>({selection:Sc(e),clipboard:o,generators:n});const Vc=e=>Go(e).bind((e=>zc(e,Hc.firstSelectedSelector))).fold(b(e),(e=>e[0]));const jc=e=>(t,o)=>{const n=ke(t);const s=n==="col"||n==="colgroup"?Vc(t):t;return uo(s,e,o)};const Uc=jc("th,td,caption");const qc=jc("th,td");const Wc=e=>Ra(e.model.table.getSelectedCells());const $c=e=>P(Wc(e),(e=>Ue(e,Hc.selectedSelector)));const Gc=e=>Go(e[0]).map((e=>{const t=ia(e,Lc);Ha(t);return[t]}));const Kc=(e,t)=>B(t,(t=>e.selection.serializer.serialize(t.dom,{}))).join("");const Xc=e=>B(e,(e=>e.dom.innerText)).join("");const Yc=(e,t)=>{e.on("BeforeGetContent",(t=>{const o=o=>{t.preventDefault();Gc(o).each((o=>{t.content=t.format==="text"?Xc(o):Kc(e,o)}))};if(t.selection===true){const t=$c(e);if(t.length>=1){o(t)}}}));e.on("BeforeSetContent",(o=>{if(o.selection===true&&o.paste===true){const n=Wc(e);Q(n).each((n=>{Go(n).each((s=>{const r=P(Na(o.content),(e=>ke(e)!=="meta"));const a=Oe("table");if(r.length===1&&a(r[0])){o.preventDefault();const a=je.fromDom(e.getDoc());const c=Ma(a);const i=Pc(n,r[0],c);t.pasteCells(s,i).each((()=>{e.focus()}))}}))}))}}))};const Jc=(e,t)=>({element:e,offset:t});const Qc=(e,t,o)=>{if(e.property().isText(t)&&e.property().getText(t).trim().length===0||e.property().isComment(t)){return o(t).bind((t=>Qc(e,t,o).orThunk((()=>T.some(t)))))}else{return T.none()}};const Zc=(e,t)=>{if(e.property().isText(t)){return e.property().getText(t).length}const o=e.property().children(t);return o.length};const ei=(e,t)=>{const o=Qc(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o)){return Jc(o,Zc(e,o))}const n=e.property().children(o);return n.length>0?ei(e,n[n.length-1]):Jc(o,Zc(e,o))};const ti=ei;const oi=rc();const ni=e=>ti(oi,e);const si=(e,t)=>{if(!Lo(e)){const o=Tr(e);o.each((o=>{const n=o.value/2;Or(e,n,o.unit);Or(t,n,o.unit)}))}};const ri=e=>B(e,b(0));const ai=(e,t,o,n,s)=>s(e.slice(0,t)).concat(n).concat(s(e.slice(o)));const ci=e=>(t,o,n,s)=>{if(!e(n)){return n}else{const e=Math.max(s,t[o]-Math.abs(n));const r=Math.abs(e-t[o]);return n>=0?r:-r}};const ii=ci((e=>e<0));const li=ci(S);const di=()=>{const e=(e,t,o,n,s)=>{const r=ii(e,t,n,s);return ai(e,t,o+1,[r,0],ri)};const t=(e,t,o,n)=>{const s=(100+o)/100;const r=Math.max(n,(e[t]+o)/s);return B(e,((e,o)=>{const n=o===t?r:e/s;return n-e}))};const o=(o,n,s,r,a,c)=>{if(c){return t(o,n,r,a)}else{return e(o,n,s,r,a)}};const n=(e,t,n,s,r,a,c)=>o(e,n,s,r,a,c);const s=(e,t)=>e(t);const r=(e,o,n,s,r,a)=>{if(a){return t(e,n,s,r)}else{const t=ii(e,n,s,r);return ri(e.slice(0,n)).concat([t])}};const a=(e,t,o,n)=>{if(n){const n=t+o;const s=n/t;const r=B(e,(e=>e/s));return{delta:s*100-100,newSizes:r}}else{return{delta:o,newSizes:e}}};return{resizeTable:s,clampTableDelta:ii,calcLeftEdgeDeltas:o,calcMiddleDeltas:n,calcRightEdgeDeltas:r,calcRedestributedWidths:a}};const ui=()=>{const e=(e,t,o,n,s)=>{const r=n>=0?o:t;const a=li(e,r,n,s);return ai(e,t,o+1,[a,-a],ri)};const t=(t,o,n,s,r,a)=>e(t,n,s,r,a);const o=(e,t,o)=>{if(o){e(t)}};const n=(e,t,o,n,s,r)=>{if(r){return ri(e)}else{const t=n/e.length;return B(e,b(t))}};const s=(e,t,o,n,s)=>{if(s){if(o>=0){return o}else{const t=V(e,((e,t)=>e+t-n),0);return Math.max(-t,o)}}else{return ii(e,t,o,n)}};const r=(e,t,o,n)=>({delta:0,newSizes:e});return{resizeTable:o,clampTableDelta:s,calcLeftEdgeDeltas:e,calcMiddleDeltas:t,calcRightEdgeDeltas:n,calcRedestributedWidths:r}};const fi=e=>{const t=Ss.fromTable(e);return t.grid};const mi=Oe("th");const gi=e=>G(e,(e=>mi(e.element)));const pi=(e,t)=>{if(e&&t){return"sectionCells"}else if(e){return"section"}else{return"cells"}};const hi=e=>{const t=e.section==="thead";const o=fo(yi(e.cells),"th");if(e.section==="tfoot"){return{type:"footer"}}else if(t||o){return{type:"header",subType:pi(t,o)}}else{return{type:"body"}}};const yi=e=>{const t=P(e,(e=>mi(e.element)));if(t.length===0){return T.some("td")}else if(t.length===e.length){return T.some("th")}else{return T.none()}};const bi=e=>{const t=B(e,(e=>hi(e).type));const o=M(t,"header");const n=M(t,"footer");if(!o&&!n){return T.some("body")}else{const e=M(t,"body");if(o&&!e&&!n){return T.some("header")}else if(!o&&!e&&n){return T.some("footer")}else{return T.none()}}};const vi=e=>ee(e.all,(e=>{const t=hi(e);return t.type==="header"?T.from(t.subType):T.none()}));const ki=(e,t,o)=>Rt(o(e.element,t),true,e.isLocked);const wi=(e,t)=>e.section!==t?Bt(e.element,e.cells,t,e.isNew):e;const _i=()=>({transformRow:wi,transformCell:(e,t,o)=>{const n=o(e.element,t);const s=ke(n)!=="td"?zt(n,"td"):n;return Rt(s,e.isNew,e.isLocked)}});const xi=()=>({transformRow:wi,transformCell:ki});const zi=()=>({transformRow:(e,t)=>{const o=t==="thead"?"tbody":t;return wi(e,o)},transformCell:ki});const Ci=()=>({transformRow:v,transformCell:ki});const Si=(e,t)=>{const o=Ss.fromTable(e);const n=vi(o).getOr(t);switch(n){case"section":return _i();case"sectionCells":return xi();case"cells":return zi()}};const Ti={getTableSectionType:Si,section:_i,sectionCells:xi,cells:zi,fallback:Ci};const Oi=e=>uo(e,"[contenteditable]");const Ei=(e,t=false)=>{if(Gt(e)){return e.dom.isContentEditable}else{return Oi(e).fold(b(t),(e=>Di(e)==="true"))}};const Di=e=>e.dom.contentEditable;const Ai=(e,t,o,n)=>{if(o===n){Be(e,t)}else{De(e,t,o)}};const Mi=(e,t,o)=>{Z(eo(e,t)).fold((()=>dt(e,o)),(e=>lt(e,o)))};const Ni=(e,t)=>{const o=io(e,t).getOrThunk((()=>{const o=je.fromTag(t,Ye(e).dom);if(t==="thead"){Mi(e,"caption,colgroup",o)}else if(t==="colgroup"){Mi(e,"caption",o)}else{ut(e,o)}return o}));ht(o);return o};const Ri=(e,t)=>{const o=[];const n=[];const s=e=>B(e,(e=>{if(e.isNew){o.push(e.element)}const t=e.element;ht(t);L(e.cells,(e=>{if(e.isNew){n.push(e.element)}Ai(e.element,"colspan",e.colspan,1);Ai(e.element,"rowspan",e.rowspan,1);ut(t,e.element)}));return t}));const r=e=>$(e,(e=>B(e.cells,(e=>{Ai(e.element,"span",e.colspan,1);return e.element}))));const a=(t,o)=>{const n=Ni(e,o);const a=o==="colgroup"?r:s;const c=a(t);pt(n,c)};const c=t=>{io(e,t).each(yt)};const i=(e,t)=>{if(e.length>0){a(e,t)}else{c(t)}};const l=[];const d=[];const u=[];const f=[];L(t,(e=>{switch(e.section){case"thead":l.push(e);break;case"tbody":d.push(e);break;case"tfoot":u.push(e);break;case"colgroup":f.push(e);break}}));i(f,"colgroup");i(l,"thead");i(d,"tbody");i(u,"tfoot");return{newRows:o,newCells:n}};const Bi=e=>B(e,(e=>{const t=kt(e.element);L(e.cells,(e=>{const o=wt(e.element);Ai(o,"colspan",e.colspan,1);Ai(o,"rowspan",e.rowspan,1);ut(t,o)}));return t}));const Li=(e,t)=>B(e,(e=>cs(e,t)));const Hi=(e,t)=>e[t];const Ii=(e,t)=>{if(e.length===0){return 0}const o=e[0];const n=q(e,(e=>!t(o.element,e.element)));return n.getOr(e.length)};const Pi=(e,t,o,n)=>{const s=Hi(e,t);const r=s.section==="colgroup";const a=Ii(s.cells.slice(o),n);const c=r?1:Ii(Li(e.slice(t),o),n);return{colspan:a,rowspan:c}};const Fi=(e,t)=>{const o=B(e,(e=>B(e.cells,C)));const n=(e,t,n,s)=>{for(let r=e;r<e+n;r++){for(let e=t;e<t+s;e++){o[r][e]=true}}};return B(e,((s,r)=>{const a=$(s.cells,((s,a)=>{if(o[r][a]===false){const o=Pi(e,r,a,t);n(r,a,o.rowspan,o.colspan);return[Dt(s.element,o.rowspan,o.colspan,s.isNew)]}else{return[]}}));return Nt(s.element,a,s.section,s.isNew)}))};const Vi=(e,t,o)=>{const n=[];L(e.colgroups,(s=>{const r=[];for(let n=0;n<e.grid.columns;n++){const s=Ss.getColumnAt(e,n).map((e=>Rt(e.element,o,false))).getOrThunk((()=>Rt(t.colGap(),true,false)));r.push(s)}n.push(Bt(s.element,r,"colgroup",o))}));for(let s=0;s<e.grid.rows;s++){const r=[];for(let n=0;n<e.grid.columns;n++){const a=Ss.getAt(e,s,n).map((e=>Rt(e.element,o,e.isLocked))).getOrThunk((()=>Rt(t.gap(),true,false)));r.push(a)}const a=e.all[s];const c=Bt(a.element,r,a.section,o);n.push(c)}return n};const ji=(e,t)=>Vi(e,t,false);const Ui=e=>Fi(e,Ge);const qi=(e,t)=>ee(e.all,(e=>U(e.cells,(e=>Ge(t,e.element)))));const Wi=(e,t,o)=>{const n=B(t.selection,(t=>qo(t).bind((t=>qi(e,t))).filter(o)));const s=mo(n);return po(s.length>0,s)};const $i=(e,t,o,n,s)=>(r,a,c,i)=>{const l=Ss.fromTable(r);const d=T.from(i===null||i===void 0?void 0:i.section).getOrThunk(Ti.fallback);const u=t(l,a).map((t=>{const o=ji(l,c);const n=e(o,t,Ge,s(c),d);const r=gs(n.grid);const a=Ui(n.grid);return{info:t,grid:a,cursor:n.cursor,lockedColumns:r}}));return u.bind((e=>{const t=Ri(r,e.grid);const s=T.from(i===null||i===void 0?void 0:i.sizing).getOrThunk((()=>ta.getTableSize(r)));const a=T.from(i===null||i===void 0?void 0:i.resize).getOrThunk(ui);o(r,e.grid,e.info,{sizing:s,resize:a,section:d});n(r);Be(r,fs);if(e.lockedColumns.length>0){De(r,fs,e.lockedColumns.join(","))}return T.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))};const Gi=(e,t)=>qo(t.element).bind((o=>qi(e,o).map((e=>{const o={...e,generators:t.generators,clipboard:t.clipboard};return o}))));const Ki=(e,t)=>Wi(e,t,S).map((e=>({cells:e,generators:t.generators,clipboard:t.clipboard})));const Xi=(e,t)=>t.mergable;const Yi=(e,t)=>t.unmergable;const Ji=(e,t)=>Wi(e,t,S);const Qi=(e,t)=>Wi(e,t,(e=>!e.isLocked));const Zi=(e,t)=>qi(e,t).exists((e=>!e.isLocked));const el=(e,t)=>G(t,(t=>Zi(e,t)));const tl=(e,t)=>Xi(e,t).filter((t=>el(e,t.cells)));const ol=(e,t)=>Yi(e,t).filter((t=>el(e,t)));const nl=(e,t,o,n)=>{const s=ds(e).rows;if(s.length===0){return e}for(let e=t.startRow;e<=t.finishRow;e++){for(let o=t.startCol;o<=t.finishCol;o++){const t=s[e];const r=cs(t,o).isLocked;ss(t,o,Rt(n(),false,r))}}return e};const sl=(e,t,o,n)=>{const s=ds(e).rows;let r=true;for(let e=0;e<s.length;e++){for(let a=0;a<ls(s[0]);a++){const c=s[e];const i=cs(c,a);const l=i.element;const d=o(l,t);if(d&&!r){ss(c,a,Rt(n(),true,i.isLocked))}else if(d){r=false}}}return e};const rl=(e,t)=>V(e,((e,o)=>N(e,(e=>t(e.element,o.element)))?e:e.concat([o])),[]);const al=(e,t,o,n)=>{if(t>0&&t<e[0].cells.length){L(e,(e=>{const s=e.cells[t-1];const r=e.cells[t];const a=o(r.element,s.element);if(a){ss(e,t,Rt(n(),true,r.isLocked))}}))}return e};const cl=(e,t,o,n)=>{const s=ds(e).rows;if(t>0&&t<s.length){const e=s[t-1].cells;const r=rl(e,o);L(r,(e=>{let r=T.none();for(let a=t;a<s.length;a++){for(let t=0;t<ls(s[0]);t++){const c=s[a];const i=cs(c,t);const l=o(i.element,e.element);if(l){if(r.isNone()){r=T.some(n())}r.each((e=>{ss(c,t,Rt(e,true,i.isLocked))}))}}}}))}return e};const il=e=>{const t=t=>t(e);const o=b(e);const n=()=>s;const s={tag:true,inner:e,fold:(t,o)=>o(e),isValue:S,isError:C,map:t=>ul.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>T.some(e)};return s};const ll=e=>{const t=()=>o;const o={tag:false,inner:e,fold:(t,o)=>t(e),isValue:C,isError:S,map:t,mapError:t=>ul.error(t(e)),bind:t,exists:C,forall:S,getOr:v,or:v,getOrThunk:z,orThunk:z,getOrDie:x(String(e)),each:p,toOptional:T.none};return o};const dl=(e,t)=>e.fold((()=>ll(t)),il);const ul={value:il,error:ll,fromOption:dl};const fl=(e,t,o)=>{if(e.row>=t.length||e.column>ls(t[0])){return ul.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column)}const n=t.slice(e.row);const s=n[0].cells.slice(e.column);const r=ls(o[0]);const a=o.length;return ul.value({rowDelta:n.length-a,colDelta:s.length-r})};const ml=(e,t)=>{const o=ls(e[0]);const n=ls(t[0]);return{rowDelta:0,colDelta:o-n}};const gl=(e,t)=>{const o=e.length;const n=t.length;return{rowDelta:o-n,colDelta:0}};const pl=(e,t,o,n)=>{const s=t.section==="colgroup"?o.col:o.cell;return R(e,(e=>Rt(s(),true,n(e))))};const hl=(e,t,o,n)=>{const s=e[e.length-1];return e.concat(R(t,(()=>{const e=s.section==="colgroup"?o.colgroup:o.row;const t=us(s,e,v);const r=pl(t.cells.length,t,o,(e=>fe(n,e.toString())));return rs(t,r)})))};const yl=(e,t,o,n)=>B(e,(e=>{const s=pl(t,e,o,C);return os(e,n,s)}));const bl=(e,t,o)=>B(e,(e=>V(o,((o,n)=>{const s=pl(1,e,t,S)[0];return ns(o,n,s)}),e)));const vl=(e,t,o)=>{const n=t.colDelta<0?yl:v;const s=t.rowDelta<0?hl:v;const r=gs(e);const a=ls(e[0]);const c=N(r,(e=>e===a-1));const i=n(e,Math.abs(t.colDelta),o,c?a-1:a);const l=gs(i);return s(i,Math.abs(t.rowDelta),o,X(l,S))};const kl=(e,t,o,n)=>{const s=cs(e[t],o);const r=w(n,s.element);const a=e[t];return e.length>1&&ls(a)>1&&(o>0&&r(is(a,o-1))||o<a.cells.length-1&&r(is(a,o+1))||t>0&&r(is(e[t-1],o))||t<e.length-1&&r(is(e[t+1],o)))};const wl=(e,t,o,n,s,r)=>{const a=e.row;const c=e.column;const i=o.length;const l=ls(o[0]);const d=a+i;const u=c+l+r.length;const f=X(r,S);for(let e=a;e<d;e++){let r=0;for(let i=c;i<u;i++){if(f[i]){r++;continue}if(kl(t,e,i,s)){sl(t,is(t[e],i),s,n.cell)}const l=i-c-r;const d=cs(o[e-a],l);const u=d.element;const m=n.replace(u);ss(t[e],i,Rt(m,true,d.isLocked))}}return t};const _l=(e,t,o)=>{const n=ls(t[0]);const s=ds(t).cols.length+e.row;const r=R(n-e.column,(t=>t+e.column));const a=U(r,(e=>G(o,(t=>t!==e)))).getOr(n-1);return{row:s,column:a}};const xl=(e,t,o)=>P(o,(o=>o>=e.column&&o<=ls(t[0])+e.column));const zl=(e,t,o,n,s)=>{const r=gs(t);const a=_l(e,t,r);const c=ds(o).rows;const i=xl(a,c,r);const l=fl(a,t,c);return l.map((e=>{const o={...e,colDelta:e.colDelta-i.length};const r=vl(t,o,n);const l=gs(r);const d=xl(a,c,l);return wl(a,r,c,n,s,d)}))};const Cl=(e,t,o,n,s)=>{al(t,e,s,n.cell);const r=gl(o,t);const a=vl(o,r,n);const c=gl(t,a);const i=vl(t,c,n);return B(i,((t,o)=>os(t,e,a[o].cells)))};const Sl=(e,t,o,n,s)=>{cl(t,e,s,n.cell);const r=gs(t);const a=ml(t,o);const c={...a,colDelta:a.colDelta-r.length};const i=vl(t,c,n);const{cols:l,rows:d}=ds(i);const u=gs(i);const f=ml(o,t);const m={...f,colDelta:f.colDelta+u.length};const g=bl(o,n,u);const p=vl(g,m,n);return[...l,...d.slice(0,e),...p,...d.slice(e,d.length)]};const Tl=(e,t,o,n)=>us(e,(e=>n(e,o)),t);const Ol=(e,t,o,n,s)=>{const{rows:r,cols:a}=ds(e);const c=r.slice(0,t);const i=r.slice(t);const l=Tl(r[o],((e,o)=>{const a=t>0&&t<r.length&&n(is(r[t-1],o),is(r[t],o));const c=a?cs(r[t],o):Rt(s(e.element,n),true,e.isLocked);return c}),n,s);return[...a,...c,l,...i]};const El=(e,t,o,n,s,r,a)=>{if(o==="colgroup"||!n){const t=cs(e,s);return Rt(a(t.element,r),true,false)}else{return cs(e,t)}};const Dl=(e,t,o,n,s)=>B(e,(e=>{const r=t>0&&t<ls(e)&&n(is(e,t-1),is(e,t));const a=El(e,t,e.section,r,o,n,s);return ns(e,t,a)}));const Al=(e,t)=>$(e,(e=>{const o=e.cells;const n=F(t,((e,t)=>t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e),o);return n.length>0?[Bt(e.element,n,e.section,e.isNew)]:[]}));const Ml=(e,t,o)=>{const{rows:n,cols:s}=ds(e);return[...s,...n.slice(0,t),...n.slice(o+1)]};const Nl=(e,t,o,n)=>is(e[t],o)!==undefined&&(t>0&&n(is(e[t-1],o),is(e[t],o)));const Rl=(e,t,o)=>t>0&&o(is(e,t-1),is(e,t));const Bl=(e,t,o,n)=>Nl(e,t,o,n)||Rl(e[t],o,n);const Ll=(e,t)=>{const o=G(t,v)&&gi(e.cells);return o?S:(e,o,n)=>{const s=ke(e.element);return!(s==="th"&&t[n])}};const Hl=(e,t)=>{const o=G(t,v)&&gi(e);return o?S:(e,o,n)=>{const s=ke(e.element);return!(s==="th"&&t[o])}};const Il=(e,t,o,n)=>{const s=e=>e==="row"?Ho(t):Lo(t);const r=e=>s(e)?`${e}group`:e;if(e){return mi(t)?r(o):null}else if(n&&mi(t)){const e=o==="row"?"col":"row";return r(e)}else{return null}};const Pl=(e,t)=>(o,n,s)=>T.some(Il(e,o.element,"col",t[s]));const Fl=(e,t)=>(o,n)=>T.some(Il(e,o.element,"row",t[n]));const Vl=(e,t,o)=>Rt(o(e.element,t),true,e.isLocked);const jl=(e,t,o,n,s,r,a)=>{const c=e=>N(t,(t=>o(e.element,t.element)));return B(e,((e,t)=>as(e,((e,i)=>{if(c(e)){const c=a(e,t,i)?s(e,o,n):e;r(c,t,i).each((e=>{Me(c.element,{scope:T.from(e)})}));return c}else{return e}}))))};const Ul=(e,t,o)=>$(e,((n,s)=>Bl(e,s,t,o)?[]:[cs(n,t)]));const ql=(e,t,o)=>{const n=e[t];return $(n.cells,((n,s)=>Bl(e,t,s,o)?[]:[n]))};const Wl=(e,t,o,n,s)=>{const r=ds(e).rows;const a=$(t,(e=>Ul(r,e,n)));const c=B(r,(e=>gi(e.cells)));const i=Hl(a,c);const l=Fl(o,c);return jl(e,a,n,s,Vl,l,i)};const $l=(e,t,o,n,s,r,a)=>{const{cols:c,rows:i}=ds(e);const l=i[t[0]];const d=$(t,(e=>ql(i,e,s)));const u=B(l.cells,((e,t)=>gi(Ul(i,t,s))));const f=[...i];L(t,(e=>{f[e]=a.transformRow(i[e],o)}));const m=[...c,...f];const g=Ll(l,u);const p=Pl(n,u);return jl(m,d,s,r,a.transformCell,p,g)};const Gl=(e,t,o,n)=>{const s=ds(e).rows;const r=B(t,(e=>cs(s[e.row],e.column)));return jl(e,r,o,n,Vl,T.none,S)};const Kl=e=>{if(!i(e)){throw new Error("cases must be an array")}if(e.length===0){throw new Error("there must be at least one case")}const t=[];const o={};L(e,((n,s)=>{const r=te(n);if(r.length!==1){throw new Error("one and only one name per case")}const a=r[0];const c=n[a];if(o[a]!==undefined){throw new Error("duplicate key detected:"+a)}else if(a==="cata"){throw new Error("cannot have a case named cata (sorry)")}else if(!i(c)){throw new Error("case arguments must be an array")}t.push(a);o[a]=(...o)=>{const n=o.length;if(n!==c.length){throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+n)}const r=e=>{const n=te(e);if(t.length!==n.length){throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","))}const s=G(t,(e=>M(n,e)));if(!s){throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "))}return e[a].apply(null,o)};return{fold:(...t)=>{if(t.length!==e.length){throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length)}const n=t[s];return n.apply(null,o)},match:r,log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}}));return o};const Xl={generate:Kl};const Yl=Xl.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]);const Jl={...Yl};const Ql=(e,t)=>{if(e.length===0){return Jl.none()}if(e.length===1){return Jl.only(0)}if(t===0){return Jl.left(0,1)}if(t===e.length-1){return Jl.right(t-1,t)}if(t>0&&t<e.length-1){return Jl.middle(t-1,t,t+1)}return Jl.none()};const Zl=(e,t,o,n,s)=>{const r=e.slice(0);const a=Ql(e,t);const c=b(B(r,b(0)));const i=e=>n.singleColumnWidth(r[e],o);const l=(e,t)=>s.calcLeftEdgeDeltas(r,e,t,o,n.minCellWidth(),n.isRelative);const d=(e,t,a)=>s.calcMiddleDeltas(r,e,t,a,o,n.minCellWidth(),n.isRelative);const u=(e,t)=>s.calcRightEdgeDeltas(r,e,t,o,n.minCellWidth(),n.isRelative);return a.fold(c,i,l,d,u)};const ed=(e,t,o)=>{let n=0;for(let s=e;s<t;s++){n+=o[s]!==undefined?o[s]:0}return n};const td=(e,t)=>{const o=Ss.justCells(e);return B(o,(e=>{const o=ed(e.column,e.column+e.colspan,t);return{element:e.element,width:o,colspan:e.colspan}}))};const od=(e,t)=>{const o=Ss.justColumns(e);return B(o,((e,o)=>({element:e.element,width:t[o],colspan:e.colspan})))};const nd=(e,t)=>{const o=Ss.justCells(e);return B(o,(e=>{const o=ed(e.row,e.row+e.rowspan,t);return{element:e.element,height:o,rowspan:e.rowspan}}))};const sd=(e,t)=>B(e.all,((e,o)=>({element:e.element,height:t[o]})));const rd=e=>F(e,((e,t)=>e+t),0);const ad=(e,t)=>{if(Ss.hasColumns(e)){return od(e,t)}else{return td(e,t)}};const cd=(e,t,o)=>{const n=ad(e,t);L(n,(e=>{o.setElementWidth(e.element,e.width)}))};const id=(e,t,o,n,s)=>{const r=Ss.fromTable(e);const a=s.getCellDelta(t);const c=s.getWidths(r,s);const i=o===r.grid.columns-1;const l=n.clampTableDelta(c,o,a,s.minCellWidth(),i);const d=Zl(c,o,l,s,n);const u=B(d,((e,t)=>e+c[t]));cd(r,u,s);n.resizeTable(s.adjustTableWidth,l,i)};const ld=(e,t,o,n)=>{const s=Ss.fromTable(e);const r=Gr(s,e,n);const a=B(r,((e,n)=>o===n?Math.max(t+e,Fo()):e));const c=nd(s,a);const i=sd(s,a);L(i,(e=>{pr(e.element,e.height)}));L(c,(e=>{pr(e.element,e.height)}));const l=rd(a);pr(e,l)};const dd=(e,t,o,n,s)=>{const r=Ss.generate(t);const a=n.getWidths(r,n);const c=n.pixelWidth();const{newSizes:i,delta:l}=s.calcRedestributedWidths(a,c,o.pixelDelta,n.isRelative);cd(r,i,n);n.adjustTableWidth(l)};const ud=(e,t,o,n)=>{const s=Ss.generate(t);const r=n.getWidths(s,n);cd(s,r,n)};const fd=e=>{const t=(e,t)=>{const o=N(e,(e=>e.column===t.column));return o?e:e.concat([t])};return V(e,t,[]).sort(((e,t)=>e.column-t.column))};const md=Oe("col");const gd=Oe("colgroup");const pd=e=>ke(e)==="tr"||gd(e);const hd=e=>{const t=Ro(e,"colspan",1);const o=Ro(e,"rowspan",1);return{element:e,colspan:t,rowspan:o}};const yd=(e,t=hd)=>{const o=t=>md(t.element)?e.col(t):e.cell(t);const n=t=>gd(t.element)?e.colgroup(t):e.row(t);const s=e=>{if(pd(e)){return n({element:e})}else{const n=e;const s=o(t(n));r=T.some({item:n,replacement:s});return s}};let r=T.none();const a=(e,t)=>r.fold((()=>s(e)),(o=>t(e,o.item)?o.replacement:s(e)));return{getOrInit:a}};const bd=e=>t=>{const o=[];const n=(e,t)=>U(o,(o=>t(o.item,e)));const s=n=>{const s=e==="td"?{scope:null}:{};const r=t.replace(n,e,s);o.push({item:n,sub:r});return r};const r=(e,t)=>{if(pd(e)||md(e)){return e}else{const o=e;return n(o,t).fold((()=>s(o)),(n=>t(e,n.item)?n.sub:s(o)))}};return{replaceOrInit:r}};const vd=e=>Re(e,"scope").map((e=>e.substr(0,3)));const kd=e=>{const t=t=>{const o=vd(t);o.each((e=>De(t,"scope",e)));return()=>{const n=e.cell({element:t,colspan:1,rowspan:1});Mo(n,"width");Mo(t,"width");o.each((e=>De(n,"scope",e)));return n}};const o=e=>{const t=()=>{const t=mo(B(e,vd));if(t.length===0){return T.none()}else{const e=t[0];const o=["row","col"];const n=N(t,(t=>t!==e&&M(o,t)));return n?T.none():T.from(e)}};Mo(e[0],"width");t().fold((()=>Be(e[0],"scope")),(t=>De(e[0],"scope",t+"group")));return b(e[0])};return{unmerge:t,merge:o}};const wd={modification:yd,transform:bd,merging:kd};const _d=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","table","thead","tfoot","tbody","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];const xd=(e,t)=>{const o=e.property().name(t);return M(["ol","ul"],o)};const zd=(e,t)=>{const o=e.property().name(t);return M(_d,o)};const Cd=(e,t)=>M(["br","img","hr","input"],e.property().name(t));const Sd=rc();const Td=e=>zd(Sd,e);const Od=e=>xd(Sd,e);const Ed=e=>Cd(Sd,e);const Dd=e=>{const t=Oe("br");const o=e=>G(e,(e=>t(e)||Ce(e)&&fa(e).trim().length===0));const n=e=>ke(e)==="li"||no(e,Od).isSome();const s=e=>st(e).map((e=>{if(Td(e)){return true}if(Ed(e)){return ke(e)==="img"?false:true}return false})).getOr(false);const r=e=>ka(e).bind((o=>{const r=s(o);return et(o).map((s=>r===true||n(s)||t(o)||Td(s)&&!Ge(e,s)?[]:[je.fromTag("br")]))})).getOr([]);const a=()=>{const t=$(e,(e=>{const t=rt(e);return o(t)?[]:t.concat(r(e))}));return t.length===0?[je.fromTag("br")]:t};const c=a();ht(e[0]);pt(e[0],c)};const Ad=e=>Ei(e,true);const Md=e=>{const t=Wo(e);if(t.length===0){yt(e)}};const Nd=(e,t)=>({grid:e,cursor:t});const Rd=e=>ee(e,(e=>ee(e.cells,(e=>{const t=e.element;return po(Ad(t),t)}))));const Bd=(e,t,o)=>{var n,s;const r=ds(e).rows;return T.from((s=(n=r[t])===null||n===void 0?void 0:n.cells[o])===null||s===void 0?void 0:s.element).filter(Ad).orThunk((()=>Rd(r)))};const Ld=(e,t,o)=>{const n=Bd(e,t,o);return Nd(e,n)};const Hd=e=>{const t=(e,t)=>{const o=N(e,(e=>e.row===t.row));return o?e:e.concat([t])};return V(e,t,[]).sort(((e,t)=>e.row-t.row))};const Id=(e,t,o,n)=>{const s=t[0].row;const r=Hd(t);const a=F(r,((e,t)=>{const r=Ol(e.grid,s,t.row+e.delta,o,n.getOrInit);return{grid:r,delta:e.delta+1}}),{grid:e,delta:0}).grid;return Ld(a,s,t[0].column)};const Pd=(e,t,o,n)=>{const s=Hd(t);const r=s[s.length-1];const a=r.row+r.rowspan;const c=F(s,((e,t)=>Ol(e,a,t.row,o,n.getOrInit)),e);return Ld(c,a,t[0].column)};const Fd=(e,t,o,n)=>{const s=t.details;const r=fd(s);const a=r[0].column;const c=F(r,((e,t)=>{const s=Dl(e.grid,a,t.column+e.delta,o,n.getOrInit);return{grid:s,delta:e.delta+1}}),{grid:e,delta:0}).grid;return Ld(c,s[0].row,a)};const Vd=(e,t,o,n)=>{const s=t.details;const r=s[s.length-1];const a=r.column+r.colspan;const c=fd(s);const i=F(c,((e,t)=>Dl(e,a,t.column,o,n.getOrInit)),e);return Ld(i,s[0].row,a)};const jd=(e,t,o,n)=>{const s=fd(t);const r=B(s,(e=>e.column));const a=Wl(e,r,true,o,n.replaceOrInit);return Ld(a,t[0].row,t[0].column)};const Ud=(e,t,o,n)=>{const s=Gl(e,t,o,n.replaceOrInit);return Ld(s,t[0].row,t[0].column)};const qd=(e,t,o,n)=>{const s=fd(t);const r=B(s,(e=>e.column));const a=Wl(e,r,false,o,n.replaceOrInit);return Ld(a,t[0].row,t[0].column)};const Wd=(e,t,o,n)=>{const s=Gl(e,t,o,n.replaceOrInit);return Ld(s,t[0].row,t[0].column)};const $d=(e,t)=>(o,n,s,r,a)=>{const c=Hd(n);const i=B(c,(e=>e.row));const l=$l(o,i,e,t,s,r.replaceOrInit,a);return Ld(l,n[0].row,n[0].column)};const Gd=$d("thead",true);const Kd=$d("tbody",false);const Xd=$d("tfoot",false);const Yd=(e,t,o,n)=>{const s=fd(t.details);const r=Al(e,B(s,(e=>e.column)));const a=r.length>0?r[0].cells.length-1:0;return Ld(r,s[0].row,Math.min(s[0].column,a))};const Jd=(e,t,o,n)=>{const s=Hd(t);const r=Ml(e,s[0].row,s[s.length-1].row);const a=r.length>0?r.length-1:0;return Ld(r,Math.min(t[0].row,a),t[0].column)};const Qd=(e,t,o,n)=>{const s=t.cells;Dd(s);const r=nl(e,t.bounds,o,n.merge(s));return Nd(r,T.from(s[0]))};const Zd=(e,t,o,n)=>{const s=(e,t)=>sl(e,t,o,n.unmerge(t));const r=F(t,s,e);return Nd(r,T.from(t[0]))};const eu=(e,t,o,n)=>{const s=(e,t)=>{const o=Ss.fromTable(e);return Vi(o,t,true)};const r=s(t.clipboard,t.generators);const a=Ot(t.row,t.column);const c=zl(a,e,r,t.generators,o);return c.fold((()=>Nd(e,T.some(t.element))),(e=>Ld(e,t.row,t.column)))};const tu=(e,t,o)=>{const n=Zo(e,o.section);const s=Ss.generate(n);return Vi(s,t,true)};const ou=(e,t,o,n)=>{const s=ds(e).rows;const r=t.cells[0].column;const a=s[t.cells[0].row];const c=tu(t.clipboard,t.generators,a);const i=Cl(r,e,c,t.generators,o);return Ld(i,t.cells[0].row,t.cells[0].column)};const nu=(e,t,o,n)=>{const s=ds(e).rows;const r=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan;const a=s[t.cells[0].row];const c=tu(t.clipboard,t.generators,a);const i=Cl(r,e,c,t.generators,o);return Ld(i,t.cells[0].row,t.cells[0].column)};const su=(e,t,o,n)=>{const s=ds(e).rows;const r=t.cells[0].row;const a=s[r];const c=tu(t.clipboard,t.generators,a);const i=Sl(r,e,c,t.generators,o);return Ld(i,t.cells[0].row,t.cells[0].column)};const ru=(e,t,o,n)=>{const s=ds(e).rows;const r=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan;const a=s[t.cells[0].row];const c=tu(t.clipboard,t.generators,a);const i=Sl(r,e,c,t.generators,o);return Ld(i,t.cells[0].row,t.cells[0].column)};const au=(e,t)=>{const o=Ss.fromTable(e);const n=Ji(o,t);return n.bind((e=>{const t=e[e.length-1];const n=e[0].column;const s=t.column+t.colspan;const r=W(B(o.all,(e=>P(e.cells,(e=>e.column>=n&&e.column<s)))));return yi(r)})).getOr("")};const cu=(e,t)=>{const o=Ss.fromTable(e);const n=Ji(o,t);return n.bind(yi).getOr("")};const iu=(e,t)=>{const o=Ss.fromTable(e);const n=Ji(o,t);return n.bind((e=>{const t=e[e.length-1];const n=e[0].row;const s=t.row+t.rowspan;const r=o.all.slice(n,s);return bi(r)})).getOr("")};const lu=(e,t,o,n)=>ud(e,t,o,n.sizing);const du=(e,t,o,n)=>dd(e,t,o,n.sizing,n.resize);const uu=(e,t)=>N(t,(e=>e.column===0&&e.isLocked));const fu=(e,t)=>N(t,(t=>t.column+t.colspan>=e.grid.columns&&t.isLocked));const mu=(e,t)=>{const o=Ts(e);const n=fd(t);return V(n,((e,t)=>{const n=o[t.column];const s=n.map(Zn).getOr(0);return e+s}),0)};const gu=e=>(t,o)=>Ji(t,o).filter((o=>{const n=e?uu:fu;return!n(t,o)})).map((e=>({details:e,pixelDelta:mu(t,e)})));const pu=(e,t)=>Qi(e,t).map((t=>({details:t,pixelDelta:-mu(e,t)})));const hu=e=>(t,o)=>Ki(t,o).filter((o=>{const n=e?uu:fu;return!n(t,o.cells)}));const yu=wd.transform("th");const bu=wd.transform("td");const vu=$i(Id,Ji,p,p,wd.modification);const ku=$i(Pd,Ji,p,p,wd.modification);const wu=$i(Fd,gu(true),du,p,wd.modification);const _u=$i(Vd,gu(false),du,p,wd.modification);const xu=$i(Yd,pu,du,Md,wd.modification);const zu=$i(Jd,Ji,p,Md,wd.modification);const Cu=$i(jd,Qi,p,p,yu);const Su=$i(qd,Qi,p,p,bu);const Tu=$i(Gd,Qi,p,p,yu);const Ou=$i(Kd,Qi,p,p,bu);const Eu=$i(Xd,Qi,p,p,bu);const Du=$i(Ud,Qi,p,p,yu);const Au=$i(Wd,Qi,p,p,bu);const Mu=$i(Qd,tl,lu,p,wd.merging);const Nu=$i(Zd,ol,lu,p,wd.merging);const Ru=$i(eu,Gi,lu,p,wd.modification);const Bu=$i(ou,hu(true),p,p,wd.modification);const Lu=$i(nu,hu(false),p,p,wd.modification);const Hu=$i(su,Ki,p,p,wd.modification);const Iu=$i(ru,Ki,p,p,wd.modification);const Pu=au;const Fu=cu;const Vu=iu;const ju=(e,t)=>e.dispatch("NewRow",{node:t});const Uu=(e,t)=>e.dispatch("NewCell",{node:t});const qu=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})};const Wu=(e,t,o,n,s)=>{e.dispatch("TableSelectionChange",{cells:t,start:o,finish:n,otherCells:s})};const $u=e=>{e.dispatch("TableSelectionClear")};const Gu=(e,t,o,n,s)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:s})};const Ku=(e,t,o,n,s)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:s})};const Xu={structure:false,style:true};const Yu={structure:true,style:false};const Ju={structure:true,style:true};const Qu=e=>t=>t.options.get(e);const Zu=(e,t)=>{var o;if(df(e)){const n=e.dom;const s=(o=n.getParent(e.selection.getStart(),n.isBlock))!==null&&o!==void 0?o:e.getBody();const r=es(je.fromDom(s));return{...t,width:r+"px"}}else if(uf(e)){return ie(t,((e,t)=>t!=="width"))}else{return t}};const ef=e=>{const t=e.options.register;t("table_clone_elements",{processor:"string[]"});t("table_use_colgroups",{processor:"boolean",default:true});t("table_header_type",{processor:e=>{const t=M(["section","cells","sectionCells","auto"],e);return t?{value:e,valid:t}:{valid:false,message:"Must be one of: section, cells, sectionCells or auto."}},default:"section"});t("table_sizing_mode",{processor:"string",default:"auto"});t("table_default_attributes",{processor:"object",default:{border:"1"}});t("table_default_styles",{processor:"object",default:{"border-collapse":"collapse",width:"100%"}});t("table_column_resizing",{processor:e=>{const t=M(["preservetable","resizetable"],e);return t?{value:e,valid:t}:{valid:false,message:"Must be preservetable, or resizetable."}},default:"preservetable"});t("table_resize_bars",{processor:"boolean",default:true})};const tf=e=>T.from(e.options.get("table_clone_elements"));const of=e=>{const t=e.options.get("object_resizing");return M(t.split(","),"table")};const nf=Qu("table_header_type");const sf=Qu("table_column_resizing");const rf=e=>sf(e)==="preservetable";const af=e=>sf(e)==="resizetable";const cf=Qu("table_sizing_mode");const lf=e=>cf(e)==="relative";const df=e=>cf(e)==="fixed";const uf=e=>cf(e)==="responsive";const ff=Qu("table_resize_bars");const mf=Qu("table_default_attributes");const gf=e=>{const t=e.options;const o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:Zu(e,o)};const pf=Qu("table_use_colgroups");const hf=(e,t)=>{if(lf(e)){return ta.percentageSize(t)}else if(df(e)){return ta.pixelSize(t)}else{return ta.getTableSize(t)}};const yf=(e,t,o)=>{const n=e=>ke(Ba(e))==="table";const s=t=>n(e)===false||fi(t).rows>1;const r=t=>n(e)===false||fi(t).columns>1;const a=tf(e);const c=af(e)?p:si;const i=t=>{switch(nf(e)){case"section":return Ti.section();case"sectionCells":return Ti.sectionCells();case"cells":return Ti.cells();default:return Ti.getTableSectionType(t,"section")}};const l=(t,n)=>n.cursor.fold((()=>{const n=Wo(t);return Q(n).filter(Gt).map((n=>{o.clearSelectedCells(t.dom);const s=e.dom.createRng();s.selectNode(n.dom);e.selection.setRng(s);De(n,"data-mce-selected","1");return s}))}),(n=>{const s=ni(n);const r=e.dom.createRng();r.setStart(s.element.dom,s.offset);r.setEnd(s.element.dom,s.offset);e.selection.setRng(r);o.clearSelectedCells(t.dom);return T.some(r)}));const d=(o,n,s,r)=>(c,d,u=false)=>{Ha(c);const f=je.fromDom(e.getDoc());const m=Aa(s,f,a);const g={sizing:hf(e,c),resize:af(e)?di():ui(),section:i(c)};return n(c)?o(c,d,m,g).bind((o=>{t.refresh(c.dom);L(o.newRows,(t=>{ju(e,t.dom)}));L(o.newCells,(t=>{Uu(e,t.dom)}));const n=l(c,o);if(Gt(c)){Ha(c);if(!u){qu(e,c.dom,r)}}return n.map((e=>({rng:e,effect:r})))})):T.none()};const u=d(zu,s,p,Yu);const f=d(xu,r,p,Yu);const m=d(vu,S,p,Yu);const g=d(ku,S,p,Yu);const h=d(wu,S,c,Yu);const y=d(_u,S,c,Yu);const b=d(Mu,S,p,Yu);const v=d(Nu,S,p,Yu);const k=d(Bu,S,p,Yu);const w=d(Lu,S,p,Yu);const _=d(Hu,S,p,Yu);const x=d(Iu,S,p,Yu);const z=d(Ru,S,p,Ju);const C=d(Du,S,p,Yu);const O=d(Au,S,p,Yu);const E=d(Cu,S,p,Yu);const D=d(Su,S,p,Yu);const A=d(Tu,S,p,Yu);const M=d(Ou,S,p,Yu);const N=d(Eu,S,p,Yu);const R=Fu;const B=Pu;const H=Vu;return{deleteRow:u,deleteColumn:f,insertRowsBefore:m,insertRowsAfter:g,insertColumnsBefore:h,insertColumnsAfter:y,mergeCells:b,unmergeCells:v,pasteColsBefore:k,pasteColsAfter:w,pasteRowsBefore:_,pasteRowsAfter:x,pasteCells:z,makeCellsHeader:C,unmakeCellsHeader:O,makeColumnsHeader:E,unmakeColumnsHeader:D,makeRowsHeader:A,makeRowsBody:M,makeRowsFooter:N,getTableRowType:H,getTableCellType:R,getTableColType:B}};const bf=(e,t,o)=>{const n=Ro(e,t,1);if(o===1||n<=1){Be(e,t)}else{De(e,t,Math.min(o,n))}};const vf=(e,t,o)=>{if(Ss.hasColumns(e)){const n=P(Ss.justColumns(e),(e=>e.column>=t&&e.column<o));const s=B(n,(e=>{const n=wt(e.element);bf(n,"span",o-t);return n}));const r=je.fromTag("colgroup");pt(r,s);return[r]}else{return[]}};const kf=(e,t,o)=>B(e.all,(e=>{const n=P(e.cells,(e=>e.column>=t&&e.column<o));const s=B(n,(e=>{const n=wt(e.element);bf(n,"colspan",o-t);return n}));const r=je.fromTag("tr");pt(r,s);return r}));const wf=(e,t)=>{const o=Ss.fromTable(e);const n=Qi(o,t);return n.map((e=>{const t=e[e.length-1];const n=e[0].column;const s=t.column+t.colspan;const r=vf(o,n,s);const a=kf(o,n,s);return[...r,...a]}))};const _f=(e,t,o)=>{const n=Ss.fromTable(e);const s=Ji(n,t);return s.bind((e=>{const t=Vi(n,o,false);const s=ds(t).rows;const r=s.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan);const a=$(r,(e=>{const t=P(e.cells,(e=>!e.isLocked));return t.length>0?[{...e,cells:t}]:[]}));const c=Ui(a);return po(c.length>0,c)})).map((e=>Bi(e)))};const xf=Xl.generate([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]);const zf=(e,t,o)=>{const n=o.substring(0,o.length-e.length);const s=parseFloat(n);return n===s.toString()?t(s):xf.invalid(o)};const Cf=e=>{if(vo(e,"%")){return zf("%",xf.percent,e)}if(vo(e,"px")){return zf("px",xf.pixels,e)}return xf.invalid(e)};const Sf={...xf,from:Cf};const Tf=(e,t)=>B(e,(e=>{const o=Sf.from(e);return o.fold((()=>e),(e=>{const o=e/t*100;return o+"%"}),(e=>e+"%"))}));const Of=(e,t,o)=>{const n=o/t;return B(e,(e=>{const t=Sf.from(e);return t.fold((()=>e),(e=>e*n+"px"),(e=>e/100*o+"px"))}))};const Ef=(e,t)=>{const o=e.fold((()=>b("")),(e=>{const o=e/t;return b(o+"px")}),(()=>{const e=100/t;return b(e+"%")}));return R(t,o)};const Df=(e,t,o)=>e.fold((()=>t),(e=>Of(t,o,e)),(e=>Tf(t,o)));const Af=(e,t,o)=>{const n=Sf.from(o);const s=G(e,(e=>e==="0px"))?Ef(n,e.length):Df(n,e,t);return Bf(s)};const Mf=(e,t)=>{if(e.length===0){return t}return F(e,((e,t)=>Sf.from(t).fold(b(0),v,v)+e),0)};const Nf=(e,t)=>{const o=Math.floor(e);return{value:o+t,remainder:e-o}};const Rf=(e,t)=>Sf.from(e).fold(b(e),(e=>e+t+"px"),(e=>e+t+"%"));const Bf=e=>{if(e.length===0){return e}const t=F(e,((e,t)=>{const o=Sf.from(t).fold((()=>({value:t,remainder:0})),(e=>Nf(e,"px")),(e=>({value:e+"%",remainder:0})));return{output:[o.value].concat(e.output),remainder:e.remainder+o.remainder}}),{output:[],remainder:0});const o=t.output;return o.slice(0,o.length-1).concat([Rf(o[o.length-1],Math.round(t.remainder))])};const Lf=Sf.from;const Hf=(e,t,o)=>{L(t,(t=>{const n=e.slice(t.column,t.colspan+t.column);const s=Mf(n,Po());To(t.element,"width",s+o)}))};const If=(e,t,o)=>{L(t,((t,n)=>{const s=Mf([e[n]],Po());To(t.element,"width",s+o)}))};const Pf=(e,t,o,n)=>{L(o,(t=>{const o=e.slice(t.row,t.rowspan+t.row);const s=Mf(o,Fo());To(t.element,"height",s+n)}));L(t,((t,o)=>{To(t.element,"height",e[o])}))};const Ff=e=>Lf(e).fold(b("px"),b("px"),b("%"));const Vf=(e,t,o)=>{const n=Ss.fromTable(e);const s=n.all;const r=Ss.justCells(n);const a=Ss.justColumns(n);t.each((t=>{const o=Ff(t);const s=Qn(e);const c=Ur(n,e);const i=Af(c,s,t);if(Ss.hasColumns(n)){If(i,a,o)}else{Hf(i,r,o)}To(e,"width",t)}));o.each((t=>{const o=Ff(t);const a=Rs(e);const c=Kr(n,e,er);const i=Af(c,a,t);Pf(i,s,r,o);To(e,"height",t)}))};const jf=Ar;const Uf=Mr;const qf=Nr;const Wf=e=>{Be(e,"width")};const $f=e=>{const t=Dr(e);Vf(e,T.some(t),T.none());Wf(e)};const Gf=e=>{const t=Er(e);Vf(e,T.some(t),T.none());Wf(e)};const Kf=e=>{Mo(e,"width");const t=$o(e);const o=t.length>0?t:Wo(e);L(o,(e=>{Mo(e,"width");Wf(e)}));Wf(e)};const Xf={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:false};const Yf=()=>je.fromTag("th");const Jf=()=>je.fromTag("td");const Qf=()=>je.fromTag("col");const Zf=(e,t,o,n)=>{const s=je.fromTag("tr");for(let r=0;r<e;r++){const e=n<t||r<o?Yf():Jf();if(r<o){De(e,"scope","row")}if(n<t){De(e,"scope","col")}ut(e,je.fromTag("br"));ut(s,e)}return s};const em=e=>{const t=je.fromTag("colgroup");R(e,(()=>ut(t,Qf())));return t};const tm=(e,t,o,n)=>R(e,(e=>Zf(t,o,n,e)));const om=(e,t,o,n,s,r=Xf)=>{const a=je.fromTag("table");const c=s!=="cells";Oo(a,r.styles);Ae(a,r.attributes);if(r.colGroups){ut(a,em(t))}const i=Math.min(e,o);if(c&&o>0){const e=je.fromTag("thead");ut(a,e);const r=s==="sectionCells"?i:0;const c=tm(o,t,r,n);pt(e,c)}const l=je.fromTag("tbody");ut(a,l);const d=c?e-i:e;const u=c?0:o;const f=tm(d,t,u,n);pt(l,f);return a};const nm=e=>e.dom.innerHTML;const sm=e=>{const t=je.fromTag("div");const o=je.fromDom(e.dom.cloneNode(true));ut(t,o);return nm(t)};const rm=(e,t)=>{e.selection.select(t.dom,true);e.selection.collapse(true)};const am=(e,t)=>{lo(t,"td,th").each(w(rm,e))};const cm=(e,t)=>{L(to(t,"tr"),(t=>{ju(e,t.dom);L(to(t,"th,td"),(t=>{Uu(e,t.dom)}))}))};const im=e=>a(e)&&e.indexOf("%")!==-1;const lm=(e,t,o,n,s)=>{const r=gf(e);const a={styles:r,attributes:mf(e),colGroups:pf(e)};e.undoManager.ignore((()=>{const r=om(o,t,s,n,nf(e),a);De(r,"data-mce-id","__mce");const c=sm(r);e.insertContent(c);e.addVisual()}));return lo(Ba(e),'table[data-mce-id="__mce"]').map((t=>{if(df(e)){Gf(t)}else if(uf(e)){Kf(t)}else if(lf(e)||im(r.width)){$f(t)}Ha(t);Be(t,"data-mce-id");cm(e,t);am(e,t);return t.dom})).getOr(null)};const dm=(e,t,o,n={})=>{const s=e=>g(e)&&e>0;if(s(t)&&s(o)){const s=n.headerRows||0;const r=n.headerColumns||0;return lm(e,o,t,r,s)}else{console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.");return null}};var um=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const fm="x-tinymce/dom-table-";const mm=fm+"rows";const gm=fm+"columns";const pm=e=>{const t=um.FakeClipboardItem(e);um.write([t])};const hm=e=>{var t;const o=(t=um.read())!==null&&t!==void 0?t:[];return ee(o,(t=>T.from(t.getType(e))))};const ym=e=>{if(hm(e).isSome()){um.clear()}};const bm=e=>{e.fold(km,(e=>pm({[mm]:e})))};const vm=()=>hm(mm);const km=()=>ym(mm);const wm=e=>{e.fold(xm,(e=>pm({[gm]:e})))};const _m=()=>hm(gm);const xm=()=>ym(gm);const zm=e=>Uc(Ia(e),La(e));const Cm=e=>qc(Ia(e),La(e));const Sm=(e,t)=>{const o=La(e);const n=()=>zm(e).each((t=>{Go(t,o).filter(_(o)).each((t=>{const o=je.fromText("");lt(t,o);yt(t);if(e.dom.isEmpty(e.getBody())){e.setContent("");e.selection.setCursorLocation()}else{const t=e.dom.createRng();t.setStart(o.dom,0);t.setEnd(o.dom,0);e.selection.setRng(t);e.nodeChanged()}}))}));const s=t=>zm(e).each((n=>{const s=uf(e)||df(e)||lf(e);if(!s){Go(n,o).each((o=>{if(t==="relative"&&!jf(o)){$f(o)}else if(t==="fixed"&&!Uf(o)){Gf(o)}else if(t==="responsive"&&!qf(o)){Kf(o)}Ha(o);qu(e,o.dom,Yu)}))}}));const r=e=>Go(e,o);const i=t=>Cm(e).bind((e=>r(e).map((o=>t(o,e)))));const l=(t,o)=>{i((t=>{e.formatter.toggle("tableclass",{value:o},t.dom);qu(e,t.dom,Xu)}))};const d=(t,o)=>{i((t=>{const n=Wc(e);const s=G(n,(t=>e.formatter.match("tablecellclass",{value:o},t.dom)));const r=s?e.formatter.remove:e.formatter.apply;L(n,(e=>r("tablecellclass",{value:o},e.dom)));qu(e,t.dom,Xu)}))};const u=()=>{zm(e).each((t=>{Go(t,o).each((o=>{io(o,"caption").fold((()=>{const t=je.fromTag("caption");ut(t,je.fromText("Caption"));ft(o,t,0);e.selection.setCursorLocation(t.dom,0)}),(n=>{if(Oe("caption")(t)){$e("td",o).each((t=>e.selection.setCursorLocation(t.dom,0)))}yt(n)}));qu(e,o.dom,Yu)}))}))};const f=t=>{e.focus()};const m=(t,o=false)=>i(((n,s)=>{const r=Ic(Wc(e),n,s);t(n,r,o).each(f)}));const g=()=>i(((t,o)=>{const n=Ic(Wc(e),t,o);const s=Aa(p,je.fromDom(e.getDoc()),T.none());return _f(t,n,s)}));const h=()=>i(((t,o)=>{const n=Ic(Wc(e),t,o);return wf(t,n)}));const y=(t,o)=>o().each((o=>{const n=B(o,(e=>wt(e)));i(((o,s)=>{const r=Ma(je.fromDom(e.getDoc()));const a=Fc(Wc(e),s,n,r);t(o,a).each(f)}))}));const b=e=>(t,o)=>ue(o,"type").each((t=>{m(e(t),o.no_events)}));ne({mceTableSplitCells:()=>m(t.unmergeCells),mceTableMergeCells:()=>m(t.mergeCells),mceTableInsertRowBefore:()=>m(t.insertRowsBefore),mceTableInsertRowAfter:()=>m(t.insertRowsAfter),mceTableInsertColBefore:()=>m(t.insertColumnsBefore),mceTableInsertColAfter:()=>m(t.insertColumnsAfter),mceTableDeleteCol:()=>m(t.deleteColumn),mceTableDeleteRow:()=>m(t.deleteRow),mceTableCutCol:()=>h().each((e=>{wm(e);m(t.deleteColumn)})),mceTableCutRow:()=>g().each((e=>{bm(e);m(t.deleteRow)})),mceTableCopyCol:()=>h().each((e=>wm(e))),mceTableCopyRow:()=>g().each((e=>bm(e))),mceTablePasteColBefore:()=>y(t.pasteColsBefore,_m),mceTablePasteColAfter:()=>y(t.pasteColsAfter,_m),mceTablePasteRowBefore:()=>y(t.pasteRowsBefore,vm),mceTablePasteRowAfter:()=>y(t.pasteRowsAfter,vm),mceTableDelete:n,mceTableCellToggleClass:d,mceTableToggleClass:l,mceTableToggleCaption:u,mceTableSizingMode:(e,t)=>s(t),mceTableCellType:b((e=>e==="th"?t.makeCellsHeader:t.unmakeCellsHeader)),mceTableColType:b((e=>e==="th"?t.makeColumnsHeader:t.unmakeColumnsHeader)),mceTableRowType:b((e=>{switch(e){case"header":return t.makeRowsHeader;case"footer":return t.makeRowsFooter;default:return t.makeRowsBody}}))},((t,o)=>e.addCommand(o,t)));e.addCommand("mceInsertTable",((t,o)=>{dm(e,o.rows,o.columns,o.options)}));e.addCommand("mceTableApplyCellStyle",((t,o)=>{const n=e=>"tablecell"+e.toLowerCase().replace("-","");if(!c(o)){return}const s=Wc(e);if(s.length===0){return}const i=ie(o,((t,o)=>e.formatter.has(n(o))&&a(t)));if(ge(i)){return}ne(i,((t,o)=>{const r=n(o);L(s,(o=>{if(t===""){e.formatter.remove(r,{value:null},o.dom,true)}else{e.formatter.apply(r,{value:t},o.dom)}}))}));r(s[0]).each((t=>qu(e,t.dom,Xu)))}))};const Tm=(e,t)=>{const o=La(e);const n=t=>qc(Ia(e)).bind((n=>Go(n,o).map((o=>{const s=Ic(Wc(e),o,n);return t(o,s)})))).getOr("");ne({mceTableRowType:()=>n(t.getTableRowType),mceTableCellType:()=>n(t.getTableCellType),mceTableColType:()=>n(t.getTableColType)},((t,o)=>e.addQueryValueHandler(o,t)))};const Om=Xl.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]);const Em=(e,t,o,n)=>e.fold(t,o,n);const Dm=e=>e.fold(v,v,v);const Am=Om.before;const Mm=Om.on;const Nm=Om.after;const Rm={before:Am,on:Mm,after:Nm,cata:Em,getStart:Dm};const Bm=(e,t)=>({selection:e,kill:t});const Lm={create:Bm};const Hm=(e,t)=>{const o=e.document.createRange();o.selectNode(t.dom);return o};const Im=(e,t)=>{const o=e.document.createRange();Pm(o,t);return o};const Pm=(e,t)=>e.selectNodeContents(t.dom);const Fm=(e,t)=>{t.fold((t=>{e.setStartBefore(t.dom)}),((t,o)=>{e.setStart(t.dom,o)}),(t=>{e.setStartAfter(t.dom)}))};const Vm=(e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))};const jm=(e,t,o)=>{const n=e.document.createRange();Fm(n,t);Vm(n,o);return n};const Um=(e,t,o,n,s)=>{const r=e.document.createRange();r.setStart(t.dom,o);r.setEnd(n.dom,s);return r};const qm=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height});const Wm=e=>{const t=e.getClientRects();const o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?T.some(o).map(qm):T.none()};const $m=Xl.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);const Gm=(e,t,o)=>t(je.fromDom(o.startContainer),o.startOffset,je.fromDom(o.endContainer),o.endOffset);const Km=(e,t)=>t.match({domRange:e=>({ltr:b(e),rtl:T.none}),relative:(t,o)=>({ltr:en((()=>jm(e,t,o))),rtl:en((()=>T.some(jm(e,o,t))))}),exact:(t,o,n,s)=>({ltr:en((()=>Um(e,t,o,n,s))),rtl:en((()=>T.some(Um(e,n,s,t,o))))})});const Xm=(e,t)=>{const o=t.ltr();if(o.collapsed){const n=t.rtl().filter((e=>e.collapsed===false));return n.map((e=>$m.rtl(je.fromDom(e.endContainer),e.endOffset,je.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>Gm(e,$m.ltr,o)))}else{return Gm(e,$m.ltr,o)}};const Ym=(e,t)=>{const o=Km(e,t);return Xm(e,o)};const Jm=(e,t)=>{const o=Ym(e,t);return o.match({ltr:(t,o,n,s)=>{const r=e.document.createRange();r.setStart(t.dom,o);r.setEnd(n.dom,s);return r},rtl:(t,o,n,s)=>{const r=e.document.createRange();r.setStart(n.dom,s);r.setEnd(t.dom,o);return r}})};$m.ltr;$m.rtl;const Qm=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n});const Zm={create:Qm};const eg=(e,t,o,n)=>({start:Rm.on(e,t),finish:Rm.on(o,n)});const tg={create:eg};const og=(e,t)=>{const o=Jm(e,t);return Zm.create(je.fromDom(o.startContainer),o.startOffset,je.fromDom(o.endContainer),o.endOffset)};const ng=tg.create;const sg=(e,t,o,n,s,r,a)=>{if(!(Ge(o,s)&&n===r)){return uo(o,"td,th",t).bind((o=>uo(s,"td,th",t).bind((n=>rg(e,t,o,n,a)))))}else{return T.none()}};const rg=(e,t,o,n,s)=>{if(!Ge(o,n)){return bc(o,n,t).bind((t=>{const n=t.boxes.getOr([]);if(n.length>1){s(e,n,t.start,t.finish);return T.some(Lm.create(T.some(ng(o,0,o,pa(o))),true))}else{return T.none()}}))}else{return T.none()}};const ag=(e,t,o,n,s)=>{const r=e=>{s.clearBeforeUpdate(o);s.selectRange(o,e.boxes,e.start,e.finish);return e.boxes};return xc(n,e,t,s.firstSelectedSelector,s.lastSelectedSelector).map(r)};const cg=(e,t)=>({item:e,mode:t});const ig=(e,t,o,n=lg)=>e.property().parent(t).map((e=>cg(e,n)));const lg=(e,t,o,n=dg)=>o.sibling(e,t).map((e=>cg(e,n)));const dg=(e,t,o,n=dg)=>{const s=e.property().children(t);const r=o.first(s);return r.map((e=>cg(e,n)))};const ug=[{current:ig,next:lg,fallback:T.none()},{current:lg,next:dg,fallback:T.some(ig)},{current:dg,next:dg,fallback:T.some(lg)}];const fg=(e,t,o,n,s=ug)=>{const r=U(s,(e=>e.current===o));return r.bind((o=>o.current(e,t,n,o.next).orThunk((()=>o.fallback.bind((o=>fg(e,t,o,n)))))))};const mg=()=>{const e=(e,t)=>e.query().prevSibling(t);const t=e=>e.length>0?T.some(e[e.length-1]):T.none();return{sibling:e,first:t}};const gg=()=>{const e=(e,t)=>e.query().nextSibling(t);const t=e=>e.length>0?T.some(e[0]):T.none();return{sibling:e,first:t}};const pg={left:mg,right:gg};const hg=(e,t,o,n,s,r)=>{const a=fg(e,t,n,s);return a.bind((t=>{if(r(t.item)){return T.none()}else{return o(t.item)?T.some(t.item):hg(e,t.item,o,t.mode,s,r)}}))};const yg=(e,t,o,n)=>hg(e,t,o,lg,pg.left(),n);const bg=(e,t,o,n)=>hg(e,t,o,lg,pg.right(),n);const vg=e=>t=>e.property().children(t).length===0;const kg=(e,t,o)=>_g(e,t,vg(e),o);const wg=(e,t,o)=>xg(e,t,vg(e),o);const _g=yg;const xg=bg;const zg=rc();const Cg=(e,t)=>kg(zg,e,t);const Sg=(e,t)=>wg(zg,e,t);const Tg=(e,t,o)=>_g(zg,e,t,o);const Og=(e,t,o)=>xg(zg,e,t,o);const Eg=(e,t,o)=>no(e,t,o).isSome();const Dg=Xl.generate([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]);const Ag=(e,t,o)=>{const n=e.getRect(t);const s=e.getRect(o);return s.right>n.left&&s.left<n.right};const Mg=e=>uo(e,"tr");const Ng=(e,t,o,n,s,r,a)=>uo(n,"td,th",a).bind((o=>uo(t,"td,th",a).map((t=>{if(!Ge(o,t)){return pc(Mg,[o,t]).fold((()=>Ag(e,t,o)?Dg.success():r(t)),(e=>r(t)))}else{return Ge(n,o)&&pa(o)===s?r(t):Dg.none("in same cell")}})))).getOr(Dg.none("default"));const Rg=(e,t,o,n,s)=>e.fold(t,o,n,s);const Bg={...Dg,verify:Ng,cata:Rg};const Lg=(e,t,o,n)=>({parent:e,children:t,element:o,index:n});const Hg=e=>et(e).bind((t=>{const o=rt(t);return Ig(o,e).map((n=>Lg(t,o,e,n)))}));const Ig=(e,t)=>q(e,w(Ge,t));const Pg=Oe("br");const Fg=(e,t,o)=>t(e,o).bind((e=>Ce(e)&&fa(e).trim().length===0?Fg(e,t,o):T.some(e)));const Vg=(e,t,o)=>o.traverse(t).orThunk((()=>Fg(t,o.gather,e))).map(o.relative);const jg=(e,t)=>at(e,t).filter(Pg).orThunk((()=>at(e,t-1).filter(Pg)));const Ug=(e,t,o,n)=>jg(t,o).bind((t=>n.traverse(t).fold((()=>Fg(t,n.gather,e).map(n.relative)),(e=>Hg(e).map((e=>Rm.on(e.parent,e.index)))))));const qg=(e,t,o,n)=>{const s=Pg(t)?Vg(e,t,n):Ug(e,t,o,n);return s.map((e=>({start:e,finish:e})))};const Wg=e=>Bg.cata(e,(e=>T.none()),(()=>T.none()),(e=>T.some(Jc(e,0))),(e=>T.some(Jc(e,pa(e)))));const $g=(e,t)=>({left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t});const Gg=(e,t)=>({left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t});const Kg=(e,t,o)=>({left:e.left+t,top:e.top+o,right:e.right+t,bottom:e.bottom+o});const Xg=e=>e.top;const Yg=e=>e.bottom;const Jg=(e,t,o)=>{if(o>=0&&o<pa(t)){return e.getRangedRect(t,o,t,o+1)}else if(o>0){return e.getRangedRect(t,o-1,t,o)}return T.none()};const Qg=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom});const Zg=(e,t)=>T.some(e.getRect(t));const ep=(e,t,o)=>{if(ze(t)){return Zg(e,t).map(Qg)}else if(Ce(t)){return Jg(e,t,o).map(Qg)}else{return T.none()}};const tp=(e,t)=>{if(ze(t)){return Zg(e,t).map(Qg)}else if(Ce(t)){return e.getRangedRect(t,0,t,pa(t)).map(Qg)}else{return T.none()}};const op=5;const np=100;const sp=Xl.generate([{none:[]},{retry:["caret"]}]);const rp=(e,t)=>e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right;const ap=(e,t,o)=>so(t,Td).fold(C,(t=>tp(e,t).exists((e=>rp(o,e)))));const cp=(e,t,o,n,s)=>{const r=$g(s,op);if(Math.abs(o.bottom-n.bottom)<1){return sp.retry(r)}else if(o.top>s.bottom){return sp.retry(r)}else if(o.top===s.bottom){return sp.retry($g(s,1))}else{return ap(e,t,s)?sp.retry(Kg(r,op,0)):sp.none()}};const ip=(e,t,o,n,s)=>{const r=Gg(s,op);if(Math.abs(o.top-n.top)<1){return sp.retry(r)}else if(o.bottom<s.top){return sp.retry(r)}else if(o.bottom===s.top){return sp.retry(Gg(s,1))}else{return ap(e,t,s)?sp.retry(Kg(r,op,0)):sp.none()}};const lp={point:Xg,adjuster:ip,move:Gg,gather:Cg};const dp={point:Yg,adjuster:cp,move:$g,gather:Sg};const up=(e,t,o)=>e.elementFromPoint(t,o).filter((e=>ke(e)==="table")).isSome();const fp=(e,t,o,n,s)=>mp(e,t,o,t.move(n,op),s);const mp=(e,t,o,n,s)=>{if(s===0){return T.some(n)}if(up(e,n.left,t.point(n))){return fp(e,t,o,n,s-1)}return e.situsFromPoint(n.left,t.point(n)).bind((r=>r.start.fold(T.none,(r=>tp(e,r).bind((a=>t.adjuster(e,r,a,o,n).fold(T.none,(n=>mp(e,t,o,n,s-1))))).orThunk((()=>T.some(n)))),T.none)))};const gp=(e,t,o)=>{if(e.point(t)>o.getInnerHeight()){return T.some(e.point(t)-o.getInnerHeight())}else if(e.point(t)<0){return T.some(-e.point(t))}else{return T.none()}};const pp=(e,t,o)=>{const n=e.move(o,op);const s=mp(t,e,o,n,np).getOr(n);return gp(e,s,t).fold((()=>t.situsFromPoint(s.left,e.point(s))),(o=>{t.scrollBy(0,o);return t.situsFromPoint(s.left,e.point(s)-o)}))};const hp={tryUp:w(pp,lp),tryDown:w(pp,dp),getJumpSize:b(op)};const yp=20;const bp=(e,t,o)=>e.getSelection().bind((n=>qg(t,n.finish,n.foffset,o).fold((()=>T.some(Jc(n.finish,n.foffset))),(s=>{const r=e.fromSitus(s);const a=Bg.verify(e,n.finish,n.foffset,r.finish,r.foffset,o.failure,t);return Wg(a)}))));const vp=(e,t,o,n,s,r)=>{if(r===0){return T.none()}return _p(e,t,o,n,s).bind((a=>{const c=e.fromSitus(a);const i=Bg.verify(e,o,n,c.finish,c.foffset,s.failure,t);return Bg.cata(i,(()=>T.none()),(()=>T.some(a)),(a=>{if(Ge(o,a)&&n===0){return kp(e,o,n,Gg,s)}else{return vp(e,t,a,0,s,r-1)}}),(a=>{if(Ge(o,a)&&n===pa(a)){return kp(e,o,n,$g,s)}else{return vp(e,t,a,pa(a),s,r-1)}}))}))};const kp=(e,t,o,n,s)=>ep(e,t,o).bind((t=>wp(e,s,n(t,hp.getJumpSize()))));const wp=(e,t,o)=>{const n=jn().browser;if(n.isChromium()||n.isSafari()||n.isFirefox()){return t.retry(e,o)}else{return T.none()}};const _p=(e,t,o,n,s)=>ep(e,o,n).bind((t=>wp(e,s,t)));const xp=(e,t,o)=>bp(e,t,o).bind((n=>vp(e,t,n.element,n.offset,o,yp).map(e.fromSitus)));const zp=(e,t)=>Eg(e,(e=>et(e).exists((e=>Ge(e,t)))));const Cp=(e,t,o,n,s)=>uo(n,"td,th",t).bind((n=>uo(n,"table",t).bind((r=>{if(!zp(s,r)){return T.none()}return xp(e,t,o).bind((e=>uo(e.finish,"td,th",t).map((t=>({start:n,finish:t,range:e})))))}))));const Sp=(e,t,o,n,s,r)=>r(n,t).orThunk((()=>Cp(e,t,o,n,s).map((e=>{const t=e.range;return Lm.create(T.some(ng(t.start,t.soffset,t.finish,t.foffset)),true)}))));const Tp=(e,t)=>uo(e,"tr",t).bind((e=>uo(e,"table",t).bind((o=>{const n=to(o,"tr");if(Ge(e,n[0])){return Tg(o,(e=>ka(e).isSome()),t).map((e=>{const t=pa(e);return Lm.create(T.some(ng(e,t,e,t)),true)}))}else{return T.none()}}))));const Op=(e,t)=>uo(e,"tr",t).bind((e=>uo(e,"table",t).bind((o=>{const n=to(o,"tr");if(Ge(e,n[n.length-1])){return Og(o,(e=>va(e).isSome()),t).map((e=>Lm.create(T.some(ng(e,0,e,0)),true)))}else{return T.none()}}))));const Ep=(e,t,o,n,s,r,a)=>Cp(e,o,n,s,r).bind((e=>rg(t,o,e.start,e.finish,a)));const Dp=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};const Ap=e=>{const t=Dp(T.none());const o=()=>t.get().each(e);const n=()=>{o();t.set(T.none())};const s=()=>t.get().isSome();const r=()=>t.get();const a=e=>{o();t.set(T.some(e))};return{clear:n,isSet:s,get:r,set:a}};const Mp=()=>{const e=Ap(p);const t=t=>e.get().each(t);return{...e,on:t}};const Np=(e,t)=>uo(e,"td,th",t);const Rp=(e,t,o,n)=>{const s=Mp();const r=s.clear;const a=r=>{s.on((s=>{n.clearBeforeUpdate(t);Np(r.target,o).each((a=>{bc(s,a,o).each((o=>{const s=o.boxes.getOr([]);if(s.length===1){const o=s[0];const a=Di(o)==="false";const c=fo(Oi(r.target),o,Ge);if(a&&c){n.selectRange(t,s,o,o);e.selectContents(o)}}else if(s.length>1){n.selectRange(t,s,o.start,o.finish);e.selectContents(a)}}))}))}))};const c=e=>{n.clear(t);Np(e.target,o).each(s.set)};const i=e=>{a(e)};const l=e=>{a(e);r()};return{clearstate:r,mousedown:c,mouseover:i,mouseup:l}};const Bp={traverse:st,gather:Sg,relative:Rm.before,retry:hp.tryDown,failure:Bg.failedDown};const Lp={traverse:nt,gather:Cg,relative:Rm.before,retry:hp.tryUp,failure:Bg.failedUp};const Hp=e=>t=>t===e;const Ip=Hp(38);const Pp=Hp(40);const Fp=e=>e>=37&&e<=40;const Vp={isBackward:Hp(37),isForward:Hp(39)};const jp={isBackward:Hp(39),isForward:Hp(37)};const Up=e=>{const t=e!==undefined?e.dom:document;const o=t.body.scrollLeft||t.documentElement.scrollLeft;const n=t.body.scrollTop||t.documentElement.scrollTop;return Is(o,n)};const qp=(e,t,o)=>{const n=o!==undefined?o.dom:document;const s=n.defaultView;if(s){s.scrollBy(e,t)}};const Wp=Xl.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]);const $p=e=>Wp.exact(e.start,e.soffset,e.finish,e.foffset);const Gp=e=>e.match({domRange:e=>je.fromDom(e.startContainer),relative:(e,t)=>Rm.getStart(e),exact:(e,t,o,n)=>e});const Kp=Wp.domRange;const Xp=Wp.relative;const Yp=Wp.exact;const Jp=e=>{const t=Gp(e);return Ze(t)};const Qp=Zm.create;const Zp={domRange:Kp,relative:Xp,exact:Yp,exactFromRange:$p,getWin:Jp,range:Qp};const eh=(e,t,o)=>{var n,s;return T.from((s=(n=e.dom).caretPositionFromPoint)===null||s===void 0?void 0:s.call(n,t,o)).bind((t=>{if(t.offsetNode===null){return T.none()}const o=e.dom.createRange();o.setStart(t.offsetNode,t.offset);o.collapse();return T.some(o)}))};const th=(e,t,o)=>{var n,s;return T.from((s=(n=e.dom).caretRangeFromPoint)===null||s===void 0?void 0:s.call(n,t,o))};const oh=(()=>{if(document.caretPositionFromPoint){return eh}else if(document.caretRangeFromPoint){return th}else{return T.none}})();const nh=(e,t,o)=>{const n=je.fromDom(e.document);return oh(n,t,o).map((e=>Zm.create(je.fromDom(e.startContainer),e.startOffset,je.fromDom(e.endContainer),e.endOffset)))};const sh=(e,t)=>{const o=ke(e);if("input"===o){return Rm.after(e)}else if(!M(["br","img"],o)){return Rm.on(e,t)}else{return t===0?Rm.before(e):Rm.after(e)}};const rh=(e,t)=>{const o=e.fold(Rm.before,sh,Rm.after);const n=t.fold(Rm.before,sh,Rm.after);return Zp.relative(o,n)};const ah=(e,t,o,n)=>{const s=sh(e,t);const r=sh(o,n);return Zp.relative(s,r)};const ch=(e,t,o,n)=>{const s=Ye(e);const r=s.dom.createRange();r.setStart(e.dom,t);r.setEnd(o.dom,n);return r};const ih=(e,t,o,n)=>{const s=ch(e,t,o,n);const r=Ge(e,o)&&t===n;return s.collapsed&&!r};const lh=e=>T.from(e.getSelection());const dh=(e,t)=>{lh(e).each((e=>{e.removeAllRanges();e.addRange(t)}))};const uh=(e,t,o,n,s)=>{const r=Um(e,t,o,n,s);dh(e,r)};const fh=(e,t,o,n,s,r)=>{t.collapse(o.dom,n);t.extend(s.dom,r)};const mh=(e,t)=>Ym(e,t).match({ltr:(t,o,n,s)=>{uh(e,t,o,n,s)},rtl:(t,o,n,s)=>{lh(e).each((r=>{if(r.setBaseAndExtent){r.setBaseAndExtent(t.dom,o,n.dom,s)}else if(r.extend){try{fh(e,r,t,o,n,s)}catch(r){uh(e,n,s,t,o)}}else{uh(e,n,s,t,o)}}))}});const gh=(e,t,o,n,s)=>{const r=ah(t,o,n,s);mh(e,r)};const ph=(e,t,o)=>{const n=rh(t,o);mh(e,n)};const hh=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0);const o=e.getRangeAt(e.rangeCount-1);return T.some(Zm.create(je.fromDom(t.startContainer),t.startOffset,je.fromDom(o.endContainer),o.endOffset))}else{return T.none()}};const yh=e=>{if(e.anchorNode===null||e.focusNode===null){return hh(e)}else{const t=je.fromDom(e.anchorNode);const o=je.fromDom(e.focusNode);return ih(t,e.anchorOffset,o,e.focusOffset)?T.some(Zm.create(t,e.anchorOffset,o,e.focusOffset)):hh(e)}};const bh=(e,t,o=true)=>{const n=o?Im:Hm;const s=n(e,t);dh(e,s)};const vh=e=>lh(e).filter((e=>e.rangeCount>0)).bind(yh);const kh=e=>vh(e).map((e=>Zp.exact(e.start,e.soffset,e.finish,e.foffset)));const wh=(e,t)=>{const o=Jm(e,t);return Wm(o)};const _h=(e,t,o)=>nh(e,t,o);const xh=e=>{lh(e).each((e=>e.removeAllRanges()))};const zh=e=>{const t=(t,o)=>je.fromPoint(je.fromDom(e.document),t,o);const o=e=>e.dom.getBoundingClientRect();const n=(t,o,n,s)=>{const r=Zp.exact(t,o,n,s);return wh(e,r)};const s=()=>kh(e).map((t=>og(e,t)));const r=t=>{const o=Zp.relative(t.start,t.finish);return og(e,o)};const a=(t,o)=>_h(e,t,o).map((e=>tg.create(e.start,e.soffset,e.finish,e.foffset)));const c=()=>{xh(e)};const i=(t=false)=>{kh(e).each((o=>o.fold((e=>e.collapse(t)),((o,n)=>{const s=t?o:n;ph(e,s,s)}),((o,n,s,r)=>{const a=t?o:s;const c=t?n:r;gh(e,a,c,a,c)}))))};const l=t=>{bh(e,t,false)};const d=t=>{bh(e,t)};const u=t=>{gh(e,t.start,t.soffset,t.finish,t.foffset)};const f=(t,o)=>{ph(e,t,o)};const m=()=>e.innerHeight;const g=()=>{const t=Up(je.fromDom(e.document));return t.top};const p=(t,o)=>{qp(t,o,je.fromDom(e.document))};return{elementFromPoint:t,getRect:o,getRangedRect:n,getSelection:s,fromSitus:r,situsFromPoint:a,clearSelection:c,collapseSelection:i,setSelection:u,setRelativeSelection:f,selectNode:l,selectContents:d,getInnerHeight:m,getScrollY:g,scrollBy:p}};const Ch=(e,t)=>({rows:e,cols:t});const Sh=(e,t,o,n)=>{const s=zh(e);const r=Rp(s,t,o,n);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}};const Th=(e,t,o,n)=>{const s=zh(e);const r=()=>{n.clear(t);return T.none()};const a=(e,a,c,i,l,d)=>{const u=e.raw;const f=u.which;const m=u.shiftKey===true;const g=vc(t,n.selectedSelector).fold((()=>{if(Fp(f)&&!m){n.clearBeforeUpdate(t)}if(Pp(f)&&m){return w(Ep,s,t,o,Bp,i,a,n.selectRange)}else if(Ip(f)&&m){return w(Ep,s,t,o,Lp,i,a,n.selectRange)}else if(Pp(f)){return w(Sp,s,o,Bp,i,a,Op)}else if(Ip(f)){return w(Sp,s,o,Lp,i,a,Tp)}else{return T.none}}),(e=>{const o=o=>()=>{const r=ee(o,(o=>ag(o.rows,o.cols,t,e,n)));return r.fold((()=>wc(t,n.firstSelectedSelector,n.lastSelectedSelector).map((e=>{const o=Pp(f)||d.isForward(f)?Rm.after:Rm.before;s.setRelativeSelection(Rm.on(e.first,0),o(e.table));n.clear(t);return Lm.create(T.none(),true)}))),(e=>T.some(Lm.create(T.none(),true))))};if(Pp(f)&&m){return o([Ch(+1,0)])}else if(Ip(f)&&m){return o([Ch(-1,0)])}else if(d.isBackward(f)&&m){return o([Ch(0,-1),Ch(-1,0)])}else if(d.isForward(f)&&m){return o([Ch(0,+1),Ch(+1,0)])}else if(Fp(f)&&!m){return r}else{return T.none}}));return g()};const c=(e,s,r,a,c)=>vc(t,n.selectedSelector).fold((()=>{const i=e.raw;const l=i.which;const d=i.shiftKey===true;if(!d){return T.none()}if(Fp(l)){return sg(t,o,s,r,a,c,n.selectRange)}else{return T.none()}}),T.none);return{keydown:a,keyup:c}};const Oh=(e,t,o,n)=>{const s=zh(e);return(e,r)=>{n.clearBeforeUpdate(t);bc(e,r,o).each((e=>{const o=e.boxes.getOr([]);n.selectRange(t,o,e.start,e.finish);s.selectContents(r);s.collapseSelection()}))}};const Eh=(e,t)=>{const o=Ne(e,t);return o===undefined||o===""?[]:o.split(" ")};const Dh=(e,t,o)=>{const n=Eh(e,t);const s=n.concat([o]);De(e,t,s.join(" "));return true};const Ah=(e,t,o)=>{const n=P(Eh(e,t),(e=>e!==o));if(n.length>0){De(e,t,n.join(" "))}else{Be(e,t)}return false};const Mh=e=>e.dom.classList!==undefined;const Nh=e=>Eh(e,"class");const Rh=(e,t)=>Dh(e,"class",t);const Bh=(e,t)=>Ah(e,"class",t);const Lh=(e,t)=>{if(Mh(e)){e.dom.classList.add(t)}else{Rh(e,t)}};const Hh=e=>{const t=Mh(e)?e.dom.classList:Nh(e);if(t.length===0){Be(e,"class")}};const Ih=(e,t)=>{if(Mh(e)){const o=e.dom.classList;o.remove(t)}else{Bh(e,t)}Hh(e)};const Ph=(e,t)=>Mh(e)&&e.dom.classList.contains(t);const Fh=(e,t)=>{L(t,(t=>{Ih(e,t)}))};const Vh=e=>t=>{Lh(t,e)};const jh=e=>t=>{Fh(t,e)};const Uh=e=>{const t=Vh(e.selected);const o=jh([e.selected,e.lastSelected,e.firstSelected]);const n=t=>{const n=to(t,e.selectedSelector);L(n,o)};const s=(o,s,r,a)=>{n(o);L(s,t);Lh(r,e.firstSelected);Lh(a,e.lastSelected)};return{clearBeforeUpdate:n,clear:n,selectRange:s,selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}};const qh=(e,t,o)=>{const n=t=>{Be(t,e.selected);Be(t,e.firstSelected);Be(t,e.lastSelected)};const s=t=>{De(t,e.selected,"1")};const r=e=>{a(e);o()};const a=t=>{const o=to(t,`${e.selectedSelector},${e.firstSelectedSelector},${e.lastSelectedSelector}`);L(o,n)};const c=(o,n,a,c)=>{r(o);L(n,s);De(a,e.firstSelected,"1");De(c,e.lastSelected,"1");t(n,a,c)};return{clearBeforeUpdate:a,clear:r,selectRange:c,selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}};const Wh={byClass:Uh,byAttr:qh};const $h=(e,t,o,n)=>{switch(e.tag){case"none":return t();case"single":return n(e.element);case"multiple":return o(e.elements)}};const Gh=()=>({tag:"none"});const Kh=e=>({tag:"multiple",elements:e});const Xh=e=>({tag:"single",element:e});const Yh=(e,t,o)=>{const n=()=>zc(e(),o).fold((()=>t().fold(Gh,Xh)),Kh);return{get:n}};const Jh=(e,t)=>{const o=e.slice(0,t[t.length-1].row+1);const n=Ui(o);return $(n,(e=>{const o=e.cells.slice(0,t[t.length-1].column+1);return B(o,(e=>e.element))}))};const Qh=(e,t)=>{const o=e.slice(t[0].row+t[0].rowspan-1,e.length);const n=Ui(o);return $(n,(e=>{const o=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return B(o,(e=>e.element))}))};const Zh=(e,t,o)=>{const n=Ss.fromTable(e);const s=Ji(n,t);return s.map((e=>{const t=Vi(n,o,false);const{rows:s}=ds(t);const r=Jh(s,e);const a=Qh(s,e);return{upOrLeftCells:r,downOrRightCells:a}}))};const ey=(e,t,o,n,s,r,a)=>({target:e,x:t,y:o,stop:n,prevent:s,kill:r,raw:a});const ty=e=>{const t=je.fromDom(Wt(e).getOr(e.target));const o=()=>e.stopPropagation();const n=()=>e.preventDefault();const s=h(n,o);return ey(t,e.clientX,e.clientY,o,n,s,e)};const oy=(e,t)=>o=>{if(e(o)){t(ty(o))}};const ny=(e,t,o,n,s)=>{const r=oy(o,n);e.dom.addEventListener(t,r,s);return{unbind:w(ry,e,t,r,s)}};const sy=(e,t,o,n)=>ny(e,t,o,n,false);const ry=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)};const ay=S;const cy=(e,t,o)=>sy(e,t,ay,o);const iy=ty;const ly=e=>Ph(je.fromDom(e.target),"ephox-snooker-resizer-bar")===false;const dy=(e,t)=>{const o=Yh((()=>je.fromDom(e.getBody())),(()=>qc(Ia(e),La(e))),Hc.selectedSelector);const n=(t,o,n)=>{const s=Go(o);s.each((s=>{const r=tf(e);const a=Aa(p,je.fromDom(e.getDoc()),r);const c=Wc(e);const i=Zh(s,{selection:c},a);Wu(e,t,o,n,i)}))};const s=()=>$u(e);const r=Wh.byAttr(Hc,n,s);e.on("init",(o=>{const n=e.getWin();const s=Ba(e);const a=La(e);const c=()=>{const t=e.selection;const o=je.fromDom(t.getStart());const n=je.fromDom(t.getEnd());const a=pc(Go,[o,n]);a.fold((()=>r.clear(s)),p)};const i=Sh(n,s,a,r);const l=Th(n,s,a,r);const d=Oh(n,s,a,r);const u=e=>e.raw.shiftKey===true;e.on("TableSelectorChange",(e=>d(e.start,e.finish)));const f=(t,o)=>{if(!u(t)){return}if(o.kill){t.kill()}o.selection.each((t=>{const o=Zp.relative(t.start,t.finish);const s=Jm(n,o);e.selection.setRng(s)}))};const m=t=>{const o=iy(t);if(o.raw.shiftKey&&Fp(o.raw.which)){const t=e.selection.getRng();const n=je.fromDom(t.startContainer);const s=je.fromDom(t.endContainer);l.keyup(o,n,t.startOffset,s,t.endOffset).each((e=>{f(o,e)}))}};const g=o=>{const n=iy(o);t.hide();const s=e.selection.getRng();const r=je.fromDom(s.startContainer);const a=je.fromDom(s.endContainer);const c=As(Vp,jp)(je.fromDom(e.selection.getStart()));l.keydown(n,r,s.startOffset,a,s.endOffset,c).each((e=>{f(n,e)}));t.show()};const h=e=>e.button===0;const y=e=>{if(e.buttons===undefined){return true}return(e.buttons&1)!==0};const b=e=>{i.clearstate()};const v=e=>{if(h(e)&&ly(e)){i.mousedown(iy(e))}};const k=e=>{if(y(e)&&ly(e)){i.mouseover(iy(e))}};const w=e=>{if(h(e)&&ly(e)){i.mouseup(iy(e))}};const _=()=>{const e=Dp(je.fromDom(s));const t=Dp(0);const o=o=>{const n=je.fromDom(o.target);if(Oe("td")(n)||Oe("th")(n)){const s=e.get();const r=t.get();if(Ge(s,n)&&o.timeStamp-r<300){o.preventDefault();d(n,n)}}e.set(n);t.set(o.timeStamp)};return{touchEnd:o}};const x=_();e.on("dragstart",b);e.on("mousedown",v);e.on("mouseover",k);e.on("mouseup",w);e.on("touchend",x.touchEnd);e.on("keyup",m);e.on("keydown",g);e.on("NodeChange",c)}));e.on("PreInit",(()=>{e.serializer.addTempAttr(Hc.firstSelected);e.serializer.addTempAttr(Hc.lastSelected)}));const a=e=>r.clear(je.fromDom(e));const c=()=>$h(o.get(),b([]),(e=>B(e,(e=>e.dom))),(e=>[e.dom]));return{getSelectedCells:c,clearSelectedCells:a}};const uy=e=>{let t=[];const o=e=>{if(e===undefined){throw new Error("Event bind error: undefined handler")}t.push(e)};const n=e=>{t=P(t,(t=>t!==e))};const s=(...o)=>{const n={};L(e,((e,t)=>{n[e]=o[t]}));L(t,(e=>{e(n)}))};return{bind:o,unbind:n,trigger:s}};const fy=e=>{const t=se(e,(e=>({bind:e.bind,unbind:e.unbind})));const o=se(e,(e=>e.trigger));return{registry:t,trigger:o}};const my=(e,t)=>{let o=null;const n=()=>{if(!l(o)){clearTimeout(o);o=null}};const s=(...s)=>{n();o=setTimeout((()=>{o=null;e.apply(null,s)}),t)};return{cancel:n,throttle:s}};const gy=e=>e.slice(0).sort();const py=(e,t)=>{throw new Error("All required keys ("+gy(e).join(", ")+") were not specified. Specified keys were: "+gy(t).join(", ")+".")};const hy=e=>{throw new Error("Unsupported keys for object: "+gy(e).join(", "))};const yy=(e,t)=>{if(!i(t)){throw new Error("The "+e+" fields must be an array. Was: "+t+".")}L(t,(t=>{if(!a(t)){throw new Error("The value "+t+" in the "+e+" fields was not a string.")}}))};const by=(e,t)=>{throw new Error("All values need to be of type: "+t+". Keys ("+gy(e).join(", ")+") were not.")};const vy=e=>{const t=gy(e);const o=U(t,((e,o)=>o<t.length-1&&e===t[o+1]));o.each((e=>{throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}))};const ky=(e,t)=>wy(e,t,{validate:m,label:"function"});const wy=(e,t,o)=>{if(t.length===0){throw new Error("You must specify at least one required field.")}yy("required",t);vy(t);return n=>{const s=te(n);const r=G(t,(e=>M(s,e)));if(!r){py(t,s)}e(t,s);const a=P(t,(e=>!o.validate(n[e],e)));if(a.length>0){by(a,o.label)}return n}};const _y=(e,t)=>{const o=P(t,(t=>!M(e,t)));if(o.length>0){hy(o)}};const xy=e=>ky(_y,e);const zy=xy(["compare","extract","mutate","sink"]);const Cy=xy(["element","start","stop","destroy"]);const Sy=xy(["forceDrop","drop","move","delayDrop"]);const Ty=()=>{let e=T.none();const t=()=>{e=T.none()};const o=(t,o)=>{const n=e.map((e=>t.compare(e,o)));e=T.some(o);return n};const n=(e,t)=>{const n=t.extract(e);n.each((e=>{const n=o(t,e);n.each((e=>{s.trigger.move(e)}))}))};const s=fy({move:uy(["info"])});return{onEvent:n,reset:t,events:s.registry}};const Oy=()=>{const e=fy({move:uy(["info"])});return{onEvent:p,reset:p,events:e.registry}};const Ey=()=>{const e=Oy();const t=Ty();let o=e;const n=()=>{o.reset();o=t};const s=()=>{o.reset();o=e};const r=(e,t)=>{o.onEvent(e,t)};const a=()=>o===t;return{on:n,off:s,isOn:a,onEvent:r,events:t.events}};const Dy=(e,t,o)=>{let n=false;const s=fy({start:uy([]),stop:uy([])});const r=Ey();const a=()=>{m.stop();if(r.isOn()){r.off();s.trigger.stop()}};const c=my(a,200);const i=e=>{m.start(e);r.on();s.trigger.start()};const l=e=>{c.cancel();r.onEvent(e,t)};r.events.move.bind((o=>{t.mutate(e,o.info)}));const d=()=>{n=true};const u=()=>{n=false};const f=e=>(...t)=>{if(n){e.apply(null,t)}};const m=t.sink(Sy({forceDrop:a,drop:f(a),move:f(l),delayDrop:f(c.throttle)}),o);const g=()=>{m.destroy()};return{element:m.element,go:i,on:d,off:u,destroy:g,events:s.registry}};const Ay=e=>{const t=e.replace(/\./g,"-");const o=e=>t+"-"+e;return{resolve:o}};const My=Ay("ephox-dragster");const Ny=My.resolve;const Ry=e=>{const t={layerClass:Ny("blocker"),...e};const o=je.fromTag("div");De(o,"role","presentation");Oo(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"});Lh(o,Ny("blocker"));Lh(o,t.layerClass);const n=b(o);const s=()=>{yt(o)};return{element:n,destroy:s}};const By=(e,t)=>Is(t.left-e.left,t.top-e.top);const Ly=e=>T.some(Is(e.x,e.y));const Hy=(e,t)=>{e.mutate(t.left,t.top)};const Iy=(e,t)=>{const o=Ry(t);const n=cy(o.element(),"mousedown",e.forceDrop);const s=cy(o.element(),"mouseup",e.drop);const r=cy(o.element(),"mousemove",e.move);const a=cy(o.element(),"mouseout",e.delayDrop);const c=()=>{o.destroy();s.unbind();r.unbind();a.unbind();n.unbind()};const i=e=>{ut(e,o.element())};const l=()=>{yt(o.element())};return Cy({element:o.element,start:i,stop:l,destroy:c})};var Py=zy({compare:By,extract:Ly,sink:Iy,mutate:Hy});const Fy=(e,t={})=>{var o;const n=(o=t.mode)!==null&&o!==void 0?o:Py;return Dy(e,n,t)};const Vy=Ay("ephox-snooker");const jy=Vy.resolve;const Uy=()=>{const e=fy({drag:uy(["xDelta","yDelta"])});const t=(t,o)=>{e.trigger.drag(t,o)};return{mutate:t,events:e.registry}};const qy=()=>{const e=fy({drag:uy(["xDelta","yDelta","target"])});let t=T.none();const o=Uy();o.events.drag.bind((o=>{t.each((t=>{e.trigger.drag(o.xDelta,o.yDelta,t)}))}));const n=e=>{t=T.some(e)};const s=()=>t;return{assign:n,get:s,mutate:o.mutate,events:e.registry}};const Wy=(e,t,o,n,s)=>{const r=je.fromTag("div");Oo(r,{position:"absolute",left:t-n/2+"px",top:o+"px",height:s+"px",width:n+"px"});Ae(r,{"data-column":e,role:"presentation"});return r};const $y=(e,t,o,n,s)=>{const r=je.fromTag("div");Oo(r,{position:"absolute",left:t+"px",top:o-s/2+"px",height:s+"px",width:n+"px"});Ae(r,{"data-row":e,role:"presentation"});return r};const Gy=jy("resizer-bar");const Ky=jy("resizer-rows");const Xy=jy("resizer-cols");const Yy=7;const Jy=(e,t)=>$(e.all,((e,o)=>t(e.element)?[o]:[]));const Qy=(e,t)=>{const o=[];R(e.grid.columns,(n=>{const s=Ss.getColumnAt(e,n).map((e=>e.element));if(s.forall(t)){o.push(n)}}));return P(o,(o=>{const n=Ss.filterItems(e,(e=>e.column===o));return G(n,(e=>t(e.element)))}))};const Zy=e=>{const t=to(e.parent(),"."+Gy);L(t,yt)};const eb=(e,t,o)=>{const n=e.origin();L(t,(t=>{t.each((t=>{const s=o(n,t);Lh(s,Gy);ut(e.parent(),s)}))}))};const tb=(e,t,o,n)=>{eb(e,t,((e,t)=>{const s=Wy(t.col,t.x-e.left,o.top-e.top,Yy,n);Lh(s,Xy);return s}))};const ob=(e,t,o,n)=>{eb(e,t,((e,t)=>{const s=$y(t.row,o.left-e.left,t.y-e.top,n,Yy);Lh(s,Ky);return s}))};const nb=(e,t,o,n,s)=>{const r=Vs(o);const a=t.isResizable;const c=n.length>0?er.positions(n,o):[];const i=c.length>0?Jy(e,a):[];const l=P(c,((e,t)=>N(i,(e=>t===e))));ob(t,l,r,Zn(o));const d=s.length>0?sr.positions(s,o):[];const u=d.length>0?Qy(e,a):[];const f=P(d,((e,t)=>N(u,(e=>t===e))));tb(t,f,r,Bs(o))};const sb=(e,t)=>{Zy(e);if(e.isResizable(t)){const o=Ss.fromTable(t);const n=Es(o);const s=Ts(o);nb(o,e,t,n,s)}};const rb=(e,t)=>{const o=to(e.parent(),"."+Gy);L(o,t)};const ab=e=>{rb(e,(e=>{To(e,"display","none")}))};const cb=e=>{rb(e,(e=>{To(e,"display","block")}))};const ib=e=>Ph(e,Ky);const lb=e=>Ph(e,Xy);const db=jy("resizer-bar-dragging");const ub=e=>{const t=qy();const o=Fy(t,{});let n=T.none();const s=(e,t)=>T.from(Ne(e,t));t.events.drag.bind((e=>{s(e.target,"data-row").each((t=>{const o=Io(e.target,"top");To(e.target,"top",o+e.yDelta+"px")}));s(e.target,"data-column").each((t=>{const o=Io(e.target,"left");To(e.target,"left",o+e.xDelta+"px")}))}));const r=(e,t)=>{const o=Io(e,t);const n=Ro(e,"data-initial-"+t,0);return o-n};o.events.stop.bind((()=>{t.get().each((t=>{n.each((o=>{s(t,"data-row").each((e=>{const n=r(t,"top");Be(t,"data-initial-top");m.trigger.adjustHeight(o,n,parseInt(e,10))}));s(t,"data-column").each((e=>{const n=r(t,"left");Be(t,"data-initial-left");m.trigger.adjustWidth(o,n,parseInt(e,10))}));sb(e,o)}))}))}));const a=(n,s)=>{m.trigger.startAdjust();t.assign(n);De(n,"data-initial-"+s,Io(n,s));Lh(n,db);To(n,"opacity","0.2");o.go(e.parent())};const c=cy(e.parent(),"mousedown",(e=>{if(ib(e.target)){a(e.target,"top")}if(lb(e.target)){a(e.target,"left")}}));const i=t=>Ge(t,e.view());const l=e=>uo(e,"table",i).filter(Ei);const d=cy(e.view(),"mouseover",(t=>{l(t.target).fold((()=>{if(Gt(t.target)){Zy(e)}}),(t=>{n=T.some(t);sb(e,t)}))}));const u=()=>{c.unbind();d.unbind();o.destroy();Zy(e)};const f=t=>{sb(e,t)};const m=fy({adjustHeight:uy(["table","delta","row"]),adjustWidth:uy(["table","delta","column"]),startAdjust:uy([])});return{destroy:u,refresh:f,on:o.on,off:o.off,hideBars:w(ab,e),showBars:w(cb,e),events:m.registry}};const fb=(e,t,o)=>{const n=er;const s=sr;const r=ub(e);const a=fy({beforeResize:uy(["table","type"]),afterResize:uy(["table","type"]),startDrag:uy([])});r.events.adjustHeight.bind((e=>{const t=e.table;a.trigger.beforeResize(t,"row");const o=n.delta(e.delta,t);ld(t,o,e.row,n);a.trigger.afterResize(t,"row")}));r.events.startAdjust.bind((e=>{a.trigger.startDrag()}));r.events.adjustWidth.bind((e=>{const n=e.table;a.trigger.beforeResize(n,"col");const r=s.delta(e.delta,n);const c=o(n);id(n,r,e.column,t,c);a.trigger.afterResize(n,"col")}));return{on:r.on,off:r.off,refreshBars:r.refresh,hideBars:r.hideBars,showBars:r.showBars,destroy:r.destroy,events:a.registry}};const mb={create:fb};const gb=(e,t)=>{const o=Se(e)?Qe(e):e;return{parent:b(o),view:b(e),origin:b(Is(0,0)),isResizable:t}};const pb=(e,t,o)=>{const n=()=>Vs(t);return{parent:b(t),view:b(e),origin:n,isResizable:o}};const hb=(e,t,o)=>({parent:b(t),view:b(e),origin:b(Is(0,0)),isResizable:o});const yb={only:gb,detached:pb,body:hb};const bb=()=>{const e=je.fromTag("div");Oo(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"});ut(Kt(),e);return e};const vb=(e,t)=>e.inline?yb.body(je.fromDom(e.getBody()),bb(),t):yb.only(je.fromDom(e.getDoc()),t);const kb=(e,t)=>{if(e.inline){yt(t.parent())}};const wb=e=>f(e)&&e.tagName==="TABLE";const _b="bar-";const xb=e=>Ne(e,"data-mce-resize")!=="false";const zb=e=>{const t=Ss.fromTable(e);if(!Ss.hasColumns(t)){L(Wo(e),(e=>{const t=Eo(e,"width");To(e,"width",t);Be(e,"width")}))}};const Cb=e=>{const t=Mp();const o=Mp();const n=Mp();let s;let r;const a=t=>hf(e,t);const c=()=>rf(e)?ui():di();const i=e=>fi(e).columns;const l=(t,o,n)=>{const l=vo(o,"e");if(r===""){$f(t)}if(n!==s&&r!==""){To(t,"width",r);const o=c();const d=a(t);const u=rf(e)||l?i(t)-1:0;id(t,n-s,u,o,d)}else if(ja(r)){const e=parseFloat(r.replace("%",""));const o=n*e/s;To(t,"width",o+"%")}if(Ua(r)){zb(t)}};const d=()=>{o.on((e=>{e.destroy()}));n.on((t=>{kb(e,t)}))};e.on("init",(()=>{const s=vb(e,xb);n.set(s);if(of(e)&&ff(e)){const n=c();const r=mb.create(s,n,a);r.on();r.events.startDrag.bind((o=>{t.set(e.selection.getRng())}));r.events.beforeResize.bind((t=>{const o=t.table.dom;Gu(e,o,Pa(o),Fa(o),_b+t.type)}));r.events.afterResize.bind((o=>{const n=o.table;const s=n.dom;Ha(n);t.on((t=>{e.selection.setRng(t);e.focus()}));Ku(e,s,Pa(s),Fa(s),_b+o.type);e.undoManager.add()}));o.set(r)}}));e.on("ObjectResizeStart",(t=>{const o=t.target;if(wb(o)){const n=je.fromDom(o);L(e.dom.select(".mce-clonedresizable"),(t=>{e.dom.addClass(t,"mce-"+sf(e)+"-columns")}));if(!Uf(n)&&df(e)){Gf(n)}else if(!jf(n)&&lf(e)){$f(n)}if(qf(n)&&bo(t.origin,_b)){$f(n)}s=t.width;r=uf(e)?"":Va(e,o).getOr("")}}));e.on("ObjectResized",(t=>{const o=t.target;if(wb(o)){const n=je.fromDom(o);const s=t.origin;if(bo(s,"corner-")){l(n,s,t.width)}Ha(n);qu(e,n.dom,Xu)}}));e.on("SwitchMode",(()=>{o.on((t=>{if(e.mode.isReadOnly()){t.hideBars()}else{t.showBars()}}))}));e.on("remove",(()=>{d()}));const u=e=>{o.on((t=>t.refreshBars(je.fromDom(e))))};const f=()=>{o.on((e=>e.hideBars()))};const m=()=>{o.on((e=>e.showBars()))};return{refresh:u,hide:f,show:m}};const Sb=e=>{ef(e);const t=Cb(e);const o=dy(e,t);const n=yf(e,t,o);Sm(e,n);Tm(e,n);Yc(e,n);return{getSelectedCells:o.getSelectedCells,clearSelectedCells:o.clearSelectedCells}};const Tb=e=>{const t=Sb(e);return{table:t}};var Ob=()=>{e.add("dom",Tb)};Ob()})()},480:(e,t,o)=>{o(481)},481:()=>{(function(){"use strict";const e=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");var o=tinymce.util.Tools.resolve("tinymce.Env");const n=e=>e.dispatch("ResizeEditor");const s=e=>t=>t.options.get(e);const r=e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1});t("autoresize_bottom_margin",{processor:"number",default:50})};const a=s("min_height");const c=s("max_height");const i=s("autoresize_overflow_padding");const l=s("autoresize_bottom_margin");const d=e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen();const u=(e,t)=>{const o=e.getBody();if(o){o.style.overflowY=t?"":"hidden";if(!t){o.scrollTop=0}}};const f=(e,t,o,n)=>{const s=parseInt(e.getStyle(t,o,n),10);return isNaN(s)?0:s};const m=e=>{if((e===null||e===void 0?void 0:e.type.toLowerCase())==="setcontent"){const t=e;return t.selection===true||t.paste===true}else{return false}};const g=(e,t,s)=>{var r;const i=e.dom;const p=e.getDoc();if(!p){return}if(d(e)){u(e,true);return}const h=p.documentElement;const y=l(e);const b=(r=a(e))!==null&&r!==void 0?r:e.getElement().offsetHeight;let v=b;const k=f(i,h,"margin-top",true);const w=f(i,h,"margin-bottom",true);let _=h.offsetHeight+k+w+y;if(_<0){_=0}const x=e.getContainer().offsetHeight;const z=e.getContentAreaContainer().offsetHeight;const C=x-z;if(_+C>b){v=_+C}const S=c(e);if(S&&v>S){v=S;u(e,true)}else{u(e,false)}if(v!==t.get()){const r=v-t.get();i.setStyle(e.getContainer(),"height",v+"px");t.set(v);n(e);if(o.browser.isSafari()&&(o.os.isMacOS()||o.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}if(e.hasFocus()&&m(s)){e.selection.scrollIntoView()}if((o.browser.isSafari()||o.browser.isChromium())&&r<0){g(e,t,s)}}};const p=(e,t)=>{e.on("init",(()=>{const t=i(e);const o=e.dom;o.setStyles(e.getDoc().documentElement,{height:"auto"});o.setStyles(e.getBody(),{paddingLeft:t,paddingRight:t,"min-height":0})}));e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(o=>{g(e,t,o)}))};const h=(e,t)=>{e.addCommand("mceAutoResize",(()=>{g(e,t)}))};var y=()=>{t.add("autoresize",(t=>{r(t);if(!t.options.isSet("resize")){t.options.set("resize",false)}if(!t.inline){const o=e(0);h(t,o);p(t,o)}}))};y()})()},482:(e,t,o)=>{o(483)},483:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t)=>{e.focus();e.undoManager.transact((()=>{e.setContent(t)}));e.selection.setCursorLocation();e.nodeChanged()};const o=e=>e.getContent({source_view:true});const n=e=>{const n=o(e);e.windowManager.open({title:"Source Code",size:"large",body:{type:"panel",items:[{type:"textarea",name:"code"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:{code:n},onSubmit:o=>{t(e,o.getData().code);o.close()}})};const s=e=>{e.addCommand("mceCodeEditor",(()=>{n(e)}))};const r=e=>{const t=()=>e.execCommand("mceCodeEditor");e.ui.registry.addButton("code",{icon:"sourcecode",tooltip:"Source code",onAction:t});e.ui.registry.addMenuItem("code",{icon:"sourcecode",text:"Source code",onAction:t})};var a=()=>{e.add("code",(e=>{s(e);r(e);return{}}))};a()})()},484:(e,t,o)=>{o(485)},485:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const o=e=>{const o=typeof e;if(e===null){return"null"}else if(o==="object"&&Array.isArray(e)){return"array"}else if(o==="object"&&t(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return o}};const n=e=>t=>o(t)===e;const s=e=>t=>typeof t===e;const r=n("string");const a=s("boolean");const c=e=>e===null||e===undefined;const i=e=>!c(e);const l=s("function");const d=s("number");const u=(e,t)=>o=>e(t(o));const f=e=>()=>e;const m=f(false);class g{constructor(e,t){this.tag=e;this.value=t}static some(e){return new g(true,e)}static none(){return g.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return g.some(e(this.value))}else{return g.none()}}bind(e){if(this.tag){return e(this.value)}else{return g.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return g.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return i(e)?g.some(e):g.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(false);const p=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const h=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const y=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const b=9;const v=11;const k=1;const w=3;const _=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return C(n.childNodes[0])};const x=(e,t)=>{const o=t||document;const n=o.createElement(e);return C(n)};const z=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return C(n)};const C=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const S=(e,t,o)=>g.from(e.dom.elementFromPoint(t,o)).map(C);const T={fromHtml:_,fromTag:x,fromText:z,fromDom:C,fromPoint:S};const O=(e,t)=>{const o=e.dom;if(o.nodeType!==k){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};typeof window!=="undefined"?window:Function("return this;")();const E=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const D=e=>e.dom.nodeType;const A=e=>t=>D(t)===e;const M=A(k);const N=A(w);const R=A(b);const B=A(v);const L=e=>t=>M(t)&&E(t)===e;const H=e=>T.fromDom(e.dom.ownerDocument);const I=e=>R(e)?e:H(e);const P=e=>g.from(e.dom.parentNode).map(T.fromDom);const F=e=>p(e.dom.childNodes,T.fromDom);const V=(e,t,o)=>{if(r(o)||a(o)||d(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const j=(e,t,o)=>{V(e.dom,t,o)};const U=(e,t)=>{e.dom.removeAttribute(t)};const q=e=>B(e)&&i(e.dom.host);const W=l(Element.prototype.attachShadow)&&l(Node.prototype.getRootNode);const $=W?e=>T.fromDom(e.dom.getRootNode()):I;const G=e=>{const t=$(e);return q(t)?g.some(t):g.none()};const K=e=>T.fromDom(e.dom.host);const X=e=>{const t=N(e)?e.dom.parentNode:e.dom;if(t===undefined||t===null||t.ownerDocument===null){return false}const o=t.ownerDocument;return G(T.fromDom(t)).fold((()=>o.body.contains(t)),u(X,K))};const Y=(e,t,o)=>{let n=e.dom;const s=l(o)?o:m;while(n.parentNode){n=n.parentNode;const e=T.fromDom(n);if(t(e)){return g.some(e)}else if(s(e)){break}}return g.none()};const J=(e,t,o)=>Y(e,(e=>O(e,t)),o);const Q=e=>e.style!==undefined&&l(e.style.getPropertyValue);const Z=(e,t)=>{const o=e.dom;const n=window.getComputedStyle(o);const s=n.getPropertyValue(t);return s===""&&!X(e)?ee(o,t):s};const ee=(e,t)=>Q(e)?e.style.getPropertyValue(t):"";const te=e=>Z(e,"direction")==="rtl"?"rtl":"ltr";const oe=(e,t)=>y(F(e),t);const ne=(e,t)=>oe(e,(e=>O(e,t)));const se=e=>P(e).filter(M);const re=(e,t)=>{const o=t?J(e,"ol,ul"):g.some(e);return o.getOr(e)};const ae=L("li");const ce=(e,t)=>{const o=e.selection.getSelectedBlocks();if(o.length>0){h(o,(e=>{const o=T.fromDom(e);const n=ae(o);const s=re(o,n);const r=se(s);r.each((e=>{const o=te(e);if(o!==t){j(s,"dir",t)}else if(te(s)!==t){U(s,"dir")}if(n){const e=ne(s,"li[dir]");h(e,(e=>U(e,"dir")))}}))}));e.nodeChanged()}};const ie=e=>{e.addCommand("mceDirectionLTR",(()=>{ce(e,"ltr")}));e.addCommand("mceDirectionRTL",(()=>{ce(e,"rtl")}))};const le=(e,t)=>o=>{const n=e=>{const n=T.fromDom(e.element);o.setActive(te(n)===t)};e.on("NodeChange",n);return()=>e.off("NodeChange",n)};const de=e=>{e.ui.registry.addToggleButton("ltr",{tooltip:"Left to right",icon:"ltr",onAction:()=>e.execCommand("mceDirectionLTR"),onSetup:le(e,"ltr")});e.ui.registry.addToggleButton("rtl",{tooltip:"Right to left",icon:"rtl",onAction:()=>e.execCommand("mceDirectionRTL"),onSetup:le(e,"rtl")})};var ue=()=>{e.add("directionality",(e=>{ie(e);de(e)}))};ue()})()},486:(e,t,o)=>{o(487)},488:()=>{window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:"😀",fitzpatrick_scale:false,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:"😬",fitzpatrick_scale:false,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:"😁",fitzpatrick_scale:false,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:"😂",fitzpatrick_scale:false,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:"🤣",fitzpatrick_scale:false,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:"🥳",fitzpatrick_scale:false,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:"😃",fitzpatrick_scale:false,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:"😄",fitzpatrick_scale:false,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:"😅",fitzpatrick_scale:false,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:"😆",fitzpatrick_scale:false,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:"😇",fitzpatrick_scale:false,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:"😉",fitzpatrick_scale:false,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:"😊",fitzpatrick_scale:false,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:"🙂",fitzpatrick_scale:false,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:"🙃",fitzpatrick_scale:false,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:"☺️",fitzpatrick_scale:false,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:"😋",fitzpatrick_scale:false,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:"😌",fitzpatrick_scale:false,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:"😍",fitzpatrick_scale:false,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:"🥰",fitzpatrick_scale:false,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😘",fitzpatrick_scale:false,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:"😗",fitzpatrick_scale:false,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:"😙",fitzpatrick_scale:false,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😚",fitzpatrick_scale:false,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:"😜",fitzpatrick_scale:false,category:"people"},zany:{keywords:["face","goofy","crazy"],char:"🤪",fitzpatrick_scale:false,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:"🤨",fitzpatrick_scale:false,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:"🧐",fitzpatrick_scale:false,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:"😝",fitzpatrick_scale:false,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:"😛",fitzpatrick_scale:false,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:"🤑",fitzpatrick_scale:false,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:"🤓",fitzpatrick_scale:false,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:"😎",fitzpatrick_scale:false,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:"🤩",fitzpatrick_scale:false,category:"people"},clown_face:{keywords:["face"],char:"🤡",fitzpatrick_scale:false,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:"🤠",fitzpatrick_scale:false,category:"people"},hugs:{keywords:["face","smile","hug"],char:"🤗",fitzpatrick_scale:false,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:"😏",fitzpatrick_scale:false,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:"😶",fitzpatrick_scale:false,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:"😐",fitzpatrick_scale:false,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:"😑",fitzpatrick_scale:false,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:"😒",fitzpatrick_scale:false,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:"🙄",fitzpatrick_scale:false,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:"🤔",fitzpatrick_scale:false,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:"🤥",fitzpatrick_scale:false,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:"🤭",fitzpatrick_scale:false,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:"🤫",fitzpatrick_scale:false,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:"🤬",fitzpatrick_scale:false,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:"🤯",fitzpatrick_scale:false,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:"😳",fitzpatrick_scale:false,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:"😞",fitzpatrick_scale:false,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:"😟",fitzpatrick_scale:false,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:"😠",fitzpatrick_scale:false,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:"😡",fitzpatrick_scale:false,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:"😔",fitzpatrick_scale:false,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:"😕",fitzpatrick_scale:false,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:"🙁",fitzpatrick_scale:false,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:"☹",fitzpatrick_scale:false,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:"😣",fitzpatrick_scale:false,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:"😖",fitzpatrick_scale:false,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:"😫",fitzpatrick_scale:false,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:"😩",fitzpatrick_scale:false,category:"people"},pleading:{keywords:["face","begging","mercy"],char:"🥺",fitzpatrick_scale:false,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:"😤",fitzpatrick_scale:false,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:"😮",fitzpatrick_scale:false,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:"😱",fitzpatrick_scale:false,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:"😨",fitzpatrick_scale:false,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:"😰",fitzpatrick_scale:false,category:"people"},hushed:{keywords:["face","woo","shh"],char:"😯",fitzpatrick_scale:false,category:"people"},frowning:{keywords:["face","aw","what"],char:"😦",fitzpatrick_scale:false,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:"😧",fitzpatrick_scale:false,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:"😢",fitzpatrick_scale:false,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:"😥",fitzpatrick_scale:false,category:"people"},drooling_face:{keywords:["face"],char:"🤤",fitzpatrick_scale:false,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:"😪",fitzpatrick_scale:false,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:"😓",fitzpatrick_scale:false,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"🥵",fitzpatrick_scale:false,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:"🥶",fitzpatrick_scale:false,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:"😭",fitzpatrick_scale:false,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:"😵",fitzpatrick_scale:false,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:"😲",fitzpatrick_scale:false,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:"🤐",fitzpatrick_scale:false,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:"🤢",fitzpatrick_scale:false,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:"🤧",fitzpatrick_scale:false,category:"people"},vomiting:{keywords:["face","sick"],char:"🤮",fitzpatrick_scale:false,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:"😷",fitzpatrick_scale:false,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:"🤒",fitzpatrick_scale:false,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:"🤕",fitzpatrick_scale:false,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:"🥴",fitzpatrick_scale:false,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:"😴",fitzpatrick_scale:false,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:"💤",fitzpatrick_scale:false,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:"💩",fitzpatrick_scale:false,category:"people"},smiling_imp:{keywords:["devil","horns"],char:"😈",fitzpatrick_scale:false,category:"people"},imp:{keywords:["devil","angry","horns"],char:"👿",fitzpatrick_scale:false,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:"👹",fitzpatrick_scale:false,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:"👺",fitzpatrick_scale:false,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:"💀",fitzpatrick_scale:false,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:"👻",fitzpatrick_scale:false,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:"👽",fitzpatrick_scale:false,category:"people"},robot:{keywords:["computer","machine","bot"],char:"🤖",fitzpatrick_scale:false,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:"😺",fitzpatrick_scale:false,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:"😸",fitzpatrick_scale:false,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:"😹",fitzpatrick_scale:false,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:"😻",fitzpatrick_scale:false,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:"😼",fitzpatrick_scale:false,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:"😽",fitzpatrick_scale:false,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:"🙀",fitzpatrick_scale:false,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:"😿",fitzpatrick_scale:false,category:"people"},pouting_cat:{keywords:["animal","cats"],char:"😾",fitzpatrick_scale:false,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:"🤲",fitzpatrick_scale:true,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:"🙌",fitzpatrick_scale:true,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:"👏",fitzpatrick_scale:true,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:"👋",fitzpatrick_scale:true,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:"🤙",fitzpatrick_scale:true,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:"👍",fitzpatrick_scale:true,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:"👎",fitzpatrick_scale:true,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:"👊",fitzpatrick_scale:true,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:"✊",fitzpatrick_scale:true,category:"people"},fist_left:{keywords:["hand","fistbump"],char:"🤛",fitzpatrick_scale:true,category:"people"},fist_right:{keywords:["hand","fistbump"],char:"🤜",fitzpatrick_scale:true,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:"✌",fitzpatrick_scale:true,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:"👌",fitzpatrick_scale:true,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:"✋",fitzpatrick_scale:true,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:"🤚",fitzpatrick_scale:true,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:"👐",fitzpatrick_scale:true,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:"💪",fitzpatrick_scale:true,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:"🙏",fitzpatrick_scale:true,category:"people"},foot:{keywords:["kick","stomp"],char:"🦶",fitzpatrick_scale:true,category:"people"},leg:{keywords:["kick","limb"],char:"🦵",fitzpatrick_scale:true,category:"people"},handshake:{keywords:["agreement","shake"],char:"🤝",fitzpatrick_scale:false,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:"☝",fitzpatrick_scale:true,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:"👆",fitzpatrick_scale:true,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:"👇",fitzpatrick_scale:true,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:"👈",fitzpatrick_scale:true,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:"👉",fitzpatrick_scale:true,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:"🖕",fitzpatrick_scale:true,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:"🖐",fitzpatrick_scale:true,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:"🤟",fitzpatrick_scale:true,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:"🤘",fitzpatrick_scale:true,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:"🤞",fitzpatrick_scale:true,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:"🖖",fitzpatrick_scale:true,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:"✍",fitzpatrick_scale:true,category:"people"},selfie:{keywords:["camera","phone"],char:"🤳",fitzpatrick_scale:true,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:"💅",fitzpatrick_scale:true,category:"people"},lips:{keywords:["mouth","kiss"],char:"👄",fitzpatrick_scale:false,category:"people"},tooth:{keywords:["teeth","dentist"],char:"🦷",fitzpatrick_scale:false,category:"people"},tongue:{keywords:["mouth","playful"],char:"👅",fitzpatrick_scale:false,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:"👂",fitzpatrick_scale:true,category:"people"},nose:{keywords:["smell","sniff"],char:"👃",fitzpatrick_scale:true,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:"👁",fitzpatrick_scale:false,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:"👀",fitzpatrick_scale:false,category:"people"},brain:{keywords:["smart","intelligent"],char:"🧠",fitzpatrick_scale:false,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:"👤",fitzpatrick_scale:false,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:"👥",fitzpatrick_scale:false,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:"🗣",fitzpatrick_scale:false,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:"👶",fitzpatrick_scale:true,category:"people"},child:{keywords:["gender-neutral","young"],char:"🧒",fitzpatrick_scale:true,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:"👦",fitzpatrick_scale:true,category:"people"},girl:{keywords:["female","woman","teenager"],char:"👧",fitzpatrick_scale:true,category:"people"},adult:{keywords:["gender-neutral","person"],char:"🧑",fitzpatrick_scale:true,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:"👨",fitzpatrick_scale:true,category:"people"},woman:{keywords:["female","girls","lady"],char:"👩",fitzpatrick_scale:true,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:"👱♀️",fitzpatrick_scale:true,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:"👱",fitzpatrick_scale:true,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:"🧔",fitzpatrick_scale:true,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:"🧓",fitzpatrick_scale:true,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:"👴",fitzpatrick_scale:true,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:"👵",fitzpatrick_scale:true,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:"👲",fitzpatrick_scale:true,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:"🧕",fitzpatrick_scale:true,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:"👳♀️",fitzpatrick_scale:true,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:"👳",fitzpatrick_scale:true,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:"👮♀️",fitzpatrick_scale:true,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:"👮",fitzpatrick_scale:true,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:"👷♀️",fitzpatrick_scale:true,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:"👷",fitzpatrick_scale:true,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:"💂♀️",fitzpatrick_scale:true,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:"💂",fitzpatrick_scale:true,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:"🕵️♀️",fitzpatrick_scale:true,category:"people"},male_detective:{keywords:["human","spy","detective"],char:"🕵",fitzpatrick_scale:true,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:"👩⚕️",fitzpatrick_scale:true,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:"👨⚕️",fitzpatrick_scale:true,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:"👩🌾",fitzpatrick_scale:true,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:"👨🌾",fitzpatrick_scale:true,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:"👩🍳",fitzpatrick_scale:true,category:"people"},man_cook:{keywords:["chef","man","human"],char:"👨🍳",fitzpatrick_scale:true,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:"👩🎓",fitzpatrick_scale:true,category:"people"},man_student:{keywords:["graduate","man","human"],char:"👨🎓",fitzpatrick_scale:true,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:"👩🎤",fitzpatrick_scale:true,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:"👨🎤",fitzpatrick_scale:true,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:"👩🏫",fitzpatrick_scale:true,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:"👨🏫",fitzpatrick_scale:true,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:"👩🏭",fitzpatrick_scale:true,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:"👨🏭",fitzpatrick_scale:true,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:"👩💻",fitzpatrick_scale:true,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:"👨💻",fitzpatrick_scale:true,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:"👩💼",fitzpatrick_scale:true,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:"👨💼",fitzpatrick_scale:true,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:"👩🔧",fitzpatrick_scale:true,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:"👨🔧",fitzpatrick_scale:true,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:"👩🔬",fitzpatrick_scale:true,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:"👨🔬",fitzpatrick_scale:true,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:"👩🎨",fitzpatrick_scale:true,category:"people"},man_artist:{keywords:["painter","man","human"],char:"👨🎨",fitzpatrick_scale:true,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:"👩🚒",fitzpatrick_scale:true,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:"👨🚒",fitzpatrick_scale:true,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:"👩✈️",fitzpatrick_scale:true,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:"👨✈️",fitzpatrick_scale:true,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:"👩🚀",fitzpatrick_scale:true,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:"👨🚀",fitzpatrick_scale:true,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:"👩⚖️",fitzpatrick_scale:true,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:"👨⚖️",fitzpatrick_scale:true,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"🦸♀️",fitzpatrick_scale:true,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"🦸♂️",fitzpatrick_scale:true,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"🦹♀️",fitzpatrick_scale:true,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:"🦹♂️",fitzpatrick_scale:true,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:"🤶",fitzpatrick_scale:true,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:"🎅",fitzpatrick_scale:true,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:"🧙♀️",fitzpatrick_scale:true,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:"🧙♂️",fitzpatrick_scale:true,category:"people"},woman_elf:{keywords:["woman","female"],char:"🧝♀️",fitzpatrick_scale:true,category:"people"},man_elf:{keywords:["man","male"],char:"🧝♂️",fitzpatrick_scale:true,category:"people"},woman_vampire:{keywords:["woman","female"],char:"🧛♀️",fitzpatrick_scale:true,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:"🧛♂️",fitzpatrick_scale:true,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:"🧟♀️",fitzpatrick_scale:false,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:"🧟♂️",fitzpatrick_scale:false,category:"people"},woman_genie:{keywords:["woman","female"],char:"🧞♀️",fitzpatrick_scale:false,category:"people"},man_genie:{keywords:["man","male"],char:"🧞♂️",fitzpatrick_scale:false,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:"🧜♀️",fitzpatrick_scale:true,category:"people"},merman:{keywords:["man","male","triton"],char:"🧜♂️",fitzpatrick_scale:true,category:"people"},woman_fairy:{keywords:["woman","female"],char:"🧚♀️",fitzpatrick_scale:true,category:"people"},man_fairy:{keywords:["man","male"],char:"🧚♂️",fitzpatrick_scale:true,category:"people"},angel:{keywords:["heaven","wings","halo"],char:"👼",fitzpatrick_scale:true,category:"people"},pregnant_woman:{keywords:["baby"],char:"🤰",fitzpatrick_scale:true,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:"🤱",fitzpatrick_scale:true,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:"👸",fitzpatrick_scale:true,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:"🤴",fitzpatrick_scale:true,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:"👰",fitzpatrick_scale:true,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:"🤵",fitzpatrick_scale:true,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:"🏃♀️",fitzpatrick_scale:true,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:"🏃",fitzpatrick_scale:true,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:"🚶♀️",fitzpatrick_scale:true,category:"people"},walking_man:{keywords:["human","feet","steps"],char:"🚶",fitzpatrick_scale:true,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:"💃",fitzpatrick_scale:true,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:"🕺",fitzpatrick_scale:true,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:"👯",fitzpatrick_scale:false,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:"👯♂️",fitzpatrick_scale:false,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:"👫",fitzpatrick_scale:false,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:"👬",fitzpatrick_scale:false,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:"👭",fitzpatrick_scale:false,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:"🙇♀️",fitzpatrick_scale:true,category:"people"},bowing_man:{keywords:["man","male","boy"],char:"🙇",fitzpatrick_scale:true,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:"🤦♂️",fitzpatrick_scale:true,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:"🤦♀️",fitzpatrick_scale:true,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:"🤷",fitzpatrick_scale:true,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:"🤷♂️",fitzpatrick_scale:true,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:"💁",fitzpatrick_scale:true,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:"💁♂️",fitzpatrick_scale:true,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:"🙅",fitzpatrick_scale:true,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:"🙅♂️",fitzpatrick_scale:true,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:"🙆",fitzpatrick_scale:true,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:"🙆♂️",fitzpatrick_scale:true,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:"🙋",fitzpatrick_scale:true,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:"🙋♂️",fitzpatrick_scale:true,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:"🙎",fitzpatrick_scale:true,category:"people"},pouting_man:{keywords:["male","boy","man"],char:"🙎♂️",fitzpatrick_scale:true,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:"🙍",fitzpatrick_scale:true,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:"🙍♂️",fitzpatrick_scale:true,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:"💇",fitzpatrick_scale:true,category:"people"},haircut_man:{keywords:["male","boy","man"],char:"💇♂️",fitzpatrick_scale:true,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:"💆",fitzpatrick_scale:true,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:"💆♂️",fitzpatrick_scale:true,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:"🧖♀️",fitzpatrick_scale:true,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:"🧖♂️",fitzpatrick_scale:true,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"💑",fitzpatrick_scale:false,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👩❤️👩",fitzpatrick_scale:false,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👨❤️👨",fitzpatrick_scale:false,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"💏",fitzpatrick_scale:false,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👩❤️💋👩",fitzpatrick_scale:false,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👨❤️💋👨",fitzpatrick_scale:false,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:"👪",fitzpatrick_scale:false,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:"👨👩👧",fitzpatrick_scale:false,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨👩👧👦",fitzpatrick_scale:false,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨👩👦👦",fitzpatrick_scale:false,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨👩👧👧",fitzpatrick_scale:false,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:"👩👩👦",fitzpatrick_scale:false,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:"👩👩👧",fitzpatrick_scale:false,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👩👩👧👦",fitzpatrick_scale:false,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👩👩👦👦",fitzpatrick_scale:false,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👩👩👧👧",fitzpatrick_scale:false,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:"👨👨👦",fitzpatrick_scale:false,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:"👨👨👧",fitzpatrick_scale:false,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨👨👧👦",fitzpatrick_scale:false,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨👨👦👦",fitzpatrick_scale:false,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨👨👧👧",fitzpatrick_scale:false,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:"👩👦",fitzpatrick_scale:false,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:"👩👧",fitzpatrick_scale:false,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:"👩👧👦",fitzpatrick_scale:false,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:"👩👦👦",fitzpatrick_scale:false,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:"👩👧👧",fitzpatrick_scale:false,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:"👨👦",fitzpatrick_scale:false,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:"👨👧",fitzpatrick_scale:false,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:"👨👧👦",fitzpatrick_scale:false,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:"👨👦👦",fitzpatrick_scale:false,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:"👨👧👧",fitzpatrick_scale:false,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:"🧶",fitzpatrick_scale:false,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"🧵",fitzpatrick_scale:false,category:"people"},coat:{keywords:["jacket"],char:"🧥",fitzpatrick_scale:false,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:"🥼",fitzpatrick_scale:false,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:"👚",fitzpatrick_scale:false,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:"👕",fitzpatrick_scale:false,category:"people"},jeans:{keywords:["fashion","shopping"],char:"👖",fitzpatrick_scale:false,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:"👔",fitzpatrick_scale:false,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:"👗",fitzpatrick_scale:false,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:"👙",fitzpatrick_scale:false,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:"👘",fitzpatrick_scale:false,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:"💄",fitzpatrick_scale:false,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:"💋",fitzpatrick_scale:false,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:"👣",fitzpatrick_scale:false,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:"🥿",fitzpatrick_scale:false,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:"👠",fitzpatrick_scale:false,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:"👡",fitzpatrick_scale:false,category:"people"},boot:{keywords:["shoes","fashion"],char:"👢",fitzpatrick_scale:false,category:"people"},mans_shoe:{keywords:["fashion","male"],char:"👞",fitzpatrick_scale:false,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:"👟",fitzpatrick_scale:false,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:"🥾",fitzpatrick_scale:false,category:"people"},socks:{keywords:["stockings","clothes"],char:"🧦",fitzpatrick_scale:false,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:"🧤",fitzpatrick_scale:false,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:"🧣",fitzpatrick_scale:false,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:"👒",fitzpatrick_scale:false,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:"🎩",fitzpatrick_scale:false,category:"people"},billed_hat:{keywords:["cap","baseball"],char:"🧢",fitzpatrick_scale:false,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:"⛑",fitzpatrick_scale:false,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:"🎓",fitzpatrick_scale:false,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:"👑",fitzpatrick_scale:false,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:"🎒",fitzpatrick_scale:false,category:"people"},luggage:{keywords:["packing","travel"],char:"🧳",fitzpatrick_scale:false,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:"👝",fitzpatrick_scale:false,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:"👛",fitzpatrick_scale:false,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:"👜",fitzpatrick_scale:false,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:"💼",fitzpatrick_scale:false,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:"👓",fitzpatrick_scale:false,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:"🕶",fitzpatrick_scale:false,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:"🥽",fitzpatrick_scale:false,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:"💍",fitzpatrick_scale:false,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:"🌂",fitzpatrick_scale:false,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:"🐶",fitzpatrick_scale:false,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:"🐱",fitzpatrick_scale:false,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:"🐭",fitzpatrick_scale:false,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:"🐹",fitzpatrick_scale:false,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:"🐰",fitzpatrick_scale:false,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:"🦊",fitzpatrick_scale:false,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:"🐻",fitzpatrick_scale:false,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:"🐼",fitzpatrick_scale:false,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:"🐨",fitzpatrick_scale:false,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:"🐯",fitzpatrick_scale:false,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:"🦁",fitzpatrick_scale:false,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐮",fitzpatrick_scale:false,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:"🐷",fitzpatrick_scale:false,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:"🐽",fitzpatrick_scale:false,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:"🐸",fitzpatrick_scale:false,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:"🦑",fitzpatrick_scale:false,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:"🐙",fitzpatrick_scale:false,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:"🦐",fitzpatrick_scale:false,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:"🐵",fitzpatrick_scale:false,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:"🦍",fitzpatrick_scale:false,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:"🙈",fitzpatrick_scale:false,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:"🙉",fitzpatrick_scale:false,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:"🙊",fitzpatrick_scale:false,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:"🐒",fitzpatrick_scale:false,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:"🐔",fitzpatrick_scale:false,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:"🐧",fitzpatrick_scale:false,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:"🐦",fitzpatrick_scale:false,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:"🐤",fitzpatrick_scale:false,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:"🐣",fitzpatrick_scale:false,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:"🐥",fitzpatrick_scale:false,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:"🦆",fitzpatrick_scale:false,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:"🦅",fitzpatrick_scale:false,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:"🦉",fitzpatrick_scale:false,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:"🦇",fitzpatrick_scale:false,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:"🐺",fitzpatrick_scale:false,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:"🐗",fitzpatrick_scale:false,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:"🐴",fitzpatrick_scale:false,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:"🦄",fitzpatrick_scale:false,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:"🐝",fitzpatrick_scale:false,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:"🐛",fitzpatrick_scale:false,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:"🦋",fitzpatrick_scale:false,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:"🐌",fitzpatrick_scale:false,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:"🐞",fitzpatrick_scale:false,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:"🐜",fitzpatrick_scale:false,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:"🦗",fitzpatrick_scale:false,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:"🕷",fitzpatrick_scale:false,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:"🦂",fitzpatrick_scale:false,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:"🦀",fitzpatrick_scale:false,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:"🐍",fitzpatrick_scale:false,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:"🦎",fitzpatrick_scale:false,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:"🦖",fitzpatrick_scale:false,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:"🦕",fitzpatrick_scale:false,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:"🐢",fitzpatrick_scale:false,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:"🐠",fitzpatrick_scale:false,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:"🐟",fitzpatrick_scale:false,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:"🐡",fitzpatrick_scale:false,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:"🐬",fitzpatrick_scale:false,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:"🦈",fitzpatrick_scale:false,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:"🐳",fitzpatrick_scale:false,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:"🐋",fitzpatrick_scale:false,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:"🐊",fitzpatrick_scale:false,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:"🐆",fitzpatrick_scale:false,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:"🦓",fitzpatrick_scale:false,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:"🐅",fitzpatrick_scale:false,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:"🐃",fitzpatrick_scale:false,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:"🐂",fitzpatrick_scale:false,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐄",fitzpatrick_scale:false,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:"🦌",fitzpatrick_scale:false,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:"🐪",fitzpatrick_scale:false,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:"🐫",fitzpatrick_scale:false,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:"🦒",fitzpatrick_scale:false,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:"🐘",fitzpatrick_scale:false,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:"🦏",fitzpatrick_scale:false,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:"🐐",fitzpatrick_scale:false,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:"🐏",fitzpatrick_scale:false,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:"🐑",fitzpatrick_scale:false,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:"🐎",fitzpatrick_scale:false,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:"🐖",fitzpatrick_scale:false,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:"🐀",fitzpatrick_scale:false,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:"🐁",fitzpatrick_scale:false,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:"🐓",fitzpatrick_scale:false,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:"🦃",fitzpatrick_scale:false,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:"🕊",fitzpatrick_scale:false,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:"🐕",fitzpatrick_scale:false,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:"🐩",fitzpatrick_scale:false,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:"🐈",fitzpatrick_scale:false,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:"🐇",fitzpatrick_scale:false,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:"🐿",fitzpatrick_scale:false,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:"🦔",fitzpatrick_scale:false,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:"🦝",fitzpatrick_scale:false,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"🦙",fitzpatrick_scale:false,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"🦛",fitzpatrick_scale:false,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"🦘",fitzpatrick_scale:false,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"🦡",fitzpatrick_scale:false,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"🦢",fitzpatrick_scale:false,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"🦚",fitzpatrick_scale:false,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"🦜",fitzpatrick_scale:false,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"🦞",fitzpatrick_scale:false,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:"🦟",fitzpatrick_scale:false,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:"🐾",fitzpatrick_scale:false,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:"🐉",fitzpatrick_scale:false,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:"🐲",fitzpatrick_scale:false,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:"🌵",fitzpatrick_scale:false,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:"🎄",fitzpatrick_scale:false,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:"🌲",fitzpatrick_scale:false,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:"🌳",fitzpatrick_scale:false,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:"🌴",fitzpatrick_scale:false,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:"🌱",fitzpatrick_scale:false,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:"🌿",fitzpatrick_scale:false,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:"☘",fitzpatrick_scale:false,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:"🍀",fitzpatrick_scale:false,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:"🎍",fitzpatrick_scale:false,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:"🎋",fitzpatrick_scale:false,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:"🍃",fitzpatrick_scale:false,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:"🍂",fitzpatrick_scale:false,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:"🍁",fitzpatrick_scale:false,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:"🌾",fitzpatrick_scale:false,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:"🌺",fitzpatrick_scale:false,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:"🌻",fitzpatrick_scale:false,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:"🌹",fitzpatrick_scale:false,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:"🥀",fitzpatrick_scale:false,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:"🌷",fitzpatrick_scale:false,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:"🌼",fitzpatrick_scale:false,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:"🌸",fitzpatrick_scale:false,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:"💐",fitzpatrick_scale:false,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:"🍄",fitzpatrick_scale:false,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:"🌰",fitzpatrick_scale:false,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:"🎃",fitzpatrick_scale:false,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:"🐚",fitzpatrick_scale:false,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:"🕸",fitzpatrick_scale:false,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:"🌎",fitzpatrick_scale:false,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:"🌍",fitzpatrick_scale:false,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:"🌏",fitzpatrick_scale:false,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:"🌕",fitzpatrick_scale:false,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:"🌖",fitzpatrick_scale:false,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌗",fitzpatrick_scale:false,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌘",fitzpatrick_scale:false,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌑",fitzpatrick_scale:false,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌒",fitzpatrick_scale:false,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌓",fitzpatrick_scale:false,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:"🌔",fitzpatrick_scale:false,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌚",fitzpatrick_scale:false,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌝",fitzpatrick_scale:false,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌛",fitzpatrick_scale:false,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌜",fitzpatrick_scale:false,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:"🌞",fitzpatrick_scale:false,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:"🌙",fitzpatrick_scale:false,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:"⭐",fitzpatrick_scale:false,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:"🌟",fitzpatrick_scale:false,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:"💫",fitzpatrick_scale:false,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:"✨",fitzpatrick_scale:false,category:"animals_and_nature"},comet:{keywords:["space"],char:"☄",fitzpatrick_scale:false,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:"☀️",fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:"🌤",fitzpatrick_scale:false,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:"⛅",fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:"🌥",fitzpatrick_scale:false,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:"🌦",fitzpatrick_scale:false,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:"☁️",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:"🌧",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:"⛈",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:"🌩",fitzpatrick_scale:false,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:"⚡",fitzpatrick_scale:false,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:"🔥",fitzpatrick_scale:false,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:"💥",fitzpatrick_scale:false,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:"❄️",fitzpatrick_scale:false,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:"🌨",fitzpatrick_scale:false,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:"⛄",fitzpatrick_scale:false,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:"☃",fitzpatrick_scale:false,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:"🌬",fitzpatrick_scale:false,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:"💨",fitzpatrick_scale:false,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:"🌪",fitzpatrick_scale:false,category:"animals_and_nature"},fog:{keywords:["weather"],char:"🌫",fitzpatrick_scale:false,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:"☂",fitzpatrick_scale:false,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:"☔",fitzpatrick_scale:false,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:"💧",fitzpatrick_scale:false,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:"💦",fitzpatrick_scale:false,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:"🌊",fitzpatrick_scale:false,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:"🍏",fitzpatrick_scale:false,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:"🍎",fitzpatrick_scale:false,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:"🍐",fitzpatrick_scale:false,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:"🍊",fitzpatrick_scale:false,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:"🍋",fitzpatrick_scale:false,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:"🍌",fitzpatrick_scale:false,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:"🍉",fitzpatrick_scale:false,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:"🍇",fitzpatrick_scale:false,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:"🍓",fitzpatrick_scale:false,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:"🍈",fitzpatrick_scale:false,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:"🍒",fitzpatrick_scale:false,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:"🍑",fitzpatrick_scale:false,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:"🍍",fitzpatrick_scale:false,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:"🥥",fitzpatrick_scale:false,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:"🥝",fitzpatrick_scale:false,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:"🥭",fitzpatrick_scale:false,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:"🥑",fitzpatrick_scale:false,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:"🥦",fitzpatrick_scale:false,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:"🍅",fitzpatrick_scale:false,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:"🍆",fitzpatrick_scale:false,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:"🥒",fitzpatrick_scale:false,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:"🥕",fitzpatrick_scale:false,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:"🌶",fitzpatrick_scale:false,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:"🥔",fitzpatrick_scale:false,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:"🌽",fitzpatrick_scale:false,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:"🥬",fitzpatrick_scale:false,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:"🍠",fitzpatrick_scale:false,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:"🥜",fitzpatrick_scale:false,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:"🍯",fitzpatrick_scale:false,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:"🥐",fitzpatrick_scale:false,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:"🍞",fitzpatrick_scale:false,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:"🥖",fitzpatrick_scale:false,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:"🥯",fitzpatrick_scale:false,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:"🥨",fitzpatrick_scale:false,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:"🧀",fitzpatrick_scale:false,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:"🥚",fitzpatrick_scale:false,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:"🥓",fitzpatrick_scale:false,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:"🥩",fitzpatrick_scale:false,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:"🥞",fitzpatrick_scale:false,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:"🍗",fitzpatrick_scale:false,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:"🍖",fitzpatrick_scale:false,category:"food_and_drink"},bone:{keywords:["skeleton"],char:"🦴",fitzpatrick_scale:false,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:"🍤",fitzpatrick_scale:false,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:"🍳",fitzpatrick_scale:false,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:"🍔",fitzpatrick_scale:false,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:"🍟",fitzpatrick_scale:false,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:"🥙",fitzpatrick_scale:false,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:"🌭",fitzpatrick_scale:false,category:"food_and_drink"},pizza:{keywords:["food","party"],char:"🍕",fitzpatrick_scale:false,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:"🥪",fitzpatrick_scale:false,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:"🥫",fitzpatrick_scale:false,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:"🍝",fitzpatrick_scale:false,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:"🌮",fitzpatrick_scale:false,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:"🌯",fitzpatrick_scale:false,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:"🥗",fitzpatrick_scale:false,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:"🥘",fitzpatrick_scale:false,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:"🍜",fitzpatrick_scale:false,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:"🍲",fitzpatrick_scale:false,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:"🍥",fitzpatrick_scale:false,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:"🥠",fitzpatrick_scale:false,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:"🍣",fitzpatrick_scale:false,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:"🍱",fitzpatrick_scale:false,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:"🍛",fitzpatrick_scale:false,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:"🍙",fitzpatrick_scale:false,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:"🍚",fitzpatrick_scale:false,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:"🍘",fitzpatrick_scale:false,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:"🍢",fitzpatrick_scale:false,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:"🍡",fitzpatrick_scale:false,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:"🍧",fitzpatrick_scale:false,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:"🍨",fitzpatrick_scale:false,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:"🍦",fitzpatrick_scale:false,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:"🥧",fitzpatrick_scale:false,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:"🍰",fitzpatrick_scale:false,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"🧁",fitzpatrick_scale:false,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:"🥮",fitzpatrick_scale:false,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:"🎂",fitzpatrick_scale:false,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:"🍮",fitzpatrick_scale:false,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:"🍬",fitzpatrick_scale:false,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:"🍭",fitzpatrick_scale:false,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:"🍫",fitzpatrick_scale:false,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:"🍿",fitzpatrick_scale:false,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:"🥟",fitzpatrick_scale:false,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:"🍩",fitzpatrick_scale:false,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:"🍪",fitzpatrick_scale:false,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:"🥛",fitzpatrick_scale:false,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍺",fitzpatrick_scale:false,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍻",fitzpatrick_scale:false,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:"🥂",fitzpatrick_scale:false,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:"🍷",fitzpatrick_scale:false,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:"🥃",fitzpatrick_scale:false,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:"🍸",fitzpatrick_scale:false,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:"🍹",fitzpatrick_scale:false,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:"🍾",fitzpatrick_scale:false,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:"🍶",fitzpatrick_scale:false,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:"🍵",fitzpatrick_scale:false,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:"🥤",fitzpatrick_scale:false,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:"☕",fitzpatrick_scale:false,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:"🍼",fitzpatrick_scale:false,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:"🧂",fitzpatrick_scale:false,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:"🥄",fitzpatrick_scale:false,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:"🍴",fitzpatrick_scale:false,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:"🍽",fitzpatrick_scale:false,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:"🥣",fitzpatrick_scale:false,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:"🥡",fitzpatrick_scale:false,category:"food_and_drink"},chopsticks:{keywords:["food"],char:"🥢",fitzpatrick_scale:false,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:"⚽",fitzpatrick_scale:false,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:"🏀",fitzpatrick_scale:false,category:"activity"},football:{keywords:["sports","balls","NFL"],char:"🏈",fitzpatrick_scale:false,category:"activity"},baseball:{keywords:["sports","balls"],char:"⚾",fitzpatrick_scale:false,category:"activity"},softball:{keywords:["sports","balls"],char:"🥎",fitzpatrick_scale:false,category:"activity"},tennis:{keywords:["sports","balls","green"],char:"🎾",fitzpatrick_scale:false,category:"activity"},volleyball:{keywords:["sports","balls"],char:"🏐",fitzpatrick_scale:false,category:"activity"},rugby_football:{keywords:["sports","team"],char:"🏉",fitzpatrick_scale:false,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:"🥏",fitzpatrick_scale:false,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:"🎱",fitzpatrick_scale:false,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:"⛳",fitzpatrick_scale:false,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:"🏌️♀️",fitzpatrick_scale:false,category:"activity"},golfing_man:{keywords:["sports","business"],char:"🏌",fitzpatrick_scale:true,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:"🏓",fitzpatrick_scale:false,category:"activity"},badminton:{keywords:["sports"],char:"🏸",fitzpatrick_scale:false,category:"activity"},goal_net:{keywords:["sports"],char:"🥅",fitzpatrick_scale:false,category:"activity"},ice_hockey:{keywords:["sports"],char:"🏒",fitzpatrick_scale:false,category:"activity"},field_hockey:{keywords:["sports"],char:"🏑",fitzpatrick_scale:false,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:"🥍",fitzpatrick_scale:false,category:"activity"},cricket:{keywords:["sports"],char:"🏏",fitzpatrick_scale:false,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:"🎿",fitzpatrick_scale:false,category:"activity"},skier:{keywords:["sports","winter","snow"],char:"⛷",fitzpatrick_scale:false,category:"activity"},snowboarder:{keywords:["sports","winter"],char:"🏂",fitzpatrick_scale:true,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:"🤺",fitzpatrick_scale:false,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:"🤼♀️",fitzpatrick_scale:false,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:"🤼♂️",fitzpatrick_scale:false,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:"🤸♀️",fitzpatrick_scale:true,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:"🤸♂️",fitzpatrick_scale:true,category:"activity"},woman_playing_handball:{keywords:["sports"],char:"🤾♀️",fitzpatrick_scale:true,category:"activity"},man_playing_handball:{keywords:["sports"],char:"🤾♂️",fitzpatrick_scale:true,category:"activity"},ice_skate:{keywords:["sports"],char:"⛸",fitzpatrick_scale:false,category:"activity"},curling_stone:{keywords:["sports"],char:"🥌",fitzpatrick_scale:false,category:"activity"},skateboard:{keywords:["board"],char:"🛹",fitzpatrick_scale:false,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:"🛷",fitzpatrick_scale:false,category:"activity"},bow_and_arrow:{keywords:["sports"],char:"🏹",fitzpatrick_scale:false,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:"🎣",fitzpatrick_scale:false,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:"🥊",fitzpatrick_scale:false,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:"🥋",fitzpatrick_scale:false,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:"🚣♀️",fitzpatrick_scale:true,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:"🚣",fitzpatrick_scale:true,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:"🧗♀️",fitzpatrick_scale:true,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:"🧗♂️",fitzpatrick_scale:true,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:"🏊♀️",fitzpatrick_scale:true,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:"🏊",fitzpatrick_scale:true,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:"🤽♀️",fitzpatrick_scale:true,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:"🤽♂️",fitzpatrick_scale:true,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:"🧘♀️",fitzpatrick_scale:true,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:"🧘♂️",fitzpatrick_scale:true,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:"🏄♀️",fitzpatrick_scale:true,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:"🏄",fitzpatrick_scale:true,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:"🛀",fitzpatrick_scale:true,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:"⛹️♀️",fitzpatrick_scale:true,category:"activity"},basketball_man:{keywords:["sports","human"],char:"⛹",fitzpatrick_scale:true,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:"🏋️♀️",fitzpatrick_scale:true,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:"🏋",fitzpatrick_scale:true,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:"🚴♀️",fitzpatrick_scale:true,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:"🚴",fitzpatrick_scale:true,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:"🚵♀️",fitzpatrick_scale:true,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:"🚵",fitzpatrick_scale:true,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:"🏇",fitzpatrick_scale:true,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:"🕴",fitzpatrick_scale:true,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:"🏆",fitzpatrick_scale:false,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:"🎽",fitzpatrick_scale:false,category:"activity"},medal_sports:{keywords:["award","winning"],char:"🏅",fitzpatrick_scale:false,category:"activity"},medal_military:{keywords:["award","winning","army"],char:"🎖",fitzpatrick_scale:false,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:"🥇",fitzpatrick_scale:false,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:"🥈",fitzpatrick_scale:false,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:"🥉",fitzpatrick_scale:false,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:"🎗",fitzpatrick_scale:false,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:"🏵",fitzpatrick_scale:false,category:"activity"},ticket:{keywords:["event","concert","pass"],char:"🎫",fitzpatrick_scale:false,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:"🎟",fitzpatrick_scale:false,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:"🎭",fitzpatrick_scale:false,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:"🎨",fitzpatrick_scale:false,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:"🎪",fitzpatrick_scale:false,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹♀️",fitzpatrick_scale:true,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹♂️",fitzpatrick_scale:true,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:"🎤",fitzpatrick_scale:false,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:"🎧",fitzpatrick_scale:false,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:"🎼",fitzpatrick_scale:false,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:"🎹",fitzpatrick_scale:false,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:"🥁",fitzpatrick_scale:false,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:"🎷",fitzpatrick_scale:false,category:"activity"},trumpet:{keywords:["music","brass"],char:"🎺",fitzpatrick_scale:false,category:"activity"},guitar:{keywords:["music","instrument"],char:"🎸",fitzpatrick_scale:false,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:"🎻",fitzpatrick_scale:false,category:"activity"},clapper:{keywords:["movie","film","record"],char:"🎬",fitzpatrick_scale:false,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:"🎮",fitzpatrick_scale:false,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:"👾",fitzpatrick_scale:false,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:"🎯",fitzpatrick_scale:false,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:"🎲",fitzpatrick_scale:false,category:"activity"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:false,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"🎰",fitzpatrick_scale:false,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:"🧩",fitzpatrick_scale:false,category:"activity"},bowling:{keywords:["sports","fun","play"],char:"🎳",fitzpatrick_scale:false,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:"🚗",fitzpatrick_scale:false,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:"🚕",fitzpatrick_scale:false,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:"🚙",fitzpatrick_scale:false,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:"🚌",fitzpatrick_scale:false,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:"🚎",fitzpatrick_scale:false,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:"🏎",fitzpatrick_scale:false,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:"🚓",fitzpatrick_scale:false,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:"🚑",fitzpatrick_scale:false,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:"🚒",fitzpatrick_scale:false,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:"🚐",fitzpatrick_scale:false,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:"🚚",fitzpatrick_scale:false,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:"🚛",fitzpatrick_scale:false,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:"🚜",fitzpatrick_scale:false,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:"🛴",fitzpatrick_scale:false,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:"🏍",fitzpatrick_scale:false,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:"🚲",fitzpatrick_scale:false,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:"🛵",fitzpatrick_scale:false,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:"🚨",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:"🚔",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:"🚍",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:"🚘",fitzpatrick_scale:false,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:"🚖",fitzpatrick_scale:false,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:"🚡",fitzpatrick_scale:false,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:"🚠",fitzpatrick_scale:false,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:"🚟",fitzpatrick_scale:false,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:"🚃",fitzpatrick_scale:false,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:"🚋",fitzpatrick_scale:false,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:"🚝",fitzpatrick_scale:false,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:"🚄",fitzpatrick_scale:false,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:"🚅",fitzpatrick_scale:false,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:"🚈",fitzpatrick_scale:false,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:"🚞",fitzpatrick_scale:false,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:"🚂",fitzpatrick_scale:false,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:"🚆",fitzpatrick_scale:false,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:"🚇",fitzpatrick_scale:false,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:"🚊",fitzpatrick_scale:false,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:"🚉",fitzpatrick_scale:false,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:"🛸",fitzpatrick_scale:false,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:"🚁",fitzpatrick_scale:false,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:"🛩",fitzpatrick_scale:false,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:"✈️",fitzpatrick_scale:false,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:"🛫",fitzpatrick_scale:false,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:"🛬",fitzpatrick_scale:false,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:"⛵",fitzpatrick_scale:false,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:"🛥",fitzpatrick_scale:false,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:"🚤",fitzpatrick_scale:false,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:"⛴",fitzpatrick_scale:false,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:"🛳",fitzpatrick_scale:false,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:"🚀",fitzpatrick_scale:false,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:"🛰",fitzpatrick_scale:false,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:"💺",fitzpatrick_scale:false,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:"🛶",fitzpatrick_scale:false,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:"⚓",fitzpatrick_scale:false,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:"🚧",fitzpatrick_scale:false,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:"⛽",fitzpatrick_scale:false,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:"🚏",fitzpatrick_scale:false,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:"🚦",fitzpatrick_scale:false,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:"🚥",fitzpatrick_scale:false,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:"🏁",fitzpatrick_scale:false,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:"🚢",fitzpatrick_scale:false,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:"🎡",fitzpatrick_scale:false,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:"🎢",fitzpatrick_scale:false,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:"🎠",fitzpatrick_scale:false,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:"🏗",fitzpatrick_scale:false,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:"🌁",fitzpatrick_scale:false,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:"🗼",fitzpatrick_scale:false,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:"🏭",fitzpatrick_scale:false,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:"⛲",fitzpatrick_scale:false,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:"🎑",fitzpatrick_scale:false,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:"⛰",fitzpatrick_scale:false,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:"🏔",fitzpatrick_scale:false,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:"🗻",fitzpatrick_scale:false,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:"🌋",fitzpatrick_scale:false,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:"🗾",fitzpatrick_scale:false,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:"🏕",fitzpatrick_scale:false,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:"⛺",fitzpatrick_scale:false,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:"🏞",fitzpatrick_scale:false,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:"🛣",fitzpatrick_scale:false,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:"🛤",fitzpatrick_scale:false,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:"🌅",fitzpatrick_scale:false,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:"🌄",fitzpatrick_scale:false,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:"🏜",fitzpatrick_scale:false,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:"🏖",fitzpatrick_scale:false,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:"🏝",fitzpatrick_scale:false,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:"🌇",fitzpatrick_scale:false,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:"🌆",fitzpatrick_scale:false,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:"🏙",fitzpatrick_scale:false,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:"🌃",fitzpatrick_scale:false,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:"🌉",fitzpatrick_scale:false,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:"🌌",fitzpatrick_scale:false,category:"travel_and_places"},stars:{keywords:["night","photo"],char:"🌠",fitzpatrick_scale:false,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:"🎇",fitzpatrick_scale:false,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:"🎆",fitzpatrick_scale:false,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:"🌈",fitzpatrick_scale:false,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:"🏘",fitzpatrick_scale:false,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:"🏰",fitzpatrick_scale:false,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:"🏯",fitzpatrick_scale:false,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:"🏟",fitzpatrick_scale:false,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:"🗽",fitzpatrick_scale:false,category:"travel_and_places"},house:{keywords:["building","home"],char:"🏠",fitzpatrick_scale:false,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:"🏡",fitzpatrick_scale:false,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:"🏚",fitzpatrick_scale:false,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:"🏢",fitzpatrick_scale:false,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:"🏬",fitzpatrick_scale:false,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:"🏣",fitzpatrick_scale:false,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:"🏤",fitzpatrick_scale:false,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:"🏥",fitzpatrick_scale:false,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:"🏦",fitzpatrick_scale:false,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:"🏨",fitzpatrick_scale:false,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:"🏪",fitzpatrick_scale:false,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:"🏫",fitzpatrick_scale:false,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:"🏩",fitzpatrick_scale:false,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:"💒",fitzpatrick_scale:false,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:"🏛",fitzpatrick_scale:false,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:"⛪",fitzpatrick_scale:false,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:"🕌",fitzpatrick_scale:false,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:"🕍",fitzpatrick_scale:false,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:"🕋",fitzpatrick_scale:false,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:"⛩",fitzpatrick_scale:false,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:"⌚",fitzpatrick_scale:false,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:"📱",fitzpatrick_scale:false,category:"objects"},calling:{keywords:["iphone","incoming"],char:"📲",fitzpatrick_scale:false,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:"💻",fitzpatrick_scale:false,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:"⌨",fitzpatrick_scale:false,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:"🖥",fitzpatrick_scale:false,category:"objects"},printer:{keywords:["paper","ink"],char:"🖨",fitzpatrick_scale:false,category:"objects"},computer_mouse:{keywords:["click"],char:"🖱",fitzpatrick_scale:false,category:"objects"},trackball:{keywords:["technology","trackpad"],char:"🖲",fitzpatrick_scale:false,category:"objects"},joystick:{keywords:["game","play"],char:"🕹",fitzpatrick_scale:false,category:"objects"},clamp:{keywords:["tool"],char:"🗜",fitzpatrick_scale:false,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:"💽",fitzpatrick_scale:false,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:"💾",fitzpatrick_scale:false,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:"💿",fitzpatrick_scale:false,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:"📀",fitzpatrick_scale:false,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:"📼",fitzpatrick_scale:false,category:"objects"},camera:{keywords:["gadgets","photography"],char:"📷",fitzpatrick_scale:false,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:"📸",fitzpatrick_scale:false,category:"objects"},video_camera:{keywords:["film","record"],char:"📹",fitzpatrick_scale:false,category:"objects"},movie_camera:{keywords:["film","record"],char:"🎥",fitzpatrick_scale:false,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:"📽",fitzpatrick_scale:false,category:"objects"},film_strip:{keywords:["movie"],char:"🎞",fitzpatrick_scale:false,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:"📞",fitzpatrick_scale:false,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:"☎️",fitzpatrick_scale:false,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:"📟",fitzpatrick_scale:false,category:"objects"},fax:{keywords:["communication","technology"],char:"📠",fitzpatrick_scale:false,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:"📺",fitzpatrick_scale:false,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:"📻",fitzpatrick_scale:false,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:"🎙",fitzpatrick_scale:false,category:"objects"},level_slider:{keywords:["scale"],char:"🎚",fitzpatrick_scale:false,category:"objects"},control_knobs:{keywords:["dial"],char:"🎛",fitzpatrick_scale:false,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:"🧭",fitzpatrick_scale:false,category:"objects"},stopwatch:{keywords:["time","deadline"],char:"⏱",fitzpatrick_scale:false,category:"objects"},timer_clock:{keywords:["alarm"],char:"⏲",fitzpatrick_scale:false,category:"objects"},alarm_clock:{keywords:["time","wake"],char:"⏰",fitzpatrick_scale:false,category:"objects"},mantelpiece_clock:{keywords:["time"],char:"🕰",fitzpatrick_scale:false,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:"⏳",fitzpatrick_scale:false,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:"⌛",fitzpatrick_scale:false,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:"📡",fitzpatrick_scale:false,category:"objects"},battery:{keywords:["power","energy","sustain"],char:"🔋",fitzpatrick_scale:false,category:"objects"},electric_plug:{keywords:["charger","power"],char:"🔌",fitzpatrick_scale:false,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:"💡",fitzpatrick_scale:false,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:"🔦",fitzpatrick_scale:false,category:"objects"},candle:{keywords:["fire","wax"],char:"🕯",fitzpatrick_scale:false,category:"objects"},fire_extinguisher:{keywords:["quench"],char:"🧯",fitzpatrick_scale:false,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:"🗑",fitzpatrick_scale:false,category:"objects"},oil_drum:{keywords:["barrell"],char:"🛢",fitzpatrick_scale:false,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:"💸",fitzpatrick_scale:false,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:"💵",fitzpatrick_scale:false,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:"💴",fitzpatrick_scale:false,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:"💶",fitzpatrick_scale:false,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:"💷",fitzpatrick_scale:false,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:"💰",fitzpatrick_scale:false,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:"💳",fitzpatrick_scale:false,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:"💎",fitzpatrick_scale:false,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:"⚖",fitzpatrick_scale:false,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:"🧰",fitzpatrick_scale:false,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:"🔧",fitzpatrick_scale:false,category:"objects"},hammer:{keywords:["tools","build","create"],char:"🔨",fitzpatrick_scale:false,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:"⚒",fitzpatrick_scale:false,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:"🛠",fitzpatrick_scale:false,category:"objects"},pick:{keywords:["tools","dig"],char:"⛏",fitzpatrick_scale:false,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:"🔩",fitzpatrick_scale:false,category:"objects"},gear:{keywords:["cog"],char:"⚙",fitzpatrick_scale:false,category:"objects"},brick:{keywords:["bricks"],char:"🧱",fitzpatrick_scale:false,category:"objects"},chains:{keywords:["lock","arrest"],char:"⛓",fitzpatrick_scale:false,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:"🧲",fitzpatrick_scale:false,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:"🔫",fitzpatrick_scale:false,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:"💣",fitzpatrick_scale:false,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:"🧨",fitzpatrick_scale:false,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:"🔪",fitzpatrick_scale:false,category:"objects"},dagger:{keywords:["weapon"],char:"🗡",fitzpatrick_scale:false,category:"objects"},crossed_swords:{keywords:["weapon"],char:"⚔",fitzpatrick_scale:false,category:"objects"},shield:{keywords:["protection","security"],char:"🛡",fitzpatrick_scale:false,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:"🚬",fitzpatrick_scale:false,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:"☠",fitzpatrick_scale:false,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:"⚰",fitzpatrick_scale:false,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:"⚱",fitzpatrick_scale:false,category:"objects"},amphora:{keywords:["vase","jar"],char:"🏺",fitzpatrick_scale:false,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:"🔮",fitzpatrick_scale:false,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:"📿",fitzpatrick_scale:false,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:"🧿",fitzpatrick_scale:false,category:"objects"},barber:{keywords:["hair","salon","style"],char:"💈",fitzpatrick_scale:false,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:"⚗",fitzpatrick_scale:false,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:"🔭",fitzpatrick_scale:false,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:"🔬",fitzpatrick_scale:false,category:"objects"},hole:{keywords:["embarrassing"],char:"🕳",fitzpatrick_scale:false,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:"💊",fitzpatrick_scale:false,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:"💉",fitzpatrick_scale:false,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:"🧬",fitzpatrick_scale:false,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"🦠",fitzpatrick_scale:false,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"🧫",fitzpatrick_scale:false,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"🧪",fitzpatrick_scale:false,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"🌡",fitzpatrick_scale:false,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"🧹",fitzpatrick_scale:false,category:"objects"},basket:{keywords:["laundry"],char:"🧺",fitzpatrick_scale:false,category:"objects"},toilet_paper:{keywords:["roll"],char:"🧻",fitzpatrick_scale:false,category:"objects"},label:{keywords:["sale","tag"],char:"🏷",fitzpatrick_scale:false,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:"🔖",fitzpatrick_scale:false,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:"🚽",fitzpatrick_scale:false,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:"🚿",fitzpatrick_scale:false,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:"🛁",fitzpatrick_scale:false,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"🧼",fitzpatrick_scale:false,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"🧽",fitzpatrick_scale:false,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:"🧴",fitzpatrick_scale:false,category:"objects"},key:{keywords:["lock","door","password"],char:"🔑",fitzpatrick_scale:false,category:"objects"},old_key:{keywords:["lock","door","password"],char:"🗝",fitzpatrick_scale:false,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:"🛋",fitzpatrick_scale:false,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:"🛌",fitzpatrick_scale:true,category:"objects"},bed:{keywords:["sleep","rest"],char:"🛏",fitzpatrick_scale:false,category:"objects"},door:{keywords:["house","entry","exit"],char:"🚪",fitzpatrick_scale:false,category:"objects"},bellhop_bell:{keywords:["service"],char:"🛎",fitzpatrick_scale:false,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:"🧸",fitzpatrick_scale:false,category:"objects"},framed_picture:{keywords:["photography"],char:"🖼",fitzpatrick_scale:false,category:"objects"},world_map:{keywords:["location","direction"],char:"🗺",fitzpatrick_scale:false,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:"⛱",fitzpatrick_scale:false,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:"🗿",fitzpatrick_scale:false,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:"🛍",fitzpatrick_scale:false,category:"objects"},shopping_cart:{keywords:["trolley"],char:"🛒",fitzpatrick_scale:false,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:"🎈",fitzpatrick_scale:false,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:"🎏",fitzpatrick_scale:false,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:"🎀",fitzpatrick_scale:false,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:"🎁",fitzpatrick_scale:false,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:"🎊",fitzpatrick_scale:false,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:"🎉",fitzpatrick_scale:false,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:"🎎",fitzpatrick_scale:false,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:"🎐",fitzpatrick_scale:false,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:"🎌",fitzpatrick_scale:false,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:"🏮",fitzpatrick_scale:false,category:"objects"},red_envelope:{keywords:["gift"],char:"🧧",fitzpatrick_scale:false,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:"✉️",fitzpatrick_scale:false,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:"📩",fitzpatrick_scale:false,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:"📨",fitzpatrick_scale:false,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:"📧",fitzpatrick_scale:false,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:"💌",fitzpatrick_scale:false,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:"📮",fitzpatrick_scale:false,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:"📪",fitzpatrick_scale:false,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:"📫",fitzpatrick_scale:false,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:"📬",fitzpatrick_scale:false,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:"📭",fitzpatrick_scale:false,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:"📦",fitzpatrick_scale:false,category:"objects"},postal_horn:{keywords:["instrument","music"],char:"📯",fitzpatrick_scale:false,category:"objects"},inbox_tray:{keywords:["email","documents"],char:"📥",fitzpatrick_scale:false,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:"📤",fitzpatrick_scale:false,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:"📜",fitzpatrick_scale:false,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:"📃",fitzpatrick_scale:false,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:"📑",fitzpatrick_scale:false,category:"objects"},receipt:{keywords:["accounting","expenses"],char:"🧾",fitzpatrick_scale:false,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:"📊",fitzpatrick_scale:false,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:"📈",fitzpatrick_scale:false,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:"📉",fitzpatrick_scale:false,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:"📄",fitzpatrick_scale:false,category:"objects"},date:{keywords:["calendar","schedule"],char:"📅",fitzpatrick_scale:false,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:"📆",fitzpatrick_scale:false,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:"🗓",fitzpatrick_scale:false,category:"objects"},card_index:{keywords:["business","stationery"],char:"📇",fitzpatrick_scale:false,category:"objects"},card_file_box:{keywords:["business","stationery"],char:"🗃",fitzpatrick_scale:false,category:"objects"},ballot_box:{keywords:["election","vote"],char:"🗳",fitzpatrick_scale:false,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:"🗄",fitzpatrick_scale:false,category:"objects"},clipboard:{keywords:["stationery","documents"],char:"📋",fitzpatrick_scale:false,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:"🗒",fitzpatrick_scale:false,category:"objects"},file_folder:{keywords:["documents","business","office"],char:"📁",fitzpatrick_scale:false,category:"objects"},open_file_folder:{keywords:["documents","load"],char:"📂",fitzpatrick_scale:false,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:"🗂",fitzpatrick_scale:false,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:"🗞",fitzpatrick_scale:false,category:"objects"},newspaper:{keywords:["press","headline"],char:"📰",fitzpatrick_scale:false,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:"📓",fitzpatrick_scale:false,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:"📕",fitzpatrick_scale:false,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:"📗",fitzpatrick_scale:false,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:"📘",fitzpatrick_scale:false,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:"📙",fitzpatrick_scale:false,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:"📔",fitzpatrick_scale:false,category:"objects"},ledger:{keywords:["notes","paper"],char:"📒",fitzpatrick_scale:false,category:"objects"},books:{keywords:["literature","library","study"],char:"📚",fitzpatrick_scale:false,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:"📖",fitzpatrick_scale:false,category:"objects"},safety_pin:{keywords:["diaper"],char:"🧷",fitzpatrick_scale:false,category:"objects"},link:{keywords:["rings","url"],char:"🔗",fitzpatrick_scale:false,category:"objects"},paperclip:{keywords:["documents","stationery"],char:"📎",fitzpatrick_scale:false,category:"objects"},paperclips:{keywords:["documents","stationery"],char:"🖇",fitzpatrick_scale:false,category:"objects"},scissors:{keywords:["stationery","cut"],char:"✂️",fitzpatrick_scale:false,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:"📐",fitzpatrick_scale:false,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:"📏",fitzpatrick_scale:false,category:"objects"},abacus:{keywords:["calculation"],char:"🧮",fitzpatrick_scale:false,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:"📌",fitzpatrick_scale:false,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:"📍",fitzpatrick_scale:false,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:"🚩",fitzpatrick_scale:false,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:"🏳",fitzpatrick_scale:false,category:"objects"},black_flag:{keywords:["pirate"],char:"🏴",fitzpatrick_scale:false,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:"🏳️🌈",fitzpatrick_scale:false,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:"🔐",fitzpatrick_scale:false,category:"objects"},lock:{keywords:["security","password","padlock"],char:"🔒",fitzpatrick_scale:false,category:"objects"},unlock:{keywords:["privacy","security"],char:"🔓",fitzpatrick_scale:false,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:"🔏",fitzpatrick_scale:false,category:"objects"},pen:{keywords:["stationery","writing","write"],char:"🖊",fitzpatrick_scale:false,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:"🖋",fitzpatrick_scale:false,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:"✒️",fitzpatrick_scale:false,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:"📝",fitzpatrick_scale:false,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:"✏️",fitzpatrick_scale:false,category:"objects"},crayon:{keywords:["drawing","creativity"],char:"🖍",fitzpatrick_scale:false,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:"🖌",fitzpatrick_scale:false,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:"🔍",fitzpatrick_scale:false,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:"🔎",fitzpatrick_scale:false,category:"objects"},heart:{keywords:["love","like","valentines"],char:"❤️",fitzpatrick_scale:false,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:"🧡",fitzpatrick_scale:false,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:"💛",fitzpatrick_scale:false,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:"💚",fitzpatrick_scale:false,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:"💙",fitzpatrick_scale:false,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:"💜",fitzpatrick_scale:false,category:"symbols"},black_heart:{keywords:["evil"],char:"🖤",fitzpatrick_scale:false,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:"💔",fitzpatrick_scale:false,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:"❣",fitzpatrick_scale:false,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:"💕",fitzpatrick_scale:false,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:"💞",fitzpatrick_scale:false,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:"💓",fitzpatrick_scale:false,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:"💗",fitzpatrick_scale:false,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:"💖",fitzpatrick_scale:false,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:"💘",fitzpatrick_scale:false,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:"💝",fitzpatrick_scale:false,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:"💟",fitzpatrick_scale:false,category:"symbols"},peace_symbol:{keywords:["hippie"],char:"☮",fitzpatrick_scale:false,category:"symbols"},latin_cross:{keywords:["christianity"],char:"✝",fitzpatrick_scale:false,category:"symbols"},star_and_crescent:{keywords:["islam"],char:"☪",fitzpatrick_scale:false,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"🕉",fitzpatrick_scale:false,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"☸",fitzpatrick_scale:false,category:"symbols"},star_of_david:{keywords:["judaism"],char:"✡",fitzpatrick_scale:false,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:"🔯",fitzpatrick_scale:false,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:"🕎",fitzpatrick_scale:false,category:"symbols"},yin_yang:{keywords:["balance"],char:"☯",fitzpatrick_scale:false,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:"☦",fitzpatrick_scale:false,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:"🛐",fitzpatrick_scale:false,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:"⛎",fitzpatrick_scale:false,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:"♈",fitzpatrick_scale:false,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:"♉",fitzpatrick_scale:false,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:"♊",fitzpatrick_scale:false,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:"♋",fitzpatrick_scale:false,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:"♌",fitzpatrick_scale:false,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:"♍",fitzpatrick_scale:false,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:"♎",fitzpatrick_scale:false,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:"♏",fitzpatrick_scale:false,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:"♐",fitzpatrick_scale:false,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:"♑",fitzpatrick_scale:false,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:"♒",fitzpatrick_scale:false,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:"♓",fitzpatrick_scale:false,category:"symbols"},id:{keywords:["purple-square","words"],char:"🆔",fitzpatrick_scale:false,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:"⚛",fitzpatrick_scale:false,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:"🈳",fitzpatrick_scale:false,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:"🈹",fitzpatrick_scale:false,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:"☢",fitzpatrick_scale:false,category:"symbols"},biohazard:{keywords:["danger"],char:"☣",fitzpatrick_scale:false,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:"📴",fitzpatrick_scale:false,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:"📳",fitzpatrick_scale:false,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:"🈶",fitzpatrick_scale:false,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:"🈚",fitzpatrick_scale:false,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:"🈸",fitzpatrick_scale:false,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:"🈺",fitzpatrick_scale:false,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:"🈷️",fitzpatrick_scale:false,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:"✴️",fitzpatrick_scale:false,category:"symbols"},vs:{keywords:["words","orange-square"],char:"🆚",fitzpatrick_scale:false,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:"🉑",fitzpatrick_scale:false,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:"💮",fitzpatrick_scale:false,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:"🉐",fitzpatrick_scale:false,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:"㊙️",fitzpatrick_scale:false,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:"㊗️",fitzpatrick_scale:false,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:"🈴",fitzpatrick_scale:false,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:"🈵",fitzpatrick_scale:false,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:"🈲",fitzpatrick_scale:false,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:"🅰️",fitzpatrick_scale:false,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:"🅱️",fitzpatrick_scale:false,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:"🆎",fitzpatrick_scale:false,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:"🆑",fitzpatrick_scale:false,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:"🅾️",fitzpatrick_scale:false,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:"🆘",fitzpatrick_scale:false,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:"⛔",fitzpatrick_scale:false,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:"📛",fitzpatrick_scale:false,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:"🚫",fitzpatrick_scale:false,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:"❌",fitzpatrick_scale:false,category:"symbols"},o:{keywords:["circle","round"],char:"⭕",fitzpatrick_scale:false,category:"symbols"},stop_sign:{keywords:["stop"],char:"🛑",fitzpatrick_scale:false,category:"symbols"},anger:{keywords:["angry","mad"],char:"💢",fitzpatrick_scale:false,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:"♨️",fitzpatrick_scale:false,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:"🚷",fitzpatrick_scale:false,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:"🚯",fitzpatrick_scale:false,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:"🚳",fitzpatrick_scale:false,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:"🚱",fitzpatrick_scale:false,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:"🔞",fitzpatrick_scale:false,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:"📵",fitzpatrick_scale:false,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:"❗",fitzpatrick_scale:false,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:"❕",fitzpatrick_scale:false,category:"symbols"},question:{keywords:["doubt","confused"],char:"❓",fitzpatrick_scale:false,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:"❔",fitzpatrick_scale:false,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:"‼️",fitzpatrick_scale:false,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:"⁉️",fitzpatrick_scale:false,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:"💯",fitzpatrick_scale:false,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:"🔅",fitzpatrick_scale:false,category:"symbols"},high_brightness:{keywords:["sun","light"],char:"🔆",fitzpatrick_scale:false,category:"symbols"},trident:{keywords:["weapon","spear"],char:"🔱",fitzpatrick_scale:false,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:"⚜",fitzpatrick_scale:false,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:"〽️",fitzpatrick_scale:false,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:"⚠️",fitzpatrick_scale:false,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:"🚸",fitzpatrick_scale:false,category:"symbols"},beginner:{keywords:["badge","shield"],char:"🔰",fitzpatrick_scale:false,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:"♻️",fitzpatrick_scale:false,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:"🈯",fitzpatrick_scale:false,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:"💹",fitzpatrick_scale:false,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:"❇️",fitzpatrick_scale:false,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:"✳️",fitzpatrick_scale:false,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:"❎",fitzpatrick_scale:false,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:"✅",fitzpatrick_scale:false,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:"💠",fitzpatrick_scale:false,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:"🌀",fitzpatrick_scale:false,category:"symbols"},loop:{keywords:["tape","cassette"],char:"➿",fitzpatrick_scale:false,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:"🌐",fitzpatrick_scale:false,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:"Ⓜ️",fitzpatrick_scale:false,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:"🏧",fitzpatrick_scale:false,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:"🈂️",fitzpatrick_scale:false,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:"🛂",fitzpatrick_scale:false,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:"🛃",fitzpatrick_scale:false,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:"🛄",fitzpatrick_scale:false,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:"🛅",fitzpatrick_scale:false,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:"♿",fitzpatrick_scale:false,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:"🚭",fitzpatrick_scale:false,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:"🚾",fitzpatrick_scale:false,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:"🅿️",fitzpatrick_scale:false,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:"🚰",fitzpatrick_scale:false,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:"🚹",fitzpatrick_scale:false,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:"🚺",fitzpatrick_scale:false,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:"🚼",fitzpatrick_scale:false,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:"🚻",fitzpatrick_scale:false,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:"🚮",fitzpatrick_scale:false,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:"🎦",fitzpatrick_scale:false,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:"📶",fitzpatrick_scale:false,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:"🈁",fitzpatrick_scale:false,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:"🆖",fitzpatrick_scale:false,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:"🆗",fitzpatrick_scale:false,category:"symbols"},up:{keywords:["blue-square","above","high"],char:"🆙",fitzpatrick_scale:false,category:"symbols"},cool:{keywords:["words","blue-square"],char:"🆒",fitzpatrick_scale:false,category:"symbols"},new:{keywords:["blue-square","words","start"],char:"🆕",fitzpatrick_scale:false,category:"symbols"},free:{keywords:["blue-square","words"],char:"🆓",fitzpatrick_scale:false,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:"0️⃣",fitzpatrick_scale:false,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:"1️⃣",fitzpatrick_scale:false,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:"2️⃣",fitzpatrick_scale:false,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:"3️⃣",fitzpatrick_scale:false,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:"4️⃣",fitzpatrick_scale:false,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:"5️⃣",fitzpatrick_scale:false,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:"6️⃣",fitzpatrick_scale:false,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:"7️⃣",fitzpatrick_scale:false,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:"8️⃣",fitzpatrick_scale:false,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:"9️⃣",fitzpatrick_scale:false,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:"🔟",fitzpatrick_scale:false,category:"symbols"},asterisk:{keywords:["star","keycap"],char:"*⃣",fitzpatrick_scale:false,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:"🔢",fitzpatrick_scale:false,category:"symbols"},eject_button:{keywords:["blue-square"],char:"⏏️",fitzpatrick_scale:false,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:"▶️",fitzpatrick_scale:false,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:"⏸",fitzpatrick_scale:false,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:"⏭",fitzpatrick_scale:false,category:"symbols"},stop_button:{keywords:["blue-square"],char:"⏹",fitzpatrick_scale:false,category:"symbols"},record_button:{keywords:["blue-square"],char:"⏺",fitzpatrick_scale:false,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:"⏯",fitzpatrick_scale:false,category:"symbols"},previous_track_button:{keywords:["backward"],char:"⏮",fitzpatrick_scale:false,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:"⏩",fitzpatrick_scale:false,category:"symbols"},rewind:{keywords:["play","blue-square"],char:"⏪",fitzpatrick_scale:false,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:"🔀",fitzpatrick_scale:false,category:"symbols"},repeat:{keywords:["loop","record"],char:"🔁",fitzpatrick_scale:false,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:"🔂",fitzpatrick_scale:false,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:"◀️",fitzpatrick_scale:false,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:"🔼",fitzpatrick_scale:false,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:"🔽",fitzpatrick_scale:false,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:"⏫",fitzpatrick_scale:false,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:"⏬",fitzpatrick_scale:false,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:"➡️",fitzpatrick_scale:false,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:"⬅️",fitzpatrick_scale:false,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:"⬆️",fitzpatrick_scale:false,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:"⬇️",fitzpatrick_scale:false,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:"↗️",fitzpatrick_scale:false,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:"↘️",fitzpatrick_scale:false,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:"↙️",fitzpatrick_scale:false,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:"↖️",fitzpatrick_scale:false,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:"↕️",fitzpatrick_scale:false,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:"↔️",fitzpatrick_scale:false,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:"🔄",fitzpatrick_scale:false,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:"↪️",fitzpatrick_scale:false,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:"↩️",fitzpatrick_scale:false,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:"⤴️",fitzpatrick_scale:false,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:"⤵️",fitzpatrick_scale:false,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:"#️⃣",fitzpatrick_scale:false,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:"ℹ️",fitzpatrick_scale:false,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:"🔤",fitzpatrick_scale:false,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:"🔡",fitzpatrick_scale:false,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:"🔠",fitzpatrick_scale:false,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:"🔣",fitzpatrick_scale:false,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:"🎵",fitzpatrick_scale:false,category:"symbols"},notes:{keywords:["music","score"],char:"🎶",fitzpatrick_scale:false,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:"〰️",fitzpatrick_scale:false,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:"➰",fitzpatrick_scale:false,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:"✔️",fitzpatrick_scale:false,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:"🔃",fitzpatrick_scale:false,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:"➕",fitzpatrick_scale:false,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:"➖",fitzpatrick_scale:false,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:"➗",fitzpatrick_scale:false,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:"✖️",fitzpatrick_scale:false,category:"symbols"},infinity:{keywords:["forever"],char:"♾",fitzpatrick_scale:false,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:"💲",fitzpatrick_scale:false,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:"💱",fitzpatrick_scale:false,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:"©️",fitzpatrick_scale:false,category:"symbols"},registered:{keywords:["alphabet","circle"],char:"®️",fitzpatrick_scale:false,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:"™️",fitzpatrick_scale:false,category:"symbols"},end:{keywords:["words","arrow"],char:"🔚",fitzpatrick_scale:false,category:"symbols"},back:{keywords:["arrow","words","return"],char:"🔙",fitzpatrick_scale:false,category:"symbols"},on:{keywords:["arrow","words"],char:"🔛",fitzpatrick_scale:false,category:"symbols"},top:{keywords:["words","blue-square"],char:"🔝",fitzpatrick_scale:false,category:"symbols"},soon:{keywords:["arrow","words"],char:"🔜",fitzpatrick_scale:false,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:"☑️",fitzpatrick_scale:false,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:"🔘",fitzpatrick_scale:false,category:"symbols"},white_circle:{keywords:["shape","round"],char:"⚪",fitzpatrick_scale:false,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:"⚫",fitzpatrick_scale:false,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:"🔴",fitzpatrick_scale:false,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:"🔵",fitzpatrick_scale:false,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔸",fitzpatrick_scale:false,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔹",fitzpatrick_scale:false,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔶",fitzpatrick_scale:false,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔷",fitzpatrick_scale:false,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:"🔺",fitzpatrick_scale:false,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:"▪️",fitzpatrick_scale:false,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:"▫️",fitzpatrick_scale:false,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:"⬛",fitzpatrick_scale:false,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:"⬜",fitzpatrick_scale:false,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:"🔻",fitzpatrick_scale:false,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:"◼️",fitzpatrick_scale:false,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:"◻️",fitzpatrick_scale:false,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:"◾",fitzpatrick_scale:false,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:"◽",fitzpatrick_scale:false,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:"🔲",fitzpatrick_scale:false,category:"symbols"},white_square_button:{keywords:["shape","input"],char:"🔳",fitzpatrick_scale:false,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:"🔈",fitzpatrick_scale:false,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:"🔉",fitzpatrick_scale:false,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:"🔊",fitzpatrick_scale:false,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:"🔇",fitzpatrick_scale:false,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:"📣",fitzpatrick_scale:false,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:"📢",fitzpatrick_scale:false,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:"🔔",fitzpatrick_scale:false,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:"🔕",fitzpatrick_scale:false,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:"🃏",fitzpatrick_scale:false,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:"🀄",fitzpatrick_scale:false,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:"♠️",fitzpatrick_scale:false,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:"♣️",fitzpatrick_scale:false,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:"♥️",fitzpatrick_scale:false,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:"♦️",fitzpatrick_scale:false,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:"🎴",fitzpatrick_scale:false,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:"💭",fitzpatrick_scale:false,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:"🗯",fitzpatrick_scale:false,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:"💬",fitzpatrick_scale:false,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:"🗨",fitzpatrick_scale:false,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:"🕐",fitzpatrick_scale:false,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:"🕑",fitzpatrick_scale:false,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:"🕒",fitzpatrick_scale:false,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:"🕓",fitzpatrick_scale:false,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:"🕔",fitzpatrick_scale:false,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:"🕕",fitzpatrick_scale:false,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:"🕖",fitzpatrick_scale:false,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:"🕗",fitzpatrick_scale:false,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:"🕘",fitzpatrick_scale:false,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:"🕙",fitzpatrick_scale:false,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:"🕚",fitzpatrick_scale:false,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:"🕛",fitzpatrick_scale:false,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:"🕜",fitzpatrick_scale:false,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:"🕝",fitzpatrick_scale:false,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:"🕞",fitzpatrick_scale:false,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:"🕟",fitzpatrick_scale:false,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:"🕠",fitzpatrick_scale:false,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:"🕡",fitzpatrick_scale:false,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:"🕢",fitzpatrick_scale:false,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:"🕣",fitzpatrick_scale:false,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:"🕤",fitzpatrick_scale:false,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:"🕥",fitzpatrick_scale:false,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:"🕦",fitzpatrick_scale:false,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:"🕧",fitzpatrick_scale:false,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:"🇦🇫",fitzpatrick_scale:false,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],char:"🇦🇽",fitzpatrick_scale:false,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:"🇦🇱",fitzpatrick_scale:false,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:"🇩🇿",fitzpatrick_scale:false,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:"🇦🇸",fitzpatrick_scale:false,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:"🇦🇩",fitzpatrick_scale:false,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:"🇦🇴",fitzpatrick_scale:false,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:"🇦🇮",fitzpatrick_scale:false,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:"🇦🇶",fitzpatrick_scale:false,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:"🇦🇬",fitzpatrick_scale:false,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:"🇦🇷",fitzpatrick_scale:false,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:"🇦🇲",fitzpatrick_scale:false,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:"🇦🇼",fitzpatrick_scale:false,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:"🇦🇺",fitzpatrick_scale:false,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:"🇦🇹",fitzpatrick_scale:false,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:"🇦🇿",fitzpatrick_scale:false,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:"🇧🇸",fitzpatrick_scale:false,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:"🇧🇭",fitzpatrick_scale:false,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:"🇧🇩",fitzpatrick_scale:false,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:"🇧🇧",fitzpatrick_scale:false,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:"🇧🇾",fitzpatrick_scale:false,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:"🇧🇪",fitzpatrick_scale:false,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:"🇧🇿",fitzpatrick_scale:false,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:"🇧🇯",fitzpatrick_scale:false,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:"🇧🇲",fitzpatrick_scale:false,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:"🇧🇹",fitzpatrick_scale:false,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:"🇧🇴",fitzpatrick_scale:false,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:"🇧🇶",fitzpatrick_scale:false,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:"🇧🇦",fitzpatrick_scale:false,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:"🇧🇼",fitzpatrick_scale:false,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:"🇧🇷",fitzpatrick_scale:false,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:"🇮🇴",fitzpatrick_scale:false,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:"🇻🇬",fitzpatrick_scale:false,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:"🇧🇳",fitzpatrick_scale:false,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:"🇧🇬",fitzpatrick_scale:false,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:"🇧🇫",fitzpatrick_scale:false,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:"🇧🇮",fitzpatrick_scale:false,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:"🇨🇻",fitzpatrick_scale:false,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:"🇰🇭",fitzpatrick_scale:false,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:"🇨🇲",fitzpatrick_scale:false,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:"🇨🇦",fitzpatrick_scale:false,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:"🇮🇨",fitzpatrick_scale:false,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:"🇰🇾",fitzpatrick_scale:false,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:"🇨🇫",fitzpatrick_scale:false,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:"🇹🇩",fitzpatrick_scale:false,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:"🇨🇱",fitzpatrick_scale:false,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:"🇨🇳",fitzpatrick_scale:false,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:"🇨🇽",fitzpatrick_scale:false,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:"🇨🇨",fitzpatrick_scale:false,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:"🇨🇴",fitzpatrick_scale:false,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:"🇰🇲",fitzpatrick_scale:false,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:"🇨🇬",fitzpatrick_scale:false,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:"🇨🇩",fitzpatrick_scale:false,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:"🇨🇰",fitzpatrick_scale:false,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:"🇨🇷",fitzpatrick_scale:false,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:"🇭🇷",fitzpatrick_scale:false,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:"🇨🇺",fitzpatrick_scale:false,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],char:"🇨🇼",fitzpatrick_scale:false,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:"🇨🇾",fitzpatrick_scale:false,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:"🇨🇿",fitzpatrick_scale:false,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:"🇩🇰",fitzpatrick_scale:false,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:"🇩🇯",fitzpatrick_scale:false,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:"🇩🇲",fitzpatrick_scale:false,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:"🇩🇴",fitzpatrick_scale:false,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:"🇪🇨",fitzpatrick_scale:false,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:"🇪🇬",fitzpatrick_scale:false,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:"🇸🇻",fitzpatrick_scale:false,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:"🇬🇶",fitzpatrick_scale:false,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:"🇪🇷",fitzpatrick_scale:false,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:"🇪🇪",fitzpatrick_scale:false,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:"🇪🇹",fitzpatrick_scale:false,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:"🇪🇺",fitzpatrick_scale:false,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:"🇫🇰",fitzpatrick_scale:false,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:"🇫🇴",fitzpatrick_scale:false,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:"🇫🇯",fitzpatrick_scale:false,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:"🇫🇮",fitzpatrick_scale:false,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:"🇫🇷",fitzpatrick_scale:false,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:"🇬🇫",fitzpatrick_scale:false,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:"🇵🇫",fitzpatrick_scale:false,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:"🇹🇫",fitzpatrick_scale:false,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:"🇬🇦",fitzpatrick_scale:false,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:"🇬🇲",fitzpatrick_scale:false,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:"🇬🇪",fitzpatrick_scale:false,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:"🇩🇪",fitzpatrick_scale:false,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:"🇬🇭",fitzpatrick_scale:false,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:"🇬🇮",fitzpatrick_scale:false,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:"🇬🇷",fitzpatrick_scale:false,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:"🇬🇱",fitzpatrick_scale:false,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:"🇬🇩",fitzpatrick_scale:false,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:"🇬🇵",fitzpatrick_scale:false,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:"🇬🇺",fitzpatrick_scale:false,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:"🇬🇹",fitzpatrick_scale:false,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:"🇬🇬",fitzpatrick_scale:false,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:"🇬🇳",fitzpatrick_scale:false,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:"🇬🇼",fitzpatrick_scale:false,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:"🇬🇾",fitzpatrick_scale:false,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:"🇭🇹",fitzpatrick_scale:false,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:"🇭🇳",fitzpatrick_scale:false,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:"🇭🇰",fitzpatrick_scale:false,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:"🇭🇺",fitzpatrick_scale:false,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:"🇮🇸",fitzpatrick_scale:false,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:"🇮🇳",fitzpatrick_scale:false,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:"🇮🇩",fitzpatrick_scale:false,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:"🇮🇷",fitzpatrick_scale:false,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:"🇮🇶",fitzpatrick_scale:false,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:"🇮🇪",fitzpatrick_scale:false,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:"🇮🇲",fitzpatrick_scale:false,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:"🇮🇱",fitzpatrick_scale:false,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:"🇮🇹",fitzpatrick_scale:false,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:"🇨🇮",fitzpatrick_scale:false,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:"🇯🇲",fitzpatrick_scale:false,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:"🇯🇵",fitzpatrick_scale:false,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:"🇯🇪",fitzpatrick_scale:false,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:"🇯🇴",fitzpatrick_scale:false,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:"🇰🇿",fitzpatrick_scale:false,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:"🇰🇪",fitzpatrick_scale:false,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:"🇰🇮",fitzpatrick_scale:false,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:"🇽🇰",fitzpatrick_scale:false,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:"🇰🇼",fitzpatrick_scale:false,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:"🇰🇬",fitzpatrick_scale:false,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:"🇱🇦",fitzpatrick_scale:false,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:"🇱🇻",fitzpatrick_scale:false,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:"🇱🇧",fitzpatrick_scale:false,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:"🇱🇸",fitzpatrick_scale:false,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:"🇱🇷",fitzpatrick_scale:false,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:"🇱🇾",fitzpatrick_scale:false,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:"🇱🇮",fitzpatrick_scale:false,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:"🇱🇹",fitzpatrick_scale:false,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:"🇱🇺",fitzpatrick_scale:false,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:"🇲🇴",fitzpatrick_scale:false,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:"🇲🇰",fitzpatrick_scale:false,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:"🇲🇬",fitzpatrick_scale:false,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:"🇲🇼",fitzpatrick_scale:false,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:"🇲🇾",fitzpatrick_scale:false,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:"🇲🇻",fitzpatrick_scale:false,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:"🇲🇱",fitzpatrick_scale:false,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:"🇲🇹",fitzpatrick_scale:false,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:"🇲🇭",fitzpatrick_scale:false,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:"🇲🇶",fitzpatrick_scale:false,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:"🇲🇷",fitzpatrick_scale:false,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:"🇲🇺",fitzpatrick_scale:false,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:"🇾🇹",fitzpatrick_scale:false,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:"🇲🇽",fitzpatrick_scale:false,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:"🇫🇲",fitzpatrick_scale:false,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:"🇲🇩",fitzpatrick_scale:false,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:"🇲🇨",fitzpatrick_scale:false,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:"🇲🇳",fitzpatrick_scale:false,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:"🇲🇪",fitzpatrick_scale:false,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:"🇲🇸",fitzpatrick_scale:false,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:"🇲🇦",fitzpatrick_scale:false,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:"🇲🇿",fitzpatrick_scale:false,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:"🇲🇲",fitzpatrick_scale:false,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:"🇳🇦",fitzpatrick_scale:false,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:"🇳🇷",fitzpatrick_scale:false,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:"🇳🇵",fitzpatrick_scale:false,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:"🇳🇱",fitzpatrick_scale:false,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:"🇳🇨",fitzpatrick_scale:false,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:"🇳🇿",fitzpatrick_scale:false,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:"🇳🇮",fitzpatrick_scale:false,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:"🇳🇪",fitzpatrick_scale:false,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:"🇳🇬",fitzpatrick_scale:false,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:"🇳🇺",fitzpatrick_scale:false,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:"🇳🇫",fitzpatrick_scale:false,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:"🇲🇵",fitzpatrick_scale:false,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:"🇰🇵",fitzpatrick_scale:false,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:"🇳🇴",fitzpatrick_scale:false,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:"🇴🇲",fitzpatrick_scale:false,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:"🇵🇰",fitzpatrick_scale:false,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:"🇵🇼",fitzpatrick_scale:false,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:"🇵🇸",fitzpatrick_scale:false,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:"🇵🇦",fitzpatrick_scale:false,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:"🇵🇬",fitzpatrick_scale:false,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:"🇵🇾",fitzpatrick_scale:false,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:"🇵🇪",fitzpatrick_scale:false,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:"🇵🇭",fitzpatrick_scale:false,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:"🇵🇳",fitzpatrick_scale:false,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:"🇵🇱",fitzpatrick_scale:false,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:"🇵🇹",fitzpatrick_scale:false,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:"🇵🇷",fitzpatrick_scale:false,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:"🇶🇦",fitzpatrick_scale:false,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],char:"🇷🇪",fitzpatrick_scale:false,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:"🇷🇴",fitzpatrick_scale:false,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:"🇷🇺",fitzpatrick_scale:false,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:"🇷🇼",fitzpatrick_scale:false,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],char:"🇧🇱",fitzpatrick_scale:false,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:"🇸🇭",fitzpatrick_scale:false,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:"🇰🇳",fitzpatrick_scale:false,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:"🇱🇨",fitzpatrick_scale:false,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:"🇵🇲",fitzpatrick_scale:false,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:"🇻🇨",fitzpatrick_scale:false,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:"🇼🇸",fitzpatrick_scale:false,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:"🇸🇲",fitzpatrick_scale:false,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:"🇸🇹",fitzpatrick_scale:false,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:"🇸🇦",fitzpatrick_scale:false,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:"🇸🇳",fitzpatrick_scale:false,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:"🇷🇸",fitzpatrick_scale:false,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:"🇸🇨",fitzpatrick_scale:false,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:"🇸🇱",fitzpatrick_scale:false,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:"🇸🇬",fitzpatrick_scale:false,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:"🇸🇽",fitzpatrick_scale:false,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:"🇸🇰",fitzpatrick_scale:false,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:"🇸🇮",fitzpatrick_scale:false,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:"🇸🇧",fitzpatrick_scale:false,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:"🇸🇴",fitzpatrick_scale:false,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:"🇿🇦",fitzpatrick_scale:false,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:"🇬🇸",fitzpatrick_scale:false,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:"🇰🇷",fitzpatrick_scale:false,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:"🇸🇸",fitzpatrick_scale:false,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:"🇪🇸",fitzpatrick_scale:false,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:"🇱🇰",fitzpatrick_scale:false,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:"🇸🇩",fitzpatrick_scale:false,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:"🇸🇷",fitzpatrick_scale:false,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:"🇸🇿",fitzpatrick_scale:false,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:"🇸🇪",fitzpatrick_scale:false,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:"🇨🇭",fitzpatrick_scale:false,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:"🇸🇾",fitzpatrick_scale:false,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:"🇹🇼",fitzpatrick_scale:false,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:"🇹🇯",fitzpatrick_scale:false,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:"🇹🇿",fitzpatrick_scale:false,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:"🇹🇭",fitzpatrick_scale:false,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:"🇹🇱",fitzpatrick_scale:false,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:"🇹🇬",fitzpatrick_scale:false,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:"🇹🇰",fitzpatrick_scale:false,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:"🇹🇴",fitzpatrick_scale:false,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:"🇹🇹",fitzpatrick_scale:false,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:"🇹🇳",fitzpatrick_scale:false,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:"🇹🇷",fitzpatrick_scale:false,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:"🇹🇲",fitzpatrick_scale:false,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:"🇹🇨",fitzpatrick_scale:false,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:"🇹🇻",fitzpatrick_scale:false,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:"🇺🇬",fitzpatrick_scale:false,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:"🇺🇦",fitzpatrick_scale:false,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:"🇦🇪",fitzpatrick_scale:false,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:"🇬🇧",fitzpatrick_scale:false,category:"flags"},england:{keywords:["flag","english"],char:"🏴",fitzpatrick_scale:false,category:"flags"},scotland:{keywords:["flag","scottish"],char:"🏴",fitzpatrick_scale:false,category:"flags"},wales:{keywords:["flag","welsh"],char:"🏴",fitzpatrick_scale:false,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:"🇺🇸",fitzpatrick_scale:false,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:"🇻🇮",fitzpatrick_scale:false,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:"🇺🇾",fitzpatrick_scale:false,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:"🇺🇿",fitzpatrick_scale:false,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:"🇻🇺",fitzpatrick_scale:false,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:"🇻🇦",fitzpatrick_scale:false,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:"🇻🇪",fitzpatrick_scale:false,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:"🇻🇳",fitzpatrick_scale:false,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:"🇼🇫",fitzpatrick_scale:false,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:"🇪🇭",fitzpatrick_scale:false,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:"🇾🇪",fitzpatrick_scale:false,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:"🇿🇲",fitzpatrick_scale:false,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:"🇿🇼",fitzpatrick_scale:false,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:"🇺🇳",fitzpatrick_scale:false,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"🏴☠️",fitzpatrick_scale:false,category:"flags"}})},487:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>e===t;const o=t(null);const n=e=>e===null||e===undefined;const s=e=>!n(e);const r=()=>{};const a=e=>()=>e;const c=a(false);class i{constructor(e,t){this.tag=e;this.value=t}static some(e){return new i(true,e)}static none(){return i.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return i.some(e(this.value))}else{return i.none()}}bind(e){if(this.tag){return e(this.value)}else{return i.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return i.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return s(e)?i.some(e):i.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}i.singletonNone=new i(false);const l=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return true}}return false};const d=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const u=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const f=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};const m=(e,t)=>{let n=null;const s=()=>{if(!o(n)){clearTimeout(n);n=null}};const r=(...o)=>{s();n=setTimeout((()=>{n=null;e.apply(null,o)}),t)};return{cancel:s,throttle:r}};const g=(e,t)=>{e.insertContent(t)};const p=Object.keys;const h=Object.hasOwnProperty;const y=(e,t)=>{const o=p(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const b=(e,t)=>v(e,((e,o)=>({k:o,v:t(e,o)})));const v=(e,t)=>{const o={};y(e,((e,n)=>{const s=t(e,n);o[s.k]=s.v}));return o};const k=(e,t)=>h.call(e,t);const w=(e,t)=>t;const _=e=>(...t)=>{if(t.length===0){throw new Error(`Can't merge zero objects`)}const o={};for(let n=0;n<t.length;n++){const s=t[n];for(const t in s){if(k(s,t)){o[t]=e(o[t],s[t])}}}return o};const x=_(w);const z=e=>{const t=f(i.none());const o=()=>t.get().each(e);const n=()=>{o();t.set(i.none())};const s=()=>t.get().isSome();const r=()=>t.get();const a=e=>{o();t.set(i.some(e))};return{clear:n,isSet:s,get:r,set:a}};const C=()=>{const e=z(r);const t=t=>e.get().each(t);return{...e,on:t}};const S=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t;const T=(e,t)=>e.indexOf(t)!==-1;const O=(e,t)=>S(e,t,0);var E=tinymce.util.Tools.resolve("tinymce.Resource");const D="tinymce.plugins.emoticons";const A=e=>t=>t.options.get(e);const M=(e,t)=>{const o=e.options.register;o("emoticons_database",{processor:"string",default:"emojis"});o("emoticons_database_url",{processor:"string",default:`${t}/js/${N(e)}${e.suffix}.js`});o("emoticons_database_id",{processor:"string",default:D});o("emoticons_append",{processor:"object",default:{}});o("emoticons_images_url",{processor:"string",default:"https://twemoji.maxcdn.com/v/13.0.1/72x72/"})};const N=A("emoticons_database");const R=A("emoticons_database_url");const B=A("emoticons_database_id");const L=A("emoticons_append");const H=A("emoticons_images_url");const I="All";const P={symbols:"Symbols",people:"People",animals_and_nature:"Animals and Nature",food_and_drink:"Food and Drink",activity:"Activity",travel_and_places:"Travel and Places",objects:"Objects",flags:"Flags",user:"User Defined"};const F=(e,t)=>k(e,t)?e[t]:t;const V=e=>{const t=L(e);return b(t,(e=>({keywords:[],category:"user",...e})))};const j=(e,t,o)=>{const n=C();const s=C();const r=H(e);const a=e=>{if(O(e.char,"<img")){return e.char.replace(/src="([^"]+)"/,((e,t)=>`src="${r}${t}"`))}else{return e.char}};const c=e=>{const t={};const o=[];y(e,((e,n)=>{const s={title:n,keywords:e.keywords,char:a(e),category:F(P,e.category)};const r=t[s.category]!==undefined?t[s.category]:[];t[s.category]=r.concat([s]);o.push(s)}));n.set(t);s.set(o)};e.on("init",(()=>{E.load(o,t).then((t=>{const o=V(e);c(x(t,o))}),(e=>{console.log(`Failed to load emojis: ${e}`);n.set({});s.set([])}))}));const l=e=>{if(e===I){return d()}return n.get().bind((t=>i.from(t[e]))).getOr([])};const d=()=>s.get().getOr([]);const u=()=>[I].concat(p(n.get().getOr({})));const f=()=>{if(m()){return Promise.resolve(true)}else{return new Promise(((e,o)=>{let n=15;const s=setInterval((()=>{if(m()){clearInterval(s);e(true)}else{n--;if(n<0){console.log("Could not load emojis from url: "+t);clearInterval(s);o(false)}}}),100)}))}};const m=()=>n.isSet()&&s.isSet();return{listCategories:u,hasLoaded:m,waitForLoad:f,listAll:d,listCategory:l}};const U=(e,t)=>T(e.title.toLowerCase(),t)||l(e.keywords,(e=>T(e.toLowerCase(),t)));const q=(e,t,o)=>{const n=[];const s=t.toLowerCase();const r=o.fold((()=>c),(e=>t=>t>=e));for(let o=0;o<e.length;o++){if(t.length===0||U(e[o],s)){n.push({value:e[o].char,text:e[o].title,icon:e[o].char});if(r(n.length)){break}}}return n};const W="pattern";const $=(e,t)=>{const o={pattern:"",results:q(t.listAll(),"",i.some(300))};const n=f(I);const s=e=>{const o=e.getData();const s=n.get();const r=t.listCategory(s);const a=q(r,o[W],s===I?i.some(300):i.none());e.setData({results:a})};const r=m((e=>{s(e)}),200);const a={label:"Search",type:"input",name:W};const c={type:"collection",name:"results"};const l=()=>{const s={type:"tabpanel",tabs:d(t.listCategories(),(e=>({title:e,name:e,items:[a,c]})))};return{title:"Emojis",size:"normal",body:s,initialData:o,onTabChange:(e,t)=>{n.set(t.newTabName);r.throttle(e)},onChange:r.throttle,onAction:(t,o)=>{if(o.name==="results"){g(e,o.value);t.close()}},buttons:[{type:"cancel",text:"Close",primary:true}]}};const u=e.windowManager.open(l());u.focus(W);if(!t.hasLoaded()){u.block("Loading emojis...");t.waitForLoad().then((()=>{u.redial(l());r.throttle(u);u.focus(W);u.unblock()})).catch((e=>{u.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:true}],initialData:{pattern:"",results:[]}});u.focus(W);u.unblock()}))}};const G=(e,t)=>{e.addCommand("mceEmoticons",(()=>$(e,t)))};const K=e=>{e.on("PreInit",(()=>{e.parser.addAttributeFilter("data-emoticon",(e=>{u(e,(e=>{e.attr("data-mce-resize","false");e.attr("data-mce-placeholder","1")}))}))}))};const X=(e,t)=>{e.ui.registry.addAutocompleter("emoticons",{ch:":",columns:"auto",minChars:2,fetch:(e,o)=>t.waitForLoad().then((()=>{const n=t.listAll();return q(n,e,i.some(o))})),onAction:(t,o,n)=>{e.selection.setRng(o);e.insertContent(n);t.hide()}})};const Y=e=>{const t=()=>e.execCommand("mceEmoticons");e.ui.registry.addButton("emoticons",{tooltip:"Emojis",icon:"emoji",onAction:t});e.ui.registry.addMenuItem("emoticons",{text:"Emojis...",icon:"emoji",onAction:t})};var J=()=>{e.add("emoticons",((e,t)=>{M(e,t);const o=R(e);const n=B(e);const s=j(e,o,n);G(e,s);Y(e);X(e,s);K(e)}))};J()})()},489:(e,t,o)=>{o(490)},490:()=>{(function(){"use strict";const e=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const o=e=>({isFullscreen:()=>e.get()!==null});const n=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const s=e=>{const t=typeof e;if(e===null){return"null"}else if(t==="object"&&Array.isArray(e)){return"array"}else if(t==="object"&&n(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return t}};const r=e=>t=>s(t)===e;const a=e=>t=>typeof t===e;const c=e=>t=>e===t;const i=r("string");const l=r("array");const d=c(null);const u=a("boolean");const f=e=>e===null||e===undefined;const m=e=>!f(e);const g=a("function");const p=a("number");const h=()=>{};const y=(e,t)=>(...o)=>e(t.apply(null,o));const b=(e,t)=>o=>e(t(o));const v=e=>()=>e;function k(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const w=v(false);const _=v(true);class x{constructor(e,t){this.tag=e;this.value=t}static some(e){return new x(true,e)}static none(){return x.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return x.some(e(this.value))}else{return x.none()}}bind(e){if(this.tag){return e(this.value)}else{return x.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return x.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return m(e)?x.some(e):x.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}x.singletonNone=new x(false);const z=t=>{const o=e(x.none());const n=()=>o.get().each(t);const s=()=>{n();o.set(x.none())};const r=()=>o.get().isSome();const a=()=>o.get();const c=e=>{n();o.set(x.some(e))};return{clear:s,isSet:r,get:a,set:c}};const C=()=>z((e=>e.unbind()));const S=()=>{const e=z(h);const t=t=>e.get().each(t);return{...e,on:t}};const T=(e,t)=>{let o=null;const n=()=>{if(!d(o)){clearTimeout(o);o=null}};const s=(...n)=>{if(d(o)){o=setTimeout((()=>{o=null;e.apply(null,n)}),t)}};return{cancel:n,throttle:s}};const O=Array.prototype.push;const E=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const D=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const A=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const M=(e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){return x.some(s)}else if(o(s,n)){break}}return x.none()};const N=(e,t)=>M(e,t,w);const R=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!l(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}O.apply(t,e[o])}return t};const B=(e,t)=>R(E(e,t));const L=(e,t)=>t>=0&&t<e.length?x.some(e[t]):x.none();const H=e=>L(e,0);const I=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return x.none()};const P=Object.keys;const F=(e,t)=>{const o=P(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const V=(e,t)=>e.indexOf(t)!==-1;const j=e=>e.style!==undefined&&g(e.style.getPropertyValue);const U=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return $(n.childNodes[0])};const q=(e,t)=>{const o=t||document;const n=o.createElement(e);return $(n)};const W=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return $(n)};const $=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const G=(e,t,o)=>x.from(e.dom.elementFromPoint(t,o)).map($);const K={fromHtml:U,fromTag:q,fromText:W,fromDom:$,fromPoint:G};typeof window!=="undefined"?window:Function("return this;")();const X=9;const Y=11;const J=1;const Q=3;const Z=e=>e.dom.nodeType;const ee=e=>t=>Z(t)===e;const te=ee(J);const oe=ee(Q);const ne=ee(X);const se=ee(Y);const re=(e,t)=>{const o=e.dom;if(o.nodeType!==J){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};const ae=e=>e.nodeType!==J&&e.nodeType!==X&&e.nodeType!==Y||e.childElementCount===0;const ce=(e,t)=>{const o=t===undefined?document:t.dom;return ae(o)?[]:E(o.querySelectorAll(e),K.fromDom)};const ie=(e,t)=>e.dom===t.dom;const le=e=>K.fromDom(e.dom.ownerDocument);const de=e=>ne(e)?e:le(e);const ue=e=>x.from(e.dom.parentNode).map(K.fromDom);const fe=(e,t)=>{const o=g(t)?t:w;let n=e.dom;const s=[];while(n.parentNode!==null&&n.parentNode!==undefined){const e=n.parentNode;const t=K.fromDom(e);s.push(t);if(o(t)===true){break}else{n=e}}return s};const me=e=>{const t=t=>A(t,(t=>!ie(e,t)));return ue(e).map(ge).map(t).getOr([])};const ge=e=>E(e.dom.childNodes,K.fromDom);const pe=e=>se(e)&&m(e.dom.host);const he=g(Element.prototype.attachShadow)&&g(Node.prototype.getRootNode);const ye=v(he);const be=he?e=>K.fromDom(e.dom.getRootNode()):de;const ve=e=>{const t=be(e);return pe(t)?x.some(t):x.none()};const ke=e=>K.fromDom(e.dom.host);const we=e=>{if(ye()&&m(e.target)){const t=K.fromDom(e.target);if(te(t)&&_e(t)){if(e.composed&&e.composedPath){const t=e.composedPath();if(t){return H(t)}}}}return x.from(e.target)};const _e=e=>m(e.dom.shadowRoot);const xe=e=>{const t=oe(e)?e.dom.parentNode:e.dom;if(t===undefined||t===null||t.ownerDocument===null){return false}const o=t.ownerDocument;return ve(K.fromDom(t)).fold((()=>o.body.contains(t)),b(xe,ke))};const ze=e=>{const t=e.dom.body;if(t===null||t===undefined){throw new Error("Body is not available yet")}return K.fromDom(t)};const Ce=(e,t,o)=>{if(i(o)||u(o)||p(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const Se=(e,t,o)=>{Ce(e.dom,t,o)};const Te=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?undefined:o};const Oe=(e,t)=>{e.dom.removeAttribute(t)};const Ee=(e,t,o)=>{if(!i(o)){console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e);throw new Error("CSS value must be a string: "+o)}if(j(e)){e.style.setProperty(t,o)}};const De=(e,t)=>{const o=e.dom;F(t,((e,t)=>{Ee(o,t,e)}))};const Ae=(e,t)=>{const o=e.dom;const n=window.getComputedStyle(o);const s=n.getPropertyValue(t);return s===""&&!xe(e)?Me(o,t):s};const Me=(e,t)=>j(e)?e.style.getPropertyValue(t):"";const Ne=(e,t,o,n,s,r,a)=>({target:e,x:t,y:o,stop:n,prevent:s,kill:r,raw:a});const Re=e=>{const t=K.fromDom(we(e).getOr(e.target));const o=()=>e.stopPropagation();const n=()=>e.preventDefault();const s=y(n,o);return Ne(t,e.clientX,e.clientY,o,n,s,e)};const Be=(e,t)=>o=>{if(e(o)){t(Re(o))}};const Le=(e,t,o,n,s)=>{const r=Be(o,n);e.dom.addEventListener(t,r,s);return{unbind:k(Ie,e,t,r,s)}};const He=(e,t,o,n)=>Le(e,t,o,n,false);const Ie=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)};const Pe=_;const Fe=(e,t,o)=>He(e,t,Pe,o);const Ve=e=>{let t=false;let o;return(...n)=>{if(!t){t=true;o=e.apply(null,n)}return o}};const je=(e,t,o,n)=>{const s=e.isiOS()&&/ipad/i.test(o)===true;const r=e.isiOS()&&!s;const a=e.isiOS()||e.isAndroid();const c=a||n("(pointer:coarse)");const i=s||!r&&a&&n("(min-device-width:768px)");const l=r||a&&!i;const d=t.isSafari()&&e.isiOS()&&/safari/i.test(o)===false;const u=!l&&!i&&!d;return{isiPad:v(s),isiPhone:v(r),isTablet:v(i),isPhone:v(l),isTouch:v(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:v(d),isDesktop:v(u)}};const Ue=(e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t)){return n}}return undefined};const qe=(e,t)=>{const o=Ue(e,t);if(!o){return{major:0,minor:0}}const n=e=>Number(t.replace(o,"$"+e));return Ge(n(1),n(2))};const We=(e,t)=>{const o=String(t).toLowerCase();if(e.length===0){return $e()}return qe(e,o)};const $e=()=>Ge(0,0);const Ge=(e,t)=>({major:e,minor:t});const Ke={nu:Ge,detect:We,unknown:$e};const Xe=(e,t)=>I(t.brands,(t=>{const o=t.brand.toLowerCase();return N(e,(e=>{var t;return o===((t=e.brand)===null||t===void 0?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ke.nu(parseInt(t.version,10),0)})))}));const Ye=(e,t)=>{const o=String(t).toLowerCase();return N(e,(e=>e.search(o)))};const Je=(e,t)=>Ye(e,t).map((e=>{const o=Ke.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const Qe=(e,t)=>Ye(e,t).map((e=>{const o=Ke.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const Ze=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/;const et=e=>t=>V(t,e);const tt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>V(e,"edge/")&&V(e,"chrome")&&V(e,"safari")&&V(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Ze],search:e=>V(e,"chrome")&&!V(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>V(e,"msie")||V(e,"trident")},{name:"Opera",versionRegexes:[Ze,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:et("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:et("firefox")},{name:"Safari",versionRegexes:[Ze,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(V(e,"safari")||V(e,"mobile/"))&&V(e,"applewebkit")}];const ot=[{name:"Windows",search:et("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>V(e,"iphone")||V(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:et("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:et("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:et("linux"),versionRegexes:[]},{name:"Solaris",search:et("sunos"),versionRegexes:[]},{name:"FreeBSD",search:et("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:et("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}];const nt={browsers:v(tt),oses:v(ot)};const st="Edge";const rt="Chromium";const at="IE";const ct="Opera";const it="Firefox";const lt="Safari";const dt=()=>ut({current:undefined,version:Ke.unknown()});const ut=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isEdge:n(st),isChromium:n(rt),isIE:n(at),isOpera:n(ct),isFirefox:n(it),isSafari:n(lt)}};const ft={unknown:dt,nu:ut,edge:v(st),chromium:v(rt),ie:v(at),opera:v(ct),firefox:v(it),safari:v(lt)};const mt="Windows";const gt="iOS";const pt="Android";const ht="Linux";const yt="macOS";const bt="Solaris";const vt="FreeBSD";const kt="ChromeOS";const wt=()=>_t({current:undefined,version:Ke.unknown()});const _t=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isWindows:n(mt),isiOS:n(gt),isAndroid:n(pt),isMacOS:n(yt),isLinux:n(ht),isSolaris:n(bt),isFreeBSD:n(vt),isChromeOS:n(kt)}};const xt={unknown:wt,nu:_t,windows:v(mt),ios:v(gt),android:v(pt),linux:v(ht),macos:v(yt),solaris:v(bt),freebsd:v(vt),chromeos:v(kt)};const zt=(e,t,o)=>{const n=nt.browsers();const s=nt.oses();const r=t.bind((e=>Xe(n,e))).orThunk((()=>Je(n,e))).fold(ft.unknown,ft.nu);const a=Qe(s,e).fold(xt.unknown,xt.nu);const c=je(a,r,e,o);return{browser:r,os:a,deviceType:c}};const Ct={detect:zt};const St=e=>window.matchMedia(e).matches;let Tt=Ve((()=>Ct.detect(navigator.userAgent,x.from(navigator.userAgentData),St)));const Ot=()=>Tt();const Et=(e,t)=>{const o=(o,n)=>Et(e+o,t+n);return{left:e,top:t,translate:o}};const Dt=Et;const At=e=>{const t=e!==undefined?e.dom:document;const o=t.body.scrollLeft||t.documentElement.scrollLeft;const n=t.body.scrollTop||t.documentElement.scrollTop;return Dt(o,n)};const Mt=e=>{const t=e===undefined?window:e;if(Ot().browser.isFirefox()){return x.none()}else{return x.from(t.visualViewport)}};const Nt=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n});const Rt=e=>{const t=e===undefined?window:e;const o=t.document;const n=At(K.fromDom(o));return Mt(t).fold((()=>{const e=t.document.documentElement;const o=e.clientWidth;const s=e.clientHeight;return Nt(n.left,n.top,o,s)}),(e=>Nt(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))};const Bt=(e,t,o)=>Mt(o).map((o=>{const n=e=>t(Re(e));o.addEventListener(e,n);return{unbind:()=>o.removeEventListener(e,n)}})).getOrThunk((()=>({unbind:h})));var Lt=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");var Ht=tinymce.util.Tools.resolve("tinymce.Env");const It=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t})};const Pt=e=>t=>t.options.get(e);const Ft=e=>{const t=e.options.register;t("fullscreen_native",{processor:"boolean",default:false})};const Vt=Pt("fullscreen_native");const jt=e=>{const t=K.fromDom(e.getElement());return ve(t).map(ke).getOrThunk((()=>ze(le(t))))};const Ut=e=>{if(e.fullscreenElement!==undefined){return e.fullscreenElement}else if(e.msFullscreenElement!==undefined){return e.msFullscreenElement}else if(e.webkitFullscreenElement!==undefined){return e.webkitFullscreenElement}else{return null}};const qt=()=>{if(document.fullscreenElement!==undefined){return"fullscreenchange"}else if(document.msFullscreenElement!==undefined){return"MSFullscreenChange"}else if(document.webkitFullscreenElement!==undefined){return"webkitfullscreenchange"}else{return"fullscreenchange"}};const Wt=e=>{const t=e.dom;if(t.requestFullscreen){t.requestFullscreen()}else if(t.msRequestFullscreen){t.msRequestFullscreen()}else if(t.webkitRequestFullScreen){t.webkitRequestFullScreen()}};const $t=e=>{const t=e.dom;if(t.exitFullscreen){t.exitFullscreen()}else if(t.msExitFullscreen){t.msExitFullscreen()}else if(t.webkitCancelFullScreen){t.webkitCancelFullScreen()}};const Gt=e=>e.dom===Ut(le(e).dom);const Kt=(e,t,o)=>A(fe(e,o),t);const Xt=(e,t)=>A(me(e),t);const Yt=e=>ce(e);const Jt=(e,t,o)=>Kt(e,(e=>re(e,t)),o);const Qt=(e,t)=>Xt(e,(e=>re(e,t)));const Zt="data-ephox-mobile-fullscreen-style";const eo="display:none!important;";const to="position:absolute!important;";const oo="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;";const no="background-color:rgb(255,255,255)!important;";const so=Ht.os.isAndroid();const ro=e=>{const t=Ae(e,"background-color");return t!==undefined&&t!==""?"background-color:"+t+"!important":no};const ao=(e,t,o)=>{const n=e=>Qt(e,"*:not(.tox-silver-sink)");const s=t=>o=>{const n=Te(o,"style");const s=n===undefined?"no-styles":n.trim();if(s===t){return}else{Se(o,Zt,s);De(o,e.parseStyle(t))}};const r=Jt(t,"*");const a=B(r,n);const c=ro(o);D(a,s(eo));D(r,s(to+oo+c));const i=so===true?"":to;s(i+oo+c)(t)};const co=e=>{const t=Yt("["+Zt+"]");D(t,(t=>{const o=Te(t,Zt);if(o!=="no-styles"){De(t,e.parseStyle(o))}else{Oe(t,"style")}Oe(t,Zt)}))};const io=Lt.DOM;const lo=()=>Rt(window);const uo=e=>window.scrollTo(e.x,e.y);const fo=Mt().fold((()=>({bind:h,unbind:h})),(e=>{const t=S();const o=C();const n=C();const s=()=>{document.body.scrollTop=0;document.documentElement.scrollTop=0};const r=()=>{window.requestAnimationFrame((()=>{t.on((t=>De(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))};const a=T((()=>{s();r()}),50);const c=e=>{t.set(e);a.throttle();o.set(Bt("resize",a.throttle));n.set(Bt("scroll",a.throttle))};const i=()=>{t.on((()=>{o.clear();n.clear()}));t.clear()};return{bind:c,unbind:i}}));const mo=(e,t)=>{const o=document.body;const n=document.documentElement;const s=e.getContainer();const r=K.fromDom(s);const a=jt(e);const c=t.get();const i=K.fromDom(e.getBody());const l=Ht.deviceType.isTouch();const d=s.style;const u=e.iframeElement;const f=u.style;const m=e=>{e(o,"tox-fullscreen");e(n,"tox-fullscreen");e(s,"tox-fullscreen");ve(r).map((e=>ke(e).dom)).each((t=>{e(t,"tox-fullscreen");e(t,"tox-shadowhost")}))};const g=()=>{if(l){co(e.dom)}m(io.removeClass);fo.unbind();x.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(!c){const o=Fe(le(a),qt(),(o=>{if(Vt(e)){if(!Gt(a)&&t.get()!==null){mo(e,t)}}}));const n={scrollPos:lo(),containerWidth:d.width,containerHeight:d.height,containerTop:d.top,containerLeft:d.left,iframeWidth:f.width,iframeHeight:f.height,fullscreenChangeHandler:o};if(l){ao(e.dom,r,i)}f.width=f.height="100%";d.width=d.height="";m(io.addClass);fo.bind(r);e.on("remove",g);t.set(n);if(Vt(e)){Wt(a)}It(e,true)}else{c.fullscreenChangeHandler.unbind();if(Vt(e)&&Gt(a)){$t(le(a))}f.width=c.iframeWidth;f.height=c.iframeHeight;d.width=c.containerWidth;d.height=c.containerHeight;d.top=c.containerTop;d.left=c.containerLeft;g();uo(c.scrollPos);t.set(null);It(e,false);e.off("remove",g)}};const go=(e,t)=>{e.addCommand("mceFullScreen",(()=>{mo(e,t)}))};const po=(e,t)=>o=>{o.setActive(t.get()!==null);const n=e=>o.setActive(e.state);e.on("FullscreenStateChanged",n);return()=>e.off("FullscreenStateChanged",n)};const ho=(e,t)=>{const o=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:o,onSetup:po(e,t)});e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:o,onSetup:po(e,t)})};var yo=()=>{t.add("fullscreen",(t=>{const n=e(null);if(t.inline){return o(n)}Ft(t);go(t,n);ho(t,n);t.addShortcut("Meta+Shift+F","","mceFullScreen");return o(n)}))};yo()})()},491:(e,t,o)=>{o(492)},492:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf;const o=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const n=e=>{const t=typeof e;if(e===null){return"null"}else if(t==="object"&&Array.isArray(e)){return"array"}else if(t==="object"&&o(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return t}};const s=e=>t=>n(t)===e;const r=e=>t=>typeof t===e;const a=e=>t=>e===t;const c=(e,n)=>l(e)&&o(e,n,((e,o)=>t(e)===o));const i=s("string");const l=s("object");const d=e=>c(e,Object);const u=s("array");const f=a(null);const m=r("boolean");const g=e=>e===null||e===undefined;const p=e=>!g(e);const h=r("function");const y=r("number");const b=(e,t)=>{if(u(e)){for(let o=0,n=e.length;o<n;++o){if(!t(e[o])){return false}}return true}return false};const v=()=>{};class k{constructor(e,t){this.tag=e;this.value=t}static some(e){return new k(true,e)}static none(){return k.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return k.some(e(this.value))}else{return k.none()}}bind(e){if(this.tag){return e(this.value)}else{return k.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return k.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return p(e)?k.some(e):k.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}k.singletonNone=new k(false);const w=Object.keys;const _=Object.hasOwnProperty;const x=(e,t)=>{const o=w(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const z=e=>(t,o)=>{e[o]=t};const C=(e,t,o,n)=>{const s={};x(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const S=(e,t)=>{const o={};C(e,t,z(o),v);return o};const T=(e,t)=>_.call(e,t);const O=(e,t)=>T(e,t)&&e[t]!==undefined&&e[t]!==null;const E=Array.prototype.push;const D=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!u(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}E.apply(t,e[o])}return t};const A=(e,t)=>t>=0&&t<e.length?k.some(e[t]):k.none();const M=e=>A(e,0);const N=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return k.none()};typeof window!=="undefined"?window:Function("return this;")();const R=(e,t,o)=>{if(i(o)||m(o)||y(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const B=(e,t,o)=>{R(e.dom,t,o)};const L=(e,t)=>{e.dom.removeAttribute(t)};const H=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return F(n.childNodes[0])};const I=(e,t)=>{const o=t||document;const n=o.createElement(e);return F(n)};const P=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return F(n)};const F=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const V=(e,t,o)=>k.from(e.dom.elementFromPoint(t,o)).map(F);const j={fromHtml:H,fromTag:I,fromText:P,fromDom:F,fromPoint:V};var U=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");var q=tinymce.util.Tools.resolve("tinymce.util.URI");const W=e=>e.length>0;const $=e=>t=>t.options.get(e);const G=e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:true});t("image_advtab",{processor:"boolean",default:false});t("image_uploadtab",{processor:"boolean",default:true});t("image_prepend_url",{processor:"string",default:""});t("image_class_list",{processor:"object[]"});t("image_description",{processor:"boolean",default:true});t("image_title",{processor:"boolean",default:false});t("image_caption",{processor:"boolean",default:false});t("image_list",{processor:e=>{const t=e===false||i(e)||b(e,l)||h(e);return t?{value:e,valid:t}:{valid:false,message:"Must be false, a string, an array or a function."}},default:false})};const K=$("image_dimensions");const X=$("image_advtab");const Y=$("image_uploadtab");const J=$("image_prepend_url");const Q=$("image_class_list");const Z=$("image_description");const ee=$("image_title");const te=$("image_caption");const oe=$("image_list");const ne=$("a11y_advanced_options");const se=$("automatic_uploads");const re=e=>W(e.options.get("images_upload_url"));const ae=e=>p(e.options.get("images_upload_handler"));const ce=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10));const ie=e=>new Promise((t=>{const o=document.createElement("img");const n=e=>{o.onload=o.onerror=null;if(o.parentNode){o.parentNode.removeChild(o)}t(e)};o.onload=()=>{const e=ce(o.width,o.clientWidth);const t=ce(o.height,o.clientHeight);const s={width:e,height:t};n(Promise.resolve(s))};o.onerror=()=>{n(Promise.reject(`Failed to get image dimensions for: ${e}`))};const s=o.style;s.visibility="hidden";s.position="fixed";s.bottom=s.left="0px";s.width=s.height="auto";document.body.appendChild(o);o.src=e}));const le=e=>{if(e){e=e.replace(/px$/,"")}return e};const de=e=>{if(e.length>0&&/^[0-9]+$/.test(e)){e+="px"}return e};const ue=e=>{if(e.margin){const t=String(e.margin).split(" ");switch(t.length){case 1:e["margin-top"]=e["margin-top"]||t[0];e["margin-right"]=e["margin-right"]||t[0];e["margin-bottom"]=e["margin-bottom"]||t[0];e["margin-left"]=e["margin-left"]||t[0];break;case 2:e["margin-top"]=e["margin-top"]||t[0];e["margin-right"]=e["margin-right"]||t[1];e["margin-bottom"]=e["margin-bottom"]||t[0];e["margin-left"]=e["margin-left"]||t[1];break;case 3:e["margin-top"]=e["margin-top"]||t[0];e["margin-right"]=e["margin-right"]||t[1];e["margin-bottom"]=e["margin-bottom"]||t[2];e["margin-left"]=e["margin-left"]||t[1];break;case 4:e["margin-top"]=e["margin-top"]||t[0];e["margin-right"]=e["margin-right"]||t[1];e["margin-bottom"]=e["margin-bottom"]||t[2];e["margin-left"]=e["margin-left"]||t[3]}delete e.margin}return e};const fe=(e,t)=>{const o=oe(e);if(i(o)){fetch(o).then((e=>{if(e.ok){e.json().then(t)}}))}else if(h(o)){o(t)}else{t(o)}};const me=(e,t,o)=>{const n=()=>{o.onload=o.onerror=null;if(e.selection){e.selection.select(o);e.nodeChanged()}};o.onload=()=>{if(!t.width&&!t.height&&K(e)){e.dom.setAttribs(o,{width:String(o.clientWidth),height:String(o.clientHeight)})}n()};o.onerror=n};const ge=e=>new Promise(((t,o)=>{const n=new FileReader;n.onload=()=>{t(n.result)};n.onerror=()=>{o(n.error.message)};n.readAsDataURL(e)}));const pe=e=>e.nodeName==="IMG"&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder"));const he=(e,t)=>{const o=e.options.get;return q.isDomSafe(t,"img",{allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")})};const ye=U.DOM;const be=e=>{if(e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight){return le(e.style.marginLeft)}else{return""}};const ve=e=>{if(e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom){return le(e.style.marginTop)}else{return""}};const ke=e=>{if(e.style.borderWidth){return le(e.style.borderWidth)}else{return""}};const we=(e,t)=>{if(e.hasAttribute(t)){return e.getAttribute(t)}else{return""}};const _e=(e,t)=>e.style[t]?e.style[t]:"";const xe=e=>e.parentNode!==null&&e.parentNode.nodeName==="FIGURE";const ze=(e,t,o)=>{if(o===""){e.removeAttribute(t)}else{e.setAttribute(t,o)}};const Ce=e=>{const t=ye.create("figure",{class:"image"});ye.insertAfter(t,e);t.appendChild(e);t.appendChild(ye.create("figcaption",{contentEditable:"true"},"Caption"));t.contentEditable="false"};const Se=e=>{const t=e.parentNode;ye.insertAfter(e,t);ye.remove(t)};const Te=e=>{if(xe(e)){Se(e)}else{Ce(e)}};const Oe=(e,t)=>{const o=e.getAttribute("style");const n=t(o!==null?o:"");if(n.length>0){e.setAttribute("style",n);e.setAttribute("data-mce-style",n)}else{e.removeAttribute("style")}};const Ee=(e,t)=>(e,o,n)=>{if(e.style[o]){e.style[o]=de(n);Oe(e,t)}else{ze(e,o,n)}};const De=(e,t)=>{if(e.style[t]){return le(e.style[t])}else{return we(e,t)}};const Ae=(e,t)=>{const o=de(t);e.style.marginLeft=o;e.style.marginRight=o};const Me=(e,t)=>{const o=de(t);e.style.marginTop=o;e.style.marginBottom=o};const Ne=(e,t)=>{const o=de(t);e.style.borderWidth=o};const Re=(e,t)=>{e.style.borderStyle=t};const Be=e=>_e(e,"borderStyle");const Le=e=>e.nodeName==="FIGURE";const He=e=>e.nodeName==="IMG";const Ie=e=>ye.getAttrib(e,"alt").length===0&&ye.getAttrib(e,"role")==="presentation";const Pe=e=>{if(Ie(e)){return""}else{return we(e,"alt")}};const Fe=()=>({src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:false,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:false});const Ve=(e,t)=>{const o=document.createElement("img");ze(o,"style",t.style);if(be(o)||t.hspace!==""){Ae(o,t.hspace)}if(ve(o)||t.vspace!==""){Me(o,t.vspace)}if(ke(o)||t.border!==""){Ne(o,t.border)}if(Be(o)||t.borderStyle!==""){Re(o,t.borderStyle)}return e(o.getAttribute("style"))};const je=(e,t)=>{const o=document.createElement("img");Ke(e,{...t,caption:false},o);We(o,t.alt,t.isDecorative);if(t.caption){const e=ye.create("figure",{class:"image"});e.appendChild(o);e.appendChild(ye.create("figcaption",{contentEditable:"true"},"Caption"));e.contentEditable="false";return e}else{return o}};const Ue=(e,t)=>({src:we(t,"src"),alt:Pe(t),title:we(t,"title"),width:De(t,"width"),height:De(t,"height"),class:we(t,"class"),style:e(we(t,"style")),caption:xe(t),hspace:be(t),vspace:ve(t),border:ke(t),borderStyle:_e(t,"borderStyle"),isDecorative:Ie(t)});const qe=(e,t,o,n,s)=>{if(o[n]!==t[n]){s(e,n,o[n])}};const We=(e,t,o)=>{if(o){ye.setAttrib(e,"role","presentation");const t=j.fromDom(e);B(t,"alt","")}else{if(f(t)){const t=j.fromDom(e);L(t,"alt")}else{const o=j.fromDom(e);B(o,"alt",t)}if(ye.getAttrib(e,"role")==="presentation"){ye.setAttrib(e,"role","")}}};const $e=(e,t,o)=>{if(o.alt!==t.alt||o.isDecorative!==t.isDecorative){We(e,o.alt,o.isDecorative)}};const Ge=(e,t)=>(o,n,s)=>{e(o,s);Oe(o,t)};const Ke=(e,t,o)=>{const n=Ue(e,o);qe(o,n,t,"caption",((e,t,o)=>Te(e)));qe(o,n,t,"src",ze);qe(o,n,t,"title",ze);qe(o,n,t,"width",Ee("width",e));qe(o,n,t,"height",Ee("height",e));qe(o,n,t,"class",ze);qe(o,n,t,"style",Ge(((e,t)=>ze(e,"style",t)),e));qe(o,n,t,"hspace",Ge(Ae,e));qe(o,n,t,"vspace",Ge(Me,e));qe(o,n,t,"border",Ge(Ne,e));qe(o,n,t,"borderStyle",Ge(Re,e));$e(o,n,t)};const Xe=(e,t)=>{const o=e.dom.styles.parse(t);const n=ue(o);const s=e.dom.styles.parse(e.dom.styles.serialize(n));return e.dom.styles.serialize(s)};const Ye=e=>{const t=e.selection.getNode();const o=e.dom.getParent(t,"figure.image");if(o){return e.dom.select("img",o)[0]}if(t&&(t.nodeName!=="IMG"||pe(t))){return null}return t};const Je=(e,t)=>{const o=e.dom;const n=S(e.schema.getTextBlockElements(),((t,o)=>!e.schema.isValidChild(o,"figure")));const s=o.getParent(t.parentNode,(e=>O(n,e.nodeName)),e.getBody());if(s){return o.split(s,t)}else{return t}};const Qe=e=>{const t=Ye(e);return t?Ue((t=>Xe(e,t)),t):Fe()};const Ze=(e,t)=>{const o=je((t=>Xe(e,t)),t);e.dom.setAttrib(o,"data-mce-id","__mcenew");e.focus();e.selection.setContent(o.outerHTML);const n=e.dom.select('*[data-mce-id="__mcenew"]')[0];e.dom.setAttrib(n,"data-mce-id",null);if(Le(n)){const t=Je(e,n);e.selection.select(t)}else{e.selection.select(n)}};const et=(e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))};const tt=(e,t)=>{if(t){const o=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(o);e.focus();e.nodeChanged();if(e.dom.isEmpty(e.getBody())){e.setContent("");e.selection.setCursorLocation()}}};const ot=(e,t)=>{const o=Ye(e);Ke((t=>Xe(e,t)),t,o);et(e,o);if(Le(o.parentNode)){const t=o.parentNode;Je(e,t);e.selection.select(o.parentNode)}else{e.selection.select(o);me(e,t,o)}};const nt=(e,t)=>{const o=t.src;return{...t,src:he(e,o)?o:""}};const st=(e,t)=>{const o=Ye(e);if(o){const n=Ue((t=>Xe(e,t)),o);const s={...n,...t};const r=nt(e,s);if(s.src){ot(e,r)}else{tt(e,o)}}else if(t.src){Ze(e,{...Fe(),...t})}};const rt=(e,t)=>{const o=d(e)&&d(t);return o?ct(e,t):t};const at=e=>(...t)=>{if(t.length===0){throw new Error(`Can't merge zero objects`)}const o={};for(let n=0;n<t.length;n++){const s=t[n];for(const t in s){if(T(s,t)){o[t]=e(o[t],s[t])}}}return o};const ct=at(rt);var it=tinymce.util.Tools.resolve("tinymce.util.ImageUploader");var lt=tinymce.util.Tools.resolve("tinymce.util.Tools");const dt=e=>i(e.value)?e.value:"";const ut=e=>{if(i(e.text)){return e.text}else if(i(e.title)){return e.title}else{return""}};const ft=(e,t)=>{const o=[];lt.each(e,(e=>{const n=ut(e);if(e.menu!==undefined){const s=ft(e.menu,t);o.push({text:n,items:s})}else{const s=t(e);o.push({text:n,value:s})}}));return o};const mt=(e=dt)=>t=>{if(t){return k.from(t).map((t=>ft(t,e)))}else{return k.none()}};const gt=e=>mt(dt)(e);const pt=e=>T(e,"items");const ht=(e,t)=>N(e,(e=>{if(pt(e)){return ht(e.items,t)}else if(e.value===t){return k.some(e)}else{return k.none()}}));const yt=(e,t)=>e.bind((e=>ht(e,t)));const bt={sanitizer:mt,sanitize:gt,findEntry:yt};const vt=e=>({title:"Advanced",name:"advanced",items:[{type:"grid",columns:2,items:[{type:"input",label:"Vertical space",name:"vspace",inputMode:"numeric"},{type:"input",label:"Horizontal space",name:"hspace",inputMode:"numeric"},{type:"input",label:"Border width",name:"border",inputMode:"numeric"},{type:"listbox",name:"borderstyle",label:"Border style",items:[{text:"Select...",value:""},{text:"Solid",value:"solid"},{text:"Dotted",value:"dotted"},{text:"Dashed",value:"dashed"},{text:"Double",value:"double"},{text:"Groove",value:"groove"},{text:"Ridge",value:"ridge"},{text:"Inset",value:"inset"},{text:"Outset",value:"outset"},{text:"None",value:"none"},{text:"Hidden",value:"hidden"}]}]}]});const kt={makeTab:vt};const wt=e=>{const t=bt.sanitizer((t=>e.convertURL(t.value||t.url,"src")));const o=new Promise((o=>{fe(e,(e=>{o(t(e).map((e=>D([[{text:"None",value:""}],e]))))}))}));const n=bt.sanitize(Q(e));const s=X(e);const r=Y(e);const a=re(e);const c=ae(e);const l=Qe(e);const d=Z(e);const u=ee(e);const f=K(e);const m=te(e);const g=ne(e);const p=se(e);const h=k.some(J(e)).filter((e=>i(e)&&e.length>0));return o.then((e=>({image:l,imageList:e,classList:n,hasAdvTab:s,hasUploadTab:r,hasUploadUrl:a,hasUploadHandler:c,hasDescription:d,hasImageTitle:u,hasDimensions:f,hasImageCaption:m,prependURL:h,hasAccessibilityOptions:g,automaticUploads:p})))};const _t=e=>{const t={name:"src",type:"urlinput",filetype:"image",label:"Source"};const o=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e})));const n={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)};const s={name:"title",type:"input",label:"Image title"};const r={name:"dimensions",type:"sizeinput"};const a={type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]};const c=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));const i={type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]};const l=e=>e?{type:"grid",columns:2}:{type:"panel"};return D([[t],o.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[a]:[],e.hasDescription?[n]:[],e.hasImageTitle?[s]:[],e.hasDimensions?[r]:[],[{...l(e.classList.isSome()&&e.hasImageCaption),items:D([c.toArray(),e.hasImageCaption?[i]:[]])}]])};const xt=e=>({title:"General",name:"general",items:_t(e)});const zt={makeTab:xt,makeItems:_t};const Ct=e=>{const t=[{type:"dropzone",name:"fileinput"}];return{title:"Upload",name:"upload",items:t}};const St={makeTab:Ct};const Tt=e=>({prevImage:bt.findEntry(e.imageList,e.image.src),prevAlt:e.image.alt,open:true});const Ot=e=>({src:{value:e.src,meta:{}},images:e.src,alt:e.alt,title:e.title,dimensions:{width:e.width,height:e.height},classes:e.class,caption:e.caption,style:e.style,vspace:e.vspace,border:e.border,hspace:e.hspace,borderstyle:e.borderStyle,fileinput:[],isDecorative:e.isDecorative});const Et=(e,t)=>({src:e.src.value,alt:e.alt.length===0&&t?null:e.alt,title:e.title,width:e.dimensions.width,height:e.dimensions.height,class:e.classes,style:e.style,caption:e.caption,hspace:e.hspace,vspace:e.vspace,border:e.border,borderStyle:e.borderstyle,isDecorative:e.isDecorative});const Dt=(e,t)=>{if(!/^(?:[a-zA-Z]+:)?\/\//.test(t)){return e.prependURL.bind((e=>{if(t.substring(0,e.length)!==e){return k.some(e+t)}return k.none()}))}return k.none()};const At=(e,t)=>{const o=t.getData();Dt(e,o.src.value).each((e=>{t.setData({src:{value:e,meta:o.src.meta}})}))};const Mt=(e,t,o)=>{if(e.hasDescription&&i(o.alt)){t.alt=o.alt}if(e.hasAccessibilityOptions){t.isDecorative=o.isDecorative||t.isDecorative||false}if(e.hasImageTitle&&i(o.title)){t.title=o.title}if(e.hasDimensions){if(i(o.width)){t.dimensions.width=o.width}if(i(o.height)){t.dimensions.height=o.height}}if(i(o.class)){bt.findEntry(e.classList,o.class).each((e=>{t.classes=e.value}))}if(e.hasImageCaption){if(m(o.caption)){t.caption=o.caption}}if(e.hasAdvTab){if(i(o.style)){t.style=o.style}if(i(o.vspace)){t.vspace=o.vspace}if(i(o.border)){t.border=o.border}if(i(o.hspace)){t.hspace=o.hspace}if(i(o.borderstyle)){t.borderstyle=o.borderstyle}}};const Nt=(e,t)=>{const o=t.getData();const n=o.src.meta;if(n!==undefined){const s=ct({},o);Mt(e,s,n);t.setData(s)}};const Rt=(e,t,o,n)=>{const s=n.getData();const r=s.src.value;const a=s.src.meta||{};if(!a.width&&!a.height&&t.hasDimensions){if(W(r)){e.imageSize(r).then((e=>{if(o.open){n.setData({dimensions:e})}})).catch((e=>console.error(e)))}else{n.setData({dimensions:{width:"",height:""}})}}};const Bt=(e,t,o)=>{const n=o.getData();const s=bt.findEntry(e.imageList,n.src.value);t.prevImage=s;o.setData({images:s.map((e=>e.value)).getOr("")})};const Lt=(e,t,o,n)=>{At(t,n);Nt(t,n);Rt(e,t,o,n);Bt(t,o,n)};const Ht=(e,t,o,n)=>{const s=n.getData();const r=bt.findEntry(t.imageList,s.images);r.each((e=>{const t=s.alt===""||o.prevImage.map((e=>e.text===s.alt)).getOr(false);if(t){if(e.value===""){n.setData({src:e,alt:o.prevAlt})}else{n.setData({src:e,alt:e.text})}}else{n.setData({src:e})}}));o.prevImage=r;Lt(e,t,o,n)};const It=(e,t,o,n)=>{const s=n.getData();n.block("Uploading image");M(s.fileinput).fold((()=>{n.unblock()}),(s=>{const r=URL.createObjectURL(s);const a=()=>{n.unblock();URL.revokeObjectURL(r)};const c=s=>{n.setData({src:{value:s,meta:{}}});n.showTab("general");Lt(e,t,o,n)};ge(s).then((o=>{const i=e.createBlobCache(s,r,o);if(t.automaticUploads){e.uploadImage(i).then((e=>{c(e.url);a()})).catch((t=>{a();e.alertErr(t)}))}else{e.addToBlobCache(i);c(i.blobUri());n.unblock()}}))}))};const Pt=(e,t,o)=>(n,s)=>{if(s.name==="src"){Lt(e,t,o,n)}else if(s.name==="images"){Ht(e,t,o,n)}else if(s.name==="alt"){o.prevAlt=n.getData().alt}else if(s.name==="fileinput"){It(e,t,o,n)}else if(s.name==="isDecorative"){n.setEnabled("alt",!n.getData().isDecorative)}};const Ft=e=>()=>{e.open=false};const Vt=e=>{if(e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler){const t={type:"tabpanel",tabs:D([[zt.makeTab(e)],e.hasAdvTab?[kt.makeTab(e)]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[St.makeTab(e)]:[]])};return t}else{const t={type:"panel",items:zt.makeItems(e)};return t}};const jt=(e,t,o)=>n=>{const s=ct(Ot(t.image),n.getData());const r={...s,style:Ve(o.normalizeCss,Et(s,false))};e.execCommand("mceUpdateImage",false,Et(r,t.hasAccessibilityOptions));e.editorUpload.uploadImagesAuto();n.close()};const Ut=e=>t=>{if(!he(e,t)){return Promise.resolve({width:"",height:""})}else{return ie(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)})))}};const qt=e=>(t,o,n)=>e.editorUpload.blobCache.create({blob:t,blobUri:o,name:t.name?t.name.replace(/\.[^\.]+$/,""):null,filename:t.name,base64:n.split(",")[1]});const Wt=e=>t=>{e.editorUpload.blobCache.add(t)};const $t=e=>t=>{e.windowManager.alert(t)};const Gt=e=>t=>Xe(e,t);const Kt=e=>t=>e.dom.parseStyle(t);const Xt=e=>(t,o)=>e.dom.serializeStyle(t,o);const Yt=e=>t=>it(e).upload([t],false).then((e=>{if(e.length===0){return Promise.reject("Failed to upload image")}else if(e[0].status===false){return Promise.reject(e[0].error.message)}else{return e[0]}}));const Jt=e=>{const t={imageSize:Ut(e),addToBlobCache:Wt(e),createBlobCache:qt(e),alertErr:$t(e),normalizeCss:Gt(e),parseStyle:Kt(e),serializeStyle:Xt(e),uploadImage:Yt(e)};const o=()=>{wt(e).then((o=>{const n=Tt(o);return{title:"Insert/Edit Image",size:"normal",body:Vt(o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:Ot(o.image),onSubmit:jt(e,o,t),onChange:Pt(t,o,n),onClose:Ft(n)}})).then(e.windowManager.open)};return{open:o}};const Qt=e=>{e.addCommand("mceImage",Jt(e).open);e.addCommand("mceUpdateImage",((t,o)=>{e.undoManager.transact((()=>st(e,o)))}))};const Zt=e=>{const t=e.attr("class");return t&&/\bimage\b/.test(t)};const eo=e=>t=>{let o=t.length;const n=t=>{t.attr("contenteditable",e?"true":null)};while(o--){const s=t[o];if(Zt(s)){s.attr("contenteditable",e?"false":null);lt.each(s.getAll("figcaption"),n)}}};const to=e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",eo(true));e.serializer.addNodeFilter("figure",eo(false))}))};const oo=e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Jt(e).open,onSetup:t=>{t.setActive(p(Ye(e)));return e.selection.selectorChangedWithUnbind("img:not([data-mce-object]):not([data-mce-placeholder]),figure.image",t.setActive).unbind}});e.ui.registry.addMenuItem("image",{icon:"image",text:"Image...",onAction:Jt(e).open});e.ui.registry.addContextMenu("image",{update:e=>Le(e)||He(e)&&!pe(e)?["image"]:[]})};var no=()=>{e.add("image",(e=>{G(e);to(e);oo(e);Qt(e)}))};no()})()},493:(e,t,o)=>{o(494)},494:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");var t=tinymce.util.Tools.resolve("tinymce.util.VK");const o=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const n=e=>{const t=typeof e;if(e===null){return"null"}else if(t==="object"&&Array.isArray(e)){return"array"}else if(t==="object"&&o(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return t}};const s=e=>t=>n(t)===e;const r=e=>t=>typeof t===e;const a=e=>t=>e===t;const c=s("string");const i=s("object");const l=s("array");const d=a(null);const u=r("boolean");const f=e=>e===null||e===undefined;const m=e=>!f(e);const g=r("function");const p=(e,t)=>{if(l(e)){for(let o=0,n=e.length;o<n;++o){if(!t(e[o])){return false}}return true}return false};const h=()=>{};const y=(e,t)=>e===t;class b{constructor(e,t){this.tag=e;this.value=t}static some(e){return new b(true,e)}static none(){return b.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return b.some(e(this.value))}else{return b.none()}}bind(e){if(this.tag){return e(this.value)}else{return b.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return b.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return m(e)?b.some(e):b.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(false);const v=Array.prototype.indexOf;const k=Array.prototype.push;const w=(e,t)=>v.call(e,t);const _=(e,t)=>w(e,t)>-1;const x=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const z=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const C=(e,t,o)=>{z(e,((e,n)=>{o=t(o,e,n)}));return o};const S=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!l(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}k.apply(t,e[o])}return t};const T=(e,t)=>S(x(e,t));const O=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return b.none()};const E=(e,t,o=y)=>e.exists((e=>o(e,t)));const D=e=>{const t=[];const o=e=>{t.push(e)};for(let t=0;t<e.length;t++){e[t].each(o)}return t};const A=(e,t)=>e?b.some(t):b.none();const M=e=>t=>t.options.get(e);const N=e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=c(e)||u(e);if(t){if(e===true){return{value:1,valid:t}}else if(e==="http"||e==="https"){return{value:e,valid:t}}else{return{value:0,valid:t}}}else{return{valid:false,message:"Must be a string or a boolean."}}},default:false});t("link_context_toolbar",{processor:"boolean",default:false});t("link_list",{processor:e=>c(e)||g(e)||p(e,i)});t("link_default_target",{processor:"string"});t("link_default_protocol",{processor:"string",default:"https"});t("link_target_list",{processor:e=>u(e)||p(e,i),default:true});t("link_rel_list",{processor:"object[]",default:[]});t("link_class_list",{processor:"object[]",default:[]});t("link_title",{processor:"boolean",default:true});t("allow_unsafe_link_target",{processor:"boolean",default:false});t("link_quicklink",{processor:"boolean",default:false})};const R=M("link_assume_external_targets");const B=M("link_context_toolbar");const L=M("link_list");const H=M("link_default_target");const I=M("link_default_protocol");const P=M("link_target_list");const F=M("link_rel_list");const V=M("link_class_list");const j=M("link_title");const U=M("allow_unsafe_link_target");const q=M("link_quicklink");var W=tinymce.util.Tools.resolve("tinymce.util.Tools");const $=e=>c(e.value)?e.value:"";const G=e=>{if(c(e.text)){return e.text}else if(c(e.title)){return e.title}else{return""}};const K=(e,t)=>{const o=[];W.each(e,(e=>{const n=G(e);if(e.menu!==undefined){const s=K(e.menu,t);o.push({text:n,items:s})}else{const s=t(e);o.push({text:n,value:s})}}));return o};const X=(e=$)=>t=>b.from(t).map((t=>K(t,e)));const Y=e=>X($)(e);const J=(e,t)=>o=>({name:e,type:"listbox",label:t,items:o});const Q={sanitize:Y,sanitizeWith:X,createUi:J,getValue:$};const Z=Object.keys;const ee=Object.hasOwnProperty;const te=(e,t)=>{const o=Z(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const oe=e=>(t,o)=>{e[o]=t};const ne=(e,t,o,n)=>{const s={};te(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const se=(e,t)=>{const o={};ne(e,t,oe(o),h);return o};const re=(e,t)=>ee.call(e,t);const ae=(e,t)=>re(e,t)&&e[t]!==undefined&&e[t]!==null;var ce=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");var ie=tinymce.util.Tools.resolve("tinymce.util.URI");const le=e=>e&&e.nodeName.toLowerCase()==="a";const de=e=>le(e)&&!!me(e);const ue=(e,t)=>{if(e.collapsed){return[]}else{const o=e.cloneContents();const n=new ce(o.firstChild,o);const s=[];let r=o.firstChild;do{if(t(r)){s.push(r)}}while(r=n.next());return s}};const fe=e=>/^\w+:/i.test(e);const me=e=>{const t=e.getAttribute("data-mce-href");return t?t:e.getAttribute("href")};const ge=(e,t)=>{const o=["noopener"];const n=e?e.split(/\s+/):[];const s=e=>W.trim(e.sort().join(" "));const r=e=>{e=a(e);return e.length>0?e.concat(o):o};const a=e=>e.filter((e=>W.inArray(o,e)===-1));const c=t?r(n):a(n);return c.length>0?s(c):""};const pe=e=>e.replace(/\uFEFF/g,"");const he=(e,t)=>{t=t||e.selection.getNode();if(we(t)){return e.dom.select("a[href]",t)[0]}else{return e.dom.getParent(t,"a[href]")}};const ye=(e,t)=>{const o=t?t.innerText||t.textContent:e.getContent({format:"text"});return pe(o)};const be=e=>W.grep(e,de).length>0;const ve=e=>ue(e,de).length>0;const ke=e=>{const t=e.schema.getTextInlineElements();const o=e=>e.nodeType===1&&!le(e)&&!re(t,e.nodeName.toLowerCase());const n=ue(e.selection.getRng(),o);return n.length===0};const we=e=>e&&e.nodeName==="FIGURE"&&/\bimage\b/i.test(e.className);const _e=e=>{const t=["title","rel","class","target"];return C(t,((t,o)=>{e[o].each((e=>{t[o]=e.length>0?e:null}));return t}),{href:e.href})};const xe=(e,t)=>{if((t==="http"||t==="https")&&!fe(e)){return t+"://"+e}return e};const ze=(e,t)=>{const o={...t};if(F(e).length===0&&!U(e)){const e=ge(o.rel,o.target==="_blank");o.rel=e?e:null}if(b.from(o.target).isNone()&&P(e)===false){o.target=H(e)}o.href=xe(o.href,R(e));return o};const Ce=(e,t,o,n)=>{o.each((e=>{if(re(t,"innerText")){t.innerText=e}else{t.textContent=e}}));e.dom.setAttribs(t,n);e.selection.select(t)};const Se=(e,t,o,n)=>{if(we(t)){Be(e,t,n)}else{o.fold((()=>{e.execCommand("mceInsertLink",false,n)}),(t=>{e.insertContent(e.dom.createHTML("a",n,e.dom.encode(t)))}))}};const Te=(e,t,o)=>{const n=e.selection.getNode();const s=he(e,n);const r=ze(e,_e(o));e.undoManager.transact((()=>{if(o.href===t.href){t.attach()}if(s){e.focus();Ce(e,s,o.text,r)}else{Se(e,n,o.text,r)}}))};const Oe=e=>{const t=e.dom,o=e.selection;const n=o.getBookmark();const s=o.getRng().cloneRange();const r=t.getParent(s.startContainer,"a[href]",e.getBody());const a=t.getParent(s.endContainer,"a[href]",e.getBody());if(r){s.setStartBefore(r)}if(a){s.setEndAfter(a)}o.setRng(s);e.execCommand("unlink");o.moveToBookmark(n)};const Ee=e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();if(we(t)){Re(e,t)}else{Oe(e)}e.focus()}))};const De=e=>{const{class:t,href:o,rel:n,target:s,text:r,title:a}=e;return se({class:t.getOrNull(),href:o,rel:n.getOrNull(),target:s.getOrNull(),text:r.getOrNull(),title:a.getOrNull()},((e,t)=>d(e)===false))};const Ae=(e,t)=>{const o=e.options.get;const n={allow_html_data_urls:o("allow_html_data_urls"),allow_script_urls:o("allow_script_urls"),allow_svg_data_urls:o("allow_svg_data_urls")};const s=t.href;return{...t,href:ie.isDomSafe(s,"a",n)?s:""}};const Me=(e,t,o)=>{const n=Ae(e,o);e.hasPlugin("rtc",true)?e.execCommand("createlink",false,De(n)):Te(e,t,n)};const Ne=e=>{e.hasPlugin("rtc",true)?e.execCommand("unlink"):Ee(e)};const Re=(e,t)=>{const o=e.dom.select("img",t)[0];if(o){const n=e.dom.getParents(o,"a[href]",t)[0];if(n){n.parentNode.insertBefore(o,n);e.dom.remove(n)}}};const Be=(e,t,o)=>{const n=e.dom.select("img",t)[0];if(n){const t=e.dom.create("a",o);n.parentNode.insertBefore(t,n);t.appendChild(n)}};const Le=e=>ae(e,"items");const He=(e,t)=>O(t,(t=>{if(Le(t)){return He(e,t.items)}else{return A(t.value===e,t)}}));const Ie=(e,t,o,n)=>{const s=n[t];const r=e.length>0;return s!==undefined?He(s,o).map((t=>({url:{value:t.value,meta:{text:r?e:t.text,attach:h}},text:r?e:t.text}))):b.none()};const Pe=(e,t)=>{if(t==="link"){return e.link}else if(t==="anchor"){return e.anchor}else{return b.none()}};const Fe=(e,t)=>{const o={text:e.text,title:e.title};const n=e=>A(o.title.length<=0,b.from(e.meta.title).getOr(""));const s=e=>A(o.text.length<=0,b.from(e.meta.text).getOr(e.value));const r=e=>{const t=s(e.url);const o=n(e.url);if(t.isSome()||o.isSome()){return b.some({...t.map((e=>({text:e}))).getOr({}),...o.map((e=>({title:e}))).getOr({})})}else{return b.none()}};const a=(e,n)=>{const s=Pe(t,n.name).getOr([]);return Ie(o.text,n.name,s,e)};const c=(e,t)=>{const n=t.name;if(n==="url"){return r(e())}else if(_(["anchor","link"],n)){return a(e(),t)}else if(n==="text"||n==="title"){o[n]=e()[n];return b.none()}else{return b.none()}};return{onChange:c}};const Ve={init:Fe,getDelta:Ie};var je=tinymce.util.Tools.resolve("tinymce.util.Delay");const Ue=(e,t,o)=>{const n=e.selection.getRng();je.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(n);o(t)}))}))};const qe=e=>{const t=e.href;const o=t.indexOf("@")>0&&t.indexOf("/")===-1&&t.indexOf("mailto:")===-1;return o?b.some({message:"The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?",preprocess:e=>({...e,href:"mailto:"+t})}):b.none()};const We=(e,t)=>o=>{const n=o.href;const s=e===1&&!fe(n)||e===0&&/^\s*www(\.|\d\.)/i.test(n);return s?b.some({message:`The URL you entered seems to be an external link. Do you want to add the required ${t}:// prefix?`,preprocess:e=>({...e,href:t+"://"+n})}):b.none()};const $e=(e,t)=>O([qe,We(R(e),I(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(o=>new Promise((n=>{Ue(e,o.message,(e=>{n(e?o.preprocess(t):t)}))}))));const Ge={preprocess:$e};const Ke=e=>{const t=e.dom.select("a:not([href])");const o=T(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]}));return o.length>0?b.some([{text:"None",value:""}].concat(o)):b.none()};const Xe={getAnchors:Ke};const Ye=e=>{const t=V(e);if(t.length>0){return Q.sanitize(t)}return b.none()};const Je={getClasses:Ye};const Qe=e=>{try{return b.some(JSON.parse(e))}catch(e){return b.none()}};const Ze=e=>{const t=t=>e.convertURL(t.value||t.url,"href");const o=L(e);return new Promise((e=>{if(c(o)){fetch(o).then((e=>e.ok?e.text().then(Qe):Promise.reject())).then(e,(()=>e(b.none())))}else if(g(o)){o((t=>e(b.some(t))))}else{e(b.from(o))}})).then((e=>e.bind(Q.sanitizeWith(t)).map((e=>{if(e.length>0){const t=[{text:"None",value:""}];return t.concat(e)}else{return e}}))))};const et={getLinks:Ze};const tt=(e,t)=>{const o=F(e);if(o.length>0){const n=E(t,"_blank");const s=U(e)===false;const r=e=>ge(Q.getValue(e),n);const a=s?Q.sanitizeWith(r):Q.sanitize;return a(o)}return b.none()};const ot={getRels:tt};const nt=[{text:"Current window",value:""},{text:"New window",value:"_blank"}];const st=e=>{const t=P(e);if(l(t)){return Q.sanitize(t).orThunk((()=>b.some(nt)))}else if(t===false){return b.none()}return b.some(nt)};const rt={getTargets:st};const at=(e,t,o)=>{const n=e.getAttrib(t,o);return n!==null&&n.length>0?b.some(n):b.none()};const ct=(e,t)=>{const o=e.dom;const n=ke(e);const s=n?b.some(ye(e.selection,t)):b.none();const r=t?b.some(o.getAttrib(t,"href")):b.none();const a=t?b.from(o.getAttrib(t,"target")):b.none();const c=at(o,t,"rel");const i=at(o,t,"class");const l=at(o,t,"title");return{url:r,text:s,title:l,target:a,rel:c,linkClass:i}};const it=(e,t)=>et.getLinks(e).then((o=>{const n=ct(e,t);return{anchor:n,catalogs:{targets:rt.getTargets(e),rels:ot.getRels(e,n.target),classes:Je.getClasses(e),anchor:Xe.getAnchors(e),link:o},optNode:b.from(t),flags:{titleEnabled:j(e)}}}));const lt={collect:it};const dt=(e,t)=>o=>{const n=o.getData();if(!n.url.value){Ne(e);o.close();return}const s=e=>b.from(n[e]).filter((o=>!E(t.anchor[e],o)));const r={href:n.url.value,text:s("text"),target:s("target"),rel:s("rel"),class:s("linkClass"),title:s("title")};const a={href:n.url.value,attach:n.url.meta!==undefined&&n.url.meta.attach?n.url.meta.attach:h};Ge.preprocess(e,r).then((t=>{Me(e,a,t)}));o.close()};const ut=e=>{const t=he(e);return lt.collect(e,t)};const ft=(e,t)=>{const o=e.anchor;const n=o.url.getOr("");return{url:{value:n,meta:{original:{value:n}}},text:o.text.getOr(""),title:o.title.getOr(""),anchor:n,link:n,rel:o.rel.getOr(""),target:o.target.or(t).getOr(""),linkClass:o.linkClass.getOr("")}};const mt=(e,t,o)=>{const n=[{name:"url",type:"urlinput",filetype:"file",label:"URL"}];const s=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray();const r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[];const a=b.from(H(o));const c=ft(e,a);const i=e.catalogs;const l=Ve.init(c,i);const d={type:"panel",items:S([n,s,r,D([i.anchor.map(Q.createUi("anchor","Anchors")),i.rels.map(Q.createUi("rel","Rel")),i.targets.map(Q.createUi("target","Open link in...")),i.link.map(Q.createUi("link","Link list")),i.classes.map(Q.createUi("linkClass","Class"))])])};return{title:"Insert/Edit Link",size:"normal",body:d,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:c,onChange:(e,{name:t})=>{l.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}};const gt=e=>{const t=ut(e);t.then((t=>{const o=dt(e,t);return mt(t,o,e)})).then((t=>{e.windowManager.open(t)}))};const pt=(e,t)=>{document.body.appendChild(e);e.dispatchEvent(t);document.body.removeChild(e)};const ht=e=>{const t=document.createElement("a");t.target="_blank";t.href=e;t.rel="noreferrer noopener";const o=document.createEvent("MouseEvents");o.initMouseEvent("click",true,true,window,0,0,0,0,0,false,false,false,false,0,null);pt(t,o)};const yt=(e,t)=>e.dom.getParent(t,"a[href]");const bt=e=>yt(e,e.selection.getStart());const vt=e=>e.altKey===true&&e.shiftKey===false&&e.ctrlKey===false&&e.metaKey===false;const kt=(e,t)=>{if(t){const o=me(t);if(/^#/.test(o)){const t=e.dom.select(o);if(t.length){e.selection.scrollIntoView(t[0],true)}}else{ht(t.href)}}};const wt=e=>()=>{gt(e)};const _t=e=>()=>{kt(e,bt(e))};const xt=e=>{e.on("click",(o=>{const n=yt(e,o.target);if(n&&t.metaKeyPressed(o)){o.preventDefault();kt(e,n)}}));e.on("keydown",(t=>{const o=bt(e);if(o&&t.keyCode===13&&vt(t)){t.preventDefault();kt(e,o)}}))};const zt=(e,t)=>{e.on("NodeChange",t);return()=>e.off("NodeChange",t)};const Ct=e=>t=>{const o=()=>t.setActive(!e.mode.isReadOnly()&&he(e,e.selection.getNode())!==null);o();return zt(e,o)};const St=e=>t=>{const o=()=>t.setEnabled(he(e,e.selection.getNode())!==null);o();return zt(e,o)};const Tt=e=>t=>{const o=t=>be(t)||ve(e.selection.getRng());const n=e.dom.getParents(e.selection.getStart());t.setEnabled(o(n));return zt(e,(e=>t.setEnabled(o(e.parents))))};const Ot=e=>{e.addCommand("mceLink",(()=>{if(q(e)){e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"})}else{wt(e)()}}))};const Et=e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))};const Dt=e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:wt(e),onSetup:Ct(e)});e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:_t(e),onSetup:St(e)});e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>Ne(e),onSetup:Tt(e)})};const At=e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:_t(e),onSetup:St(e)});e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:wt(e)});e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>Ne(e),onSetup:Tt(e)})};const Mt=e=>{const t="link unlink openlink";const o="link";e.ui.registry.addContextMenu("link",{update:n=>be(e.dom.getParents(n,"a"))?t:o})};const Nt=e=>{const t=e=>{e.selection.collapse(false)};const o=t=>{const o=e.selection.getNode();t.setEnabled(he(e,o)!==null);return h};const n=t=>{const o=he(e);const n=ke(e);if(!o&&n){const n=ye(e.selection,o);return b.some(n.length>0?n:t)}else{return b.none()}};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Ct(e)},label:"Link",predicate:t=>!!he(e,t)&&B(e),initValue:()=>{const t=he(e);return!!t?me(t):""},commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:true,onSetup:t=>{const o=e.selection.getNode();t.setActive(!!he(e,o));return Ct(e)(t)},onAction:o=>{const s=o.getValue();const r=n(s);const a={href:s,attach:h};Me(e,a,{href:s,text:r,title:b.none(),rel:b.none(),target:b.none(),class:b.none()});t(e);o.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:o,onAction:t=>{Ne(e);t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:o,onAction:t=>{_t(e)();t.hide()}}]})};var Rt=()=>{e.add("link",(e=>{N(e);Dt(e);At(e);Mt(e);Nt(e);xt(e);Ot(e);Et(e)}))};Rt()})()},495:(e,t,o)=>{o(496)},496:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const o=e=>{const o=typeof e;if(e===null){return"null"}else if(o==="object"&&Array.isArray(e)){return"array"}else if(o==="object"&&t(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return o}};const n=e=>t=>o(t)===e;const s=e=>t=>typeof t===e;const r=n("string");const a=n("object");const c=n("array");const i=s("boolean");const l=e=>e===null||e===undefined;const d=e=>!l(e);const u=s("function");const f=s("number");const m=()=>{};const g=e=>()=>e;const p=(e,t)=>e===t;const h=e=>t=>!e(t);const y=g(false);class b{constructor(e,t){this.tag=e;this.value=t}static some(e){return new b(true,e)}static none(){return b.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return b.some(e(this.value))}else{return b.none()}}bind(e){if(this.tag){return e(this.value)}else{return b.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return b.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return d(e)?b.some(e):b.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(false);const v=Array.prototype.slice;const k=Array.prototype.indexOf;const w=Array.prototype.push;const _=(e,t)=>k.call(e,t);const x=(e,t)=>_(e,t)>-1;const z=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return true}}return false};const C=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const S=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const T=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const O=(e,t)=>{if(e.length===0){return[]}else{let o=t(e[0]);const n=[];let s=[];for(let r=0,a=e.length;r<a;r++){const a=e[r];const c=t(a);if(c!==o){n.push(s);s=[]}o=c;s.push(a)}if(s.length!==0){n.push(s)}return n}};const E=(e,t,o)=>{S(e,((e,n)=>{o=t(o,e,n)}));return o};const D=(e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){return b.some(s)}else if(o(s,n)){break}}return b.none()};const A=(e,t)=>D(e,t,y);const M=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!c(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}w.apply(t,e[o])}return t};const N=(e,t)=>M(C(e,t));const R=e=>{const t=v.call(e,0);t.reverse();return t};const B=(e,t)=>t>=0&&t<e.length?b.some(e[t]):b.none();const L=e=>B(e,0);const H=e=>B(e,e.length-1);const I=(e,t)=>{const o=[];const n=u(t)?e=>z(o,(o=>t(o,e))):e=>x(o,e);for(let t=0,s=e.length;t<s;t++){const s=e[t];if(!n(s)){o.push(s)}}return o};const P=1;const F=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return U(n.childNodes[0])};const V=(e,t)=>{const o=t||document;const n=o.createElement(e);return U(n)};const j=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return U(n)};const U=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const q=(e,t,o)=>b.from(e.dom.elementFromPoint(t,o)).map(U);const W={fromHtml:F,fromTag:V,fromText:j,fromDom:U,fromPoint:q};const $=(e,t)=>{const o=e.dom;if(o.nodeType!==P){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};const G=(e,t)=>e.dom===t.dom;const K=(e,t)=>{const o=e.dom;const n=t.dom;return o===n?false:o.contains(n)};const X=$;typeof window!=="undefined"?window:Function("return this;")();const Y=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const J=e=>e.dom.nodeType;const Q=e=>t=>J(t)===e;const Z=Q(P);const ee=e=>t=>Z(t)&&Y(t)===e;const te=e=>b.from(e.dom.parentNode).map(W.fromDom);const oe=e=>b.from(e.dom.nextSibling).map(W.fromDom);const ne=e=>C(e.dom.childNodes,W.fromDom);const se=(e,t)=>{const o=e.dom.childNodes;return b.from(o[t]).map(W.fromDom)};const re=e=>se(e,0);const ae=e=>se(e,e.dom.childNodes.length-1);const ce=(e,t)=>{const o=te(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))};const ie=(e,t)=>{const o=oe(e);o.fold((()=>{const o=te(e);o.each((e=>{le(e,t)}))}),(e=>{ce(e,t)}))};const le=(e,t)=>{e.dom.appendChild(t.dom)};const de=(e,t)=>{S(t,(t=>{ce(e,t)}))};const ue=(e,t)=>{S(t,(t=>{le(e,t)}))};const fe=e=>{e.dom.textContent="";S(ne(e),(e=>{me(e)}))};const me=e=>{const t=e.dom;if(t.parentNode!==null){t.parentNode.removeChild(t)}};var ge=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils");var pe=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");var he=tinymce.util.Tools.resolve("tinymce.util.VK");const ye=Object.keys;const be=(e,t)=>{const o=ye(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const ve=e=>(t,o)=>{e[o]=t};const ke=(e,t,o,n)=>{const s={};be(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const we=(e,t)=>{const o={};ke(e,t,ve(o),m);return o};const _e=(e,t,o)=>{if(r(o)||i(o)||f(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const xe=(e,t)=>{const o=e.dom;be(t,((e,t)=>{_e(o,t,e)}))};const ze=e=>E(e.dom.attributes,((e,t)=>{e[t.name]=t.value;return e}),{});const Ce=(e,t)=>W.fromDom(e.dom.cloneNode(t));const Se=e=>Ce(e,true);const Te=(e,t)=>{const o=W.fromTag(t);const n=ze(e);xe(o,n);return o};const Oe=(e,t)=>{const o=Te(e,t);ie(e,o);const n=ne(e);ue(o,n);me(e);return o};var Ee=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");var De=tinymce.util.Tools.resolve("tinymce.util.Tools");const Ae=e=>t=>t&&t.nodeName.toLowerCase()===e;const Me=e=>t=>t&&e.test(t.nodeName);const Ne=e=>e&&e.nodeType===3;const Re=Me(/^(OL|UL|DL)$/);const Be=Me(/^(OL|UL)$/);const Le=Ae("ol");const He=Me(/^(LI|DT|DD)$/);const Ie=Me(/^(DT|DD)$/);const Pe=Me(/^(TH|TD)$/);const Fe=Ae("br");const Ve=e=>e.parentNode.firstChild===e;const je=(e,t)=>t&&!!e.schema.getTextBlockElements()[t.nodeName];const Ue=(e,t)=>e&&e.nodeName in t;const qe=(e,t)=>{if(!Fe(t)){return false}return e.isBlock(t.nextSibling)&&!Fe(t.previousSibling)};const We=(e,t,o)=>{const n=e.isEmpty(t);if(o&&e.select("span[data-mce-type=bookmark]",t).length>0){return false}return n};const $e=(e,t)=>e.isChildOf(t,e.getRoot());const Ge=e=>t=>t.options.get(e);const Ke=e=>{const t=e.options.register;t("lists_indent_on_tab",{processor:"boolean",default:true})};const Xe=Ge("lists_indent_on_tab");const Ye=Ge("forced_root_block");const Je=Ge("forced_root_block_attrs");const Qe=(e,t)=>{const o=e.dom;const n=e.schema.getBlockElements();const s=o.createFragment();const r=Ye(e);const a=Je(e);let c,i,l;i=o.create(r,a);if(!Ue(t.firstChild,n)){s.appendChild(i)}while(c=t.firstChild){const e=c.nodeName;if(!l&&(e!=="SPAN"||c.getAttribute("data-mce-type")!=="bookmark")){l=true}if(Ue(c,n)){s.appendChild(c);i=null}else{if(!i){i=o.create(r,a);s.appendChild(i)}i.appendChild(c)}}if(!l){i.appendChild(o.create("br",{"data-mce-bogus":"1"}))}return s};const Ze=Ee.DOM;const et=(e,t,o)=>{const n=e=>{De.each(s,(t=>{e.parentNode.insertBefore(t,o.parentNode)}));Ze.remove(e)};const s=Ze.select('span[data-mce-type="bookmark"]',t);const r=Qe(e,o);const a=Ze.createRng();a.setStartAfter(o);a.setEndAfter(t);const c=a.extractContents();for(let t=c.firstChild;t;t=t.firstChild){if(t.nodeName==="LI"&&e.dom.isEmpty(t)){Ze.remove(t);break}}if(!e.dom.isEmpty(c)){Ze.insertAfter(c,t)}Ze.insertAfter(r,t);if(We(e.dom,o.parentNode)){n(o.parentNode)}Ze.remove(o);if(We(e.dom,t)){Ze.remove(t)}};const tt=ee("dd");const ot=ee("dt");const nt=(e,t)=>{if(tt(t)){Oe(t,"dt")}else if(ot(t)){te(t).each((o=>et(e,o.dom,t.dom)))}};const st=e=>{if(ot(e)){Oe(e,"dd")}};const rt=(e,t,o)=>{if(t==="Indent"){S(o,st)}else{S(o,(t=>nt(e,t)))}};const at=(e,t)=>{if(Ne(e)){return{container:e,offset:t}}const o=ge.getNode(e,t);if(Ne(o)){return{container:o,offset:t>=e.childNodes.length?o.data.length:0}}else if(o.previousSibling&&Ne(o.previousSibling)){return{container:o.previousSibling,offset:o.previousSibling.data.length}}else if(o.nextSibling&&Ne(o.nextSibling)){return{container:o.nextSibling,offset:0}}return{container:e,offset:t}};const ct=e=>{const t=e.cloneRange();const o=at(e.startContainer,e.startOffset);t.setStart(o.container,o.offset);const n=at(e.endContainer,e.endOffset);t.setEnd(n.container,n.offset);return t};const it=(e,t)=>{const o=t||e.selection.getStart(true);return e.dom.getParent(o,"OL,UL,DL",pt(e,o))};const lt=(e,t)=>e&&t.length===1&&t[0]===e;const dt=e=>T(e.querySelectorAll("ol,ul,dl"),Re);const ut=e=>{const t=it(e);const o=e.selection.getSelectedBlocks();if(lt(t,o)){return dt(t)}else{return T(o,(e=>Re(e)&&t!==e))}};const ft=(e,t)=>{const o=De.map(t,(t=>{const o=e.dom.getParent(t,"li,dd,dt",pt(e,t));return o?o:t}));return I(o)};const mt=e=>{const t=e.selection.getSelectedBlocks();return T(ft(e,t),He)};const gt=e=>T(mt(e),Ie);const pt=(e,t)=>{const o=e.dom.getParents(t,"TD,TH");return o.length>0?o[0]:e.getBody()};const ht=(e,t)=>{const o=e.dom.getParents(t,"ol,ul",pt(e,t));return H(o)};const yt=e=>{const t=ht(e,e.selection.getStart());const o=T(e.selection.getSelectedBlocks(),Be);return t.toArray().concat(o)};const bt=e=>{const t=yt(e);return vt(e,t)};const vt=(e,t)=>{const o=C(t,(t=>ht(e,t).getOr(t)));return I(o)};const kt=(e,t,o=p)=>e.exists((e=>o(e,t)));const wt=(e,t,o)=>e.isSome()&&t.isSome()?b.some(o(e.getOrDie(),t.getOrDie())):b.none();const _t=(e,t)=>{const o=t||document;const n=o.createDocumentFragment();S(e,(e=>{n.appendChild(e.dom)}));return W.fromDom(n)};const xt=(e,t,o)=>e.dispatch("ListMutation",{action:t,element:o});const zt=e=>t=>t.replace(e,"");const Ct=zt(/^\s+|\s+$/g);const St=e=>e.length>0;const Tt=e=>!St(e);const Ot=e=>e.style!==undefined&&u(e.style.getPropertyValue);const Et=(e,t,o)=>{if(!r(o)){console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e);throw new Error("CSS value must be a string: "+o)}if(Ot(e)){e.style.setProperty(t,o)}};const Dt=(e,t,o)=>{const n=e.dom;Et(n,t,o)};const At=(e,t)=>{le(e.item,t.list)};const Mt=e=>{for(let t=1;t<e.length;t++){At(e[t-1],e[t])}};const Nt=(e,t)=>{wt(H(e),L(t),At)};const Rt=(e,t)=>{const o={list:W.fromTag(t,e),item:W.fromTag("li",e)};le(o.list,o.item);return o};const Bt=(e,t,o)=>{const n=[];for(let s=0;s<o;s++){n.push(Rt(e,t.listType))}return n};const Lt=(e,t)=>{for(let t=0;t<e.length-1;t++){Dt(e[t].item,"list-style-type","none")}H(e).each((e=>{xe(e.list,t.listAttributes);xe(e.item,t.itemAttributes);ue(e.item,t.content)}))};const Ht=(e,t)=>{if(Y(e.list)!==t.listType){e.list=Oe(e.list,t.listType)}xe(e.list,t.listAttributes)};const It=(e,t,o)=>{const n=W.fromTag("li",e);xe(n,t);ue(n,o);return n};const Pt=(e,t)=>{le(e.list,t);e.item=t};const Ft=(e,t,o)=>{const n=t.slice(0,o.depth);H(n).each((t=>{const n=It(e,o.itemAttributes,o.content);Pt(t,n);Ht(t,o)}));return n};const Vt=(e,t,o)=>{const n=Bt(e,o,o.depth-t.length);Mt(n);Lt(n,o);Nt(t,n);return t.concat(n)};const jt=(e,t)=>{const o=E(t,((t,o)=>o.depth>t.length?Vt(e,t,o):Ft(e,t,o)),[]);return L(o).map((e=>e.list))};const Ut=e=>X(e,"OL,UL");const qt=e=>re(e).exists(Ut);const Wt=e=>ae(e).exists(Ut);const $t=e=>e.depth>0;const Gt=e=>e.isSelected;const Kt=e=>{const t=ne(e);const o=Wt(e)?t.slice(0,-1):t;return C(o,Se)};const Xt=(e,t,o)=>te(e).filter(Z).map((n=>({depth:t,dirty:false,isSelected:o,content:Kt(e),itemAttributes:ze(e),listAttributes:ze(n),listType:Y(n)})));const Yt=(e,t)=>{switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}t.dirty=true};const Jt=(e,t)=>{e.listType=t.listType;e.listAttributes={...t.listAttributes}};const Qt=e=>{e.listAttributes=we(e.listAttributes,((e,t)=>t!=="start"))};const Zt=(e,t)=>{const o=e[t].depth;const n=e=>e.depth===o&&!e.dirty;const s=e=>e.depth<o;return D(R(e.slice(0,t)),n,s).orThunk((()=>D(e.slice(t+1),n,s)))};const eo=e=>{S(e,((t,o)=>{Zt(e,o).fold((()=>{if(t.dirty){Qt(t)}}),(e=>Jt(t,e)))}));return e};const to=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};const oo=(e,t,o,n)=>re(n).filter(Ut).fold((()=>{t.each((e=>{if(G(e.start,n)){o.set(true)}}));const s=Xt(n,e,o.get());t.each((e=>{if(G(e.end,n)){o.set(false)}}));const r=ae(n).filter(Ut).map((n=>no(e,t,o,n))).getOr([]);return s.toArray().concat(r)}),(n=>no(e,t,o,n)));const no=(e,t,o,n)=>N(ne(n),(n=>{const s=Ut(n)?no:oo;const r=e+1;return s(r,t,o,n)}));const so=(e,t)=>{const o=to(false);const n=0;return C(e,(e=>({sourceList:e,entries:no(n,t,o,e)})))};const ro=(e,t)=>{const o=eo(t);return C(o,(t=>{const o=_t(t.content);return W.fromDom(Qe(e,o.dom))}))};const ao=(e,t)=>{const o=eo(t);return jt(e.contentDocument,o).toArray()};const co=(e,t)=>N(O(t,$t),(t=>{const o=L(t).exists($t);return o?ao(e,t):ro(e,t)}));const io=(e,t)=>{S(T(e,Gt),(e=>Yt(t,e)))};const lo=e=>{const t=C(mt(e),W.fromDom);return wt(A(t,h(qt)),A(R(t),h(qt)),((e,t)=>({start:e,end:t})))};const uo=(e,t,o)=>{const n=so(t,lo(e));S(n,(t=>{io(t.entries,o);const n=co(e,t.entries);S(n,(t=>{xt(e,o==="Indent"?"IndentList":"OutdentList",t.dom)}));de(t.sourceList,n);me(t.sourceList)}))};const fo=(e,t)=>{const o=C(bt(e),W.fromDom);const n=C(gt(e),W.fromDom);let s=false;if(o.length||n.length){const r=e.selection.getBookmark();uo(e,o,t);rt(e,t,n);e.selection.moveToBookmark(r);e.selection.setRng(ct(e.selection.getRng()));e.nodeChanged();s=true}return s};const mo=e=>fo(e,"Indent");const go=e=>fo(e,"Outdent");const po=e=>fo(e,"Flatten");var ho=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const yo=Ee.DOM;const bo=e=>{const t={};const o=o=>{let n=e[o?"startContainer":"endContainer"];let s=e[o?"startOffset":"endOffset"];if(n.nodeType===1){const e=yo.create("span",{"data-mce-type":"bookmark"});if(n.hasChildNodes()){s=Math.min(s,n.childNodes.length-1);if(o){n.insertBefore(e,n.childNodes[s])}else{yo.insertAfter(e,n.childNodes[s])}}else{n.appendChild(e)}n=e;s=0}t[o?"startContainer":"endContainer"]=n;t[o?"startOffset":"endOffset"]=s};o(true);if(!e.collapsed){o()}return t};const vo=e=>{const t=t=>{let o;const n=e=>{let t=e.parentNode.firstChild,o=0;while(t){if(t===e){return o}if(t.nodeType!==1||t.getAttribute("data-mce-type")!=="bookmark"){o++}t=t.nextSibling}return-1};let s=o=e[t?"startContainer":"endContainer"];let r=e[t?"startOffset":"endOffset"];if(!s){return}if(s.nodeType===1){r=n(s);s=s.parentNode;yo.remove(o);if(!s.hasChildNodes()&&yo.isBlock(s)){s.appendChild(yo.create("br"))}}e[t?"startContainer":"endContainer"]=s;e[t?"startOffset":"endOffset"]=r};t(true);t();const o=yo.createRng();o.setStart(e.startContainer,e.startOffset);if(e.endContainer){o.setEnd(e.endContainer,e.endOffset)}return ct(o)};const ko=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}};const wo=e=>/\btox\-/.test(e.className);const _o=(e,t,o)=>{const n=e=>{const n=D(e.parents,Re,Pe).filter((e=>e.nodeName===t&&!wo(e))).isSome();o(n)};const s=e.dom.getParents(e.selection.getNode());n({parents:s});e.on("NodeChange",n);return()=>e.off("NodeChange",n)};const xo=(e,t,o)=>{const n=o["list-style-type"]?o["list-style-type"]:null;e.setStyle(t,"list-style-type",n)};const zo=(e,t)=>{De.each(t,((t,o)=>{e.setAttribute(o,t)}))};const Co=(e,t,o)=>{zo(t,o["list-attributes"]);De.each(e.select("li",t),(e=>{zo(e,o["list-item-attributes"])}))};const So=(e,t,o)=>{xo(e,t,o);Co(e,t,o)};const To=(e,t,o)=>{De.each(o,(o=>e.setStyle(t,o,"")))};const Oo=(e,t,o,n)=>{let s=t[o?"startContainer":"endContainer"];const r=t[o?"startOffset":"endOffset"];if(s.nodeType===1){s=s.childNodes[Math.min(r,s.childNodes.length-1)]||s}if(!o&&Fe(s.nextSibling)){s=s.nextSibling}while(s.parentNode!==n){if(je(e,s)){return s}if(/^(TD|TH)$/.test(s.parentNode.nodeName)){return s}s=s.parentNode}return s};const Eo=(e,t,o)=>{const n=[];const s=e.dom;const r=Oo(e,t,true,o);const a=Oo(e,t,false,o);let c;const i=[];for(let e=r;e;e=e.nextSibling){i.push(e);if(e===a){break}}De.each(i,(t=>{if(je(e,t)){n.push(t);c=null;return}if(s.isBlock(t)||Fe(t)){if(Fe(t)){s.remove(t)}c=null;return}const r=t.nextSibling;if(ho.isBookmarkNode(t)){if(Re(r)||je(e,r)||!r&&t.parentNode===o){c=null;return}}if(!c){c=s.create("p");t.parentNode.insertBefore(c,t);n.push(c)}c.appendChild(t)}));return n};const Do=(e,t,o)=>{const n=e.getStyle(t,"list-style-type");let s=o?o["list-style-type"]:"";s=s===null?"":s;return n===s};const Ao=(e,t,o)=>{const n=e.selection.getRng();let s="LI";const r=pt(e,e.selection.getStart(true));const a=e.dom;if(a.getContentEditable(e.selection.getNode())==="false"){return}t=t.toUpperCase();if(t==="DL"){s="DT"}const c=bo(n);const i=Eo(e,n,r);De.each(i,(n=>{let r;const c=n.previousSibling;const i=n.parentNode;if(!He(i)){if(c&&Re(c)&&c.nodeName===t&&Do(a,c,o)){r=c;n=a.rename(n,s);c.appendChild(n)}else{r=a.create(t);n.parentNode.insertBefore(r,n);r.appendChild(n);n=a.rename(n,s)}To(a,n,["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"]);So(a,r,o);Lo(e.dom,r)}}));e.selection.setRng(vo(c))};const Mo=(e,t)=>e&&t&&Re(e)&&e.nodeName===t.nodeName;const No=(e,t,o)=>{const n=e.getStyle(t,"list-style-type",true);const s=e.getStyle(o,"list-style-type",true);return n===s};const Ro=(e,t)=>e.className===t.className;const Bo=(e,t,o)=>Mo(t,o)&&No(e,t,o)&&Ro(t,o);const Lo=(e,t)=>{let o,n;o=t.nextSibling;if(Bo(e,t,o)){while(n=o.firstChild){t.appendChild(n)}e.remove(o)}o=t.previousSibling;if(Bo(e,t,o)){while(n=o.lastChild){t.insertBefore(n,t.firstChild)}e.remove(o)}};const Ho=(e,t,o,n)=>{if(t.nodeName!==o){const s=e.dom.rename(t,o);So(e.dom,s,n);xt(e,ko(o),s)}else{So(e.dom,t,n);xt(e,ko(o),t)}};const Io=(e,t,o,n,s)=>{const r=Re(t);if(r&&t.nodeName===n&&!Po(s)){po(e)}else{Ao(e,n,s);const a=bo(e.selection.getRng());const c=r?[t,...o]:o;De.each(c,(t=>{Ho(e,t,n,s)}));e.selection.setRng(vo(a))}};const Po=e=>"list-style-type"in e;const Fo=(e,t,o,n)=>{if(t===e.getBody()){return}if(t){if(t.nodeName===o&&!Po(n)&&!wo(t)){po(e)}else{const s=bo(e.selection.getRng());So(e.dom,t,n);const r=e.dom.rename(t,o);Lo(e.dom,r);e.selection.setRng(vo(s));Ao(e,o,n);xt(e,ko(o),r)}}else{Ao(e,o,n);xt(e,ko(o),t)}};const Vo=(e,t,o)=>{const n=it(e);const s=ut(e);const r=a(o)?o:{};if(s.length>0){Io(e,n,s,t,r)}else{Fo(e,n,t,r)}};const jo=Ee.DOM;const Uo=(e,t)=>{const o=t.parentNode;if(o.nodeName==="LI"&&o.firstChild===t){const n=o.previousSibling;if(n&&n.nodeName==="LI"){n.appendChild(t);if(We(e,o)){jo.remove(o)}}else{jo.setStyle(o,"listStyleType","none")}}if(Re(o)){const e=o.previousSibling;if(e&&e.nodeName==="LI"){e.appendChild(t)}}};const qo=(e,t)=>{const o=De.grep(e.select("ol,ul",t));De.each(o,(t=>{Uo(e,t)}))};const Wo=(e,t,o,n)=>{let s=t.startContainer;const r=t.startOffset;if(Ne(s)&&(o?r<s.data.length:r>0)){return s}const a=e.schema.getNonEmptyElements();if(s.nodeType===1){s=ge.getNode(s,r)}const c=new pe(s,n);if(o){if(qe(e.dom,s)){c.next()}}while(s=c[o?"next":"prev2"]()){if(s.nodeName==="LI"&&!s.hasChildNodes()){return s}if(a[s.nodeName]){return s}if(Ne(s)&&s.data.length>0){return s}}};const $o=(e,t)=>{const o=t.childNodes;return o.length===1&&!Re(o[0])&&e.isBlock(o[0])};const Go=(e,t)=>{if($o(e,t)){e.remove(t.firstChild,true)}};const Ko=(e,t,o)=>{let n;const s=$o(e,o)?o.firstChild:o;Go(e,t);if(!We(e,t,true)){while(n=t.firstChild){s.appendChild(n)}}};const Xo=(e,t,o)=>{let n;const s=t.parentNode;if(!$e(e,t)||!$e(e,o)){return}if(Re(o.lastChild)){n=o.lastChild}if(s===o.lastChild){if(Fe(s.previousSibling)){e.remove(s.previousSibling)}}const r=o.lastChild;if(r&&Fe(r)&&t.hasChildNodes()){e.remove(r)}if(We(e,o,true)){fe(W.fromDom(o))}Ko(e,t,o);if(n){o.appendChild(n)}const a=K(W.fromDom(o),W.fromDom(t));const c=a?e.getParents(t,Re,o):[];e.remove(t);S(c,(t=>{if(We(e,t)&&t!==e.getRoot()){e.remove(t)}}))};const Yo=(e,t,o)=>{fe(W.fromDom(o));Xo(e.dom,t,o);e.selection.setCursorLocation(o,0)};const Jo=(e,t,o,n)=>{const s=e.dom;if(s.isEmpty(n)){Yo(e,o,n)}else{const r=bo(t);Xo(s,o,n);e.selection.setRng(vo(r))}};const Qo=(e,t,o,n)=>{const s=bo(t);Xo(e.dom,o,n);const r=vo(s);e.selection.setRng(r)};const Zo=(e,t)=>{const o=e.dom,n=e.selection;const s=n.getStart();const r=pt(e,s);const a=o.getParent(n.getStart(),"LI",r);if(a){const s=a.parentNode;if(s===e.getBody()&&We(o,s)){return true}const c=ct(n.getRng());const i=o.getParent(Wo(e,c,t,r),"LI",r);if(i&&i!==a){e.undoManager.transact((()=>{if(t){Jo(e,c,i,a)}else{if(Ve(a)){go(e)}else{Qo(e,c,a,i)}}}));return true}else if(!i){if(!t&&c.startOffset===0&&c.endOffset===0){e.undoManager.transact((()=>{po(e)}));return true}}}return false};const en=(e,t,o)=>{const n=e.getParent(t.parentNode,e.isBlock,o);e.remove(t);if(n&&e.isEmpty(n)){e.remove(n)}};const tn=(e,t)=>{const o=e.dom;const n=e.selection.getStart();const s=pt(e,n);const r=o.getParent(n,o.isBlock,s);if(r&&o.isEmpty(r)){const n=ct(e.selection.getRng());const a=o.getParent(Wo(e,n,t,s),"LI",s);if(a){e.undoManager.transact((()=>{en(o,r,s);Lo(o,a.parentNode);e.selection.select(a,true);e.selection.collapse(t)}));return true}}return false};const on=(e,t)=>Zo(e,t)||tn(e,t);const nn=e=>{const t=e.selection.getStart();const o=pt(e,t);const n=e.dom.getParent(t,"LI,DT,DD",o);if(n||mt(e).length>0){e.undoManager.transact((()=>{e.execCommand("Delete");qo(e.dom,e.getBody())}));return true}return false};const sn=(e,t)=>e.selection.isCollapsed()?on(e,t):nn(e);const rn=e=>{e.on("keydown",(t=>{if(t.keyCode===he.BACKSPACE){if(sn(e,false)){t.preventDefault()}}else if(t.keyCode===he.DELETE){if(sn(e,true)){t.preventDefault()}}}))};const an=e=>({backspaceDelete:t=>{sn(e,t)}});const cn=(e,t)=>{const o=it(e);e.undoManager.transact((()=>{if(a(t.styles)){e.dom.setStyles(o,t.styles)}if(a(t.attrs)){be(t.attrs,((t,n)=>e.dom.setAttrib(o,n,t)))}}))};const ln=e=>{const t=R(Ct(e).split(""));const o=C(t,((e,t)=>{const o=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*o}));return E(o,((e,t)=>e+t),0)};const dn=e=>{e--;if(e<0){return""}else{const t=e%26;const o=Math.floor(e/26);const n=dn(o);const s=String.fromCharCode("A".charCodeAt(0)+t);return n+s}};const un=e=>/^[A-Z]+$/.test(e);const fn=e=>/^[a-z]+$/.test(e);const mn=e=>/^[0-9]+$/.test(e);const gn=e=>{if(mn(e)){return 2}else if(un(e)){return 0}else if(fn(e)){return 1}else if(Tt(e)){return 3}else{return 4}};const pn=e=>{switch(gn(e)){case 2:return b.some({listStyleType:b.none(),start:e});case 0:return b.some({listStyleType:b.some("upper-alpha"),start:ln(e).toString()});case 1:return b.some({listStyleType:b.some("lower-alpha"),start:ln(e).toString()});case 3:return b.some({listStyleType:b.none(),start:""});case 4:return b.none()}};const hn=e=>{const t=parseInt(e.start,10);if(kt(e.listStyleType,"upper-alpha")){return dn(t)}else if(kt(e.listStyleType,"lower-alpha")){return dn(t).toLowerCase()}else{return e.start}};const yn=e=>{const t=it(e);if(!Le(t)){return}e.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:hn({start:e.dom.getAttrib(t,"start","1"),listStyleType:b.some(e.dom.getStyle(t,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],onSubmit:t=>{const o=t.getData();pn(o.start).each((t=>{e.execCommand("mceListUpdate",false,{attrs:{start:t.start==="1"?"":t.start},styles:{"list-style-type":t.listStyleType.getOr("")}})}));t.close()}})};const bn=(e,t)=>()=>{const o=it(e);return o&&o.nodeName===t};const vn=e=>{e.addCommand("mceListProps",(()=>{yn(e)}))};const kn=e=>{e.on("BeforeExecCommand",(t=>{const o=t.command.toLowerCase();if(o==="indent"){mo(e)}else if(o==="outdent"){go(e)}}));e.addCommand("InsertUnorderedList",((t,o)=>{Vo(e,"UL",o)}));e.addCommand("InsertOrderedList",((t,o)=>{Vo(e,"OL",o)}));e.addCommand("InsertDefinitionList",((t,o)=>{Vo(e,"DL",o)}));e.addCommand("RemoveList",(()=>{po(e)}));vn(e);e.addCommand("mceListUpdate",((t,o)=>{if(a(o)){cn(e,o)}}));e.addQueryStateHandler("InsertUnorderedList",bn(e,"UL"));e.addQueryStateHandler("InsertOrderedList",bn(e,"OL"));e.addQueryStateHandler("InsertDefinitionList",bn(e,"DL"))};const wn=e=>{e.on("keydown",(t=>{if(t.keyCode!==he.TAB||he.metaKeyPressed(t)){return}e.undoManager.transact((()=>{if(t.shiftKey?go(e):mo(e)){t.preventDefault()}}))}))};const _n=e=>{if(Xe(e)){wn(e)}rn(e)};const xn=e=>{const t=t=>()=>e.execCommand(t);if(!e.hasPlugin("advlist")){e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:false,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:t=>_o(e,"OL",t.setActive)});e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:false,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:t=>_o(e,"UL",t.setActive)})}};const zn=e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:t=>_o(e,"OL",t.setEnabled)};e.ui.registry.addMenuItem("listprops",t);e.ui.registry.addContextMenu("lists",{update:t=>{const o=it(e,t);return Le(o)?["listprops"]:[]}})};var Cn=()=>{e.add("lists",(e=>{Ke(e);if(e.hasPlugin("rtc",true)===false){_n(e);kn(e)}else{vn(e)}xn(e);zn(e);return an(e)}))};Cn()})()},497:(e,t,o)=>{o(498)},498:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const o=e=>{const o=typeof e;if(e===null){return"null"}else if(o==="object"&&Array.isArray(e)){return"array"}else if(o==="object"&&t(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return o}};const n=e=>t=>o(t)===e;const s=e=>t=>typeof t===e;const r=n("string");const a=s("boolean");const c=e=>e===null||e===undefined;const i=e=>!c(e);const l=s("function");const d=e=>t=>t.options.get(e);const u=e=>{const t=e.options.register;const o=e=>t=>{const o=a(t)||r(t);if(o){if(a(t)){return{value:t?e:"",valid:o}}else{return{value:t.trim(),valid:o}}}else{return{valid:false,message:"Must be a boolean or string."}}};const n="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:o(n),default:n});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:o(s),default:s});const c="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:o(c),default:c})};const f=d("quickbars_selection_toolbar");const m=d("quickbars_insert_toolbar");const g=d("quickbars_image_toolbar");let p=0;const h=e=>{const t=new Date;const o=t.getTime();const n=Math.floor(Math.random()*1e9);p++;return e+"_"+n+p+String(o)};const y=(e,t,o)=>{e.execCommand("mceInsertTable",false,{rows:o,columns:t})};const b=(e,t,o)=>{const n=e.editorUpload.blobCache;const s=n.create(h("mceu"),o,t);n.add(s);e.insertContent(e.dom.createHTML("img",{src:s.blobUri()}))};const v=e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])};o.readAsDataURL(e)}));var k=tinymce.util.Tools.resolve("tinymce.Env");var w=tinymce.util.Tools.resolve("tinymce.util.Delay");const _=e=>new Promise((t=>{const o=document.createElement("input");o.type="file";o.accept="image/*";o.style.position="fixed";o.style.left="0";o.style.top="0";o.style.opacity="0.001";document.body.appendChild(o);const n=e=>{t(Array.prototype.slice.call(e.target.files))};o.addEventListener("change",n);const s=n=>{const r=()=>{t([]);o.parentNode.removeChild(o)};if(k.os.isAndroid()&&n.type!=="remove"){w.setEditorTimeout(e,r,0)}else{r()}e.off("focusin remove",s)};e.on("focusin remove",s);o.click()}));const x=e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{_(e).then((t=>{if(t.length>0){const o=t[0];v(o).then((t=>{b(e,t,o)}))}}))}});e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{y(e,2,2)}})};const z=e=>()=>e;const C=z(false);class S{constructor(e,t){this.tag=e;this.value=t}static some(e){return new S(true,e)}static none(){return S.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return S.some(e(this.value))}else{return S.none()}}bind(e){if(this.tag){return e(this.value)}else{return S.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return S.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return i(e)?S.some(e):S.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}S.singletonNone=new S(false);var T=(e,t,o,n,s)=>{if(e(o,n)){return S.some(o)}else if(l(s)&&s(o)){return S.none()}else{return t(o,n,s)}};const O=1;const E=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return M(n.childNodes[0])};const D=(e,t)=>{const o=t||document;const n=o.createElement(e);return M(n)};const A=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return M(n)};const M=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const N=(e,t,o)=>S.from(e.dom.elementFromPoint(t,o)).map(M);const R={fromHtml:E,fromTag:D,fromText:A,fromDom:M,fromPoint:N};const B=(e,t)=>{const o=e.dom;if(o.nodeType!==O){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};typeof window!=="undefined"?window:Function("return this;")();const L=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const H=(e,t,o)=>{let n=e.dom;const s=l(o)?o:C;while(n.parentNode){n=n.parentNode;const e=R.fromDom(n);if(t(e)){return S.some(e)}else if(s(e)){break}}return S.none()};const I=(e,t,o)=>{const n=(e,t)=>t(e);return T(n,H,e,t,o)};const P=(e,t,o)=>H(e,(e=>B(e,t)),o);const F=(e,t,o)=>{const n=(e,t)=>B(e,t);return T(n,P,e,t,o)};const V=e=>{const t=m(e);if(t.length>0){e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=R.fromDom(t);const n=e.schema.getTextBlockElements();const s=t=>t.dom===e.getBody();return F(o,"table",s).fold((()=>I(o,(t=>L(t)in n&&e.dom.isEmpty(t.dom)),s).isSome()),C)},items:t,position:"line",scope:"editor"})}};const j=e=>{const t=t=>e.dom.getContentEditableParent(t)!=="false";const o=e=>e.nodeName==="IMG"||e.nodeName==="FIGURE"&&/image/i.test(e.className);const n=g(e);if(n.length>0){e.ui.registry.addContextToolbar("imageselection",{predicate:o,items:n,position:"node"})}const s=f(e);if(s.length>0){e.ui.registry.addContextToolbar("textselection",{predicate:n=>!o(n)&&!e.selection.isCollapsed()&&t(n),items:s,position:"selection",scope:"editor"})}};var U=()=>{e.add("quickbars",(e=>{u(e);x(e);V(e);j(e)}))};U()})()},499:(e,t,o)=>{o(500)},500:()=>{(function(){"use strict";const e=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const o=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const n=e=>{const t=typeof e;if(e===null){return"null"}else if(t==="object"&&Array.isArray(e)){return"array"}else if(t==="object"&&o(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return t}};const s=e=>t=>n(t)===e;const r=e=>t=>typeof t===e;const a=s("string");const c=s("array");const i=r("boolean");const l=e=>e===null||e===undefined;const d=e=>!l(e);const u=r("number");const f=()=>{};const m=e=>()=>e;const g=m(true);const p="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]";const h=m(p);class y{constructor(e,t){this.tag=e;this.value=t}static some(e){return new y(true,e)}static none(){return y.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return y.some(e(this.value))}else{return y.none()}}bind(e){if(this.tag){return e(this.value)}else{return y.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return y.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return d(e)?y.some(e):y.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}y.singletonNone=new y(false);const b=h;var v=tinymce.util.Tools.resolve("tinymce.Env");var k=tinymce.util.Tools.resolve("tinymce.util.Tools");const w=Array.prototype.slice;const _=Array.prototype.push;const x=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const z=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const C=(e,t)=>{for(let o=e.length-1;o>=0;o--){const n=e[o];t(n,o)}};const S=(e,t)=>{if(e.length===0){return[]}else{let o=t(e[0]);const n=[];let s=[];for(let r=0,a=e.length;r<a;r++){const a=e[r];const c=t(a);if(c!==o){n.push(s);s=[]}o=c;s.push(a)}if(s.length!==0){n.push(s)}return n}};const T=(e,t,o)=>{z(e,((e,n)=>{o=t(o,e,n)}));return o};const O=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!c(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}_.apply(t,e[o])}return t};const E=(e,t)=>O(x(e,t));const D=(e,t)=>{const o=w.call(e,0);o.sort(t);return o};const A=Object.hasOwnProperty;const M=(e,t)=>A.call(e,t);typeof window!=="undefined"?window:Function("return this;")();const N=9;const R=11;const B=1;const L=3;const H=e=>e.dom.nodeType;const I=e=>t=>H(t)===e;const P=I(L);const F=(e,t,o)=>{if(a(o)||i(o)||u(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const V=(e,t,o)=>{F(e.dom,t,o)};const j=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return W(n.childNodes[0])};const U=(e,t)=>{const o=t||document;const n=o.createElement(e);return W(n)};const q=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return W(n)};const W=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const $=(e,t,o)=>y.from(e.dom.elementFromPoint(t,o)).map(W);const G={fromHtml:j,fromTag:U,fromText:q,fromDom:W,fromPoint:$};const K=e=>e.nodeType!==B&&e.nodeType!==N&&e.nodeType!==R||e.childElementCount===0;const X=(e,t)=>{const o=t===undefined?document:t.dom;return K(o)?[]:x(o.querySelectorAll(e),G.fromDom)};const Y=e=>y.from(e.dom.parentNode).map(G.fromDom);const J=e=>x(e.dom.childNodes,G.fromDom);const Q=(e,t)=>({element:e,offset:t});const Z=(e,t)=>{const o=J(e);return o.length>0&&t<o.length?Q(o[t],0):Q(e,t)};const ee=(e,t)=>{const o=Y(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))};const te=(e,t)=>{e.dom.appendChild(t.dom)};const oe=(e,t)=>{ee(e,t);te(t,e)};const ne=(e,t)=>{const o=o=>{if(!e(o)){throw new Error("Can only get "+t+" value of a "+t+" node")}return n(o).getOr("")};const n=t=>e(t)?y.from(t.dom.nodeValue):y.none();const s=(o,n)=>{if(!e(o)){throw new Error("Can only set raw "+t+" value of a "+t+" node")}o.dom.nodeValue=n};return{get:o,getOption:n,set:s}};const se=ne(P,"text");const re=e=>se.get(e);const ae=(e,t,o)=>(e.compareDocumentPosition(t)&o)!==0;const ce=(e,t)=>ae(e,t,Node.DOCUMENT_POSITION_PRECEDING);const ie=(e,t)=>X(t,e);var le=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const de=(e,t)=>e.isBlock(t)||M(e.schema.getVoidElements(),t.nodeName);const ue=(e,t)=>e.getContentEditable(t)==="false";const fe=(e,t)=>e.getContentEditable(t)==="true"&&e.getContentEditableParent(t.parentNode)==="false";const me=(e,t)=>!e.isBlock(t)&&M(e.schema.getWhitespaceElements(),t.nodeName);const ge=(e,t)=>de(e,t)||ue(e,t)||me(e,t)||fe(e,t);const pe=e=>e.nodeType===3;const he=()=>({sOffset:0,fOffset:0,elements:[]});const ye=(e,t)=>Z(G.fromDom(e),t);const be=(e,t,o,n,s,r=true)=>{let a=r?t(false):o;while(a){const o=ue(e,a);if(o||me(e,a)){const e=o?n.cef(a):n.boundary(a);if(e){break}else{a=t(true);continue}}else if(de(e,a)){if(n.boundary(a)){break}}else if(pe(a)){n.text(a)}if(a===s){break}else{a=t(false)}}};const ve=(e,t,o,n,s)=>{if(ge(e,o)){return}const r=e.getParent(n,e.isBlock);const a=new le(o,r);const c=s?a.next.bind(a):a.prev.bind(a);be(e,c,o,{boundary:g,cef:g,text:e=>{if(s){t.fOffset+=e.length}else{t.sOffset+=e.length}t.elements.push(G.fromDom(e))}})};const ke=(e,t,o,n,s,r=true)=>{const a=new le(o,t);const c=[];let i=he();ve(e,i,o,t,false);const l=()=>{if(i.elements.length>0){c.push(i);i=he()}return false};be(e,a.next.bind(a),o,{boundary:l,cef:e=>{l();if(s){c.push(...s.cef(e))}return false},text:e=>{i.elements.push(G.fromDom(e));if(s){s.text(e,i)}}},n,r);if(n){ve(e,i,n,t,true)}l();return c};const we=(e,t)=>{const o=ye(t.startContainer,t.startOffset);const n=o.element.dom;const s=ye(t.endContainer,t.endOffset);const r=s.element.dom;return ke(e,t.commonAncestorContainer,n,r,{text:(e,t)=>{if(e===r){t.fOffset+=e.length-s.offset}else if(e===n){t.sOffset+=o.offset}},cef:t=>{const o=E(ie(G.fromDom(t),"*[contenteditable=true]"),(t=>{const o=t.dom;return ke(e,o,o)}));return D(o,((e,t)=>ce(e.elements[0].dom,t.elements[0].dom)?1:-1))}},false)};const _e=(e,t)=>t.collapsed?[]:we(e,t);const xe=(e,t)=>{const o=e.createRng();o.selectNode(t);return _e(e,o)};const ze=(e,t)=>E(t,(t=>xe(e,t)));const Ce=(e,t,o=0,n=e.length)=>{const s=t.regex;s.lastIndex=o;const r=[];let a;while(a=s.exec(e)){const e=a[t.matchIndex];const o=a.index+a[0].indexOf(e);const c=o+e.length;if(c>n){break}r.push({start:o,finish:c});s.lastIndex=c}return r};const Se=(e,t)=>{const o=T(e,((e,o)=>{const n=re(o);const s=e.last;const r=s+n.length;const a=E(t,((e,t)=>{if(e.start<r&&e.finish>s){return[{element:o,start:Math.max(s,e.start)-s,finish:Math.min(r,e.finish)-s,matchId:t}]}else{return[]}}));return{results:e.results.concat(a),last:r}}),{results:[],last:0}).results;return S(o,(e=>e.matchId))};const Te=(e,t)=>E(t,(t=>{const o=t.elements;const n=x(o,re).join("");const s=Ce(n,e,t.sOffset,n.length-t.fOffset);return Se(o,s)}));const Oe=(e,t)=>{C(e,((e,o)=>{C(e,(e=>{const n=G.fromDom(t.cloneNode(false));V(n,"data-mce-index",o);const s=e.element.dom;if(s.length===e.finish&&e.start===0){oe(e.element,n)}else{if(s.length!==e.finish){s.splitText(e.finish)}const t=s.splitText(e.start);oe(G.fromDom(t),n)}}))}))};const Ee=(e,t,o,n)=>{const s=xe(e,o);const r=Te(t,s);Oe(r,n);return r.length};const De=(e,t,o,n)=>{const s=o.getBookmark();const r=e.select("td[data-mce-selected],th[data-mce-selected]");const a=r.length>0?ze(e,r):_e(e,o.getRng());const c=Te(t,a);Oe(c,n);o.moveToBookmark(s);return c.length};const Ae=e=>{const t=e.getAttribute("data-mce-index");if(typeof t==="number"){return""+t}return t};const Me=(e,t,o,n)=>{const s=e.dom.create("span",{"data-mce-bogus":1});s.className="mce-match-marker";const r=e.getBody();Ue(e,t,false);if(n){return De(e.dom,o,e.selection,s)}else{return Ee(e.dom,o,r,s)}};const Ne=e=>{const t=e.parentNode;if(e.firstChild){t.insertBefore(e.firstChild,e)}e.parentNode.removeChild(e)};const Re=(e,t)=>{const o=[];const n=k.toArray(e.getBody().getElementsByTagName("span"));if(n.length){for(let e=0;e<n.length;e++){const s=Ae(n[e]);if(s===null||!s.length){continue}if(s===t.toString()){o.push(n[e])}}}return o};const Be=(e,t,o)=>{const n=t.get();let s=n.index;const r=e.dom;o=o!==false;if(o){if(s+1===n.count){s=0}else{s++}}else{if(s-1===-1){s=n.count-1}else{s--}}r.removeClass(Re(e,n.index),"mce-match-marker-selected");const a=Re(e,s);if(a.length){r.addClass(Re(e,s),"mce-match-marker-selected");e.selection.scrollIntoView(a[0]);return s}return-1};const Le=(e,t)=>{const o=t.parentNode;e.remove(t);if(e.isEmpty(o)){e.remove(o)}};const He=(e,t)=>{const o=e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]");const n="("+o+")";return t?`(?:^|\\s|${b()})`+n+`(?=$|\\s|${b()})`:n};const Ie=(e,t,o,n,s,r)=>{const a=e.selection;const c=He(o,s);const i=a.isForward();const l={regex:new RegExp(c,n?"g":"gi"),matchIndex:1};const d=Me(e,t,l,r);if(v.browser.isSafari()){a.setRng(a.getRng(),i)}if(d){const a=Be(e,t,true);t.set({index:a,count:d,text:o,matchCase:n,wholeWord:s,inSelection:r})}return d};const Pe=(e,t)=>{const o=Be(e,t,true);t.set({...t.get(),index:o})};const Fe=(e,t)=>{const o=Be(e,t,false);t.set({...t.get(),index:o})};const Ve=e=>{const t=Ae(e);return t!==null&&t.length>0};const je=(e,t,o,n,s)=>{const r=t.get();const a=r.index;let c,i=a;n=n!==false;const l=e.getBody();const d=k.grep(k.toArray(l.getElementsByTagName("span")),Ve);for(let t=0;t<d.length;t++){const l=Ae(d[t]);let u=c=parseInt(l,10);if(s||u===r.index){if(o.length){d[t].firstChild.nodeValue=o;Ne(d[t])}else{Le(e.dom,d[t])}while(d[++t]){u=parseInt(Ae(d[t]),10);if(u===c){Le(e.dom,d[t])}else{t--;break}}if(n){i--}}else if(c>a){d[t].setAttribute("data-mce-index",String(c-1))}}t.set({...r,count:s?0:r.count-1,index:i});if(n){Pe(e,t)}else{Fe(e,t)}return!s&&t.get().count>0};const Ue=(e,t,o)=>{let n,s;const r=t.get();const a=k.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<a.length;e++){const t=Ae(a[e]);if(t!==null&&t.length){if(t===r.index.toString()){if(!n){n=a[e].firstChild}s=a[e].firstChild}Ne(a[e])}}t.set({...r,index:-1,count:0,text:""});if(n&&s){const t=e.dom.createRng();t.setStart(n,0);t.setEnd(s,s.data.length);if(o!==false){e.selection.setRng(t)}return t}};const qe=(e,t)=>t.get().count>1;const We=(e,t)=>t.get().count>1;const $e=(e,t)=>{const o=o=>Ue(e,t,o);const n=(o,n,s,r=false)=>Ie(e,t,o,n,s,r);const s=()=>Pe(e,t);const r=()=>Fe(e,t);const a=(o,n,s)=>je(e,t,o,n,s);return{done:o,find:n,next:s,prev:r,replace:a}};const Ge=t=>{const o=e(y.none());const n=()=>o.get().each(t);const s=()=>{n();o.set(y.none())};const r=()=>o.get().isSome();const a=()=>o.get();const c=e=>{n();o.set(y.some(e))};return{clear:s,isSet:r,get:a,set:c}};const Ke=()=>{const e=Ge(f);const t=t=>e.get().each(t);return{...e,on:t}};const Xe=(e,t)=>{const o=Ke();e.undoManager.add();const n=k.trim(e.selection.getContent({format:"text"}));const s=o=>{o.setEnabled("next",qe(e,t));o.setEnabled("prev",We(e,t))};const r=e=>{const o=e.getData();const n=t.get();t.set({...n,matchCase:o.matchcase,wholeWord:o.wholewords,inSelection:o.inselection})};const a=(e,t)=>{const o=["replace","replaceall","prev","next"];const n=o=>e.setEnabled(o,!t);z(o,n)};const c=t=>{e.windowManager.alert("Could not find the specified string.",(()=>{t.focus("findtext")}))};const i=(e,t)=>{if(v.browser.isSafari()&&v.deviceType.isTouch()&&(t==="find"||t==="replace"||t==="replaceall")){e.focus(t)}};const l=o=>{Ue(e,t,false);a(o,true);s(o)};const d=o=>{const n=o.getData();const r=t.get();if(!n.findtext.length){l(o);return}if(r.text===n.findtext&&r.matchCase===n.matchcase&&r.wholeWord===n.wholewords){Pe(e,t)}else{const s=Ie(e,t,n.findtext,n.matchcase,n.wholewords,n.inselection);if(s<=0){c(o)}a(o,s===0)}s(o)};const u=t.get();const f={findtext:n,replacetext:"",wholewords:u.wholeWord,matchcase:u.matchCase,inselection:u.inSelection};const m={title:"Find and Replace",size:"normal",body:{type:"panel",items:[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:true,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:false,borderless:true},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:false,borderless:true}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}]},buttons:[{type:"menu",name:"options",icon:"preferences",tooltip:"Preferences",align:"start",items:[{type:"togglemenuitem",name:"matchcase",text:"Match case"},{type:"togglemenuitem",name:"wholewords",text:"Find whole words only"},{type:"togglemenuitem",name:"inselection",text:"Find in selection"}]},{type:"custom",name:"find",text:"Find",primary:true},{type:"custom",name:"replace",text:"Replace",enabled:false},{type:"custom",name:"replaceall",text:"Replace all",enabled:false}],initialData:f,onChange:(e,o)=>{if(o.name==="findtext"&&t.get().count>0){l(e)}},onAction:(o,n)=>{const a=o.getData();switch(n.name){case"find":d(o);break;case"replace":if(!je(e,t,a.replacetext)){l(o)}else{s(o)}break;case"replaceall":je(e,t,a.replacetext,true,true);l(o);break;case"prev":Fe(e,t);s(o);break;case"next":Pe(e,t);s(o);break;case"matchcase":case"wholewords":case"inselection":r(o);l(o);break}i(o,n.name)},onSubmit:e=>{d(e);i(e,"find")},onClose:()=>{e.focus();Ue(e,t);e.undoManager.add()}};o.set(e.windowManager.open(m,{inline:"toolbar"}))};const Ye=(e,t)=>{e.addCommand("SearchReplace",(()=>{Xe(e,t)}))};const Je=(e,t)=>()=>{Xe(e,t)};const Qe=(e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:Je(e,t),icon:"search"});e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:Je(e,t),icon:"search"});e.shortcuts.add("Meta+F","",Je(e,t))};var Ze=()=>{t.add("searchreplace",(t=>{const o=e({index:-1,count:0,text:"",matchCase:false,wholeWord:false,inSelection:false});Ye(t,o);Qe(t,o);return $e(t,o)}))};Ze()})()},501:(e,t,o)=>{o(502)},502:()=>{(function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const o=e=>{const o=typeof e;if(e===null){return"null"}else if(o==="object"&&Array.isArray(e)){return"array"}else if(o==="object"&&t(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return o}};const n=e=>t=>o(t)===e;const s=e=>t=>typeof t===e;const r=e=>t=>e===t;const a=n("string");const c=n("array");const i=s("boolean");const l=r(undefined);const d=e=>e===null||e===undefined;const u=e=>!d(e);const f=s("function");const m=s("number");const g=()=>{};const p=(e,t)=>o=>e(t(o));const h=e=>()=>e;const y=e=>e;const b=(e,t)=>e===t;function v(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const k=h(false);const w=h(true);class _{constructor(e,t){this.tag=e;this.value=t}static some(e){return new _(true,e)}static none(){return _.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return _.some(e(this.value))}else{return _.none()}}bind(e){if(this.tag){return e(this.value)}else{return _.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return _.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return u(e)?_.some(e):_.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}_.singletonNone=new _(false);const x=Object.keys;const z=Object.hasOwnProperty;const C=(e,t)=>{const o=x(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const S=e=>(t,o)=>{e[o]=t};const T=(e,t,o,n)=>{const s={};C(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const O=(e,t)=>{const o={};T(e,t,S(o),g);return o};const E=(e,t)=>{const o=[];C(e,((e,n)=>{o.push(t(e,n))}));return o};const D=e=>E(e,y);const A=e=>x(e).length;const M=(e,t)=>N(e,t)?_.from(e[t]):_.none();const N=(e,t)=>z.call(e,t);const R=(e,t)=>N(e,t)&&e[t]!==undefined&&e[t]!==null;const B=Array.prototype.indexOf;const L=Array.prototype.push;const H=(e,t)=>B.call(e,t);const I=(e,t)=>H(e,t)>-1;const P=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return true}}return false};const F=(e,t)=>{const o=[];for(let n=0;n<e;n++){o.push(t(n))}return o};const V=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const j=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const U=(e,t)=>{for(let o=e.length-1;o>=0;o--){const n=e[o];t(n,o)}};const q=(e,t)=>{const o=[];const n=[];for(let s=0,r=e.length;s<r;s++){const r=e[s];const a=t(r,s)?o:n;a.push(r)}return{pass:o,fail:n}};const W=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const $=(e,t,o)=>{U(e,((e,n)=>{o=t(o,e,n)}));return o};const G=(e,t,o)=>{j(e,((e,n)=>{o=t(o,e,n)}));return o};const K=(e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){return _.some(s)}else if(o(s,n)){break}}return _.none()};const X=(e,t)=>K(e,t,k);const Y=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!c(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}L.apply(t,e[o])}return t};const J=(e,t)=>Y(V(e,t));const Q=(e,t)=>{for(let o=0,n=e.length;o<n;++o){const n=e[o];if(t(n,o)!==true){return false}}return true};const Z=(e,t)=>{const o={};for(let n=0,s=e.length;n<s;n++){const s=e[n];o[String(s)]=t(s,n)}return o};const ee=(e,t)=>t>=0&&t<e.length?_.some(e[t]):_.none();const te=e=>ee(e,0);const oe=e=>ee(e,e.length-1);const ne=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return _.none()};const se=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return ce(n.childNodes[0])};const re=(e,t)=>{const o=t||document;const n=o.createElement(e);return ce(n)};const ae=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return ce(n)};const ce=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const ie=(e,t,o)=>_.from(e.dom.elementFromPoint(t,o)).map(ce);const le={fromHtml:se,fromTag:re,fromText:ae,fromDom:ce,fromPoint:ie};typeof window!=="undefined"?window:Function("return this;")();const de=8;const ue=9;const fe=11;const me=1;const ge=3;const pe=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const he=e=>e.dom.nodeType;const ye=e=>t=>he(t)===e;const be=e=>he(e)===de||pe(e)==="#comment";const ve=ye(me);const ke=ye(ge);const we=ye(ue);const _e=ye(fe);const xe=e=>t=>ve(t)&&pe(t)===e;const ze=(e,t)=>{const o=e.dom;if(o.nodeType!==me){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};const Ce=e=>e.nodeType!==me&&e.nodeType!==ue&&e.nodeType!==fe||e.childElementCount===0;const Se=(e,t)=>{const o=t===undefined?document:t.dom;return Ce(o)?[]:V(o.querySelectorAll(e),le.fromDom)};const Te=(e,t)=>{const o=t===undefined?document:t.dom;return Ce(o)?_.none():_.from(o.querySelector(e)).map(le.fromDom)};const Oe=(e,t)=>e.dom===t.dom;const Ee=ze;const De=e=>le.fromDom(e.dom.ownerDocument);const Ae=e=>we(e)?e:De(e);const Me=e=>_.from(e.dom.parentNode).map(le.fromDom);const Ne=(e,t)=>{const o=f(t)?t:k;let n=e.dom;const s=[];while(n.parentNode!==null&&n.parentNode!==undefined){const e=n.parentNode;const t=le.fromDom(e);s.push(t);if(o(t)===true){break}else{n=e}}return s};const Re=e=>_.from(e.dom.previousSibling).map(le.fromDom);const Be=e=>_.from(e.dom.nextSibling).map(le.fromDom);const Le=e=>V(e.dom.childNodes,le.fromDom);const He=(e,t)=>{const o=e.dom.childNodes;return _.from(o[t]).map(le.fromDom)};const Ie=e=>He(e,0);const Pe=e=>_e(e)&&u(e.dom.host);const Fe=f(Element.prototype.attachShadow)&&f(Node.prototype.getRootNode);const Ve=Fe?e=>le.fromDom(e.dom.getRootNode()):Ae;const je=e=>{const t=Ve(e);return Pe(t)?_.some(t):_.none()};const Ue=e=>le.fromDom(e.dom.host);const qe=e=>{const t=ke(e)?e.dom.parentNode:e.dom;if(t===undefined||t===null||t.ownerDocument===null){return false}const o=t.ownerDocument;return je(le.fromDom(t)).fold((()=>o.body.contains(t)),p(qe,Ue))};const We=(e,t)=>W(Le(e),t);const $e=(e,t)=>{let o=[];j(Le(e),(e=>{if(t(e)){o=o.concat([e])}o=o.concat($e(e,t))}));return o};const Ge=(e,t)=>We(e,(e=>ze(e,t)));const Ke=(e,t)=>Se(t,e);var Xe=(e,t,o,n,s)=>{if(e(o,n)){return _.some(o)}else if(f(s)&&s(o)){return _.none()}else{return t(o,n,s)}};const Ye=(e,t,o)=>{let n=e.dom;const s=f(o)?o:k;while(n.parentNode){n=n.parentNode;const e=le.fromDom(n);if(t(e)){return _.some(e)}else if(s(e)){break}}return _.none()};const Je=(e,t)=>{const o=e=>t(le.fromDom(e));const n=X(e.dom.childNodes,o);return n.map(le.fromDom)};const Qe=(e,t,o)=>Ye(e,(e=>ze(e,t)),o);const Ze=(e,t)=>Je(e,(e=>ze(e,t)));const et=(e,t)=>Te(t,e);const tt=(e,t,o)=>{const n=(e,t)=>ze(e,t);return Xe(n,Qe,e,t,o)};const ot=(e,t,o)=>{if(a(o)||i(o)||m(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const nt=(e,t,o)=>{ot(e.dom,t,o)};const st=(e,t)=>{const o=e.dom;C(t,((e,t)=>{ot(o,t,e)}))};const rt=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?undefined:o};const at=(e,t)=>_.from(rt(e,t));const ct=(e,t)=>{e.dom.removeAttribute(t)};const it=e=>G(e.dom.attributes,((e,t)=>{e[t.name]=t.value;return e}),{});const lt=(e,t,o=b)=>e.exists((e=>o(e,t)));const dt=e=>{const t=[];const o=e=>{t.push(e)};for(let t=0;t<e.length;t++){e[t].each(o)}return t};const ut=(e,t,o)=>e.isSome()&&t.isSome()?_.some(o(e.getOrDie(),t.getOrDie())):_.none();const ft=e=>e.bind(y);const mt=(e,t)=>e?_.some(t):_.none();const gt=(e,t)=>e.substring(t);const pt=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t;const ht=(e,t)=>yt(e,t)?gt(e,t.length):e;const yt=(e,t)=>pt(e,t,0);const bt=e=>t=>t.replace(e,"");const vt=bt(/^\s+|\s+$/g);const kt=e=>e.length>0;const wt=e=>!kt(e);const _t=e=>{const t=parseFloat(e);return isNaN(t)?_.none():_.some(t)};const xt=e=>e.style!==undefined&&f(e.style.getPropertyValue);const zt=(e,t,o)=>{if(!a(o)){console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e);throw new Error("CSS value must be a string: "+o)}if(xt(e)){e.style.setProperty(t,o)}};const Ct=(e,t)=>{if(xt(e)){e.style.removeProperty(t)}};const St=(e,t,o)=>{const n=e.dom;zt(n,t,o)};const Tt=(e,t)=>{const o=e.dom;const n=window.getComputedStyle(o);const s=n.getPropertyValue(t);return s===""&&!qe(e)?Ot(o,t):s};const Ot=(e,t)=>xt(e)?e.style.getPropertyValue(t):"";const Et=(e,t)=>{const o=e.dom;const n=Ot(o,t);return _.from(n).filter((e=>e.length>0))};const Dt=(e,t)=>{const o=e.dom;Ct(o,t);if(lt(at(e,"style").map(vt),"")){ct(e,"style")}};const At=(e,t,o=0)=>at(e,t).map((e=>parseInt(e,10))).getOr(o);const Mt=(e,t)=>Nt(e,t,w);const Nt=(e,t,o)=>J(Le(e),(e=>{if(ze(e,t)){return o(e)?[e]:[]}else{return Nt(e,t,o)}}));const Rt=["tfoot","thead","tbody","colgroup"];const Bt=e=>I(Rt,e);const Lt=(e,t)=>({rows:e,columns:t});const Ht=(e,t,o)=>({element:e,rowspan:t,colspan:o});const It=(e,t,o,n,s,r)=>({element:e,rowspan:t,colspan:o,row:n,column:s,isLocked:r});const Pt=(e,t,o)=>({element:e,cells:t,section:o});const Ft=(e,t,o,n)=>({startRow:e,startCol:t,finishRow:o,finishCol:n});const Vt=(e,t,o)=>({element:e,colspan:t,column:o});const jt=(e,t)=>({element:e,columns:t});const Ut=(e,t,o=k)=>{if(o(t)){return _.none()}if(I(e,pe(t))){return _.some(t)}const n=e=>ze(e,"table")||o(e);return Qe(t,e.join(","),n)};const qt=(e,t)=>Ut(["td","th"],e,t);const Wt=e=>Mt(e,"th,td");const $t=e=>{if(ze(e,"colgroup")){return Ge(e,"col")}else{return J(Xt(e),(e=>Ge(e,"col")))}};const Gt=(e,t)=>tt(e,"table",t);const Kt=e=>Mt(e,"tr");const Xt=e=>Gt(e).fold(h([]),(e=>Ge(e,"colgroup")));const Yt=(e,t)=>V(e,(e=>{if(pe(e)==="colgroup"){const t=V($t(e),(e=>{const t=At(e,"span",1);return Ht(e,1,t)}));return Pt(e,t,"colgroup")}else{const o=V(Wt(e),(e=>{const t=At(e,"rowspan",1);const o=At(e,"colspan",1);return Ht(e,t,o)}));return Pt(e,o,t(e))}}));const Jt=e=>Me(e).map((e=>{const t=pe(e);return Bt(t)?t:"tbody"})).getOr("tbody");const Qt=e=>{const t=Kt(e);const o=Xt(e);const n=[...o,...t];return Yt(n,Jt)};const Zt="data-snooker-locked-cols";const eo=e=>at(e,Zt).bind((e=>_.from(e.match(/\d+/g)))).map((e=>Z(e,w)));const to=(e,t)=>e+","+t;const oo=(e,t,o)=>_.from(e.access[to(t,o)]);const no=(e,t,o)=>{const n=so(e,(e=>o(t,e.element)));return n.length>0?_.some(n[0]):_.none()};const so=(e,t)=>{const o=J(e.all,(e=>e.cells));return W(o,t)};const ro=e=>{const t={};let o=0;j(e.cells,(e=>{const n=e.colspan;F(n,(s=>{const r=o+s;t[r]=Vt(e.element,n,r)}));o+=n}));return t};const ao=e=>{const t={};const o=[];const n=te(e).map((e=>e.element)).bind(Gt);const s=n.bind(eo).getOr({});let r=0;let a=0;let c=0;const{pass:i,fail:l}=q(e,(e=>e.section==="colgroup"));j(l,(e=>{const n=[];j(e.cells,(e=>{let o=0;while(t[to(c,o)]!==undefined){o++}const r=R(s,o.toString());const i=It(e.element,e.rowspan,e.colspan,c,o,r);for(let n=0;n<e.colspan;n++){for(let s=0;s<e.rowspan;s++){const e=c+s;const r=o+n;const l=to(e,r);t[l]=i;a=Math.max(a,r+1)}}n.push(i)}));r++;o.push(Pt(e.element,n,e.section));c++}));const{columns:d,colgroups:u}=oe(i).map((e=>{const t=ro(e);const o=jt(e.element,D(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}})));const f=Lt(r,a);return{grid:f,access:t,all:o,columns:d,colgroups:u}};const co=e=>{const t=Qt(e);return ao(t)};const io=e=>J(e.all,(e=>e.cells));const lo=e=>D(e.columns);const uo=e=>x(e.columns).length>0;const fo=(e,t)=>_.from(e.columns[t]);const mo={fromTable:co,generate:ao,getAt:oo,findItem:no,filterItems:so,justCells:io,justColumns:lo,hasColumns:uo,getColumnAt:fo};var go=tinymce.util.Tools.resolve("tinymce.util.Tools");const po=(e,t,o)=>{const n=e.select("td,th",t);let s;const r=(t,n)=>{for(let s=0;s<n.length;s++){const r=e.getStyle(n[s],o);if(typeof t==="undefined"){t=r}if(t!==r){return""}}return t};return r(s,n)};const ho=(e,t,o)=>{if(o){e.formatter.apply("align"+o,{},t)}};const yo=(e,t,o)=>{if(o){e.formatter.apply("valign"+o,{},t)}};const bo=(e,t)=>{go.each("left center right".split(" "),(o=>{e.formatter.remove("align"+o,{},t)}))};const vo=(e,t)=>{go.each("top middle bottom".split(" "),(o=>{e.formatter.remove("valign"+o,{},t)}))};const ko=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})};const wo=(e,t)=>_t(e).getOr(t);const _o=(e,t,o)=>wo(Tt(e,t),o);const xo=(e,t,o,n)=>{const s=_o(e,`padding-${o}`,0);const r=_o(e,`padding-${n}`,0);const a=_o(e,`border-${o}-width`,0);const c=_o(e,`border-${n}-width`,0);return t-s-r-a-c};const zo=(e,t)=>{const o=e.dom;const n=o.getBoundingClientRect().width||o.offsetWidth;return t==="border-box"?n:xo(e,n,"left","right")};const Co=e=>zo(e,"content-box");const So=Co;var To=tinymce.util.Tools.resolve("tinymce.Env");const Oo="tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol";const Eo=F(5,(e=>{const t=`${e+1}px`;return{title:t,value:t}}));const Do=V(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(e=>({title:e,value:e.toLowerCase()})));const Ao=(e,t)=>{var o;if(Yo(e)){const n=e.dom;const s=(o=n.getParent(e.selection.getStart(),n.isBlock))!==null&&o!==void 0?o:e.getBody();const r=So(le.fromDom(s));return{...t,width:r+"px"}}else if(Jo(e)){return O(t,((e,t)=>t!=="width"))}else{return t}};const Mo=e=>t=>t.options.get(e);const No=e=>{const t=e.options.register;t("table_border_widths",{processor:"object[]",default:Eo});t("table_border_styles",{processor:"object[]",default:Do});t("table_cell_advtab",{processor:"boolean",default:true});t("table_row_advtab",{processor:"boolean",default:true});t("table_advtab",{processor:"boolean",default:true});t("table_appearance_options",{processor:"boolean",default:true});t("table_grid",{processor:"boolean",default:!To.deviceType.isTouch()});t("table_style_by_css",{processor:"boolean",default:true});t("table_cell_class_list",{processor:"object[]",default:[]});t("table_row_class_list",{processor:"object[]",default:[]});t("table_class_list",{processor:"object[]",default:[]});t("table_toolbar",{processor:"string",default:Oo});t("table_background_color_map",{processor:"object[]",default:[]});t("table_border_color_map",{processor:"object[]",default:[]})};const Ro=Mo("table_sizing_mode");const Bo=Mo("table_border_widths");const Lo=Mo("table_border_styles");const Ho=Mo("table_default_attributes");const Io=Mo("table_cell_advtab");const Po=Mo("table_row_advtab");const Fo=Mo("table_advtab");const Vo=Mo("table_appearance_options");const jo=Mo("table_grid");const Uo=Mo("table_style_by_css");const qo=Mo("table_cell_class_list");const Wo=Mo("table_row_class_list");const $o=Mo("table_class_list");const Go=Mo("table_toolbar");const Ko=Mo("table_background_color_map");const Xo=Mo("table_border_color_map");const Yo=e=>Ro(e)==="fixed";const Jo=e=>Ro(e)==="responsive";const Qo=e=>{const t=e.options;const o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:Ao(e,o)};const Zo=e=>e.nodeName.toLowerCase();const en=e=>le.fromDom(e.getBody());const tn=e=>t=>Oe(t,en(e));const on=e=>e?e.replace(/px$/,""):"";const nn=e=>/^\d+(\.\d+)?$/.test(e)?e+"px":e;const sn=e=>le.fromDom(e.selection.getStart());const rn=e=>le.fromDom(e.selection.getEnd());const an=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow;const cn=(e,t)=>{let o=true;const n=v(an,t);for(let s=t.startRow;s<=t.finishRow;s++){for(let r=t.startCol;r<=t.finishCol;r++){o=o&&mo.getAt(e,s,r).exists(n)}}return o?_.some(t):_.none()};const ln=(e,t)=>Ft(Math.min(e.row,t.row),Math.min(e.column,t.column),Math.max(e.row+e.rowspan-1,t.row+t.rowspan-1),Math.max(e.column+e.colspan-1,t.column+t.colspan-1));const dn=(e,t,o)=>{const n=mo.findItem(e,t,Oe);const s=mo.findItem(e,o,Oe);return n.bind((e=>s.map((t=>ln(e,t)))))};const un=(e,t,o)=>dn(e,t,o).bind((t=>cn(e,t)));const fn=(e,t,o)=>{const n=mn(e);return un(n,t,o)};const mn=mo.fromTable;const gn=(e,t)=>{const o=Me(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))};const pn=(e,t)=>{const o=Be(e);o.fold((()=>{const o=Me(e);o.each((e=>{yn(e,t)}))}),(e=>{gn(e,t)}))};const hn=(e,t)=>{const o=Ie(e);o.fold((()=>{yn(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))};const yn=(e,t)=>{e.dom.appendChild(t.dom)};const bn=(e,t)=>{gn(e,t);yn(t,e)};const vn=(e,t)=>{j(t,((o,n)=>{const s=n===0?e:t[n-1];pn(s,o)}))};const kn=(e,t)=>{j(t,(t=>{yn(e,t)}))};const wn=e=>{const t=e.dom;if(t.parentNode!==null){t.parentNode.removeChild(t)}};const _n=e=>{const t=Le(e);if(t.length>0){vn(e,t)}wn(e)};const xn=(e,t)=>{const o=o=>{if(!e(o)){throw new Error("Can only get "+t+" value of a "+t+" node")}return n(o).getOr("")};const n=t=>e(t)?_.from(t.dom.nodeValue):_.none();const s=(o,n)=>{if(!e(o)){throw new Error("Can only set raw "+t+" value of a "+t+" node")}o.dom.nodeValue=n};return{get:o,getOption:n,set:s}};const zn=xn(ke,"text");const Cn=e=>zn.get(e);const Sn=(e,t)=>zn.set(e,t);var Tn=["body","p","div","article","aside","figcaption","figure","footer","header","nav","section","ol","ul","li","table","thead","tbody","tfoot","caption","tr","td","th","h1","h2","h3","h4","h5","h6","blockquote","pre","address"];var On=()=>{const e=e=>le.fromDom(e.dom.cloneNode(false));const t=e=>Ae(e).dom;const o=e=>{if(!ve(e)){return false}if(pe(e)==="body"){return true}return I(Tn,pe(e))};const n=e=>{if(!ve(e)){return false}return I(["br","img","hr","input"],pe(e))};const s=e=>ve(e)&&rt(e,"contenteditable")==="false";const r=(e,t)=>e.dom.compareDocumentPosition(t.dom);const a=(e,t)=>{const o=it(e);st(t,o)};const c=e=>{const t=pe(e);return I(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)};const i=e=>ve(e)?at(e,"lang"):_.none();return{up:h({selector:Qe,closest:tt,predicate:Ye,all:Ne}),down:h({selector:Ke,predicate:$e}),styles:h({get:Tt,getRaw:Et,set:St,remove:Dt}),attrs:h({get:rt,set:nt,remove:ct,copyTo:a}),insert:h({before:gn,after:pn,afterAll:vn,append:yn,appendAll:kn,prepend:hn,wrap:bn}),remove:h({unwrap:_n,remove:wn}),create:h({nu:le.fromTag,clone:e,text:le.fromText}),query:h({comparePosition:r,prevSibling:Re,nextSibling:Be}),property:h({children:Le,name:pe,parent:Me,document:t,isText:ke,isComment:be,isElement:ve,isSpecial:c,getLanguage:i,getText:Cn,setText:Sn,isBoundary:o,isEmptyTag:n,isNonEditable:s}),eq:Oe,is:Ee}};const En=(e,t,o,n)=>{const s=o[0];const r=o.slice(1);return n(e,t,s,r)};const Dn=(e,t,o)=>o.length>0?En(e,t,o,An):_.none();const An=(e,t,o,n)=>{const s=t(e,o);return $(n,((o,n)=>{const s=t(e,n);return Mn(e,o,s)}),s)};const Mn=(e,t,o)=>t.bind((t=>o.filter(v(e.eq,t))));const Nn=Dn;const Rn=On();const Bn=(e,t)=>Nn(Rn,((t,o)=>e(o)),t);const Ln=e=>Qe(e,"table");const Hn=(e,t)=>{const o=Ke(e,t);return o.length>0?_.some(o):_.none()};const In=(e,t,o)=>et(e,t).bind((t=>et(e,o).bind((e=>Bn(Ln,[t,e]).map((o=>({first:t,last:e,table:o})))))));const Pn=(e,t)=>Hn(e,t);const Fn=(e,t,o)=>In(e,t,o).bind((t=>{const o=t=>Oe(e,t);const n="thead,tfoot,tbody,table";const s=Qe(t.first,n,o);const r=Qe(t.last,n,o);return s.bind((e=>r.bind((o=>Oe(e,o)?fn(t.table,t.first,t.last):_.none()))))}));const Vn=e=>V(e,le.fromDom);const jn="data-mce-selected";const Un="td["+jn+"],th["+jn+"]";const qn="data-mce-first-selected";const Wn="td["+qn+"],th["+qn+"]";const $n="data-mce-last-selected";const Gn="td["+$n+"],th["+$n+"]";const Kn={selected:jn,selectedSelector:Un,firstSelected:qn,firstSelectedSelector:Wn,lastSelected:$n,lastSelectedSelector:Gn};const Xn=e=>Gt(e).bind((e=>Pn(e,Kn.firstSelectedSelector))).fold(h(e),(e=>e[0]));const Yn=e=>(t,o)=>{const n=pe(t);const s=n==="col"||n==="colgroup"?Xn(t):t;return tt(s,e,o)};const Jn=Yn("th,td,caption");const Qn=Yn("th,td");const Zn=e=>Vn(e.model.table.getSelectedCells());const es=(e,t)=>{const o=Qn(e);const n=o.bind((e=>Gt(e))).map((e=>Kt(e)));return ut(o,n,((e,o)=>W(o,(o=>P(Vn(o.dom.cells),(o=>rt(o,t)==="1"||Oe(o,e))))))).getOr([])};const ts=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}];const os=e=>({value:e});const ns=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;const ss=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;const rs=e=>ns.test(e)||ss.test(e);const as=e=>ht(e,"#").toUpperCase();const cs=e=>rs(e)?_.some({value:as(e)}):_.none();const is=e=>{const t=e.toString(16);return(t.length===1?"0"+t:t).toUpperCase()};const ls=e=>{const t=is(e.red)+is(e.green)+is(e.blue);return os(t)};const ds=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i;const us=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i;const fs=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n});const ms=(e,t,o,n)=>{const s=parseInt(e,10);const r=parseInt(t,10);const a=parseInt(o,10);const c=parseFloat(n);return fs(s,r,a,c)};const gs=e=>{if(e==="transparent"){return _.some(fs(0,0,0,0))}const t=ds.exec(e);if(t!==null){return _.some(ms(t[1],t[2],t[3],"1"))}const o=us.exec(e);if(o!==null){return _.some(ms(o[1],o[2],o[3],o[4]))}return _.none()};const ps=e=>cs(e).orThunk((()=>gs(e).map(ls))).getOrThunk((()=>{const t=document.createElement("canvas");t.height=1;t.width=1;const o=t.getContext("2d");o.clearRect(0,0,t.width,t.height);o.fillStyle="#FFFFFF";o.fillStyle=e;o.fillRect(0,0,1,1);const n=o.getImageData(0,0,1,1).data;const s=n[0];const r=n[1];const a=n[2];const c=n[3];return ls(fs(s,r,a,c))}));const hs=e=>gs(e).map(ls).map((e=>"#"+e.value)).getOr(e);const ys=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};const bs=e=>{const t=ys(_.none());const o=()=>t.get().each(e);const n=()=>{o();t.set(_.none())};const s=()=>t.get().isSome();const r=()=>t.get();const a=e=>{o();t.set(_.some(e))};return{clear:n,isSet:s,get:r,set:a}};const vs=()=>bs((e=>e.unbind()));const ks=(e,t,o)=>n=>{const s=vs();const r=wt(o);const a=()=>{const a=Zn(e);const c=n=>e.formatter.match(t,{value:o},n.dom,r);if(r){n.setActive(!P(a,c));s.set(e.formatter.formatChanged(t,(e=>n.setActive(!e)),true))}else{n.setActive(Q(a,c));s.set(e.formatter.formatChanged(t,n.setActive,false,{value:o}))}};e.initialized?a():e.on("init",a);return s.clear};const ws=e=>R(e,"menu");const _s=e=>V(e,(e=>{const t=e.text||e.title;if(ws(e)){return{text:t,items:_s(e.menu)}}else{return{text:t,value:e.value}}}));const xs=(e,t,o,n)=>V(t,(t=>{const s=t.text||t.title;if(ws(t)){return{type:"nestedmenuitem",text:s,getSubmenuItems:()=>xs(e,t.menu,o,n)}}else{return{text:s,type:"togglemenuitem",onAction:()=>n(t.value),onSetup:ks(e,o,t.value)}}}));const zs=(e,t)=>o=>{e.execCommand("mceTableApplyCellStyle",false,{[t]:o})};const Cs=e=>J(e,(e=>{if(ws(e)){return[{...e,menu:Cs(e.menu)}]}else{return kt(e.value)?[e]:[]}}));const Ss=(e,t,o,n)=>s=>s(xs(e,t,o,n));const Ts=(e,t,o)=>{const n=V(t,(e=>({text:e.title,value:"#"+ps(e.value).value,type:"choiceitem"})));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:n.length>0?n:undefined,allowCustomColors:false},onAction:t=>{const n=t.value==="remove"?"":t.value;e.execCommand("mceTableApplyCellStyle",false,{[o]:n})}}]};const Os=e=>()=>{const t=e.queryCommandValue("mceTableRowType");const o=t==="header"?"body":"header";e.execCommand("mceTableRowType",false,{type:o})};const Es=e=>()=>{const t=e.queryCommandValue("mceTableColType");const o=t==="th"?"td":"th";e.execCommand("mceTableColType",false,{type:o})};const Ds=e=>{const t=_s(qo(e));if(t.length>0){return _.some({name:"class",type:"listbox",label:"Class",items:t})}return _.none()};const As=[{name:"width",type:"input",label:"Width"},{name:"height",type:"input",label:"Height"},{name:"celltype",type:"listbox",label:"Cell type",items:[{text:"Cell",value:"td"},{text:"Header cell",value:"th"}]},{name:"scope",type:"listbox",label:"Scope",items:[{text:"None",value:""},{text:"Row",value:"row"},{text:"Column",value:"col"},{text:"Row group",value:"rowgroup"},{text:"Column group",value:"colgroup"}]},{name:"halign",type:"listbox",label:"Horizontal align",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{name:"valign",type:"listbox",label:"Vertical align",items:ts}];const Ms=e=>As.concat(Ds(e).toArray());const Ns=(e,t)=>{const o=[{text:"Select...",value:""}];const n=[{name:"borderstyle",type:"listbox",label:"Border style",items:o.concat(_s(Lo(e)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];const s={name:"borderwidth",type:"input",label:"Border width"};const r=t==="cell"?[s].concat(n):n;return{title:"Advanced",name:"advanced",items:r}};const Rs=e=>(t,o)=>{const n=t.dom;const s=(t,s)=>{if(!e||s){n.setAttrib(o,t,s)}};const r=(t,s)=>{if(!e||s){n.setStyle(o,t,s)}};const a=(n,s)=>{if(!e||s){if(s===""){t.formatter.remove(n,{value:null},o,true)}else{t.formatter.apply(n,{value:s},o)}}};return{setAttrib:s,setStyle:r,setFormat:a}};const Bs={normal:Rs(false),ifTruthy:Rs(true)};const Ls=xe("th");const Hs=(e,t)=>{if(e&&t){return"sectionCells"}else if(e){return"section"}else{return"cells"}};const Is=e=>{const t=e.section==="thead";const o=lt(Ps(e.cells),"th");if(e.section==="tfoot"){return{type:"footer"}}else if(t||o){return{type:"header",subType:Hs(t,o)}}else{return{type:"body"}}};const Ps=e=>{const t=W(e,(e=>Ls(e.element)));if(t.length===0){return _.some("td")}else if(t.length===e.length){return _.some("th")}else{return _.none()}};const Fs=e=>{const t=V(e,(e=>Is(e).type));const o=I(t,"header");const n=I(t,"footer");if(!o&&!n){return _.some("body")}else{const e=I(t,"body");if(o&&!e&&!n){return _.some("header")}else if(!o&&!e&&n){return _.some("footer")}else{return _.none()}}};const Vs=e=>{let t=false;let o;return(...n)=>{if(!t){t=true;o=e.apply(null,n)}return o}};const js=(e,t)=>ne(e.all,(e=>X(e.cells,(e=>Oe(t,e.element)))));const Us=(e,t,o)=>{const n=V(t.selection,(t=>qt(t).bind((t=>js(e,t))).filter(o)));const s=dt(n);return mt(s.length>0,s)};const qs=(e,t)=>t.mergable;const Ws=(e,t)=>t.unmergable;const $s=(e,t)=>Us(e,t,w);const Gs=(e,t)=>js(e,t).exists((e=>!e.isLocked));const Ks=(e,t)=>Q(t,(t=>Gs(e,t)));const Xs=(e,t)=>qs(e,t).filter((t=>Ks(e,t.cells)));const Ys=(e,t)=>Ws(e,t).filter((t=>Ks(e,t)));const Js=e=>{if(!c(e)){throw new Error("cases must be an array")}if(e.length===0){throw new Error("there must be at least one case")}const t=[];const o={};j(e,((n,s)=>{const r=x(n);if(r.length!==1){throw new Error("one and only one name per case")}const a=r[0];const i=n[a];if(o[a]!==undefined){throw new Error("duplicate key detected:"+a)}else if(a==="cata"){throw new Error("cannot have a case named cata (sorry)")}else if(!c(i)){throw new Error("case arguments must be an array")}t.push(a);o[a]=(...o)=>{const n=o.length;if(n!==i.length){throw new Error("Wrong number of arguments to case "+a+". Expected "+i.length+" ("+i+"), got "+n)}const r=e=>{const n=x(e);if(t.length!==n.length){throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","))}const s=Q(t,(e=>I(n,e)));if(!s){throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "))}return e[a].apply(null,o)};return{fold:(...t)=>{if(t.length!==e.length){throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length)}const n=t[s];return n.apply(null,o)},match:r,log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}}));return o};const Qs={generate:Js};const Zs=Qs.generate([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]);({...Zs});const er=(e,t)=>{const o=mo.fromTable(e);const n=$s(o,t);return n.bind((e=>{const t=e[e.length-1];const n=e[0].row;const s=t.row+t.rowspan;const r=o.all.slice(n,s);return Fs(r)})).getOr("")};const tr=er;const or=e=>yt(e,"rgb")?hs(e):e;const nr=e=>{const t=le.fromDom(e);return{borderwidth:Et(t,"border-width").getOr(""),borderstyle:Et(t,"border-style").getOr(""),bordercolor:Et(t,"border-color").map(or).getOr(""),backgroundcolor:Et(t,"background-color").map(or).getOr("")}};const sr=e=>{const t=e[0];const o=e.slice(1);j(o,(e=>{j(x(t),(o=>{C(e,((e,n)=>{const s=t[o];if(s!==""&&o===n){if(s!==e){t[o]=""}}}))}))}));return t};const rr=(e,t,o,n)=>X(e,(e=>!l(o.formatter.matchNode(n,t+e)))).getOr("");const ar=v(rr,["left","center","right"],"align");const cr=v(rr,["top","middle","bottom"],"valign");const ir=(e,t)=>{const o=Qo(e);const n=Ho(e);const s=()=>({borderstyle:M(o,"border-style").getOr(""),bordercolor:or(M(o,"border-color").getOr("")),backgroundcolor:or(M(o,"background-color").getOr(""))});const r={height:"",width:"100%",cellspacing:"",cellpadding:"",caption:false,class:"",align:"",border:""};const a=()=>{const t=o["border-width"];if(Uo(e)&&t){return{border:t}}return M(n,"border").fold((()=>({})),(e=>({border:e})))};const c=t?s():{};const i=()=>{const e=M(o,"border-spacing").or(M(n,"cellspacing")).fold((()=>({})),(e=>({cellspacing:e})));const t=M(o,"border-padding").or(M(n,"cellpadding")).fold((()=>({})),(e=>({cellpadding:e})));return{...e,...t}};const l={...r,...o,...n,...c,...a(),...i()};return l};const lr=e=>Gt(le.fromDom(e)).map((t=>{const o={selection:Vn(e.cells)};return tr(t,o)})).getOr("");const dr=(e,t,o)=>{const n=(t,o)=>{const n=Et(le.fromDom(o),"border-width");if(Uo(e)&&n.isSome()){return n.getOr("")}return t.getAttrib(o,"border")||po(e.dom,o,"border-width")||po(e.dom,o,"border")};const s=e.dom;const r=Uo(e)?s.getStyle(t,"border-spacing")||s.getAttrib(t,"cellspacing"):s.getAttrib(t,"cellspacing")||s.getStyle(t,"border-spacing");const a=Uo(e)?po(s,t,"padding")||s.getAttrib(t,"cellpadding"):s.getAttrib(t,"cellpadding")||po(s,t,"padding");return{width:s.getStyle(t,"width")||s.getAttrib(t,"width"),height:s.getStyle(t,"height")||s.getAttrib(t,"height"),cellspacing:r,cellpadding:a,border:n(s,t),caption:!!s.select("caption",t)[0],class:s.getAttrib(t,"class",""),align:ar(e,t),...o?nr(t):{}}};const ur=(e,t,o)=>{const n=e.dom;return{height:n.getStyle(t,"height")||n.getAttrib(t,"height"),class:n.getAttrib(t,"class",""),type:lr(t),align:ar(e,t),...o?nr(t):{}}};const fr=(e,t,o,n)=>{const s=e.dom;const r=n.getOr(t);const a=(e,t)=>s.getStyle(e,t)||s.getAttrib(e,t);return{width:a(r,"width"),height:a(t,"height"),scope:s.getAttrib(t,"scope"),celltype:Zo(t),class:s.getAttrib(t,"class",""),halign:ar(e,t),valign:cr(e,t),...o?nr(t):{}}};const mr=(e,t)=>{const o=mo.fromTable(e);const n=mo.justCells(o);const s=W(n,(e=>P(t,(t=>Oe(e.element,t)))));return V(s,(e=>({element:e.element.dom,column:mo.getColumnAt(o,e.column).map((e=>e.element.dom))})))};const gr=(e,t,o)=>{e.setAttrib("scope",o.scope);e.setAttrib("class",o.class);e.setStyle("height",nn(o.height));t.setStyle("width",nn(o.width))};const pr=(e,t)=>{e.setFormat("tablecellbackgroundcolor",t.backgroundcolor);e.setFormat("tablecellbordercolor",t.bordercolor);e.setFormat("tablecellborderstyle",t.borderstyle);e.setFormat("tablecellborderwidth",nn(t.borderwidth))};const hr=(e,t,o)=>{const n=t.length===1;j(t,(t=>{const s=t.element;const r=n?Bs.normal(e,s):Bs.ifTruthy(e,s);const a=t.column.map((t=>n?Bs.normal(e,t):Bs.ifTruthy(e,t))).getOr(r);gr(r,a,o);if(Io(e)){pr(r,o)}if(n){bo(e,s);vo(e,s)}if(o.halign){ho(e,s,o.halign)}if(o.valign){yo(e,s,o.valign)}}))};const yr=(e,t)=>{e.execCommand("mceTableCellType",false,{type:t.celltype,no_events:true})};const br=(e,t,o,n)=>{const s=O(n,((e,t)=>o[t]!==e));if(A(s)>0&&t.length>=1){Gt(t[0]).each((o=>{const r=mr(o,t);const a=A(O(s,((e,t)=>t!=="scope"&&t!=="celltype")))>0;const c=N(s,"celltype");if(a||N(s,"scope")){hr(e,r,n)}if(c){yr(e,n)}ko(e,o.dom,{structure:c,style:a})}))}};const vr=(e,t,o,n)=>{const s=n.getData();n.close();e.undoManager.transact((()=>{br(e,t,o,s);e.focus()}))};const kr=(e,t)=>{const o=Gt(t[0]).map((o=>V(mr(o,t),(t=>fr(e,t.element,Io(e),t.column)))));return sr(o.getOrDie())};const wr=e=>{const t=Zn(e);if(t.length===0){return}const o=kr(e,t);const n={type:"tabpanel",tabs:[{title:"General",name:"general",items:Ms(e)},Ns(e,"cell")]};const s={type:"panel",items:[{type:"grid",columns:2,items:Ms(e)}]};e.windowManager.open({title:"Cell Properties",size:"normal",body:Io(e)?n:s,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:o,onSubmit:v(vr,e,t,o)})};const _r=e=>{const t=_s(Wo(e));if(t.length>0){return _.some({name:"class",type:"listbox",label:"Class",items:t})}return _.none()};const xr=[{type:"listbox",name:"type",label:"Row type",items:[{text:"Header",value:"header"},{text:"Body",value:"body"},{text:"Footer",value:"footer"}]},{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]},{label:"Height",name:"height",type:"input"}];const zr=e=>xr.concat(_r(e).toArray());const Cr=(e,t)=>{e.setAttrib("class",t.class);e.setStyle("height",nn(t.height))};const Sr=(e,t)=>{e.setStyle("background-color",t.backgroundcolor);e.setStyle("border-color",t.bordercolor);e.setStyle("border-style",t.borderstyle)};const Tr=(e,t,o,n)=>{const s=t.length===1;j(t,(t=>{const r=s?Bs.normal(e,t):Bs.ifTruthy(e,t);Cr(r,o);if(Po(e)){Sr(r,o)}if(o.align!==n.align){bo(e,t);ho(e,t,o.align)}}))};const Or=(e,t)=>{e.execCommand("mceTableRowType",false,{type:t.type,no_events:true})};const Er=(e,t,o,n)=>{const s=O(n,((e,t)=>o[t]!==e));if(A(s)>0){const r=N(s,"type");const a=r?A(s)>1:true;if(a){Tr(e,t,n,o)}if(r){Or(e,n)}Gt(le.fromDom(t[0])).each((t=>ko(e,t.dom,{structure:r,style:a})))}};const Dr=(e,t,o,n)=>{const s=n.getData();n.close();e.undoManager.transact((()=>{Er(e,t,o,s);e.focus()}))};const Ar=e=>{const t=es(sn(e),Kn.selected);if(t.length===0){return}const o=V(t,(t=>ur(e,t.dom,Po(e))));const n=sr(o);const s={type:"tabpanel",tabs:[{title:"General",name:"general",items:zr(e)},Ns(e,"row")]};const r={type:"panel",items:[{type:"grid",columns:2,items:zr(e)}]};e.windowManager.open({title:"Row Properties",size:"normal",body:Po(e)?s:r,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:n,onSubmit:v(Dr,e,V(t,(e=>e.dom)),n)})};const Mr=(e,t,o)=>{const n=!o?[]:[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}];const s=[{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}];const r=Vo(e)?[{type:"input",name:"cellspacing",label:"Cell spacing",inputMode:"numeric"},{type:"input",name:"cellpadding",label:"Cell padding",inputMode:"numeric"},{type:"input",name:"border",label:"Border width"},{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[];const a=[{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}];const c=t.length>0?[{type:"listbox",name:"class",label:"Class",items:t}]:[];return n.concat(s).concat(r).concat(a).concat(c)};const Nr=(e,t,o,n)=>{if(t.tagName==="TD"||t.tagName==="TH"){if(a(o)){e.setStyle(t,o,n)}else{e.setStyles(t,o)}}else{if(t.children){for(let s=0;s<t.children.length;s++){Nr(e,t.children[s],o,n)}}}};const Rr=(e,t,o)=>{const n=e.dom;const s={};const r={};s.class=o.class;r.height=nn(o.height);if(n.getAttrib(t,"width")&&!Uo(e)){s.width=on(o.width)}else{r.width=nn(o.width)}if(Uo(e)){r["border-width"]=nn(o.border);r["border-spacing"]=nn(o.cellspacing)}else{s.border=o.border;s.cellpadding=o.cellpadding;s.cellspacing=o.cellspacing}if(Uo(e)&&t.children){for(let s=0;s<t.children.length;s++){Nr(n,t.children[s],{"border-width":nn(o.border),padding:nn(o.cellpadding)});if(Fo(e)){Nr(n,t.children[s],{"border-color":o.bordercolor})}}}if(Fo(e)){r["background-color"]=o.backgroundcolor;r["border-color"]=o.bordercolor;r["border-style"]=o.borderstyle}s.style=n.serializeStyle({...Qo(e),...r});n.setAttribs(t,{...Ho(e),...s})};const Br=(e,t,o,n)=>{const s=e.dom;const r=n.getData();const a=O(r,((e,t)=>o[t]!==e));n.close();if(r.class===""){delete r.class}e.undoManager.transact((()=>{if(!t){const o=parseInt(r.cols,10)||1;const n=parseInt(r.rows,10)||1;e.execCommand("mceInsertTable",false,{rows:n,columns:o});t=Qn(sn(e),tn(e)).bind((t=>Gt(t,tn(e)))).map((e=>e.dom)).getOrUndefined()}if(A(a)>0){Rr(e,t,r);const o=s.select("caption",t)[0];if(o&&!r.caption||!o&&r.caption){e.execCommand("mceTableToggleCaption")}if(r.align===""){bo(e,t)}else{ho(e,t,r.align)}}e.focus();e.addVisual();if(A(a)>0){const o=N(a,"caption");const n=o?A(a)>1:true;ko(e,t,{structure:o,style:n})}}))};const Lr=(e,t)=>{const o=e.dom;let n;let s=ir(e,Fo(e));if(t===false){n=o.getParent(e.selection.getStart(),"table",e.getBody());if(n){s=dr(e,n,Fo(e))}else{if(Fo(e)){s.borderstyle="";s.bordercolor="";s.backgroundcolor=""}}}else{s.cols="1";s.rows="1";if(Fo(e)){s.borderstyle="";s.bordercolor="";s.backgroundcolor=""}}const r=_s($o(e));if(r.length>0){if(s.class){s.class=s.class.replace(/\s*mce\-item\-table\s*/g,"")}}const a={type:"grid",columns:2,items:Mr(e,r,t)};const c=()=>({type:"panel",items:[a]});const i=()=>({type:"tabpanel",tabs:[{title:"General",name:"general",items:[a]},Ns(e,"table")]});const l=Fo(e)?i():c();e.windowManager.open({title:"Table Properties",size:"normal",body:l,onSubmit:v(Br,e,n,s),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:s})};const Hr=e=>{C({mceTableProps:v(Lr,e,false),mceTableRowProps:v(Ar,e),mceTableCellProps:v(wr,e)},((t,o)=>e.addCommand(o,(()=>t()))));e.addCommand("mceInsertTableDialog",(t=>{Lr(e,true)}))};const Ir=(e,t)=>Ze(e,t).isSome();const Pr=y;const Fr=e=>{const t=(e,t)=>at(e,t).exists((e=>parseInt(e,10)>1));const o=e=>t(e,"rowspan")||t(e,"colspan");return e.length>0&&Q(e,o)?_.some(e):_.none()};const Vr=(e,t,o)=>{if(t.length<=1){return _.none()}else{return Fn(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t})))}};const jr=e=>({element:e,mergable:_.none(),unmergable:_.none(),selection:[e]});const Ur=(e,t,o)=>({element:o,mergable:Vr(t,e,Kn),unmergable:Fr(e),selection:Pr(e)});const qr=e=>{const t=ys(_.none());const o=ys([]);let n=_.none();const s=xe("caption");const r=e=>n.forall((t=>!t[e]));const a=()=>Jn(sn(e),tn(e));const c=()=>Jn(rn(e),tn(e));const i=()=>a().bind((t=>ft(ut(Gt(t),c().bind(Gt),((o,n)=>{if(Oe(o,n)){if(s(t)){return _.some(jr(t))}else{return _.some(Ur(Zn(e),o,t))}}return _.none()})))));const l=e=>{const t=Gt(e.element);return t.map((t=>{const o=mo.fromTable(t);const n=$s(o,e).getOr([]);const s=G(n,((e,t)=>{if(t.isLocked){e.onAny=true;if(t.column===0){e.onFirst=true}else if(t.column+t.colspan>=o.grid.columns){e.onLast=true}}return e}),{onAny:false,onFirst:false,onLast:false});return{mergeable:Xs(o,e).isSome(),unmergeable:Ys(o,e).isSome(),locked:s}}))};const d=()=>{t.set(Vs(i)());n=t.get().bind(l);j(o.get(),(e=>e()))};const u=e=>{e();o.set(o.get().concat([e]));return()=>{o.set(W(o.get(),(t=>t!==e)))}};const f=(e,o)=>u((()=>t.get().fold((()=>{e.setEnabled(false)}),(t=>{e.setEnabled(!o(t))}))));const m=(e,o,n)=>u((()=>t.get().fold((()=>{e.setEnabled(false);e.setActive(false)}),(t=>{e.setEnabled(!o(t));e.setActive(n(t))}))));const g=e=>n.exists((t=>t.locked[e]));const p=e=>f(e,(e=>false));const h=e=>f(e,(e=>s(e.element)));const y=e=>t=>f(t,(t=>s(t.element)||g(e)));const b=e=>t=>f(t,(t=>s(t.element)||e().isNone()));const v=(e,t)=>o=>f(o,(o=>s(o.element)||e().isNone()||g(t)));const w=e=>f(e,(e=>r("mergeable")));const x=e=>f(e,(e=>r("unmergeable")));const z=t=>m(t,k,(t=>{const o=Gt(t.element,tn(e));return o.exists((e=>Ir(e,"caption")))}));const C=(t,o)=>n=>m(n,(e=>s(e.element)),(()=>e.queryCommandValue(t)===o));const S=C("mceTableRowType","header");const T=C("mceTableColType","th");e.on("NodeChange ExecCommand TableSelectorChange",d);return{onSetupTable:p,onSetupCellOrRow:h,onSetupColumn:y,onSetupPasteable:b,onSetupPasteableColumn:v,onSetupMergeable:w,onSetupUnmergeable:x,resetTargets:d,onSetupTableWithCaption:z,onSetupTableRowHeaders:S,onSetupTableColumnHeaders:T,targets:t.get}};var Wr=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const $r="x-tinymce/dom-table-";const Gr=$r+"rows";const Kr=$r+"columns";const Xr=e=>{var t;const o=(t=Wr.read())!==null&&t!==void 0?t:[];return ne(o,(t=>_.from(t.getType(e))))};const Yr=()=>Xr(Gr);const Jr=()=>Xr(Kr);const Qr=(e,t)=>{e.ui.registry.addMenuButton("table",{tooltip:"Table",icon:"table",fetch:e=>e("inserttable | cell row column | advtablesort | tableprops deletetable")});const o=t=>()=>e.execCommand(t);const n=(t,n)=>{if(e.queryCommandSupported(n.command)){e.ui.registry.addButton(t,{...n,onAction:f(n.onAction)?n.onAction:o(n.command)})}};const s=(t,n)=>{if(e.queryCommandSupported(n.command)){e.ui.registry.addToggleButton(t,{...n,onAction:f(n.onAction)?n.onAction:o(n.command)})}};n("tableprops",{tooltip:"Table properties",command:"mceTableProps",icon:"table",onSetup:t.onSetupTable});n("tabledelete",{tooltip:"Delete table",command:"mceTableDelete",icon:"table-delete-table",onSetup:t.onSetupTable});n("tablecellprops",{tooltip:"Cell properties",command:"mceTableCellProps",icon:"table-cell-properties",onSetup:t.onSetupCellOrRow});n("tablemergecells",{tooltip:"Merge cells",command:"mceTableMergeCells",icon:"table-merge-cells",onSetup:t.onSetupMergeable});n("tablesplitcells",{tooltip:"Split cell",command:"mceTableSplitCells",icon:"table-split-cells",onSetup:t.onSetupUnmergeable});n("tableinsertrowbefore",{tooltip:"Insert row before",command:"mceTableInsertRowBefore",icon:"table-insert-row-above",onSetup:t.onSetupCellOrRow});n("tableinsertrowafter",{tooltip:"Insert row after",command:"mceTableInsertRowAfter",icon:"table-insert-row-after",onSetup:t.onSetupCellOrRow});n("tabledeleterow",{tooltip:"Delete row",command:"mceTableDeleteRow",icon:"table-delete-row",onSetup:t.onSetupCellOrRow});n("tablerowprops",{tooltip:"Row properties",command:"mceTableRowProps",icon:"table-row-properties",onSetup:t.onSetupCellOrRow});n("tableinsertcolbefore",{tooltip:"Insert column before",command:"mceTableInsertColBefore",icon:"table-insert-column-before",onSetup:t.onSetupColumn("onFirst")});n("tableinsertcolafter",{tooltip:"Insert column after",command:"mceTableInsertColAfter",icon:"table-insert-column-after",onSetup:t.onSetupColumn("onLast")});n("tabledeletecol",{tooltip:"Delete column",command:"mceTableDeleteCol",icon:"table-delete-column",onSetup:t.onSetupColumn("onAny")});n("tablecutrow",{tooltip:"Cut row",command:"mceTableCutRow",icon:"cut-row",onSetup:t.onSetupCellOrRow});n("tablecopyrow",{tooltip:"Copy row",command:"mceTableCopyRow",icon:"duplicate-row",onSetup:t.onSetupCellOrRow});n("tablepasterowbefore",{tooltip:"Paste row before",command:"mceTablePasteRowBefore",icon:"paste-row-before",onSetup:t.onSetupPasteable(Yr)});n("tablepasterowafter",{tooltip:"Paste row after",command:"mceTablePasteRowAfter",icon:"paste-row-after",onSetup:t.onSetupPasteable(Yr)});n("tablecutcol",{tooltip:"Cut column",command:"mceTableCutCol",icon:"cut-column",onSetup:t.onSetupColumn("onAny")});n("tablecopycol",{tooltip:"Copy column",command:"mceTableCopyCol",icon:"duplicate-column",onSetup:t.onSetupColumn("onAny")});n("tablepastecolbefore",{tooltip:"Paste column before",command:"mceTablePasteColBefore",icon:"paste-column-before",onSetup:t.onSetupPasteableColumn(Jr,"onFirst")});n("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:t.onSetupPasteableColumn(Jr,"onLast")});n("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table"});const r=Cs($o(e));if(r.length!==0&&e.queryCommandSupported("mceTableToggleClass")){e.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:Ss(e,r,"tableclass",(t=>e.execCommand("mceTableToggleClass",false,t))),onSetup:t.onSetupTable})}const a=Cs(qo(e));if(a.length!==0&&e.queryCommandSupported("mceTableCellToggleClass")){e.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:Ss(e,a,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",false,t))),onSetup:t.onSetupCellOrRow})}if(e.queryCommandSupported("mceTableApplyCellStyle")){e.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:Ss(e,ts,"tablecellverticalalign",zs(e,"vertical-align")),onSetup:t.onSetupCellOrRow});e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:Ss(e,Bo(e),"tablecellborderwidth",zs(e,"border-width")),onSetup:t.onSetupCellOrRow});e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:Ss(e,Lo(e),"tablecellborderstyle",zs(e,"border-style")),onSetup:t.onSetupCellOrRow});e.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:t=>t(Ts(e,Ko(e),"background-color")),onSetup:t.onSetupCellOrRow});e.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:t=>t(Ts(e,Xo(e),"border-color")),onSetup:t.onSetupCellOrRow})}s("tablecaption",{tooltip:"Table caption",icon:"table-caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption});s("tablerowheader",{tooltip:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Os(e),onSetup:t.onSetupTableRowHeaders});s("tablecolheader",{tooltip:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Es(e),onSetup:t.onSetupTableColumnHeaders})};const Zr=e=>{const t=t=>e.dom.is(t,"table")&&e.getBody().contains(t);const o=Go(e);if(o.length>0){e.ui.registry.addContextToolbar("table",{predicate:t,items:o,scope:"node",position:"node"})}};const ea=(e,t)=>{const o=t=>()=>e.execCommand(t);const n=(t,n)=>{if(e.queryCommandSupported(n.command)){e.ui.registry.addMenuItem(t,{...n,onAction:f(n.onAction)?n.onAction:o(n.command)});return true}else{return false}};const s=(t,n)=>{if(e.queryCommandSupported(n.command)){e.ui.registry.addToggleMenuItem(t,{...n,onAction:f(n.onAction)?n.onAction:o(n.command)})}};const r=t=>{e.execCommand("mceInsertTable",false,{rows:t.numRows,columns:t.numColumns})};const a=[n("tableinsertrowbefore",{text:"Insert row before",icon:"table-insert-row-above",command:"mceTableInsertRowBefore",onSetup:t.onSetupCellOrRow}),n("tableinsertrowafter",{text:"Insert row after",icon:"table-insert-row-after",command:"mceTableInsertRowAfter",onSetup:t.onSetupCellOrRow}),n("tabledeleterow",{text:"Delete row",icon:"table-delete-row",command:"mceTableDeleteRow",onSetup:t.onSetupCellOrRow}),n("tablerowprops",{text:"Row properties",icon:"table-row-properties",command:"mceTableRowProps",onSetup:t.onSetupCellOrRow}),n("tablecutrow",{text:"Cut row",icon:"cut-row",command:"mceTableCutRow",onSetup:t.onSetupCellOrRow}),n("tablecopyrow",{text:"Copy row",icon:"duplicate-row",command:"mceTableCopyRow",onSetup:t.onSetupCellOrRow}),n("tablepasterowbefore",{text:"Paste row before",icon:"paste-row-before",command:"mceTablePasteRowBefore",onSetup:t.onSetupPasteable(Yr)}),n("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",command:"mceTablePasteRowAfter",onSetup:t.onSetupPasteable(Yr)})];const c=[n("tableinsertcolumnbefore",{text:"Insert column before",icon:"table-insert-column-before",command:"mceTableInsertColBefore",onSetup:t.onSetupColumn("onFirst")}),n("tableinsertcolumnafter",{text:"Insert column after",icon:"table-insert-column-after",command:"mceTableInsertColAfter",onSetup:t.onSetupColumn("onLast")}),n("tabledeletecolumn",{text:"Delete column",icon:"table-delete-column",command:"mceTableDeleteCol",onSetup:t.onSetupColumn("onAny")}),n("tablecutcolumn",{text:"Cut column",icon:"cut-column",command:"mceTableCutCol",onSetup:t.onSetupColumn("onAny")}),n("tablecopycolumn",{text:"Copy column",icon:"duplicate-column",command:"mceTableCopyCol",onSetup:t.onSetupColumn("onAny")}),n("tablepastecolumnbefore",{text:"Paste column before",icon:"paste-column-before",command:"mceTablePasteColBefore",onSetup:t.onSetupPasteableColumn(Jr,"onFirst")}),n("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:t.onSetupPasteableColumn(Jr,"onLast")})];const i=[n("tablecellprops",{text:"Cell properties",icon:"table-cell-properties",command:"mceTableCellProps",onSetup:t.onSetupCellOrRow}),n("tablemergecells",{text:"Merge cells",icon:"table-merge-cells",command:"mceTableMergeCells",onSetup:t.onSetupMergeable}),n("tablesplitcells",{text:"Split cell",icon:"table-split-cells",command:"mceTableSplitCells",onSetup:t.onSetupUnmergeable})];if(!jo(e)){e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTableDialog")})}else{e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:r}]})}e.ui.registry.addMenuItem("inserttabledialog",{text:"Insert table",icon:"table",onAction:o("mceInsertTableDialog")});n("tableprops",{text:"Table properties",onSetup:t.onSetupTable,command:"mceTableProps"});n("deletetable",{text:"Delete table",icon:"table-delete-table",onSetup:t.onSetupTable,command:"mceTableDelete"});if(I(a,true)){e.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:h("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")})}if(I(c,true)){e.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:h("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")})}if(I(i,true)){e.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:h("tablecellprops tablemergecells tablesplitcells")})}e.ui.registry.addContextMenu("table",{update:()=>{t.resetTargets();return t.targets().fold(h(""),(e=>{if(pe(e.element)==="caption"){return"tableprops deletetable"}else{return"cell row column | advtablesort | tableprops deletetable"}}))}});const l=Cs($o(e));if(l.length!==0&&e.queryCommandSupported("mceTableToggleClass")){e.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:()=>xs(e,l,"tableclass",(t=>e.execCommand("mceTableToggleClass",false,t))),onSetup:t.onSetupTable})}const d=Cs(qo(e));if(d.length!==0&&e.queryCommandSupported("mceTableCellToggleClass")){e.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:()=>xs(e,d,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",false,t))),onSetup:t.onSetupCellOrRow})}if(e.queryCommandSupported("mceTableApplyCellStyle")){e.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:()=>xs(e,ts,"tablecellverticalalign",zs(e,"vertical-align")),onSetup:t.onSetupCellOrRow});e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>xs(e,Bo(e),"tablecellborderwidth",zs(e,"border-width")),onSetup:t.onSetupCellOrRow});e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>xs(e,Lo(e),"tablecellborderstyle",zs(e,"border-style")),onSetup:t.onSetupCellOrRow});e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:()=>Ts(e,Ko(e),"background-color"),onSetup:t.onSetupCellOrRow});e.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:()=>Ts(e,Xo(e),"border-color"),onSetup:t.onSetupCellOrRow})}s("tablecaption",{icon:"table-caption",text:"Table caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption});s("tablerowheader",{text:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:Os(e),onSetup:t.onSetupTableRowHeaders});s("tablecolheader",{text:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Es(e),onSetup:t.onSetupTableRowHeaders})};const ta=e=>{const t=qr(e);No(e);Hr(e);ea(e,t);Qr(e,t);Zr(e)};var oa=()=>{e.add("table",ta)};oa()})()},479:()=>{(function(){"use strict";const e=Object.getPrototypeOf;const t=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const o=e=>{const o=typeof e;if(e===null){return"null"}else if(o==="object"&&Array.isArray(e)){return"array"}else if(o==="object"&&t(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return o}};const n=e=>t=>o(t)===e;const s=e=>t=>typeof t===e;const r=e=>t=>e===t;const a=(o,n)=>i(o)&&t(o,n,((t,o)=>e(t)===o));const c=n("string");const i=n("object");const l=e=>a(e,Object);const d=n("array");const u=r(null);const f=s("boolean");const m=r(undefined);const g=e=>e===null||e===undefined;const p=e=>!g(e);const h=s("function");const y=s("number");const b=(e,t)=>{if(d(e)){for(let o=0,n=e.length;o<n;++o){if(!t(e[o])){return false}}return true}return false};const v=()=>{};const k=e=>()=>e();const w=(e,t)=>(...o)=>e(t.apply(null,o));const _=(e,t)=>o=>e(t(o));const x=e=>()=>e;const z=e=>e;const C=(e,t)=>e===t;function S(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const T=e=>t=>!e(t);const O=e=>()=>{throw new Error(e)};const E=e=>e();const D=x(false);const A=x(true);var M=tinymce.util.Tools.resolve("tinymce.ThemeManager");class N{constructor(e,t){this.tag=e;this.value=t}static some(e){return new N(true,e)}static none(){return N.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return N.some(e(this.value))}else{return N.none()}}bind(e){if(this.tag){return e(this.value)}else{return N.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return N.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return p(e)?N.some(e):N.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}N.singletonNone=new N(false);const R=Array.prototype.slice;const B=Array.prototype.indexOf;const L=Array.prototype.push;const H=(e,t)=>B.call(e,t);const I=(e,t)=>{const o=H(e,t);return o===-1?N.none():N.some(o)};const P=(e,t)=>H(e,t)>-1;const F=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return true}}return false};const V=(e,t)=>{const o=[];for(let n=0;n<e;n++){o.push(t(n))}return o};const j=(e,t)=>{const o=[];for(let n=0;n<e.length;n+=t){const s=R.call(e,n,n+t);o.push(s)}return o};const U=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const q=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const W=(e,t)=>{for(let o=e.length-1;o>=0;o--){const n=e[o];t(n,o)}};const $=(e,t)=>{const o=[];const n=[];for(let s=0,r=e.length;s<r;s++){const r=e[s];const a=t(r,s)?o:n;a.push(r)}return{pass:o,fail:n}};const G=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const K=(e,t,o)=>{W(e,((e,n)=>{o=t(o,e,n)}));return o};const X=(e,t,o)=>{q(e,((e,n)=>{o=t(o,e,n)}));return o};const Y=(e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){return N.some(s)}else if(o(s,n)){break}}return N.none()};const J=(e,t)=>Y(e,t,D);const Q=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return N.some(o)}}return N.none()};const Z=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!d(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}L.apply(t,e[o])}return t};const ee=(e,t)=>Z(U(e,t));const te=(e,t)=>{for(let o=0,n=e.length;o<n;++o){const n=e[o];if(t(n,o)!==true){return false}}return true};const oe=e=>{const t=R.call(e,0);t.reverse();return t};const ne=(e,t)=>G(e,(e=>!P(t,e)));const se=(e,t)=>{const o={};for(let n=0,s=e.length;n<s;n++){const s=e[n];o[String(s)]=t(s,n)}return o};const re=e=>[e];const ae=(e,t)=>{const o=R.call(e,0);o.sort(t);return o};const ce=(e,t)=>t>=0&&t<e.length?N.some(e[t]):N.none();const ie=e=>ce(e,0);const le=e=>ce(e,e.length-1);const de=h(Array.from)?Array.from:e=>R.call(e);const ue=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return N.none()};const fe=Object.keys;const me=Object.hasOwnProperty;const ge=(e,t)=>{const o=fe(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const pe=(e,t)=>he(e,((e,o)=>({k:o,v:t(e,o)})));const he=(e,t)=>{const o={};ge(e,((e,n)=>{const s=t(e,n);o[s.k]=s.v}));return o};const ye=e=>(t,o)=>{e[o]=t};const be=(e,t,o,n)=>{const s={};ge(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const ve=(e,t)=>{const o={};const n={};be(e,t,ye(o),ye(n));return{t:o,f:n}};const ke=(e,t)=>{const o={};be(e,t,ye(o),v);return o};const we=(e,t)=>{const o=[];ge(e,((e,n)=>{o.push(t(e,n))}));return o};const _e=(e,t)=>{const o=fe(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];if(t(r,s,e)){return N.some(r)}}return N.none()};const xe=e=>we(e,z);const ze=(e,t)=>Ce(e,t)?N.from(e[t]):N.none();const Ce=(e,t)=>me.call(e,t);const Se=(e,t)=>Ce(e,t)&&e[t]!==undefined&&e[t]!==null;const Te=(e,t,o=C)=>e.exists((e=>o(e,t)));const Oe=(e,t,o=C)=>Ae(e,t,o).getOr(e.isNone()&&t.isNone());const Ee=e=>{const t=[];const o=e=>{t.push(e)};for(let t=0;t<e.length;t++){e[t].each(o)}return t};const De=e=>{const t=[];for(let o=0;o<e.length;o++){const n=e[o];if(n.isSome()){t.push(n.getOrDie())}else{return N.none()}}return N.some(t)};const Ae=(e,t,o)=>e.isSome()&&t.isSome()?N.some(o(e.getOrDie(),t.getOrDie())):N.none();const Me=(e,t,o,n)=>e.isSome()&&t.isSome()&&o.isSome()?N.some(n(e.getOrDie(),t.getOrDie(),o.getOrDie())):N.none();const Ne=(e,t)=>e!==undefined&&e!==null?N.some(t(e)):N.none();const Re=(e,t)=>e?N.some(t):N.none();const Be=(e,t)=>e+t;const Le=(e,t)=>e.substring(t);const He=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t;const Ie=(e,t)=>Ve(e,t)?Le(e,t.length):e;const Pe=(e,t)=>je(e,t)?e:Be(e,t);const Fe=(e,t)=>e.indexOf(t)!==-1;const Ve=(e,t)=>He(e,t,0);const je=(e,t)=>He(e,t,e.length-t.length);const Ue=e=>t=>t.replace(e,"");const qe=Ue(/^\s+|\s+$/g);const We=e=>e.length>0;const $e=e=>!We(e);const Ge=e=>e.style!==undefined&&h(e.style.getPropertyValue);const Ke=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return Je(n.childNodes[0])};const Xe=(e,t)=>{const o=t||document;const n=o.createElement(e);return Je(n)};const Ye=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return Je(n)};const Je=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const Qe=(e,t,o)=>N.from(e.dom.elementFromPoint(t,o)).map(Je);const Ze={fromHtml:Ke,fromTag:Xe,fromText:Ye,fromDom:Je,fromPoint:Qe};typeof window!=="undefined"?window:Function("return this;")();const et=9;const tt=11;const ot=1;const nt=3;const st=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const rt=e=>e.dom.nodeType;const at=e=>t=>rt(t)===e;const ct=at(ot);const it=at(nt);const lt=at(et);const dt=at(tt);const ut=e=>t=>ct(t)&&st(t)===e;const ft=(e,t)=>{const o=e.dom;if(o.nodeType!==ot){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};const mt=e=>e.nodeType!==ot&&e.nodeType!==et&&e.nodeType!==tt||e.childElementCount===0;const gt=(e,t)=>{const o=t===undefined?document:t.dom;return mt(o)?[]:U(o.querySelectorAll(e),Ze.fromDom)};const pt=(e,t)=>{const o=t===undefined?document:t.dom;return mt(o)?N.none():N.from(o.querySelector(e)).map(Ze.fromDom)};const ht=(e,t)=>e.dom===t.dom;const yt=(e,t)=>{const o=e.dom;const n=t.dom;return o===n?false:o.contains(n)};const bt=e=>Ze.fromDom(e.dom.ownerDocument);const vt=e=>lt(e)?e:bt(e);const kt=e=>Ze.fromDom(vt(e).dom.documentElement);const wt=e=>Ze.fromDom(vt(e).dom.defaultView);const _t=e=>N.from(e.dom.parentNode).map(Ze.fromDom);const xt=e=>N.from(e.dom.parentElement).map(Ze.fromDom);const zt=e=>N.from(e.dom.offsetParent).map(Ze.fromDom);const Ct=e=>N.from(e.dom.nextSibling).map(Ze.fromDom);const St=e=>U(e.dom.childNodes,Ze.fromDom);const Tt=(e,t)=>{const o=e.dom.childNodes;return N.from(o[t]).map(Ze.fromDom)};const Ot=e=>Tt(e,0);const Et=(e,t)=>({element:e,offset:t});const Dt=(e,t)=>{const o=St(e);return o.length>0&&t<o.length?Et(o[t],0):Et(e,t)};const At=e=>dt(e)&&p(e.dom.host);const Mt=h(Element.prototype.attachShadow)&&h(Node.prototype.getRootNode);const Nt=x(Mt);const Rt=Mt?e=>Ze.fromDom(e.dom.getRootNode()):vt;const Bt=e=>At(e)?e:Ze.fromDom(vt(e).dom.body);const Lt=e=>Ht(e).isSome();const Ht=e=>{const t=Rt(e);return At(t)?N.some(t):N.none()};const It=e=>Ze.fromDom(e.dom.host);const Pt=e=>{if(Nt()&&p(e.target)){const t=Ze.fromDom(e.target);if(ct(t)&&Ft(t)){if(e.composed&&e.composedPath){const t=e.composedPath();if(t){return ie(t)}}}}return N.from(e.target)};const Ft=e=>p(e.dom.shadowRoot);const Vt=e=>{const t=it(e)?e.dom.parentNode:e.dom;if(t===undefined||t===null||t.ownerDocument===null){return false}const o=t.ownerDocument;return Ht(Ze.fromDom(t)).fold((()=>o.body.contains(t)),_(Vt,It))};const jt=()=>Ut(Ze.fromDom(document));const Ut=e=>{const t=e.dom.body;if(t===null||t===undefined){throw new Error("Body is not available yet")}return Ze.fromDom(t)};const qt=(e,t,o)=>{if(c(o)||f(o)||y(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const Wt=(e,t,o)=>{qt(e.dom,t,o)};const $t=(e,t)=>{const o=e.dom;ge(t,((e,t)=>{qt(o,t,e)}))};const Gt=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?undefined:o};const Kt=(e,t)=>N.from(Gt(e,t));const Xt=(e,t)=>{const o=e.dom;return o&&o.hasAttribute?o.hasAttribute(t):false};const Yt=(e,t)=>{e.dom.removeAttribute(t)};const Jt=e=>X(e.dom.attributes,((e,t)=>{e[t.name]=t.value;return e}),{});const Qt=(e,t,o)=>{if(!c(o)){console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e);throw new Error("CSS value must be a string: "+o)}if(Ge(e)){e.style.setProperty(t,o)}};const Zt=(e,t)=>{if(Ge(e)){e.style.removeProperty(t)}};const eo=(e,t,o)=>{const n=e.dom;Qt(n,t,o)};const to=(e,t)=>{const o=e.dom;ge(t,((e,t)=>{Qt(o,t,e)}))};const oo=(e,t)=>{const o=e.dom;ge(t,((e,t)=>{e.fold((()=>{Zt(o,t)}),(e=>{Qt(o,t,e)}))}))};const no=(e,t)=>{const o=e.dom;const n=window.getComputedStyle(o);const s=n.getPropertyValue(t);return s===""&&!Vt(e)?so(o,t):s};const so=(e,t)=>Ge(e)?e.style.getPropertyValue(t):"";const ro=(e,t)=>{const o=e.dom;const n=so(o,t);return N.from(n).filter((e=>e.length>0))};const ao=e=>{const t={};const o=e.dom;if(Ge(o)){for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}}return t};const co=(e,t,o)=>{const n=Ze.fromTag(e);eo(n,t,o);const s=ro(n,t);return s.isSome()};const io=(e,t)=>{const o=e.dom;Zt(o,t);if(Te(Kt(e,"style").map(qe),"")){Yt(e,"style")}};const lo=e=>e.dom.offsetWidth;const uo=(e,t)=>{const o=(t,o)=>{if(!y(o)&&!o.match(/^[0-9]+$/)){throw new Error(e+".set accepts only positive integer values. Value was "+o)}const n=t.dom;if(Ge(n)){n.style[e]=o+"px"}};const n=o=>{const n=t(o);if(n<=0||n===null){const t=no(o,e);return parseFloat(t)||0}return n};const s=n;const r=(e,t)=>X(t,((t,o)=>{const n=no(e,o);const s=n===undefined?0:parseInt(n,10);return isNaN(s)?t:t+s}),0);const a=(e,t,o)=>{const n=r(e,o);const s=t>n?t-n:0;return s};return{set:o,get:n,getOuter:s,aggregate:r,max:a}};const fo=uo("height",(e=>{const t=e.dom;return Vt(e)?t.getBoundingClientRect().height:t.offsetHeight}));const mo=e=>fo.get(e);const go=e=>fo.getOuter(e);const po=(e,t)=>{const o=["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"];const n=fo.max(e,t,o);eo(e,"max-height",n+"px")};const ho=(e,t)=>{const o=(o,n)=>ho(e+o,t+n);return{left:e,top:t,translate:o}};const yo=ho;const bo=e=>{const t=e.getBoundingClientRect();return yo(t.left,t.top)};const vo=(e,t)=>{if(e!==undefined){return e}else{return t!==undefined?t:0}};const ko=e=>{const t=e.dom.ownerDocument;const o=t.body;const n=t.defaultView;const s=t.documentElement;if(o===e.dom){return yo(o.offsetLeft,o.offsetTop)}const r=vo(n===null||n===void 0?void 0:n.pageYOffset,s.scrollTop);const a=vo(n===null||n===void 0?void 0:n.pageXOffset,s.scrollLeft);const c=vo(s.clientTop,o.clientTop);const i=vo(s.clientLeft,o.clientLeft);return wo(e).translate(a-i,r-c)};const wo=e=>{const t=e.dom;const o=t.ownerDocument;const n=o.body;if(n===t){return yo(n.offsetLeft,n.offsetTop)}if(!Vt(e)){return yo(0,0)}return bo(t)};const _o=uo("width",(e=>e.dom.offsetWidth));const xo=(e,t)=>_o.set(e,t);const zo=e=>_o.get(e);const Co=e=>_o.getOuter(e);const So=(e,t)=>{const o=["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"];const n=_o.max(e,t,o);eo(e,"max-width",n+"px")};const To=e=>{let t=false;let o;return(...n)=>{if(!t){t=true;o=e.apply(null,n)}return o}};const Oo=(e,t,o,n)=>{const s=e.isiOS()&&/ipad/i.test(o)===true;const r=e.isiOS()&&!s;const a=e.isiOS()||e.isAndroid();const c=a||n("(pointer:coarse)");const i=s||!r&&a&&n("(min-device-width:768px)");const l=r||a&&!i;const d=t.isSafari()&&e.isiOS()&&/safari/i.test(o)===false;const u=!l&&!i&&!d;return{isiPad:x(s),isiPhone:x(r),isTablet:x(i),isPhone:x(l),isTouch:x(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:x(d),isDesktop:x(u)}};const Eo=(e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t)){return n}}return undefined};const Do=(e,t)=>{const o=Eo(e,t);if(!o){return{major:0,minor:0}}const n=e=>Number(t.replace(o,"$"+e));return No(n(1),n(2))};const Ao=(e,t)=>{const o=String(t).toLowerCase();if(e.length===0){return Mo()}return Do(e,o)};const Mo=()=>No(0,0);const No=(e,t)=>({major:e,minor:t});const Ro={nu:No,detect:Ao,unknown:Mo};const Bo=(e,t)=>ue(t.brands,(t=>{const o=t.brand.toLowerCase();return J(e,(e=>{var t;return o===((t=e.brand)===null||t===void 0?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ro.nu(parseInt(t.version,10),0)})))}));const Lo=(e,t)=>{const o=String(t).toLowerCase();return J(e,(e=>e.search(o)))};const Ho=(e,t)=>Lo(e,t).map((e=>{const o=Ro.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const Io=(e,t)=>Lo(e,t).map((e=>{const o=Ro.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const Po=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/;const Fo=e=>t=>Fe(t,e);const Vo=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Fe(e,"edge/")&&Fe(e,"chrome")&&Fe(e,"safari")&&Fe(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Po],search:e=>Fe(e,"chrome")&&!Fe(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Fe(e,"msie")||Fe(e,"trident")},{name:"Opera",versionRegexes:[Po,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Fo("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Fo("firefox")},{name:"Safari",versionRegexes:[Po,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Fe(e,"safari")||Fe(e,"mobile/"))&&Fe(e,"applewebkit")}];const jo=[{name:"Windows",search:Fo("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Fe(e,"iphone")||Fe(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Fo("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Fo("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Fo("linux"),versionRegexes:[]},{name:"Solaris",search:Fo("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Fo("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Fo("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}];const Uo={browsers:x(Vo),oses:x(jo)};const qo="Edge";const Wo="Chromium";const $o="IE";const Go="Opera";const Ko="Firefox";const Xo="Safari";const Yo=()=>Jo({current:undefined,version:Ro.unknown()});const Jo=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isEdge:n(qo),isChromium:n(Wo),isIE:n($o),isOpera:n(Go),isFirefox:n(Ko),isSafari:n(Xo)}};const Qo={unknown:Yo,nu:Jo,edge:x(qo),chromium:x(Wo),ie:x($o),opera:x(Go),firefox:x(Ko),safari:x(Xo)};const Zo="Windows";const en="iOS";const tn="Android";const on="Linux";const nn="macOS";const sn="Solaris";const rn="FreeBSD";const an="ChromeOS";const cn=()=>ln({current:undefined,version:Ro.unknown()});const ln=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isWindows:n(Zo),isiOS:n(en),isAndroid:n(tn),isMacOS:n(nn),isLinux:n(on),isSolaris:n(sn),isFreeBSD:n(rn),isChromeOS:n(an)}};const dn={unknown:cn,nu:ln,windows:x(Zo),ios:x(en),android:x(tn),linux:x(on),macos:x(nn),solaris:x(sn),freebsd:x(rn),chromeos:x(an)};const un=(e,t,o)=>{const n=Uo.browsers();const s=Uo.oses();const r=t.bind((e=>Bo(n,e))).orThunk((()=>Ho(n,e))).fold(Qo.unknown,Qo.nu);const a=Io(s,e).fold(dn.unknown,dn.nu);const c=Oo(a,r,e,o);return{browser:r,os:a,deviceType:c}};const fn={detect:un};const mn=e=>window.matchMedia(e).matches;let gn=To((()=>fn.detect(navigator.userAgent,N.from(navigator.userAgentData),mn)));const pn=()=>gn();const hn=(e,t,o,n,s,r,a)=>({target:e,x:t,y:o,stop:n,prevent:s,kill:r,raw:a});const yn=e=>{const t=Ze.fromDom(Pt(e).getOr(e.target));const o=()=>e.stopPropagation();const n=()=>e.preventDefault();const s=w(n,o);return hn(t,e.clientX,e.clientY,o,n,s,e)};const bn=(e,t)=>o=>{if(e(o)){t(yn(o))}};const vn=(e,t,o,n,s)=>{const r=bn(o,n);e.dom.addEventListener(t,r,s);return{unbind:S(_n,e,t,r,s)}};const kn=(e,t,o,n)=>vn(e,t,o,n,false);const wn=(e,t,o,n)=>vn(e,t,o,n,true);const _n=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)};const xn=(e,t)=>{const o=_t(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))};const zn=(e,t)=>{const o=Ct(e);o.fold((()=>{const o=_t(e);o.each((e=>{Sn(e,t)}))}),(e=>{xn(e,t)}))};const Cn=(e,t)=>{const o=Ot(e);o.fold((()=>{Sn(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))};const Sn=(e,t)=>{e.dom.appendChild(t.dom)};const Tn=(e,t,o)=>{Tt(e,o).fold((()=>{Sn(e,t)}),(e=>{xn(e,t)}))};const On=(e,t)=>{q(t,(t=>{Sn(e,t)}))};const En=e=>{e.dom.textContent="";q(St(e),(e=>{Dn(e)}))};const Dn=e=>{const t=e.dom;if(t.parentNode!==null){t.parentNode.removeChild(t)}};const An=e=>{const t=e!==undefined?e.dom:document;const o=t.body.scrollLeft||t.documentElement.scrollLeft;const n=t.body.scrollTop||t.documentElement.scrollTop;return yo(o,n)};const Mn=(e,t,o)=>{const n=o!==undefined?o.dom:document;const s=n.defaultView;if(s){s.scrollTo(e,t)}};const Nn=e=>{const t=e===undefined?window:e;if(pn().browser.isFirefox()){return N.none()}else{return N.from(t.visualViewport)}};const Rn=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n});const Bn=e=>{const t=e===undefined?window:e;const o=t.document;const n=An(Ze.fromDom(o));return Nn(t).fold((()=>{const e=t.document.documentElement;const o=e.clientWidth;const s=e.clientHeight;return Rn(n.left,n.top,o,s)}),(e=>Rn(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))};const Ln=()=>Ze.fromDom(document);const Hn=(e,t)=>{const o=e.view(t);return o.fold(x([]),(t=>{const o=e.owner(t);const n=Hn(e,o);return[t].concat(n)}))};const In=(e,t)=>{const o=t.owner(e);const n=Hn(t,o);return N.some(n)};const Pn=e=>{var t;const o=e.dom===document?N.none():N.from((t=e.dom.defaultView)===null||t===void 0?void 0:t.frameElement);return o.map(Ze.fromDom)};const Fn=e=>bt(e);var Vn=Object.freeze({__proto__:null,view:Pn,owner:Fn});const jn=e=>{const t=Ln();const o=An(t);const n=In(e,Vn);return n.fold(S(ko,e),(t=>{const n=wo(e);const s=K(t,((e,t)=>{const o=wo(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return yo(s.left+n.left+o.left,s.top+n.top+o.top)}))};const Un=(e,t,o)=>({point:e,width:t,height:o});const qn=(e,t,o,n)=>({x:e,y:t,width:o,height:n});const Wn=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n});const $n=e=>{const t=ko(e);const o=Co(e);const n=go(e);return Wn(t.left,t.top,o,n)};const Gn=e=>{const t=jn(e);const o=Co(e);const n=go(e);return Wn(t.left,t.top,o,n)};const Kn=()=>Bn(window);const Xn=e=>{const t=t=>t(e);const o=x(e);const n=()=>s;const s={tag:true,inner:e,fold:(t,o)=>o(e),isValue:A,isError:D,map:t=>Qn.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>N.some(e)};return s};const Yn=e=>{const t=()=>o;const o={tag:false,inner:e,fold:(t,o)=>t(e),isValue:D,isError:A,map:t,mapError:t=>Qn.error(t(e)),bind:t,exists:D,forall:A,getOr:z,or:z,getOrThunk:E,orThunk:E,getOrDie:O(String(e)),each:v,toOptional:N.none};return o};const Jn=(e,t)=>e.fold((()=>Yn(t)),Xn);const Qn={value:Xn,error:Yn,fromOption:Jn};var Zn;(function(e){e[e["Error"]=0]="Error";e[e["Value"]=1]="Value"})(Zn||(Zn={}));const es=(e,t,o)=>e.stype===Zn.Error?t(e.serror):o(e.svalue);const ts=e=>{const t=[];const o=[];q(e,(e=>{es(e,(e=>o.push(e)),(e=>t.push(e)))}));return{values:t,errors:o}};const os=(e,t)=>{if(e.stype===Zn.Error){return{stype:Zn.Error,serror:t(e.serror)}}else{return e}};const ns=(e,t)=>{if(e.stype===Zn.Value){return{stype:Zn.Value,svalue:t(e.svalue)}}else{return e}};const ss=(e,t)=>{if(e.stype===Zn.Value){return t(e.svalue)}else{return e}};const rs=(e,t)=>{if(e.stype===Zn.Error){return t(e.serror)}else{return e}};const as=e=>({stype:Zn.Value,svalue:e});const cs=e=>({stype:Zn.Error,serror:e});const is=e=>es(e,Qn.error,Qn.value);const ls=e=>e.fold(cs,as);const ds={fromResult:ls,toResult:is,svalue:as,partition:ts,serror:cs,bind:ss,bindError:rs,map:ns,mapError:os,fold:es};const us=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n});const fs=(e,t)=>({tag:"custom",newKey:e,instantiator:t});const ms=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}};const gs=(e,t)=>t;const ps=(e,t)=>{const o=l(e)&&l(t);return o?ys(e,t):t};const hs=e=>(...t)=>{if(t.length===0){throw new Error(`Can't merge zero objects`)}const o={};for(let n=0;n<t.length;n++){const s=t[n];for(const t in s){if(Ce(s,t)){o[t]=e(o[t],s[t])}}}return o};const ys=hs(ps);const bs=hs(gs);const vs=()=>({tag:"required",process:{}});const ks=e=>({tag:"defaultedThunk",process:e});const ws=e=>ks(x(e));const _s=()=>({tag:"option",process:{}});const xs=e=>({tag:"mergeWithThunk",process:e});const zs=e=>xs(x(e));const Cs=(e,t)=>e.length>0?ds.svalue(ys(t,bs.apply(undefined,e))):ds.svalue(t);const Ss=e=>w(ds.serror,Z)(e);const Ts=(e,t)=>{const o=ds.partition(e);return o.errors.length>0?Ss(o.errors):Cs(o.values,t)};const Os=e=>{const t=ds.partition(e);return t.errors.length>0?Ss(t.errors):ds.svalue(t.values)};const Es={consolidateObj:Ts,consolidateArr:Os};const Ds=e=>i(e)&&fe(e).length>100?" removed due to size":JSON.stringify(e,null,2);const As=e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:x("... (only showing first ten failures)")}]):e;return U(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))};const Ms=(e,t)=>ds.serror([{path:e,getErrorInfo:t}]);const Ns=(e,t,o)=>Ms(e,(()=>'Could not find valid *required* value for "'+t+'" in '+Ds(o)));const Rs=(e,t)=>Ms(e,(()=>'Choice schema did not contain choice key: "'+t+'"'));const Bs=(e,t,o)=>Ms(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+Ds(t)));const Ls=(e,t)=>Ms(e,(()=>"There are unsupported fields: ["+t.join(", ")+"] specified"));const Hs=(e,t)=>Ms(e,x(t));const Is=e=>{const t=(t,o)=>ds.bindError(e(o),(e=>Hs(t,e)));const o=x("val");return{extract:t,toString:o}};const Ps=Is(ds.svalue);const Fs=(e,t,o,n)=>ze(t,o).fold((()=>Ns(e,o,t)),n);const Vs=(e,t,o,n)=>{const s=ze(e,t).getOrThunk((()=>o(e)));return n(s)};const js=(e,t,o)=>o(ze(e,t));const Us=(e,t,o,n)=>{const s=ze(e,t).map((t=>t===true?o(e):t));return n(s)};const qs=(e,t,o,n,s)=>{const r=e=>s.extract(t.concat([n]),e);const a=e=>e.fold((()=>ds.svalue(N.none())),(e=>{const o=s.extract(t.concat([n]),e);return ds.map(o,N.some)}));switch(e.tag){case"required":return Fs(t,o,n,r);case"defaultedThunk":return Vs(o,n,e.process,r);case"option":return js(o,n,a);case"defaultedOptionThunk":return Us(o,n,e.process,a);case"mergeWithThunk":{return Vs(o,n,x({}),(t=>{const n=ys(e.process(o),t);return r(n)}))}}};const Ws=(e,t,o)=>{const n={};const s=[];for(const r of o){ms(r,((o,r,a,c)=>{const i=qs(a,e,t,o,c);ds.fold(i,(e=>{s.push(...e)}),(e=>{n[r]=e}))}),((e,o)=>{n[e]=o(t)}))}return s.length>0?ds.serror(s):ds.svalue(n)};const $s=e=>{const t=(t,o)=>e().extract(t,o);const o=()=>e().toString();return{extract:t,toString:o}};const Gs=e=>fe(ke(e,p));const Ks=e=>{const t=Xs(e);const o=K(e,((e,t)=>ms(t,(t=>ys(e,{[t]:true})),x(e))),{});const n=(e,n)=>{const s=f(n)?[]:Gs(n);const r=G(s,(e=>!Se(o,e)));return r.length===0?t.extract(e,n):Ls(e,r)};return{extract:n,toString:t.toString}};const Xs=e=>{const t=(t,o)=>Ws(t,o,e);const o=()=>{const t=U(e,(e=>ms(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:o}};const Ys=e=>{const t=(t,o)=>{const n=U(o,((o,n)=>e.extract(t.concat(["["+n+"]"]),o)));return Es.consolidateArr(n)};const o=()=>"array("+e.toString()+")";return{extract:t,toString:o}};const Js=e=>{const t=(t,o)=>{const n=[];for(const s of e){const e=s.extract(t,o);if(e.stype===Zn.Value){return e}n.push(e)}return Es.consolidateArr(n)};const o=()=>"oneOf("+U(e,(e=>e.toString())).join(", ")+")";return{extract:t,toString:o}};const Qs=(e,t)=>{const o=(t,o)=>Ys(Is(e)).extract(t,o);const n=(e,n)=>{const s=fe(n);const r=o(e,s);return ds.bind(r,(o=>{const s=U(o,(e=>us(e,e,vs(),t)));return Xs(s).extract(e,n)}))};const s=()=>"setOf("+t.toString()+")";return{extract:n,toString:s}};const Zs=(e,t)=>{const o=To(t);const n=(e,t)=>o().extract(e,t);const s=()=>o().toString();return{extract:n,toString:s}};const er=w(Ys,Xs);const tr=x(Ps);const or=(e,t)=>Is((o=>{const n=typeof o;return e(o)?ds.svalue(o):ds.serror(`Expected type: ${t} but got: ${n}`)}));const nr=or(y,"number");const sr=or(c,"string");const rr=or(f,"boolean");const ar=or(h,"function");const cr=e=>{if(Object(e)!==e){return true}switch({}.toString.call(e).slice(8,-1)){case"Boolean":case"Number":case"String":case"Date":case"RegExp":case"Blob":case"FileList":case"ImageData":case"ImageBitmap":case"ArrayBuffer":return true;case"Array":case"Object":return Object.keys(e).every((t=>cr(e[t])));default:return false}};const ir=Is((e=>{if(cr(e)){return ds.svalue(e)}else{return ds.serror("Expected value to be acceptable for sending via postMessage")}}));const lr=(e,t,o,n)=>{const s=ze(o,n);return s.fold((()=>Bs(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t)))};const dr=(e,t)=>{const o=(o,n)=>{const s=ze(n,e);return s.fold((()=>Rs(o,e)),(e=>lr(o,n,t,e)))};const n=()=>"chooseOn("+e+"). Possible values: "+fe(t);return{extract:o,toString:n}};const ur=()=>Ys(Ps);const fr=e=>Is((t=>e(t).fold(ds.serror,ds.svalue)));const mr=(e,t)=>Qs((t=>ds.fromResult(e(t))),t);const gr=(e,t,o)=>{const n=t.extract([e],o);return ds.mapError(n,(e=>({input:o,errors:e})))};const pr=(e,t,o)=>ds.toResult(gr(e,t,o));const hr=e=>e.fold((e=>{throw new Error(br(e))}),z);const yr=(e,t,o)=>hr(pr(e,t,o));const br=e=>"Errors: \n"+As(e.errors).join("\n")+"\n\nInput object: "+Ds(e.input);const vr=(e,t)=>dr(e,pe(t,Xs));const kr=(e,t)=>Zs(e,t);const wr=us;const _r=fs;const xr=e=>fr((t=>P(e,t)?Qn.value(t):Qn.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`)));const zr=e=>wr(e,e,vs(),tr());const Cr=(e,t)=>wr(e,e,vs(),t);const Sr=e=>Cr(e,nr);const Tr=e=>Cr(e,sr);const Or=(e,t)=>wr(e,e,vs(),xr(t));const Er=e=>Cr(e,rr);const Dr=e=>Cr(e,ar);const Ar=(e,t)=>wr(e,e,_s(),Is((o=>ds.serror("The field: "+e+" is forbidden. "+t))));const Mr=(e,t)=>wr(e,e,vs(),Xs(t));const Nr=(e,t)=>wr(e,e,vs(),er(t));const Rr=(e,t)=>wr(e,e,vs(),Ys(t));const Br=e=>wr(e,e,_s(),tr());const Lr=(e,t)=>wr(e,e,_s(),t);const Hr=e=>Lr(e,nr);const Ir=e=>Lr(e,sr);const Pr=(e,t)=>Lr(e,xr(t));const Fr=e=>Lr(e,ar);const Vr=(e,t)=>Lr(e,Ys(t));const jr=(e,t)=>Lr(e,Xs(t));const Ur=(e,t)=>Lr(e,Ks(t));const qr=(e,t)=>wr(e,e,ws(t),tr());const Wr=(e,t,o)=>wr(e,e,ws(t),o);const $r=(e,t)=>Wr(e,t,nr);const Gr=(e,t)=>Wr(e,t,sr);const Kr=(e,t,o)=>Wr(e,t,xr(o));const Xr=(e,t)=>Wr(e,t,rr);const Yr=(e,t)=>Wr(e,t,ar);const Jr=(e,t)=>Wr(e,t,ir);const Qr=(e,t,o)=>Wr(e,t,Ys(o));const Zr=(e,t,o)=>Wr(e,t,Xs(o));const ea=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};const ta=e=>{if(!d(e)){throw new Error("cases must be an array")}if(e.length===0){throw new Error("there must be at least one case")}const t=[];const o={};q(e,((n,s)=>{const r=fe(n);if(r.length!==1){throw new Error("one and only one name per case")}const a=r[0];const c=n[a];if(o[a]!==undefined){throw new Error("duplicate key detected:"+a)}else if(a==="cata"){throw new Error("cannot have a case named cata (sorry)")}else if(!d(c)){throw new Error("case arguments must be an array")}t.push(a);o[a]=(...o)=>{const n=o.length;if(n!==c.length){throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+n)}const r=e=>{const n=fe(e);if(t.length!==n.length){throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","))}const s=te(t,(e=>P(n,e)));if(!s){throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "))}return e[a].apply(null,o)};return{fold:(...t)=>{if(t.length!==e.length){throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length)}const n=t[s];return n.apply(null,o)},match:r,log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}}));return o};const oa={generate:ta};oa.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const na=e=>{const t=[];const o=[];q(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))}));return{errors:t,values:o}};const sa=(e,t)=>{const o={};ge(e,((e,n)=>{if(!P(t,n)){o[n]=e}}));return o};const ra=(e,t)=>({[e]:t});const aa=e=>{const t={};q(e,(e=>{t[e.key]=e.value}));return t};const ca=(e,t)=>sa(e,t);const ia=(e,t)=>ra(e,t);const la=e=>aa(e);const da=(e,t)=>e.length===0?Qn.value(t):Qn.value(ys(t,bs.apply(undefined,e)));const ua=e=>Qn.error(Z(e));const fa=(e,t)=>{const o=na(e);return o.errors.length>0?ua(o.errors):da(o.values,t)};const ma=e=>h(e)?e:D;const ga=(e,t,o)=>{let n=e.dom;const s=ma(o);while(n.parentNode){n=n.parentNode;const e=Ze.fromDom(n);const o=t(e);if(o.isSome()){return o}else if(s(e)){break}}return N.none()};const pa=(e,t,o)=>{const n=t(e);const s=ma(o);return n.orThunk((()=>s(e)?N.none():ga(e,t,s)))};const ha=(e,t)=>ht(e.element,t.event.target);const ya={can:A,abort:D,run:v};const ba=e=>{if(!Se(e,"can")&&!Se(e,"abort")&&!Se(e,"run")){throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!")}return{...ya,...e}};const va=(e,t)=>(...o)=>X(e,((e,n)=>e&&t(n).apply(undefined,o)),true);const ka=(e,t)=>(...o)=>X(e,((e,n)=>e||t(n).apply(undefined,o)),false);const wa=e=>h(e)?{can:A,abort:D,run:e}:e;const _a=e=>{const t=va(e,(e=>e.can));const o=ka(e,(e=>e.abort));const n=(...t)=>{q(e,(e=>{e.run.apply(undefined,t)}))};return{can:t,abort:o,run:n}};const xa=x;const za=xa("touchstart");const Ca=xa("touchmove");const Sa=xa("touchend");const Ta=xa("touchcancel");const Oa=xa("mousedown");const Ea=xa("mousemove");const Da=xa("mouseout");const Aa=xa("mouseup");const Ma=xa("mouseover");const Na=xa("focusin");const Ra=xa("focusout");const Ba=xa("keydown");const La=xa("keyup");const Ha=xa("input");const Ia=xa("change");const Pa=xa("click");const Fa=xa("transitioncancel");const Va=xa("transitionend");const ja=xa("transitionstart");const Ua=xa("selectstart");const qa=e=>x("alloy."+e);const Wa={tap:qa("tap")};const $a=qa("focus");const Ga=qa("blur.post");const Ka=qa("paste.post");const Xa=qa("receive");const Ya=qa("execute");const Ja=qa("focus.item");const Qa=Wa.tap;const Za=qa("longpress");const ec=qa("sandbox.close");const tc=qa("typeahead.cancel");const oc=qa("system.init");const nc=qa("system.touchmove");const sc=qa("system.touchend");const rc=qa("system.scroll");const ac=qa("system.resize");const cc=qa("system.attached");const ic=qa("system.detached");const lc=qa("system.dismissRequested");const dc=qa("system.repositionRequested");const uc=qa("focusmanager.shifted");const fc=qa("slotcontainer.visibility");const mc=qa("change.tab");const gc=qa("dismiss.tab");const pc=qa("highlight");const hc=qa("dehighlight");const yc=(e,t)=>{wc(e,e.element,t,{})};const bc=(e,t,o)=>{wc(e,e.element,t,o)};const vc=e=>{yc(e,Ya())};const kc=(e,t,o)=>{wc(e,t,o,{})};const wc=(e,t,o,n)=>{const s={target:t,...n};e.getSystem().triggerEvent(o,t,s)};const _c=(e,t,o,n)=>{e.getSystem().triggerEvent(o,t,n.event)};const xc=e=>la(e);const zc=(e,t)=>({key:e,value:ba({abort:t})});const Cc=(e,t)=>({key:e,value:ba({can:t})});const Sc=e=>({key:e,value:ba({run:(e,t)=>{t.event.prevent()}})});const Tc=(e,t)=>({key:e,value:ba({run:t})});const Oc=(e,t,o)=>({key:e,value:ba({run:(e,n)=>{t.apply(undefined,[e,n].concat(o))}})});const Ec=e=>t=>Tc(e,t);const Dc=e=>t=>({key:e,value:ba({run:(e,o)=>{if(ha(e,o)){t(e,o)}}})});const Ac=(e,t)=>Tc(e,((o,n)=>{o.getSystem().getByUid(t).each((t=>{_c(t,t.element,e,n)}))}));const Mc=(e,t,o)=>{const n=t.partUids[o];return Ac(e,n)};const Nc=(e,t)=>Tc(e,((e,o)=>{const n=o.event;const s=e.getSystem().getByDom(n.target).getOrThunk((()=>{const t=pa(n.target,(t=>e.getSystem().getByDom(t).toOptional()),D);return t.getOr(e)}));t(e,s,o)}));const Rc=e=>Tc(e,((e,t)=>{t.cut()}));const Bc=e=>Tc(e,((e,t)=>{t.stop()}));const Lc=(e,t)=>Dc(e)(t);const Hc=Dc(cc());const Ic=Dc(ic());const Pc=Dc(oc());const Fc=Ec(Ya());const Vc=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;return St(Ze.fromDom(n))};const jc=e=>e.dom.innerHTML;const Uc=(e,t)=>{const o=bt(e);const n=o.dom;const s=Ze.fromDom(n.createDocumentFragment());const r=Vc(t,n);On(s,r);En(e);Sn(e,s)};const qc=e=>{const t=Ze.fromTag("div");const o=Ze.fromDom(e.dom.cloneNode(true));Sn(t,o);return jc(t)};const Wc=(e,t)=>Ze.fromDom(e.dom.cloneNode(t));const $c=e=>Wc(e,false);const Gc=e=>{if(At(e)){return"#shadow-root"}else{const t=$c(e);return qc(t)}};const Kc=e=>Gc(e);const Xc=(e,t,o)=>ht(t,e.element)&&!ht(t,o);const Yc=xc([Cc($a(),((e,t)=>{const o=t.event;const n=o.originator;const s=o.target;if(Xc(e,n,s)){console.warn($a()+" did not get interpreted by the desired target. "+"\nOriginator: "+Kc(n)+"\nTarget: "+Kc(s)+"\nCheck the "+$a()+" event handlers");return false}else{return true}}))]);var Jc=Object.freeze({__proto__:null,events:Yc});let Qc=0;const Zc=e=>{const t=new Date;const o=t.getTime();const n=Math.floor(Math.random()*1e9);Qc++;return e+"_"+n+Qc+String(o)};const ei=x("alloy-id-");const ti=x("data-alloy-id");const oi=ei();const ni=ti();const si=(e,t)=>{const o=Zc(oi+e);ri(t,o);return o};const ri=(e,t)=>{Object.defineProperty(e.dom,ni,{value:t,writable:true})};const ai=e=>{const t=ct(e)?e.dom[ni]:null;return N.from(t)};const ci=e=>Zc(e);const ii=z;const li=e=>{const t=t=>`The component must be in a context to execute: ${t}`+(e?"\n"+Kc(e().element)+" is not in context.":"");const o=e=>()=>{throw new Error(t(e))};const n=e=>()=>{console.warn(t(e))};return{debugInfo:x("fake"),triggerEvent:n("triggerEvent"),triggerFocus:n("triggerFocus"),triggerEscape:n("triggerEscape"),broadcast:n("broadcast"),broadcastOn:n("broadcastOn"),broadcastEvent:n("broadcastEvent"),build:o("build"),buildOrPatch:o("buildOrPatch"),addToWorld:o("addToWorld"),removeFromWorld:o("removeFromWorld"),addToGui:o("addToGui"),removeFromGui:o("removeFromGui"),getByUid:o("getByUid"),getByDom:o("getByDom"),isConnected:D}};const di=li();const ui=(e,t,o)=>{const n=o.toString();const s=n.indexOf(")")+1;const r=n.indexOf("(");const a=n.substring(r+1,s-1).split(/,\s*/);e.toFunctionAnnotation=()=>({name:t,parameters:fi(a.slice(0,1).concat(a.slice(3)))});return e};const fi=e=>U(e,(e=>je(e,"/*")?e.substring(0,e.length-"/*".length):e));const mi=(e,t)=>{const o=e.toString();const n=o.indexOf(")")+1;const s=o.indexOf("(");const r=o.substring(s+1,n-1).split(/,\s*/);e.toFunctionAnnotation=()=>({name:t,parameters:fi(r)});return e};const gi=(e,t)=>{const o=t.toString();const n=o.indexOf(")")+1;const s=o.indexOf("(");const r=o.substring(s+1,n-1).split(/,\s*/);e.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:fi(r.slice(1))});return e};const pi=Zc("alloy-premade");const hi=e=>{Object.defineProperty(e.element.dom,pi,{value:e.uid,writable:true});return ia(pi,e)};const yi=e=>Ce(e.dom,pi);const bi=e=>ze(e,pi);const vi=e=>gi(((t,...o)=>e(t.getApis(),t,...o)),e);const ki={init:()=>wi({readState:x("No State required")})};const wi=e=>e;const _i=(e,t)=>{const o=U(t,(e=>jr(e.name(),[zr("config"),qr("state",ki)])));const n=pr("component.behaviours",Xs(o),e.behaviours).fold((t=>{throw new Error(br(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))}),z);return{list:t,data:pe(n,(e=>{const t=e.map((e=>({config:e.config,state:e.state.init(e.config)})));return x(t)}))}};const xi=e=>e.list;const zi=e=>e.data;const Ci=(e,t)=>{const o={};ge(e,((e,n)=>{ge(e,((e,s)=>{const r=ze(o,s).getOr([]);o[s]=r.concat([t(n,e)])}))}));return o};const Si=e=>({classes:m(e.classes)?[]:e.classes,attributes:m(e.attributes)?{}:e.attributes,styles:m(e.styles)?{}:e.styles});const Ti=(e,t)=>({...e,attributes:{...e.attributes,...t.attributes},styles:{...e.styles,...t.styles},classes:e.classes.concat(t.classes)});const Oi=(e,t,o,n)=>{const s={...t};q(o,(t=>{s[t.name()]=t.exhibit(e,n)}));const r=Ci(s,((e,t)=>({name:e,modification:t})));const a=e=>K(e,((e,t)=>({...t.modification,...e})),{});const c=K(r.classes,((e,t)=>t.modification.concat(e)),[]);const i=a(r.attributes);const l=a(r.styles);return Si({classes:c,attributes:i,styles:l})};const Ei=(e,t,o,n)=>{try{const s=ae(o,((o,s)=>{const r=o[t];const a=s[t];const c=n.indexOf(r);const i=n.indexOf(a);if(c===-1){throw new Error("The ordering for "+e+" does not have an entry for "+r+".\nOrder specified: "+JSON.stringify(n,null,2))}if(i===-1){throw new Error("The ordering for "+e+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(n,null,2))}if(c<i){return-1}else if(i<c){return 1}else{return 0}}));return Qn.value(s)}catch(e){return Qn.error([e])}};const Di=(e,t)=>({handler:e,purpose:t});const Ai=(e,t)=>({cHandler:e,purpose:t});const Mi=(e,t)=>Ai(S.apply(undefined,[e.handler].concat(t)),e.purpose);const Ni=e=>e.cHandler;const Ri=(e,t)=>({name:e,handler:t});const Bi=(e,t)=>{const o={};q(e,(e=>{o[e.name()]=e.handlers(t)}));return o};const Li=(e,t,o)=>{const n={...o,...Bi(t,e)};return Ci(n,Ri)};const Hi=(e,t,o,n)=>{const s=Li(e,o,n);return Vi(s,t)};const Ii=e=>{const t=wa(e);return(e,o,...n)=>{const s=[e,o].concat(n);if(t.abort.apply(undefined,s)){o.stop()}else if(t.can.apply(undefined,s)){t.run.apply(undefined,s)}}};const Pi=(e,t)=>Qn.error(["The event ("+e+") has more than one behaviour that listens to it.\nWhen this occurs, you must "+'specify an event ordering for the behaviours in your spec (e.g. [ "listing", "toggling" ]).\nThe behaviours that '+"can trigger it are: "+JSON.stringify(U(t,(e=>e.name)),null,2)]);const Fi=(e,t,o)=>{const n=t[o];if(!n){return Pi(o,e)}else{return Ei("Event: "+o,"name",e,n).map((e=>{const t=U(e,(e=>e.handler));return _a(t)}))}};const Vi=(e,t)=>{const o=we(e,((e,o)=>{const n=e.length===1?Qn.value(e[0].handler):Fi(e,t,o);return n.map((n=>{const s=Ii(n);const r=e.length>1?G(t[o],(t=>F(e,(e=>e.name===t)))).join(" > "):e[0].name;return ia(o,Di(s,r))}))}));return fa(o,{})};const ji="alloy.base.behaviour";const Ui=Xs([wr("dom","dom",vs(),Xs([zr("tag"),qr("styles",{}),qr("classes",[]),qr("attributes",{}),Br("value"),Br("innerHtml")])),zr("components"),zr("uid"),qr("events",{}),qr("apis",{}),wr("eventOrder","eventOrder",zs({[Ya()]:["disabling",ji,"toggling","typeaheadevents"],[$a()]:[ji,"focusing","keying"],[oc()]:[ji,"disabling","toggling","representing"],[Ha()]:[ji,"representing","streaming","invalidating"],[ic()]:[ji,"representing","item-events","tooltipping"],[Oa()]:["focusing",ji,"item-type-events"],[za()]:["focusing",ji,"item-type-events"],[Ma()]:["item-type-events","tooltipping"],[Xa()]:["receiving","reflecting","tooltipping"]}),tr()),Br("domModification")]);const qi=e=>pr("custom.definition",Ui,e);const Wi=e=>({...e.dom,uid:e.uid,domChildren:U(e.components,(e=>e.element))});const $i=e=>e.domModification.fold((()=>Si({})),Si);const Gi=e=>e.events;const Ki=(e,t)=>{const o=Gt(e,t);return o===undefined||o===""?[]:o.split(" ")};const Xi=(e,t,o)=>{const n=Ki(e,t);const s=n.concat([o]);Wt(e,t,s.join(" "));return true};const Yi=(e,t,o)=>{const n=G(Ki(e,t),(e=>e!==o));if(n.length>0){Wt(e,t,n.join(" "))}else{Yt(e,t)}return false};const Ji=e=>e.dom.classList!==undefined;const Qi=e=>Ki(e,"class");const Zi=(e,t)=>Xi(e,"class",t);const el=(e,t)=>Yi(e,"class",t);const tl=(e,t)=>{if(Ji(e)){e.dom.classList.add(t)}else{Zi(e,t)}};const ol=e=>{const t=Ji(e)?e.dom.classList:Qi(e);if(t.length===0){Yt(e,"class")}};const nl=(e,t)=>{if(Ji(e)){const o=e.dom.classList;o.remove(t)}else{el(e,t)}ol(e)};const sl=(e,t)=>Ji(e)&&e.dom.classList.contains(t);const rl=(e,t)=>{q(t,(t=>{tl(e,t)}))};const al=(e,t)=>{q(t,(t=>{nl(e,t)}))};const cl=(e,t)=>te(t,(t=>sl(e,t)));const il=e=>{const t=e.dom.classList;const o=new Array(t.length);for(let e=0;e<t.length;e++){const n=t.item(e);if(n!==null){o[e]=n}}return o};const ll=e=>Ji(e)?il(e):Qi(e);const dl=e=>e.dom.value;const ul=(e,t)=>{if(t===undefined){throw new Error("Value.set was undefined")}e.dom.value=t};const fl=(e,t,o)=>{const n=Tt(e,t);return n.map((e=>{const t=o.exists((t=>!ht(t,e)));if(t){const t=o.map(st).getOr("span");const n=Ze.fromTag(t);xn(e,n);return n}else{return e}}))};const ml=(e,t,o)=>{o.fold((()=>Sn(e,t)),(e=>{if(!ht(e,t)){xn(e,t);Dn(e)}}))};const gl=(e,t,o)=>{const n=U(t,o);const s=St(e);q(s.slice(n.length),Dn);return n};const pl=(e,t,o,n)=>{const s=Tt(e,t);const r=n(o,s);const a=fl(e,t,s);ml(e,r.element,a);return r};const hl=(e,t,o)=>gl(e,t,((t,n)=>pl(e,n,t,o)));const yl=(e,t)=>gl(e,t,((t,o)=>{const n=Tt(e,o);ml(e,t,n);return t}));const bl=(e,t)=>{const o=fe(e);const n=fe(t);const s=ne(n,o);const r=ve(e,((e,o)=>!Ce(t,o)||e!==t[o])).t;return{toRemove:s,toSet:r}};const vl=(e,t)=>{const{class:o,style:n,...s}=Jt(t);const{toSet:r,toRemove:a}=bl(e.attributes,s);const c=()=>{q(a,(e=>Yt(t,e)));$t(t,r)};const i=ao(t);const{toSet:l,toRemove:d}=bl(e.styles,i);const u=()=>{q(d,(e=>io(t,e)));to(t,l)};const f=ll(t);const m=ne(f,e.classes);const g=ne(e.classes,f);const p=()=>{rl(t,g);al(t,m)};const h=e=>{Uc(t,e)};const y=()=>{const o=e.domChildren;yl(t,o)};const b=()=>{const o=t;e.value.filter((e=>e!==dl(o))).each((e=>ul(o,e)))};c();p();u();e.innerHtml.fold(y,h);b();return t};const kl=e=>{const t=Ze.fromTag(e.tag);$t(t,e.attributes);rl(t,e.classes);to(t,e.styles);e.innerHtml.each((e=>Uc(t,e)));const o=e.domChildren;On(t,o);e.value.each((e=>{ul(t,e)}));return t};const wl=(e,t)=>{try{const o=vl(e,t);return N.some(o)}catch(e){return N.none()}};const _l=e=>e.innerHtml.isSome()&&e.domChildren.length>0;const xl=(e,t)=>{const o=t=>st(t)===e.tag&&!_l(e)&&!yi(t);const n=t.filter(o).bind((t=>wl(e,t))).getOrThunk((()=>kl(e)));ri(n,e.uid);return n};const zl=e=>{const t=ze(e,"behaviours").getOr({});return ee(fe(t),(e=>{const o=t[e];return p(o)?[o.me]:[]}))};const Cl=(e,t)=>_i(e,t);const Sl=e=>{const t=zl(e);return Cl(e,t)};const Tl=(e,t,o)=>{const n=Wi(e);const s=$i(e);const r={"alloy.base.modification":s};const a=t.length>0?Oi(o,r,t,n):s;return Ti(n,a)};const Ol=(e,t,o)=>{const n={"alloy.base.behaviour":Gi(e)};return Hi(o,e.eventOrder,t,n).getOrDie()};const El=(e,t)=>{const o=()=>k;const n=ea(di);const s=hr(qi(e));const r=Sl(e);const a=xi(r);const c=zi(r);const i=Tl(s,a,c);const l=xl(i,t);const d=Ol(s,a,c);const u=ea(s.components);const f=e=>{n.set(e)};const m=()=>{n.set(li(o))};const g=()=>{const e=St(l);const t=ee(e,(e=>n.get().getByDom(e).fold((()=>[]),re)));u.set(t)};const p=t=>{const o=c;const n=h(o[t.name()])?o[t.name()]:()=>{throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))};return n()};const y=e=>h(c[e.name()]);const b=()=>s.apis;const v=e=>c[e]().map((e=>e.state.readState())).getOr("not enabled");const k={uid:e.uid,getSystem:n.get,config:p,hasConfigured:y,spec:e,readState:v,getApis:b,connect:f,disconnect:m,element:l,syncComponents:g,components:u.get,events:d};return k};const Dl=(e,t)=>{const o=ze(e,"components").getOr([]);return t.fold((()=>U(o,Hl)),(e=>U(o,((t,o)=>Ll(t,Tt(e,o))))))};const Al=(e,t)=>{const{events:o,...n}=ii(e);const s=Dl(n,t);const r={...n,events:{...Jc,...o},components:s};return Qn.value(El(r,t))};const Ml=e=>{const t=Ze.fromText(e);return Nl({element:t})};const Nl=e=>{const t=yr("external.component",Ks([zr("element"),Br("uid")]),e);const o=ea(li());const n=e=>{o.set(e)};const s=()=>{o.set(li((()=>a)))};const r=t.uid.getOrThunk((()=>ci("external")));ri(t.element,r);const a={uid:r,getSystem:o.get,config:N.none,hasConfigured:D,connect:n,disconnect:s,getApis:()=>({}),element:t.element,spec:e,readState:x("No state"),syncComponents:v,components:x([]),events:{}};return hi(a)};const Rl=ci;const Bl=e=>Ce(e,"uid");const Ll=(e,t)=>bi(e).getOrThunk((()=>{const o=Bl(e)?e:{uid:Rl(""),...e};return Al(o,t).getOrDie()}));const Hl=e=>Ll(e,N.none());const Il=hi;var Pl=(e,t,o,n,s)=>{if(e(o,n)){return N.some(o)}else if(h(s)&&s(o)){return N.none()}else{return t(o,n,s)}};const Fl=(e,t,o)=>{let n=e.dom;const s=h(o)?o:D;while(n.parentNode){n=n.parentNode;const e=Ze.fromDom(n);if(t(e)){return N.some(e)}else if(s(e)){break}}return N.none()};const Vl=(e,t,o)=>{const n=(e,t)=>t(e);return Pl(n,Fl,e,t,o)};const jl=(e,t)=>{const o=e=>t(Ze.fromDom(e));const n=J(e.dom.childNodes,o);return n.map(Ze.fromDom)};const Ul=(e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const s=Ze.fromDom(e.childNodes[n]);if(t(s)){return N.some(s)}const r=o(e.childNodes[n]);if(r.isSome()){return r}}return N.none()};return o(e.dom)};const ql=(e,t,o)=>Vl(e,t,o).isSome();const Wl=(e,t,o)=>Fl(e,(e=>ft(e,t)),o);const $l=(e,t)=>jl(e,(e=>ft(e,t)));const Gl=(e,t)=>pt(t,e);const Kl=(e,t,o)=>{const n=(e,t)=>ft(e,t);return Pl(n,Wl,e,t,o)};const Xl="aria-controls";const Yl=e=>{const t=Vl(e,(e=>{if(!ct(e)){return false}const t=Gt(e,"id");return t!==undefined&&t.indexOf(Xl)>-1}));return t.bind((e=>{const t=Gt(e,"id");const o=Rt(e);return Gl(o,`[${Xl}="${t}"]`)}))};const Jl=()=>{const e=Zc(Xl);const t=t=>{Wt(t,Xl,e)};const o=e=>{Yt(e,Xl)};return{id:e,link:t,unlink:o}};const Ql=(e,t)=>Yl(t).exists((t=>Zl(e,t)));const Zl=(e,t)=>ql(t,(t=>ht(t,e.element)),D)||Ql(e,t);const ed="unknown";var td;(function(e){e[e["STOP"]=0]="STOP";e[e["NORMAL"]=1]="NORMAL";e[e["LOGGING"]=2]="LOGGING"})(td||(td={}));const od=ea({});const nd=(e,t)=>{const o=[];const n=(new Date).getTime();return{logEventCut:(e,t,n)=>{o.push({outcome:"cut",target:t,purpose:n})},logEventStopped:(e,t,n)=>{o.push({outcome:"stopped",target:t,purpose:n})},logNoParent:(e,t,n)=>{o.push({outcome:"no-parent",target:t,purpose:n})},logEventNoHandlers:(e,t)=>{o.push({outcome:"no-handlers-left",target:t})},logEventResponse:(e,t,n)=>{o.push({outcome:"response",purpose:n,target:t})},write:()=>{const s=(new Date).getTime();if(P(["mousemove","mouseover","mouseout",oc()],e)){return}console.log(e,{event:e,time:s-n,target:t.dom,sequence:U(o,(e=>{if(!P(["cut","stopped","response"],e.outcome)){return e.outcome}else{return"{"+e.purpose+"} "+e.outcome+" at ("+Kc(e.target)+")"}}))})}}};const sd=(e,t,o)=>{const n=ze(od.get(),e).orThunk((()=>{const t=fe(od.get());return ue(t,(t=>e.indexOf(t)>-1?N.some(od.get()[t]):N.none()))})).getOr(td.NORMAL);switch(n){case td.NORMAL:return o(ld());case td.LOGGING:{const n=nd(e,t);const s=o(n);n.write();return s}case td.STOP:return true}};const rd=["alloy/data/Fields","alloy/debugging/Debugging"];const ad=()=>{const e=new Error;if(e.stack!==undefined){const t=e.stack.split("\n");return J(t,(e=>e.indexOf("alloy")>0&&!F(rd,(t=>e.indexOf(t)>-1)))).getOr(ed)}else{return ed}};const cd={logEventCut:v,logEventStopped:v,logNoParent:v,logEventNoHandlers:v,logEventResponse:v,write:v};const id=(e,t,o)=>sd(e,t,o);const ld=x(cd);const dd=x([zr("menu"),zr("selectedMenu")]);const ud=x([zr("item"),zr("selectedItem")]);x(Xs(ud().concat(dd())));const fd=x(Xs(ud()));const md=Mr("initSize",[zr("numColumns"),zr("numRows")]);const gd=()=>Cr("markers",fd());const pd=()=>Mr("markers",[zr("backgroundMenu")].concat(dd()).concat(ud()));const hd=e=>Mr("markers",U(e,zr));const yd=(e,t,o)=>{ad();return wr(t,t,o,fr((e=>Qn.value(((...t)=>e.apply(undefined,t))))))};const bd=e=>yd("onHandler",e,ws(v));const vd=e=>yd("onKeyboardHandler",e,ws(N.none));const kd=e=>yd("onHandler",e,vs());const wd=e=>yd("onKeyboardHandler",e,vs());const _d=(e,t)=>_r(e,x(t));const xd=e=>_r(e,z);const zd=x(md);const Cd=(e,t,o,n,s,r,a,c=false)=>({x:e,y:t,bubble:o,direction:n,placement:s,restriction:r,label:`${a}-${s}`,alwaysFit:c});const Sd=oa.generate([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]);const Td=(e,t,o,n,s,r,a,c,i)=>e.fold(t,o,n,s,r,a,c,i);const Od=(e,t,o,n)=>e.fold(t,t,n,n,t,n,o,o);const Ed=(e,t,o,n)=>e.fold(t,n,t,n,o,o,t,n);const Dd=Sd.southeast;const Ad=Sd.southwest;const Md=Sd.northeast;const Nd=Sd.northwest;const Rd=Sd.south;const Bd=Sd.north;const Ld=Sd.east;const Hd=Sd.west;const Id=(e,t,o,n)=>{const s=e+t;if(s>n){return o}else if(s<o){return n}else{return s}};const Pd=(e,t,o)=>Math.min(Math.max(e,t),o);const Fd=(e,t)=>{switch(t){case 1:return e.x;case 0:return e.x+e.width;case 2:return e.y;case 3:return e.y+e.height}};const Vd=(e,t)=>se(["left","right","top","bottom"],(o=>ze(t,o).map((t=>Fd(e,t)))));const jd=(e,t,o)=>{const n=(n,s)=>t[n].map((t=>{const r=n==="top"||n==="bottom";const a=r?o.top:o.left;const c=n==="left"||n==="top"?Math.max:Math.min;const i=c(t,s)+a;return r?Pd(i,e.y,e.bottom):Pd(i,e.x,e.right)})).getOr(s);const s=n("left",e.x);const r=n("top",e.y);const a=n("right",e.right);const c=n("bottom",e.bottom);return Wn(s,r,a-s,c-r)};const Ud="layout";const qd=e=>e.x;const Wd=(e,t)=>e.x+e.width/2-t.width/2;const $d=(e,t)=>e.x+e.width-t.width;const Gd=(e,t)=>e.y-t.height;const Kd=e=>e.y+e.height;const Xd=(e,t)=>e.y+e.height/2-t.height/2;const Yd=e=>e.x+e.width;const Jd=(e,t)=>e.x-t.width;const Qd=(e,t,o)=>Cd(qd(e),Kd(e),o.southeast(),Dd(),"southeast",Vd(e,{left:1,top:3}),Ud);const Zd=(e,t,o)=>Cd($d(e,t),Kd(e),o.southwest(),Ad(),"southwest",Vd(e,{right:0,top:3}),Ud);const eu=(e,t,o)=>Cd(qd(e),Gd(e,t),o.northeast(),Md(),"northeast",Vd(e,{left:1,bottom:2}),Ud);const tu=(e,t,o)=>Cd($d(e,t),Gd(e,t),o.northwest(),Nd(),"northwest",Vd(e,{right:0,bottom:2}),Ud);const ou=(e,t,o)=>Cd(Wd(e,t),Gd(e,t),o.north(),Bd(),"north",Vd(e,{bottom:2}),Ud);const nu=(e,t,o)=>Cd(Wd(e,t),Kd(e),o.south(),Rd(),"south",Vd(e,{top:3}),Ud);const su=(e,t,o)=>Cd(Yd(e),Xd(e,t),o.east(),Ld(),"east",Vd(e,{left:0}),Ud);const ru=(e,t,o)=>Cd(Jd(e,t),Xd(e,t),o.west(),Hd(),"west",Vd(e,{right:1}),Ud);const au=()=>[Qd,Zd,eu,tu,nu,ou,su,ru];const cu=()=>[Zd,Qd,tu,eu,nu,ou,su,ru];const iu=()=>[eu,tu,Qd,Zd,ou,nu];const lu=()=>[tu,eu,Zd,Qd,ou,nu];const du=()=>[Qd,Zd,eu,tu,nu,ou];const uu=()=>[Zd,Qd,tu,eu,nu,ou];const fu=(e,t)=>t.universal?e:G(e,(e=>P(t.channels,e)));const mu=e=>xc([Tc(Xa(),((t,o)=>{const n=e.channels;const s=fe(n);const r=o;const a=fu(s,r);q(a,(e=>{const o=n[e];const s=o.schema;const a=yr("channel["+e+"] data\nReceiver: "+Kc(t.element),s,r.data);o.onReceive(t,a)}))}))]);var gu=Object.freeze({__proto__:null,events:mu});var pu=[Cr("channels",mr(Qn.value,Ks([kd("onReceive"),qr("schema",tr())])))];const hu=(e,t,o)=>Fc((n=>{o(n,e,t)}));const yu=(e,t,o)=>Pc(((n,s)=>{o(n,e,t)}));const bu=(e,t,o,n,s,r)=>{const a=Ks(e);const c=jr(t,[Ur("config",e)]);return _u(a,c,t,o,n,s,r)};const vu=(e,t,o,n,s,r)=>{const a=e;const c=jr(t,[Lr("config",e)]);return _u(a,c,t,o,n,s,r)};const ku=(e,t,o)=>{const n=(n,...s)=>{const r=[n].concat(s);return n.config({name:x(e)}).fold((()=>{throw new Error("We could not find any behaviour configuration for: "+e+". Using API: "+o)}),(e=>{const o=Array.prototype.slice.call(r,1);return t.apply(undefined,[n,e.config,e.state].concat(o))}))};return ui(n,o,t)};const wu=e=>({key:e,value:undefined});const _u=(e,t,o,n,s,r,a)=>{const c=e=>Se(e,o)?e[o]():N.none();const i=pe(s,((e,t)=>ku(o,e,t)));const l=pe(r,((e,t)=>mi(e,t)));const d={...l,...i,revoke:S(wu,o),config:t=>{const n=yr(o+"-config",e,t);return{key:o,value:{config:n,me:d,configAsRaw:To((()=>yr(o+"-config",e,t))),initialConfig:t,state:a}}},schema:x(t),exhibit:(e,t)=>Ae(c(e),ze(n,"exhibit"),((e,o)=>o(t,e.config,e.state))).getOrThunk((()=>Si({}))),name:x(o),handlers:e=>c(e).map((e=>{const t=ze(n,"events").getOr((()=>({})));return t(e.config,e.state)})).getOr({})};return d};const xu=e=>la(e);const zu=Ks([zr("fields"),zr("name"),qr("active",{}),qr("apis",{}),qr("state",ki),qr("extra",{})]);const Cu=e=>{const t=yr("Creating behaviour: "+e.name,zu,e);return bu(t.fields,t.name,t.active,t.apis,t.extra,t.state)};const Su=Ks([zr("branchKey"),zr("branches"),zr("name"),qr("active",{}),qr("apis",{}),qr("state",ki),qr("extra",{})]);const Tu=e=>{const t=yr("Creating behaviour: "+e.name,Su,e);return vu(vr(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)};const Ou=x(undefined);const Eu=Cu({fields:pu,name:"receiving",active:gu});const Du=(e,t)=>Si({classes:[],styles:t.useFixed()?{}:{position:"relative"}});var Au=Object.freeze({__proto__:null,exhibit:Du});const Mu=e=>e.dom.focus();const Nu=e=>e.dom.blur();const Ru=e=>{const t=Rt(e).dom;return e.dom===t.activeElement};const Bu=(e=Ln())=>N.from(e.dom.activeElement).map(Ze.fromDom);const Lu=e=>Bu(Rt(e)).filter((t=>e.dom.contains(t.dom)));const Hu=(e,t)=>{const o=Rt(t);const n=Bu(o).bind((e=>{const o=t=>ht(e,t);return o(t)?N.some(t):Ul(t,o)}));const s=e(t);n.each((e=>{Bu(o).filter((t=>ht(t,e))).fold((()=>{Mu(e)}),v)}));return s};const Iu=(e,t,o,n,s)=>{const r=e=>e+"px";return{position:e,left:t.map(r),top:o.map(r),right:n.map(r),bottom:s.map(r)}};const Pu=e=>({...e,position:N.some(e.position)});const Fu=(e,t)=>{oo(e,Pu(t))};const Vu=oa.generate([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]);const ju=(e,t,o,n,s,r)=>{const a=t.rect;const c=a.x-o;const i=a.y-n;const l=a.width;const d=a.height;const u=s-(c+l);const f=r-(i+d);const m=N.some(c);const g=N.some(i);const p=N.some(u);const h=N.some(f);const y=N.none();return Td(t.direction,(()=>Iu(e,m,g,y,y)),(()=>Iu(e,y,g,p,y)),(()=>Iu(e,m,y,y,h)),(()=>Iu(e,y,y,p,h)),(()=>Iu(e,m,g,y,y)),(()=>Iu(e,m,y,y,h)),(()=>Iu(e,m,g,y,y)),(()=>Iu(e,y,g,p,y)))};const Uu=(e,t)=>e.fold((()=>{const e=t.rect;return Iu("absolute",N.some(e.x),N.some(e.y),N.none(),N.none())}),((e,o,n,s)=>ju("absolute",t,e,o,n,s)),((e,o,n,s)=>ju("fixed",t,e,o,n,s)));const qu=(e,t)=>{const o=S(jn,t);const n=e.fold(o,o,(()=>{const e=An();return jn(t).translate(-e.left,-e.top)}));const s=Co(t);const r=go(t);return Wn(n.left,n.top,s,r)};const Wu=(e,t)=>t.fold((()=>e.fold(Kn,Kn,Wn)),(t=>e.fold(t,t,(()=>{const o=t();const n=$u(e,o.x,o.y);return Wn(n.left,n.top,o.width,o.height)}))));const $u=(e,t,o)=>{const n=yo(t,o);const s=()=>{const e=An();return n.translate(-e.left,-e.top)};return e.fold(x(n),x(n),s)};const Gu=(e,t,o,n)=>e.fold(t,o,n);Vu.none;const Ku=Vu.relative;const Xu=Vu.fixed;const Yu=(e,t)=>({anchorBox:e,origin:t});const Ju=(e,t)=>Yu(e,t);const Qu="data-alloy-placement";const Zu=(e,t)=>{Wt(e,Qu,t)};const ef=e=>Kt(e,Qu);const tf=e=>Yt(e,Qu);const of=oa.generate([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]);const nf=(e,t)=>{const{x:o,y:n,right:s,bottom:r}=t;const{x:a,y:c,right:i,bottom:l,width:d,height:u}=e;const f=a>=o&&a<=s;const m=c>=n&&c<=r;const g=f&&m;const p=i<=s&&i>=o;const h=l<=r&&l>=n;const y=p&&h;const b=Math.min(d,a>=o?s-a:i-o);const v=Math.min(u,c>=n?r-c:l-n);return{originInBounds:g,sizeInBounds:y,visibleW:b,visibleH:v}};const sf=(e,t)=>{const{x:o,y:n,right:s,bottom:r}=t;const{x:a,y:c,width:i,height:l}=e;const d=Math.max(o,s-i);const u=Math.max(n,r-l);const f=Pd(a,o,d);const m=Pd(c,n,u);const g=Math.min(f+i,s)-f;const p=Math.min(m+l,r)-m;return Wn(f,m,g,p)};const rf=(e,t,o)=>{const n=x(t.bottom-o.y);const s=x(o.bottom-t.y);const r=Od(e,s,s,n);const a=x(t.right-o.x);const c=x(o.right-t.x);const i=Ed(e,c,c,a);return{maxWidth:i,maxHeight:r}};const af=(e,t,o,n)=>{const s=e.bubble;const r=s.offset;const a=jd(n,e.restriction,r);const c=e.x+r.left;const i=e.y+r.top;const l=Wn(c,i,t,o);const{originInBounds:d,sizeInBounds:u,visibleW:f,visibleH:m}=nf(l,a);const g=d&&u;const p=g?l:sf(l,a);const h=p.width>0&&p.height>0;const{maxWidth:y,maxHeight:b}=rf(e.direction,p,n);const v={rect:p,maxHeight:b,maxWidth:y,direction:e.direction,placement:e.placement,classes:{on:s.classesOn,off:s.classesOff},layout:e.label,testY:i};return g||e.alwaysFit?of.fit(v):of.nofit(v,f,m,h)};const cf=(e,t,o,n,s,r)=>{const a=n.width;const c=n.height;const i=(t,i,l,d,u)=>{const f=t(o,n,s,e,r);const m=af(f,a,c,r);return m.fold(x(m),((e,t,o,n)=>{const s=u===n?o>d||t>l:!u&&n;return s?m:of.nofit(i,l,d,u)}))};const l=X(t,((e,t)=>{const o=S(i,t);return e.fold(x(e),o)}),of.nofit({rect:o,maxHeight:n.height,maxWidth:n.width,direction:Dd(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:o.y},-1,-1,false));return l.fold(z,z)};const lf=e=>{const t=ea(N.none());const o=()=>t.get().each(e);const n=()=>{o();t.set(N.none())};const s=()=>t.get().isSome();const r=()=>t.get();const a=e=>{o();t.set(N.some(e))};return{clear:n,isSet:s,get:r,set:a}};const df=()=>lf((e=>e.destroy()));const uf=()=>lf((e=>e.unbind()));const ff=()=>{const e=lf(v);const t=t=>e.get().each(t);return{...e,on:t}};const mf=A;const gf=(e,t,o)=>kn(e,t,mf,o);const pf=(e,t,o)=>wn(e,t,mf,o);const hf=yn;const yf=["top","bottom","right","left"];const bf="data-alloy-transition-timer";const vf=(e,t)=>cl(e,t.classes);const kf=(e,t,o)=>o.exists((o=>{const n=e.mode;return n==="all"?true:o[n]!==t[n]}));const wf=(e,t)=>{const o=e=>parseFloat(e).toFixed(3);return _e(t,((t,n)=>{const s=e[n].map(o);const r=t.map(o);return!Oe(s,r)})).isSome()};const _f=e=>{const t=t=>{const o=no(e,t);const n=o.split(/\s*,\s*/);return G(n,We)};const o=e=>{if(c(e)&&/^[\d.]+/.test(e)){const t=parseFloat(e);return je(e,"ms")?t:t*1e3}else{return 0}};const n=t("transition-delay");const s=t("transition-duration");return X(s,((e,t,s)=>{const r=o(n[s])+o(t);return Math.max(e,r)}),0)};const xf=(e,t)=>{const o=uf();const n=uf();let s;const r=t=>{var o;const n=(o=t.raw.pseudoElement)!==null&&o!==void 0?o:"";return ht(t.target,e)&&$e(n)&&P(yf,t.raw.propertyName)};const a=a=>{if(g(a)||r(a)){o.clear();n.clear();const r=a===null||a===void 0?void 0:a.raw.type;if(g(r)||r===Va()){clearTimeout(s);Yt(e,bf);al(e,t.classes)}}};const c=gf(e,ja(),(t=>{if(r(t)){c.unbind();o.set(gf(e,Va(),a));n.set(gf(e,Fa(),a))}}));const i=_f(e);requestAnimationFrame((()=>{s=setTimeout(a,i+17);Wt(e,bf,s)}))};const zf=(e,t)=>{rl(e,t.classes);Kt(e,bf).each((t=>{clearTimeout(parseInt(t,10));Yt(e,bf)}));xf(e,t)};const Cf=(e,t,o,n,s,r)=>{const a=kf(n,s,r);if(a||vf(e,n)){eo(e,"position",o.position);const r=qu(t,e);const c=Uu(t,{...s,rect:r});const i=se(yf,(e=>c[e]));if(wf(o,i)){oo(e,i);if(a){zf(e,n)}lo(e)}}else{al(e,n.classes)}};const Sf=e=>({width:Co(e),height:go(e)});const Tf=(e,t,o,n)=>{io(t,"max-height");io(t,"max-width");const s=Sf(t);return cf(t,n.preference,e,s,o,n.bounds)};const Of=(e,t)=>{const o=t.classes;al(e,o.off);rl(e,o.on)};const Ef=(e,t,o)=>{const n=o.maxHeightFunction;n(e,t.maxHeight)};const Df=(e,t,o)=>{const n=o.maxWidthFunction;n(e,t.maxWidth)};const Af=(e,t,o)=>{const n=Uu(o.origin,t);o.transition.each((s=>{Cf(e,o.origin,n,s,t,o.lastPlacement)}));Fu(e,n)};const Mf=(e,t)=>{Zu(e,t.placement)};const Nf=(e,t)=>{po(e,Math.floor(t))};const Rf=x(((e,t)=>{Nf(e,t);to(e,{"overflow-x":"hidden","overflow-y":"auto"})}));const Bf=x(((e,t)=>{Nf(e,t)}));const Lf=(e,t,o)=>e[t]===undefined?o:e[t];const Hf=(e,t,o,n,s,r,a,c)=>{const i=Lf(a,"maxHeightFunction",Rf());const l=Lf(a,"maxWidthFunction",v);const d=e.anchorBox;const u=e.origin;const f={bounds:Wu(u,r),origin:u,preference:n,maxHeightFunction:i,maxWidthFunction:l,lastPlacement:s,transition:c};return If(d,t,o,f)};const If=(e,t,o,n)=>{const s=Tf(e,t,o,n);Af(t,s,n);Mf(t,s);Of(t,s);Ef(t,s,n);Df(t,s,n);return{layout:s.layout,placement:s.placement}};const Pf=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"];const Ff=(e,t,o,n=1)=>{const s=e*n;const r=t*n;const a=e=>ze(o,e).getOr([]);const c=(e,t,o)=>{const n=ne(Pf,o);return{offset:yo(e,t),classesOn:ee(o,a),classesOff:ee(n,a)}};return{southeast:()=>c(-e,t,["top","alignLeft"]),southwest:()=>c(e,t,["top","alignRight"]),south:()=>c(-e/2,t,["top","alignCentre"]),northeast:()=>c(-e,-t,["bottom","alignLeft"]),northwest:()=>c(e,-t,["bottom","alignRight"]),north:()=>c(-e/2,-t,["bottom","alignCentre"]),east:()=>c(e,-t/2,["valignCentre","left"]),west:()=>c(-e,-t/2,["valignCentre","right"]),insetNortheast:()=>c(s,r,["top","alignLeft","inset"]),insetNorthwest:()=>c(-s,r,["top","alignRight","inset"]),insetNorth:()=>c(-s/2,r,["top","alignCentre","inset"]),insetSoutheast:()=>c(s,-r,["bottom","alignLeft","inset"]),insetSouthwest:()=>c(-s,-r,["bottom","alignRight","inset"]),insetSouth:()=>c(-s/2,-r,["bottom","alignCentre","inset"]),insetEast:()=>c(-s,-r/2,["valignCentre","right","inset"]),insetWest:()=>c(s,-r/2,["valignCentre","left","inset"])}};const Vf=()=>Ff(0,0,{});const jf=z;const Uf=(e,t)=>o=>qf(o)==="rtl"?t:e;const qf=e=>no(e,"direction")==="rtl"?"rtl":"ltr";var Wf;(function(e){e["TopToBottom"]="toptobottom";e["BottomToTop"]="bottomtotop"})(Wf||(Wf={}));const $f="data-alloy-vertical-dir";const Gf=e=>ql(e,(e=>ct(e)&&Gt(e,"data-alloy-vertical-dir")===Wf.BottomToTop));const Kf=()=>jr("layouts",[zr("onLtr"),zr("onRtl"),Br("onBottomLtr"),Br("onBottomRtl")]);const Xf=(e,t,o,n,s,r,a)=>{const c=a.map(Gf).getOr(false);const i=t.layouts.map((t=>t.onLtr(e)));const l=t.layouts.map((t=>t.onRtl(e)));const d=c?t.layouts.bind((t=>t.onBottomLtr.map((t=>t(e))))).or(i).getOr(s):i.getOr(o);const u=c?t.layouts.bind((t=>t.onBottomRtl.map((t=>t(e))))).or(l).getOr(r):l.getOr(n);const f=Uf(d,u);return f(e)};const Yf=(e,t,o)=>{const n=t.hotspot;const s=qu(o,n.element);const r=Xf(e.element,t,du(),uu(),iu(),lu(),N.some(t.hotspot.element));return N.some(jf({anchorBox:s,bubble:t.bubble.getOr(Vf()),overrides:t.overrides,layouts:r,placer:N.none()}))};var Jf=[zr("hotspot"),Br("bubble"),qr("overrides",{}),Kf(),_d("placement",Yf)];const Qf=(e,t,o)=>{const n=$u(o,t.x,t.y);const s=Wn(n.left,n.top,t.width,t.height);const r=Xf(e.element,t,au(),cu(),au(),cu(),N.none());return N.some(jf({anchorBox:s,bubble:t.bubble,overrides:t.overrides,layouts:r,placer:N.none()}))};var Zf=[zr("x"),zr("y"),qr("height",0),qr("width",0),qr("bubble",Vf()),qr("overrides",{}),Kf(),_d("placement",Qf)];const em=oa.generate([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]);const tm=e=>e.fold(z,((e,t,o)=>e.translate(-t,-o)));const om=e=>e.fold(z,z);const nm=e=>X(e,((e,t)=>e.translate(t.left,t.top)),yo(0,0));const sm=e=>{const t=U(e,tm);return nm(t)};const rm=e=>{const t=U(e,om);return nm(t)};const am=em.screen;const cm=em.absolute;const im=(e,t,o)=>{const n=wt(o.root).dom;const s=t=>{const o=bt(t);const n=bt(e.element);return ht(o,n)};return N.from(n.frameElement).map(Ze.fromDom).filter(s).map(ko)};const lm=(e,t,o)=>{const n=bt(e.element);const s=An(n);const r=im(e,t,o).getOr(s);return cm(r,s.left,s.top)};const dm=(e,t,o,n)=>{const s=am(yo(e,t));return N.some(Un(s,o,n))};const um=(e,t,o,n,s)=>e.map((e=>{const r=[t,e.point];const a=Gu(n,(()=>rm(r)),(()=>rm(r)),(()=>sm(r)));const c=qn(a.left,a.top,e.width,e.height);const i=o.showAbove?iu():du();const l=o.showAbove?lu():uu();const d=Xf(s,o,i,l,i,l,N.none());return jf({anchorBox:c,bubble:o.bubble.getOr(Vf()),overrides:o.overrides,layouts:d,placer:N.none()})}));const fm=(e,t,o)=>{const n=lm(e,o,t);return t.node.filter(Vt).bind((s=>{const r=s.dom.getBoundingClientRect();const a=dm(r.left,r.top,r.width,r.height);const c=t.node.getOr(e.element);return um(a,n,t,o,c)}))};var mm=[zr("node"),zr("root"),Br("bubble"),Kf(),qr("overrides",{}),qr("showAbove",false),_d("placement",fm)];const gm="\ufeff";const pm=" ";const hm=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n});const ym={create:hm};const bm=oa.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]);const vm=(e,t,o,n)=>e.fold(t,o,n);const km=e=>e.fold(z,z,z);const wm=bm.before;const _m=bm.on;const xm=bm.after;const zm={before:wm,on:_m,after:xm,cata:vm,getStart:km};const Cm=oa.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]);const Sm=e=>Cm.exact(e.start,e.soffset,e.finish,e.foffset);const Tm=e=>e.match({domRange:e=>Ze.fromDom(e.startContainer),relative:(e,t)=>zm.getStart(e),exact:(e,t,o,n)=>e});const Om=Cm.domRange;const Em=Cm.relative;const Dm=Cm.exact;const Am=e=>{const t=Tm(e);return wt(t)};const Mm=ym.create;const Nm={domRange:Om,relative:Em,exact:Dm,exactFromRange:Sm,getWin:Am,range:Mm};const Rm=(e,t)=>{t.fold((t=>{e.setStartBefore(t.dom)}),((t,o)=>{e.setStart(t.dom,o)}),(t=>{e.setStartAfter(t.dom)}))};const Bm=(e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))};const Lm=(e,t,o)=>{const n=e.document.createRange();Rm(n,t);Bm(n,o);return n};const Hm=(e,t,o,n,s)=>{const r=e.document.createRange();r.setStart(t.dom,o);r.setEnd(n.dom,s);return r};const Im=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height});const Pm=e=>{const t=e.getClientRects();const o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?N.some(o).map(Im):N.none()};const Fm=e=>{const t=e.getBoundingClientRect();return t.width>0||t.height>0?N.some(t).map(Im):N.none()};const Vm=oa.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);const jm=(e,t,o)=>t(Ze.fromDom(o.startContainer),o.startOffset,Ze.fromDom(o.endContainer),o.endOffset);const Um=(e,t)=>t.match({domRange:e=>({ltr:x(e),rtl:N.none}),relative:(t,o)=>({ltr:To((()=>Lm(e,t,o))),rtl:To((()=>N.some(Lm(e,o,t))))}),exact:(t,o,n,s)=>({ltr:To((()=>Hm(e,t,o,n,s))),rtl:To((()=>N.some(Hm(e,n,s,t,o))))})});const qm=(e,t)=>{const o=t.ltr();if(o.collapsed){const n=t.rtl().filter((e=>e.collapsed===false));return n.map((e=>Vm.rtl(Ze.fromDom(e.endContainer),e.endOffset,Ze.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>jm(e,Vm.ltr,o)))}else{return jm(e,Vm.ltr,o)}};const Wm=(e,t)=>{const o=Um(e,t);return qm(e,o)};const $m=(e,t)=>{const o=Wm(e,t);return o.match({ltr:(t,o,n,s)=>{const r=e.document.createRange();r.setStart(t.dom,o);r.setEnd(n.dom,s);return r},rtl:(t,o,n,s)=>{const r=e.document.createRange();r.setStart(n.dom,s);r.setEnd(t.dom,o);return r}})};Vm.ltr;Vm.rtl;const Gm=(e,t)=>gt(t,e);const Km=(e,t,o,n)=>{const s=bt(e);const r=s.dom.createRange();r.setStart(e.dom,t);r.setEnd(o.dom,n);return r};const Xm=(e,t,o,n)=>{const s=Km(e,t,o,n);const r=ht(e,o)&&t===n;return s.collapsed&&!r};const Ym=e=>N.from(e.getSelection());const Jm=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0);const o=e.getRangeAt(e.rangeCount-1);return N.some(ym.create(Ze.fromDom(t.startContainer),t.startOffset,Ze.fromDom(o.endContainer),o.endOffset))}else{return N.none()}};const Qm=e=>{if(e.anchorNode===null||e.focusNode===null){return Jm(e)}else{const t=Ze.fromDom(e.anchorNode);const o=Ze.fromDom(e.focusNode);return Xm(t,e.anchorOffset,o,e.focusOffset)?N.some(ym.create(t,e.anchorOffset,o,e.focusOffset)):Jm(e)}};const Zm=e=>Ym(e).filter((e=>e.rangeCount>0)).bind(Qm);const eg=(e,t)=>{const o=$m(e,t);return Pm(o)};const tg=(e,t)=>{const o=$m(e,t);return Fm(o)};const og=(e,t)=>{const o=o=>{if(!e(o)){throw new Error("Can only get "+t+" value of a "+t+" node")}return n(o).getOr("")};const n=t=>e(t)?N.from(t.dom.nodeValue):N.none();const s=(o,n)=>{if(!e(o)){throw new Error("Can only set raw "+t+" value of a "+t+" node")}o.dom.nodeValue=n};return{get:o,getOption:n,set:s}};const ng=og(it,"text");const sg=e=>ng.get(e);const rg=(e,t)=>({element:e,offset:t});const ag=(e,t)=>{const o=St(e);if(o.length===0){return rg(e,t)}else if(t<o.length){return rg(o[t],0)}else{const e=o[o.length-1];const t=it(e)?sg(e).length:St(e).length;return rg(e,t)}};const cg=(e,t)=>it(e)?rg(e,t):ag(e,t);const ig=(e,t)=>{const o=t.getSelection.getOrThunk((()=>()=>Zm(e)));return o().map((e=>{const t=cg(e.start,e.soffset);const o=cg(e.finish,e.foffset);return Nm.range(t.element,t.offset,o.element,o.offset)}))};const lg=(e,t,o)=>{const n=wt(t.root).dom;const s=lm(e,o,t);const r=ig(n,t).bind((e=>{const t=tg(n,Nm.exactFromRange(e)).orThunk((()=>{const t=Ze.fromText(gm);xn(e.start,t);const o=eg(n,Nm.exact(t,0,t,1));Dn(t);return o}));return t.bind((e=>dm(e.left,e.top,e.width,e.height)))}));const a=ig(n,t).bind((e=>ct(e.start)?N.some(e.start):xt(e.start)));const c=a.getOr(e.element);return um(r,s,t,o,c)};var dg=[Br("getSelection"),zr("root"),Br("bubble"),Kf(),qr("overrides",{}),qr("showAbove",false),_d("placement",lg)];const ug="link-layout";const fg=e=>e.x+e.width;const mg=(e,t)=>e.x-t.width;const gg=(e,t)=>e.y-t.height+e.height;const pg=e=>e.y;const hg=(e,t,o)=>Cd(fg(e),pg(e),o.southeast(),Dd(),"southeast",Vd(e,{left:0,top:2}),ug);const yg=(e,t,o)=>Cd(mg(e,t),pg(e),o.southwest(),Ad(),"southwest",Vd(e,{right:1,top:2}),ug);const bg=(e,t,o)=>Cd(fg(e),gg(e,t),o.northeast(),Md(),"northeast",Vd(e,{left:0,bottom:3}),ug);const vg=(e,t,o)=>Cd(mg(e,t),gg(e,t),o.northwest(),Nd(),"northwest",Vd(e,{right:1,bottom:3}),ug);const kg=()=>[hg,yg,bg,vg];const wg=()=>[yg,hg,vg,bg];const _g=(e,t,o)=>{const n=qu(o,t.item.element);const s=Xf(e.element,t,kg(),wg(),kg(),wg(),N.none());return N.some(jf({anchorBox:n,bubble:Vf(),overrides:t.overrides,layouts:s,placer:N.none()}))};var xg=[zr("item"),Kf(),qr("overrides",{}),_d("placement",_g)];var zg=vr("type",{selection:dg,node:mm,hotspot:Jf,submenu:xg,makeshift:Zf});const Cg=[Rr("classes",sr),Kr("mode","all",["all","layout","placement"])];const Sg=[qr("useFixed",D),Br("getBounds")];const Tg=[Cr("anchor",zg),jr("transition",Cg)];const Og=()=>{const e=document.documentElement;return Xu(0,0,e.clientWidth,e.clientHeight)};const Eg=e=>{const t=ko(e.element);const o=e.element.dom.getBoundingClientRect();return Ku(t.left,t.top,o.width,o.height)};const Dg=(e,t,o,n,s,r,a)=>{const c=Ju(o.anchorBox,t);return Hf(c,s.element,o.bubble,o.layouts,r,n,o.overrides,a)};const Ag=(e,t,o,n,s)=>{Mg(e,t,o,n,s,N.none())};const Mg=(e,t,o,n,s,r)=>{const a=r.map($n);return Ng(e,t,o,n,s,a)};const Ng=(e,t,o,n,s,r)=>{const a=yr("placement.info",Xs(Tg),s);const c=a.anchor;const i=n.element;const l=o.get(n.uid);Hu((()=>{eo(i,"position","fixed");const s=ro(i,"visibility");eo(i,"visibility","hidden");const d=t.useFixed()?Og():Eg(e);const u=c.placement;const f=r.map(x).or(t.getBounds);u(e,c,d).each((t=>{const s=t.placer.getOr(Dg);const r=s(e,d,t,f,n,l,a.transition);o.set(n.uid,r)}));s.fold((()=>{io(i,"visibility")}),(e=>{eo(i,"visibility",e)}));if(ro(i,"left").isNone()&&ro(i,"top").isNone()&&ro(i,"right").isNone()&&ro(i,"bottom").isNone()&&Te(ro(i,"position"),"fixed")){io(i,"position")}}),i)};const Rg=(e,t,o)=>t.useFixed()?"fixed":"absolute";const Bg=(e,t,o,n)=>{const s=n.element;q(["position","left","right","top","bottom"],(e=>io(s,e)));tf(s);o.clear(n.uid)};var Lg=Object.freeze({__proto__:null,position:Ag,positionWithin:Mg,positionWithinBounds:Ng,getMode:Rg,reset:Bg});const Hg=()=>{let e={};const t=(t,o)=>{e[t]=o};const o=t=>ze(e,t);const n=t=>{if(p(t)){delete e[t]}else{e={}}};return wi({readState:()=>e,clear:n,set:t,get:o})};var Ig=Object.freeze({__proto__:null,init:Hg});const Pg=Cu({fields:Sg,name:"positioning",active:Au,apis:Lg,state:Ig});const Fg=e=>e.getSystem().isConnected();const Vg=e=>{yc(e,ic());const t=e.components();q(t,Vg)};const jg=e=>{const t=e.components();q(t,jg);yc(e,cc())};const Ug=(e,t)=>{e.getSystem().addToWorld(t);if(Vt(e.element)){jg(t)}};const qg=e=>{Vg(e);e.getSystem().removeFromWorld(e)};const Wg=(e,t)=>{Sn(e.element,t.element)};const $g=e=>{q(e.components(),(e=>Dn(e.element)));En(e.element);e.syncComponents()};const Gg=(e,t,o)=>{const n=e.components();$g(e);const s=o(t);const r=ne(n,s);q(r,(t=>{Vg(t);e.getSystem().removeFromWorld(t)}));q(s,(t=>{if(!Fg(t)){e.getSystem().addToWorld(t);Wg(e,t);if(Vt(e.element)){jg(t)}}else{Wg(e,t)}}));e.syncComponents()};const Kg=(e,t,o)=>{const n=e.components();const s=ee(t,(e=>bi(e).toArray()));q(n,(e=>{if(!P(s,e)){qg(e)}}));const r=o(t);const a=ne(n,r);q(a,(e=>{if(Fg(e)){qg(e)}}));q(r,(t=>{if(!Fg(t)){Ug(e,t)}}));e.syncComponents()};const Xg=(e,t)=>{Yg(e,t,Sn)};const Yg=(e,t,o)=>{e.getSystem().addToWorld(t);o(e.element,t.element);if(Vt(e.element)){jg(t)}e.syncComponents()};const Jg=e=>{Vg(e);Dn(e.element);e.getSystem().removeFromWorld(e)};const Qg=e=>{const t=_t(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()));Jg(e);t.each((e=>{e.syncComponents()}))};const Zg=e=>{const t=e.components();q(t,Jg);En(e.element);e.syncComponents()};const ep=(e,t)=>{op(e,t,Sn)};const tp=(e,t)=>{op(e,t,zn)};const op=(e,t,o)=>{o(e,t.element);const n=St(t.element);q(n,(e=>{t.getByDom(e).each(jg)}))};const np=e=>{const t=St(e.element);q(t,(t=>{e.getByDom(t).each(Vg)}));Dn(e.element)};const sp=(e,t,o,n)=>{o.get().each((t=>{Zg(e)}));const s=t.getAttachPoint(e);Xg(s,e);const r=e.getSystem().build(n);Xg(e,r);o.set(r);return r};const rp=(e,t,o,n)=>{const s=sp(e,t,o,n);t.onOpen(e,s);return s};const ap=(e,t,o,n)=>o.get().map((()=>sp(e,t,o,n)));const cp=(e,t,o,n,s)=>{gp(e,t);rp(e,t,o,n);s();hp(e,t)};const ip=(e,t,o)=>{o.get().each((n=>{Zg(e);Qg(e);t.onClose(e,n);o.clear()}))};const lp=(e,t,o)=>o.isOpen();const dp=(e,t,o,n)=>lp(e,t,o)&&o.get().exists((o=>t.isPartOf(e,o,n)));const up=(e,t,o)=>o.get();const fp=(e,t,o,n)=>{ro(e.element,t).fold((()=>{Yt(e.element,o)}),(t=>{Wt(e.element,o,t)}));eo(e.element,t,n)};const mp=(e,t,o)=>{Kt(e.element,o).fold((()=>io(e.element,t)),(o=>eo(e.element,t,o)))};const gp=(e,t,o)=>{const n=t.getAttachPoint(e);eo(e.element,"position",Pg.getMode(n));fp(e,"visibility",t.cloakVisibilityAttr,"hidden")};const pp=e=>F(["top","left","right","bottom"],(t=>ro(e,t).isSome()));const hp=(e,t,o)=>{if(!pp(e.element)){io(e.element,"position")}mp(e,"visibility",t.cloakVisibilityAttr)};var yp=Object.freeze({__proto__:null,cloak:gp,decloak:hp,open:rp,openWhileCloaked:cp,close:ip,isOpen:lp,isPartOf:dp,getState:up,setContent:ap});const bp=(e,t)=>xc([Tc(ec(),((o,n)=>{ip(o,e,t)}))]);var vp=Object.freeze({__proto__:null,events:bp});var kp=[bd("onOpen"),bd("onClose"),zr("isPartOf"),zr("getAttachPoint"),qr("cloakVisibilityAttr","data-precloak-visibility")];const wp=()=>{const e=ff();const t=x("not-implemented");return wi({readState:t,isOpen:e.isSet,clear:e.clear,set:e.set,get:e.get})};var _p=Object.freeze({__proto__:null,init:wp});const xp=Cu({fields:kp,name:"sandboxing",active:vp,apis:yp,state:_p});const zp=x("dismiss.popups");const Cp=x("reposition.popups");const Sp=x("mouse.released");const Tp=Ks([qr("isExtraPart",D),jr("fireEventInstead",[qr("event",lc())])]);const Op=e=>{const t=yr("Dismissal",Tp,e);return{[zp()]:{schema:Ks([zr("target")]),onReceive:(e,o)=>{if(xp.isOpen(e)){const n=xp.isPartOf(e,o.target)||t.isExtraPart(e,o.target);if(!n){t.fireEventInstead.fold((()=>xp.close(e)),(t=>yc(e,t.event)))}}}}}};const Ep=Ks([jr("fireEventInstead",[qr("event",dc())]),Dr("doReposition")]);const Dp=e=>{const t=yr("Reposition",Ep,e);return{[Cp()]:{onReceive:e=>{if(xp.isOpen(e)){t.fireEventInstead.fold((()=>t.doReposition(e)),(t=>yc(e,t.event)))}}}}};const Ap=(e,t,o)=>{t.store.manager.onLoad(e,t,o)};const Mp=(e,t,o)=>{t.store.manager.onUnload(e,t,o)};const Np=(e,t,o,n)=>{t.store.manager.setValue(e,t,o,n)};const Rp=(e,t,o)=>t.store.manager.getValue(e,t,o);const Bp=(e,t,o)=>o;var Lp=Object.freeze({__proto__:null,onLoad:Ap,onUnload:Mp,setValue:Np,getValue:Rp,getState:Bp});const Hp=(e,t)=>{const o=e.resetOnDom?[Hc(((o,n)=>{Ap(o,e,t)})),Ic(((o,n)=>{Mp(o,e,t)}))]:[yu(e,t,Ap)];return xc(o)};var Ip=Object.freeze({__proto__:null,events:Hp});const Pp=()=>{const e=ea(null);const t=()=>({mode:"memory",value:e.get()});const o=()=>e.get()===null;const n=()=>{e.set(null)};return wi({set:e.set,get:e.get,isNotSet:o,clear:n,readState:t})};const Fp=()=>{const e=v;return wi({readState:e})};const Vp=()=>{const e=ea({});const t=ea({});const o=()=>({mode:"dataset",dataByValue:e.get(),dataByText:t.get()});const n=()=>{e.set({});t.set({})};const s=o=>ze(e.get(),o).orThunk((()=>ze(t.get(),o)));const r=o=>{const n=e.get();const s=t.get();const r={};const a={};q(o,(e=>{r[e.value]=e;ze(e,"meta").each((t=>{ze(t,"text").each((t=>{a[t]=e}))}))}));e.set({...n,...r});t.set({...s,...a})};return wi({readState:o,lookup:s,update:r,clear:n})};const jp=e=>e.store.manager.state(e);var Up=Object.freeze({__proto__:null,memory:Pp,dataset:Vp,manual:Fp,init:jp});const qp=(e,t,o,n)=>{const s=t.store;o.update([n]);s.setValue(e,n);t.onSetValue(e,n)};const Wp=(e,t,o)=>{const n=t.store;const s=n.getDataKey(e);return o.lookup(s).getOrThunk((()=>n.getFallbackEntry(s)))};const $p=(e,t,o)=>{const n=t.store;n.initialValue.each((n=>{qp(e,t,o,n)}))};const Gp=(e,t,o)=>{o.clear()};var Kp=[Br("initialValue"),zr("getFallbackEntry"),zr("getDataKey"),zr("setValue"),_d("manager",{setValue:qp,getValue:Wp,onLoad:$p,onUnload:Gp,state:Vp})];const Xp=(e,t,o)=>t.store.getValue(e);const Yp=(e,t,o,n)=>{t.store.setValue(e,n);t.onSetValue(e,n)};const Jp=(e,t,o)=>{t.store.initialValue.each((o=>{t.store.setValue(e,o)}))};var Qp=[zr("getValue"),qr("setValue",v),Br("initialValue"),_d("manager",{setValue:Yp,getValue:Xp,onLoad:Jp,onUnload:v,state:ki.init})];const Zp=(e,t,o,n)=>{o.set(n);t.onSetValue(e,n)};const eh=(e,t,o)=>o.get();const th=(e,t,o)=>{t.store.initialValue.each((e=>{if(o.isNotSet()){o.set(e)}}))};const oh=(e,t,o)=>{o.clear()};var nh=[Br("initialValue"),_d("manager",{setValue:Zp,getValue:eh,onLoad:th,onUnload:oh,state:Pp})];var sh=[Wr("store",{mode:"memory"},vr("mode",{memory:nh,manual:Qp,dataset:Kp})),bd("onSetValue"),qr("resetOnDom",false)];const rh=Cu({fields:sh,name:"representing",active:Ip,apis:Lp,extra:{setValueFrom:(e,t)=>{const o=rh.getValue(t);rh.setValue(e,o)}},state:Up});const ah=(e,t)=>Zr(e,{},U(t,(t=>Ar(t.name(),"Cannot configure "+t.name()+" for "+e))).concat([_r("dump",z)]));const ch=e=>e.dump;const ih=(e,t)=>({...xu(t),...e.dump});const lh={field:ah,augment:ih,get:ch};const dh="placeholder";const uh=oa.generate([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]);const fh=e=>Ce(e,"uiType");const mh=(e,t,o,n)=>{if(e.exists((e=>e!==o.owner))){return uh.single(true,x(o))}return ze(n,o.name).fold((()=>{throw new Error("Unknown placeholder component: "+o.name+"\nKnown: ["+fe(n)+"]\nNamespace: "+e.getOr("none")+"\nSpec: "+JSON.stringify(o,null,2))}),(e=>e.replace()))};const gh=(e,t,o,n)=>{if(fh(o)&&o.uiType===dh){return mh(e,t,o,n)}else{return uh.single(false,x(o))}};const ph=(e,t,o,n)=>{const s=gh(e,t,o,n);return s.fold(((s,r)=>{const a=fh(o)?r(t,o.config,o.validated):r(t);const c=ze(a,"components").getOr([]);const i=ee(c,(o=>ph(e,t,o,n)));return[{...a,components:i}]}),((e,n)=>{if(fh(o)){const e=n(t,o.config,o.validated);const s=o.validated.preprocess.getOr(z);return s(e)}else{return n(t)}}))};const hh=(e,t,o,n)=>ee(o,(o=>ph(e,t,o,n)));const yh=(e,t)=>{let o=false;const n=()=>o;const s=()=>{if(o){throw new Error("Trying to use the same placeholder more than once: "+e)}o=true;return t};const r=()=>t.fold(((e,t)=>e),((e,t)=>e));return{name:x(e),required:r,used:n,replace:s}};const bh=(e,t,o,n)=>{const s=pe(n,((e,t)=>yh(t,e)));const r=hh(e,t,o,s);ge(s,(o=>{if(o.used()===false&&o.required()){throw new Error("Placeholder: "+o.name()+" was not found in components list\nNamespace: "+e.getOr("none")+"\nComponents: "+JSON.stringify(t.components,null,2))}}));return r};const vh=uh.single;const kh=uh.multiple;const wh=x(dh);const _h=oa.generate([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]);const xh=qr("factory",{sketch:z});const zh=qr("schema",[]);const Ch=zr("name");const Sh=wr("pname","pname",ks((e=>"<alloy."+Zc(e.name)+">")),tr());const Th=_r("schema",(()=>[Br("preprocess")]));const Oh=qr("defaults",x({}));const Eh=qr("overrides",x({}));const Dh=Xs([xh,zh,Ch,Sh,Oh,Eh]);const Ah=Xs([xh,zh,Ch,Oh,Eh]);const Mh=Xs([xh,zh,Ch,Sh,Oh,Eh]);const Nh=Xs([xh,Th,Ch,zr("unit"),Sh,Oh,Eh]);const Rh=e=>e.fold(N.some,N.none,N.some,N.some);const Bh=e=>{const t=e=>e.name;return e.fold(t,t,t,t)};const Lh=e=>e.fold(z,z,z,z);const Hh=(e,t)=>o=>{const n=yr("Converting part type",t,o);return e(n)};const Ih=Hh(_h.required,Dh);const Ph=Hh(_h.external,Ah);const Fh=Hh(_h.optional,Mh);const Vh=Hh(_h.group,Nh);const jh=x("entirety");var Uh=Object.freeze({__proto__:null,required:Ih,external:Ph,optional:Fh,group:Vh,asNamedPart:Rh,name:Bh,asCommon:Lh,original:jh});const qh=(e,t,o,n)=>ys(t.defaults(e,o,n),o,{uid:e.partUids[t.name]},t.overrides(e,o,n));const Wh=(e,t,o)=>{const n={};const s={};q(o,(e=>{e.fold((e=>{n[e.pname]=vh(true,((t,o,n)=>e.factory.sketch(qh(t,e,o,n))))}),(e=>{const o=t.parts[e.name];s[e.name]=x(e.factory.sketch(qh(t,e,o[jh()]),o))}),(e=>{n[e.pname]=vh(false,((t,o,n)=>e.factory.sketch(qh(t,e,o,n))))}),(e=>{n[e.pname]=kh(true,((t,o,n)=>{const s=t[e.name];return U(s,(o=>e.factory.sketch(ys(e.defaults(t,o,n),o,e.overrides(t,o)))))}))}))}));return{internals:x(n),externals:x(s)}};const $h=(e,t)=>{const o={};q(t,(t=>{Rh(t).each((t=>{const n=Gh(e,t.pname);o[t.name]=o=>{const s=yr("Part: "+t.name+" in "+e,Xs(t.schema),o);return{...n,config:o,validated:s}}}))}));return o};const Gh=(e,t)=>({uiType:wh(),owner:e,name:t});const Kh=(e,t,o)=>({uiType:wh(),owner:e,name:t,config:o,validated:{}});const Xh=e=>ee(e,(e=>e.fold(N.none,N.some,N.none,N.none).map((e=>Mr(e.name,e.schema.concat([xd(jh())])))).toArray()));const Yh=e=>U(e,Bh);const Jh=(e,t,o)=>Wh(e,t,o);const Qh=(e,t,o)=>bh(N.some(e),t,t.components,o);const Zh=(e,t,o)=>{const n=t.partUids[o];return e.getSystem().getByUid(n).toOptional()};const ey=(e,t,o)=>Zh(e,t,o).getOrDie("Could not find part: "+o);const ty=(e,t,o)=>{const n={};const s=t.partUids;const r=e.getSystem();q(o,(e=>{n[e]=x(r.getByUid(s[e]))}));return n};const oy=(e,t)=>{const o=e.getSystem();return pe(t.partUids,((e,t)=>x(o.getByUid(e))))};const ny=e=>fe(e.partUids);const sy=(e,t,o)=>{const n={};const s=t.partUids;const r=e.getSystem();q(o,(e=>{n[e]=x(r.getByUid(s[e]).getOrDie())}));return n};const ry=(e,t)=>{const o=Yh(t);return la(U(o,(t=>({key:t,value:e+"-"+t}))))};const ay=e=>wr("partUids","partUids",xs((t=>ry(t.uid,e))),tr());var cy=Object.freeze({__proto__:null,generate:$h,generateOne:Kh,schemas:Xh,names:Yh,substitutes:Jh,components:Qh,defaultUids:ry,defaultUidsSchema:ay,getAllParts:oy,getAllPartNames:ny,getPart:Zh,getPartOrDie:ey,getParts:ty,getPartsOrDie:sy});const iy=(e,t)=>{const o=e.length>0?[Mr("parts",e)]:[];return o.concat([zr("uid"),qr("dom",{}),qr("components",[]),xd("originalSpec"),qr("debug.sketcher",{})]).concat(t)};const ly=(e,t,o,n,s)=>{const r=iy(n,s);return yr(e+" [SpecSchema]",Ks(r.concat(t)),o)};const dy=(e,t,o,n)=>{const s=my(n);const r=ly(e,t,s,[],[]);return o(r,s)};const uy=(e,t,o,n,s)=>{const r=my(s);const a=Xh(o);const c=ay(o);const i=ly(e,t,r,a,[c]);const l=Jh(e,i,o);const d=Qh(e,i,l.internals());return n(i,d,r,l.externals())};const fy=e=>Ce(e,"uid");const my=e=>fy(e)?e:{...e,uid:ci("uid")};const gy=e=>e.uid!==undefined;const py=Ks([zr("name"),zr("factory"),zr("configFields"),qr("apis",{}),qr("extraApis",{})]);const hy=Ks([zr("name"),zr("factory"),zr("configFields"),zr("partFields"),qr("apis",{}),qr("extraApis",{})]);const yy=e=>{const t=yr("Sketcher for "+e.name,py,e);const o=e=>dy(t.name,t.configFields,t.factory,e);const n=pe(t.apis,vi);const s=pe(t.extraApis,((e,t)=>mi(e,t)));return{name:t.name,configFields:t.configFields,sketch:o,...n,...s}};const by=e=>{const t=yr("Sketcher for "+e.name,hy,e);const o=e=>uy(t.name,t.configFields,t.partFields,t.factory,e);const n=$h(t.name,t.partFields);const s=pe(t.apis,vi);const r=pe(t.extraApis,((e,t)=>mi(e,t)));return{name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:o,parts:n,...s,...r}};const vy=e=>ut("input")(e)&&Gt(e,"type")!=="radio"||ut("textarea")(e);const ky=(e,t,o)=>t.find(e);var wy=Object.freeze({__proto__:null,getCurrent:ky});const _y=[zr("find")];const xy=Cu({fields:_y,name:"composing",apis:wy});const zy=["input","button","textarea","select"];const Cy=(e,t,o)=>{const n=t.disabled()?Ny:Ry;n(e,t)};const Sy=(e,t)=>t.useNative===true&&P(zy,st(e.element));const Ty=e=>Xt(e.element,"disabled");const Oy=e=>{Wt(e.element,"disabled","disabled")};const Ey=e=>{Yt(e.element,"disabled")};const Dy=e=>Gt(e.element,"aria-disabled")==="true";const Ay=e=>{Wt(e.element,"aria-disabled","true")};const My=e=>{Wt(e.element,"aria-disabled","false")};const Ny=(e,t,o)=>{t.disableClass.each((t=>{tl(e.element,t)}));const n=Sy(e,t)?Oy:Ay;n(e);t.onDisabled(e)};const Ry=(e,t,o)=>{t.disableClass.each((t=>{nl(e.element,t)}));const n=Sy(e,t)?Ey:My;n(e);t.onEnabled(e)};const By=(e,t)=>Sy(e,t)?Ty(e):Dy(e);const Ly=(e,t,o,n)=>{const s=n?Ny:Ry;s(e,t)};var Hy=Object.freeze({__proto__:null,enable:Ry,disable:Ny,isDisabled:By,onLoad:Cy,set:Ly});const Iy=(e,t)=>Si({classes:t.disabled()?t.disableClass.toArray():[]});const Py=(e,t)=>xc([zc(Ya(),((t,o)=>By(t,e))),yu(e,t,Cy)]);var Fy=Object.freeze({__proto__:null,exhibit:Iy,events:Py});var Vy=[Yr("disabled",D),qr("useNative",true),Br("disableClass"),bd("onDisabled"),bd("onEnabled")];const jy=Cu({fields:Vy,name:"disabling",active:Fy,apis:Hy});const Uy=(e,t,o,n)=>{const s=Gm(e.element,"."+t.highlightClass);q(s,(o=>{if(!F(n,(e=>e.element===o))){nl(o,t.highlightClass);e.getSystem().getByDom(o).each((o=>{t.onDehighlight(e,o);yc(o,hc())}))}}))};const qy=(e,t,o)=>Uy(e,t,o,[]);const Wy=(e,t,o,n)=>{if(Jy(e,t,o,n)){nl(n.element,t.highlightClass);t.onDehighlight(e,n);yc(n,hc())}};const $y=(e,t,o,n)=>{Uy(e,t,o,[n]);if(!Jy(e,t,o,n)){tl(n.element,t.highlightClass);t.onHighlight(e,n);yc(n,pc())}};const Gy=(e,t,o)=>{eb(e,t).each((n=>{$y(e,t,o,n)}))};const Ky=(e,t,o)=>{tb(e,t).each((n=>{$y(e,t,o,n)}))};const Xy=(e,t,o,n)=>{Zy(e,t,o,n).fold((e=>{throw e}),(n=>{$y(e,t,o,n)}))};const Yy=(e,t,o,n)=>{const s=rb(e,t);const r=J(s,n);r.each((n=>{$y(e,t,o,n)}))};const Jy=(e,t,o,n)=>sl(n.element,t.highlightClass);const Qy=(e,t,o)=>Gl(e.element,"."+t.highlightClass).bind((t=>e.getSystem().getByDom(t).toOptional()));const Zy=(e,t,o,n)=>{const s=Gm(e.element,"."+t.itemClass);return N.from(s[n]).fold((()=>Qn.error(new Error("No element found with index "+n))),e.getSystem().getByDom)};const eb=(e,t,o)=>Gl(e.element,"."+t.itemClass).bind((t=>e.getSystem().getByDom(t).toOptional()));const tb=(e,t,o)=>{const n=Gm(e.element,"."+t.itemClass);const s=n.length>0?N.some(n[n.length-1]):N.none();return s.bind((t=>e.getSystem().getByDom(t).toOptional()))};const ob=(e,t,o,n)=>{const s=Gm(e.element,"."+t.itemClass);const r=Q(s,(e=>sl(e,t.highlightClass)));return r.bind((t=>{const o=Id(t,n,0,s.length-1);return e.getSystem().getByDom(s[o]).toOptional()}))};const nb=(e,t,o)=>ob(e,t,o,-1);const sb=(e,t,o)=>ob(e,t,o,+1);const rb=(e,t,o)=>{const n=Gm(e.element,"."+t.itemClass);return Ee(U(n,(t=>e.getSystem().getByDom(t).toOptional())))};var ab=Object.freeze({__proto__:null,dehighlightAll:qy,dehighlight:Wy,highlight:$y,highlightFirst:Gy,highlightLast:Ky,highlightAt:Xy,highlightBy:Yy,isHighlighted:Jy,getHighlighted:Qy,getFirst:eb,getLast:tb,getPrevious:nb,getNext:sb,getCandidates:rb});var cb=[zr("highlightClass"),zr("itemClass"),bd("onHighlight"),bd("onDehighlight")];const ib=Cu({fields:cb,name:"highlighting",apis:ab});const lb=[8];const db=[9];const ub=[13];const fb=[27];const mb=[32];const gb=[37];const pb=[38];const hb=[39];const yb=[40];const bb=(e,t,o)=>{const n=oe(e.slice(0,t));const s=oe(e.slice(t+1));return J(n.concat(s),o)};const vb=(e,t,o)=>{const n=oe(e.slice(0,t));return J(n,o)};const kb=(e,t,o)=>{const n=e.slice(0,t);const s=e.slice(t+1);return J(s.concat(n),o)};const wb=(e,t,o)=>{const n=e.slice(t+1);return J(n,o)};const _b=e=>t=>{const o=t.raw;return P(e,o.which)};const xb=e=>t=>te(e,(e=>e(t)));const zb=e=>{const t=e.raw;return t.shiftKey===true};const Cb=e=>{const t=e.raw;return t.ctrlKey===true};const Sb=T(zb);const Tb=(e,t)=>({matches:e,classification:t});const Ob=(e,t)=>{const o=J(e,(e=>e.matches(t)));return o.map((e=>e.classification))};const Eb=(e,t,o)=>{const n=t.exists((e=>o.exists((t=>ht(t,e)))));if(!n){bc(e,uc(),{prevFocus:t,newFocus:o})}};const Db=()=>{const e=e=>Lu(e.element);const t=(t,o)=>{const n=e(t);t.getSystem().triggerFocus(o,t.element);const s=e(t);Eb(t,n,s)};return{get:e,set:t}};const Ab=()=>{const e=e=>ib.getHighlighted(e).map((e=>e.element));const t=(t,o)=>{const n=e(t);t.getSystem().getByDom(o).fold(v,(e=>{ib.highlight(t,e)}));const s=e(t);Eb(t,n,s)};return{get:e,set:t}};var Mb;(function(e){e["OnFocusMode"]="onFocus";e["OnEnterOrSpaceMode"]="onEnterOrSpace";e["OnApiMode"]="onApi"})(Mb||(Mb={}));const Nb=(e,t,o,n,s)=>{const r=()=>e.concat([qr("focusManager",Db()),Wr("focusInside","onFocus",fr((e=>P(["onFocus","onEnterOrSpace","onApi"],e)?Qn.value(e):Qn.error("Invalid value for focusInside")))),_d("handler",i),_d("state",t),_d("sendFocusIn",s)]);const a=(e,t,o,n,s)=>{const r=o(e,t,n,s);return Ob(r,t.event).bind((o=>o(e,t,n,s)))};const c=(e,t)=>{const r=e.focusInside!==Mb.OnFocusMode?N.none():s(e).map((o=>Tc($a(),((n,s)=>{o(n,e,t);s.stop()}))));const c=(o,n)=>{const r=_b(mb.concat(ub))(n.event);if(e.focusInside===Mb.OnEnterOrSpaceMode&&r&&ha(o,n)){s(e).each((s=>{s(o,e,t);n.stop()}))}};const i=[Tc(Ba(),((n,s)=>{a(n,s,o,e,t).fold((()=>{c(n,s)}),(e=>{s.stop()}))})),Tc(La(),((o,s)=>{a(o,s,n,e,t).each((e=>{s.stop()}))}))];return xc(r.toArray().concat(i))};const i={schema:r,processKey:a,toEvents:c};return i};const Rb=e=>{const t=[Br("onEscape"),Br("onEnter"),qr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),qr("firstTabstop",0),qr("useTabstopAt",A),Br("visibilitySelector")].concat([e]);const o=(e,t)=>{const o=e.visibilitySelector.bind((e=>Kl(t,e))).getOr(t);return mo(o)>0};const n=(e,t)=>{const n=Gm(e.element,t.selector);const s=G(n,(e=>o(t,e)));return N.from(s[t.firstTabstop])};const s=(e,t)=>t.focusManager.get(e).bind((e=>Kl(e,t.selector)));const r=(e,t)=>o(e,t)&&e.useTabstopAt(t);const a=(e,t,o)=>{n(e,t).each((o=>{t.focusManager.set(e,o)}))};const c=(e,t,o,n,s)=>s(t,o,(e=>r(n,e))).fold((()=>n.cyclic?N.some(true):N.none()),(t=>{n.focusManager.set(e,t);return N.some(true)}));const i=(e,t,o,n)=>{const r=Gm(e.element,o.selector);return s(e,o).bind((t=>{const s=Q(r,S(ht,t));return s.bind((t=>c(e,r,t,o,n)))}))};const l=(e,t,o)=>{const n=o.cyclic?bb:vb;return i(e,t,o,n)};const d=(e,t,o)=>{const n=o.cyclic?kb:wb;return i(e,t,o,n)};const u=(e,t,o)=>o.onEnter.bind((o=>o(e,t)));const f=(e,t,o)=>o.onEscape.bind((o=>o(e,t)));const m=x([Tb(xb([zb,_b(db)]),l),Tb(_b(db),d),Tb(_b(fb),f),Tb(xb([Sb,_b(ub)]),u)]);const g=x([]);return Nb(t,ki.init,m,g,(()=>N.some(a)))};var Bb=Rb(_r("cyclic",D));var Lb=Rb(_r("cyclic",A));const Hb=(e,t,o)=>{kc(e,o,Ya());return N.some(true)};const Ib=(e,t,o)=>{const n=vy(o)&&_b(mb)(t.event);return n?N.none():Hb(e,t,o)};const Pb=(e,t)=>N.some(true);const Fb=[qr("execute",Ib),qr("useSpace",false),qr("useEnter",true),qr("useControlEnter",false),qr("useDown",false)];const Vb=(e,t,o)=>o.execute(e,t,e.element);const jb=(e,t,o,n)=>{const s=o.useSpace&&!vy(e.element)?mb:[];const r=o.useEnter?ub:[];const a=o.useDown?yb:[];const c=s.concat(r).concat(a);return[Tb(_b(c),Vb)].concat(o.useControlEnter?[Tb(xb([Cb,_b(ub)]),Vb)]:[])};const Ub=(e,t,o,n)=>o.useSpace&&!vy(e.element)?[Tb(_b(mb),Pb)]:[];var qb=Nb(Fb,ki.init,jb,Ub,(()=>N.none()));const Wb=()=>{const e=ff();const t=(t,o)=>{e.set({numRows:t,numColumns:o})};const o=()=>e.get().map((e=>e.numRows));const n=()=>e.get().map((e=>e.numColumns));return wi({readState:()=>e.get().map((e=>({numRows:String(e.numRows),numColumns:String(e.numColumns)}))).getOr({numRows:"?",numColumns:"?"}),setGridSize:t,getNumRows:o,getNumColumns:n})};const $b=e=>e.state(e);var Gb=Object.freeze({__proto__:null,flatgrid:Wb,init:$b});const Kb=e=>(t,o,n,s)=>{const r=e(t.element);return Qb(r,t,o,n,s)};const Xb=(e,t)=>{const o=Uf(e,t);return Kb(o)};const Yb=(e,t)=>{const o=Uf(t,e);return Kb(o)};const Jb=e=>(t,o,n,s)=>Qb(e,t,o,n,s);const Qb=(e,t,o,n,s)=>{const r=n.focusManager.get(t).bind((o=>e(t.element,o,n,s)));return r.map((e=>{n.focusManager.set(t,e);return true}))};const Zb=Jb;const ev=Jb;const tv=Jb;const ov=e=>e.offsetWidth<=0&&e.offsetHeight<=0;const nv=e=>!ov(e.dom);const sv=(e,t)=>Q(e,t).map((t=>({index:t,candidates:e})));const rv=(e,t,o)=>{const n=e=>ht(e,t);const s=Gm(e,o);const r=G(s,nv);return sv(r,n)};const av=(e,t)=>Q(e,(e=>ht(t,e)));const cv=(e,t,o,n)=>{const s=Math.floor(t/o);const r=t%o;return n(s,r).bind((t=>{const n=t.row*o+t.column;return n>=0&&n<e.length?N.some(e[n]):N.none()}))};const iv=(e,t,o,n,s)=>cv(e,t,n,((t,r)=>{const a=t===o-1;const c=a?e.length-t*n:n;const i=Id(r,s,0,c-1);return N.some({row:t,column:i})}));const lv=(e,t,o,n,s)=>cv(e,t,n,((t,r)=>{const a=Id(t,s,0,o-1);const c=a===o-1;const i=c?e.length-a*n:n;const l=Pd(r,0,i-1);return N.some({row:a,column:l})}));const dv=(e,t,o,n)=>iv(e,t,o,n,+1);const uv=(e,t,o,n)=>iv(e,t,o,n,-1);const fv=(e,t,o,n)=>lv(e,t,o,n,-1);const mv=(e,t,o,n)=>lv(e,t,o,n,+1);const gv=[zr("selector"),qr("execute",Ib),vd("onEscape"),qr("captureTab",false),zd()];const pv=(e,t,o)=>{Gl(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))};const hv=(e,t)=>t.focusManager.get(e).bind((e=>Kl(e,t.selector)));const yv=(e,t,o,n)=>hv(e,o).bind((n=>o.execute(e,t,n)));const bv=e=>(t,o,n,s)=>rv(t,o,n.selector).bind((t=>e(t.candidates,t.index,s.getNumRows().getOr(n.initSize.numRows),s.getNumColumns().getOr(n.initSize.numColumns))));const vv=(e,t,o)=>o.captureTab?N.some(true):N.none();const kv=(e,t,o)=>o.onEscape(e,t);const wv=bv(uv);const _v=bv(dv);const xv=bv(fv);const zv=bv(mv);const Cv=x([Tb(_b(gb),Xb(wv,_v)),Tb(_b(hb),Yb(wv,_v)),Tb(_b(pb),Zb(xv)),Tb(_b(yb),ev(zv)),Tb(xb([zb,_b(db)]),vv),Tb(xb([Sb,_b(db)]),vv),Tb(_b(fb),kv),Tb(_b(mb.concat(ub)),yv)]);const Sv=x([Tb(_b(mb),Pb)]);var Tv=Nb(gv,Wb,Cv,Sv,(()=>N.some(pv)));const Ov=(e,t,o,n)=>{const s=e=>st(e)==="button"&&Gt(e,"disabled")==="disabled";const r=(e,t,o)=>{const a=Id(t,n,0,o.length-1);if(a===e){return N.none()}else{return s(o[a])?r(e,a,o):N.from(o[a])}};return rv(e,o,t).bind((e=>{const t=e.index;const o=e.candidates;return r(t,t,o)}))};const Ev=[zr("selector"),qr("getInitial",N.none),qr("execute",Ib),vd("onEscape"),qr("executeOnMove",false),qr("allowVertical",true)];const Dv=(e,t)=>t.focusManager.get(e).bind((e=>Kl(e,t.selector)));const Av=(e,t,o)=>Dv(e,o).bind((n=>o.execute(e,t,n)));const Mv=(e,t,o)=>{t.getInitial(e).orThunk((()=>Gl(e.element,t.selector))).each((o=>{t.focusManager.set(e,o)}))};const Nv=(e,t,o)=>Ov(e,o.selector,t,-1);const Rv=(e,t,o)=>Ov(e,o.selector,t,+1);const Bv=e=>(t,o,n,s)=>e(t,o,n,s).bind((()=>n.executeOnMove?Av(t,o,n):N.some(true)));const Lv=(e,t,o)=>o.onEscape(e,t);const Hv=(e,t,o,n)=>{const s=gb.concat(o.allowVertical?pb:[]);const r=hb.concat(o.allowVertical?yb:[]);return[Tb(_b(s),Bv(Xb(Nv,Rv))),Tb(_b(r),Bv(Yb(Nv,Rv))),Tb(_b(ub),Av),Tb(_b(mb),Av),Tb(_b(fb),Lv)]};const Iv=x([Tb(_b(mb),Pb)]);var Pv=Nb(Ev,ki.init,Hv,Iv,(()=>N.some(Mv)));const Fv=(e,t,o)=>N.from(e[t]).bind((e=>N.from(e[o]).map((e=>({rowIndex:t,columnIndex:o,cell:e})))));const Vv=(e,t,o,n)=>{const s=e[t];const r=s.length;const a=Id(o,n,0,r-1);return Fv(e,t,a)};const jv=(e,t,o,n)=>{const s=Id(o,n,0,e.length-1);const r=e[s].length;const a=Pd(t,0,r-1);return Fv(e,s,a)};const Uv=(e,t,o,n)=>{const s=e[t];const r=s.length;const a=Pd(o+n,0,r-1);return Fv(e,t,a)};const qv=(e,t,o,n)=>{const s=Pd(o+n,0,e.length-1);const r=e[s].length;const a=Pd(t,0,r-1);return Fv(e,s,a)};const Wv=(e,t,o)=>Vv(e,t,o,+1);const $v=(e,t,o)=>Vv(e,t,o,-1);const Gv=(e,t,o)=>jv(e,o,t,-1);const Kv=(e,t,o)=>jv(e,o,t,+1);const Xv=(e,t,o)=>Uv(e,t,o,-1);const Yv=(e,t,o)=>Uv(e,t,o,+1);const Jv=(e,t,o)=>qv(e,o,t,-1);const Qv=(e,t,o)=>qv(e,o,t,+1);const Zv=[Mr("selectors",[zr("row"),zr("cell")]),qr("cycles",true),qr("previousSelector",N.none),qr("execute",Ib)];const ek=(e,t,o)=>{const n=t.previousSelector(e).orThunk((()=>{const o=t.selectors;return Gl(e.element,o.cell)}));n.each((o=>{t.focusManager.set(e,o)}))};const tk=(e,t,o)=>Lu(e.element).bind((n=>o.execute(e,t,n)));const ok=(e,t)=>U(e,(e=>Gm(e,t.selectors.cell)));const nk=(e,t)=>(o,n,s)=>{const r=s.cycles?e:t;return Kl(n,s.selectors.row).bind((e=>{const t=Gm(e,s.selectors.cell);return av(t,n).bind((t=>{const n=Gm(o,s.selectors.row);return av(n,e).bind((e=>{const o=ok(n,s);return r(o,e,t).map((e=>e.cell))}))}))}))};const sk=nk($v,Xv);const rk=nk(Wv,Yv);const ak=nk(Gv,Jv);const ck=nk(Kv,Qv);const ik=x([Tb(_b(gb),Xb(sk,rk)),Tb(_b(hb),Yb(sk,rk)),Tb(_b(pb),Zb(ak)),Tb(_b(yb),ev(ck)),Tb(_b(mb.concat(ub)),tk)]);const lk=x([Tb(_b(mb),Pb)]);var dk=Nb(Zv,ki.init,ik,lk,(()=>N.some(ek)));const uk=[zr("selector"),qr("execute",Ib),qr("moveOnTab",false)];const fk=(e,t,o)=>o.focusManager.get(e).bind((n=>o.execute(e,t,n)));const mk=(e,t,o)=>{Gl(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))};const gk=(e,t,o)=>Ov(e,o.selector,t,-1);const pk=(e,t,o)=>Ov(e,o.selector,t,+1);const hk=(e,t,o,n)=>o.moveOnTab?tv(gk)(e,t,o,n):N.none();const yk=(e,t,o,n)=>o.moveOnTab?tv(pk)(e,t,o,n):N.none();const bk=x([Tb(_b(pb),tv(gk)),Tb(_b(yb),tv(pk)),Tb(xb([zb,_b(db)]),hk),Tb(xb([Sb,_b(db)]),yk),Tb(_b(ub),fk),Tb(_b(mb),fk)]);const vk=x([Tb(_b(mb),Pb)]);var kk=Nb(uk,ki.init,bk,vk,(()=>N.some(mk)));const wk=[vd("onSpace"),vd("onEnter"),vd("onShiftEnter"),vd("onLeft"),vd("onRight"),vd("onTab"),vd("onShiftTab"),vd("onUp"),vd("onDown"),vd("onEscape"),qr("stopSpaceKeyup",false),Br("focusIn")];const _k=(e,t,o)=>[Tb(_b(mb),o.onSpace),Tb(xb([Sb,_b(ub)]),o.onEnter),Tb(xb([zb,_b(ub)]),o.onShiftEnter),Tb(xb([zb,_b(db)]),o.onShiftTab),Tb(xb([Sb,_b(db)]),o.onTab),Tb(_b(pb),o.onUp),Tb(_b(yb),o.onDown),Tb(_b(gb),o.onLeft),Tb(_b(hb),o.onRight),Tb(_b(mb),o.onSpace),Tb(_b(fb),o.onEscape)];const xk=(e,t,o)=>o.stopSpaceKeyup?[Tb(_b(mb),Pb)]:[];var zk=Nb(wk,ki.init,_k,xk,(e=>e.focusIn));const Ck=Bb.schema();const Sk=Lb.schema();const Tk=Pv.schema();const Ok=Tv.schema();const Ek=dk.schema();const Dk=qb.schema();const Ak=kk.schema();const Mk=zk.schema();var Nk=Object.freeze({__proto__:null,acyclic:Ck,cyclic:Sk,flow:Tk,flatgrid:Ok,matrix:Ek,execution:Dk,menu:Ak,special:Mk});const Rk=e=>Se(e,"setGridSize");const Bk=Tu({branchKey:"mode",branches:Nk,name:"keying",active:{events:(e,t)=>{const o=e.handler;return o.toEvents(e,t)}},apis:{focusIn:(e,t,o)=>{t.sendFocusIn(t).fold((()=>{e.getSystem().triggerFocus(e.element,e.element)}),(n=>{n(e,t,o)}))},setGridSize:(e,t,o,n,s)=>{if(!Rk(o)){console.error("Layout does not support setGridSize")}else{o.setGridSize(n,s)}}},state:Gb});const Lk=(e,t)=>{Hu((()=>{Gg(e,t,(()=>U(t,e.getSystem().build)))}),e.element)};const Hk=(e,t)=>{Hu((()=>{Kg(e,t,(()=>hl(e.element,t,e.getSystem().buildOrPatch)))}),e.element)};const Ik=(e,t,o,n)=>{qg(t);const s=pl(e.element,o,n,e.getSystem().buildOrPatch);Ug(e,s);e.syncComponents()};const Pk=(e,t,o)=>{const n=e.getSystem().build(o);Yg(e,n,t)};const Fk=(e,t,o,n)=>{Qg(t);Pk(e,((e,t)=>Tn(e,t,o)),n)};const Vk=(e,t,o,n)=>{const s=t.reuseDom?Hk:Lk;return s(e,n)};const jk=(e,t,o,n)=>{Pk(e,Sn,n)};const Uk=(e,t,o,n)=>{Pk(e,Cn,n)};const qk=(e,t,o,n)=>{const s=Wk(e);const r=J(s,(e=>ht(n.element,e.element)));r.each(Qg)};const Wk=(e,t)=>e.components();const $k=(e,t,o,n,s)=>{const r=Wk(e);return N.from(r[n]).map((o=>{s.fold((()=>Qg(o)),(s=>{const r=t.reuseDom?Ik:Fk;r(e,o,n,s)}));return o}))};const Gk=(e,t,o,n,s)=>{const r=Wk(e);return Q(r,n).bind((n=>$k(e,t,o,n,s)))};var Kk=Object.freeze({__proto__:null,append:jk,prepend:Uk,remove:qk,replaceAt:$k,replaceBy:Gk,set:Vk,contents:Wk});const Xk=Cu({fields:[Xr("reuseDom",true)],name:"replacing",apis:Kk});const Yk=(e,t)=>{const o=xc(t);return Cu({fields:[zr("enabled")],name:e,active:{events:x(o)}})};const Jk=(e,t)=>{const o=Yk(e,t);return{key:e,value:{config:{},me:o,configAsRaw:x({}),initialConfig:{},state:ki}}};const Qk=(e,t)=>{if(!t.ignore){Mu(e.element);t.onFocus(e)}};const Zk=(e,t)=>{if(!t.ignore){Nu(e.element)}};const ew=e=>Ru(e.element);var tw=Object.freeze({__proto__:null,focus:Qk,blur:Zk,isFocused:ew});const ow=(e,t)=>{const o=t.ignore?{}:{attributes:{tabindex:"-1"}};return Si(o)};const nw=e=>xc([Tc($a(),((t,o)=>{Qk(t,e);o.stop()}))].concat(e.stopMousedown?[Tc(Oa(),((e,t)=>{t.event.prevent()}))]:[]));var sw=Object.freeze({__proto__:null,exhibit:ow,events:nw});var rw=[bd("onFocus"),qr("stopMousedown",false),qr("ignore",false)];const aw=Cu({fields:rw,name:"focusing",active:sw,apis:tw});const cw=e=>{const t=()=>{const t=ea(e);const o=()=>t.get();const n=e=>t.set(e);const s=()=>t.set(e);const r=()=>t.get();return{get:o,set:n,clear:s,readState:r}};return{init:t}};const iw=(e,t,o)=>{const n=t.aria;n.update(e,n,o.get())};const lw=(e,t,o)=>{t.toggleClass.each((t=>{if(o.get()){tl(e.element,t)}else{nl(e.element,t)}}))};const dw=(e,t,o)=>{mw(e,t,o,!o.get())};const uw=(e,t,o)=>{o.set(true);lw(e,t,o);iw(e,t,o)};const fw=(e,t,o)=>{o.set(false);lw(e,t,o);iw(e,t,o)};const mw=(e,t,o,n)=>{const s=n?uw:fw;s(e,t,o)};const gw=(e,t,o)=>o.get();const pw=(e,t,o)=>{mw(e,t,o,t.selected)};var hw=Object.freeze({__proto__:null,onLoad:pw,toggle:dw,isOn:gw,on:uw,off:fw,set:mw});const yw=()=>Si({});const bw=(e,t)=>{const o=hu(e,t,dw);const n=yu(e,t,pw);return xc(Z([e.toggleOnExecute?[o]:[],[n]]))};var vw=Object.freeze({__proto__:null,exhibit:yw,events:bw});const kw=(e,t,o)=>{Wt(e.element,"aria-pressed",o);if(t.syncWithExpanded){xw(e,t,o)}};const ww=(e,t,o)=>{Wt(e.element,"aria-selected",o)};const _w=(e,t,o)=>{Wt(e.element,"aria-checked",o)};const xw=(e,t,o)=>{Wt(e.element,"aria-expanded",o)};var zw=[qr("selected",false),Br("toggleClass"),qr("toggleOnExecute",true),Wr("aria",{mode:"none"},vr("mode",{pressed:[qr("syncWithExpanded",false),_d("update",kw)],checked:[_d("update",_w)],expanded:[_d("update",xw)],selected:[_d("update",ww)],none:[_d("update",v)]}))];const Cw=Cu({fields:zw,name:"toggling",active:vw,apis:hw,state:cw(false)});const Sw=()=>{const e=(e,t)=>{t.stop();vc(e)};return[Tc(Pa(),e),Tc(Qa(),e),Rc(za()),Rc(Oa())]};const Tw=e=>{const t=e=>Fc(((t,o)=>{e(t);o.stop()}));return xc(Z([e.map(t).toArray(),Sw()]))};const Ow="alloy.item-hover";const Ew="alloy.item-focus";const Dw=e=>{if(Lu(e.element).isNone()||aw.isFocused(e)){if(!aw.isFocused(e)){aw.focus(e)}bc(e,Ow,{item:e})}};const Aw=e=>{bc(e,Ew,{item:e})};const Mw=x(Ow);const Nw=x(Ew);const Rw=e=>({dom:e.dom,domModification:{...e.domModification,attributes:{role:e.toggling.isSome()?"menuitemcheckbox":"menuitem",...e.domModification.attributes,"aria-haspopup":e.hasSubmenu,...e.hasSubmenu?{"aria-expanded":false}:{}}},behaviours:lh.augment(e.itemBehaviours,[e.toggling.fold(Cw.revoke,(e=>Cw.config({aria:{mode:"checked"},...e}))),aw.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:e=>{Aw(e)}}),Bk.config({mode:"execution"}),rh.config({store:{mode:"memory",initialValue:e.data}}),Jk("item-type-events",[...Sw(),Tc(Ma(),Dw),Tc(Ja(),aw.focus)])]),components:e.components,eventOrder:e.eventOrder});const Bw=[zr("data"),zr("components"),zr("dom"),qr("hasSubmenu",false),Br("toggling"),lh.field("itemBehaviours",[Cw,aw,Bk,rh]),qr("ignoreFocus",false),qr("domModification",{}),_d("builder",Rw),qr("eventOrder",{})];const Lw=e=>({dom:e.dom,components:e.components,events:xc([Bc(Ja())])});const Hw=[zr("dom"),zr("components"),_d("builder",Lw)];const Iw=x("item-widget");const Pw=x([Ih({name:"widget",overrides:e=>({behaviours:xu([rh.config({store:{mode:"manual",getValue:t=>e.data,setValue:v}})])})})]);const Fw=e=>{const t=Jh(Iw(),e,Pw());const o=Qh(Iw(),e,t.internals());const n=t=>Zh(t,e,"widget").map((e=>{Bk.focusIn(e);return e}));const s=(t,o)=>vy(o.event.target)?N.none():(()=>{if(e.autofocus){o.setSource(t.element);return N.none()}else{return N.none()}})();return{dom:e.dom,components:o,domModification:e.domModification,events:xc([Fc(((e,t)=>{n(e).each((e=>{t.stop()}))})),Tc(Ma(),Dw),Tc(Ja(),((t,o)=>{if(e.autofocus){n(t)}else{aw.focus(t)}}))]),behaviours:lh.augment(e.widgetBehaviours,[rh.config({store:{mode:"memory",initialValue:e.data}}),aw.config({ignore:e.ignoreFocus,onFocus:e=>{Aw(e)}}),Bk.config({mode:"special",focusIn:e.autofocus?e=>{n(e)}:Ou(),onLeft:s,onRight:s,onEscape:(t,o)=>{if(!aw.isFocused(t)&&!e.autofocus){aw.focus(t);return N.some(true)}else if(e.autofocus){o.setSource(t.element);return N.none()}else{return N.none()}}})])}};const Vw=[zr("uid"),zr("data"),zr("components"),zr("dom"),qr("autofocus",false),qr("ignoreFocus",false),lh.field("widgetBehaviours",[rh,aw,Bk]),qr("domModification",{}),ay(Pw()),_d("builder",Fw)];const jw=vr("type",{widget:Vw,item:Bw,separator:Hw});const Uw=(e,t)=>({mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager});const qw=(e,t)=>({mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},focusManager:e.focusManager});const Ww=(e,t)=>({mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager});const $w=x([Vh({factory:{sketch:e=>{const t=yr("menu.spec item",jw,e);return t.builder(t)}},name:"items",unit:"item",defaults:(e,t)=>Ce(t,"uid")?t:{...t,uid:ci("item")},overrides:(e,t)=>({type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}})})]);const Gw=x([zr("value"),zr("items"),zr("dom"),zr("components"),qr("eventOrder",{}),ah("menuBehaviours",[ib,rh,xy,Bk]),Wr("movement",{mode:"menu",moveOnTab:true},vr("mode",{grid:[zd(),_d("config",Uw)],matrix:[_d("config",qw),zr("rowSelector")],menu:[qr("moveOnTab",true),_d("config",Ww)]})),gd(),qr("fakeFocus",false),qr("focusManager",Db()),bd("onHighlight")]);const Kw=x("alloy.menu-focus");const Xw=(e,t,o,n)=>({uid:e.uid,dom:e.dom,markers:e.markers,behaviours:ih(e.menuBehaviours,[ib.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight}),rh.config({store:{mode:"memory",initialValue:e.value}}),xy.config({find:N.some}),Bk.config(e.movement.config(e,e.movement))]),events:xc([Tc(Nw(),((e,t)=>{const o=t.event;e.getSystem().getByDom(o.target).each((o=>{ib.highlight(e,o);t.stop();bc(e,Kw(),{menu:e,item:o})}))})),Tc(Mw(),((e,t)=>{const o=t.event.item;ib.highlight(e,o)}))]),components:t,eventOrder:e.eventOrder,domModification:{attributes:{role:"menu"}}});const Yw=by({name:"Menu",configFields:Gw(),partFields:$w(),factory:Xw});const Jw=e=>he(e,((e,t)=>({k:e,v:t})));const Qw=(e,t,o,n)=>ze(o,n).bind((n=>ze(e,n).bind((n=>{const s=Qw(e,t,o,n);return N.some([n].concat(s))})))).getOr([]);const Zw=(e,t)=>{const o={};ge(e,((e,t)=>{q(e,(e=>{o[e]=t}))}));const n=t;const s=Jw(t);const r=pe(s,((e,t)=>[t].concat(Qw(o,n,s,t))));return pe(o,(e=>ze(r,e).getOr([e])))};const e_=()=>{const e=ea({});const t=ea({});const o=ea({});const n=ff();const s=ea({});const r=()=>{e.set({});t.set({});o.set({});n.clear()};const a=()=>n.get().isNone();const c=(e,o)=>{t.set({...t.get(),[e]:{type:"prepared",menu:o}})};const i=(r,a,c,i)=>{n.set(r);e.set(c);t.set(a);s.set(i);const l=Zw(i,c);o.set(l)};const l=t=>_e(e.get(),((e,o)=>e===t));const d=(e,t,o)=>p(e).bind((n=>l(e).bind((e=>t(e).map((e=>({triggeredMenu:n,triggeringItem:e,triggeringPath:o})))))));const u=(e,t)=>{const s=G(y(e).toArray(),(e=>p(e).isSome()));return ze(o.get(),e).bind((e=>{const o=oe(s.concat(e));const r=ee(o,((e,s)=>d(e,t,o.slice(0,s+1)).fold((()=>Te(n.get(),e)?[]:[N.none()]),(e=>[N.some(e)]))));return De(r)}))};const f=t=>ze(e.get(),t).map((e=>{const n=ze(o.get(),t).getOr([]);return[e].concat(n)}));const m=e=>ze(o.get(),e).bind((e=>e.length>1?N.some(e.slice(1)):N.none()));const g=e=>ze(o.get(),e);const p=e=>h(e).bind(t_);const h=e=>ze(t.get(),e);const y=t=>ze(e.get(),t);const b=e=>{const t=s.get();return ne(fe(t),e)};const v=()=>n.get().bind(p);const k=()=>t.get();return{setMenuBuilt:c,setContents:i,expand:f,refresh:g,collapse:m,lookupMenu:h,lookupItem:y,otherMenus:b,getPrimary:v,getMenus:k,clear:r,isClear:a,getTriggeringPath:u}};const t_=e=>e.type==="prepared"?N.some(e.menu):N.none();const o_={init:e_,extractPreparedMenu:t_};const n_=(e,t)=>{const o=ff();const n=(t,o,n)=>pe(n,((n,s)=>{const r=()=>Yw.sketch({...n,value:s,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:e.onHighlight,focusManager:e.fakeFocus?Ab():Db()});return s===o?{type:"prepared",menu:t.getSystem().build(r())}:{type:"notbuilt",nbMenu:r}}));const s=o_.init();const r=t=>{const o=n(t,e.data.primary,e.data.menus);const r=i();s.setContents(e.data.primary,o,e.data.expansions,r);return s.getPrimary()};const a=e=>rh.getValue(e).value;const c=(e,t,o)=>ue(t,(e=>{if(!e.getSystem().isConnected()){return N.none()}const t=ib.getCandidates(e);return J(t,(e=>a(e)===o))}));const i=t=>pe(e.data.menus,((e,t)=>ee(e.items,(e=>e.type==="separator"?[]:[e.data.value]))));const l=(e,t)=>{ib.highlight(e,t);ib.getHighlighted(t).orThunk((()=>ib.getFirst(t))).each((t=>{kc(e,t.element,Ja())}))};const d=(e,t)=>Ee(U(t,(t=>e.lookupMenu(t).bind((e=>e.type==="prepared"?N.some(e.menu):N.none())))));const u=(t,o,n)=>{const s=d(o,o.otherMenus(n));q(s,(o=>{al(o.element,[e.markers.backgroundMenu]);if(!e.stayInDom){Xk.remove(t,o)}}))};const f=t=>o.get().getOrThunk((()=>{const n={};const s=Gm(t.element,`.${e.markers.item}`);const r=G(s,(e=>Gt(e,"aria-haspopup")==="true"));q(r,(e=>{t.getSystem().getByDom(e).each((e=>{const t=a(e);n[t]=e}))}));o.set(n);return n}));const m=(e,t)=>{const o=f(e);ge(o,((e,o)=>{const n=P(t,o);Wt(e.element,"aria-expanded",n)}))};const g=(t,o,n)=>N.from(n[0]).bind((s=>o.lookupMenu(s).bind((s=>{if(s.type==="notbuilt"){return N.none()}else{const r=s.menu;const a=d(o,n.slice(1));q(a,(t=>{tl(t.element,e.markers.backgroundMenu)}));if(!Vt(r.element)){Xk.append(t,Il(r))}al(r.element,[e.markers.backgroundMenu]);l(t,r);u(t,o,n);return N.some(r)}}))));let p;(function(e){e[e["HighlightSubmenu"]=0]="HighlightSubmenu";e[e["HighlightParent"]=1]="HighlightParent"})(p||(p={}));const h=(e,t,o)=>{if(o.type==="notbuilt"){const n=e.getSystem().build(o.nbMenu());s.setMenuBuilt(t,n);return n}else{return o.menu}};const y=(t,o,n=p.HighlightSubmenu)=>{if(o.hasConfigured(jy)&&jy.isDisabled(o)){return N.some(o)}else{const r=a(o);return s.expand(r).bind((r=>{m(t,r);return N.from(r[0]).bind((a=>s.lookupMenu(a).bind((c=>{const i=h(t,a,c);if(!Vt(i.element)){Xk.append(t,Il(i))}e.onOpenSubmenu(t,o,i,oe(r));if(n===p.HighlightSubmenu){ib.highlightFirst(i);return g(t,s,r)}else{ib.dehighlightAll(i);return N.some(o)}}))))}))}};const b=(t,o)=>{const n=a(o);return s.collapse(n).bind((n=>{m(t,n);return g(t,s,n).map((n=>{e.onCollapseMenu(t,o,n);return n}))}))};const k=(e,t)=>{const o=a(t);return s.refresh(o).bind((t=>{m(e,t);return g(e,s,t)}))};const w=(e,t)=>vy(t.element)?N.none():y(e,t,p.HighlightSubmenu);const _=(e,t)=>vy(t.element)?N.none():b(e,t);const x=(t,o)=>b(t,o).orThunk((()=>e.onEscape(t,o).map((()=>t))));const z=t=>(o,n)=>Kl(n.getSource(),"."+e.markers.item).bind((e=>o.getSystem().getByDom(e).toOptional().bind((e=>t(o,e).map(A)))));const C=xc([Tc(Kw(),((e,t)=>{const o=t.event.item;s.lookupItem(a(o)).each((()=>{const o=t.event.menu;ib.highlight(e,o);const n=a(t.event.item);s.refresh(n).each((t=>u(e,s,t)))}))})),Fc(((t,o)=>{const n=o.event.target;t.getSystem().getByDom(n).each((o=>{const n=a(o);if(n.indexOf("collapse-item")===0){b(t,o)}y(t,o,p.HighlightSubmenu).fold((()=>{e.onExecute(t,o)}),v)}))})),Hc(((t,o)=>{r(t).each((o=>{Xk.append(t,Il(o));e.onOpenMenu(t,o);if(e.highlightImmediately){l(t,o)}}))}))].concat(e.navigateOnHover?[Tc(Mw(),((t,o)=>{const n=o.event.item;k(t,n);y(t,n,p.HighlightParent);e.onHover(t,n)}))]:[]));const S=e=>ib.getHighlighted(e).bind(ib.getHighlighted);const T=e=>{S(e).each((t=>{b(e,t)}))};const O=e=>{s.getPrimary().each((t=>{l(e,t)}))};const E=e=>N.from(e.components()[0]).filter((e=>Gt(e.element,"role")==="menu"));const D=t=>{const o=s.getPrimary().bind((e=>S(t).bind((e=>{const o=a(e);const n=xe(s.getMenus());const r=Ee(U(n,o_.extractPreparedMenu));return s.getTriggeringPath(o,(e=>c(t,r,e)))})).map((t=>({primary:e,triggeringPath:t})))));o.fold((()=>{E(t).each((o=>{e.onRepositionMenu(t,o,[])}))}),(({primary:o,triggeringPath:n})=>{e.onRepositionMenu(t,o,n)}))};const M={collapseMenu:T,highlightPrimary:O,repositionMenus:D};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:ih(e.tmenuBehaviours,[Bk.config({mode:"special",onRight:z(w),onLeft:z(_),onEscape:z(x),focusIn:(e,t)=>{s.getPrimary().each((t=>{kc(e,t.element,Ja())}))}}),ib.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),xy.config({find:e=>ib.getHighlighted(e)}),Xk.config({})]),eventOrder:e.eventOrder,apis:M,events:C}};const s_=x("collapse-item");const r_=(e,t,o)=>({primary:e,menus:t,expansions:o});const a_=(e,t)=>({primary:e,menus:ia(e,t),expansions:{}});const c_=e=>({value:Zc(s_()),meta:{text:e}});const i_=yy({name:"TieredMenu",configFields:[wd("onExecute"),wd("onEscape"),kd("onOpenMenu"),kd("onOpenSubmenu"),bd("onRepositionMenu"),bd("onCollapseMenu"),qr("highlightImmediately",true),Mr("data",[zr("primary"),zr("menus"),zr("expansions")]),qr("fakeFocus",false),bd("onHighlight"),bd("onHover"),pd(),zr("dom"),qr("navigateOnHover",true),qr("stayInDom",false),ah("tmenuBehaviours",[Bk,ib,xy,Xk]),qr("eventOrder",{})],apis:{collapseMenu:(e,t)=>{e.collapseMenu(t)},highlightPrimary:(e,t)=>{e.highlightPrimary(t)},repositionMenus:(e,t)=>{e.repositionMenus(t)}},factory:n_,extraApis:{tieredData:r_,singleData:a_,collapseItem:c_}});const l_=(e,t,o,n,s)=>{const r=()=>e.lazySink(t);const a=n.type==="horizontal"?{layouts:{onLtr:()=>du(),onRtl:()=>uu()}}:{};const c=e=>e.length===2;const i=e=>c(e)?a:{};return i_.sketch({dom:{tag:"div"},data:n.data,markers:n.menu.markers,highlightImmediately:n.menu.highlightImmediately,onEscape:()=>{xp.close(t);e.onEscape.map((e=>e(t)));return N.some(true)},onExecute:()=>N.some(true),onOpenMenu:(e,t)=>{Pg.positionWithinBounds(r().getOrDie(),t,o,s())},onOpenSubmenu:(e,t,o,n)=>{const s=r().getOrDie();Pg.position(s,o,{anchor:{type:"submenu",item:t,...i(n)}})},onRepositionMenu:(e,t,n)=>{const a=r().getOrDie();Pg.positionWithinBounds(a,t,o,s());q(n,(e=>{const t=i(e.triggeringPath);Pg.position(a,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem,...t}})}))}})};const d_=(e,t)=>{const o=(t,o)=>{const n=e.getRelated(t);return n.exists((e=>Zl(e,o)))};const n=(e,t)=>{xp.setContent(e,t)};const s=(e,t,o)=>{r(e,t,o,N.none())};const r=(e,t,o,n)=>{a(e,t,o,(()=>n.map((e=>$n(e)))))};const a=(t,o,n,s)=>{const r=e.lazySink(t).getOrDie();xp.openWhileCloaked(t,o,(()=>Pg.positionWithinBounds(r,t,n,s())));rh.setValue(t,N.some({mode:"position",config:n,getBounds:s}))};const c=(e,t,o)=>{i(e,t,o,N.none)};const i=(t,o,n,s)=>{const r=l_(e,t,o,n,s);xp.open(t,r);rh.setValue(t,N.some({mode:"menu",menu:r}))};const l=e=>{if(xp.isOpen(e)){rh.setValue(e,N.none());xp.close(e)}};const d=e=>xp.getState(e);const u=t=>{if(xp.isOpen(t)){rh.getValue(t).each((o=>{switch(o.mode){case"menu":xp.getState(t).each(i_.repositionMenus);break;case"position":const n=e.lazySink(t).getOrDie();Pg.positionWithinBounds(n,t,o.config,o.getBounds());break}}))}};const f={setContent:n,showAt:s,showWithin:r,showWithinBounds:a,showMenuAt:c,showMenuWithinBounds:i,hide:l,getContent:d,reposition:u,isOpen:xp.isOpen};return{uid:e.uid,dom:e.dom,behaviours:ih(e.inlineBehaviours,[xp.config({isPartOf:(e,t,n)=>Zl(t,n)||o(e,n),getAttachPoint:t=>e.lazySink(t).getOrDie(),onOpen:t=>{e.onShow(t)},onClose:t=>{e.onHide(t)}}),rh.config({store:{mode:"memory",initialValue:N.none()}}),Eu.config({channels:{...Op({isExtraPart:t.isExtraPart,...e.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...Dp({...e.fireRepositionEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({}),doReposition:u})}})]),eventOrder:e.eventOrder,apis:f}};const u_=yy({name:"InlineView",configFields:[zr("lazySink"),bd("onShow"),bd("onHide"),Fr("onEscape"),ah("inlineBehaviours",[xp,rh,Eu]),jr("fireDismissalEventInstead",[qr("event",lc())]),jr("fireRepositionEventInstead",[qr("event",dc())]),qr("getRelated",N.none),qr("isExtraPart",D),qr("eventOrder",N.none)],factory:d_,apis:{showAt:(e,t,o,n)=>{e.showAt(t,o,n)},showWithin:(e,t,o,n,s)=>{e.showWithin(t,o,n,s)},showWithinBounds:(e,t,o,n,s)=>{e.showWithinBounds(t,o,n,s)},showMenuAt:(e,t,o,n)=>{e.showMenuAt(t,o,n)},showMenuWithinBounds:(e,t,o,n,s)=>{e.showMenuWithinBounds(t,o,n,s)},hide:(e,t)=>{e.hide(t)},isOpen:(e,t)=>e.isOpen(t),getContent:(e,t)=>e.getContent(t),setContent:(e,t,o)=>{e.setContent(t,o)},reposition:(e,t)=>{e.reposition(t)}}});var f_=tinymce.util.Tools.resolve("tinymce.util.Delay");const m_=e=>{const t=Tw(e.action);const o=e.dom.tag;const n=t=>ze(e.dom,"attributes").bind((e=>ze(e,t)));const s=()=>{if(o==="button"){const e=n("type").getOr("button");const t=n("role").map((e=>({role:e}))).getOr({});return{type:e,...t}}else{const e=n("role").getOr("button");return{role:e}}};return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:lh.augment(e.buttonBehaviours,[aw.config({}),Bk.config({mode:"execution",useSpace:true,useEnter:true})]),domModification:{attributes:s()},eventOrder:e.eventOrder}};const g_=yy({name:"Button",factory:m_,configFields:[qr("uid",undefined),zr("dom"),qr("components",[]),lh.field("buttonBehaviours",[aw,Bk]),Br("action"),Br("role"),qr("eventOrder",{})]});const p_=e=>{const t=gy(e)&&Se(e,"uid")?e.uid:ci("memento");const o=e=>e.getSystem().getByUid(t).getOrDie();const n=e=>e.getSystem().getByUid(t).toOptional();const s=()=>({...e,uid:t});return{get:o,getOpt:n,asSpec:s}};var h_=tinymce.util.Tools.resolve("tinymce.util.I18n");const y_={indent:true,outdent:true,"table-insert-column-after":true,"table-insert-column-before":true,"paste-column-after":true,"paste-column-before":true,"unordered-list":true,"list-bull-circle":true,"list-bull-default":true,"list-bull-square":true};const b_="temporary-placeholder";const v_=e=>()=>ze(e,b_).getOr("!not found!");const k_=(e,t)=>{const o=e.toLowerCase();if(h_.isRtl()){const e=Pe(o,"-rtl");return Ce(t,e)?e:o}else{return o}};const w_=(e,t)=>ze(t,k_(e,t));const __=(e,t)=>{const o=t();return w_(e,o).getOrThunk(v_(o))};const x_=(e,t,o)=>{const n=t();return w_(e,n).or(o).getOrThunk(v_(n))};const z_=e=>h_.isRtl()?Ce(y_,e):false;const C_=()=>Jk("add-focusable",[Hc((e=>{$l(e.element,"svg").each((e=>Wt(e,"focusable","false")))}))]);const S_=(e,t,o,n)=>{var s,r;const a=z_(t)?["tox-icon--flip"]:[];const c=ze(o,k_(t,o)).or(n).getOrThunk(v_(o));return{dom:{tag:e.tag,attributes:(s=e.attributes)!==null&&s!==void 0?s:{},classes:e.classes.concat(a),innerHtml:c},behaviours:xu([...(r=e.behaviours)!==null&&r!==void 0?r:[],C_()])}};const T_=(e,t,o,n=N.none())=>S_(t,e,o(),n);const O_=(e,t,o)=>{const n=o();const s=J(e,(e=>Ce(n,k_(e,n))));return S_(t,s.getOr(b_),n,N.none())};const E_={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"};const D_=e=>{const t=p_({dom:{tag:"p",innerHtml:e.translationProvider(e.text)},behaviours:xu([Xk.config({})])});const o=e=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${e}%`}}});const n=e=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${e}%`}});const s=p_({dom:{tag:"div",classes:e.progress?["tox-progress-bar","tox-progress-indicator"]:["tox-progress-bar"]},components:[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(0)]},n(0)],behaviours:xu([Xk.config({})])});const r=(e,t)=>{if(e.getSystem().isConnected()){s.getOpt(e).each((e=>{Xk.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(t)]},n(t)])}))}};const a=(e,o)=>{if(e.getSystem().isConnected()){const n=t.get(e);Xk.set(n,[Ml(o)])}};const c={updateProgress:r,updateText:a};const i=Z([e.icon.toArray(),e.level.toArray(),e.level.bind((e=>N.from(E_[e]))).toArray()]);const l=p_(g_.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[T_("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":e.translationProvider("Close")}},e.iconProvider)],action:t=>{e.onAction(t)}}));const d=O_(i,{tag:"div",classes:["tox-notification__icon"]},e.iconProvider);const u={dom:{tag:"div",classes:["tox-notification__body"]},components:[t.asSpec()],behaviours:xu([Xk.config({})])};const f=[d,u];return{uid:e.uid,dom:{tag:"div",attributes:{role:"alert"},classes:e.level.map((e=>["tox-notification","tox-notification--in",`tox-notification--${e}`])).getOr(["tox-notification","tox-notification--in"])},behaviours:xu([aw.config({}),Jk("notification-events",[Tc(Na(),(e=>{l.getOpt(e).each(aw.focus)}))])]),components:f.concat(e.progress?[s.asSpec()]:[]).concat(!e.closeButton?[]:[l.asSpec()]),apis:c}};const A_=yy({name:"Notification",factory:D_,configFields:[Br("level"),zr("progress"),zr("icon"),zr("onAction"),zr("text"),zr("iconProvider"),zr("translationProvider"),Xr("closeButton",true)],apis:{updateProgress:(e,t,o)=>{e.updateProgress(t,o)},updateText:(e,t,o)=>{e.updateText(t,o)}}});var M_=(e,t,o)=>{const n=t.backstage.shared;const s=()=>{const t=$n(Ze.fromDom(e.getContentAreaContainer()));const o=Kn();const n=Pd(o.x,t.x,t.right);const s=Pd(o.y,t.y,t.bottom);const r=Math.max(t.right,o.right);const a=Math.max(t.bottom,o.bottom);return N.some(Wn(n,s,r-n,a-s))};const r=(t,r)=>{const a=()=>{r();u_.hide(i)};const c=Hl(A_.sketch({text:t.text,level:P(["success","error","warning","warn","info"],t.type)?t.type:undefined,progress:t.progressBar===true,icon:N.from(t.icon),closeButton:t.closeButton,onAction:a,iconProvider:n.providers.icons,translationProvider:n.providers.translate}));const i=Hl(u_.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:n.getSink,fireDismissalEventInstead:{},...n.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}}}));o.add(i);if(t.timeout>0){f_.setEditorTimeout(e,(()=>{a()}),t.timeout)}const l=()=>{const t=Il(c);const o={maxHeightFunction:Bf()};const r=e.notificationManager.getNotifications();if(r[0]===d){const e={...n.anchors.banner(),overrides:o};u_.showWithinBounds(i,t,{anchor:e},s)}else{I(r,d).each((e=>{const n=r[e-1].getEl();const a={type:"node",root:jt(),node:N.some(Ze.fromDom(n)),overrides:o,layouts:{onRtl:()=>[nu],onLtr:()=>[nu]}};u_.showWithinBounds(i,t,{anchor:a},s)}))}};const d={close:a,reposition:l,text:e=>{A_.updateText(c,e)},settings:t,getEl:()=>c.element.dom,progressBar:{value:e=>{A_.updateProgress(c,e)}}};return d};const a=e=>{e.close()};const c=e=>e.settings;return{open:r,close:a,getArgs:c}};var N_=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils");var R_=tinymce.util.Tools.resolve("tinymce.EditorManager");var B_=tinymce.util.Tools.resolve("tinymce.Env");var L_;(function(e){e["default"]="wrap";e["floating"]="floating";e["sliding"]="sliding";e["scrolling"]="scrolling"})(L_||(L_={}));var H_;(function(e){e["auto"]="auto";e["top"]="top";e["bottom"]="bottom"})(H_||(H_={}));const I_=e=>t=>t.options.get(e);const P_=e=>t=>N.from(e(t));const F_=e=>{const t=B_.deviceType.isPhone();const o=B_.deviceType.isTablet()||t;const n=e.options.register;const s=e=>c(e)||e===false;const r=e=>c(e)||y(e);n("skin",{processor:e=>c(e)||e===false,default:"oxide"});n("skin_url",{processor:"string"});n("height",{processor:r,default:Math.max(e.getElement().offsetHeight,400)});n("width",{processor:r,default:N_.DOM.getStyle(e.getElement(),"width")});n("min_height",{processor:"number",default:100});n("min_width",{processor:"number"});n("max_height",{processor:"number"});n("max_width",{processor:"number"});n("style_formats",{processor:"object[]"});n("style_formats_merge",{processor:"boolean",default:false});n("style_formats_autohide",{processor:"boolean",default:false});n("line_height_formats",{processor:"string",default:"1 1.1 1.2 1.3 1.4 1.5 2"});n("font_family_formats",{processor:"string",default:"Andale Mono=andale mono,monospace;"+"Arial=arial,helvetica,sans-serif;"+"Arial Black=arial black,sans-serif;"+"Book Antiqua=book antiqua,palatino,serif;"+"Comic Sans MS=comic sans ms,sans-serif;"+"Courier New=courier new,courier,monospace;"+"Georgia=georgia,palatino,serif;"+"Helvetica=helvetica,arial,sans-serif;"+"Impact=impact,sans-serif;"+"Symbol=symbol;"+"Tahoma=tahoma,arial,helvetica,sans-serif;"+"Terminal=terminal,monaco,monospace;"+"Times New Roman=times new roman,times,serif;"+"Trebuchet MS=trebuchet ms,geneva,sans-serif;"+"Verdana=verdana,geneva,sans-serif;"+"Webdings=webdings;"+"Wingdings=wingdings,zapf dingbats"});n("font_size_formats",{processor:"string",default:"8pt 10pt 12pt 14pt 18pt 24pt 36pt"});n("block_formats",{processor:"string",default:"Paragraph=p;"+"Heading 1=h1;"+"Heading 2=h2;"+"Heading 3=h3;"+"Heading 4=h4;"+"Heading 5=h5;"+"Heading 6=h6;"+"Preformatted=pre"});n("content_langs",{processor:"object[]"});n("removed_menuitems",{processor:"string",default:""});n("menubar",{processor:e=>c(e)||f(e),default:!t});n("menu",{processor:"object",default:{}});n("toolbar",{processor:e=>{if(f(e)||c(e)||d(e)){return{value:e,valid:true}}else{return{valid:false,message:"Must be a boolean, string or array."}}},default:true});V(9,(e=>{n("toolbar"+(e+1),{processor:"string"})}));n("toolbar_mode",{processor:"string",default:o?"scrolling":"floating"});n("toolbar_groups",{processor:"object",default:{}});n("toolbar_location",{processor:"string",default:H_.auto});n("toolbar_persist",{processor:"boolean",default:false});n("toolbar_sticky",{processor:"boolean",default:e.inline});n("toolbar_sticky_offset",{processor:"number",default:0});n("fixed_toolbar_container",{processor:"string",default:""});n("fixed_toolbar_container_target",{processor:"object"});n("file_picker_callback",{processor:"function"});n("file_picker_validator_handler",{processor:"function"});n("file_picker_types",{processor:"string"});n("typeahead_urls",{processor:"boolean",default:true});n("anchor_top",{processor:s,default:"#top"});n("anchor_bottom",{processor:s,default:"#bottom"});n("draggable_modal",{processor:"boolean",default:false});n("statusbar",{processor:"boolean",default:true});n("elementpath",{processor:"boolean",default:true});n("branding",{processor:"boolean",default:true});n("resize",{processor:e=>e==="both"||f(e),default:!B_.deviceType.isTouch()})};const V_=I_("readonly");const j_=I_("height");const U_=I_("width");const q_=P_(I_("min_width"));const W_=P_(I_("min_height"));const $_=P_(I_("max_width"));const G_=P_(I_("max_height"));const K_=P_(I_("style_formats"));const X_=I_("style_formats_merge");const Y_=I_("style_formats_autohide");const J_=I_("content_langs");const Q_=I_("removed_menuitems");const Z_=I_("toolbar_mode");const ex=I_("toolbar_groups");const tx=I_("toolbar_location");const ox=I_("fixed_toolbar_container");const nx=I_("fixed_toolbar_container_target");const sx=I_("toolbar_persist");const rx=I_("toolbar_sticky_offset");const ax=I_("menubar");const cx=I_("toolbar");const ix=I_("file_picker_callback");const lx=I_("file_picker_validator_handler");const dx=I_("file_picker_types");const ux=I_("typeahead_urls");const fx=I_("anchor_top");const mx=I_("anchor_bottom");const gx=I_("draggable_modal");const px=I_("statusbar");const hx=I_("elementpath");const yx=I_("branding");const bx=I_("resize");const vx=I_("paste_as_text");const kx=e=>e.options.get("skin")===false;const wx=e=>e.options.get("menubar")!==false;const _x=e=>{const t=e.options.get("skin_url");if(kx(e)){return t}else{if(t){return e.documentBaseURI.toAbsolute(t)}else{const t=e.options.get("skin");return R_.baseURL+"/skins/ui/"+t}}};const xx=e=>e.options.get("line_height_formats").split(" ");const zx=e=>{const t=cx(e);const o=c(t);const n=d(t)&&t.length>0;return!Sx(e)&&(n||o||t===true)};const Cx=e=>{const t=V(9,(t=>e.options.get("toolbar"+(t+1))));const o=G(t,c);return Re(o.length>0,o)};const Sx=e=>Cx(e).fold((()=>{const t=cx(e);return b(t,c)&&t.length>0}),A);const Tx=e=>tx(e)===H_.bottom;const Ox=e=>{if(!e.inline){return N.none()}const t=ox(e);if(t.length>0){return Gl(jt(),t)}const o=nx(e);if(p(o)){return N.some(Ze.fromDom(o))}return N.none()};const Ex=e=>e.inline&&Ox(e).isSome();const Dx=e=>{const t=Ox(e);return t.getOrThunk((()=>Bt(Rt(Ze.fromDom(e.getElement())))))};const Ax=e=>e.inline&&!wx(e)&&!zx(e)&&!Sx(e);const Mx=e=>{const t=e.options.get("toolbar_sticky");return(t||e.inline)&&!Ex(e)&&!Ax(e)};const Nx=e=>{const t=e.options.get("menu");return pe(t,(e=>({...e,items:e.items})))};var Rx=Object.freeze({__proto__:null,get ToolbarMode(){return L_},get ToolbarLocation(){return H_},register:F_,getSkinUrl:_x,isReadOnly:V_,isSkinDisabled:kx,getHeightOption:j_,getWidthOption:U_,getMinWidthOption:q_,getMinHeightOption:W_,getMaxWidthOption:$_,getMaxHeightOption:G_,getUserStyleFormats:K_,shouldMergeStyleFormats:X_,shouldAutoHideStyleFormats:Y_,getLineHeightFormats:xx,getContentLanguages:J_,getRemovedMenuItems:Q_,isMenubarEnabled:wx,isMultipleToolbars:Sx,isToolbarEnabled:zx,isToolbarPersist:sx,getMultipleToolbarsOption:Cx,getUiContainer:Dx,useFixedContainer:Ex,getToolbarMode:Z_,isDraggableModal:gx,isDistractionFree:Ax,isStickyToolbar:Mx,getStickyToolbarOffset:rx,getToolbarLocation:tx,isToolbarLocationBottom:Tx,getToolbarGroups:ex,getMenus:Nx,getMenubar:ax,getToolbar:cx,getFilePickerCallback:ix,getFilePickerTypes:dx,useTypeaheadUrls:ux,getAnchorTop:fx,getAnchorBottom:mx,getFilePickerValidatorHandler:lx,useStatusBar:px,useElementPath:hx,useBranding:yx,getResize:bx,getPasteAsText:vx});const Bx="[data-mce-autocompleter]";const Lx=e=>Kl(e,Bx);const Hx=e=>Gl(e,Bx);const Ix=(e,t)=>{const o=(e,t)=>{bc(e,Ba(),{raw:t})};const n=()=>e.getView().bind(ib.getHighlighted);t.on("keydown",(t=>{const s=t.which;if(!e.isActive()){return}if(e.isMenuOpen()){if(s===13){n().each(vc);t.preventDefault()}else if(s===40){n().fold((()=>{e.getView().each(ib.highlightFirst)}),(e=>{o(e,t)}));t.preventDefault();t.stopImmediatePropagation()}else if(s===37||s===38||s===39){n().each((e=>{o(e,t);t.preventDefault();t.stopImmediatePropagation()}))}}else{if(s===13||s===38||s===40){e.cancelIfNecessary()}}}));t.on("NodeChange",(t=>{if(e.isActive()&&!e.isProcessingAction()&&Lx(Ze.fromDom(t.element)).isNone()){e.cancelIfNecessary()}}))};const Px={setup:Ix};var Fx;(function(e){e[e["CLOSE_ON_EXECUTE"]=0]="CLOSE_ON_EXECUTE";e[e["BUBBLE_TO_SANDBOX"]=1]="BUBBLE_TO_SANDBOX"})(Fx||(Fx={}));var Vx=Fx;const jx="tox-menu-nav__js";const Ux="tox-collection__item";const qx="tox-swatch";const Wx={normal:jx,color:qx};const $x="tox-collection__item--enabled";const Gx="tox-collection__group-heading";const Kx="tox-collection__item-icon";const Xx="tox-collection__item-label";const Yx="tox-collection__item-accessory";const Jx="tox-collection__item-caret";const Qx="tox-collection__item-checkmark";const Zx="tox-collection__item--active";const ez="tox-collection__item-container";const tz="tox-collection__item-container--column";const oz="tox-collection__item-container--row";const nz="tox-collection__item-container--align-right";const sz="tox-collection__item-container--align-left";const rz="tox-collection__item-container--valign-top";const az="tox-collection__item-container--valign-middle";const cz="tox-collection__item-container--valign-bottom";const iz=e=>ze(Wx,e).getOr(jx);const lz=e=>{if(e==="color"){return"tox-swatches"}else{return"tox-menu"}};const dz=e=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:lz(e),tieredMenu:"tox-tiered-menu"});const uz=e=>{const t=dz(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:iz(e)}};const fz=(e,t,o)=>{const n=dz(o);return{tag:"div",classes:Z([[n.menu,`tox-menu-${t}-column`],e?[n.hasIcons]:[]])}};const mz=[Yw.parts.items({})];const gz=(e,t,o)=>{const n=dz(o);const s={tag:"div",classes:Z([[n.tieredMenu]])};return{dom:s,markers:uz(o)}};const pz=(e,t)=>o=>{const n=j(o,t);return U(n,(t=>({dom:e,components:t})))};const hz=e=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Yw.parts.items({preprocess:e!=="auto"?pz({tag:"div",classes:["tox-swatches__row"]},e):z})]}]});const yz=e=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Yw.parts.items({preprocess:pz({tag:"div",classes:["tox-collection__group"]},e)})]});const bz=(e,t)=>{const o=[];let n=[];q(e,((e,s)=>{if(t(e,s)){if(n.length>0){o.push(n)}n=[];if(Ce(e.dom,"innerHtml")||e.components.length>0){n.push(e)}}else{n.push(e)}}));if(n.length>0){o.push(n)}return U(o,(e=>({dom:{tag:"div",classes:["tox-collection__group"]},components:e})))};const vz=(e,t,o=true)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(e===1?["tox-collection--list"]:["tox-collection--grid"])},components:[Yw.parts.items({preprocess:o=>{if(e!=="auto"&&e>1){return pz({tag:"div",classes:["tox-collection__group"]},e)(o)}else{return bz(o,((e,o)=>t[o].type==="separator"))}}})]});const kz=(e,t=true)=>({dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Yw.parts.items({preprocess:t=>bz(t,((t,o)=>e[o].type==="separator"))})]});const wz=e=>F(e,(e=>"icon"in e&&e.icon!==undefined));const _z=e=>{console.error(br(e));console.log(e);return N.none()};const xz=(e,t,o,n,s)=>{const r=kz(o);return{value:e,dom:r.dom,components:r.components,items:o}};const zz=(e,t,o,n,s)=>{if(s==="color"){const t=hz(n);return{value:e,dom:t.dom,components:t.components,items:o}}if(s==="normal"&&n==="auto"){const t=vz(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if(s==="normal"&&n===1){const t=vz(1,o);return{value:e,dom:t.dom,components:t.components,items:o}}if(s==="normal"){const t=vz(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if(s==="listpreview"&&n!=="auto"){const t=yz(n);return{value:e,dom:t.dom,components:t.components,items:o}}return{value:e,dom:fz(t,n,s),components:mz,items:o}};const Cz=Tr("type");const Sz=Tr("name");const Tz=Tr("label");const Oz=Tr("text");const Ez=Tr("title");const Dz=Tr("icon");const Az=Tr("value");const Mz=Dr("fetch");const Nz=Dr("getSubmenuItems");const Rz=Dr("onAction");const Bz=Dr("onItemAction");const Lz=Yr("onSetup",(()=>v));const Hz=Ir("name");const Iz=Ir("text");const Pz=Ir("icon");const Fz=Ir("tooltip");const Vz=Ir("label");const jz=Ir("shortcut");const Uz=Fr("select");const qz=Xr("active",false);const Wz=Xr("borderless",false);const $z=Xr("enabled",true);const Gz=Xr("primary",false);const Kz=e=>qr("columns",e);const Xz=qr("meta",{});const Yz=Yr("onAction",v);const Jz=e=>Gr("type",e);const Qz=e=>wr("name","name",ks((()=>Zc(`${e}-name`))),sr);const Zz=e=>wr("value","value",ks((()=>Zc(`${e}-value`))),tr());const eC=Xs([Cz,Iz]);const tC=e=>pr("separatormenuitem",eC,e);const oC=Xs([Jz("autocompleteitem"),qz,$z,Xz,Az,Iz,Pz]);const nC=e=>pr("Autocompleter.Separator",eC,e);const sC=e=>pr("Autocompleter.Item",oC,e);const rC=[$z,Fz,Pz,Iz,Lz];const aC=Xs([Cz,Rz].concat(rC));const cC=e=>pr("toolbarbutton",aC,e);const iC=[qz].concat(rC);const lC=Xs(iC.concat([Cz,Rz]));const dC=e=>pr("ToggleButton",lC,e);const uC=[Yr("predicate",D),Kr("scope","node",["node","editor"]),Kr("position","selection",["node","selection","line"])];const fC=rC.concat([Jz("contextformbutton"),Gz,Rz,_r("original",z)]);const mC=iC.concat([Jz("contextformbutton"),Gz,Rz,_r("original",z)]);const gC=rC.concat([Jz("contextformbutton")]);const pC=iC.concat([Jz("contextformtogglebutton")]);const hC=vr("type",{contextformbutton:fC,contextformtogglebutton:mC});const yC=Xs([Jz("contextform"),Yr("initValue",x("")),Vz,Rr("commands",hC),Lr("launch",vr("type",{contextformbutton:gC,contextformtogglebutton:pC}))].concat(uC));const bC=e=>pr("ContextForm",yC,e);const vC=Xs([Jz("contexttoolbar"),Tr("items")].concat(uC));const kC=e=>pr("ContextToolbar",vC,e);const wC=[Cz,Tr("src"),Ir("alt"),Qr("classes",[],sr)];const _C=Xs(wC);const xC=[Cz,Oz,Hz,Qr("classes",["tox-collection__item-label"],sr)];const zC=Xs(xC);const CC=$s((()=>dr("type",{cardimage:_C,cardtext:zC,cardcontainer:SC})));const SC=Xs([Cz,Gr("direction","horizontal"),Gr("align","left"),Gr("valign","middle"),Rr("items",CC)]);const TC=[$z,Iz,jz,Zz("menuitem"),Xz];const OC=Xs([Cz,Vz,Rr("items",CC),Lz,Yz].concat(TC));const EC=e=>pr("cardmenuitem",OC,e);const DC=Xs([Cz,qz,Pz].concat(TC));const AC=e=>pr("choicemenuitem",DC,e);const MC=[Cz,Tr("fancytype"),Yz];const NC=[qr("initData",{})].concat(MC);const RC=[Zr("initData",{},[Xr("allowCustomColors",true),Vr("colors",tr())])].concat(MC);const BC=vr("fancytype",{inserttable:NC,colorswatch:RC});const LC=e=>pr("fancymenuitem",BC,e);const HC=Xs([Cz,Lz,Yz,Pz].concat(TC));const IC=e=>pr("menuitem",HC,e);const PC=Xs([Cz,Nz,Lz,Pz].concat(TC));const FC=e=>pr("nestedmenuitem",PC,e);const VC=Xs([Cz,Pz,qz,Lz,Rz].concat(TC));const jC=e=>pr("togglemenuitem",VC,e);const UC=(e,t,o)=>{const n=Gm(e.element,"."+o);if(n.length>0){const e=Q(n,(e=>{const o=e.dom.getBoundingClientRect().top;const s=n[0].dom.getBoundingClientRect().top;return Math.abs(o-s)>t})).getOr(n.length);return N.some({numColumns:e,numRows:Math.ceil(n.length/e)})}else{return N.none()}};const qC=(e,t)=>xu([Jk(e,t)]);const WC=e=>qC(Zc("unnamed-events"),e);const $C={namedEvents:qC,unnamedEvents:WC};const GC=Zc("tooltip.exclusive");const KC=Zc("tooltip.show");const XC=Zc("tooltip.hide");const YC=(e,t,o)=>{e.getSystem().broadcastOn([GC],{})};const JC=(e,t,o,n)=>{o.getTooltip().each((e=>{if(e.getSystem().isConnected()){Xk.set(e,n)}}))};var QC=Object.freeze({__proto__:null,hideAllExclusive:YC,setComponents:JC});const ZC=(e,t)=>{const o=o=>{t.getTooltip().each((n=>{Qg(n);e.onHide(o,n);t.clearTooltip()}));t.clearTimer()};const n=o=>{if(!t.isShowing()){YC(o);const n=e.lazySink(o).getOrDie();const s=o.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:xc(e.mode==="normal"?[Tc(Ma(),(e=>{yc(o,KC)})),Tc(Da(),(e=>{yc(o,XC)}))]:[]),behaviours:xu([Xk.config({})])});t.setTooltip(s);Xg(n,s);e.onShow(o,s);Pg.position(n,s,{anchor:e.anchor(o)})}};return xc(Z([[Tc(KC,(o=>{t.resetTimer((()=>{n(o)}),e.delay)})),Tc(XC,(n=>{t.resetTimer((()=>{o(n)}),e.delay)})),Tc(Xa(),((e,t)=>{const n=t;if(!n.universal){if(P(n.channels,GC)){o(e)}}})),Ic((e=>{o(e)}))],e.mode==="normal"?[Tc(Na(),(e=>{yc(e,KC)})),Tc(Ga(),(e=>{yc(e,XC)})),Tc(Ma(),(e=>{yc(e,KC)})),Tc(Da(),(e=>{yc(e,XC)}))]:[Tc(pc(),((e,t)=>{yc(e,KC)})),Tc(hc(),(e=>{yc(e,XC)}))]]))};var eS=Object.freeze({__proto__:null,events:ZC});var tS=[zr("lazySink"),zr("tooltipDom"),qr("exclusive",true),qr("tooltipComponents",[]),qr("delay",300),Kr("mode","normal",["normal","follow-highlight"]),qr("anchor",(e=>({type:"hotspot",hotspot:e,layouts:{onLtr:x([nu,ou,Qd,eu,Zd,tu]),onRtl:x([nu,ou,Qd,eu,Zd,tu])}}))),bd("onHide"),bd("onShow")];const oS=()=>{const e=ff();const t=ff();const o=()=>{e.on(clearTimeout)};const n=(t,n)=>{o();e.set(setTimeout(t,n))};const s=x("not-implemented");return wi({getTooltip:t.get,isShowing:t.isSet,setTooltip:t.set,clearTooltip:t.clear,clearTimer:o,resetTimer:n,readState:s})};var nS=Object.freeze({__proto__:null,init:oS});const sS=Cu({fields:tS,name:"tooltipping",active:eS,state:nS,apis:QC});const rS=e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");const aS="silver.readonly";const cS=Xs([Er("readonly")]);const iS=(e,t)=>{const o=e.outerContainer;const n=o.element;if(t){e.mothership.broadcastOn([zp()],{target:n});e.uiMothership.broadcastOn([zp()],{target:n})}e.mothership.broadcastOn([aS],{readonly:t});e.uiMothership.broadcastOn([aS],{readonly:t})};const lS=(e,t)=>{e.on("init",(()=>{if(e.mode.isReadOnly()){iS(t,true)}}));e.on("SwitchMode",(()=>iS(t,e.mode.isReadOnly())));if(V_(e)){e.mode.set("readonly")}};const dS=()=>Eu.config({channels:{[aS]:{schema:cS,onReceive:(e,t)=>{jy.set(e,t.readonly)}}}});const uS=e=>jy.config({disabled:e,disableClass:"tox-collection__item--state-disabled"});const fS=e=>jy.config({disabled:e});const mS=e=>jy.config({disabled:e,disableClass:"tox-tbtn--disabled"});const gS=e=>jy.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:false});const pS={item:uS,button:fS,splitButton:mS,toolbarButton:gS};const hS=(e,t)=>{const o=e.getApi(t);return e=>{e(o)}};const yS=(e,t)=>Hc((o=>{const n=hS(e,o);n((o=>{const n=e.onSetup(o);if(h(n)){t.set(n)}}))}));const bS=(e,t)=>Ic((o=>hS(e,o)(t.get())));const vS=(e,t)=>Fc(((o,n)=>{hS(e,o)(e.onAction);if(!e.triggersSubmenu&&t===Vx.CLOSE_ON_EXECUTE){if(o.getSystem().isConnected()){yc(o,ec())}n.stop()}}));const kS={[Ya()]:["disabling","alloy.base.behaviour","toggling","item-events"]};const wS=Ee;const _S=(e,t,o,n)=>{const s=ea(v);return{type:"item",dom:t.dom,components:wS(t.optComponents),data:e.data,eventOrder:kS,hasSubmenu:e.triggersSubmenu,itemBehaviours:xu([Jk("item-events",[vS(e,o),yS(e,s),bS(e,s)]),pS.item((()=>!e.enabled||n.isDisabled())),dS(),Xk.config({})].concat(e.itemBehaviours))}};const xS=e=>({value:e.value,meta:{text:e.text.getOr(""),...e.meta}});const zS=e=>{const t=B_.os.isMacOS()||B_.os.isiOS();const o={alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"};const n={meta:"Ctrl",access:"Shift+Alt"};const s=t?o:n;const r=e.split("+");const a=U(r,(e=>{const t=e.toLowerCase().trim();return Ce(s,t)?s[t]:e}));return t?a.join(""):a.join("+")};const CS=(e,t,o=[Kx])=>T_(e,{tag:"div",classes:o},t);const SS=e=>({dom:{tag:"div",classes:[Xx]},components:[Ml(h_.translate(e))]});const TS=(e,t)=>({dom:{tag:"div",classes:t,innerHtml:e}});const OS=(e,t)=>({dom:{tag:"div",classes:[Xx]},components:[{dom:{tag:e.tag,styles:e.styles},components:[Ml(h_.translate(t))]}]});const ES=e=>({dom:{tag:"div",classes:[Yx]},components:[Ml(zS(e))]});const DS=e=>CS("checkmark",e,[Qx]);const AS=e=>CS("chevron-right",e,[Jx]);const MS=e=>CS("chevron-down",e,[Jx]);const NS=(e,t)=>{const o=e.direction==="vertical"?tz:oz;const n=e.align==="left"?sz:nz;const s=()=>{switch(e.valign){case"top":return rz;case"middle":return az;case"bottom":return cz}};return{dom:{tag:"div",classes:[ez,o,n,s()]},components:t}};const RS=(e,t,o)=>({dom:{tag:"img",classes:t,attributes:{src:e,alt:o.getOr("")}}});const BS=(e,t,o)=>{const n="custom";const s="remove";const r=e.ariaLabel;const a=e.value;const c=e.iconContent.map((e=>x_(e,t.icons,o)));const i=()=>{const e=qx;const o=c.getOr("");const i=r.map((e=>({title:t.translate(e)}))).getOr({});const l={tag:"div",attributes:i,classes:[e]};if(a===n){return{...l,tag:"button",classes:[...l.classes,"tox-swatches__picker-btn"],innerHtml:o}}else if(a===s){return{...l,classes:[...l.classes,"tox-swatch--remove"],innerHtml:o}}else{return{...l,attributes:{...l.attributes,"data-mce-color":a},styles:{"background-color":a}}}};return{dom:i(),optComponents:[]}};const LS=e=>{const t=e.map((e=>({attributes:{title:h_.translate(e)}}))).getOr({});return{tag:"div",classes:[jx,Ux],...t}};const HS=(e,t,o,n)=>{const s={tag:"div",classes:[Kx]};const r=e=>T_(e,s,t.icons,n);const a=()=>N.some({dom:s});const c=o?e.iconContent.map(r).orThunk(a):N.none();const i=e.checkMark;const l=N.from(e.meta).fold((()=>SS),(e=>Ce(e,"style")?S(OS,e.style):SS));const d=e.htmlContent.fold((()=>e.textContent.map(l)),(e=>N.some(TS(e,[Xx]))));const u={dom:LS(e.ariaLabel),optComponents:[c,d,e.shortcutContent.map(ES),i,e.caret]};return u};const IS=(e,t,o,n=N.none())=>{if(e.presets==="color"){return BS(e,t,n)}else{return HS(e,t,o,n)}};const PS=(e,t)=>ze(e,"tooltipWorker").map((e=>[sS.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:e=>({type:"submenu",item:e,overrides:{maxHeightFunction:Bf}}),mode:"follow-highlight",onShow:(t,o)=>{e((e=>{sS.setComponents(t,[Nl({element:Ze.fromDom(e)})])}))}})])).getOr([]);const FS=e=>N_.DOM.encode(e);const VS=(e,t)=>{const o=h_.translate(e);const n=FS(o);if(t.length>0){const e=new RegExp(rS(t),"gi");return n.replace(e,(e=>`<span class="tox-autocompleter-highlight">${e}</span>`))}else{return n}};const jS=(e,t,o,n,s,r,a,c=true)=>{const i=IS({presets:n,textContent:N.none(),htmlContent:o?e.text.map((e=>VS(e,t))):N.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:N.none(),checkMark:N.none(),caret:N.none(),value:e.value},a.providers,c,e.icon);return _S({data:xS(e),enabled:e.enabled,getApi:x({}),onAction:t=>s(e.value,e.meta),onSetup:x(v),triggersSubmenu:false,itemBehaviours:PS(e.meta,a)},i,r,a.providers)};const US=(e,t)=>U(e,(e=>{switch(e.type){case"cardcontainer":return NS(e,US(e.items,t));case"cardimage":return RS(e.src,e.classes,e.alt);case"cardtext":const o=e.name.exists((e=>P(t.cardText.highlightOn,e)));const n=o?N.from(t.cardText.matchText).getOr(""):"";return TS(VS(e.text,n),e.classes)}}));const qS=(e,t,o,n)=>{const s=e=>({isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>{jy.set(e,!t);q(Gm(e.element,"*"),(o=>{e.getSystem().getByDom(o).each((e=>{if(e.hasConfigured(jy)){jy.set(e,!t)}}))}))}});const r={dom:LS(e.label),optComponents:[N.some({dom:{tag:"div",classes:[ez,oz]},components:US(e.items,n)})]};return _S({data:xS({text:N.none(),...e}),enabled:e.enabled,getApi:s,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:false,itemBehaviours:N.from(n.itemBehaviours).getOr([])},r,t,o.providers)};const WS=(e,t,o,n,s,r,a,c=true)=>{const i=e=>({setActive:t=>{Cw.set(e,t)},isActive:()=>Cw.isOn(e),isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t)});const l=IS({presets:o,textContent:t?e.text:N.none(),htmlContent:N.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:N.none(),checkMark:t?N.some(DS(a.icons)):N.none(),caret:N.none(),value:e.value},a,c);return ys(_S({data:xS(e),enabled:e.enabled,getApi:i,onAction:t=>n(e.value),onSetup:e=>{e.setActive(s);return v},triggersSubmenu:false,itemBehaviours:[]},l,r,a),{toggling:{toggleClass:$x,toggleOnExecute:false,selected:e.active}})};const $S=$h(Iw(),Pw());const GS=e=>({value:e});const KS=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;const XS=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i;const YS=e=>KS.test(e)||XS.test(e);const JS=e=>Ie(e,"#").toUpperCase();const QS=e=>YS(e)?N.some({value:JS(e)}):N.none();const ZS=e=>{const t=e.value.replace(KS,((e,t,o,n)=>t+t+o+o+n+n));return{value:t}};const eT=e=>{const t=ZS(e);const o=XS.exec(t.value);return o===null?["FFFFFF","FF","FF","FF"]:o};const tT=e=>{const t=e.toString(16);return(t.length===1?"0"+t:t).toUpperCase()};const oT=e=>{const t=tT(e.red)+tT(e.green)+tT(e.blue);return GS(t)};const nT=Math.min;const sT=Math.max;const rT=Math.round;const aT=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i;const cT=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i;const iT=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n});const lT=e=>{const t=parseInt(e,10);return t.toString()===e&&t>=0&&t<=255};const dT=e=>{let t;let o;let n;const s=(e.hue||0)%360;let r=e.saturation/100;let a=e.value/100;r=sT(0,nT(r,1));a=sT(0,nT(a,1));if(r===0){t=o=n=rT(255*a);return iT(t,o,n,1)}const c=s/60;const i=a*r;const l=i*(1-Math.abs(c%2-1));const d=a-i;switch(Math.floor(c)){case 0:t=i;o=l;n=0;break;case 1:t=l;o=i;n=0;break;case 2:t=0;o=i;n=l;break;case 3:t=0;o=l;n=i;break;case 4:t=l;o=0;n=i;break;case 5:t=i;o=0;n=l;break;default:t=o=n=0}t=rT(255*(t+d));o=rT(255*(o+d));n=rT(255*(n+d));return iT(t,o,n,1)};const uT=e=>{const t=eT(e);const o=parseInt(t[1],16);const n=parseInt(t[2],16);const s=parseInt(t[3],16);return iT(o,n,s,1)};const fT=(e,t,o,n)=>{const s=parseInt(e,10);const r=parseInt(t,10);const a=parseInt(o,10);const c=parseFloat(n);return iT(s,r,a,c)};const mT=e=>{if(e==="transparent"){return N.some(iT(0,0,0,0))}const t=aT.exec(e);if(t!==null){return N.some(fT(t[1],t[2],t[3],"1"))}const o=cT.exec(e);if(o!==null){return N.some(fT(o[1],o[2],o[3],o[4]))}return N.none()};const gT=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`;const pT=iT(255,0,0,1);const hT=e=>e.dispatch("SkinLoaded");const yT=(e,t)=>e.dispatch("SkinLoadError",t);const bT=e=>e.dispatch("ResizeEditor");const vT=(e,t)=>e.dispatch("ResizeContent",t);const kT=(e,t)=>e.dispatch("ScrollContent",t);const wT=(e,t)=>e.dispatch("TextColorChange",t);const _T=(e,t,o)=>({hue:e,saturation:t,value:o});const xT=e=>{let t=0;let o=0;let n=0;const s=e.red/255;const r=e.green/255;const a=e.blue/255;const c=Math.min(s,Math.min(r,a));const i=Math.max(s,Math.max(r,a));if(c===i){n=c;return _T(0,0,n*100)}const l=s===c?r-a:a===c?s-r:a-s;t=s===c?3:a===c?1:5;t=60*(t-l/(i-c));o=(i-c)/i;n=i;return _T(Math.round(t),Math.round(o*100),Math.round(n*100))};const zT=e=>xT(uT(e));const CT=e=>oT(dT(e));const ST=e=>QS(e).orThunk((()=>mT(e).map(oT))).getOrThunk((()=>{const t=document.createElement("canvas");t.height=1;t.width=1;const o=t.getContext("2d");o.clearRect(0,0,t.width,t.height);o.fillStyle="#FFFFFF";o.fillStyle=e;o.fillRect(0,0,1,1);const n=o.getImageData(0,0,1,1).data;const s=n[0];const r=n[1];const a=n[2];const c=n[3];return oT(iT(s,r,a,c))}));var TT=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const OT="tinymce-custom-colors";var ET=(e=10)=>{const t=TT.getItem(OT);const o=c(t)?JSON.parse(t):[];const n=t=>{const o=e-t.length;return o<0?t.slice(0,e):t};const s=n(o);const r=t=>{I(s,t).each(a);s.unshift(t);if(s.length>e){s.pop()}TT.setItem(OT,JSON.stringify(s))};const a=e=>{s.splice(e,1)};const i=()=>s.slice(0);return{add:r,state:i}};const DT=ET(10);const AT=e=>Math.max(5,Math.ceil(Math.sqrt(e)));const MT=e=>{const t=[];for(let o=0;o<e.length;o+=2){t.push({text:e[o+1],value:"#"+ST(e[o]).value,type:"choiceitem"})}return t};const NT=e=>t=>t.options.get(e);const RT=e=>{const t=e.options.register;t("color_map",{processor:e=>{if(b(e,c)){return{value:MT(e),valid:true}}else{return{valid:false,message:"Must be an array of strings."}}},default:["#BFEDD2","Light Green","#FBEEB8","Light Yellow","#F8CAC6","Light Red","#ECCAFA","Light Purple","#C2E0F4","Light Blue","#2DC26B","Green","#F1C40F","Yellow","#E03E2D","Red","#B96AD9","Purple","#3598DB","Blue","#169179","Dark Turquoise","#E67E23","Orange","#BA372A","Dark Red","#843FA1","Dark Purple","#236FA1","Dark Blue","#ECF0F1","Light Gray","#CED4D9","Medium Gray","#95A5A6","Gray","#7E8C8D","Dark Gray","#34495E","Navy Blue","#000000","Black","#ffffff","White"]});t("color_cols",{processor:"number",default:AT(HT(e).length)});t("custom_colors",{processor:"boolean",default:true})};const BT=NT("color_cols");const LT=NT("custom_colors");const HT=NT("color_map");const IT=()=>U(DT.state(),(e=>({type:"choiceitem",text:e,value:e})));const PT=e=>{DT.add(e)};const FT="#000000";const VT=(e,t)=>{let o;e.dom.getParents(e.selection.getStart(),(e=>{let n;if(n=e.style[t==="forecolor"?"color":"background-color"]){o=o?o:n}}));return N.from(o)};const jT=(e,t,o)=>{e.undoManager.transact((()=>{e.focus();e.formatter.apply(t,{value:o});e.nodeChanged()}))};const UT=(e,t)=>{e.undoManager.transact((()=>{e.focus();e.formatter.remove(t,{value:null},null,true);e.nodeChanged()}))};const qT=e=>{e.addCommand("mceApplyTextcolor",((t,o)=>{jT(e,t,o)}));e.addCommand("mceRemoveTextcolor",(t=>{UT(e,t)}))};const WT=e=>{const t="choiceitem";const o={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};const n={type:t,text:"Custom color",icon:"color-picker",value:"custom"};return e?[o,n]:[o]};const $T=(e,t,o,n)=>{if(o==="custom"){const o=QT(e);o((o=>{o.each((o=>{PT(o);e.execCommand("mceApplyTextcolor",t,o);n(o)}))}),FT)}else if(o==="remove"){n("");e.execCommand("mceRemoveTextcolor",t)}else{n(o);e.execCommand("mceApplyTextcolor",t,o)}};const GT=(e,t)=>e.concat(IT().concat(WT(t)));const KT=(e,t)=>o=>{o(GT(e,t))};const XT=(e,t,o)=>{const n=t==="forecolor"?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";e.setIconFill(n,o)};const YT=(e,t,o,n,s)=>{e.ui.registry.addSplitButton(t,{tooltip:n,presets:"color",icon:t==="forecolor"?"text-color":"highlight-bg-color",select:t=>{const n=VT(e,o);return n.bind((e=>mT(e).map((e=>{const o=oT(e).value;return Fe(t.toLowerCase(),o)})))).getOr(false)},columns:BT(e),fetch:KT(HT(e),LT(e)),onAction:t=>{$T(e,o,s.get(),v)},onItemAction:(n,r)=>{$T(e,o,r,(o=>{s.set(o);wT(e,{name:t,color:o})}))},onSetup:o=>{XT(o,t,s.get());const n=e=>{if(e.name===t){XT(o,e.name,e.color)}};e.on("TextColorChange",n);return()=>{e.off("TextColorChange",n)}}})};const JT=(e,t,o,n)=>{e.ui.registry.addNestedMenuItem(t,{text:n,icon:t==="forecolor"?"text-color":"highlight-bg-color",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",onAction:t=>{$T(e,o,t.value,v)}}]})};const QT=e=>(t,o)=>{let n=false;const s=o=>{const s=o.getData();const r=s.colorpicker;if(n){t(N.from(r));o.close()}else{e.windowManager.alert(e.translate(["Invalid hex color code: {0}",r]))}};const r=(e,t)=>{if(t.name==="hex-valid"){n=t.value}};const a={colorpicker:o};e.windowManager.open({title:"Color Picker",size:"normal",body:{type:"panel",items:[{type:"colorpicker",name:"colorpicker",label:"Color"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:true}],initialData:a,onAction:r,onSubmit:s,onClose:v,onCancel:()=>{t(N.none())}})};const ZT=e=>{qT(e);const t=ea(FT);const o=ea(FT);YT(e,"forecolor","forecolor","Text color",t);YT(e,"backcolor","hilitecolor","Background color",o);JT(e,"forecolor","forecolor","Text color");JT(e,"backcolor","hilitecolor","Background color")};const eO=(e,t,o,n,s,r,a,c)=>{const i=wz(t);const l=s!=="color"?"normal":"color";const d=tO(t,o,n,l,r,a,c);return zz(e,i,d,n,s)};const tO=(e,t,o,n,s,r,a)=>Ee(U(e,(c=>{if(c.type==="choiceitem"){return AC(c).fold(_z,(i=>N.some(WS(i,o===1,n,t,r(c.value),s,a,wz(e)))))}else{return N.none()}})));const oO=(e,t)=>{const o=uz(t);if(e===1){return{mode:"menu",moveOnTab:true}}else if(e==="auto"){return{mode:"grid",selector:"."+o.item,initSize:{numColumns:1,numRows:1}}}else{const e=t==="color"?"tox-swatches__row":"tox-collection__group";return{mode:"matrix",rowSelector:"."+e}}};const nO=(e,t)=>{if(e===1){return{mode:"menu",moveOnTab:false,selector:".tox-collection__item"}}else if(e==="auto"){return{mode:"flatgrid",selector:"."+"tox-collection__item",initSize:{numColumns:1,numRows:1}}}else{return{mode:"matrix",selectors:{row:t==="color"?".tox-swatches__row":".tox-collection__group",cell:t==="color"?`.${qx}`:`.${Ux}`}}}};const sO=(e,t)=>{const o=rO(e,t);const n=t.colorinput.getColorCols();const s="color";const r=eO(Zc("menu-value"),o,(t=>{e.onAction({value:t})}),n,s,Vx.CLOSE_ON_EXECUTE,D,t.shared.providers);const a={...r,markers:uz(s),movement:oO(n,s)};return{type:"widget",data:{value:Zc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:true,components:[$S.widget(Yw.sketch(a))]}};const rO=(e,t)=>{const o=e.initData.allowCustomColors&&t.colorinput.hasCustomColors();return e.initData.colors.fold((()=>GT(t.colorinput.getColors(),o)),(e=>e.concat(WT(o))))};const aO=Zc("cell-over");const cO=Zc("cell-execute");const iO=(e,t,o)=>{const n=o=>bc(o,aO,{row:e,col:t});const s=o=>bc(o,cO,{row:e,col:t});const r=(e,t)=>{t.stop();s(e)};return Hl({dom:{tag:"div",attributes:{role:"button",["aria-labelledby"]:o}},behaviours:xu([Jk("insert-table-picker-cell",[Tc(Ma(),aw.focus),Tc(Ya(),s),Tc(Pa(),r),Tc(Qa(),r)]),Cw.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:false}),aw.config({onFocus:n})])})};const lO=(e,t,o)=>{const n=[];for(let s=0;s<t;s++){const t=[];for(let n=0;n<o;n++){t.push(iO(s,n,e))}n.push(t)}return n};const dO=(e,t,o,n,s)=>{for(let r=0;r<n;r++){for(let n=0;n<s;n++){Cw.set(e[r][n],r<=t&&n<=o)}}};const uO=e=>ee(e,(e=>U(e,Il)));const fO=(e,t)=>Ml(`${t}x${e}`);const mO=e=>{const t=10;const o=10;const n=Zc("size-label");const s=lO(n,t,o);const r=fO(0,0);const a=p_({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:n}},components:[r],behaviours:xu([Xk.config({})])});return{type:"widget",data:{value:Zc("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:true,components:[$S.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:uO(s).concat(a.asSpec()),behaviours:xu([Jk("insert-table-picker",[Hc((e=>{Xk.set(a.get(e),[r])})),Nc(aO,((e,n,r)=>{const{row:c,col:i}=r.event;dO(s,c,i,t,o);Xk.set(a.get(e),[fO(c+1,i+1)])})),Nc(cO,((t,o,n)=>{const{row:s,col:r}=n.event;e.onAction({numRows:s+1,numColumns:r+1});yc(t,ec())}))]),Bk.config({initSize:{numRows:t,numColumns:o},mode:"flatgrid",selector:'[role="button"]'})])})]}};const gO={inserttable:mO,colorswatch:sO};const pO=(e,t)=>ze(gO,e.fancytype).map((o=>o(e,t)));const hO=(e,t,o,n=true,s=false)=>{const r=s?MS(o.icons):AS(o.icons);const a=e=>({isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t)});const c=IS({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:N.none(),ariaLabel:e.text,caret:N.some(r),checkMark:N.none(),shortcutContent:e.shortcut},o,n);return _S({data:xS(e),getApi:a,enabled:e.enabled,onAction:v,onSetup:e.onSetup,triggersSubmenu:true,itemBehaviours:[]},c,t,o)};const yO=(e,t,o,n=true)=>{const s=e=>({isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t)});const r=IS({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:N.none(),ariaLabel:e.text,caret:N.none(),checkMark:N.none(),shortcutContent:e.shortcut},o,n);return _S({data:xS(e),getApi:s,enabled:e.enabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:false,itemBehaviours:[]},r,t,o)};const bO=e=>({type:"separator",dom:{tag:"div",classes:[Ux,Gx]},components:e.text.map(Ml).toArray()});const vO=(e,t,o,n=true)=>{const s=e=>({setActive:t=>{Cw.set(e,t)},isActive:()=>Cw.isOn(e),isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t)});const r=IS({iconContent:e.icon,textContent:e.text,htmlContent:N.none(),ariaLabel:e.text,checkMark:N.some(DS(o.icons)),caret:N.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},o,n);return ys(_S({data:xS(e),enabled:e.enabled,getApi:s,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:false,itemBehaviours:[]},r,t,o),{toggling:{toggleClass:$x,toggleOnExecute:false,selected:e.active}})};const kO=jS;const wO=bO;const _O=yO;const xO=hO;const zO=vO;const CO=pO;const SO=qS;var TO;(function(e){e[e["ContentFocus"]=0]="ContentFocus";e[e["UiFocus"]=1]="UiFocus"})(TO||(TO={}));const OO=(e,t,o,n,s)=>{const r=o.shared.providers;const a=e=>!s?e:{...e,shortcut:N.none(),icon:e.text.isSome()?N.none():e.icon};switch(e.type){case"menuitem":return IC(e).fold(_z,(e=>N.some(_O(a(e),t,r,n))));case"nestedmenuitem":return FC(e).fold(_z,(e=>N.some(xO(a(e),t,r,n,s))));case"togglemenuitem":return jC(e).fold(_z,(e=>N.some(zO(a(e),t,r,n))));case"separator":return tC(e).fold(_z,(e=>N.some(wO(e))));case"fancymenuitem":return LC(e).fold(_z,(e=>CO(a(e),o)));default:{console.error("Unknown item in general menu",e);return N.none()}}};const EO=(e,t,o,n,s,r,a)=>{const c=n===1;const i=!c||wz(e);return Ee(U(e,(e=>{switch(e.type){case"separator":return nC(e).fold(_z,(e=>N.some(wO(e))));case"cardmenuitem":return EC(e).fold(_z,(e=>N.some(SO({...e,onAction:t=>{e.onAction(t);o(e.value,e.meta)}},s,r,{itemBehaviours:PS(e.meta,r),cardText:{matchText:t,highlightOn:a}}))));case"autocompleteitem":default:return sC(e).fold(_z,(e=>N.some(kO(e,t,c,"normal",o,s,r,i))))}})))};const DO=(e,t,o,n,s)=>{const r=wz(t);const a=Ee(U(t,(e=>{const t=e=>s?!Ce(e,"text"):r;const a=e=>OO(e,o,n,t(e),s);if(e.type==="nestedmenuitem"&&e.getSubmenuItems().length<=0){return a({...e,enabled:false})}else{return a(e)}})));const c=s?xz:zz;return c(e,r,a,1,"normal")};const AO=e=>i_.singleData(e.value,e);const MO=(e,t,o,n)=>{const s=o===TO.ContentFocus?Ab():Db();const r=oO(t,n);const a=uz(n);return{dom:e.dom,components:e.components,items:e.items,value:e.value,markers:{selectedItem:a.selectedItem,item:a.item},movement:r,fakeFocus:o===TO.ContentFocus,focusManager:s,menuBehaviours:$C.unnamedEvents(t!=="auto"?[]:[Hc(((e,t)=>{UC(e,4,a.item).each((({numColumns:t,numRows:o})=>{Bk.setGridSize(e,o,t)}))}))])}};const NO=(e,t)=>Lx(Ze.fromDom(t.startContainer)).map((t=>{const o=e.createRng();o.selectNode(t.dom);return o}));const RO=(e,t)=>{const o=ea(false);const n=ea(false);const s=Hl(u_.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:xu([Jk("dismissAutocompleter",[Tc(lc(),(()=>i()))])]),lazySink:t.getSink}));const r=()=>u_.isOpen(s);const a=n.get;const c=()=>{if(r()){u_.hide(s)}};const i=()=>e.execCommand("mceAutocompleterClose");const l=n=>{const s=ue(n,(e=>N.from(e.columns))).getOr(1);return ee(n,(n=>{const r=n.items;return EO(r,n.matchText,((t,s)=>{const r=e.selection.getRng();NO(e.dom,r).each((r=>{const a={hide:()=>i(),reload:t=>{c();e.execCommand("mceAutocompleterReload",false,{fetchOptions:t})}};o.set(true);n.onAction(a,r,t,s);o.set(false)}))}),s,Vx.BUBBLE_TO_SANDBOX,t,n.highlightOn)}))};const d=(t,o)=>{Hx(Ze.fromDom(e.getBody())).each((n=>{const r=ue(t,(e=>N.from(e.columns))).getOr(1);u_.showAt(s,Yw.sketch(MO(zz("autocompleter-value",true,o,r,"normal"),r,TO.ContentFocus,"normal")),{anchor:{type:"node",root:Ze.fromDom(e.getBody()),node:N.from(n)}});u_.getContent(s).each(ib.highlightFirst)}))};const u=e=>{const t=l(e);if(t.length>0){d(e,t)}else{c()}};e.on("AutocompleterStart",(({lookupData:e})=>{n.set(true);o.set(false);u(e)}));e.on("AutocompleterUpdate",(({lookupData:e})=>u(e)));e.on("AutocompleterEnd",(()=>{c();n.set(false);o.set(false)}));const f={cancelIfNecessary:i,isMenuOpen:r,isActive:a,isProcessingAction:o.get,getView:()=>u_.getContent(s)};Px.setup(f,e)};const BO={register:RO};const LO=(e,t,o)=>Kl(e,t,o).isSome();const HO=(e,t)=>{let o=null;const n=(...n)=>{o=setTimeout((()=>{e.apply(null,n);o=null}),t)};const s=()=>{if(o!==null){clearTimeout(o);o=null}};return{cancel:s,schedule:n}};const IO=5;const PO=400;const FO=e=>{const t=e.raw;if(t.touches===undefined||t.touches.length!==1){return N.none()}return N.some(t.touches[0])};const VO=(e,t)=>{const o=Math.abs(e.clientX-t.x);const n=Math.abs(e.clientY-t.y);return o>IO||n>IO};const jO=e=>{const t=ff();const o=ea(false);const n=HO((t=>{e.triggerEvent(Za(),t);o.set(true)}),PO);const s=e=>{FO(e).each((s=>{n.cancel();const r={x:s.clientX,y:s.clientY,target:e.target};n.schedule(e);o.set(false);t.set(r)}));return N.none()};const r=e=>{n.cancel();FO(e).each((e=>{t.on((o=>{if(VO(e,o)){t.clear()}}))}));return N.none()};const a=s=>{n.cancel();const r=e=>ht(e.target,s.target);return t.get().filter(r).map((t=>{if(o.get()){s.prevent();return false}else{return e.triggerEvent(Qa(),s)}}))};const c=la([{key:za(),value:s},{key:Ca(),value:r},{key:Sa(),value:a}]);const i=(e,t)=>ze(c,t).bind((t=>t(e)));return{fireIfReady:i}};const UO=e=>{const t=e.raw;return t.which===lb[0]&&!P(["input","textarea"],st(e.target))&&!LO(e.target,'[contenteditable="true"]')};const qO=(e,t)=>{const o={stopBackspace:true,...t};const n=["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"];const s=jO(o);const r=U(n.concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(t=>gf(e,t,(e=>{s.fireIfReady(e,t).each((t=>{if(t){e.kill()}}));const n=o.triggerEvent(t,e);if(n){e.kill()}}))));const a=ff();const c=gf(e,"paste",(e=>{s.fireIfReady(e,"paste").each((t=>{if(t){e.kill()}}));const t=o.triggerEvent("paste",e);if(t){e.kill()}a.set(setTimeout((()=>{o.triggerEvent(Ka(),e)}),0))}));const i=gf(e,"keydown",(e=>{const t=o.triggerEvent("keydown",e);if(t){e.kill()}else if(o.stopBackspace&&UO(e)){e.prevent()}}));const l=gf(e,"focusin",(e=>{const t=o.triggerEvent("focusin",e);if(t){e.kill()}}));const d=ff();const u=gf(e,"focusout",(e=>{const t=o.triggerEvent("focusout",e);if(t){e.kill()}d.set(setTimeout((()=>{o.triggerEvent(Ga(),e)}),0))}));const f=()=>{q(r,(e=>{e.unbind()}));i.unbind();l.unbind();u.unbind();c.unbind();a.on(clearTimeout);d.on(clearTimeout)};return{unbind:f}};const WO=(e,t)=>{const o=ze(e,"target").getOr(t);return ea(o)};const $O=(e,t)=>{const o=ea(false);const n=ea(false);const s=()=>{o.set(true)};const r=()=>{n.set(true)};return{stop:s,cut:r,isStopped:o.get,isCut:n.get,event:e,setSource:t.set,getSource:t.get}};const GO=e=>{const t=ea(false);const o=()=>{t.set(true)};return{stop:o,cut:v,isStopped:t.get,isCut:D,event:e,setSource:O("Cannot set source of a broadcasted event"),getSource:O("Cannot get source of a broadcasted event")}};const KO=oa.generate([{stopped:[]},{resume:["element"]},{complete:[]}]);const XO=(e,t,o,n,s,r)=>{const a=e(t,n);const c=$O(o,s);return a.fold((()=>{r.logEventNoHandlers(t,n);return KO.complete()}),(e=>{const o=e.descHandler;const n=Ni(o);n(c);if(c.isStopped()){r.logEventStopped(t,e.element,o.purpose);return KO.stopped()}else if(c.isCut()){r.logEventCut(t,e.element,o.purpose);return KO.complete()}else{return _t(e.element).fold((()=>{r.logNoParent(t,e.element,o.purpose);return KO.complete()}),(n=>{r.logEventResponse(t,e.element,o.purpose);return KO.resume(n)}))}}))};const YO=(e,t,o,n,s,r)=>XO(e,t,o,n,s,r).fold(A,(n=>YO(e,t,o,n,s,r)),D);const JO=(e,t,o,n,s)=>{const r=WO(o,n);return XO(e,t,o,n,r,s)};const QO=(e,t,o)=>{const n=GO(t);q(e,(e=>{const t=e.descHandler;const o=Ni(t);o(n)}));return n.isStopped()};const ZO=(e,t,o,n)=>eE(e,t,o,o.target,n);const eE=(e,t,o,n,s)=>{const r=WO(o,n);return YO(e,t,o,n,r,s)};const tE=(e,t)=>({element:e,descHandler:t});const oE=(e,t)=>({id:e,descHandler:t});const nE=()=>{const e={};const t=(t,o,n)=>{ge(n,((n,s)=>{const r=e[s]!==undefined?e[s]:{};r[o]=Mi(n,t);e[s]=r}))};const o=(e,t)=>ai(t).bind((t=>ze(e,t))).map((e=>tE(t,e)));const n=t=>ze(e,t).map((e=>we(e,((e,t)=>oE(t,e))))).getOr([]);const s=(t,n,s)=>ze(e,n).bind((e=>pa(s,(t=>o(e,t)),t)));const r=t=>{ge(e,((e,o)=>{if(Ce(e,t)){delete e[t]}}))};return{registerId:t,unregisterId:r,filterByType:n,find:s}};const sE=()=>{const e=nE();const t={};const o=e=>{const t=e.element;return ai(t).getOrThunk((()=>si("uid-",e.element)))};const n=(e,o)=>{const n=t[o];if(n===e){r(e)}else{throw new Error('The tagId "'+o+'" is already used by: '+Kc(n.element)+"\nCannot use it for: "+Kc(e.element)+"\n"+"The conflicting element is"+(Vt(n.element)?" ":" not ")+"already in the DOM")}};const s=s=>{const r=o(s);if(Se(t,r)){n(s,r)}const a=[s];e.registerId(a,r,s.events);t[r]=s};const r=o=>{ai(o.element).each((o=>{delete t[o];e.unregisterId(o)}))};const a=t=>e.filterByType(t);const c=(t,o,n)=>e.find(t,o,n);const i=e=>ze(t,e);return{find:c,filter:a,register:s,unregister:r,getById:i}};const rE=e=>{const{attributes:t,...o}=e.dom;return{uid:e.uid,dom:{tag:"div",attributes:{role:"presentation",...t},...o},components:e.components,behaviours:ch(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}};const aE=yy({name:"Container",factory:rE,configFields:[qr("components",[]),ah("containerBehaviours",[]),qr("events",{}),qr("domModification",{}),qr("eventOrder",{})]});const cE=e=>{const t=t=>_t(e.element).fold(A,(e=>ht(t,e)));const o=sE();const n=(e,n)=>o.find(t,e,n);const s=qO(e.element,{triggerEvent:(e,t)=>id(e,t.target,(o=>ZO(n,e,t,o)))});const r={debugInfo:x("real"),triggerEvent:(e,t,o)=>{id(e,t,(s=>eE(n,e,o,t,s)))},triggerFocus:(e,t)=>{ai(e).fold((()=>{Mu(e)}),(o=>{id($a(),e,(o=>{JO(n,$a(),{originator:t,kill:v,prevent:v,target:e},e,o);return false}))}))},triggerEscape:(e,t)=>{r.triggerEvent("keydown",e.element,t.event)},getByUid:e=>p(e),getByDom:e=>h(e),build:Hl,buildOrPatch:Ll,addToGui:e=>{i(e)},removeFromGui:e=>{l(e)},addToWorld:e=>{a(e)},removeFromWorld:e=>{c(e)},broadcast:e=>{f(e)},broadcastOn:(e,t)=>{m(e,t)},broadcastEvent:(e,t)=>{g(e,t)},isConnected:A};const a=e=>{e.connect(r);if(!it(e.element)){o.register(e);q(e.components(),a);r.triggerEvent(oc(),e.element,{target:e.element})}};const c=e=>{if(!it(e.element)){q(e.components(),c);o.unregister(e)}e.disconnect()};const i=t=>{Xg(e,t)};const l=e=>{Qg(e)};const d=()=>{s.unbind();Dn(e.element)};const u=e=>{const t=o.filter(Xa());q(t,(t=>{const o=t.descHandler;const n=Ni(o);n(e)}))};const f=e=>{u({universal:true,data:e})};const m=(e,t)=>{u({universal:false,channels:e,data:t})};const g=(e,t)=>{const n=o.filter(e);return QO(n,t)};const p=e=>o.getById(e).fold((()=>Qn.error(new Error('Could not find component with uid: "'+e+'" in system.'))),Qn.value);const h=e=>{const t=ai(e).getOr("not found");return p(t)};a(e);return{root:e,element:e.element,destroy:d,add:i,remove:l,getByUid:p,getByDom:h,addToWorld:a,removeFromWorld:c,broadcast:f,broadcastOn:m,broadcastEvent:g}};const iE=(e,t)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:U(e.items,t.interpreter)});const lE=x([qr("prefix","form-field"),ah("fieldBehaviours",[xy,rh])]);const dE=x([Fh({schema:[zr("dom")],name:"label"}),Fh({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[zr("text")],name:"aria-descriptor"}),Ih({factory:{sketch:e=>{const t=ca(e,["factory"]);return e.factory.sketch(t)}},schema:[zr("factory")],name:"field"})]);const uE=(e,t,o,n)=>{const s=ih(e.fieldBehaviours,[xy.config({find:t=>Zh(t,e,"field")}),rh.config({store:{mode:"manual",getValue:e=>xy.getCurrent(e).bind(rh.getValue),setValue:(e,t)=>{xy.getCurrent(e).each((e=>{rh.setValue(e,t)}))}}})]);const r=xc([Hc(((t,o)=>{const n=ty(t,e,["label","field","aria-descriptor"]);n.field().each((t=>{const o=Zc(e.prefix);n.label().each((e=>{Wt(e.element,"for",o);Wt(t.element,"id",o)}));n["aria-descriptor"]().each((o=>{const n=Zc(e.prefix);Wt(o.element,"id",n);Wt(t.element,"aria-describedby",n)}))}))}))]);const a={getField:t=>Zh(t,e,"field"),getLabel:t=>Zh(t,e,"label")};return{uid:e.uid,dom:e.dom,components:t,behaviours:s,events:r,apis:a}};const fE=by({name:"FormField",configFields:lE(),partFields:dE(),factory:uE,apis:{getField:(e,t)=>e.getField(t),getLabel:(e,t)=>e.getLabel(t)}});const mE=(e,t)=>Si({attributes:la([{key:t.tabAttr,value:"true"}])});var gE=Object.freeze({__proto__:null,exhibit:mE});var pE=[qr("tabAttr","data-alloy-tabstop")];const hE=Cu({fields:pE,name:"tabstopping",active:gE});var yE=tinymce.util.Tools.resolve("tinymce.html.Entities");const bE=(e,t,o,n)=>{const s=kE(e,t,o,n);return fE.sketch(s)};const vE=(e,t)=>bE(e,t,[],[]);const kE=(e,t,o,n)=>({dom:_E(o),components:e.toArray().concat([t]),fieldBehaviours:xu(n)});const wE=()=>_E([]);const _E=e=>({tag:"div",classes:["tox-form__group"].concat(e)});const xE=(e,t)=>fE.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ml(t.translate(e))]});const zE=Zc("form-component-change");const CE=Zc("form-close");const SE=Zc("form-cancel");const TE=Zc("form-action");const OE=Zc("form-submit");const EE=Zc("form-block");const DE=Zc("form-unblock");const AE=Zc("form-tabchange");const ME=Zc("form-resize");const NE=(e,t,o)=>{const n=e.label.map((e=>xE(e,t)));const s=e=>(t,o)=>{Kl(o.event.target,"[data-collection-item-value]").each((n=>{e(t,o,n,Gt(n,"data-collection-item-value"))}))};const r=(o,n)=>{const s=U(n,(o=>{const n=h_.translate(o.text);const s=e.columns===1?`<div class="tox-collection__item-label">${n}</div>`:"";const r=`<div class="tox-collection__item-icon">${o.icon}</div>`;const a={_:" "," - ":" ","-":" "};const c=n.replace(/\_| \- |\-/g,(e=>a[e]));const i=t.isDisabled()?" tox-collection__item--state-disabled":"";return`<div class="tox-collection__item${i}" tabindex="-1" data-collection-item-value="${yE.encodeAllRaw(o.value)}" title="${c}" aria-label="${c}">${r}${s}</div>`}));const r=e.columns!=="auto"&&e.columns>1?j(s,e.columns):[s];const a=U(r,(e=>`<div class="tox-collection__group">${e.join("")}</div>`));Uc(o.element,a.join(""))};const a=s(((o,n,s,r)=>{n.stop();if(!t.isDisabled()){bc(o,TE,{name:e.name,value:r})}}));const c=[Tc(Ma(),s(((e,t,o)=>{Mu(o)}))),Tc(Pa(),a),Tc(Qa(),a),Tc(Na(),s(((e,t,o)=>{Gl(e.element,"."+Zx).each((e=>{nl(e,Zx)}));tl(o,Zx)}))),Tc(Ra(),s((e=>{Gl(e.element,"."+Zx).each((e=>{nl(e,Zx)}))}))),Fc(s(((t,o,n,s)=>{bc(t,TE,{name:e.name,value:s})})))];const i=(e,t)=>U(Gm(e.element,".tox-collection__item"),t);const l=fE.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(e.columns!==1?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:z},behaviours:xu([jy.config({disabled:t.isDisabled,onDisabled:e=>{i(e,(e=>{tl(e,"tox-collection__item--state-disabled");Wt(e,"aria-disabled",true)}))},onEnabled:e=>{i(e,(e=>{nl(e,"tox-collection__item--state-disabled");Yt(e,"aria-disabled")}))}}),dS(),Xk.config({}),rh.config({store:{mode:"memory",initialValue:o.getOr([])},onSetValue:(t,o)=>{r(t,o);if(e.columns==="auto"){UC(t,5,"tox-collection__item").each((({numRows:e,numColumns:o})=>{Bk.setGridSize(t,e,o)}))}yc(t,ME)}}),hE.config({}),Bk.config(nO(e.columns,"normal")),Jk("collection-events",c)]),eventOrder:{[Ya()]:["disabling","alloy.base.behaviour","collection-events"]}});const d=["tox-form__group--collection"];return bE(n,l,d,[])};const RE=x([Br("data"),qr("inputAttributes",{}),qr("inputStyles",{}),qr("tag","input"),qr("inputClasses",[]),bd("onSetValue"),qr("styles",{}),qr("eventOrder",{}),ah("inputBehaviours",[rh,aw]),qr("selectOnFocus",true)]);const BE=e=>xu([aw.config({onFocus:!e.selectOnFocus?v:e=>{const t=e.element;const o=dl(t);t.dom.setSelectionRange(0,o.length)}})]);const LE=e=>({...BE(e),...ih(e.inputBehaviours,[rh.config({store:{mode:"manual",...e.data.map((e=>({initialValue:e}))).getOr({}),getValue:e=>dl(e.element),setValue:(e,t)=>{const o=dl(e.element);if(o!==t){ul(e.element,t)}}},onSetValue:e.onSetValue})])});const HE=e=>({tag:e.tag,attributes:{type:"text",...e.inputAttributes},styles:e.inputStyles,classes:e.inputClasses});const IE=(e,t)=>({uid:e.uid,dom:HE(e),components:[],behaviours:LE(e),eventOrder:e.eventOrder});const PE=yy({name:"Input",configFields:RE(),factory:IE});const FE=e=>{let t=N.none();let o=[];const n=e=>FE((t=>{s((o=>{t(e(o))}))}));const s=e=>{if(a()){i(e)}else{o.push(e)}};const r=e=>{if(!a()){t=N.some(e);c(o);o=[]}};const a=()=>t.isSome();const c=e=>{q(e,i)};const i=e=>{t.each((t=>{setTimeout((()=>{e(t)}),0)}))};e(r);return{get:s,map:n,isReady:a}};const VE=e=>FE((t=>{t(e)}));const jE={nu:FE,pure:VE};const UE=e=>{setTimeout((()=>{throw e}),0)};const qE=e=>{const t=t=>{e().then(t,UE)};const o=t=>qE((()=>e().then(t)));const n=t=>qE((()=>e().then((e=>t(e).toPromise()))));const s=t=>qE((()=>e().then((()=>t.toPromise()))));const r=()=>jE.nu(t);const a=()=>{let t=null;return qE((()=>{if(t===null){t=e()}return t}))};const c=e;return{map:o,bind:n,anonBind:s,toLazy:r,toCached:a,toPromise:c,get:t}};const WE=e=>qE((()=>new Promise(e)));const $E=e=>qE((()=>Promise.resolve(e)));const GE={nu:WE,pure:$E};const KE=["input","textarea"];const XE=e=>{const t=st(e);return P(KE,t)};const YE=(e,t)=>{const o=t.getRoot(e).getOr(e.element);nl(o,t.invalidClass);t.notify.each((t=>{if(XE(e.element)){Wt(e.element,"aria-invalid",false)}t.getContainer(e).each((e=>{Uc(e,t.validHtml)}));t.onValid(e)}))};const JE=(e,t,o,n)=>{const s=t.getRoot(e).getOr(e.element);tl(s,t.invalidClass);t.notify.each((t=>{if(XE(e.element)){Wt(e.element,"aria-invalid",true)}t.getContainer(e).each((e=>{Uc(e,n)}));t.onInvalid(e,n)}))};const QE=(e,t,o)=>t.validator.fold((()=>GE.pure(Qn.value(true))),(t=>t.validate(e)));const ZE=(e,t,o)=>{t.notify.each((t=>{t.onValidate(e)}));return QE(e,t).map((n=>{if(e.getSystem().isConnected()){return n.fold((n=>{JE(e,t,o,n);return Qn.error(n)}),(o=>{YE(e,t);return Qn.value(o)}))}else{return Qn.error("No longer in system")}}))};const eD=(e,t)=>{const o=t.getRoot(e).getOr(e.element);return sl(o,t.invalidClass)};var tD=Object.freeze({__proto__:null,markValid:YE,markInvalid:JE,query:QE,run:ZE,isInvalid:eD});const oD=(e,t)=>e.validator.map((o=>xc([Tc(o.onEvent,(o=>{ZE(o,e,t).get(z)}))].concat(o.validateOnLoad?[Hc((o=>{ZE(o,e,t).get(v)}))]:[])))).getOr({});var nD=Object.freeze({__proto__:null,events:oD});var sD=[zr("invalidClass"),qr("getRoot",N.none),jr("notify",[qr("aria","alert"),qr("getContainer",N.none),qr("validHtml",""),bd("onValid"),bd("onInvalid"),bd("onValidate")]),jr("validator",[zr("validate"),qr("onEvent","input"),qr("validateOnLoad",true)])];const rD=Cu({fields:sD,name:"invalidating",active:nD,apis:tD,extra:{validation:e=>t=>{const o=rh.getValue(t);return GE.pure(e(o))}}});const aD=(e,t,o,n)=>o.getOrCreate(e,t,n);var cD=Object.freeze({__proto__:null,getCoupled:aD});var iD=[Cr("others",mr(Qn.value,tr()))];const lD=()=>{const e={};const t=(t,o,n)=>{const s=fe(o.others);if(!s){throw new Error("Cannot find coupled component: "+n+". Known coupled components: "+JSON.stringify(s,null,2))}else{return ze(e,n).getOrThunk((()=>{const s=ze(o.others,n).getOrDie("No information found for coupled component: "+n);const r=s(t);const a=t.getSystem().build(r);e[n]=a;return a}))}};const o=x({});return wi({readState:o,getOrCreate:t})};var dD=Object.freeze({__proto__:null,init:lD});const uD=Cu({fields:iD,name:"coupling",apis:cD,state:dD});const fD=x("sink");const mD=x(Fh({name:fD(),overrides:x({dom:{tag:"div"},behaviours:xu([Pg.config({useFixed:A})]),events:xc([Rc(Ba()),Rc(Oa()),Rc(Pa())])})}));var gD;(function(e){e[e["HighlightFirst"]=0]="HighlightFirst";e[e["HighlightNone"]=1]="HighlightNone"})(gD||(gD={}));const pD=(e,t)=>{const o=e.getHotspot(t).getOr(t);const n="hotspot";const s=e.getAnchorOverrides();return e.layouts.fold((()=>({type:n,hotspot:o,overrides:s})),(e=>({type:n,hotspot:o,overrides:s,layouts:e})))};const hD=(e,t,o)=>{const n=e.fetch;return n(o).map(t)};const yD=(e,t,o,n,s,r,a)=>{const c=hD(e,t,n);const i=_D(n,e);return c.map((e=>e.bind((e=>N.from(i_.sketch({...r.menu(),uid:ci(""),data:e,highlightImmediately:a===gD.HighlightFirst,onOpenMenu:(e,t)=>{const n=i().getOrDie();Pg.position(n,t,{anchor:o});xp.decloak(s)},onOpenSubmenu:(e,t,o)=>{const n=i().getOrDie();Pg.position(n,o,{anchor:{type:"submenu",item:t}});xp.decloak(s)},onRepositionMenu:(e,t,n)=>{const s=i().getOrDie();Pg.position(s,t,{anchor:o});q(n,(e=>{Pg.position(s,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem}})}))},onEscape:()=>{aw.focus(n);xp.close(s);return N.some(true)}}))))))};const bD=(e,t,o,n,s,r,a)=>{const c=pD(e,o);const i=yD(e,t,c,o,n,s,a);return i.map((e=>{e.fold((()=>{if(xp.isOpen(n)){xp.close(n)}}),(e=>{xp.cloak(n);xp.open(n,e);r(n)}));return n}))};const vD=(e,t,o,n,s,r,a)=>{xp.close(n);return GE.pure(n)};const kD=(e,t,o,n,s,r)=>{const a=uD.getCoupled(o,"sandbox");const c=xp.isOpen(a);const i=c?vD:bD;return i(e,t,o,a,n,s,r)};const wD=(e,t,o)=>{const n=xy.getCurrent(t).getOr(t);const s=zo(e.element);if(o){eo(n.element,"min-width",s+"px")}else{xo(n.element,s)}};const _D=(e,t)=>e.getSystem().getByUid(t.uid+"-"+fD()).map((e=>()=>Qn.value(e))).getOrThunk((()=>t.lazySink.fold((()=>()=>Qn.error(new Error("No internal sink is specified, nor could an external sink be found"))),(t=>()=>t(e)))));const xD=e=>{xp.getState(e).each((e=>{i_.repositionMenus(e)}))};const zD=(e,t,o)=>{const n=Jl();const s=(s,r)=>{const a=pD(e,t);n.link(t.element);if(e.matchWidth){wD(a.hotspot,r,e.useMinWidth)}e.onOpen(a,s,r);if(o!==undefined&&o.onOpen!==undefined){o.onOpen(s,r)}};const r=(e,s)=>{n.unlink(t.element);if(o!==undefined&&o.onClose!==undefined){o.onClose(e,s)}};const a=_D(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:n.id,role:"listbox"}},behaviours:lh.augment(e.sandboxBehaviours,[rh.config({store:{mode:"memory",initialValue:t}}),xp.config({onOpen:s,onClose:r,isPartOf:(e,o,n)=>Zl(o,n)||Zl(t,n),getAttachPoint:()=>a().getOrDie()}),xy.config({find:e=>xp.getState(e).bind((e=>xy.getCurrent(e)))}),Eu.config({channels:{...Op({isExtraPart:D}),...Dp({doReposition:xD})}})])}};const CD=e=>{const t=uD.getCoupled(e,"sandbox");xD(t)};const SD=()=>[qr("sandboxClasses",[]),lh.field("sandboxBehaviours",[xy,Eu,xp,rh])];const TD=x([zr("dom"),zr("fetch"),bd("onOpen"),vd("onExecute"),qr("getHotspot",N.some),qr("getAnchorOverrides",x({})),Kf(),ah("dropdownBehaviours",[Cw,uD,Bk,aw]),zr("toggleClass"),qr("eventOrder",{}),Br("lazySink"),qr("matchWidth",false),qr("useMinWidth",false),Br("role")].concat(SD()));const OD=x([Ph({schema:[pd()],name:"menu",defaults:e=>({onExecute:e.onExecute})}),mD()]);const ED=(e,t,o,n)=>{const s=t=>ze(e.dom,"attributes").bind((e=>ze(e,t)));const r=e=>{xp.getState(e).each((e=>{i_.highlightPrimary(e)}))};const a=t=>{const o=r;kD(e,z,t,n,o,gD.HighlightFirst).get(v)};const c={expand:t=>{if(!Cw.isOn(t)){kD(e,z,t,n,v,gD.HighlightNone).get(v)}},open:t=>{if(!Cw.isOn(t)){kD(e,z,t,n,v,gD.HighlightFirst).get(v)}},isOpen:Cw.isOn,close:t=>{if(Cw.isOn(t)){kD(e,z,t,n,v,gD.HighlightFirst).get(v)}},repositionMenus:e=>{if(Cw.isOn(e)){CD(e)}}};const i=(e,t)=>{vc(e);return N.some(true)};return{uid:e.uid,dom:e.dom,components:t,behaviours:ih(e.dropdownBehaviours,[Cw.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),uD.config({others:{sandbox:t=>zD(e,t,{onOpen:()=>Cw.on(t),onClose:()=>Cw.off(t)})}}),Bk.config({mode:"special",onSpace:i,onEnter:i,onDown:(e,t)=>{if(DD.isOpen(e)){const t=uD.getCoupled(e,"sandbox");r(t)}else{DD.open(e)}return N.some(true)},onEscape:(e,t)=>{if(DD.isOpen(e)){DD.close(e);return N.some(true)}else{return N.none()}}}),aw.config({})]),events:Tw(N.some(a)),eventOrder:{...e.eventOrder,[Ya()]:["disabling","toggling","alloy.base.behaviour"]},apis:c,domModification:{attributes:{"aria-haspopup":"true",...e.role.fold((()=>({})),(e=>({role:e}))),...e.dom.tag==="button"?{type:s("type").getOr("button")}:{}}}}};const DD=by({name:"Dropdown",configFields:TD(),partFields:OD(),factory:ED,apis:{open:(e,t)=>e.open(t),expand:(e,t)=>e.expand(t),close:(e,t)=>e.close(t),isOpen:(e,t)=>e.isOpen(t),repositionMenus:(e,t)=>e.repositionMenus(t)}});const AD=()=>Si({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}});const MD=()=>xc([zc(Ua(),A)]);var ND=Object.freeze({__proto__:null,events:MD,exhibit:AD});const RD=Cu({fields:[],name:"unselecting",active:ND});const BD=(e,t)=>DD.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:xu([pS.button(t.providers.isDisabled),dS(),RD.config({}),hE.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:t.getSink,fetch:o=>GE.nu((t=>e.fetch(t))).map((n=>N.from(AO(ys(eO(Zc("menu-value"),n,(t=>{e.onItemAction(o,t)}),e.columns,e.presets,Vx.CLOSE_ON_EXECUTE,D,t.providers),{movement:oO(e.columns,e.presets)}))))),parts:{menu:gz(false,1,e.presets)}});const LD=Zc("color-input-change");const HD=Zc("color-swatch-change");const ID=Zc("color-picker-cancel");const PD=(e,t,o,n)=>{const s=fE.parts.field({factory:PE,inputClasses:["tox-textfield"],data:n,onSetValue:e=>rD.run(e).get(v),inputBehaviours:xu([jy.config({disabled:t.providers.isDisabled}),dS(),hE.config({}),rD.config({invalidClass:"tox-textbox-field-invalid",getRoot:e=>xt(e.element),notify:{onValid:e=>{const t=rh.getValue(e);bc(e,LD,{color:t})}},validator:{validateOnLoad:false,validate:e=>{const t=rh.getValue(e);if(t.length===0){return GE.pure(Qn.value(true))}else{const e=Ze.fromTag("span");eo(e,"background-color",t);const o=ro(e,"background-color").fold((()=>Qn.error("blah")),(e=>Qn.value(t)));return GE.pure(o)}}}})]),selectOnFocus:false});const r=e.label.map((e=>xE(e,t.providers)));const a=(e,t)=>{bc(e,HD,{value:t})};const c=(e,t)=>{i.getOpt(e).each((e=>{if(t==="custom"){o.colorPicker((t=>{t.fold((()=>yc(e,ID)),(t=>{a(e,t);PT(t)}))}),"#ffffff")}else if(t==="remove"){a(e,"")}else{a(e,t)}}))};const i=p_(BD({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:()=>[Zd,Qd,nu],onLtr:()=>[Qd,Zd,nu]},components:[],fetch:KT(o.getColors(),o.hasCustomColors()),columns:o.getColorCols(),presets:"color",onItemAction:c},t));return fE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:r.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[s,i.asSpec()]}]),fieldBehaviours:xu([Jk("form-field-events",[Tc(LD,((t,o)=>{i.getOpt(t).each((e=>{eo(e.element,"background-color",o.event.color)}));bc(t,zE,{name:e.name})})),Tc(HD,((e,t)=>{fE.getField(e).each((o=>{rh.setValue(o,t.event.value);xy.getCurrent(e).each(aw.focus)}))})),Tc(ID,((e,t)=>{fE.getField(e).each((t=>{xy.getCurrent(e).each(aw.focus)}))}))])])})};const FD=Fh({schema:[zr("dom")],name:"label"});const VD=e=>Fh({name:""+e+"-edge",overrides:t=>{const o=t.model.manager.edgeActions[e];return o.fold((()=>({})),(e=>({events:xc([Oc(za(),((t,o,n)=>e(t,n)),[t]),Oc(Oa(),((t,o,n)=>e(t,n)),[t]),Oc(Ea(),((t,o,n)=>{if(n.mouseIsDown.get()){e(t,n)}}),[t])])})))}});const jD=VD("top-left");const UD=VD("top");const qD=VD("top-right");const WD=VD("right");const $D=VD("bottom-right");const GD=VD("bottom");const KD=VD("bottom-left");const XD=VD("left");const YD=Ih({name:"thumb",defaults:x({dom:{styles:{position:"absolute"}}}),overrides:e=>({events:xc([Mc(za(),e,"spectrum"),Mc(Ca(),e,"spectrum"),Mc(Sa(),e,"spectrum"),Mc(Oa(),e,"spectrum"),Mc(Ea(),e,"spectrum"),Mc(Aa(),e,"spectrum")])})});const JD=Ih({schema:[_r("mouseIsDown",(()=>ea(false)))],name:"spectrum",overrides:e=>{const t=e.model;const o=t.manager;const n=(t,n)=>o.getValueFromEvent(n).map((n=>o.setValueFrom(t,e,n)));return{behaviours:xu([Bk.config({mode:"special",onLeft:t=>o.onLeft(t,e),onRight:t=>o.onRight(t,e),onUp:t=>o.onUp(t,e),onDown:t=>o.onDown(t,e)}),aw.config({})]),events:xc([Tc(za(),n),Tc(Ca(),n),Tc(Oa(),n),Tc(Ea(),((t,o)=>{if(e.mouseIsDown.get()){n(t,o)}}))])}}});var QD=[FD,XD,WD,UD,GD,jD,qD,KD,$D,YD,JD];const ZD="slider.change.value";const eA=x(ZD);const tA=e=>e.type.indexOf("touch")!==-1;const oA=e=>{const t=e.event.raw;if(tA(t)){const e=t;return e.touches!==undefined&&e.touches.length===1?N.some(e.touches[0]).map((e=>yo(e.clientX,e.clientY))):N.none()}else{const e=t;return e.clientX!==undefined?N.some(e).map((e=>yo(e.clientX,e.clientY))):N.none()}};const nA="top",sA="right",rA="bottom",aA="left";const cA=e=>e.model.minX;const iA=e=>e.model.minY;const lA=e=>e.model.minX-1;const dA=e=>e.model.minY-1;const uA=e=>e.model.maxX;const fA=e=>e.model.maxY;const mA=e=>e.model.maxX+1;const gA=e=>e.model.maxY+1;const pA=(e,t,o)=>t(e)-o(e);const hA=e=>pA(e,uA,cA);const yA=e=>pA(e,fA,iA);const bA=e=>hA(e)/2;const vA=e=>yA(e)/2;const kA=e=>e.stepSize;const wA=e=>e.snapToGrid;const _A=e=>e.snapStart;const xA=e=>e.rounded;const zA=(e,t)=>e[t+"-edge"]!==undefined;const CA=e=>zA(e,aA);const SA=e=>zA(e,sA);const TA=e=>zA(e,nA);const OA=e=>zA(e,rA);const EA=e=>e.model.value.get();const DA=(e,t)=>({x:e,y:t});const AA=(e,t)=>{bc(e,eA(),{value:t})};const MA=(e,t)=>{AA(e,DA(lA(t),dA(t)))};const NA=(e,t)=>{AA(e,dA(t))};const RA=(e,t)=>{AA(e,DA(bA(t),dA(t)))};const BA=(e,t)=>{AA(e,DA(mA(t),dA(t)))};const LA=(e,t)=>{AA(e,mA(t))};const HA=(e,t)=>{AA(e,DA(mA(t),vA(t)))};const IA=(e,t)=>{AA(e,DA(mA(t),gA(t)))};const PA=(e,t)=>{AA(e,gA(t))};const FA=(e,t)=>{AA(e,DA(bA(t),gA(t)))};const VA=(e,t)=>{AA(e,DA(lA(t),gA(t)))};const jA=(e,t)=>{AA(e,lA(t))};const UA=(e,t)=>{AA(e,DA(lA(t),vA(t)))};const qA=(e,t,o,n)=>{if(e<t){return e}else if(e>o){return o}else if(e===t){return t-1}else{return Math.max(t,e-n)}};const WA=(e,t,o,n)=>{if(e>o){return e}else if(e<t){return t}else if(e===o){return o+1}else{return Math.min(o,e+n)}};const $A=(e,t,o)=>Math.max(t,Math.min(o,e));const GA=(e,t,o,n,s)=>s.fold((()=>{const s=e-t;const r=Math.round(s/n)*n;return $A(t+r,t-1,o+1)}),(t=>{const s=(e-t)%n;const r=Math.round(s/n);const a=Math.floor((e-t)/n);const c=Math.floor((o-t)/n);const i=Math.min(c,a+r);const l=t+i*n;return Math.max(t,l)}));const KA=(e,t,o)=>Math.min(o,Math.max(e,t))-t;const XA=e=>{const{min:t,max:o,range:n,value:s,step:r,snap:a,snapStart:c,rounded:i,hasMinEdge:l,hasMaxEdge:d,minBound:u,maxBound:f,screenRange:m}=e;const g=l?t-1:t;const p=d?o+1:o;if(s<u){return g}else if(s>f){return p}else{const e=KA(s,u,f);const l=$A(e/m*n+t,g,p);if(a&&l>=t&&l<=o){return GA(l,t,o,r,c)}else if(i){return Math.round(l)}else{return l}}};const YA=e=>{const{min:t,max:o,range:n,value:s,hasMinEdge:r,hasMaxEdge:a,maxBound:c,maxOffset:i,centerMinEdge:l,centerMaxEdge:d}=e;if(s<t){return r?0:l}else if(s>o){return a?c:d}else{return(s-t)/n*i}};const JA="top",QA="right",ZA="bottom",eM="left",tM="width",oM="height";const nM=e=>e.element.dom.getBoundingClientRect();const sM=(e,t)=>e[t];const rM=e=>{const t=nM(e);return sM(t,eM)};const aM=e=>{const t=nM(e);return sM(t,QA)};const cM=e=>{const t=nM(e);return sM(t,JA)};const iM=e=>{const t=nM(e);return sM(t,ZA)};const lM=e=>{const t=nM(e);return sM(t,tM)};const dM=e=>{const t=nM(e);return sM(t,oM)};const uM=(e,t,o)=>(e+t)/2-o;const fM=(e,t)=>{const o=nM(e);const n=nM(t);const s=sM(o,eM);const r=sM(o,QA);const a=sM(n,eM);return uM(s,r,a)};const mM=(e,t)=>{const o=nM(e);const n=nM(t);const s=sM(o,JA);const r=sM(o,ZA);const a=sM(n,JA);return uM(s,r,a)};const gM=(e,t)=>{bc(e,eA(),{value:t})};const pM=(e,t,o)=>{const n={min:cA(t),max:uA(t),range:hA(t),value:o,step:kA(t),snap:wA(t),snapStart:_A(t),rounded:xA(t),hasMinEdge:CA(t),hasMaxEdge:SA(t),minBound:rM(e),maxBound:aM(e),screenRange:lM(e)};return XA(n)};const hM=(e,t,o)=>{const n=pM(e,t,o);const s=n;gM(e,s);return n};const yM=(e,t)=>{const o=cA(t);gM(e,o)};const bM=(e,t)=>{const o=uA(t);gM(e,o)};const vM=(e,t,o)=>{const n=e>0?WA:qA;const s=n(EA(o),cA(o),uA(o),kA(o));gM(t,s);return N.some(s)};const kM=e=>(t,o)=>vM(e,t,o).map(A);const wM=e=>{const t=oA(e);return t.map((e=>e.left))};const _M=(e,t,o,n,s)=>{const r=0;const a=lM(e);const c=n.bind((t=>N.some(fM(t,e)))).getOr(r);const i=s.bind((t=>N.some(fM(t,e)))).getOr(a);const l={min:cA(t),max:uA(t),range:hA(t),value:o,hasMinEdge:CA(t),hasMaxEdge:SA(t),minBound:rM(e),minOffset:r,maxBound:aM(e),maxOffset:a,centerMinEdge:c,centerMaxEdge:i};return YA(l)};const xM=(e,t,o,n,s,r)=>{const a=_M(t,r,o,n,s);return rM(t)-rM(e)+a};const zM=(e,t,o,n)=>{const s=EA(o);const r=xM(e,n.getSpectrum(e),s,n.getLeftEdge(e),n.getRightEdge(e),o);const a=zo(t.element)/2;eo(t.element,"left",r-a+"px")};const CM=kM(-1);const SM=kM(1);const TM=N.none;const OM=N.none;const EM={"top-left":N.none(),top:N.none(),"top-right":N.none(),right:N.some(LA),"bottom-right":N.none(),bottom:N.none(),"bottom-left":N.none(),left:N.some(jA)};var DM=Object.freeze({__proto__:null,setValueFrom:hM,setToMin:yM,setToMax:bM,findValueOfOffset:pM,getValueFromEvent:wM,findPositionOfValue:xM,setPositionFromValue:zM,onLeft:CM,onRight:SM,onUp:TM,onDown:OM,edgeActions:EM});const AM=(e,t)=>{bc(e,eA(),{value:t})};const MM=(e,t,o)=>{const n={min:iA(t),max:fA(t),range:yA(t),value:o,step:kA(t),snap:wA(t),snapStart:_A(t),rounded:xA(t),hasMinEdge:TA(t),hasMaxEdge:OA(t),minBound:cM(e),maxBound:iM(e),screenRange:dM(e)};return XA(n)};const NM=(e,t,o)=>{const n=MM(e,t,o);const s=n;AM(e,s);return n};const RM=(e,t)=>{const o=iA(t);AM(e,o)};const BM=(e,t)=>{const o=fA(t);AM(e,o)};const LM=(e,t,o)=>{const n=e>0?WA:qA;const s=n(EA(o),iA(o),fA(o),kA(o));AM(t,s);return N.some(s)};const HM=e=>(t,o)=>LM(e,t,o).map(A);const IM=e=>{const t=oA(e);return t.map((e=>e.top))};const PM=(e,t,o,n,s)=>{const r=0;const a=dM(e);const c=n.bind((t=>N.some(mM(t,e)))).getOr(r);const i=s.bind((t=>N.some(mM(t,e)))).getOr(a);const l={min:iA(t),max:fA(t),range:yA(t),value:o,hasMinEdge:TA(t),hasMaxEdge:OA(t),minBound:cM(e),minOffset:r,maxBound:iM(e),maxOffset:a,centerMinEdge:c,centerMaxEdge:i};return YA(l)};const FM=(e,t,o,n,s,r)=>{const a=PM(t,r,o,n,s);return cM(t)-cM(e)+a};const VM=(e,t,o,n)=>{const s=EA(o);const r=FM(e,n.getSpectrum(e),s,n.getTopEdge(e),n.getBottomEdge(e),o);const a=mo(t.element)/2;eo(t.element,"top",r-a+"px")};const jM=N.none;const UM=N.none;const qM=HM(-1);const WM=HM(1);const $M={"top-left":N.none(),top:N.some(NA),"top-right":N.none(),right:N.none(),"bottom-right":N.none(),bottom:N.some(PA),"bottom-left":N.none(),left:N.none()};var GM=Object.freeze({__proto__:null,setValueFrom:NM,setToMin:RM,setToMax:BM,findValueOfOffset:MM,getValueFromEvent:IM,findPositionOfValue:FM,setPositionFromValue:VM,onLeft:jM,onRight:UM,onUp:qM,onDown:WM,edgeActions:$M});const KM=(e,t)=>{bc(e,eA(),{value:t})};const XM=(e,t)=>({x:e,y:t});const YM=(e,t,o)=>{const n=pM(e,t,o.left);const s=MM(e,t,o.top);const r=XM(n,s);KM(e,r);return r};const JM=(e,t,o,n)=>{const s=e>0?WA:qA;const r=t?EA(n).x:s(EA(n).x,cA(n),uA(n),kA(n));const a=!t?EA(n).y:s(EA(n).y,iA(n),fA(n),kA(n));KM(o,XM(r,a));return N.some(r)};const QM=(e,t)=>(o,n)=>JM(e,t,o,n).map(A);const ZM=(e,t)=>{const o=cA(t);const n=iA(t);KM(e,XM(o,n))};const eN=(e,t)=>{const o=uA(t);const n=fA(t);KM(e,XM(o,n))};const tN=e=>oA(e);const oN=(e,t,o,n)=>{const s=EA(o);const r=xM(e,n.getSpectrum(e),s.x,n.getLeftEdge(e),n.getRightEdge(e),o);const a=FM(e,n.getSpectrum(e),s.y,n.getTopEdge(e),n.getBottomEdge(e),o);const c=zo(t.element)/2;const i=mo(t.element)/2;eo(t.element,"left",r-c+"px");eo(t.element,"top",a-i+"px")};const nN=QM(-1,false);const sN=QM(1,false);const rN=QM(-1,true);const aN=QM(1,true);const cN={"top-left":N.some(MA),top:N.some(RA),"top-right":N.some(BA),right:N.some(HA),"bottom-right":N.some(IA),bottom:N.some(FA),"bottom-left":N.some(VA),left:N.some(UA)};var iN=Object.freeze({__proto__:null,setValueFrom:YM,setToMin:ZM,setToMax:eN,getValueFromEvent:tN,setPositionFromValue:oN,onLeft:nN,onRight:sN,onUp:rN,onDown:aN,edgeActions:cN});const lN=[qr("stepSize",1),qr("onChange",v),qr("onChoose",v),qr("onInit",v),qr("onDragStart",v),qr("onDragEnd",v),qr("snapToGrid",false),qr("rounded",true),Br("snapStart"),Cr("model",vr("mode",{x:[qr("minX",0),qr("maxX",100),_r("value",(e=>ea(e.mode.minX))),zr("getInitialValue"),_d("manager",DM)],y:[qr("minY",0),qr("maxY",100),_r("value",(e=>ea(e.mode.minY))),zr("getInitialValue"),_d("manager",GM)],xy:[qr("minX",0),qr("maxX",100),qr("minY",0),qr("maxY",100),_r("value",(e=>ea({x:e.mode.minX,y:e.mode.minY}))),zr("getInitialValue"),_d("manager",iN)]})),ah("sliderBehaviours",[Bk,rh]),_r("mouseIsDown",(()=>ea(false)))];const dN=(e,t,o,n)=>{const s=t=>ey(t,e,"thumb");const r=t=>ey(t,e,"spectrum");const a=t=>Zh(t,e,"left-edge");const c=t=>Zh(t,e,"right-edge");const i=t=>Zh(t,e,"top-edge");const l=t=>Zh(t,e,"bottom-edge");const d=e.model;const u=d.manager;const f=(t,o)=>{u.setPositionFromValue(t,o,e,{getLeftEdge:a,getRightEdge:c,getTopEdge:i,getBottomEdge:l,getSpectrum:r})};const m=(e,t)=>{d.value.set(t);const o=s(e);f(e,o)};const g=(t,o)=>{m(t,o);const n=s(t);e.onChange(t,n,o);return N.some(true)};const p=t=>{u.setToMin(t,e)};const h=t=>{u.setToMax(t,e)};const y=t=>{const o=()=>{Zh(t,e,"thumb").each((o=>{const n=d.value.get();e.onChoose(t,o,n)}))};const n=e.mouseIsDown.get();e.mouseIsDown.set(false);if(n){o()}};const b=(t,o)=>{o.stop();e.mouseIsDown.set(true);e.onDragStart(t,s(t))};const v=(t,o)=>{o.stop();e.onDragEnd(t,s(t));y(t)};return{uid:e.uid,dom:e.dom,components:t,behaviours:ih(e.sliderBehaviours,[Bk.config({mode:"special",focusIn:t=>Zh(t,e,"spectrum").map(Bk.focusIn).map(A)}),rh.config({store:{mode:"manual",getValue:e=>d.value.get(),setValue:m}}),Eu.config({channels:{[Sp()]:{onReceive:y}}})]),events:xc([Tc(eA(),((e,t)=>{g(e,t.event.value)})),Hc(((t,o)=>{const n=d.getInitialValue();d.value.set(n);const a=s(t);f(t,a);const c=r(t);e.onInit(t,a,c,d.value.get())})),Tc(za(),b),Tc(Sa(),v),Tc(Oa(),b),Tc(Aa(),v)]),apis:{resetToMin:p,resetToMax:h,setValue:m,refresh:f},domModification:{styles:{position:"relative"}}}};const uN=by({name:"Slider",configFields:lN,partFields:QD,factory:dN,apis:{setValue:(e,t,o)=>{e.setValue(t,o)},resetToMin:(e,t)=>{e.resetToMin(t)},resetToMax:(e,t)=>{e.resetToMax(t)},refresh:(e,t)=>{e.refresh(t)}}});const fN=Zc("rgb-hex-update");const mN=Zc("slider-update");const gN=Zc("palette-update");const pN=(e,t)=>{const o=uN.parts.spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}});const n=uN.parts.thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return uN.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:false,model:{mode:"y",getInitialValue:x(0)},components:[o,n],sliderBehaviours:xu([aw.config({})]),onChange:(e,t,o)=>{bc(e,mN,{value:o})}})};const hN="form";const yN=[ah("formBehaviours",[rh])];const bN=e=>"<alloy.field."+e+">";const vN=e=>{const t=(()=>{const e=[];const t=(t,o)=>{e.push(t);return Kh(hN,bN(t),o)};return{field:t,record:x(e)}})();const o=e(t);const n=t.record();const s=U(n,(e=>Ih({name:e,pname:bN(e)})));return uy(hN,yN,s,wN,o)};const kN=(e,t)=>e.fold((()=>Qn.error(t)),Qn.value);const wN=(e,t)=>({uid:e.uid,dom:e.dom,components:t,behaviours:ih(e.formBehaviours,[rh.config({store:{mode:"manual",getValue:t=>{const o=oy(t,e);return pe(o,((e,t)=>e().bind((e=>{const o=xy.getCurrent(e);return kN(o,new Error(`Cannot find a current component to extract the value from for form part '${t}': `+Kc(e.element)))})).map(rh.getValue)))},setValue:(t,o)=>{ge(o,((o,n)=>{Zh(t,e,n).each((e=>{xy.getCurrent(e).each((e=>{rh.setValue(e,o)}))}))}))}}})]),apis:{getField:(t,o)=>Zh(t,e,o).bind(xy.getCurrent)}});const _N={getField:vi(((e,t,o)=>e.getField(t,o))),sketch:vN};const xN=Zc("valid-input");const zN=Zc("invalid-input");const CN=Zc("validating-input");const SN="colorcustom.rgb.";const TN=(e,t,o,n)=>{const s=(o,n)=>rD.config({invalidClass:t("invalid"),notify:{onValidate:e=>{bc(e,CN,{type:o})},onValid:e=>{bc(e,xN,{type:o,value:rh.getValue(e)})},onInvalid:e=>{bc(e,zN,{type:o,value:rh.getValue(e)})}},validator:{validate:t=>{const o=rh.getValue(t);const s=n(o)?Qn.value(true):Qn.error(e("aria.input.invalid"));return GE.pure(s)},validateOnLoad:false}});const r=(o,n,r,a,c)=>{const i=e(SN+"range");const l=fE.parts.label({dom:{tag:"label",attributes:{"aria-label":a}},components:[Ml(r)]});const d=fE.parts.field({data:c,factory:PE,inputAttributes:{type:"text",...n==="hex"?{"aria-live":"polite"}:{}},inputClasses:[t("textfield")],inputBehaviours:xu([s(n,o),hE.config({})]),onSetValue:e=>{if(rD.isInvalid(e)){const t=rD.run(e);t.get(v)}}});const u=[l,d];const f=n!=="hex"?[fE.parts["aria-descriptor"]({text:i})]:[];const m=u.concat(f);return{dom:{tag:"div",attributes:{role:"presentation"}},components:m}};const a=(e,t)=>{const o=oT(t);_N.getField(e,"hex").each((t=>{if(!aw.isFocused(t)){rh.setValue(e,{hex:o.value})}}));return o};const c=(e,t)=>{const o=t.red;const n=t.green;const s=t.blue;rh.setValue(e,{red:o,green:n,blue:s})};const i=p_({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}});const l=(e,t)=>{i.getOpt(e).each((e=>{eo(e.element,"background-color","#"+t.value)}))};const d=()=>{const s={red:ea(N.some(255)),green:ea(N.some(255)),blue:ea(N.some(255)),hex:ea(N.some("ffffff"))};const d=(e,t)=>{const o=uT(t);c(e,o);g(o)};const u=e=>s[e].get();const f=(e,t)=>{s[e].set(t)};const m=()=>u("red").bind((e=>u("green").bind((t=>u("blue").map((o=>iT(e,t,o,1)))))));const g=e=>{const t=e.red;const o=e.green;const n=e.blue;f("red",N.some(t));f("green",N.some(o));f("blue",N.some(n))};const p=(e,t)=>{const o=t.event;if(o.type!=="hex"){f(o.type,N.none())}else{n(e)}};const h=(e,t)=>{o(e);const n=GS(t);f("hex",N.some(t));const s=uT(n);c(e,s);g(s);bc(e,fN,{hex:n});l(e,n)};const y=(e,t,o)=>{const n=parseInt(o,10);f(t,N.some(n));m().each((t=>{const o=a(e,t);bc(e,fN,{hex:o});l(e,o)}))};const b=e=>e.type==="hex";const v=(e,t)=>{const o=t.event;if(b(o)){h(e,o.value)}else{y(e,o.type,o.value)}};const k=t=>({label:e(SN+t+".label"),description:e(SN+t+".description")});const w=k("red");const _=k("green");const x=k("blue");const z=k("hex");return ys(_N.sketch((o=>({dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[o.field("red",fE.sketch(r(lT,"red",w.label,w.description,255))),o.field("green",fE.sketch(r(lT,"green",_.label,_.description,255))),o.field("blue",fE.sketch(r(lT,"blue",x.label,x.description,255))),o.field("hex",fE.sketch(r(YS,"hex",z.label,z.description,"ffffff"))),i.asSpec()],formBehaviours:xu([rD.config({invalidClass:t("form-invalid")}),Jk("rgb-form-events",[Tc(xN,v),Tc(zN,p),Tc(CN,p)])])}))),{apis:{updateHex:(e,t)=>{rh.setValue(e,{hex:t.value});d(e,t);l(e,t)}}})};const u=yy({factory:d,name:"RgbForm",configFields:[],apis:{updateHex:(e,t,o)=>{e.updateHex(t,o)}},extraApis:{}});return u};const ON=(e,t)=>{const o=uN.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}});const n=uN.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:`<div class=${t("sv-palette-inner-thumb")} role="presentation"></div>`}});const s=(e,t)=>{const{width:o,height:n}=e;const s=e.getContext("2d");if(s===null){return}s.fillStyle=t;s.fillRect(0,0,o,n);const r=s.createLinearGradient(0,0,o,0);r.addColorStop(0,"rgba(255,255,255,1)");r.addColorStop(1,"rgba(255,255,255,0)");s.fillStyle=r;s.fillRect(0,0,o,n);const a=s.createLinearGradient(0,0,0,n);a.addColorStop(0,"rgba(0,0,0,0)");a.addColorStop(1,"rgba(0,0,0,1)");s.fillStyle=a;s.fillRect(0,0,o,n)};const r=(e,t)=>{const o=e.components()[0].element.dom;const n=_T(t,100,100);const r=dT(n);s(o,gT(r))};const a=(e,t)=>{const o=xT(uT(t));uN.setValue(e,{x:o.saturation,y:100-o.value})};const c=e=>{const r=x({x:0,y:0});const a=(e,t,o)=>{bc(e,gN,{value:o})};const c=(e,t,o,n)=>{s(o.element.dom,gT(pT))};const i=xu([xy.config({find:N.some}),aw.config({})]);return uN.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:r},rounded:false,components:[o,n],onChange:a,onInit:c,sliderBehaviours:i})};const i=yy({factory:c,name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(e,t,o)=>{r(t,o)},setThumb:(e,t,o)=>{a(t,o)}},extraApis:{}});return i};const EN=(e,t)=>{const o=o=>{const n=TN(e,t,o.onValidHex,o.onInvalidHex);const s=ON(e,t);const r=e=>(100-e)/100*360;const a=e=>100-e/360*100;const c={paletteRgba:ea(pT),paletteHue:ea(0)};const i=p_(pN(e,t));const l=p_(s.sketch({}));const d=p_(n.sketch({}));const u=(e,t,o)=>{l.getOpt(e).each((e=>{s.setHue(e,o)}))};const f=(e,t)=>{d.getOpt(e).each((e=>{n.updateHex(e,t)}))};const m=(e,t,o)=>{i.getOpt(e).each((e=>{uN.setValue(e,a(o))}))};const g=(e,t)=>{l.getOpt(e).each((e=>{s.setThumb(e,t)}))};const p=(e,t)=>{const o=uT(e);c.paletteRgba.set(o);c.paletteHue.set(t)};const h=(e,t,o,n)=>{p(t,o);q(n,(n=>{n(e,t,o)}))};const y=()=>{const e=[f];return(t,o)=>{const n=o.event.value;const s=c.paletteHue.get();const r=_T(s,n.x,100-n.y);const a=CT(r);h(t,a,s,e)}};const b=()=>{const e=[u,f];return(t,o)=>{const n=r(o.event.value);const s=c.paletteRgba.get();const a=xT(s);const i=_T(n,a.saturation,a.value);const l=CT(i);h(t,l,n,e)}};const v=()=>{const e=[u,m,g];return(t,o)=>{const n=o.event.hex;const s=zT(n);h(t,n,s.hue,e)}};return{uid:o.uid,dom:o.dom,components:[l.asSpec(),i.asSpec(),d.asSpec()],behaviours:xu([Jk("colour-picker-events",[Tc(fN,v()),Tc(gN,y()),Tc(mN,b())]),xy.config({find:e=>d.getOpt(e)}),Bk.config({mode:"acyclic"})])}};const n=yy({name:"ColourPicker",configFields:[zr("dom"),qr("onValidHex",v),qr("onInvalidHex",v)],factory:o});return n};const DN=()=>xy.config({find:N.some});const AN=e=>xy.config({find:e.getOpt});const MN=e=>xy.config({find:t=>Tt(t.element,e).bind((e=>t.getSystem().getByDom(e).toOptional()))});const NN={self:DN,memento:AN,childAt:MN};const RN=Xs([qr("preprocess",z),qr("postprocess",z)]);const BN=(e,t)=>{const o=yr("RepresentingConfigs.memento processors",RN,t);return rh.config({store:{mode:"manual",getValue:t=>{const n=e.get(t);const s=rh.getValue(n);return o.postprocess(s)},setValue:(t,n)=>{const s=o.preprocess(n);const r=e.get(t);rh.setValue(r,s)}}})};const LN=(e,t,o)=>rh.config({store:{mode:"manual",...e.map((e=>({initialValue:e}))).getOr({}),getValue:t,setValue:o}});const HN=(e,t,o)=>LN(e,(e=>t(e.element)),((e,t)=>o(e.element,t)));const IN=e=>HN(e,dl,ul);const PN=e=>HN(e,jc,Uc);const FN=e=>rh.config({store:{mode:"memory",initialValue:e}});const VN={memento:BN,withElement:HN,withComp:LN,domValue:IN,domHtml:PN,memory:FN};const jN={"colorcustom.rgb.red.label":"R","colorcustom.rgb.red.description":"Red component","colorcustom.rgb.green.label":"G","colorcustom.rgb.green.description":"Green component","colorcustom.rgb.blue.label":"B","colorcustom.rgb.blue.description":"Blue component","colorcustom.rgb.hex.label":"#","colorcustom.rgb.hex.description":"Hex color code","colorcustom.rgb.range":"Range 0 to 255","aria.color.picker":"Color Picker","aria.input.invalid":"Invalid input"};const UN=e=>t=>e.translate(jN[t]);const qN=(e,t,o)=>{const n=e=>"tox-"+e;const s=EN(UN(t),n);const r=e=>{bc(e,TE,{name:"hex-valid",value:true})};const a=e=>{bc(e,TE,{name:"hex-valid",value:false})};const c=p_(s.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex:r,onInvalidHex:a}));return{dom:{tag:"div"},components:[c.asSpec()],behaviours:xu([VN.withComp(o,(e=>{const t=c.get(e);const o=xy.getCurrent(t);const n=o.bind((e=>{const t=rh.getValue(e);return t.hex}));return n.map((e=>"#"+e)).getOr("")}),((e,t)=>{const o=/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/;const n=o.exec(t);const s=c.get(e);const r=xy.getCurrent(s);r.fold((()=>{console.log("Can not find form")}),(e=>{rh.setValue(e,{hex:N.from(n[1]).getOr("")});_N.getField(e,"hex").each((e=>{yc(e,Ha())}))}))})),NN.self()])}};var WN=tinymce.util.Tools.resolve("tinymce.Resource");const $N=e=>Ce(e,"init");const GN=e=>{const t=ff();const o=p_({dom:{tag:e.tag}});const n=ff();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:xu([Jk("custom-editor-events",[Hc((s=>{o.getOpt(s).each((o=>{($N(e)?e.init(o.element.dom):WN.load(e.scriptId,e.scriptUrl).then((t=>t(o.element.dom,e.settings)))).then((e=>{n.on((t=>{e.setValue(t)}));n.clear();t.set(e)}))}))}))]),VN.withComp(N.none(),(()=>t.get().fold((()=>n.get().getOr("")),(e=>e.getValue()))),((e,o)=>{t.get().fold((()=>n.set(o)),(e=>e.setValue(o)))})),NN.self()]),components:[o.asSpec()]}};var KN=tinymce.util.Tools.resolve("tinymce.util.Tools");const XN=(e,t)=>{const o=KN.explode(t.getOption("images_file_types"));const n=e=>F(o,(t=>je(e.name.toLowerCase(),`.${t.toLowerCase()}`)));return G(de(e),n)};const YN=(e,t,o)=>{const n=(e,t)=>{t.stop()};const s=e=>(t,o)=>{q(e,(e=>{e(t,o)}))};const r=(e,t)=>{if(!jy.isDisabled(e)){const o=t.event.raw;c(e,o.dataTransfer.files)}};const a=(e,t)=>{const o=t.event.raw.target;c(e,o.files)};const c=(o,n)=>{rh.setValue(o,XN(n,t));bc(o,zE,{name:e.name})};const i=p_({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:xu([Jk("input-file-events",[Rc(Pa()),Rc(Qa())])])});const l=e=>({uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:xu([VN.memory(o.getOr([])),NN.self(),jy.config({}),Cw.config({toggleClass:"dragenter",toggleOnExecute:false}),Jk("dropzone-events",[Tc("dragenter",s([n,Cw.toggle])),Tc("dragleave",s([n,Cw.toggle])),Tc("dragover",n),Tc("drop",s([n,r])),Tc(Ia(),a)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[Ml(t.translate("Drop an image here"))]},g_.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[Ml(t.translate("Browse for an image")),i.asSpec()],action:e=>{const t=i.get(e);t.element.dom.click()},buttonBehaviours:xu([hE.config({}),pS.button(t.isDisabled),dS()])})]}]});const d=e.label.map((e=>xE(e,t)));const u=fE.parts.field({factory:{sketch:l}});return bE(d,u,["tox-form__group--stretched"],[])};const JN=(e,t)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${e.columns}col`]},components:U(e.items,t.interpreter)});const QN=Zc("alloy-fake-before-tabstop");const ZN=Zc("alloy-fake-after-tabstop");const eR=e=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:xu([aw.config({ignore:true}),hE.config({})])});const tR=e=>({dom:{tag:"div",classes:["tox-navobj"]},components:[eR([QN]),e,eR([ZN])],behaviours:xu([NN.childAt(1)])});const oR=(e,t)=>{bc(e,Ba(),{raw:{which:9,shiftKey:t}})};const nR=(e,t)=>{const o=t.element;if(sl(o,QN)){oR(e,true)}else if(sl(o,ZN)){oR(e,false)}};const sR=e=>LO(e,["."+QN,"."+ZN].join(","),D);const rR=e=>{const t=ea(e.getOr(""));return{getValue:e=>t.get(),setValue:(e,o)=>{if(t.get()!==o){Wt(e.element,"srcdoc",o)}t.set(o)}}};const aR=(e,t,o)=>{const n=e.sandboxed;const s={...e.label.map((e=>({title:e}))).getOr({}),...o.map((e=>({srcdoc:e}))).getOr({}),...n?{sandbox:"allow-scripts allow-same-origin"}:{}};const r=rR(o);const a=e.label.map((e=>xE(e,t)));const c=e=>tR({uid:e.uid,dom:{tag:"iframe",attributes:s},behaviours:xu([hE.config({}),aw.config({}),VN.withComp(o,r.getValue,r.setValue)])});const i=fE.parts.field({factory:{sketch:c}});return bE(a,i,["tox-form__group--stretched"],[])};const cR=e=>new Promise(((t,o)=>{const n=()=>{r();t(e)};const s=[gf(e,"load",n),gf(e,"error",(()=>{r();o("Unable to load data from image: "+e.dom.src)}))];const r=()=>q(s,(e=>e.unbind()));if(e.dom.complete){n()}}));const iR=(e,t,o,n,s)=>{const r=o*s;const a=n*s;const c=Math.max(0,e/2-r/2);const i=Math.max(0,t/2-a/2);return{left:c.toString()+"px",top:i.toString()+"px",width:r.toString()+"px",height:a.toString()+"px"}};const lR=(e,t,o)=>{const n=zo(e);const s=mo(e);return Math.min(n/t,s/o,1)};const dR=(e,t)=>{const o=ea(t.getOr({url:""}));const n=p_({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:t.map((e=>({src:e.url}))).getOr({})}});const s=p_({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[n.asSpec()]});const r=(e,t)=>{const r={url:t.url};t.zoom.each((e=>r.zoom=e));t.cachedWidth.each((e=>r.cachedWidth=e));t.cachedHeight.each((e=>r.cachedHeight=e));o.set(r);const a=()=>{const t=r.cachedWidth;const o=r.cachedHeight;if(m(r.zoom)){const n=lR(e.element,t,o);r.zoom=n}const n=iR(zo(e.element),mo(e.element),t,o,r.zoom);s.getOpt(e).each((e=>{to(e.element,n)}))};n.getOpt(e).each((o=>{const n=o.element;if(t.url!==Gt(n,"src")){Wt(n,"src",t.url);nl(e.element,"tox-imagepreview__loaded")}if(!m(r.cachedWidth)&&!m(r.cachedHeight)){a()}cR(n).then((t=>{if(e.getSystem().isConnected()){tl(e.element,"tox-imagepreview__loaded");r.cachedWidth=t.dom.naturalWidth;r.cachedHeight=t.dom.naturalHeight;a()}}))}))};const a={};e.height.each((e=>a.height=e));const c=t.map((e=>({url:e.url,zoom:N.from(e.zoom),cachedWidth:N.from(e.cachedWidth),cachedHeight:N.from(e.cachedHeight)})));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:a,attributes:{role:"presentation"}},components:[s.asSpec()],behaviours:xu([NN.self(),VN.withComp(c,(()=>o.get()),r)])}};const uR=(e,t)=>{const o={dom:{tag:"label",classes:["tox-label"]},components:[Ml(t.providers.translate(e.label))]};const n=U(e.items,t.interpreter);return{dom:{tag:"div",classes:["tox-form__group"]},components:[o,...n],behaviours:xu([NN.self(),Xk.config({}),VN.domHtml(N.none()),Bk.config({mode:"acyclic"})])}};const fR=Zc("toolbar.button.execute");const mR=e=>Fc(((t,o)=>{hS(e,t)((o=>{bc(t,fR,{buttonApi:o});e.onAction(o)}))}));const gR={[Ya()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events"]};const pR=(e,t,o)=>T_(e,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:o},t);const hR=(e,t)=>pR(e,t,[]);const yR=(e,t)=>pR(e,t,[Xk.config({})]);const bR=(e,t,o)=>({dom:{tag:"span",classes:[`${t}__select-label`]},components:[Ml(o.translate(e))],behaviours:xu([Xk.config({})])});const vR=Zc("update-menu-text");const kR=Zc("update-menu-icon");const wR=(e,t,o)=>{const n=ea(v);const s=e.text.map((e=>p_(bR(e,t,o.providers))));const r=e.icon.map((e=>p_(yR(e,o.providers.icons))));const a=(e,t)=>{const o=rh.getValue(e);aw.focus(o);bc(o,"keydown",{raw:t.event.raw});DD.close(o);return N.some(true)};const c=e.role.fold((()=>({})),(e=>({role:e})));const i=e.tooltip.fold((()=>({})),(e=>{const t=o.providers.translate(e);return{title:t,"aria-label":t}}));const l=T_("chevron-down",{tag:"div",classes:[`${t}__select-chevron`]},o.providers.icons);const d=p_(DD.sketch({...e.uid?{uid:e.uid}:{},...c,dom:{tag:"button",classes:[t,`${t}--select`].concat(U(e.classes,(e=>`${t}--${e}`))),attributes:{...i}},components:wS([r.map((e=>e.asSpec())),s.map((e=>e.asSpec())),N.some(l)]),matchWidth:true,useMinWidth:true,dropdownBehaviours:xu([...e.dropdownBehaviours,pS.button((()=>e.disabled||o.providers.isDisabled())),dS(),RD.config({}),Xk.config({}),Jk("dropdown-events",[yS(e,n),bS(e,n)]),Jk("menubutton-update-display-text",[Tc(vR,((e,t)=>{s.bind((t=>t.getOpt(e))).each((e=>{Xk.set(e,[Ml(o.providers.translate(t.event.text))])}))})),Tc(kR,((e,t)=>{r.bind((t=>t.getOpt(e))).each((e=>{Xk.set(e,[yR(t.event.icon,o.providers.icons)])}))}))])]),eventOrder:ys(gR,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"]}),sandboxBehaviours:xu([Bk.config({mode:"special",onLeft:a,onRight:a})]),lazySink:o.getSink,toggleClass:`${t}--active`,parts:{menu:gz(false,e.columns,e.presets)},fetch:t=>GE.nu(S(e.fetch,t))}));return d.asSpec()};const _R=e=>c(e);const xR=e=>e.type==="separator";const zR=e=>Ce(e,"getSubmenuItems");const CR={type:"separator"};const SR=(e,t)=>{const o=X(e,((e,o)=>{if(_R(o)){if(o===""){return e}else if(o==="|"){return e.length>0&&!xR(e[e.length-1])?e.concat([CR]):e}else if(Ce(t,o.toLowerCase())){return e.concat([t[o.toLowerCase()]])}else{return e}}else{return e.concat([o])}}),[]);if(o.length>0&&xR(o[o.length-1])){o.pop()}return o};const TR=(e,t)=>{const o=e.getSubmenuItems();const n=DR(o,t);const s=ys(n.menus,ia(e.value,n.items));const r=ys(n.expansions,ia(e.value,e.value));return{item:e,menus:s,expansions:r}};const OR=(e,t)=>zR(e)?TR(e,t):{item:e,menus:{},expansions:{}};const ER=e=>{if(xR(e)){return e}else{const t=ze(e,"value").getOrThunk((()=>Zc("generated-menu-item")));return ys({value:t},e)}};const DR=(e,t)=>{const o=SR(c(e)?e.split(" "):e,t);return K(o,((e,o)=>{const n=ER(o);const s=OR(n,t);return{menus:ys(e.menus,s.menus),items:[s.item].concat(e.items),expansions:ys(e.expansions,s.expansions)}}),{menus:{},expansions:{},items:[]})};const AR=(e,t,o,n)=>{const s=Zc("primary-menu");const r=DR(e,o.shared.providers.menuItems());if(r.items.length===0){return N.none()}const a=DO(s,r.items,t,o,n);const c=pe(r.menus,((e,n)=>DO(n,e,t,o,false)));const i=ys(c,ia(s,a));return N.from(i_.tieredData(s,i,r.expansions))};const MR=e=>!Ce(e,"items");const NR="data-value";const RR=(e,t,o,n)=>U(o,(o=>{if(!MR(o)){return{type:"nestedmenuitem",text:o.text,getSubmenuItems:()=>RR(e,t,o.items,n)}}else{return{type:"togglemenuitem",text:o.text,value:o.value,active:o.value===n,onAction:()=>{rh.setValue(e,o.value);bc(e,zE,{name:t});aw.focus(e)}}}}));const BR=(e,t)=>ue(e,(e=>{if(!MR(e)){return BR(e.items,t)}else{return Re(e.value===t,e)}}));const LR=(e,t,o)=>{const n=t.shared.providers;const s=o.bind((t=>BR(e.items,t))).orThunk((()=>ie(e.items).filter(MR)));const r=e.label.map((e=>xE(e,n)));const a=fE.parts.field({dom:{},factory:{sketch:o=>wR({uid:o.uid,text:s.map((e=>e.text)),icon:N.none(),tooltip:e.label,role:N.none(),fetch:(o,n)=>{const s=RR(o,e.name,e.items,rh.getValue(o));n(AR(s,Vx.CLOSE_ON_EXECUTE,t,false))},onSetup:x(v),getApi:x({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[hE.config({}),VN.withComp(s.map((e=>e.value)),(e=>Gt(e.element,NR)),((t,o)=>{BR(e.items,o).each((e=>{Wt(t.element,NR,e.value);bc(t,vR,{text:e.text})}))}))]},"tox-listbox",t.shared)}});const c={dom:{tag:"div",classes:["tox-listboxfield"]},components:[a]};return fE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Z([r.toArray(),[c]]),fieldBehaviours:xu([jy.config({disabled:x(!e.enabled),onDisabled:e=>{fE.getField(e).each(jy.disable)},onEnabled:e=>{fE.getField(e).each(jy.enable)}})])})};const HR=(e,t)=>({dom:{tag:"div",classes:e.classes},components:U(e.items,t.shared.interpreter)});const IR=(e,t)=>{const o=U(e.options,(e=>({dom:{tag:"option",value:e.value,innerHtml:e.text}})));const n=e.data.map((e=>ia("initialValue",e))).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:o,behaviours:ih(e.selectBehaviours,[aw.config({}),rh.config({store:{mode:"manual",getValue:e=>dl(e.element),setValue:(t,o)=>{const n=J(e.options,(e=>e.value===o));if(n.isSome()){ul(t.element,o)}},...n}})])}};const PR=yy({name:"HtmlSelect",configFields:[zr("options"),ah("selectBehaviours",[aw,rh]),qr("selectClasses",[]),qr("selectAttributes",{}),Br("data")],factory:IR});const FR=(e,t,o)=>{const n=U(e.items,(e=>({text:t.translate(e.text),value:e.value})));const s=e.label.map((e=>xE(e,t)));const r=fE.parts.field({dom:{},...o.map((e=>({data:e}))).getOr({}),selectAttributes:{size:e.size},options:n,factory:PR,selectBehaviours:xu([jy.config({disabled:()=>!e.enabled||t.isDisabled()}),hE.config({}),Jk("selectbox-change",[Tc(Ia(),((t,o)=>{bc(t,zE,{name:e.name})}))])])});const a=e.size>1?N.none():N.some(T_("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},t.icons));const c={dom:{tag:"div",classes:["tox-selectfield"]},components:Z([[r],a.toArray()])};return fE.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:Z([s.toArray(),[c]]),fieldBehaviours:xu([jy.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{fE.getField(e).each(jy.disable)},onEnabled:e=>{fE.getField(e).each(jy.enable)}}),dS()])})};const VR=x([qr("field1Name","field1"),qr("field2Name","field2"),kd("onLockedChange"),hd(["lockClass"]),qr("locked",false),lh.field("coupledFieldBehaviours",[xy,rh])]);const jR=(e,t,o)=>Zh(e,t,o).bind(xy.getCurrent);const UR=(e,t)=>Ih({factory:fE,name:e,overrides:e=>({fieldBehaviours:xu([Jk("coupled-input-behaviour",[Tc(Ha(),(o=>{jR(o,e,t).each((t=>{Zh(o,e,"lock").each((n=>{if(Cw.isOn(n)){e.onLockedChange(o,t,n)}}))}))}))])])})});const qR=x([UR("field1","field2"),UR("field2","field1"),Ih({factory:g_,schema:[zr("dom")],name:"lock",overrides:e=>({buttonBehaviours:xu([Cw.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])})})]);const WR=(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:lh.augment(e.coupledFieldBehaviours,[xy.config({find:N.some}),rh.config({store:{mode:"manual",getValue:t=>{const o=sy(t,e,["field1","field2"]);return{[e.field1Name]:rh.getValue(o.field1()),[e.field2Name]:rh.getValue(o.field2())}},setValue:(t,o)=>{const n=sy(t,e,["field1","field2"]);if(Se(o,e.field1Name)){rh.setValue(n.field1(),o[e.field1Name])}if(Se(o,e.field2Name)){rh.setValue(n.field2(),o[e.field2Name])}}}})]),apis:{getField1:t=>Zh(t,e,"field1"),getField2:t=>Zh(t,e,"field2"),getLock:t=>Zh(t,e,"lock")}});const $R=by({name:"FormCoupledInputs",configFields:VR(),partFields:qR(),factory:WR,apis:{getField1:(e,t)=>e.getField1(t),getField2:(e,t)=>e.getField2(t),getLock:(e,t)=>e.getLock(t)}});const GR=e=>{const t={"":0,px:0,pt:1,mm:1,pc:2,ex:2,em:2,ch:2,rem:2,cm:3,in:4,"%":4};const o=e=>e in t?t[e]:1;let n=e.value.toFixed(o(e.unit));if(n.indexOf(".")!==-1){n=n.replace(/\.?0*$/,"")}return n+e.unit};const KR=e=>{const t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/;const o=t.exec(e);if(o!==null){const e=parseFloat(o[1]);const t=o[2];return Qn.value({value:e,unit:t})}else{return Qn.error(e)}};const XR=(e,t)=>{const o={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1};const n=e=>Ce(o,e);if(e.unit===t){return N.some(e.value)}else if(n(e.unit)&&n(t)){if(o[e.unit]===o[t]){return N.some(e.value)}else{return N.some(e.value/o[e.unit]*o[t])}}else{return N.none()}};const YR=e=>N.none();const JR=(e,t)=>o=>XR(o,t).map((o=>({value:o*e,unit:t})));const QR=(e,t)=>{const o=KR(e).toOptional();const n=KR(t).toOptional();return Ae(o,n,((e,t)=>XR(e,t.unit).map((e=>t.value/e)).map((e=>JR(e,t.unit))).getOr(YR))).getOr(YR)};const ZR=(e,t)=>{let o=YR;const n=Zc("ratio-event");const s=e=>T_(e,{tag:"span",classes:["tox-icon","tox-lock-icon__"+e]},t.icons);const r=$R.parts.lock({dom:{tag:"button",classes:["tox-lock","tox-button","tox-button--naked","tox-button--icon"],attributes:{title:t.translate(e.label.getOr("Constrain proportions"))}},components:[s("lock"),s("unlock")],buttonBehaviours:xu([jy.config({disabled:()=>!e.enabled||t.isDisabled()}),dS(),hE.config({})])});const a=e=>({dom:{tag:"div",classes:["tox-form__group"]},components:e});const c=o=>fE.parts.field({factory:PE,inputClasses:["tox-textfield"],inputBehaviours:xu([jy.config({disabled:()=>!e.enabled||t.isDisabled()}),dS(),hE.config({}),Jk("size-input-events",[Tc(Na(),((e,t)=>{bc(e,n,{isField1:o})})),Tc(Ia(),((t,o)=>{bc(t,zE,{name:e.name})}))])]),selectOnFocus:false});const i=e=>({dom:{tag:"label",classes:["tox-label"]},components:[Ml(t.translate(e))]});const l=$R.parts.field1(a([fE.parts.label(i("Width")),c(true)]));const d=$R.parts.field2(a([fE.parts.label(i("Height")),c(false)]));return $R.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[l,d,a([i(pm),r])]}],field1Name:"width",field2Name:"height",locked:true,markers:{lockClass:"tox-locked"},onLockedChange:(e,t,n)=>{KR(rh.getValue(e)).each((e=>{o(e).each((e=>{rh.setValue(t,GR(e))}))}))},coupledFieldBehaviours:xu([jy.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled:e=>{$R.getField1(e).bind(fE.getField).each(jy.disable);$R.getField2(e).bind(fE.getField).each(jy.disable);$R.getLock(e).each(jy.disable)},onEnabled:e=>{$R.getField1(e).bind(fE.getField).each(jy.enable);$R.getField2(e).bind(fE.getField).each(jy.enable);$R.getLock(e).each(jy.enable)}}),dS(),Jk("size-input-events2",[Tc(n,((e,t)=>{const n=t.event.isField1;const s=n?$R.getField1(e):$R.getField2(e);const r=n?$R.getField2(e):$R.getField1(e);const a=s.map(rh.getValue).getOr("");const c=r.map(rh.getValue).getOr("");o=QR(a,c)}))])])})};const eB=(e,t,o)=>{const n=uN.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[Ml(t.translate(e.label))]});const s=uN.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}});const r=uN.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return uN.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e.min,maxX:e.max,getInitialValue:x(o.getOrThunk((()=>(Math.abs(e.max)-Math.abs(e.min))/2)))},components:[n,s,r],sliderBehaviours:xu([NN.self(),aw.config({})]),onChoose:(t,o,n)=>{bc(t,zE,{name:e.name,value:n})}})};const tB=(e,t)=>{const o=e=>({dom:{tag:"th",innerHtml:t.translate(e)}});const n=e=>({dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:U(e,o)}]});const s=e=>({dom:{tag:"td",innerHtml:t.translate(e)}});const r=e=>({dom:{tag:"tr"},components:U(e,s)});const a=e=>({dom:{tag:"tbody"},components:U(e,r)});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[n(e.header),a(e.cells)],behaviours:xu([hE.config({}),aw.config({})])}};const oB=(e,t)=>{const o=e.label.map((e=>xE(e,t)));const n=[jy.config({disabled:()=>e.disabled||t.isDisabled()}),dS(),Bk.config({mode:"execution",useEnter:e.multiline!==true,useControlEnter:e.multiline===true,execute:e=>{yc(e,OE);return N.some(true)}}),Jk("textfield-change",[Tc(Ha(),((t,o)=>{bc(t,zE,{name:e.name})})),Tc(Ka(),((t,o)=>{bc(t,zE,{name:e.name})}))]),hE.config({})];const s=e.validation.map((e=>rD.config({getRoot:e=>xt(e.element),invalidClass:"tox-invalid",validator:{validate:t=>{const o=rh.getValue(t);const n=e.validator(o);return GE.pure(n===true?Qn.value(o):Qn.error(n))},validateOnLoad:e.validateOnLoad}}))).toArray();const r=e.placeholder.fold(x({}),(e=>({placeholder:t.translate(e)})));const a=e.inputMode.fold(x({}),(e=>({inputmode:e})));const c={...r,...a};const i=fE.parts.field({tag:e.multiline===true?"textarea":"input",...e.data.map((e=>({data:e}))).getOr({}),inputAttributes:c,inputClasses:[e.classname],inputBehaviours:xu(Z([n,s])),selectOnFocus:false,factory:PE});const l=e.flex?["tox-form__group--stretched"]:[];const d=l.concat(e.maximized?["tox-form-group--maximize"]:[]);const u=[jy.config({disabled:()=>e.disabled||t.isDisabled(),onDisabled:e=>{fE.getField(e).each(jy.disable)},onEnabled:e=>{fE.getField(e).each(jy.enable)}}),dS()];return bE(o,i,d,u)};const nB=(e,t,o)=>oB({name:e.name,multiline:false,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:false,disabled:!e.enabled,classname:"tox-textfield",validation:N.none(),maximized:e.maximized,data:o},t);const sB=(e,t,o)=>oB({name:e.name,multiline:true,label:e.label,inputMode:N.none(),placeholder:e.placeholder,flex:true,disabled:!e.enabled,classname:"tox-textarea",validation:N.none(),maximized:e.maximized,data:o},t);const rB=(e,t)=>{const o=e.stream.streams;const n=o.setup(e,t);return xc([Tc(e.event,n),Ic((()=>t.cancel()))].concat(e.cancelEvent.map((e=>[Tc(e,(()=>t.cancel()))])).getOr([])))};var aB=Object.freeze({__proto__:null,events:rB});const cB=(e,t)=>{let o=null;const n=()=>{if(!u(o)){clearTimeout(o);o=null}};const s=(...n)=>{if(u(o)){o=setTimeout((()=>{o=null;e.apply(null,n)}),t)}};return{cancel:n,throttle:s}};const iB=(e,t)=>{let o=null;const n=()=>{if(!u(o)){clearTimeout(o);o=null}};const s=(...s)=>{n();o=setTimeout((()=>{o=null;e.apply(null,s)}),t)};return{cancel:n,throttle:s}};const lB=e=>{const t=ea(null);const o=()=>({timer:t.get()!==null?"set":"unset"});const n=e=>{t.set(e)};const s=()=>{const e=t.get();if(e!==null){e.cancel()}};return wi({readState:o,setTimer:n,cancel:s})};const dB=e=>e.stream.streams.state(e);var uB=Object.freeze({__proto__:null,throttle:lB,init:dB});const fB=(e,t)=>{const o=e.stream;const n=iB(e.onStream,o.delay);t.setTimer(n);return(e,t)=>{n.throttle(e,t);if(o.stopEvent){t.stop()}}};var mB=[Cr("stream",vr("mode",{throttle:[zr("delay"),qr("stopEvent",true),_d("streams",{setup:fB,state:lB})]})),qr("event","input"),Br("cancelEvent"),kd("onStream")];const gB=Cu({fields:mB,name:"streaming",active:aB,state:uB});const pB=(e,t,o)=>{const n=rh.getValue(o);rh.setValue(t,n);yB(t)};const hB=(e,t)=>{const o=e.element;const n=dl(o);const s=o.dom;if(Gt(o,"type")!=="number"){t(s,n)}};const yB=e=>{hB(e,((e,t)=>e.setSelectionRange(t.length,t.length)))};const bB=(e,t)=>{hB(e,((e,o)=>e.setSelectionRange(t,o.length)))};const vB=(e,t,o)=>{if(!e.selectsOver){return N.none()}else{const n=rh.getValue(t);const s=e.getDisplayText(n);const r=rh.getValue(o);const a=e.getDisplayText(r);return a.indexOf(s)===0?N.some((()=>{pB(e,t,o);bB(t,s.length)})):N.none()}};const kB=x("alloy.typeahead.itemexecute");const wB=(e,t,o,n)=>{const s=(t,o,s)=>{e.previewing.set(false);const r=uD.getCoupled(t,"sandbox");if(xp.isOpen(r)){xy.getCurrent(r).each((e=>{ib.getHighlighted(e).fold((()=>{s(e)}),(()=>{_c(r,e.element,"keydown",o)}))}))}else{const o=e=>{xy.getCurrent(e).each(s)};bD(e,a(t),t,r,n,o,gD.HighlightFirst).get(v)}};const r=BE(e);const a=e=>t=>t.map((t=>{const o=xe(t.menus);const n=ee(o,(e=>G(e.items,(e=>e.type==="item"))));const s=rh.getState(e);s.update(U(n,(e=>e.data)));return t}));const c=[aw.config({}),rh.config({onSetValue:e.onSetValue,store:{mode:"dataset",getDataKey:e=>dl(e.element),getFallbackEntry:e=>({value:e,meta:{}}),setValue:(t,o)=>{ul(t.element,e.model.getDisplayText(o))},...e.initialData.map((e=>ia("initialValue",e))).getOr({})}}),gB.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:false},onStream:(t,o)=>{const s=uD.getCoupled(t,"sandbox");const r=aw.isFocused(t);if(r){if(dl(t.element).length>=e.minChars){const o=xy.getCurrent(s).bind((e=>ib.getHighlighted(e).map(rh.getValue)));e.previewing.set(true);const r=t=>{xy.getCurrent(s).each((t=>{o.fold((()=>{if(e.model.selectsOver){ib.highlightFirst(t)}}),(e=>{ib.highlightBy(t,(t=>{const o=rh.getValue(t);return o.value===e.value}));ib.getHighlighted(t).orThunk((()=>{ib.highlightFirst(t);return N.none()}))}))}))};bD(e,a(t),t,s,n,r,gD.HighlightFirst).get(v)}}},cancelEvent:tc()}),Bk.config({mode:"special",onDown:(e,t)=>{s(e,t,ib.highlightFirst);return N.some(true)},onEscape:e=>{const t=uD.getCoupled(e,"sandbox");if(xp.isOpen(t)){xp.close(t);return N.some(true)}return N.none()},onUp:(e,t)=>{s(e,t,ib.highlightLast);return N.some(true)},onEnter:t=>{const o=uD.getCoupled(t,"sandbox");const n=xp.isOpen(o);if(n&&!e.previewing.get()){return xy.getCurrent(o).bind((e=>ib.getHighlighted(e))).map((e=>{bc(t,kB(),{item:e});return true}))}else{const s=rh.getValue(t);yc(t,tc());e.onExecute(o,t,s);if(n){xp.close(o)}return N.some(true)}}}),Cw.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),uD.config({others:{sandbox:t=>zD(e,t,{onOpen:()=>Cw.on(t),onClose:()=>Cw.off(t)})}}),Jk("typeaheadevents",[Fc((t=>{const o=v;kD(e,a(t),t,n,o,gD.HighlightFirst).get(v)})),Tc(kB(),((t,o)=>{const n=uD.getCoupled(t,"sandbox");pB(e.model,t,o.event.item);yc(t,tc());e.onItemExecute(t,n,o.event.item,rh.getValue(t));xp.close(n);yB(t)}))].concat(e.dismissOnBlur?[Tc(Ga(),(e=>{const t=uD.getCoupled(e,"sandbox");if(Lu(t.element).isNone()){xp.close(t)}}))]:[]))];return{uid:e.uid,dom:HE(ys(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...r,...ih(e.typeaheadBehaviours,c)},eventOrder:e.eventOrder}};const _B=x([Br("lazySink"),zr("fetch"),qr("minChars",5),qr("responseTime",1e3),bd("onOpen"),qr("getHotspot",N.some),qr("getAnchorOverrides",x({})),qr("layouts",N.none()),qr("eventOrder",{}),Zr("model",{},[qr("getDisplayText",(e=>e.meta!==undefined&&e.meta.text!==undefined?e.meta.text:e.value)),qr("selectsOver",true),qr("populateFromBrowse",true)]),bd("onSetValue"),vd("onExecute"),bd("onItemExecute"),qr("inputClasses",[]),qr("inputAttributes",{}),qr("inputStyles",{}),qr("matchWidth",true),qr("useMinWidth",false),qr("dismissOnBlur",true),hd(["openClass"]),Br("initialData"),ah("typeaheadBehaviours",[aw,rh,gB,Bk,Cw,uD]),_r("previewing",(()=>ea(true)))].concat(RE()).concat(SD()));const xB=x([Ph({schema:[pd()],name:"menu",overrides:e=>({fakeFocus:true,onHighlight:(t,o)=>{if(!e.previewing.get()){t.getSystem().getByUid(e.uid).each((t=>{if(e.model.populateFromBrowse){pB(e.model,t,o)}}))}else{t.getSystem().getByUid(e.uid).each((n=>{vB(e.model,n,o).fold((()=>ib.dehighlight(t,o)),(e=>e()))}))}e.previewing.set(false)},onExecute:(t,o)=>t.getSystem().getByUid(e.uid).toOptional().map((e=>{bc(e,kB(),{item:o});return true})),onHover:(t,o)=>{e.previewing.set(false);t.getSystem().getByUid(e.uid).each((t=>{if(e.model.populateFromBrowse){pB(e.model,t,o)}}))}})})]);const zB=by({name:"Typeahead",configFields:_B(),partFields:xB(),factory:wB});const CB=e=>{const t=()=>CB(e.toCached());const o=t=>CB(e.bind((e=>e.fold((e=>GE.pure(Qn.error(e))),(e=>t(e))))));const n=t=>CB(e.map((e=>e.bind(t))));const s=t=>CB(e.map((e=>e.map(t))));const r=t=>CB(e.map((e=>e.mapError(t))));const a=(t,o)=>e.map((e=>e.fold(t,o)));const c=(t,o)=>CB(GE.nu((n=>{let s=false;const r=setTimeout((()=>{s=true;n(Qn.error(o()))}),t);e.get((e=>{if(!s){clearTimeout(r);n(e)}}))})));return{...e,toCached:t,bindFuture:o,bindResult:n,mapResult:s,mapError:r,foldResult:a,withTimeout:c}};const SB=e=>CB(GE.nu(e));const TB=e=>CB(GE.pure(Qn.value(e)));const OB=e=>CB(GE.pure(Qn.error(e)));const EB=e=>CB(GE.pure(e));const DB=e=>CB(e.map(Qn.value));const AB=e=>SB((t=>{e.then((e=>{t(Qn.value(e))}),(e=>{t(Qn.error(e))}))}));const MB={nu:SB,wrap:CB,pure:TB,value:TB,error:OB,fromResult:EB,fromFuture:DB,fromPromise:AB};const NB=e=>({isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t),setActive:t=>{const o=e.element;if(t){tl(o,"tox-tbtn--enabled");Wt(o,"aria-pressed",true)}else{nl(o,"tox-tbtn--enabled");Yt(o,"aria-pressed")}},isActive:()=>sl(e.element,"tox-tbtn--enabled")});const RB=(e,t,o,n)=>wR({text:e.text,icon:e.icon,tooltip:e.tooltip,role:n,fetch:(t,n)=>{e.fetch((e=>{n(AR(e,Vx.CLOSE_ON_EXECUTE,o,false))}))},onSetup:e.onSetup,getApi:NB,columns:1,presets:"normal",classes:[],dropdownBehaviours:[hE.config({})]},t,o.shared);const BB=(e,t,o)=>{const n=e=>n=>{const s=!n.isActive();n.setActive(s);e.storage.set(s);o.shared.getSink().each((o=>{t().getOpt(o).each((t=>{Mu(t.element);bc(t,TE,{name:e.name,value:e.storage.get()})}))}))};const s=e=>t=>{t.setActive(e.storage.get())};return t=>{t(U(e,(e=>{const t=e.text.fold((()=>({})),(e=>({text:e})));return{type:e.type,active:false,...t,onAction:n(e),onSetup:s(e)}})))}};const LB=(e,t,o=[],n,s,r)=>{const a=t.fold((()=>({})),(e=>({action:e})));const c={buttonBehaviours:xu([pS.button((()=>!e.enabled||r.isDisabled())),dS(),hE.config({}),Jk("button press",[Sc("click"),Sc("mousedown")])].concat(o)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...a};const i=ys(c,{dom:n});return ys(i,{components:s})};const HB=(e,t,o,n=[])=>{const s=e.tooltip.map((e=>({"aria-label":o.translate(e),title:o.translate(e)}))).getOr({});const r={tag:"button",classes:["tox-tbtn"],attributes:s};const a=e.icon.map((e=>hR(e,o.icons)));const c=wS([a]);return LB(e,t,n,r,c,o)};const IB=e=>{switch(e){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];case"secondary":default:return["tox-button","tox-button--secondary"]}};const PB=(e,t,o,n=[],s=[])=>{const r=o.translate(e.text);const a=e.icon.map((e=>hR(e,o.icons)));const c=[a.getOrThunk((()=>Ml(r)))];const i=e.buttonType.getOr(!e.primary&&!e.borderless?"secondary":"primary");const l=IB(i);const d=[...l,...a.isSome()?["tox-button--icon"]:[],...e.borderless?["tox-button--naked"]:[],...s];const u={tag:"button",classes:d,attributes:{title:r}};return LB(e,t,n,u,c,o)};const FB=(e,t,o,n=[],s=[])=>{const r=PB(e,N.some(t),o,n,s);return g_.sketch(r)};const VB=(e,t)=>o=>{if(t==="custom"){bc(o,TE,{name:e,value:{}})}else if(t==="submit"){yc(o,OE)}else if(t==="cancel"){yc(o,SE)}else{console.error("Unknown button type: ",t)}};const jB=(e,t)=>t==="menu";const UB=(e,t)=>t==="custom"||t==="cancel"||t==="submit";const qB=(e,t,o)=>{if(jB(e,t)){const t=()=>r;const n=e;const s={...e,onSetup:t=>{t.setEnabled(e.enabled);return v},fetch:BB(n.items,t,o)};const r=p_(RB(s,"tox-tbtn",o,N.none()));return r.asSpec()}else if(UB(e,t)){const n=VB(e.name,t);const s={...e,borderless:false};return FB(s,n,o.shared.providers,[])}else{console.error("Unknown footer button type: ",t)}};const WB=(e,t)=>{const o=VB(e.name,"custom");return vE(N.none(),fE.parts.field({factory:g_,...PB(e,N.some(o),t,[VN.memory(""),NN.self()])}))};const $B={type:"separator"};const GB=e=>({type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:v});const KB=(e,t)=>({type:"menuitem",value:t,text:e,meta:{attach:undefined},onAction:v});const XB=e=>U(e,GB);const YB=(e,t)=>G(t,(t=>t.type===e));const JB=(e,t)=>XB(YB(e,t));const QB=e=>JB("header",e.targets);const ZB=e=>JB("anchor",e.targets);const eL=e=>N.from(e.anchorTop).map((e=>KB("<top>",e))).toArray();const tL=e=>N.from(e.anchorBottom).map((e=>KB("<bottom>",e))).toArray();const oL=e=>U(e,(e=>KB(e,e)));const nL=e=>X(e,((e,t)=>{const o=e.length===0||t.length===0;return o?e.concat(t):e.concat($B,t)}),[]);const sL=(e,t)=>{const o=e.toLowerCase();return G(t,(e=>{const t=e.meta!==undefined&&e.meta.text!==undefined?e.meta.text:e.text;return Fe(t.toLowerCase(),o)||Fe(e.value.toLowerCase(),o)}))};const rL=(e,t,o)=>{const n=rh.getValue(t);const s=n.meta.text!==undefined?n.meta.text:n.value;const r=o.getLinkInformation();return r.fold((()=>[]),(t=>{const n=sL(s,oL(o.getHistory(e)));return e==="file"?nL([n,sL(s,QB(t)),sL(s,Z([eL(t),ZB(t),tL(t)]))]):n}))};const aL=Zc("aria-invalid");const cL=(e,t,o,n)=>{const s=t.shared.providers;const r=t=>{const n=rh.getValue(t);o.addToHistory(n.value,e.filetype)};const a=fE.parts.field({factory:zB,...n.map((e=>({initialData:e}))).getOr({}),dismissOnBlur:true,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":aL,type:"url"},minChars:0,responseTime:0,fetch:n=>{const s=rL(e.filetype,n,o);const r=AR(s,Vx.BUBBLE_TO_SANDBOX,t,false);return GE.pure(r)},getHotspot:e=>m.getOpt(e),onSetValue:(e,t)=>{if(e.hasConfigured(rD)){rD.run(e).get(v)}},typeaheadBehaviours:xu(Z([o.getValidationHandler().map((t=>rD.config({getRoot:e=>xt(e.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(e,t)=>{l.getOpt(e).each((e=>{Wt(e.element,"title",s.translate(t))}))}},validator:{validate:o=>{const n=rh.getValue(o);return MB.nu((o=>{t({type:e.filetype,url:n.value},(e=>{if(e.status==="invalid"){const t=Qn.error(e.message);o(t)}else{const t=Qn.value(e.message);o(t)}}))}))},validateOnLoad:false}}))).toArray(),[jy.config({disabled:()=>!e.enabled||s.isDisabled()}),hE.config({}),Jk("urlinput-events",Z([e.filetype==="file"?[Tc(Ha(),(t=>{bc(t,zE,{name:e.name})}))]:[],[Tc(Ia(),(t=>{bc(t,zE,{name:e.name});r(t)})),Tc(Ka(),(t=>{bc(t,zE,{name:e.name});r(t)}))]]))]])),eventOrder:{[Ha()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText:e=>e.value,selectsOver:false,populateFromBrowse:false},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:gz(false,1,"normal")},onExecute:(e,t,o)=>{bc(t,OE,{})},onItemExecute:(t,o,n,s)=>{r(t);bc(t,zE,{name:e.name})}});const c=e.label.map((e=>xE(e,s)));const i=(e,t,o=e,n=e)=>T_(o,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:{title:s.translate(n),"aria-live":"polite",...t.fold((()=>({})),(e=>({id:e})))}},s.icons);const l=p_(i("invalid",N.some(aL),"warning"));const d=p_({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[l.asSpec()]});const u=o.getUrlPicker(e.filetype);const f=Zc("browser.url.event");const m=p_({dom:{tag:"div",classes:["tox-control-wrap"]},components:[a,d.asSpec()],behaviours:xu([jy.config({disabled:()=>!e.enabled||s.isDisabled()})])});const g=p_(FB({name:e.name,icon:N.some("browse"),text:e.label.getOr(""),enabled:e.enabled,primary:false,buttonType:N.none(),borderless:true},(e=>yc(e,f)),s,[],["tox-browse-url"]));const p=()=>({dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:Z([[m.asSpec()],u.map((()=>g.asSpec())).toArray()])});const h=t=>{xy.getCurrent(t).each((o=>{const n=rh.getValue(o);const s={fieldname:e.name,...n};u.each((n=>{n(s).get((n=>{rh.setValue(o,n);bc(t,zE,{name:e.name})}))}))}))};return fE.sketch({dom:wE(),components:c.toArray().concat([p()]),fieldBehaviours:xu([jy.config({disabled:()=>!e.enabled||s.isDisabled(),onDisabled:e=>{fE.getField(e).each(jy.disable);g.getOpt(e).each(jy.disable)},onEnabled:e=>{fE.getField(e).each(jy.enable);g.getOpt(e).each(jy.enable)}}),dS(),Jk("url-input-events",[Tc(f,h)])])})};const iL=(e,t)=>aE.sketch({dom:{tag:"div",attributes:{role:"alert"},classes:["tox-notification","tox-notification--in",`tox-notification--${e.level}`]},components:[{dom:{tag:"div",classes:["tox-notification__icon"]},components:[g_.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:__(e.icon,t.icons),attributes:{title:t.translate(e.iconTooltip)}},action:t=>{bc(t,TE,{name:"alert-banner",value:e.url})},buttonBehaviours:xu([C_()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:t.translate(e.text)}}]});const lL=(e,t)=>{e.dom.checked=t};const dL=e=>e.dom.checked;const uL=(e,t,o)=>{const n=e=>{e.element.dom.click();return N.some(true)};const s=fE.parts.field({factory:{sketch:z},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:xu([NN.self(),jy.config({disabled:()=>!e.enabled||t.isDisabled()}),hE.config({}),aw.config({}),VN.withElement(o,dL,lL),Bk.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:true}),Jk("checkbox-events",[Tc(Ia(),((t,o)=>{bc(t,zE,{name:e.name})}))])])});const r=fE.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[Ml(t.translate(e.label))],behaviours:xu([RD.config({})])});const a=e=>{const o=e==="checked"?"selected":"unselected";return T_(o,{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e]},t.icons)};const c=p_({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[a("checked"),a("unchecked")]});return fE.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[s,c.asSpec(),r],fieldBehaviours:xu([jy.config({disabled:()=>!e.enabled||t.isDisabled(),disableClass:"tox-checkbox--disabled",onDisabled:e=>{fE.getField(e).each(jy.disable)},onEnabled:e=>{fE.getField(e).each(jy.enable)}}),dS()])})};const fL=e=>{if(e.presets==="presentation"){return aE.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html}})}else{return aE.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:xu([hE.config({}),aw.config({})])})}};const mL=e=>(t,o,n,s)=>ze(o,"name").fold((()=>e(o,s,N.none())),(r=>t.field(r,e(o,s,ze(n,r)))));const gL=e=>(t,o,n,s)=>{const r=ys(o,{source:"dynamic"});return mL(e)(t,r,n,s)};const pL={bar:mL(((e,t)=>iE(e,t.shared))),collection:mL(((e,t,o)=>NE(e,t.shared.providers,o))),alertbanner:mL(((e,t)=>iL(e,t.shared.providers))),input:mL(((e,t,o)=>nB(e,t.shared.providers,o))),textarea:mL(((e,t,o)=>sB(e,t.shared.providers,o))),label:mL(((e,t)=>uR(e,t.shared))),iframe:gL(((e,t,o)=>aR(e,t.shared.providers,o))),button:mL(((e,t)=>WB(e,t.shared.providers))),checkbox:mL(((e,t,o)=>uL(e,t.shared.providers,o))),colorinput:mL(((e,t,o)=>PD(e,t.shared,t.colorinput,o))),colorpicker:mL(((e,t,o)=>qN(e,t.shared.providers,o))),dropzone:mL(((e,t,o)=>YN(e,t.shared.providers,o))),grid:mL(((e,t)=>JN(e,t.shared))),listbox:mL(((e,t,o)=>LR(e,t,o))),selectbox:mL(((e,t,o)=>FR(e,t.shared.providers,o))),sizeinput:mL(((e,t)=>ZR(e,t.shared.providers))),slider:mL(((e,t,o)=>eB(e,t.shared.providers,o))),urlinput:mL(((e,t,o)=>cL(e,t,t.urlinput,o))),customeditor:mL(GN),htmlpanel:mL(fL),imagepreview:mL(((e,t,o)=>dR(e,o))),table:mL(((e,t)=>tB(e,t.shared.providers))),panel:mL(((e,t)=>HR(e,t)))};const hL={field:(e,t)=>t,record:x([])};const yL=(e,t,o,n)=>{const s=ys(n,{shared:{interpreter:t=>bL(e,t,o,s)}});return bL(e,t,o,s)};const bL=(e,t,o,n)=>ze(pL,t.type).fold((()=>{console.error(`Unknown factory type "${t.type}", defaulting to container: `,t);return t}),(s=>s(e,t,o,n)));const vL=(e,t,o)=>bL(hL,e,t,o);const kL="layout-inset";const wL=e=>e.x;const _L=(e,t)=>e.x+e.width/2-t.width/2;const xL=(e,t)=>e.x+e.width-t.width;const zL=e=>e.y;const CL=(e,t)=>e.y+e.height-t.height;const SL=(e,t)=>e.y+e.height/2-t.height/2;const TL=(e,t,o)=>Cd(xL(e,t),CL(e,t),o.insetSouthwest(),Nd(),"southwest",Vd(e,{right:0,bottom:3}),kL);const OL=(e,t,o)=>Cd(wL(e),CL(e,t),o.insetSoutheast(),Md(),"southeast",Vd(e,{left:1,bottom:3}),kL);const EL=(e,t,o)=>Cd(xL(e,t),zL(e),o.insetNorthwest(),Ad(),"northwest",Vd(e,{right:0,top:2}),kL);const DL=(e,t,o)=>Cd(wL(e),zL(e),o.insetNortheast(),Dd(),"northeast",Vd(e,{left:1,top:2}),kL);const AL=(e,t,o)=>Cd(_L(e,t),zL(e),o.insetNorth(),Rd(),"north",Vd(e,{top:2}),kL);const ML=(e,t,o)=>Cd(_L(e,t),CL(e,t),o.insetSouth(),Bd(),"south",Vd(e,{bottom:3}),kL);const NL=(e,t,o)=>Cd(xL(e,t),SL(e,t),o.insetEast(),Hd(),"east",Vd(e,{right:0}),kL);const RL=(e,t,o)=>Cd(wL(e),SL(e,t),o.insetWest(),Ld(),"west",Vd(e,{left:1}),kL);const BL=e=>{switch(e){case"north":return AL;case"northeast":return DL;case"northwest":return EL;case"south":return ML;case"southeast":return OL;case"southwest":return TL;case"east":return NL;case"west":return RL}};const LL=(e,t,o,n,s)=>{const r=ef(n).map(BL).getOr(AL);return r(e,t,o,n,s)};const HL=e=>{switch(e){case"north":return ML;case"northeast":return OL;case"northwest":return TL;case"south":return AL;case"southeast":return DL;case"southwest":return EL;case"east":return RL;case"west":return NL}};const IL=(e,t,o,n,s)=>{const r=ef(n).map(HL).getOr(AL);return r(e,t,o,n,s)};const PL={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]};const FL=(e,t,o)=>{const n=12;const s={maxHeightFunction:Bf()};const r=()=>({type:"node",root:Bt(e()),node:N.from(e()),bubble:Ff(n,n,PL),layouts:{onRtl:()=>[DL],onLtr:()=>[EL]},overrides:s});const a=()=>({type:"hotspot",hotspot:t(),bubble:Ff(-n,n,PL),layouts:{onRtl:()=>[Qd],onLtr:()=>[Zd]},overrides:s});return()=>o()?r():a()};const VL=(e,t,o)=>{const n=()=>({type:"node",root:Bt(e()),node:N.from(e()),layouts:{onRtl:()=>[AL],onLtr:()=>[AL]}});const s=()=>({type:"hotspot",hotspot:t(),layouts:{onRtl:()=>[nu],onLtr:()=>[nu]}});return()=>o()?n():s()};const jL=(e,t)=>()=>({type:"selection",root:t(),getSelection:()=>{const t=e.selection.getRng();return N.some(Nm.range(Ze.fromDom(t.startContainer),t.startOffset,Ze.fromDom(t.endContainer),t.endOffset))}});const UL=e=>t=>({type:"node",root:e(),node:t});const qL=(e,t,o)=>{const n=Ex(e);const s=()=>Ze.fromDom(e.getBody());const r=()=>Ze.fromDom(e.getContentAreaContainer());const a=()=>n||!o();return{inlineDialog:FL(r,t,a),banner:VL(r,t,a),cursor:jL(e,s),node:UL(s)}};const WL=e=>(t,o)=>{const n=QT(e);n(t,o)};const $L=e=>()=>LT(e);const GL=e=>()=>HT(e);const KL=e=>()=>BT(e);const XL=e=>({colorPicker:WL(e),hasCustomColors:$L(e),getColors:GL(e),getColorCols:KL(e)});const YL=e=>()=>gx(e);const JL=e=>({isDraggableModal:YL(e)});const QL=e=>{const t=ea(Tx(e)?"bottom":"top");return{isPositionedAtTop:()=>t.get()==="top",getDockingMode:t.get,setDockingMode:t.set}};const ZL=[{title:"Headings",items:[{title:"Heading 1",format:"h1"},{title:"Heading 2",format:"h2"},{title:"Heading 3",format:"h3"},{title:"Heading 4",format:"h4"},{title:"Heading 5",format:"h5"},{title:"Heading 6",format:"h6"}]},{title:"Inline",items:[{title:"Bold",format:"bold"},{title:"Italic",format:"italic"},{title:"Underline",format:"underline"},{title:"Strikethrough",format:"strikethrough"},{title:"Superscript",format:"superscript"},{title:"Subscript",format:"subscript"},{title:"Code",format:"code"}]},{title:"Blocks",items:[{title:"Paragraph",format:"p"},{title:"Blockquote",format:"blockquote"},{title:"Div",format:"div"},{title:"Pre",format:"pre"}]},{title:"Align",items:[{title:"Left",format:"alignleft"},{title:"Center",format:"aligncenter"},{title:"Right",format:"alignright"},{title:"Justify",format:"alignjustify"}]}];const eH=e=>Ce(e,"items");const tH=e=>Ce(e,"block");const oH=e=>Ce(e,"inline");const nH=e=>Ce(e,"selector");const sH=e=>X(e,((e,t)=>{if(eH(t)){const o=sH(t.items);return{customFormats:e.customFormats.concat(o.customFormats),formats:e.formats.concat([{title:t.title,items:o.formats}])}}else if(oH(t)||tH(t)||nH(t)){const o=c(t.name)?t.name:t.title.toLowerCase();const n=`custom-${o}`;return{customFormats:e.customFormats.concat([{name:n,format:t}]),formats:e.formats.concat([{title:t.title,format:n,icon:t.icon}])}}else{return{...e,formats:e.formats.concat(t)}}}),{customFormats:[],formats:[]});const rH=(e,t)=>{const o=sH(t);const n=t=>{q(t,(t=>{if(!e.formatter.has(t.name)){e.formatter.register(t.name,t.format)}}))};if(e.formatter){n(o.customFormats)}else{e.on("init",(()=>{n(o.customFormats)}))}return o.formats};const aH=e=>K_(e).map((t=>{const o=rH(e,t);return X_(e)?ZL.concat(o):o})).getOr(ZL);const cH=(e,t,o)=>{const n={type:"formatter",isSelected:t(e.format),getStylePreview:o(e.format)};return ys(e,n)};const iH=(e,t,o,n)=>{const s=e=>cH(e,o,n);const r=e=>{const t={type:"submenu"};return ys(e,t)};const a=t=>{const s=c(t.name)?t.name:Zc(t.title);const r=`custom-${s}`;const a={type:"formatter",format:r,isSelected:o(r),getStylePreview:n(r)};const i=ys(t,a);e.formatter.register(s,i);return i};const i=e=>U(e,(e=>{const t=fe(e);if(Se(e,"items")){const t=i(e.items);return ys(r(e),{getStyleItems:x(t)})}else if(Se(e,"format")){return s(e)}else if(t.length===1&&P(t,"title")){return ys(e,{type:"separator"})}else{return a(e)}}));return i(t)};const lH=e=>{const t=t=>()=>e.formatter.match(t);const o=t=>()=>{const o=e.formatter.get(t);return o!==undefined?N.some({tag:o.length>0?o[0].inline||o[0].block||"div":"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):N.none()};const n=e=>{const t=e.items;return t!==undefined&&t.length>0?ee(t,n):[e.format]};const s=ea([]);const r=ea([]);const a=ea([]);const c=ea([]);const i=ea(false);e.on("PreInit",(a=>{const c=aH(e);const i=iH(e,c,t,o);s.set(i);r.set(ee(i,n))}));e.on("addStyleModifications",(s=>{const r=iH(e,s.items,t,o);a.set(r);i.set(s.replace);c.set(ee(r,n))}));const l=()=>{const e=i.get()?[]:s.get();const t=a.get();return e.concat(t)};const d=()=>{const e=i.get()?[]:r.get();const t=c.get();return e.concat(t)};return{getData:l,getFlattenedKeys:d}};const dH=e=>p(e)&&e.nodeType===1;const uH=KN.trim;const fH=e=>t=>{if(dH(t)){if(t.contentEditable===e){return true}if(t.getAttribute("data-mce-contenteditable")===e){return true}}return false};const mH=fH("true");const gH=fH("false");const pH=(e,t,o,n,s)=>({type:e,title:t,url:o,level:n,attach:s});const hH=e=>{while(e=e.parentNode){const t=e.contentEditable;if(t&&t!=="inherit"){return mH(e)}}return false};const yH=(e,t)=>U(Gm(Ze.fromDom(t),e),(e=>e.dom));const bH=e=>e.innerText||e.textContent;const vH=e=>e.id?e.id:Zc("h");const kH=e=>e&&e.nodeName==="A"&&(e.id||e.name)!==undefined;const wH=e=>kH(e)&&xH(e);const _H=e=>e&&/^(H[1-6])$/.test(e.nodeName);const xH=e=>hH(e)&&!gH(e);const zH=e=>_H(e)&&xH(e);const CH=e=>_H(e)?parseInt(e.nodeName.substr(1),10):0;const SH=e=>{const t=vH(e);const o=()=>{e.id=t};return pH("header",bH(e),"#"+t,CH(e),o)};const TH=e=>{const t=e.id||e.name;const o=bH(e);return pH("anchor",o?o:"#"+t,"#"+t,0,v)};const OH=e=>U(G(e,zH),SH);const EH=e=>U(G(e,wH),TH);const DH=e=>{const t=yH("h1,h2,h3,h4,h5,h6,a:not([href])",e);return t};const AH=e=>uH(e.title).length>0;const MH=e=>{const t=DH(e);return G(OH(t).concat(EH(t)),AH)};const NH={find:MH};const RH="tinymce-url-history";const BH=5;const LH=e=>c(e)&&/^https?/.test(e);const HH=e=>d(e)&&e.length<=BH&&te(e,LH);const IH=e=>i(e)&&_e(e,(e=>!HH(e))).isNone();const PH=()=>{const e=TT.getItem(RH);if(e===null){return{}}let t;try{t=JSON.parse(e)}catch(e){if(e instanceof SyntaxError){console.log("Local storage "+RH+" was not valid JSON",e);return{}}throw e}if(!IH(t)){console.log("Local storage "+RH+" was not valid format",t);return{}}return t};const FH=e=>{if(!IH(e)){throw new Error("Bad format for history:\n"+JSON.stringify(e))}TT.setItem(RH,JSON.stringify(e))};const VH=e=>{const t=PH();return ze(t,e).getOr([])};const jH=(e,t)=>{if(!LH(e)){return}const o=PH();const n=ze(o,t).getOr([]);const s=G(n,(t=>t!==e));o[t]=[e].concat(s).slice(0,BH);FH(o)};const UH=e=>!!e;const qH=e=>pe(KN.makeMap(e,/[, ]/),UH);const WH=e=>N.from(ix(e));const $H=e=>{const t=N.from(dx(e)).filter(UH).map(qH);return WH(e).fold(D,(e=>t.fold(A,(e=>fe(e).length>0?e:false))))};const GH=(e,t)=>{const o=$H(e);if(f(o)){return o?WH(e):N.none()}else{return o[t]?WH(e):N.none()}};const KH=(e,t)=>GH(e,t).map((o=>n=>GE.nu((s=>{const r=(e,t)=>{if(!c(e)){throw new Error("Expected value to be string")}if(t!==undefined&&!i(t)){throw new Error("Expected meta to be a object")}const o={value:e,meta:t};s(o)};const a={filetype:t,fieldname:n.fieldname,...N.from(n.meta).getOr({})};o.call(e,r,n.value,a)}))));const XH=e=>N.from(e).filter(c).getOrUndefined();const YH=e=>{if(!ux(e)){return N.none()}return N.some({targets:NH.find(e.getBody()),anchorTop:XH(fx(e)),anchorBottom:XH(mx(e))})};const JH=e=>N.from(lx(e));const QH=e=>({getHistory:VH,addToHistory:jH,getLinkInformation:()=>YH(e),getValidationHandler:()=>JH(e),getUrlPicker:t=>KH(e,t)});const ZH=(e,t,o)=>{const n=ea(false);const s=QL(t);const r={shared:{providers:{icons:()=>t.ui.registry.getAll().icons,menuItems:()=>t.ui.registry.getAll().menuItems,translate:h_.translate,isDisabled:()=>t.mode.isReadOnly()||!t.ui.isEnabled(),getOption:t.options.get},interpreter:e=>vL(e,{},r),anchors:qL(t,o,s.isPositionedAtTop),header:s,getSink:e},urlinput:QH(t),styles:lH(t),colorinput:XL(t),dialog:JL(t),isContextMenuOpen:()=>n.get(),setContextMenuState:e=>n.set(e)};return r};const eI=(e,t,o)=>{const n=(e,n)=>{q([t,o],(t=>{t.broadcastEvent(e,n)}))};const s=(e,n)=>{q([t,o],(t=>{t.broadcastOn([e],n)}))};const r=e=>s(zp(),{target:e.target});const a=Ln();const c=gf(a,"touchstart",r);const i=gf(a,"touchmove",(e=>n(nc(),e)));const l=gf(a,"touchend",(e=>n(sc(),e)));const d=gf(a,"mousedown",r);const u=gf(a,"mouseup",(e=>{if(e.raw.button===0){s(Sp(),{target:e.target})}}));const f=e=>s(zp(),{target:Ze.fromDom(e.target)});const m=e=>{if(e.button===0){s(Sp(),{target:Ze.fromDom(e.target)})}};const g=()=>{q(e.editorManager.get(),(t=>{if(e!==t){t.dispatch("DismissPopups",{relatedTarget:e})}}))};const p=e=>n(rc(),hf(e));const h=e=>{s(Cp(),{});n(ac(),hf(e))};const y=()=>s(Cp(),{});const b=t=>{if(t.state){s(zp(),{target:Ze.fromDom(e.getContainer())})}};const v=e=>{s(zp(),{target:Ze.fromDom(e.relatedTarget.getContainer())})};e.on("PostRender",(()=>{e.on("click",f);e.on("tap",f);e.on("mouseup",m);e.on("mousedown",g);e.on("ScrollWindow",p);e.on("ResizeWindow",h);e.on("ResizeEditor",y);e.on("AfterProgressState",b);e.on("DismissPopups",v)}));e.on("remove",(()=>{e.off("click",f);e.off("tap",f);e.off("mouseup",m);e.off("mousedown",g);e.off("ScrollWindow",p);e.off("ResizeWindow",h);e.off("ResizeEditor",y);e.off("AfterProgressState",b);e.off("DismissPopups",v);d.unbind();c.unbind();i.unbind();l.unbind();u.unbind()}));e.on("detach",(()=>{np(t);np(o);t.destroy();o.destroy()}))};const tI=cy;const oI=Uh;const nI=x([qr("shell",false),zr("makeItem"),qr("setupItem",v),lh.field("listBehaviours",[Xk])]);const sI=()=>({behaviours:xu([Xk.config({})])});const rI=Fh({name:"items",overrides:sI});const aI=x([rI]);const cI=x("CustomList");const iI=(e,t,o,n)=>{const s=(t,o)=>{a(t).fold((()=>{console.error("Custom List was defined to not be a shell, but no item container was specified in components");throw new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(n=>{const s=Xk.contents(n);const r=o.length;const a=r-s.length;const c=a>0?V(a,(()=>e.makeItem())):[];const i=s.slice(r);q(i,(e=>Xk.remove(n,e)));q(c,(e=>Xk.append(n,e)));const l=Xk.contents(n);q(l,((n,s)=>{e.setupItem(t,n,o[s],s)}))}))};const r=e.shell?{behaviours:[Xk.config({})],components:[]}:{behaviours:[],components:t};const a=t=>e.shell?N.some(t):Zh(t,e,"items");return{uid:e.uid,dom:e.dom,components:r.components,behaviours:ih(e.listBehaviours,r.behaviours),apis:{setItems:s}}};const lI=by({name:cI(),configFields:nI(),partFields:aI(),factory:iI,apis:{setItems:(e,t,o)=>{e.setItems(t,o)}}});const dI=x([zr("dom"),qr("shell",true),ah("toolbarBehaviours",[Xk])]);const uI=()=>({behaviours:xu([Xk.config({})])});const fI=x([Fh({name:"groups",overrides:uI})]);const mI=(e,t,o,n)=>{const s=(e,t)=>{r(e).fold((()=>{console.error("Toolbar was defined to not be a shell, but no groups container was specified in components");throw new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(e=>{Xk.set(e,t)}))};const r=t=>e.shell?N.some(t):Zh(t,e,"groups");const a=e.shell?{behaviours:[Xk.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:a.components,behaviours:ih(e.toolbarBehaviours,a.behaviours),apis:{setGroups:s},domModification:{attributes:{role:"group"}}}};const gI=by({name:"Toolbar",configFields:dI(),partFields:fI(),factory:mI,apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)}}});const pI=v;const hI=D;const yI=x([]);var bI=Object.freeze({__proto__:null,setup:pI,isDocked:hI,getBehaviours:yI});const vI=e=>{const t=Te(ro(e,"position"),"fixed");const o=t?N.none():zt(e);return o.orThunk((()=>{const t=Ze.fromTag("span");return _t(e).bind((e=>{Sn(e,t);const o=zt(t);Dn(t);return o}))}))};const kI=e=>vI(e).map(ko).getOrThunk((()=>yo(0,0)));const wI=oa.generate([{static:[]},{absolute:["positionCss"]},{fixed:["positionCss"]}]);const _I=(e,t)=>{const o=e.element;tl(o,t.transitionClass);nl(o,t.fadeOutClass);tl(o,t.fadeInClass);t.onShow(e)};const xI=(e,t)=>{const o=e.element;tl(o,t.transitionClass);nl(o,t.fadeInClass);tl(o,t.fadeOutClass);t.onHide(e)};const zI=(e,t)=>e.y<t.bottom&&e.bottom>t.y;const CI=(e,t)=>e.y>=t.y;const SI=(e,t)=>e.bottom<=t.bottom;const TI=(e,t,o)=>te(e,(e=>{switch(e){case"bottom":return SI(t,o);case"top":return CI(t,o)}}));const OI=(e,t)=>t.getInitialPos().map((t=>Wn(t.bounds.x,t.bounds.y,zo(e),mo(e))));const EI=(e,t,o)=>{o.setInitialPos({style:ao(e),position:no(e,"position")||"static",bounds:t})};const DI=(e,t,o)=>o.getInitialPos().bind((n=>{o.clearInitialPos();switch(n.position){case"static":return N.some(wI.static());case"absolute":const o=vI(e).map($n).getOrThunk((()=>$n(jt())));return N.some(wI.absolute(Iu("absolute",ze(n.style,"left").map((e=>t.x-o.x)),ze(n.style,"top").map((e=>t.y-o.y)),ze(n.style,"right").map((e=>o.right-t.right)),ze(n.style,"bottom").map((e=>o.bottom-t.bottom)))));default:return N.none()}}));const AI=(e,t,o)=>OI(e,o).filter((e=>TI(o.getModes(),e,t))).bind((t=>DI(e,t,o)));const MI=(e,t,o)=>{const n=$n(e);if(!TI(o.getModes(),n,t)){EI(e,n,o);const s=Kn();const r=n.x-s.x;const a=t.y-s.y;const c=s.bottom-t.bottom;const i=n.y<=t.y;return N.some(wI.fixed(Iu("fixed",N.some(r),i?N.some(a):N.none(),N.none(),!i?N.some(c):N.none())))}else{return N.none()}};const NI=(e,t,o)=>{const n=e.element;const s=Te(ro(n,"position"),"fixed");return s?AI(n,t,o):MI(n,t,o)};const RI=(e,t)=>{const o=e.element;return OI(o,t).bind((e=>DI(o,e,t)))};const BI=(e,t,o)=>{o.setDocked(false);q(["left","right","top","bottom","position"],(t=>io(e.element,t)));t.onUndocked(e)};const LI=(e,t,o,n)=>{const s=n.position==="fixed";o.setDocked(s);Fu(e.element,n);const r=s?t.onDocked:t.onUndocked;r(e)};const HI=(e,t,o,n,s=false)=>{t.contextual.each((t=>{t.lazyContext(e).each((r=>{const a=zI(r,n);if(a!==o.isVisible()){o.setVisible(a);if(s&&!a){rl(e.element,[t.fadeOutClass]);t.onHide(e)}else{const o=a?_I:xI;o(e,t)}}}))}))};const II=(e,t,o)=>{const n=t.lazyViewport(e);const s=o.isDocked();if(s){HI(e,t,o,n)}NI(e,n,o).each((s=>{s.fold((()=>BI(e,t,o)),(n=>LI(e,t,o,n)),(s=>{HI(e,t,o,n,true);LI(e,t,o,s)}))}))};const PI=(e,t,o)=>{const n=e.element;o.setDocked(false);RI(e,o).each((n=>{n.fold((()=>BI(e,t,o)),(n=>LI(e,t,o,n)),v)}));o.setVisible(true);t.contextual.each((t=>{al(n,[t.fadeInClass,t.fadeOutClass,t.transitionClass]);t.onShow(e)}));FI(e,t,o)};const FI=(e,t,o)=>{if(e.getSystem().isConnected()){II(e,t,o)}};const VI=(e,t,o)=>{if(o.isDocked()){PI(e,t,o)}};const jI=(e,t,o)=>o.isDocked();const UI=(e,t,o,n)=>o.setModes(n);const qI=(e,t,o)=>o.getModes();var WI=Object.freeze({__proto__:null,refresh:FI,reset:VI,isDocked:jI,getModes:qI,setModes:UI});const $I=(e,t)=>xc([Lc(Va(),((o,n)=>{e.contextual.each((e=>{if(sl(o.element,e.transitionClass)){al(o.element,[e.transitionClass,e.fadeInClass]);const n=t.isVisible()?e.onShown:e.onHidden;n(o)}n.stop()}))})),Tc(rc(),((o,n)=>{FI(o,e,t)})),Tc(ac(),((o,n)=>{VI(o,e,t)}))]);var GI=Object.freeze({__proto__:null,events:$I});var KI=[jr("contextual",[Tr("fadeInClass"),Tr("fadeOutClass"),Tr("transitionClass"),Dr("lazyContext"),bd("onShow"),bd("onShown"),bd("onHide"),bd("onHidden")]),Yr("lazyViewport",Kn),Qr("modes",["top","bottom"],sr),bd("onDocked"),bd("onUndocked")];const XI=e=>{const t=ea(false);const o=ea(true);const n=ff();const s=ea(e.modes);const r=()=>`docked: ${t.get()}, visible: ${o.get()}, modes: ${s.get().join(",")}`;return wi({isDocked:t.get,setDocked:t.set,getInitialPos:n.get,setInitialPos:n.set,clearInitialPos:n.clear,isVisible:o.get,setVisible:o.set,getModes:s.get,setModes:s.set,readState:r})};var YI=Object.freeze({__proto__:null,init:XI});const JI=Cu({fields:KI,name:"docking",active:GI,apis:WI,state:YI});const QI=x(Zc("toolbar-height-change"));const ZI={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"};const eP="tox-tinymce--toolbar-sticky-on";const tP="tox-tinymce--toolbar-sticky-off";const oP=(e,t)=>{const o=bt(t);const n=o.dom.defaultView.innerHeight;const s=An(o);const r=Ze.fromDom(e.elm);const a=Gn(r);const c=mo(r);const i=a.y;const l=i+c;const d=ko(t);const u=mo(t);const f=d.top;const m=f+u;const g=Math.abs(f-s.top)<2;const p=Math.abs(m-(s.top+n))<2;if(g&&i<m){Mn(s.left,i-u,o)}else if(p&&l>f){const e=i-n+c+u;Mn(s.left,e,o)}};const nP=(e,t)=>P(JI.getModes(e),t);const sP=e=>{const t=e=>go(e)+(parseInt(no(e,"margin-top"),10)||0)+(parseInt(no(e,"margin-bottom"),10)||0);const o=e.element;_t(o).each((n=>{const s="padding-"+JI.getModes(e)[0];if(JI.isDocked(e)){const e=zo(n);eo(o,"width",e+"px");eo(n,s,t(o)+"px")}else{io(o,"width");io(n,s)}}))};const rP=(e,t)=>{if(t){nl(e,ZI.fadeOutClass);rl(e,[ZI.transitionClass,ZI.fadeInClass])}else{nl(e,ZI.fadeInClass);rl(e,[ZI.fadeOutClass,ZI.transitionClass])}};const aP=(e,t)=>{const o=Ze.fromDom(e.getContainer());if(t){tl(o,eP);nl(o,tP)}else{tl(o,tP);nl(o,eP)}};const cP=(e,t)=>{const o=bt(t);Bu(o).filter((e=>!ht(t,e))).filter((t=>ht(t,Ze.fromDom(o.dom.body))||yt(e,t))).each((()=>Mu(t)))};const iP=(e,t)=>Lu(e).orThunk((()=>t().toOptional().bind((e=>Lu(e.element)))));const lP=(e,t,o)=>{if(!e.inline){if(!t.header.isPositionedAtTop()){e.on("ResizeEditor",(()=>{o().each(JI.reset)}))}e.on("ResizeWindow ResizeEditor",(()=>{o().each(sP)}));e.on("SkinLoaded",(()=>{o().each((e=>{JI.isDocked(e)?JI.reset(e):JI.refresh(e)}))}));e.on("FullscreenStateChanged",(()=>{o().each(JI.reset)}))}e.on("AfterScrollIntoView",(e=>{o().each((t=>{JI.refresh(t);const o=t.element;if(nv(o)){oP(e,o)}}))}));e.on("PostRender",(()=>{aP(e,false)}))};const dP=e=>e().map(JI.isDocked).getOr(false);const uP=()=>[Eu.config({channels:{[QI()]:{onReceive:sP}}})];const fP=(e,t)=>{const o=ff();const n=t.getSink;const s=e=>{n().each((t=>e(t.element)))};const r=t=>{if(!e.inline){sP(t)}aP(e,JI.isDocked(t));t.getSystem().broadcastOn([Cp()],{});n().each((e=>e.getSystem().broadcastOn([Cp()],{})))};const a=e.inline?[]:uP();return[aw.config({}),JI.config({contextual:{lazyContext:t=>{const o=go(t.element);const n=e.inline?e.getContentAreaContainer():e.getContainer();const s=$n(Ze.fromDom(n));const r=s.height-o;const a=s.y+(nP(t,"top")?0:o);return N.some(Wn(s.x,a,s.width,r))},onShow:()=>{s((e=>rP(e,true)))},onShown:e=>{s((e=>al(e,[ZI.transitionClass,ZI.fadeInClass])));o.get().each((t=>{cP(e.element,t);o.clear()}))},onHide:e=>{iP(e.element,n).fold(o.clear,o.set);s((e=>rP(e,false)))},onHidden:()=>{s((e=>al(e,[ZI.transitionClass])))},...ZI},lazyViewport:t=>{const o=Kn();const n=rx(e);const s=o.y+(nP(t,"top")?n:0);const r=o.height-(nP(t,"bottom")?n:0);return Wn(o.x,s,o.width,r)},modes:[t.header.getDockingMode()],onDocked:r,onUndocked:r}),...a]};var mP=Object.freeze({__proto__:null,setup:lP,isDocked:dP,getBehaviours:fP});const gP=e=>{const t=e.editor;const o=e.sticky?fP:yI;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:xu(o(t,e.sharedBackstage))}};const pP=Xs([Cz,Cr("items",Js([er([Sz,Rr("items",sr)]),sr]))].concat(rC));const hP=e=>pr("GroupToolbarButton",pP,e);const yP=[Ir("text"),Ir("tooltip"),Ir("icon"),Dr("fetch"),Yr("onSetup",(()=>v))];const bP=Xs([Cz,...yP]);const vP=e=>pr("menubutton",bP,e);const kP=Xs([Cz,Fz,Pz,Iz,Uz,Mz,Lz,Kr("presets","normal",["normal","color","listpreview"]),Kz(1),Rz,Bz]);const wP=e=>pr("SplitButton",kP,e);const _P=(e,t)=>{const o=(e,o)=>{const n=U(o,(e=>{const o={type:"menubutton",text:e.text,fetch:t=>{t(e.getItems())}};const n=vP(o).mapError((e=>br(e))).getOrDie();return RB(n,"tox-mbtn",t.backstage,N.some("menuitem"))}));Xk.set(e,n)};const n={focus:Bk.focusIn,setMenus:o};return{uid:e.uid,dom:e.dom,components:[],behaviours:xu([Xk.config({}),Jk("menubar-events",[Hc((t=>{e.onSetup(t)})),Tc(Ma(),((e,t)=>{Gl(e.element,"."+"tox-mbtn--active").each((o=>{Kl(t.event.target,"."+"tox-mbtn").each((t=>{if(!ht(o,t)){e.getSystem().getByDom(o).each((o=>{e.getSystem().getByDom(t).each((e=>{DD.expand(e);DD.close(o);aw.focus(e)}))}))}}))}))})),Tc(uc(),((e,t)=>{t.event.prevFocus.bind((t=>e.getSystem().getByDom(t).toOptional())).each((o=>{t.event.newFocus.bind((t=>e.getSystem().getByDom(t).toOptional())).each((e=>{if(DD.isOpen(o)){DD.expand(e);DD.close(o)}}))}))}))]),Bk.config({mode:"flow",selector:"."+"tox-mbtn",onEscape:t=>{e.onEscape(t);return N.some(true)}}),hE.config({})]),apis:n,domModification:{attributes:{role:"menubar"}}}};var xP=yy({factory:_P,name:"silver.Menubar",configFields:[zr("dom"),zr("uid"),zr("onEscape"),zr("backstage"),qr("onSetup",v)],apis:{focus:(e,t)=>{e.focus(t)},setMenus:(e,t,o)=>{e.setMenus(t,o)}}});const zP=(e,t)=>t.getAnimationRoot.fold((()=>e.element),(t=>t(e)));const CP=e=>e.dimension.property;const SP=(e,t)=>e.dimension.getDimension(t);const TP=(e,t)=>{const o=zP(e,t);al(o,[t.shrinkingClass,t.growingClass])};const OP=(e,t)=>{nl(e.element,t.openClass);tl(e.element,t.closedClass);eo(e.element,CP(t),"0px");lo(e.element)};const EP=(e,t)=>{nl(e.element,t.closedClass);tl(e.element,t.openClass);io(e.element,CP(t))};const DP=(e,t,o,n)=>{o.setCollapsed();eo(e.element,CP(t),SP(t,e.element));lo(e.element);TP(e,t);OP(e,t);t.onStartShrink(e);t.onShrunk(e)};const AP=(e,t,o,n)=>{const s=n.getOrThunk((()=>SP(t,e.element)));o.setCollapsed();eo(e.element,CP(t),s);lo(e.element);const r=zP(e,t);nl(r,t.growingClass);tl(r,t.shrinkingClass);OP(e,t);t.onStartShrink(e)};const MP=(e,t,o)=>{const n=SP(t,e.element);const s=n==="0px"?DP:AP;s(e,t,o,N.some(n))};const NP=(e,t,o)=>{const n=zP(e,t);const s=sl(n,t.shrinkingClass);const r=SP(t,e.element);EP(e,t);const a=SP(t,e.element);const c=()=>{eo(e.element,CP(t),r);lo(e.element)};const i=()=>{OP(e,t)};const l=s?c:i;l();nl(n,t.shrinkingClass);tl(n,t.growingClass);EP(e,t);eo(e.element,CP(t),a);o.setExpanded();t.onStartGrow(e)};const RP=(e,t,o)=>{if(o.isExpanded()){io(e.element,CP(t));const o=SP(t,e.element);eo(e.element,CP(t),o)}};const BP=(e,t,o)=>{if(!o.isExpanded()){NP(e,t,o)}};const LP=(e,t,o)=>{if(o.isExpanded()){MP(e,t,o)}};const HP=(e,t,o)=>{if(o.isExpanded()){DP(e,t,o)}};const IP=(e,t,o)=>o.isExpanded();const PP=(e,t,o)=>o.isCollapsed();const FP=(e,t,o)=>{const n=zP(e,t);return sl(n,t.growingClass)===true};const VP=(e,t,o)=>{const n=zP(e,t);return sl(n,t.shrinkingClass)===true};const jP=(e,t,o)=>FP(e,t)||VP(e,t);const UP=(e,t,o)=>{const n=o.isExpanded()?MP:NP;n(e,t,o)};var qP=Object.freeze({__proto__:null,refresh:RP,grow:BP,shrink:LP,immediateShrink:HP,hasGrown:IP,hasShrunk:PP,isGrowing:FP,isShrinking:VP,isTransitioning:jP,toggleGrow:UP,disableTransitions:TP});const WP=(e,t,o)=>{const n=t.expanded;return n?Si({classes:[t.openClass],styles:{}}):Si({classes:[t.closedClass],styles:ia(t.dimension.property,"0px")})};const $P=(e,t)=>xc([Lc(Va(),((o,n)=>{const s=n.event.raw;if(s.propertyName===e.dimension.property){TP(o,e);if(t.isExpanded()){io(o.element,e.dimension.property)}const n=t.isExpanded()?e.onGrown:e.onShrunk;n(o)}}))]);var GP=Object.freeze({__proto__:null,exhibit:WP,events:$P});var KP=[zr("closedClass"),zr("openClass"),zr("shrinkingClass"),zr("growingClass"),Br("getAnimationRoot"),bd("onShrunk"),bd("onStartShrink"),bd("onGrown"),bd("onStartGrow"),qr("expanded",false),Cr("dimension",vr("property",{width:[_d("property","width"),_d("getDimension",(e=>zo(e)+"px"))],height:[_d("property","height"),_d("getDimension",(e=>mo(e)+"px"))]}))];const XP=e=>{const t=ea(e.expanded);const o=()=>"expanded: "+t.get();return wi({isExpanded:()=>t.get()===true,isCollapsed:()=>t.get()===false,setCollapsed:S(t.set,false),setExpanded:S(t.set,true),readState:o})};var YP=Object.freeze({__proto__:null,init:XP});const JP=Cu({fields:KP,name:"sliding",active:GP,apis:qP,state:YP});const QP="container";const ZP=[ah("slotBehaviours",[])];const eF=e=>"<alloy.field."+e+">";const tF=e=>{const t=(()=>{const e=[];const t=(t,o)=>{e.push(t);return Kh(QP,eF(t),o)};return{slot:t,record:x(e)}})();const o=e(t);const n=t.record();const s=U(n,(e=>Ih({name:e,pname:eF(e)})));return uy(QP,ZP,s,oF,o)};const oF=(e,t)=>{const o=t=>ny(e);const n=(t,o)=>Zh(t,e,o);const s=(t,o)=>(n,s)=>Zh(n,e,s).map((e=>t(e,s))).getOr(o);const r=e=>(t,o)=>{q(o,(o=>e(t,o)))};const a=(e,t)=>Gt(e.element,"aria-hidden")!=="true";const c=(e,t)=>{if(!a(e)){const o=e.element;io(o,"display");Yt(o,"aria-hidden");bc(e,fc(),{name:t,visible:true})}};const i=(e,t)=>{if(a(e)){const o=e.element;eo(o,"display","none");Wt(o,"aria-hidden","true");bc(e,fc(),{name:t,visible:false})}};const l=s(a,false);const d=s(i);const u=r(d);const f=e=>u(e,o());const m=s(c);const g={getSlotNames:o,getSlot:n,isShowing:l,hideSlot:d,hideAllSlots:f,showSlot:m};return{uid:e.uid,dom:e.dom,components:t,behaviours:ch(e.slotBehaviours),apis:g}};const nF=pe({getSlotNames:(e,t)=>e.getSlotNames(t),getSlot:(e,t,o)=>e.getSlot(t,o),isShowing:(e,t,o)=>e.isShowing(t,o),hideSlot:(e,t,o)=>e.hideSlot(t,o),hideAllSlots:(e,t)=>e.hideAllSlots(t),showSlot:(e,t,o)=>e.showSlot(t,o)},(e=>vi(e)));const sF={...nF,...{sketch:tF}};const rF=Xs([Pz,Fz,Yr("onShow",v),Yr("onHide",v),Lz]);const aF=e=>pr("sidebar",rF,e);const cF=e=>{const{sidebars:t}=e.ui.registry.getAll();q(fe(t),(o=>{const n=t[o];const s=()=>Te(N.from(e.queryCommandValue("ToggleSidebar")),o);e.ui.registry.addToggleButton(o,{icon:n.icon,tooltip:n.tooltip,onAction:t=>{e.execCommand("ToggleSidebar",false,o);t.setActive(s())},onSetup:t=>{const o=()=>t.setActive(s());e.on("ToggleSidebar",o);return()=>{e.off("ToggleSidebar",o)}}})}))};const iF=e=>({element:()=>e.element.dom});const lF=(e,t)=>{const o=U(fe(t),(e=>{const o=t[e];const n=hr(aF(o));return{name:e,getApi:iF,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return U(o,(t=>{const n=ea(v);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:$C.unnamedEvents([yS(t,n),bS(t,n),Tc(fc(),((e,t)=>{const n=t.event;const s=J(o,(e=>e.name===n.name));s.each((t=>{const o=n.visible?t.onShow:t.onHide;o(t.getApi(e))}))}))])})}))};const dF=e=>sF.sketch((t=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:lF(t,e),slotBehaviours:$C.unnamedEvents([Hc((e=>sF.hideAllSlots(e)))])})));const uF=(e,t)=>{const o=xy.getCurrent(e);o.each((e=>Xk.set(e,[dF(t)])))};const fF=(e,t)=>{const o=xy.getCurrent(e);o.each((e=>{const o=xy.getCurrent(e);o.each((o=>{if(JP.hasGrown(e)){if(sF.isShowing(o,t)){JP.shrink(e)}else{sF.hideAllSlots(o);sF.showSlot(o,t)}}else{sF.hideAllSlots(o);sF.showSlot(o,t);JP.grow(e)}}))}))};const mF=e=>{const t=xy.getCurrent(e);return t.bind((e=>{const t=JP.isGrowing(e)||JP.hasGrown(e);if(t){const t=xy.getCurrent(e);return t.bind((e=>J(sF.getSlotNames(e),(t=>sF.isShowing(e,t)))))}else{return N.none()}}))};const gF=Zc("FixSizeEvent");const pF=Zc("AutoSizeEvent");const hF=e=>({uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"complementary"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:xu([hE.config({}),aw.config({}),JP.config({dimension:{property:"width"},closedClass:"tox-sidebar--sliding-closed",openClass:"tox-sidebar--sliding-open",shrinkingClass:"tox-sidebar--sliding-shrinking",growingClass:"tox-sidebar--sliding-growing",onShrunk:e=>{const t=xy.getCurrent(e);t.each(sF.hideAllSlots);yc(e,pF)},onGrown:e=>{yc(e,pF)},onStartGrow:e=>{bc(e,gF,{width:ro(e.element,"width").getOr("")})},onStartShrink:e=>{bc(e,gF,{width:zo(e.element)+"px"})}}),Xk.config({}),xy.config({find:e=>{const t=Xk.contents(e);return ie(t)}})])}],behaviours:xu([NN.childAt(0),Jk("sidebar-sliding-events",[Tc(gF,((e,t)=>{eo(e.element,"width",t.event.width)})),Tc(pF,((e,t)=>{io(e.element,"width")}))])])});const yF=(e,t,o,n)=>{Wt(e.element,"aria-busy",true);const s=t.getRoot(e).getOr(e);const r=xu([Bk.config({mode:"special",onTab:()=>N.some(true),onShiftTab:()=>N.some(true)}),aw.config({})]);const a=n(s,r);const c=s.getSystem().build(a);Xk.append(s,Il(c));if(c.hasConfigured(Bk)&&t.focus){Bk.focusIn(c)}if(!o.isBlocked()){t.onBlock(e)}o.blockWith((()=>Xk.remove(s,c)))};const bF=(e,t,o)=>{Yt(e.element,"aria-busy");if(o.isBlocked()){t.onUnblock(e)}o.clear()};var vF=Object.freeze({__proto__:null,block:yF,unblock:bF});var kF=[Yr("getRoot",N.none),Xr("focus",true),bd("onBlock"),bd("onUnblock")];const wF=()=>{const e=df();const t=t=>{e.set({destroy:t})};return wi({readState:e.isSet,blockWith:t,clear:e.clear,isBlocked:e.isSet})};var _F=Object.freeze({__proto__:null,init:wF});const xF=Cu({fields:kF,name:"blocking",apis:vF,state:_F});const zF=e=>{const t=e.dom.attributes!==undefined?e.dom.attributes:[];return X(t,((e,t)=>{if(t.name==="class"){return e}else{return{...e,[t.name]:t.value}}}),{})};const CF=e=>Array.prototype.slice.call(e.dom.classList,0);const SF=e=>{const t=Ze.fromHtml(e);const o=St(t);const n=zF(t);const s=CF(t);const r=o.length===0?{}:{innerHtml:jc(t)};return{tag:st(t),classes:s,attributes:n,...r}};const TF=e=>(t,o)=>({dom:{tag:"div",attributes:{"aria-label":e.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:SF('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]});const OF=e=>xy.getCurrent(e).each((e=>Mu(e.element)));const EF=(e,t)=>{const o="tabindex";const n=`data-mce-${o}`;N.from(e.iframeElement).map(Ze.fromDom).each((e=>{if(t){Kt(e,o).each((t=>Wt(e,n,t)));Wt(e,o,-1)}else{Yt(e,o);Kt(e,n).each((t=>{Wt(e,o,t);Yt(e,n)}))}}))};const DF=(e,t,o,n)=>{const s=t.element;EF(e,o);if(o){xF.block(t,TF(n));io(s,"display");Yt(s,"aria-hidden");if(e.hasFocus()){OF(t)}}else{const o=xy.getCurrent(t).exists((e=>Ru(e.element)));xF.unblock(t);eo(s,"display","none");Wt(s,"aria-hidden","true");if(o){e.focus()}}};const AF=e=>({uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:xu([Xk.config({}),xF.config({focus:false}),xy.config({find:e=>ie(e.components())})]),components:[]});const MF=e=>e.type==="focusin";const NF=e=>{if(MF(e)){const t=e.composed?ie(e.composedPath()):N.from(e.target);return t.map(Ze.fromDom).filter(ct).exists((e=>sl(e,"mce-pastebin")))}else{return false}};const RF=(e,t,o)=>{const n=ea(false);const s=ff();const r=o=>{if(n.get()&&!NF(o)){o.preventDefault();OF(t());e.editorManager.setActive(e)}};if(!e.inline){e.on("PreInit",(()=>{e.dom.bind(e.getWin(),"focusin",r);e.on("BeforeExecCommand",(e=>{if(e.command.toLowerCase()==="mcefocus"&&e.value!==true){r(e)}}))}))}const a=s=>{if(s!==n.get()){n.set(s);DF(e,t(),s,o.providers);e.dispatch("AfterProgressState",{state:s})}};e.on("ProgressState",(t=>{s.on(clearTimeout);if(y(t.time)){const o=f_.setEditorTimeout(e,(()=>a(t.state)),t.time);s.set(o)}else{a(t.state);s.clear()}}))};const BF=(e,t)=>{const o={len:0,list:[]};const n=X(e,((e,o)=>{const n=t(o,e.len);return n.fold(x(e),(t=>({len:t.finish,list:e.list.concat([t])})))}),o);return n.list};const LF=(e,t,o)=>({within:e,extra:t,withinWidth:o});const HF=(e,t,o)=>{const n=BF(e,((e,t)=>{const n=o(e);return N.some({element:e,start:t,finish:t+n,width:n})}));const s=G(n,(e=>e.finish<=t));const r=K(s,((e,t)=>e+t.width),0);const a=n.slice(s.length);return{within:s,extra:a,withinWidth:r}};const IF=e=>U(e,(e=>e.element));const PF=(e,t,o)=>{const n=IF(e.concat(t));return LF(n,[],o)};const FF=(e,t,o,n)=>{const s=IF(e).concat([o]);return LF(s,IF(t),n)};const VF=(e,t,o)=>LF(IF(e),[],o);const jF=(e,t,o)=>{const n=HF(t,e,o);return n.extra.length===0?N.some(n):N.none()};const UF=(e,t,o,n)=>{const s=jF(e,t,o).getOrThunk((()=>HF(t,e-o(n),o)));const r=s.within;const a=s.extra;const c=s.withinWidth;if(a.length===1&&a[0].width<=o(n)){return PF(r,a,c)}else if(a.length>=1){return FF(r,a,n,c)}else{return VF(r,a,c)}};const qF=(e,t)=>{const o=U(t,(e=>Il(e)));gI.setGroups(e,o)};const WF=e=>ue(e,(e=>Lu(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()))));const $F=(e,t,o)=>{const n=t.builtGroups.get();if(n.length===0){return}const s=ey(e,t,"primary");const r=uD.getCoupled(e,"overflowGroup");eo(s.element,"visibility","hidden");const a=n.concat([r]);const c=WF(a);o([]);qF(s,a);const i=zo(s.element);const l=UF(i,t.builtGroups.get(),(e=>zo(e.element)),r);if(l.extra.length===0){Xk.remove(s,r);o([])}else{qF(s,l.within);o(l.extra)}io(s.element,"visibility");lo(s.element);c.each(aw.focus)};const GF=x([ah("splitToolbarBehaviours",[uD]),_r("builtGroups",(()=>ea([])))]);const KF=x([hd(["overflowToggledClass"]),Fr("getOverflowBounds"),zr("lazySink"),_r("overflowGroups",(()=>ea([])))].concat(GF()));const XF=x([Ih({factory:gI,schema:dI(),name:"primary"}),Ph({schema:dI(),name:"overflow"}),Ph({name:"overflow-button"}),Ph({name:"overflow-group"})]);const YF=x(((e,t)=>{So(e,Math.floor(t))}));const JF=x([hd(["toggledClass"]),zr("lazySink"),Dr("fetch"),Fr("getBounds"),jr("fireDismissalEventInstead",[qr("event",lc())]),Kf()]);const QF=x([Ph({name:"button",overrides:e=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:xu([Cw.config({toggleClass:e.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:false})])})}),Ph({factory:gI,schema:dI(),name:"toolbar",overrides:e=>({toolbarBehaviours:xu([Bk.config({mode:"cyclic",onEscape:t=>{Zh(t,e,"button").each(aw.focus);return N.none()}})])})})]);const ZF=(e,t)=>{const o=uD.getCoupled(e,"toolbarSandbox");if(xp.isOpen(o)){xp.close(o)}else{xp.open(o,t.toolbar())}};const eV=(e,t,o,n)=>{const s=o.getBounds.map((e=>e()));const r=o.lazySink(e).getOrDie();Pg.positionWithinBounds(r,t,{anchor:{type:"hotspot",hotspot:e,layouts:n,overrides:{maxWidthFunction:YF()}}},s)};const tV=(e,t,o,n,s)=>{gI.setGroups(t,s);eV(e,t,o,n);Cw.on(e)};const oV=(e,t,o)=>{const n=Jl();const s=(s,r)=>{o.fetch().get((s=>{tV(e,r,o,t.layouts,s);n.link(e.element);Bk.focusIn(r)}))};const r=()=>{Cw.off(e);aw.focus(e);n.unlink(e.element)};return{dom:{tag:"div",attributes:{id:n.id}},behaviours:xu([Bk.config({mode:"special",onEscape:e=>{xp.close(e);return N.some(true)}}),xp.config({onOpen:s,onClose:r,isPartOf:(t,o,n)=>Zl(o,n)||Zl(e,n),getAttachPoint:()=>o.lazySink(e).getOrDie()}),Eu.config({channels:{...Op({isExtraPart:D,...o.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...Dp({doReposition:()=>{xp.getState(uD.getCoupled(e,"toolbarSandbox")).each((n=>{eV(e,n,o,t.layouts)}))}})}})])}};const nV=(e,t,o,n)=>({...g_.sketch({...n.button(),action:e=>{ZF(e,n)},buttonBehaviours:lh.augment({dump:n.button().buttonBehaviours},[uD.config({others:{toolbarSandbox:t=>oV(t,o,e)}})])}),apis:{setGroups:(t,n)=>{xp.getState(uD.getCoupled(t,"toolbarSandbox")).each((s=>{tV(t,s,e,o.layouts,n)}))},reposition:t=>{xp.getState(uD.getCoupled(t,"toolbarSandbox")).each((n=>{eV(t,n,e,o.layouts)}))},toggle:e=>{ZF(e,n)},getToolbar:e=>xp.getState(uD.getCoupled(e,"toolbarSandbox")),isOpen:e=>xp.isOpen(uD.getCoupled(e,"toolbarSandbox"))}});const sV=by({name:"FloatingToolbarButton",factory:nV,configFields:JF(),partFields:QF(),apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},reposition:(e,t)=>{e.reposition(t)},toggle:(e,t)=>{e.toggle(t)},getToolbar:(e,t)=>e.getToolbar(t),isOpen:(e,t)=>e.isOpen(t)}});const rV=x([zr("items"),hd(["itemSelector"]),ah("tgroupBehaviours",[Bk])]);const aV=x([Vh({name:"items",unit:"item"})]);const cV=(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:ih(e.tgroupBehaviours,[Bk.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}});const iV=by({name:"ToolbarGroup",configFields:rV(),partFields:aV(),factory:cV});const lV=e=>U(e,(e=>Il(e)));const dV=(e,t,o)=>{$F(e,o,(n=>{o.overflowGroups.set(n);t.getOpt(e).each((e=>{sV.setGroups(e,lV(n))}))}))};const uV=(e,t,o,n)=>{const s=p_(sV.sketch({fetch:()=>GE.nu((t=>{t(lV(e.overflowGroups.get()))})),layouts:{onLtr:()=>[Zd,Qd],onRtl:()=>[Qd,Zd],onBottomLtr:()=>[tu,eu],onBottomRtl:()=>[eu,tu]},getBounds:o.getOverflowBounds,lazySink:e.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:e.markers.overflowToggledClass},parts:{button:n["overflow-button"](),toolbar:n.overflow()}}));return{uid:e.uid,dom:e.dom,components:t,behaviours:ih(e.splitToolbarBehaviours,[uD.config({others:{overflowGroup:()=>iV.sketch({...n["overflow-group"](),items:[s.asSpec()]})}})]),apis:{setGroups:(t,o)=>{e.builtGroups.set(U(o,t.getSystem().build));dV(t,s,e)},refresh:t=>dV(t,s,e),toggle:e=>{s.getOpt(e).each((e=>{sV.toggle(e)}))},isOpen:e=>s.getOpt(e).map(sV.isOpen).getOr(false),reposition:e=>{s.getOpt(e).each((e=>{sV.reposition(e)}))},getOverflow:e=>s.getOpt(e).bind(sV.getToolbar)},domModification:{attributes:{role:"group"}}}};const fV=by({name:"SplitFloatingToolbar",configFields:KF(),partFields:XF(),factory:uV,apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},refresh:(e,t)=>{e.refresh(t)},reposition:(e,t)=>{e.reposition(t)},toggle:(e,t)=>{e.toggle(t)},isOpen:(e,t)=>e.isOpen(t),getOverflow:(e,t)=>e.getOverflow(t)}});const mV=x([hd(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),bd("onOpened"),bd("onClosed")].concat(GF()));const gV=x([Ih({factory:gI,schema:dI(),name:"primary"}),Ih({factory:gI,schema:dI(),name:"overflow",overrides:e=>({toolbarBehaviours:xu([JP.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk:t=>{Zh(t,e,"overflow-button").each((e=>{Cw.off(e);aw.focus(e)}));e.onClosed(t)},onGrown:t=>{Bk.focusIn(t);e.onOpened(t)},onStartGrow:t=>{Zh(t,e,"overflow-button").each(Cw.on)}}),Bk.config({mode:"acyclic",onEscape:t=>{Zh(t,e,"overflow-button").each(aw.focus);return N.some(true)}})])})}),Ph({name:"overflow-button",overrides:e=>({buttonBehaviours:xu([Cw.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:false})])})}),Ph({name:"overflow-group"})]);const pV=(e,t)=>Zh(e,t,"overflow").map(JP.hasGrown).getOr(false);const hV=(e,t)=>{Zh(e,t,"overflow-button").bind((()=>Zh(e,t,"overflow"))).each((o=>{yV(e,t);JP.toggleGrow(o)}))};const yV=(e,t)=>{Zh(e,t,"overflow").each((o=>{$F(e,t,(e=>{const t=U(e,(e=>Il(e)));gI.setGroups(o,t)}));Zh(e,t,"overflow-button").each((e=>{if(JP.hasGrown(o)){Cw.on(e)}}));JP.refresh(o)}))};const bV=(e,t,o,n)=>{const s="alloy.toolbar.toggle";const r=(t,o)=>{const n=U(o,t.getSystem().build);e.builtGroups.set(n)};return{uid:e.uid,dom:e.dom,components:t,behaviours:ih(e.splitToolbarBehaviours,[uD.config({others:{overflowGroup:e=>iV.sketch({...n["overflow-group"](),items:[g_.sketch({...n["overflow-button"](),action:t=>{yc(e,s)}})]})}}),Jk("toolbar-toggle-events",[Tc(s,(t=>{hV(t,e)}))])]),apis:{setGroups:(t,o)=>{r(t,o);yV(t,e)},refresh:t=>yV(t,e),toggle:t=>hV(t,e),isOpen:t=>pV(t,e)},domModification:{attributes:{role:"group"}}}};const vV=by({name:"SplitSlidingToolbar",configFields:mV(),partFields:gV(),factory:bV,apis:{setGroups:(e,t,o)=>{e.setGroups(t,o)},refresh:(e,t)=>{e.refresh(t)},toggle:(e,t)=>{e.toggle(t)},isOpen:(e,t)=>e.isOpen(t)}});const kV=e=>{const t=e.title.fold((()=>({})),(e=>({attributes:{title:e}})));return{dom:{tag:"div",classes:["tox-toolbar__group"],...t},components:[iV.parts.items({})],items:e.items,markers:{itemSelector:"*:not(.tox-split-button) > .tox-tbtn:not([disabled]), "+".tox-split-button:not([disabled]), "+".tox-toolbar-nav-js:not([disabled])"},tgroupBehaviours:xu([hE.config({}),aw.config({})])}};const wV=e=>iV.sketch(kV(e));const _V=(e,t)=>{const o=Hc((t=>{const o=U(e.initGroups,wV);gI.setGroups(t,o)}));return xu([pS.toolbarButton(e.providers.isDisabled),dS(),Bk.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Jk("toolbar-events",[o])])};const xV=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":kV({title:N.none(),items:[]}),"overflow-button":HB({name:"more",icon:N.some("more-drawer"),enabled:true,tooltip:N.some("More..."),primary:false,buttonType:N.none(),borderless:false},N.none(),e.providers)},splitToolbarBehaviours:_V(e,t)}};const zV=e=>{const t=xV(e);const o=4;const n=fV.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return fV.sketch({...t,lazySink:e.getSink,getOverflowBounds:()=>{const t=e.moreDrawerData.lazyHeader().element;const n=Gn(t);const s=kt(t);const r=Gn(s);const a=Math.max(s.dom.scrollHeight,r.height);return Wn(n.x+o,r.y,n.width-o*2,a)},parts:{...t.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:e.attributes}}},components:[n],markers:{overflowToggledClass:"tox-tbtn--enabled"}})};const CV=e=>{const t=vV.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});const o=vV.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}});const n=xV(e);return vV.sketch({...n,components:[t,o],markers:{openClass:"tox-toolbar__overflow--open",closedClass:"tox-toolbar__overflow--closed",growingClass:"tox-toolbar__overflow--growing",shrinkingClass:"tox-toolbar__overflow--shrinking",overflowToggledClass:"tox-tbtn--enabled"},onOpened:e=>{e.getSystem().broadcastOn([QI()],{type:"opened"})},onClosed:e=>{e.getSystem().broadcastOn([QI()],{type:"closed"})}})};const SV=e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return gI.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(e.type===L_.scrolling?["tox-toolbar--scrolling"]:[])},components:[gI.parts.groups({})],toolbarBehaviours:_V(e,t)})};const TV=(e,t,o)=>{const n={getSocket:t=>tI.getPart(t,e,"socket"),setSidebar:(t,o)=>{tI.getPart(t,e,"sidebar").each((e=>uF(e,o)))},toggleSidebar:(t,o)=>{tI.getPart(t,e,"sidebar").each((e=>fF(e,o)))},whichSidebar:t=>tI.getPart(t,e,"sidebar").bind(mF).getOrNull(),getHeader:t=>tI.getPart(t,e,"header"),getToolbar:t=>tI.getPart(t,e,"toolbar"),setToolbar:(t,o)=>{tI.getPart(t,e,"toolbar").each((e=>{e.getApis().setGroups(e,o)}))},setToolbars:(t,o)=>{tI.getPart(t,e,"multiple-toolbar").each((e=>{lI.setItems(e,o)}))},refreshToolbar:t=>{const o=tI.getPart(t,e,"toolbar");o.each((e=>e.getApis().refresh(e)))},toggleToolbarDrawer:t=>{tI.getPart(t,e,"toolbar").each((e=>{Ne(e.getApis().toggle,(t=>t(e)))}))},isToolbarDrawerToggled:t=>tI.getPart(t,e,"toolbar").bind((e=>N.from(e.getApis().isOpen).map((t=>t(e))))).getOr(false),getThrobber:t=>tI.getPart(t,e,"throbber"),focusToolbar:t=>{const o=tI.getPart(t,e,"toolbar").orThunk((()=>tI.getPart(t,e,"multiple-toolbar")));o.each((e=>{Bk.focusIn(e)}))},setMenubar:(t,o)=>{tI.getPart(t,e,"menubar").each((e=>{xP.setMenus(e,o)}))},focusMenubar:t=>{tI.getPart(t,e,"menubar").each((e=>{xP.focus(e)}))}};return{uid:e.uid,dom:e.dom,components:t,apis:n,behaviours:e.behaviours}};const OV=oI.optional({factory:xP,name:"menubar",schema:[zr("backstage")]});const EV=e=>{if(e.type===L_.sliding){return CV}else if(e.type===L_.floating){return zV}else{return SV}};const DV=oI.optional({factory:{sketch:e=>lI.sketch({uid:e.uid,dom:e.dom,listBehaviours:xu([Bk.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>SV({type:e.type,uid:Zc("multiple-toolbar-item"),cyclicKeying:false,initGroups:[],providers:e.providers,onEscape:()=>{e.onEscape();return N.some(true)}}),setupItem:(e,t,o,n)=>{gI.setGroups(t,o)},shell:true})},name:"multiple-toolbar",schema:[zr("dom"),zr("onEscape")]});const AV=oI.optional({factory:{sketch:e=>{const t=EV(e);const o={type:e.type,uid:e.uid,onEscape:()=>{e.onEscape();return N.some(true)},cyclicKeying:false,initGroups:[],getSink:e.getSink,providers:e.providers,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader},attributes:e.attributes};return t(o)}},name:"toolbar",schema:[zr("dom"),zr("onEscape"),zr("getSink")]});const MV=oI.optional({factory:{sketch:gP},name:"header",schema:[zr("dom")]});const NV=oI.optional({name:"socket",schema:[zr("dom")]});const RV=oI.optional({factory:{sketch:hF},name:"sidebar",schema:[zr("dom")]});const BV=oI.optional({factory:{sketch:AF},name:"throbber",schema:[zr("dom")]});var LV=by({name:"OuterContainer",factory:TV,configFields:[zr("dom"),zr("behaviours")],partFields:[MV,OV,AV,DV,NV,RV,BV],apis:{getSocket:(e,t)=>e.getSocket(t),setSidebar:(e,t,o)=>{e.setSidebar(t,o)},toggleSidebar:(e,t,o)=>{e.toggleSidebar(t,o)},whichSidebar:(e,t)=>e.whichSidebar(t),getHeader:(e,t)=>e.getHeader(t),getToolbar:(e,t)=>e.getToolbar(t),setToolbar:(e,t,o)=>{const n=U(o,(e=>wV(e)));e.setToolbar(t,n)},setToolbars:(e,t,o)=>{const n=U(o,(e=>U(e,wV)));e.setToolbars(t,n)},refreshToolbar:(e,t)=>e.refreshToolbar(t),toggleToolbarDrawer:(e,t)=>{e.toggleToolbarDrawer(t)},isToolbarDrawerToggled:(e,t)=>e.isToolbarDrawerToggled(t),getThrobber:(e,t)=>e.getThrobber(t),setMenubar:(e,t,o)=>{e.setMenubar(t,o)},focusMenubar:(e,t)=>{e.focusMenubar(t)},focusToolbar:(e,t)=>{e.focusToolbar(t)}}});const HV="file edit view insert format tools table help";const IV={file:{title:"File",items:"newdocument restoredraft | preview | export print | deleteallconversations"},edit:{title:"Edit",items:"undo redo | cut copy paste pastetext | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | spellchecker | preview fullscreen | showcomments"},insert:{title:"Insert",items:"image link media addcomment pageembed template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontfamily fontsize align lineheight | forecolor backcolor | language | removeformat"},tools:{title:"Tools",items:"spellchecker spellcheckerlanguage | a11ycheck code wordcount"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}};const PV=(e,t,o)=>{const n=Q_(o).split(/[ ,]/);return{text:e.title,getItems:()=>ee(e.items,(e=>{const o=e.toLowerCase();if(o.trim().length===0){return[]}else if(F(n,(e=>e===o))){return[]}else if(o==="separator"||o==="|"){return[{type:"separator"}]}else if(t.menuItems[o]){return[t.menuItems[o]]}else{return[]}}))}};const FV=e=>{if(typeof e==="string"){return e.split(" ")}return e};const VV=(e,t)=>{const o={...IV,...t.menus};const n=fe(t.menus).length>0;const s=t.menubar===undefined||t.menubar===true?FV(HV):FV(t.menubar===false?"":t.menubar);const r=G(s,(e=>{const o=Ce(IV,e);if(n){return o||ze(t.menus,e).exists((e=>Ce(e,"items")))}else{return o}}));const a=U(r,(n=>{const s=o[n];return PV({title:s.title,items:FV(s.items)},t,e)}));return G(a,(e=>{const t=e=>e.type!=="separator";return e.getItems().length>0&&F(e.getItems(),t)}))};const jV=e=>{const t=()=>{e._skinLoaded=true;hT(e)};return()=>{if(e.initialized){t()}else{e.on("init",t)}}};const UV=(e,t)=>()=>yT(e,{message:t});const qV=(e,t,o)=>{e.on("remove",(()=>o.unload(t)));return o.load(t)};const WV=(e,t)=>{const o=t+"/skin.min.css";return qV(e,o,e.ui.styleSheetLoader)};const $V=(e,t)=>{const o=Lt(Ze.fromDom(e.getElement()));if(o){const o=t+"/skin.shadowdom.min.css";return qV(e,o,N_.DOM.styleSheetLoader)}else{return Promise.resolve()}};const GV=(e,t)=>{const o=_x(t);if(o){t.contentCSS.push(o+(e?"/content.inline":"/content")+".min.css")}if(!kx(t)&&c(o)){Promise.all([WV(t,o),$V(t,o)]).then(jV(t),UV(t,"Skin could not be loaded"))}else{jV(t)()}};const KV=S(GV,false);const XV=S(GV,true);const YV=(e,t)=>o=>{const n=uf();const s=()=>{o.setActive(e.formatter.match(t));const s=e.formatter.formatChanged(t,o.setActive);n.set(s)};e.initialized?s():e.once("init",s);return()=>{e.off("init",s);n.clear()}};const JV=(e,t,o)=>n=>{const s=()=>o(n);const r=()=>{o(n);e.on(t,s)};e.initialized?r():e.once("init",r);return()=>{e.off("init",r);e.off(t,s)}};const QV=e=>t=>()=>{e.undoManager.transact((()=>{e.focus();e.execCommand("mceToggleFormat",false,t.format)}))};const ZV=(e,t)=>()=>e.execCommand(t);const ej=(e,t,o)=>{const n=(e,n,r,a)=>{const c=t.shared.providers.translate(e.title);if(e.type==="separator"){return N.some({type:"separator",text:c})}else if(e.type==="submenu"){const t=ee(e.getStyleItems(),(e=>s(e,n,a)));if(n===0&&t.length<=0){return N.none()}else{return N.some({type:"nestedmenuitem",text:c,enabled:t.length>0,getSubmenuItems:()=>ee(e.getStyleItems(),(e=>s(e,n,a)))})}}else{return N.some({type:"togglemenuitem",text:c,icon:e.icon,active:e.isSelected(a),enabled:!r,onAction:o.onAction(e),...e.getStylePreview().fold((()=>({})),(e=>({meta:{style:e}})))})}};const s=(e,t,s)=>{const r=e.type==="formatter"&&o.isInvalid(e);if(t===0){return r?[]:n(e,t,false,s).toArray()}else{return n(e,t,r,s).toArray()}};const r=e=>{const t=o.getCurrentValue();const n=o.shouldHide?0:1;return ee(e,(e=>s(e,n,t)))};const a=(e,t)=>(o,n)=>{const s=t();const a=r(s);const c=AR(a,Vx.CLOSE_ON_EXECUTE,e,false);n(c)};return{validateItems:r,getFetch:a}};const tj=(e,t,o)=>{const n=o.dataset;const s=n.type==="basic"?()=>U(n.data,(e=>cH(e,o.isSelectedFor,o.getPreviewFor))):n.getData;return{items:ej(e,t,o),getStyleItems:s}};const oj=(e,t,o)=>{const{items:n,getStyleItems:s}=tj(e,t,o);const r=e=>({getComponent:x(e)});const a=JV(e,"NodeChange",(e=>{const t=e.getComponent();o.updateText(t)}));return wR({text:o.icon.isSome()?N.none():o.text,icon:o.icon,tooltip:N.from(o.tooltip),role:N.none(),fetch:n.getFetch(t,s),onSetup:a,getApi:r,columns:1,presets:"normal",classes:o.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};const nj=e=>U(e,(e=>{let t=e,o=e;const n=e.split("=");if(n.length>1){t=n[0];o=n[1]}return{title:t,format:o}}));const sj=e=>({type:"basic",data:e});var rj;(function(e){e[e["SemiColon"]=0]="SemiColon";e[e["Space"]=1]="Space"})(rj||(rj={}));const aj=(e,t)=>{if(t===rj.SemiColon){return e.replace(/;$/,"").split(";")}else{return e.split(" ")}};const cj=(e,t,o)=>{const n=e.options.get(t);const s=nj(aj(n,o));return{type:"basic",data:s}};const ij=[{title:"Left",icon:"align-left",format:"alignleft",command:"JustifyLeft"},{title:"Center",icon:"align-center",format:"aligncenter",command:"JustifyCenter"},{title:"Right",icon:"align-right",format:"alignright",command:"JustifyRight"},{title:"Justify",icon:"align-justify",format:"alignjustify",command:"JustifyFull"}];const lj=e=>{const t=()=>J(ij,(t=>e.formatter.match(t.format)));const o=t=>()=>e.formatter.match(t);const n=e=>N.none;const s=e=>{const o=t();const n=o.fold(x("left"),(e=>e.title.toLowerCase()));bc(e,kR,{icon:`align-${n}`})};const r=sj(ij);const a=t=>()=>J(ij,(e=>e.format===t.format)).each((t=>e.execCommand(t.command)));return{tooltip:"Align",text:N.none(),icon:N.some("align-left"),isSelectedFor:o,getCurrentValue:N.none,getPreviewFor:n,onAction:a,updateText:s,dataset:r,shouldHide:false,isInvalid:t=>!e.formatter.canApply(t.format)}};const dj=(e,t)=>oj(e,t,lj(e));const uj=(e,t)=>{const o=tj(e,t,lj(e));e.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})};const fj=(e,t)=>{const o=t();const n=U(o,(e=>e.format));return N.from(e.formatter.closest(n)).bind((e=>J(o,(t=>t.format===e)))).orThunk((()=>Re(e.formatter.match("p"),{title:"Paragraph",format:"p"})))};const mj=e=>{const t="Paragraph";const o=t=>()=>e.formatter.match(t);const n=t=>()=>{const o=e.formatter.get(t);return N.some({tag:o.length>0?o[0].inline||o[0].block||"div":"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))})};const s=o=>{const n=fj(e,(()=>r.data));const s=n.fold(x(t),(e=>e.title));bc(o,vR,{text:s})};const r=cj(e,"block_formats",rj.SemiColon);return{tooltip:"Blocks",text:N.some(t),icon:N.none(),isSelectedFor:o,getCurrentValue:N.none,getPreviewFor:n,onAction:QV(e),updateText:s,dataset:r,shouldHide:false,isInvalid:t=>!e.formatter.canApply(t.format)}};const gj=(e,t)=>oj(e,t,mj(e));const pj=(e,t)=>{const o=tj(e,t,mj(e));e.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})};const hj=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"];const yj=e=>{const t=e.split(/\s*,\s*/);return U(t,(e=>e.replace(/^['"]+|['"]+$/g,"")))};const bj=e=>{const t=()=>{const t=yj(e.toLowerCase());return te(hj,(e=>t.indexOf(e.toLowerCase())>-1))};return e.indexOf("-apple-system")===0&&t()};const vj=e=>{const t="System Font";const o=()=>{const o=e=>e?yj(e)[0]:"";const n=e.queryCommandValue("FontName");const s=i.data;const r=n?n.toLowerCase():"";const a=J(s,(e=>{const t=e.format;return t.toLowerCase()===r||o(t).toLowerCase()===o(r).toLowerCase()})).orThunk((()=>Re(bj(r),{title:t,format:r})));return{matchOpt:a,font:n}};const n=e=>t=>t.exists((t=>t.format===e));const s=()=>{const{matchOpt:e}=o();return e};const r=e=>()=>N.some({tag:"div",styles:e.indexOf("dings")===-1?{"font-family":e}:{}});const a=t=>()=>{e.undoManager.transact((()=>{e.focus();e.execCommand("FontName",false,t.format)}))};const c=e=>{const{matchOpt:t,font:n}=o();const s=t.fold(x(n),(e=>e.title));bc(e,vR,{text:s})};const i=cj(e,"font_family_formats",rj.SemiColon);return{tooltip:"Fonts",text:N.some(t),icon:N.none(),isSelectedFor:n,getCurrentValue:s,getPreviewFor:r,onAction:a,updateText:c,dataset:i,shouldHide:false,isInvalid:D}};const kj=(e,t)=>oj(e,t,vj(e));const wj=(e,t)=>{const o=tj(e,t,vj(e));e.ui.registry.addNestedMenuItem("fontfamily",{text:t.shared.providers.translate("Fonts"),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})};const _j={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"};const xj={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"};const zj=(e,t)=>{const o=Math.pow(10,t);return Math.round(e*o)/o};const Cj=(e,t)=>{if(/[0-9.]+px$/.test(e)){return zj(parseInt(e,10)*72/96,t||0)+"pt"}else{return ze(xj,e).getOr(e)}};const Sj=e=>ze(_j,e).getOr("");const Tj=e=>{const t=()=>{let t=N.none();const o=c.data;const n=e.queryCommandValue("FontSize");if(n){for(let e=3;t.isNone()&&e>=0;e--){const s=Cj(n,e);const r=Sj(s);t=J(o,(e=>e.format===n||e.format===s||e.format===r))}}return{matchOpt:t,size:n}};const o=e=>t=>t.exists((t=>t.format===e));const n=()=>{const{matchOpt:e}=t();return e};const s=x(N.none);const r=t=>()=>{e.undoManager.transact((()=>{e.focus();e.execCommand("FontSize",false,t.format)}))};const a=e=>{const{matchOpt:o,size:n}=t();const s=o.fold(x(n),(e=>e.title));bc(e,vR,{text:s})};const c=cj(e,"font_size_formats",rj.Space);return{tooltip:"Font sizes",text:N.some("12pt"),icon:N.none(),isSelectedFor:o,getPreviewFor:s,getCurrentValue:n,onAction:r,updateText:a,dataset:c,shouldHide:false,isInvalid:D}};const Oj=(e,t)=>oj(e,t,Tj(e));const Ej=(e,t)=>{const o=tj(e,t,Tj(e));e.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})};const Dj=(e,t)=>{const o="Paragraph";const n=t=>()=>e.formatter.match(t);const s=t=>()=>{const o=e.formatter.get(t);return o!==undefined?N.some({tag:o.length>0?o[0].inline||o[0].block||"div":"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):N.none()};const r=t=>{const n=e=>{const t=e.items;return t!==undefined&&t.length>0?ee(t,n):[{title:e.title,format:e.format}]};const s=ee(aH(e),n);const r=fj(e,x(s));const a=r.fold(x(o),(e=>e.title));bc(t,vR,{text:a})};return{tooltip:"Formats",text:N.some(o),icon:N.none(),isSelectedFor:n,getCurrentValue:N.none,getPreviewFor:s,onAction:QV(e),updateText:r,shouldHide:Y_(e),isInvalid:t=>!e.formatter.canApply(t.format),dataset:t}};const Aj=(e,t)=>{const o={type:"advanced",...t.styles};return oj(e,t,Dj(e,o))};const Mj=(e,t)=>{const o={type:"advanced",...t.styles};const n=tj(e,t,Dj(e,o));e.ui.registry.addNestedMenuItem("styles",{text:"Formats",getSubmenuItems:()=>n.items.validateItems(n.getStyleItems())})};const Nj=(e,t)=>{const o=(o,n)=>{e.updateState.each((e=>{const s=e(o,n);t.set(s)}));e.renderComponents.each((s=>{const r=s(n,t.get());const a=e.reuseDom?Hk:Lk;a(o,r)}))};return xc([Tc(Xa(),((t,n)=>{const s=n;if(!s.universal){const n=e.channel;if(P(s.channels,n)){o(t,s.data)}}})),Hc(((t,n)=>{e.initialData.each((e=>{o(t,e)}))}))])};var Rj=Object.freeze({__proto__:null,events:Nj});const Bj=(e,t,o)=>o;var Lj=Object.freeze({__proto__:null,getState:Bj});var Hj=[zr("channel"),Br("renderComponents"),Br("updateState"),Br("initialData"),Xr("reuseDom",true)];const Ij=()=>{const e=ea(N.none());const t=()=>e.set(N.none());const o=()=>e.get().getOr("none");return{readState:o,get:e.get,set:e.set,clear:t}};var Pj=Object.freeze({__proto__:null,init:Ij});const Fj=Cu({fields:Hj,name:"reflecting",active:Rj,apis:Lj,state:Pj});const Vj=x([zr("toggleClass"),zr("fetch"),kd("onExecute"),qr("getHotspot",N.some),qr("getAnchorOverrides",x({})),Kf(),kd("onItemExecute"),Br("lazySink"),zr("dom"),bd("onOpen"),ah("splitDropdownBehaviours",[uD,Bk,aw]),qr("matchWidth",false),qr("useMinWidth",false),qr("eventOrder",{}),Br("role")].concat(SD()));const jj=Ih({factory:g_,schema:[zr("dom")],name:"arrow",defaults:()=>({buttonBehaviours:xu([aw.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each(vc)},buttonBehaviours:xu([Cw.config({toggleOnExecute:false,toggleClass:e.toggleClass})])})});const Uj=Ih({factory:g_,schema:[zr("dom")],name:"button",defaults:()=>({buttonBehaviours:xu([aw.revoke()])}),overrides:e=>({dom:{tag:"span",attributes:{role:"presentation"}},action:t=>{t.getSystem().getByUid(e.uid).each((o=>{e.onExecute(o,t)}))}})});const qj=x([jj,Uj,Fh({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[zr("text")],name:"aria-descriptor"}),Ph({schema:[pd()],name:"menu",defaults:e=>({onExecute:(t,o)=>{t.getSystem().getByUid(e.uid).each((n=>{e.onItemExecute(n,t,o)}))}})}),mD()]);const Wj=(e,t,o,n)=>{const s=e=>{xy.getCurrent(e).each((e=>{ib.highlightFirst(e);Bk.focusIn(e)}))};const r=t=>{const o=s;kD(e,z,t,n,o,gD.HighlightFirst).get(v)};const a=e=>{r(e);return N.some(true)};const c=t=>{const o=ey(t,e,"button");vc(o);return N.some(true)};const i={...xc([Hc(((t,o)=>{const n=Zh(t,e,"aria-descriptor");n.each((e=>{const o=Zc("aria");Wt(e.element,"id",o);Wt(t.element,"aria-describedby",o)}))}))]),...Tw(N.some(r))};const l={repositionMenus:e=>{if(Cw.isOn(e)){CD(e)}}};return{uid:e.uid,dom:e.dom,components:t,apis:l,eventOrder:{...e.eventOrder,[Ya()]:["disabling","toggling","alloy.base.behaviour"]},events:i,behaviours:ih(e.splitDropdownBehaviours,[uD.config({others:{sandbox:t=>{const o=ey(t,e,"arrow");const n={onOpen:()=>{Cw.on(o);Cw.on(t)},onClose:()=>{Cw.off(o);Cw.off(t)}};return zD(e,t,n)}}}),Bk.config({mode:"special",onSpace:c,onEnter:c,onDown:a}),aw.config({}),Cw.config({toggleOnExecute:false,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":true}}}};const $j=by({name:"SplitDropdown",configFields:Vj(),partFields:qj(),factory:Wj,apis:{repositionMenus:(e,t)=>e.repositionMenus(t)}});const Gj=e=>({isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t)});const Kj=e=>({setActive:t=>{Cw.set(e,t)},isActive:()=>Cw.isOn(e),isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t)});const Xj=(e,t)=>e.map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({});const Yj=Zc("focus-button");const Jj=(e,t,o,n,s,r)=>({dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]),attributes:Xj(o,r)},components:wS([e.map((e=>hR(e,r.icons))),t.map((e=>bR(e,"tox-tbtn",r)))]),eventOrder:{[Oa()]:["focusing","alloy.base.behaviour","common-button-display-events"]},buttonBehaviours:xu([pS.toolbarButton(r.isDisabled),dS(),Jk("common-button-display-events",[Tc(Oa(),((e,t)=>{t.event.prevent();yc(e,Yj)}))])].concat(n.map((o=>Fj.config({channel:o,initialData:{icon:e,text:t},renderComponents:(e,t)=>wS([e.icon.map((e=>hR(e,r.icons))),e.text.map((e=>bR(e,"tox-tbtn",r)))])}))).toArray()).concat(s.getOr([])))});const Qj=(e,t,o,n)=>{const s=t.shared;return sV.sketch({lazySink:s.getSink,fetch:()=>GE.nu((t=>{t(U(o(e.items),wV))})),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:Jj(e.icon,e.text,e.tooltip,N.none(),N.none(),s.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n}}}})};const Zj=(e,t,o)=>{const n=ea(v);const s=Jj(e.icon,e.text,e.tooltip,N.none(),N.none(),o);return g_.sketch({dom:s.dom,components:s.components,eventOrder:gR,buttonBehaviours:xu([Jk("toolbar-button-events",[mR({onAction:e.onAction,getApi:t.getApi}),yS(t,n),bS(t,n)]),pS.toolbarButton((()=>!e.enabled||o.isDisabled())),dS()].concat(t.toolbarButtonBehaviours))})};const eU=(e,t)=>tU(e,t,[]);const tU=(e,t,o)=>Zj(e,{toolbarButtonBehaviours:[].concat(o.length>0?[Jk("toolbarButtonWith",o)]:[]),getApi:Gj,onSetup:e.onSetup},t);const oU=(e,t)=>nU(e,t,[]);const nU=(e,t,o)=>ys(Zj(e,{toolbarButtonBehaviours:[Xk.config({}),Cw.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:false})].concat(o.length>0?[Jk("toolbarToggleButtonWith",o)]:[]),getApi:Kj,onSetup:e.onSetup},t));const sU=(e,t,o)=>n=>GE.nu((e=>t.fetch(e))).map((s=>N.from(AO(ys(eO(Zc("menu-value"),s,(o=>{t.onItemAction(e(n),o)}),t.columns,t.presets,Vx.CLOSE_ON_EXECUTE,t.select.getOr(D),o),{movement:oO(t.columns,t.presets),menuBehaviours:$C.unnamedEvents(t.columns!=="auto"?[]:[Hc(((e,o)=>{UC(e,4,iz(t.presets)).each((({numRows:t,numColumns:o})=>{Bk.setGridSize(e,t,o)}))}))])})))));const rU=(e,t)=>{const o=Zc("channel-update-split-dropdown-display");const n=e=>({isEnabled:()=>!jy.isDisabled(e),setEnabled:t=>jy.set(e,!t),setIconFill:(t,o)=>{Gl(e.element,'svg path[id="'+t+'"], rect[id="'+t+'"]').each((e=>{Wt(e,"fill",o)}))},setActive:t=>{Wt(e.element,"aria-pressed",t);Gl(e.element,"span").each((o=>{e.getSystem().getByDom(o).each((e=>Cw.set(e,t)))}))},isActive:()=>Gl(e.element,"span").exists((t=>e.getSystem().getByDom(t).exists(Cw.isOn)))});const s=ea(v);const r={getApi:n,onSetup:e.onSetup};return $j.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":false,...Xj(e.tooltip,t.providers)}},onExecute:t=>{e.onAction(n(t))},onItemExecute:(e,t,o)=>{},splitDropdownBehaviours:xu([pS.splitButton(t.providers.isDisabled),dS(),Jk("split-dropdown-events",[Tc(Yj,aw.focus),yS(r,s),bS(r,s)]),RD.config({})]),eventOrder:{[cc()]:["alloy.base.behaviour","split-dropdown-events"]},toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:sU(n,e,t.providers),parts:{menu:gz(false,e.columns,e.presets)},components:[$j.parts.button(Jj(e.icon,e.text,N.none(),N.some(o),N.some([Cw.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:false})]),t.providers)),$j.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:__("chevron-down",t.providers.icons)},buttonBehaviours:xu([pS.splitButton(t.providers.isDisabled),dS(),C_()])}),$j.parts["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})};const aU=[{name:"history",items:["undo","redo"]},{name:"styles",items:["styles"]},{name:"formatting",items:["bold","italic"]},{name:"alignment",items:["alignleft","aligncenter","alignright","alignjustify"]},{name:"indentation",items:["outdent","indent"]},{name:"permanent pen",items:["permanentpen"]},{name:"comments",items:["addcomment"]}];const cU=(e,t)=>(o,n,s)=>{const r=e(o).mapError((e=>br(e))).getOrDie();return t(r,n,s)};const iU={button:cU(cC,((e,t)=>eU(e,t.backstage.shared.providers))),togglebutton:cU(dC,((e,t)=>oU(e,t.backstage.shared.providers))),menubutton:cU(vP,((e,t)=>RB(e,"tox-tbtn",t.backstage,N.none()))),splitbutton:cU(wP,((e,t)=>rU(e,t.backstage.shared))),grouptoolbarbutton:cU(hP,((e,t,o)=>{const n=o.ui.registry.getAll().buttons;const s=e=>hU(o,{buttons:n,toolbar:e,allowToolbarGroups:false},t,N.none());const r={[$f]:t.backstage.shared.header.isPositionedAtTop()?Wf.TopToBottom:Wf.BottomToTop};switch(Z_(o)){case L_.floating:return Qj(e,t.backstage,s,r);default:throw new Error("Toolbar groups are only supported when using floating toolbar mode")}})),styleSelectButton:(e,t)=>Aj(e,t.backstage),fontsizeSelectButton:(e,t)=>Oj(e,t.backstage),fontSelectButton:(e,t)=>kj(e,t.backstage),formatButton:(e,t)=>gj(e,t.backstage),alignMenuButton:(e,t)=>dj(e,t.backstage)};const lU=(e,t,o)=>ze(iU,e.type).fold((()=>{console.error("skipping button defined by",e);return N.none()}),(n=>N.some(n(e,t,o))));const dU={styles:iU.styleSelectButton,fontsize:iU.fontsizeSelectButton,fontfamily:iU.fontSelectButton,blocks:iU.formatButton,align:iU.alignMenuButton};const uU=e=>{const t=U(aU,(t=>{const o=G(t.items,(t=>Ce(e,t)||Ce(dU,t)));return{name:t.name,items:o}}));return G(t,(e=>e.items.length>0))};const fU=e=>{const t=e.split("|");return U(t,(e=>({items:e.trim().split(" ")})))};const mU=e=>b(e,(e=>Ce(e,"name")&&Ce(e,"items")));const gU=e=>{const t=e.toolbar;const o=e.buttons;if(t===false){return[]}else if(t===undefined||t===true){return uU(o)}else if(c(t)){return fU(t)}else if(mU(t)){return t}else{console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]");return[]}};const pU=(e,t,o,n,s,r)=>ze(t,o.toLowerCase()).orThunk((()=>r.bind((e=>ue(e,(e=>ze(t,e+o.toLowerCase()))))))).fold((()=>ze(dU,o.toLowerCase()).map((t=>t(e,s))).orThunk((()=>N.none()))),(t=>{if(t.type==="grouptoolbarbutton"&&!n){console.warn(`Ignoring the '${o}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`);return N.none()}else{return lU(t,s,e)}}));const hU=(e,t,o,n)=>{const s=gU(t);const r=U(s,(s=>{const r=ee(s.items,(s=>s.trim().length===0?[]:pU(e,t.buttons,s,t.allowToolbarGroups,o,n).toArray()));return{title:N.from(e.translate(s.name)),items:r}}));return G(r,(e=>e.items.length>0))};const yU=(e,t,o,n)=>{const s=t.outerContainer;const r=o.toolbar;const a=o.buttons;if(b(r,c)){const t=r.map((t=>{const s={toolbar:t,buttons:a,allowToolbarGroups:o.allowToolbarGroups};return hU(e,s,{backstage:n},N.none())}));LV.setToolbars(s,t)}else{LV.setToolbar(s,hU(e,o,{backstage:n},N.none()))}};const bU=pn();const vU=bU.os.isiOS()&&bU.os.version.major<=12;const kU=(e,t)=>{const o=e.dom;let n=e.getWin();const s=e.getDoc().documentElement;const r=ea(yo(n.innerWidth,n.innerHeight));const a=ea(yo(s.offsetWidth,s.offsetHeight));const c=()=>{const t=r.get();if(t.left!==n.innerWidth||t.top!==n.innerHeight){r.set(yo(n.innerWidth,n.innerHeight));vT(e)}};const i=()=>{const t=e.getDoc().documentElement;const o=a.get();if(o.left!==t.offsetWidth||o.top!==t.offsetHeight){a.set(yo(t.offsetWidth,t.offsetHeight));vT(e)}};const l=t=>kT(e,t);o.bind(n,"resize",c);o.bind(n,"scroll",l);const d=pf(Ze.fromDom(e.getBody()),"load",i);const u=t.uiMothership.element;e.on("hide",(()=>{eo(u,"display","none")}));e.on("show",(()=>{io(u,"display")}));e.on("NodeChange",i);e.on("remove",(()=>{d.unbind();o.unbind(n,"resize",c);o.unbind(n,"scroll",l);n=null}))};const wU=(e,t,o,n,s)=>{const r=ea(0);const a=t.outerContainer;KV(e);const c=Ze.fromDom(s.targetNode);const i=Bt(Rt(c));tp(c,t.mothership);ep(i,t.uiMothership);e.on("PostRender",(()=>{yU(e,t,o,n);r.set(e.getWin().innerWidth);LV.setMenubar(a,VV(e,o));LV.setSidebar(a,o.sidebar);kU(e,t)}));const l=LV.getSocket(a).getOrDie("Could not find expected socket element");if(vU){to(l.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const t=cB((()=>{e.dispatch("ScrollContent")}),20);const o=gf(l.element,"scroll",t.throttle);e.on("remove",o.unbind)}lS(e,t);e.addCommand("ToggleSidebar",((t,o)=>{LV.toggleSidebar(a,o);e.dispatch("ToggleSidebar")}));e.addQueryValueHandler("ToggleSidebar",(()=>LV.whichSidebar(a)));const d=Z_(e);const u=()=>{LV.refreshToolbar(t.outerContainer)};if(d===L_.sliding||d===L_.floating){e.on("ResizeWindow ResizeEditor ResizeContent",(()=>{const t=e.getWin().innerWidth;if(t!==r.get()){u();r.set(t)}}))}const f={setEnabled:e=>{iS(t,!e)},isEnabled:()=>!jy.isDisabled(a)};return{iframeContainer:l.element.dom,editorContainer:a.element.dom,api:f}};var _U=Object.freeze({__proto__:null,render:wU});const xU=e=>{const t=/^[0-9\.]+(|px)$/i;if(t.test(""+e)){return N.some(parseInt(""+e,10))}return N.none()};const zU=e=>y(e)?e+"px":e;const CU=(e,t,o)=>{const n=t.filter((t=>e<t));const s=o.filter((t=>e>t));return n.or(s).getOr(e)};const SU=e=>{const t=j_(e);const o=W_(e);const n=G_(e);return xU(t).map((e=>CU(e,o,n)))};const TU=e=>{const t=SU(e);return t.getOr(j_(e))};const OU=e=>{const t=U_(e);const o=q_(e);const n=$_(e);return xU(t).map((e=>CU(e,o,n)))};const EU=e=>{const t=OU(e);return t.getOr(U_(e))};const{ToolbarLocation:DU,ToolbarMode:AU}=Rx;const MU=(e,t,o,n,s)=>{const{uiMothership:r,outerContainer:a}=o;const c=N_.DOM;const i=Ex(e);const l=Mx(e);const d=$_(e).or(OU(e));const u=n.shared.header;const f=u.isPositionedAtTop;const m=Z_(e);const g=m===AU.sliding||m===AU.floating;const p=ea(false);const h=()=>p.get()&&!e.removed;const y=e=>g?e.fold(x(0),(e=>e.components().length>1?mo(e.components()[1].element):0)):0;const b=o=>{switch(tx(e)){case DU.auto:const e=LV.getToolbar(a);const n=y(e);const s=mo(o.element)-n;const r=$n(t);const c=r.y>s;if(c){return"top"}else{const e=kt(t);const o=Math.max(e.dom.scrollHeight,mo(e));const n=r.bottom<o-s;if(n){return"bottom"}else{const e=Kn();const t=e.bottom<r.bottom-s;return t?"bottom":"top"}}case DU.bottom:return"bottom";case DU.top:default:return"top"}};const v=e=>{const t=s.get();JI.setModes(t,[e]);u.setDockingMode(e);const o=f()?Wf.TopToBottom:Wf.BottomToTop;Wt(t.element,$f,o)};const k=()=>{const e=d.getOrThunk((()=>{const e=xU(no(jt(),"margin-left")).getOr(0);return zo(jt())-ko(t).left+e}));eo(s.get().element,"max-width",e+"px")};const w=()=>{const e=LV.getToolbar(a);const o=y(e);const n=$n(t);const r=f()?Math.max(n.y-mo(s.get().element)+o,0):n.bottom;to(a.element,{position:"absolute",top:Math.round(r)+"px",left:Math.round(n.x)+"px"})};const _=()=>{r.broadcastOn([Cp()],{})};const z=(e=false)=>{if(!h()){return}if(!i){k()}if(g){LV.refreshToolbar(a)}if(!i){w()}if(l){const t=s.get();e?JI.reset(t):JI.refresh(t)}_()};const C=(e=true)=>{if(i||!l||!h()){return}const t=u.getDockingMode();const o=b(s.get());if(o!==t){v(o);if(e){z(true)}}};const S=()=>{p.set(true);eo(a.element,"display","flex");c.addClass(e.getBody(),"mce-edit-focus");io(r.element,"display");C(false);z()};const T=()=>{p.set(false);if(o.outerContainer){eo(a.element,"display","none");c.removeClass(e.getBody(),"mce-edit-focus")}eo(r.element,"display","none")};return{isVisible:h,isPositionedAtTop:f,show:S,hide:T,update:z,updateMode:C,repositionPopups:_}};const NU=(e,t)=>{const o=$n(e);return{pos:t?o.y:o.bottom,bounds:o}};const RU=(e,t,o,n)=>{const s=ea(NU(t,o.isPositionedAtTop()));const r=n=>{const{pos:r,bounds:a}=NU(t,o.isPositionedAtTop());const{pos:c,bounds:i}=s.get();const l=a.height!==i.height||a.width!==i.width;s.set({pos:r,bounds:a});if(l){vT(e,n)}if(o.isVisible()){if(c!==r){o.update(true)}else if(l){o.updateMode();o.repositionPopups()}}};if(!n){e.on("activate",o.show);e.on("deactivate",o.hide)}e.on("SkinLoaded ResizeWindow",(()=>o.update(true)));e.on("NodeChange keydown",(e=>{requestAnimationFrame((()=>r(e)))}));e.on("ScrollWindow",(()=>o.updateMode()));const a=uf();a.set(pf(Ze.fromDom(e.getBody()),"load",r));e.on("remove",(()=>{a.clear()}))};const BU=(e,t,o,n,s)=>{const{mothership:r,uiMothership:a,outerContainer:c}=t;const i=ea(null);const l=Ze.fromDom(s.targetNode);const d=MU(e,l,t,n,i);const u=sx(e);XV(e);const f=()=>{if(i.get()){d.show();return}i.set(LV.getHeader(c).getOrDie());const s=Dx(e);ep(s,r);ep(s,a);yU(e,t,o,n);LV.setMenubar(c,VV(e,o));d.show();RU(e,l,d,u);e.nodeChanged()};e.on("show",f);e.on("hide",d.hide);if(!u){e.on("focus",f);e.on("blur",d.hide)}e.on("init",(()=>{if(e.hasFocus()||u){f()}}));lS(e,t);const m={show:()=>{f()},hide:()=>{d.hide()},setEnabled:e=>{iS(t,!e)},isEnabled:()=>!jy.isDisabled(c)};return{editorContainer:c.element.dom,api:m}};var LU=Object.freeze({__proto__:null,render:BU});const HU="contexttoolbar-show";const IU="contexttoolbar-hide";const PU=e=>({hide:()=>yc(e,ec()),getValue:()=>rh.getValue(e)});const FU=(e,t)=>Tc(fR,((o,n)=>{const s=e.get(o);const r=PU(s);t.onAction(r,n.event.buttonApi)}));const VU=(e,t,o)=>{const{primary:n,...s}=t.original;const r=hr(cC({...s,type:"button",onAction:v}));return tU(r,o.backstage.shared.providers,[FU(e,t)])};const jU=(e,t,o)=>{const{primary:n,...s}=t.original;const r=hr(dC({...s,type:"togglebutton",onAction:v}));return nU(r,o.backstage.shared.providers,[FU(e,t)])};const UU=(e,t,o)=>{const n={backstage:{shared:{providers:o}}};if(t.type==="contextformtogglebutton"){return jU(e,t,n)}else{return VU(e,t,n)}};const qU=(e,t,o)=>{const n=U(t,(t=>p_(UU(e,t,o))));const s=()=>U(n,(e=>e.asSpec()));const r=e=>ue(t,((t,o)=>{if(t.primary){return N.from(n[o]).bind((t=>t.getOpt(e))).filter(T(jy.isDisabled))}else{return N.none()}}));return{asSpecs:s,findPrimary:r}};const WU=(e,t)=>{const o=e.label.fold((()=>({})),(e=>({"aria-label":e})));const n=p_(PE.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:o,selectOnFocus:true,inputBehaviours:xu([Bk.config({mode:"special",onEnter:e=>s.findPrimary(e).map((e=>{vc(e);return true})),onLeft:(e,t)=>{t.cut();return N.none()},onRight:(e,t)=>{t.cut();return N.none()}})])}));const s=qU(n,e.commands,t);return[{title:N.none(),items:[n.asSpec()]},{title:N.none(),items:s.asSpecs()}]};const $U=(e,t,o)=>SV({type:e,uid:Zc("context-toolbar"),initGroups:WU(t,o),onEscape:N.none,cyclicKeying:true,providers:o});const GU={renderContextForm:$U,buildInitGroups:WU};const KU=(e,t,o=.01)=>t.bottom-e.y>=o&&e.bottom-t.y>=o;const XU=e=>{const t=e.getBoundingClientRect();if(t.height<=0&&t.width<=0){const o=Dt(Ze.fromDom(e.startContainer),e.startOffset).element;const n=it(o)?_t(o):N.some(o);return n.filter(ct).map((e=>e.dom.getBoundingClientRect())).getOr(t)}else{return t}};const YU=e=>{const t=e.selection.getRng();const o=XU(t);if(e.inline){const e=An();return Wn(e.left+o.left,e.top+o.top,o.width,o.height)}else{const t=Gn(Ze.fromDom(e.getBody()));return Wn(t.x+o.left,t.y+o.top,o.width,o.height)}};const JU=(e,t)=>t.filter(Vt).map(Gn).getOrThunk((()=>YU(e)));const QU=(e,t,o)=>{const n=Math.max(e.x+o,t.x);const s=Math.min(e.right-o,t.right);return{x:n,width:s-n}};const ZU=(e,t,o,n,s,r)=>{const a=Ze.fromDom(e.getContainer());const c=Gl(a,".tox-editor-header").getOr(a);const i=$n(c);const l=i.y>=t.bottom;const d=n&&!l;if(e.inline&&d){return{y:Math.max(i.bottom+r,o.y),bottom:o.bottom}}if(e.inline&&!d){return{y:o.y,bottom:Math.min(i.y-r,o.bottom)}}const u=s==="line"?$n(a):t;if(d){return{y:Math.max(i.bottom+r,o.y),bottom:Math.min(u.bottom-r,o.bottom)}}return{y:Math.max(u.y+r,o.y),bottom:Math.min(i.y-r,o.bottom)}};const eq=(e,t,o,n=0)=>{const s=Bn(window);const r=$n(Ze.fromDom(e.getContentAreaContainer()));const a=wx(e)||zx(e)||Sx(e);const{x:c,width:i}=QU(r,s,n);if(e.inline&&!a){return Wn(c,s.y,i,s.height)}else{const a=t.header.isPositionedAtTop();const{y:l,bottom:d}=ZU(e,r,s,a,o,n);return Wn(c,l,i,d-l)}};const tq=12;const oq={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"],inset:["tox-pop--inset"]};const nq={maxHeightFunction:Bf(),maxWidthFunction:YF()};const sq=(e,t)=>{const o=e.selection.getRng();const n=Dt(Ze.fromDom(o.startContainer),o.startOffset);return o.startContainer===o.endContainer&&o.startOffset===o.endOffset-1&&ht(n.element,t)};const rq=(e,t,o)=>{const n=ro(e,"position");eo(e,"position",t);const s=o(e);n.each((t=>eo(e,"position",t)));return s};const aq=e=>e==="node";const cq=(e,t,o,n,s)=>{const r=YU(e);const a=n.lastElement().exists((e=>ht(o,e)));if(sq(e,o)){return a?LL:AL}else if(a){return rq(t,n.getMode(),(()=>{const e=KU(r,$n(t));return e&&!n.isReposition()?IL:LL}))}else{const e=n.getMode()==="fixed"?s.y+An().top:s.y;const o=mo(t)+tq;return e+o<=r.y?AL:ML}};const iq=(e,t,o,n)=>{const s=t=>(n,s,r,a,c)=>{const i=cq(e,a,t,o,c);const l={...n,y:c.y,height:c.height};return{...i(l,s,r,a,c),alwaysFit:true}};const r=e=>aq(n)?[s(e)]:[];const a={onLtr:e=>[ou,nu,eu,Qd,tu,Zd].concat(r(e)),onRtl:e=>[ou,nu,tu,Zd,eu,Qd].concat(r(e))};const c={onLtr:e=>[nu,Qd,Zd,eu,tu,ou].concat(r(e)),onRtl:e=>[nu,Zd,Qd,tu,eu,ou].concat(r(e))};return t?c:a};const lq=(e,t,o,n)=>{if(t==="line"){return{bubble:Ff(tq,0,oq),layouts:{onLtr:()=>[su],onRtl:()=>[ru]},overrides:nq}}else{return{bubble:Ff(0,tq,oq,1/tq),layouts:iq(e,o,n,t),overrides:nq}}};const dq=(e,t)=>{const o=G(t,(t=>t.predicate(e.dom)));const{pass:n,fail:s}=$(o,(e=>e.type==="contexttoolbar"));return{contextToolbars:n,contextForms:s}};const uq=e=>{if(e.length<=1){return e}else{const t=t=>F(e,(e=>e.position===t));const o=t=>G(e,(e=>e.position===t));const n=t("selection");const s=t("node");if(n||s){if(s&&n){const e=o("node");const t=U(o("selection"),(e=>({...e,position:"node"})));return e.concat(t)}else{return n?o("selection"):o("node")}}else{return o("line")}}};const fq=e=>{if(e.length<=1){return e}else{const t=t=>J(e,(e=>e.position===t));const o=t("selection").orThunk((()=>t("node"))).orThunk((()=>t("line"))).map((e=>e.position));return o.fold((()=>[]),(t=>G(e,(e=>e.position===t))))}};const mq=(e,t,o)=>{const n=dq(e,t);if(n.contextForms.length>0){return N.some({elem:e,toolbars:[n.contextForms[0]]})}else{const t=dq(e,o);if(t.contextForms.length>0){return N.some({elem:e,toolbars:[t.contextForms[0]]})}else if(n.contextToolbars.length>0||t.contextToolbars.length>0){const o=uq(n.contextToolbars.concat(t.contextToolbars));return N.some({elem:e,toolbars:o})}else{return N.none()}}};const gq=(e,t,o)=>{if(e(t)){return N.none()}else{return ga(t,(e=>{if(ct(e)){const{contextToolbars:t,contextForms:n}=dq(e,o.inNodeScope);const s=n.length>0?n:fq(t);return s.length>0?N.some({elem:e,toolbars:s}):N.none()}else{return N.none()}}),e)}};const pq=(e,t)=>{const o=Ze.fromDom(t.getBody());const n=e=>ht(e,o);const s=e=>!n(e)&&!yt(o,e);const r=Ze.fromDom(t.selection.getNode());if(s(r)){return N.none()}return mq(r,e.inNodeScope,e.inEditorScope).orThunk((()=>gq(n,r,e)))};const hq=(e,t)=>{const o={};const n=[];const s=[];const r={};const a={};const c=(e,c)=>{const i=hr(bC(c));o[e]=i;i.launch.map((o=>{r["form:"+e+""]={...c.launch,type:o.type==="contextformtogglebutton"?"togglebutton":"button",onAction:()=>{t(i)}}}));if(i.scope==="editor"){s.push(i)}else{n.push(i)}a[e]=i};const i=(e,t)=>{kC(t).each((o=>{if(t.scope==="editor"){s.push(o)}else{n.push(o)}a[e]=o}))};const l=fe(e);q(l,(t=>{const o=e[t];if(o.type==="contextform"){c(t,o)}else if(o.type==="contexttoolbar"){i(t,o)}}));return{forms:o,inNodeScope:n,inEditorScope:s,lookupTable:a,formNavigators:r}};const yq=Zc("forward-slide");const bq=Zc("backward-slide");const vq=Zc("change-slide-event");const kq="tox-pop--resizing";const wq=e=>{const t=ea([]);return u_.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow:e=>{t.set([]);u_.getContent(e).each((e=>{io(e.element,"visibility")}));nl(e.element,kq);io(e.element,"width")},inlineBehaviours:xu([Jk("context-toolbar-events",[Lc(Va(),((e,t)=>{if(t.event.raw.propertyName==="width"){nl(e.element,kq);io(e.element,"width")}})),Tc(vq,((e,t)=>{const o=e.element;io(o,"width");const n=zo(o);u_.setContent(e,t.event.contents);tl(o,kq);const s=zo(o);eo(o,"width",n+"px");u_.getContent(e).each((e=>{t.event.focus.bind((e=>{Mu(e);return Lu(o)})).orThunk((()=>{Bk.focusIn(e);return Bu(Rt(o))}))}));setTimeout((()=>{eo(e.element,"width",s+"px")}),0)})),Tc(yq,((e,o)=>{u_.getContent(e).each((o=>{t.set(t.get().concat([{bar:o,focus:Bu(Rt(e.element))}]))}));bc(e,vq,{contents:o.event.forwardContents,focus:N.none()})})),Tc(bq,((e,o)=>{le(t.get()).each((o=>{t.set(t.get().slice(0,t.get().length-1));bc(e,vq,{contents:Il(o.bar),focus:o.focus})}))}))]),Bk.config({mode:"special",onEscape:o=>le(t.get()).fold((()=>e.onEscape()),(e=>{yc(o,bq);return N.some(true)}))})]),lazySink:()=>Qn.value(e.sink)})};const _q="tox-pop--transition";const xq=(e,t,o,n)=>{const s=n.backstage;const r=s.shared;const a=pn().deviceType.isTouch;const c=ff();const i=ff();const l=ff();const d=Hl(wq({sink:o,onEscape:()=>{e.focus();return N.some(true)}}));const u=()=>{const t=l.get().getOr("node");const o=aq(t)?1:0;return eq(e,r,t,o)};const f=()=>!e.removed&&!(a()&&s.isContextMenuOpen());const m=e=>Te(Ae(e,c.get(),ht),true);const g=()=>{if(!f()){return true}else{const t=u();const o=Te(l.get(),"node")?JU(e,c.get()):YU(e);return t.height<=0||!KU(o,t)}};const p=()=>{c.clear();i.clear();l.clear();u_.hide(d)};const h=()=>{if(u_.isOpen(d)){const e=d.element;io(e,"display");if(g()){eo(e,"display","none")}else{i.set(0);u_.reposition(d)}}};const y=t=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:xu([Bk.config({mode:"acyclic"}),Jk("pop-dialog-wrap-events",[Hc((t=>{e.shortcuts.add("ctrl+F9","focus statusbar",(()=>Bk.focusIn(t)))})),Ic((t=>{e.shortcuts.remove("ctrl+F9")}))])])});const b=To((()=>hq(t,(e=>{const t=_([e]);bc(d,yq,{forwardContents:y(t)})}))));const k=(t,o)=>hU(e,{buttons:t,toolbar:o.items,allowToolbarGroups:false},n,N.some(["form:"]));const w=(e,t)=>GU.buildInitGroups(e,t);const _=t=>{const{buttons:o}=e.ui.registry.getAll();const n=b();const s={...o,...n.formNavigators};const a=Z_(e)===L_.scrolling?L_.scrolling:L_.default;const c=Z(U(t,(e=>e.type==="contexttoolbar"?k(s,e):w(e,r.providers))));return SV({type:a,uid:Zc("context-toolbar"),initGroups:c,onEscape:N.none,cyclicKeying:true,providers:r.providers})};const x=(t,n)=>{const s=t==="node"?r.anchors.node(n):r.anchors.cursor();const l=lq(e,t,a(),{lastElement:c.get,isReposition:()=>Te(i.get(),0),getMode:()=>Pg.getMode(o)});return ys(s,l)};const z=(e,t)=>{C.cancel();if(!f()){return}const n=_(e);const s=e[0].position;const r=x(s,t);l.set(s);i.set(1);const a=d.element;io(a,"display");if(!m(t)){nl(a,_q);Pg.reset(o,d)}u_.showWithinBounds(d,y(n),{anchor:r,transition:{classes:[_q],mode:"placement"}},(()=>N.some(u())));t.fold(c.clear,c.set);if(g()){eo(a,"display","none")}};const C=iB((()=>{if(!e.hasFocus()||e.removed){return}if(sl(d.element,_q)){C.throttle()}else{const t=b();pq(t,e).fold(p,(e=>{z(e.toolbars,N.some(e.elem))}))}}),17);e.on("init",(()=>{e.on("remove",p);e.on("ScrollContent ScrollWindow ObjectResized ResizeEditor longpress",h);e.on("click keyup focus SetContent",C.throttle);e.on(IU,p);e.on(HU,(t=>{const o=b();ze(o.lookupTable,t.toolbarKey).each((o=>{z([o],Re(t.target!==e,t.target));u_.getContent(d).each(Bk.focusIn)}))}));e.on("focusout",(t=>{f_.setEditorTimeout(e,(()=>{if(Lu(o.element).isNone()&&Lu(d.element).isNone()){p()}}),0)}));e.on("SwitchMode",(()=>{if(e.mode.isReadOnly()){p()}}));e.on("AfterProgressState",(t=>{if(t.state){p()}else if(e.hasFocus()){C.throttle()}}));e.on("NodeChange",(e=>{Lu(d.element).fold(C.throttle,v)}))}))};const zq=e=>{const t=[{name:"alignleft",text:"Align left",cmd:"JustifyLeft",icon:"align-left"},{name:"aligncenter",text:"Align center",cmd:"JustifyCenter",icon:"align-center"},{name:"alignright",text:"Align right",cmd:"JustifyRight",icon:"align-right"},{name:"alignjustify",text:"Justify",cmd:"JustifyFull",icon:"align-justify"}];q(t,(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:ZV(e,t.cmd),onSetup:YV(e,t.name)})}));e.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:ZV(e,"JustifyNone")})};const Cq={unsupportedLength:["em","ex","cap","ch","ic","rem","lh","rlh","vw","vh","vi","vb","vmin","vmax","cm","mm","Q","in","pc","pt","px"],fixed:["px","pt"],relative:["%"],empty:[""]};const Sq=(()=>{const e="[0-9]+";const t="[+-]?"+e;const o="[eE]"+t;const n="\\.";const s=e=>`(?:${e})?`;const r=["Infinity",e+n+s(e)+s(o),n+e+s(o),e+s(o)].join("|");const a=`[+-]?(?:${r})`;return new RegExp(`^(${a})(.*)$`)})();const Tq=(e,t)=>F(t,(t=>F(Cq[t],(t=>e===t))));const Oq=(e,t)=>{const o=N.from(Sq.exec(e));return o.bind((e=>{const o=Number(e[1]);const n=e[2];if(Tq(n,t)){return N.some({value:o,unit:n})}else{return N.none()}}))};const Eq=(e,t)=>Oq(e,t).map((({value:e,unit:t})=>e+t));const Dq=(e,t)=>{const o=()=>{const o=t.getOptions(e);const n=t.getCurrent(e).map(t.hash);const s=ff();return U(o,(o=>({type:"togglemenuitem",text:t.display(o),onSetup:r=>{const a=e=>{if(e){s.on((e=>e.setActive(false)));s.set(r)}r.setActive(e)};a(Te(n,t.hash(o)));const c=t.watcher(e,o,a);return()=>{s.clear();c()}},onAction:()=>t.setCurrent(e,o)})))};e.ui.registry.addMenuButton(t.name,{tooltip:t.text,icon:t.icon,fetch:e=>e(o()),onSetup:t.onToolbarSetup});e.ui.registry.addNestedMenuItem(t.name,{type:"nestedmenuitem",text:t.text,getSubmenuItems:o,onSetup:t.onMenuSetup})};const Aq={name:"lineheight",text:"Line height",icon:"line-height",getOptions:xx,hash:e=>Eq(e,["fixed","relative","empty"]).getOr(e),display:z,watcher:(e,t,o)=>e.formatter.formatChanged("lineheight",o,false,{value:t}).unbind,getCurrent:e=>N.from(e.queryCommandValue("LineHeight")),setCurrent:(e,t)=>e.execCommand("LineHeight",false,t)};const Mq=e=>{const t=N.from(J_(e));return t.map((t=>({name:"language",text:"Language",icon:"language",getOptions:x(t),hash:e=>m(e.customCode)?e.code:`${e.code}/${e.customCode}`,display:e=>e.title,watcher:(e,t,o)=>e.formatter.formatChanged("lang",o,false,{value:t.code,customValue:t.customCode}).unbind,getCurrent:e=>{const t=Ze.fromDom(e.selection.getNode());return pa(t,(e=>N.some(e).filter(ct).bind((e=>{const t=Kt(e,"lang");return t.map((t=>{const o=Kt(e,"data-mce-lang").getOrUndefined();return{code:t,customCode:o,title:""}}))}))))},setCurrent:(e,t)=>e.execCommand("Lang",false,t),onToolbarSetup:t=>{const o=uf();t.setActive(e.formatter.match("lang",{},undefined,true));o.set(e.formatter.formatChanged("lang",t.setActive,true));return o.clear}})))};const Nq=e=>{Dq(e,Aq);Mq(e).each((t=>Dq(e,t)))};const Rq=(e,t)=>{uj(e,t);wj(e,t);Mj(e,t);pj(e,t);Ej(e,t)};const Bq=e=>JV(e,"NodeChange",(t=>{t.setEnabled(e.queryCommandState("outdent"))}));const Lq=e=>{e.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:Bq(e),onAction:ZV(e,"outdent")});e.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:ZV(e,"indent")})};const Hq=e=>{Lq(e)};const Iq=(e,t)=>o=>{o.setActive(t.get());const n=e=>{t.set(e.state);o.setActive(e.state)};e.on("PastePlainTextToggle",n);return()=>e.off("PastePlainTextToggle",n)};const Pq=e=>{const t=ea(vx(e));const o=()=>e.execCommand("mceTogglePlainTextPaste");e.ui.registry.addToggleButton("pastetext",{active:false,icon:"paste-text",tooltip:"Paste as text",onAction:o,onSetup:Iq(e,t)});e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:o,onSetup:Iq(e,t)})};const Fq=(e,t)=>()=>{e.execCommand("mceToggleFormat",false,t)};const Vq=e=>{KN.each([{name:"bold",text:"Bold",icon:"bold"},{name:"italic",text:"Italic",icon:"italic"},{name:"underline",text:"Underline",icon:"underline"},{name:"strikethrough",text:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",icon:"superscript"}],((t,o)=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onSetup:YV(e,t.name),onAction:Fq(e,t.name)})}));for(let t=1;t<=6;t++){const o="h"+t;e.ui.registry.addToggleButton(o,{text:o.toUpperCase(),tooltip:"Heading "+t,onSetup:YV(e,o),onAction:Fq(e,o)})}};const jq=e=>{KN.each([{name:"cut",text:"Cut",action:"Cut",icon:"cut"},{name:"copy",text:"Copy",action:"Copy",icon:"copy"},{name:"paste",text:"Paste",action:"Paste",icon:"paste"},{name:"help",text:"Help",action:"mceHelp",icon:"help"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"remove",text:"Remove",action:"Delete",icon:"remove"},{name:"print",text:"Print",action:"mcePrint",icon:"print"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addButton(t.name,{tooltip:t.text,icon:t.icon,onAction:ZV(e,t.action)})}))};const Uq=e=>{KN.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:ZV(e,t.action),onSetup:YV(e,t.name)})}))};const qq=e=>{Vq(e);jq(e);Uq(e)};const Wq=e=>{KN.each([{name:"bold",text:"Bold",action:"Bold",icon:"bold",shortcut:"Meta+B"},{name:"italic",text:"Italic",action:"Italic",icon:"italic",shortcut:"Meta+I"},{name:"underline",text:"Underline",action:"Underline",icon:"underline",shortcut:"Meta+U"},{name:"strikethrough",text:"Strikethrough",action:"Strikethrough",icon:"strike-through"},{name:"subscript",text:"Subscript",action:"Subscript",icon:"subscript"},{name:"superscript",text:"Superscript",action:"Superscript",icon:"superscript"},{name:"removeformat",text:"Clear formatting",action:"RemoveFormat",icon:"remove-formatting"},{name:"newdocument",text:"New document",action:"mceNewDocument",icon:"new-document"},{name:"cut",text:"Cut",action:"Cut",icon:"cut",shortcut:"Meta+X"},{name:"copy",text:"Copy",action:"Copy",icon:"copy",shortcut:"Meta+C"},{name:"paste",text:"Paste",action:"Paste",icon:"paste",shortcut:"Meta+V"},{name:"selectall",text:"Select all",action:"SelectAll",icon:"select-all",shortcut:"Meta+A"},{name:"print",text:"Print...",action:"mcePrint",icon:"print",shortcut:"Meta+P"},{name:"hr",text:"Horizontal line",action:"InsertHorizontalRule",icon:"horizontal-rule"}],(t=>{e.ui.registry.addMenuItem(t.name,{text:t.text,icon:t.icon,shortcut:t.shortcut,onAction:ZV(e,t.action)})}));e.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:Fq(e,"code")})};const $q=e=>{qq(e);Wq(e)};const Gq=(e,t)=>JV(e,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(o=>{o.setEnabled(!e.mode.isReadOnly()&&e.undoManager[t]())}));const Kq=e=>{e.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:Gq(e,"hasUndo"),onAction:ZV(e,"undo")});e.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:Gq(e,"hasRedo"),onAction:ZV(e,"redo")})};const Xq=e=>{e.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:false,onSetup:Gq(e,"hasUndo"),onAction:ZV(e,"undo")});e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:false,onSetup:Gq(e,"hasRedo"),onAction:ZV(e,"redo")})};const Yq=e=>{Kq(e);Xq(e)};const Jq=e=>JV(e,"VisualAid",(t=>{t.setActive(e.hasVisual)}));const Qq=e=>{e.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:Jq(e),onAction:ZV(e,"mceToggleVisualAid")})};const Zq=e=>{e.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:ZV(e,"mceToggleVisualAid")})};const eW=e=>{Zq(e);Qq(e)};const tW=(e,t)=>{zq(e);$q(e);Rq(e,t);Yq(e);ZT(e);eW(e);Hq(e);Nq(e);Pq(e)};const oW=e=>c(e)?e.split(/[ ,]/):e;const nW=e=>t=>t.options.get(e);const sW=e=>{const t=e.options.register;t("contextmenu_avoid_overlap",{processor:"string",default:""});t("contextmenu_never_use_native",{processor:"boolean",default:false});t("contextmenu",{processor:e=>{if(e===false){return{value:[],valid:true}}else if(c(e)||b(e,c)){return{value:oW(e),valid:true}}else{return{valid:false,message:"Must be false or a string."}}},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})};const rW=nW("contextmenu_never_use_native");const aW=nW("contextmenu_avoid_overlap");const cW=e=>iW(e).length===0;const iW=e=>{const t=e.ui.registry.getAll().contextMenus;const o=e.options.get("contextmenu");if(e.options.isSet("contextmenu")){return o}else{return G(o,(e=>Ce(t,e)))}};const lW=(e,t)=>({type:"makeshift",x:e,y:t});const dW=(e,t,o)=>lW(e.x+t,e.y+o);const uW=e=>e.type==="longpress"||e.type.indexOf("touch")===0;const fW=e=>{if(uW(e)){const t=e.touches[0];return lW(t.pageX,t.pageY)}else{return lW(e.pageX,e.pageY)}};const mW=e=>{if(uW(e)){const t=e.touches[0];return lW(t.clientX,t.clientY)}else{return lW(e.clientX,e.clientY)}};const gW=(e,t)=>{const o=N_.DOM.getPos(e);return dW(t,o.x,o.y)};const pW=(e,t)=>{if(t.type==="contextmenu"||t.type==="longpress"){if(e.inline){return fW(t)}else{return gW(e.getContentAreaContainer(),mW(t))}}else{return hW(e)}};const hW=e=>({type:"selection",root:Ze.fromDom(e.selection.getNode())});const yW=e=>({type:"node",node:N.some(Ze.fromDom(e.selection.getNode())),root:Ze.fromDom(e.getBody())});const bW=(e,t,o)=>{switch(o){case"node":return yW(e);case"point":return pW(e,t);case"selection":return hW(e)}};const vW=(e,t,o,n,s,r)=>{const a=o();const c=bW(e,t,r);AR(a,Vx.CLOSE_ON_EXECUTE,n,false).map((e=>{t.preventDefault();u_.showMenuAt(s,{anchor:c},{menu:{markers:uz("normal")},data:e})}))};const kW={onLtr:()=>[nu,Qd,Zd,eu,tu,ou,AL,ML,DL,OL,EL,TL],onRtl:()=>[nu,Zd,Qd,tu,eu,ou,AL,ML,EL,TL,DL,OL]};const wW=12;const _W={valignCentre:[],alignCentre:[],alignLeft:["tox-pop--align-left"],alignRight:["tox-pop--align-right"],right:["tox-pop--right"],left:["tox-pop--left"],bottom:["tox-pop--bottom"],top:["tox-pop--top"]};const xW=(e,t)=>{const o=e.selection;if(o.isCollapsed()||t.touches.length<1){return false}else{const n=t.touches[0];const s=o.getRng();const r=eg(e.getWin(),Nm.domRange(s));return r.exists((e=>e.left<=n.clientX&&e.right>=n.clientX&&e.top<=n.clientY&&e.bottom>=n.clientY))}};const zW=e=>{const t=e.selection.getRng();const o=()=>{f_.setEditorTimeout(e,(()=>{e.selection.setRng(t)}),10);r()};e.once("touchend",o);const n=e=>{e.preventDefault();e.stopImmediatePropagation()};e.on("mousedown",n,true);const s=()=>r();e.once("longpresscancel",s);const r=()=>{e.off("touchend",o);e.off("longpresscancel",s);e.off("mousedown",n)}};const CW=(e,t,o)=>{const n=bW(e,t,o);const s=o==="point"?wW:0;return{bubble:Ff(0,s,_W),layouts:kW,overrides:{maxWidthFunction:YF(),maxHeightFunction:Bf()},...n}};const SW=(e,t,o,n,s,r,a)=>{const c=CW(e,t,r);AR(o,Vx.CLOSE_ON_EXECUTE,n,true).map((o=>{t.preventDefault();u_.showMenuWithinBounds(s,{anchor:c},{menu:{markers:uz("normal"),highlightImmediately:a},data:o,type:"horizontal"},(()=>N.some(eq(e,n.shared,r==="node"?"node":"selection"))));e.dispatch(IU)}))};const TW=(e,t,o,n,s,r)=>{const a=pn();const c=a.os.isiOS();const i=a.os.isMacOS();const l=a.os.isAndroid();const d=a.deviceType.isTouch();const u=()=>!(l||c||i&&d);const f=()=>{const a=o();SW(e,t,a,n,s,r,u())};if((i||c)&&r!=="node"){const o=()=>{zW(e);f()};if(xW(e,t)){o()}else{e.once("selectionchange",o);e.once("touchend",(()=>e.off("selectionchange",o)))}}else{f()}};const OW=e=>c(e)?e==="|":e.type==="separator";const EW={type:"separator"};const DW=e=>{const t=e=>({text:e.text,icon:e.icon,enabled:e.enabled,shortcut:e.shortcut});if(c(e)){return e}else{switch(e.type){case"separator":return EW;case"submenu":return{type:"nestedmenuitem",...t(e),getSubmenuItems:()=>{const t=e.getSubmenuItems();if(c(t)){return t}else{return U(t,DW)}}};default:return{type:"menuitem",...t(e),onAction:k(e.onAction)}}}};const AW=(e,t)=>{if(t.length===0){return e}const o=le(e).filter((e=>!OW(e)));const n=o.fold((()=>[]),(e=>[EW]));return e.concat(n).concat(t).concat([EW])};const MW=(e,t,o)=>{const n=X(t,((t,n)=>ze(e,n.toLowerCase()).map((e=>{const n=e.update(o);if(c(n)){return AW(t,n.split(" "))}else if(n.length>0){const e=U(n,DW);return AW(t,e)}else{return t}})).getOrThunk((()=>t.concat([n])))),[]);if(n.length>0&&OW(n[n.length-1])){n.pop()}return n};const NW=(e,t)=>t.ctrlKey&&!rW(e);const RW=(e,t)=>t.type!=="longpress"&&(t.button!==2||t.target===e.getBody()&&t.pointerType==="");const BW=(e,t)=>RW(e,t)?e.selection.getStart(true):t.target;const LW=(e,t)=>{const o=aW(e);const n=RW(e,t)?"selection":"point";if(We(o)){const s=BW(e,t);const r=LO(Ze.fromDom(s),o);return r?"node":n}else{return n}};const HW=(e,t,o)=>{const n=pn();const s=n.deviceType.isTouch;const r=Hl(u_.sketch({dom:{tag:"div"},lazySink:t,onEscape:()=>e.focus(),onShow:()=>o.setContextMenuState(true),onHide:()=>o.setContextMenuState(false),fireDismissalEventInstead:{},inlineBehaviours:xu([Jk("dismissContextMenu",[Tc(lc(),((t,o)=>{xp.close(t);e.focus()}))])])}));const a=e=>u_.hide(r);const c=t=>{if(rW(e)){t.preventDefault()}if(NW(e,t)||cW(e)){return}const n=LW(e,t);const a=()=>{const o=BW(e,t);const n=e.ui.registry.getAll();const s=iW(e);return MW(n.contextMenus,s,o)};const c=s()?TW:vW;c(e,t,a,o,r,n)};e.on("init",(()=>{const t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(s()?"":" ResizeWindow");e.on(t,a);e.on("longpress contextmenu",c)}))};const IW=oa.generate([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]);const PW=e=>t=>t.translate(-e.left,-e.top);const FW=e=>t=>t.translate(e.left,e.top);const VW=e=>(t,o)=>X(e,((e,t)=>t(e)),yo(t,o));const jW=(e,t,o)=>e.fold(VW([FW(o),PW(t)]),VW([PW(t)]),VW([]));const UW=(e,t,o)=>e.fold(VW([FW(o)]),VW([]),VW([FW(t)]));const qW=(e,t,o)=>e.fold(VW([]),VW([PW(o)]),VW([FW(t),PW(o)]));const WW=(e,t,o,n,s,r)=>{const a=UW(e,s,r);const c=UW(t,s,r);return Math.abs(a.left-c.left)<=o&&Math.abs(a.top-c.top)<=n};const $W=(e,t,o,n,s,r)=>{const a=UW(e,s,r);const c=UW(t,s,r);const i=Math.abs(a.left-c.left);const l=Math.abs(a.top-c.top);return yo(i,l)};const GW=(e,t,o)=>{const n=e.fold(((e,t)=>({position:N.some("absolute"),left:N.some(e+"px"),top:N.some(t+"px")})),((e,t)=>({position:N.some("absolute"),left:N.some(e-o.left+"px"),top:N.some(t-o.top+"px")})),((e,t)=>({position:N.some("fixed"),left:N.some(e+"px"),top:N.some(t+"px")})));return{right:N.none(),bottom:N.none(),...n}};const KW=(e,t,o)=>e.fold(((e,n)=>YW(e+t,n+o)),((e,n)=>JW(e+t,n+o)),((e,n)=>QW(e+t,n+o)));const XW=(e,t,o,n)=>{const s=(e,s)=>(r,a)=>{const c=e(t,o,n);return s(r.getOr(c.left),a.getOr(c.top))};return e.fold(s(qW,YW),s(UW,JW),s(jW,QW))};const YW=IW.offset;const JW=IW.absolute;const QW=IW.fixed;const ZW=(e,t)=>{const o=Gt(e,t);return m(o)?NaN:parseInt(o,10)};const e$=(e,t)=>{const o=e.element;const n=ZW(o,t.leftAttr);const s=ZW(o,t.topAttr);return isNaN(n)||isNaN(s)?N.none():N.some(yo(n,s))};const t$=(e,t,o)=>{const n=e.element;Wt(n,t.leftAttr,o.left+"px");Wt(n,t.topAttr,o.top+"px")};const o$=(e,t)=>{const o=e.element;Yt(o,t.leftAttr);Yt(o,t.topAttr)};const n$=(e,t,o,n)=>e$(e,t).fold((()=>o),(e=>QW(e.left+n.left,e.top+n.top)));const s$=(e,t,o,n,s,r)=>{const a=n$(e,t,o,n);const c=t.mustSnap?c$(e,t,a,s,r):i$(e,t,a,s,r);const i=jW(a,s,r);t$(e,t,i);return c.fold((()=>({coord:QW(i.left,i.top),extra:N.none()})),(e=>({coord:e.output,extra:e.extra})))};const r$=(e,t)=>{o$(e,t)};const a$=(e,t,o,n)=>ue(e,(e=>{const s=e.sensor;const r=WW(t,s,e.range.left,e.range.top,o,n);return r?N.some({output:XW(e.output,t,o,n),extra:e.extra}):N.none()}));const c$=(e,t,o,n,s)=>{const r=t.getSnapPoints(e);const a=a$(r,o,n,s);return a.orThunk((()=>{const e=X(r,((e,t)=>{const r=t.sensor;const a=$W(o,r,t.range.left,t.range.top,n,s);return e.deltas.fold((()=>({deltas:N.some(a),snap:N.some(t)})),(o=>{const n=(a.left+a.top)/2;const s=(o.left+o.top)/2;if(n<=s){return{deltas:N.some(a),snap:N.some(t)}}else{return e}}))}),{deltas:N.none(),snap:N.none()});return e.snap.map((e=>({output:XW(e.output,o,n,s),extra:e.extra})))}))};const i$=(e,t,o,n,s)=>{const r=t.getSnapPoints(e);return a$(r,o,n,s)};const l$=(e,t,o)=>({coord:XW(e.output,e.output,t,o),extra:e.extra});const d$=(e,t,o,n)=>{const s=t.getTarget(e.element);if(t.repositionTarget){const t=bt(e.element);const o=An(t);const r=kI(s);const a=l$(n,o,r);const c=GW(a.coord,o,r);oo(s,c)}};var u$=Object.freeze({__proto__:null,snapTo:d$});const f$="data-initial-z-index";const m$=e=>{_t(e.element).filter(ct).each((e=>{Kt(e,f$).fold((()=>io(e,"z-index")),(t=>eo(e,"z-index",t)));Yt(e,f$)}))};const g$=e=>{_t(e.element).filter(ct).each((t=>{ro(t,"z-index").each((e=>{Wt(t,f$,e)}));eo(t,"z-index",no(e.element,"z-index"))}))};const p$=(e,t)=>{e.getSystem().addToGui(t);g$(t)};const h$=e=>{m$(e);e.getSystem().removeFromGui(e)};const y$=(e,t,o)=>e.getSystem().build(aE.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:o}));var b$=jr("snaps",[zr("getSnapPoints"),bd("onSensor"),zr("leftAttr"),zr("topAttr"),qr("lazyViewport",Kn),qr("mustSnap",false)]);const v$=[qr("useFixed",D),zr("blockerClass"),qr("getTarget",z),qr("onDrag",v),qr("repositionTarget",true),qr("onDrop",v),Yr("getBounds",Kn),b$];const k$=e=>Me(ro(e,"left"),ro(e,"top"),ro(e,"position"),((e,t,o)=>{const n=o==="fixed"?QW:YW;return n(parseInt(e,10),parseInt(t,10))})).getOrThunk((()=>{const t=ko(e);return JW(t.left,t.top)}));const w$=(e,t,o,n,s)=>{const r=s.bounds;const a=UW(t,o,n);const c=Pd(a.left,r.x,r.x+r.width-s.width);const i=Pd(a.top,r.y,r.y+r.height-s.height);const l=JW(c,i);return t.fold((()=>{const e=qW(l,o,n);return YW(e.left,e.top)}),x(l),(()=>{const e=jW(l,o,n);return QW(e.left,e.top)}))};const _$=(e,t,o,n,s,r,a)=>{const c=t.fold((()=>{const e=KW(o,r.left,r.top);const t=jW(e,n,s);return QW(t.left,t.top)}),(t=>{const a=s$(e,t,o,r,n,s);a.extra.each((o=>{t.onSensor(e,o)}));return a.coord}));return w$(e,c,n,s,a)};const x$=(e,t,o,n)=>{const s=t.getTarget(e.element);if(t.repositionTarget){const r=bt(e.element);const a=An(r);const c=kI(s);const i=k$(s);const l=_$(e,t.snaps,i,a,c,n,o);const d=GW(l,a,c);oo(s,d)}t.onDrag(e,s,n)};const z$=(e,t)=>({bounds:e.getBounds(),height:go(t.element),width:Co(t.element)});const C$=(e,t,o,n,s)=>{const r=o.update(n,s);const a=o.getStartData().getOrThunk((()=>z$(t,e)));r.each((o=>{x$(e,t,a,o)}))};const S$=(e,t,o,n)=>{t.each(h$);o.snaps.each((t=>{r$(e,t)}));const s=o.getTarget(e.element);n.reset();o.onDrop(e,s)};const T$=e=>(t,o)=>{const n=e=>{o.setStartData(z$(t,e))};return xc([Tc(rc(),(e=>{o.getStartData().each((()=>n(e)))})),...e(t,o,n)])};const O$=e=>xc([Tc(Oa(),e.forceDrop),Tc(Aa(),e.drop),Tc(Ea(),((t,o)=>{e.move(o.event)})),Tc(Da(),e.delayDrop)]);const E$=e=>N.from(yo(e.x,e.y));const D$=(e,t)=>yo(t.left-e.left,t.top-e.top);var A$=Object.freeze({__proto__:null,getData:E$,getDelta:D$});const M$=(e,t,o)=>[Tc(Oa(),((n,s)=>{const r=s.event.raw;if(r.button!==0){return}s.stop();const a=()=>S$(n,N.some(l),e,t);const c=HO(a,200);const i={drop:a,delayDrop:c.schedule,forceDrop:a,move:o=>{c.cancel();C$(n,e,t,A$,o)}};const l=y$(n,e.blockerClass,O$(i));const d=()=>{o(n);p$(n,l)};d()}))];const N$=[...v$,_d("dragger",{handlers:T$(M$)})];const R$=e=>xc([Tc(za(),e.forceDrop),Tc(Sa(),e.drop),Tc(Ta(),e.drop),Tc(Ca(),((t,o)=>{e.move(o.event)}))]);const B$=e=>{const t=e[0];return N.some(yo(t.clientX,t.clientY))};const L$=e=>{const t=e.raw;const o=t.touches;return o.length===1?B$(o):N.none()};const H$=(e,t)=>yo(t.left-e.left,t.top-e.top);var I$=Object.freeze({__proto__:null,getData:L$,getDelta:H$});const P$=(e,t,o)=>{const n=ff();const s=o=>{S$(o,n.get(),e,t);n.clear()};return[Tc(za(),((r,a)=>{a.stop();const c=()=>s(r);const i={drop:c,delayDrop:v,forceDrop:c,move:o=>{C$(r,e,t,I$,o)}};const l=y$(r,e.blockerClass,R$(i));n.set(l);const d=()=>{o(r);p$(r,l)};d()})),Tc(Ca(),((o,n)=>{n.stop();C$(o,e,t,I$,n.event)})),Tc(Sa(),((e,t)=>{t.stop();s(e)})),Tc(Ta(),s)]};const F$=[...v$,_d("dragger",{handlers:T$(P$)})];const V$=(e,t,o)=>[...M$(e,t,o),...P$(e,t,o)];const j$=[...v$,_d("dragger",{handlers:T$(V$)})];const U$=N$;const q$=F$;const W$=j$;var $$=Object.freeze({__proto__:null,mouse:U$,touch:q$,mouseOrTouch:W$});const G$=()=>{let e=N.none();let t=N.none();const o=()=>{e=N.none();t=N.none()};const n=(t,o)=>{const n=e.map((e=>t.getDelta(e,o)));e=N.some(o);return n};const s=(e,t)=>e.getData(t).bind((t=>n(e,t)));const r=e=>{t=N.some(e)};const a=()=>t;const c=x({});return wi({readState:c,reset:o,update:s,getStartData:a,setStartData:r})};var K$=Object.freeze({__proto__:null,init:G$});const X$=Tu({branchKey:"mode",branches:$$,name:"dragging",active:{events:(e,t)=>{const o=e.dragger;return o.handlers(e,t)}},extra:{snap:e=>({sensor:e.sensor,range:e.range,output:e.output,extra:N.from(e.extra)})},state:K$,apis:u$});const Y$=40;const J$=Y$/2;const Q$=(e,t,o,n,s,r)=>e.fold((()=>X$.snap({sensor:JW(o-J$,n-J$),range:yo(s,r),output:JW(N.some(o),N.some(n)),extra:{td:t}})),(e=>{const s=o-J$;const r=n-J$;const a=Y$;const c=Y$;const i=e.element.dom.getBoundingClientRect();return X$.snap({sensor:JW(s,r),range:yo(a,c),output:JW(N.some(o-i.width/2),N.some(n-i.height/2)),extra:{td:t}})}));const Z$=(e,t,o)=>{const n=(e,t)=>e.exists((e=>ht(e,t)));return{getSnapPoints:e,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(e,s)=>{const r=s.td;if(!n(t.get(),r)){t.set(r);o(r)}},mustSnap:true}};const eG=e=>p_(g_.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:xu([X$.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:e}),RD.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}}));const tG=(e,t)=>{const o=ea([]);const n=ea([]);const s=ea(false);const r=ff();const a=ff();const c=e=>{const o=Gn(e);return Q$(m.getOpt(t),e,o.x,o.y,o.width,o.height)};const i=()=>U(o.get(),(e=>c(e)));const l=e=>{const o=Gn(e);return Q$(g.getOpt(t),e,o.right,o.bottom,o.width,o.height)};const d=()=>U(n.get(),(e=>l(e)));const u=Z$(i,r,(t=>{a.get().each((o=>{e.dispatch("TableSelectorChange",{start:t,finish:o})}))}));const f=Z$(d,a,(t=>{r.get().each((o=>{e.dispatch("TableSelectorChange",{start:o,finish:t})}))}));const m=eG(u);const g=eG(f);const p=Hl(m.asSpec());const h=Hl(g.asSpec());const y=(t,o,n,s)=>{const r=o.dom.getBoundingClientRect();io(t.element,"display");const a=wt(Ze.fromDom(e.getBody())).dom.innerHeight;const c=n(r);const i=s(r,a);if(c||i){eo(t.element,"display","none")}};const b=(e,t,o,n)=>{const s=o(t);X$.snapTo(e,s);const r=e=>e[n]<0;const a=(e,t)=>e[n]>t;y(e,t,r,a)};const v=e=>b(p,e,c,"top");const k=()=>r.get().each(v);const w=e=>b(h,e,l,"bottom");const _=()=>a.get().each(w);if(pn().deviceType.isTouch()){e.on("TableSelectionChange",(e=>{if(!s.get()){Xg(t,p);Xg(t,h);s.set(true)}r.set(e.start);a.set(e.finish);e.otherCells.each((t=>{o.set(t.upOrLeftCells);n.set(t.downOrRightCells);v(e.start);w(e.finish)}))}));e.on("ResizeEditor ResizeWindow ScrollContent",(()=>{k();_()}));e.on("TableSelectionClear",(()=>{if(s.get()){Qg(p);Qg(h);s.set(false)}r.clear();a.clear()}))}};var oG='<svg width="50px" height="16px" viewBox="0 0 50 16" xmlns="http://www.w3.org/2000/svg">\n <path fill-rule="evenodd" clip-rule="evenodd" d="M10.143 0c2.608.015 5.186 2.178 5.186 5.331 0 0 .077 3.812-.084 4.87-.361 2.41-2.164 4.074-4.65 4.496-1.453.284-2.523.49-3.212.623-.373.071-.634.122-.785.152-.184.038-.997.145-1.35.145-2.732 0-5.21-2.04-5.248-5.33 0 0 0-3.514.03-4.442.093-2.4 1.758-4.342 4.926-4.963 0 0 3.875-.752 4.036-.782.368-.07.775-.1 1.15-.1Zm1.826 2.8L5.83 3.989v2.393l-2.455.475v5.968l6.137-1.189V9.243l2.456-.476V2.8ZM5.83 6.382l3.682-.713v3.574l-3.682.713V6.382Zm27.173-1.64-.084-1.066h-2.226v9.132h2.456V7.743c-.008-1.151.998-2.064 2.149-2.072 1.15-.008 1.987.92 1.995 2.072v5.065h2.455V7.359c-.015-2.18-1.657-3.929-3.837-3.913a3.993 3.993 0 0 0-2.908 1.296Zm-6.3-4.266L29.16 0v2.387l-2.456.475V.476Zm0 3.2v9.132h2.456V3.676h-2.456Zm18.179 11.787L49.11 3.676H46.58l-1.612 4.527-.46 1.382-.384-1.382-1.611-4.527H39.98l3.3 9.132L42.15 16l2.732-.537ZM22.867 9.738c0 .752.568 1.075.921 1.075.353 0 .668-.047.998-.154l.537 1.765c-.23.154-.92.537-2.225.537-1.305 0-2.655-.997-2.686-2.686a136.877 136.877 0 0 1 0-4.374H18.8V3.676h1.612v-1.98l2.455-.476v2.456h2.302V5.9h-2.302v3.837Z"/>\n</svg>\n';const nG=e=>e.nodeName==="BR"||!!e.getAttribute("data-mce-bogus")||e.getAttribute("data-mce-type")==="bookmark";const sG=(e,t,o)=>{var n;const s=(n=t.delimiter)!==null&&n!==void 0?n:"›";const r=(t,n,s)=>g_.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":s,"aria-level":s+1}},components:[Ml(t)],action:t=>{e.focus();e.selection.select(n);e.nodeChanged()},buttonBehaviours:xu([pS.button(o.isDisabled),dS()])});const a=()=>({dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":true}},components:[Ml(` ${s} `)]});const c=e=>X(e,((e,t,o)=>{const n=r(t.name,t.element,o);if(o===0){return e.concat([n])}else{return e.concat([a(),n])}}),[]);const i=t=>{const o=[];let n=t.length;while(n-- >0){const s=t[n];if(s.nodeType===1&&!nG(s)){const t=e.dispatch("ResolveName",{name:s.nodeName.toLowerCase(),target:s});if(!t.isDefaultPrevented()){o.push({name:t.name,element:s})}if(t.isPropagationStopped()){break}}}return o};return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:xu([Bk.config({mode:"flow",selector:"div[role=button]"}),jy.config({disabled:o.isDisabled}),dS(),hE.config({}),Xk.config({}),Jk("elementPathEvents",[Hc(((t,o)=>{e.shortcuts.add("alt+F11","focus statusbar elementpath",(()=>Bk.focusIn(t)));e.on("NodeChange",(e=>{const o=i(e.parents);const n=o.length>0?c(o):[];Xk.set(t,n)}))}))])]),components:[]}};var rG;(function(e){e[e["None"]=0]="None";e[e["Both"]=1]="Both";e[e["Vertical"]=2]="Vertical"})(rG||(rG={}));const aG=(e,t,o,n,s)=>{const r={};r.height=CU(n+t.top,W_(e),G_(e));if(o===rG.Both){r.width=CU(s+t.left,q_(e),$_(e))}return r};const cG=(e,t,o)=>{const n=Ze.fromDom(e.getContainer());const s=aG(e,t,o,mo(n),zo(n));ge(s,((e,t)=>eo(n,t,zU(e))));bT(e)};const iG=e=>{const t=bx(e);if(t===false){return rG.None}else if(t==="both"){return rG.Both}else{return rG.Vertical}};const lG=(e,t,o,n)=>{const s=20;const r=yo(o*s,n*s);cG(e,r,t);return N.some(true)};const dG=(e,t)=>{const o=iG(e);if(o===rG.None){return N.none()}return N.some(T_("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize")},behaviours:[X$.config({mode:"mouse",repositionTarget:false,onDrag:(t,n,s)=>cG(e,s,o),blockerClass:"tox-blocker"}),Bk.config({mode:"special",onLeft:()=>lG(e,o,-1,0),onRight:()=>lG(e,o,1,0),onUp:()=>lG(e,o,0,-1),onDown:()=>lG(e,o,0,1)}),hE.config({}),aw.config({})]},t.icons))};const uG=(e,t)=>{const o=(e,o,n)=>Xk.set(e,[Ml(t.translate(["{0} "+n,o[n]]))]);return g_.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:xu([pS.button(t.isDisabled),dS(),hE.config({}),Xk.config({}),rh.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Jk("wordcount-events",[Fc((e=>{const t=rh.getValue(e);const n=t.mode==="words"?"characters":"words";rh.setValue(e,{mode:n,count:t.count});o(e,t.count,n)})),Hc((t=>{e.on("wordCountUpdate",(e=>{const{mode:n}=rh.getValue(t);rh.setValue(t,{mode:n,count:e.wordCount});o(t,e.wordCount,n)}))}))])]),eventOrder:{[Ya()]:["disabling","alloy.base.behaviour","wordcount-events"]}})};const fG=(e,t)=>{const o=()=>({dom:{tag:"span",classes:["tox-statusbar__branding"]},components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/powered-by-tiny?utm_campaign=editor_referral&utm_medium=poweredby&utm_source=tinymce&utm_content=v6",rel:"noopener",target:"_blank","aria-label":h_.translate(["Powered by {0}","Tiny"])},innerHtml:oG.trim()},behaviours:xu([aw.config({})])}]});const n=()=>{const n=[];if(hx(e)){n.push(sG(e,{},t))}if(e.hasPlugin("wordcount")){n.push(uG(e,t))}if(yx(e)){n.push(o())}if(n.length>0){return[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:n}]}return[]};const s=()=>{const o=n();const s=dG(e,t);return o.concat(s.toArray())};return{dom:{tag:"div",classes:["tox-statusbar"]},components:s()}};const mG=e=>e.get().getOrDie("UI has not been rendered");const gG=e=>{const t=e.inline;const o=t?LU:_U;const n=Mx(e)?mP:bI;const s=ff();const r=ff();const a=ff();const c=ff();const i=pn();const l=i.deviceType.isTouch();const d="tox-platform-touch";const u=l?[d]:[];const f=Tx(e);const m=Z_(e);const g=p_({dom:{tag:"div",classes:["tox-anchorbar"]}});const p=()=>r.get().bind(LV.getHeader);const h=()=>Qn.fromOption(s.get(),"UI has not been rendered");const y=()=>r.get().bind((e=>g.getOpt(e))).getOrDie("Could not find a anchor bar element");const b=()=>r.get().bind((e=>LV.getToolbar(e))).getOrDie("Could not find more toolbar element");const v=()=>r.get().bind((e=>LV.getThrobber(e))).getOrDie("Could not find throbber element");const k=ZH(h,e,y);const w=()=>{const t={attributes:{[$f]:f?Wf.BottomToTop:Wf.TopToBottom}};const o=LV.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:k,onEscape:()=>{e.focus()}});const n=LV.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:h,providers:k.shared.providers,onEscape:()=>{e.focus()},type:m,lazyToolbar:b,lazyHeader:()=>p().getOrDie("Could not find header element"),...t});const s=LV.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:k.shared.providers,onEscape:()=>{e.focus()},type:m});const r=Sx(e);const a=zx(e);const c=wx(e);const i=()=>{if(r){return[s]}else if(a){return[n]}else{return[]}};return LV.parts.header({dom:{tag:"div",classes:["tox-editor-header"],...t},components:Z([c?[o]:[],i(),Ex(e)?[]:[g.asSpec()]]),sticky:Mx(e),editor:e,sharedBackstage:k.shared})};const _=()=>{const e=LV.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}});const t=LV.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}});return{dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[e,t]}};const x=()=>{const t=Dx(e);const o=ht(jt(),t)&&no(t,"display")==="grid";const r={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(u),attributes:{...h_.isRtl()?{dir:"rtl"}:{}}},behaviours:xu([Pg.config({useFixed:()=>n.isDocked(p)})])};const a={dom:{styles:{width:document.body.clientWidth+"px"}},events:xc([Tc(ac(),(e=>{eo(e.element,"width",document.body.clientWidth+"px")}))])};const i=Hl(ys(r,o?a:{}));const l=cE(i);s.set(i);c.set(l);return{sink:i,uiMothership:l}};const z=()=>{const o=w();const n=_();const s=LV.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:k});const c=px(e)&&!t?N.some(fG(e,k.shared.providers)):N.none();const i=Z([f?[]:[o],t?[]:[n],f?[o]:[]]);const l={dom:{tag:"div",classes:["tox-editor-container"]},components:i};const d=Z([[l],t?[]:c.toArray(),[s]]);const m=Ax(e);const g={role:"application",...h_.isRtl()?{dir:"rtl"}:{},...m?{"aria-hidden":"true"}:{}};const p=Hl(LV.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(t?["tox-tinymce-inline"]:[]).concat(f?["tox-tinymce--toolbar-bottom"]:[]).concat(u),styles:{visibility:"hidden",...m?{opacity:"0",border:"0"}:{}},attributes:g},components:d,behaviours:xu([dS(),jy.config({disableClass:"tox-tinymce--disabled"}),Bk.config({mode:"cyclic",selector:".tox-menubar, .tox-toolbar, .tox-toolbar__primary, .tox-toolbar__overflow--open, .tox-sidebar__overflow--open, .tox-statusbar__path, .tox-statusbar__wordcount, .tox-statusbar__branding a, .tox-statusbar__resize-handle"})])}));const h=cE(p);r.set(p);a.set(h);return{mothership:h,outerContainer:p}};const C=t=>{const o=zU(TU(e));const n=zU(EU(e));if(!e.inline){if(co("div","width",n)){eo(t.element,"width",n)}if(co("div","height",o)){eo(t.element,"height",o)}else{eo(t.element,"height","400px")}}return o};const S=t=>{e.addShortcut("alt+F9","focus menubar",(()=>{LV.focusMenubar(t)}));e.addShortcut("alt+F10","focus toolbar",(()=>{LV.focusToolbar(t)}));e.addCommand("ToggleToolbarDrawer",(()=>{LV.toggleToolbarDrawer(t)}));e.addQueryStateHandler("ToggleToolbarDrawer",(()=>LV.isToolbarDrawerToggled(t)))};const T=()=>{const{mothership:t,outerContainer:s}=z();const{uiMothership:r,sink:a}=x();pe(ex(e),((t,o)=>{e.ui.registry.addGroupToolbarButton(o,t)}));const{buttons:c,menuItems:i,contextToolbars:l,sidebars:d}=e.ui.registry.getAll();const u=Cx(e);const f={menuItems:i,menus:Nx(e),menubar:ax(e),toolbar:u.getOrThunk((()=>cx(e))),allowToolbarGroups:m===L_.floating,buttons:c,sidebar:d};S(s);eI(e,t,r);n.setup(e,k.shared,p);tW(e,k);HW(e,h,k);cF(e);RF(e,v,k.shared);xq(e,l,a,{backstage:k});tG(e,a);const g=e.getElement();const y=C(s);const b={mothership:t,uiMothership:r,outerContainer:s,sink:a};const w={targetNode:g,height:y};return o.render(e,b,f,k,w)};const O=()=>mG(a);const E=()=>mG(c);return{getMothership:O,getUiMothership:E,backstage:k,renderUI:T}};const pG=(e,t)=>{const o=N.from(Gt(e,"id")).fold((()=>{const e=Zc("dialog-describe");Wt(t,"id",e);return e}),z);Wt(e,"aria-describedby",o)};const hG=(e,t)=>{const o=Kt(e,"id").fold((()=>{const e=Zc("dialog-label");Wt(t,"id",e);return e}),z);Wt(e,"aria-labelledby",o)};const yG=x([zr("lazySink"),Br("dragBlockClass"),Yr("getBounds",Kn),qr("useTabstopAt",A),qr("eventOrder",{}),ah("modalBehaviours",[Bk]),vd("onExecute"),wd("onEscape")]);const bG={sketch:z};const vG=x([Fh({name:"draghandle",overrides:(e,t)=>({behaviours:xu([X$.config({mode:"mouse",getTarget:e=>Wl(e,'[role="dialog"]').getOr(e),blockerClass:e.dragBlockClass.getOrDie(new Error("The drag blocker class was not specified for a dialog with a drag handle: \n"+JSON.stringify(t,null,2)).message),getBounds:e.getDragBounds})])})}),Ih({schema:[zr("dom")],name:"title"}),Ih({factory:bG,schema:[zr("dom")],name:"close"}),Ih({factory:bG,schema:[zr("dom")],name:"body"}),Fh({factory:bG,schema:[zr("dom")],name:"footer"}),Ph({factory:{sketch:(e,t)=>({...e,dom:t.dom,components:t.components})},schema:[qr("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),qr("components",[])],name:"blocker"})]);const kG=(e,t,o,n)=>{const s=ff();const r=t=>{s.set(t);const o=e.lazySink(t).getOrDie();const r=n.blocker();const a=o.getSystem().build({...r,components:r.components.concat([Il(t)]),behaviours:xu([aw.config({}),Jk("dialog-blocker-events",[Lc(Na(),(()=>{Bk.focusIn(t)}))])])});Xg(o,a);Bk.focusIn(t)};const a=e=>{s.clear();_t(e.element).each((t=>{e.getSystem().getByDom(t).each((e=>{Qg(e)}))}))};const c=t=>ey(t,e,"body");const i=t=>ey(t,e,"footer");const l=(e,t)=>{xF.block(e,t)};const d=e=>{xF.unblock(e)};const u=Zc("modal-events");const f={...e.eventOrder,[cc()]:[u].concat(e.eventOrder["alloy.system.attached"]||[])};return{uid:e.uid,dom:e.dom,components:t,apis:{show:r,hide:a,getBody:c,getFooter:i,setIdle:d,setBusy:l},eventOrder:f,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:ih(e.modalBehaviours,[Xk.config({}),Bk.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt}),xF.config({getRoot:s.get}),Jk(u,[Hc((t=>{hG(t.element,ey(t,e,"title").element);pG(t.element,ey(t,e,"body").element)}))])])}};const wG=by({name:"ModalDialog",configFields:yG(),partFields:vG(),factory:kG,apis:{show:(e,t)=>{e.show(t)},hide:(e,t)=>{e.hide(t)},getBody:(e,t)=>e.getBody(t),getFooter:(e,t)=>e.getFooter(t),setBusy:(e,t,o)=>{e.setBusy(t,o)},setIdle:(e,t)=>{e.setIdle(t)}}});const _G=Xs([Cz,Sz].concat(TC));const xG=rr;const zG=[Qz("button"),Pz,Kr("align","end",["start","end"]),Gz,$z,Pr("buttonType",["primary","secondary"])];const CG=[...zG,Oz];const SG=[Or("type",["submit","cancel","custom"]),...CG];const TG=[Or("type",["menu"]),Iz,Fz,Pz,Rr("items",_G),...zG];const OG=vr("type",{submit:SG,cancel:SG,custom:SG,menu:TG});const EG=[Cz,Oz,Or("level",["info","warn","error","success"]),Dz,qr("url","")];const DG=Xs(EG);const AG=e=>[Cz,e];const MG=[Cz,Oz,$z,Qz("button"),Pz,Wz,Pr("buttonType",["primary","secondary","toolbar"]),Gz];const NG=Xs(MG);const RG=[Cz,Sz];const BG=RG.concat([Vz]);const LG=RG.concat([Tz,$z]);const HG=Xs(LG);const IG=rr;const PG=BG.concat([Kz("auto")]);const FG=Xs(PG);const VG=er([Az,Oz,Dz]);const jG=BG;const UG=Xs(jG);const qG=sr;const WG=BG;const $G=Xs(WG);const GG=sr;const KG=RG.concat([Gr("tag","textarea"),Tr("scriptId"),Tr("scriptUrl"),Jr("settings",undefined)]);const XG=RG.concat([Gr("tag","textarea"),Dr("init")]);const YG=fr((e=>pr("customeditor.old",Ks(XG),e).orThunk((()=>pr("customeditor.new",Ks(KG),e)))));const JG=sr;const QG=BG;const ZG=Xs(QG);const eK=ur();const tK=e=>[Cz,Sr("columns"),e];const oK=[Cz,Tr("html"),Kr("presets","presentation",["presentation","document"])];const nK=Xs(oK);const sK=BG.concat([Xr("sandboxed",true)]);const rK=Xs(sK);const aK=sr;const cK=Xs(RG.concat([Ir("height")]));const iK=Xs([Tr("url"),Hr("zoom"),Hr("cachedWidth"),Hr("cachedHeight")]);const lK=BG.concat([Ir("inputMode"),Ir("placeholder"),Xr("maximized",false),$z]);const dK=Xs(lK);const uK=sr;const fK=e=>[Cz,Tz,e];const mK=[Oz,Az];const gK=[Oz,Rr("items",kr("items",(()=>pK)))];const pK=Js([Xs(mK),Xs(gK)]);const hK=BG.concat([Rr("items",pK),$z]);const yK=Xs(hK);const bK=sr;const vK=BG.concat([Nr("items",[Oz,Az]),$r("size",1),$z]);const kK=Xs(vK);const wK=sr;const _K=BG.concat([Xr("constrain",true),$z]);const xK=Xs(_K);const zK=Xs([Tr("width"),Tr("height")]);const CK=RG.concat([Tz,$r("min",0),$r("max",0)]);const SK=Xs(CK);const TK=nr;const OK=[Cz,Rr("header",sr),Rr("cells",Ys(sr))];const EK=Xs(OK);const DK=BG.concat([Ir("placeholder"),Xr("maximized",false),$z]);const AK=Xs(DK);const MK=sr;const NK=BG.concat([Kr("filetype","file",["image","media","file"]),$z]);const RK=Xs(NK);const BK=Xs([Az,Xz]);const LK=e=>wr("items","items",vs(),Ys(fr((t=>pr(`Checking item of ${e}`,HK,t).fold((e=>Qn.error(br(e))),(e=>Qn.value(e)))))));const HK=$s((()=>dr("type",{alertbanner:DG,bar:Xs(AG(LK("bar"))),button:NG,checkbox:HG,colorinput:UG,colorpicker:$G,dropzone:ZG,grid:Xs(tK(LK("grid"))),iframe:rK,input:dK,listbox:yK,selectbox:kK,sizeinput:xK,slider:SK,textarea:AK,urlinput:RK,customeditor:YG,htmlpanel:nK,imagepreview:cK,collection:FG,label:Xs(fK(LK("label"))),table:EK,panel:PK})));const IK=[Cz,qr("classes",[]),Rr("items",HK)];const PK=Xs(IK);const FK=[Qz("tab"),Ez,Rr("items",HK)];const VK=[Cz,Nr("tabs",FK)];const jK=Xs(VK);const UK=CG;const qK=OG;const WK=Xs([Tr("title"),Cr("body",dr("type",{panel:PK,tabpanel:jK})),Gr("size","normal"),Rr("buttons",qK),qr("initialData",{}),Yr("onAction",v),Yr("onChange",v),Yr("onSubmit",v),Yr("onClose",v),Yr("onCancel",v),Yr("onTabChange",v)]);const $K=e=>pr("dialog",WK,e);const GK=Xs([Or("type",["cancel","custom"]),...UK]);const KK=Xs([Tr("title"),Tr("url"),Hr("height"),Hr("width"),Vr("buttons",GK),Yr("onAction",v),Yr("onCancel",v),Yr("onClose",v),Yr("onMessage",v)]);const XK=e=>pr("dialog",KK,e);const YK=e=>{if(i(e)){return[e].concat(ee(xe(e),YK))}else if(d(e)){return ee(e,YK)}else{return[]}};const JK=e=>c(e.type)&&c(e.name);const QK={checkbox:IG,colorinput:qG,colorpicker:GG,dropzone:eK,input:uK,iframe:aK,imagepreview:iK,selectbox:wK,sizeinput:zK,slider:TK,listbox:bK,size:zK,textarea:MK,urlinput:BK,customeditor:JG,collection:VG,togglemenuitem:xG};const ZK=e=>N.from(QK[e.type]);const eX=e=>G(YK(e),JK);const tX=e=>{const t=eX(e);const o=ee(t,(e=>ZK(e).fold((()=>[]),(t=>[Cr(e.name,t)]))));return Xs(o)};const oX=e=>{const t=hr($K(e));const o=tX(e);const n=e.initialData;return{internalDialog:t,dataValidator:o,initialData:n}};const nX={open:(e,t)=>{const o=oX(t);return e(o.internalDialog,o.initialData,o.dataValidator)},openUrl:(e,t)=>{const o=hr(XK(t));return e(o)},redial:e=>oX(e)};const sX=e=>{const t=[];const o={};ge(e,((e,n)=>{e.fold((()=>{t.push(n)}),(e=>{o[n]=e}))}));return t.length>0?Qn.error(t):Qn.value(o)};const rX=(e,t,o)=>{const n=p_(_N.sketch((n=>({dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:U(e.items,(e=>yL(n,e,t,o)))}))));return{dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[n.asSpec()]}],behaviours:xu([Bk.config({mode:"acyclic",useTabstopAt:T(sR)}),NN.memento(n),VN.memento(n,{postprocess:e=>sX(e).fold((e=>{console.error(e);return{}}),z)})])}};const aX=(e,t)=>({uid:e.uid,dom:e.dom,components:e.components,events:Tw(e.action),behaviours:ih(e.tabButtonBehaviours,[aw.config({}),Bk.config({mode:"execution",useSpace:true,useEnter:true}),rh.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification});const cX=yy({name:"TabButton",configFields:[qr("uid",undefined),zr("value"),wr("dom","dom",xs((()=>({attributes:{role:"tab",id:Zc("aria"),"aria-selected":"false"}}))),tr()),Br("action"),qr("domModification",{}),ah("tabButtonBehaviours",[aw,Bk,rh]),zr("view")],factory:aX});const iX=x([zr("tabs"),zr("dom"),qr("clickToDismiss",false),ah("tabbarBehaviours",[ib,Bk]),hd(["tabClass","selectedClass"])]);const lX=Vh({factory:cX,name:"tabs",unit:"tab",overrides:e=>{const t=(e,t)=>{ib.dehighlight(e,t);bc(e,gc(),{tabbar:e,button:t})};const o=(e,t)=>{ib.highlight(e,t);bc(e,mc(),{tabbar:e,button:t})};return{action:n=>{const s=n.getSystem().getByUid(e.uid).getOrDie();const r=ib.isHighlighted(s,n);const a=(()=>{if(r&&e.clickToDismiss){return t}else if(!r){return o}else{return v}})();a(s,n)},domModification:{classes:[e.markers.tabClass]}}}});const dX=x([lX]);const uX=(e,t,o,n)=>({uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:ih(e.tabbarBehaviours,[ib.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:(e,t)=>{Wt(t.element,"aria-selected","true")},onDehighlight:(e,t)=>{Wt(t.element,"aria-selected","false")}}),Bk.config({mode:"flow",getInitial:e=>ib.getHighlighted(e).map((e=>e.element)),selector:"."+e.markers.tabClass,executeOnMove:true})])});const fX=by({name:"Tabbar",configFields:iX(),partFields:dX(),factory:uX});const mX=(e,t)=>({uid:e.uid,dom:e.dom,behaviours:ih(e.tabviewBehaviours,[Xk.config({})]),domModification:{attributes:{role:"tabpanel"}}});const gX=yy({name:"Tabview",configFields:[ah("tabviewBehaviours",[Xk])],factory:mX});const pX=x([qr("selectFirst",true),bd("onChangeTab"),bd("onDismissTab"),qr("tabs",[]),ah("tabSectionBehaviours",[])]);const hX=Ih({factory:fX,schema:[zr("dom"),Mr("markers",[zr("tabClass"),zr("selectedClass")])],name:"tabbar",defaults:e=>({tabs:e.tabs})});const yX=Ih({factory:gX,name:"tabview"});const bX=x([hX,yX]);const vX=(e,t,o,n)=>{const s=t=>{const o=rh.getValue(t);Zh(t,e,"tabview").each((n=>{const s=J(e.tabs,(e=>e.value===o));s.each((o=>{const s=o.view();Kt(t.element,"id").each((e=>{Wt(n.element,"aria-labelledby",e)}));Xk.set(n,s);e.onChangeTab(n,t,s)}))}))};const r=(t,o)=>{Zh(t,e,"tabbar").each((e=>{o(e).each(vc)}))};return{uid:e.uid,dom:e.dom,components:t,behaviours:ch(e.tabSectionBehaviours),events:xc(Z([e.selectFirst?[Hc(((e,t)=>{r(e,ib.getFirst)}))]:[],[Tc(mc(),((e,t)=>{const o=t.event.button;s(o)})),Tc(gc(),((t,o)=>{const n=o.event.button;e.onDismissTab(t,n)}))]])),apis:{getViewItems:t=>Zh(t,e,"tabview").map((e=>Xk.contents(e))).getOr([]),showTab:(e,t)=>{const o=e=>{const o=ib.getCandidates(e);const n=J(o,(e=>rh.getValue(e)===t));return n.filter((t=>!ib.isHighlighted(e,t)))};r(e,o)}}}};const kX=by({name:"TabSection",configFields:pX(),partFields:bX(),factory:vX,apis:{getViewItems:(e,t)=>e.getViewItems(t),showTab:(e,t,o)=>{e.showTab(t,o)}}});const wX=(e,t,o)=>U(e,((n,s)=>{Xk.set(o,e[s].view());const r=t.dom.getBoundingClientRect();Xk.set(o,[]);return r.height}));const _X=e=>ie(ae(e,((e,t)=>{if(e>t){return-1}else if(e<t){return+1}else{return 0}})));const xX=(e,t,o)=>{const n=kt(e).dom;const s=Wl(e,".tox-dialog-wrap").getOr(e);const r=no(s,"position")==="fixed";let a;if(r){a=Math.max(n.clientHeight,window.innerHeight)}else{a=Math.max(n.offsetHeight,n.scrollHeight)}const c=mo(t);const i=t.dom.offsetLeft>=o.dom.offsetLeft+zo(o);const l=i?Math.max(mo(o),c):c;const d=parseInt(no(e,"margin-top"),10)||0;const u=parseInt(no(e,"margin-bottom"),10)||0;const f=mo(e)+d+u;const m=f-l;return a-m};const zX=(e,t)=>{ie(e).each((e=>kX.showTab(t,e.value)))};const CX=(e,t)=>{eo(e,"height",t+"px");eo(e,"flex-basis",t+"px")};const SX=(e,t,o)=>{Wl(e,'[role="dialog"]').each((e=>{Gl(e,'[role="tablist"]').each((n=>{o.get().map((o=>{eo(t,"height","0");eo(t,"flex-basis","0");return Math.min(o,xX(e,t,n))})).each((e=>{CX(t,e)}))}))}))};const TX=e=>Gl(e,'[role="tabpanel"]');const OX=e=>{const t=(()=>{const t=ff();const o=[Hc((o=>{const n=o.element;TX(n).each((s=>{eo(s,"visibility","hidden");o.getSystem().getByDom(s).toOptional().each((o=>{const n=wX(e,s,o);const r=_X(n);r.fold(t.clear,t.set)}));SX(n,s,t);io(s,"visibility");zX(e,o);requestAnimationFrame((()=>{SX(n,s,t)}))}))})),Tc(ac(),(e=>{const o=e.element;TX(o).each((e=>{SX(o,e,t)}))})),Tc(ME,((e,o)=>{const n=e.element;TX(n).each((e=>{const o=Bu(Rt(e));eo(e,"visibility","hidden");const s=ro(e,"height").map((e=>parseInt(e,10)));io(e,"height");io(e,"flex-basis");const r=e.dom.getBoundingClientRect().height;const a=s.forall((e=>r>e));if(a){t.set(r);SX(n,e,t)}else{s.each((t=>{CX(e,t)}))}io(e,"visibility");o.each(Mu)}))}))];const n=false;return{extraEvents:o,selectFirst:n}})();const o=(()=>{const e=[];const t=true;return{extraEvents:e,selectFirst:t}})();return{smartTabHeight:t,naiveTabHeight:o}};const EX="send-data-to-section";const DX="send-data-to-view";const AX=(e,t,o)=>{const n=ea({});const s=e=>{const t=rh.getValue(e);const o=sX(t).getOr({});const s=n.get();const r=ys(s,o);n.set(r)};const r=e=>{const t=n.get();rh.setValue(e,t)};const a=ea(null);const c=U(e.tabs,(e=>({value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[Ml(o.shared.providers.translate(e.title))],view:()=>[_N.sketch((n=>({dom:{tag:"div",classes:["tox-form"]},components:U(e.items,(e=>yL(n,e,t,o))),formBehaviours:xu([Bk.config({mode:"acyclic",useTabstopAt:T(sR)}),Jk("TabView.form.events",[Hc(r),Ic(s)]),Eu.config({channels:la([{key:EX,value:{onReceive:s}},{key:DX,value:{onReceive:r}}])})])})))]})));const i=OX(c).smartTabHeight;return kX.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(e,t,o)=>{const n=rh.getValue(t);bc(e,AE,{name:n,oldName:a.get()});a.set(n)},tabs:c,components:[kX.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[fX.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:xu([hE.config({})])}),kX.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:i.selectFirst,tabSectionBehaviours:xu([Jk("tabpanel",i.extraEvents),Bk.config({mode:"acyclic"}),xy.config({find:e=>ie(kX.getViewItems(e))}),VN.withComp(N.none(),(e=>{e.getSystem().broadcastOn([EX],{});return n.get()}),((e,t)=>{n.set(t);e.getSystem().broadcastOn([DX],{})}))])})};const MX=Zc("update-dialog");const NX=Zc("update-title");const RX=Zc("update-body");const BX=Zc("update-footer");const LX=Zc("body-send-message");const HX=(e,t,o,n,s)=>{const r=e=>{const t=e.body;switch(t.type){case"tabpanel":{return[AX(t,e.initialData,n)]}default:{return[rX(t,e.initialData,n)]}}};const a=(e,t)=>N.some({isTabPanel:()=>t.body.type==="tabpanel"});const c={"aria-live":"polite"};return{dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...o.map((e=>({id:e}))).getOr({}),...s?c:{}}},components:[],behaviours:xu([NN.childAt(0),Fj.config({channel:`${RX}-${t}`,updateState:a,renderComponents:r,initialData:e})])}};const IX=(e,t,o,n,s)=>HX(e,t,N.some(o),n,s);const PX=(e,t,o)=>{const n=HX(e,t,N.none(),o,false);return wG.parts.body(n)};const FX=e=>{const t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[tR({dom:{tag:"iframe",attributes:{src:e.url}},behaviours:xu([hE.config({}),aw.config({})])})]}],behaviours:xu([Bk.config({mode:"acyclic",useTabstopAt:T(sR)})])};return wG.parts.body(t)};const VX=B_.deviceType.isTouch();const jX=(e,t)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[e,t]});const UX=(e,t)=>wG.parts.close(g_.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:xu([hE.config({})])}));const qX=()=>wG.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}});const WX=(e,t)=>wG.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:SF(`<p>${t.translate(e)}</p>`)}]}]});const $X=e=>wG.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e});const GX=(e,t)=>[aE.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),aE.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})];const KX=e=>{const t="tox-dialog";const o=t+"-wrap";const n=o+"__backdrop";const s=t+"__disable-scroll";return wG.sketch({lazySink:e.lazySink,onEscape:t=>{e.onEscape(t);return N.some(true)},useTabstopAt:e=>!sR(e),dom:{tag:"div",classes:[t].concat(e.extraClasses),styles:{position:"relative",...e.extraStyles}},components:[e.header,e.body,...e.footer.toArray()],parts:{blocker:{dom:SF(`<div class="${o}"></div>`),components:[{dom:{tag:"div",classes:VX?[n,n+"--opaque"]:[n]}}]}},dragBlockClass:o,modalBehaviours:xu([aw.config({}),Jk("dialog-events",e.dialogEvents.concat([Lc(Na(),((e,t)=>{Bk.focusIn(e)}))])),Jk("scroll-lock",[Hc((()=>{tl(jt(),s)})),Ic((()=>{nl(jt(),s)}))]),...e.extraBehaviours]),eventOrder:{[Ya()]:["dialog-events"],[cc()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[ic()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...e.eventOrder}})};const XX=e=>g_.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":e.translate("Close"),title:e.translate("Close")}},components:[T_("close",{tag:"div",classes:["tox-icon"]},e.icons)],action:e=>{yc(e,SE)}});const YX=(e,t,o,n)=>{const s=e=>[Ml(n.translate(e.title))];return{dom:{tag:"div",classes:["tox-dialog__title"],attributes:{...o.map((e=>({id:e}))).getOr({})}},components:[],behaviours:xu([Fj.config({channel:`${NX}-${t}`,initialData:e,renderComponents:s})])}};const JX=()=>({dom:SF('<div class="tox-dialog__draghandle"></div>')});const QX=(e,t,o,n)=>aE.sketch({dom:SF('<div class="tox-dialog__header"></div>'),components:[YX(e,t,N.some(o),n),JX(),XX(n)],containerBehaviours:xu([X$.config({mode:"mouse",blockerClass:"blocker",getTarget:e=>Kl(e,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])});const ZX=(e,t,o)=>{const n=wG.parts.title(YX(e,t,N.none(),o));const s=wG.parts.draghandle(JX());const r=wG.parts.close(XX(o));const a=[n].concat(e.draggable?[s]:[]).concat([r]);return aE.sketch({dom:SF('<div class="tox-dialog__header"></div>'),components:a})};const eY=(e,t,o)=>ZX({title:o.shared.providers.translate(e),draggable:o.dialog.isDraggableModal()},t,o.shared.providers);const tY=(e,t,o)=>({dom:{tag:"div",classes:["tox-dialog__busy-spinner"],attributes:{"aria-label":o.translate(e)},styles:{left:"0px",right:"0px",bottom:"0px",top:"0px",position:"absolute"}},behaviours:t,components:[{dom:SF('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]});const oY=(e,t,o)=>({onClose:()=>o.closeWindow(),onBlock:o=>{wG.setBusy(e(),((e,n)=>tY(o.message,n,t)))},onUnblock:()=>{wG.setIdle(e())}});const nY=(e,t,o,n)=>{const s=(e,t)=>N.some(t);return Hl(KX({...e,lazySink:n.shared.getSink,extraBehaviours:[Fj.config({channel:`${MX}-${e.id}`,updateState:s,initialData:t}),VN.memory({}),...e.extraBehaviours],onEscape:e=>{yc(e,SE)},dialogEvents:o,eventOrder:{[Xa()]:[Fj.name(),Eu.name()],[cc()]:["scroll-lock",Fj.name(),"messages","dialog-events","alloy.base.behaviour"],[ic()]:["alloy.base.behaviour","dialog-events","messages",Fj.name(),"scroll-lock"]}}))};const sY=e=>{const t=e=>{const t=U(e.items,(e=>{const t=ea(false);return{...e,storage:t}}));return{...e,items:t}};return U(e,(e=>{if(e.type==="menu"){return t(e)}return e}))};const rY=e=>X(e,((e,t)=>{if(t.type==="menu"){const o=t;return X(o.items,((e,t)=>{e[t.name]=t.storage;return e}),e)}return e}),{});const aY=(e,t)=>[Nc(Na(),nR),e(CE,((e,o)=>{t.onClose();o.onClose()})),e(SE,((e,t,o,n)=>{t.onCancel(e);yc(n,CE)})),Tc(DE,((e,o)=>t.onUnblock())),Tc(EE,((e,o)=>t.onBlock(o.event)))];const cY=(e,t)=>{const o=(t,o)=>Tc(t,((t,s)=>{n(t,((n,r)=>{o(e(),n,s.event,t)}))}));const n=(e,t)=>{Fj.getState(e).get().each((o=>{t(o,e)}))};return[...aY(o,t),o(TE,((e,t,o)=>{t.onAction(e,{name:o.name})}))]};const iY=(e,t,o)=>{const n=(t,o)=>Tc(t,((t,n)=>{s(t,((s,r)=>{o(e(),s,n.event,t)}))}));const s=(e,t)=>{Fj.getState(e).get().each((o=>{t(o.internalDialog,e)}))};return[...aY(n,t),n(OE,((e,t)=>t.onSubmit(e))),n(zE,((e,t,o)=>{t.onChange(e,{name:o.name})})),n(TE,((e,t,n,s)=>{const r=()=>Bk.focusIn(s);const a=e=>Xt(e,"disabled")||Kt(e,"aria-disabled").exists((e=>e==="true"));const c=Rt(s.element);const i=Bu(c);t.onAction(e,{name:n.name,value:n.value});Bu(c).fold(r,(e=>{if(a(e)){r()}else if(i.exists((t=>yt(e,t)&&a(t)))){r()}else{o().toOptional().filter((t=>!yt(t.element,e))).each(r)}}))})),n(AE,((e,t,o)=>{t.onTabChange(e,{newTabName:o.name,oldTabName:o.oldName})})),Ic((t=>{const o=e();rh.setValue(t,o.getData())}))]};const lY={initUrlDialog:cY,initDialog:iY};const dY=(e,t)=>qB(e,e.type,t);const uY=(e,t,o)=>J(t,(e=>e.name===o)).bind((t=>t.memento.getOpt(e)));const fY=(e,t)=>{const o=t.map((e=>e.footerButtons)).getOr([]);const n=$(o,(e=>e.align==="start"));const s=(e,t)=>aE.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${e}`]},components:U(t,(e=>e.memento.asSpec()))});const r=s("start",n.pass);const a=s("end",n.fail);return[r,a]};const mY=(e,t,o)=>{const n=(e,t)=>{const n=U(t.buttons,(e=>{const t=p_(dY(e,o));return{name:e.name,align:e.align,memento:t}}));const s=t=>uY(e,n,t);return N.some({lookupByName:s,footerButtons:n})};return{dom:SF('<div class="tox-dialog__footer"></div>'),components:[],behaviours:xu([Fj.config({channel:`${BX}-${t}`,initialData:e,updateState:n,renderComponents:fY})])}};const gY=(e,t,o)=>mY(e,t,o);const pY=(e,t,o)=>wG.parts.footer(mY(e,t,o));const hY=(e,t)=>{const o=e.getRoot();if(o.getSystem().isConnected()){const o=xy.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return _N.getField(o,t).orThunk((()=>{const o=e.getFooter();const n=Fj.getState(o).get();return n.bind((e=>e.lookupByName(t)))}))}else{return N.none()}};const yY=(e,t)=>{const o=e.getRoot();return Fj.getState(o).get().map((e=>hr(pr("data",e.dataValidator,t)))).getOr(t)};const bY=(e,t,o)=>{const n=t=>{const o=e.getRoot();if(o.getSystem().isConnected()){t(o)}};const s=()=>{const t=e.getRoot();const n=t.getSystem().isConnected()?e.getFormWrapper():t;const s=rh.getValue(n);const r=pe(o,(e=>e.get()));return{...s,...r}};const r=t=>{n((n=>{const s=g.getData();const r=ys(s,t);const a=yY(e,r);const c=e.getFormWrapper();rh.setValue(c,a);ge(o,((e,t)=>{if(Ce(r,t)){e.set(r[t])}}))}))};const a=(t,o)=>{hY(e,t).each(o?jy.enable:jy.disable)};const i=t=>{hY(e,t).each(aw.focus)};const l=e=>{if(!c(e)){throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument")}n((t=>{bc(t,EE,{message:e})}))};const d=()=>{n((e=>{yc(e,DE)}))};const u=t=>{n((o=>{const n=e.getBody();const s=Fj.getState(n);if(s.get().exists((e=>e.isTabPanel()))){xy.getCurrent(n).each((e=>{kX.showTab(e,t)}))}}))};const f=o=>{n((n=>{const s=e.getId();const r=t(o);n.getSystem().broadcastOn([`${MX}-${s}`],r);n.getSystem().broadcastOn([`${NX}-${s}`],r.internalDialog);n.getSystem().broadcastOn([`${RX}-${s}`],r.internalDialog);n.getSystem().broadcastOn([`${BX}-${s}`],r.internalDialog);g.setData(r.initialData)}))};const m=()=>{n((e=>{yc(e,CE)}))};const g={getData:s,setData:r,setEnabled:a,focus:i,block:l,unblock:d,showTab:u,redial:f,close:m};return g};const vY=e=>{switch(e){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}};const kY=(e,t,o)=>{const n=Zc("dialog");const s=e.internalDialog;const r=eY(s.title,n,o);const a=PX({body:s.body,initialData:s.initialData},n,o);const c=sY(s.buttons);const i=rY(c);const l=pY({buttons:c},n,o);const d=lY.initDialog((()=>p),oY((()=>m),o.shared.providers,t),o.shared.getSink);const u=vY(s.size);const f={id:n,header:r,body:a,footer:N.some(l),extraClasses:u,extraBehaviours:[],extraStyles:{}};const m=nY(f,e,d,o);const g=(()=>{const e=()=>{const e=wG.getBody(m);return xy.getCurrent(e).getOr(e)};return{getId:x(n),getRoot:x(m),getBody:()=>wG.getBody(m),getFooter:()=>wG.getFooter(m),getFormWrapper:e}})();const p=bY(g,t.redial,i);return{dialog:m,instanceApi:p}};const wY=(e,t,o,n)=>{const s=Zc("dialog");const r=Zc("dialog-label");const a=Zc("dialog-content");const c=e.internalDialog;const i=(e,t)=>N.some(t);const l=p_(QX({title:c.title,draggable:true},s,r,o.shared.providers));const d=p_(IX({body:c.body,initialData:c.initialData},s,a,o,n));const u=sY(c.buttons);const f=rY(u);const m=p_(gY({buttons:u},s,o));const g=lY.initDialog((()=>h),{onBlock:e=>{xF.block(p,((t,n)=>tY(e.message,n,o.shared.providers)))},onUnblock:()=>{xF.unblock(p)},onClose:()=>t.closeWindow()},o.shared.getSink);const p=Hl({dom:{tag:"div",classes:["tox-dialog","tox-dialog-inline"],attributes:{role:"dialog",["aria-labelledby"]:r,["aria-describedby"]:a}},eventOrder:{[Xa()]:[Fj.name(),Eu.name()],[Ya()]:["execute-on-form"],[cc()]:["reflecting","execute-on-form"]},behaviours:xu([Bk.config({mode:"cyclic",onEscape:e=>{yc(e,CE);return N.some(true)},useTabstopAt:e=>!sR(e)&&(st(e)!=="button"||Gt(e,"disabled")!=="disabled")}),Fj.config({channel:`${MX}-${s}`,updateState:i,initialData:e}),aw.config({}),Jk("execute-on-form",g.concat([Lc(Na(),((e,t)=>{Bk.focusIn(e)}))])),xF.config({getRoot:()=>N.some(p)}),Xk.config({}),VN.memory({})]),components:[l.asSpec(),d.asSpec(),m.asSpec()]});const h=bY({getId:x(s),getRoot:x(p),getFooter:()=>m.get(p),getBody:()=>d.get(p),getFormWrapper:()=>{const e=d.get(p);return xy.getCurrent(e).getOr(e)}},t.redial,f);return{dialog:p,instanceApi:h}};var _Y=tinymce.util.Tools.resolve("tinymce.util.URI");const xY=e=>{const t=t=>{if(e.getSystem().isConnected()){t(e)}};const o=e=>{if(!c(e)){throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument")}t((t=>{bc(t,EE,{message:e})}))};const n=()=>{t((e=>{yc(e,DE)}))};const s=()=>{t((e=>{yc(e,CE)}))};const r=e=>{t((t=>{t.getSystem().broadcastOn([LX],e)}))};return{block:o,unblock:n,close:s,sendMessage:r}};const zY=["insertContent","setContent","execCommand","close","block","unblock"];const CY=e=>i(e)&&zY.indexOf(e.mceAction)!==-1;const SY=e=>!CY(e)&&i(e)&&Ce(e,"mceAction");const TY=(e,t,o)=>{switch(o.mceAction){case"insertContent":e.insertContent(o.content);break;case"setContent":e.setContent(o.content);break;case"execCommand":const n=f(o.ui)?o.ui:false;e.execCommand(o.cmd,n,o.value);break;case"close":t.close();break;case"block":t.block(o.message);break;case"unblock":t.unblock();break}};const OY=(e,t,o,n)=>{const s=Zc("dialog");const r=eY(e.title,s,n);const a=FX(e);const c=e.buttons.bind((e=>{if(e.length===0){return N.none()}else{return N.some(pY({buttons:e},s,n))}}));const i=lY.initUrlDialog((()=>y),oY((()=>h),n.shared.providers,t));const l={...e.height.fold((()=>({})),(e=>({height:e+"px","max-height":e+"px"}))),...e.width.fold((()=>({})),(e=>({width:e+"px","max-width":e+"px"})))};const d=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[];const u=new _Y(e.url,{base_uri:new _Y(window.location.href)});const f=`${u.protocol}://${u.host}${u.port?":"+u.port:""}`;const m=uf();const g=[Jk("messages",[Hc((()=>{const t=gf(Ze.fromDom(window),"message",(t=>{if(u.isSameOrigin(new _Y(t.raw.origin))){const n=t.raw.data;if(CY(n)){TY(o,y,n)}else if(SY(n)){e.onMessage(y,n)}}}));m.set(t)})),Ic(m.clear)]),Eu.config({channels:{[LX]:{onReceive:(e,t)=>{Gl(e.element,"iframe").each((e=>{const o=e.dom.contentWindow;o.postMessage(t,f)}))}}}})];const p={id:s,header:r,body:a,footer:c,extraClasses:d,extraBehaviours:g,extraStyles:l};const h=nY(p,e,i,n);const y=xY(h);return{dialog:h,instanceApi:y}};const EY=e=>{const t=e.backstage.shared;const o=(o,n)=>{const s=()=>{wG.hide(i);n()};const r=p_(qB({name:"close-alert",text:"OK",primary:true,buttonType:N.some("primary"),align:"end",enabled:true,icon:N.none()},"cancel",e.backstage));const a=qX();const c=UX(s,t.providers);const i=Hl(KX({lazySink:()=>t.getSink(),header:jX(a,c),body:WX(o,t.providers),footer:N.some($X(GX([],[r.asSpec()]))),onEscape:s,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Tc(SE,s)],eventOrder:{}}));wG.show(i);const l=r.get(i);aw.focus(l)};return{open:o}};const DY=e=>{const t=e.backstage.shared;const o=(o,n)=>{const s=e=>{wG.hide(l);n(e)};const r=p_(qB({name:"yes",text:"Yes",primary:true,buttonType:N.some("primary"),align:"end",enabled:true,icon:N.none()},"submit",e.backstage));const a=qB({name:"no",text:"No",primary:false,buttonType:N.some("secondary"),align:"end",enabled:true,icon:N.none()},"cancel",e.backstage);const c=qX();const i=UX((()=>s(false)),t.providers);const l=Hl(KX({lazySink:()=>t.getSink(),header:jX(c,i),body:WX(o,t.providers),footer:N.some($X(GX([],[a,r.asSpec()]))),onEscape:()=>s(false),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Tc(SE,(()=>s(false))),Tc(OE,(()=>s(true)))],eventOrder:{}}));wG.show(l);const d=r.get(l);aw.focus(d)};return{open:o}};const AY=(e,t)=>hr(pr("data",t,e));const MY=e=>LO(e,".tox-alert-dialog")||LO(e,".tox-confirm-dialog");const NY=(e,t,o)=>{if(t&&o){return[]}else{return[JI.config({contextual:{lazyContext:()=>N.some($n(Ze.fromDom(e.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"]})]}};const RY=e=>{const t=e.backstage;const o=e.editor;const n=Mx(o);const s=EY(e);const r=DY(e);const a=(e,o,n)=>{if(o!==undefined&&o.inline==="toolbar"){return d(e,t.shared.anchors.inlineDialog(),n,o.ariaAttrs)}else if(o!==undefined&&o.inline==="cursor"){return d(e,t.shared.anchors.cursor(),n,o.ariaAttrs)}else{return l(e,n)}};const c=(e,t)=>i(e,t);const i=(e,n)=>{const s=e=>{const s=OY(e,{closeWindow:()=>{wG.hide(s.dialog);n(s.instanceApi)}},o,t);wG.show(s.dialog);return s.instanceApi};return nX.openUrl(s,e)};const l=(e,o)=>{const n=(e,n,s)=>{const r=n;const a={dataValidator:s,initialData:r,internalDialog:e};const c=kY(a,{redial:nX.redial,closeWindow:()=>{wG.hide(c.dialog);o(c.instanceApi)}},t);wG.show(c.dialog);c.instanceApi.setData(r);return c.instanceApi};return nX.open(n,e)};const d=(e,s,r,a)=>{const c=(e,c,i)=>{const l=AY(c,i);const d=ff();const u=t.shared.header.isPositionedAtTop();const f={dataValidator:i,initialData:l,internalDialog:e};const m=()=>d.on((e=>{u_.reposition(e);JI.refresh(e)}));const g=wY(f,{redial:nX.redial,closeWindow:()=>{d.on(u_.hide);o.off("ResizeEditor",m);d.clear();r(g.instanceApi)}},t,a);const p=Hl(u_.sketch({lazySink:t.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},...u?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xu([Jk("window-manager-inline-events",[Tc(lc(),((e,t)=>{yc(g.dialog,SE)}))]),...NY(o,n,u)]),isExtraPart:(e,t)=>MY(t)}));d.set(p);u_.showWithin(p,Il(g.dialog),{anchor:s},N.some(jt()));if(!n||!u){JI.refresh(p);o.on("ResizeEditor",m)}g.instanceApi.setData(l);Bk.focusIn(g.dialog);return g.instanceApi};return nX.open(c,e)};const u=(e,t)=>{r.open(e,(e=>{t(e)}))};const f=(e,t)=>{s.open(e,(()=>{t()}))};const m=e=>{e.close()};return{open:a,openUrl:c,alert:f,close:m,confirm:u}};const BY=e=>{F_(e);RT(e);sW(e)};var LY=()=>{M.add("silver",(e=>{BY(e);const{getUiMothership:t,backstage:o,renderUI:n}=gG(e);BO.register(e,o.shared);const s=RY({editor:e,backstage:o});return{renderUI:n,getWindowManagerImpl:x(s),getNotificationManagerImpl:()=>M_(e,{backstage:o},t())}}))};LY()})()},475:e=>{(function(){"use strict";var t=function(e){if(e===null){return"null"}if(e===undefined){return"undefined"}var t=typeof e;if(t==="object"&&(Array.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="Array")){return"array"}if(t==="object"&&(String.prototype.isPrototypeOf(e)||e.constructor&&e.constructor.name==="String")){return"string"}return t};var o=function(e){return["undefined","boolean","number","string","function","xml","null"].indexOf(e)!==-1};var n=function(e,t){var o=Array.prototype.slice.call(e);return o.sort(t)};var s=function(e,t){return r((function(o,n){return e.eq(t(o),t(n))}))};var r=function(e){return{eq:e}};var a=r((function(e,t){return e===t}));var c=a;var i=function(e){return r((function(t,o){if(t.length!==o.length){return false}var n=t.length;for(var s=0;s<n;s++){if(!e.eq(t[s],o[s])){return false}}return true}))};var l=function(e,t){return s(i(e),(function(e){return n(e,t)}))};var d=function(e){return r((function(t,o){var n=Object.keys(t);var s=Object.keys(o);if(!l(c).eq(n,s)){return false}var r=n.length;for(var a=0;a<r;a++){var i=n[a];if(!e.eq(t[i],o[i])){return false}}return true}))};var u=r((function(e,n){if(e===n){return true}var s=t(e);var r=t(n);if(s!==r){return false}if(o(s)){return e===n}else if(s==="array"){return i(u).eq(e,n)}else if(s==="object"){return d(u).eq(e,n)}return false}));const f=Object.getPrototypeOf;const m=(e,t,o)=>{var n;if(o(e,t.prototype)){return true}else{return((n=e.constructor)===null||n===void 0?void 0:n.name)===t.name}};const g=e=>{const t=typeof e;if(e===null){return"null"}else if(t==="object"&&Array.isArray(e)){return"array"}else if(t==="object"&&m(e,String,((e,t)=>t.isPrototypeOf(e)))){return"string"}else{return t}};const p=e=>t=>g(t)===e;const h=e=>t=>typeof t===e;const y=e=>t=>e===t;const b=(e,t)=>k(e)&&m(e,t,((e,t)=>f(e)===t));const v=p("string");const k=p("object");const w=e=>b(e,Object);const _=p("array");const x=y(null);const z=h("boolean");const C=y(undefined);const S=e=>e===null||e===undefined;const T=e=>!S(e);const O=h("function");const E=h("number");const D=(e,t)=>{if(_(e)){for(let o=0,n=e.length;o<n;++o){if(!t(e[o])){return false}}return true}return false};const A=()=>{};const M=(e,t)=>(...o)=>e(t.apply(null,o));const N=(e,t)=>o=>e(t(o));const R=e=>()=>e;const B=e=>e;const L=(e,t)=>e===t;function H(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const I=e=>t=>!e(t);const P=e=>()=>{throw new Error(e)};const F=e=>e();const V=e=>{e()};const j=R(false);const U=R(true);class q{constructor(e,t){this.tag=e;this.value=t}static some(e){return new q(true,e)}static none(){return q.singletonNone}fold(e,t){if(this.tag){return t(this.value)}else{return e()}}isSome(){return this.tag}isNone(){return!this.tag}map(e){if(this.tag){return q.some(e(this.value))}else{return q.none()}}bind(e){if(this.tag){return e(this.value)}else{return q.none()}}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){if(!this.tag||e(this.value)){return this}else{return q.none()}}getOr(e){return this.tag?this.value:e}or(e){return this.tag?this:e}getOrThunk(e){return this.tag?this.value:e()}orThunk(e){return this.tag?this:e()}getOrDie(e){if(!this.tag){throw new Error(e!==null&&e!==void 0?e:"Called getOrDie on None")}else{return this.value}}static from(e){return T(e)?q.some(e):q.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){if(this.tag){e(this.value)}}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}q.singletonNone=new q(false);const W=Array.prototype.slice;const $=Array.prototype.indexOf;const G=Array.prototype.push;const K=(e,t)=>$.call(e,t);const X=(e,t)=>{const o=K(e,t);return o===-1?q.none():q.some(o)};const Y=(e,t)=>K(e,t)>-1;const J=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return true}}return false};const Q=(e,t)=>{const o=e.length;const n=new Array(o);for(let s=0;s<o;s++){const o=e[s];n[s]=t(o,s)}return n};const Z=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];t(n,o)}};const ee=(e,t)=>{for(let o=e.length-1;o>=0;o--){const n=e[o];t(n,o)}};const te=(e,t)=>{const o=[];const n=[];for(let s=0,r=e.length;s<r;s++){const r=e[s];const a=t(r,s)?o:n;a.push(r)}return{pass:o,fail:n}};const oe=(e,t)=>{const o=[];for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){o.push(s)}}return o};const ne=(e,t,o)=>{ee(e,((e,n)=>{o=t(o,e,n)}));return o};const se=(e,t,o)=>{Z(e,((e,n)=>{o=t(o,e,n)}));return o};const re=(e,t,o)=>{for(let n=0,s=e.length;n<s;n++){const s=e[n];if(t(s,n)){return q.some(s)}else if(o(s,n)){break}}return q.none()};const ae=(e,t)=>re(e,t,j);const ce=(e,t)=>{for(let o=0,n=e.length;o<n;o++){const n=e[o];if(t(n,o)){return q.some(o)}}return q.none()};const ie=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!_(e[o])){throw new Error("Arr.flatten item "+o+" was not an array, input: "+e)}G.apply(t,e[o])}return t};const le=(e,t)=>ie(Q(e,t));const de=(e,t)=>{for(let o=0,n=e.length;o<n;++o){const n=e[o];if(t(n,o)!==true){return false}}return true};const ue=e=>{const t=W.call(e,0);t.reverse();return t};const fe=(e,t)=>oe(e,(e=>!Y(t,e)));const me=(e,t)=>{const o={};for(let n=0,s=e.length;n<s;n++){const s=e[n];o[String(s)]=t(s,n)}return o};const ge=(e,t)=>{const o=W.call(e,0);o.sort(t);return o};const pe=(e,t)=>t>=0&&t<e.length?q.some(e[t]):q.none();const he=e=>pe(e,0);const ye=e=>pe(e,e.length-1);const be=O(Array.from)?Array.from:e=>W.call(e);const ve=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome()){return n}}return q.none()};const ke=(e,t)=>{const o=[];const n=O(t)?e=>J(o,(o=>t(o,e))):e=>Y(o,e);for(let t=0,s=e.length;t<s;t++){const s=e[t];if(!n(s)){o.push(s)}}return o};const we=Object.keys;const _e=Object.hasOwnProperty;const xe=(e,t)=>{const o=we(e);for(let n=0,s=o.length;n<s;n++){const s=o[n];const r=e[s];t(r,s)}};const ze=(e,t)=>Ce(e,((e,o)=>({k:o,v:t(e,o)})));const Ce=(e,t)=>{const o={};xe(e,((e,n)=>{const s=t(e,n);o[s.k]=s.v}));return o};const Se=e=>(t,o)=>{e[o]=t};const Te=(e,t,o,n)=>{const s={};xe(e,((e,s)=>{(t(e,s)?o:n)(e,s)}));return s};const Oe=(e,t)=>{const o={};const n={};Te(e,t,Se(o),Se(n));return{t:o,f:n}};const Ee=(e,t)=>{const o={};Te(e,t,Se(o),A);return o};const De=(e,t)=>{const o=[];xe(e,((e,n)=>{o.push(t(e,n))}));return o};const Ae=e=>De(e,B);const Me=(e,t)=>Ne(e,t)?q.from(e[t]):q.none();const Ne=(e,t)=>_e.call(e,t);const Re=(e,t)=>Ne(e,t)&&e[t]!==undefined&&e[t]!==null;const Be=(e,t,o=u)=>d(o).eq(e,t);const Le=e=>{const t={};Z(e,(e=>{t[e]={}}));return we(t)};const He=Array.isArray;const Ie=e=>{if(!He(e)){const t=[];for(let o=0,n=e.length;o<n;o++){t[o]=e[o]}return t}else{return e}};const Pe=(e,t,o)=>{let n,s;if(!e){return false}o=o||e;if(e.length!==undefined){for(n=0,s=e.length;n<s;n++){if(t.call(o,e[n],n,e)===false){return false}}}else{for(n in e){if(Ne(e,n)){if(t.call(o,e[n],n,e)===false){return false}}}}return true};const Fe=(e,t)=>{const o=[];Pe(e,((n,s)=>{o.push(t(n,s,e))}));return o};const Ve=(e,t)=>{const o=[];Pe(e,((n,s)=>{if(!t||t(n,s,e)){o.push(n)}}));return o};const je=(e,t)=>{if(e){for(let o=0,n=e.length;o<n;o++){if(e[o]===t){return o}}}return-1};const Ue=(e,t,o,n)=>{let s=C(o)?e[0]:o;for(let o=0;o<e.length;o++){s=t.call(n,s,e[o],o)}return s};const qe=(e,t,o)=>{let n,s;for(n=0,s=e.length;n<s;n++){if(t.call(o,e[n],n,e)){return n}}return-1};const We=e=>e[e.length-1];const $e=e=>{let t=false;let o;return(...n)=>{if(!t){t=true;o=e.apply(null,n)}return o}};const Ge=(e,t,o,n)=>{const s=e.isiOS()&&/ipad/i.test(o)===true;const r=e.isiOS()&&!s;const a=e.isiOS()||e.isAndroid();const c=a||n("(pointer:coarse)");const i=s||!r&&a&&n("(min-device-width:768px)");const l=r||a&&!i;const d=t.isSafari()&&e.isiOS()&&/safari/i.test(o)===false;const u=!l&&!i&&!d;return{isiPad:R(s),isiPhone:R(r),isTablet:R(i),isPhone:R(l),isTouch:R(c),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:R(d),isDesktop:R(u)}};const Ke=(e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t)){return n}}return undefined};const Xe=(e,t)=>{const o=Ke(e,t);if(!o){return{major:0,minor:0}}const n=e=>Number(t.replace(o,"$"+e));return Qe(n(1),n(2))};const Ye=(e,t)=>{const o=String(t).toLowerCase();if(e.length===0){return Je()}return Xe(e,o)};const Je=()=>Qe(0,0);const Qe=(e,t)=>({major:e,minor:t});const Ze={nu:Qe,detect:Ye,unknown:Je};const et=(e,t)=>ve(t.brands,(t=>{const o=t.brand.toLowerCase();return ae(e,(e=>{var t;return o===((t=e.brand)===null||t===void 0?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:Ze.nu(parseInt(t.version,10),0)})))}));const tt=(e,t)=>{const o=String(t).toLowerCase();return ae(e,(e=>e.search(o)))};const ot=(e,t)=>tt(e,t).map((e=>{const o=Ze.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const nt=(e,t)=>tt(e,t).map((e=>{const o=Ze.detect(e.versionRegexes,t);return{current:e.name,version:o}}));const st=(e,t)=>e.substring(t);const rt=(e,t,o)=>t===""||e.length>=t.length&&e.substr(o,o+t.length)===t;const at=(e,t)=>it(e,t)?st(e,t.length):e;const ct=(e,t)=>e.indexOf(t)!==-1;const it=(e,t)=>rt(e,t,0);const lt=(e,t)=>rt(e,t,e.length-t.length);const dt=e=>t=>t.replace(e,"");const ut=dt(/^\s+|\s+$/g);const ft=dt(/^\s+/g);const mt=dt(/\s+$/g);const gt=e=>e.length>0;const pt=e=>!gt(e);const ht=(e,t)=>t<=0?"":new Array(t+1).join(e);const yt=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?q.none():q.some(o)};const bt=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/;const vt=e=>t=>ct(t,e);const kt=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>ct(e,"edge/")&&ct(e,"chrome")&&ct(e,"safari")&&ct(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,bt],search:e=>ct(e,"chrome")&&!ct(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>ct(e,"msie")||ct(e,"trident")},{name:"Opera",versionRegexes:[bt,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:vt("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:vt("firefox")},{name:"Safari",versionRegexes:[bt,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(ct(e,"safari")||ct(e,"mobile/"))&&ct(e,"applewebkit")}];const wt=[{name:"Windows",search:vt("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>ct(e,"iphone")||ct(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:vt("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:vt("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:vt("linux"),versionRegexes:[]},{name:"Solaris",search:vt("sunos"),versionRegexes:[]},{name:"FreeBSD",search:vt("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:vt("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}];const _t={browsers:R(kt),oses:R(wt)};const xt="Edge";const zt="Chromium";const Ct="IE";const St="Opera";const Tt="Firefox";const Ot="Safari";const Et=()=>Dt({current:undefined,version:Ze.unknown()});const Dt=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isEdge:n(xt),isChromium:n(zt),isIE:n(Ct),isOpera:n(St),isFirefox:n(Tt),isSafari:n(Ot)}};const At={unknown:Et,nu:Dt,edge:R(xt),chromium:R(zt),ie:R(Ct),opera:R(St),firefox:R(Tt),safari:R(Ot)};const Mt="Windows";const Nt="iOS";const Rt="Android";const Bt="Linux";const Lt="macOS";const Ht="Solaris";const It="FreeBSD";const Pt="ChromeOS";const Ft=()=>Vt({current:undefined,version:Ze.unknown()});const Vt=e=>{const t=e.current;const o=e.version;const n=e=>()=>t===e;return{current:t,version:o,isWindows:n(Mt),isiOS:n(Nt),isAndroid:n(Rt),isMacOS:n(Lt),isLinux:n(Bt),isSolaris:n(Ht),isFreeBSD:n(It),isChromeOS:n(Pt)}};const jt={unknown:Ft,nu:Vt,windows:R(Mt),ios:R(Nt),android:R(Rt),linux:R(Bt),macos:R(Lt),solaris:R(Ht),freebsd:R(It),chromeos:R(Pt)};const Ut=(e,t,o)=>{const n=_t.browsers();const s=_t.oses();const r=t.bind((e=>et(n,e))).orThunk((()=>ot(n,e))).fold(At.unknown,At.nu);const a=nt(s,e).fold(jt.unknown,jt.nu);const c=Ge(a,r,e,o);return{browser:r,os:a,deviceType:c}};const qt={detect:Ut};const Wt=e=>window.matchMedia(e).matches;let $t=$e((()=>qt.detect(navigator.userAgent,q.from(navigator.userAgentData),Wt)));const Gt=()=>$t();const Kt=navigator.userAgent;const Xt=Gt();const Yt=Xt.browser;const Jt=Xt.os;const Qt=Xt.deviceType;const Zt=Kt.indexOf("Windows Phone")!==-1;const eo={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:Yt.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!Yt.isIE(),windowsPhone:Zt,browser:{current:Yt.current,version:Yt.version,isChromium:Yt.isChromium,isEdge:Yt.isEdge,isFirefox:Yt.isFirefox,isIE:Yt.isIE,isOpera:Yt.isOpera,isSafari:Yt.isSafari},os:{current:Jt.current,version:Jt.version,isAndroid:Jt.isAndroid,isChromeOS:Jt.isChromeOS,isFreeBSD:Jt.isFreeBSD,isiOS:Jt.isiOS,isLinux:Jt.isLinux,isMacOS:Jt.isMacOS,isSolaris:Jt.isSolaris,isWindows:Jt.isWindows},deviceType:{isDesktop:Qt.isDesktop,isiPad:Qt.isiPad,isiPhone:Qt.isiPhone,isPhone:Qt.isPhone,isTablet:Qt.isTablet,isTouch:Qt.isTouch,isWebView:Qt.isWebView}};const to=/^\s*|\s*$/g;const oo=e=>e===null||e===undefined?"":(""+e).replace(to,"");const no=(e,t)=>{if(!t){return e!==undefined}if(t==="array"&&He(e)){return true}return typeof e===t};const so=(e,t,o)=>{let n;e=e||[];t=t||",";if(typeof e==="string"){e=e.split(t)}o=o||{};n=e.length;while(n--){o[e[n]]={}}return o};const ro=Ne;const ao=(e,...t)=>{for(let o=0;o<t.length;o++){const n=t[o];for(const t in n){if(Ne(n,t)){const o=n[t];if(o!==undefined){e[t]=o}}}}return e};const co=function(e,t,o,n){n=n||this;if(e){if(o){e=e[o]}Pe(e,((e,s)=>{if(t.call(n,e,s,o)===false){return false}co(e,t,o,n)}))}};const io=(e,t)=>{let o,n;t=t||window;e=e.split(".");for(o=0,n=e.length;o<n;o++){t=t[e[o]];if(!t){break}}return t};const lo=(e,t)=>{if(!e||no(e,"array")){return e}return Fe(e.split(t||","),oo)};const uo=e=>{const t=eo.cacheSuffix;if(t){e+=(e.indexOf("?")===-1?"?":"&")+t}return e};const fo={trim:oo,isArray:He,is:no,toArray:Ie,makeMap:so,each:Pe,map:Fe,grep:Ve,inArray:je,hasOwn:ro,extend:ao,walk:co,resolve:io,explode:lo,_addCacheSuffix:uo};const mo=(e,t,o=L)=>e.exists((e=>o(e,t)));const go=e=>{const t=[];const o=e=>{t.push(e)};for(let t=0;t<e.length;t++){e[t].each(o)}return t};const po=(e,t,o)=>e.isSome()&&t.isSome()?q.some(o(e.getOrDie(),t.getOrDie())):q.none();const ho=(e,t,o,n)=>e.isSome()&&t.isSome()&&o.isSome()?q.some(n(e.getOrDie(),t.getOrDie(),o.getOrDie())):q.none();const yo=(e,t)=>e?q.some(t):q.none();typeof window!=="undefined"?window:Function("return this;")();const bo=8;const vo=9;const ko=11;const wo=1;const _o=3;const xo=e=>{const t=e.dom.nodeName;return t.toLowerCase()};const zo=e=>e.dom.nodeType;const Co=e=>t=>zo(t)===e;const So=e=>zo(e)===bo||xo(e)==="#comment";const To=Co(wo);const Oo=Co(_o);const Eo=Co(vo);const Do=Co(ko);const Ao=e=>t=>To(t)&&xo(t)===e;const Mo=(e,t,o)=>{if(v(o)||z(o)||E(o)){e.setAttribute(t,o+"")}else{console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e);throw new Error("Attribute value was not simple")}};const No=(e,t,o)=>{Mo(e.dom,t,o)};const Ro=(e,t)=>{const o=e.dom;xe(t,((e,t)=>{Mo(o,t,e)}))};const Bo=(e,t)=>{const o=e.dom.getAttribute(t);return o===null?undefined:o};const Lo=(e,t)=>q.from(Bo(e,t));const Ho=(e,t)=>{const o=e.dom;return o&&o.hasAttribute?o.hasAttribute(t):false};const Io=(e,t)=>{e.dom.removeAttribute(t)};const Po=e=>{const t=e.dom.attributes;return t===undefined||t===null||t.length===0};const Fo=e=>se(e.dom.attributes,((e,t)=>{e[t.name]=t.value;return e}),{});const Vo=(e,t)=>{const o=Bo(e,t);return o===undefined||o===""?[]:o.split(" ")};const jo=(e,t,o)=>{const n=Vo(e,t);const s=n.concat([o]);No(e,t,s.join(" "));return true};const Uo=(e,t,o)=>{const n=oe(Vo(e,t),(e=>e!==o));if(n.length>0){No(e,t,n.join(" "))}else{Io(e,t)}return false};const qo=e=>e.dom.classList!==undefined;const Wo=e=>Vo(e,"class");const $o=(e,t)=>jo(e,"class",t);const Go=(e,t)=>Uo(e,"class",t);const Ko=(e,t)=>{if(Y(Wo(e),t)){return Go(e,t)}else{return $o(e,t)}};const Xo=(e,t)=>{if(qo(e)){e.dom.classList.add(t)}else{$o(e,t)}};const Yo=e=>{const t=qo(e)?e.dom.classList:Wo(e);if(t.length===0){Io(e,"class")}};const Jo=(e,t)=>{if(qo(e)){const o=e.dom.classList;o.remove(t)}else{Go(e,t)}Yo(e)};const Qo=(e,t)=>{const o=qo(e)?e.dom.classList.toggle(t):Ko(e,t);Yo(e);return o};const Zo=(e,t)=>qo(e)&&e.dom.classList.contains(t);const en=e=>e.style!==undefined&&O(e.style.getPropertyValue);const tn=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;if(!n.hasChildNodes()||n.childNodes.length>1){const t="HTML does not have a single root node";console.error(t,e);throw new Error(t)}return sn(n.childNodes[0])};const on=(e,t)=>{const o=t||document;const n=o.createElement(e);return sn(n)};const nn=(e,t)=>{const o=t||document;const n=o.createTextNode(e);return sn(n)};const sn=e=>{if(e===null||e===undefined){throw new Error("Node cannot be null or undefined")}return{dom:e}};const rn=(e,t,o)=>q.from(e.dom.elementFromPoint(t,o)).map(sn);const an={fromHtml:tn,fromTag:on,fromText:nn,fromDom:sn,fromPoint:rn};const cn=(e,t)=>{const o=[];const n=e=>{o.push(e);return t(e)};let s=t(e);do{s=s.bind(n)}while(s.isSome());return o};const ln=(e,t)=>{const o=e.dom;if(o.nodeType!==wo){return false}else{const e=o;if(e.matches!==undefined){return e.matches(t)}else if(e.msMatchesSelector!==undefined){return e.msMatchesSelector(t)}else if(e.webkitMatchesSelector!==undefined){return e.webkitMatchesSelector(t)}else if(e.mozMatchesSelector!==undefined){return e.mozMatchesSelector(t)}else{throw new Error("Browser lacks native selectors")}}};const dn=e=>e.nodeType!==wo&&e.nodeType!==vo&&e.nodeType!==ko||e.childElementCount===0;const un=(e,t)=>{const o=t===undefined?document:t.dom;return dn(o)?[]:Q(o.querySelectorAll(e),an.fromDom)};const fn=(e,t)=>{const o=t===undefined?document:t.dom;return dn(o)?q.none():q.from(o.querySelector(e)).map(an.fromDom)};const mn=(e,t)=>e.dom===t.dom;const gn=(e,t)=>{const o=e.dom;const n=t.dom;return o===n?false:o.contains(n)};const pn=e=>an.fromDom(e.dom.ownerDocument);const hn=e=>Eo(e)?e:pn(e);const yn=e=>an.fromDom(hn(e).dom.documentElement);const bn=e=>an.fromDom(hn(e).dom.defaultView);const vn=e=>q.from(e.dom.parentNode).map(an.fromDom);const kn=e=>q.from(e.dom.parentElement).map(an.fromDom);const wn=(e,t)=>{const o=O(t)?t:j;let n=e.dom;const s=[];while(n.parentNode!==null&&n.parentNode!==undefined){const e=n.parentNode;const t=an.fromDom(e);s.push(t);if(o(t)===true){break}else{n=e}}return s};const _n=e=>{const t=t=>oe(t,(t=>!mn(e,t)));return vn(e).map(Tn).map(t).getOr([])};const xn=e=>q.from(e.dom.previousSibling).map(an.fromDom);const zn=e=>q.from(e.dom.nextSibling).map(an.fromDom);const Cn=e=>ue(cn(e,xn));const Sn=e=>cn(e,zn);const Tn=e=>Q(e.dom.childNodes,an.fromDom);const On=(e,t)=>{const o=e.dom.childNodes;return q.from(o[t]).map(an.fromDom)};const En=e=>On(e,0);const Dn=e=>On(e,e.dom.childNodes.length-1);const An=e=>e.dom.childNodes.length;const Mn=e=>{const t=e.dom.head;if(t===null||t===undefined){throw new Error("Head is not available yet")}return an.fromDom(t)};const Nn=e=>Do(e)&&T(e.dom.host);const Rn=O(Element.prototype.attachShadow)&&O(Node.prototype.getRootNode);const Bn=R(Rn);const Ln=Rn?e=>an.fromDom(e.dom.getRootNode()):hn;const Hn=e=>Nn(e)?e:Mn(hn(e));const In=e=>{const t=Ln(e);return Nn(t)?q.some(t):q.none()};const Pn=e=>an.fromDom(e.dom.host);const Fn=e=>{if(Bn()&&T(e.target)){const t=an.fromDom(e.target);if(To(t)&&Vn(t)){if(e.composed&&e.composedPath){const t=e.composedPath();if(t){return he(t)}}}}return q.from(e.target)};const Vn=e=>T(e.dom.shadowRoot);const jn=e=>{const t=Oo(e)?e.dom.parentNode:e.dom;if(t===undefined||t===null||t.ownerDocument===null){return false}const o=t.ownerDocument;return In(an.fromDom(t)).fold((()=>o.body.contains(t)),N(jn,Pn))};const Un=(e,t,o)=>{if(!v(o)){console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e);throw new Error("CSS value must be a string: "+o)}if(en(e)){e.style.setProperty(t,o)}};const qn=(e,t)=>{if(en(e)){e.style.removeProperty(t)}};const Wn=(e,t,o)=>{const n=e.dom;Un(n,t,o)};const $n=(e,t)=>{const o=e.dom;xe(t,((e,t)=>{Un(o,t,e)}))};const Gn=(e,t)=>{const o=e.dom;const n=window.getComputedStyle(o);const s=n.getPropertyValue(t);return s===""&&!jn(e)?Kn(o,t):s};const Kn=(e,t)=>en(e)?e.style.getPropertyValue(t):"";const Xn=(e,t)=>{const o=e.dom;const n=Kn(o,t);return q.from(n).filter((e=>e.length>0))};const Yn=e=>{const t={};const o=e.dom;if(en(o)){for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}}return t};const Jn=(e,t)=>{const o=e.dom;qn(o,t);if(mo(Lo(e,"style").map(ut),"")){Io(e,"style")}};const Qn=e=>e.dom.offsetWidth;const Zn=(e,t)=>{const o=vn(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))};const es=(e,t)=>{const o=zn(e);o.fold((()=>{const o=vn(e);o.each((e=>{os(e,t)}))}),(e=>{Zn(e,t)}))};const ts=(e,t)=>{const o=En(e);o.fold((()=>{os(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))};const os=(e,t)=>{e.dom.appendChild(t.dom)};const ns=(e,t)=>{Zn(e,t);os(t,e)};const ss=(e,t)=>{Z(t,((o,n)=>{const s=n===0?e:t[n-1];es(s,o)}))};const rs=(e,t)=>{Z(t,(t=>{os(e,t)}))};const as=e=>{e.dom.textContent="";Z(Tn(e),(e=>{cs(e)}))};const cs=e=>{const t=e.dom;if(t.parentNode!==null){t.parentNode.removeChild(t)}};const is=e=>{const t=Tn(e);if(t.length>0){ss(e,t)}cs(e)};const ls=(e,t)=>{const o=t||document;const n=o.createElement("div");n.innerHTML=e;return Tn(an.fromDom(n))};const ds=e=>Q(e,an.fromDom);const us=e=>e.dom.innerHTML;const fs=(e,t)=>{const o=pn(e);const n=o.dom;const s=an.fromDom(n.createDocumentFragment());const r=ls(t,n);rs(s,r);as(e);os(e,s)};const ms=e=>{const t=an.fromTag("div");const o=an.fromDom(e.dom.cloneNode(true));os(t,o);return us(t)};const gs=(e,t,o,n,s,r,a)=>({target:e,x:t,y:o,stop:n,prevent:s,kill:r,raw:a});const ps=e=>{const t=an.fromDom(Fn(e).getOr(e.target));const o=()=>e.stopPropagation();const n=()=>e.preventDefault();const s=M(n,o);return gs(t,e.clientX,e.clientY,o,n,s,e)};const hs=(e,t)=>o=>{if(e(o)){t(ps(o))}};const ys=(e,t,o,n,s)=>{const r=hs(o,n);e.dom.addEventListener(t,r,s);return{unbind:H(vs,e,t,r,s)}};const bs=(e,t,o,n)=>ys(e,t,o,n,false);const vs=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)};const ks=(e,t)=>{const o=(o,n)=>ks(e+o,t+n);return{left:e,top:t,translate:o}};const ws=ks;const _s=e=>{const t=e.getBoundingClientRect();return ws(t.left,t.top)};const xs=(e,t)=>{if(e!==undefined){return e}else{return t!==undefined?t:0}};const zs=e=>{const t=e.dom.ownerDocument;const o=t.body;const n=t.defaultView;const s=t.documentElement;if(o===e.dom){return ws(o.offsetLeft,o.offsetTop)}const r=xs(n===null||n===void 0?void 0:n.pageYOffset,s.scrollTop);const a=xs(n===null||n===void 0?void 0:n.pageXOffset,s.scrollLeft);const c=xs(s.clientTop,o.clientTop);const i=xs(s.clientLeft,o.clientLeft);return Cs(e).translate(a-i,r-c)};const Cs=e=>{const t=e.dom;const o=t.ownerDocument;const n=o.body;if(n===t){return ws(n.offsetLeft,n.offsetTop)}if(!jn(e)){return ws(0,0)}return _s(t)};const Ss=e=>{const t=e!==undefined?e.dom:document;const o=t.body.scrollLeft||t.documentElement.scrollLeft;const n=t.body.scrollTop||t.documentElement.scrollTop;return ws(o,n)};const Ts=(e,t,o)=>{const n=o!==undefined?o.dom:document;const s=n.defaultView;if(s){s.scrollTo(e,t)}};const Os=(e,t)=>{const o=Gt().browser.isSafari();if(o&&O(e.dom.scrollIntoViewIfNeeded)){e.dom.scrollIntoViewIfNeeded(false)}else{e.dom.scrollIntoView(t)}};const Es=e=>{const t=e===undefined?window:e;if(Gt().browser.isFirefox()){return q.none()}else{return q.from(t.visualViewport)}};const Ds=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n});const As=e=>{const t=e===undefined?window:e;const o=t.document;const n=Ss(an.fromDom(o));return Es(t).fold((()=>{const e=t.document.documentElement;const o=e.clientWidth;const s=e.clientHeight;return Ds(n.left,n.top,o,s)}),(e=>Ds(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))};const Ms=e=>t=>!!t&&t.nodeType===e;const Ns=e=>!!e&&!Object.getPrototypeOf(e);const Rs=Ms(1);const Bs=e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const o=e.nodeName.toLowerCase();return Y(t,o)}return false}};const Ls=(e,t)=>{const o=t.toLowerCase().split(" ");return t=>{if(Rs(t)){for(let n=0;n<o.length;n++){const s=t.ownerDocument.defaultView.getComputedStyle(t,null);const r=s?s.getPropertyValue(e):null;if(r===o[n]){return true}}}return false}};const Hs=e=>t=>Rs(t)&&t.hasAttribute(e);const Is=(e,t)=>o=>Rs(o)&&o.getAttribute(e)===t;const Ps=e=>Rs(e)&&e.hasAttribute("data-mce-bogus");const Fs=e=>Rs(e)&&e.getAttribute("data-mce-bogus")==="all";const Vs=e=>Rs(e)&&e.tagName==="TABLE";const js=e=>t=>{if(Rs(t)){if(t.contentEditable===e){return true}if(t.getAttribute("data-mce-contenteditable")===e){return true}}return false};const Us=Bs(["textarea","input"]);const qs=Ms(3);const Ws=Ms(4);const $s=Ms(7);const Gs=Ms(8);const Ks=Ms(9);const Xs=Ms(11);const Ys=Bs(["br"]);const Js=Bs(["img"]);const Qs=js("true");const Zs=js("false");const er=Bs(["td","th"]);const tr=Bs(["video","audio","object","embed"]);const or=Gt().browser;const nr=e=>ae(e,To);const sr=e=>{if(or.isFirefox()&&xo(e)==="table"){return nr(Tn(e)).filter((e=>xo(e)==="caption")).bind((e=>nr(Sn(e)).map((t=>{const o=t.dom.offsetTop;const n=e.dom.offsetTop;const s=e.dom.offsetHeight;return o<=n?-s:0})))).getOr(0)}else{return 0}};const rr=(e,t)=>e.children&&Y(e.children,t);const ar=(e,t,o)=>{let n=0,s=0;const r=e.ownerDocument;o=o?o:e;if(t){if(o===e&&t.getBoundingClientRect&&Gn(an.fromDom(e),"position")==="static"){const o=t.getBoundingClientRect();n=o.left+(r.documentElement.scrollLeft||e.scrollLeft)-r.documentElement.clientLeft;s=o.top+(r.documentElement.scrollTop||e.scrollTop)-r.documentElement.clientTop;return{x:n,y:s}}let a=t;while(a&&a!==o&&a.nodeType&&!rr(a,o)){const e=a;n+=e.offsetLeft||0;s+=e.offsetTop||0;a=e.offsetParent}a=t.parentNode;while(a&&a!==o&&a.nodeType&&!rr(a,o)){n-=a.scrollLeft||0;s-=a.scrollTop||0;a=a.parentNode}s+=sr(an.fromDom(t))}return{x:n,y:s}};var cr=(e,t,o,n,s)=>{if(e(o,n)){return q.some(o)}else if(O(s)&&s(o)){return q.none()}else{return t(o,n,s)}};const ir=(e,t,o)=>{let n=e.dom;const s=O(o)?o:j;while(n.parentNode){n=n.parentNode;const e=an.fromDom(n);if(t(e)){return q.some(e)}else if(s(e)){break}}return q.none()};const lr=(e,t,o)=>{const n=(e,t)=>t(e);return cr(n,ir,e,t,o)};const dr=(e,t)=>{const o=e.dom;if(!o.parentNode){return q.none()}return ur(an.fromDom(o.parentNode),(o=>!mn(e,o)&&t(o)))};const ur=(e,t)=>{const o=e=>t(an.fromDom(e));const n=ae(e.dom.childNodes,o);return n.map(an.fromDom)};const fr=(e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const s=an.fromDom(e.childNodes[n]);if(t(s)){return q.some(s)}const r=o(e.childNodes[n]);if(r.isSome()){return r}}return q.none()};return o(e.dom)};const mr=(e,t,o)=>ir(e,(e=>ln(e,t)),o);const gr=(e,t)=>fn(t,e);const pr=(e,t,o)=>{const n=(e,t)=>ln(e,t);return cr(n,mr,e,t,o)};const hr=(e,t={})=>{let o=0;const n={};const s=an.fromDom(e);const r=hn(s);const a=t.maxLoadTime||5e3;const c=e=>{t.referrerPolicy=e};const i=e=>{os(Hn(s),e)};const l=e=>{const t=Hn(s);gr(t,"#"+e).each(cs)};const d=e=>Me(n,e).getOrThunk((()=>({id:"mce-u"+o++,passed:[],failed:[],count:0})));const u=o=>new Promise(((s,c)=>{let l;const u=fo._addCacheSuffix(o);const f=d(u);n[u]=f;f.count++;const m=(e,t)=>{Z(e,V);f.status=t;f.passed=[];f.failed=[];if(l){l.onload=null;l.onerror=null;l=null}};const g=()=>m(f.passed,2);const p=()=>m(f.failed,3);const h=(e,t)=>{if(!e()){if(Date.now()-v<a){setTimeout(t)}else{p()}}};const y=()=>{h((()=>{const t=e.styleSheets;let o=t.length;while(o--){const e=t[o];const n=e.ownerNode;if(n&&n.id===l.id){g();return true}}return false}),y)};if(s){f.passed.push(s)}if(c){f.failed.push(c)}if(f.status===1){return}if(f.status===2){g();return}if(f.status===3){p();return}f.status=1;const b=an.fromTag("link",r.dom);Ro(b,{rel:"stylesheet",type:"text/css",id:f.id});const v=Date.now();if(t.contentCssCors){No(b,"crossOrigin","anonymous")}if(t.referrerPolicy){No(b,"referrerpolicy",t.referrerPolicy)}l=b.dom;l.onload=y;l.onerror=p;i(b);No(b,"href",u)}));const f=e=>{const t=Promise.allSettled(Q(e,(e=>u(e).then(R(e)))));return t.then((e=>{const t=te(e,(e=>e.status==="fulfilled"));if(t.fail.length>0){return Promise.reject(Q(t.fail,(e=>e.reason)))}else{return Q(t.pass,(e=>e.value))}}))};const m=e=>{const t=fo._addCacheSuffix(e);Me(n,t).each((e=>{const o=--e.count;if(o===0){delete n[t];l(e.id)}}))};const g=e=>{Z(e,(e=>{m(e)}))};return{load:u,loadAll:f,unload:m,unloadAll:g,_setReferrerPolicy:c}};const yr=()=>{const e=new WeakMap;const t=(t,o)=>{const n=Ln(t);const s=n.dom;return q.from(e.get(s)).getOrThunk((()=>{const t=hr(s,o);e.set(s,t);return t}))};return{forElement:t}};const br=yr();class vr{constructor(e,t){this.node=e;this.rootNode=t;this.current=this.current.bind(this);this.next=this.next.bind(this);this.prev=this.prev.bind(this);this.prev2=this.prev2.bind(this)}current(){return this.node}next(e){this.node=this.findSibling(this.node,"firstChild","nextSibling",e);return this.node}prev(e){this.node=this.findSibling(this.node,"lastChild","previousSibling",e);return this.node}prev2(e){this.node=this.findPreviousNode(this.node,"lastChild","previousSibling",e);return this.node}findSibling(e,t,o,n){let s,r;if(e){if(!n&&e[t]){return e[t]}if(e!==this.rootNode){s=e[o];if(s){return s}for(r=e.parentNode;r&&r!==this.rootNode;r=r.parentNode){s=r[o];if(s){return s}}}}}findPreviousNode(e,t,o,n){let s,r,a;if(e){s=e[o];if(this.rootNode&&s===this.rootNode){return}if(s){if(!n){for(a=s[t];a;a=a[t]){if(!a[t]){return a}}}return s}r=e.parentNode;if(r&&r!==this.rootNode){return r}}}}const kr=["article","aside","details","div","dt","figcaption","footer","form","fieldset","header","hgroup","html","main","nav","section","summary","body","p","dl","multicol","dd","figure","address","center","blockquote","h1","h2","h3","h4","h5","h6","listing","xmp","pre","plaintext","menu","dir","ul","ol","li","hr","table","tbody","thead","tfoot","th","tr","td","caption"];const wr=["td","th"];const _r=["thead","tbody","tfoot"];const xr=["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"];const zr=["h1","h2","h3","h4","h5","h6"];const Cr=["li","dd","dt"];const Sr=["ul","ol","dl"];const Tr=["pre","script","textarea","style"];const Or=e=>{let t;return o=>{t=t?t:me(e,U);return Ne(t,xo(o))}};const Er=Or(zr);const Dr=Or(kr);const Ar=e=>xo(e)==="table";const Mr=e=>To(e)&&!Dr(e);const Nr=e=>To(e)&&xo(e)==="br";const Rr=Or(xr);const Br=Or(Sr);const Lr=Or(Cr);const Hr=Or(_r);const Ir=Or(wr);const Pr=Or(Tr);const Fr=(e,t,o)=>mr(e,t,o).isSome();const Vr="\ufeff";const jr=" ";const Ur=e=>e===Vr;const qr=e=>e.replace(/\uFEFF/g,"");const Wr=Vr;const $r=Ur;const Gr=qr;const Kr=Rs;const Xr=qs;const Yr=e=>{if(Xr(e)){e=e.parentNode}return Kr(e)&&e.hasAttribute("data-mce-caret")};const Jr=e=>Xr(e)&&$r(e.data);const Qr=e=>Yr(e)||Jr(e);const Zr=e=>e.firstChild!==e.lastChild||!Ys(e.firstChild);const ea=(e,t)=>{const o=e.ownerDocument;const n=o.createTextNode(Wr);const s=e.parentNode;if(!t){const t=e.nextSibling;if(Xr(t)){if(Qr(t)){return t}if(ra(t)){t.splitText(1);return t}}if(e.nextSibling){s.insertBefore(n,e.nextSibling)}else{s.appendChild(n)}}else{const t=e.previousSibling;if(Xr(t)){if(Qr(t)){return t}if(aa(t)){return t.splitText(t.data.length-1)}}s.insertBefore(n,e)}return n};const ta=e=>{const t=e.container();if(!qs(t)){return false}return t.data.charAt(e.offset())===Wr||e.isAtStart()&&Jr(t.previousSibling)};const oa=e=>{const t=e.container();if(!qs(t)){return false}return t.data.charAt(e.offset()-1)===Wr||e.isAtEnd()&&Jr(t.nextSibling)};const na=()=>{const e=document.createElement("br");e.setAttribute("data-mce-bogus","1");return e};const sa=(e,t,o)=>{const n=t.ownerDocument;const s=n.createElement(e);s.setAttribute("data-mce-caret",o?"before":"after");s.setAttribute("data-mce-bogus","all");s.appendChild(na());const r=t.parentNode;if(!o){if(t.nextSibling){r.insertBefore(s,t.nextSibling)}else{r.appendChild(s)}}else{r.insertBefore(s,t)}return s};const ra=e=>Xr(e)&&e.data[0]===Wr;const aa=e=>Xr(e)&&e.data[e.data.length-1]===Wr;const ca=e=>{const t=e.getElementsByTagName("br");const o=t[t.length-1];if(Ps(o)){o.parentNode.removeChild(o)}};const ia=e=>{if(e&&e.hasAttribute("data-mce-caret")){ca(e);e.removeAttribute("data-mce-caret");e.removeAttribute("data-mce-bogus");e.removeAttribute("style");e.removeAttribute("data-mce-style");e.removeAttribute("_moz_abspos");return e}return null};const la=e=>Yr(e.startContainer);const da=Qs;const ua=Zs;const fa=Ys;const ma=qs;const ga=Bs(["script","style","textarea"]);const pa=Bs(["img","input","textarea","hr","iframe","video","audio","object","embed"]);const ha=Bs(["table"]);const ya=Qr;const ba=e=>{if(ya(e)){return false}if(ma(e)){return!ga(e.parentNode)}return pa(e)||fa(e)||ha(e)||ka(e)};const va=e=>Rs(e)&&e.getAttribute("unselectable")==="true";const ka=e=>va(e)===false&&ua(e);const wa=(e,t)=>{for(e=e.parentNode;e&&e!==t;e=e.parentNode){if(ka(e)){return false}if(da(e)){return true}}return true};const _a=e=>{if(!ka(e)){return false}return se(be(e.getElementsByTagName("*")),((e,t)=>e||da(t)),false)!==true};const xa=e=>pa(e)||_a(e);const za=(e,t)=>ba(e)&&wa(e,t);const Ca=/^[ \t\r\n]*$/;const Sa=e=>Ca.test(e);const Ta=e=>" \f\t\v".indexOf(e)!==-1;const Oa=e=>e==="\n"||e==="\r";const Ea=(e,t)=>t<e.length&&t>=0?Oa(e[t]):false;const Da=(e,t=4,o=true,n=true)=>{const s=ht(" ",t);const r=e.replace(/\t/g,s);const a=se(r,((e,t)=>{if(Ta(t)||t===jr){if(e.pcIsSpace||e.str===""&&o||e.str.length===r.length-1&&n||Ea(r,e.str.length+1)){return{pcIsSpace:false,str:e.str+jr}}else{return{pcIsSpace:true,str:e.str+" "}}}else{return{pcIsSpace:Oa(t),str:e.str+t}}}),{pcIsSpace:false,str:""});return a.str};const Aa=(e,t)=>{const o=an.fromDom(t);const n=an.fromDom(e);return Fr(n,"pre,code",H(mn,o))};const Ma=(e,t)=>qs(e)&&Sa(e.data)&&Aa(e,t)===false;const Na=e=>Rs(e)&&e.nodeName==="A"&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id"));const Ra=(e,t)=>ba(e)&&Ma(e,t)===false||Na(e)||Ba(e);const Ba=Hs("data-mce-bookmark");const La=Hs("data-mce-bogus");const Ha=Is("data-mce-bogus","all");const Ia=(e,t)=>{let o=0;if(Ra(e,e)){return false}else{let n=e.firstChild;if(!n){return true}const s=new vr(n,e);do{if(t){if(Ha(n)){n=s.next(true);continue}if(La(n)){n=s.next();continue}}if(Ys(n)){o++;n=s.next();continue}if(Ra(n,e)){return false}n=s.next()}while(n);return o<=1}};const Pa=(e,t=true)=>Ia(e.dom,t);const Fa=e=>e.nodeName.toLowerCase()==="span";const Va=(e,t)=>T(e)&&(Ra(e,t)||Mr(an.fromDom(e)));const ja=(e,t)=>{const o=new vr(e,t).prev(false);const n=new vr(e,t).next(false);const s=C(o)||Va(o,t);const r=C(n)||Va(n,t);return s&&r};const Ua=e=>Fa(e)&&e.getAttribute("data-mce-type")==="bookmark";const qa=(e,t)=>qs(e)&&e.data.length>0&&ja(e,t);const Wa=e=>Rs(e)?e.childNodes.length>0:false;const $a=e=>Xs(e)||Ks(e);const Ga=(e,t,o)=>{const n=o||t;if(Rs(t)&&Ua(t)){return t}const s=t.childNodes;for(let t=s.length-1;t>=0;t--){Ga(e,s[t],n)}if(Rs(t)){const e=t.childNodes;if(e.length===1&&Ua(e[0])){t.parentNode.insertBefore(e[0],t)}}if(!$a(t)&&!Ra(t,n)&&!Wa(t)&&!qa(t,n)){e.remove(t)}return t};const Ka=fo.makeMap;const Xa=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;const Ya=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g;const Ja=/[<>&\"\']/g;const Qa=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi;const Za={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"};const ec={'"':""","'":"'","<":"<",">":">","&":"&","`":"`"};const tc={"<":"<",">":">","&":"&",""":'"',"'":`'`};const oc=e=>{const t=an.fromTag("div").dom;t.innerHTML=e;return t.textContent||t.innerText||e};const nc=(e,t)=>{let o,n,s;const r={};if(e){e=e.split(",");t=t||10;for(o=0;o<e.length;o+=2){n=String.fromCharCode(parseInt(e[o],t));if(!ec[n]){s="&"+e[o+1]+";";r[n]=s;r[s]=n}}return r}};const sc=nc("50,nbsp,51,iexcl,52,cent,53,pound,54,curren,55,yen,56,brvbar,57,sect,58,uml,59,copy,"+"5a,ordf,5b,laquo,5c,not,5d,shy,5e,reg,5f,macr,5g,deg,5h,plusmn,5i,sup2,5j,sup3,5k,acute,"+"5l,micro,5m,para,5n,middot,5o,cedil,5p,sup1,5q,ordm,5r,raquo,5s,frac14,5t,frac12,5u,frac34,"+"5v,iquest,60,Agrave,61,Aacute,62,Acirc,63,Atilde,64,Auml,65,Aring,66,AElig,67,Ccedil,"+"68,Egrave,69,Eacute,6a,Ecirc,6b,Euml,6c,Igrave,6d,Iacute,6e,Icirc,6f,Iuml,6g,ETH,6h,Ntilde,"+"6i,Ograve,6j,Oacute,6k,Ocirc,6l,Otilde,6m,Ouml,6n,times,6o,Oslash,6p,Ugrave,6q,Uacute,"+"6r,Ucirc,6s,Uuml,6t,Yacute,6u,THORN,6v,szlig,70,agrave,71,aacute,72,acirc,73,atilde,74,auml,"+"75,aring,76,aelig,77,ccedil,78,egrave,79,eacute,7a,ecirc,7b,euml,7c,igrave,7d,iacute,7e,icirc,"+"7f,iuml,7g,eth,7h,ntilde,7i,ograve,7j,oacute,7k,ocirc,7l,otilde,7m,ouml,7n,divide,7o,oslash,"+"7p,ugrave,7q,uacute,7r,ucirc,7s,uuml,7t,yacute,7u,thorn,7v,yuml,ci,fnof,sh,Alpha,si,Beta,"+"sj,Gamma,sk,Delta,sl,Epsilon,sm,Zeta,sn,Eta,so,Theta,sp,Iota,sq,Kappa,sr,Lambda,ss,Mu,"+"st,Nu,su,Xi,sv,Omicron,t0,Pi,t1,Rho,t3,Sigma,t4,Tau,t5,Upsilon,t6,Phi,t7,Chi,t8,Psi,"+"t9,Omega,th,alpha,ti,beta,tj,gamma,tk,delta,tl,epsilon,tm,zeta,tn,eta,to,theta,tp,iota,"+"tq,kappa,tr,lambda,ts,mu,tt,nu,tu,xi,tv,omicron,u0,pi,u1,rho,u2,sigmaf,u3,sigma,u4,tau,"+"u5,upsilon,u6,phi,u7,chi,u8,psi,u9,omega,uh,thetasym,ui,upsih,um,piv,812,bull,816,hellip,"+"81i,prime,81j,Prime,81u,oline,824,frasl,88o,weierp,88h,image,88s,real,892,trade,89l,alefsym,"+"8cg,larr,8ch,uarr,8ci,rarr,8cj,darr,8ck,harr,8dl,crarr,8eg,lArr,8eh,uArr,8ei,rArr,8ej,dArr,"+"8ek,hArr,8g0,forall,8g2,part,8g3,exist,8g5,empty,8g7,nabla,8g8,isin,8g9,notin,8gb,ni,8gf,prod,"+"8gh,sum,8gi,minus,8gn,lowast,8gq,radic,8gt,prop,8gu,infin,8h0,ang,8h7,and,8h8,or,8h9,cap,8ha,cup,"+"8hb,int,8hk,there4,8hs,sim,8i5,cong,8i8,asymp,8j0,ne,8j1,equiv,8j4,le,8j5,ge,8k2,sub,8k3,sup,8k4,"+"nsub,8k6,sube,8k7,supe,8kl,oplus,8kn,otimes,8l5,perp,8m5,sdot,8o8,lceil,8o9,rceil,8oa,lfloor,8ob,"+"rfloor,8p9,lang,8pa,rang,9ea,loz,9j0,spades,9j3,clubs,9j5,hearts,9j6,diams,ai,OElig,aj,oelig,b0,"+"Scaron,b1,scaron,bo,Yuml,m6,circ,ms,tilde,802,ensp,803,emsp,809,thinsp,80c,zwnj,80d,zwj,80e,lrm,"+"80f,rlm,80j,ndash,80k,mdash,80o,lsquo,80p,rsquo,80q,sbquo,80s,ldquo,80t,rdquo,80u,bdquo,810,dagger,"+"811,Dagger,81g,permil,81p,lsaquo,81q,rsaquo,85c,euro",32);const rc=(e,t)=>e.replace(t?Xa:Ya,(e=>ec[e]||e));const ac=e=>(""+e).replace(Ja,(e=>ec[e]||e));const cc=(e,t)=>e.replace(t?Xa:Ya,(e=>{if(e.length>1){return"&#"+((e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320)+65536)+";"}return ec[e]||"&#"+e.charCodeAt(0)+";"}));const ic=(e,t,o)=>{o=o||sc;return e.replace(t?Xa:Ya,(e=>ec[e]||o[e]||e))};const lc=(e,t)=>{const o=nc(t)||sc;const n=(e,t)=>e.replace(t?Xa:Ya,(e=>{if(ec[e]!==undefined){return ec[e]}if(o[e]!==undefined){return o[e]}if(e.length>1){return"&#"+((e.charCodeAt(0)-55296)*1024+(e.charCodeAt(1)-56320)+65536)+";"}return"&#"+e.charCodeAt(0)+";"}));const s=(e,t)=>ic(e,t,o);const r=Ka(e.replace(/\+/g,","));if(r.named&&r.numeric){return n}if(r.named){if(t){return s}return ic}if(r.numeric){return cc}return rc};const dc=e=>e.replace(Qa,((e,t)=>{if(t){if(t.charAt(0).toLowerCase()==="x"){t=parseInt(t.substr(1),16)}else{t=parseInt(t,10)}if(t>65535){t-=65536;return String.fromCharCode(55296+(t>>10),56320+(t&1023))}return Za[t]||String.fromCharCode(t)}return tc[e]||sc[e]||oc(e)}));const uc={encodeRaw:rc,encodeAllRaw:ac,encodeNumeric:cc,encodeNamed:ic,getEncodeFunc:lc,decode:dc};const fc={},mc={};const gc=fo.makeMap,pc=fo.each,hc=fo.extend,yc=fo.explode,bc=fo.inArray;const vc=(e,t)=>{e=fo.trim(e);return e?e.split(t||" "):[]};const kc=e=>{const t={};let o,n;let s,r,a,c;const i=(e,n="",s="")=>{const r=vc(s);const a=vc(e);let c=a.length;while(c--){const e=vc([o,n].join(" "));t[a[c]]={attributes:me(e,(()=>({}))),attributesOrder:e,children:me(r,R(mc))}}};const l=(e,o)=>{const n=vc(e);const s=vc(o);let r=n.length;while(r--){const e=t[n[r]];for(let t=0,o=s.length;t<o;t++){e.attributes[s[t]]={};e.attributesOrder.push(s[t])}}};if(fc[e]){return fc[e]}o="id accesskey class dir lang style tabindex title role";n="address blockquote div dl fieldset form h1 h2 h3 h4 h5 h6 hr menu ol p pre table ul";s="a abbr b bdo br button cite code del dfn em embed i iframe img input ins kbd "+"label map noscript object q s samp script select small span strong sub sup "+"textarea u var #text #comment";if(e!=="html4"){o+=" contenteditable contextmenu draggable dropzone "+"hidden spellcheck translate";n+=" article aside details dialog figure main header footer hgroup section nav";s+=" audio canvas command datalist mark meter output picture "+"progress time wbr video ruby bdi keygen"}if(e!=="html5-strict"){o+=" xml:lang";c="acronym applet basefont big font strike tt";s=[s,c].join(" ");pc(vc(c),(e=>{i(e,"",s)}));a="center dir isindex noframes";n=[n,a].join(" ");r=[n,s].join(" ");pc(vc(a),(e=>{i(e,"",r)}))}r=r||[n,s].join(" ");i("html","manifest","head body");i("head","","base command link meta noscript script style title");i("title hr noscript br");i("base","href target");i("link","href rel media hreflang type sizes hreflang");i("meta","name http-equiv content charset");i("style","media type scoped");i("script","src async defer type charset");i("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus "+"onhashchange onload onmessage onoffline ononline onpagehide onpageshow "+"onpopstate onresize onscroll onstorage onunload",r);i("address dt dd div caption","",r);i("h1 h2 h3 h4 h5 h6 pre p abbr code var samp kbd sub sup i b u bdo span legend em strong small s cite dfn","",s);i("blockquote","cite",r);i("ol","reversed start type","li");i("ul","","li");i("li","value",r);i("dl","","dt dd");i("a","href target rel media hreflang type",s);i("q","cite",s);i("ins del","cite datetime",r);i("img","src sizes srcset alt usemap ismap width height");i("iframe","src name width height",r);i("embed","src type width height");i("object","data type typemustmatch name usemap form width height",[r,"param"].join(" "));i("param","name value");i("map","name",[r,"area"].join(" "));i("area","alt coords shape href target rel media hreflang type");i("table","border","caption colgroup thead tfoot tbody tr"+(e==="html4"?" col":""));i("colgroup","span","col");i("col","span");i("tbody thead tfoot","","tr");i("tr","","td th");i("td","colspan rowspan headers",r);i("th","colspan rowspan headers scope abbr",r);i("form","accept-charset action autocomplete enctype method name novalidate target",r);i("fieldset","disabled form name",[r,"legend"].join(" "));i("label","form for",s);i("input","accept alt autocomplete checked dirname disabled form formaction formenctype formmethod formnovalidate "+"formtarget height list max maxlength min multiple name pattern readonly required size src step type value width");i("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value",e==="html4"?r:s);i("select","disabled form multiple name required size","option optgroup");i("optgroup","disabled label","option");i("option","disabled label selected value");i("textarea","cols dirname disabled form maxlength name readonly required rows wrap");i("menu","type label",[r,"li"].join(" "));i("noscript","",r);if(e!=="html4"){i("wbr");i("ruby","",[s,"rt rp"].join(" "));i("figcaption","",r);i("mark rt rp summary bdi","",s);i("canvas","width height",r);i("video","src crossorigin poster preload autoplay mediagroup loop "+"muted controls width height buffered",[r,"track source"].join(" "));i("audio","src crossorigin preload autoplay mediagroup loop muted controls "+"buffered volume",[r,"track source"].join(" "));i("picture","","img source");i("source","src srcset type media sizes");i("track","kind src srclang label default");i("datalist","",[s,"option"].join(" "));i("article section nav aside main header footer","",r);i("hgroup","","h1 h2 h3 h4 h5 h6");i("figure","",[r,"figcaption"].join(" "));i("time","datetime",s);i("dialog","open",r);i("command","type label icon disabled checked radiogroup command");i("output","for form name",s);i("progress","value max",s);i("meter","value min max low high optimum",s);i("details","open",[r,"summary"].join(" "));i("keygen","autofocus challenge disabled form keytype name")}if(e!=="html5-strict"){l("script","language xml:space");l("style","xml:space");l("object","declare classid code codebase codetype archive standby align border hspace vspace");l("embed","align name hspace vspace");l("param","valuetype type");l("a","charset name rev shape coords");l("br","clear");l("applet","codebase archive code object alt name width height align hspace vspace");l("img","name longdesc align border hspace vspace");l("iframe","longdesc frameborder marginwidth marginheight scrolling align");l("font basefont","size color face");l("input","usemap align");l("select");l("textarea");l("h1 h2 h3 h4 h5 h6 div p legend caption","align");l("ul","type compact");l("li","type");l("ol dl menu dir","compact");l("pre","width xml:space");l("hr","align noshade size width");l("isindex","prompt");l("table","summary width frame rules cellspacing cellpadding align bgcolor");l("col","width align char charoff valign");l("colgroup","width align char charoff valign");l("thead","align char charoff valign");l("tr","align char charoff valign bgcolor");l("th","axis align char charoff valign nowrap bgcolor width height");l("form","accept");l("td","abbr axis scope align char charoff valign nowrap bgcolor width height");l("tfoot","align char charoff valign");l("tbody","align char charoff valign");l("area","nohref");l("body","background bgcolor text link vlink alink")}if(e!=="html4"){l("input button select textarea","autofocus");l("input textarea","placeholder");l("a","download");l("link script img","crossorigin");l("img","loading");l("iframe","sandbox seamless allowfullscreen loading")}if(e!=="html4"){Z([t.video,t.audio],(e=>{delete e.children.audio;delete e.children.video}))}pc(vc("a form meter progress dfn"),(e=>{if(t[e]){delete t[e].children[e]}}));delete t.caption.children.table;delete t.script;fc[e]=t;return t};const wc=(e,t)=>{let o;if(e){o={};if(typeof e==="string"){e={"*":e}}pc(e,((e,n)=>{o[n]=o[n.toUpperCase()]=t==="map"?gc(e,/[, ]/):yc(e,/[, ]/)}))}return o};const _c=e=>{var t;const o={};const n={};let s=[];const r={},a={};const c=(t,o,n)=>{let s=e[t];if(!s){s=fc[t];if(!s){s=gc(o," ",gc(o.toUpperCase()," "));s=hc(s,n);fc[t]=s}}else{s=gc(s,/[, ]/,gc(s.toUpperCase(),/[, ]/))}return s};e=e||{};const i=(t=e.schema)!==null&&t!==void 0?t:"html5";const l=kc(i);if(e.verify_html===false){e.valid_elements="*[*]"}const d=wc(e.valid_styles);const u=wc(e.invalid_styles,"map");const f=wc(e.valid_classes,"map");const m=c("whitespace_elements","pre script noscript style textarea video audio iframe object code");const g=c("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr");const p=c("void_elements","area base basefont br col frame hr img input isindex link "+"meta param embed source wbr track");const h=c("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize "+"noshade nowrap readonly selected autoplay loop controls allowfullscreen");const y="td th iframe video audio object script code";const b=c("non_empty_elements",y+" pre",p);const v=c("move_caret_before_on_enter_elements",y+" table",p);const k=c("text_block_elements","h1 h2 h3 h4 h5 h6 p div address pre form "+"blockquote center dir fieldset header footer article section hgroup aside main nav figure");const w=c("block_elements","hr table tbody thead tfoot "+"th tr td li ol ul caption dl dt dd noscript menu isindex option "+"datalist select optgroup figcaption details summary",k);const _=c("text_inline_elements","span strong b em i font strike u var cite "+"dfn code mark q sup sub samp");pc("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),(e=>{a[e]=new RegExp("</"+e+"[^>]*>","gi")}));const x=e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$");const z=e=>{let t,n,r,a,c,i,l,d,u,f,m,g,p,h,y,b,v,k;const w=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,_=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,z=/[*?+]/;if(e){const C=vc(e,",");if(o["@"]){b=o["@"].attributes;v=o["@"].attributesOrder}for(t=0,n=C.length;t<n;t++){c=w.exec(C[t]);if(c){h=c[1];u=c[2];y=c[3];d=c[5];g={};p=[];i={attributes:g,attributesOrder:p};if(h==="#"){i.paddEmpty=true}if(h==="-"){i.removeEmpty=true}if(c[4]==="!"){i.removeEmptyAttrs=true}if(b){xe(b,((e,t)=>{g[t]=e}));p.push.apply(p,v)}if(d){d=vc(d,"|");for(r=0,a=d.length;r<a;r++){c=_.exec(d[r]);if(c){l={};m=c[1];f=c[2].replace(/[\\:]:/g,":");h=c[3];k=c[4];if(m==="!"){i.attributesRequired=i.attributesRequired||[];i.attributesRequired.push(f);l.required=true}if(m==="-"){delete g[f];p.splice(bc(p,f),1);continue}if(h){if(h==="="){i.attributesDefault=i.attributesDefault||[];i.attributesDefault.push({name:f,value:k});l.defaultValue=k}if(h==="~"){i.attributesForced=i.attributesForced||[];i.attributesForced.push({name:f,value:k});l.forcedValue=k}if(h==="<"){l.validValues=gc(k,"?")}}if(z.test(f)){i.attributePatterns=i.attributePatterns||[];l.pattern=x(f);i.attributePatterns.push(l)}else{if(!g[f]){p.push(f)}g[f]=l}}}}if(!b&&u==="@"){b=g;v=p}if(y){i.outputName=u;o[y]=i}if(z.test(u)){i.pattern=x(u);s.push(i)}else{o[u]=i}}}}};const C=e=>{s=[];Z(we(o),(e=>{delete o[e]}));z(e);pc(l,((e,t)=>{n[t]=e.children}))};const S=e=>{const t=/^(~)?(.+)$/;if(e){fc.text_block_elements=fc.block_elements=null;pc(vc(e,","),(e=>{const s=t.exec(e),a=s[1]==="~",c=a?"span":"div",i=s[2];n[i]=n[c];r[i]=c;if(!a){w[i.toUpperCase()]={};w[i]={}}if(!o[i]){let e=o[c];e=hc({},e);delete e.removeEmptyAttrs;delete e.removeEmpty;o[i]=e}pc(n,((e,t)=>{if(e[c]){n[t]=e=hc({},n[t]);e[i]=e[c]}}))}))}};const T=e=>{const t=/^([+\-]?)([A-Za-z0-9_\-.\u00b7\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u037d\u037f-\u1fff\u200c-\u200d\u203f-\u2040\u2070-\u218f\u2c00-\u2fef\u3001-\ud7ff\uf900-\ufdcf\ufdf0-\ufffd]+)\[([^\]]+)]$/;fc[i]=null;if(e){pc(vc(e,","),(e=>{const o=t.exec(e);let s,r;if(o){r=o[1];if(r){s=n[o[2]]}else{s=n[o[2]]={"#comment":{}}}s=n[o[2]];pc(vc(o[3],"|"),(e=>{if(r==="-"){delete s[e]}else{s[e]={}}}))}}))}};const O=e=>{let t=o[e],n;if(t){return t}n=s.length;while(n--){t=s[n];if(t.pattern.test(e)){return t}}};if(!e.valid_elements){pc(l,((e,t)=>{o[t]={attributes:e.attributes,attributesOrder:e.attributesOrder};n[t]=e.children}));pc(vc("strong/b em/i"),(e=>{const t=vc(e,"/");o[t[1]].outputName=t[0]}));pc(vc("ol ul sub sup blockquote span font a table tbody strong em b i"),(e=>{if(o[e]){o[e].removeEmpty=true}}));pc(vc("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(e=>{o[e].paddEmpty=true}));pc(vc("span"),(e=>{o[e].removeEmptyAttrs=true}))}else{C(e.valid_elements)}S(e.custom_elements);T(e.valid_children);z(e.extended_valid_elements);T("+ol[ul|ol],+ul[ul|ol]");pc({dd:"dl",dt:"dl",li:"ul ol",td:"tr",th:"tr",tr:"tbody thead tfoot",tbody:"table",thead:"table",tfoot:"table",legend:"fieldset",area:"map",param:"video audio object"},((e,t)=>{if(o[t]){o[t].parentsRequired=vc(e)}}));if(e.invalid_elements){pc(yc(e.invalid_elements),(e=>{if(o[e]){delete o[e]}}))}if(!O("span")){z("span[!data-mce-type|*]")}const E=R(d);const D=R(u);const A=R(f);const M=R(h);const N=R(w);const B=R(k);const L=R(_);const H=R(Object.seal(p));const I=R(g);const P=R(b);const F=R(v);const V=R(m);const j=R(Object.seal(a));const U=(e,t)=>{const o=n[e.toLowerCase()];return!!(o&&o[t.toLowerCase()])};const q=(e,t)=>{let o,n;const s=O(e);if(s){if(t){if(s.attributes[t]){return true}o=s.attributePatterns;if(o){n=o.length;while(n--){if(o[n].pattern.test(t)){return true}}}}else{return true}}return false};const W=R(r);return{type:i,children:n,elements:o,getValidStyles:E,getValidClasses:A,getBlockElements:N,getInvalidStyles:D,getVoidElements:H,getTextBlockElements:B,getTextInlineElements:L,getBoolAttrs:M,getElementRule:O,getSelfClosingElements:I,getNonEmptyElements:P,getMoveCaretBeforeOnEnterElements:F,getWhitespaceElements:V,getSpecialElements:j,isValidChild:U,isValid:q,getCustomElements:W,addValidElements:z,setValidElements:C,addCustomElements:S,addValidChildren:T}};const xc=(e,t)=>{const o=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi;const n=/\s*([^:]+):\s*([^;]+);?/g;const s=/\s+$/;let r;const a={};let c;let i;const l=Vr;e=e||{};if(t){c=t.getValidStyles();i=t.getInvalidStyles()}const d=(`\\" \\' \\; \\: ; : `+l).split(" ");for(r=0;r<d.length;r++){a[d[r]]=l+r;a[l+r]=d[r]}const u={parse:t=>{const c={};let i,d,f,m;const g=e.url_converter;const p=e.url_converter_scope||u;const h=(e,t,o)=>{const n=c[e+"-top"+t];if(!n){return}const s=c[e+"-right"+t];if(!s){return}const a=c[e+"-bottom"+t];if(!a){return}const i=c[e+"-left"+t];if(!i){return}const l=[n,s,a,i];r=l.length-1;while(r--){if(l[r]!==l[r+1]){break}}if(r>-1&&o){return}c[e+t]=r===-1?l[0]:l.join(" ");delete c[e+"-top"+t];delete c[e+"-right"+t];delete c[e+"-bottom"+t];delete c[e+"-left"+t]};const y=e=>{let t=c[e],o;if(!t){return}t=t.split(" ");o=t.length;while(o--){if(t[o]!==t[0]){return false}}c[e]=t[0];return true};const b=(e,t,o,n)=>{if(!y(t)){return}if(!y(o)){return}if(!y(n)){return}c[e]=c[t]+" "+c[o]+" "+c[n];delete c[t];delete c[o];delete c[n]};const v=e=>{m=true;return a[e]};const k=(e,t)=>{if(m){e=e.replace(/\uFEFF[0-9]/g,(e=>a[e]))}if(!t){e=e.replace(/\\([\'\";:])/g,"$1")}return e};const w=e=>String.fromCharCode(parseInt(e.slice(1),16));const _=e=>e.replace(/\\[0-9a-f]+/gi,w);const x=(t,o,n,s,r,a)=>{r=r||a;if(r){r=k(r);return`'`+r.replace(/\'/g,`\\'`)+`'`}o=k(o||n||s);if(!e.allow_script_urls){const t=o.replace(/[\s\r\n]+/g,"");if(/(java|vb)script:/i.test(t)){return""}if(!e.allow_svg_data_urls&&/^data:image\/svg/i.test(t)){return""}}if(g){o=g.call(p,o,"style")}return`url('`+o.replace(/\'/g,`\\'`)+`')`};if(t){t=t.replace(/[\u0000-\u001F]/g,"");t=t.replace(/\\[\"\';:\uFEFF]/g,v).replace(/\"[^\"]+\"|\'[^\']+\'/g,(e=>e.replace(/[;:]/g,v)));while(i=n.exec(t)){n.lastIndex=i.index+i[0].length;d=i[1].replace(s,"").toLowerCase();f=i[2].replace(s,"");if(d&&f){d=_(d);f=_(f);if(d.indexOf(l)!==-1||d.indexOf('"')!==-1){continue}if(!e.allow_script_urls&&(d==="behavior"||/expression\s*\(|\/\*|\*\//.test(f))){continue}if(d==="font-weight"&&f==="700"){f="bold"}else if(d==="color"||d==="background-color"){f=f.toLowerCase()}f=f.replace(o,x);c[d]=m?k(f,true):f}}h("border","",true);h("border","-width");h("border","-color");h("border","-style");h("padding","");h("margin","");b("border","border-width","border-style","border-color");if(c.border==="medium none"){delete c.border}if(c["border-image"]==="none"){delete c["border-image"]}}return c},serialize:(e,t)=>{let o="";const n=t=>{let n;const s=c[t];if(s){for(let r=0,a=s.length;r<a;r++){t=s[r];n=e[t];if(n){o+=(o.length>0?" ":"")+t+": "+n+";"}}}};const s=(e,t)=>{let o=i["*"];if(o&&o[e]){return false}o=i[t];return!(o&&o[e])};if(t&&c){n("*");n(t)}else{xe(e,((e,n)=>{if(e&&(!i||s(n,t))){o+=(o.length>0?" ":"")+n+": "+e+";"}}))}return o}};return u};const zc={keyLocation:true,layerX:true,layerY:true,returnValue:true,webkitMovementX:true,webkitMovementY:true,keyIdentifier:true,mozPressure:true};const Cc=e=>e instanceof Event||O(e.initEvent);const Sc=e=>e.isDefaultPrevented===U||e.isDefaultPrevented===j;const Tc=e=>S(e.preventDefault)||Cc(e);const Oc=(e,t)=>{const o=t!==null&&t!==void 0?t:{};for(const t in e){if(!Ne(zc,t)){o[t]=e[t]}}if(T(o.composedPath)){o.composedPath=()=>e.composedPath()}return o};const Ec=(e,t,o,n)=>{var s;const r=Oc(t,n);r.type=e;if(S(r.target)){r.target=(s=r.srcElement)!==null&&s!==void 0?s:o}if(Tc(t)){r.preventDefault=()=>{r.defaultPrevented=true;r.isDefaultPrevented=U;if(O(t.preventDefault)){t.preventDefault()}};r.stopPropagation=()=>{r.cancelBubble=true;r.isPropagationStopped=U;if(O(t.stopPropagation)){t.stopPropagation()}};r.stopImmediatePropagation=()=>{r.isImmediatePropagationStopped=U;r.stopPropagation()};if(!Sc(r)){r.isDefaultPrevented=r.defaultPrevented===true?U:j;r.isPropagationStopped=r.cancelBubble===true?U:j;r.isImmediatePropagationStopped=j}}return r};const Dc="mce-data-";const Ac=/^(?:mouse|contextmenu)|click/;const Mc=(e,t,o,n)=>{if(e.addEventListener){e.addEventListener(t,o,n||false)}else if(e.attachEvent){e.attachEvent("on"+t,o)}};const Nc=(e,t,o,n)=>{if(e.removeEventListener){e.removeEventListener(t,o,n||false)}else if(e.detachEvent){e.detachEvent("on"+t,o)}};const Rc=e=>T(e)&&Ac.test(e.type);const Bc=(e,t)=>{const o=Ec(e.type,e,document,t);if(Rc(e)&&C(e.pageX)&&!C(e.clientX)){const t=o.target.ownerDocument||document;const n=t.documentElement;const s=t.body;const r=o;r.pageX=e.clientX+(n&&n.scrollLeft||s&&s.scrollLeft||0)-(n&&n.clientLeft||s&&s.clientLeft||0);r.pageY=e.clientY+(n&&n.scrollTop||s&&s.scrollTop||0)-(n&&n.clientTop||s&&s.clientTop||0)}return o};const Lc=(e,t,o)=>{const n=e.document,s={type:"ready"};if(o.domLoaded){t(s);return}const r=()=>n.readyState==="complete"||n.readyState==="interactive"&&n.body;const a=()=>{Nc(e,"DOMContentLoaded",a);Nc(e,"load",a);if(!o.domLoaded){o.domLoaded=true;t(s)}e=null};if(r()){a()}else{Mc(e,"DOMContentLoaded",a)}if(!o.domLoaded){Mc(e,"load",a)}};class Hc{constructor(){this.domLoaded=false;this.events={};this.count=1;this.expando=Dc+(+new Date).toString(32);this.hasMouseEnterLeave="onmouseenter"in document.documentElement;this.hasFocusIn="onfocusin"in document.documentElement;this.count=1}bind(e,t,o,n){const s=this;let r,a,c,i,l,d,u;const f=window;const m=e=>{s.executeHandlers(Bc(e||f.event),r)};if(!e||e.nodeType===3||e.nodeType===8){return}if(!e[s.expando]){r=s.count++;e[s.expando]=r;s.events[r]={}}else{r=e[s.expando]}n=n||e;const g=t.split(" ");c=g.length;while(c--){i=g[c];d=m;l=u=false;if(i==="DOMContentLoaded"){i="ready"}if(s.domLoaded&&i==="ready"&&e.readyState==="complete"){o.call(n,Bc({type:i}));continue}if(!s.hasMouseEnterLeave){l=s.mouseEnterLeave[i];if(l){d=e=>{const t=e.currentTarget;let o=e.relatedTarget;if(o&&t.contains){o=t.contains(o)}else{while(o&&o!==t){o=o.parentNode}}if(!o){e=Bc(e||f.event);e.type=e.type==="mouseout"?"mouseleave":"mouseenter";e.target=t;s.executeHandlers(e,r)}}}}if(!s.hasFocusIn&&(i==="focusin"||i==="focusout")){u=true;l=i==="focusin"?"focus":"blur";d=e=>{e=Bc(e||f.event);e.type=e.type==="focus"?"focusin":"focusout";s.executeHandlers(e,r)}}a=s.events[r][i];if(!a){s.events[r][i]=a=[{func:o,scope:n}];a.fakeName=l;a.capture=u;a.nativeHandler=d;if(i==="ready"){Lc(e,d,s)}else{Mc(e,l||i,d,u)}}else{if(i==="ready"&&s.domLoaded){o(Bc({type:i}))}else{a.push({func:o,scope:n})}}}e=a=null;return o}unbind(e,t,o){let n,s,r,a,c;if(!e||e.nodeType===3||e.nodeType===8){return this}const i=e[this.expando];if(i){c=this.events[i];if(t){const i=t.split(" ");s=i.length;while(s--){a=i[s];n=c[a];if(n){if(o){r=n.length;while(r--){if(n[r].func===o){const e=n.nativeHandler;const t=n.fakeName,o=n.capture;n=n.slice(0,r).concat(n.slice(r+1));n.nativeHandler=e;n.fakeName=t;n.capture=o;c[a]=n}}}if(!o||n.length===0){delete c[a];Nc(e,n.fakeName||a,n.nativeHandler,n.capture)}}}}else{xe(c,((t,o)=>{Nc(e,t.fakeName||o,t.nativeHandler,t.capture)}));c={}}for(a in c){if(Ne(c,a)){return this}}delete this.events[i];try{delete e[this.expando]}catch(t){e[this.expando]=null}}return this}fire(e,t,o){return this.dispatch(e,t,o)}dispatch(e,t,o){let n;if(!e||e.nodeType===3||e.nodeType===8){return this}const s=Bc({type:t,target:e},o);do{n=e[this.expando];if(n){this.executeHandlers(s,n)}e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!s.isPropagationStopped());return this}clean(e){let t,o;if(!e||e.nodeType===3||e.nodeType===8){return this}if(e[this.expando]){this.unbind(e)}if(!e.getElementsByTagName){e=e.document}if(e&&e.getElementsByTagName){this.unbind(e);o=e.getElementsByTagName("*");t=o.length;while(t--){e=o[t];if(e[this.expando]){this.unbind(e)}}}return this}destroy(){this.events={}}cancel(e){if(e){e.preventDefault();e.stopImmediatePropagation()}return false}executeHandlers(e,t){const o=this.events[t];const n=o&&o[e.type];if(n){for(let t=0,o=n.length;t<o;t++){const o=n[t];if(o&&o.func.call(o.scope,e)===false){e.preventDefault()}if(e.isImmediatePropagationStopped()){return}}}}}Hc.Event=new Hc;const Ic=fo.each;const Pc=fo.grep;const Fc="data-mce-style";const Vc=(e,t,o)=>{if(S(o)||o===""){Io(e,t)}else{No(e,t,o)}};const jc=(e,t,o)=>{const n=t.keep_values;const s={set:(e,n,s)=>{const r=an.fromDom(e);if(O(t.url_converter)&&T(n)){n=t.url_converter.call(t.url_converter_scope||o(),n,s,e[0])}const a="data-mce-"+s;Vc(r,a,n);Vc(r,s,n)},get:(e,t)=>{const o=an.fromDom(e);return Bo(o,"data-mce-"+t)||Bo(o,t)}};const r={style:{set:(t,o)=>{const s=an.fromDom(t);if(k(o)){$n(s,o);return}if(n){Vc(s,Fc,o)}Io(s,"style");if(v(o)){$n(s,e.parse(o))}},get:t=>{const o=an.fromDom(t);const n=Bo(o,Fc)||Bo(o,"style");return e.serialize(e.parse(n),xo(o))}}};if(n){r.href=r.src=s}return r};const Uc=(e,t)=>{const o=Bo(t,"style");const n=e.serialize(e.parse(o),xo(t));Vc(t,Fc,n)};const qc=(e,t)=>{let o=0,n,s;if(e){for(n=e.nodeType,e=e.previousSibling;e;e=e.previousSibling){s=e.nodeType;if(t&&s===3){if(s===n||!e.nodeValue.length){continue}}o++;n=s}}return o};const Wc=fo.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," ");const $c=e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()));const Gc=(e,t={})=>{const o={};const n=window;const s={};let r=0;const a=true;const c=true;const i=br.forElement(an.fromDom(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy});const l=[];const d=t.schema?t.schema:_c({});const u=xc({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema);const f=t.ownEvents?new Hc:Hc.Event;const m=d.getBlockElements();const g=e=>{if(v(e)){return Ne(m,e)}else{return Rs(e)&&Ne(m,e.nodeName)}};const p=t=>t&&e&&v(t)?e.getElementById(t):t;const h=e=>{const t=p(e);return T(t)?an.fromDom(t):null};const y=(e,t,o)=>{let n;const s=h(e);if(T(s)&&To(s)){const e=Ve[t];if(e&&e.get){n=e.get(s.dom,t)}else{n=Bo(s,t)}}return T(n)?n:o!==null&&o!==void 0?o:""};const b=e=>{const t=p(e);return S(t)?[]:t.attributes};const k=(e,o,n)=>{q(e,(e=>{if(Rs(e)){const s=an.fromDom(e);if(n===""){n=null}const r=Bo(s,o);const a=Ve[o];if(a&&a.set){a.set(s.dom,n,o)}else{Vc(s,o,n)}if(r!==n&&t.onSetAttrib){t.onSetAttrib({attrElm:s,attrName:o,attrValue:n})}}}))};const w=(e,t)=>e.cloneNode(t);const x=()=>t.root_element||e.body;const z=e=>{const t=As(e);return{x:t.x,y:t.y,w:t.width,h:t.height}};const C=(t,o)=>ar(e.body,p(t),o);const D=(e,o,n)=>{const s=(e,t)=>{if(v(e)){return e}else if(E(e)){return Ne(Wc,t)?e+"":e+"px"}else{return ze(e,s)}};const r=(e,t,o)=>{const n=$c(t);if(S(o)||o===""){Jn(e,n)}else{Wn(e,n,s(o,n))}};q(e,(e=>{const s=an.fromDom(e);if(v(o)){r(s,o,n)}else{xe(o,((e,t)=>{r(s,t,e)}))}if(t.update_styles){Uc(u,s)}}))};const M=(e,t)=>{D(e,t)};const N=(e,t,o)=>{const n=p(e);if(S(n)||!Rs(n)){return undefined}if(o){return Gn(an.fromDom(n),$c(t))}else{t=t.replace(/-(\D)/g,((e,t)=>t.toUpperCase()));if(t==="float"){t="cssFloat"}return n.style?n.style[t]:undefined}};const B=e=>{let t,o;const n=p(e);t=N(n,"width");o=N(n,"height");if(t.indexOf("px")===-1){t=0}if(o.indexOf("px")===-1){o=0}return{w:parseInt(t,10)||n.offsetWidth||n.clientWidth,h:parseInt(o,10)||n.offsetHeight||n.clientHeight}};const L=e=>{const t=p(e);const o=C(t);const n=B(t);return{x:o.x,y:o.y,w:n.w,h:n.h}};const H=(e,t)=>{if(!e){return false}const o=_(e)?e:[e];return J(o,(e=>ln(an.fromDom(e),t)))};const I=(e,t,o,n)=>{const s=[];let r;let a=p(e);n=n===undefined;o=o||(x().nodeName!=="BODY"?x().parentNode:null);if(v(t)){r=t;if(t==="*"){t=Rs}else{t=e=>H(e,r)}}while(a){if(a===o||S(a.nodeType)||Ks(a)||Xs(a)){break}if(!t||t(a)){if(n){s.push(a)}else{return[a]}}a=a.parentNode}return n?s:null};const P=(e,t,o)=>{const n=I(e,t,o,false);return n&&n.length>0?n[0]:null};const F=(e,t,o)=>{let n=t;if(e){if(v(t)){n=e=>H(e,t)}for(e=e[o];e;e=e[o]){if(O(n)&&n(e)){return e}}}return null};const V=(e,t)=>F(e,t,"nextSibling");const j=(e,t)=>F(e,t,"previousSibling");const U=(o,n)=>{var s,r;const a=(r=(s=p(n))!==null&&s!==void 0?s:t.root_element)!==null&&r!==void 0?r:e;return be(a.querySelectorAll(o))};const q=function(e,t,o){const n=o!==null&&o!==void 0?o:this;const s=v(e)?p(e):e;if(!s){return false}if(_(s)&&(s.length||s.length===0)){const e=[];Ic(s,((o,s)=>{if(o){e.push(t.call(n,v(o)?p(o):o,s))}}));return e}else{return t.call(n,s)}};const W=(e,t)=>{q(e,(e=>{xe(t,((t,o)=>{k(e,o,t)}))}))};const $=(e,t)=>{q(e,(e=>{const o=an.fromDom(e);fs(o,t)}))};const G=(t,o,n,s,r)=>q(t,(t=>{const a=v(o)?e.createElement(o):o;if(T(n)){W(a,n)}if(s){if(!v(s)&&s.nodeType){a.appendChild(s)}else if(v(s)){$(a,s)}}return!r?t.appendChild(a):a}));const K=(t,o,n)=>G(e.createElement(t),t,o,n,true);const X=uc.decode;const Y=uc.encodeAllRaw;const Q=(e,t,o="")=>{let n="",s;n+="<"+e;for(s in t){if(Re(t,s)){n+=" "+s+'="'+Y(t[s])+'"'}}if(pt(o)&&Ne(d.getVoidElements(),e)){return n+" />"}else{return n+">"+o+"</"+e+">"}};const ee=t=>{let o;const n=e.createElement("div");const s=e.createDocumentFragment();s.appendChild(n);if(t){n.innerHTML=t}while(o=n.firstChild){s.appendChild(o)}s.removeChild(n);return s};const te=(e,t)=>q(e,(e=>{const o=an.fromDom(e);if(t){Z(Tn(o),(e=>{if(Oo(e)&&e.dom.length===0){cs(e)}else{Zn(o,e)}}))}cs(o);return o.dom}));const oe=e=>q(e,(e=>{const t=e.attributes;for(let o=t.length-1;o>=0;o--){e.removeAttributeNode(t.item(o))}}));const ne=e=>u.parse(e);const se=(e,t)=>u.serialize(e,t);const re=t=>{let n,s;if(Fe!==Gc.DOM&&e===document){if(o[t]){return}o[t]=true}s=e.getElementById("mceDefaultStyles");if(!s){s=e.createElement("style");s.id="mceDefaultStyles";s.type="text/css";n=e.getElementsByTagName("head")[0];if(n.firstChild){n.insertBefore(s,n.firstChild)}else{n.appendChild(s)}}if(s.styleSheet){s.styleSheet.cssText+=t}else{s.appendChild(e.createTextNode(t))}};const ae=e=>{if(!e){e=""}Z(e.split(","),(e=>{s[e]=true;i.load(e).catch(A)}))};const ce=(e,t,o)=>{q(e,(e=>{if(Rs(e)){const n=an.fromDom(e);const s=t.split(" ");Z(s,(e=>{if(T(o)){const t=o?Xo:Jo;t(n,e)}else{Qo(n,e)}}))}}))};const ie=(e,t)=>{ce(e,t,true)};const le=(e,t)=>{ce(e,t,false)};const ue=(e,t)=>{const o=h(e);const n=t.split(" ");return de(n,(e=>Zo(o,e)))};const fe=e=>{q(e,(e=>Jn(an.fromDom(e),"display")))};const me=e=>{q(e,(e=>Wn(an.fromDom(e),"display","none")))};const ge=e=>{const t=h(e);return mo(Xn(t,"display"),"none")};const pe=e=>(!e?"mce_":e)+r++;const he=e=>{const t=h(e);return Rs(t.dom)?t.dom.outerHTML:ms(t)};const ye=(e,t)=>{q(e,(e=>{if(Rs(e)){e.outerHTML=t}}))};const ve=(e,t)=>{const o=p(t);return q(e,(e=>{const t=o.parentNode;const n=o.nextSibling;if(n){t.insertBefore(e,n)}else{t.appendChild(e)}return e}))};const ke=(e,t,o)=>q(t,(t=>{if(_(t)){e=e.cloneNode(true)}if(o){Ic(Pc(t.childNodes),(t=>{e.appendChild(t)}))}return t.parentNode.replaceChild(e,t)}));const we=(e,t)=>{let o;if(e.nodeName!==t.toUpperCase()){o=K(t);Ic(b(e),(t=>{k(o,t.nodeName,y(e,t.nodeName))}));ke(o,e,true)}return o||e};const _e=(e,t)=>{let o=e,n;while(o){n=t;while(n&&o!==n){n=n.parentNode}if(o===n){break}o=o.parentNode}if(!o&&e.ownerDocument){return e.ownerDocument.documentElement}return o};const Ce=e=>{if(Rs(e)){const t=e.nodeName.toLowerCase()==="a"&&!y(e,"href")&&y(e,"id");if(y(e,"name")||y(e,"data-mce-bookmark")||t){return true}}return false};const Se=(e,t)=>{let o,n,s=0;if(Ce(e)){return false}e=e.firstChild;if(e){const r=new vr(e,e.parentNode);const a=d?d.getWhitespaceElements():{};t=t||(d?d.getNonEmptyElements():null);do{o=e.nodeType;if(Rs(e)){const o=e.getAttribute("data-mce-bogus");if(o){e=r.next(o==="all");continue}n=e.nodeName.toLowerCase();if(t&&t[n]){if(n==="br"){s++;e=r.next();continue}return false}if(Ce(e)){return false}}if(o===8){return false}if(o===3&&!Sa(e.nodeValue)){return false}if(o===3&&e.parentNode&&a[e.parentNode.nodeName]&&Sa(e.nodeValue)){return false}e=r.next()}while(e)}return s<=1};const Te=()=>e.createRange();const Oe=(e,t,o)=>{let n=Te();let s;let r;let a;if(e&&t){n.setStart(e.parentNode,qc(e));n.setEnd(t.parentNode,qc(t));s=n.extractContents();n=Te();n.setStart(t.parentNode,qc(t)+1);n.setEnd(e.parentNode,qc(e)+1);r=n.extractContents();a=e.parentNode;a.insertBefore(Ga(Fe,s),e);if(o){a.insertBefore(o,e)}else{a.insertBefore(t,e)}a.insertBefore(Ga(Fe,r),e);te(e);return o||t}};const Ee=(o,s,r,a)=>{if(_(o)){let e=o.length;const t=[];while(e--){t[e]=Ee(o[e],s,r,a)}return t}else{if(t.collect&&(o===e||o===n)){l.push([o,s,r,a])}return f.bind(o,s,r,a||Fe)}};const De=(t,o,s)=>{if(_(t)){let e=t.length;const n=[];while(e--){n[e]=De(t[e],o,s)}return n}else{if(l.length>0&&(t===e||t===n)){let e=l.length;while(e--){const n=l[e];if(t===n[0]&&(!o||o===n[1])&&(!s||s===n[2])){f.unbind(n[0],n[1],n[2])}}}return f.unbind(t,o,s)}};const Ae=(e,t,o)=>f.dispatch(e,t,o);const Me=(e,t,o)=>f.dispatch(e,t,o);const Be=e=>{if(e&&Rs(e)){const t=e.getAttribute("data-mce-contenteditable");if(t&&t!=="inherit"){return t}return e.contentEditable!=="inherit"?e.contentEditable:null}else{return null}};const Le=e=>{const t=x();let o=null;for(;e&&e!==t;e=e.parentNode){o=Be(e);if(o!==null){break}}return o};const He=()=>{if(l.length>0){let e=l.length;while(e--){const t=l[e];f.unbind(t[0],t[1],t[2])}}xe(s,((e,t)=>{i.unload(t);delete s[t]}))};const Ie=(e,t)=>e===t||t.contains(e);const Pe=e=>"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset;const Fe={doc:e,settings:t,win:n,files:s,stdMode:a,boxModel:c,styleSheetLoader:i,boundEvents:l,styles:u,schema:d,events:f,isBlock:g,root:null,clone:w,getRoot:x,getViewPort:z,getRect:L,getSize:B,getParent:P,getParents:I,get:p,getNext:V,getPrev:j,select:U,is:H,add:G,create:K,createHTML:Q,createFragment:ee,remove:te,setStyle:D,getStyle:N,setStyles:M,removeAllAttribs:oe,setAttrib:k,setAttribs:W,getAttrib:y,getPos:C,parseStyle:ne,serializeStyle:se,addStyle:re,loadCSS:ae,addClass:ie,removeClass:le,hasClass:ue,toggleClass:ce,show:fe,hide:me,isHidden:ge,uniqueId:pe,setHTML:$,getOuterHTML:he,setOuterHTML:ye,decode:X,encode:Y,insertAfter:ve,replace:ke,rename:we,findCommonAncestor:_e,run:q,getAttribs:b,isEmpty:Se,createRng:Te,nodeIndex:qc,split:Oe,bind:Ee,unbind:De,fire:Me,dispatch:Ae,getContentEditable:Be,getContentEditableParent:Le,destroy:He,isChildOf:Ie,dumpRng:Pe};const Ve=jc(u,t,R(Fe));return Fe};Gc.DOM=Gc(document);Gc.nodeIndex=qc;const Kc=Gc.DOM;const Xc=0;const Yc=1;const Jc=2;const Qc=3;class Zc{constructor(e={}){this.states={};this.queue=[];this.scriptLoadedCallbacks={};this.queueLoadedCallbacks=[];this.loading=false;this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}loadScript(e){return new Promise(((t,o)=>{const n=Kc;let s;const r=()=>{n.remove(i);if(s){s.onerror=s.onload=s=null}};const a=()=>{r();t()};const c=()=>{r();o("Failed to load script: "+e)};const i=n.uniqueId();s=document.createElement("script");s.id=i;s.type="text/javascript";s.src=fo._addCacheSuffix(e);if(this.settings.referrerPolicy){n.setAttrib(s,"referrerpolicy",this.settings.referrerPolicy)}s.onload=a;s.onerror=c;(document.getElementsByTagName("head")[0]||document.body).appendChild(s)}))}isDone(e){return this.states[e]===Jc}markDone(e){this.states[e]=Jc}add(e){const t=this;t.queue.push(e);const o=t.states[e];if(o===undefined){t.states[e]=Xc}return new Promise(((o,n)=>{if(!t.scriptLoadedCallbacks[e]){t.scriptLoadedCallbacks[e]=[]}t.scriptLoadedCallbacks[e].push({resolve:o,reject:n})}))}load(e){return this.add(e)}remove(e){delete this.states[e];delete this.scriptLoadedCallbacks[e]}loadQueue(){const e=this.queue;this.queue=[];return this.loadScripts(e)}loadScripts(e){const t=this;const o=(e,o)=>{Me(t.scriptLoadedCallbacks,o).each((t=>{Z(t,(t=>t[e](o)))}));delete t.scriptLoadedCallbacks[o]};const n=e=>{const t=oe(e,(e=>e.status==="rejected"));if(t.length>0){return Promise.reject(le(t,(({reason:e})=>_(e)?e:[e])))}else{return Promise.resolve()}};const s=e=>Promise.allSettled(Q(e,(e=>{if(t.states[e]===Jc){o("resolve",e);return Promise.resolve()}else if(t.states[e]===Qc){o("reject",e);return Promise.reject(e)}else{t.states[e]=Yc;return t.loadScript(e).then((()=>{t.states[e]=Jc;o("resolve",e);const r=t.queue;if(r.length>0){t.queue=[];return s(r).then(n)}}),(()=>{t.states[e]=Qc;o("reject",e);return Promise.reject(e)}))}})));const r=e=>{t.loading=true;return s(e).then((e=>{t.loading=false;const o=t.queueLoadedCallbacks.shift();q.from(o).each(V);return n(e)}))};const a=Le(e);if(t.loading){return new Promise(((e,o)=>{t.queueLoadedCallbacks.push((()=>r(a).then(e,o)))}))}else{return r(a)}}}Zc.ScriptLoader=new Zc;const ei=e=>{let t=e;const o=()=>t;const n=e=>{t=e};return{get:o,set:n}};const ti=e=>k(e)&&Ne(e,"raw");const oi=e=>_(e)&&e.length>1;const ni={};const si=ei("en");const ri=()=>Me(ni,si.get());const ai=()=>ze(ni,(e=>({...e})));const ci=e=>{if(e){si.set(e)}};const ii=()=>si.get();const li=(e,t)=>{let o=ni[e];if(!o){ni[e]=o={}}xe(t,((e,t)=>{o[t.toLowerCase()]=e}))};const di=e=>{const t=ri().getOr({});const o=e=>{if(O(e)){return Object.prototype.toString.call(e)}return!n(e)?""+e:""};const n=e=>e===""||e===null||e===undefined;const s=e=>{const n=o(e);return Me(t,n.toLowerCase()).map(o).getOr(n)};const r=e=>e.replace(/{context:\w+}$/,"");if(n(e)){return""}if(ti(e)){return o(e.raw)}if(oi(e)){const t=e.slice(1);const n=s(e[0]).replace(/\{([0-9]+)\}/g,((e,n)=>Ne(t,n)?o(t[n]):e));return r(n)}return r(s(e))};const ui=()=>ri().bind((e=>Me(e,"_dir"))).exists((e=>e==="rtl"));const fi=e=>Ne(ni,e);const mi={getData:ai,setCode:ci,getCode:ii,add:li,translate:di,isRtl:ui,hasCode:fi};const gi=()=>{const e=[];const t={};const o={};const n=[];const s=(e,t)=>{const o=oe(n,(o=>o.name===e&&o.state===t));Z(o,(e=>e.resolve()))};const r=e=>Ne(t,e);const a=e=>Ne(o,e);const c=e=>{if(o[e]){return o[e].instance}return undefined};const i=(e,o)=>{const n=mi.getCode();const s=","+(o||"")+",";if(!n||o&&s.indexOf(","+n+",")===-1){return}Zc.ScriptLoader.add(t[e]+"/langs/"+n+".js")};const l=(e,t)=>{if(gi.languageLoad!==false){if(r(e)){i(e,t)}else{g(e,"loaded").then((()=>i(e,t)))}}};const d=(t,n)=>{e.push(n);o[t]={instance:n};s(t,"added");return n};const u=e=>{delete t[e];delete o[e]};const f=(e,t)=>{if(v(t)){return v(e)?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}}else{return t}};const m=(e,n)=>{if(t[e]){return Promise.resolve()}let r=v(n)?n:n.prefix+n.resource+n.suffix;if(r.indexOf("/")!==0&&r.indexOf("://")===-1){r=gi.baseURL+"/"+r}t[e]=r.substring(0,r.lastIndexOf("/"));const a=()=>{s(e,"loaded");return Promise.resolve()};if(o[e]){return a()}else{return Zc.ScriptLoader.add(r).then(a)}};const g=(e,t="added")=>{if(t==="added"&&a(e)){return Promise.resolve()}else if(t==="loaded"&&r(e)){return Promise.resolve()}else{return new Promise((o=>{n.push({name:e,state:t,resolve:o})}))}};return{items:e,urls:t,lookup:o,get:c,requireLangPack:l,add:d,remove:u,createUrl:f,load:m,waitFor:g}};gi.languageLoad=true;gi.baseURL="";gi.PluginManager=gi();gi.ThemeManager=gi();gi.ModelManager=gi();const pi=e=>{const t=ei(q.none());const o=()=>t.get().each(e);const n=()=>{o();t.set(q.none())};const s=()=>t.get().isSome();const r=()=>t.get();const a=e=>{o();t.set(q.some(e))};return{clear:n,isSet:s,get:r,set:a}};const hi=()=>{const e=pi(A);const t=t=>e.get().each(t);return{...e,on:t}};const yi=(e,t)=>{let o=null;const n=()=>{if(!x(o)){clearTimeout(o);o=null}};const s=(...n)=>{if(x(o)){o=setTimeout((()=>{o=null;e.apply(null,n)}),t)}};return{cancel:n,throttle:s}};const bi=(e,t)=>{let o=null;const n=()=>{if(!x(o)){clearTimeout(o);o=null}};const s=(...s)=>{n();o=setTimeout((()=>{o=null;e.apply(null,s)}),t)};return{cancel:n,throttle:s}};const vi=(e,t)=>{let o=[];Z(Tn(e),(e=>{if(t(e)){o=o.concat([e])}o=o.concat(vi(e,t))}));return o};const ki=(e,t)=>un(t,e);const wi=R("mce-annotation");const _i=R("data-mce-annotation");const xi=R("data-mce-annotation-uid");const zi=R("data-mce-annotation-active");const Ci=(e,t)=>{const o=e.selection.getRng();const n=an.fromDom(o.startContainer);const s=an.fromDom(e.getBody());const r=t.fold((()=>"."+wi()),(e=>`[${_i()}="${e}"]`));const a=On(n,o.startOffset).getOr(n);const c=pr(a,r,(e=>mn(e,s)));const i=(e,t)=>{if(Ho(e,t)){return q.some(Bo(e,t))}else{return q.none()}};return c.bind((t=>i(t,`${xi()}`).bind((o=>i(t,`${_i()}`).map((t=>{const n=Ti(e,o);return{uid:o,name:t,elements:n}}))))))};const Si=e=>To(e)&&Zo(e,wi());const Ti=(e,t)=>{const o=an.fromDom(e.getBody());return ki(o,`[${xi()}="${t}"]`)};const Oi=(e,t)=>{const o=an.fromDom(e.getBody());const n=ki(o,`[${_i()}="${t}"]`);const s={};Z(n,(e=>{const t=Bo(e,xi());const o=Me(s,t).getOr([]);s[t]=o.concat([e])}));return s};const Ei=(e,t)=>{const o=ei({});const n=()=>({listeners:[],previous:hi()});const s=(e,t)=>{r(e,(e=>{t(e);return e}))};const r=(e,t)=>{const s=o.get();const r=Me(s,e).getOrThunk(n);const a=t(r);s[e]=a;o.set(s)};const a=(e,t,o)=>{s(e,(n=>{Z(n.listeners,(n=>n(true,e,{uid:t,nodes:Q(o,(e=>e.dom))})))}))};const c=e=>{s(e,(t=>{Z(t.listeners,(t=>t(false,e)))}))};const i=(t,o)=>{Z(Ti(e,t),(e=>{if(o){No(e,zi(),"true")}else{Io(e,zi())}}))};const l=bi((()=>{const o=ge(t.getNames());Z(o,(t=>{r(t,(o=>{const n=o.previous.get();Ci(e,q.some(t)).fold((()=>{n.each((e=>{c(t);o.previous.clear();i(e,false)}))}),(({uid:e,name:t,elements:s})=>{if(!mo(n,e)){n.each((e=>i(e,false)));a(t,e,s);o.previous.set(e);i(e,true)}}));return{previous:o.previous,listeners:o.listeners}}))}))}),30);e.on("remove",(()=>{l.cancel()}));e.on("NodeChange",(()=>{l.throttle()}));const d=(e,t)=>{r(e,(e=>({previous:e.previous,listeners:e.listeners.concat([t])})))};return{addListener:d}};const Di=(e,t)=>{const o=e=>q.from(e.attr(_i())).bind(t.lookup);e.serializer.addTempAttr(zi());e.serializer.addNodeFilter("span",(e=>{Z(e,(e=>{o(e).each((t=>{if(t.persistent===false){e.unwrap()}}))}))}))};const Ai=()=>{const e={};const t=(t,o)=>{e[t]={name:t,settings:o}};const o=t=>Me(e,t).map((e=>e.settings));const n=()=>we(e);return{register:t,lookup:o,getNames:n}};let Mi=0;const Ni=e=>{const t=new Date;const o=t.getTime();const n=Math.floor(Math.random()*1e9);Mi++;return e+"_"+n+Mi+String(o)};const Ri=(e,t)=>{Z(t,(t=>{Xo(e,t)}))};const Bi=(e,t)=>an.fromDom(e.dom.cloneNode(t));const Li=e=>Bi(e,false);const Hi=e=>Bi(e,true);const Ii=(e,t)=>{const o=an.fromTag(t);const n=Fo(e);Ro(o,n);return o};const Pi=(e,t)=>{const o=Ii(e,t);es(e,o);const n=Tn(e);rs(o,n);cs(e);return o};const Fi=(e,t,o=j)=>{const n=new vr(e,t);const s=e=>{let t;do{t=n[e]()}while(t&&!qs(t)&&!o(t));return q.from(t).filter(qs)};return{current:()=>q.from(n.current()).filter(qs),next:()=>s("next"),prev:()=>s("prev"),prev2:()=>s("prev2")}};const Vi=(e,t)=>{const o=t?t:t=>e.isBlock(t)||Ys(t)||Zs(t);const n=(e,t,o,s)=>{if(qs(e)){const o=s(e,t,e.data);if(o!==-1){return q.some({container:e,offset:o})}}return o().bind((e=>n(e.container,e.offset,o,s)))};const s=(e,t,s,r)=>{const a=Fi(e,r,o);return n(e,t,(()=>a.prev().map((e=>({container:e,offset:e.length})))),s).getOrNull()};const r=(e,t,s,r)=>{const a=Fi(e,r,o);return n(e,t,(()=>a.next().map((e=>({container:e,offset:0})))),s).getOrNull()};return{backwards:s,forwards:r}};const ji=Math.round;const Ui=e=>{if(!e){return{left:0,top:0,bottom:0,right:0,width:0,height:0}}return{left:ji(e.left),top:ji(e.top),bottom:ji(e.bottom),right:ji(e.right),width:ji(e.width),height:ji(e.height)}};const qi=(e,t)=>{e=Ui(e);if(t){e.right=e.left}else{e.left=e.left+e.width;e.right=e.left}e.width=0;return e};const Wi=(e,t)=>e.left===t.left&&e.top===t.top&&e.bottom===t.bottom&&e.right===t.right;const $i=(e,t,o)=>e>=0&&e<=Math.min(t.height,o.height)/2;const Gi=(e,t)=>{const o=Math.min(t.height/2,e.height/2);if(e.bottom-o<t.top){return true}if(e.top>t.bottom){return false}return $i(t.top-e.bottom,e,t)};const Ki=(e,t)=>{if(e.top>t.bottom){return true}if(e.bottom<t.top){return false}return $i(t.bottom-e.top,e,t)};const Xi=(e,t,o)=>t>=e.left&&t<=e.right&&o>=e.top&&o<=e.bottom;const Yi=e=>se(e,((e,t)=>e.fold((()=>q.some(t)),(e=>{const o=Math.min(t.left,e.left);const n=Math.min(t.top,e.top);const s=Math.max(t.right,e.right);const r=Math.max(t.bottom,e.bottom);return q.some({top:n,right:s,bottom:r,left:o,width:s-o,height:r-n})}))),q.none());const Ji=(e,t,o)=>{const n=Math.max(Math.min(t,e.left+e.width),e.left);const s=Math.max(Math.min(o,e.top+e.height),e.top);return Math.sqrt((t-n)*(t-n)+(o-s)*(o-s))};const Qi=(e,t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top));const Zi=(e,t,o)=>Math.min(Math.max(e,t),o);const el=e=>{const t=e.startContainer,o=e.startOffset;if(t.hasChildNodes()&&e.endOffset===o+1){return t.childNodes[o]}return null};const tl=(e,t)=>{if(Rs(e)&&e.hasChildNodes()){const o=e.childNodes;const n=Zi(t,0,o.length-1);return o[n]}else{return e}};const ol=(e,t)=>{if(t<0&&Rs(e)&&e.hasChildNodes()){return undefined}else{return tl(e,t)}};const nl=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ؚ"+"ً-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް"+"߫-߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛ࣣ-ंऺ़"+"ु-ै्॑-ॗॢ-ॣঁ়াু-ৄ্ৗৢ-ৣ"+"ਁ-ਂ਼ੁ-ੂੇ-ੈੋ-੍ੑੰ-ੱੵઁ-ં઼"+"ુ-ૅે-ૈ્ૢ-ૣଁ଼ାିୁ-ୄ୍ୖୗ"+"ୢ-ୣஂாீ்ௗఀా-ీె-ైొ-్ౕ-ౖ"+"ౢ-ౣಁ಼ಿೂೆೌ-್ೕ-ೖೢ-ೣഁാു-ൄ"+"്ൗൢ-ൣ්ාි-ුූෟัิ-ฺ็-๎ັິ-ູ"+"ົ-ຼ່-ໍ༘-ཱ༹༙༵༷-ཾྀ-྄྆-྇ྍ-ྗ"+"ྙ-ྼ࿆ိ-ူဲ-့္-်ွ-ှၘ-ၙၞ-ၠၱ-ၴ"+"ႂႅ-ႆႍႝ፝-፟ᜒ-᜔ᜲ-᜴ᝒ-ᝓᝲ-ᝳ឴-឵"+"ិ-ួំ៉-៓៝᠋-᠍ᢩᤠ-ᤢᤧ-ᤨᤲ᤹-᤻ᨗ-ᨘ"+"ᨛᩖᩘ-ᩞ᩠ᩢᩥ-ᩬᩳ-᩿᩼᪰-᪽᪾ᬀ-ᬃ᬴"+"ᬶ-ᬺᬼᭂ᭫-᭳ᮀ-ᮁᮢ-ᮥᮨ-ᮩ᮫-ᮭ᯦ᯨ-ᯩ"+"ᯭᯯ-ᯱᰬ-ᰳᰶ-᰷᳐-᳔᳒-᳢᳠-᳨᳭᳴᳸-᳹"+"᷀-᷵᷼-᷿-⃐-⃜⃝-⃠⃡⃢-⃤⃥-⃰⳯-⳱"+"⵿ⷠ-〪ⷿ-〭〮-゙〯-゚꙯꙰-꙲ꙴ-꙽ꚞ-ꚟ꛰-꛱"+"ꠂ꠆ꠋꠥ-ꠦ꣄꣠-꣱ꤦ-꤭ꥇ-ꥑꦀ-ꦂ꦳ꦶ-ꦹꦼ"+"ꧥꨩ-ꨮꨱ-ꨲꨵ-ꨶꩃꩌꩼꪰꪲ-ꪴꪷ-ꪸꪾ-꪿꫁"+"ꫬ-ꫭ꫶ꯥꯨ꯭ﬞ︀-️︠-゙︯-゚]");const sl=e=>typeof e==="string"&&e.charCodeAt(0)>=768&&nl.test(e);const rl=(...e)=>t=>{for(let o=0;o<e.length;o++){if(e[o](t)){return true}}return false};const al=(...e)=>t=>{for(let o=0;o<e.length;o++){if(!e[o](t)){return false}}return true};const cl=Rs;const il=ba;const ll=Ls("display","block table");const dl=Ls("float","left right");const ul=al(cl,il,I(dl));const fl=I(Ls("white-space","pre pre-line pre-wrap"));const ml=qs;const gl=Ys;const pl=Gc.nodeIndex;const hl=ol;const yl=e=>"createRange"in e?e.createRange():Gc.DOM.createRng();const bl=e=>e&&/[\r\n\t ]/.test(e);const vl=e=>!!e.setStart&&!!e.setEnd;const kl=e=>{const t=e.startContainer;const o=e.startOffset;if(bl(e.toString())&&fl(t.parentNode)&&qs(t)){const e=t.data;if(bl(e[o-1])||bl(e[o+1])){return true}}return false};const wl=e=>{const t=e.ownerDocument;const o=yl(t);const n=t.createTextNode(jr);const s=e.parentNode;s.insertBefore(n,e);o.setStart(n,0);o.setEnd(n,1);const r=Ui(o.getBoundingClientRect());s.removeChild(n);return r};const _l=e=>{const t=e.startContainer;const o=e.endContainer;const n=e.startOffset;const s=e.endOffset;if(t===o&&qs(o)&&n===0&&s===1){const t=e.cloneRange();t.setEndAfter(o);return zl(t)}else{return null}};const xl=e=>e.left===0&&e.right===0&&e.top===0&&e.bottom===0;const zl=e=>{let t;const o=e.getClientRects();if(o.length>0){t=Ui(o[0])}else{t=Ui(e.getBoundingClientRect())}if(!vl(e)&&gl(e)&&xl(t)){return wl(e)}if(xl(t)&&vl(e)){return _l(e)}return t};const Cl=(e,t)=>{const o=qi(e,t);o.width=1;o.right=o.left+1;return o};const Sl=e=>{const t=[];const o=e=>{if(e.height===0){return}if(t.length>0){if(Wi(e,t[t.length-1])){return}}t.push(e)};const n=(e,n)=>{const s=yl(e.ownerDocument);if(n<e.data.length){if(sl(e.data[n])){return t}if(sl(e.data[n-1])){s.setStart(e,n);s.setEnd(e,n+1);if(!kl(s)){o(Cl(zl(s),false));return t}}}if(n>0){s.setStart(e,n-1);s.setEnd(e,n);if(!kl(s)){o(Cl(zl(s),false))}}if(n<e.data.length){s.setStart(e,n);s.setEnd(e,n+1);if(!kl(s)){o(Cl(zl(s),true))}}};const s=e.container();const r=e.offset();if(ml(s)){n(s,r);return t}if(cl(s)){if(e.isAtEnd()){const e=hl(s,r);if(ml(e)){n(e,e.data.length)}if(ul(e)&&!gl(e)){o(Cl(zl(e),false))}}else{const a=hl(s,r);if(ml(a)){n(a,0)}if(ul(a)&&e.isAtEnd()){o(Cl(zl(a),false));return t}const c=hl(e.container(),e.offset()-1);if(ul(c)&&!gl(c)){if(ll(c)||ll(a)||!ul(a)){o(Cl(zl(c),false))}}if(ul(a)){o(Cl(zl(a),true))}}}return t};const Tl=(e,t,o)=>{const n=()=>{if(ml(e)){return t===0}return t===0};const s=()=>{if(ml(e)){return t>=e.data.length}return t>=e.childNodes.length};const r=()=>{const o=yl(e.ownerDocument);o.setStart(e,t);o.setEnd(e,t);return o};const a=()=>{if(!o){o=Sl(Tl(e,t))}return o};const c=()=>a().length>0;const i=o=>o&&e===o.container()&&t===o.offset();const l=o=>hl(e,o?t-1:t);return{container:R(e),offset:R(t),toRange:r,getClientRects:a,isVisible:c,isAtStart:n,isAtEnd:s,isEqual:i,getNode:l}};Tl.fromRangeStart=e=>Tl(e.startContainer,e.startOffset);Tl.fromRangeEnd=e=>Tl(e.endContainer,e.endOffset);Tl.after=e=>Tl(e.parentNode,pl(e)+1);Tl.before=e=>Tl(e.parentNode,pl(e));Tl.isAbove=(e,t)=>po(he(t.getClientRects()),ye(e.getClientRects()),Gi).getOr(false);Tl.isBelow=(e,t)=>po(ye(t.getClientRects()),he(e.getClientRects()),Ki).getOr(false);Tl.isAtStart=e=>e?e.isAtStart():false;Tl.isAtEnd=e=>e?e.isAtEnd():false;Tl.isTextPosition=e=>e?qs(e.container()):false;Tl.isElementPosition=e=>Tl.isTextPosition(e)===false;const Ol=(e,t)=>{if(qs(t)&&t.data.length===0){e.remove(t)}};const El=(e,t,o)=>{t.insertNode(o);Ol(e,o.previousSibling);Ol(e,o.nextSibling)};const Dl=(e,t,o)=>{const n=q.from(o.firstChild);const s=q.from(o.lastChild);t.insertNode(o);n.each((t=>Ol(e,t.previousSibling)));s.each((t=>Ol(e,t.nextSibling)))};const Al=(e,t,o)=>{if(Xs(o)){Dl(e,t,o)}else{El(e,t,o)}};const Ml=qs;const Nl=Ps;const Rl=Gc.nodeIndex;const Bl=e=>{const t=e.parentNode;if(Nl(t)){return Bl(t)}return t};const Ll=e=>{if(!e){return[]}return Ue(e.childNodes,((e,t)=>{if(Nl(t)&&t.nodeName!=="BR"){e=e.concat(Ll(t))}else{e.push(t)}return e}),[])};const Hl=(e,t)=>{while(e=e.previousSibling){if(!Ml(e)){break}t+=e.data.length}return t};const Il=e=>t=>e===t;const Pl=e=>{let t,o;t=Ll(Bl(e));o=qe(t,Il(e),e);t=t.slice(0,o+1);const n=Ue(t,((e,o,n)=>{if(Ml(o)&&Ml(t[n-1])){e++}return e}),0);t=Ve(t,Bs([e.nodeName]));o=qe(t,Il(e),e);return o-n};const Fl=e=>{let t;if(Ml(e)){t="text()"}else{t=e.nodeName.toLowerCase()}return t+"["+Pl(e)+"]"};const Vl=(e,t,o)=>{const n=[];for(t=t.parentNode;t!==e;t=t.parentNode){if(o&&o(t)){break}n.push(t)}return n};const jl=(e,t)=>{let o,n,s=[],r,a,c;o=t.container();n=t.offset();if(Ml(o)){r=Hl(o,n)}else{a=o.childNodes;if(n>=a.length){r="after";n=a.length-1}else{r="before"}o=a[n]}s.push(Fl(o));c=Vl(e,o);c=Ve(c,I(Ps));s=s.concat(Fe(c,(e=>Fl(e))));return s.reverse().join("/")+","+r};const Ul=(e,t,o)=>{let n=Ll(e);n=Ve(n,((e,t)=>!Ml(e)||!Ml(n[t-1])));n=Ve(n,Bs([t]));return n[o]};const ql=(e,t)=>{let o=e,n=0,s;while(Ml(o)){s=o.data.length;if(t>=n&&t<=n+s){e=o;t=t-n;break}if(!Ml(o.nextSibling)){e=o;t=s;break}n+=s;o=o.nextSibling}if(Ml(e)&&t>e.data.length){t=e.data.length}return Tl(e,t)};const Wl=(e,t)=>{let o;if(!t){return null}const n=t.split(",");const s=n[0].split("/");o=n.length>1?n[1]:"before";const r=Ue(s,((e,t)=>{const o=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);if(!o){return null}if(o[1]==="text()"){o[1]="#text"}return Ul(e,o[1],parseInt(o[2],10))}),e);if(!r){return null}if(!Ml(r)){if(o==="after"){o=Rl(r)+1}else{o=Rl(r)}return Tl(r.parentNode,o)}return ql(r,parseInt(o,10))};const $l=Zs;const Gl=(e,t,o)=>{let n,s;s=e(t.data.slice(0,o)).length;for(n=t.previousSibling;n&&qs(n);n=n.previousSibling){s+=e(n.data).length}return s};const Kl=(e,t,o,n,s)=>{let r=n[s?"startContainer":"endContainer"];let a=n[s?"startOffset":"endOffset"];const c=[];let i,l=0;const d=e.getRoot();if(qs(r)){c.push(o?Gl(t,r,a):a)}else{i=r.childNodes;if(a>=i.length&&i.length){l=1;a=Math.max(0,i.length-1)}c.push(e.nodeIndex(i[a],o)+l)}for(;r&&r!==d;r=r.parentNode){c.push(e.nodeIndex(r,o))}return c};const Xl=(e,t,o,n)=>{const s=t.dom,r={};r.start=Kl(s,e,o,n,true);if(!t.isCollapsed()){r.end=Kl(s,e,o,n,false)}if(la(n)){r.isFakeCaret=true}return r};const Yl=(e,t,o)=>{let n=0;fo.each(e.select(t),(e=>{if(e.getAttribute("data-mce-bogus")==="all"){return}if(e===o){return false}n++}));return n};const Jl=(e,t)=>{let o,n,s;const r=t?"start":"end";o=e[r+"Container"];n=e[r+"Offset"];if(Rs(o)&&o.nodeName==="TR"){s=o.childNodes;o=s[Math.min(t?n:n-1,s.length-1)];if(o){n=t?0:o.childNodes.length;e["set"+(t?"Start":"End")](o,n)}}};const Ql=e=>{Jl(e,true);Jl(e,false);return e};const Zl=(e,t)=>{let o;if(Rs(e)){e=tl(e,t);if($l(e)){return e}}if(Qr(e)){if(qs(e)&&Yr(e)){e=e.parentNode}o=e.previousSibling;if($l(o)){return o}o=e.nextSibling;if($l(o)){return o}}};const ed=e=>Zl(e.startContainer,e.startOffset)||Zl(e.endContainer,e.endOffset);const td=(e,t,o)=>{const n=o.getNode();let s=n?n.nodeName:null;const r=o.getRng();if($l(n)||s==="IMG"){return{name:s,index:Yl(o.dom,s,n)}}const a=ed(r);if(a){s=a.tagName;return{name:s,index:Yl(o.dom,s,a)}}return Xl(e,o,t,r)};const od=e=>{const t=e.getRng();return{start:jl(e.dom.getRoot(),Tl.fromRangeStart(t)),end:jl(e.dom.getRoot(),Tl.fromRangeEnd(t))}};const nd=e=>({rng:e.getRng()});const sd=(e,t,o)=>{const n={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return o?e.create("span",n,""):e.create("span",n)};const rd=(e,t)=>{const o=e.dom;let n=e.getRng();const s=o.uniqueId();const r=e.isCollapsed();const a=e.getNode();const c=a.nodeName;if(c==="IMG"){return{name:c,index:Yl(o,c,a)}}const i=Ql(n.cloneRange());if(!r){i.collapse(false);const e=sd(o,s+"_end",t);Al(o,i,e)}n=Ql(n);n.collapse(true);const l=sd(o,s+"_start",t);Al(o,n,l);e.moveToBookmark({id:s,keep:true});return{id:s}};const ad=(e,t,o)=>{if(t===2){return td(Gr,o,e)}else if(t===3){return od(e)}else if(t){return nd(e)}else{return rd(e,false)}};const cd=H(td,B,true);const id=e=>{const t=t=>t(e);const o=R(e);const n=()=>s;const s={tag:true,inner:e,fold:(t,o)=>o(e),isValue:U,isError:j,map:t=>ud.value(t(e)),mapError:n,bind:t,exists:t,forall:t,getOr:o,or:n,getOrThunk:o,orThunk:n,getOrDie:o,each:t=>{t(e)},toOptional:()=>q.some(e)};return s};const ld=e=>{const t=()=>o;const o={tag:false,inner:e,fold:(t,o)=>t(e),isValue:j,isError:U,map:t,mapError:t=>ud.error(t(e)),bind:t,exists:j,forall:U,getOr:B,or:B,getOrThunk:F,orThunk:F,getOrDie:P(String(e)),each:A,toOptional:q.none};return o};const dd=(e,t)=>e.fold((()=>ld(t)),id);const ud={value:id,error:ld,fromOption:dd};const fd=e=>{if(!_(e)){throw new Error("cases must be an array")}if(e.length===0){throw new Error("there must be at least one case")}const t=[];const o={};Z(e,((n,s)=>{const r=we(n);if(r.length!==1){throw new Error("one and only one name per case")}const a=r[0];const c=n[a];if(o[a]!==undefined){throw new Error("duplicate key detected:"+a)}else if(a==="cata"){throw new Error("cannot have a case named cata (sorry)")}else if(!_(c)){throw new Error("case arguments must be an array")}t.push(a);o[a]=(...o)=>{const n=o.length;if(n!==c.length){throw new Error("Wrong number of arguments to case "+a+". Expected "+c.length+" ("+c+"), got "+n)}const r=e=>{const n=we(e);if(t.length!==n.length){throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","))}const s=de(t,(e=>Y(n,e)));if(!s){throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "))}return e[a].apply(null,o)};return{fold:(...t)=>{if(t.length!==e.length){throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length)}const n=t[s];return n.apply(null,o)},match:r,log:e=>{console.log(e,{constructors:t,constructor:a,params:o})}}}}));return o};const md={generate:fd};md.generate([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const gd=e=>{const t=[];const o=[];Z(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))}));return{errors:t,values:o}};const pd=e=>e.type==="inline-command"||e.type==="inline-format";const hd=e=>e.type==="block-command"||e.type==="block-format";const yd=e=>ge(e,((e,t)=>{if(e.start.length===t.start.length){return 0}return e.start.length>t.start.length?-1:1}));const bd=e=>{const t=t=>ud.error({message:t,pattern:e});const o=(o,n,s)=>{if(e.format!==undefined){let s;if(_(e.format)){if(!de(e.format,v)){return t(o+" pattern has non-string items in the `format` array")}s=e.format}else if(v(e.format)){s=[e.format]}else{return t(o+" pattern has non-string `format` parameter")}return ud.value(n(s))}else if(e.cmd!==undefined){if(!v(e.cmd)){return t(o+" pattern has non-string `cmd` parameter")}return ud.value(s(e.cmd,e.value))}else{return t(o+" pattern is missing both `format` and `cmd` parameters")}};if(!k(e)){return t("Raw pattern is not an object")}if(!v(e.start)){return t("Raw pattern is missing `start` parameter")}if(e.end!==undefined){if(!v(e.end)){return t("Inline pattern has non-string `end` parameter")}if(e.start.length===0&&e.end.length===0){return t("Inline pattern has empty `start` and `end` parameters")}let n=e.start;let s=e.end;if(s.length===0){s=n;n=""}return o("Inline",(e=>({type:"inline-format",start:n,end:s,format:e})),((e,t)=>({type:"inline-command",start:n,end:s,cmd:e,value:t})))}else if(e.replacement!==undefined){if(!v(e.replacement)){return t("Replacement pattern has non-string `replacement` parameter")}if(e.start.length===0){return t("Replacement pattern has empty `start` parameter")}return ud.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement})}else{if(e.start.length===0){return t("Block pattern has empty `start` parameter")}return o("Block",(t=>({type:"block-format",start:e.start,format:t[0]})),((t,o)=>({type:"block-command",start:e.start,cmd:t,value:o})))}};const vd=e=>yd(oe(e,hd));const kd=e=>oe(e,pd);const wd=e=>({inlinePatterns:kd(e),blockPatterns:vd(e)});const _d=e=>{const t=gd(Q(e,bd));Z(t.errors,(e=>console.error(e.message,e.pattern)));return t.values};const xd=Gt().deviceType;const zd=xd.isTouch();const Cd=Gc.DOM;const Sd=e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return se(t,((e,t)=>{const o=t.split("=");const n=o[0];const s=o.length>1?o[1]:n;e[ut(n)]=ut(s);return e}),{})};const Td=e=>b(e,RegExp);const Od=e=>t=>t.options.get(e);const Ed=e=>v(e)||k(e);const Dd=(e,t="")=>o=>{const n=v(o);if(n){if(o.indexOf("=")!==-1){const s=Sd(o);return{value:Me(s,e.id).getOr(t),valid:n}}else{return{value:o,valid:n}}}else{return{valid:false,message:"Must be a string."}}};const Ad=e=>{const t=e.options.register;t("id",{processor:"string",default:e.id});t("selector",{processor:"string"});t("target",{processor:"object"});t("suffix",{processor:"string"});t("cache_suffix",{processor:"string"});t("base_url",{processor:"string"});t("referrer_policy",{processor:"string",default:""});t("language_load",{processor:"boolean"});t("inline",{processor:"boolean",default:false});t("iframe_attrs",{processor:"object",default:{}});t("doctype",{processor:"string",default:"<!DOCTYPE html>"});t("document_base_url",{processor:"string",default:e.documentBaseUrl});t("body_id",{processor:Dd(e,"tinymce"),default:"tinymce"});t("body_class",{processor:Dd(e),default:""});t("content_security_policy",{processor:"string",default:""});t("br_in_pre",{processor:"boolean",default:true});t("forced_root_block",{processor:e=>{const t=v(e)&>(e);if(t){return{value:e,valid:t}}else{return{valid:false,message:"Must be a non-empty string."}}},default:"p"});t("forced_root_block_attrs",{processor:"object",default:{}});t("br_newline_selector",{processor:"string",default:".mce-toc h2,figcaption,caption"});t("no_newline_selector",{processor:"string",default:""});t("keep_styles",{processor:"boolean",default:true});t("end_container_on_empty_block",{processor:"boolean",default:false});t("font_size_style_values",{processor:"string",default:"xx-small,x-small,small,medium,large,x-large,xx-large"});t("font_size_legacy_values",{processor:"string",default:"xx-small,small,medium,large,x-large,xx-large,300%"});t("font_size_classes",{processor:"string",default:""});t("automatic_uploads",{processor:"boolean",default:true});t("images_reuse_filename",{processor:"boolean",default:false});t("images_replace_blob_uris",{processor:"boolean",default:true});t("icons",{processor:"string",default:""});t("icons_url",{processor:"string",default:""});t("images_upload_url",{processor:"string",default:""});t("images_upload_base_path",{processor:"string",default:""});t("images_upload_base_path",{processor:"string",default:""});t("images_upload_credentials",{processor:"boolean",default:false});t("images_upload_handler",{processor:"function"});t("language",{processor:"string",default:"en"});t("language_url",{processor:"string",default:""});t("entity_encoding",{processor:"string",default:"named"});t("indent",{processor:"boolean",default:true});t("indent_before",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,"+"tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"});t("indent_after",{processor:"string",default:"p,h1,h2,h3,h4,h5,h6,blockquote,div,title,style,pre,script,td,th,ul,ol,li,dl,dt,dd,area,table,thead,"+"tfoot,tbody,tr,section,summary,article,hgroup,aside,figure,figcaption,option,optgroup,datalist"});t("indent_use_margin",{processor:"boolean",default:false});t("indentation",{processor:"string",default:"40px"});t("content_css",{processor:e=>{const t=e===false||v(e)||D(e,v);if(t){if(v(e)){return{value:Q(e.split(","),ut),valid:t}}else if(_(e)){return{value:e,valid:t}}else if(e===false){return{value:[],valid:t}}else{return{value:e,valid:t}}}else{return{valid:false,message:"Must be false, a string or an array of strings."}}},default:Cu(e)?[]:["default"]});t("content_style",{processor:"string"});t("content_css_cors",{processor:"boolean",default:false});t("font_css",{processor:e=>{const t=v(e)||D(e,v);if(t){const o=_(e)?e:Q(e.split(","),ut);return{value:o,valid:t}}else{return{valid:false,message:"Must be a string or an array of strings."}}},default:[]});t("inline_boundaries",{processor:"boolean",default:true});t("inline_boundaries_selector",{processor:"string",default:"a[href],code,.mce-annotation"});t("object_resizing",{processor:e=>{const t=z(e)||v(e);if(t){if(e===false||xd.isiPhone()||xd.isiPad()){return{value:"",valid:t}}else{return{value:e===true?"table,img,figure.image,div,video,iframe":e,valid:t}}}else{return{valid:false,message:"Must be boolean or a string"}}},default:!zd});t("resize_img_proportional",{processor:"boolean",default:true});t("event_root",{processor:"object"});t("service_message",{processor:"string"});t("theme",{processor:e=>e===false||v(e)||O(e),default:"silver"});t("theme_url",{processor:"string"});t("formats",{processor:"object"});t("format_empty_lines",{processor:"boolean",default:false});t("preview_styles",{processor:e=>{const t=e===false||v(e);if(t){return{value:e===false?"":e,valid:t}}else{return{valid:false,message:"Must be false or a string"}}},default:"font-family font-size font-weight font-style text-decoration text-transform color background-color border border-radius outline text-shadow"});t("custom_ui_selector",{processor:"string",default:""});t("hidden_input",{processor:"boolean",default:true});t("submit_patch",{processor:"boolean",default:true});t("encoding",{processor:"string"});t("add_form_submit_trigger",{processor:"boolean",default:true});t("add_unload_trigger",{processor:"boolean",default:true});t("custom_undo_redo_levels",{processor:"number",default:0});t("disable_nodechange",{processor:"boolean",default:false});t("readonly",{processor:"boolean",default:false});t("plugins",{processor:"string[]",default:[]});t("external_plugins",{processor:"object"});t("forced_plugins",{processor:"string[]"});t("model",{processor:"string",default:e.hasPlugin("rtc")?"plugin":"dom"});t("model_url",{processor:"string"});t("block_unsupported_drop",{processor:"boolean",default:true});t("visual",{processor:"boolean",default:true});t("visual_table_class",{processor:"string",default:"mce-item-table"});t("visual_anchor_class",{processor:"string",default:"mce-item-anchor"});t("iframe_aria_text",{processor:"string",default:"Rich Text Area. Press ALT-0 for help."});t("setup",{processor:"function"});t("init_instance_callback",{processor:"function"});t("url_converter",{processor:"function",default:e.convertURL});t("url_converter_scope",{processor:"object",default:e});t("urlconverter_callback",{processor:"function"});t("allow_conditional_comments",{processor:"boolean",default:false});t("allow_html_data_urls",{processor:"boolean",default:false});t("allow_svg_data_urls",{processor:"boolean"});t("allow_html_in_named_anchor",{processor:"boolean",default:false});t("allow_script_urls",{processor:"boolean",default:false});t("allow_unsafe_link_target",{processor:"boolean",default:false});t("convert_fonts_to_spans",{processor:"boolean",default:true,deprecated:true});t("fix_list_elements",{processor:"boolean",default:false});t("preserve_cdata",{processor:"boolean",default:false});t("remove_trailing_brs",{processor:"boolean"});t("inline_styles",{processor:"boolean",default:true,deprecated:true});t("element_format",{processor:"string",default:"html"});t("entities",{processor:"string"});t("schema",{processor:"string",default:"html5"});t("convert_urls",{processor:"boolean",default:true});t("relative_urls",{processor:"boolean",default:true});t("remove_script_host",{processor:"boolean",default:true});t("custom_elements",{processor:"string"});t("extended_valid_elements",{processor:"string"});t("invalid_elements",{processor:"string"});t("invalid_styles",{processor:Ed});t("valid_children",{processor:"string"});t("valid_classes",{processor:Ed});t("valid_elements",{processor:"string"});t("valid_styles",{processor:Ed});t("verify_html",{processor:"boolean",default:true});t("auto_focus",{processor:e=>v(e)||e===true});t("browser_spellcheck",{processor:"boolean",default:false});t("protect",{processor:"array"});t("images_file_types",{processor:"string",default:"jpeg,jpg,jpe,jfi,jif,jfif,png,gif,bmp,webp"});t("deprecation_warnings",{processor:"boolean",default:true});t("a11y_advanced_options",{processor:"boolean",default:false});t("api_key",{processor:"string"});t("paste_block_drop",{processor:"boolean",default:false});t("paste_data_images",{processor:"boolean",default:true});t("paste_preprocess",{processor:"function"});t("paste_postprocess",{processor:"function"});t("paste_webkit_styles",{processor:"string",default:"none"});t("paste_remove_styles_if_webkit",{processor:"boolean",default:true});t("paste_merge_formats",{processor:"boolean",default:true});t("smart_paste",{processor:"boolean",default:true});t("paste_as_text",{processor:"boolean",default:false});t("paste_tab_spaces",{processor:"number",default:4});t("text_patterns",{processor:e=>{if(D(e,k)||e===false){const t=e===false?[]:e;return{value:_d(t),valid:true}}else{return{valid:false,message:"Must be an array of objects or false."}}},default:[{start:"*",end:"*",format:"italic"},{start:"**",end:"**",format:"bold"},{start:"#",format:"h1"},{start:"##",format:"h2"},{start:"###",format:"h3"},{start:"####",format:"h4"},{start:"#####",format:"h5"},{start:"######",format:"h6"},{start:"1. ",cmd:"InsertOrderedList"},{start:"* ",cmd:"InsertUnorderedList"},{start:"- ",cmd:"InsertUnorderedList"}]});t("noneditable_class",{processor:"string",default:"mceNonEditable"});t("editable_class",{processor:"string",default:"mceEditable"});t("noneditable_regexp",{processor:e=>{if(D(e,Td)){return{value:e,valid:true}}else if(Td(e)){return{value:[e],valid:true}}else{return{valid:false,message:"Must be a RegExp or an array of RegExp."}}},default:[]});t("table_tab_navigation",{processor:"boolean",default:true});e.on("ScriptsLoaded",(()=>{t("directionality",{processor:"string",default:mi.isRtl()?"rtl":undefined});t("placeholder",{processor:"string",default:Cd.getAttrib(e.getElement(),"placeholder")})}))};const Md=Od("iframe_attrs");const Nd=Od("doctype");const Rd=Od("document_base_url");const Bd=Od("body_id");const Ld=Od("body_class");const Hd=Od("content_security_policy");const Id=Od("br_in_pre");const Pd=Od("forced_root_block");const Fd=Od("forced_root_block_attrs");const Vd=Od("br_newline_selector");const jd=Od("no_newline_selector");const Ud=Od("keep_styles");const qd=Od("end_container_on_empty_block");const Wd=Od("automatic_uploads");const $d=Od("images_reuse_filename");const Gd=Od("images_replace_blob_uris");const Kd=Od("icons");const Xd=Od("icons_url");const Yd=Od("images_upload_url");const Jd=Od("images_upload_base_path");const Qd=Od("images_upload_credentials");const Zd=Od("images_upload_handler");const eu=Od("content_css_cors");const tu=Od("referrer_policy");const ou=Od("language");const nu=Od("language_url");const su=Od("indent_use_margin");const ru=Od("indentation");const au=Od("content_css");const cu=Od("content_style");const iu=Od("font_css");const lu=Od("directionality");const du=Od("inline_boundaries_selector");const uu=Od("object_resizing");const fu=Od("resize_img_proportional");const mu=Od("placeholder");const gu=Od("event_root");const pu=Od("service_message");const hu=Od("theme");const yu=Od("theme_url");const bu=Od("model");const vu=Od("model_url");const ku=Od("inline_boundaries");const wu=Od("formats");const _u=Od("preview_styles");const xu=Od("format_empty_lines");const zu=Od("custom_ui_selector");const Cu=Od("inline");const Su=Od("hidden_input");const Tu=Od("submit_patch");const Ou=Od("add_form_submit_trigger");const Eu=Od("add_unload_trigger");const Du=Od("custom_undo_redo_levels");const Au=Od("disable_nodechange");const Mu=Od("readonly");const Nu=Od("content_css_cors");const Ru=Od("plugins");const Bu=Od("external_plugins");const Lu=Od("block_unsupported_drop");const Hu=Od("visual");const Iu=Od("visual_table_class");const Pu=Od("visual_anchor_class");const Fu=Od("iframe_aria_text");const Vu=Od("setup");const ju=Od("init_instance_callback");const Uu=Od("urlconverter_callback");const qu=Od("auto_focus");const Wu=Od("browser_spellcheck");const $u=Od("protect");const Gu=Od("paste_block_drop");const Ku=Od("paste_data_images");const Xu=Od("paste_preprocess");const Yu=Od("paste_postprocess");const Ju=Od("paste_webkit_styles");const Qu=Od("paste_remove_styles_if_webkit");const Zu=Od("paste_merge_formats");const ef=Od("smart_paste");const tf=Od("paste_as_text");const of=Od("paste_tab_spaces");const nf=Od("allow_html_data_urls");const sf=Od("text_patterns");const rf=Od("noneditable_class");const af=Od("editable_class");const cf=Od("noneditable_regexp");const lf=e=>fo.explode(e.options.get("font_size_style_values"));const df=e=>fo.explode(e.options.get("font_size_classes"));const uf=e=>e.options.get("encoding")==="xml";const ff=e=>fo.explode(e.options.get("images_file_types"));const mf=Od("table_tab_navigation");const gf=Rs;const pf=qs;const hf=e=>{const t=e.parentNode;if(t){t.removeChild(e)}};const yf=e=>{const t=Gr(e);return{count:e.length-t.length,text:t}};const bf=e=>{let t;while((t=e.data.lastIndexOf(Wr))!==-1){e.deleteData(t,1)}};const vf=(e,t)=>{Cf(e);return t};const kf=(e,t)=>{const o=yf(e.data.substr(0,t.offset()));const n=yf(e.data.substr(t.offset()));const s=o.text+n.text;if(s.length>0){bf(e);return Tl(e,t.offset()-o.count)}else{return t}};const wf=(e,t)=>{const o=t.container();const n=X(be(o.childNodes),e).map((e=>e<t.offset()?Tl(o,t.offset()-1):t)).getOr(t);Cf(e);return n};const _f=(e,t)=>pf(e)&&t.container()===e?kf(e,t):vf(e,t);const xf=(e,t)=>t.container()===e.parentNode?wf(e,t):vf(e,t);const zf=(e,t)=>Tl.isTextPosition(t)?_f(e,t):xf(e,t);const Cf=e=>{if(gf(e)&&Qr(e)){if(Zr(e)){e.removeAttribute("data-mce-caret")}else{hf(e)}}if(pf(e)){bf(e);if(e.data.length===0){hf(e)}}};const Sf=Zs;const Tf=tr;const Of=er;const Ef="*[contentEditable=false],video,audio,embed,object";const Df=(e,t,o)=>{const n=qi(t.getBoundingClientRect(),o);let s;let r;if(e.tagName==="BODY"){const t=e.ownerDocument.documentElement;s=e.scrollLeft||t.scrollLeft;r=e.scrollTop||t.scrollTop}else{const t=e.getBoundingClientRect();s=e.scrollLeft-t.left;r=e.scrollTop-t.top}n.left+=s;n.right+=s;n.top+=r;n.bottom+=r;n.width=1;let a=t.offsetWidth-t.clientWidth;if(a>0){if(o){a*=-1}n.left+=a;n.right+=a}return n};const Af=e=>{const t=ki(an.fromDom(e),Ef);for(let e=0;e<t.length;e++){const o=t[e].dom;let n=o.previousSibling;if(aa(n)){const e=n.data;if(e.length===1){n.parentNode.removeChild(n)}else{n.deleteData(e.length-1,1)}}n=o.nextSibling;if(ra(n)){const e=n.data;if(e.length===1){n.parentNode.removeChild(n)}else{n.deleteData(0,1)}}}};const Mf=(e,t,o,n)=>{const s=hi();let r;let a;const c=Pd(e);const i=e.dom;const l=(e,n)=>{let r;d();if(Of(n)){return null}if(o(n)){a=sa(c,n,e);const o=Df(t,n,e);i.setStyle(a,"top",o.top);const l=i.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});i.setStyles(l,{...o});i.add(t,l);s.set({caret:l,element:n,before:e});if(e){i.addClass(l,"mce-visual-caret-before")}u();r=n.ownerDocument.createRange();r.setStart(a,0);r.setEnd(a,0)}else{a=ea(n,e);r=n.ownerDocument.createRange();if(Rf(a.nextSibling)){r.setStart(a,0);r.setEnd(a,0)}else{r.setStart(a,1);r.setEnd(a,1)}return r}return r};const d=()=>{Af(t);if(a){Cf(a);a=null}s.on((e=>{i.remove(e.caret);s.clear()}));if(r){clearInterval(r);r=undefined}};const u=()=>{r=setInterval((()=>{s.on((e=>{if(n()){i.toggleClass(e.caret,"mce-visual-caret-hidden")}else{i.addClass(e.caret,"mce-visual-caret-hidden")}}))}),500)};const f=()=>{s.on((e=>{const o=Df(t,e.element,e.before);i.setStyles(e.caret,{...o})}))};const m=()=>clearInterval(r);const g=()=>".mce-visual-caret {"+"position: absolute;"+"background-color: black;"+"background-color: currentcolor;"+"}"+".mce-visual-caret-hidden {"+"display: none;"+"}"+"*[data-mce-caret] {"+"position: absolute;"+"left: -1000px;"+"right: auto;"+"top: 0;"+"margin: 0;"+"padding: 0;"+"}";return{show:l,hide:d,getCss:g,reposition:f,destroy:m}};const Nf=()=>eo.browser.isFirefox();const Rf=e=>Sf(e)||Tf(e);const Bf=e=>Rf(e)||Vs(e)&&Nf();const Lf=Qs;const Hf=Zs;const If=tr;const Pf=Ls("display","block table table-cell table-caption list-item");const Ff=Qr;const Vf=Yr;const jf=Rs;const Uf=ba;const qf=e=>e>0;const Wf=e=>e<0;const $f=(e,t)=>{let o;while(o=e(t)){if(!Vf(o)){return o}}return null};const Gf=(e,t,o,n,s)=>{const r=new vr(e,n);const a=Hf(e)||Vf(e);if(Wf(t)){if(a){e=$f(r.prev.bind(r),true);if(o(e)){return e}}while(e=$f(r.prev.bind(r),s)){if(o(e)){return e}}}if(qf(t)){if(a){e=$f(r.next.bind(r),true);if(o(e)){return e}}while(e=$f(r.next.bind(r),s)){if(o(e)){return e}}}return null};const Kf=(e,t)=>{const o=e=>Lf(e.dom);const n=e=>e.dom===t;return ir(an.fromDom(e),o,n).map((e=>e.dom)).getOr(t)};const Xf=(e,t)=>{while(e&&e!==t){if(Pf(e)){return e}e=e.parentNode}return null};const Yf=(e,t,o)=>Xf(e.container(),o)===Xf(t.container(),o);const Jf=(e,t)=>{if(!t){return null}const o=t.container();const n=t.offset();if(!jf(o)){return null}return o.childNodes[n+e]};const Qf=(e,t)=>{const o=t.ownerDocument.createRange();if(e){o.setStartBefore(t);o.setEndBefore(t)}else{o.setStartAfter(t);o.setEndAfter(t)}return o};const Zf=(e,t,o)=>Xf(t,e)===Xf(o,e);const em=(e,t,o)=>{const n=e?"previousSibling":"nextSibling";while(o&&o!==t){let e=o[n];if(Ff(e)){e=e[n]}if(Hf(e)||If(e)){if(Zf(t,e,o)){return e}break}if(Uf(e)){break}o=o.parentNode}return null};const tm=H(Qf,true);const om=H(Qf,false);const nm=(e,t,o)=>{let n;const s=H(em,true,t);const r=H(em,false,t);let a=o.startContainer;const c=o.startOffset;if(Yr(a)){if(!jf(a)){a=a.parentNode}const e=a.getAttribute("data-mce-caret");if(e==="before"){n=a.nextSibling;if(Bf(n)){return tm(n)}}if(e==="after"){n=a.previousSibling;if(Bf(n)){return om(n)}}}if(!o.collapsed){return o}if(qs(a)){if(Ff(a)){if(e===1){n=r(a);if(n){return tm(n)}n=s(a);if(n){return om(n)}}if(e===-1){n=s(a);if(n){return om(n)}n=r(a);if(n){return tm(n)}}return o}if(aa(a)&&c>=a.data.length-1){if(e===1){n=r(a);if(n){return tm(n)}}return o}if(ra(a)&&c<=1){if(e===-1){n=s(a);if(n){return om(n)}}return o}if(c===a.data.length){n=r(a);if(n){return tm(n)}return o}if(c===0){n=s(a);if(n){return om(n)}return o}}return o};const sm=(e,t)=>q.from(Jf(e?0:-1,t)).filter(Hf);const rm=(e,t,o)=>{const n=nm(e,t,o);if(e===-1){return Tl.fromRangeStart(n)}return Tl.fromRangeEnd(n)};const am=e=>q.from(e.getNode()).map(an.fromDom);const cm=e=>q.from(e.getNode(true)).map(an.fromDom);const im=(e,t)=>{while(t=e(t)){if(t.isVisible()){return t}}return t};const lm=(e,t)=>{const o=Yf(e,t);if(!o&&Ys(e.getNode())){return true}return o};var dm;(function(e){e[e["Backwards"]=-1]="Backwards";e[e["Forwards"]=1]="Forwards"})(dm||(dm={}));const um=Zs;const fm=qs;const mm=Rs;const gm=Ys;const pm=ba;const hm=xa;const ym=za;const bm=(e,t)=>{const o=[];while(e&&e!==t){o.push(e);e=e.parentNode}return o};const vm=(e,t)=>{if(e.hasChildNodes()&&t<e.childNodes.length){return e.childNodes[t]}return null};const km=(e,t)=>{if(qf(e)){if(pm(t.previousSibling)&&!fm(t.previousSibling)){return Tl.before(t)}if(fm(t)){return Tl(t,0)}}if(Wf(e)){if(pm(t.nextSibling)&&!fm(t.nextSibling)){return Tl.after(t)}if(fm(t)){return Tl(t,t.data.length)}}if(Wf(e)){if(gm(t)){return Tl.before(t)}return Tl.after(t)}return Tl.before(t)};const wm=(e,t)=>{const o=t.nextSibling;if(o&&pm(o)){if(fm(o)){return Tl(o,0)}else{return Tl.before(o)}}else{return _m(dm.Forwards,Tl.after(t),e)}};const _m=(e,t,o)=>{let n;let s;let r;let a;if(!mm(o)||!t){return null}if(t.isEqual(Tl.after(o))&&o.lastChild){a=Tl.after(o.lastChild);if(Wf(e)&&pm(o.lastChild)&&mm(o.lastChild)){return gm(o.lastChild)?Tl.before(o.lastChild):a}}else{a=t}const c=a.container();let i=a.offset();if(fm(c)){if(Wf(e)&&i>0){return Tl(c,--i)}if(qf(e)&&i<c.length){return Tl(c,++i)}n=c}else{if(Wf(e)&&i>0){s=vm(c,i-1);if(pm(s)){if(!hm(s)){r=Gf(s,e,ym,s);if(r){if(fm(r)){return Tl(r,r.data.length)}return Tl.after(r)}}if(fm(s)){return Tl(s,s.data.length)}return Tl.before(s)}}if(qf(e)&&i<c.childNodes.length){s=vm(c,i);if(pm(s)){if(gm(s)){return wm(o,s)}if(!hm(s)){r=Gf(s,e,ym,s);if(r){if(fm(r)){return Tl(r,0)}return Tl.before(r)}}if(fm(s)){return Tl(s,0)}return Tl.after(s)}}n=s?s:a.getNode()}if(qf(e)&&a.isAtEnd()||Wf(e)&&a.isAtStart()){n=Gf(n,e,U,o,true);if(ym(n,o)){return km(e,n)}}s=Gf(n,e,ym,o);const l=We(oe(bm(c,o),um));if(l&&(!s||!l.contains(s))){if(qf(e)){a=Tl.after(l)}else{a=Tl.before(l)}return a}if(s){return km(e,s)}return null};const xm=e=>({next:t=>_m(dm.Forwards,t,e),prev:t=>_m(dm.Backwards,t,e)});const zm=(e,t,o)=>{const n=e?Tl.before(o):Tl.after(o);return Am(e,t,n)};const Cm=e=>Ys(e)?Tl.before(e):Tl.after(e);const Sm=e=>{if(Tl.isTextPosition(e)){return e.offset()===0}else{return ba(e.getNode())}};const Tm=e=>{if(Tl.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}else{return ba(e.getNode(true))}};const Om=(e,t)=>!Tl.isTextPosition(e)&&!Tl.isTextPosition(t)&&e.getNode()===t.getNode(true);const Em=e=>!Tl.isTextPosition(e)&&Ys(e.getNode());const Dm=(e,t,o)=>{if(e){return!Om(t,o)&&!Em(t)&&Tm(t)&&Sm(o)}else{return!Om(o,t)&&Sm(t)&&Tm(o)}};const Am=(e,t,o)=>{const n=xm(t);return q.from(e?n.next(o):n.prev(o))};const Mm=(e,t,o)=>Am(e,t,o).bind((n=>{if(Yf(o,n,t)&&Dm(e,o,n)){return Am(e,t,n)}else{return q.some(n)}}));const Nm=(e,t,o,n)=>Mm(e,t,o).bind((o=>n(o)?Nm(e,t,o,n):q.some(o)));const Rm=(e,t)=>{const o=e?t.firstChild:t.lastChild;if(qs(o)){return q.some(Tl(o,e?0:o.data.length))}else if(o){if(ba(o)){return q.some(e?Tl.before(o):Cm(o))}else{return zm(e,t,o)}}else{return q.none()}};const Bm=H(Am,true);const Lm=H(Am,false);const Hm=H(Rm,true);const Im=H(Rm,false);const Pm="_mce_caret";const Fm=e=>Rs(e)&&e.id===Pm;const Vm=(e,t)=>{while(t&&t!==e){if(t.id===Pm){return t}t=t.parentNode}return null};const jm=e=>v(e.start);const Um=e=>Ne(e,"rng");const qm=e=>Ne(e,"id");const Wm=e=>Ne(e,"name");const $m=e=>fo.isArray(e.start);const Gm=(e,t)=>{if(Rs(t)&&e.isBlock(t)&&!t.innerHTML){t.innerHTML='<br data-mce-bogus="1" />'}return t};const Km=(e,t)=>{let o;const n=e.createRng();o=Wl(e.getRoot(),t.start);n.setStart(o.container(),o.offset());o=Wl(e.getRoot(),t.end);n.setEnd(o.container(),o.offset());return n};const Xm=(e,t)=>{const o=e.ownerDocument.createTextNode(Wr);e.appendChild(o);t.setStart(o,0);t.setEnd(o,0)};const Ym=e=>e.hasChildNodes()===false;const Jm=(e,t)=>Im(e).fold(j,(e=>{t.setStart(e.container(),e.offset());t.setEnd(e.container(),e.offset());return true}));const Qm=(e,t,o)=>{if(Ym(t)&&Vm(e,t)){Xm(t,o);return true}else{return false}};const Zm=(e,t,o,n)=>{const s=o[t?"start":"end"];let r,a,c,i;const l=e.getRoot();if(s){c=s[0];for(a=l,r=s.length-1;r>=1;r--){i=a.childNodes;if(Qm(l,a,n)){return true}if(s[r]>i.length-1){if(Qm(l,a,n)){return true}return Jm(a,n)}a=i[s[r]]}if(a.nodeType===3){c=Math.min(s[0],a.nodeValue.length)}if(a.nodeType===1){c=Math.min(s[0],a.childNodes.length)}if(t){n.setStart(a,c)}else{n.setEnd(a,c)}}return true};const eg=e=>qs(e)&&e.data.length>0;const tg=(e,t,o)=>{let n=e.get(o.id+"_"+t),s,r,a,c;const i=o.keep;let l,d;if(n){s=n.parentNode;if(t==="start"){if(!i){r=e.nodeIndex(n)}else{if(n.hasChildNodes()){s=n.firstChild;r=1}else if(eg(n.nextSibling)){s=n.nextSibling;r=0}else if(eg(n.previousSibling)){s=n.previousSibling;r=n.previousSibling.data.length}else{s=n.parentNode;r=e.nodeIndex(n)+1}}l=s;d=r}else{if(!i){r=e.nodeIndex(n)}else{if(n.hasChildNodes()){s=n.firstChild;r=1}else if(eg(n.previousSibling)){s=n.previousSibling;r=n.previousSibling.data.length}else{s=n.parentNode;r=e.nodeIndex(n)}}l=s;d=r}if(!i){c=n.previousSibling;a=n.nextSibling;fo.each(fo.grep(n.childNodes),(e=>{if(qs(e)){e.nodeValue=e.nodeValue.replace(/\uFEFF/g,"")}}));while(n=e.get(o.id+"_"+t)){e.remove(n,true)}if(c&&a&&c.nodeType===a.nodeType&&qs(c)&&!eo.browser.isOpera()){r=c.nodeValue.length;c.appendData(a.nodeValue);e.remove(a);l=c;d=r}}return q.some(Tl(l,d))}else{return q.none()}};const og=(e,t)=>{const o=e.createRng();if(Zm(e,true,t,o)&&Zm(e,false,t,o)){return q.some(o)}else{return q.none()}};const ng=(e,t)=>{const o=tg(e,"start",t);const n=tg(e,"end",t);return po(o,n.or(o),((t,o)=>{const n=e.createRng();n.setStart(Gm(e,t.container()),t.offset());n.setEnd(Gm(e,o.container()),o.offset());return n}))};const sg=(e,t)=>q.from(e.select(t.name)[t.index]).map((t=>{const o=e.createRng();o.selectNode(t);return o}));const rg=(e,t)=>{const o=e.dom;if(t){if($m(t)){return og(o,t)}else if(jm(t)){return q.some(Km(o,t))}else if(qm(t)){return ng(o,t)}else if(Wm(t)){return sg(o,t)}else if(Um(t)){return q.some(t.rng)}}return q.none()};const ag=(e,t,o)=>ad(e,t,o);const cg=(e,t)=>{rg(e,t).each((t=>{e.setRng(t)}))};const ig=e=>Rs(e)&&e.tagName==="SPAN"&&e.getAttribute("data-mce-type")==="bookmark";const lg=e=>t=>e===t;const dg=lg(jr);const ug=e=>e!==""&&" \f\n\r\t\v".indexOf(e)!==-1;const fg=e=>!ug(e)&&!dg(e)&&!Ur(e);const mg=e=>({value:e});const gg=e=>{const t=e.toString(16);return(t.length===1?"0"+t:t).toUpperCase()};const pg=e=>{const t=gg(e.red)+gg(e.green)+gg(e.blue);return mg(t)};const hg=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i;const yg=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i;const bg=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n});const vg=(e,t,o,n)=>{const s=parseInt(e,10);const r=parseInt(t,10);const a=parseInt(o,10);const c=parseFloat(n);return bg(s,r,a,c)};const kg=e=>{if(e==="transparent"){return q.some(bg(0,0,0,0))}const t=hg.exec(e);if(t!==null){return q.some(vg(t[1],t[2],t[3],"1"))}const o=yg.exec(e);if(o!==null){return q.some(vg(o[1],o[2],o[3],o[4]))}return q.none()};const wg=e=>kg(e).map(pg).map((e=>"#"+e.value)).getOr(e);const _g=e=>!!e.nodeType;const xg=e=>e&&/^(IMG)$/.test(e.nodeName);const zg=(e,t,o)=>{const n=o.startOffset;let s=o.startContainer;if(s===o.endContainer){if(xg(s.childNodes[n])){return}}if(Rs(s)){const r=s.childNodes;let a;if(n<r.length){s=r[n];a=new vr(s,e.getParent(s,e.isBlock))}else{s=r[r.length-1];a=new vr(s,e.getParent(s,e.isBlock));a.next(true)}for(let e=a.current();e;e=a.next()){if(qs(e)&&!Og(e)){o.setStart(e,0);t.setRng(o);return}}}};const Cg=(e,t,o)=>{if(e){const n=t?"nextSibling":"previousSibling";for(e=o?e:e[n];e;e=e[n]){if(Rs(e)||!Og(e)){return e}}}};const Sg=(e,t)=>{if(_g(t)){t=t.nodeName}return!!e.schema.getTextBlockElements()[t.toLowerCase()]};const Tg=(e,t,o)=>e.schema.isValidChild(t,o);const Og=(e,t=false)=>{if(T(e)&&qs(e)){const o=t?e.data.replace(/ /g," "):e.data;return Sa(o)}else{return false}};const Eg=e=>T(e)&&qs(e)&&e.length===0;const Dg=(e,t)=>{if(O(e)){e=e(t)}else if(T(t)){e=e.replace(/%(\w+)/g,((e,o)=>t[o]||e))}return e};const Ag=(e,t)=>{e=e||"";t=t||"";e=""+(e.nodeName||e);t=""+(t.nodeName||t);return e.toLowerCase()===t.toLowerCase()};const Mg=(e,t)=>{if(t==="color"||t==="backgroundColor"){e=wg(e)}if(t==="fontWeight"&&e===700){e="bold"}if(t==="fontFamily"){e=e.replace(/[\'\"]/g,"").replace(/,\s+/g,",")}return""+e};const Ng=(e,t,o)=>Mg(e.getStyle(t,o),o);const Rg=(e,t)=>{let o;e.getParent(t,(t=>{o=e.getStyle(t,"text-decoration");return o&&o!=="none"}));return o};const Bg=(e,t,o)=>e.getParents(t,o,e.getRoot());const Lg=(e,t)=>{const o=e=>{const t=e=>e.length>1&&e.charAt(0)==="%";return J(["styles","attributes"],(o=>Me(e,o).exists((e=>{const o=_(e)?e:Ae(e);return J(o,t)}))))};return J(e.formatter.get(t),o)};const Hg=(e,t,o)=>{const n=["inline","block","selector","attributes","styles","classes"];const s=e=>Ee(e,((e,t)=>J(n,(e=>e===t))));return J(e.formatter.get(t),(t=>{const n=s(t);return J(e.formatter.get(o),(e=>{const t=s(e);return Be(n,t)}))}))};const Ig=e=>Re(e,"block");const Pg=e=>Re(e,"selector");const Fg=e=>Re(e,"inline");const Vg=e=>Pg(e)&&Fg(e)&&mo(Me(e,"mixed"),true);const jg=e=>Pg(e)&&e.expand!==false&&!Fg(e);const Ug=ig;const qg=Bg;const Wg=Og;const $g=Sg;const Gg=e=>Ys(e)&&e.getAttribute("data-mce-bogus")&&!e.nextSibling;const Kg=(e,t)=>{let o=t;while(o){if(Rs(o)&&e.getContentEditable(o)){return e.getContentEditable(o)==="false"?o:t}o=o.parentNode}return t};const Xg=(e,t,o,n)=>{const s=t.data;for(let t=o;e?t>=0:t<s.length;e?t--:t++){if(n(s.charAt(t))){return e?t+1:t}}return-1};const Yg=(e,t,o)=>Xg(e,t,o,(e=>dg(e)||ug(e)));const Jg=(e,t,o)=>Xg(e,t,o,fg);const Qg=(e,t,o,n,s,r)=>{let a;const c=e.getParent(o,e.isBlock)||t;const i=(t,o,n)=>{const r=Vi(e);const i=s?r.backwards:r.forwards;return q.from(i(t,o,((e,t)=>{if(Ug(e.parentNode)){return-1}else{a=e;return n(s,e,t)}}),c))};const l=i(o,n,Yg);return l.bind((e=>r?i(e.container,e.offset+(s?-1:0),Jg):q.some(e))).orThunk((()=>a?q.some({container:a,offset:s?0:a.length}):q.none()))};const Zg=(e,t,o,n,s)=>{if(qs(n)&&pt(n.data)&&n[s]){n=n[s]}const r=qg(e,n);for(let n=0;n<r.length;n++){for(let s=0;s<t.length;s++){const a=t[s];if(T(a.collapsed)&&a.collapsed!==o.collapsed){continue}if(Pg(a)&&e.is(r[n],a.selector)){return r[n]}}}return n};const ep=(e,t,o,n)=>{let s=o;const r=e.dom;const a=r.getRoot();const c=t[0];if(Ig(c)){s=c.wrapper?null:r.getParent(o,c.block,a)}if(!s){const t=r.getParent(o,"LI,TD,TH");s=r.getParent(qs(o)?o.parentNode:o,(t=>t!==a&&$g(e,t)),t)}if(s&&Ig(c)&&c.wrapper){s=qg(r,s,"ul,ol").reverse()[0]||s}if(!s){s=o;while(s[n]&&!r.isBlock(s[n])){s=s[n];if(Ag(s,"br")){break}}}return s||o};const tp=(e,t,o,n)=>{const s=o.parentNode;if(T(o[n])){return false}else if(s===t||S(s)||e.isBlock(s)){return true}else{return tp(e,t,s,n)}};const op=(e,t,o,n,s)=>{let r=o;const a=s?"previousSibling":"nextSibling";const c=e.getRoot();if(qs(o)&&!Wg(o)){if(s?n>0:n<o.data.length){return o}}while(true){if(!t[0].block_expand&&e.isBlock(r)){return r}for(let t=r[a];t;t=t[a]){const o=qs(t)&&!tp(e,c,t,a);if(!Ug(t)&&!Gg(t)&&!Wg(t,o)){return r}}if(r===c||r.parentNode===c){o=r;break}r=r.parentNode}return o};const np=e=>Ug(e.parentNode)||Ug(e);const sp=(e,t,o,n=false)=>{let{startContainer:s,startOffset:r,endContainer:a,endOffset:c}=t;const i=e.dom;const l=o[0];if(Rs(s)&&s.hasChildNodes()){s=tl(s,r);if(qs(s)){r=0}}if(Rs(a)&&a.hasChildNodes()){a=tl(a,t.collapsed?c:c-1);if(qs(a)){c=a.nodeValue.length}}s=Kg(i,s);a=Kg(i,a);if(np(s)){s=Ug(s)?s:s.parentNode;if(t.collapsed){s=s.previousSibling||s}else{s=s.nextSibling||s}if(qs(s)){r=t.collapsed?s.length:0}}if(np(a)){a=Ug(a)?a:a.parentNode;if(t.collapsed){a=a.nextSibling||a}else{a=a.previousSibling||a}if(qs(a)){c=t.collapsed?0:a.length}}if(t.collapsed){const t=Qg(i,e.getBody(),s,r,true,n);t.each((({container:e,offset:t})=>{s=e;r=t}));const o=Qg(i,e.getBody(),a,c,false,n);o.each((({container:e,offset:t})=>{a=e;c=t}))}if(Fg(l)||l.block_expand){if(!Fg(l)||(!qs(s)||r===0)){s=op(i,o,s,r,true)}if(!Fg(l)||(!qs(a)||c===a.nodeValue.length)){a=op(i,o,a,c,false)}}if(jg(l)){s=Zg(i,o,t,s,"previousSibling");a=Zg(i,o,t,a,"nextSibling")}if(Ig(l)||Pg(l)){s=ep(e,o,s,"previousSibling");a=ep(e,o,a,"nextSibling");if(Ig(l)){if(!i.isBlock(s)){s=op(i,o,s,r,true)}if(!i.isBlock(a)){a=op(i,o,a,c,false)}}}if(Rs(s)){r=i.nodeIndex(s);s=s.parentNode}if(Rs(a)){c=i.nodeIndex(a)+1;a=a.parentNode}return{startContainer:s,startOffset:r,endContainer:a,endOffset:c}};const rp=(e,t,o)=>{const n=t.startOffset;const s=tl(t.startContainer,n);const r=t.endOffset;const a=tl(t.endContainer,r-1);const c=e=>{const t=e[0];if(qs(t)&&t===s&&n>=t.data.length){e.splice(0,1)}const o=e[e.length-1];if(r===0&&e.length>0&&o===a&&qs(o)){e.splice(e.length-1,1)}return e};const i=(e,t,o)=>{const n=[];for(;e&&e!==o;e=e[t]){n.push(e)}return n};const l=(t,o)=>e.getParent(t,(e=>e.parentNode===o),o);const d=(e,t,n)=>{const s=n?"nextSibling":"previousSibling";for(let r=e,a=r.parentNode;r&&r!==t;r=a){a=r.parentNode;const t=i(r===e?r:r[s],s);if(t.length){if(!n){t.reverse()}o(c(t))}}};if(s===a){return o(c([s]))}const u=e.findCommonAncestor(s,a);if(e.isChildOf(s,a)){return d(s,u,true)}if(e.isChildOf(a,s)){return d(a,u)}const f=l(s,u)||s;const m=l(a,u)||a;d(s,f,true);const g=i(f===s?f:f.nextSibling,"nextSibling",m===a?m.nextSibling:m);if(g.length){o(c(g))}d(a,m)};const ap=e=>{const t=[];if(e){for(let o=0;o<e.rangeCount;o++){t.push(e.getRangeAt(o))}}return t};const cp=e=>le(e,(e=>{const t=el(e);return t?[an.fromDom(t)]:[]}));const ip=e=>ap(e).length>1;const lp=e=>oe(cp(e),Ir);const dp=e=>ki(e,"td[data-mce-selected],th[data-mce-selected]");const up=(e,t)=>{const o=dp(t);return o.length>0?o:lp(e)};const fp=e=>up(ap(e.selection.getSel()),an.fromDom(e.getBody()));const mp=(e,t)=>mr(e,"table",t);const gp=e=>{const t=e.startContainer,o=e.startOffset;if(qs(t)){return o===0?q.some(an.fromDom(t)):q.none()}else{return q.from(t.childNodes[o]).map(an.fromDom)}};const pp=e=>{const t=e.endContainer,o=e.endOffset;if(qs(t)){return o===t.data.length?q.some(an.fromDom(t)):q.none()}else{return q.from(t.childNodes[o-1]).map(an.fromDom)}};const hp=e=>En(e).fold(R([e]),(t=>[e].concat(hp(t))));const yp=e=>Dn(e).fold(R([e]),(t=>{if(xo(t)==="br"){return xn(t).map((t=>[e].concat(yp(t)))).getOr([])}else{return[e].concat(yp(t))}}));const bp=(e,t)=>po(gp(t),pp(t),((t,o)=>{const n=ae(hp(e),H(mn,t));const s=ae(yp(e),H(mn,o));return n.isSome()&&s.isSome()})).getOr(false);const vp=(e,t,o,n)=>{const s=o,r=new vr(o,s);const a=Ee(e.schema.getMoveCaretBeforeOnEnterElements(),((e,t)=>!Y(["td","th","table"],t.toLowerCase())));do{if(qs(o)&&fo.trim(o.nodeValue).length!==0){if(n){t.setStart(o,0)}else{t.setEnd(o,o.nodeValue.length)}return}if(a[o.nodeName]){if(n){t.setStartBefore(o)}else{if(o.nodeName==="BR"){t.setEndBefore(o)}else{t.setEndAfter(o)}}return}}while(o=n?r.next():r.prev());if(s.nodeName==="BODY"){if(n){t.setStart(s,0)}else{t.setEnd(s,s.childNodes.length)}}};const kp=e=>{const t=e.selection.getSel();return t&&t.rangeCount>0};const wp=(e,t)=>{const o=fp(e);if(o.length>0){Z(o,(o=>{const n=o.dom;const s=e.dom.createRng();s.setStartBefore(n);s.setEndAfter(n);t(s,true)}))}else{t(e.selection.getRng(),false)}};const _p=(e,t,o)=>{const n=rd(e,t);o(n);e.moveToBookmark(n)};const xp=(e,t)=>{const o=o=>{if(!e(o)){throw new Error("Can only get "+t+" value of a "+t+" node")}return n(o).getOr("")};const n=t=>e(t)?q.from(t.dom.nodeValue):q.none();const s=(o,n)=>{if(!e(o)){throw new Error("Can only set raw "+t+" value of a "+t+" node")}o.dom.nodeValue=n};return{get:o,getOption:n,set:s}};const zp=xp(Oo,"text");const Cp=e=>zp.get(e);const Sp=e=>zp.getOption(e);const Tp=e=>Oo(e)&&Cp(e)===Wr;const Op=(e,t,o,n)=>vn(t).fold((()=>"skipping"),(s=>{if(n==="br"||Tp(t)){return"valid"}else if(Si(t)){return"existing"}else if(Fm(t.dom)){return"caret"}else if(!Tg(e,o,n)||!Tg(e,xo(s),o)){return"invalid-child"}else{return"valid"}}));const Ep=(e,t)=>{const o=sp(e,t,[{inline:"span"}]);t.setStart(o.startContainer,o.startOffset);t.setEnd(o.endContainer,o.endOffset);e.selection.setRng(t)};const Dp=(e,{uid:t=Ni("mce-annotation"),...o},n,s)=>{const r=an.fromTag("span",e);Xo(r,wi());No(r,`${xi()}`,t);No(r,`${_i()}`,n);const{attributes:a={},classes:c=[]}=s(t,o);Ro(r,a);Ri(r,c);return r};const Ap=(e,t,o,n,s)=>{const r=[];const a=Dp(e.getDoc(),s,o,n);const c=hi();const i=()=>{c.clear()};const l=()=>c.get().getOrThunk((()=>{const e=Li(a);r.push(e);c.set(e);return e}));const d=e=>{Z(e,u)};const u=t=>{const o=Op(e,t,"span",xo(t));switch(o){case"invalid-child":{i();const e=Tn(t);d(e);i();break}case"valid":{const e=l();ns(t,e);break}}};const f=e=>{const t=Q(e,an.fromDom);d(t)};rp(e.dom,t,(e=>{i();f(e)}));return r};const Mp=(e,t,o,n)=>{e.undoManager.transact((()=>{const s=e.selection;const r=s.getRng();const a=fp(e).length>0;if(r.collapsed&&!a){Ep(e,r)}if(s.getRng().collapsed&&!a){const r=Dp(e.getDoc(),n,t,o.decorate);fs(r,jr);s.getRng().insertNode(r.dom);s.select(r.dom)}else{_p(s,false,(()=>{wp(e,(s=>{Ap(e,s,t,o.decorate,n)}))}))}}))};const Np=e=>{const t=Ai();Di(e,t);const o=Ei(e,t);return{register:(e,o)=>{t.register(e,o)},annotate:(o,n)=>{t.lookup(o).each((t=>{Mp(e,o,t,n)}))},annotationChanged:(e,t)=>{o.addListener(e,t)},remove:t=>{const o=e.selection.getBookmark();Ci(e,q.some(t)).each((({elements:e})=>{Z(e,is)}));e.selection.moveToBookmark(o)},removeAll:t=>{const o=e.selection.getBookmark();xe(Oi(e,t),((e,t)=>Z(e,is)));e.selection.moveToBookmark(o)},getAll:t=>{const o=Oi(e,t);return ze(o,(e=>Q(e,(e=>e.dom))))}}};const Rp=e=>({getBookmark:H(ag,e),moveToBookmark:H(cg,e)});Rp.isBookmarkNode=ig;const Bp=(e,t,o)=>{if(o.collapsed){return false}else{return J(o.getClientRects(),(o=>Xi(o,e,t)))}};const Lp=(e,t)=>e.dispatch("PreProcess",t);const Hp=(e,t)=>e.dispatch("PostProcess",t);const Ip=e=>e.dispatch("remove");const Pp=e=>e.dispatch("detach");const Fp=(e,t)=>e.dispatch("SwitchMode",{mode:t});const Vp=(e,t,o,n,s)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:s})};const jp=(e,t,o,n,s)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:s})};const Up=e=>e.dispatch("PreInit");const qp=e=>e.dispatch("PostRender");const Wp=e=>e.dispatch("Init");const $p=(e,t)=>e.dispatch("PlaceholderToggle",{state:t});const Gp=(e,t,o)=>e.dispatch(t,o);const Kp=(e,t,o,n)=>e.dispatch("FormatApply",{format:t,node:o,vars:n});const Xp=(e,t,o,n)=>e.dispatch("FormatRemove",{format:t,node:o,vars:n});const Yp=(e,t)=>e.dispatch("BeforeSetContent",t);const Jp=(e,t)=>e.dispatch("SetContent",t);const Qp=(e,t)=>e.dispatch("BeforeGetContent",t);const Zp=(e,t)=>e.dispatch("GetContent",t);const eh=(e,t)=>e.dispatch("AutocompleterStart",t);const th=(e,t)=>e.dispatch("AutocompleterUpdate",t);const oh=e=>e.dispatch("AutocompleterEnd");const nh=(e,t,o)=>e.dispatch("PastePreProcess",{content:t,internal:o});const sh=(e,t,o)=>e.dispatch("PastePostProcess",{node:t,internal:o});const rh=(e,t)=>e.dispatch("PastePlainTextToggle",{state:t});const ah={BACKSPACE:8,DELETE:46,DOWN:40,ENTER:13,ESC:27,LEFT:37,RIGHT:39,SPACEBAR:32,TAB:9,UP:38,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,modifierPressed:e=>e.shiftKey||e.ctrlKey||e.altKey||ah.metaKeyPressed(e),metaKeyPressed:e=>eo.os.isMacOS()||eo.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey};const ch=(e,t)=>{const o="data-mce-selected";const n=t.dom,s=fo.each;let r,a,c,i,l;let d,u,f,m,g,p,h,y;let b,v;const k=t.getDoc(),w=document;const _=Math.abs,x=Math.round,z=t.getBody();let C,S;const O={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]};const E=e=>T(e)&&(Js(e)||t.dom.is(e,"figure.image"));const D=e=>tr(e)||n.hasClass(e,"mce-preview-object");const A=(e,t)=>{if(e.type==="longpress"||e.type.indexOf("touch")===0){const o=e.touches[0];return E(e.target)&&!Bp(o.clientX,o.clientY,t)}else{return E(e.target)&&!Bp(e.clientX,e.clientY,t)}};const M=e=>{const o=e.target;if(A(e,t.selection.getRng())&&!e.isDefaultPrevented()){t.selection.select(o)}};const N=e=>{if(n.is(e,"figure.image")){return[e.querySelector("img")]}else if(n.hasClass(e,"mce-preview-object")&&T(e.firstElementChild)){return[e,e.firstElementChild]}else{return[e]}};const R=e=>{const o=uu(t);if(!o){return false}if(e.getAttribute("data-mce-resize")==="false"){return false}if(e===t.getBody()){return false}if(n.hasClass(e,"mce-preview-object")){return ln(an.fromDom(e.firstElementChild),o)}else{return ln(an.fromDom(e),o)}};const B=e=>{if(D(e)){return n.create("img",{src:eo.transparentSrc})}else{return e.cloneNode(true)}};const L=(e,o,s)=>{if(T(s)){const r=N(e);Z(r,(e=>{if(e.style[o]||!t.schema.isValid(e.nodeName.toLowerCase(),o)){n.setStyle(e,o,s)}else{n.setAttrib(e,o,""+s)}}))}};const H=(e,t,o)=>{L(e,"width",t);L(e,"height",o)};const I=e=>{let o,s,l;let k,w;o=e.screenX-d;s=e.screenY-u;b=o*i[2]+g;v=s*i[3]+p;b=b<5?5:b;v=v<5?5:v;if((E(r)||D(r))&&fu(t)!==false){l=!ah.modifierPressed(e)}else{l=ah.modifierPressed(e)}if(l){if(_(o)>_(s)){v=x(b*h);b=x(v/h)}else{b=x(v/h);v=x(b*h)}}H(a,b,v);k=i.startPos.x+o;w=i.startPos.y+s;k=k>0?k:0;w=w>0?w:0;n.setStyles(c,{left:k,top:w,display:"block"});c.innerHTML=b+" × "+v;if(i[2]<0&&a.clientWidth<=b){n.setStyle(a,"left",f+(g-b))}if(i[3]<0&&a.clientHeight<=v){n.setStyle(a,"top",m+(p-v))}o=z.scrollWidth-C;s=z.scrollHeight-S;if(o+s!==0){n.setStyles(c,{left:k-o,top:w-s})}if(!y){Vp(t,r,g,p,"corner-"+i.name);y=true}};const P=()=>{const e=y;y=false;if(e){L(r,"width",b);L(r,"height",v)}n.unbind(k,"mousemove",I);n.unbind(k,"mouseup",P);if(w!==k){n.unbind(w,"mousemove",I);n.unbind(w,"mouseup",P)}n.remove(a);n.remove(c);n.remove(l);F(r);if(e){jp(t,r,b,v,"corner-"+i.name);n.setAttrib(r,"style",n.getAttrib(r,"style"))}t.nodeChanged()};const F=e=>{U();const f=n.getPos(e,z);const m=f.x;const y=f.y;const _=e.getBoundingClientRect();const x=_.width||_.right-_.left;const T=_.height||_.bottom-_.top;if(r!==e){V();r=e;b=v=0}const E=t.dispatch("ObjectSelected",{target:e});const D=n.getAttrib(r,o,"1");if(R(e)&&!E.isDefaultPrevented()){s(O,((e,t)=>{let s;const f=s=>{const f=N(r)[0];d=s.screenX;u=s.screenY;g=f.clientWidth;p=f.clientHeight;h=p/g;i=e;i.name=t;i.startPos={x:x*e[0]+m,y:T*e[1]+y};C=z.scrollWidth;S=z.scrollHeight;l=n.add(z,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"});n.setStyles(l,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"});a=B(r);n.addClass(a,"mce-clonedresizable");n.setAttrib(a,"data-mce-bogus","all");a.contentEditable="false";n.setStyles(a,{left:m,top:y,margin:0});H(a,x,T);a.removeAttribute(o);z.appendChild(a);n.bind(k,"mousemove",I);n.bind(k,"mouseup",P);if(w!==k){n.bind(w,"mousemove",I);n.bind(w,"mouseup",P)}c=n.add(z,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},g+" × "+p)};s=n.get("mceResizeHandle"+t);if(s){n.remove(s)}s=n.add(z,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:true,style:"cursor:"+t+"-resize; margin:0; padding:0"});n.bind(s,"mousedown",(e=>{e.stopImmediatePropagation();e.preventDefault();f(e)}));e.elm=s;n.setStyles(s,{left:x*e[0]+m-s.offsetWidth/2,top:T*e[1]+y-s.offsetHeight/2})}))}else{V()}if(!n.getAttrib(r,o)){r.setAttribute(o,D)}};const V=()=>{U();if(r){r.removeAttribute(o)}xe(O,((e,t)=>{const o=n.get("mceResizeHandle"+t);if(o){n.unbind(o);n.remove(o)}}))};const j=r=>{var a;let c,i;const l=(e,t)=>{if(e){do{if(e===t){return true}}while(e=e.parentNode)}};if(y||t.removed){return}s(n.select("img[data-mce-selected],hr[data-mce-selected]"),(e=>{e.removeAttribute(o)}));i=r.type==="mousedown"?r.target:e.getNode();i=(a=pr(an.fromDom(i),"table,img,figure.image,hr,video,span.mce-preview-object").getOrUndefined())===null||a===void 0?void 0:a.dom;if(l(i,z)){q();c=e.getStart(true);if(l(c,i)&&l(e.getEnd(true),i)){F(i);return}}V()};const U=()=>{xe(O,(e=>{if(e.elm){n.unbind(e.elm);delete e.elm}}))};const q=()=>{try{t.getDoc().execCommand("enableObjectResizing",false,"false")}catch(e){}};t.on("init",(()=>{q();const e=yi((e=>{if(!t.composing){j(e)}}),0);t.on("nodechange ResizeEditor ResizeWindow ResizeContent drop FullscreenStateChanged",e.throttle);t.on("keyup compositionend",(t=>{if(r&&r.nodeName==="TABLE"){e.throttle(t)}}));t.on("hide blur",V);t.on("contextmenu longpress",M,true)}));t.on("remove",U);const W=()=>{r=a=l=null};return{isResizable:R,showResizeRect:F,hideResizeRect:V,updateResizeRect:j,destroy:W}};const ih=(e,t)=>{t.fold((t=>{e.setStartBefore(t.dom)}),((t,o)=>{e.setStart(t.dom,o)}),(t=>{e.setStartAfter(t.dom)}))};const lh=(e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))};const dh=(e,t,o)=>{const n=e.document.createRange();ih(n,t);lh(n,o);return n};const uh=(e,t,o,n,s)=>{const r=e.document.createRange();r.setStart(t.dom,o);r.setEnd(n.dom,s);return r};const fh=md.generate([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]);const mh=(e,t,o)=>t(an.fromDom(o.startContainer),o.startOffset,an.fromDom(o.endContainer),o.endOffset);const gh=(e,t)=>t.match({domRange:e=>({ltr:R(e),rtl:q.none}),relative:(t,o)=>({ltr:$e((()=>dh(e,t,o))),rtl:$e((()=>q.some(dh(e,o,t))))}),exact:(t,o,n,s)=>({ltr:$e((()=>uh(e,t,o,n,s))),rtl:$e((()=>q.some(uh(e,n,s,t,o))))})});const ph=(e,t)=>{const o=t.ltr();if(o.collapsed){const n=t.rtl().filter((e=>e.collapsed===false));return n.map((e=>fh.rtl(an.fromDom(e.endContainer),e.endOffset,an.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>mh(e,fh.ltr,o)))}else{return mh(e,fh.ltr,o)}};const hh=(e,t)=>{const o=gh(e,t);return ph(e,o)};fh.ltr;fh.rtl;const yh=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n});const bh={create:yh};const vh=(e,t,o)=>{var n,s;return q.from((s=(n=e.dom).caretPositionFromPoint)===null||s===void 0?void 0:s.call(n,t,o)).bind((t=>{if(t.offsetNode===null){return q.none()}const o=e.dom.createRange();o.setStart(t.offsetNode,t.offset);o.collapse();return q.some(o)}))};const kh=(e,t,o)=>{var n,s;return q.from((s=(n=e.dom).caretRangeFromPoint)===null||s===void 0?void 0:s.call(n,t,o))};const wh=(()=>{if(document.caretPositionFromPoint){return vh}else if(document.caretRangeFromPoint){return kh}else{return q.none}})();const _h=(e,t,o)=>{const n=an.fromDom(e.document);return wh(n,t,o).map((e=>bh.create(an.fromDom(e.startContainer),e.startOffset,an.fromDom(e.endContainer),e.endOffset)))};const xh=md.generate([{before:["element"]},{on:["element","offset"]},{after:["element"]}]);const zh=(e,t,o,n)=>e.fold(t,o,n);const Ch=e=>e.fold(B,B,B);const Sh=xh.before;const Th=xh.on;const Oh=xh.after;const Eh={before:Sh,on:Th,after:Oh,cata:zh,getStart:Ch};const Dh=md.generate([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]);const Ah=e=>Dh.exact(e.start,e.soffset,e.finish,e.foffset);const Mh=e=>e.match({domRange:e=>an.fromDom(e.startContainer),relative:(e,t)=>Eh.getStart(e),exact:(e,t,o,n)=>e});const Nh=Dh.domRange;const Rh=Dh.relative;const Bh=Dh.exact;const Lh=e=>{const t=Mh(e);return bn(t)};const Hh=bh.create;const Ih={domRange:Nh,relative:Rh,exact:Bh,exactFromRange:Ah,getWin:Lh,range:Hh};const Ph=(e,t)=>{const o=xo(e);if("input"===o){return Eh.after(e)}else if(!Y(["br","img"],o)){return Eh.on(e,t)}else{return t===0?Eh.before(e):Eh.after(e)}};const Fh=(e,t)=>{const o=e.fold(Eh.before,Ph,Eh.after);const n=t.fold(Eh.before,Ph,Eh.after);return Ih.relative(o,n)};const Vh=(e,t,o,n)=>{const s=Ph(e,t);const r=Ph(o,n);return Ih.relative(s,r)};const jh=e=>e.match({domRange:e=>{const t=an.fromDom(e.startContainer);const o=an.fromDom(e.endContainer);return Vh(t,e.startOffset,o,e.endOffset)},relative:Fh,exact:Vh});const Uh=(e,t)=>{const o=t||document;const n=o.createDocumentFragment();Z(e,(e=>{n.appendChild(e.dom)}));return an.fromDom(n)};const qh=e=>{const t=Ih.getWin(e).dom;const o=(e,o,n,s)=>uh(t,e,o,n,s);const n=jh(e);return hh(t,n).match({ltr:o,rtl:o})};const Wh=(e,t,o)=>_h(e,t,o);const $h=(e,t,o)=>Wh(o.defaultView,e,t).map((e=>{const t=o.createRange();t.setStart(e.start.dom,e.soffset);t.setEnd(e.finish.dom,e.foffset);return t})).getOrUndefined();const Gh=(e,t)=>e&&t&&(e.startContainer===t.startContainer&&e.startOffset===t.startOffset)&&(e.endContainer===t.endContainer&&e.endOffset===t.endOffset);const Kh=(e,t,o)=>{while(e&&e!==t){if(o(e)){return e}e=e.parentNode}return null};const Xh=(e,t,o)=>Kh(e,t,o)!==null;const Yh=(e,t,o)=>Xh(e,t,(e=>e.nodeName===o));const Jh=e=>e&&e.nodeName==="TABLE";const Qh=e=>e&&/^(TD|TH|CAPTION)$/.test(e.nodeName);const Zh=(e,t)=>Qr(e)&&Xh(e,t,Fm)===false;const ey=(e,t,o)=>{const n=new vr(t,e.getParent(t.parentNode,e.isBlock)||e.getRoot());while(t=n[o?"prev":"next"]()){if(Ys(t)){return true}}};const ty=(e,t)=>e.previousSibling&&e.previousSibling.nodeName===t;const oy=(e,t)=>{while(t&&t!==e){if(Zs(t)){return true}t=t.parentNode}return false};const ny=(e,t,o,n,s)=>{let r;const a=e.getRoot();let c;const i=e.schema.getNonEmptyElements();const l=e.getParent(s.parentNode,e.isBlock)||a;if(n&&Ys(s)&&t&&e.isEmpty(l)){return q.some(Tl(s.parentNode,e.nodeIndex(s)))}const d=new vr(s,l);while(c=d[n?"prev":"next"]()){if(e.getContentEditableParent(c)==="false"||Zh(c,a)){return q.none()}if(qs(c)&&c.nodeValue.length>0){if(Yh(c,a,"A")===false){return q.some(Tl(c,n?c.nodeValue.length:0))}return q.none()}if(e.isBlock(c)||i[c.nodeName.toLowerCase()]){return q.none()}r=c}if(o&&r){return q.some(Tl(r,0))}return q.none()};const sy=(e,t,o,n)=>{let s,r;const a=e.getRoot();let c;let i,l=false;s=n[(o?"start":"end")+"Container"];r=n[(o?"start":"end")+"Offset"];const d=Rs(s)&&r===s.childNodes.length;const u=e.schema.getNonEmptyElements();i=o;if(Qr(s)){return q.none()}if(Rs(s)&&r>s.childNodes.length-1){i=false}if(Ks(s)){s=a;r=0}if(s===a){if(i){c=s.childNodes[r>0?r-1:0];if(c){if(Qr(c)){return q.none()}if(u[c.nodeName]||Jh(c)){return q.none()}}}if(s.hasChildNodes()){r=Math.min(!i&&r>0?r-1:r,s.childNodes.length-1);s=s.childNodes[r];r=qs(s)&&d?s.data.length:0;if(!t&&s===a.lastChild&&Jh(s)){return q.none()}if(oy(a,s)||Qr(s)){return q.none()}if(s.hasChildNodes()&&Jh(s)===false){c=s;const t=new vr(s,a);do{if(Zs(c)||Qr(c)){l=false;break}if(qs(c)&&c.nodeValue.length>0){r=i?0:c.nodeValue.length;s=c;l=true;break}if(u[c.nodeName.toLowerCase()]&&!Qh(c)){r=e.nodeIndex(c);s=c.parentNode;if(!i){r++}l=true;break}}while(c=i?t.next():t.prev())}}}if(t){if(qs(s)&&r===0){ny(e,d,t,true,s).each((e=>{s=e.container();r=e.offset();l=true}))}if(Rs(s)){c=s.childNodes[r];if(!c){c=s.childNodes[r-1]}if(c&&Ys(c)&&!ty(c,"A")&&!ey(e,c,false)&&!ey(e,c,true)){ny(e,d,t,true,c).each((e=>{s=e.container();r=e.offset();l=true}))}}}if(i&&!t&&qs(s)&&r===s.nodeValue.length){ny(e,d,t,false,s).each((e=>{s=e.container();r=e.offset();l=true}))}return l?q.some(Tl(s,r)):q.none()};const ry=(e,t)=>{const o=t.collapsed,n=t.cloneRange();const s=Tl.fromRangeStart(t);sy(e,o,true,n).each((e=>{if(!o||!Tl.isAbove(s,e)){n.setStart(e.container(),e.offset())}}));if(!o){sy(e,o,false,n).each((e=>{n.setEnd(e.container(),e.offset())}))}if(o){n.collapse(true)}return Gh(t,n)?q.none():q.some(n)};const ay=(e,t)=>e.splitText(t);const cy=e=>{let t=e.startContainer,o=e.startOffset,n=e.endContainer,s=e.endOffset;if(t===n&&qs(t)){if(o>0&&o<t.nodeValue.length){n=ay(t,o);t=n.previousSibling;if(s>o){s=s-o;t=n=ay(n,s).previousSibling;s=n.nodeValue.length;o=0}else{s=0}}}else{if(qs(t)&&o>0&&o<t.nodeValue.length){t=ay(t,o);o=0}if(qs(n)&&s>0&&s<n.nodeValue.length){n=ay(n,s).previousSibling;s=n.nodeValue.length}}return{startContainer:t,startOffset:o,endContainer:n,endOffset:s}};const iy=e=>{const t=(t,o)=>rp(e,t,o);const o=cy;const n=t=>ry(e,t).fold(j,(e=>{t.setStart(e.startContainer,e.startOffset);t.setEnd(e.endContainer,e.endOffset);return true}));return{walk:t,split:o,normalize:n}};iy.compareRanges=Gh;iy.getCaretRangeFromPoint=$h;iy.getSelectedNode=el;iy.getNode=tl;const ly=(e,t)=>{const o=(t,o)=>{if(!E(o)&&!o.match(/^[0-9]+$/)){throw new Error(e+".set accepts only positive integer values. Value was "+o)}const n=t.dom;if(en(n)){n.style[e]=o+"px"}};const n=o=>{const n=t(o);if(n<=0||n===null){const t=Gn(o,e);return parseFloat(t)||0}return n};const s=n;const r=(e,t)=>se(t,((t,o)=>{const n=Gn(e,o);const s=n===undefined?0:parseInt(n,10);return isNaN(s)?t:t+s}),0);const a=(e,t,o)=>{const n=r(e,o);const s=t>n?t-n:0;return s};return{set:o,get:n,getOuter:s,aggregate:r,max:a}};const dy=ly("height",(e=>{const t=e.dom;return jn(e)?t.getBoundingClientRect().height:t.offsetHeight}));const uy=e=>dy.get(e);const fy=()=>an.fromDom(document);const my=(e,t)=>{const o=e.view(t);return o.fold(R([]),(t=>{const o=e.owner(t);const n=my(e,o);return[t].concat(n)}))};const gy=(e,t)=>{const o=t.owner(e);return my(t,o)};const py=e=>{var t;const o=e.dom===document?q.none():q.from((t=e.dom.defaultView)===null||t===void 0?void 0:t.frameElement);return o.map(an.fromDom)};const hy=e=>hn(e);var yy=Object.freeze({__proto__:null,view:py,owner:hy});const by=e=>{const t=fy();const o=Ss(t);const n=gy(e,yy);const s=Cs(e);const r=ne(n,((e,t)=>{const o=Cs(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return ws(r.left+s.left+o.left,r.top+s.top+o.top)};const vy=e=>xo(e)==="textarea";const ky=(e,t)=>{const o=e.dispatch("ScrollIntoView",t);return o.isDefaultPrevented()};const wy=(e,t)=>{e.dispatch("AfterScrollIntoView",t)};const _y=(e,t)=>{const o=Tn(e);if(o.length===0||vy(e)){return{element:e,offset:t}}else if(t<o.length&&!vy(o[t])){return{element:o[t],offset:0}}else{const n=o[o.length-1];if(vy(n)){return{element:e,offset:t}}else{if(xo(n)==="img"){return{element:n,offset:1}}else if(Oo(n)){return{element:n,offset:Cp(n).length}}else{return{element:n,offset:Tn(n).length}}}}};const xy=(e,t)=>{const o=zs(e);const n=uy(e);return{element:e,bottom:o.top+n,height:n,pos:o,cleanup:t}};const zy=(e,t)=>{const o=_y(e,t);const n=an.fromHtml('<span data-mce-bogus="all" style="display: inline-block;">'+Wr+"</span>");Zn(o.element,n);return xy(n,(()=>cs(n)))};const Cy=e=>xy(an.fromDom(e),A);const Sy=(e,t,o,n)=>{Dy(e,((s,r)=>Oy(e,t,o,n)),o)};const Ty=(e,t,o,n,s)=>{const r={elm:n.element.dom,alignToTop:s};if(ky(e,r)){return}const a=Ss(t).top;o(t,a,n,s);wy(e,r)};const Oy=(e,t,o,n)=>{const s=an.fromDom(e.getBody());const r=an.fromDom(e.getDoc());Qn(s);const a=zy(an.fromDom(o.startContainer),o.startOffset);Ty(e,r,t,a,n);a.cleanup()};const Ey=(e,t,o,n)=>{const s=an.fromDom(e.getDoc());Ty(e,s,o,Cy(t),n)};const Dy=(e,t,o)=>{const n=o.startContainer;const s=o.startOffset;const r=o.endContainer;const a=o.endOffset;t(an.fromDom(n),an.fromDom(r));const c=e.dom.createRng();c.setStart(n,s);c.setEnd(r,a);e.selection.setRng(o)};const Ay=(e,t,o,n)=>{const s=e.pos;if(o){Ts(s.left,s.top,n)}else{const o=s.top-t+e.height;Ts(s.left,o,n)}};const My=(e,t,o,n,s)=>{const r=o+t;const a=n.pos.top;const c=n.bottom;const i=c-a>=o;if(a<t){Ay(n,o,s!==false,e)}else if(a>r){const t=i?s!==false:s===true;Ay(n,o,t,e)}else if(c>r&&!i){Ay(n,o,s===true,e)}};const Ny=(e,t,o,n)=>{const s=e.dom.defaultView.innerHeight;My(e,t,s,o,n)};const Ry=(e,t,o,n)=>{const s=e.dom.defaultView.innerHeight;My(e,t,s,o,n);const r=by(o.element);const a=As(window);if(r.top<a.y){Os(o.element,n!==false)}else if(r.top>a.bottom){Os(o.element,n===true)}};const By=(e,t,o)=>Sy(e,Ny,t,o);const Ly=(e,t,o)=>Ey(e,t,Ny,o);const Hy=(e,t,o)=>Sy(e,Ry,t,o);const Iy=(e,t,o)=>Ey(e,t,Ry,o);const Py=(e,t,o)=>{const n=e.inline?Ly:Iy;n(e,t,o)};const Fy=(e,t,o)=>{const n=e.inline?By:Hy;n(e,t,o)};const Vy=e=>e.dom.focus();const jy=e=>{const t=Ln(e).dom;return e.dom===t.activeElement};const Uy=(e=fy())=>q.from(e.dom.activeElement).map(an.fromDom);const qy=e=>Uy(Ln(e)).filter((t=>e.dom.contains(t.dom)));const Wy=(e,t)=>{const o=Oo(t)?Cp(t).length:Tn(t).length+1;if(e>o){return o}else if(e<0){return 0}return e};const $y=e=>Ih.range(e.start,Wy(e.soffset,e.start),e.finish,Wy(e.foffset,e.finish));const Gy=(e,t)=>!Ns(t.dom)&&(gn(e,t)||mn(e,t));const Ky=e=>t=>Gy(e,t.start)&&Gy(e,t.finish);const Xy=e=>e.inline;const Yy=e=>Ih.range(an.fromDom(e.startContainer),e.startOffset,an.fromDom(e.endContainer),e.endOffset);const Jy=e=>{const t=e.getSelection();const o=!t||t.rangeCount===0?q.none():q.from(t.getRangeAt(0));return o.map(Yy)};const Qy=e=>{const t=bn(e);return Jy(t.dom).filter(Ky(e))};const Zy=(e,t)=>q.from(t).filter(Ky(e)).map($y);const eb=e=>{const t=document.createRange();try{t.setStart(e.start.dom,e.soffset);t.setEnd(e.finish.dom,e.foffset);return q.some(t)}catch(e){return q.none()}};const tb=e=>{const t=Xy(e)?Qy(an.fromDom(e.getBody())):q.none();e.bookmark=t.isSome()?t:e.bookmark};const ob=e=>{const t=e.bookmark?e.bookmark:q.none();return t.bind((t=>Zy(an.fromDom(e.getBody()),t))).bind(eb)};const nb=e=>{ob(e).each((t=>e.selection.setRng(t)))};const sb=e=>{const t=e.className.toString();return t.indexOf("tox-")!==-1||t.indexOf("mce-")!==-1};const rb={isEditorUIElement:sb};const ab=(e,t)=>{if(!E(t)){t=0}return setTimeout(e,t)};const cb=(e,t)=>{if(!E(t)){t=0}return setInterval(e,t)};const ib={setEditorTimeout:(e,t,o)=>ab((()=>{if(!e.removed){t()}}),o),setEditorInterval:(e,t,o)=>{const n=cb((()=>{if(!e.removed){t()}else{clearInterval(n)}}),o);return n}};const lb=e=>e.type==="nodechange"&&e.selectionChange;const db=(e,t)=>{const o=()=>{t.throttle()};Gc.DOM.bind(document,"mouseup",o);e.on("remove",(()=>{Gc.DOM.unbind(document,"mouseup",o)}))};const ub=(e,t)=>{e.on("mouseup touchend",(e=>{t.throttle()}))};const fb=(e,t)=>{ub(e,t);e.on("keyup NodeChange AfterSetSelectionRange",(t=>{if(!lb(t)){tb(e)}}))};const mb=e=>{const t=yi((()=>{tb(e)}),0);e.on("init",(()=>{if(e.inline){db(e,t)}fb(e,t)}));e.on("remove",(()=>{t.cancel()}))};let gb;const pb=Gc.DOM;const hb=e=>rb.isEditorUIElement(e);const yb=e=>{const t=e.classList;if(t!==undefined){return t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body")}else{return false}};const bb=(e,t)=>{const o=zu(e);const n=pb.getParent(t,(t=>hb(t)||(o?e.dom.is(t,o):false)));return n!==null};const vb=e=>{try{const t=Ln(an.fromDom(e.getElement()));return Uy(t).fold((()=>document.body),(e=>e.dom))}catch(e){return document.body}};const kb=(e,t)=>{const o=t.editor;mb(o);o.on("focusin",(()=>{const t=e.focusedEditor;if(t!==o){if(t){t.dispatch("blur",{focusedEditor:o})}e.setActive(o);e.focusedEditor=o;o.dispatch("focus",{blurredEditor:t});o.focus(true)}}));o.on("focusout",(()=>{ib.setEditorTimeout(o,(()=>{const t=e.focusedEditor;if(!bb(o,vb(o))&&t===o){o.dispatch("blur",{focusedEditor:null});e.focusedEditor=null}}))}));if(!gb){gb=t=>{const o=e.activeEditor;if(o){Fn(t).each((t=>{if(t.ownerDocument===document){if(t!==document.body&&!bb(o,t)&&e.focusedEditor===o){o.dispatch("blur",{focusedEditor:null});e.focusedEditor=null}}}))}};pb.bind(document,"focusin",gb)}};const wb=(e,t)=>{if(e.focusedEditor===t.editor){e.focusedEditor=null}if(!e.activeEditor){pb.unbind(document,"focusin",gb);gb=null}};const _b=e=>{e.on("AddEditor",H(kb,e));e.on("RemoveEditor",H(wb,e))};const xb=(e,t)=>e.dom.getParent(t,(t=>e.dom.getContentEditable(t)==="true"));const zb=e=>e.collapsed?q.from(tl(e.startContainer,e.startOffset)).map(an.fromDom):q.none();const Cb=(e,t)=>zb(t).bind((t=>{if(Hr(t)){return q.some(t)}else if(gn(e,t)===false){return q.some(e)}else{return q.none()}}));const Sb=(e,t)=>{Cb(an.fromDom(e.getBody()),t).bind((e=>Hm(e.dom))).fold((()=>{e.selection.normalize();return}),(t=>e.selection.setRng(t.toRange())))};const Tb=e=>{if(e.setActive){try{e.setActive()}catch(t){e.focus()}}else{e.focus()}};const Ob=e=>jy(e)||qy(e).isSome();const Eb=e=>e.iframeElement&&jy(an.fromDom(e.iframeElement));const Db=e=>{const t=e.getBody();return t&&Ob(an.fromDom(t))};const Ab=e=>{const t=Ln(an.fromDom(e.getElement()));return Uy(t).filter((t=>!yb(t.dom)&&bb(e,t.dom))).isSome()};const Mb=e=>e.inline?Db(e):Eb(e);const Nb=e=>Mb(e)||Ab(e);const Rb=e=>{const t=e.selection;const o=e.getBody();let n=t.getRng();e.quirks.refreshContentEditable();if(e.bookmark!==undefined&&Mb(e)===false){ob(e).each((t=>{e.selection.setRng(t);n=t}))}const s=xb(e,t.getNode());if(e.dom.isChildOf(s,o)){Tb(s);Sb(e,n);Bb(e);return}if(!e.inline){if(!eo.browser.isOpera()){Tb(o)}e.getWin().focus()}if(eo.browser.isFirefox()||e.inline){Tb(o);Sb(e,n)}Bb(e)};const Bb=e=>e.editorManager.setActive(e);const Lb=(e,t)=>{if(e.removed){return}if(t){Bb(e)}else{Rb(e)}};const Hb=(e,t,o,n,s)=>{const r=o?t.startContainer:t.endContainer;const a=o?t.startOffset:t.endOffset;return q.from(r).map(an.fromDom).map((e=>!n||!t.collapsed?On(e,s(e,a)).getOr(e):e)).bind((e=>To(e)?q.some(e):vn(e).filter(To))).map((e=>e.dom)).getOr(e)};const Ib=(e,t,o)=>Hb(e,t,true,o,((e,t)=>Math.min(An(e),t)));const Pb=(e,t,o)=>Hb(e,t,false,o,((e,t)=>t>0?t-1:t));const Fb=(e,t)=>{const o=e;while(e&&qs(e)&&e.length===0){e=t?e.nextSibling:e.previousSibling}return e||o};const Vb=(e,t)=>{let o,n,s;if(!t){return e}n=t.startContainer;s=t.endContainer;const r=t.startOffset;const a=t.endOffset;o=t.commonAncestorContainer;if(!t.collapsed){if(n===s){if(a-r<2){if(n.hasChildNodes()){o=n.childNodes[r]}}}if(n.nodeType===3&&s.nodeType===3){if(n.length===r){n=Fb(n.nextSibling,true)}else{n=n.parentNode}if(a===0){s=Fb(s.previousSibling,false)}else{s=s.parentNode}if(n&&n===s){return n}}}if(o&&o.nodeType===3){return o.parentNode}return o};const jb=(e,t,o,n)=>{let s;const r=[];const a=e.getRoot();o=e.getParent(o||Ib(a,t,t.collapsed),e.isBlock);n=e.getParent(n||Pb(a,t,t.collapsed),e.isBlock);if(o&&o!==a){r.push(o)}if(o&&n&&o!==n){s=o;const t=new vr(o,a);while((s=t.next())&&s!==n){if(e.isBlock(s)){r.push(s)}}}if(n&&o!==n&&n!==a){r.push(n)}return r};const Ub=(e,t,o)=>q.from(t).map((t=>{const n=e.nodeIndex(t);const s=e.createRng();s.setStart(t.parentNode,n);s.setEnd(t.parentNode,n+1);if(o){vp(e,s,t,true);vp(e,s,t,false)}return s}));const qb=(e,t)=>Q(t,(t=>{const o=e.dispatch("GetSelectionRange",{range:t});return o.range!==t?o.range:t}));const Wb=e=>xo(e)==="img"?1:Sp(e).fold((()=>Tn(e).length),(e=>e.length));const $b=e=>Sp(e).filter((e=>e.trim().length!==0||e.indexOf(jr)>-1)).isSome();const Gb=["img","br"];const Kb=e=>{const t=$b(e);return t||Y(Gb,xo(e))};const Xb=e=>fr(e,Kb);const Yb=e=>Jb(e,Kb);const Jb=(e,t)=>{const o=e=>{const n=Tn(e);for(let e=n.length-1;e>=0;e--){const s=n[e];if(t(s)){return q.some(s)}const r=o(s);if(r.isSome()){return r}}return q.none()};return o(e)};const Qb="[data-mce-autocompleter]";const Zb=(e,t)=>{if(tv(an.fromDom(e.getBody())).isNone()){const o=an.fromHtml('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());os(o,an.fromDom(t.extractContents()));t.insertNode(o.dom);vn(o).each((e=>e.dom.normalize()));Yb(o).map((t=>{e.selection.setCursorLocation(t.dom,Wb(t))}))}};const ev=e=>pr(e,Qb);const tv=e=>gr(e,Qb);const ov=(e,t)=>tv(t).each((t=>{const o=e.selection.getBookmark();is(t);e.selection.moveToBookmark(o)}));const nv={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11};const sv=(e,t,o)=>{const n=o?"lastChild":"firstChild";const s=o?"prev":"next";if(e[n]){return e[n]}if(e!==t){let o=e[s];if(o){return o}for(let n=e.parent;n&&n!==t;n=n.parent){o=n[s];if(o){return o}}}};const rv=e=>{if(!Sa(e.value)){return false}const t=e.parent;if(t&&(t.name!=="span"||t.attr("style"))&&/^[ ]+$/.test(e.value)){return false}return true};const av=e=>{const t=e.name==="a"&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class cv{constructor(e,t){this.name=e;this.type=t;if(t===1){this.attributes=[];this.attributes.map={}}}static create(e,t){const o=new cv(e,nv[e]||1);if(t){xe(t,((e,t)=>{o.attr(t,e)}))}return o}replace(e){const t=this;if(e.parent){e.remove()}t.insert(e,t);t.remove();return t}attr(e,t){const o=this;let n;if(typeof e!=="string"){if(e!==undefined&&e!==null){xe(e,((e,t)=>{o.attr(t,e)}))}return o}if(n=o.attributes){if(t!==undefined){if(t===null){if(e in n.map){delete n.map[e];let t=n.length;while(t--){if(n[t].name===e){n.splice(t,1);return o}}}return o}if(e in n.map){let o=n.length;while(o--){if(n[o].name===e){n[o].value=t;break}}}else{n.push({name:e,value:t})}n.map[e]=t;return o}return n.map[e]}}clone(){const e=this;const t=new cv(e.name,e.type);let o;if(o=e.attributes){const e=[];e.map={};for(let t=0,n=o.length;t<n;t++){const n=o[t];if(n.name!=="id"){e[e.length]={name:n.name,value:n.value};e.map[n.name]=n.value}}t.attributes=e}t.value=e.value;return t}wrap(e){const t=this;t.parent.insert(e,t);e.append(t);return t}unwrap(){const e=this;for(let t=e.firstChild;t;){const o=t.next;e.insert(t,e,true);t=o}e.remove()}remove(){const e=this,t=e.parent,o=e.next,n=e.prev;if(t){if(t.firstChild===e){t.firstChild=o;if(o){o.prev=null}}else{n.next=o}if(t.lastChild===e){t.lastChild=n;if(n){n.next=null}}else{o.prev=n}e.parent=e.next=e.prev=null}return e}append(e){const t=this;if(e.parent){e.remove()}const o=t.lastChild;if(o){o.next=e;e.prev=o;t.lastChild=e}else{t.lastChild=t.firstChild=e}e.parent=t;return e}insert(e,t,o){if(e.parent){e.remove()}const n=t.parent||this;if(o){if(t===n.firstChild){n.firstChild=e}else{t.prev.next=e}e.prev=t.prev;e.next=t;t.prev=e}else{if(t===n.lastChild){n.lastChild=e}else{t.next.prev=e}e.next=t.next;e.prev=t;t.next=e}e.parent=n;return e}getAll(e){const t=this;const o=[];for(let n=t.firstChild;n;n=sv(n,t)){if(n.name===e){o.push(n)}}return o}children(){const e=this;const t=[];for(let o=e.firstChild;o;o=o.next){t.push(o)}return t}empty(){const e=this;if(e.firstChild){const t=[];for(let o=e.firstChild;o;o=sv(o,e)){t.push(o)}let o=t.length;while(o--){const e=t[o];e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}}e.firstChild=e.lastChild=null;return e}isEmpty(e,t={},o){const n=this;let s=n.firstChild;if(av(n)){return false}if(s){do{if(s.type===1){if(s.attr("data-mce-bogus")){continue}if(e[s.name]){return false}if(av(s)){return false}}if(s.type===8){return false}if(s.type===3&&!rv(s)){return false}if(s.type===3&&s.parent&&t[s.parent.name]&&Sa(s.value)){return false}if(o&&o(s)){return false}}while(s=sv(s,n))}return true}walk(e){return sv(this,null,e)}}const iv=(e,t)=>/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t));const lv=(e,t,o=0)=>{const n=e.toLowerCase();if(n.indexOf("[if ",o)!==-1&&iv(n,o)){const e=n.indexOf("[endif]",o);return n.indexOf(">",e)}else{if(t){const e=n.indexOf(">",o);return e!==-1?e:n.length}else{const t=/--!?>/g;t.lastIndex=o;const s=t.exec(e);return s?s.index+s[0].length:n.length}}};const dv=(e,t,o)=>{const n=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g;const s=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g;const r=e.getVoidElements();let a=1,c=o;while(a!==0){n.lastIndex=c;while(true){const e=n.exec(t);if(e===null){return c}else if(e[1]==="!"){if(it(e[2],"--")){c=lv(t,false,e.index+"!--".length)}else{c=lv(t,true,e.index+1)}break}else{s.lastIndex=n.lastIndex;const o=s.exec(t);if(x(o)||o.index!==n.lastIndex){continue}if(e[1]==="/"){a-=1}else if(!Ne(r,e[2])){a+=1}c=n.lastIndex+o[0].length;break}}}return c};const uv=(e,t)=>{const o=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(o,"")};const fv=(e,t)=>{const o=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g;const n=e.schema;let s=uv(e.getTempAttrs(),t);const r=n.getVoidElements();let a;while(a=o.exec(s)){const e=o.lastIndex;const t=a[0].length;let c;if(r[a[1]]){c=e}else{c=dv(n,s,e)}s=s.substring(0,e-t)+s.substring(c);o.lastIndex=e-t}return Gr(s)};const mv=fv;const gv=(e,t)=>{const o=Pd(e);const n=new RegExp(`^(<${o}[^>]*>( | |\\s| |<br \\/>|)<\\/${o}>[\r\n]*|<br \\/>[\r\n]*)$`);return t.replace(n,"")};const pv=(e,t,o)=>{let n;if(t.format==="raw"){n=fo.trim(mv(e.serializer,o.innerHTML))}else if(t.format==="text"){n=e.dom.isEmpty(o)?"":Gr(o.innerText||o.textContent)}else if(t.format==="tree"){n=e.serializer.serialize(o,t)}else{n=gv(e,e.serializer.serialize(o,t))}const s=t.format!=="text"&&!Pr(an.fromDom(o));return s&&v(n)?fo.trim(n):n};const hv=(e,t)=>q.from(e.getBody()).fold(R(t.format==="tree"?new cv("body",11):""),(o=>pv(e,t,o)));const yv=fo.each;const bv=e=>{const t=(t,o)=>{if(t.nodeName!==o.nodeName){return false}const n=t=>{const o={};yv(e.getAttribs(t),(n=>{const s=n.nodeName.toLowerCase();if(s.indexOf("_")!==0&&s!=="style"&&s.indexOf("data-")!==0){o[s]=e.getAttrib(t,s)}}));return o};const s=(e,t)=>{let o,n;for(n in e){if(Ne(e,n)){o=t[n];if(typeof o==="undefined"){return false}if(e[n]!==o){return false}delete t[n]}}for(n in t){if(Ne(t,n)){return false}}return true};if(!s(n(t),n(o))){return false}if(!s(e.parseStyle(e.getAttrib(t,"style")),e.parseStyle(e.getAttrib(o,"style")))){return false}return!ig(t)&&!ig(o)};return{compare:t}};const vv=fo.makeMap;const kv=e=>{const t=[];e=e||{};const o=e.indent;const n=vv(e.indent_before||"");const s=vv(e.indent_after||"");const r=uc.getEncodeFunc(e.entity_encoding||"raw",e.entities);const a=e.element_format!=="xhtml";return{start:(e,c,i)=>{let l,d,u,f;if(o&&n[e]&&t.length>0){f=t[t.length-1];if(f.length>0&&f!=="\n"){t.push("\n")}}t.push("<",e);if(c){for(l=0,d=c.length;l<d;l++){u=c[l];t.push(" ",u.name,'="',r(u.value,true),'"')}}if(!i||a){t[t.length]=">"}else{t[t.length]=" />"}if(i&&o&&s[e]&&t.length>0){f=t[t.length-1];if(f.length>0&&f!=="\n"){t.push("\n")}}},end:e=>{let n;t.push("</",e,">");if(o&&s[e]&&t.length>0){n=t[t.length-1];if(n.length>0&&n!=="\n"){t.push("\n")}}},text:(e,o)=>{if(e.length>0){t[t.length]=o?e:r(e)}},cdata:e=>{t.push("<![CDATA[",e,"]]>")},comment:e=>{t.push("\x3c!--",e,"--\x3e")},pi:(e,n)=>{if(n){t.push("<?",e," ",r(n),"?>")}else{t.push("<?",e,"?>")}if(o){t.push("\n")}},doctype:e=>{t.push("<!DOCTYPE",e,">",o?"\n":"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}};const wv=(e,t=_c())=>{const o=kv(e);e=e||{};e.validate="validate"in e?e.validate:true;const n=n=>{const s=e.validate;const r={3:e=>{o.text(e.value,e.raw)},8:e=>{o.comment(e.value)},7:e=>{o.pi(e.name,e.value)},10:e=>{o.doctype(e.value)},4:e=>{o.cdata(e.value)},11:e=>{if(e=e.firstChild){do{a(e)}while(e=e.next)}}};o.reset();const a=e=>{const n=r[e.type];if(!n){const n=e.name;const r=n in t.getVoidElements();let c=e.attributes;if(s&&c&&c.length>1){const o=[];o.map={};const n=t.getElementRule(e.name);if(n){for(let e=0,t=n.attributesOrder.length;e<t;e++){const t=n.attributesOrder[e];if(t in c.map){const e=c.map[t];o.map[t]=e;o.push({name:t,value:e})}}for(let e=0,t=c.length;e<t;e++){const t=c[e].name;if(!(t in o.map)){const e=c.map[t];o.map[t]=e;o.push({name:t,value:e})}}c=o}}o.start(n,c,r);if(!r){let t=e.firstChild;if(t){if((n==="pre"||n==="textarea")&&t.type===3&&t.value[0]==="\n"){o.text("\n",true)}do{a(t)}while(t=t.next)}o.end(n)}}else{n(e)}};if(n.type===1&&!e.inner){a(n)}else if(n.type===3){r[3](n)}else{r[11](n)}return o.getContent()};return{serialize:n}};const _v=new Set;(()=>{const e=["margin","margin-left","margin-right","margin-top","margin-bottom","padding","padding-left","padding-right","padding-top","padding-bottom","border","border-width","border-style","border-color","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","float","position","left","right","top","bottom","z-index","display","transform","width","max-width","min-width","height","max-height","min-height","overflow","overflow-x","overflow-y","text-overflow","vertical-align","transition","transition-delay","transition-duration","transition-property","transition-timing-function"];Z(e,(e=>{_v.add(e)}))})();const xv=["font","text-decoration","text-emphasis"];const zv=(e,t)=>we(e.parseStyle(e.getAttrib(t,"style")));const Cv=e=>_v.has(e);const Sv=(e,t)=>de(zv(e,t),(e=>!Cv(e)));const Tv=e=>oe(e,(e=>J(xv,(t=>it(e,t)))));const Ov=(e,t,o)=>{const n=zv(e,t);const s=zv(e,o);const r=n=>{var s,r;const a=(s=e.getStyle(t,n))!==null&&s!==void 0?s:"";const c=(r=e.getStyle(o,n))!==null&&r!==void 0?r:"";return gt(a)&>(c)&&a!==c};return J(n,(e=>{const t=t=>J(t,(t=>t===e));if(!t(s)&&t(xv)){const e=Tv(s);return J(e,r)}else{return r(e)}}))};const Ev=(e,t,o)=>q.from(o.container()).filter(qs).exists((n=>{const s=e?0:-1;return t(n.data.charAt(o.offset()+s))}));const Dv=H(Ev,true,ug);const Av=H(Ev,false,ug);const Mv=e=>{const t=e.container();return qs(t)&&(t.data.length===0||$r(t.data)&&Rp.isBookmarkNode(t.parentNode))};const Nv=(e,t)=>o=>q.from(Jf(e?0:-1,o)).filter(t).isSome();const Rv=e=>Js(e)&&Gn(an.fromDom(e),"display")==="block";const Bv=e=>Zs(e)&&!Fs(e);const Lv=Nv(true,Rv);const Hv=Nv(false,Rv);const Iv=Nv(true,tr);const Pv=Nv(false,tr);const Fv=Nv(true,Vs);const Vv=Nv(false,Vs);const jv=Nv(true,Bv);const Uv=Nv(false,Bv);const qv=e=>{const t=[];let o=e.dom;while(o){t.push(an.fromDom(o));o=o.lastChild}return t};const Wv=e=>{const t=ki(e,"br");const o=oe(qv(e).slice(-1),Nr);if(t.length===o.length){Z(o,cs)}};const $v=e=>{as(e);os(e,an.fromHtml('<br data-mce-bogus="1">'))};const Gv=e=>{Dn(e).each((t=>{xn(t).each((o=>{if(Dr(e)&&Nr(t)&&Dr(o)){cs(t)}}))}))};const Kv=e=>e.slice(0,-1);const Xv=(e,t,o)=>{if(gn(t,e)){return Kv(wn(e,(e=>o(e)||mn(e,t))))}else{return[]}};const Yv=(e,t)=>Xv(e,t,j);const Jv=(e,t)=>[e].concat(Yv(e,t));const Qv=(e,t,o)=>Nm(e,t,o,Mv);const Zv=(e,t)=>ae(Jv(an.fromDom(t.container()),e),Dr);const ek=(e,t,o)=>Qv(e,t.dom,o).forall((e=>Zv(t,o).fold((()=>Yf(e,o,t.dom)===false),(n=>Yf(e,o,t.dom)===false&&gn(n,an.fromDom(e.container()))))));const tk=(e,t,o)=>Zv(t,o).fold((()=>Qv(e,t.dom,o).forall((e=>Yf(e,o,t.dom)===false))),(t=>Qv(e,t.dom,o).isNone()));const ok=H(tk,false);const nk=H(tk,true);const sk=H(ek,false);const rk=H(ek,true);const ak=e=>am(e).exists(Nr);const ck=(e,t,o)=>{const n=oe(Jv(an.fromDom(o.container()),t),Dr);const s=he(n).getOr(t);return Am(e,s.dom,o).filter(ak)};const ik=(e,t)=>am(t).exists(Nr)||ck(true,e,t).isSome();const lk=(e,t)=>cm(t).exists(Nr)||ck(false,e,t).isSome();const dk=H(ck,false);const uk=H(ck,true);const fk=e=>Tl.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd();const mk=(e,t)=>{const o=oe(Jv(an.fromDom(t.container()),e),Dr);return he(o).getOr(e)};const gk=(e,t)=>{if(fk(t)){return Av(t)}else{return Av(t)||Lm(mk(e,t).dom,t).exists(Av)}};const pk=(e,t)=>{if(fk(t)){return Dv(t)}else{return Dv(t)||Bm(mk(e,t).dom,t).exists(Dv)}};const hk=e=>Y(["pre","pre-wrap"],e);const yk=e=>am(e).bind((e=>lr(e,To))).exists((e=>hk(Gn(e,"white-space"))));const bk=(e,t)=>Lm(e.dom,t).isNone();const vk=(e,t)=>Bm(e.dom,t).isNone();const kk=(e,t)=>bk(e,t)||vk(e,t)||ok(e,t)||nk(e,t)||lk(e,t)||ik(e,t);const wk=(e,t)=>{if(yk(t)){return false}else{return kk(e,t)||gk(e,t)||pk(e,t)}};const _k=(e,t)=>{if(yk(t)){return false}else{return ok(e,t)||sk(e,t)||lk(e,t)||gk(e,t)}};const xk=e=>{const t=e.container();const o=e.offset();if(qs(t)&&o<t.data.length){return Tl(t,o+1)}else{return e}};const zk=(e,t)=>{if(yk(t)){return false}else{return nk(e,t)||rk(e,t)||ik(e,t)||pk(e,t)}};const Ck=(e,t)=>_k(e,t)||zk(e,xk(t));const Sk=(e,t)=>dg(e.charAt(t));const Tk=e=>{const t=e.container();return qs(t)&&ct(t.data,jr)};const Ok=e=>{const t=e.split("");return Q(t,((e,o)=>{if(dg(e)&&o>0&&o<t.length-1&&fg(t[o-1])&&fg(t[o+1])){return" "}else{return e}})).join("")};const Ek=(e,t)=>{const o=t.data;const n=Tl(t,0);if(Sk(o,0)&&!Ck(e,n)){t.data=" "+o.slice(1);return true}else{return false}};const Dk=e=>{const t=e.data;const o=Ok(t);if(o!==t){e.data=o;return true}else{return false}};const Ak=(e,t)=>{const o=t.data;const n=Tl(t,o.length-1);if(Sk(o,o.length-1)&&!Ck(e,n)){t.data=o.slice(0,-1)+" ";return true}else{return false}};const Mk=(e,t)=>q.some(t).filter(Tk).bind((t=>{const o=t.container();const n=Ek(e,o)||Dk(o)||Ak(e,o);return n?q.some(t):q.none()}));const Nk=e=>{const t=an.fromDom(e.getBody());if(e.selection.isCollapsed()){Mk(t,Tl.fromRangeStart(e.selection.getRng())).each((t=>{e.selection.setRng(t.toRange())}))}};const Rk=(e,t,o)=>{if(o===0){return}const n=an.fromDom(e);const s=ir(n,Dr).getOr(n);const r=e.data.slice(t,t+o);const a=t+o>=e.data.length&&zk(s,Tl(e,e.data.length));const c=t===0&&_k(s,Tl(e,0));e.replaceData(t,o,Da(r,4,c,a))};const Bk=(e,t)=>{const o=e.data.slice(t);const n=o.length-ft(o).length;Rk(e,t,n)};const Lk=(e,t)=>{const o=e.data.slice(0,t);const n=o.length-mt(o).length;Rk(e,t-n,n)};const Hk=(e,t,o,n=true)=>{const s=mt(e.data).length;const r=n?e:t;const a=n?t:e;if(n){r.appendData(a.data)}else{r.insertData(0,a.data)}cs(an.fromDom(a));if(o){Bk(r,s)}return r};const Ik=(e,t)=>{const o=e.container();const n=e.offset();return Tl.isTextPosition(e)===false&&o===t.parentNode&&n>Tl.before(t).offset()};const Pk=(e,t)=>Ik(t,e)?Tl(t.container(),t.offset()-1):t;const Fk=e=>qs(e)?Tl(e,0):Tl.before(e);const Vk=e=>qs(e)?Tl(e,e.data.length):Tl.after(e);const jk=e=>{if(ba(e.previousSibling)){return q.some(Vk(e.previousSibling))}else{return e.previousSibling?Im(e.previousSibling):q.none()}};const Uk=e=>{if(ba(e.nextSibling)){return q.some(Fk(e.nextSibling))}else{return e.nextSibling?Hm(e.nextSibling):q.none()}};const qk=(e,t)=>{const o=Tl.before(t.previousSibling?t.previousSibling:t.parentNode);return Lm(e,o).fold((()=>Bm(e,Tl.after(t))),q.some)};const Wk=(e,t)=>Bm(e,Tl.after(t)).fold((()=>Lm(e,Tl.before(t))),q.some);const $k=(e,t)=>jk(t).orThunk((()=>Uk(t))).orThunk((()=>qk(e,t)));const Gk=(e,t)=>Uk(t).orThunk((()=>jk(t))).orThunk((()=>Wk(e,t)));const Kk=(e,t,o)=>e?Gk(t,o):$k(t,o);const Xk=(e,t,o)=>Kk(e,t,o).map(H(Pk,o));const Yk=(e,t,o)=>{o.fold((()=>{e.focus()}),(o=>{e.selection.setRng(o.toRange(),t)}))};const Jk=e=>t=>t.dom===e;const Qk=(e,t)=>t&&Ne(e.schema.getBlockElements(),xo(t));const Zk=e=>{if(Pa(e)){const t=an.fromHtml('<br data-mce-bogus="1">');as(e);os(e,t);return q.some(Tl.before(t.dom))}else{return q.none()}};const ew=(e,t,o)=>{const n=xn(e).filter(Oo);const s=zn(e).filter(Oo);cs(e);return ho(n,s,t,((e,t,n)=>{const s=e.dom,r=t.dom;const a=s.data.length;Hk(s,r,o);return n.container()===r?Tl(s,a):n})).orThunk((()=>{if(o){n.each((e=>Lk(e.dom,e.dom.length)));s.each((e=>Bk(e.dom,0)))}return t}))};const tw=(e,t)=>Ne(e.schema.getTextInlineElements(),xo(t));const ow=(e,t,o,n=true)=>{const s=Xk(t,e.getBody(),o.dom);const r=ir(o,H(Qk,e),Jk(e.getBody()));const a=ew(o,s,tw(e,o));if(e.dom.isEmpty(e.getBody())){e.setContent("");e.selection.setCursorLocation()}else{r.bind(Zk).fold((()=>{if(n){Yk(e,t,a)}}),(o=>{if(n){Yk(e,t,q.some(o))}}))}};const nw=e=>t=>mn(e,t);const sw=e=>ki(e,"td,th");const rw=(e,t)=>{const o=e=>mp(an.fromDom(e),t);const n=o(e.startContainer);const s=o(e.endContainer);const r=n.isSome();const a=s.isSome();const c=po(n,s,mn).getOr(false);const i=!c&&r&&a;return{startTable:n,endTable:s,isStartInTable:r,isEndInTable:a,isSameTable:c,isMultiTable:i}};const aw=(e,t)=>({start:e,end:t});const cw=(e,t,o)=>({rng:e,table:t,cells:o});const iw=md.generate([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]);const lw=(e,t)=>pr(an.fromDom(e),"td,th",t);const dw=e=>!mn(e.start,e.end);const uw=(e,t)=>mp(e.start,t).bind((o=>mp(e.end,t).bind((e=>yo(mn(o,e),o)))));const fw=(e,t)=>!dw(e)&&uw(e,t).exists((e=>{const t=e.dom.rows;return t.length===1&&t[0].cells.length===1}));const mw=(e,t)=>{const o=lw(e.startContainer,t);const n=lw(e.endContainer,t);return po(o,n,aw)};const gw=e=>t=>mp(t,e).bind((e=>ye(sw(e)).map((e=>aw(t,e)))));const pw=e=>t=>mp(t,e).bind((e=>he(sw(e)).map((e=>aw(e,t)))));const hw=e=>t=>uw(t,e).map((e=>cw(t,e,sw(e))));const yw=(e,t,o,n)=>{if(o.collapsed||!e.forall(dw)){return q.none()}else if(t.isSameTable){const t=e.bind(hw(n));return q.some({start:t,end:t})}else{const e=lw(o.startContainer,n);const t=lw(o.endContainer,n);const s=e.bind(gw(n)).bind(hw(n));const r=t.bind(pw(n)).bind(hw(n));return q.some({start:s,end:r})}};const bw=(e,t)=>ce(e,(e=>mn(e,t)));const vw=e=>po(bw(e.cells,e.rng.start),bw(e.cells,e.rng.end),((t,o)=>e.cells.slice(t,o+1)));const kw=(e,t,o)=>e.exists((e=>fw(e,o)&&bp(e.start,t)));const ww=(e,t)=>{const{startTable:o,endTable:n}=t;const s=e.cloneRange();o.each((e=>s.setStartAfter(e.dom)));n.each((e=>s.setEndBefore(e.dom)));return s};const _w=(e,t,o,n)=>yw(e,t,o,n).bind((({start:e,end:t})=>e.or(t))).bind((e=>{const{isSameTable:n}=t;const s=vw(e).getOr([]);if(n&&e.cells.length===s.length){return q.some(iw.fullTable(e.table))}else if(s.length>0){if(n){return q.some(iw.partialTable(s,q.none()))}else{const e=ww(o,t);return q.some(iw.partialTable(s,q.some({...t,rng:e})))}}else{return q.none()}}));const xw=(e,t,o,n)=>yw(e,t,o,n).bind((({start:e,end:n})=>{const s=e.bind(vw).getOr([]);const r=n.bind(vw).getOr([]);if(s.length>0&&r.length>0){const e=ww(o,t);return q.some(iw.multiTable(s,r,e))}else{return q.none()}}));const zw=(e,t)=>{const o=nw(e);const n=mw(t,o);const s=rw(t,o);if(kw(n,t,o)){return n.map((e=>iw.singleCellTable(t,e.start)))}else if(s.isMultiTable){return xw(n,s,t,o)}else{return _w(n,s,t,o)}};const Cw=e=>{const t=So(e)?xn(e):Dn(e);return t.bind(Cw).orThunk((()=>q.some(e)))};const Sw=e=>Z(e,(e=>{Io(e,"contenteditable");$v(e)}));const Tw=(e,t)=>q.from(e.dom.getParent(t,e.dom.isBlock)).map(an.fromDom);const Ow=(e,t,o)=>{o.each((o=>{if(t){cs(o)}else{$v(o);e.selection.setCursorLocation(o.dom,0)}}))};const Ew=(e,t,o,n)=>{const s=o.cloneRange();if(n){s.setStart(o.startContainer,o.startOffset);s.setEndAfter(t.dom.lastChild)}else{s.setStartBefore(t.dom.firstChild);s.setEnd(o.endContainer,o.endOffset)}Nw(e,s,t,false).each((e=>e()))};const Dw=e=>{const t=fp(e);const o=an.fromDom(e.selection.getNode());if(er(o.dom)&&Pa(o)){e.selection.setCursorLocation(o.dom,0)}else{e.selection.collapse(true)}if(t.length>1&&J(t,(e=>mn(e,o)))){No(o,"data-mce-selected","1")}};const Aw=(e,t,o)=>q.some((()=>{const n=e.selection.getRng();const s=o.bind((({rng:o,isStartInTable:s})=>{const r=Tw(e,s?o.endContainer:o.startContainer);o.deleteContents();Ow(e,s,r.filter(Pa));const a=s?t[0]:t[t.length-1];Ew(e,a,n,s);if(!Pa(a)){return q.some(s?t.slice(1):t.slice(0,-1))}else{return q.none()}})).getOr(t);Sw(s);Dw(e)}));const Mw=(e,t,o,n)=>q.some((()=>{const s=e.selection.getRng();const r=t[0];const a=o[o.length-1];Ew(e,r,s,true);Ew(e,a,s,false);const c=Pa(r)?t:t.slice(1);const i=Pa(a)?o:o.slice(0,-1);Sw(c.concat(i));n.deleteContents();Dw(e)}));const Nw=(e,t,o,n=true)=>q.some((()=>{t.deleteContents();const s=Cw(o).getOr(o);const r=an.fromDom(e.dom.getParent(s.dom,e.dom.isBlock));if(Pa(r)){$v(r);if(n){e.selection.setCursorLocation(r.dom,0)}}if(!mn(o,r)){const e=mo(vn(r),o)?[]:_n(r);Z(e.concat(Tn(o)),(e=>{if(!mn(e,r)&&!gn(e,r)&&Pa(e)){cs(e)}}))}}));const Rw=(e,t)=>q.some((()=>ow(e,false,t)));const Bw=(e,t,o)=>zw(t,o).bind((t=>t.fold(H(Nw,e),H(Rw,e),H(Aw,e),H(Mw,e))));const Lw=(e,t)=>jw(e,t);const Hw=(e,t,o,n)=>Fw(t,n).fold((()=>Bw(e,t,o)),(t=>Lw(e,t)));const Iw=(e,t,o)=>{const n=an.fromDom(e.getBody());const s=e.selection.getRng();return o.length!==0?Aw(e,o,q.none()):Hw(e,n,s,t)};const Pw=(e,t)=>ae(Jv(t,e),Ir);const Fw=(e,t)=>ae(Jv(t,e),Ao("caption"));const Vw=(e,t,o,n,s)=>Mm(o,e.getBody(),s).bind((e=>Pw(t,an.fromDom(e.getNode())).bind((e=>mn(e,n)?q.none():q.some(A)))));const jw=(e,t)=>q.some((()=>{$v(t);e.selection.setCursorLocation(t.dom,0)}));const Uw=(e,t,o,n)=>Hm(e.dom).bind((s=>Im(e.dom).map((e=>t?o.isEqual(s)&&n.isEqual(e):o.isEqual(e)&&n.isEqual(s))))).getOr(true);const qw=(e,t)=>jw(e,t);const Ww=(e,t,o)=>Fw(e,an.fromDom(o.getNode())).fold((()=>q.some(A)),(e=>yo(!mn(e,t),A)));const $w=(e,t,o,n,s)=>Mm(o,e.getBody(),s).fold((()=>q.some(A)),(r=>Uw(n,o,s,r)?qw(e,n):Ww(t,n,r)));const Gw=(e,t,o,n)=>{const s=Tl.fromRangeStart(e.selection.getRng());return Pw(o,n).bind((n=>Pa(n)?jw(e,n):Vw(e,o,t,n,s)))};const Kw=(e,t,o,n)=>{const s=Tl.fromRangeStart(e.selection.getRng());return Pa(n)?jw(e,n):$w(e,o,t,n,s)};const Xw=(e,t)=>e?Fv(t):Vv(t);const Yw=(e,t)=>{const o=Tl.fromRangeStart(e.selection.getRng());return Xw(t,o)||Am(t,e.getBody(),o).exists((e=>Xw(t,e)))};const Jw=(e,t,o)=>{const n=an.fromDom(e.getBody());return Fw(n,o).fold((()=>Gw(e,t,n,o).orThunk((()=>yo(Yw(e,t),A)))),(o=>Kw(e,t,n,o)))};const Qw=(e,t)=>{const o=an.fromDom(e.selection.getStart(true));const n=fp(e);return e.selection.isCollapsed()&&n.length===0?Jw(e,t,o):Iw(e,o,n)};const Zw=(e,t)=>{while(t&&t!==e){if(Qs(t)||Zs(t)){return t}t=t.parentNode}return null};const e_=(e,t)=>{t(e);if(e.firstChild){e_(e.firstChild,t)}if(e.next){e_(e.next,t)}};const t_=(e,t,o,n)=>{const s=o.name;for(let t=0,r=e.length;t<r;t++){const r=e[t];if(r.name===s){const e=n.nodes[s];if(e){e.nodes.push(o)}else{n.nodes[s]={filter:r,nodes:[o]}}}}if(o.attributes){for(let e=0,s=t.length;e<s;e++){const s=t[e];const r=s.name;if(r in o.attributes.map){const e=n.attributes[r];if(e){e.nodes.push(o)}else{n.attributes[r]={filter:s,nodes:[o]}}}}}};const o_=(e,t,o)=>{const n={nodes:{},attributes:{}};if(o.firstChild){e_(o.firstChild,(o=>{t_(e,t,o,n)}))}return n};const n_=(e,t)=>{const o=e=>{xe(e,(e=>{const o=oe(e.nodes,(e=>T(e.parent)));Z(e.filter.callbacks,(n=>{n(o,e.filter.name,t)}))}))};o(e.nodes);o(e.attributes)};const s_=(e,t,o,n={})=>{const s=o_(e,t,o);n_(s,n)};const r_=(e,t,o,n)=>{if(t.insert&&o[n.name]){n.empty().append(new cv("br",1))}else{n.empty().append(new cv("#text",3)).value=jr}};const a_=e=>c_(e,"#text")&&e.firstChild.value===jr;const c_=(e,t)=>e&&e.firstChild&&e.firstChild===e.lastChild&&e.firstChild.name===t;const i_=(e,t)=>{const o=e.getElementRule(t.name);return o&&o.paddEmpty};const l_=(e,t,o,n)=>n.isEmpty(t,o,(t=>i_(e,t)));const d_=(e,t)=>e&&(e.name in t||e.name==="br");const u_=(e,t,o=e.parent)=>{if(t.getSpecialElements()[e.name]){e.empty().remove()}else{const n=e.children();for(const e of n){if(!t.isValidChild(o.name,e.name)){u_(e,t,o)}}e.unwrap()}};const f_=(e,t,o=A)=>{const n=t.getTextBlockElements();const s=t.getNonEmptyElements();const r=t.getWhitespaceElements();const a=fo.makeMap("tr,td,th,tbody,thead,tfoot,table");const c=new Set;for(let i=0;i<e.length;i++){const l=e[i];let d;let u;let f;if(!l.parent||c.has(l)){continue}if(n[l.name]&&l.parent.name==="li"){let e=l.next;while(e){if(n[e.name]){e.name="li";c.add(e);l.parent.insert(e,l.parent)}else{break}e=e.next}l.unwrap();continue}const m=[l];for(d=l.parent;d&&!t.isValidChild(d.name,l.name)&&!a[d.name];d=d.parent){m.push(d)}if(d&&m.length>1){if(t.isValidChild(d.name,l.name)){m.reverse();u=m[0].clone();o(u);let e=u;for(let n=0;n<m.length-1;n++){if(t.isValidChild(e.name,m[n].name)){f=m[n].clone();o(f);e.append(f)}else{f=e}for(let e=m[n].firstChild;e&&e!==m[n+1];){const t=e.next;f.append(e);e=t}e=f}if(!l_(t,s,r,u)){d.insert(u,m[0],true);d.insert(l,u)}else{d.insert(l,m[0],true)}d=m[0];if(l_(t,s,r,d)||c_(d,"br")){d.empty().remove()}}else{u_(l,t)}}else if(l.parent){if(l.name==="li"){let e=l.prev;if(e&&(e.name==="ul"||e.name==="ol")){e.append(l);continue}e=l.next;if(e&&(e.name==="ul"||e.name==="ol")){e.insert(l,e.firstChild,true);continue}const t=new cv("ul",1);o(t);l.wrap(t);continue}if(t.isValidChild(l.parent.name,"div")&&t.isValidChild("div",l.name)){const e=new cv("div",1);o(e);l.wrap(e)}else{u_(l,t)}}}};const m_=(e,t,o,n)=>{const s=document.createRange();s.setStart(e,t);s.setEnd(o,n);return s};const g_=e=>{const t=Tl.fromRangeStart(e);const o=Tl.fromRangeEnd(e);const n=e.commonAncestorContainer;return Am(false,n,o).map((s=>{if(!Yf(t,o,n)&&Yf(t,s,n)){return m_(t.container(),t.offset(),s.container(),s.offset())}else{return e}})).getOr(e)};const p_=e=>e.collapsed?e:g_(e);const h_=e=>e.firstChild&&e.firstChild===e.lastChild;const y_=e=>e.name==="br"||e.value===jr;const b_=(e,t)=>{const o=e.getBlockElements();return o[t.name]&&h_(t)&&y_(t.firstChild)};const v_=(e,t)=>{const o=e.getNonEmptyElements();return t&&(t.isEmpty(o)||b_(e,t))};const k_=(e,t)=>{let o=t.firstChild;let n=t.lastChild;if(o&&o.name==="meta"){o=o.next}if(n&&n.attr("id")==="mce_marker"){n=n.prev}if(v_(e,n)){n=n.prev}if(!o||o!==n){return false}return o.name==="ul"||o.name==="ol"};const w_=e=>{const t=e.firstChild;const o=e.lastChild;if(t&&t.nodeName==="META"){t.parentNode.removeChild(t)}if(o&&o.id==="mce_marker"){o.parentNode.removeChild(o)}return e};const __=(e,t,o)=>{const n=t.serialize(o);const s=e.createFragment(n);return w_(s)};const x_=e=>oe(e.childNodes,(e=>e.nodeName==="LI"));const z_=e=>e.data===jr||Ys(e);const C_=e=>e&&e.firstChild&&e.firstChild===e.lastChild&&z_(e.firstChild);const S_=e=>!e.firstChild||C_(e);const T_=e=>e.length>0&&S_(e[e.length-1])?e.slice(0,-1):e;const O_=(e,t)=>{const o=e.getParent(t,e.isBlock);return o&&o.nodeName==="LI"?o:null};const E_=(e,t)=>!!O_(e,t);const D_=(e,t)=>{const o=t.cloneRange();const n=t.cloneRange();o.setStartBefore(e);n.setEndAfter(e);return[o.cloneContents(),n.cloneContents()]};const A_=(e,t)=>{const o=Tl.before(e);const n=xm(t);const s=n.next(o);return s?s.toRange():null};const M_=(e,t)=>{const o=Tl.after(e);const n=xm(t);const s=n.prev(o);return s?s.toRange():null};const N_=(e,t,o,n)=>{const s=D_(e,n);const r=e.parentNode;r.insertBefore(s[0],e);fo.each(t,(t=>{r.insertBefore(t,e)}));r.insertBefore(s[1],e);r.removeChild(e);return M_(t[t.length-1],o)};const R_=(e,t,o)=>{const n=e.parentNode;fo.each(t,(t=>{n.insertBefore(t,e)}));return A_(e,o)};const B_=(e,t,o,n)=>{n.insertAfter(t.reverse(),e);return M_(t[0],o)};const L_=(e,t,o,n)=>{const s=__(t,e,n);const r=O_(t,o.startContainer);const a=T_(x_(s.firstChild));const c=1,i=2;const l=t.getRoot();const d=e=>{const n=Tl.fromRangeStart(o);const s=xm(t.getRoot());const a=e===c?s.prev(n):s.next(n);return a?O_(t,a.getNode())!==r:true};if(d(c)){return R_(r,a,l)}else if(d(i)){return B_(r,a,l,t)}return N_(r,a,l,o)};const H_=er;const I_=(e,t,o)=>{if(o!==null){const n=e.getParent(t.endContainer,H_);return o===n&&bp(an.fromDom(o),t)}else{return false}};const P_=(e,t,o)=>{if(o.getAttribute("data-mce-bogus")==="all"){o.parentNode.insertBefore(e.dom.createFragment(t),o)}else{const n=o.firstChild;const s=o.lastChild;if(!n||n===s&&n.nodeName==="BR"){e.dom.setHTML(o,t)}else{e.selection.setContent(t,{no_events:true})}}};const F_=(e,t)=>{q.from(e.getParent(t,"td,th")).map(an.fromDom).each(Gv)};const V_=(e,t)=>{const o=e.schema.getTextInlineElements();const n=e.dom;if(t){const t=e.getBody();const s=bv(n);fo.each(n.select("*[data-mce-fragment]"),(e=>{const r=T(o[e.nodeName.toLowerCase()]);if(r&&Sv(n,e)){for(let o=e.parentNode;T(o)&&o!==t;o=o.parentNode){const t=Ov(n,e,o);if(t){break}if(s.compare(o,e)){n.remove(e,true);break}}}}))}};const j_=e=>{let t=e;while(t=t.walk()){if(t.type===1){t.attr("data-mce-fragment","1")}}};const U_=e=>{fo.each(e.getElementsByTagName("*"),(e=>{e.removeAttribute("data-mce-fragment")}))};const q_=e=>!!e.getAttribute("data-mce-fragment");const W_=(e,t)=>t&&!e.schema.getVoidElements()[t.nodeName];const $_=(e,t)=>{let o;const n=e.dom;const s=e.selection;if(!t){return}s.scrollIntoView(t);const r=Zw(e.getBody(),t);if(n.getContentEditable(r)==="false"){n.remove(t);s.select(r);return}let a=n.createRng();const c=t.previousSibling;if(qs(c)){a.setStart(c,c.nodeValue.length);const e=t.nextSibling;if(qs(e)){c.appendData(e.data);e.parentNode.removeChild(e)}}else{a.setStartBefore(t);a.setEndBefore(t)}const i=t=>{let o=Tl.fromRangeStart(t);const n=xm(e.getBody());o=n.next(o);if(o){return o.toRange()}};const l=n.getParent(t,n.isBlock);n.remove(t);if(l&&n.isEmpty(l)){as(an.fromDom(l));a.setStart(l,0);a.setEnd(l,0);if(!H_(l)&&!q_(l)&&(o=i(a))){a=o;n.remove(l)}else{n.add(l,n.create("br",{"data-mce-bogus":"1"}))}}s.setRng(a)};const G_=e=>{const t=e.dom;const o=p_(e.selection.getRng());e.selection.setRng(o);const n=t.getParent(o.startContainer,H_);if(I_(t,o,n)){Nw(e,o,an.fromDom(n))}else{e.getDoc().execCommand("Delete",false,null)}};const K_=(e,t,o)=>{let n;let s,r;const a=e.selection;const c=e.dom;const i=e.parser;const l=o.merge;const d=wv({validate:true},e.schema);const u='<span id="mce_marker" data-mce-type="bookmark"></span>';if(t.indexOf("{$caret}")===-1){t+="{$caret}"}t=t.replace(/\{\$caret\}/,u);s=a.getRng();const f=s.startContainer||(s.parentElement?s.parentElement():null);const m=e.getBody();if(f===m&&a.isCollapsed()){if(c.isBlock(m.firstChild)&&W_(e,m.firstChild)&&c.isEmpty(m.firstChild)){s=c.createRng();s.setStart(m.firstChild,0);s.setEnd(m.firstChild,0);a.setRng(s)}}if(!a.isCollapsed()){G_(e)}n=a.getNode();const g={context:n.nodeName.toLowerCase(),data:o.data,insert:true};const p=i.parse(t,g);if(o.paste===true&&k_(e.schema,p)&&E_(c,n)){s=L_(d,c,a.getRng(),p);a.setRng(s);return t}j_(p);r=p.lastChild;if(r.attr("id")==="mce_marker"){const t=r;for(r=r.prev;r;r=r.walk(true)){if(r.type===3||!c.isBlock(r.name)){if(e.schema.isValidChild(r.parent.name,"span")){r.parent.insert(t,r,r.name==="br")}break}}}e._selectionOverrides.showBlockCaretContainer(n);if(!g.invalid){t=d.serialize(p);P_(e,t,n)}else{e.selection.setContent(u);n=a.getNode();const o=e.getBody();if(n.nodeType===9){n=r=o}else{r=n}while(r!==o){n=r;r=r.parentNode}t=n===o?o.innerHTML:c.getOuterHTML(n);const s=i.parse(t);for(let e=s;e;e=e.walk()){if(e.attr("id")==="mce_marker"){e.replace(p);break}}const l=p.children();const f=p.parent.name;p.unwrap();const m=oe(l,(t=>!e.schema.isValidChild(f,t.name)));f_(m,e.schema);s_(i.getNodeFilters(),i.getAttributeFilters(),s);t=d.serialize(s);if(n===o){c.setHTML(o,t)}else{c.setOuterHTML(n,t)}}V_(e,l);$_(e,c.get("mce_marker"));U_(e.getBody());F_(c,a.getStart());return t};const X_=e=>e instanceof cv;const Y_=e=>{if(Mb(e)){Hm(e.getBody()).each((t=>{const o=t.getNode();const n=Vs(o)?Hm(o).getOr(t):t;e.selection.setRng(n.toRange())}))}};const J_=(e,t,o)=>{e.dom.setHTML(e.getBody(),t);if(o!==true){Y_(e)}};const Q_=(e,t,o,n)=>{if(o.length===0||/^\s+$/.test(o)){const s='<br data-mce-bogus="1">';if(t.nodeName==="TABLE"){o="<tr><td>"+s+"</td></tr>"}else if(/^(UL|OL)$/.test(t.nodeName)){o="<li>"+s+"</li>"}const r=Pd(e);if(e.schema.isValidChild(t.nodeName.toLowerCase(),r.toLowerCase())){o=s;o=e.dom.createHTML(r,Fd(e),o)}else if(!o){o=s}J_(e,o,n.no_selection);return{content:o,html:o}}else{if(n.format!=="raw"){o=wv({validate:false},e.schema).serialize(e.parser.parse(o,{isRootContent:true,insert:true}))}const s=Pr(an.fromDom(t))?o:fo.trim(o);J_(e,s,n.no_selection);return{content:s,html:s}}};const Z_=(e,t,o,n)=>{s_(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),o);const s=wv({validate:false},e.schema).serialize(o);const r=Pr(an.fromDom(t))?s:fo.trim(s);J_(e,r,n.no_selection);return{content:o,html:r}};const ex=(e,t,o)=>q.from(e.getBody()).map((n=>{if(X_(t)){return Z_(e,n,t,o)}else{return Q_(e,n,t,o)}})).getOr({content:t,html:X_(o.content)?"":o.content});const tx=(e,t)=>dr(e,t).isSome();const ox=e=>O(e)?e:j;const nx=(e,t,o)=>{let n=e.dom;const s=ox(o);while(n.parentNode){n=n.parentNode;const e=an.fromDom(n);const o=t(e);if(o.isSome()){return o}else if(s(e)){break}}return q.none()};const sx=(e,t,o)=>{const n=t(e);const s=ox(o);return n.orThunk((()=>s(e)?q.none():nx(e,t,s)))};const rx=Ag;const ax=(e,t,o)=>{const n=e.formatter.get(o);if(n){for(let o=0;o<n.length;o++){const s=n[o];if(Pg(s)&&s.inherit===false&&e.dom.is(t,s.selector)){return true}}}return false};const cx=(e,t,o,n,s)=>{const r=e.dom.getRoot();if(t===r){return false}t=e.dom.getParent(t,(t=>{if(ax(e,t,o)){return true}return t.parentNode===r||!!dx(e,t,o,n,true)}));return!!dx(e,t,o,n,s)};const ix=(e,t,o)=>{if(Fg(o)&&rx(t,o.inline)){return true}if(Ig(o)&&rx(t,o.block)){return true}if(Pg(o)){return Rs(t)&&e.is(t,o.selector)}return false};const lx=(e,t,o,n,s,r)=>{const a=o[n];if(O(o.onmatch)){return o.onmatch(t,o,n)}if(a){if(C(a.length)){for(const c in a){if(Ne(a,c)){const i=n==="attributes"?e.getAttrib(t,c):Ng(e,t,c);const l=Dg(a[c],r);const d=S(i)||pt(i);if(d&&S(l)){continue}if(s&&d&&!o.exact){return false}if((!s||o.exact)&&!rx(i,Mg(l,c))){return false}}}}else{for(let o=0;o<a.length;o++){if(n==="attributes"?e.getAttrib(t,a[o]):Ng(e,t,a[o])){return true}}}}return true};const dx=(e,t,o,n,s)=>{const r=e.formatter.get(o);const a=e.dom;if(r&&t){for(let o=0;o<r.length;o++){const c=r[o];if(ix(e.dom,t,c)&&lx(a,t,c,"attributes",s,n)&&lx(a,t,c,"styles",s,n)){const o=c.classes;if(o){for(let s=0;s<o.length;s++){if(!e.dom.hasClass(t,Dg(o[s],n))){return}}}return c}}}};const ux=(e,t,o,n,s)=>{if(n){return cx(e,n,t,o,s)}n=e.selection.getNode();if(cx(e,n,t,o,s)){return true}const r=e.selection.getStart();if(r!==n){if(cx(e,r,t,o,s)){return true}}return false};const fx=(e,t,o)=>{const n=[];const s={};const r=e.selection.getStart();e.dom.getParent(r,(r=>{for(let a=0;a<t.length;a++){const c=t[a];if(!s[c]&&dx(e,r,c,o)){s[c]=true;n.push(c)}}}),e.dom.getRoot());return n};const mx=(e,t)=>{const o=t=>mn(t,an.fromDom(e.getBody()));const n=(t,o)=>dx(e,t.dom,o)?q.some(o):q.none();return q.from(e.selection.getStart(true)).bind((e=>sx(an.fromDom(e),(e=>ve(t,(t=>n(e,t)))),o))).getOrNull()};const gx=(e,t)=>{const o=e.formatter.get(t);const n=e.dom;if(o){const t=e.selection.getStart();const s=Bg(n,t);for(let e=o.length-1;e>=0;e--){const t=o[e];if(!Pg(t)){return true}for(let e=s.length-1;e>=0;e--){if(n.is(s[e],t.selector)){return true}}}}return false};const px=(e,t,o)=>se(o,((o,n)=>{const s=Lg(e,n);if(e.formatter.matchNode(t,n,{},s)){return o.concat([n])}else{return o}}),[]);const hx=Wr,yx="_mce_caret";const bx=(e,t)=>e.importNode(t,true);const vx=e=>{const t=[];while(e){if(e.nodeType===3&&e.nodeValue!==hx||e.childNodes.length>1){return[]}if(e.nodeType===1){t.push(e)}e=e.firstChild}return t};const kx=e=>vx(e).length>0;const wx=e=>{if(e){const t=new vr(e,e);for(e=t.current();e;e=t.next()){if(qs(e)){return e}}}return null};const _x=e=>{const t=an.fromTag("span");Ro(t,{id:yx,"data-mce-bogus":"1","data-mce-type":"format-caret"});if(e){os(t,an.fromText(hx))}return t};const xx=e=>{const t=wx(e);if(t&&t.nodeValue.charAt(0)===hx){t.deleteData(0,1)}return t};const zx=(e,t,o=true)=>{const n=e.dom,s=e.selection;if(kx(t)){ow(e,false,an.fromDom(t),o)}else{const e=s.getRng();const o=n.getParent(t,n.isBlock);const r=e.startContainer;const a=e.startOffset;const c=e.endContainer;const i=e.endOffset;const l=xx(t);n.remove(t,true);if(r===l&&a>0){e.setStart(l,a-1)}if(c===l&&i>0){e.setEnd(l,i-1)}if(o&&n.isEmpty(o)){$v(an.fromDom(o))}s.setRng(e)}};const Cx=(e,t,o=true)=>{const n=e.dom,s=e.selection;if(!t){t=Vm(e.getBody(),s.getStart());if(!t){while(t=n.get(yx)){zx(e,t,false)}}}else{zx(e,t,o)}};const Sx=(e,t,o)=>{const n=e.dom,s=n.getParent(o,H(Sg,e));if(s&&n.isEmpty(s)){o.parentNode.replaceChild(t,o)}else{Wv(an.fromDom(o));if(n.isEmpty(o)){o.parentNode.replaceChild(t,o)}else{n.insertAfter(t,o)}}};const Tx=(e,t)=>{e.appendChild(t);return t};const Ox=(e,t)=>{const o=ne(e,((e,t)=>Tx(e,t.cloneNode(false))),t);return Tx(o,o.ownerDocument.createTextNode(hx))};const Ex=(e,t,o,n,s,r)=>{const a=e.formatter;const c=e.dom;const i=oe(we(a.get()),(e=>e!==n&&!ct(e,"removeformat")));const l=px(e,o,i);const d=oe(l,(t=>!Hg(e,t,n)));if(d.length>0){const e=o.cloneNode(false);c.add(t,e);a.remove(n,s,e,r);c.remove(e);return q.some(e)}else{return q.none()}};const Dx=(e,t,o)=>{let n,s;const r=e.selection;const a=r.getRng();let c=a.startOffset;const i=a.startContainer;const l=i.nodeValue;n=Vm(e.getBody(),r.getStart());if(n){s=wx(n)}const d=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&c>0&&c<l.length&&d.test(l.charAt(c))&&d.test(l.charAt(c-1))){const n=r.getBookmark();a.collapse(true);let s=sp(e,a,e.formatter.get(t));s=cy(s);e.formatter.apply(t,o,s);r.moveToBookmark(n)}else{if(!n||s.nodeValue!==hx){n=bx(e.getDoc(),_x(true).dom);s=n.firstChild;a.insertNode(n);c=1;e.formatter.apply(t,o,n)}else{e.formatter.apply(t,o,n)}r.setCursorLocation(s,c)}};const Ax=(e,t,o,n)=>{const s=e.dom;const r=e.selection;let a,c,i;const l=[];const d=r.getRng();const u=d.startContainer;const f=d.startOffset;c=u;if(u.nodeType===3){if(f!==u.nodeValue.length){a=true}c=c.parentNode}while(c){if(dx(e,c,t,o,n)){i=c;break}if(c.nextSibling){a=true}l.push(c);c=c.parentNode}if(!i){return}if(a){const s=r.getBookmark();d.collapse(true);let a=sp(e,d,e.formatter.get(t),true);a=cy(a);e.formatter.remove(t,o,a,n);r.moveToBookmark(s)}else{const a=Vm(e.getBody(),i);const c=_x(false).dom;Sx(e,c,a!==null?a:i);const d=Ex(e,c,i,t,o,n);const u=Ox(l.concat(d.toArray()),c);zx(e,a,false);r.setCursorLocation(u,1);if(s.isEmpty(i)){s.remove(i)}}};const Mx=(e,t)=>{const o=e.selection,n=e.getBody();Cx(e,null,false);if((t===8||t===46)&&o.isCollapsed()&&o.getStart().innerHTML===hx){Cx(e,Vm(n,o.getStart()))}if(t===37||t===39){Cx(e,Vm(n,o.getStart()))}};const Nx=e=>{e.on("mouseup keydown",(t=>{Mx(e,t.keyCode)}))};const Rx=(e,t)=>{const o=_x(false);const n=Ox(t,o.dom);Zn(an.fromDom(e),o);cs(an.fromDom(e));return Tl(n,0)};const Bx=(e,t)=>{const o=e.schema.getTextInlineElements();return Ne(o,xo(t))&&!Fm(t.dom)&&!Ps(t.dom)};const Lx=e=>Fm(e.dom)&&kx(e.dom);const Hx={};const Ix=Ve;const Px=Pe;const Fx=(e,t)=>{const o=Hx[e];if(!o){Hx[e]=[]}Hx[e].push(t)};const Vx=(e,t)=>{Px(Hx[e],(e=>{e(t)}))};Fx("pre",(e=>{const t=e.selection.getRng();let o;const n=e=>r(e.previousSibling)&&je(o,e.previousSibling)!==-1;const s=(e,t)=>{const o=an.fromDom(t);const n=hn(o).dom;cs(o);rs(an.fromDom(e),[an.fromTag("br",n),an.fromTag("br",n),...Tn(o)])};const r=Bs(["pre"]);if(!t.collapsed){o=e.selection.getSelectedBlocks();Px(Ix(Ix(o,r),n),(e=>{s(e.previousSibling,e)}))}}));const jx=fo.each;const Ux=e=>Rs(e)&&!ig(e)&&!Fm(e)&&!Ps(e);const qx=(e,t)=>{for(let o=e;o;o=o[t]){if(qs(o)&>(o.data)){return e}if(Rs(o)&&!ig(o)){return o}}return e};const Wx=(e,t,o)=>{const n=bv(e);if(t&&o){t=qx(t,"previousSibling");o=qx(o,"nextSibling");if(n.compare(t,o)){for(let e=t.nextSibling;e&&e!==o;){const o=e;e=e.nextSibling;t.appendChild(o)}e.remove(o);fo.each(fo.grep(o.childNodes),(e=>{t.appendChild(e)}));return t}}return o};const $x=(e,t,o,n)=>{if(n&&t.merge_siblings!==false){const t=Wx(e,Cg(n),n);Wx(e,t,Cg(t,true))}};const Gx=(e,t,o)=>{if(t.clear_child_styles){const n=t.links?"*:not(a)":"*";jx(e.select(n,o),(o=>{if(Ux(o)){jx(t.styles,((t,n)=>{e.setStyle(o,n,"")}))}}))}};const Kx=(e,t,o)=>{jx(e.childNodes,(e=>{if(Ux(e)){if(t(e)){o(e)}if(e.hasChildNodes()){Kx(e,t,o)}}}))};const Xx=(e,t)=>{if(t.nodeName==="SPAN"&&e.getAttribs(t).length===0){e.remove(t,true)}};const Yx=(e,t)=>o=>!!(o&&Ng(e,o,t));const Jx=(e,t,o)=>n=>{e.setStyle(n,t,o);if(n.getAttribute("style")===""){n.removeAttribute("style")}Xx(e,n)};const Qx=md.generate([{keep:[]},{rename:["name"]},{removed:[]}]);const Zx=/^(src|href|style)$/;const ez=fo.each;const tz=Ag;const oz=e=>/^(TR|TH|TD)$/.test(e.nodeName);const nz=(e,t,o)=>e.isChildOf(t,o)&&t!==o&&!e.isBlock(o);const sz=(e,t,o)=>{let n=t[o?"startContainer":"endContainer"];let s=t[o?"startOffset":"endOffset"];if(Rs(n)){const e=n.childNodes.length-1;if(!o&&s){s--}n=n.childNodes[s>e?e:s]}if(qs(n)&&o&&s>=n.nodeValue.length){n=new vr(n,e.getBody()).next()||n}if(qs(n)&&!o&&s===0){n=new vr(n,e.getBody()).prev()||n}return n};const rz=(e,t)=>{const o=t?"firstChild":"lastChild";if(oz(e)&&e[o]){const t=e[o];if(e.nodeName==="TR"){return t[o]||t}else{return t}}return e};const az=(e,t,o,n)=>{const s=e.create(o,n);t.parentNode.insertBefore(s,t);s.appendChild(t);return s};const cz=(e,t,o,n,s)=>{const r=an.fromDom(t);const a=an.fromDom(e.create(n,s));const c=o?Sn(r):Cn(r);rs(a,c);if(o){Zn(r,a);ts(a,r)}else{es(r,a);os(a,r)}return a.dom};const iz=(e,t)=>t.links&&e.nodeName==="A";const lz=(e,t,o)=>{const n=t.parentNode;let s;const r=e.dom;const a=Pd(e);if(Ig(o)){if(n===r.getRoot()){if(!o.list_block||!tz(t,o.list_block)){Z(be(t.childNodes),(t=>{if(Tg(e,a,t.nodeName.toLowerCase())){if(!s){s=az(r,t,a);r.setAttribs(s,Fd(e))}else{s.appendChild(t)}}else{s=null}}))}}}if(Vg(o)&&!tz(o.inline,t)){return}r.remove(t,true)};const dz=(e,t,o,n,s)=>{let r;const a=e.dom;if(!ix(a,n,t)&&!iz(n,t)){return Qx.keep()}const c=n;if(Fg(t)&&t.remove==="all"&&_(t.preserve_attributes)){const e=oe(a.getAttribs(c),(e=>Y(t.preserve_attributes,e.name.toLowerCase())));a.removeAllAttribs(c);Z(e,(e=>a.setAttrib(c,e.name,e.value)));if(e.length>0){return Qx.rename("span")}}if(t.remove!=="all"){ez(t.styles,((e,n)=>{e=Mg(Dg(e,o),n+"");if(E(n)){n=e;s=null}if(t.remove_similar||(!s||tz(Ng(a,s,n),e))){a.setStyle(c,n,"")}r=true}));if(r&&a.getAttrib(c,"style")===""){c.removeAttribute("style");c.removeAttribute("data-mce-style")}ez(t.attributes,((e,n)=>{let r;e=Dg(e,o);if(E(n)){n=e;s=null}if(t.remove_similar||(!s||tz(a.getAttrib(s,n),e))){if(n==="class"){e=a.getAttrib(c,n);if(e){r="";Z(e.split(/\s+/),(e=>{if(/mce\-\w+/.test(e)){r+=(r?" ":"")+e}}));if(r){a.setAttrib(c,n,r);return}}}if(Zx.test(n)){c.removeAttribute("data-mce-"+n)}if(n==="style"&&Bs(["li"])(c)&&a.getStyle(c,"list-style-type")==="none"){c.removeAttribute(n);a.setStyle(c,"list-style-type","none");return}if(n==="class"){c.removeAttribute("className")}c.removeAttribute(n)}}));ez(t.classes,(e=>{e=Dg(e,o);if(!s||a.hasClass(s,e)){a.removeClass(c,e)}}));const e=a.getAttribs(c);for(let t=0;t<e.length;t++){const o=e[t].nodeName;if(o.indexOf("_")!==0&&o.indexOf("data-")!==0){return Qx.keep()}}}if(t.remove!=="none"){lz(e,c,t);return Qx.removed()}return Qx.keep()};const uz=(e,t,o,n,s)=>dz(e,t,o,n,s).fold(j,(t=>{e.dom.rename(n,t);return true}),U);const fz=(e,t,o,n,s)=>{let r;Z(Bg(e.dom,t.parentNode).reverse(),(t=>{if(!r&&t.id!=="_start"&&t.id!=="_end"){const a=dx(e,t,o,n,s);if(a&&a.split!==false){r=t}}}));return r};const mz=(e,t,o,n)=>dz(e,t,o,n,n).fold(R(n),(t=>{const o=e.dom.createFragment();o.appendChild(n);return e.dom.rename(n,t)}),R(null));const gz=(e,t,o,n,s,r,a,c)=>{let i,l,d;const u=e.dom;if(o){const f=o.parentNode;for(let o=n.parentNode;o&&o!==f;o=o.parentNode){i=u.clone(o,false);for(let o=0;o<t.length;o++){i=mz(e,t[o],c,i);if(i===null){break}}if(i){if(l){i.appendChild(l)}if(!d){d=i}l=i}}if(r&&(!a.mixed||!u.isBlock(o))){n=u.split(o,n)}if(l){s.parentNode.insertBefore(l,s);d.appendChild(s);if(Fg(a)){$x(u,a,c,l)}}}return n};const pz=(e,t,o,n,s)=>{const r=e.formatter.get(t);const a=r[0];let c=true;const i=e.dom;const l=e.selection;const d=n=>{const c=fz(e,n,t,o,s);return gz(e,r,c,n,n,true,a,o)};const u=e=>ig(e)&&Rs(e)&&(e.id==="_start"||e.id==="_end");const f=t=>J(r,(n=>uz(e,n,o,t,t)));const m=t=>{let o=true;let n=false;if(Rs(t)&&i.getContentEditable(t)){o=c;c=i.getContentEditable(t)==="true";n=true}const s=be(t.childNodes);if(c&&!n){const e=f(t);const o=e||J(r,(e=>ix(i,t,e)));const n=t.parentNode;if(!o&&T(n)&&jg(a)){f(n)}}if(a.deep){if(s.length){for(let e=0;e<s.length;e++){m(s[e])}if(n){c=o}}}const l=["underline","line-through","overline"];Z(l,(o=>{if(Rs(t)&&e.dom.getStyle(t,"text-decoration")===o&&t.parentNode&&Rg(i,t.parentNode)===o){uz(e,{deep:false,exact:true,inline:"span",styles:{textDecoration:o}},null,t)}}))};const g=e=>{const t=i.get(e?"_start":"_end");let o=t[e?"firstChild":"lastChild"];if(u(o)){o=o[e?"firstChild":"lastChild"]}if(qs(o)&&o.data.length===0){o=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling}i.remove(t,true);return o};const p=t=>{let o,n;let s=sp(e,t,r,t.collapsed);if(a.split){s=cy(s);o=sz(e,s,true);n=sz(e,s);if(o!==n){o=rz(o,true);n=rz(n,false);if(nz(i,o,n)){const e=q.from(o.firstChild).getOr(o);d(cz(i,e,true,"span",{id:"_start","data-mce-type":"bookmark"}));g(true);return}if(nz(i,n,o)){const e=q.from(n.lastChild).getOr(n);d(cz(i,e,false,"span",{id:"_end","data-mce-type":"bookmark"}));g(false);return}o=az(i,o,"span",{id:"_start","data-mce-type":"bookmark"});n=az(i,n,"span",{id:"_end","data-mce-type":"bookmark"});const e=i.createRng();e.setStartAfter(o);e.setEndBefore(n);rp(i,e,(e=>{Z(e,(e=>{if(!ig(e)&&!ig(e.parentNode)){d(e)}}))}));d(o);d(n);o=g(true);n=g()}else{o=n=d(o)}s.startContainer=o.parentNode?o.parentNode:o;s.startOffset=i.nodeIndex(o);s.endContainer=n.parentNode?n.parentNode:n;s.endOffset=i.nodeIndex(n)+1}rp(i,s,(e=>{Z(e,m)}))};if(n){if(_g(n)){const e=i.createRng();e.setStartBefore(n);e.setEndAfter(n);p(e)}else{p(n)}Xp(e,t,n,o);return}if(i.getContentEditable(l.getNode())==="false"){n=l.getNode();for(let t=0;t<r.length;t++){if(r[t].ceFalseOverride){if(uz(e,r[t],o,n,n)){break}}}Xp(e,t,n,o);return}if(!l.isCollapsed()||!Fg(a)||fp(e).length){_p(l,true,(()=>{wp(e,p)}));if(Fg(a)&&ux(e,t,o,l.getStart())){zg(i,l,l.getRng())}e.nodeChanged()}else{Ax(e,t,o,s)}Xp(e,t,n,o)};const hz=fo.each;const yz=(e,t,o,n)=>{const s=t=>{if(t.nodeType===1&&t.parentNode&&t.parentNode.nodeType===1){const o=Rg(e,t.parentNode);if(e.getStyle(t,"color")&&o){e.setStyle(t,"text-decoration",o)}else if(e.getStyle(t,"text-decoration")===o){e.setStyle(t,"text-decoration",null)}}};if(t.styles&&(t.styles.color||t.styles.textDecoration)){fo.walk(n,s,"childNodes");s(n)}};const bz=(e,t,o,n)=>{if(t.styles&&t.styles.backgroundColor){Kx(n,Yx(e,"fontSize"),Jx(e,"backgroundColor",Dg(t.styles.backgroundColor,o)))}};const vz=(e,t,o,n)=>{if(Fg(t)&&(t.inline==="sub"||t.inline==="sup")){Kx(n,Yx(e,"fontSize"),Jx(e,"fontSize",""));e.remove(e.select(t.inline==="sup"?"sub":"sup",n),true)}};const kz=(e,t,o,n)=>{hz(t,(t=>{if(Fg(t)){hz(e.dom.select(t.inline,n),(n=>{if(!Ux(n)){return}uz(e,t,o,n,t.exact?n:null)}))}Gx(e.dom,t,n)}))};const wz=(e,t,o,n,s)=>{if(dx(e,s.parentNode,o,n)){if(uz(e,t,n,s)){return}}if(t.merge_with_parents){e.dom.getParent(s.parentNode,(r=>{if(dx(e,r,o,n)){uz(e,t,n,s);return true}}))}};const _z=fo.each;const xz=e=>Rs(e)&&!ig(e)&&!Fm(e)&&!Ps(e);const zz=(e,t,o,n)=>{if(xu(e)&&Fg(t)){const t={...e.schema.getTextBlockElements(),td:{},th:{},li:{},dt:{},dd:{},figcaption:{},caption:{},details:{},summary:{}};const s=tx(an.fromDom(o),(e=>Fm(e.dom)));return Re(t,n)&&Pa(an.fromDom(o.parentNode),false)&&!s}else{return false}};const Cz=(e,t,o,n)=>{const s=e.formatter.get(t);const r=s[0];const a=!n&&e.selection.isCollapsed();const c=e.dom;const i=e.selection;const l=(e,t=r)=>{if(O(t.onformat)){t.onformat(e,t,o,n)}_z(t.styles,((t,n)=>{c.setStyle(e,n,Dg(t,o))}));if(t.styles){const t=c.getAttrib(e,"style");if(t){c.setAttrib(e,"data-mce-style",t)}}_z(t.attributes,((t,n)=>{c.setAttrib(e,n,Dg(t,o))}));_z(t.classes,(t=>{t=Dg(t,o);if(!c.hasClass(e,t)){c.addClass(e,t)}}))};const d=(e,t)=>{let o=false;_z(e,(e=>{if(!Pg(e)){return false}if(T(e.collapsed)&&e.collapsed!==a){return}if(c.is(t,e.selector)&&!Fm(t)){l(t,e);o=true;return false}}));return o};const u=e=>{if(v(e)){const t=c.create(e);l(t);return t}else{return null}};const f=(n,a,c)=>{const i=[];let f=true;const m=r.inline||r.block;const g=u(m);rp(n,a,(a=>{let u;const p=a=>{let h=false;let y=f;const b=a.nodeName.toLowerCase();const v=a.parentNode;const k=v.nodeName.toLowerCase();if(Rs(a)&&n.getContentEditable(a)){y=f;f=n.getContentEditable(a)==="true";h=true}if(Ys(a)&&!zz(e,r,a,k)){u=null;if(Ig(r)){n.remove(a)}return}if(Ig(r)&&r.wrapper&&dx(e,a,t,o)){u=null;return}if(f&&!h&&Ig(r)&&!r.wrapper&&Sg(e,b)&&Tg(e,k,m)){const e=n.rename(a,m);l(e);i.push(e);u=null;return}if(Pg(r)){let e=d(s,a);if(!e&&T(v)&&jg(r)){e=d(s,v)}if(!Fg(r)||e){u=null;return}}if(f&&!h&&Tg(e,m,b)&&Tg(e,k,m)&&!(!c&&qs(a)&&$r(a.data))&&!Fm(a)&&(!Fg(r)||!n.isBlock(a))){if(!u){u=n.clone(g,false);a.parentNode.insertBefore(u,a);i.push(u)}u.appendChild(a)}else{u=null;Z(be(a.childNodes),p);if(h){f=y}u=null}};Z(a,p)}));if(r.links===true){Z(i,(e=>{const t=e=>{if(e.nodeName==="A"){l(e,r)}Z(be(e.childNodes),t)};t(e)}))}Z(i,(a=>{const c=e=>{let t=0;Z(e.childNodes,(e=>{if(!Eg(e)&&!ig(e)){t++}}));return t};const d=e=>{const t=ae(e.childNodes,xz).filter((e=>ix(n,e,r)));return t.map((t=>{const o=n.clone(t,false);l(o);n.replace(o,e,true);n.remove(t,true);return o})).getOr(e)};const u=c(a);if((i.length>1||!n.isBlock(a))&&u===0){n.remove(a,true);return}if(Fg(r)||Ig(r)&&r.wrapper){if(!r.exact&&u===1){a=d(a)}kz(e,s,o,a);wz(e,r,t,o,a);bz(n,r,o,a);yz(n,r,o,a);vz(n,r,o,a);$x(n,r,o,a)}}))};if(c.getContentEditable(i.getNode())==="false"){n=i.getNode();for(let e=0,t=s.length;e<t;e++){const t=s[e];if(t.ceFalseOverride&&Pg(t)&&c.is(n,t.selector)){l(n,t);break}}Kp(e,t,n,o);return}if(r){if(n){if(_g(n)){if(!d(s,n)){const t=c.createRng();t.setStartBefore(n);t.setEndAfter(n);f(c,sp(e,t,s),true)}}else{f(c,n,true)}}else{if(!a||!Fg(r)||fp(e).length){i.setRng(p_(i.getRng()));_p(i,true,(()=>{wp(e,((t,o)=>{const n=o?t:sp(e,t,s);f(c,n,false)}))}));zg(c,i,i.getRng());e.nodeChanged()}else{Dx(e,t,o)}}Vx(t,e)}Kp(e,t,n,o)};const Sz=e=>Ne(e,"vars");const Tz=(e,t)=>{e.set({});t.on("NodeChange",(o=>{Az(t,o.element,e.get())}));t.on("FormatApply FormatRemove",(o=>{const n=q.from(o.node).map((e=>_g(e)?e:e.startContainer)).bind((e=>Rs(e)?q.some(e):q.from(e.parentElement))).getOrThunk((()=>Oz(t)));Az(t,n,e.get())}))};const Oz=e=>e.selection.getStart();const Ez=(e,t,o,n,s)=>{const r=t=>{const r=e.formatter.matchNode(t,o,s!==null&&s!==void 0?s:{},n);return!C(r)};const a=t=>{if(ax(e,t,o)){return true}else{if(!n){return T(e.formatter.matchNode(t,o,s,true))}else{return false}}};return re(t,r,a)};const Dz=(e,t)=>{const o=t!==null&&t!==void 0?t:Oz(e);return oe(Bg(e.dom,o),(e=>Rs(e)&&!Ps(e)))};const Az=(e,t,o)=>{const n=Dz(e,t);xe(o,((o,s)=>{const r=o=>{const r=Ez(e,n,s,o.similar,Sz(o)?o.vars:undefined);const a=r.isSome();if(o.state.get()!==a){o.state.set(a);const e=r.getOr(t);if(Sz(o)){o.callback(a,{node:e,format:s,parents:n})}else{Z(o.callbacks,(t=>t(a,{node:e,format:s,parents:n})))}}};Z([o.withSimilar,o.withoutSimilar],r);Z(o.withVars,r)}))};const Mz=(e,t,o,n,s,r)=>{const a=t.get();Z(o.split(","),(t=>{const o=Me(a,t).getOrThunk((()=>{const e={withSimilar:{state:ei(false),similar:true,callbacks:[]},withoutSimilar:{state:ei(false),similar:false,callbacks:[]},withVars:[]};a[t]=e;return e}));const c=()=>{const o=Dz(e);return Ez(e,o,t,s,r).isSome()};if(C(r)){const e=s?o.withSimilar:o.withoutSimilar;e.callbacks.push(n);if(e.callbacks.length===1){e.state.set(c())}}else{o.withVars.push({state:ei(c()),similar:s,vars:r,callback:n})}}));t.set(a)};const Nz=(e,t,o)=>{const n=e.get();Z(t.split(","),(e=>Me(n,e).each((t=>{n[e]={withSimilar:{...t.withSimilar,callbacks:oe(t.withSimilar.callbacks,(e=>e!==o))},withoutSimilar:{...t.withoutSimilar,callbacks:oe(t.withoutSimilar.callbacks,(e=>e!==o))},withVars:oe(t.withVars,(e=>e.callback!==o))}}))));e.set(n)};const Rz=(e,t,o,n,s,r)=>{if(t.get()===null){Tz(t,e)}Mz(e,t,o,n,s,r);return{unbind:()=>Nz(t,o,n)}};const Bz=(e,t,o,n)=>{const s=e.formatter.get(t);if(ux(e,t,o,n)&&(!("toggle"in s[0])||s[0].toggle)){pz(e,t,o,n)}else{Cz(e,t,o,n)}};function Lz(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++){o[t]=e[t]}return o}else{return Array.from(e)}}var Hz=Object.hasOwnProperty,Iz=Object.setPrototypeOf,Pz=Object.isFrozen,Fz=Object.getPrototypeOf,Vz=Object.getOwnPropertyDescriptor;var jz=Object.freeze,Uz=Object.seal,qz=Object.create;var Wz=typeof Reflect!=="undefined"&&Reflect,$z=Wz.apply,Gz=Wz.construct;if(!$z){$z=function e(t,o,n){return t.apply(o,n)}}if(!jz){jz=function e(t){return t}}if(!Uz){Uz=function e(t){return t}}if(!Gz){Gz=function e(t,o){return new(Function.prototype.bind.apply(t,[null].concat(Lz(o))))}}var Kz=sC(Array.prototype.forEach);var Xz=sC(Array.prototype.pop);var Yz=sC(Array.prototype.push);var Jz=sC(String.prototype.toLowerCase);var Qz=sC(String.prototype.match);var Zz=sC(String.prototype.replace);var eC=sC(String.prototype.indexOf);var tC=sC(String.prototype.trim);var oC=sC(RegExp.prototype.test);var nC=rC(TypeError);function sC(e){return function(t){for(var o=arguments.length,n=Array(o>1?o-1:0),s=1;s<o;s++){n[s-1]=arguments[s]}return $z(e,t,n)}}function rC(e){return function(){for(var t=arguments.length,o=Array(t),n=0;n<t;n++){o[n]=arguments[n]}return Gz(e,o)}}function aC(e,t){if(Iz){Iz(e,null)}var o=t.length;while(o--){var n=t[o];if(typeof n==="string"){var s=Jz(n);if(s!==n){if(!Pz(t)){t[o]=s}n=s}}e[n]=true}return e}function cC(e){var t=qz(null);var o=void 0;for(o in e){if($z(Hz,e,[o])){t[o]=e[o]}}return t}function iC(e,t){while(e!==null){var o=Vz(e,t);if(o){if(o.get){return sC(o.get)}if(typeof o.value==="function"){return sC(o.value)}}e=Fz(e)}function n(e){console.warn("fallback value for",e);return null}return n}var lC=jz(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]);var dC=jz(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]);var uC=jz(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]);var fC=jz(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]);var mC=jz(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover"]);var gC=jz(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]);var pC=jz(["#text"]);var hC=jz(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]);var yC=jz(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]);var bC=jz(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]);var vC=jz(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]);var kC=Uz(/\{\{[\s\S]*|[\s\S]*\}\}/gm);var wC=Uz(/<%[\s\S]*|[\s\S]*%>/gm);var _C=Uz(/^data-[\-\w.\u00B7-\uFFFF]/);var xC=Uz(/^aria-[\-\w]+$/);var zC=Uz(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i);var CC=Uz(/^(?:\w+script|data):/i);var SC=Uz(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g);var TC=Uz(/^html$/i);var OC=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol==="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};function EC(e){if(Array.isArray(e)){for(var t=0,o=Array(e.length);t<e.length;t++){o[t]=e[t]}return o}else{return Array.from(e)}}var DC=function e(){return typeof window==="undefined"?null:window};var AC=function e(t,o){if((typeof t==="undefined"?"undefined":OC(t))!=="object"||typeof t.createPolicy!=="function"){return null}var n=null;var s="data-tt-policy-suffix";if(o.currentScript&&o.currentScript.hasAttribute(s)){n=o.currentScript.getAttribute(s)}var r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:function e(t){return t}})}catch(e){console.warn("TrustedTypes policy "+r+" could not be created.");return null}};function MC(){var e=arguments.length>0&&arguments[0]!==undefined?arguments[0]:DC();var t=function e(t){return MC(t)};t.version="2.3.6";t.removed=[];if(!e||!e.document||e.document.nodeType!==9){t.isSupported=false;return t}var o=e.document;var n=e.document;var s=e.DocumentFragment,r=e.HTMLTemplateElement,a=e.Node,c=e.Element,i=e.NodeFilter,l=e.NamedNodeMap,d=l===undefined?e.NamedNodeMap||e.MozNamedAttrMap:l,u=e.HTMLFormElement,f=e.DOMParser,m=e.trustedTypes;var g=c.prototype;var p=iC(g,"cloneNode");var h=iC(g,"nextSibling");var y=iC(g,"childNodes");var b=iC(g,"parentNode");if(typeof r==="function"){var v=n.createElement("template");if(v.content&&v.content.ownerDocument){n=v.content.ownerDocument}}var k=AC(m,o);var w=k?k.createHTML(""):"";var _=n,x=_.implementation,z=_.createNodeIterator,C=_.createDocumentFragment,S=_.getElementsByTagName;var T=o.importNode;var O={};try{O=cC(n).documentMode?n.documentMode:{}}catch(e){}var E={};t.isSupported=typeof b==="function"&&x&&typeof x.createHTMLDocument!=="undefined"&&O!==9;var D=kC,A=wC,M=_C,N=xC,R=CC,B=SC;var L=zC;var H=null;var I=aC({},[].concat(EC(lC),EC(dC),EC(uC),EC(mC),EC(pC)));var P=null;var F=aC({},[].concat(EC(hC),EC(yC),EC(bC),EC(vC)));var V=Object.seal(Object.create(null,{tagNameCheck:{writable:true,configurable:false,enumerable:true,value:null},attributeNameCheck:{writable:true,configurable:false,enumerable:true,value:null},allowCustomizedBuiltInElements:{writable:true,configurable:false,enumerable:true,value:false}}));var j=null;var U=null;var q=true;var W=true;var $=false;var G=false;var K=false;var X=false;var Y=false;var J=false;var Q=false;var Z=false;var ee=true;var te=true;var oe=false;var ne={};var se=null;var re=aC({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]);var ae=null;var ce=aC({},["audio","video","img","source","image","track"]);var ie=null;var le=aC({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]);var de="http://www.w3.org/1998/Math/MathML";var ue="http://www.w3.org/2000/svg";var fe="http://www.w3.org/1999/xhtml";var me=fe;var ge=false;var pe=void 0;var he=["application/xhtml+xml","text/html"];var ye="text/html";var be=void 0;var ve=null;var ke=n.createElement("form");var we=function e(t){return t instanceof RegExp||t instanceof Function};var _e=function e(t){if(ve&&ve===t){return}if(!t||(typeof t==="undefined"?"undefined":OC(t))!=="object"){t={}}t=cC(t);H="ALLOWED_TAGS"in t?aC({},t.ALLOWED_TAGS):I;P="ALLOWED_ATTR"in t?aC({},t.ALLOWED_ATTR):F;ie="ADD_URI_SAFE_ATTR"in t?aC(cC(le),t.ADD_URI_SAFE_ATTR):le;ae="ADD_DATA_URI_TAGS"in t?aC(cC(ce),t.ADD_DATA_URI_TAGS):ce;se="FORBID_CONTENTS"in t?aC({},t.FORBID_CONTENTS):re;j="FORBID_TAGS"in t?aC({},t.FORBID_TAGS):{};U="FORBID_ATTR"in t?aC({},t.FORBID_ATTR):{};ne="USE_PROFILES"in t?t.USE_PROFILES:false;q=t.ALLOW_ARIA_ATTR!==false;W=t.ALLOW_DATA_ATTR!==false;$=t.ALLOW_UNKNOWN_PROTOCOLS||false;G=t.SAFE_FOR_TEMPLATES||false;K=t.WHOLE_DOCUMENT||false;J=t.RETURN_DOM||false;Q=t.RETURN_DOM_FRAGMENT||false;Z=t.RETURN_TRUSTED_TYPE||false;Y=t.FORCE_BODY||false;ee=t.SANITIZE_DOM!==false;te=t.KEEP_CONTENT!==false;oe=t.IN_PLACE||false;L=t.ALLOWED_URI_REGEXP||L;me=t.NAMESPACE||fe;if(t.CUSTOM_ELEMENT_HANDLING&&we(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)){V.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&we(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)){V.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck}if(t.CUSTOM_ELEMENT_HANDLING&&typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements==="boolean"){V.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements}pe=he.indexOf(t.PARSER_MEDIA_TYPE)===-1?pe=ye:pe=t.PARSER_MEDIA_TYPE;be=pe==="application/xhtml+xml"?function(e){return e}:Jz;if(G){W=false}if(Q){J=true}if(ne){H=aC({},[].concat(EC(pC)));P=[];if(ne.html===true){aC(H,lC);aC(P,hC)}if(ne.svg===true){aC(H,dC);aC(P,yC);aC(P,vC)}if(ne.svgFilters===true){aC(H,uC);aC(P,yC);aC(P,vC)}if(ne.mathMl===true){aC(H,mC);aC(P,bC);aC(P,vC)}}if(t.ADD_TAGS){if(H===I){H=cC(H)}aC(H,t.ADD_TAGS)}if(t.ADD_ATTR){if(P===F){P=cC(P)}aC(P,t.ADD_ATTR)}if(t.ADD_URI_SAFE_ATTR){aC(ie,t.ADD_URI_SAFE_ATTR)}if(t.FORBID_CONTENTS){if(se===re){se=cC(se)}aC(se,t.FORBID_CONTENTS)}if(te){H["#text"]=true}if(K){aC(H,["html","head","body"])}if(H.table){aC(H,["tbody"]);delete j.tbody}if(jz){jz(t)}ve=t};var xe=aC({},["mi","mo","mn","ms","mtext"]);var ze=aC({},["foreignobject","desc","title","annotation-xml"]);var Ce=aC({},["title","style","font","a","script"]);var Se=aC({},dC);aC(Se,uC);aC(Se,fC);var Te=aC({},mC);aC(Te,gC);var Oe=function e(t){var o=b(t);if(!o||!o.tagName){o={namespaceURI:fe,tagName:"template"}}var n=Jz(t.tagName);var s=Jz(o.tagName);if(t.namespaceURI===ue){if(o.namespaceURI===fe){return n==="svg"}if(o.namespaceURI===de){return n==="svg"&&(s==="annotation-xml"||xe[s])}return Boolean(Se[n])}if(t.namespaceURI===de){if(o.namespaceURI===fe){return n==="math"}if(o.namespaceURI===ue){return n==="math"&&ze[s]}return Boolean(Te[n])}if(t.namespaceURI===fe){if(o.namespaceURI===ue&&!ze[s]){return false}if(o.namespaceURI===de&&!xe[s]){return false}return!Te[n]&&(Ce[n]||!Se[n])}return false};var Ee=function e(o){Yz(t.removed,{element:o});try{o.parentNode.removeChild(o)}catch(e){try{o.outerHTML=w}catch(e){o.remove()}}};var De=function e(o,n){try{Yz(t.removed,{attribute:n.getAttributeNode(o),from:n})}catch(e){Yz(t.removed,{attribute:null,from:n})}n.removeAttribute(o);if(o==="is"&&!P[o]){if(J||Q){try{Ee(n)}catch(e){}}else{try{n.setAttribute(o,"")}catch(e){}}}};var Ae=function e(t){var o=void 0;var s=void 0;if(Y){t="<remove></remove>"+t}else{var r=Qz(t,/^[\r\n\t ]+/);s=r&&r[0]}if(pe==="application/xhtml+xml"){t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>"}var a=k?k.createHTML(t):t;if(me===fe){try{o=(new f).parseFromString(a,pe)}catch(e){}}if(!o||!o.documentElement){o=x.createDocument(me,"template",null);try{o.documentElement.innerHTML=ge?"":a}catch(e){}}var c=o.body||o.documentElement;if(t&&s){c.insertBefore(n.createTextNode(s),c.childNodes[0]||null)}if(me===fe){return S.call(o,K?"html":"body")[0]}return K?o.documentElement:c};var Me=function e(t){return z.call(t.ownerDocument||t,t,i.SHOW_ELEMENT|i.SHOW_COMMENT|i.SHOW_TEXT,null,false)};var Ne=function e(t){return t instanceof u&&(typeof t.nodeName!=="string"||typeof t.textContent!=="string"||typeof t.removeChild!=="function"||!(t.attributes instanceof d)||typeof t.removeAttribute!=="function"||typeof t.setAttribute!=="function"||typeof t.namespaceURI!=="string"||typeof t.insertBefore!=="function")};var Re=function e(t){return(typeof a==="undefined"?"undefined":OC(a))==="object"?t instanceof a:t&&(typeof t==="undefined"?"undefined":OC(t))==="object"&&typeof t.nodeType==="number"&&typeof t.nodeName==="string"};var Be=function e(o,n,s){if(!E[o]){return}Kz(E[o],(function(e){e.call(t,n,s,ve)}))};var Le=function e(o){var n=void 0;Be("beforeSanitizeElements",o,null);if(Ne(o)){Ee(o);return true}if(oC(/[\u0080-\uFFFF]/,o.nodeName)){Ee(o);return true}var s=be(o.nodeName);Be("uponSanitizeElement",o,{tagName:s,allowedTags:H});if(o.hasChildNodes()&&!Re(o.firstElementChild)&&(!Re(o.content)||!Re(o.content.firstElementChild))&&oC(/<[/\w]/g,o.innerHTML)&&oC(/<[/\w]/g,o.textContent)){Ee(o);return true}if(s==="select"&&oC(/<template/i,o.innerHTML)){Ee(o);return true}if(!H[s]||j[s]){if(!j[s]&&Ie(s)){if(V.tagNameCheck instanceof RegExp&&oC(V.tagNameCheck,s))return false;if(V.tagNameCheck instanceof Function&&V.tagNameCheck(s))return false}if(te&&!se[s]){var r=b(o)||o.parentNode;var a=y(o)||o.childNodes;if(a&&r){var i=a.length;for(var l=i-1;l>=0;--l){r.insertBefore(p(a[l],true),h(o))}}}Ee(o);return true}if(o instanceof c&&!Oe(o)){Ee(o);return true}if((s==="noscript"||s==="noembed")&&oC(/<\/no(script|embed)/i,o.innerHTML)){Ee(o);return true}if(G&&o.nodeType===3){n=o.textContent;n=Zz(n,D," ");n=Zz(n,A," ");if(o.textContent!==n){Yz(t.removed,{element:o.cloneNode()});o.textContent=n}}Be("afterSanitizeElements",o,null);return false};var He=function e(t,o,s){if(ee&&(o==="id"||o==="name")&&(s in n||s in ke)){return false}if(W&&!U[o]&&oC(M,o));else if(q&&oC(N,o));else if(!P[o]||U[o]){if(Ie(t)&&(V.tagNameCheck instanceof RegExp&&oC(V.tagNameCheck,t)||V.tagNameCheck instanceof Function&&V.tagNameCheck(t))&&(V.attributeNameCheck instanceof RegExp&&oC(V.attributeNameCheck,o)||V.attributeNameCheck instanceof Function&&V.attributeNameCheck(o))||o==="is"&&V.allowCustomizedBuiltInElements&&(V.tagNameCheck instanceof RegExp&&oC(V.tagNameCheck,s)||V.tagNameCheck instanceof Function&&V.tagNameCheck(s)));else{return false}}else if(ie[o]);else if(oC(L,Zz(s,B,"")));else if((o==="src"||o==="xlink:href"||o==="href")&&t!=="script"&&eC(s,"data:")===0&&ae[t]);else if($&&!oC(R,Zz(s,B,"")));else if(!s);else{return false}return true};var Ie=function e(t){return t.indexOf("-")>0};var Pe=function e(t){var o=void 0;var n=void 0;var s=void 0;var r=void 0;Be("beforeSanitizeAttributes",t,null);var a=t.attributes;if(!a){return}var c={attrName:"",attrValue:"",keepAttr:true,allowedAttributes:P};r=a.length;while(r--){o=a[r];var i=o,l=i.name,d=i.namespaceURI;n=tC(o.value);s=be(l);var u=n;c.attrName=s;c.attrValue=n;c.keepAttr=true;c.forceKeepAttr=undefined;Be("uponSanitizeAttribute",t,c);n=c.attrValue;if(c.forceKeepAttr){continue}if(!c.keepAttr){De(l,t);continue}if(oC(/\/>/i,n)){De(l,t);continue}if(G){n=Zz(n,D," ");n=Zz(n,A," ")}var f=be(t.nodeName);if(!He(f,s,n)){De(l,t);continue}if(n!==u){try{if(d){t.setAttributeNS(d,l,n)}else{t.setAttribute(l,n)}}catch(e){De(l,t)}}}Be("afterSanitizeAttributes",t,null)};var Fe=function e(t){var o=void 0;var n=Me(t);Be("beforeSanitizeShadowDOM",t,null);while(o=n.nextNode()){Be("uponSanitizeShadowNode",o,null);if(Le(o)){continue}if(o.content instanceof s){e(o.content)}Pe(o)}Be("afterSanitizeShadowDOM",t,null)};t.sanitize=function(n,r){var c=void 0;var i=void 0;var l=void 0;var d=void 0;var u=void 0;ge=!n;if(ge){n="\x3c!--\x3e"}if(typeof n!=="string"&&!Re(n)){if(typeof n.toString!=="function"){throw nC("toString is not a function")}else{n=n.toString();if(typeof n!=="string"){throw nC("dirty is not a string, aborting")}}}if(!t.isSupported){if(OC(e.toStaticHTML)==="object"||typeof e.toStaticHTML==="function"){if(typeof n==="string"){return e.toStaticHTML(n)}if(Re(n)){return e.toStaticHTML(n.outerHTML)}}return n}if(!X){_e(r)}t.removed=[];if(typeof n==="string"){oe=false}if(oe){if(n.nodeName){var f=be(n.nodeName);if(!H[f]||j[f]){throw nC("root node is forbidden and cannot be sanitized in-place")}}}else if(n instanceof a){c=Ae("\x3c!----\x3e");i=c.ownerDocument.importNode(n,true);if(i.nodeType===1&&i.nodeName==="BODY"){c=i}else if(i.nodeName==="HTML"){c=i}else{c.appendChild(i)}}else{if(!J&&!G&&!K&&n.indexOf("<")===-1){return k&&Z?k.createHTML(n):n}c=Ae(n);if(!c){return J?null:Z?w:""}}if(c&&Y){Ee(c.firstChild)}var m=Me(oe?n:c);while(l=m.nextNode()){if(l.nodeType===3&&l===d){continue}if(Le(l)){continue}if(l.content instanceof s){Fe(l.content)}Pe(l);d=l}d=null;if(oe){return n}if(J){if(Q){u=C.call(c.ownerDocument);while(c.firstChild){u.appendChild(c.firstChild)}}else{u=c}if(P.shadowroot){u=T.call(o,u,true)}return u}var g=K?c.outerHTML:c.innerHTML;if(K&&H["!doctype"]&&c.ownerDocument&&c.ownerDocument.doctype&&c.ownerDocument.doctype.name&&oC(TC,c.ownerDocument.doctype.name)){g="<!DOCTYPE "+c.ownerDocument.doctype.name+">\n"+g}if(G){g=Zz(g,D," ");g=Zz(g,A," ")}return k&&Z?k.createHTML(g):g};t.setConfig=function(e){_e(e);X=true};t.clearConfig=function(){ve=null;X=false};t.isValidAttribute=function(e,t,o){if(!ve){_e({})}var n=be(e);var s=be(t);return He(n,s,o)};t.addHook=function(e,t){if(typeof t!=="function"){return}E[e]=E[e]||[];Yz(E[e],t)};t.removeHook=function(e){if(E[e]){Xz(E[e])}};t.removeHooks=function(e){if(E[e]){E[e]=[]}};t.removeAllHooks=function(){E={}};return t}var NC=MC();const RC=(e,t)=>{Z(t,(t=>{e.attr(t,null)}))};const BC=(e,t,o)=>{e.addNodeFilter("font",(e=>{Z(e,(e=>{const n=t.parse(e.attr("style"));const s=e.attr("color");const r=e.attr("face");const a=e.attr("size");if(s){n.color=s}if(r){n["font-family"]=r}if(a){n["font-size"]=o[parseInt(e.attr("size"),10)-1]}e.name="span";e.attr("style",t.serialize(n));RC(e,["color","face","size"])}))}))};const LC=(e,t,o)=>{e.addNodeFilter("strike",(e=>{const n=t.type!=="html4";Z(e,(e=>{if(n){e.name="s"}else{const t=o.parse(e.attr("style"));t["text-decoration"]="line-through";e.name="span";e.attr("style",o.serialize(t))}}))}))};const HC=(e,t,o)=>{const n=xc();if(t.convert_fonts_to_spans){BC(e,n,fo.explode(t.font_size_legacy_values))}LC(e,o,n)};const IC=(e,t,o)=>{if(t.inline_styles){HC(e,t,o)}};const PC=e=>new Promise(((t,o)=>{const n=()=>{o("Cannot convert "+e+" to Blob. Resource might not exist or is inaccessible.")};try{const o=new XMLHttpRequest;o.open("GET",e,true);o.responseType="blob";o.onload=()=>{if(o.status===200){t(o.response)}else{n()}};o.onerror=n;o.send()}catch(e){n()}}));const FC=e=>{let t;const o=decodeURIComponent(e).split(",");const n=/data:([^;]+)/.exec(o[0]);if(n){t=n[1]}return{type:t,data:o[1]}};const VC=(e,t)=>{let o;try{o=atob(t)}catch(e){return q.none()}const n=new Uint8Array(o.length);for(let e=0;e<n.length;e++){n[e]=o.charCodeAt(e)}return q.some(new Blob([n],{type:e}))};const jC=e=>new Promise((t=>{const{type:o,data:n}=FC(e);VC(o,n).fold((()=>t(new Blob([]))),t)}));const UC=e=>{if(e.indexOf("blob:")===0){return PC(e)}if(e.indexOf("data:")===0){return jC(e)}return null};const qC=e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result)};o.readAsDataURL(e)}));let WC=0;const $C=e=>(e||"blobid")+WC++;const GC=(e,t,o,n)=>{let s,r;if(t.src.indexOf("blob:")===0){r=e.getByUri(t.src);if(r){o({image:t,blobInfo:r})}else{UC(t.src).then((n=>{qC(n).then((a=>{s=FC(a).data;r=e.create($C(),n,s);e.add(r);o({image:t,blobInfo:r})}))}),(e=>{n(e)}))}return}const{data:a,type:c}=FC(t.src);s=a;r=e.getByData(s,c);if(r){o({image:t,blobInfo:r})}else{UC(t.src).then((n=>{r=e.create($C(),n,s);e.add(r);o({image:t,blobInfo:r})}),(e=>{n(e)}))}};const KC=e=>e?be(e.getElementsByTagName("img")):[];const XC=(e,t)=>{const o={};const n=(n,s)=>{if(!s){s=U}const r=oe(KC(n),(t=>{const o=t.src;if(t.hasAttribute("data-mce-bogus")){return false}if(t.hasAttribute("data-mce-placeholder")){return false}if(!o||o===eo.transparentSrc){return false}if(o.indexOf("blob:")===0){return!e.isUploaded(o)&&s(t)}if(o.indexOf("data:")===0){return s(t)}return false}));const a=Q(r,(e=>{if(o[e.src]!==undefined){return new Promise((t=>{o[e.src].then((o=>{if(typeof o==="string"){return o}t({image:e,blobInfo:o.blobInfo})}))}))}const n=new Promise(((o,n)=>{GC(t,e,o,n)})).then((e=>{delete o[e.image.src];return e})).catch((t=>{delete o[e.src];return t}));o[e.src]=n;return n}));return Promise.all(a)};return{findAll:n}};const YC=e=>{const t=/data:([^;]+);base64,([a-z0-9\+\/=\s]+)/i.exec(e);if(t){return q.some({type:t[1],data:decodeURIComponent(t[2])})}else{return q.none()}};const JC=e=>T(e.attr("data-mce-bogus"));const QC=e=>e.attr("src")===eo.transparentSrc||T(e.attr("data-mce-placeholder"));const ZC=(e,t)=>{const{blob_cache:o}=t;const n=e=>{const t=e.attr("src");if(QC(e)||JC(e)){return}YC(t).bind((({type:e,data:t})=>q.from(o.getByData(t,e)).orThunk((()=>VC(e,t).map((e=>{const n=o.create($C(),e,t);o.add(n);return n})))))).each((t=>{e.attr("src",t.blobUri())}))};if(o){e.addAttributeFilter("src",(e=>Z(e,n)))}};const eS=(e,t)=>{const o=e.schema;if(t.remove_trailing_brs){e.addNodeFilter("br",((e,n,s)=>{const r=fo.extend({},o.getBlockElements());const a=o.getNonEmptyElements();const c=o.getWhitespaceElements();r.body=1;for(let n=0,i=e.length;n<i;n++){let i=e[n];let l=i.parent;if(r[i.parent.name]&&i===l.lastChild){let e=i.prev;while(e){const t=e.name;if(t!=="span"||e.attr("data-mce-type")!=="bookmark"){if(t==="br"){i=null}break}e=e.prev}if(i){i.remove();if(l_(o,a,c,l)){const e=o.getElementRule(l.name);if(e){if(e.removeEmpty){l.remove()}else if(e.paddEmpty){r_(t,s,r,l)}}}}}else{let e=i;while(l&&l.firstChild===e&&l.lastChild===e){e=l;if(r[l.name]){break}l=l.parent}if(e===l){const e=new cv("#text",3);e.value=jr;i.replace(e)}}}}))}e.addAttributeFilter("href",(e=>{let o=e.length;const n=e=>{const t=e.split(" ").filter((e=>e.length>0));return t.concat(["noopener"]).sort().join(" ")};const s=e=>{const t=e?fo.trim(e):"";if(!/\b(noopener)\b/g.test(t)){return n(t)}else{return t}};if(!t.allow_unsafe_link_target){while(o--){const t=e[o];if(t.name==="a"&&t.attr("target")==="_blank"){t.attr("rel",s(t.attr("rel")))}}}}));if(!t.allow_html_in_named_anchor){e.addAttributeFilter("id,name",(e=>{let t=e.length,o,n,s,r;while(t--){r=e[t];if(r.name==="a"&&r.firstChild&&!r.attr("href")){s=r.parent;o=r.lastChild;do{n=o.prev;s.insert(o,r);o=n}while(o)}}}))}if(t.fix_list_elements){e.addNodeFilter("ul,ol",(e=>{let t=e.length,o,n;while(t--){o=e[t];n=o.parent;if(n.name==="ul"||n.name==="ol"){if(o.prev&&o.prev.name==="li"){o.prev.append(o)}else{const e=new cv("li",1);e.attr("style","list-style-type: none");o.wrap(e)}}}}))}if(t.validate&&o.getValidClasses()){e.addAttributeFilter("class",(e=>{const t=o.getValidClasses();let n=e.length;while(n--){const o=e[n];const s=o.attr("class").split(" ");let r="";for(let e=0;e<s.length;e++){const n=s[e];let a=false;let c=t["*"];if(c&&c[n]){a=true}c=t[o.name];if(!a&&c&&c[n]){a=true}if(a){if(r){r+=" "}r+=n}}if(!r.length){r=null}o.attr("class",r)}}))}ZC(e,t)};const tS=fo.each,oS=fo.trim;const nS="source protocol authority userInfo user password host port relative path directory file query anchor".split(" ");const sS={ftp:21,http:80,https:443,mailto:25};const rS=["img","video"];const aS=(e,t)=>{if(T(e)){return!e}else{return T(t)?!Y(rS,t):true}};const cS=e=>{try{return decodeURIComponent(e)}catch(t){return unescape(e)}};const iS=(e,t,o)=>{const n=cS(t);if(e.allow_script_urls){return false}else if(/((java|vb)script|mhtml):/i.test(n)){return true}else if(e.allow_html_data_urls){return false}else if(/^data:image\//i.test(n)){return aS(e.allow_svg_data_urls,o)&&/^data:image\/svg\+xml/i.test(n)}else{return/^data:/i.test(n)}};class lS{constructor(e,t){e=oS(e);this.settings=t||{};const o=this.settings.base_uri;const n=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e)){n.source=e;return}const s=e.indexOf("//")===0;if(e.indexOf("/")===0&&!s){e=(o?o.protocol||"http":"http")+"://mce_host"+e}if(!/^[\w\-]*:?\/\//.test(e)){const t=this.settings.base_uri?this.settings.base_uri.path:new lS(document.location.href).directory;if(this.settings.base_uri&&this.settings.base_uri.protocol==""){e="//mce_host"+n.toAbsPath(t,e)}else{const s=/([^#?]*)([#?]?.*)/.exec(e);e=(o&&o.protocol||"http")+"://mce_host"+n.toAbsPath(t,s[1])+s[2]}}e=e.replace(/@@/g,"(mce_at)");const r=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);tS(nS,((e,t)=>{let o=r[t];if(o){o=o.replace(/\(mce_at\)/g,"@@")}n[e]=o}));if(o){if(!n.protocol){n.protocol=o.protocol}if(!n.userInfo){n.userInfo=o.userInfo}if(!n.port&&n.host==="mce_host"){n.port=o.port}if(!n.host||n.host==="mce_host"){n.host=o.host}n.source=""}if(s){n.protocol=""}}static parseDataUri(e){let t;const o=decodeURIComponent(e).split(",");const n=/data:([^;]+)/.exec(o[0]);if(n){t=n[1]}return{type:t,data:o[1]}}static isDomSafe(e,t,o={}){if(o.allow_script_urls){return true}else{const n=uc.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!iS(o,n,t)}}static getDocumentBaseUrl(e){let t;if(e.protocol.indexOf("http")!==0&&e.protocol!=="file:"){t=e.href}else{t=e.protocol+"//"+e.host+e.pathname}if(/^[^:]+:\/\/\/?[^\/]+\//.test(t)){t=t.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(t)){t+="/"}}return t}setPath(e){const t=/^(.*?)\/?(\w+)?$/.exec(e);this.path=t[0];this.directory=t[1];this.file=t[2];this.source="";this.getURI()}toRelative(e){let t;if(e==="./"){return e}const o=new lS(e,{base_uri:this});if(o.host!=="mce_host"&&this.host!==o.host&&o.host||this.port!==o.port||this.protocol!==o.protocol&&o.protocol!==""){return o.getURI()}const n=this.getURI(),s=o.getURI();if(n===s||n.charAt(n.length-1)==="/"&&n.substr(0,n.length-1)===s){return n}t=this.toRelPath(this.path,o.path);if(o.query){t+="?"+o.query}if(o.anchor){t+="#"+o.anchor}return t}toAbsolute(e,t){const o=new lS(e,{base_uri:this});return o.getURI(t&&this.isSameOrigin(o))}isSameOrigin(e){if(this.host==e.host&&this.protocol==e.protocol){if(this.port==e.port){return true}const t=sS[this.protocol];if(t&&(this.port||t)==(e.port||t)){return true}}return false}toRelPath(e,t){let o=0,n="",s,r;const a=e.substring(0,e.lastIndexOf("/")).split("/");const c=t.split("/");if(a.length>=c.length){for(s=0,r=a.length;s<r;s++){if(s>=c.length||a[s]!==c[s]){o=s+1;break}}}if(a.length<c.length){for(s=0,r=c.length;s<r;s++){if(s>=a.length||a[s]!==c[s]){o=s+1;break}}}if(o===1){return t}for(s=0,r=a.length-(o-1);s<r;s++){n+="../"}for(s=o-1,r=c.length;s<r;s++){if(s!==o-1){n+="/"+c[s]}else{n+=c[s]}}return n}toAbsPath(e,t){let o,n=0,s=[],r;const a=/\/$/.test(t)?"/":"";let c=e.split("/");const i=t.split("/");tS(c,(e=>{if(e){s.push(e)}}));c=s;for(o=i.length-1,s=[];o>=0;o--){if(i[o].length===0||i[o]==="."){continue}if(i[o]===".."){n++;continue}if(n>0){n--;continue}s.push(i[o])}o=c.length-n;if(o<=0){r=ue(s).join("/")}else{r=c.slice(0,o).join("/")+"/"+ue(s).join("/")}if(r.indexOf("/")!==0){r="/"+r}if(a&&r.lastIndexOf("/")!==r.length-1){r+=a}return r}getURI(e=false){let t;if(!this.source||e){t="";if(!e){if(this.protocol){t+=this.protocol+"://"}else{t+="//"}if(this.userInfo){t+=this.userInfo+"@"}if(this.host){t+=this.host}if(this.port){t+=":"+this.port}}if(this.path){t+=this.path}if(this.query){t+="?"+this.query}if(this.anchor){t+="#"+this.anchor}this.source=t}return this.source}}const dS=fo.makeMap,uS=fo.each,fS=fo.explode,mS=fo.extend;const gS={IN_PLACE:true,ALLOW_UNKNOWN_PROTOCOLS:true,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[]};const pS=fo.makeMap("src,href,data,background,action,formaction,poster,xlink:href");const hS="data-mce-type";const yS=(e,t)=>{const o={...gS};o.PARSER_MEDIA_TYPE=t;if(e.allow_script_urls){o.ALLOWED_URI_REGEXP=/.*/}else if(e.allow_html_data_urls){o.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i}return o};const bS=(e,t)=>{const o=NC();const n=e.validate;let s=0;o.addHook("uponSanitizeElement",((o,r)=>{var a,c;if(o.nodeType===bo&&!e.allow_conditional_comments&&/^\[if/i.test(o.nodeValue)){o.nodeValue=" "+o.nodeValue}const i=r.tagName;if(o.nodeType!==wo||i==="body"){return}const l=an.fromDom(o);const d=Ho(l,hS);const u=Bo(l,"data-mce-bogus");if(!d&&v(u)){if(u==="all"){cs(l)}else{is(l)}return}const f=t.getElementRule(i.toLowerCase());if(n&&!f){is(l);return}else{r.allowedTags[i]=true}if(n&&!d){Z((a=f.attributesForced)!==null&&a!==void 0?a:[],(e=>{No(l,e.name,e.value==="{$uid}"?`mce_${s++}`:e.value)}));Z((c=f.attributesDefault)!==null&&c!==void 0?c:[],(e=>{if(!Ho(l,e.name)){No(l,e.name,e.value==="{$uid}"?`mce_${s++}`:e.value)}}));if(f.attributesRequired&&!J(f.attributesRequired,(e=>Ho(l,e)))){is(l);return}if(f.removeEmptyAttrs&&Po(l)){is(l);return}if(f.outputName&&f.outputName!==i.toLowerCase()){Pi(l,f.outputName)}}}));o.addHook("uponSanitizeAttribute",((o,s)=>{const r=o.tagName.toLowerCase();const{attrName:a,attrValue:c}=s;s.keepAttr=!n||t.isValid(r,a)||it(a,"data-")||it(a,"aria-");if(a in pS&&iS(e,c,r)){s.keepAttr=false}if(s.keepAttr){s.allowedAttributes[a]=true;if(a in t.getBoolAttrs()){s.attrValue=a}if(e.allow_svg_data_urls&&it(c,"data:image/svg+xml")){s.forceKeepAttr=true}}else if(o.hasAttribute(hS)&&(a==="id"||a==="class"||a==="style")){s.forceKeepAttr=true}}));return o};const vS=(e,t,o)=>{const n=e.name;const s=n in o&&n!=="title"&&n!=="textarea";const r=t.childNodes;for(let t=0,n=r.length;t<n;t++){const n=r[t];const a=new cv(n.nodeName.toLowerCase(),n.nodeType);if(Rs(n)){const e=n.attributes;for(let t=0,o=e.length;t<o;t++){const o=e[t];a.attr(o.name,o.value)}}else if(qs(n)){a.value=n.data;if(s){a.raw=true}}else if(Gs(n)||Ws(n)||$s(n)){a.value=n.data}vS(a,n,o);e.append(a)}};const kS=(e,t,o)=>{const n=[];for(let o=e,s=o;T(o);s=o,o=o.walk()){Z(t,(e=>e(o)));if(S(o.parent)&&o!==e){o=s}else{n.push(o)}}for(let e=n.length-1;e>=0;e--){const t=n[e];Z(o,(e=>e(t)))}};const wS=(e,t,o,n)=>{const s=o.validate;const r=t.getNonEmptyElements();const a=t.getWhitespaceElements();const c=mS(dS("script,style,head,html,body,title,meta,param"),t.getBlockElements());const i=/[ \t\r\n]+/g;const l=/^[ \t\r\n]+/;const d=/[ \t\r\n]+$/;const u=e=>{e=e.parent;while(T(e)){if(e.name in a){return true}else{e=e.parent}}return false};const f=(t,o)=>{const s=o?t.prev:t.next;if(T(s)){return false}return t.parent.name in c&&(t.parent!==e||n.isRootContent)};const m=e=>{if(e.type===3){if(!u(e)){let t=e.value;t=t.replace(i," ");if(d_(e.prev,c)||f(e,true)){t=t.replace(l,"")}if(t.length===0){e.remove()}else{e.value=t}}}};const g=e=>{var i;if(e.type===1){const i=t.getElementRule(e.name);if(s&&i){const s=l_(t,r,a,e);if(i.removeEmpty&&s){if(c[e.name]){e.remove()}else{e.unwrap()}}else if(i.paddEmpty&&(s||a_(e))){r_(o,n,c,e)}}}else if(e.type===3){if(!u(e)){let t=e.value;if(c[(i=e.next)===null||i===void 0?void 0:i.name]||f(e,false)){t=t.replace(d,"")}if(t.length===0){e.remove()}else{e.value=t}}}};return[m,g]};const _S=(e,t)=>{var o;const n=(o=t.forced_root_block)!==null&&o!==void 0?o:e.forced_root_block;if(n===false){return""}else if(n===true){return"p"}else{return n}};const xS=(e={},t=_c())=>{const o={};const n=[];const s={validate:true,root_name:"body",...e};const r=new DOMParser;const a=bS(s,t);const c=(e,o,n="html")=>{const c=n==="xhtml"?"application/xhtml+xml":"text/html";const i=Ne(t.getSpecialElements(),o.toLowerCase());const l=i?`<${o}>${e}</${o}>`:e;const d=n==="xhtml"?`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>${l}</body></html>`:`<body>${l}</body>`;const u=r.parseFromString(d,c).body;a.sanitize(u,yS(s,c));a.removed=[];return i?u.firstChild:u};const i=(e,t)=>{uS(fS(e),(e=>{let n=o[e];if(!n){o[e]=n=[]}n.push(t)}))};const l=()=>{const e=[];for(const t in o){if(Ne(o,t)){e.push({name:t,callbacks:o[t]})}}return e};const d=(e,t)=>{uS(fS(e),(e=>{let o;for(o=0;o<n.length;o++){if(n[o].name===e){n[o].callbacks.push(t);return}}n.push({name:e,callbacks:[t]})}))};const u=()=>[].concat(n);const f=(e,o)=>{const n=e.parent;if(n&&t.children[e.name]&&!t.isValidChild(n.name,e.name)){o.push(e)}};const m=(e,o)=>{const n=mS(dS("script,style,head,html,body,title,meta,param"),t.getBlockElements());const r=/^[ \t\r\n]+/;const a=/[ \t\r\n]+$/;let c=e.firstChild,i=null;const l=e=>{if(e){c=e.firstChild;if(c&&c.type===3){c.value=c.value.replace(r,"")}c=e.lastChild;if(c&&c.type===3){c.value=c.value.replace(a,"")}}};if(!t.isValidChild(e.name,o.toLowerCase())){return}while(c){const t=c.next;if(c.type===3||c.type===1&&c.name!=="p"&&!n[c.name]&&!c.attr(hS)){if(!i){i=new cv(o,1);i.attr(s.forced_root_block_attrs);e.insert(i,c);i.append(c)}else{i.append(c)}}else{l(i);i=null}c=t}l(i)};const g=(e,o={})=>{var r;const a=s.validate;const i=(r=o.context)!==null&&r!==void 0?r:s.root_name;const d=c(e,i,o.format);const u=new cv(i,11);vS(u,d,t.getSpecialElements());const[g,p]=wS(u,t,s,o);const h=[];const y=a?e=>f(e,h):A;const b=l();const v={nodes:{},attributes:{}};const k=e=>t_(b,n,e,v);kS(u,[g,k],[p,y]);h.reverse();if(a&&h.length>0){if(o.context){const{pass:e,fail:n}=te(h,(e=>e.parent===u));f_(n,t,k);o.invalid=e.length>0}else{f_(h,t,k)}}const w=_S(s,o);if(w&&(u.name==="body"||o.isRootContent)){m(u,w)}if(!o.invalid){n_(v,o)}return u};const p={schema:t,addAttributeFilter:d,getAttributeFilters:u,addNodeFilter:i,getNodeFilters:l,parse:g};eS(p,s);IC(p,s,t);return p};const zS=e=>X_(e)?wv({validate:false}).serialize(e):e;const CS=(e,t)=>{const o=zS(e);const n=t(o);if(n.isDefaultPrevented()){return n}else if(X_(e)){if(n.content!==o){const t=xS({validate:false,forced_root_block:false}).parse(n.content,{context:e.name});return{...n,content:t}}else{return{...n,content:e}}}else{return n}};const SS=(e,t)=>{if(t.no_events){return ud.value(t)}else{const o=Qp(e,t);if(o.isDefaultPrevented()){return ud.error(Zp(e,{content:"",...o}).content)}else{return ud.value(o)}}};const TS=(e,t,o)=>{if(o.no_events){return t}else{const n=CS(t,(t=>Zp(e,{...o,content:t})));return n.content}};const OS=(e,t)=>{if(t.no_events){return ud.value(t)}else{const o=CS(t.content,(o=>Yp(e,{...t,content:o})));if(o.isDefaultPrevented()){Jp(e,o);return ud.error(undefined)}else{return ud.value(o)}}};const ES=(e,t,o)=>{if(!o.no_events){Jp(e,{...o,content:t})}};const DS=(e,t,o)=>({element:e,width:t,rows:o});const AS=(e,t)=>({element:e,cells:t});const MS=(e,t)=>({x:e,y:t});const NS=(e,t)=>{const o=parseInt(Bo(e,t),10);return isNaN(o)?1:o};const RS=(e,t,o,n,s)=>{const r=NS(s,"rowspan");const a=NS(s,"colspan");const c=e.rows;for(let e=o;e<o+r;e++){if(!c[e]){c[e]=AS(Hi(n),[])}for(let n=t;n<t+a;n++){const r=c[e].cells;r[n]=e===o&&n===t?s:Li(s)}}};const BS=(e,t,o)=>{const n=e.rows;const s=n[o]?n[o].cells:[];return!!s[t]};const LS=(e,t,o)=>{while(BS(e,t,o)){t++}return t};const HS=e=>se(e,((e,t)=>t.cells.length>e?t.cells.length:e),0);const IS=(e,t)=>{const o=e.rows;for(let e=0;e<o.length;e++){const n=o[e].cells;for(let o=0;o<n.length;o++){if(mn(n[o],t)){return q.some(MS(o,e))}}}return q.none()};const PS=(e,t,o,n,s)=>{const r=[];const a=e.rows;for(let e=o;e<=s;e++){const o=a[e].cells;const s=t<n?o.slice(t,n+1):o.slice(n,t+1);r.push(AS(a[e].element,s))}return r};const FS=(e,t,o)=>{const n=t.x,s=t.y;const r=o.x,a=o.y;const c=s<a?PS(e,n,s,r,a):PS(e,n,a,r,s);return DS(e.element,HS(c),c)};const VS=(e,t)=>{const o=Li(e.element);const n=an.fromTag("tbody");rs(n,t);os(o,n);return o};const jS=e=>Q(e.rows,(e=>{const t=Q(e.cells,(e=>{const t=Hi(e);Io(t,"colspan");Io(t,"rowspan");return t}));const o=Li(e.element);rs(o,t);return o}));const US=e=>{const t=DS(Li(e),0,[]);Z(ki(e,"tr"),((e,o)=>{Z(ki(e,"td,th"),((n,s)=>{RS(t,LS(t,s,o),o,e,n)}))}));return DS(t.element,HS(t.rows),t.rows)};const qS=e=>VS(e,jS(e));const WS=(e,t,o)=>IS(e,t).bind((t=>IS(e,o).map((o=>FS(e,t,o)))));const $S=e=>ae(e,(e=>xo(e)==="ul"||xo(e)==="ol"));const GS=(e,t)=>ae(e,(e=>xo(e)==="li"&&bp(e,t))).fold(R([]),(t=>$S(e).map((e=>{const t=an.fromTag(xo(e));const o=Ee(Yn(e),((e,t)=>it(t,"list-style")));$n(t,o);return[an.fromTag("li"),t]})).getOr([])));const KS=(e,t)=>{const o=se(t,((e,t)=>{os(t,e);return t}),e);return t.length>0?Uh([o]):o};const XS=e=>{if(Lr(e)){return vn(e).filter(Br).fold(R([]),(t=>[e,t]))}else{return Br(e)?[e]:[]}};const YS=(e,t)=>{const o=an.fromDom(t.commonAncestorContainer);const n=Jv(o,e);const s=oe(n,(e=>Mr(e)||Er(e)));const r=GS(n,t);const a=s.concat(r.length?r:XS(o));return Q(a,Li)};const JS=()=>Uh([]);const QS=(e,t)=>KS(an.fromDom(t.cloneContents()),YS(e,t));const ZS=(e,t)=>mr(t,"table",H(mn,e));const eT=(e,t)=>ZS(e,t[0]).bind((e=>{const o=t[0];const n=t[t.length-1];const s=US(e);return WS(s,o,n).map((e=>Uh([qS(e)])))})).getOrThunk(JS);const tT=(e,t)=>t.length>0&&t[0].collapsed?JS():QS(e,t[0]);const oT=(e,t)=>{const o=up(t,e);return o.length>0?eT(e,o):tT(e,t)};const nT=(e,t)=>t>=0&&t<e.length&&ug(e.charAt(t));const sT=e=>Gr(e.innerText);const rT=e=>e.map((e=>e.nodeName)).getOr("div").toLowerCase();const aT=e=>q.from(e.selection.getRng()).map((t=>{const o=q.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock));const n=e.getBody();const s=rT(o);const r=e.dom.add(n,s,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},t.cloneContents());const a=sT(r);const c=Gr(r.textContent);e.dom.remove(r);if(nT(c,0)||nT(c,c.length-1)){const e=o.getOr(n);const t=sT(e);const s=t.indexOf(a);if(s===-1){return a}else{const e=nT(t,s-1);const o=nT(t,s+a.length);return(e?" ":"")+a+(o?" ":"")}}else{return a}})).getOr("");const cT=(e,t)=>{const o=e.selection.getRng(),n=e.dom.create("body");const s=e.selection.getSel();const r=qb(e,ap(s));const a=t.contextual?oT(an.fromDom(e.getBody()),r).dom:o.cloneContents();if(a){n.appendChild(a)}return e.selection.serializer.serialize(n,t)};const iT=(e,t)=>{if(t.format==="text"){return aT(e)}else{const o=cT(e,t);if(t.format==="tree"){return o}else{return e.selection.isCollapsed()?"":o}}};const lT=(e,t)=>({...e,format:t,get:true,selection:true,getInner:true});const dT=(e,t,o={})=>{const n=lT(o,t);return SS(e,n).fold(B,(t=>{const o=iT(e,t);return TS(e,o,t)}))};const uT=0,fT=1,mT=2;const gT=(e,t)=>{const o=e.length+t.length+2;const n=new Array(o);const s=new Array(o);const r=(e,t,o)=>({start:e,end:t,diag:o});const a=(o,n,s,r,c)=>{const l=i(o,n,s,r);if(l===null||l.start===n&&l.diag===n-r||l.end===o&&l.diag===o-s){let a=o;let i=s;while(a<n||i<r){if(a<n&&i<r&&e[a]===t[i]){c.push([uT,e[a]]);++a;++i}else{if(n-o>r-s){c.push([mT,e[a]]);++a}else{c.push([fT,t[i]]);++i}}}}else{a(o,l.start,s,l.start-l.diag,c);for(let t=l.start;t<l.end;++t){c.push([uT,e[t]])}a(l.end,n,l.end-l.diag,r,c)}};const c=(o,n,s,a)=>{let c=o;while(c-n<a&&c<s&&e[c]===t[c-n]){++c}return r(o,c,n)};const i=(o,r,a,i)=>{const l=r-o;const d=i-a;if(l===0||d===0){return null}const u=l-d;const f=d+l;const m=(f%2===0?f:f+1)/2;n[1+m]=o;s[1+m]=r+1;let g,p,h,y,b;for(g=0;g<=m;++g){for(p=-g;p<=g;p+=2){h=p+m;if(p===-g||p!==g&&n[h-1]<n[h+1]){n[h]=n[h+1]}else{n[h]=n[h-1]+1}y=n[h];b=y-o+a-p;while(y<r&&b<i&&e[y]===t[b]){n[h]=++y;++b}if(u%2!==0&&u-g<=p&&p<=u+g){if(s[h-u]<=n[h]){return c(s[h-u],p+o-a,r,i)}}}for(p=u-g;p<=u+g;p+=2){h=p+m-u;if(p===u-g||p!==u+g&&s[h+1]<=s[h-1]){s[h]=s[h+1]-1}else{s[h]=s[h-1]}y=s[h]-1;b=y-o+a-p;while(y>=o&&b>=a&&e[y]===t[b]){s[h]=y--;b--}if(u%2===0&&-g<=p&&p<=g){if(s[h]<=n[h+u]){return c(s[h],p+o-a,r,i)}}}}};const l=[];a(0,e.length,0,t.length,l);return l};const pT=e=>{if(Rs(e)){return e.outerHTML}else if(qs(e)){return uc.encodeRaw(e.data,false)}else if(Gs(e)){return"\x3c!--"+e.data+"--\x3e"}return""};const hT=e=>{let t;const o=document.createElement("div");const n=document.createDocumentFragment();if(e){o.innerHTML=e}while(t=o.firstChild){n.appendChild(t)}return n};const yT=(e,t,o)=>{const n=hT(t);if(e.hasChildNodes()&&o<e.childNodes.length){const t=e.childNodes[o];t.parentNode.insertBefore(n,t)}else{e.appendChild(n)}};const bT=(e,t)=>{if(e.hasChildNodes()&&t<e.childNodes.length){const o=e.childNodes[t];o.parentNode.removeChild(o)}};const vT=(e,t)=>{let o=0;Z(e,(e=>{if(e[0]===uT){o++}else if(e[0]===fT){yT(t,e[1],o);o++}else if(e[0]===mT){bT(t,o)}}))};const kT=e=>oe(Q(be(e.childNodes),pT),(e=>e.length>0));const wT=(e,t)=>{const o=Q(be(t.childNodes),pT);vT(gT(o,e),t);return t};const _T=$e((()=>document.implementation.createHTMLDocument("undo")));const xT=e=>e.indexOf("</iframe>")!==-1;const zT=e=>({type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null});const CT=e=>({type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null});const ST=e=>{const t=kT(e.getBody());const o=le(t,(t=>{const o=fv(e.serializer,t);return o.length>0?[o]:[]}));const n=o.join("");return xT(n)?zT(o):CT(n)};const TT=(e,t,o)=>{const n=o?t.beforeBookmark:t.bookmark;if(t.type==="fragmented"){wT(t.fragments,e.getBody())}else{e.setContent(t.content,{format:"raw",no_selection:T(n)&&$m(n)?!n.isFakeCaret:true})}e.selection.moveToBookmark(n)};const OT=e=>e.type==="fragmented"?e.fragments.join(""):e.content;const ET=e=>{const t=an.fromTag("body",_T());fs(t,OT(e));Z(ki(t,"*[data-mce-bogus]"),is);return us(t)};const DT=(e,t)=>OT(e)===OT(t);const AT=(e,t)=>ET(e)===ET(t);const MT=(e,t)=>{if(!e||!t){return false}else if(DT(e,t)){return true}else{return AT(e,t)}};const NT=e=>e.get()===0;const RT=(e,t,o)=>{if(NT(o)){e.typing=t}};const BT=(e,t)=>{if(e.typing){RT(e,false,t);e.add()}};const LT=e=>{if(e.typing){e.typing=false;e.add()}};const HT=(e,t,o)=>{if(NT(t)){o.set(cd(e.selection))}};const IT=(e,t,o,n,s,r,a)=>{const c=ST(e);r=r||{};r=fo.extend(r,c);if(NT(n)===false||e.removed){return null}const i=t.data[o.get()];if(e.dispatch("BeforeAddUndo",{level:r,lastLevel:i,originalEvent:a}).isDefaultPrevented()){return null}if(i&&MT(i,r)){return null}if(t.data[o.get()]){s.get().each((e=>{t.data[o.get()].beforeBookmark=e}))}const l=Du(e);if(l){if(t.data.length>l){for(let e=0;e<t.data.length-1;e++){t.data[e]=t.data[e+1]}t.data.length--;o.set(t.data.length)}}r.bookmark=cd(e.selection);if(o.get()<t.data.length-1){t.data.length=o.get()+1}t.data.push(r);o.set(t.data.length-1);const d={level:r,lastLevel:i,originalEvent:a};if(o.get()>0){e.setDirty(true);e.dispatch("AddUndo",d);e.dispatch("change",d)}else{e.dispatch("AddUndo",d)}return r};const PT=(e,t,o)=>{t.data=[];o.set(0);t.typing=false;e.dispatch("ClearUndos")};const FT=(e,t,o,n,s)=>{if(t.transact(n)){const n=t.data[o.get()].bookmark;const r=t.data[o.get()-1];TT(e,r,true);if(t.transact(s)){t.data[o.get()-1].beforeBookmark=n}}};const VT=(e,t,o)=>{let n;if(t.get()<o.length-1){t.set(t.get()+1);n=o[t.get()];TT(e,n,false);e.setDirty(true);e.dispatch("Redo",{level:n})}return n};const jT=(e,t,o,n)=>{let s;if(t.typing){t.add();t.typing=false;RT(t,false,o)}if(n.get()>0){n.set(n.get()-1);s=t.data[n.get()];TT(e,s,true);e.setDirty(true);e.dispatch("Undo",{level:s})}return s};const UT=e=>{e.clear();e.add()};const qT=(e,t,o)=>o.get()>0||t.typing&&t.data[0]&&!MT(ST(e),t.data[0]);const WT=(e,t)=>t.get()<e.data.length-1&&!e.typing;const $T=(e,t,o)=>{BT(e,t);e.beforeChange();e.ignore(o);return e.add()};const GT=(e,t)=>{try{e.set(e.get()+1);t()}finally{e.set(e.get()-1)}};const KT=(e,t)=>{const o=e.dom;const n=T(t)?t:e.getBody();if(C(e.hasVisual)){e.hasVisual=Hu(e)}Z(o.select("table,a",n),(t=>{switch(t.nodeName){case"TABLE":const n=Iu(e);const s=o.getAttrib(t,"border");if((!s||s==="0")&&e.hasVisual){o.addClass(t,n)}else{o.removeClass(t,n)}break;case"A":if(!o.getAttrib(t,"href")){const n=o.getAttrib(t,"name")||t.id;const s=Pu(e);if(n&&e.hasVisual){o.addClass(t,s)}else{o.removeClass(t,s)}}break}}));e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})};const XT=e=>({init:{bindEvents:A},undoManager:{beforeChange:(t,o)=>HT(e,t,o),add:(t,o,n,s,r,a)=>IT(e,t,o,n,s,r,a),undo:(t,o,n)=>jT(e,t,o,n),redo:(t,o)=>VT(e,t,o),clear:(t,o)=>PT(e,t,o),reset:e=>UT(e),hasUndo:(t,o)=>qT(e,t,o),hasRedo:(e,t)=>WT(e,t),transact:(e,t,o)=>$T(e,t,o),ignore:(e,t)=>GT(e,t),extra:(t,o,n,s)=>FT(e,t,o,n,s)},formatter:{match:(t,o,n,s)=>ux(e,t,o,n,s),matchAll:(t,o)=>fx(e,t,o),matchNode:(t,o,n,s)=>dx(e,t,o,n,s),canApply:t=>gx(e,t),closest:t=>mx(e,t),apply:(t,o,n)=>Cz(e,t,o,n),remove:(t,o,n,s)=>pz(e,t,o,n,s),toggle:(t,o,n)=>Bz(e,t,o,n),formatChanged:(t,o,n,s,r)=>Rz(e,t,o,n,s,r)},editor:{getContent:t=>hv(e,t),setContent:(t,o)=>ex(e,t,o),insertContent:(t,o)=>K_(e,t,o),addVisual:t=>KT(e,t)},selection:{getContent:(t,o)=>dT(e,t,o)},autocompleter:{addDecoration:t=>Zb(e,t),removeDecoration:()=>ov(e,an.fromDom(e.getBody()))},raw:{getModel:()=>q.none()}});const YT=e=>{const t=e=>k(e)?e:{};const{init:o,undoManager:n,formatter:s,editor:r,selection:a,autocompleter:c,raw:i}=e;return{init:{bindEvents:o.bindEvents},undoManager:{beforeChange:n.beforeChange,add:n.add,undo:n.undo,redo:n.redo,clear:n.clear,reset:n.reset,hasUndo:n.hasUndo,hasRedo:n.hasRedo,transact:(e,t,o)=>n.transact(o),ignore:(e,t)=>n.ignore(t),extra:(e,t,o,s)=>n.extra(o,s)},formatter:{match:(e,o,n,r)=>s.match(e,t(o),r),matchAll:s.matchAll,matchNode:s.matchNode,canApply:e=>s.canApply(e),closest:e=>s.closest(e),apply:(e,o,n)=>s.apply(e,t(o)),remove:(e,o,n,r)=>s.remove(e,t(o)),toggle:(e,o,n)=>s.toggle(e,t(o)),formatChanged:(e,t,o,n,r)=>s.formatChanged(t,o,n,r)},editor:{getContent:e=>r.getContent(e),setContent:(e,t)=>({content:r.setContent(e,t),html:""}),insertContent:(e,t)=>{r.insertContent(e);return""},addVisual:r.addVisual},selection:{getContent:(e,t)=>a.getContent(t)},autocompleter:{addDecoration:c.addDecoration,removeDecoration:c.removeDecoration},raw:{getModel:()=>q.some(i.getRawModel())}}};const JT=()=>{const e=R(null);const t=R("");return{init:{bindEvents:A},undoManager:{beforeChange:A,add:e,undo:e,redo:e,clear:A,reset:A,hasUndo:j,hasRedo:j,transact:e,ignore:A,extra:A},formatter:{match:j,matchAll:R([]),matchNode:R(undefined),canApply:j,closest:t,apply:A,remove:A,toggle:A,formatChanged:R({unbind:A})},editor:{getContent:t,setContent:R({content:"",html:""}),insertContent:R(""),addVisual:A},selection:{getContent:t},autocompleter:{addDecoration:A,removeDecoration:A},raw:{getModel:R(q.none())}}};const QT=e=>Ne(e.plugins,"rtc");const ZT=e=>Me(e.plugins,"rtc").bind((e=>q.from(e.setup)));const eO=e=>{const t=e;return ZT(e).fold((()=>{t.rtcInstance=XT(e);return q.none()}),(e=>{t.rtcInstance=JT();return q.some((()=>e().then((e=>{t.rtcInstance=YT(e);return e.rtc.isRemote}))))}))};const tO=e=>e.rtcInstance?e.rtcInstance:XT(e);const oO=e=>{const t=e.rtcInstance;if(!t){throw new Error("Failed to get RTC instance not yet initialized.")}else{return t}};const nO=(e,t,o)=>{oO(e).undoManager.beforeChange(t,o)};const sO=(e,t,o,n,s,r,a)=>oO(e).undoManager.add(t,o,n,s,r,a);const rO=(e,t,o,n)=>oO(e).undoManager.undo(t,o,n);const aO=(e,t,o)=>oO(e).undoManager.redo(t,o);const cO=(e,t,o)=>{oO(e).undoManager.clear(t,o)};const iO=(e,t)=>{oO(e).undoManager.reset(t)};const lO=(e,t,o)=>oO(e).undoManager.hasUndo(t,o);const dO=(e,t,o)=>oO(e).undoManager.hasRedo(t,o);const uO=(e,t,o,n)=>oO(e).undoManager.transact(t,o,n);const fO=(e,t,o)=>{oO(e).undoManager.ignore(t,o)};const mO=(e,t,o,n,s)=>{oO(e).undoManager.extra(t,o,n,s)};const gO=(e,t,o,n,s)=>oO(e).formatter.match(t,o,n,s);const pO=(e,t,o)=>oO(e).formatter.matchAll(t,o);const hO=(e,t,o,n,s)=>oO(e).formatter.matchNode(t,o,n,s);const yO=(e,t)=>oO(e).formatter.canApply(t);const bO=(e,t)=>oO(e).formatter.closest(t);const vO=(e,t,o,n)=>{oO(e).formatter.apply(t,o,n)};const kO=(e,t,o,n,s)=>{oO(e).formatter.remove(t,o,n,s)};const wO=(e,t,o,n)=>{oO(e).formatter.toggle(t,o,n)};const _O=(e,t,o,n,s,r)=>oO(e).formatter.formatChanged(t,o,n,s,r);const xO=(e,t)=>tO(e).editor.getContent(t);const zO=(e,t,o)=>tO(e).editor.setContent(t,o);const CO=(e,t,o)=>tO(e).editor.insertContent(t,o);const SO=(e,t,o)=>oO(e).selection.getContent(t,o);const TO=(e,t)=>oO(e).editor.addVisual(t);const OO=e=>oO(e).init.bindEvents();const EO=(e,t)=>oO(e).autocompleter.addDecoration(t);const DO=e=>oO(e).autocompleter.removeDecoration();const AO=(e,t={})=>{const o=t.format?t.format:"html";return SO(e,o,t)};const MO=e=>{if(e.dom.length===0){cs(e);return q.none()}else{return q.some(e)}};const NO=(e,t)=>e.filter((e=>Rp.isBookmarkNode(e.dom))).bind(t?zn:xn);const RO=(e,t,o,n)=>{const s=e.dom;const r=t.dom;const a=n?s.length:r.length;if(n){Hk(s,r,false,!n);o.setStart(r,a)}else{Hk(r,s,false,!n);o.setEnd(r,a)}};const BO=(e,t)=>{vn(e).each((o=>{const n=e.dom;if(t&&_k(o,Tl(n,0))){Bk(n,0)}else if(!t&&zk(o,Tl(n,n.length))){Lk(n,n.length)}}))};const LO=(e,t,o,n)=>{e.bind((e=>{const s=n?Lk:Bk;s(e.dom,n?e.dom.length:0);return t.filter(Oo).map((t=>RO(e,t,o,n)))})).orThunk((()=>{const e=NO(t,n).or(t).filter(Oo);return e.map((e=>BO(e,n)))}))};const HO=(e,t)=>{const o=q.from(t.firstChild).map(an.fromDom);const n=q.from(t.lastChild).map(an.fromDom);e.deleteContents();e.insertNode(t);const s=o.bind(xn).filter(Oo).bind(MO);const r=n.bind(zn).filter(Oo).bind(MO);LO(s,o,e,true);LO(r,n,e,false);e.collapse(false)};const IO=(e,t)=>({format:"html",...e,set:true,selection:true,content:t});const PO=(e,t)=>{if(t.format!=="raw"){const o=e.selection.getRng();const n=e.dom.getParent(o.commonAncestorContainer,e.dom.isBlock);const s=n?{context:n.nodeName.toLowerCase()}:{};const r=e.parser.parse(t.content,{forced_root_block:false,...s,...t});return wv({validate:false},e.schema).serialize(r)}else{return t.content}};const FO=(e,t,o={})=>{const n=IO(o,t);OS(e,n).each((t=>{const o=PO(e,t);const n=e.selection.getRng();HO(n,n.createContextualFragment(o));e.selection.setRng(n);Fy(e,n);ES(e,o,t)}))};const VO=(e,t,o)=>{if(e&&Ne(e,t)){const n=oe(e[t],(e=>e!==o));if(n.length===0){delete e[t]}else{e[t]=n}}};var jO=(e,t)=>{let o;let n;const s=(t,o)=>ae(o,(o=>e.is(o,t)));const r=t=>e.getParents(t,null,e.getRoot());return{selectorChangedWithUnbind:(e,a)=>{if(!o){o={};n={};t.on("NodeChange",(e=>{const t=e.element;const a=r(t);const c={};fo.each(o,((e,t)=>{s(t,a).each((o=>{if(!n[t]){Z(e,(e=>{e(true,{node:o,selector:t,parents:a})}));n[t]=e}c[t]=e}))}));fo.each(n,((e,o)=>{if(!c[o]){delete n[o];fo.each(e,(e=>{e(false,{node:t,selector:o,parents:a})}))}}))}))}if(!o[e]){o[e]=[]}o[e].push(a);s(e,r(t.selection.getStart())).each((()=>{n[e]=o[e]}));return{unbind:()=>{VO(o,e,a);VO(n,e,a)}}}}};const UO=e=>!!(e&&e.ownerDocument)&&gn(an.fromDom(e.ownerDocument),an.fromDom(e));const qO=e=>{if(!e){return false}else{return UO(e.startContainer)&&UO(e.endContainer)}};const WO=(e,t,o,n)=>{let s;let r;const{selectorChangedWithUnbind:a}=jO(e,n);const c=(t,o)=>{const s=e.createRng();if(T(t)&&T(o)){s.setStart(t,o);s.setEnd(t,o);v(s);h(false)}else{vp(e,s,n.getBody(),true);v(s)}};const i=e=>AO(n,e);const l=(e,t)=>FO(n,e,t);const d=e=>Ib(n.getBody(),b(),e);const u=e=>Pb(n.getBody(),b(),e);const f=(e,t)=>N.getBookmark(e,t);const m=e=>N.moveToBookmark(e);const g=(t,o)=>{Ub(e,t,o).each(v);return t};const p=()=>{const e=b(),t=y();if(!e||e.item){return false}if(e.compareEndPoints){return e.compareEndPoints("StartToEnd",e)===0}return!t||e.collapsed};const h=e=>{const t=b();t.collapse(!!e);v(t)};const y=()=>t.getSelection?t.getSelection():t.document.selection;const b=()=>{let o,a,c;const i=(e,t,o)=>{try{return t.compareBoundaryPoints(e,o)}catch(e){return-1}};const l=t.document;if(n.bookmark!==undefined&&Mb(n)===false){const e=ob(n);if(e.isSome()){return e.map((e=>qb(n,[e])[0])).getOr(l.createRange())}}try{if((o=y())&&!Ns(o.anchorNode)){if(o.rangeCount>0){a=o.getRangeAt(0)}else{a=o.createRange?o.createRange():l.createRange()}a=qb(n,[a])[0]}}catch(e){}if(!a){a=l.createRange()}if(a.setStart&&a.startContainer.nodeType===9&&a.collapsed){c=e.getRoot();a.setStart(c,0);a.setEnd(c,0)}if(s&&r){if(i(a.START_TO_START,a,s)===0&&i(a.END_TO_END,a,s)===0){a=r}else{s=null;r=null}}return a};const v=(e,t)=>{let o;if(!qO(e)){return}const a=y();const c=n.dispatch("SetSelectionRange",{range:e,forward:t});e=c.range;if(a){r=e;try{a.removeAllRanges();a.addRange(e)}catch(e){}if(t===false&&a.extend){a.collapse(e.endContainer,e.endOffset);a.extend(e.startContainer,e.startOffset)}s=a.rangeCount>0?a.getRangeAt(0):null}if(!e.collapsed&&e.startContainer===e.endContainer&&a.setBaseAndExtent){if(e.endOffset-e.startOffset<2){if(e.startContainer.hasChildNodes()){o=e.startContainer.childNodes[e.startOffset];if(o&&o.tagName==="IMG"){a.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset);if(a.anchorNode!==e.startContainer||a.focusNode!==e.endContainer){a.setBaseAndExtent(o,0,o,1)}}}}}n.dispatch("AfterSetSelectionRange",{range:e,forward:t})};const k=t=>{l(e.getOuterHTML(t));return t};const w=()=>Vb(n.getBody(),b());const _=(t,o)=>jb(e,b(),t,o);const x=()=>{const t=y();const o=t===null||t===void 0?void 0:t.anchorNode;const n=t===null||t===void 0?void 0:t.focusNode;if(!t||!o||!n||Ns(o)||Ns(n)){return true}const s=e.createRng();s.setStart(o,t.anchorOffset);s.collapse(true);const r=e.createRng();r.setStart(n,t.focusOffset);r.collapse(true);return s.compareBoundaryPoints(s.START_TO_START,r)<=0};const z=()=>{const t=b();const o=y();if(!ip(o)&&kp(n)){const o=ry(e,t);o.each((e=>{v(e,x())}));return o.getOr(t)}return t};const C=(e,t)=>{a(e,t);return M};const S=()=>{let t;let o=e.getRoot();while(o&&o.nodeName!=="BODY"){if(o.scrollHeight>o.clientHeight){t=o;break}o=o.parentNode}return t};const O=(e,t)=>{if(T(e)){Py(n,e,t)}else{Fy(n,b(),t)}};const E=(e,t)=>v($h(e,t,n.getDoc()));const D=()=>{const e=b();return e.collapsed?Tl.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()};const A=()=>{t=s=r=null;R.destroy()};const M={bookmarkManager:null,controlSelection:null,dom:e,win:t,serializer:o,editor:n,collapse:h,setCursorLocation:c,getContent:i,setContent:l,getBookmark:f,moveToBookmark:m,select:g,isCollapsed:p,isForward:x,setNode:k,getNode:w,getSel:y,setRng:v,getRng:b,getStart:d,getEnd:u,getSelectedBlocks:_,normalize:z,selectorChanged:C,selectorChangedWithUnbind:a,getScrollContainer:S,scrollIntoView:O,placeCaretAt:E,getBoundingClientRect:D,destroy:A};const N=Rp(M);const R=ch(M,n);M.bookmarkManager=N;M.controlSelection=R;return M};const $O=(e,t,o)=>{e.addAttributeFilter("data-mce-tabindex",((e,t)=>{let o=e.length;while(o--){const n=e[o];n.attr("tabindex",n.attr("data-mce-tabindex"));n.attr(t,null)}}));e.addAttributeFilter("src,href,style",((e,n)=>{const s="data-mce-"+n;const r=t.url_converter;const a=t.url_converter_scope;let c=e.length;while(c--){const t=e[c];let i=t.attr(s);if(i!==undefined){t.attr(n,i.length>0?i:null);t.attr(s,null)}else{i=t.attr(n);if(n==="style"){i=o.serializeStyle(o.parseStyle(i),t.name)}else if(r){i=r.call(a,i,n,t.name)}t.attr(n,i.length>0?i:null)}}}));e.addAttributeFilter("class",(e=>{let t=e.length;while(t--){const o=e[t];let n=o.attr("class");if(n){n=o.attr("class").replace(/(?:^|\s)mce-item-\w+(?!\S)/g,"");o.attr("class",n.length>0?n:null)}}}));e.addAttributeFilter("data-mce-type",((e,t,o)=>{let n=e.length;while(n--){const t=e[n];if(t.attr("data-mce-type")==="bookmark"&&!o.cleanup){const e=q.from(t.firstChild).exists((e=>!$r(e.value)));if(e){t.unwrap()}else{t.remove()}}}}));e.addNodeFilter("noscript",(e=>{let t=e.length;while(t--){const o=e[t].firstChild;if(o){o.value=uc.decode(o.value)}}}));e.addNodeFilter("script,style",((e,o)=>{const n=e=>e.replace(/(<!--\[CDATA\[|\]\]-->)/g,"\n").replace(/^[\r\n]*|[\r\n]*$/g,"").replace(/^\s*((<!--)?(\s*\/\/)?\s*<!\[CDATA\[|(<!--\s*)?\/\*\s*<!\[CDATA\[\s*\*\/|(\/\/)?\s*<!--|\/\*\s*<!--\s*\*\/)\s*[\r\n]*/gi,"").replace(/\s*(\/\*\s*\]\]>\s*\*\/(-->)?|\s*\/\/\s*\]\]>(-->)?|\/\/\s*(-->)?|\]\]>|\/\*\s*-->\s*\*\/|\s*-->\s*)\s*$/g,"");let s=e.length;while(s--){const r=e[s];const a=r.firstChild?r.firstChild.value:"";if(o==="script"){const e=r.attr("type");if(e){r.attr("type",e==="mce-no/type"?null:e.replace(/^mce\-/,""))}if(t.element_format==="xhtml"&&a.length>0){r.firstChild.value="// <![CDATA[\n"+n(a)+"\n// ]]>"}}else{if(t.element_format==="xhtml"&&a.length>0){r.firstChild.value="\x3c!--\n"+n(a)+"\n--\x3e"}}}}));e.addNodeFilter("#comment",(e=>{let n=e.length;while(n--){const s=e[n];if(t.preserve_cdata&&s.value.indexOf("[CDATA[")===0){s.name="#cdata";s.type=4;s.value=o.decode(s.value.replace(/^\[CDATA\[|\]\]$/g,""))}else if(s.value.indexOf("mce:protected ")===0){s.name="#text";s.type=3;s.raw=true;s.value=unescape(s.value).substr(14)}}}));e.addNodeFilter("xml:namespace,input",((e,t)=>{let o=e.length;while(o--){const n=e[o];if(n.type===7){n.remove()}else if(n.type===1){if(t==="input"&&!n.attr("type")){n.attr("type","text")}}}}));e.addAttributeFilter("data-mce-type",(t=>{Z(t,(t=>{if(t.attr("data-mce-type")==="format-caret"){if(t.isEmpty(e.schema.getNonEmptyElements())){t.remove()}else{t.unwrap()}}}))}));e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,"+"data-mce-selected,data-mce-expando,"+"data-mce-type,data-mce-resize,data-mce-placeholder",((e,t)=>{let o=e.length;while(o--){e[o].attr(t,null)}}))};const GO=e=>{const t=e=>e&&e.name==="br";const o=e.lastChild;if(t(o)){const e=o.prev;if(t(e)){o.remove();e.remove()}}};const KO=(e,t,o)=>{let n;const s=e.dom;let r=t.cloneNode(true);const a=document.implementation;if(a.createHTMLDocument){const e=a.createHTMLDocument("");fo.each(r.nodeName==="BODY"?r.childNodes:[r],(t=>{e.body.appendChild(e.importNode(t,true))}));if(r.nodeName!=="BODY"){r=e.body.firstChild}else{r=e.body}n=s.doc;s.doc=e}Lp(e,{...o,node:r});if(n){s.doc=n}return r};const XO=(e,t)=>e&&e.hasEventListeners("PreProcess")&&!t.no_events;const YO=(e,t,o)=>XO(e,o)?KO(e,t,o):t;const JO=(e,t,o)=>{if(fo.inArray(t,o)===-1){e.addAttributeFilter(o,((e,t)=>{let o=e.length;while(o--){e[o].attr(t,null)}}));t.push(o)}};const QO=(e,t,o)=>{if(!t.no_events&&e){const n=Hp(e,{...t,content:o});return n.content}else{return o}};const ZO=(e,t,o)=>{const n=Gr(o.getInner?t.innerHTML:e.getOuterHTML(t));return o.selection||Pr(an.fromDom(t))?n:fo.trim(n)};const eE=(e,t,o)=>{const n=o.selection?{forced_root_block:false,...o}:o;const s=e.parse(t,n);GO(s);return s};const tE=(e,t,o)=>{const n=wv(e,t);return n.serialize(o)};const oE=(e,t,o,n,s)=>{const r=tE(t,o,n);return QO(e,s,r)};const nE=(e,t)=>{const o=["data-mce-selected"];const n=t&&t.dom?t.dom:Gc.DOM;const s=t&&t.schema?t.schema:_c(e);e.entity_encoding=e.entity_encoding||"named";e.remove_trailing_brs="remove_trailing_brs"in e?e.remove_trailing_brs:true;const r=xS(e,s);$O(r,e,n);const a=(o,a={})=>{const c={format:"html",...a};const i=YO(t,o,c);const l=ZO(n,i,c);const d=eE(r,l,c);return c.format==="tree"?d:oE(t,e,s,d,c)};return{schema:s,addNodeFilter:r.addNodeFilter,addAttributeFilter:r.addAttributeFilter,serialize:a,addRules:s.addValidElements,setRules:s.setValidElements,addTempAttr:H(JO,r,o),getTempAttrs:R(o),getNodeFilters:r.getNodeFilters,getAttributeFilters:r.getAttributeFilters}};const sE=(e,t)=>{const o=nE(e,t);return{schema:o.schema,addNodeFilter:o.addNodeFilter,addAttributeFilter:o.addAttributeFilter,serialize:o.serialize,addRules:o.addRules,setRules:o.setRules,addTempAttr:o.addTempAttr,getTempAttrs:o.getTempAttrs,getNodeFilters:o.getNodeFilters,getAttributeFilters:o.getAttributeFilters}};const rE="html";const aE=(e,t)=>({...e,format:t,get:true,getInner:true});const cE=(e,t={})=>{const o=t.format?t.format:rE;const n=aE(t,o);return SS(e,n).fold(B,(t=>{const o=xO(e,t);return TS(e,o,t)}))};const iE="html";const lE=(e,t)=>({format:iE,...e,set:true,content:t});const dE=(e,t,o={})=>{const n=lE(o,t);return OS(e,n).map((t=>{const o=zO(e,t.content,t);ES(e,o.html,t);return o.content})).getOr(t)};const uE=("autoresize_on_init,content_editable_state,padd_empty_with_br,block_elements,"+"boolean_attributes,editor_deselector,editor_selector,elements,file_browser_callback_types,filepicker_validator_handler,"+"force_hex_style_colors,force_p_newlines,gecko_spellcheck,images_dataimg_filter,media_scripts,mode,move_caret_before_on_enter_elements,"+"non_empty_elements,self_closing_elements,short_ended_elements,special,spellchecker_select_languages,spellchecker_whitelist,"+"tab_focus,tabfocus_elements,table_responsive_width,text_block_elements,text_inline_elements,toolbar_drawer,types,validate,whitespace_elements,"+"paste_enable_default_filters,paste_filter_drop,paste_word_valid_elements,paste_retain_style_properties,paste_convert_word_fake_lists").split(",");const fE="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(",");const mE=e=>{const t=oe(uE,(t=>Ne(e,t)));const o=e.forced_root_block;if(o===false||o===""){t.push("forced_root_block (false only)")}return ge(t)};const gE=e=>{const t=fo.makeMap(e.plugins," ");const o=e=>Ne(t,e);const n=oe(fE,o);return ge(n)};const pE=(e,t)=>{const o=mE(e);const n=gE(t);const s=n.length>0;const r=o.length>0;const a=t.theme==="mobile";if(s||r||a){const e="\n- ";const t=a?`\n\nThemes:${e}mobile`:"";const c=s?`\n\nPlugins:${e}${n.join(e)}`:"";const i=r?`\n\nOptions:${e}${o.join(e)}`:"";console.warn("The following deprecated features are currently enabled and have been removed in TinyMCE 6.0. These features will no longer work and should be removed from the TinyMCE configuration. "+"See https://www.tiny.cloud/docs/tinymce/6/migration-from-5x/ for more information."+t+c+i)}};const hE=(e,t)=>{pE(e,t)};const yE=Gc.DOM;const bE=e=>{yE.setStyle(e.id,"display",e.orgDisplay)};const vE=e=>q.from(e).each((e=>e.destroy()));const kE=e=>{e.contentAreaContainer=e.formElement=e.container=e.editorContainer=null;e.bodyElement=e.contentDocument=e.contentWindow=null;e.iframeElement=e.targetElm=null;if(e.selection){e.selection=e.selection.win=e.selection.dom=e.selection.dom.doc=null}};const wE=e=>{const t=e.formElement;if(t){if(t._mceOldSubmit){t.submit=t._mceOldSubmit;t._mceOldSubmit=null}yE.unbind(t,"submit reset",e.formEventDelegate)}};const _E=e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:o}=e;const n=e.getBody();const s=e.getElement();if(n){e.save({is_removing:true})}e.removed=true;e.unbindAllNativeEvents();if(e.hasHiddenInput&&s){yE.remove(s.nextSibling)}Ip(e);e.editorManager.remove(e);if(!e.inline&&n){bE(e)}Pp(e);yE.remove(e.getContainer());vE(t);vE(o);e.destroy()}};const xE=(e,t)=>{const{selection:o,dom:n}=e;if(e.destroyed){return}if(!t&&!e.removed){e.remove();return}if(!t){e.editorManager.off("beforeunload",e._beforeUnload);if(e.theme&&e.theme.destroy){e.theme.destroy()}vE(o);vE(n)}wE(e);kE(e);e.destroyed=true};const zE=()=>{const e={};const t=(t,o)=>{e[t]=o};const o=t=>{if(e[t]){return e[t]}return{icons:{}}};const n=t=>Ne(e,t);return{add:t,get:o,has:n}};const CE=zE();const SE=gi.ModelManager;const TE=(e,t)=>{const o=t.dom;return o[e]};const OE=(e,t)=>parseInt(Gn(t,e),10);const EE=H(TE,"clientWidth");const DE=H(TE,"clientHeight");const AE=H(OE,"margin-top");const ME=H(OE,"margin-left");const NE=e=>e.dom.getBoundingClientRect();const RE=(e,t,o)=>{const n=EE(e);const s=DE(e);return t>=0&&o>=0&&t<=n&&o<=s};const BE=(e,t,o,n)=>{const s=NE(t);const r=e?s.left+t.dom.clientLeft+ME(t):0;const a=e?s.top+t.dom.clientTop+AE(t):0;const c=o-r;const i=n-a;return{x:c,y:i}};const LE=(e,t,o)=>{const n=an.fromDom(e.getBody());const s=e.inline?n:yn(n);const r=BE(e.inline,s,t,o);return RE(s,r.x,r.y)};const HE=e=>q.from(e).map(an.fromDom);const IE=e=>{const t=e.inline?e.getBody():e.getContentAreaContainer();return HE(t).map(jn).getOr(false)};const PE=()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}};const FE=e=>{const t=[];const o=()=>{const t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():PE()};const n=()=>q.from(t[0]);const s=(e,t)=>e.type===t.type&&e.text===t.text&&!e.progressBar&&!e.timeout&&!t.progressBar&&!t.timeout;const r=()=>{Z(t,(e=>{e.reposition()}))};const a=e=>{t.push(e)};const c=e=>{ce(t,(t=>t===e)).each((e=>{t.splice(e,1)}))};const i=(i,l=true)=>{if(e.removed||!IE(e)){return}if(l){e.dispatch("BeforeOpenNotification",{notification:i})}return ae(t,(e=>s(o().getArgs(e),i))).getOrThunk((()=>{e.editorManager.setActive(e);const t=o().open(i,(()=>{c(t);r();n().fold((()=>e.focus()),(e=>Vy(an.fromDom(e.getEl()))))}));a(t);r();e.dispatch("OpenNotification",{notification:{...t}});return t}))};const l=()=>{n().each((e=>{o().close(e);c(e);r()}))};const d=R(t);const u=e=>{e.on("SkinLoaded",(()=>{const t=pu(e);if(t){i({text:t,type:"warning",timeout:0},false)}r()}));e.on("show ResizeEditor ResizeWindow NodeChange",(()=>{requestAnimationFrame(r)}));e.on("remove",(()=>{Z(t.slice(),(e=>{o().close(e)}))}))};u(e);return{open:i,close:l,getNotifications:d}};const VE=gi.PluginManager;const jE=gi.ThemeManager;var UE=()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e,getParams:e,setParams:e}};const qE=e=>{let t=[];const o=()=>{const t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():UE()};const n=(e,t)=>(...o)=>t?t.apply(e,o):undefined;const s=t=>{e.dispatch("OpenWindow",{dialog:t})};const r=t=>{e.dispatch("CloseWindow",{dialog:t})};const a=e=>{t.push(e);s(e)};const c=o=>{r(o);t=oe(t,(e=>e!==o));if(t.length===0){e.focus()}};const i=()=>q.from(t[t.length-1]);const l=t=>{e.editorManager.setActive(e);tb(e);e.ui.show();const o=t();a(o);return o};const d=(e,t)=>l((()=>o().open(e,t,c)));const u=e=>l((()=>o().openUrl(e,c)));const f=(e,t,s)=>{const r=o();r.alert(e,n(s?s:r,t))};const m=(e,t,s)=>{const r=o();r.confirm(e,n(s?s:r,t))};const g=()=>{i().each((e=>{o().close(e);c(e)}))};e.on("remove",(()=>{Z(t,(e=>{o().close(e)}))}));return{open:d,openUrl:u,alert:f,confirm:m,close:g}};const WE=(e,t)=>{e.notificationManager.open({type:"error",text:t})};const $E=(e,t)=>{if(e._skinLoaded){WE(e,t)}else{e.on("SkinLoaded",(()=>{WE(e,t)}))}};const GE=(e,t)=>{$E(e,mi.translate(["Failed to upload image: {0}",t]))};const KE=(e,t,o)=>{Gp(e,t,{message:o});console.error(o)};const XE=(e,t,o)=>o?`Failed to load ${e}: ${o} from url ${t}`:`Failed to load ${e} url: ${t}`;const YE=(e,t,o)=>{KE(e,"PluginLoadError",XE("plugin",t,o))};const JE=(e,t,o)=>{KE(e,"IconsLoadError",XE("icons",t,o))};const QE=(e,t,o)=>{KE(e,"LanguageLoadError",XE("language",t,o))};const ZE=(e,t,o)=>{KE(e,"ThemeLoadError",XE("theme",t,o))};const eD=(e,t,o)=>{KE(e,"ModelLoadError",XE("model",t,o))};const tD=(e,t,o)=>{const n=mi.translate(["Failed to initialize plugin: {0}",t]);Gp(e,"PluginLoadError",{message:n});oD(n,o);$E(e,n)};const oD=(e,...t)=>{const o=window.console;if(o){if(o.error){o.error(e,...t)}else{o.log(e,...t)}}};const nD=e=>/^[a-z0-9\-]+$/i.test(e);const sD=e=>aD(e,au(e));const rD=e=>aD(e,iu(e));const aD=(e,t)=>{const o=e.editorManager.baseURL+"/skins/content";const n=e.editorManager.suffix;const s=`content${n}.css`;const r=e.inline===true;return Q(t,(t=>{if(nD(t)&&!r){return`${o}/${t}/${s}`}else{return e.documentBaseURI.toAbsolute(t)}}))};const cD=e=>{e.contentCSS=e.contentCSS.concat(sD(e),rD(e))};const iD=U;const lD=(e,t,o)=>bs(e,t,iD,o);const dD=()=>{const e=1,t=2;let o={};const n=(e,t)=>({status:e,resultUri:t});const s=e=>e in o;const r=e=>{const t=o[e];return t?t.resultUri:null};const a=t=>s(t)?o[t].status===e:false;const c=e=>s(e)?o[e].status===t:false;const i=t=>{o[t]=n(e,null)};const l=(e,s)=>{o[e]=n(t,s)};const d=e=>{delete o[e]};const u=()=>{o={}};return{hasBlobUri:s,getResultUri:r,isPending:a,isUploaded:c,markPending:i,markUploaded:l,removeFailed:d,destroy:u}};let uD=0;const fD=()=>{const e=()=>Math.round(Math.random()*4294967295).toString(36);const t=(new Date).getTime();return"s"+t.toString(36)+e()+e()+e()};const mD=e=>e+uD+++fD();const gD=()=>{let e=[];const t=e=>{const t={"image/jpeg":"jpg","image/jpg":"jpg","image/gif":"gif","image/png":"png","image/apng":"apng","image/avif":"avif","image/svg+xml":"svg","image/webp":"webp","image/bmp":"bmp","image/tiff":"tiff"};return t[e.toLowerCase()]||"dat"};const o=(e,t,o,s,r)=>{if(v(e)){const a=e;return n({id:a,name:s,filename:r,blob:t,base64:o})}else if(k(e)){return n(e)}else{throw new Error("Unknown input type")}};const n=e=>{if(!e.blob||!e.base64){throw new Error("blob and base64 representations of the image are required for BlobInfo to be created")}const o=e.id||mD("blobid");const n=e.name||o;const s=e.blob;return{id:R(o),name:R(n),filename:R(e.filename||n+"."+t(s.type)),blob:R(s),base64:R(e.base64),blobUri:R(e.blobUri||URL.createObjectURL(s)),uri:R(e.uri)}};const s=t=>{if(!a(t.id())){e.push(t)}};const r=t=>ae(e,t).getOrUndefined();const a=e=>r((t=>t.id()===e));const c=e=>r((t=>t.blobUri()===e));const i=(e,t)=>r((o=>o.base64()===e&&o.blob().type===t));const l=t=>{e=oe(e,(e=>{if(e.blobUri()===t){URL.revokeObjectURL(e.blobUri());return false}return true}))};const d=()=>{Z(e,(e=>{URL.revokeObjectURL(e.blobUri())}));e=[]};return{create:o,add:s,get:a,getByUri:c,getByData:i,findFirst:r,removeByUri:l,destroy:d}};const pD=(e,t)=>{const o={};const n=(e,t)=>{if(e){return e.replace(/\/$/,"")+"/"+t.replace(/^\//,"")}return t};const s=(e,o)=>new Promise(((s,r)=>{const a=new XMLHttpRequest;a.open("POST",t.url);a.withCredentials=t.credentials;a.upload.onprogress=e=>{o(e.loaded/e.total*100)};a.onerror=()=>{r("Image upload failed due to a XHR Transport error. Code: "+a.status)};a.onload=()=>{if(a.status<200||a.status>=300){r("HTTP Error: "+a.status);return}const e=JSON.parse(a.responseText);if(!e||!v(e.location)){r("Invalid JSON: "+a.responseText);return}s(n(t.basePath,e.location))};const c=new FormData;c.append("file",e.blob(),e.filename());a.send(c)}));const r=()=>new Promise((e=>{e([])}));const a=(e,t)=>({url:t,blobInfo:e,status:true});const c=(e,t)=>({url:"",blobInfo:e,status:false,error:t});const i=(e,t)=>{fo.each(o[e],(e=>{e(t)}));delete o[e]};const l=(t,o,n)=>{e.markPending(t.blobUri());return new Promise((s=>{let r;let l;try{const d=()=>{if(r){r.close();l=A}};const u=o=>{d();e.markUploaded(t.blobUri(),o);i(t.blobUri(),a(t,o));s(a(t,o))};const f=o=>{d();e.removeFailed(t.blobUri());i(t.blobUri(),c(t,o));s(c(t,o))};l=e=>{if(e<0||e>100){return}q.from(r).orThunk((()=>q.from(n).map(F))).each((t=>{r=t;t.progressBar.value(e)}))};o(t,l).then(u,(e=>{f(v(e)?{message:e}:e)}))}catch(e){s(c(t,e))}}))};const d=e=>e===s;const u=e=>{const t=e.blobUri();return new Promise((e=>{o[t]=o[t]||[];o[t].push(e)}))};const f=(o,n)=>{o=fo.grep(o,(t=>!e.isUploaded(t.blobUri())));return Promise.all(fo.map(o,(o=>e.isPending(o.blobUri())?u(o):l(o,t.handler,n))))};const m=(e,o)=>!t.url&&d(t.handler)?r():f(e,o);if(O(t.handler)===false){t.handler=s}return{upload:m}};const hD=e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:true});const yD=(e,t)=>pD(t,{url:Yd(e),basePath:Jd(e),credentials:Qd(e),handler:Zd(e)});const bD=e=>{const t=dD();const o=yD(e,t);return{upload:(t,n=true)=>o.upload(t,n?hD(e):undefined)}};const vD=e=>{const t=ei(null);e.on("change AddUndo",(e=>{t.set({...e.level})}));const o=()=>{const o=e.undoManager.data;ye(o).filter((e=>!MT(t.get(),e))).each((t=>{e.setDirty(true);e.dispatch("change",{level:t,lastLevel:pe(o,o.length-2).getOrNull()})}))};return{fireIfChanged:o}};const kD=e=>{const t=gD();let o,n;const s=dD();const r=[];const a=vD(e);const c=t=>o=>{if(e.selection){return t(o)}return[]};const i=e=>e+(e.indexOf("?")===-1?"?":"&")+(new Date).getTime();const l=(e,t,o)=>{let n=0;do{n=e.indexOf(t,n);if(n!==-1){e=e.substring(0,n)+o+e.substr(n+t.length);n+=o.length-t.length+1}}while(n!==-1);return e};const d=(e,t,o)=>{const n=`src="${o}"${o===eo.transparentSrc?' data-mce-placeholder="1"':""}`;e=l(e,`src="${t}"`,n);e=l(e,'data-mce-src="'+t+'"','data-mce-src="'+o+'"');return e};const u=(t,o)=>{Z(e.undoManager.data,(e=>{if(e.type==="fragmented"){e.fragments=Q(e.fragments,(e=>d(e,t,o)))}else{e.content=d(e.content,t,o)}}))};const f=(t,o)=>{const n=e.convertURL(o,"src");u(t.src,o);Ro(an.fromDom(t),{src:$d(e)?i(o):o,"data-mce-src":n})};const m=()=>{if(!o){o=yD(e,s)}return y().then(c((n=>{const s=Q(n,(e=>e.blobInfo));return o.upload(s,hD(e)).then(c((o=>{const s=[];const r=Q(o,((o,r)=>{const a=n[r].blobInfo;const c=n[r].image;let i=false;if(o.status&&Gd(e)){t.removeByUri(c.src);if(QT(e));else{f(c,o.url)}}else if(o.error){if(o.error.remove){u(c.getAttribute("src"),eo.transparentSrc);s.push(c);i=true}GE(e,o.error.message)}return{element:c,status:o.status,uploadUri:o.url,blobInfo:a,removed:i}}));if(r.length>0){a.fireIfChanged()}if(s.length>0&&!QT(e)){e.undoManager.transact((()=>{Z(s,(o=>{e.dom.remove(o);t.removeByUri(o.src)}))}))}return r})))})))};const g=()=>Wd(e)?m():Promise.resolve([]);const p=e=>de(r,(t=>t(e)));const h=e=>{r.push(e)};const y=()=>{if(!n){n=XC(s,t)}return n.findAll(e.getBody(),p).then(c((t=>{t=oe(t,(t=>{if(typeof t==="string"){$E(e,t);return false}return true}));if(QT(e));else{Z(t,(e=>{u(e.image.src,e.blobInfo.blobUri());e.image.src=e.blobInfo.blobUri();e.image.removeAttribute("data-mce-src")}))}return t})))};const b=()=>{t.destroy();s.destroy();n=o=null};const v=o=>o.replace(/src="(blob:[^"]+)"/g,((o,n)=>{const r=s.getResultUri(n);if(r){return'src="'+r+'"'}let a=t.getByUri(n);if(!a){a=se(e.editorManager.get(),((e,t)=>e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)),null)}if(a){const e=a.blob();return'src="data:'+e.type+";base64,"+a.base64()+'"'}return o}));e.on("SetContent",(()=>{if(Wd(e)){g()}else{y()}}));e.on("RawSaveContent",(e=>{e.content=v(e.content)}));e.on("GetContent",(e=>{if(e.source_view||e.format==="raw"||e.format==="tree"){return}e.content=v(e.content)}));e.on("PostRender",(()=>{e.parser.addNodeFilter("img",(e=>{Z(e,(e=>{const o=e.attr("src");if(t.getByUri(o)){return}const n=s.getResultUri(o);if(n){e.attr("src",n)}}))}))}));return{blobCache:t,addFilter:h,uploadImages:m,uploadImagesAuto:g,scanForImages:y,destroy:b}};const wD=e=>{const t=e.dom;const o=e.schema.type;const n={valigntop:[{selector:"td,th",styles:{verticalAlign:"top"}}],valignmiddle:[{selector:"td,th",styles:{verticalAlign:"middle"}}],valignbottom:[{selector:"td,th",styles:{verticalAlign:"bottom"}}],alignleft:[{selector:"figure.image",collapsed:false,classes:"align-left",ceFalseOverride:true,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"left"},inherit:false,preview:false},{selector:"img,audio,video",collapsed:false,styles:{float:"left"},preview:"font-family font-size"},{selector:"table",collapsed:false,styles:{marginLeft:"0px",marginRight:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"center"},inherit:false,preview:"font-family font-size"},{selector:"figure.image",collapsed:false,classes:"align-center",ceFalseOverride:true,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:false,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:false},{selector:"table",collapsed:false,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"}],alignright:[{selector:"figure.image",collapsed:false,classes:"align-right",ceFalseOverride:true,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"right"},inherit:false,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:false,styles:{float:"right"},preview:"font-family font-size"},{selector:"table",collapsed:false,styles:{marginRight:"0px",marginLeft:"auto"},onformat:e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li",styles:{textAlign:"justify"},inherit:false,preview:"font-family font-size"}],bold:[{inline:"strong",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontWeight:"bold"}},{inline:"b",remove:"all",preserve_attributes:["class","style"]}],italic:[{inline:"em",remove:"all",preserve_attributes:["class","style"]},{inline:"span",styles:{fontStyle:"italic"}},{inline:"i",remove:"all",preserve_attributes:["class","style"]}],underline:[{inline:"span",styles:{textDecoration:"underline"},exact:true},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:(()=>{const e={inline:"span",styles:{textDecoration:"line-through"},exact:true};const t={inline:"strike",remove:"all",preserve_attributes:["class","style"]};const n={inline:"s",remove:"all",preserve_attributes:["class","style"]};return o!=="html4"?[n,e,t]:[e,n,t]})(),forecolor:{inline:"span",styles:{color:"%value"},links:true,remove_similar:true,clear_child_styles:true},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:true,remove_similar:true,clear_child_styles:true},fontname:{inline:"span",toggle:false,styles:{fontFamily:"%value"},clear_child_styles:true},fontsize:{inline:"span",toggle:false,styles:{fontSize:"%value"},clear_child_styles:true},lineheight:{selector:"h1,h2,h3,h4,h5,h6,p,li,td,th,div",styles:{lineHeight:"%value"}},fontsize_class:{inline:"span",attributes:{class:"%value"}},blockquote:{block:"blockquote",wrapper:true,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:true,deep:true,onmatch:(e,t,o)=>Rs(e)&&e.hasAttribute("href"),onformat:(e,o,n)=>{fo.each(n,((o,n)=>{t.setAttrib(e,n,o)}))}},lang:{inline:"span",clear_child_styles:true,remove_similar:true,attributes:{lang:"%value","data-mce-lang":e=>{var t;return(t=e===null||e===void 0?void 0:e.customValue)!==null&&t!==void 0?t:null}}},removeformat:[{selector:"b,strong,em,i,font,u,strike,s,sub,sup,dfn,code,samp,kbd,var,cite,mark,q,del,ins,small",remove:"all",split:true,expand:false,block_expand:true,deep:true},{selector:"span",attributes:["style","class"],remove:"empty",split:true,expand:false,deep:true},{selector:"*",attributes:["style","class"],split:false,expand:false,deep:true}]};fo.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(e=>{n[e]={block:e,remove:"all"}}));return n};const _D={remove_similar:true,inherit:false};const xD={selector:"td,th",..._D};const zD={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...xD},tablecellverticalalign:{styles:{"vertical-align":"%value"},...xD},tablecellbordercolor:{styles:{borderColor:"%value"},...xD},tablecellclass:{classes:["%value"],...xD},tableclass:{selector:"table",classes:["%value"],..._D},tablecellborderstyle:{styles:{borderStyle:"%value"},...xD},tablecellborderwidth:{styles:{borderWidth:"%value"},...xD}};const CD=R(zD);const SD=e=>{const t={};const o=e=>T(e)?t[e]:t;const n=e=>Ne(t,e);const s=(e,o)=>{if(e){if(!v(e)){xe(e,((e,t)=>{s(t,e)}))}else{if(!_(o)){o=[o]}Z(o,(e=>{if(C(e.deep)){e.deep=!Pg(e)}if(C(e.split)){e.split=!Pg(e)||Fg(e)}if(C(e.remove)&&Pg(e)&&!Fg(e)){e.remove="none"}if(Pg(e)&&Fg(e)){e.mixed=true;e.block_expand=true}if(v(e.classes)){e.classes=e.classes.split(/\s+/)}}));t[e]=o}}};const r=e=>{if(e&&t[e]){delete t[e]}return t};s(wD(e));s(CD());s(wu(e));return{get:o,has:n,register:s,unregister:r}};const TD=fo.each;const OD=Gc.DOM;const ED=(e,t)=>{let o,n,s;const r=t&&t.schema||_c({});const a=(e,t)=>{if(t.classes.length){OD.addClass(e,t.classes.join(" "))}OD.setAttribs(e,t.attrs)};const c=e=>{n=typeof e==="string"?{name:e,classes:[],attrs:{}}:e;const t=OD.create(n.name);a(t,n);return t};const i=(e,t)=>{const o=typeof e!=="string"?e.nodeName.toLowerCase():e;const n=r.getElementRule(o);const s=n&&n.parentsRequired;if(s&&s.length){return t&&fo.inArray(s,t)!==-1?t:s[0]}else{return false}};const l=(e,t,o)=>{let n,s;const r=t.length>0&&t[0];const a=r&&r.name;const d=i(e,a);if(d){if(a===d){s=t[0];t=t.slice(1)}else{s=d}}else if(r){s=t[0];t=t.slice(1)}else if(!o){return e}if(s){n=c(s);n.appendChild(e)}if(o){if(!n){n=OD.create("div");n.appendChild(e)}fo.each(o,(t=>{const o=c(t);n.insertBefore(o,e)}))}return l(n,t,s&&s.siblings)};if(e&&e.length){n=e[0];o=c(n);s=OD.create("div");s.appendChild(l(o,e.slice(1),n.siblings));return s}else{return""}};const DD=e=>{let t;const o={classes:[],attrs:{}};e=o.selector=fo.trim(e);if(e!=="*"){t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,((e,t,n,s,r)=>{switch(t){case"#":o.attrs.id=n;break;case".":o.classes.push(n);break;case":":if(fo.inArray("checked disabled enabled read-only required".split(" "),n)!==-1){o.attrs[n]=n}break}if(s==="["){const e=r.match(/([\w\-]+)(?:\=\"([^\"]+))?/);if(e){o.attrs[e[1]]=e[2]}}return""}))}o.name=t||"div";return o};const AD=e=>{if(!e||typeof e!=="string"){return[]}e=e.split(/\s*,\s*/)[0];e=e.replace(/\s*(~\+|~|\+|>)\s*/g,"$1");return fo.map(e.split(/(?:>|\s+(?![^\[\]]+\]))/),(e=>{const t=fo.map(e.split(/(?:~\+|~|\+)/),DD);const o=t.pop();if(t.length){o.siblings=t}return o})).reverse()};const MD=(e,t)=>{let o,n;let s="",r;let a=_u(e);if(a===""){return""}const c=e=>e.replace(/%(\w+)/g,"");if(typeof t==="string"){t=e.formatter.get(t);if(!t){return}t=t[0]}if("preview"in t){const e=Me(t,"preview");if(mo(e,false)){return""}else{a=e.getOr(a)}}o=t.block||t.inline||"span";const i=AD(t.selector);if(i.length){if(!i[0].name){i[0].name=o}o=t.selector;n=ED(i,e)}else{n=ED([o],e)}const l=OD.select(o,n)[0]||n.firstChild;TD(t.styles,((e,t)=>{const o=c(e);if(o){OD.setStyle(l,t,o)}}));TD(t.attributes,((e,t)=>{const o=c(e);if(o){OD.setAttrib(l,t,o)}}));TD(t.classes,(e=>{const t=c(e);if(!OD.hasClass(l,t)){OD.addClass(l,t)}}));e.dispatch("PreviewFormats");OD.setStyles(n,{position:"absolute",left:-65535});e.getBody().appendChild(n);r=OD.getStyle(e.getBody(),"fontSize",true);r=/px$/.test(r)?parseInt(r,10):0;TD(a.split(" "),(t=>{let o=OD.getStyle(l,t,true);if(t==="background-color"&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(o)){o=OD.getStyle(e.getBody(),t,true);if(wg(o).toLowerCase()==="#ffffff"){return}}if(t==="color"){if(wg(o).toLowerCase()==="#000000"){return}}if(t==="font-size"){if(/em|%$/.test(o)){if(r===0){return}const e=parseFloat(o)/(/%$/.test(o)?100:1);o=e*r+"px"}}if(t==="border"&&o){s+="padding:0 2px;"}s+=t+":"+o+";"}));e.dispatch("AfterPreviewFormats");OD.remove(n);return s};const ND=e=>{e.addShortcut("meta+b","","Bold");e.addShortcut("meta+i","","Italic");e.addShortcut("meta+u","","Underline");for(let t=1;t<=6;t++){e.addShortcut("access+"+t,"",["FormatBlock",false,"h"+t])}e.addShortcut("access+7","",["FormatBlock",false,"p"]);e.addShortcut("access+8","",["FormatBlock",false,"div"]);e.addShortcut("access+9","",["FormatBlock",false,"address"])};const RD=e=>{const t=SD(e);const o=ei(null);ND(e);Nx(e);return{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(t,o,n)=>{vO(e,t,o,n)},remove:(t,o,n,s)=>{kO(e,t,o,n,s)},toggle:(t,o,n)=>{wO(e,t,o,n)},match:(t,o,n,s)=>gO(e,t,o,n,s),closest:t=>bO(e,t),matchAll:(t,o)=>pO(e,t,o),matchNode:(t,o,n,s)=>hO(e,t,o,n,s),canApply:t=>yO(e,t),formatChanged:(t,n,s,r)=>_O(e,o,t,n,s,r),getCssText:H(MD,e)}};const BD=e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return true;default:return false}};const LD=(e,t,o)=>{const n=ei(false);const s=e=>{RT(t,false,o);t.add({},e)};e.on("init",(()=>{t.add()}));e.on("BeforeExecCommand",(e=>{const n=e.command;if(!BD(n)){BT(t,o);t.beforeChange()}}));e.on("ExecCommand",(e=>{const t=e.command;if(!BD(t)){s(e)}}));e.on("ObjectResizeStart cut",(()=>{t.beforeChange()}));e.on("SaveContent ObjectResized blur",s);e.on("dragend",s);e.on("keyup",(o=>{const r=o.keyCode;if(o.isDefaultPrevented()){return}if(r>=33&&r<=36||r>=37&&r<=40||r===45||o.ctrlKey){s();e.nodeChanged()}if(r===46||r===8){e.nodeChanged()}if(n.get()&&t.typing&&MT(ST(e),t.data[0])===false){if(e.isDirty()===false){e.setDirty(true)}e.dispatch("TypingUndo");n.set(false);e.nodeChanged()}}));e.on("keydown",(e=>{const r=e.keyCode;if(e.isDefaultPrevented()){return}if(r>=33&&r<=36||r>=37&&r<=40||r===45){if(t.typing){s(e)}return}const a=e.ctrlKey&&!e.altKey||e.metaKey;if((r<16||r>20)&&r!==224&&r!==91&&!t.typing&&!a){t.beforeChange();RT(t,true,o);t.add({},e);n.set(true)}}));e.on("mousedown",(e=>{if(t.typing){s(e)}}));const r=e=>e.inputType==="insertReplacementText";const a=e=>e.inputType==="insertText"&&e.data===null;const c=e=>e.inputType==="insertFromPaste"||e.inputType==="insertFromDrop";e.on("input",(e=>{if(e.inputType&&(r(e)||a(e)||c(e))){s(e)}}));e.on("AddUndo Undo Redo ClearUndos",(t=>{if(!t.isDefaultPrevented()){e.nodeChanged()}}))};const HD=e=>{e.addShortcut("meta+z","","Undo");e.addShortcut("meta+y,meta+shift+z","","Redo")};const ID=e=>{const t=hi();const o=ei(0);const n=ei(0);const s={data:[],typing:false,beforeChange:()=>{nO(e,o,t)},add:(r,a)=>sO(e,s,n,o,t,r,a),undo:()=>rO(e,s,o,n),redo:()=>aO(e,n,s.data),clear:()=>{cO(e,s,n)},reset:()=>{iO(e,s)},hasUndo:()=>lO(e,s,n),hasRedo:()=>dO(e,s,n),transact:t=>uO(e,s,o,t),ignore:t=>{fO(e,o,t)},extra:(t,o)=>{mO(e,s,n,t,o)}};if(!QT(e)){LD(e,s,o)}HD(e);return s};const PD=[9,27,ah.HOME,ah.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,ah.DOWN,ah.UP,ah.LEFT,ah.RIGHT].concat(eo.browser.isFirefox()?[224]:[]);const FD="data-mce-placeholder";const VD=e=>e.type==="keydown"||e.type==="keyup";const jD=e=>{const t=e.keyCode;return t===ah.BACKSPACE||t===ah.DELETE};const UD=e=>{if(VD(e)){const t=e.keyCode;return!jD(e)&&(ah.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||Y(PD,t))}else{return false}};const qD=e=>VD(e)&&!(jD(e)||e.type==="keyup"&&e.keyCode===229);const WD=(e,t,o)=>{if(Pa(an.fromDom(t),false)){const n=t.firstElementChild;if(!n){return true}else if(e.getStyle(t.firstElementChild,"padding-left")||e.getStyle(t.firstElementChild,"padding-right")){return false}else{return o===n.nodeName.toLowerCase()}}else{return false}};const $D=e=>{const t=e.dom;const o=Pd(e);const n=mu(e);const s=(r,a)=>{if(UD(r)){return}const c=e.getBody();const i=qD(r)?false:WD(t,c,o);const l=t.getAttrib(c,FD)!=="";if(l!==i||a){t.setAttrib(c,FD,i?n:null);t.setAttrib(c,"aria-placeholder",i?n:null);$p(e,i);e.on(i?"keydown":"keyup",s);e.off(i?"keyup":"keydown",s)}};if(n){e.on("init",(t=>{s(t,true);e.on("change SetContent ExecCommand",s);e.on("paste",(t=>ib.setEditorTimeout(e,(()=>s(t)))))}))}};const GD=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/;const KD=e=>GD.test(e);const XD=(e,t)=>ln(an.fromDom(t),du(e));const YD=e=>Gc.DOM.getStyle(e,"direction",true)==="rtl"||KD(e.textContent);const JD=(e,t,o)=>oe(Gc.DOM.getParents(o.container(),"*",t),e);const QD=(e,t,o)=>{const n=JD(e,t,o);return q.from(n[n.length-1])};const ZD=(e,t,o)=>{const n=Xf(t,e);const s=Xf(o,e);return n&&n===s};const eA=e=>ta(e)||oa(e);const tA=(e,t)=>{if(!t){return t}const o=t.container(),n=t.offset();if(e){if(Jr(o)){if(qs(o.nextSibling)){return Tl(o.nextSibling,0)}else{return Tl.after(o)}}else{return ta(t)?Tl(o,n+1):t}}else{if(Jr(o)){if(qs(o.previousSibling)){return Tl(o.previousSibling,o.previousSibling.data.length)}else{return Tl.before(o)}}else{return oa(t)?Tl(o,n-1):t}}};const oA=H(tA,true);const nA=H(tA,false);const sA=(e,t)=>{const o=e=>e.stopImmediatePropagation();e.on("beforeinput input",o,true);e.getDoc().execCommand(t);e.off("beforeinput input",o)};const rA=e=>sA(e,"Delete");const aA=e=>sA(e,"ForwardDelete");const cA=e=>t=>mn(e,an.fromDom(t.dom.parentNode));const iA=e=>Rr(e)||Lr(e);const lA=(e,t)=>{if(gn(e,t)){return lr(t,iA,cA(e))}else{return q.none()}};const dA=e=>{const t=e.getBody();const o=t.firstChild&&e.dom.isBlock(t.firstChild)?t.firstChild:t;e.selection.setCursorLocation(o,0)};const uA=e=>{if(e.dom.isEmpty(e.getBody())){e.setContent("");dA(e)}};const fA=(e,t,o)=>po(Hm(o),Im(o),((n,s)=>{const r=tA(true,n);const a=tA(false,s);const c=tA(false,t);if(e){return Bm(o,c).exists((e=>e.isEqual(a)&&t.isEqual(r)))}else{return Lm(o,c).exists((e=>e.isEqual(r)&&t.isEqual(a)))}})).getOr(true);const mA=(e,t)=>({block:e,position:t});const gA=(e,t)=>({from:e,to:t});const pA=(e,t)=>{const o=an.fromDom(e);const n=an.fromDom(t.container());return lA(o,n).map((e=>mA(e,t)))};const hA=e=>mn(e.from.block,e.to.block)===false;const yA=e=>vn(e.from.block).bind((t=>vn(e.to.block).filter((e=>mn(t,e))))).isSome();const bA=e=>Zs(e.from.block.dom)===false&&Zs(e.to.block.dom)===false;const vA=(e,t,o)=>{if(Ys(o.position.getNode())&&Pa(o.block)===false){return Rm(false,o.block.dom).bind((n=>{if(n.isEqual(o.position)){return Am(t,e,n).bind((t=>pA(e,t)))}else{return q.some(o)}})).getOr(o)}else{return o}};const kA=(e,t,o)=>{const n=pA(e,Tl.fromRangeStart(o));const s=n.bind((o=>Am(t,e,o.position).bind((o=>pA(e,o).map((o=>vA(e,t,o)))))));return po(n,s,gA).filter((e=>hA(e)&&yA(e)&&bA(e)))};const wA=(e,t,o)=>o.collapsed?kA(e,t,o):q.none();const _A=e=>{const t=Tn(e);return ce(t,Dr).fold(R(t),(e=>t.slice(0,e)))};const xA=e=>{const t=_A(e);Z(t,cs);return t};const zA=(e,t)=>{const o=Jv(t,e);return ae(o.reverse(),(e=>Pa(e))).each(cs)};const CA=e=>oe(Cn(e),(e=>!Pa(e))).length===0;const SA=(e,t,o,n)=>{if(Pa(o)){$v(o);return Hm(o.dom)}if(CA(n)&&Pa(t)){Zn(n,an.fromTag("br"))}const s=Lm(o.dom,Tl.before(n.dom));Z(xA(t),(e=>{Zn(n,e)}));zA(e,t);return s};const TA=(e,t,o)=>{if(Pa(o)){cs(o);if(Pa(t)){$v(t)}return Hm(t.dom)}const n=Im(o.dom);Z(xA(t),(e=>{os(o,e)}));zA(e,t);return n};const OA=(e,t)=>{const o=Jv(t,e);return q.from(o[o.length-1])};const EA=(e,t)=>gn(t,e)?OA(t,e):q.none();const DA=(e,t)=>{Rm(e,t.dom).map((e=>e.getNode())).map(an.fromDom).filter(Nr).each(cs)};const AA=(e,t,o)=>{DA(true,t);DA(false,o);return EA(t,o).fold(H(TA,e,t,o),H(SA,e,t,o))};const MA=(e,t,o,n)=>t?AA(e,n,o):AA(e,o,n);const NA=(e,t)=>{const o=an.fromDom(e.getBody());const n=wA(o.dom,t,e.selection.getRng()).map((n=>()=>{MA(o,t,n.from.block,n.to.block).each((t=>{e.selection.setRng(t.toRange())}))}));return n};const RA=(e,t)=>{const o=t.getRng();return po(lA(e,an.fromDom(o.startContainer)),lA(e,an.fromDom(o.endContainer)),((n,s)=>{if(mn(n,s)===false){return q.some((()=>{o.deleteContents();MA(e,true,n,s).each((e=>{t.setRng(e.toRange())}))}))}else{return q.none()}})).getOr(q.none())};const BA=(e,t)=>{const o=an.fromDom(t);const n=H(mn,e);return ir(o,Ir,n).isSome()};const LA=(e,t)=>BA(e,t.startContainer)||BA(e,t.endContainer);const HA=(e,t)=>{const o=Lm(e.dom,Tl.fromRangeStart(t)).isNone();const n=Bm(e.dom,Tl.fromRangeEnd(t)).isNone();return!LA(e,t)&&o&&n};const IA=e=>q.some((()=>{e.setContent("");e.selection.setCursorLocation()}));const PA=e=>{const t=an.fromDom(e.getBody());const o=e.selection.getRng();return HA(t,o)?IA(e):RA(t,e.selection)};const FA=(e,t)=>e.selection.isCollapsed()?q.none():PA(e);const VA=Qs;const jA=Zs;const UA=(e,t,o,n,s)=>q.from(t._selectionOverrides.showCaret(e,o,n,s));const qA=e=>{const t=e.ownerDocument.createRange();t.selectNode(e);return t};const WA=(e,t)=>{const o=e.dispatch("BeforeObjectSelected",{target:t});if(o.isDefaultPrevented()){return q.none()}return q.some(qA(t))};const $A=(e,t,o)=>{const n=nm(1,e.getBody(),t);const s=Tl.fromRangeStart(n);const r=s.getNode();if(Rf(r)){return UA(1,e,r,!s.isAtEnd(),false)}const a=s.getNode(true);if(Rf(a)){return UA(1,e,a,false,false)}const c=e.dom.getParent(s.getNode(),(e=>jA(e)||VA(e)));if(Rf(c)){return UA(1,e,c,false,o)}return q.none()};const GA=(e,t,o)=>t.collapsed?$A(e,t,o).getOr(t):t;const KA=e=>jv(e)||Iv(e);const XA=e=>Uv(e)||Pv(e);const YA=(e,t)=>{if(qs(t)&&t.data.length===0){e.remove(t)}};const JA=(e,t,o,n,s,r)=>{UA(n,e,r.getNode(!s),s,true).each((o=>{if(t.collapsed){const e=t.cloneRange();if(s){e.setEnd(o.startContainer,o.startOffset)}else{e.setStart(o.endContainer,o.endOffset)}e.deleteContents()}else{t.deleteContents()}e.selection.setRng(o)}));YA(e.dom,o)};const QA=(e,t)=>{const o=e.selection.getRng();if(!qs(o.commonAncestorContainer)){return q.none()}const n=t?dm.Forwards:dm.Backwards;const s=xm(e.getBody());const r=H(im,t?s.next:s.prev);const a=t?KA:XA;const c=rm(n,e.getBody(),o);const i=tA(t,r(c));if(!i||!lm(c,i)){return q.none()}else if(a(i)){return q.some((()=>JA(e,o,c.getNode(),n,t,i)))}const l=r(i);if(l&&a(l)){if(lm(i,l)){return q.some((()=>JA(e,o,c.getNode(),n,t,l)))}}return q.none()};const ZA=(e,t)=>QA(e,t);const eM=e=>Ir(an.fromDom(e))||Lr(an.fromDom(e));const tM=md.generate([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]);const oM=(e,t)=>{const o=t.getNode(e===false);const n=e?"after":"before";return Rs(o)&&o.getAttribute("data-mce-caret")===n};const nM=(e,t,o,n)=>{const s=t=>Mr(an.fromDom(t))&&!Yf(o,n,e);return sm(!t,o).fold((()=>sm(t,n).fold(j,s)),s)};const sM=(e,t,o,n)=>{const s=n.getNode(t===false);return lA(an.fromDom(e),an.fromDom(o.getNode())).map((e=>Pa(e)?tM.remove(e.dom):tM.moveToElement(s))).orThunk((()=>q.some(tM.moveToElement(s))))};const rM=(e,t,o)=>Am(t,e,o).bind((n=>{if(eM(n.getNode())){return q.none()}else if(nM(e,t,o,n)){return q.none()}else if(t&&Zs(n.getNode())){return sM(e,t,o,n)}else if(t===false&&Zs(n.getNode(true))){return sM(e,t,o,n)}else if(t&&Uv(o)){return q.some(tM.moveToPosition(n))}else if(t===false&&jv(o)){return q.some(tM.moveToPosition(n))}else{return q.none()}}));const aM=(e,t)=>{if(e&&Zs(t.nextSibling)){return q.some(tM.moveToElement(t.nextSibling))}else if(e===false&&Zs(t.previousSibling)){return q.some(tM.moveToElement(t.previousSibling))}else{return q.none()}};const cM=(e,t,o)=>o.fold((e=>q.some(tM.remove(e))),(e=>q.some(tM.moveToElement(e))),(o=>{if(Yf(t,o,e)){return q.none()}else{return q.some(tM.moveToPosition(o))}}));const iM=(e,t,o)=>{if(oM(t,o)){return aM(t,o.getNode(t===false)).fold((()=>rM(e,t,o)),q.some)}else{return rM(e,t,o).bind((t=>cM(e,o,t)))}};const lM=(e,t,o)=>{const n=nm(t?1:-1,e,o);const s=Tl.fromRangeStart(n);const r=an.fromDom(e);if(t===false&&Uv(s)){return q.some(tM.remove(s.getNode(true)))}else if(t&&jv(s)){return q.some(tM.remove(s.getNode()))}else if(t===false&&jv(s)&&lk(r,s)){return dk(r,s).map((e=>tM.remove(e.getNode())))}else if(t&&Uv(s)&&ik(r,s)){return uk(r,s).map((e=>tM.remove(e.getNode())))}else{return iM(e,t,s)}};const dM=(e,t)=>o=>{e._selectionOverrides.hideFakeCaret();ow(e,t,an.fromDom(o));return true};const uM=(e,t)=>o=>{const n=t?Tl.before(o):Tl.after(o);e.selection.setRng(n.toRange());return true};const fM=e=>t=>{e.selection.setRng(t.toRange());return true};const mM=(e,t)=>q.from(Zw(e.getBody(),t));const gM=(e,t)=>{const o=e.selection.getNode();return mM(e,o).filter(Zs).fold((()=>lM(e.getBody(),t,e.selection.getRng()).map((o=>()=>o.fold(dM(e,t),uM(e,t),fM(e))))),(()=>q.some(A)))};const pM=e=>{Z(ki(e,".mce-offscreen-selection"),cs)};const hM=(e,t)=>{const o=e.selection.getNode();if(Zs(o)&&!er(o)){const n=mM(e,o.parentNode).filter(Zs);return n.fold((()=>q.some((()=>{pM(an.fromDom(e.getBody()));ow(e,t,an.fromDom(e.selection.getNode()));uA(e)}))),(()=>q.some(A)))}return q.none()};const yM=e=>{const t=e.dom,o=e.selection;const n=Zw(e.getBody(),o.getNode());if(Qs(n)&&t.isBlock(n)&&t.isEmpty(n)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(n,"");n.appendChild(e);o.setRng(Tl.before(e).toRange())}return true};const bM=(e,t)=>{if(e.selection.isCollapsed()){return gM(e,t)}else{return hM(e,t)}};const vM=(e,t)=>{const o=Tl.fromRangeStart(e.selection.getRng());return Am(t,e.getBody(),o).filter((e=>t?Lv(e):Hv(e))).bind((e=>q.from(Jf(t?0:-1,e)))).map((t=>()=>e.selection.select(t)))};const kM=(e,t)=>e.selection.isCollapsed()?vM(e,t):q.none();const wM=qs;const _M=e=>wM(e)&&e.data[0]===Wr;const xM=e=>wM(e)&&e.data[e.data.length-1]===Wr;const zM=e=>e.ownerDocument.createTextNode(Wr);const CM=e=>{if(wM(e.previousSibling)){if(xM(e.previousSibling)){return e.previousSibling}else{e.previousSibling.appendData(Wr);return e.previousSibling}}else if(wM(e)){if(_M(e)){return e}else{e.insertData(0,Wr);return e}}else{const t=zM(e);e.parentNode.insertBefore(t,e);return t}};const SM=e=>{if(wM(e.nextSibling)){if(_M(e.nextSibling)){return e.nextSibling}else{e.nextSibling.insertData(0,Wr);return e.nextSibling}}else if(wM(e)){if(xM(e)){return e}else{e.appendData(Wr);return e}}else{const t=zM(e);if(e.nextSibling){e.parentNode.insertBefore(t,e.nextSibling)}else{e.parentNode.appendChild(t)}return t}};const TM=(e,t)=>e?CM(t):SM(t);const OM=H(TM,true);const EM=H(TM,false);const DM=(e,t)=>{if(qs(e.container())){return TM(t,e.container())}else{return TM(t,e.getNode())}};const AM=(e,t)=>{const o=t.get();return o&&e.container()===o&&Jr(o)};const MM=(e,t)=>t.fold((t=>{Cf(e.get());const o=OM(t);e.set(o);return q.some(Tl(o,o.length-1))}),(t=>Hm(t).map((t=>{if(!AM(t,e)){Cf(e.get());const o=DM(t,true);e.set(o);return Tl(o,1)}else{return Tl(e.get(),1)}}))),(t=>Im(t).map((t=>{if(!AM(t,e)){Cf(e.get());const o=DM(t,false);e.set(o);return Tl(o,o.length-1)}else{return Tl(e.get(),e.get().length-1)}}))),(t=>{Cf(e.get());const o=EM(t);e.set(o);return q.some(Tl(o,1))}));const NM=(e,t)=>{for(let o=0;o<e.length;o++){const n=e[o].apply(null,t);if(n.isSome()){return n}}return q.none()};const RM=md.generate([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]);const BM=(e,t)=>{const o=Xf(t,e);return o?o:e};const LM=(e,t,o)=>{const n=oA(o);const s=BM(t,n.container());return QD(e,s,n).fold((()=>Bm(s,n).bind(H(QD,e,s)).map((e=>RM.before(e)))),q.none)};const HM=(e,t)=>Vm(e,t)===null;const IM=(e,t,o)=>QD(e,t,o).filter(H(HM,t));const PM=(e,t,o)=>{const n=nA(o);return IM(e,t,n).bind((e=>{const t=Lm(e,n);return t.isNone()?q.some(RM.start(e)):q.none()}))};const FM=(e,t,o)=>{const n=oA(o);return IM(e,t,n).bind((e=>{const t=Bm(e,n);return t.isNone()?q.some(RM.end(e)):q.none()}))};const VM=(e,t,o)=>{const n=nA(o);const s=BM(t,n.container());return QD(e,s,n).fold((()=>Lm(s,n).bind(H(QD,e,s)).map((e=>RM.after(e)))),q.none)};const jM=e=>YD(qM(e))===false;const UM=(e,t,o)=>{const n=NM([LM,PM,FM,VM],[e,t,o]);return n.filter(jM)};const qM=e=>e.fold(B,B,B,B);const WM=e=>e.fold(R("before"),R("start"),R("end"),R("after"));const $M=e=>e.fold(RM.before,RM.before,RM.after,RM.after);const GM=e=>e.fold(RM.start,RM.start,RM.end,RM.end);const KM=(e,t)=>WM(e)===WM(t)&&qM(e)===qM(t);const XM=(e,t,o,n,s,r)=>po(QD(t,o,n),QD(t,o,s),((t,n)=>{if(t!==n&&ZD(o,t,n)){return RM.after(e?t:n)}else{return r}})).getOr(r);const YM=(e,t)=>e.fold(U,(e=>!KM(e,t)));const JM=(e,t,o,n,s)=>{const r=tA(e,s);const a=Am(e,o,r).map(H(tA,e));const c=a.fold((()=>n.map($M)),(s=>UM(t,o,s).map(H(XM,e,t,o,r,s)).filter(H(YM,n))));return c.filter(jM)};const QM=(e,t)=>{if(e){return t.fold(M(q.some,RM.start),q.none,M(q.some,RM.after),q.none)}else{return t.fold(q.none,M(q.some,RM.before),q.none,M(q.some,RM.end))}};const ZM=(e,t,o,n)=>{const s=tA(e,n);const r=UM(t,o,s);return UM(t,o,s).bind(H(QM,e)).orThunk((()=>JM(e,t,o,r,n)))};const eN=e=>O(e.selection.getSel().modify);const tN=(e,t,o)=>{const n=e?1:-1;t.setRng(Tl(o.container(),o.offset()+n).toRange());t.getSel().modify("move",e?"forward":"backward","word");return true};const oN=(e,t)=>{const o=t.selection.getRng();const n=e?Tl.fromRangeEnd(o):Tl.fromRangeStart(o);if(!eN(t)){return false}else if(e&&ta(n)){return tN(true,t.selection,n)}else if(!e&&oa(n)){return tN(false,t.selection,n)}else{return false}};var nN;(function(e){e[e["Br"]=0]="Br";e[e["Block"]=1]="Block";e[e["Wrap"]=2]="Wrap";e[e["Eol"]=3]="Eol"})(nN||(nN={}));const sN=(e,t)=>e===dm.Backwards?ue(t):t;const rN=(e,t,o)=>e===dm.Forwards?t.next(o):t.prev(o);const aN=(e,t,o,n)=>{if(Ys(n.getNode(t===dm.Forwards))){return nN.Br}else if(Yf(o,n)===false){return nN.Block}else{return nN.Wrap}};const cN=(e,t,o,n)=>{const s=xm(o);let r=n;const a=[];while(r){const n=rN(t,s,r);if(!n){break}if(Ys(n.getNode(false))){if(t===dm.Forwards){return{positions:sN(t,a).concat([n]),breakType:nN.Br,breakAt:q.some(n)}}else{return{positions:sN(t,a),breakType:nN.Br,breakAt:q.some(n)}}}if(!n.isVisible()){r=n;continue}if(e(r,n)){const e=aN(o,t,r,n);return{positions:sN(t,a),breakType:e,breakAt:q.some(n)}}a.push(n);r=n}return{positions:sN(t,a),breakType:nN.Eol,breakAt:q.none()}};const iN=(e,t,o,n)=>t(o,n).breakAt.map((n=>{const s=t(o,n).positions;return e===dm.Backwards?s.concat(n):[n].concat(s)})).getOr([]);const lN=(e,t)=>se(e,((e,o)=>e.fold((()=>q.some(o)),(n=>po(he(n.getClientRects()),he(o.getClientRects()),((e,s)=>{const r=Math.abs(t-e.left);const a=Math.abs(t-s.left);return a<=r?o:n})).or(e)))),q.none());const dN=(e,t)=>he(t.getClientRects()).bind((t=>lN(e,t.left)));const uN=H(cN,Tl.isAbove,-1);const fN=H(cN,Tl.isBelow,1);const mN=H(iN,-1,uN);const gN=H(iN,1,fN);const pN=(e,t)=>uN(e,t).breakAt.isNone();const hN=(e,t)=>fN(e,t).breakAt.isNone();const yN=e=>Hm(e).map((t=>[t].concat(fN(e,t).positions))).getOr([]);const bN=e=>Im(e).map((t=>uN(e,t).positions.concat(t))).getOr([]);const vN=Zs;const kN=(e,t)=>Math.abs(e.left-t);const wN=(e,t)=>Math.abs(e.right-t);const _N=e=>Re(e,"node");const xN=(e,t)=>Ue(e,((e,o)=>{const n=Math.min(kN(e,t),wN(e,t));const s=Math.min(kN(o,t),wN(o,t));if(s===n&&_N(o)&&vN(o.node)){return o}if(s<n){return o}return e}));const zN=e=>{const t=t=>Q(t,(t=>{const o=Ui(t);o.node=e;return o}));if(Rs(e)){return t(e.getClientRects())}else if(qs(e)){const o=e.ownerDocument.createRange();o.setStart(e,0);o.setEnd(e,e.data.length);return t(o.getClientRects())}else{return[]}};const CN=e=>le(e,zN);var SN;(function(e){e[e["Up"]=-1]="Up";e[e["Down"]=1]="Down"})(SN||(SN={}));const TN=(e,t,o,n)=>{while(n=Gf(n,e,za,t)){if(o(n)){return}}};const ON=(e,t,o,n,s,r)=>{let a=0;const c=[];const i=n=>{let r=CN([n]);if(e===-1){r=r.reverse()}for(let e=0;e<r.length;e++){const n=r[e];if(o(n,l)){continue}if(c.length>0&&t(n,We(c))){a++}n.line=a;if(s(n)){return true}c.push(n)}};const l=We(r.getClientRects());if(!l){return c}const d=r.getNode();i(d);TN(e,n,i,d);return c};const EN=(e,t)=>t.line>e;const DN=(e,t)=>t.line===e;const AN=H(ON,SN.Up,Gi,Ki);const MN=H(ON,SN.Down,Ki,Gi);const NN=(e,t,o,n)=>{const s=xm(t);let r;let a;let c;let i;const l=[];let d=0;const u=t=>{if(e===1){return We(t.getClientRects())}return We(t.getClientRects())};if(e===1){r=s.next;a=Ki;c=Gi;i=Tl.after(n)}else{r=s.prev;a=Gi;c=Ki;i=Tl.before(n)}const f=u(i);do{if(!i.isVisible()){continue}const e=u(i);if(c(e,f)){continue}if(l.length>0&&a(e,We(l))){d++}const t=Ui(e);t.position=i;t.line=d;if(o(t)){return l}l.push(t)}while(i=r(i));return l};const RN=e=>t=>EN(e,t);const BN=e=>t=>DN(e,t);const LN=(e,t)=>{e.selection.setRng(t);Fy(e,e.selection.getRng())};const HN=(e,t,o)=>q.some(GA(e,t,o));const IN=(e,t,o,n,s,r)=>{const a=t===dm.Forwards;const c=xm(e.getBody());const i=H(im,a?c.next:c.prev);const l=a?n:s;if(!o.collapsed){const n=el(o);if(r(n)){return UA(t,e,n,t===dm.Backwards,false)}}const d=rm(t,e.getBody(),o);if(l(d)){return WA(e,d.getNode(!a))}const u=tA(a,i(d));const f=la(o);if(!u){return f?q.some(o):q.none()}if(l(u)){return UA(t,e,u.getNode(!a),a,false)}const m=i(u);if(m&&l(m)){if(lm(u,m)){return UA(t,e,m.getNode(!a),a,false)}}if(f){return HN(e,u.toRange(),false)}return q.none()};const PN=(e,t,o,n,s,r)=>{const a=rm(t,e.getBody(),o);const c=We(a.getClientRects());const i=t===SN.Down;if(!c){return q.none()}const l=i?MN:AN;const d=l(e.getBody(),RN(1),a);const u=oe(d,BN(1));const f=c.left;const m=xN(u,f);if(m&&r(m.node)){const o=Math.abs(f-m.left);const n=Math.abs(f-m.right);return UA(t,e,m.node,o<n,false)}let g;if(n(a)){g=a.getNode()}else if(s(a)){g=a.getNode(true)}else{g=el(o)}if(g){const o=NN(t,e.getBody(),RN(1),g);let n=xN(oe(o,BN(1)),f);if(n){return HN(e,n.position.toRange(),false)}n=We(oe(o,BN(0)));if(n){return HN(e,n.position.toRange(),false)}}if(u.length===0){return FN(e,i).filter(i?s:n).map((t=>GA(e,t.toRange(),false)))}return q.none()};const FN=(e,t)=>{const o=e.selection.getRng();const n=t?Tl.fromRangeEnd(o):Tl.fromRangeStart(o);const s=Kf(n.container(),e.getBody());if(t){const e=fN(s,n);return ye(e.positions)}else{const e=uN(s,n);return he(e.positions)}};const VN=(e,t,o)=>FN(e,t).filter(o).exists((t=>{e.selection.setRng(t.toRange());return true}));const jN=(e,t)=>{const o=e.dom.createRng();o.setStart(t.container(),t.offset());o.setEnd(t.container(),t.offset());e.selection.setRng(o)};const UN=(e,t)=>{if(e){t.setAttribute("data-mce-selected","inline-boundary")}else{t.removeAttribute("data-mce-selected")}};const qN=(e,t,o)=>MM(t,o).map((t=>{jN(e,t);return o}));const WN=(e,t,o)=>{const n=e.getBody();const s=Tl.fromRangeStart(e.selection.getRng());const r=H(XD,e);const a=ZM(o,r,n,s);return a.bind((o=>qN(e,t,o)))};const $N=(e,t,o)=>{const n=Q(ki(an.fromDom(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),(e=>e.dom));const s=oe(n,e);const r=oe(o,e);Z(fe(s,r),H(UN,false));Z(fe(r,s),H(UN,true))};const GN=(e,t)=>{if(e.selection.isCollapsed()&&e.composing!==true&&t.get()){const o=Tl.fromRangeStart(e.selection.getRng());if(Tl.isTextPosition(o)&&eA(o)===false){jN(e,zf(t.get(),o));t.set(null)}}};const KN=(e,t,o,n)=>{if(t.selection.isCollapsed()){const s=oe(n,e);Z(s,(n=>{const s=Tl.fromRangeStart(t.selection.getRng());UM(e,t.getBody(),s).bind((e=>qN(t,o,e)))}))}};const XN=(e,t,o)=>ku(e)?WN(e,t,o).isSome():false;const YN=(e,t,o)=>ku(t)?oN(e,t):false;const JN=e=>{const t=ei(null);const o=H(XD,e);e.on("NodeChange",(n=>{if(ku(e)){$N(o,e.dom,n.parents);GN(e,t);KN(o,e,t,n.parents)}}));return t};const QN=H(YN,true);const ZN=H(YN,false);const eR=(e,t,o)=>{if(ku(e)){const n=FN(e,t).getOrThunk((()=>{const o=e.selection.getRng();return t?Tl.fromRangeEnd(o):Tl.fromRangeStart(o)}));return UM(H(XD,e),e.getBody(),n).exists((t=>{const n=$M(t);return MM(o,n).exists((t=>{jN(e,t);return true}))}))}else{return false}};const tR=(e,t)=>{const o=document.createRange();o.setStart(e.container(),e.offset());o.setEnd(t.container(),t.offset());return o};const oR=e=>po(Hm(e),Im(e),((t,o)=>{const n=tA(true,t);const s=tA(false,o);return Bm(e,n).forall((e=>e.isEqual(s)))})).getOr(true);const nR=(e,t)=>o=>MM(t,o).map((t=>()=>jN(e,t)));const sR=(e,t,o,n)=>{const s=e.getBody();const r=H(XD,e);e.undoManager.ignore((()=>{e.selection.setRng(tR(o,n));rA(e);UM(r,s,Tl.fromRangeStart(e.selection.getRng())).map(GM).bind(nR(e,t)).each(V)}));e.nodeChanged()};const rR=(e,t)=>{const o=Xf(t,e);return o?o:e};const aR=(e,t,o,n)=>{const s=rR(e.getBody(),n.container());const r=H(XD,e);const a=UM(r,s,n);const c=a.bind((e=>{if(o){return e.fold(R(q.some(GM(e))),q.none,R(q.some($M(e))),q.none)}else{return e.fold(q.none,R(q.some($M(e))),q.none,R(q.some(GM(e))))}}));return c.map(nR(e,t)).getOrThunk((()=>{const c=Mm(o,s,n);const i=c.bind((e=>UM(r,s,e)));return po(a,i,(()=>QD(r,s,n).bind((t=>{if(oR(t)){return q.some((()=>{ow(e,o,an.fromDom(t))}))}else{return q.none()}})))).getOrThunk((()=>i.bind((()=>c.map((s=>()=>{if(o){sR(e,t,n,s)}else{sR(e,t,s,n)}}))))))}))};const cR=(e,t,o)=>{if(e.selection.isCollapsed()&&ku(e)){const n=Tl.fromRangeStart(e.selection.getRng());return aR(e,t,o,n)}return q.none()};const iR=(e,t)=>{const o=Jv(t,e);return ce(o,Dr).fold(R(o),(e=>o.slice(0,e)))};const lR=e=>An(e)===1;const dR=(e,t,o,n)=>{const s=H(Bx,t);const r=Q(oe(n,s),(e=>e.dom));if(r.length===0){ow(t,e,o)}else{const e=Rx(o.dom,r);t.selection.setRng(e.toRange())}};const uR=(e,t)=>{const o=an.fromDom(e.getBody());const n=an.fromDom(e.selection.getStart());const s=oe(iR(o,n),lR);return ye(s).bind((o=>{const n=Tl.fromRangeStart(e.selection.getRng());if(fA(t,n,o.dom)&&!Lx(o)){return q.some((()=>dR(t,e,o,s)))}else{return q.none()}}))};const fR=(e,t)=>e.selection.isCollapsed()?uR(e,t):q.none();const mR=(e,t,o)=>q.some((()=>{e._selectionOverrides.hideFakeCaret();ow(e,t,an.fromDom(o))}));const gR=(e,t)=>{const o=t?Iv:Pv;const n=t?dm.Forwards:dm.Backwards;const s=rm(n,e.getBody(),e.selection.getRng());if(o(s)){return mR(e,t,s.getNode(!t))}else{return q.from(tA(t,s)).filter((e=>o(e)&&lm(s,e))).map((o=>()=>mR(e,t,o.getNode(!t))))}};const pR=(e,t)=>{const o=e.selection.getNode();return tr(o)?mR(e,t,o):q.none()};const hR=(e,t)=>e.selection.isCollapsed()?gR(e,t):pR(e,t);const yR=e=>lr(e,(e=>Qs(e.dom)||Zs(e.dom))).exists((e=>Qs(e.dom)));const bR=e=>{const t=parseInt(e,10);return isNaN(t)?0:t};const vR=(e,t)=>{const o=e||Ar(t)?"margin":"padding";const n=Gn(t,"direction")==="rtl"?"-right":"-left";return o+n};const kR=(e,t,o,n,s,r)=>{const a=vR(o,an.fromDom(r));if(t==="outdent"){const t=Math.max(0,bR(r.style[a])-n);e.setStyle(r,a,t?t+s:"")}else{const t=bR(r.style[a])+n+s;e.setStyle(r,a,t)}};const wR=(e,t)=>de(t,(t=>{const o=vR(su(e),t);const n=Xn(t,o).map(bR).getOr(0);const s=e.dom.getContentEditable(t.dom);return s!=="false"&&n>0}));const _R=e=>{const t=CR(e);return!e.mode.isReadOnly()&&(t.length>1||wR(e,t))};const xR=e=>Br(e)||Lr(e);const zR=e=>vn(e).exists(xR);const CR=e=>oe(ds(e.selection.getSelectedBlocks()),(e=>!xR(e)&&!zR(e)&&yR(e)));const SR=(e,t)=>{const{dom:o}=e;const n=ru(e);const s=/[a-z%]+$/i.exec(n)[0];const r=parseInt(n,10);const a=su(e);Z(CR(e),(e=>{kR(o,t,a,r,s,e.dom)}))};const TR=e=>SR(e,"indent");const OR=e=>SR(e,"outdent");const ER=e=>{if(e.selection.isCollapsed()&&_R(e)){const t=e.dom;const o=e.selection.getRng();const n=Tl.fromRangeStart(o);const s=t.getParent(o.startContainer,t.isBlock);if(s!==null&&ok(an.fromDom(s),n)){return q.some((()=>OR(e)))}}return q.none()};const DR=(e,t,o)=>ve([ER,bM,ZA,(e,o)=>cR(e,t,o),NA,Qw,kM,hR,FA,fR],(t=>t(e,o)));const AR=(e,t)=>{const o=DR(e,t,false);o.fold((()=>{rA(e);uA(e)}),V)};const MR=(e,t)=>{const o=DR(e,t,true);o.fold((()=>aA(e)),V)};const NR=(e,t)=>{e.addCommand("delete",(()=>{AR(e,t)}));e.addCommand("forwardDelete",(()=>{MR(e,t)}))};const RR=5;const BR=400;const LR=e=>{if(e.touches===undefined||e.touches.length!==1){return q.none()}return q.some(e.touches[0])};const HR=(e,t)=>{const o=Math.abs(e.clientX-t.x);const n=Math.abs(e.clientY-t.y);return o>RR||n>RR};const IR=e=>{const t=hi();const o=ei(false);const n=bi((t=>{e.dispatch("longpress",{...t,type:"longpress"});o.set(true)}),BR);e.on("touchstart",(e=>{LR(e).each((s=>{n.cancel();const r={x:s.clientX,y:s.clientY,target:e.target};n.throttle(e);o.set(false);t.set(r)}))}),true);e.on("touchmove",(s=>{n.cancel();LR(s).each((n=>{t.on((s=>{if(HR(n,s)){t.clear();o.set(false);e.dispatch("longpresscancel")}}))}))}),true);e.on("touchend touchcancel",(s=>{n.cancel();if(s.type==="touchcancel"){return}t.get().filter((e=>e.target.isEqualNode(s.target))).each((()=>{if(o.get()){s.preventDefault()}else{e.dispatch("tap",{...s,type:"tap"})}}))}),true)};const PR=(e,t)=>Ne(e,t.nodeName);const FR=(e,t)=>{if(qs(t)){return true}else if(Rs(t)){return!PR(e,t)&&!ig(t)}else{return false}};const VR=(e,t,o)=>J(Yv(an.fromDom(o),an.fromDom(t)),(t=>PR(e,t.dom)));const jR=(e,t)=>{if(qs(t)){if(t.nodeValue.length===0){return true}else if(/^\s+$/.test(t.nodeValue)&&(!t.nextSibling||PR(e,t.nextSibling))){return true}}return false};const UR=e=>{const t=e.dom,o=e.selection;const n=e.schema,s=n.getBlockElements();let r=o.getStart();const a=e.getBody();let c,i,l;const d=Pd(e);if(!r||!Rs(r)){return}const u=a.nodeName.toLowerCase();if(!n.isValidChild(u,d.toLowerCase())||VR(s,a,r)){return}const f=o.getRng();const m=f.startContainer;const g=f.startOffset;const p=f.endContainer;const h=f.endOffset;const y=Mb(e);r=a.firstChild;while(r){if(FR(s,r)){if(jR(s,r)){i=r;r=r.nextSibling;t.remove(i);continue}if(!c){c=t.create(d,Fd(e));r.parentNode.insertBefore(c,r);l=true}i=r;r=r.nextSibling;c.appendChild(i)}else{c=null;r=r.nextSibling}}if(l&&y){f.setStart(m,g);f.setEnd(p,h);o.setRng(f);e.nodeChanged()}};const qR=e=>{e.on("NodeChange",H(UR,e))};const WR=e=>t=>(" "+t.attr("class")+" ").indexOf(e)!==-1;const $R=(e,t,o)=>function(n){const s=arguments,r=s[s.length-2];const a=r>0?t.charAt(r-1):"";if(a==='"'){return n}if(a===">"){const e=t.lastIndexOf("<",r);if(e!==-1){const o=t.substring(e,r);if(o.indexOf('contenteditable="false"')!==-1){return n}}}return'<span class="'+o+'" data-mce-content="'+e.dom.encode(s[0])+'">'+e.dom.encode(typeof s[1]==="string"?s[1]:s[0])+"</span>"};const GR=(e,t,o)=>{let n=t.length,s=o.content;if(o.format==="raw"){return}while(n--){s=s.replace(t[n],$R(e,s,rf(e)))}o.content=s};const KR=e=>{const t="contenteditable";const o=" "+fo.trim(af(e))+" ";const n=" "+fo.trim(rf(e))+" ";const s=WR(o);const r=WR(n);const a=cf(e);if(a.length>0){e.on("BeforeSetContent",(t=>{GR(e,a,t)}))}e.parser.addAttributeFilter("class",(e=>{let o=e.length;while(o--){const n=e[o];if(s(n)){n.attr(t,"true")}else if(r(n)){n.attr(t,"false")}}}));e.serializer.addAttributeFilter(t,(e=>{let o=e.length;while(o--){const n=e[o];if(!s(n)&&!r(n)){continue}if(a.length>0&&n.attr("data-mce-content")){n.name="#text";n.type=3;n.raw=true;n.value=n.attr("data-mce-content")}else{n.attr(t,null)}}}))};const XR=e=>gr(an.fromDom(e.getBody()),"*[data-mce-caret]").map((e=>e.dom)).getOrNull();const YR=(e,t)=>{if(t.hasAttribute("data-mce-caret")){ia(t);e.selection.setRng(e.selection.getRng());e.selection.scrollIntoView(t)}};const JR=(e,t)=>{const o=XR(e);if(!o){return}if(t.type==="compositionstart"){t.preventDefault();t.stopPropagation();YR(e,o);return}if(Zr(o)){YR(e,o);e.undoManager.add()}};const QR=e=>{e.on("keyup compositionstart",H(JR,e))};const ZR=Zs;const eB=(e,t,o)=>IN(t,e,o,jv,Uv,ZR);const tB=(e,t,o)=>{const n=e=>jv(e)||Fv(e);const s=e=>Uv(e)||Vv(e);return PN(t,e,o,n,s,ZR)};const oB=e=>{const t=e.dom.create(Pd(e));t.innerHTML='<br data-mce-bogus="1">';return t};const nB=(e,t,o)=>{const n=xm(e.getBody());const s=H(im,t===1?n.next:n.prev);if(o.collapsed){const n=e.dom.getParent(o.startContainer,"PRE");if(!n){return}const r=s(Tl.fromRangeStart(o));if(!r){const o=an.fromDom(oB(e));if(t===1){es(an.fromDom(n),o)}else{Zn(an.fromDom(n),o)}e.selection.select(o.dom,true);e.selection.collapse()}}};const sB=(e,t)=>{const o=t?dm.Forwards:dm.Backwards;const n=e.selection.getRng();return eB(o,e,n).orThunk((()=>{nB(e,o,n);return q.none()}))};const rB=(e,t)=>{const o=t?1:-1;const n=e.selection.getRng();return tB(o,e,n).orThunk((()=>{nB(e,o,n);return q.none()}))};const aB=(e,t)=>sB(e,t).exists((t=>{LN(e,t);return true}));const cB=(e,t)=>rB(e,t).exists((t=>{LN(e,t);return true}));const iB=(e,t)=>{const o=t?Uv:jv;return VN(e,t,o)};const lB=e=>Y(["figcaption"],xo(e));const dB=e=>{const t=document.createRange();t.setStartBefore(e.dom);t.setEndBefore(e.dom);return t};const uB=(e,t,o)=>{if(o){os(e,t)}else{ts(e,t)}};const fB=(e,t,o,n)=>{const s=an.fromTag(o);const r=an.fromTag("br");Ro(s,n);os(s,r);uB(e,s,t);return dB(r)};const mB=(e,t)=>{const o=H(mn,t);return lr(an.fromDom(e.container()),Dr,o).filter(lB)};const gB=(e,t,o)=>t?hN(e.dom,o):pN(e.dom,o);const pB=(e,t)=>{const o=an.fromDom(e.getBody());const n=Tl.fromRangeStart(e.selection.getRng());const s=Pd(e);const r=Fd(e);return mB(n,o).exists((()=>{if(gB(o,t,n)){const n=fB(o,t,s,r);e.selection.setRng(n);return true}else{return false}}))};const hB=(e,t)=>{if(e.selection.isCollapsed()){return pB(e,t)}else{return false}};const yB={shiftKey:false,altKey:false,ctrlKey:false,metaKey:false,keyCode:0};const bB=e=>Q(e,(e=>({...yB,action:A,...e})));const vB=e=>Q(e,(e=>({...yB,action:()=>q.none(),...e})));const kB=(e,t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey;const wB=(e,t)=>le(bB(e),(e=>kB(e,t)?[e]:[]));const _B=(e,t)=>le(vB(e),(e=>kB(e,t)?[e]:[]));const xB=(e,...t)=>()=>e.apply(null,t);const zB=(e,t)=>ae(wB(e,t),(e=>e.action()));const CB=(e,t)=>ve(_B(e,t),(e=>e.action()));const SB=(e,t)=>{const o=t?dm.Forwards:dm.Backwards;const n=e.selection.getRng();return IN(e,o,n,Iv,Pv,tr).exists((t=>{LN(e,t);return true}))};const TB=(e,t)=>{const o=t?1:-1;const n=e.selection.getRng();return PN(e,o,n,Iv,Pv,tr).exists((t=>{LN(e,t);return true}))};const OB=(e,t)=>{const o=t?Pv:Iv;return VN(e,t,o)};const EB=md.generate([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]);const DB=e=>EB.none(e);const AB={...EB,none:DB};const MB=(e,t)=>NB(e,t,U);const NB=(e,t,o)=>le(Tn(e),(e=>{if(ln(e,t)){return o(e)?[e]:[]}else{return NB(e,t,o)}}));const RB=(e,t,o=j)=>{if(o(t)){return q.none()}if(Y(e,xo(t))){return q.some(t)}const n=e=>ln(e,"table")||o(e);return mr(t,e.join(","),n)};const BB=(e,t)=>RB(["td","th"],e,t);const LB=e=>MB(e,"th,td");const HB=(e,t)=>pr(e,"table",t);const IB=(e,t,o,n,s=U)=>{const r=n===1;if(!r&&o<=0){return AB.first(e[0])}else if(r&&o>=e.length-1){return AB.last(e[e.length-1])}else{const r=o+n;const a=e[r];return s(a)?AB.middle(t,a):IB(e,t,r,n,s)}};const PB=(e,t)=>HB(e,t).bind((t=>{const o=LB(t);const n=ce(o,(t=>mn(e,t)));return n.map((e=>({index:e,all:o})))}));const FB=(e,t,o)=>{const n=PB(e,o);return n.fold((()=>AB.none(e)),(o=>IB(o.all,e,o.index,1,t)))};const VB=(e,t,o)=>{const n=PB(e,o);return n.fold((()=>AB.none()),(o=>IB(o.all,e,o.index,-1,t)))};const jB=e=>pr(e,"[contenteditable]");const UB=(e,t=false)=>{if(jn(e)){return e.dom.isContentEditable}else{return jB(e).fold(R(t),(e=>qB(e)==="true"))}};const qB=e=>e.dom.contentEditable;const WB=(e,t)=>({left:e.left-t,top:e.top-t,right:e.right+t*2,bottom:e.bottom+t*2,width:e.width+t,height:e.height+t});const $B=(e,t)=>le(t,(t=>{const o=WB(Ui(t.getBoundingClientRect()),-1);return[{x:o.left,y:e(o),cell:t},{x:o.right,y:e(o),cell:t}]}));const GB=(e,t,o)=>se(e,((e,n)=>e.fold((()=>q.some(n)),(e=>{const s=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-o));const r=Math.sqrt(Math.abs(n.x-t)+Math.abs(n.y-o));return q.some(r<s?n:e)}))),q.none());const KB=(e,t,o,n,s)=>{const r=ki(an.fromDom(o),"td,th,caption").map((e=>e.dom));const a=oe($B(e,r),(e=>t(e,s)));return GB(a,n,s).map((e=>e.cell))};const XB=e=>e.bottom;const YB=e=>e.top;const JB=(e,t)=>e.y<t;const QB=(e,t)=>e.y>t;const ZB=H(KB,XB,JB);const eL=H(KB,YB,QB);const tL=(e,t)=>he(t.getClientRects()).bind((t=>ZB(e,t.left,t.top))).bind((e=>dN(bN(e),t)));const oL=(e,t)=>ye(t.getClientRects()).bind((t=>eL(e,t.left,t.top))).bind((e=>dN(yN(e),t)));const nL=(e,t,o)=>o.breakAt.exists((o=>e(t,o).breakAt.isSome()));const sL=e=>e.breakType===nN.Wrap&&e.positions.length===0;const rL=e=>e.breakType===nN.Br&&e.positions.length===1;const aL=(e,t,o)=>{const n=e(t,o);if(sL(n)||!Ys(o.getNode())&&rL(n)){return!nL(e,t,n)}else{return n.breakAt.isNone()}};const cL=H(aL,uN);const iL=H(aL,fN);const lL=(e,t,o)=>{const n=Tl.fromRangeStart(t);return Rm(!e,o).exists((e=>e.isEqual(n)))};const dL=(e,t,o,n)=>{const s=e.selection.getRng();const r=t?1:-1;if(Nf()&&lL(t,s,o)){UA(r,e,o,!t,false).each((t=>{LN(e,t)}));return true}return false};const uL=(e,t,o)=>tL(t,o).orThunk((()=>he(o.getClientRects()).bind((o=>lN(mN(e,Tl.before(t)),o.left))))).getOr(Tl.before(t));const fL=(e,t,o)=>oL(t,o).orThunk((()=>he(o.getClientRects()).bind((o=>lN(gN(e,Tl.after(t)),o.left))))).getOr(Tl.after(t));const mL=(e,t)=>{const o=t.getNode(e);return Rs(o)&&o.nodeName==="TABLE"?q.some(o):q.none()};const gL=(e,t,o)=>{const n=Pd(t);t.undoManager.transact((()=>{const s=an.fromTag(n);Ro(s,Fd(t));os(s,an.fromTag("br"));if(e){es(an.fromDom(o),s)}else{Zn(an.fromDom(o),s)}const r=t.dom.createRng();r.setStart(s.dom,0);r.setEnd(s.dom,0);LN(t,r)}))};const pL=(e,t,o)=>{const n=t?mL(true,o):mL(false,o);const s=t===false;n.fold((()=>LN(e,o.toRange())),(n=>Rm(s,e.getBody()).filter((e=>e.isEqual(o))).fold((()=>LN(e,o.toRange())),(o=>gL(t,e,n)))))};const hL=(e,t,o,n)=>{const s=e.selection.getRng();const r=Tl.fromRangeStart(s);const a=e.getBody();if(!t&&cL(n,r)){const n=uL(a,o,r);pL(e,t,n);return true}else if(t&&iL(n,r)){const n=fL(a,o,r);pL(e,t,n);return true}else{return false}};const yL=(e,t,o)=>q.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((n=>q.from(e.dom.getParent(n,"table")).map((s=>o(e,t,s,n))))).getOr(false);const bL=(e,t)=>yL(e,t,dL);const vL=(e,t)=>yL(e,t,hL);const kL=e=>{const t=Ih.exact(e,0,e,0);return qh(t)};const wL=(e,t,o)=>o.fold(q.none,q.none,((e,t)=>Xb(t).map((e=>kL(e)))),(o=>{e.execCommand("mceTableInsertRowAfter");return _L(e,t,o)}));const _L=(e,t,o)=>wL(e,t,FB(o,UB));const xL=(e,t,o)=>wL(e,t,VB(o,UB));const zL=(e,t)=>{const o=["table","li","dl"];const n=an.fromDom(e.getBody());const s=e=>{const t=xo(e);return mn(e,n)||Y(o,t)};const r=e.selection.getRng();const a=an.fromDom(!t?r.startContainer:r.endContainer);return BB(a,s).map((o=>{HB(o,s).each((t=>{e.model.table.clearSelectedCells(t.dom)}));e.selection.collapse(!t);const n=!t?xL:_L;const r=n(e,s,o);r.each((t=>{e.selection.setRng(t)}));return true})).getOr(false)};const CL=(e,t,o)=>{const n=Gt().os;zB([{keyCode:ah.RIGHT,action:xB(aB,e,true)},{keyCode:ah.LEFT,action:xB(aB,e,false)},{keyCode:ah.UP,action:xB(cB,e,false)},{keyCode:ah.DOWN,action:xB(cB,e,true)},{keyCode:ah.RIGHT,action:xB(bL,e,true)},{keyCode:ah.LEFT,action:xB(bL,e,false)},{keyCode:ah.UP,action:xB(vL,e,false)},{keyCode:ah.DOWN,action:xB(vL,e,true)},{keyCode:ah.RIGHT,action:xB(SB,e,true)},{keyCode:ah.LEFT,action:xB(SB,e,false)},{keyCode:ah.UP,action:xB(TB,e,false)},{keyCode:ah.DOWN,action:xB(TB,e,true)},{keyCode:ah.RIGHT,action:xB(XN,e,t,true)},{keyCode:ah.LEFT,action:xB(XN,e,t,false)},{keyCode:ah.RIGHT,ctrlKey:!n.isMacOS(),altKey:n.isMacOS(),action:xB(QN,e,t)},{keyCode:ah.LEFT,ctrlKey:!n.isMacOS(),altKey:n.isMacOS(),action:xB(ZN,e,t)},{keyCode:ah.UP,action:xB(hB,e,false)},{keyCode:ah.DOWN,action:xB(hB,e,true)}],o).each((e=>{o.preventDefault()}))};const SL=(e,t)=>{e.on("keydown",(o=>{if(o.isDefaultPrevented()===false){CL(e,t,o)}}))};const TL=(e,t)=>({container:e,offset:t});const OL=Gc.DOM;const EL=e=>t=>e===t?-1:0;const DL=e=>t=>e.isBlock(t)||Y(["BR","IMG","HR","INPUT"],t.nodeName)||e.getContentEditable(t)==="false";const AL=(e,t,o)=>{if(qs(e)&&t>=0){return q.some(TL(e,t))}else{const n=Vi(OL);return q.from(n.backwards(e,t,EL(e),o)).map((e=>TL(e.container,e.container.data.length)))}};const ML=(e,t,o)=>{if(qs(e)&&t>=e.length){return q.some(TL(e,t))}else{const n=Vi(OL);return q.from(n.forwards(e,t,EL(e),o)).map((e=>TL(e.container,0)))}};const NL=(e,t,o)=>{if(!qs(e)){return q.none()}const n=e.textContent;if(t>=0&&t<=n.length){return q.some(TL(e,t))}else{const n=Vi(OL);return q.from(n.backwards(e,t,EL(e),o)).bind((e=>{const n=e.container.data;return NL(e.container,t+n.length,o)}))}};const RL=(e,t,o)=>{if(!qs(e)){return q.none()}const n=e.textContent;if(t<=n.length){return q.some(TL(e,t))}else{const s=Vi(OL);return q.from(s.forwards(e,t,EL(e),o)).bind((e=>RL(e.container,t-n.length,o)))}};const BL=(e,t,o,n,s)=>{const r=Vi(e,DL(e));return q.from(r.backwards(t,o,n,s))};const LL=e=>e.collapsed&&e.startContainer.nodeType===3;const HL=e=>e.toString().replace(/\u00A0/g," ").replace(/\uFEFF/g,"");const IL=e=>e!==""&&" \f\n\r\t\v".indexOf(e)!==-1;const PL=(e,t)=>e.substring(t.length);const FL=(e,t,o)=>{let n;for(n=t-1;n>=0;n--){const t=e.charAt(n);if(IL(t)){return q.none()}if(t===o){break}}return q.some(n)};const VL=(e,t,o,n=0)=>{if(!LL(t)){return q.none()}const s=(e,t,n)=>FL(n,t,o).getOr(t);const r=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return BL(e,t.startContainer,t.startOffset,s,r).bind((e=>{const s=t.cloneRange();s.setStart(e.container,e.offset);s.setEnd(t.endContainer,t.endOffset);if(s.collapsed){return q.none()}const r=HL(s);const a=r.lastIndexOf(o);if(a!==0||PL(r,o).length<n){return q.none()}else{return q.some({text:PL(r,o),range:s,triggerChar:o})}}))};const jL=(e,t,o,n=0)=>ev(an.fromDom(t.startContainer)).fold((()=>VL(e,t,o,n)),(t=>{const n=e.createRng();n.selectNode(t.dom);const s=HL(n);return q.some({range:n,text:PL(s,o),triggerChar:o})}));const UL=e=>e.nodeType===_o;const qL=e=>e.nodeType===wo;const WL=e=>{if(UL(e)){return TL(e,e.data.length)}else{const t=e.childNodes;return t.length>0?WL(t[t.length-1]):TL(e,t.length)}};const $L=(e,t)=>{const o=e.childNodes;if(o.length>0&&t<o.length){return $L(o[t],0)}else if(o.length>0&&qL(e)&&o.length===t){return WL(o[o.length-1])}else{return TL(e,t)}};const GL=(e,t)=>BL(e,t.container,t.offset,((e,t)=>t===0?-1:t),e.getRoot()).filter((e=>{const t=e.container.data.charAt(e.offset-1);return!IL(t)})).isSome();const KL=e=>t=>{const o=$L(t.startContainer,t.startOffset);return!GL(e,o)};const XL=(e,t,o)=>ve(o.triggerChars,(o=>jL(e,t,o)));const YL=(e,t)=>{const o=t();const n=e.selection.getRng();return XL(e.dom,n,o).bind((o=>JL(e,t,o)))};const JL=(e,t,o,n={})=>{const s=t();const r=e.selection.getRng();const a=r.startContainer.nodeValue;const c=oe(s.lookupByChar(o.triggerChar),(t=>o.text.length>=t.minChars&&t.matches.getOrThunk((()=>KL(e.dom)))(o.range,a,o.text)));if(c.length===0){return q.none()}const i=Promise.all(Q(c,(e=>{const t=e.fetch(o.text,e.maxResults,n);return t.then((t=>({matchText:o.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn})))})));return q.some({lookupData:i,context:o})};var QL;(function(e){e[e["Error"]=0]="Error";e[e["Value"]=1]="Value"})(QL||(QL={}));const ZL=(e,t,o)=>e.stype===QL.Error?t(e.serror):o(e.svalue);const eH=e=>{const t=[];const o=[];Z(e,(e=>{ZL(e,(e=>o.push(e)),(e=>t.push(e)))}));return{values:t,errors:o}};const tH=(e,t)=>{if(e.stype===QL.Error){return{stype:QL.Error,serror:t(e.serror)}}else{return e}};const oH=(e,t)=>{if(e.stype===QL.Value){return{stype:QL.Value,svalue:t(e.svalue)}}else{return e}};const nH=(e,t)=>{if(e.stype===QL.Value){return t(e.svalue)}else{return e}};const sH=(e,t)=>{if(e.stype===QL.Error){return t(e.serror)}else{return e}};const rH=e=>({stype:QL.Value,svalue:e});const aH=e=>({stype:QL.Error,serror:e});const cH=e=>ZL(e,ud.error,ud.value);const iH=e=>e.fold(aH,rH);const lH={fromResult:iH,toResult:cH,svalue:rH,partition:eH,serror:aH,bind:nH,bindError:sH,map:oH,mapError:tH,fold:ZL};const dH=e=>k(e)&&we(e).length>100?" removed due to size":JSON.stringify(e,null,2);const uH=e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:R("... (only showing first ten failures)")}]):e;return Q(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))};const fH=(e,t)=>lH.serror([{path:e,getErrorInfo:t}]);const mH=(e,t,o)=>fH(e,(()=>'Could not find valid *required* value for "'+t+'" in '+dH(o)));const gH=(e,t)=>fH(e,(()=>'Choice schema did not contain choice key: "'+t+'"'));const pH=(e,t,o)=>fH(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+dH(t)));const hH=(e,t)=>fH(e,R(t));const yH=(e,t,o,n)=>{const s=Me(o,n);return s.fold((()=>pH(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t)))};const bH=(e,t)=>{const o=(o,n)=>{const s=Me(n,e);return s.fold((()=>gH(o,e)),(e=>yH(o,n,t,e)))};const n=()=>"chooseOn("+e+"). Possible values: "+we(t);return{extract:o,toString:n}};const vH=(e,t)=>t;const kH=(e,t)=>{const o=w(e)&&w(t);return o?_H(e,t):t};const wH=e=>(...t)=>{if(t.length===0){throw new Error(`Can't merge zero objects`)}const o={};for(let n=0;n<t.length;n++){const s=t[n];for(const t in s){if(Ne(s,t)){o[t]=e(o[t],s[t])}}}return o};const _H=wH(kH);const xH=wH(vH);const zH=()=>({tag:"required",process:{}});const CH=e=>({tag:"defaultedThunk",process:e});const SH=e=>CH(R(e));const TH=()=>({tag:"option",process:{}});const OH=(e,t)=>e.length>0?lH.svalue(_H(t,xH.apply(undefined,e))):lH.svalue(t);const EH=e=>M(lH.serror,ie)(e);const DH=(e,t)=>{const o=lH.partition(e);return o.errors.length>0?EH(o.errors):OH(o.values,t)};const AH=e=>{const t=lH.partition(e);return t.errors.length>0?EH(t.errors):lH.svalue(t.values)};const MH={consolidateObj:DH,consolidateArr:AH};const NH=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n});const RH=(e,t)=>({tag:"custom",newKey:e,instantiator:t});const BH=(e,t,o)=>{switch(e.tag){case"field":return t(e.key,e.newKey,e.presence,e.prop);case"custom":return o(e.newKey,e.instantiator)}};const LH=e=>{const t=(t,o)=>lH.bindError(e(o),(e=>hH(t,e)));const o=R("val");return{extract:t,toString:o}};const HH=LH(lH.svalue);const IH=(e,t,o,n)=>Me(t,o).fold((()=>mH(e,o,t)),n);const PH=(e,t,o,n)=>{const s=Me(e,t).getOrThunk((()=>o(e)));return n(s)};const FH=(e,t,o)=>o(Me(e,t));const VH=(e,t,o,n)=>{const s=Me(e,t).map((t=>t===true?o(e):t));return n(s)};const jH=(e,t,o,n,s)=>{const r=e=>s.extract(t.concat([n]),e);const a=e=>e.fold((()=>lH.svalue(q.none())),(e=>{const o=s.extract(t.concat([n]),e);return lH.map(o,q.some)}));switch(e.tag){case"required":return IH(t,o,n,r);case"defaultedThunk":return PH(o,n,e.process,r);case"option":return FH(o,n,a);case"defaultedOptionThunk":return VH(o,n,e.process,a);case"mergeWithThunk":{return PH(o,n,R({}),(t=>{const n=_H(e.process(o),t);return r(n)}))}}};const UH=(e,t,o)=>{const n={};const s=[];for(const r of o){BH(r,((o,r,a,c)=>{const i=jH(a,e,t,o,c);lH.fold(i,(e=>{s.push(...e)}),(e=>{n[r]=e}))}),((e,o)=>{n[e]=o(t)}))}return s.length>0?lH.serror(s):lH.svalue(n)};const qH=e=>{const t=(t,o)=>UH(t,o,e);const o=()=>{const t=Q(e,(e=>BH(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"};return{extract:t,toString:o}};const WH=e=>{const t=(t,o)=>{const n=Q(o,((o,n)=>e.extract(t.concat(["["+n+"]"]),o)));return MH.consolidateArr(n)};const o=()=>"array("+e.toString()+")";return{extract:t,toString:o}};const $H=e=>LH((t=>e(t).fold(lH.serror,lH.svalue)));const GH=(e,t,o)=>{const n=t.extract([e],o);return lH.mapError(n,(e=>({input:o,errors:e})))};const KH=(e,t,o)=>lH.toResult(GH(e,t,o));const XH=e=>"Errors: \n"+uH(e.errors).join("\n")+"\n\nInput object: "+dH(e.input);const YH=(e,t)=>bH(e,ze(t,qH));const JH=R(HH);const QH=(e,t)=>LH((o=>{const n=typeof o;return e(o)?lH.svalue(o):lH.serror(`Expected type: ${t} but got: ${n}`)}));const ZH=QH(E,"number");const eI=QH(v,"string");const tI=QH(z,"boolean");const oI=QH(O,"function");const nI=NH;const sI=RH;const rI=e=>$H((t=>Y(e,t)?ud.value(t):ud.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`)));const aI=(e,t)=>nI(e,e,zH(),t);const cI=e=>aI(e,eI);const iI=e=>aI(e,oI);const lI=(e,t)=>nI(e,e,zH(),WH(t));const dI=(e,t)=>nI(e,e,TH(),t);const uI=e=>dI(e,eI);const fI=e=>dI(e,oI);const mI=(e,t)=>nI(e,e,SH(t),JH());const gI=(e,t,o)=>nI(e,e,SH(t),o);const pI=(e,t)=>gI(e,t,ZH);const hI=(e,t)=>gI(e,t,eI);const yI=(e,t,o)=>gI(e,t,rI(o));const bI=(e,t)=>gI(e,t,tI);const vI=(e,t)=>gI(e,t,oI);const kI=(e,t,o)=>gI(e,t,WH(o));const wI=cI("type");const _I=iI("fetch");const xI=iI("onAction");const zI=vI("onSetup",(()=>A));const CI=uI("text");const SI=uI("icon");const TI=uI("tooltip");const OI=uI("label");const EI=bI("active",false);const DI=bI("enabled",true);const AI=bI("primary",false);const MI=e=>mI("columns",e);const NI=e=>hI("type",e);const RI=qH([wI,cI("ch"),pI("minChars",1),MI(1),pI("maxResults",10),fI("matches"),_I,xI,kI("highlightOn",[],eI)]);const BI=e=>KH("Autocompleter",RI,e);const LI=[DI,TI,SI,CI,zI];const HI=[EI].concat(LI);const II=[vI("predicate",j),yI("scope","node",["node","editor"]),yI("position","selection",["node","selection","line"])];const PI=LI.concat([NI("contextformbutton"),AI,xI,sI("original",B)]);const FI=HI.concat([NI("contextformbutton"),AI,xI,sI("original",B)]);const VI=LI.concat([NI("contextformbutton")]);const jI=HI.concat([NI("contextformtogglebutton")]);const UI=YH("type",{contextformbutton:PI,contextformtogglebutton:FI});qH([NI("contextform"),vI("initValue",R("")),OI,lI("commands",UI),dI("launch",YH("type",{contextformbutton:VI,contextformtogglebutton:jI}))].concat(II));const qI=e=>{const t=e.ui.registry.getAll().popups;const o=ze(t,(e=>BI(e).fold((e=>{throw new Error(XH(e))}),B)));const n=Le(De(o,(e=>e.ch)));const s=Ae(o);const r=e=>oe(s,(t=>t.ch===e));return{dataset:o,triggerChars:n,lookupByChar:r}};const WI=(e,t)=>{const o=bi(t.load,50);e.on("keypress compositionend",(e=>{if(e.which===27){return}o.throttle()}));e.on("keydown",(e=>{const n=e.which;if(n===8){o.throttle()}else if(n===27){t.cancelIfNecessary()}}));e.on("remove",o.cancel)};const $I=e=>{const t=hi();const o=ei(false);const n=t.isSet;const s=()=>{if(n()){DO(e);oh(e);o.set(false);t.clear()}};const r=o=>{if(!n()){EO(e,o.range);t.set({triggerChar:o.triggerChar,matchLength:o.text.length})}};const a=$e((()=>qI(e)));const c=o=>t.get().map((t=>jL(e.dom,e.selection.getRng(),t.triggerChar).bind((t=>JL(e,a,t,o))))).getOrThunk((()=>YL(e,a)));const i=n=>{c(n).fold(s,(n=>{r(n.context);n.lookupData.then((r=>{t.get().map((a=>{const c=n.context;if(a.triggerChar===c.triggerChar){if(c.text.length-a.matchLength>=10){s()}else{t.set({...a,matchLength:c.text.length});if(o.get()){th(e,{lookupData:r})}else{o.set(true);eh(e,{lookupData:r})}}}}))}))}))};e.addCommand("mceAutocompleterReload",((e,t)=>{const o=k(t)?t.fetchOptions:{};i(o)}));e.addCommand("mceAutocompleterClose",s);WI(e,{cancelIfNecessary:s,load:i})};const GI=e=>(t,o,n={})=>{const s=t.getBody();const r={bubbles:true,composed:true,data:null,isComposing:false,detail:0,view:null,target:s,currentTarget:s,eventPhase:Event.AT_TARGET,originalTarget:s,explicitOriginalTarget:s,isTrusted:false,srcElement:s,cancelable:false,preventDefault:A,inputType:o};const a=Oc(new InputEvent(e));return t.dispatch(e,{...a,...r,...n})};const KI=GI("input");const XI=GI("beforeinput");const YI=(e,t,o)=>{const n=o.keyCode===ah.BACKSPACE?"deleteContentBackward":"deleteContentForward";CB([{keyCode:ah.BACKSPACE,action:xB(ER,e)},{keyCode:ah.BACKSPACE,action:xB(bM,e,false)},{keyCode:ah.DELETE,action:xB(bM,e,true)},{keyCode:ah.BACKSPACE,action:xB(ZA,e,false)},{keyCode:ah.DELETE,action:xB(ZA,e,true)},{keyCode:ah.BACKSPACE,action:xB(cR,e,t,false)},{keyCode:ah.DELETE,action:xB(cR,e,t,true)},{keyCode:ah.BACKSPACE,action:xB(Qw,e,false)},{keyCode:ah.DELETE,action:xB(Qw,e,true)},{keyCode:ah.BACKSPACE,action:xB(kM,e,false)},{keyCode:ah.DELETE,action:xB(kM,e,true)},{keyCode:ah.BACKSPACE,action:xB(hR,e,false)},{keyCode:ah.DELETE,action:xB(hR,e,true)},{keyCode:ah.BACKSPACE,action:xB(FA,e,false)},{keyCode:ah.DELETE,action:xB(FA,e,true)},{keyCode:ah.BACKSPACE,action:xB(NA,e,false)},{keyCode:ah.DELETE,action:xB(NA,e,true)},{keyCode:ah.BACKSPACE,action:xB(fR,e,false)},{keyCode:ah.DELETE,action:xB(fR,e,true)}],o).each((t=>{o.preventDefault();const s=XI(e,n);if(!s.isDefaultPrevented()){t();KI(e,n)}}))};const JI=(e,t)=>{zB([{keyCode:ah.BACKSPACE,action:xB(yM,e)},{keyCode:ah.DELETE,action:xB(yM,e)}],t)};const QI=(e,t)=>{e.on("keydown",(o=>{if(o.isDefaultPrevented()===false){YI(e,t,o)}}));e.on("keyup",(t=>{if(t.isDefaultPrevented()===false){JI(e,t)}}))};const ZI=e=>{while(e){if(e.nodeType===1||e.nodeType===3&&e.data&&/[\r\n\s]/.test(e.data)){return e}e=e.nextSibling}};const eP=(e,t)=>{let o,n=t;const s=e.dom;const r=e.schema.getMoveCaretBeforeOnEnterElements();if(!t){return}if(/^(LI|DT|DD)$/.test(t.nodeName)){const e=ZI(t.firstChild);if(e&&/^(UL|OL|DL)$/.test(e.nodeName)){t.insertBefore(s.doc.createTextNode(jr),t.firstChild)}}const a=s.createRng();t.normalize();if(t.hasChildNodes()){const e=new vr(t,t);while(o=e.current()){if(qs(o)){a.setStart(o,0);a.setEnd(o,0);break}if(r[o.nodeName.toLowerCase()]){a.setStartBefore(o);a.setEndBefore(o);break}n=o;o=e.next()}if(!o){a.setStart(n,0);a.setEnd(n,0)}}else{if(Ys(t)){if(t.nextSibling&&s.isBlock(t.nextSibling)){a.setStartBefore(t);a.setEndBefore(t)}else{a.setStartAfter(t);a.setEndAfter(t)}}else{a.setStart(t,0);a.setEnd(t,0)}}e.selection.setRng(a);Fy(e,a)};const tP=(e,t)=>{const o=e.getRoot();let n,s;n=t;while(n!==o&&e.getContentEditable(n)!=="false"){if(e.getContentEditable(n)==="true"){s=n}n=n.parentNode}return n!==o?s:o};const oP=e=>q.from(e.dom.getParent(e.selection.getStart(true),e.dom.isBlock));const nP=e=>oP(e).fold(R(""),(e=>e.nodeName.toUpperCase()));const sP=e=>oP(e).filter((e=>Lr(an.fromDom(e)))).isSome();const rP=(e,t)=>e.firstChild&&e.firstChild.nodeName===t;const aP=e=>{var t;return((t=e.parentNode)===null||t===void 0?void 0:t.firstChild)===e};const cP=(e,t)=>e&&e.parentNode&&e.parentNode.nodeName===t;const iP=e=>e&&/^(OL|UL|LI)$/.test(e.nodeName);const lP=e=>iP(e)&&iP(e.parentNode);const dP=e=>{const t=e.parentNode;if(/^(LI|DT|DD)$/.test(t.nodeName)){return t}return e};const uP=(e,t,o)=>{let n=e[o?"firstChild":"lastChild"];while(n){if(Rs(n)){break}n=n[o?"nextSibling":"previousSibling"]}return n===t};const fP=(e,t,o,n,s)=>{const r=e.dom;const a=e.selection.getRng();if(o===e.getBody()){return}if(lP(o)){s="LI"}let c=t(s);if(uP(o,n,true)&&uP(o,n,false)){if(cP(o,"LI")){const e=dP(o);r.insertAfter(c,e);if(aP(o)){r.remove(e)}else{r.remove(o)}}else{r.replace(c,o)}}else if(uP(o,n,true)){if(cP(o,"LI")){r.insertAfter(c,dP(o));c.appendChild(r.doc.createTextNode(" "));c.appendChild(o)}else{o.parentNode.insertBefore(c,o)}r.remove(n)}else if(uP(o,n,false)){r.insertAfter(c,dP(o));r.remove(n)}else{o=dP(o);const e=a.cloneRange();e.setStartAfter(n);e.setEndAfter(o);const t=e.extractContents();if(s==="LI"&&rP(t,"LI")){c=t.firstChild;r.insertAfter(t,o)}else{r.insertAfter(t,o);r.insertAfter(c,o)}r.remove(n)}eP(e,c)};const mP=e=>{Z(vi(an.fromDom(e),Oo),(e=>{const t=e.dom;t.nodeValue=Gr(t.nodeValue)}))};const gP=(e,t)=>t&&t.nodeName==="A"&&e.isEmpty(t);const pP=e=>e&&/^(TD|TH|CAPTION)$/.test(e.nodeName);const hP=e=>{e.innerHTML='<br data-mce-bogus="1">'};const yP=(e,t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t;const bP=(e,t)=>t&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.getContentEditable(t)!=="true";const vP=(e,t,o)=>{let n=o;const s=[];let r;if(!n){return}while(n=n.firstChild){if(e.isBlock(n)){return}if(Rs(n)&&!t[n.nodeName.toLowerCase()]){s.push(n)}}r=s.length;while(r--){n=s[r];if(!n.hasChildNodes()||n.firstChild===n.lastChild&&n.firstChild.nodeValue===""){e.remove(n)}else{if(gP(e,n)){e.remove(n)}}}};const kP=(e,t,o)=>{if(qs(t)===false){return o}else if(e){return o===1&&t.data.charAt(o-1)===Wr?0:o}else{return o===t.data.length-1&&t.data.charAt(o)===Wr?t.data.length:o}};const wP=e=>{const t=e.cloneRange();t.setStart(e.startContainer,kP(true,e.startContainer,e.startOffset));t.setEnd(e.endContainer,kP(false,e.endContainer,e.endOffset));return t};const _P=e=>{do{if(qs(e)){e.nodeValue=e.nodeValue.replace(/^[\r\n]+/,"")}e=e.firstChild}while(e)};const xP=(e,t)=>{const o=e.getRoot();let n,s;n=t;while(n!==o&&e.getContentEditable(n)!=="false"){if(e.getContentEditable(n)==="true"){s=n}n=n.parentNode}return n!==o?s:o};const zP=(e,t,o)=>{const n=e.dom;q.from(o.style).map(n.parseStyle).each((e=>{const o=Yn(an.fromDom(t));const s={...o,...e};n.setStyles(t,s)}));const s=q.from(o.class).map((e=>e.split(/\s+/)));const r=q.from(t.className).map((e=>oe(e.split(/\s+/),(e=>e!==""))));po(s,r,((e,o)=>{const s=oe(o,(t=>!Y(e,t)));const r=[...e,...s];n.setAttrib(t,"class",r.join(" "))}));const a=["style","class"];const c=Ee(o,((e,t)=>!Y(a,t)));n.setAttribs(t,c)};const CP=(e,t)=>{const o=Pd(e);if(o.toLowerCase()===t.tagName.toLowerCase()){const o=Fd(e);zP(e,t,o)}};const SP=(e,t,o,n,s)=>{let r,a,c,i,l,d;const u=e.dom,f=xP(u,n);a=u.getParent(n,u.isBlock);if(!a||!bP(u,a)){a=a||f;if(a===e.getBody()||pP(a)){d=a.nodeName.toLowerCase()}else{d=a.parentNode.nodeName.toLowerCase()}if(!a.hasChildNodes()){r=u.create(t);CP(e,r);a.appendChild(r);o.setStart(r,0);o.setEnd(r,0);return r}i=n;while(i.parentNode!==a){i=i.parentNode}while(i&&!u.isBlock(i)){c=i;i=i.previousSibling}if(c&&e.schema.isValidChild(d,t.toLowerCase())){r=u.create(t);CP(e,r);c.parentNode.insertBefore(r,c);i=c;while(i&&!u.isBlock(i)){l=i.nextSibling;r.appendChild(i);i=l}o.setStart(n,s);o.setEnd(n,s)}}return n};const TP=(e,t)=>{t.normalize();const o=t.lastChild;if(!o||/^(left|right)$/gi.test(e.getStyle(o,"float",true))){e.add(t,"br")}};const OP=(e,t)=>{let o,n,s,r;let a,c,i,l,d;const u=e.dom;const f=e.schema,m=f.getNonEmptyElements();const g=e.selection.getRng();const p=Pd(e);const h=t=>{let o=n,s,a,c;const i=f.getTextInlineElements();if(t||l==="TABLE"||l==="HR"){s=u.create(t||p)}else{s=r.cloneNode(false)}c=s;if(Ud(e)===false){u.setAttrib(s,"style",null);u.setAttrib(s,"class",null)}else{do{if(i[o.nodeName]){if(Fm(o)||ig(o)){continue}a=o.cloneNode(false);u.setAttrib(a,"id","");if(s.hasChildNodes()){a.appendChild(s.firstChild);s.appendChild(a)}else{c=a;s.appendChild(a)}}}while((o=o.parentNode)&&o!==w)}CP(e,s);hP(c);return s};const y=e=>{let t,o;const a=kP(e,n,s);if(qs(n)&&(e?a>0:a<n.nodeValue.length)){return false}if(n.parentNode===r&&d&&!e){return true}if(e&&Rs(n)&&n===r.firstChild){return true}if(yP(n,"TABLE")||yP(n,"HR")){return d&&!e||!d&&e}const c=new vr(n,r);if(qs(n)){if(e&&a===0){c.prev()}else if(!e&&a===n.nodeValue.length){c.next()}}while(t=c.current()){if(Rs(t)){if(!t.getAttribute("data-mce-bogus")){o=t.nodeName.toLowerCase();if(m[o]&&o!=="br"){return false}}}else if(qs(t)&&!Sa(t.nodeValue)){return false}if(e){c.prev()}else{c.next()}}return true};const b=()=>{if(/^(H[1-6]|PRE|FIGURE)$/.test(l)&&_!=="HGROUP"){a=h(p)}else{a=h()}if(qd(e)&&bP(u,i)&&u.isEmpty(r)){a=u.split(i,r)}else{u.insertAfter(a,r)}eP(e,a)};ry(u,g).each((e=>{g.setStart(e.startContainer,e.startOffset);g.setEnd(e.endContainer,e.endOffset)}));n=g.startContainer;s=g.startOffset;const v=!!(t&&t.shiftKey);const k=!!(t&&t.ctrlKey);if(Rs(n)&&n.hasChildNodes()){d=s>n.childNodes.length-1;n=n.childNodes[Math.min(s,n.childNodes.length-1)]||n;if(d&&qs(n)){s=n.nodeValue.length}else{s=0}}const w=xP(u,n);if(!w){return}if(!v){n=SP(e,p,g,n,s)}r=u.getParent(n,u.isBlock);i=r?u.getParent(r.parentNode,u.isBlock):null;l=r?r.nodeName.toUpperCase():"";const _=i?i.nodeName.toUpperCase():"";if(_==="LI"&&!k){r=i;i=i.parentNode;l=_}if(/^(LI|DT|DD)$/.test(l)){if(u.isEmpty(r)){fP(e,h,i,r,p);return}}if(r===e.getBody()){return}if(Yr(r)){a=ia(r);if(u.isEmpty(r)){hP(r)}CP(e,a);eP(e,a)}else if(y()){b()}else if(y(true)){a=r.parentNode.insertBefore(h(),r);eP(e,yP(r,"HR")?a:r)}else{o=wP(g).cloneRange();o.setEndAfter(r);c=o.extractContents();mP(c);_P(c);a=c.firstChild;u.insertAfter(c,r);vP(u,m,a);TP(u,r);if(u.isEmpty(r)){hP(r)}a.normalize();if(u.isEmpty(a)){u.remove(a);b()}else{CP(e,a);eP(e,a)}}u.setAttrib(a,"id","");e.dispatch("NewBlock",{newBlock:a})};const EP=(e,t,o)=>{const n=new vr(t,o);let s;const r=e.getNonEmptyElements();while(s=n.next()){if(r[s.nodeName.toLowerCase()]||s.length>0){return true}}};const DP=(e,t,o)=>{const n=e.dom.createRng();if(!o){n.setStartAfter(t);n.setEndAfter(t)}else{n.setStartBefore(t);n.setEndBefore(t)}e.selection.setRng(n);Fy(e,n)};const AP=(e,t)=>{const o=e.selection;const n=e.dom;const s=o.getRng();let r;let a;ry(n,s).each((e=>{s.setStart(e.startContainer,e.startOffset);s.setEnd(e.endContainer,e.endOffset)}));let c=s.startOffset;let i=s.startContainer;if(i.nodeType===1&&i.hasChildNodes()){const e=c>i.childNodes.length-1;i=i.childNodes[Math.min(c,i.childNodes.length-1)]||i;if(e&&i.nodeType===3){c=i.nodeValue.length}else{c=0}}let l=n.getParent(i,n.isBlock);const d=l?n.getParent(l.parentNode,n.isBlock):null;const u=d?d.nodeName.toUpperCase():"";const f=!!(t&&t.ctrlKey);if(u==="LI"&&!f){l=d}if(i&&i.nodeType===3&&c>=i.nodeValue.length){if(!EP(e.schema,i,l)){r=n.create("br");s.insertNode(r);s.setStartAfter(r);s.setEndAfter(r);a=true}}r=n.create("br");Al(n,s,r);DP(e,r,a);e.undoManager.add()};const MP=(e,t)=>{const o=an.fromTag("br");Zn(an.fromDom(t),o);e.undoManager.add()};const NP=(e,t)=>{if(!BP(e.getBody(),t)){es(an.fromDom(t),an.fromTag("br"))}const o=an.fromTag("br");es(an.fromDom(t),o);DP(e,o.dom,false);e.undoManager.add()};const RP=e=>Ys(e.getNode());const BP=(e,t)=>{if(RP(Tl.after(t))){return true}else{return Bm(e,Tl.after(t)).map((e=>Ys(e.getNode()))).getOr(false)}};const LP=e=>e&&e.nodeName==="A"&&"href"in e;const HP=e=>e.fold(j,LP,LP,j);const IP=e=>{const t=H(XD,e);const o=Tl.fromRangeStart(e.selection.getRng());return UM(t,e.getBody(),o).filter(HP)};const PP=(e,t)=>{t.fold(A,H(MP,e),H(NP,e),A)};const FP=(e,t)=>{const o=IP(e);if(o.isSome()){o.each(H(PP,e))}else{AP(e,t)}};const VP=(e,t)=>oP(e).filter((e=>t.length>0&&ln(an.fromDom(e),t))).isSome();const jP=e=>VP(e,Vd(e));const UP=e=>VP(e,jd(e));const qP=md.generate([{br:[]},{block:[]},{none:[]}]);const WP=(e,t)=>UP(e);const $P=e=>(t,o)=>sP(t)===e;const GP=(e,t)=>(o,n)=>{const s=nP(o)===e.toUpperCase();return s===t};const KP=e=>GP("pre",e);const XP=()=>GP("summary",true);const YP=e=>(t,o)=>Id(t)===e;const JP=(e,t)=>jP(e);const QP=(e,t)=>t;const ZP=e=>{const t=Pd(e);const o=tP(e.dom,e.selection.getStart());return o&&e.schema.isValidChild(o.nodeName,t)};const eF=(e,t)=>(o,n)=>{const s=se(e,((e,t)=>e&&t(o,n)),true);return s?q.some(t):q.none()};const tF=(e,t)=>NM([eF([WP],qP.none()),eF([XP()],qP.br()),eF([KP(true),YP(false),QP],qP.br()),eF([KP(true),YP(false)],qP.block()),eF([KP(true),YP(true),QP],qP.block()),eF([KP(true),YP(true)],qP.br()),eF([$P(true),QP],qP.br()),eF([$P(true)],qP.block()),eF([JP],qP.br()),eF([QP],qP.br()),eF([ZP],qP.block())],[e,!!(t&&t.shiftKey)]).getOr(qP.none());const oF=(e,t)=>{tF(e,t).fold((()=>{if(T(t)){const t=XI(e,"insertLineBreak");if(t.isDefaultPrevented()){return}}FP(e,t);if(T(t)){KI(e,"insertLineBreak")}}),(()=>{if(T(t)){const t=XI(e,"insertParagraph");if(t.isDefaultPrevented()){return}}OP(e,t);if(T(t)){KI(e,"insertParagraph")}}),A)};const nF=(e,t)=>{if(t.isDefaultPrevented()){return}t.preventDefault();LT(e.undoManager);e.undoManager.transact((()=>{if(e.selection.isCollapsed()===false){rA(e)}oF(e,t)}))};const sF=e=>{e.on("keydown",(t=>{if(t.keyCode===ah.ENTER){nF(e,t)}}))};const rF=(e,t,o)=>{zB([{keyCode:ah.END,action:xB(iB,e,true)},{keyCode:ah.HOME,action:xB(iB,e,false)},{keyCode:ah.END,action:xB(OB,e,true)},{keyCode:ah.HOME,action:xB(OB,e,false)},{keyCode:ah.END,action:xB(eR,e,true,t)},{keyCode:ah.HOME,action:xB(eR,e,false,t)}],o).each((e=>{o.preventDefault()}))};const aF=(e,t)=>{e.on("keydown",(o=>{if(o.isDefaultPrevented()===false){rF(e,t,o)}}))};const cF=e=>{e.on("input",(t=>{if(t.isComposing===false){Nk(e)}}))};const iF=Gt();const lF=(e,t,o)=>{zB([{keyCode:ah.PAGE_UP,action:xB(eR,e,false,t)},{keyCode:ah.PAGE_DOWN,action:xB(eR,e,true,t)}],o)};const dF=e=>e.stopImmediatePropagation();const uF=e=>e.keyCode===ah.PAGE_UP||e.keyCode===ah.PAGE_DOWN;const fF=(e,t,o)=>{if(o&&!e.get()){t.on("NodeChange",dF,true)}else if(!o&&e.get()){t.off("NodeChange",dF)}e.set(o)};const mF=(e,t)=>{if(iF.os.isMacOS()){return}const o=ei(false);e.on("keydown",(t=>{if(uF(t)){fF(o,e,true)}}));e.on("keyup",(n=>{if(n.isDefaultPrevented()===false){lF(e,t,n)}if(uF(n)&&o.get()){fF(o,e,false);e.nodeChanged()}}))};const gF=(e,t)=>{const o=t.container();const n=t.offset();if(qs(o)){o.insertData(n,e);return q.some(Tl(o,n+e.length))}else{return am(t).map((o=>{const n=an.fromText(e);if(t.isAtEnd()){es(o,n)}else{Zn(o,n)}return Tl(n.dom,e.length)}))}};const pF=H(gF,jr);const hF=H(gF," ");const yF=e=>t=>t.fold((t=>Lm(e.dom,Tl.before(t))),(e=>Hm(e)),(e=>Im(e)),(t=>Bm(e.dom,Tl.after(t))));const bF=(e,t)=>o=>wk(e,o)?pF(t):hF(t);const vF=e=>t=>{e.selection.setRng(t.toRange());e.nodeChanged();return true};const kF=e=>{const t=Tl.fromRangeStart(e.selection.getRng());const o=an.fromDom(e.getBody());if(e.selection.isCollapsed()){const n=H(XD,e);const s=Tl.fromRangeStart(e.selection.getRng());return UM(n,e.getBody(),s).bind(yF(o)).map((n=>()=>bF(o,t)(n).each(vF(e))))}else{return q.none()}};const wF=(e,t)=>{CB([{keyCode:ah.SPACEBAR,action:xB(kF,e)}],t).each((o=>{t.preventDefault();const n=XI(e,"insertText",{data:" "});if(!n.isDefaultPrevented()){o();KI(e,"insertText",{data:" "})}}))};const _F=e=>{e.on("keydown",(t=>{if(t.isDefaultPrevented()===false){wF(e,t)}}))};const xF=e=>{if(mf(e)){return[{keyCode:ah.TAB,action:xB(zL,e,true)},{keyCode:ah.TAB,shiftKey:true,action:xB(zL,e,false)}]}else{return[]}};const zF=(e,t)=>{zB([...xF(e)],t).each((e=>{t.preventDefault()}))};const CF=e=>{e.on("keydown",(t=>{if(t.isDefaultPrevented()===false){zF(e,t)}}))};const SF=e=>{e.addShortcut("Meta+P","","mcePrint");$I(e);if(QT(e)){return ei(null)}else{const t=JN(e);QR(e);SL(e,t);QI(e,t);sF(e);_F(e);cF(e);CF(e);aF(e,t);mF(e,t);return t}};class TF{constructor(e){this.lastPath=[];this.editor=e;let t;const o=this;if(!("onselectionchange"in e.getDoc())){e.on("NodeChange click mouseup keyup focus",(o=>{const n=e.selection.getRng();const s={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset};if(o.type==="nodechange"||!Gh(s,t)){e.dispatch("SelectionChange")}t=s}))}e.on("contextmenu",(()=>{e.dispatch("SelectionChange")}));e.on("SelectionChange",(()=>{const t=e.selection.getStart(true);if(!t){return}if(kp(e)&&!o.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())){e.nodeChanged({selectionChange:true})}}));e.on("mouseup",(t=>{if(!t.isDefaultPrevented()&&kp(e)){if(e.selection.getNode().nodeName==="IMG"){ib.setEditorTimeout(e,(()=>{e.nodeChanged()}))}else{e.nodeChanged()}}}))}nodeChanged(e){const t=this.editor.selection;let o,n,s;if(this.editor.initialized&&t&&!Au(this.editor)&&!this.editor.mode.isReadOnly()){s=this.editor.getBody();o=t.getStart(true)||s;if(o.ownerDocument!==this.editor.getDoc()||!this.editor.dom.isChildOf(o,s)){o=s}n=[];this.editor.dom.getParent(o,(e=>{if(e===s){return true}n.push(e)}));e=e||{};e.element=o;e.parents=n;this.editor.dispatch("NodeChange",e)}}isSameElementPath(e){let t;const o=this.editor;const n=ue(o.dom.getParents(e,U,o.getBody()));if(n.length===this.lastPath.length){for(t=n.length;t>=0;t--){if(n[t]!==this.lastPath[t]){break}}if(t===-1){this.lastPath=n;return true}}this.lastPath=n;return false}}const OF="x-tinymce/html";const EF=R(OF);const DF="\x3c!-- "+OF+" --\x3e";const AF=e=>DF+e;const MF=e=>e.replace(DF,"");const NF=e=>e.indexOf(DF)!==-1;const RF=e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e);const BF=(e,t)=>{let o="<"+e;const n=De(t,((e,t)=>t+'="'+uc.encodeAllRaw(e)+'"'));if(n.length){o+=" "+n.join(" ")}return o+">"};const LF=(e,t,o)=>{const n=e.split(/\n\n/);const s=BF(t,o);const r="</"+t+">";const a=Q(n,(e=>e.split(/\n/).join("<br />")));const c=e=>s+e+r;return a.length===1?a[0]:Q(a,c).join("")};const HF="%MCEPASTEBIN%";const IF=(e,t)=>{const{dom:o,selection:n}=e;const s=e.getBody();t.set(n.getRng());const r=o.add(e.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:true,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},HF);if(eo.browser.isFirefox()){o.setStyle(r,"left",o.getStyle(s,"direction",true)==="rtl"?65535:-65535)}o.bind(r,"beforedeactivate focusin focusout",(e=>{e.stopPropagation()}));r.focus();n.select(r,true)};const PF=(e,t)=>{const o=e.dom;if(FF(e)){let n;const s=t.get();while(n=FF(e)){o.remove(n);o.unbind(n)}if(s){e.selection.setRng(s)}}t.set(null)};const FF=e=>e.dom.get("mcepastebin");const VF=e=>e&&e.id==="mcepastebin";const jF=e=>{const t=e.dom;const o=(e,o)=>{e.appendChild(o);t.remove(o,true)};const[n,...s]=oe(e.getBody().childNodes,VF);Z(s,(e=>{o(n,e)}));const r=t.select("div[id=mcepastebin]",n);for(let e=r.length-1;e>=0;e--){const s=t.create("div");n.insertBefore(s,r[e]);o(s,r[e])}return n?n.innerHTML:""};const UF=e=>e===HF;const qF=e=>{const t=ei(null);return{create:()=>IF(e,t),remove:()=>PF(e,t),getEl:()=>FF(e),getHtml:()=>jF(e),getLastRng:t.get}};const WF=(e,t)=>{fo.each(t,(t=>{if(b(t,RegExp)){e=e.replace(t,"")}else{e=e.replace(t[0],t[1])}}));return e};const $F=e=>{const t=_c();const o=xS({},t);let n="";const s=t.getVoidElements();const r=fo.makeMap("script noscript style textarea video audio iframe object"," ");const a=t.getBlockElements();const c=e=>{const o=e.name,i=e;if(o==="br"){n+="\n";return}if(o==="wbr"){return}if(s[o]){n+=" "}if(r[o]){n+=" ";return}if(e.type===3){n+=e.value}if(!(e.name in t.getVoidElements())){if(e=e.firstChild){do{c(e)}while(e=e.next)}}if(a[o]&&i.next){n+="\n";if(o==="p"){n+="\n"}}};e=WF(e,[/<!\[[^\]]+\]>/g]);c(o.parse(e));return n};const GF=e=>{const t=(e,t,o)=>{if(!t&&!o){return" "}return jr};e=WF(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,t],/<br class="Apple-interchange-newline">/g,/<br>$/i]);return e};const KF=e=>{let t=0;return()=>e+t++};const XF=e=>{const t=e.toLowerCase();const o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return fo.hasOwn(o,t)?"image/"+o[t]:"image/"+t};const YF=(e,t)=>{const o=xS({},e.schema);o.addNodeFilter("meta",(e=>{fo.each(e,(e=>{e.remove()}))}));const n=o.parse(t,{forced_root_block:false,isRootContent:true});return wv({validate:true},e.schema).serialize(n)};const JF=(e,t)=>({content:e,cancelled:t});const QF=(e,t,o)=>{const n=e.dom.create("div",{style:"display:none"},t);const s=sh(e,n,o);return JF(s.node.innerHTML,s.isDefaultPrevented())};const ZF=(e,t,o)=>{const n=nh(e,t,o);const s=YF(e,n.content);if(e.hasEventListeners("PastePostProcess")&&!n.isDefaultPrevented()){return QF(e,s,o)}else{return JF(s,n.isDefaultPrevented())}};const eV=(e,t,o)=>ZF(e,t,o);const tV=(e,t)=>{e.insertContent(t,{merge:Zu(e),paste:true});return true};const oV=e=>/^https?:\/\/[\w\?\-\/+=.&%@~#]+$/i.test(e);const nV=(e,t)=>oV(t)&&J(ff(e),(e=>lt(t.toLowerCase(),`.${e.toLowerCase()}`)));const sV=(e,t,o)=>{e.undoManager.extra((()=>{o(e,t)}),(()=>{e.insertContent('<img src="'+t+'">')}));return true};const rV=(e,t,o)=>{e.undoManager.extra((()=>{o(e,t)}),(()=>{e.execCommand("mceInsertLink",false,t)}));return true};const aV=(e,t,o)=>!e.selection.isCollapsed()&&oV(t)?rV(e,t,o):false;const cV=(e,t,o)=>nV(e,t)?sV(e,t,o):false;const iV=(e,t)=>{fo.each([aV,cV,tV],(o=>o(e,t,tV)!==true))};const lV=(e,t,o)=>{if(o||!ef(e)){tV(e,t)}else{iV(e,t)}};const dV=KF("mceclip");const uV=(e,t,o,n)=>{const s=eV(e,t,o);if(s.cancelled===false){lV(e,s.content,n)}};const fV=(e,t,o)=>{const n=o?o:NF(t);uV(e,MF(t),n,false)};const mV=(e,t)=>{const o=e.dom.encode(t).replace(/\r\n/g,"\n");const n=Da(o,of(e));const s=LF(n,Pd(e),Fd(e));uV(e,s,false,true)};const gV=e=>{const t={};if(e&&e.types){for(let o=0;o<e.types.length;o++){const n=e.types[o];try{t[n]=e.getData(n)}catch(e){t[n]=""}}}return t};const pV=(e,t)=>t in e&&e[t].length>0;const hV=e=>pV(e,"text/html")||pV(e,"text/plain");const yV=(e,t)=>{const o=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return T(o)?e.dom.encode(o[1]):null};const bV=(e,t,o,n)=>{const s=dV();const r=$d(e)&&T(o.name);const a=r?yV(e,o.name):s;const c=r?o.name:undefined;const i=t.create(s,o,n,a,c);t.add(i);return i};const vV=(e,t)=>{const{data:o,type:n}=FC(t.uri);const s=t.file;const r=e.editorUpload.blobCache;const a=r.getByData(o,n);const c=a!==null&&a!==void 0?a:bV(e,r,s,o);fV(e,`<img src="${c.blobUri()}">`,false)};const kV=e=>e.type==="paste";const wV=e=>Promise.all(Q(e,(e=>qC(e).then((t=>({file:e,uri:t}))))));const _V=e=>{const t=ff(e);return e=>it(e.type,"image/")&&J(t,(t=>XF(t)===e.type))};const xV=(e,t)=>{const o=t.items?le(be(t.items),(e=>e.kind==="file"?[e.getAsFile()]:[])):[];const n=t.files?be(t.files):[];return oe(o.length>0?o:n,_V(e))};const zV=(e,t,o)=>{const n=kV(t)?t.clipboardData:t.dataTransfer;if(Ku(e)&&n){const s=xV(e,n);if(s.length>0){t.preventDefault();wV(s).then((t=>{if(o){e.selection.setRng(o)}Z(t,(t=>{vV(e,t)}))}));return true}}return false};const CV=e=>{var t,o;return eo.os.isAndroid()&&((o=(t=e.clipboardData)===null||t===void 0?void 0:t.items)===null||o===void 0?void 0:o.length)===0};const SV=e=>ah.metaKeyPressed(e)&&e.keyCode===86||e.shiftKey&&e.keyCode===45;const TV=(e,t,o,n)=>{let s=GF(o);const r=pV(t,EF())||NF(o);const a=!r&&RF(s);const c=oV(s);if(UF(s)||!s.length||a&&!c){n=true}if(n||c){if(pV(t,"text/plain")&&a){s=t["text/plain"]}else{s=$F(s)}}if(UF(s)){return}if(n){mV(e,s)}else{fV(e,s,r)}};const OV=(e,t,o)=>{let n;const s=()=>t.getLastRng()||e.selection.getRng();e.on("keydown",(e=>{if(SV(e)&&!e.isDefaultPrevented()){n=e.shiftKey&&e.keyCode===86}}));e.on("paste",(r=>{if(r.isDefaultPrevented()||CV(r)){return}const a=o.get()==="text"||n;n=false;const c=gV(r.clipboardData);if(!hV(c)&&zV(e,r,s())){return}if(pV(c,"text/html")){r.preventDefault();TV(e,c,c["text/html"],a)}else{t.create();ib.setEditorTimeout(e,(()=>{const o=t.getHtml();t.remove();TV(e,c,o,a)}),0)}}))};const EV=e=>{const t=e=>it(e,"webkit-fake-url");const o=e=>it(e,"data:");const n=e=>{var t;return((t=e.data)===null||t===void 0?void 0:t.paste)===true};e.parser.addNodeFilter("img",((s,r,a)=>{if(!Ku(e)&&n(a)){for(const n of s){const s=n.attr("src");if(v(s)&&!n.attr("data-mce-object")&&s!==eo.transparentSrc){if(t(s)){n.remove()}else if(!nf(e)&&o(s)){n.remove()}}}}}))};const DV=(e,t,o)=>{OV(e,t,o);EV(e)};const AV=(e,t)=>{if(t.get()==="text"){t.set("html");rh(e,false)}else{t.set("text");rh(e,true)}e.focus()};const MV=(e,t)=>{e.addCommand("mceTogglePlainTextPaste",(()=>{AV(e,t)}));e.addCommand("mceInsertClipboardContent",((t,o)=>{if(o.html){fV(e,o.html,o.internal)}if(o.text){mV(e,o.text)}}))};const NV=(e,t,o)=>{try{e.clearData();e.setData("text/html",t);e.setData("text/plain",o);e.setData(EF(),t);return true}catch(e){return false}};const RV=(e,t,o,n)=>{if(NV(e.clipboardData,t.html,t.text)){e.preventDefault();n()}else{o(t.html,n)}};const BV=e=>(t,o)=>{const{dom:n,selection:s}=e;const r=n.create("div",{contenteditable:"false","data-mce-bogus":"all"});const a=n.create("div",{contenteditable:"true"},t);n.setStyles(r,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"});r.appendChild(a);n.add(e.getBody(),r);const c=s.getRng();a.focus();const i=n.createRng();i.selectNodeContents(a);s.setRng(i);ib.setEditorTimeout(e,(()=>{s.setRng(c);n.remove(r);o()}),0)};const LV=e=>({html:AF(e.selection.getContent({contextual:true})),text:e.selection.getContent({format:"text"})});const HV=e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody());const IV=e=>!e.selection.isCollapsed()||HV(e);const PV=e=>t=>{if(!t.isDefaultPrevented()&&IV(e)){RV(t,LV(e),BV(e),(()=>{if(eo.browser.isChromium()||eo.browser.isFirefox()){const t=e.selection.getRng();ib.setEditorTimeout(e,(()=>{e.selection.setRng(t);e.execCommand("Delete")}),0)}else{e.execCommand("Delete")}}))}};const FV=e=>t=>{if(!t.isDefaultPrevented()&&IV(e)){RV(t,LV(e),BV(e),A)}};const VV=e=>{e.on("cut",PV(e));e.on("copy",FV(e))};const jV=(e,t)=>{var o,n;return iy.getCaretRangeFromPoint((o=t.clientX)!==null&&o!==void 0?o:0,(n=t.clientY)!==null&&n!==void 0?n:0,e.getDoc())};const UV=e=>{const t=e["text/plain"];return t?t.indexOf("file://")===0:false};const qV=(e,t)=>{e.focus();if(t){e.selection.setRng(t)}};const WV=e=>J(e.files,(e=>/^image\//.test(e.type)));const $V=(e,t)=>{if(Gu(e)){e.on("dragend dragover draggesture dragdrop drop drag",(e=>{e.preventDefault();e.stopPropagation()}))}if(!Ku(e)){e.on("drop",(e=>{const t=e.dataTransfer;if(t&&WV(t)){e.preventDefault()}}))}e.on("drop",(o=>{if(o.isDefaultPrevented()||t.get()){return}const n=jV(e,o);if(S(n)){return}const s=gV(o.dataTransfer);const r=pV(s,EF());if((!hV(s)||UV(s))&&zV(e,o,n)){return}const a=s[EF()];const c=a||s["text/html"]||s["text/plain"];if(c){o.preventDefault();ib.setEditorTimeout(e,(()=>{e.undoManager.transact((()=>{if(a){e.execCommand("Delete")}qV(e,n);const t=GF(c);if(s["text/html"]){fV(e,t,r)}else{mV(e,t)}}))}))}}));e.on("dragstart",(e=>{t.set(true)}));e.on("dragover dragend",(o=>{if(Ku(e)&&t.get()===false){o.preventDefault();qV(e,jV(e,o))}if(o.type==="dragend"){t.set(false)}}))};const GV=e=>{const t=t=>o=>{t(e,o)};const o=Xu(e);if(O(o)){e.on("PastePreProcess",t(o))}const n=Yu(e);if(O(n)){e.on("PastePostProcess",t(n))}};const KV=(e,t)=>{e.on("PastePreProcess",(o=>{o.content=t(e,o.content,o.internal)}))};const XV=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi;const YV=e=>fo.trim(e).replace(XV,wg).toLowerCase();const JV=(e,t,o)=>{const n=Ju(e);if(o||n==="all"||!Qu(e)){return t}const s=n?n.split(/[, ]/):[];if(s&&n!=="none"){const o=e.dom,n=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,((e,t,r,a)=>{const c=o.parseStyle(o.decode(r));const i={};for(let e=0;e<s.length;e++){const t=c[s[e]];let r=t;let a=o.getStyle(n,s[e],true);if(/color/.test(s[e])){r=YV(r);a=YV(a)}if(a!==r){i[s[e]]=t}}const l=o.serializeStyle(i,"span");if(l){return t+' style="'+l+'"'+a}return t+a}))}else{t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3")}t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,((e,t,o,n)=>t+' style="'+o+'"'+n));return t};const QV=e=>{if(eo.browser.isChromium()||eo.browser.isSafari()){KV(e,JV)}};const ZV=e=>{const t=ei(false);const o=ei(tf(e)?"text":"html");const n=qF(e);QV(e);MV(e,o);GV(e);e.on("PreInit",(()=>{VV(e);$V(e,t);DV(e,n,o)}))};const ej=e=>{e.on("click",(t=>{if(e.dom.getParent(t.target,"details")){t.preventDefault()}}))};const tj=e=>{e.parser.addNodeFilter("details",(e=>{Z(e,(e=>{e.attr("data-mce-open",e.attr("open"));e.attr("open","open")}))}));e.serializer.addNodeFilter("details",(e=>{Z(e,(e=>{const t=e.attr("data-mce-open");e.attr("open",v(t)?t:null);e.attr("data-mce-open",null)}))}))};const oj=e=>{ej(e);tj(e)};const nj=e=>Rs(e)&&Rr(an.fromDom(e));const sj=e=>{const t=e.selection.getRng();const o=Tl.fromRangeStart(t);const n=Tl.fromRangeEnd(t);if(Tl.isElementPosition(o)){const e=o.container();if(nj(e)){Hm(e).each((e=>t.setStart(e.container(),e.offset())))}}if(Tl.isElementPosition(n)){const e=o.container();if(nj(e)){Im(e).each((e=>t.setEnd(e.container(),e.offset())))}}e.selection.setRng(p_(t))};const rj=e=>{e.on("click",(t=>{if(t.detail>=3){sj(e)}}))};var aj;(function(e){e["Before"]="before";e["After"]="after"})(aj||(aj={}));const cj=(e,t)=>Math.abs(e.left-t);const ij=(e,t)=>Math.abs(e.right-t);const lj=(e,t)=>e>=t.top&&e<=t.bottom;const dj=(e,t)=>e.top<t.bottom&&e.bottom>t.top;const uj=(e,t)=>{const o=Qi(e,t)/Math.min(e.height,t.height);return dj(e,t)&&o>.5};const fj=(e,t)=>{const o=oe(e,(e=>lj(t,e)));return Yi(o).fold((()=>[[],e]),(t=>{const{pass:o,fail:n}=te(e,(e=>uj(e,t)));return[o,n]}))};const mj=(e,t)=>({node:e.node,position:cj(e,t)<ij(e,t)?aj.Before:aj.After});const gj=(e,t,o)=>t>e.left&&t<e.right?0:Math.min(Math.abs(e.left-t),Math.abs(e.right-t));const pj=(e,t,o)=>{const n=e=>{if(ba(e.node)){return q.some(e)}else if(Rs(e.node)){return pj(be(e.node.childNodes),t,o)}else{return q.none()}};const s=(e,s)=>{if(e.length>=2){const r=n(e[0]).getOr(e[0]);const a=n(e[1]).getOr(e[1]);const c=Math.abs(s(r,t,o)-s(a,t,o));if(c<2){if(qs(r.node)){return q.some(r)}else if(qs(a.node)){return q.some(a)}}}return q.none()};const r=(e,r)=>{const a=ge(e,((e,n)=>r(e,t,o)-r(n,t,o)));return s(a,r).orThunk((()=>ve(a,n)))};const[a,c]=fj(CN(e),o);const{pass:i,fail:l}=te(c,(e=>e.top<o));return r(a,gj).orThunk((()=>r(l,Ji))).orThunk((()=>r(i,Ji)))};const hj=(e,t,o,n)=>{const s=(t,r)=>r.fold((()=>pj(be(t.dom.childNodes),o,n)),(e=>{const s=oe(be(t.dom.childNodes),(t=>t!==e.dom));return pj(s,o,n)})).orThunk((()=>{const o=mn(t,e)?q.none():kn(t);return o.bind((e=>s(e,q.some(t))))}));return s(t,q.none())};const yj=(e,t,o)=>{const n=an.fromDom(e);const s=hn(n);const r=an.fromPoint(s,t,o).filter((e=>gn(n,e)));const a=r.getOr(n);return hj(n,a,t,o)};const bj=(e,t,o)=>yj(e,t,o).filter((e=>Bf(e.node))).map((e=>mj(e,t)));const vj=e=>{const t=e.getBoundingClientRect();const o=e.ownerDocument;const n=o.documentElement;const s=o.defaultView;return{top:t.top+s.pageYOffset-n.clientTop,left:t.left+s.pageXOffset-n.clientLeft}};const kj=e=>e.inline?vj(e.getBody()):{left:0,top:0};const wj=e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}};const _j=e=>{const t=e.getBody(),o=e.getDoc().documentElement;const n={left:t.scrollLeft,top:t.scrollTop};const s={left:t.scrollLeft||o.scrollLeft,top:t.scrollTop||o.scrollTop};return e.inline?n:s};const xj=(e,t)=>{if(t.target.ownerDocument!==e.getDoc()){const o=vj(e.getContentAreaContainer());const n=_j(e);return{left:t.pageX-o.left+n.left,top:t.pageY-o.top+n.top}}return{left:t.pageX,top:t.pageY}};const zj=(e,t,o)=>({pageX:o.left-e.left+t.left,pageY:o.top-e.top+t.top});const Cj=(e,t)=>zj(kj(e),wj(e),xj(e,t));const Sj=Zs,Tj=Qs;const Oj=(e,t)=>Sj(t)&&t!==e;const Ej=(e,t,o)=>{if(t===o||e.dom.isChildOf(t,o)){return false}return!Sj(t)};const Dj=e=>{const t=e.cloneNode(true);t.removeAttribute("data-mce-selected");return t};const Aj=(e,t,o,n)=>{const s=e.dom;const r=t.cloneNode(true);s.setStyles(r,{width:o,height:n});s.setAttrib(r,"data-mce-selected",null);const a=s.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});s.setStyles(a,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:o,height:n});s.setStyles(r,{margin:0,boxSizing:"border-box"});a.appendChild(r);return a};const Mj=(e,t)=>{if(e.parentNode!==t){t.appendChild(e)}};const Nj=(e,t,o,n,s,r)=>{let a=0,c=0;e.style.left=t.pageX+"px";e.style.top=t.pageY+"px";if(t.pageX+o>s){a=t.pageX+o-s}if(t.pageY+n>r){c=t.pageY+n-r}e.style.width=o-a+"px";e.style.height=n-c+"px"};const Rj=e=>{if(e&&e.parentNode){e.parentNode.removeChild(e)}};const Bj=e=>e.button===0;const Lj=(e,t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5});const Hj=(e,t)=>o=>{if(Bj(o)){const n=ae(t.dom.getParents(o.target),rl(Sj,Tj)).getOr(null);if(Oj(t.getBody(),n)){const s=t.dom.getPos(n);const r=t.getBody();const a=t.getDoc().documentElement;e.set({element:n,dragging:false,screenX:o.screenX,screenY:o.screenY,maxX:(t.inline?r.scrollWidth:a.offsetWidth)-2,maxY:(t.inline?r.scrollHeight:a.offsetHeight)-2,relX:o.pageX-s.x,relY:o.pageY-s.y,width:n.offsetWidth,height:n.offsetHeight,ghost:Aj(t,n,n.offsetWidth,n.offsetHeight)})}}};const Ij=(e,t)=>{const o=yi(((e,o)=>{t._selectionOverrides.hideFakeCaret();t.selection.placeCaretAt(e,o)}),0);t.on("remove",o.cancel);return n=>e.on((e=>{const s=Math.max(Math.abs(n.screenX-e.screenX),Math.abs(n.screenY-e.screenY));if(!e.dragging&&s>10){const o=t.dispatch("dragstart",{target:e.element});if(o.isDefaultPrevented()){return}e.dragging=true;t.focus()}if(e.dragging){const s=Lj(e,Cj(t,n));Mj(e.ghost,t.getBody());Nj(e.ghost,s,e.width,e.height,e.maxX,e.maxY);o.throttle(n.clientX,n.clientY)}}))};const Pj=e=>{const t=e.getSel().getRangeAt(0);const o=t.startContainer;return o.nodeType===3?o.parentNode:o};const Fj=(e,t)=>o=>{e.on((e=>{if(e.dragging){if(Ej(t,Pj(t.selection),e.element)){const n=Dj(e.element);const s=t.dispatch("drop",{clientX:o.clientX,clientY:o.clientY});if(!s.isDefaultPrevented()){t.undoManager.transact((()=>{Rj(e.element);t.insertContent(t.dom.getOuterHTML(n));t._selectionOverrides.hideFakeCaret()}))}}t.dispatch("dragend")}}));jj(e)};const Vj=(e,t)=>()=>{e.on((e=>{if(e.dragging){t.dispatch("dragend")}}));jj(e)};const jj=e=>{e.on((e=>{Rj(e.ghost)}));e.clear()};const Uj=e=>{const t=hi();const o=Gc.DOM;const n=document;const s=Hj(t,e);const r=Ij(t,e);const a=Fj(t,e);const c=Vj(t,e);e.on("mousedown",s);e.on("mousemove",r);e.on("mouseup",a);o.bind(n,"mousemove",r);o.bind(n,"mouseup",c);e.on("remove",(()=>{o.unbind(n,"mousemove",r);o.unbind(n,"mouseup",c)}));e.on("keydown",(e=>{if(e.keyCode===ah.ESC){c()}}))};const qj=e=>{const t=t=>{if(!t.isDefaultPrevented()){const o=t.dataTransfer;if(o&&(Y(o.types,"Files")||o.files.length>0)){t.preventDefault();if(t.type==="drop"){$E(e,"Dropped file type is not supported")}}}};const o=o=>{if(bb(e,o.target)){t(o)}};const n=()=>{const n=Gc.DOM;const s=e.dom;const r=document;const a=e.inline?e.getBody():e.getDoc();const c=["drop","dragover"];Z(c,(e=>{n.bind(r,e,o);s.bind(a,e,t)}));e.on("remove",(()=>{Z(c,(e=>{n.unbind(r,e,o);s.unbind(a,e,t)}))}))};e.on("init",(()=>{ib.setEditorTimeout(e,n,0)}))};const Wj=e=>{Uj(e);if(Lu(e)){qj(e)}};const $j=e=>{const t=yi((()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const o=GA(e,t,false);e.selection.setRng(o)}}}),0);e.on("focus",(()=>{t.throttle()}));e.on("blur",(()=>{t.cancel()}))};const Gj=e=>{e.on("init",(()=>{e.on("focusin",(t=>{const o=t.target;if(tr(o)){const t=Zw(e.getBody(),o);const n=Zs(t)?t:o;if(e.selection.getNode()!==n){WA(e,n).each((t=>e.selection.setRng(t)))}}}))}))};const Kj=Zs;const Xj=(e,t)=>Zw(e.getBody(),t);const Yj=e=>{const t=e.selection,o=e.dom;const n=o.isBlock;const s=e.getBody();const r=Mf(e,s,n,(()=>Mb(e)));const a="sel-"+o.uniqueId();const c="data-mce-selected";let i;const l=e=>o.hasClass(e,"mce-offscreen-selection");const d=e=>e!==s&&(Kj(e)||tr(e))&&o.isChildOf(e,s);const u=e=>{if(e){t.setRng(e)}};const f=(o,n,s,a=true)=>{const c=e.dispatch("ShowCaret",{target:n,direction:o,before:s});if(c.isDefaultPrevented()){return null}if(a){t.scrollIntoView(n,o===-1)}return r.show(s,n)};const m=e=>{if(e.hasAttribute("data-mce-caret")){ia(e);t.scrollIntoView(e)}};const g=()=>{e.on("click",(t=>{const o=Xj(e,t.target);if(o){if(Kj(o)){t.preventDefault();e.focus()}}}));e.on("blur NewBlock",w);e.on("ResizeWindow FullscreenStateChanged",r.reposition);e.on("tap",(t=>{const o=t.target;const n=Xj(e,o);if(Kj(n)){t.preventDefault();WA(e,n).each(k)}else if(d(o)){WA(e,o).each(k)}}),true);e.on("mousedown",(t=>{const n=t.target;if(n!==s&&n.nodeName!=="HTML"&&!o.isChildOf(n,s)){return}if(LE(e,t.clientX,t.clientY)===false){return}w();x();const r=Xj(e,n);if(Kj(r)){t.preventDefault();WA(e,r).each(k)}else{bj(s,t.clientX,t.clientY).each((o=>{t.preventDefault();const n=f(1,o.node,o.position===aj.Before,false);u(n);if(Rs(r)){r.focus()}else{e.getBody().focus()}}))}}));e.on("keypress",(e=>{if(ah.modifierPressed(e)){return}if(Kj(t.getNode())){e.preventDefault()}}));e.on("GetSelectionRange",(e=>{let t=e.range;if(i){if(!i.parentNode){i=null;return}t=t.cloneRange();t.selectNode(i);e.range=t}}));e.on("SetSelectionRange",(e=>{e.range=y(e.range);const t=k(e.range,e.forward);if(t){e.range=t}}));const n=e=>e.id==="mcepastebin";e.on("AfterSetSelectionRange",(e=>{const t=e.range;const o=t.startContainer.parentNode;if(!h(t)&&!n(o)){x()}if(!l(o)){w()}}));Wj(e);$j(e);Gj(e)};const p=e=>Qr(e)||ra(e)||aa(e);const h=e=>p(e.startContainer)||p(e.endContainer);const y=t=>{const n=e.schema.getVoidElements();const s=o.createRng();const r=t.startContainer;const a=t.startOffset;const c=t.endContainer;const i=t.endOffset;if(Ne(n,r.nodeName.toLowerCase())){if(a===0){s.setStartBefore(r)}else{s.setStartAfter(r)}}else{s.setStart(r,a)}if(Ne(n,c.nodeName.toLowerCase())){if(i===0){s.setEndBefore(c)}else{s.setEndAfter(c)}}else{s.setEnd(c,i)}return s};const b=(n,s)=>{const r=an.fromDom(e.getBody());const c=e.getDoc();const i=gr(r,"#"+a).getOrThunk((()=>{const e=an.fromHtml('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',c);No(e,"id",a);os(r,e);return e}));const l=o.createRng();as(i);rs(i,[an.fromText(jr,c),an.fromDom(s),an.fromText(jr,c)]);l.setStart(i.dom.firstChild,1);l.setEnd(i.dom.lastChild,0);$n(i,{top:o.getPos(n,e.getBody()).y+"px"});Vy(i);const d=t.getSel();d.removeAllRanges();d.addRange(l);return l};const v=t=>{const n=t.cloneNode(true);const s=e.dispatch("ObjectSelected",{target:t,targetClone:n});if(s.isDefaultPrevented()){return null}const r=b(t,s.targetClone);const a=an.fromDom(t);Z(ki(an.fromDom(e.getBody()),"*[data-mce-selected]"),(e=>{if(!mn(a,e)){Io(e,c)}}));if(!o.getAttrib(t,c)){t.setAttribute(c,"1")}i=t;x();return r};const k=(e,t)=>{if(!e){return null}if(e.collapsed){if(!h(e)){const o=t?1:-1;const n=rm(o,s,e);const r=n.getNode(!t);if(Bf(r)){return f(o,r,t?!n.isAtEnd():false,false)}const a=n.getNode(t);if(Bf(a)){return f(o,a,t?false:!n.isAtEnd(),false)}}return null}let n=e.startContainer;let r=e.startOffset;const a=e.endOffset;if(n.nodeType===3&&r===0&&Kj(n.parentNode)){n=n.parentNode;r=o.nodeIndex(n);n=n.parentNode}if(n.nodeType!==1){return null}if(a===r+1&&n===e.endContainer){const e=n.childNodes[r];if(d(e)){return v(e)}}return null};const w=()=>{if(i){i.removeAttribute(c)}gr(an.fromDom(e.getBody()),"#"+a).each(cs);i=null};const _=()=>{r.destroy();i=null};const x=()=>{r.hide()};if(!QT(e)){g()}return{showCaret:f,showBlockCaretContainer:m,hideFakeCaret:x,destroy:_}};const Jj=(e,t,o)=>{if(qs(t)&&(o<0||o>t.data.length)){return[]}const n=[o];let s=t;while(s!==e&&s.parentNode){const e=s.parentNode;for(let t=0;t<e.childNodes.length;t++){if(e.childNodes[t]===s){n.push(t);break}}s=e}return s===e?n.reverse():[]};const Qj=(e,t,o,n,s)=>{const r=Jj(e,t,o);const a=Jj(e,n,s);return{start:r,end:a}};const Zj=(e,t)=>{const o=t.slice();const n=o.pop();const s=se(o,((e,t)=>e.bind((e=>q.from(e.childNodes[t])))),q.some(e));return s.bind((e=>{if(qs(e)&&(n<0||n>e.data.length)){return q.none()}else{return q.some({node:e,offset:n})}}))};const eU=(e,t)=>Zj(e,t.start).bind((({node:o,offset:n})=>Zj(e,t.end).map((({node:e,offset:t})=>{const s=document.createRange();s.setStart(o,n);s.setEnd(e,t);return s}))));const tU=(e,t)=>Qj(e,t.startContainer,t.startOffset,t.endContainer,t.endOffset);const oU=(e,t,o)=>{if(t&&e.isEmpty(t)&&!o(t)){const n=t.parentNode;e.remove(t);oU(e,n,o)}};const nU=(e,t,o,n=true)=>{const s=t.startContainer.parentNode;const r=t.endContainer.parentNode;t.deleteContents();if(n&&!o(t.startContainer)){if(qs(t.startContainer)&&t.startContainer.data.length===0){e.remove(t.startContainer)}if(qs(t.endContainer)&&t.endContainer.data.length===0){e.remove(t.endContainer)}oU(e,s,o);if(s!==r){oU(e,r,o)}}};const sU=(e,t)=>q.from(e.dom.getParent(t.startContainer,e.dom.isBlock));const rU=(e,t,o)=>{const n=ML(t,0,t);n.each((n=>{const s=n.container;RL(s,o.start.length,t).each((o=>{const n=e.createRng();n.setStart(s,0);n.setEnd(o.container,o.offset);nU(e,n,(e=>e===t))}))}))};const aU=(e,t)=>{const o=e.dom;const n=t.pattern;const s=eU(o.getRoot(),t.range).getOrDie("Unable to resolve path range");const r=(e,t)=>{const o=t.get(e);return _(o)&&he(o).exists((e=>Ne(e,"block")))};sU(e,s).each((t=>{if(n.type==="block-format"){if(r(n.format,e.formatter)){e.undoManager.transact((()=>{rU(e.dom,t,n);e.formatter.apply(n.format)}))}}else if(n.type==="block-command"){e.undoManager.transact((()=>{rU(e.dom,t,n);e.execCommand(n.cmd,false,n.value)}))}}));return true};const cU=(e,t)=>{const o=t.replace(jr," ");return ae(e,(e=>t.indexOf(e.start)===0||o.indexOf(e.start)===0))};const iU=(e,t)=>{const o=e.dom;const n=e.selection.getRng();return sU(e,n).filter((t=>{const n=Pd(e);const s=o.is(t,n);return t!==null&&s})).bind((e=>{const n=e.textContent;const s=cU(t,n);return s.map((t=>{if(fo.trim(n).length===t.start.length){return[]}return[{pattern:t,range:Qj(o.getRoot(),e,0,e,0)}]}))})).getOr([])};const lU=(e,t)=>{if(t.length===0){return}const o=e.selection.getBookmark();Z(t,(t=>aU(e,t)));e.selection.moveToBookmark(o)};const dU=(e,t)=>e.create("span",{"data-mce-type":"bookmark",id:t});const uU=(e,t)=>{const o=e.createRng();o.setStartAfter(t.start);o.setEndBefore(t.end);return o};const fU=(e,t,o)=>{const n=eU(e.getRoot(),o).getOrDie("Unable to resolve path range");const s=n.startContainer;const r=n.endContainer;const a=n.endOffset===0?r:r.splitText(n.endOffset);const c=n.startOffset===0?s:s.splitText(n.startOffset);return{prefix:t,end:a.parentNode.insertBefore(dU(e,t+"-end"),a),start:c.parentNode.insertBefore(dU(e,t+"-start"),c)}};const mU=(e,t,o)=>{oU(e,e.get(t.prefix+"-end"),o);oU(e,e.get(t.prefix+"-start"),o)};const gU=e=>e.start.length===0;const pU=e=>(t,o)=>{const n=t.data;const s=n.substring(0,o);const r=s.lastIndexOf(e.charAt(e.length-1));const a=s.lastIndexOf(e);if(a!==-1){return a+e.length}else if(r!==-1){return r+1}else{return-1}};const hU=(e,t,o,n)=>{const s=t.start;const r=BL(e,n.container,n.offset,pU(s),o);return r.bind((n=>{if(n.offset>=s.length){const t=e.createRng();t.setStart(n.container,n.offset-s.length);t.setEnd(n.container,n.offset);return q.some(t)}else{const r=n.offset-s.length;return NL(n.container,r,o).map((t=>{const o=e.createRng();o.setStart(t.container,t.offset);o.setEnd(n.container,n.offset);return o})).filter((e=>e.toString()===s)).orThunk((()=>hU(e,t,o,TL(n.container,0))))}}))};const yU=(e,t,o,n,s,r=false)=>{if(t.start.length===0&&!r){const t=e.createRng();t.setStart(o,n);t.setEnd(o,n);return q.some(t)}return AL(o,n,s).bind((o=>{const n=hU(e,t,s,o);return n.bind((e=>{if(r){if(e.endContainer===o.container&&e.endOffset===o.offset){return q.none()}else if(o.offset===0&&e.endContainer.textContent.length===e.endOffset){return q.none()}}return q.some(e)}))}))};const bU=(e,t,o)=>{const n=e.dom;const s=n.getRoot();const r=o.pattern;const a=o.position.container;const c=o.position.offset;return NL(a,c-o.pattern.end.length,t).bind((i=>{const l=Qj(s,i.container,i.offset,a,c);if(gU(r)){return q.some({matches:[{pattern:r,startRng:l,endRng:l}],position:i})}else{const a=vU(e,o.remainingPatterns,i.container,i.offset,t);const c=a.getOr({matches:[],position:i});const d=c.position;const u=yU(n,r,d.container,d.offset,t,a.isNone());return u.map((e=>{const t=tU(s,e);return{matches:c.matches.concat([{pattern:r,startRng:t,endRng:l}]),position:TL(e.startContainer,e.startOffset)}}))}}))};const vU=(e,t,o,n,s)=>{const r=e.dom;return AL(o,n,r.getRoot()).bind((a=>{const c=r.createRng();c.setStart(s,0);c.setEnd(o,n);const i=c.toString();for(let o=0;o<t.length;o++){const n=t[o];if(!lt(i,n.end)){continue}const r=t.slice();r.splice(o,1);const c=bU(e,s,{pattern:n,remainingPatterns:r,position:a});if(c.isSome()){return c}}return q.none()}))};const kU=(e,t,o)=>{e.selection.setRng(o);if(t.type==="inline-format"){Z(t.format,(t=>{e.formatter.apply(t)}))}else{e.execCommand(t.cmd,false,t.value)}};const wU=(e,t,o,n)=>{const s=uU(e.dom,o);nU(e.dom,s,n);kU(e,t,s)};const _U=(e,t,o,n,s)=>{const r=e.dom;const a=uU(r,n);const c=uU(r,o);nU(r,c,s);nU(r,a,s);const i={prefix:o.prefix,start:o.end,end:n.start};const l=uU(r,i);kU(e,t,l)};const xU=(e,t)=>{const o=Ni("mce_textpattern");const n=ne(t,((t,n)=>{const s=fU(e,o+`_end${t.length}`,n.endRng);return t.concat([{...n,endMarker:s}])}),[]);return ne(n,((t,s)=>{const r=n.length-t.length-1;const a=gU(s.pattern)?s.endMarker:fU(e,o+`_start${r}`,s.startRng);return t.concat([{...s,startMarker:a}])}),[])};const zU=(e,t,o)=>{const n=e.selection.getRng();if(n.collapsed===false){return[]}return sU(e,n).bind((s=>{const r=Math.max(0,n.startOffset-(o?1:0));return vU(e,t,n.startContainer,r,s)})).fold((()=>[]),(e=>e.matches))};const CU=(e,t)=>{if(t.length===0){return}const o=e.dom;const n=e.selection.getBookmark();const s=xU(o,t);Z(s,(t=>{const n=o.getParent(t.startMarker.start,o.isBlock);const s=e=>e===n;if(gU(t.pattern)){wU(e,t.pattern,t.endMarker,s)}else{_U(e,t.pattern,t.startMarker,t.endMarker,s)}mU(o,t.endMarker,s);mU(o,t.startMarker,s)}));e.selection.moveToBookmark(n)};const SU=e=>e.inlinePatterns.length>0||e.blockPatterns.length>0;const TU=(e,t)=>{if(!e.selection.isCollapsed()||!SU(t)){return false}const o=zU(e,t.inlinePatterns,false);const n=iU(e,t.blockPatterns);if(n.length>0||o.length>0){e.undoManager.add();e.undoManager.extra((()=>{e.execCommand("mceInsertNewLine")}),(()=>{e.insertContent(Vr);CU(e,o);lU(e,n);const t=e.selection.getRng();const s=AL(t.startContainer,t.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine");s.each((t=>{const o=t.container;if(o.data.charAt(t.offset-1)===Vr){o.deleteData(t.offset-1,1);oU(e.dom,o.parentNode,(t=>t===e.dom.getRoot()))}}))}));return true}return false};const OU=(e,t)=>{if(t.length>0){const o=zU(e,t,true);if(o.length>0){e.undoManager.transact((()=>{CU(e,o)}))}}};const EU=(e,t,o)=>{for(let n=0;n<e.length;n++){if(o(e[n],t)){return true}}return false};const DU=(e,t)=>EU(e,t,((e,t)=>e===t.keyCode&&ah.modifierPressed(t)===false));const AU=(e,t)=>EU(e,t,((e,t)=>e.charCodeAt(0)===t.charCode));const MU=e=>{const t=[",",".",";",":","!","?"];const o=[32];const n=()=>wd(sf(e));const s=()=>kd(sf(e));e.on("keydown",(t=>{if(t.keyCode===13&&!ah.modifierPressed(t)){if(TU(e,n())){t.preventDefault()}}}),true);e.on("keyup",(t=>{if(DU(o,t)){OU(e,s())}}));e.on("keypress",(o=>{if(AU(t,o)){ib.setEditorTimeout(e,(()=>{OU(e,s())}))}}))};const NU=e=>{MU(e)};const RU=e=>{const t=fo.each;const o=ah.BACKSPACE,n=ah.DELETE,s=e.dom,r=e.selection,a=e.parser;const c=eo.browser;const i=c.isFirefox();const l=c.isChromium()||c.isSafari();const d=eo.deviceType.isiPhone()||eo.deviceType.isiPad();const u=eo.os.isMacOS()||eo.os.isiOS();const f=(t,o)=>{try{e.getDoc().execCommand(t,false,o)}catch(e){}};const m=e=>e.isDefaultPrevented();const g=()=>{const t=e=>{const t=s.create("body");const o=e.cloneContents();t.appendChild(o);return r.serializer.serialize(t,{format:"html"})};const a=o=>{const n=t(o);const r=s.createRng();r.selectNode(e.getBody());const a=t(r);return n===a};e.on("keydown",(t=>{const r=t.keyCode;let c,i;if(!m(t)&&(r===n||r===o)){c=e.selection.isCollapsed();i=e.getBody();if(c&&!s.isEmpty(i)){return}if(!c&&!a(e.selection.getRng())){return}t.preventDefault();e.setContent("");if(i.firstChild&&s.isBlock(i.firstChild)){e.selection.setCursorLocation(i.firstChild,0)}else{e.selection.setCursorLocation(i,0)}e.nodeChanged()}}))};const p=()=>{e.shortcuts.add("meta+a",null,"SelectAll")};const h=()=>{if(!e.inline){s.bind(e.getDoc(),"mousedown mouseup",(t=>{let o;if(t.target===e.getDoc().documentElement){o=r.getRng();e.getBody().focus();if(t.type==="mousedown"){if(Qr(o.startContainer)){return}r.placeCaretAt(t.clientX,t.clientY)}else{r.setRng(o)}}}))}};const y=()=>{e.on("keydown",(t=>{if(!m(t)&&t.keyCode===o){if(!e.getBody().getElementsByTagName("hr").length){return}if(r.isCollapsed()&&r.getRng().startOffset===0){const e=r.getNode();const o=e.previousSibling;if(e.nodeName==="HR"){s.remove(e);t.preventDefault();return}if(o&&o.nodeName&&o.nodeName.toLowerCase()==="hr"){s.remove(o);t.preventDefault()}}}}))};const b=()=>{if(!Range.prototype.getClientRects){e.on("mousedown",(t=>{if(!m(t)&&t.target.nodeName==="HTML"){const t=e.getBody();t.blur();ib.setEditorTimeout(e,(()=>{t.focus()}))}}))}};const v=()=>{const t=Pu(e);e.on("click",(o=>{const n=o.target;if(/^(IMG|HR)$/.test(n.nodeName)&&s.getContentEditableParent(n)!=="false"){o.preventDefault();e.selection.select(n);e.nodeChanged()}if(n.nodeName==="A"&&s.hasClass(n,t)&&n.childNodes.length===0){o.preventDefault();r.select(n)}}))};const k=()=>{const o=()=>{const o=s.getAttribs(r.getStart().cloneNode(false));return()=>{const n=r.getStart();if(n!==e.getBody()){s.setAttrib(n,"style",null);t(o,(e=>{n.setAttributeNode(e.cloneNode(true))}))}}};const n=()=>!r.isCollapsed()&&s.getParent(r.getStart(),s.isBlock)!==s.getParent(r.getEnd(),s.isBlock);e.on("keypress",(t=>{let s;if(!m(t)&&(t.keyCode===8||t.keyCode===46)&&n()){s=o();e.getDoc().execCommand("delete",false,null);s();t.preventDefault();return false}}));s.bind(e.getDoc(),"cut",(t=>{let s;if(!m(t)&&n()){s=o();ib.setEditorTimeout(e,(()=>{s()}))}}))};const w=()=>{e.on("keydown",(e=>{if(!m(e)&&e.keyCode===o){if(r.isCollapsed()&&r.getRng().startOffset===0){const t=r.getNode().previousSibling;if(t&&t.nodeName&&t.nodeName.toLowerCase()==="table"){e.preventDefault();return false}}}}))};const _=()=>{e.on("keydown",(t=>{let o,n;if(m(t)||t.keyCode!==ah.BACKSPACE){return}o=r.getRng();const a=o.startContainer;const c=o.startOffset;const i=s.getRoot();n=a;if(!o.collapsed||c!==0){return}while(n&&n.parentNode&&n.parentNode.firstChild===n&&n.parentNode!==i){n=n.parentNode}if(n.tagName==="BLOCKQUOTE"){e.formatter.toggle("blockquote",null,n);o=s.createRng();o.setStart(a,0);o.setEnd(a,0);r.setRng(o)}}))};const x=()=>{const t=()=>{f("StyleWithCSS",false);f("enableInlineTableEditing",false);if(!uu(e)){f("enableObjectResizing",false)}};if(!Mu(e)){e.on("BeforeExecCommand mousedown",t)}};const z=()=>{const o=()=>{t(s.select("a"),(e=>{let t=e.parentNode;const o=s.getRoot();if(t.lastChild===e){while(t&&!s.isBlock(t)){if(t.parentNode.lastChild!==t||t===o){return}t=t.parentNode}s.add(t,"br",{"data-mce-bogus":1})}}))};e.on("SetContent ExecCommand",(e=>{if(e.type==="setcontent"||e.command==="mceInsertLink"){o()}}))};const C=()=>{e.on("init",(()=>{f("DefaultParagraphSeparator",Pd(e))}))};const S=()=>{e.on("keyup focusin mouseup",(e=>{if(!ah.modifierPressed(e)){r.normalize()}}),true)};const T=()=>{e.contentStyles.push("img:-moz-broken {"+"-moz-force-broken-image-icon:1;"+"min-width:24px;"+"min-height:24px"+"}")};const O=()=>{if(!e.inline){e.on("keydown",(()=>{if(document.activeElement===document.body){e.getWin().focus()}}))}};const E=()=>{if(!e.inline){e.contentStyles.push("body {min-height: 150px}");e.on("click",(t=>{let o;if(t.target.nodeName==="HTML"){o=e.selection.getRng();e.getBody().focus();e.selection.setRng(o);e.selection.normalize();e.nodeChanged()}}))}};const D=()=>{if(u){e.on("keydown",(t=>{if(ah.metaKeyPressed(t)&&!t.shiftKey&&(t.keyCode===37||t.keyCode===39)){t.preventDefault();const o=e.selection.getSel();o.modify("move",t.keyCode===37?"backward":"forward","lineboundary")}}))}};const M=()=>{e.on("click",(e=>{let t=e.target;do{if(t.tagName==="A"){e.preventDefault();return}}while(t=t.parentNode)}));e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")};const N=()=>{e.on("init",(()=>{e.dom.bind(e.getBody(),"submit",(e=>{e.preventDefault()}))}))};const R=()=>{a.addNodeFilter("br",(e=>{let t=e.length;while(t--){if(e[t].attr("class")==="Apple-interchange-newline"){e[t].remove()}}}))};const B=A;const L=()=>{if(!i||e.removed){return false}const t=e.selection.getSel();return!t||!t.rangeCount||t.rangeCount===0};const H=()=>{if(l){h();v();N();p();if(d){O();E();M()}}if(i){b();x();T();D()}};const I=()=>{_();g();if(!eo.windowsPhone){S()}if(l){h();v();C();N();w();R();if(d){O();E();M()}else{p()}}if(i){y();b();k();x();z();T();D();w()}};if(QT(e)){H()}else{I()}return{refreshContentEditable:B,isHidden:L}};const BU=Gc.DOM;const LU=(e,t)=>{const o=an.fromDom(e.getBody());const n=Hn(Ln(o));const s=an.fromTag("style");No(s,"type","text/css");os(s,an.fromText(t));os(n,s);e.on("remove",(()=>{cs(s)}))};const HU=e=>e.inline?e.getElement().nodeName.toLowerCase():undefined;const IU=e=>Ee(e,(e=>C(e)===false));const PU=e=>{const t=e.options.get;const o=e.editorUpload.blobCache;return IU({allow_conditional_comments:t("allow_conditional_comments"),allow_html_data_urls:t("allow_html_data_urls"),allow_svg_data_urls:t("allow_svg_data_urls"),allow_html_in_named_anchor:t("allow_html_in_named_anchor"),allow_script_urls:t("allow_script_urls"),allow_unsafe_link_target:t("allow_unsafe_link_target"),convert_fonts_to_spans:t("convert_fonts_to_spans"),fix_list_elements:t("fix_list_elements"),font_size_legacy_values:t("font_size_legacy_values"),forced_root_block:t("forced_root_block"),forced_root_block_attrs:t("forced_root_block_attrs"),preserve_cdata:t("preserve_cdata"),remove_trailing_brs:t("remove_trailing_brs"),inline_styles:t("inline_styles"),root_name:HU(e),validate:true,blob_cache:o,document:e.getDoc()})};const FU=e=>{const t=e.options.get;return IU({custom_elements:t("custom_elements"),extended_valid_elements:t("extended_valid_elements"),invalid_elements:t("invalid_elements"),invalid_styles:t("invalid_styles"),schema:t("schema"),valid_children:t("valid_children"),valid_classes:t("valid_classes"),valid_elements:t("valid_elements"),valid_styles:t("valid_styles"),verify_html:t("verify_html")})};const VU=e=>{const t=e.options.get;return{...PU(e),...FU(e),...IU({url_converter:t("url_converter"),url_converter_scope:t("url_converter_scope"),element_format:t("element_format"),entities:t("entities"),entity_encoding:t("entity_encoding"),indent:t("indent"),indent_after:t("indent_after"),indent_before:t("indent_before")})}};const jU=e=>{const t=xS(PU(e),e.schema);t.addAttributeFilter("src,href,style,tabindex",((t,o)=>{let n=t.length,s,r;const a=e.dom;const c="data-mce-"+o;while(n--){s=t[n];r=s.attr(o);if(r&&!s.attr(c)){if(r.indexOf("data:")===0||r.indexOf("blob:")===0){continue}if(o==="style"){r=a.serializeStyle(a.parseStyle(r),s.name);if(!r.length){r=null}s.attr(c,r);s.attr(o,r)}else if(o==="tabindex"){s.attr(c,r);s.attr(o,null)}else{s.attr(c,e.convertURL(r,o,s.name))}}}}));t.addNodeFilter("script",(e=>{let t=e.length;while(t--){const o=e[t];const n=o.attr("type")||"no/type";if(n.indexOf("mce-")!==0){o.attr("type","mce-"+n)}}}));if(e.options.get("preserve_cdata")){t.addNodeFilter("#cdata",(t=>{let o=t.length;while(o--){const n=t[o];n.type=8;n.name="#comment";n.value="[CDATA["+e.dom.encode(n.value)+"]]"}}))}t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(t=>{let o=t.length;const n=e.schema.getNonEmptyElements();while(o--){const e=t[o];if(e.isEmpty(n)&&e.getAll("br").length===0){e.append(new cv("br",1))}}}));return t};const UU=e=>{const t=qu(e);if(t){ib.setEditorTimeout(e,(()=>{let o;if(t===true){o=e}else{o=e.editorManager.get(t)}if(!o.destroyed){o.focus()}}),100)}};const qU=e=>{const t=e.dom.getRoot();if(!e.inline&&(!kp(e)||e.selection.getStart(true)===t)){Hm(t).each((t=>{const o=t.getNode();const n=Vs(o)?Hm(o).getOr(t):t;e.selection.setRng(n.toRange())}))}};const WU=e=>{e.bindPendingEventDelegates();e.initialized=true;Wp(e);e.focus(true);qU(e);e.nodeChanged({initial:true});const t=ju(e);if(O(t)){t.call(e,e)}UU(e)};const $U=e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader;const GU=(e,t,o)=>{const n=[$U(e).loadAll(t)];if(e.inline){return n}else{return n.concat([e.ui.styleSheetLoader.loadAll(o)])}};const KU=e=>{const t=$U(e);const o=iu(e);const n=e.contentCSS;const s=()=>{t.unloadAll(n);if(!e.inline){e.ui.styleSheetLoader.unloadAll(o)}};const r=()=>{if(e.removed){s()}else{e.on("remove",s)}};if(e.contentStyles.length>0){let t="";fo.each(e.contentStyles,(e=>{t+=e+"\r\n"}));e.dom.addStyle(t)}const a=Promise.all(GU(e,n,o)).then(r).catch(r);const c=cu(e);if(c){LU(e,c)}return a};const XU=e=>{const t=e.getDoc(),o=e.getBody();Up(e);if(!Wu(e)){t.body.spellcheck=false;BU.setAttrib(o,"spellcheck","false")}e.quirks=RU(e);qp(e);const n=lu(e);if(n!==undefined){o.dir=n}const s=$u(e);if(s){e.on("BeforeSetContent",(e=>{fo.each(s,(t=>{e.content=e.content.replace(t,(e=>"\x3c!--mce:protected "+escape(e)+"--\x3e"))}))}))}e.on("SetContent",(()=>{e.addVisual(e.getBody())}));e.on("compositionstart compositionend",(t=>{e.composing=t.type==="compositionstart"}))};const YU=e=>{if(!QT(e)){e.load({initial:true,format:"html"})}e.startContent=e.getContent({format:"raw"})};const JU=e=>{if(e.removed!==true){YU(e);WU(e)}};const QU=e=>{const t=e.getElement();let o=e.getDoc();if(e.inline){BU.addClass(t,"mce-content-body");e.contentDocument=o=document;e.contentWindow=window;e.bodyElement=t;e.contentAreaContainer=t}const n=e.getBody();n.disabled=true;e.readonly=Mu(e);if(!e.readonly){if(e.inline&&BU.getStyle(n,"position",true)==="static"){n.style.position="relative"}n.contentEditable="true"}n.disabled=false;e.editorUpload=kD(e);e.schema=_c(FU(e));e.dom=Gc(o,{keep_values:true,url_converter:e.convertURL,url_converter_scope:e,update_styles:true,root_element:e.inline?e.getBody():null,collect:()=>e.inline,schema:e.schema,contentCssCors:eu(e),referrerPolicy:tu(e),onSetAttrib:t=>{e.dispatch("SetAttrib",t)}});e.parser=jU(e);e.serializer=sE(VU(e),e);e.selection=WO(e.dom,e.getWin(),e.serializer,e);e.annotator=Np(e);e.formatter=RD(e);e.undoManager=ID(e);e._nodeChangeDispatcher=new TF(e);e._selectionOverrides=Yj(e);IR(e);oj(e);KR(e);if(!QT(e)){rj(e);NU(e)}const s=SF(e);NR(e,s);qR(e);$D(e);ZV(e);const r=eO(e);XU(e);r.fold((()=>{KU(e).then((()=>JU(e)))}),(t=>{e.setProgressState(true);KU(e).then((()=>{t().then((t=>{e.setProgressState(false);JU(e);OO(e)}),(t=>{e.notificationManager.open({type:"error",text:String(t)});JU(e);OO(e)}))}))}))};const ZU=(e,t)=>{if(!e.inline){e.getElement().style.visibility=e.orgVisibility}if(!t&&!e.inline){const t=e.iframeElement;const o=lD(an.fromDom(t),"load",(()=>{o.unbind();e.contentDocument=t.contentDocument;QU(e)}));t.srcdoc=e.iframeHTML}else{QU(e)}};const eq=Gc.DOM;const tq=(e,t,o,n)=>{const s=an.fromTag("iframe");n.each((e=>No(s,"tabindex",e)));Ro(s,o);Ro(s,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t});Xo(s,"tox-edit-area__iframe");return s};const oq=e=>{let t=Nd(e)+"<html><head>";if(Rd(e)!==e.documentBaseUrl){t+='<base href="'+e.documentBaseURI.getURI()+'" />'}t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const o=Bd(e);const n=Ld(e);const s=e.translate(Fu(e));if(Hd(e)){t+='<meta http-equiv="Content-Security-Policy" content="'+Hd(e)+'" />'}t+="</head>"+`<body id="${o}" class="mce-content-body ${n}" data-id="${e.id}" aria-label="${s}">`+"<br>"+"</body></html>";return t};const nq=(e,t)=>{const o=e.translate("Rich Text Area");const n=Lo(an.fromDom(e.getElement()),"tabindex").bind(yt);const s=tq(e.id,o,Md(e),n).dom;s.onload=()=>{s.onload=null;e.dispatch("load")};e.contentAreaContainer=t.iframeContainer;e.iframeElement=s;e.iframeHTML=oq(e);eq.add(t.iframeContainer,s)};const sq=(e,t)=>{nq(e,t);if(t.editorContainer){eq.get(t.editorContainer).style.display=e.orgDisplay;e.hidden=eq.isHidden(t.editorContainer)}e.getElement().style.display="none";eq.setAttrib(e.id,"aria-hidden","true");ZU(e)};const rq=Gc.DOM;const aq=(e,t,o)=>{const n=VE.get(o);const s=VE.urls[o]||e.documentBaseUrl.replace(/\/$/,"");o=fo.trim(o);if(n&&fo.inArray(t,o)===-1){if(e.plugins[o]){return}try{const r=n(e,s)||{};e.plugins[o]=r;if(O(r.init)){r.init(e,s);t.push(o)}}catch(t){tD(e,o,t)}}};const cq=e=>e.replace(/^\-/,"");const iq=e=>{const t=[];Z(Ru(e),(o=>{aq(e,t,cq(o))}))};const lq=e=>{const t=fo.trim(Kd(e));const o=e.ui.registry.getAll().icons;const n={...CE.get("default").icons,...CE.get(t).icons};xe(n,((t,n)=>{if(!Ne(o,n)){e.ui.registry.addIcon(n,t)}}))};const dq=e=>{const t=hu(e);if(v(t)){const o=jE.get(t);e.theme=o(e,jE.urls[t])||{};if(O(e.theme.init)){e.theme.init(e,jE.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}}else{e.theme={}}};const uq=e=>{const t=bu(e);const o=SE.get(t);e.model=o(e,SE.urls[t])};const fq=e=>e.theme.renderUI();const mq=e=>{const t=e.getElement();const o=hu(e);const n=o(e,t);if(n.editorContainer.nodeType){n.editorContainer.id=n.editorContainer.id||e.id+"_parent"}if(n.iframeContainer&&n.iframeContainer.nodeType){n.iframeContainer.id=n.iframeContainer.id||e.id+"_iframecontainer"}n.height=n.iframeHeight?n.iframeHeight:t.offsetHeight;return n};const gq=e=>({editorContainer:e,iframeContainer:e,api:{}});const pq=e=>{const t=rq.create("div");rq.insertAfter(t,e);return gq(t)};const hq=e=>{const t=e.getElement();return e.inline?gq(null):pq(t)};const yq=e=>{const t=e.getElement();e.orgDisplay=t.style.display;if(v(hu(e))){return fq(e)}else if(O(hu(e))){return mq(e)}else{return hq(e)}};const bq=(e,t)=>{const o={show:q.from(t.show).getOr(A),hide:q.from(t.hide).getOr(A),isEnabled:q.from(t.isEnabled).getOr(U),setEnabled:o=>{if(!e.mode.isReadOnly()){q.from(t.setEnabled).each((e=>e(o)))}}};e.ui={...e.ui,...o}};const vq=e=>{e.dispatch("ScriptsLoaded");lq(e);dq(e);uq(e);iq(e);const t=yq(e);bq(e,q.from(t.api).getOr({}));const o={editorContainer:t.editorContainer,iframeContainer:t.iframeContainer};e.editorContainer=o.editorContainer?o.editorContainer:null;cD(e);if(e.inline){return ZU(e)}else{return sq(e,o)}};const kq=Gc.DOM;const wq=e=>e.charAt(0)==="-";const _q=(e,t)=>{const o=ou(t);const n=nu(t);if(mi.hasCode(o)===false&&o!=="en"){const s=gt(n)?n:`${t.editorManager.baseURL}/langs/${o}.js`;e.add(s).catch((()=>{QE(t,s,o)}))}};const xq=(e,t)=>{const o=hu(e);if(v(o)&&!wq(o)&&!Ne(jE.urls,o)){const n=yu(e);const s=n?e.documentBaseURI.toAbsolute(n):`themes/${o}/theme${t}.js`;jE.load(o,s).catch((()=>{ZE(e,s,o)}))}};const zq=(e,t)=>{const o=bu(e);if(o!=="plugin"&&!Ne(SE.urls,o)){const n=vu(e);const s=v(n)?e.documentBaseURI.toAbsolute(n):`models/${o}/model${t}.js`;SE.load(o,s).catch((()=>{eD(e,s,o)}))}};const Cq=e=>q.from(Xd(e)).filter(gt).map((e=>({url:e,name:q.none()})));const Sq=(e,t,o)=>q.from(t).filter((e=>gt(e)&&!CE.has(e))).map((t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${o}.js`,name:q.some(t)})));const Tq=(e,t,o)=>{const n=Sq(t,"default",o);const s=Cq(t).orThunk((()=>Sq(t,Kd(t),"")));Z(go([n,s]),(o=>{e.add(o.url).catch((()=>{JE(t,o.url,o.name.getOrUndefined())}))}))};const Oq=(e,t)=>{const o=(t,o)=>{VE.load(t,o).catch((()=>{YE(e,o,t)}))};xe(Bu(e),((t,n)=>{o(n,t);e.options.set("plugins",Ru(e).concat(n))}));Z(Ru(e),(e=>{e=fo.trim(e);if(e&&!VE.urls[e]&&!wq(e)){o(e,`plugins/${e}/plugin${t}.js`)}}))};const Eq=e=>{const t=hu(e);return!v(t)||T(jE.get(t))};const Dq=e=>{const t=bu(e);return T(SE.get(t))};const Aq=(e,t)=>{const o=Zc.ScriptLoader;const n=()=>{if(!e.removed&&Eq(e)&&Dq(e)){vq(e)}};xq(e,t);zq(e,t);_q(o,e);Tq(o,e,t);Oq(e,t);o.loadQueue().then(n,n)};const Mq=(e,t)=>br.forElement(e,{contentCssCors:Nu(t),referrerPolicy:tu(t)});const Nq=e=>{const t=e.id;mi.setCode(ou(e));const o=()=>{kq.unbind(window,"ready",o);e.render()};if(!Hc.Event.domLoaded){kq.bind(window,"ready",o);return}if(!e.getElement()){return}const n=an.fromDom(e.getElement());const s=Fo(n);e.on("remove",(()=>{ee(n.dom.attributes,(e=>Io(n,e.name)));Ro(n,s)}));e.ui.styleSheetLoader=Mq(n,e);if(!Cu(e)){e.orgVisibility=e.getElement().style.visibility;e.getElement().style.visibility="hidden"}else{e.inline=true}const r=e.getElement().form||kq.getParent(t,"form");if(r){e.formElement=r;if(Su(e)&&!Us(e.getElement())){kq.insertAfter(kq.create("input",{type:"hidden",name:t}),t);e.hasHiddenInput=true}e.formEventDelegate=t=>{e.dispatch(t.type,t)};kq.bind(r,"submit reset",e.formEventDelegate);e.on("reset",(()=>{e.resetContent()}));if(Tu(e)&&!r.submit.nodeType&&!r.submit.length&&!r._mceOldSubmit){r._mceOldSubmit=r.submit;r.submit=()=>{e.editorManager.triggerSave();e.setDirty(false);return r._mceOldSubmit(r)}}}e.windowManager=qE(e);e.notificationManager=FE(e);if(uf(e)){e.on("GetContent",(e=>{if(e.save){e.content=kq.encode(e.content)}}))}if(Ou(e)){e.on("submit",(()=>{if(e.initialized){e.save()}}))}if(Eu(e)){e._beforeUnload=()=>{if(e.initialized&&!e.destroyed&&!e.isHidden()){e.save({format:"raw",no_events:true,set_dirty:false})}};e.editorManager.on("BeforeUnload",e._beforeUnload)}e.editorManager.add(e);Aq(e,e.suffix)};const Rq=(e,t)=>({sections:R(e),options:R(t)});const Bq=Gt().deviceType;const Lq=Bq.isPhone();const Hq=Bq.isTablet();const Iq=e=>{if(S(e)){return[]}else{const t=_(e)?e:e.split(/[ ,]/);const o=Q(t,ut);return oe(o,gt)}};const Pq=(e,t)=>{const o=Oe(t,((t,o)=>Y(e,o)));return Rq(o.t,o.f)};const Fq=(e,t,o={})=>{const n=e.sections();const s=Me(n,t).getOr({});return fo.extend({},o,s)};const Vq=(e,t)=>Ne(e.sections(),t);const jq=(e,t)=>Vq(e,t)?e.sections()[t]:{};const Uq=(e,t)=>{const o={table_grid:false,object_resizing:false,resize:false,toolbar_mode:Me(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:false};const n={menubar:false};return{...o,...t?n:{}}};const qq=(e,t)=>{var o;const n=(o=t.external_plugins)!==null&&o!==void 0?o:{};if(e&&e.external_plugins){return fo.extend({},e.external_plugins,n)}else{return n}};const Wq=(e,t)=>[].concat(Iq(e)).concat(Iq(t));const $q=(e,t,o,n)=>{if(e&&Vq(t,"mobile")){return n}else{return o}};const Gq=(e,t,o,n)=>{const s=Iq(o.forced_plugins);const r=Iq(n.plugins);const a=jq(t,"mobile");const c=a.plugins?Iq(a.plugins):r;const i=$q(e,t,r,c);const l=Wq(s,i);return fo.extend(n,{forced_plugins:s,plugins:l})};const Kq=(e,t)=>e&&Vq(t,"mobile");const Xq=(e,t,o,n,s)=>{var r;const a=e?{mobile:Uq((r=s.mobile)!==null&&r!==void 0?r:{},t)}:{};const c=Pq(["mobile"],_H(a,s));const i=fo.extend(o,n,c.options(),Kq(e,c)?Fq(c,"mobile"):{},{external_plugins:qq(n,c.options())});return Gq(e,c,n,i)};const Yq=(e,t)=>Xq(Lq||Hq,Lq,t,e,t);const Jq=(e,t)=>TO(e,t);const Qq=e=>{const t=(t,o)=>{e.formatter.toggle(t,o);e.nodeChanged()};const o=o=>()=>{Z("left,center,right,justify".split(","),(t=>{if(o!==t){e.formatter.remove("align"+t)}}));if(o!=="none"){t("align"+o)}};e.editorCommands.addCommands({JustifyLeft:o("left"),JustifyCenter:o("center"),JustifyRight:o("right"),JustifyFull:o("justify"),JustifyNone:o("none")})};const Zq=e=>{const t=t=>()=>{const o=e.selection;const n=o.isCollapsed()?[e.dom.getParent(o.getNode(),e.dom.isBlock)]:o.getSelectedBlocks();return J(n,(o=>T(e.formatter.matchNode(o,t))))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")};const eW=e=>{Qq(e);Zq(e)};const tW=e=>{e.editorCommands.addCommands({"Cut,Copy,Paste":t=>{const o=e.getDoc();let n;try{o.execCommand(t)}catch(e){n=true}if(t==="paste"&&!o.queryCommandEnabled(t)){n=true}if(n||!o.queryCommandSupported(t)){let t=e.translate(`Your browser doesn't support direct access to the clipboard. `+"Please use the Ctrl+X/C/V keyboard shortcuts instead.");if(eo.os.isMacOS()||eo.os.isiOS()){t=t.replace(/Ctrl\+/g,"⌘+")}e.notificationManager.open({text:t,type:"error"})}}})};const oW=(e,t,o)=>{const n=an.fromDom(e.getRoot());if(_k(n,Tl.fromRangeStart(t))){o=o.replace(/^ /," ")}else{o=o.replace(/^ /," ")}if(zk(n,Tl.fromRangeEnd(t))){o=o.replace(/( | )(<br( \/)>)?$/," ")}else{o=o.replace(/ (<br( \/)?>)?$/," ")}return o};const nW=e=>{if(typeof e!=="string"){const t=fo.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}};const sW=(e,t)=>{const o=e.selection;const n=e.dom;if(/^ | $/.test(t)){return oW(n,o.getRng(),t)}else{return t}};const rW=(e,t)=>{const{content:o,details:n}=nW(t);OS(e,{content:sW(e,o),format:"html",set:false,selection:true,paste:n.paste}).each((t=>{const o=CO(e,t.content,n);ES(e,o,t);e.addVisual()}))};const aW=e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent());e.selection.moveToBookmark(t)},insertImage:(t,o,n)=>{rW(e,e.dom.createHTML("img",{src:n}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",false,"<hr>")},insertText:(t,o,n)=>{rW(e,e.dom.encode(n))},insertHTML:(t,o,n)=>{rW(e,n)},mceInsertContent:(t,o,n)=>{rW(e,n)},mceSetContent:(t,o,n)=>{e.setContent(n)},mceReplaceContent:(t,o,n)=>{e.execCommand("mceInsertContent",false,n.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent("")}})};const cW={"font-size":"size","font-family":"face"};const iW=(e,t,o)=>{const n=t=>Xn(t,e).orThunk((()=>{if(xo(t)==="font"){return Me(cW,e).bind((e=>Lo(t,e)))}else{return q.none()}}));const s=e=>mn(an.fromDom(t),e);return sx(an.fromDom(o),(e=>n(e)),s)};const lW=e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",");const dW=(e,t)=>q.from(Gc.DOM.getStyle(t,e,true));const uW=e=>(t,o)=>q.from(o).map(an.fromDom).filter(To).bind((o=>iW(e,t,o.dom).or(dW(e,o.dom)))).getOr("");const fW=uW("font-size");const mW=M(lW,uW("font-family"));const gW=e=>Hm(e.getBody()).map((e=>{const t=e.container();return qs(t)?t.parentNode:t}));const pW=e=>q.from(e.selection.getRng()).bind((t=>{const o=e.getBody();const n=t.startContainer===o&&t.startOffset===0;return n?q.none():q.from(e.selection.getStart(true))}));const hW=(e,t)=>pW(e).orThunk(H(gW,e)).map(an.fromDom).filter(To).bind(t);const yW=(e,t)=>hW(e,N(q.some,t));const bW=(e,t)=>{if(/^[0-9.]+$/.test(t)){const o=parseInt(t,10);if(o>=1&&o<=7){const n=lf(e);const s=df(e);if(s){return s[o-1]||t}else{return n[o-1]||t}}else{return t}}else{return t}};const vW=e=>{const t=e.split(/\s*,\s*/);return Q(t,(e=>{if(e.indexOf(" ")!==-1&&!(it(e,'"')||it(e,`'`))){return`'${e}'`}else{return e}})).join(",")};const kW=(e,t)=>{const o=bW(e,t);e.formatter.toggle("fontname",{value:vW(o)});e.nodeChanged()};const wW=e=>yW(e,(t=>mW(e.getBody(),t.dom))).getOr("");const _W=(e,t)=>{e.formatter.toggle("fontsize",{value:bW(e,t)});e.nodeChanged()};const xW=e=>yW(e,(t=>fW(e.getBody(),t.dom))).getOr("");const zW=e=>yW(e,(t=>{const o=an.fromDom(e.getBody());const n=sx(t,(e=>Xn(e,"line-height")),H(mn,o));const s=()=>{const e=parseFloat(Gn(t,"line-height"));const o=parseFloat(Gn(t,"font-size"));return String(e/o)};return n.getOrThunk(s)})).getOr("");const CW=(e,t)=>{e.formatter.toggle("lineheight",{value:String(t)});e.nodeChanged()};const SW=e=>{const t=(t,o)=>{e.formatter.toggle(t,o);e.nodeChanged()};e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>{t(e)},"ForeColor,HiliteColor":(e,o,n)=>{t(e,{value:n})},BackColor:(e,o,n)=>{t("hilitecolor",{value:n})},FontName:(t,o,n)=>{kW(e,n)},FontSize:(t,o,n)=>{_W(e,n)},LineHeight:(t,o,n)=>{CW(e,n)},Lang:(e,o,n)=>{t(e,{value:n.code,customValue:n.customCode})},RemoveFormat:t=>{e.formatter.remove(t)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(e,o,n)=>{t(v(n)?n:"p")},mceToggleFormat:(e,o,n)=>{t(n)}})};const TW=e=>{const t=t=>e.formatter.match(t);e.editorCommands.addCommands({"Bold,Italic,Underline,Strikethrough,Superscript,Subscript":e=>t(e),mceBlockQuote:()=>t("blockquote")},"state");e.editorCommands.addQueryValueHandler("FontName",(()=>wW(e)));e.editorCommands.addQueryValueHandler("FontSize",(()=>xW(e)));e.editorCommands.addQueryValueHandler("LineHeight",(()=>zW(e)))};const OW=e=>{SW(e);TW(e)};const EW=e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})};const DW=e=>{e.editorCommands.addCommands({Indent:()=>{TR(e)},Outdent:()=>{OR(e)}});e.editorCommands.addCommands({Outdent:()=>_R(e)},"state")};const AW=e=>{const t=(t,o,n)=>{const s=v(n)?{href:n}:n;const r=e.dom.getParent(e.selection.getNode(),"a");if(k(s)&&v(s.href)){s.href=s.href.replace(/ /g,"%20");if(!r||!s.href){e.formatter.remove("link")}if(s.href){e.formatter.apply("link",s,r)}}};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");if(t){e.dom.remove(t,true)}return}e.formatter.remove("link")},mceInsertLink:t,createLink:t})};const MW=e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{e.getDoc().execCommand(t);const o=e.dom.getParent(e.selection.getNode(),"ol,ul");if(o){const t=o.parentNode;if(/^(H[1-6]|P|ADDRESS|PRE)$/.test(t.nodeName)){const n=e.selection.getBookmark();e.dom.split(t,o);e.selection.moveToBookmark(n)}}}})};const NW=e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList":t=>{const o=e.dom.getParent(e.selection.getNode(),"ul,ol");return o&&(t==="insertunorderedlist"&&o.tagName==="UL"||t==="insertorderedlist"&&o.tagName==="OL")}},"state")};const RW=e=>{MW(e);NW(e)};const BW=e=>{e.editorCommands.addCommands({insertParagraph:()=>{oF(e)},mceInsertNewLine:(t,o,n)=>{oF(e,n)},InsertLineBreak:(t,o,n)=>{FP(e,n)}})};const LW=e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t,o,n)=>{let s=0;e.dom.getParent(e.selection.getNode(),(t=>{if(t.nodeType===1&&s++===n){e.selection.select(t);return false}}),e.getBody())},mceSelectNode:(t,o,n)=>{e.selection.select(n)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),Qs);if(t){const o=e.dom.createRng();o.selectNodeContents(t);e.selection.setRng(o)}}})};const HW=e=>{e.editorCommands.addCommands({mceRemoveNode:(t,o,n)=>{const s=n!==null&&n!==void 0?n:e.selection.getNode();if(s!==e.getBody()){const t=e.selection.getBookmark();e.dom.remove(s,true);e.selection.moveToBookmark(t)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t,o,n)=>{Lb(e,n)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual;e.addVisual()}})};const IW=e=>{eW(e);tW(e);EW(e);LW(e);aW(e);AW(e);DW(e);BW(e);RW(e);OW(e);HW(e)};class PW{constructor(e){this.commands={state:{},exec:{},value:{}};this.editor=e}execCommand(e,t,o,n){const s=this.editor;const r=e.toLowerCase();const a=n===null||n===void 0?void 0:n.skip_focus;if(s.removed){return false}if(r!=="mcefocus"){if(!/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(r)&&!a){s.focus()}else{nb(s)}}const c=s.dispatch("BeforeExecCommand",{command:e,ui:t,value:o});if(c.isDefaultPrevented()){return false}const i=this.commands.exec[r];if(O(i)){i(r,t,o);s.dispatch("ExecCommand",{command:e,ui:t,value:o});return true}return false}queryCommandState(e){if(this.editor.quirks.isHidden()||this.editor.removed){return false}const t=e.toLowerCase();const o=this.commands.state[t];if(O(o)){return o(t)}return false}queryCommandValue(e){if(this.editor.quirks.isHidden()||this.editor.removed){return""}const t=e.toLowerCase();const o=this.commands.value[t];if(O(o)){return o(t)}return""}addCommands(e,t="exec"){const o=this.commands;xe(e,((e,n)=>{Z(n.toLowerCase().split(","),(n=>{o[t][n]=e}))}))}addCommand(e,t,o){const n=e.toLowerCase();this.commands.exec[n]=(e,n,s)=>t.call(o!==null&&o!==void 0?o:this.editor,n,s)}queryCommandSupported(e){const t=e.toLowerCase();if(this.commands.exec[t]){return true}return false}addQueryStateHandler(e,t,o){this.commands.state[e.toLowerCase()]=()=>t.call(o!==null&&o!==void 0?o:this.editor)}addQueryValueHandler(e,t,o){this.commands.value[e.toLowerCase()]=()=>t.call(o!==null&&o!==void 0?o:this.editor)}}const FW="data-mce-contenteditable";const VW=(e,t,o)=>{if(Zo(e,t)&&o===false){Jo(e,t)}else if(o){Xo(e,t)}};const jW=(e,t,o)=>{try{e.getDoc().execCommand(t,false,String(o))}catch(e){}};const UW=(e,t)=>{e.dom.contentEditable=t?"true":"false"};const qW=e=>{Z(ki(e,'*[contenteditable="true"]'),(e=>{No(e,FW,"true");UW(e,false)}))};const WW=e=>{Z(ki(e,`*[${FW}="true"]`),(e=>{Io(e,FW);UW(e,true)}))};const $W=e=>{q.from(e.selection.getNode()).each((e=>{e.removeAttribute("data-mce-selected")}))};const GW=e=>{e.selection.setRng(e.selection.getRng())};const KW=(e,t)=>{const o=an.fromDom(e.getBody());VW(o,"mce-content-readonly",t);if(t){e.selection.controlSelection.hideResizeRect();e._selectionOverrides.hideFakeCaret();$W(e);e.readonly=true;UW(o,false);qW(o)}else{e.readonly=false;UW(o,true);WW(o);jW(e,"StyleWithCSS",false);jW(e,"enableInlineTableEditing",false);jW(e,"enableObjectResizing",false);if(Nb(e)){e.focus()}GW(e);e.nodeChanged()}};const XW=e=>e.readonly;const YW=e=>{e.parser.addAttributeFilter("contenteditable",(t=>{if(XW(e)){Z(t,(e=>{e.attr(FW,e.attr("contenteditable"));e.attr("contenteditable","false")}))}}));e.serializer.addAttributeFilter(FW,(t=>{if(XW(e)){Z(t,(e=>{e.attr("contenteditable",e.attr(FW))}))}}));e.serializer.addTempAttr(FW)};const JW=e=>{if(e.serializer){YW(e)}else{e.on("PreInit",(()=>{YW(e)}))}};const QW=e=>e.type==="click";const ZW=(e,t)=>{const o=t=>mn(t,an.fromDom(e.getBody()));return pr(t,"a",o).bind((e=>Lo(e,"href")))};const e$=(e,t)=>{if(QW(t)&&!ah.metaKeyPressed(t)){const o=an.fromDom(t.target);ZW(e,o).each((o=>{t.preventDefault();if(/^#/.test(o)){const t=e.dom.select(`${o},[name="${at(o,"#")}"]`);if(t.length){e.selection.scrollIntoView(t[0],true)}}else{window.open(o,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}}))}};const t$=e=>{e.on("ShowCaret",(t=>{if(XW(e)){t.preventDefault()}}));e.on("ObjectSelected",(t=>{if(XW(e)){t.preventDefault()}}))};const o$=fo.makeMap("focus blur focusin focusout click dblclick mousedown mouseup mousemove mouseover beforepaste paste cut copy selectionchange "+"mouseout mouseenter mouseleave wheel keydown keypress keyup input beforeinput contextmenu dragstart dragend dragover "+"draggesture dragdrop drop drag submit "+"compositionstart compositionend compositionupdate touchstart touchmove touchend touchcancel"," ");class n${constructor(e){this.bindings={};this.settings=e||{};this.scope=this.settings.scope||this;this.toggleEvent=this.settings.toggleEvent||j}static isNative(e){return!!o$[e.toLowerCase()]}fire(e,t){return this.dispatch(e,t)}dispatch(e,t){const o=e.toLowerCase();const n=Ec(o,t!==null&&t!==void 0?t:{},this.scope);if(this.settings.beforeFire){this.settings.beforeFire(n)}const s=this.bindings[o];if(s){for(let e=0,t=s.length;e<t;e++){const t=s[e];if(t.removed){continue}if(t.once){this.off(o,t.func)}if(n.isImmediatePropagationStopped()){return n}if(t.func.call(this.scope,n)===false){n.preventDefault();return n}}}return n}on(e,t,o,n){if(t===false){t=j}if(t){const s={func:t,removed:false};if(n){fo.extend(s,n)}const r=e.toLowerCase().split(" ");let a=r.length;while(a--){const e=r[a];let t=this.bindings[e];if(!t){t=[];this.toggleEvent(e,true)}if(o){t=[s,...t]}else{t=[...t,s]}this.bindings[e]=t}}return this}off(e,t){if(e){const o=e.toLowerCase().split(" ");let n=o.length;while(n--){const s=o[n];let r=this.bindings[s];if(!s){xe(this.bindings,((e,t)=>{this.toggleEvent(t,false);delete this.bindings[t]}));return this}if(r){if(!t){r.length=0}else{const e=te(r,(e=>e.func===t));r=e.fail;this.bindings[s]=r;Z(e.pass,(e=>{e.removed=true}))}if(!r.length){this.toggleEvent(e,false);delete this.bindings[s]}}}}else{xe(this.bindings,((e,t)=>{this.toggleEvent(t,false)}));this.bindings={}}return this}once(e,t,o){return this.on(e,t,o,{once:true})}has(e){e=e.toLowerCase();return!(!this.bindings[e]||this.bindings[e].length===0)}}const s$=e=>{if(!e._eventDispatcher){e._eventDispatcher=new n$({scope:e,toggleEvent:(t,o)=>{if(n$.isNative(t)&&e.toggleNativeEvent){e.toggleNativeEvent(t,o)}}})}return e._eventDispatcher};const r$={fire(e,t,o){return this.dispatch(e,t,o)},dispatch(e,t,o){const n=this;if(n.removed&&e!=="remove"&&e!=="detach"){return Ec(e.toLowerCase(),t!==null&&t!==void 0?t:{},n)}const s=s$(n).dispatch(e,t);if(o!==false&&n.parent){let t=n.parent();while(t&&!s.isPropagationStopped()){t.dispatch(e,s,false);t=t.parent()}}return s},on(e,t,o){return s$(this).on(e,t,o)},off(e,t){return s$(this).off(e,t)},once(e,t){return s$(this).once(e,t)},hasEventListeners(e){return s$(this).has(e)}};const a$=Gc.DOM;let c$;const i$=(e,t)=>{if(t==="selectionchange"){return e.getDoc()}if(!e.inline&&/^mouse|touch|click|contextmenu|drop|dragover|dragend/.test(t)){return e.getDoc().documentElement}const o=gu(e);if(o){if(!e.eventRoot){e.eventRoot=a$.select(o)[0]}return e.eventRoot}return e.getBody()};const l$=e=>!e.hidden&&!XW(e);const d$=(e,t,o)=>{if(l$(e)){e.dispatch(t,o)}else if(XW(e)){e$(e,o)}};const u$=(e,t)=>{let o;if(!e.delegates){e.delegates={}}if(e.delegates[t]||e.removed){return}const n=i$(e,t);if(gu(e)){if(!c$){c$={};e.editorManager.on("removeEditor",(()=>{if(!e.editorManager.activeEditor){if(c$){xe(c$,((t,o)=>{e.dom.unbind(i$(e,o))}));c$=null}}}))}if(c$[t]){return}o=o=>{const n=o.target;const s=e.editorManager.get();let r=s.length;while(r--){const e=s[r].getBody();if(e===n||a$.isChildOf(n,e)){d$(s[r],t,o)}}};c$[t]=o;a$.bind(n,t,o)}else{o=o=>{d$(e,t,o)};a$.bind(n,t,o);e.delegates[t]=o}};const f$={...r$,bindPendingEventDelegates(){const e=this;fo.each(e._pendingNativeEvents,(t=>{u$(e,t)}))},toggleNativeEvent(e,t){const o=this;if(e==="focus"||e==="blur"){return}if(o.removed){return}if(t){if(o.initialized){u$(o,e)}else{if(!o._pendingNativeEvents){o._pendingNativeEvents=[e]}else{o._pendingNativeEvents.push(e)}}}else if(o.initialized){o.dom.unbind(i$(o,e),e,o.delegates[e]);delete o.delegates[e]}},unbindAllNativeEvents(){const e=this;const t=e.getBody();const o=e.dom;if(e.delegates){xe(e.delegates,((t,o)=>{e.dom.unbind(i$(e,o),o,t)}));delete e.delegates}if(!e.inline&&t&&o){t.onload=null;o.unbind(e.getWin());o.unbind(e.getDoc())}if(o){o.unbind(t);o.unbind(e.getContainer())}}};const m$=e=>{if(v(e)){return{value:e.split(/[ ,]/),valid:true}}else if(D(e,v)){return{value:e,valid:true}}else{return{valid:false,message:`The value must be a string[] or a comma/space separated string.`}}};const g$=e=>{const t=(()=>{switch(e){case"array":return _;case"boolean":return z;case"function":return O;case"number":return E;case"object":return k;case"string":return v;case"string[]":return m$;case"object[]":return e=>D(e,k);case"regexp":return e=>b(e,RegExp)}})();return o=>b$(o,t,`The value must be a ${e}.`)};const p$=e=>v(e.processor);const h$=(e,t)=>{const o=pt(t.message)?"":`. ${t.message}`;return e+o};const y$=e=>e.valid;const b$=(e,t,o="")=>{const n=t(e);if(z(n)){return n?{value:e,valid:true}:{valid:false,message:o}}else{return n}};const v$=(e,t,o)=>{if(!C(t)){const n=b$(t,o);if(y$(n)){return n.value}else{console.error(h$(`Invalid default value passed for the "${e}" option`,n))}}return undefined};const k$=(e,t)=>{const o={};const n={};const s=(e,t,o)=>{const s=b$(t,o);if(y$(s)){n[e]=s.value;return true}else{console.warn(h$(`Invalid value passed for the ${e} option`,s));return false}};const r=(e,r)=>{const a=p$(r)?g$(r.processor):r.processor;const c=v$(e,r.default,a);o[e]={...r,default:c,processor:a};const i=Me(n,e).orThunk((()=>Me(t,e)));i.each((t=>s(e,t,a)))};const a=e=>Ne(o,e);const c=e=>Me(n,e).orThunk((()=>Me(o,e).map((e=>e.default)))).getOrUndefined();const i=(e,t)=>{if(!a(e)){console.warn(`"${e}" is not a registered option. Ensure the option has been registered before setting a value.`);return false}else{const n=o[e];if(n.immutable){console.error(`"${e}" is an immutable option and cannot be updated`);return false}else{return s(e,t,n.processor)}}};const l=e=>{const t=a(e);if(t){delete n[e]}return t};const d=e=>Ne(n,e);return{register:r,isRegistered:a,get:c,set:i,unset:l,isSet:d}};const w$=["design","readonly"];const _$=(e,t,o,n)=>{const s=o[t.get()];const r=o[n];try{r.activate()}catch(e){console.error(`problem while activating editor mode ${n}:`,e);return}s.deactivate();if(s.editorReadOnly!==r.editorReadOnly){KW(e,r.editorReadOnly)}t.set(n);Fp(e,n)};const x$=(e,t,o,n)=>{if(n===o.get()){return}else if(!Ne(t,n)){throw new Error(`Editor mode '${n}' is invalid`)}if(e.initialized){_$(e,o,t,n)}else{e.on("init",(()=>_$(e,o,t,n)))}};const z$=(e,t,o)=>{if(Y(w$,t)){throw new Error(`Cannot override default mode ${t}`)}return{...e,[t]:{...o,deactivate:()=>{try{o.deactivate()}catch(e){console.error(`problem while deactivating editor mode ${t}:`,e)}}}}};const C$=e=>{const t=ei("design");const o=ei({design:{activate:A,deactivate:A,editorReadOnly:false},readonly:{activate:A,deactivate:A,editorReadOnly:true}});JW(e);t$(e);return{isReadOnly:()=>XW(e),set:n=>x$(e,o.get(),t,n),get:()=>t.get(),register:(e,t)=>{o.set(z$(o.get(),e,t))}}};const S$=fo.each,T$=fo.explode;const O$={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123};const E$=fo.makeMap("alt,ctrl,shift,meta,access");const D$=e=>{let t;const o={};const n=eo.os.isMacOS()||eo.os.isiOS();S$(T$(e.toLowerCase(),"+"),(e=>{if(e in E$){o[e]=true}else{if(/^[0-9]{2,}$/.test(e)){o.keyCode=parseInt(e,10)}else{o.charCode=e.charCodeAt(0);o.keyCode=O$[e]||e.toUpperCase().charCodeAt(0)}}}));const s=[o.keyCode];for(t in E$){if(o[t]){s.push(t)}else{o[t]=false}}o.id=s.join(",");if(o.access){o.alt=true;if(n){o.ctrl=true}else{o.shift=true}}if(o.meta){if(n){o.meta=true}else{o.ctrl=true;o.meta=false}}return o};class A${constructor(e){this.shortcuts={};this.pendingPatterns=[];this.editor=e;const t=this;e.on("keyup keypress keydown",(e=>{if((t.hasModifier(e)||t.isFunctionKey(e))&&!e.isDefaultPrevented()){S$(t.shortcuts,(o=>{if(t.matchShortcut(e,o)){t.pendingPatterns=o.subpatterns.slice(0);if(e.type==="keydown"){t.executeShortcutAction(o)}return true}}));if(t.matchShortcut(e,t.pendingPatterns[0])){if(t.pendingPatterns.length===1){if(e.type==="keydown"){t.executeShortcutAction(t.pendingPatterns[0])}}t.pendingPatterns.shift()}}}))}add(e,t,o,n){const s=this;const r=s.normalizeCommandFunc(o);S$(T$(fo.trim(e)),(e=>{const o=s.createShortcut(e,t,r,n);s.shortcuts[o.id]=o}));return true}remove(e){const t=this.createShortcut(e);if(this.shortcuts[t.id]){delete this.shortcuts[t.id];return true}return false}normalizeCommandFunc(e){const t=this;const o=e;if(typeof o==="string"){return()=>{t.editor.execCommand(o,false,null)}}else if(fo.isArray(o)){return()=>{t.editor.execCommand(o[0],o[1],o[2])}}else{return o}}createShortcut(e,t,o,n){const s=fo.map(T$(e,">"),D$);s[s.length-1]=fo.extend(s[s.length-1],{func:o,scope:n||this.editor});return fo.extend(s[0],{desc:this.editor.translate(t),subpatterns:s.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return e.type==="keydown"&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e,t){if(!t){return false}if(t.ctrl!==e.ctrlKey||t.meta!==e.metaKey){return false}if(t.alt!==e.altKey||t.shift!==e.shiftKey){return false}if(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode){e.preventDefault();return true}return false}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const M$=()=>{const e={};const t={};const o={};const n={};const s={};const r={};const a={};const c=(e,t)=>(o,n)=>e[o.toLowerCase()]={...n,type:t};const i=(e,t)=>n[e.toLowerCase()]=t;return{addButton:c(e,"button"),addGroupToolbarButton:c(e,"grouptoolbarbutton"),addToggleButton:c(e,"togglebutton"),addMenuButton:c(e,"menubutton"),addSplitButton:c(e,"splitbutton"),addMenuItem:c(t,"menuitem"),addNestedMenuItem:c(t,"nestedmenuitem"),addToggleMenuItem:c(t,"togglemenuitem"),addAutocompleter:c(o,"autocompleter"),addContextMenu:c(s,"contextmenu"),addContextToolbar:c(r,"contexttoolbar"),addContextForm:c(r,"contextform"),addSidebar:c(a,"sidebar"),addIcon:i,getAll:()=>({buttons:e,menuItems:t,icons:n,popups:o,contextMenus:s,contextToolbars:r,sidebars:a})}};const N$=()=>{const e=M$();return{addAutocompleter:e.addAutocompleter,addButton:e.addButton,addContextForm:e.addContextForm,addContextMenu:e.addContextMenu,addContextToolbar:e.addContextToolbar,addIcon:e.addIcon,addMenuButton:e.addMenuButton,addMenuItem:e.addMenuItem,addNestedMenuItem:e.addNestedMenuItem,addSidebar:e.addSidebar,addSplitButton:e.addSplitButton,addToggleButton:e.addToggleButton,addGroupToolbarButton:e.addGroupToolbarButton,addToggleMenuItem:e.addToggleMenuItem,getAll:e.getAll}};const R$=Gc.DOM;const B$=fo.extend,L$=fo.each;class H${constructor(e,t,o){this.plugins={};this.contentCSS=[];this.contentStyles=[];this.loadedCSS={};this.isNotDirty=false;this.editorManager=o;this.documentBaseUrl=o.documentBaseURL;B$(this,f$);const n=this;this.id=e;this.hidden=false;const s=Yq(o.defaultOptions,t);this.options=k$(n,s);Ad(n);const r=this.options.get;if(r("deprecation_warnings")){hE(t,s)}const a=r("suffix");if(a){o.suffix=a}this.suffix=o.suffix;const c=r("base_url");if(c){o._setBaseUrl(c)}this.baseUri=o.baseURI;const i=tu(n);if(i){Zc.ScriptLoader._setReferrerPolicy(i);Gc.DOM.styleSheetLoader._setReferrerPolicy(i)}gi.languageLoad=r("language_load");gi.baseURL=o.baseURL;this.setDirty(false);this.documentBaseURI=new lS(Rd(n),{base_uri:this.baseUri});this.baseURI=this.baseUri;this.inline=Cu(n);this.shortcuts=new A$(this);this.editorCommands=new PW(this);IW(this);const l=r("cache_suffix");if(l){eo.cacheSuffix=l.replace(/^[\?\&]+/,"")}this.ui={registry:N$(),styleSheetLoader:undefined,show:A,hide:A,setEnabled:A,isEnabled:U};this.mode=C$(n);o.dispatch("SetupEditor",{editor:this});const d=Vu(n);if(O(d)){d.call(n,n)}}render(){Nq(this)}focus(e){this.execCommand("mceFocus",false,e)}hasFocus(){return Mb(this)}translate(e){return mi.translate(e)}getParam(e,t,o){const n=this.options;if(!n.isRegistered(e)){if(T(o)){n.register(e,{processor:o,default:t})}else{n.register(e,{processor:U,default:t})}}return!n.isSet(e)&&!C(t)?t:n.get(e)}hasPlugin(e,t){const o=Y(Ru(this),e);if(o){return t?VE.get(e)!==undefined:true}else{return false}}nodeChanged(e){this._nodeChangeDispatcher.nodeChanged(e)}addCommand(e,t,o){this.editorCommands.addCommand(e,t,o)}addQueryStateHandler(e,t,o){this.editorCommands.addQueryStateHandler(e,t,o)}addQueryValueHandler(e,t,o){this.editorCommands.addQueryValueHandler(e,t,o)}addShortcut(e,t,o,n){this.shortcuts.add(e,t,o,n)}execCommand(e,t,o,n){return this.editorCommands.execCommand(e,t,o,n)}queryCommandState(e){return this.editorCommands.queryCommandState(e)}queryCommandValue(e){return this.editorCommands.queryCommandValue(e)}queryCommandSupported(e){return this.editorCommands.queryCommandSupported(e)}show(){const e=this;if(e.hidden){e.hidden=false;if(e.inline){e.getBody().contentEditable="true"}else{R$.show(e.getContainer());R$.hide(e.id)}e.load();e.dispatch("show")}}hide(){const e=this;if(!e.hidden){e.save();if(e.inline){e.getBody().contentEditable="false";if(e===e.editorManager.focusedEditor){e.editorManager.focusedEditor=null}}else{R$.hide(e.getContainer());R$.setStyle(e.id,"display",e.orgDisplay)}e.hidden=true;e.dispatch("hide")}}isHidden(){return this.hidden}setProgressState(e,t){this.dispatch("ProgressState",{state:e,time:t})}load(e){const t=this;let o=t.getElement(),n;if(t.removed){return""}if(o){e=e||{};e.load=true;const s=Us(o)?o.value:o.innerHTML;n=t.setContent(s,e);e.element=o;if(!e.no_events){t.dispatch("LoadContent",e)}e.element=o=null;return n}}save(e){const t=this;let o=t.getElement(),n,s;if(!o||!t.initialized||t.removed){return}e=e||{};e.save=true;e.element=o;n=e.content=t.getContent(e);if(!e.no_events){t.dispatch("SaveContent",e)}if(e.format==="raw"){t.dispatch("RawSaveContent",e)}n=e.content;if(!Us(o)){if(e.is_removing||!t.inline){o.innerHTML=n}if(s=R$.getParent(t.id,"form")){L$(s.elements,(e=>{if(e.name===t.id){e.value=n;return false}}))}}else{o.value=n}e.element=o=null;if(e.set_dirty!==false){t.setDirty(false)}return n}setContent(e,t){return dE(this,e,t)}getContent(e){return cE(this,e)}insertContent(e,t){if(t){e=B$({content:e},t)}this.execCommand("mceInsertContent",false,e)}resetContent(e){if(e===undefined){dE(this,this.startContent,{format:"raw"})}else{dE(this,e)}this.undoManager.reset();this.setDirty(false);this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const t=!this.isNotDirty;this.isNotDirty=!e;if(e&&e!==t){this.dispatch("dirty")}}getContainer(){const e=this;if(!e.container){e.container=R$.get(e.editorContainer||e.id+"_parent")}return e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){if(!this.targetElm){this.targetElm=R$.get(this.id)}return this.targetElm}getWin(){const e=this;let t;if(!e.contentWindow){t=e.iframeElement;if(t){e.contentWindow=t.contentWindow}}return e.contentWindow}getDoc(){const e=this;let t;if(!e.contentDocument){t=e.getWin();if(t){e.contentDocument=t.document}}return e.contentDocument}getBody(){const e=this.getDoc();return this.bodyElement||(e?e.body:null)}convertURL(e,t,o){const n=this,s=n.options.get;const r=Uu(n);if(O(r)){return r.call(n,e,o,true,t)}if(!s("convert_urls")||o&&o.nodeName==="LINK"||e.indexOf("file:")===0||e.length===0){return e}if(s("relative_urls")){return n.documentBaseURI.toRelative(e)}e=n.documentBaseURI.toAbsolute(e,s("remove_script_host"));return e}addVisual(e){Jq(this,e)}remove(){_E(this)}destroy(e){xE(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const I$=Gc.DOM;const P$=fo.each;let F$=false;let V$;let j$=[];const U$=e=>{const t=e.type;P$(K$.get(),(o=>{switch(t){case"scroll":o.dispatch("ScrollWindow",e);break;case"resize":o.dispatch("ResizeWindow",e);break}}))};const q$=e=>{if(e!==F$){const t=Gc.DOM;if(e){t.bind(window,"resize",U$);t.bind(window,"scroll",U$)}else{t.unbind(window,"resize",U$);t.unbind(window,"scroll",U$)}F$=e}};const W$=e=>{const t=j$;j$=oe(j$,(t=>e!==t));if(K$.activeEditor===e){K$.activeEditor=j$.length>0?j$[0]:null}if(K$.focusedEditor===e){K$.focusedEditor=null}return t.length!==j$.length};const $$=e=>{if(e&&e.initialized&&!(e.getContainer()||e.getBody()).parentNode){W$(e);e.unbindAllNativeEvents();e.destroy(true);e.removed=true;e=null}return e};const G$=document.compatMode!=="CSS1Compat";const K$={...r$,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"6",minorVersion:"0.2",releaseDate:"2022-04-27",i18n:mi,activeEditor:null,focusedEditor:null,setup(){const e=this;let t,o,n="";o=lS.getDocumentBaseUrl(document.location);if(/^[^:]+:\/\/\/?[^\/]+\//.test(o)){o=o.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,"");if(!/[\/\\]$/.test(o)){o+="/"}}const s=window.tinymce||window.tinyMCEPreInit;if(s){t=s.base||s.baseURL;n=s.suffix}else{const e=document.getElementsByTagName("script");for(let o=0;o<e.length;o++){const s=e[o].src||"";if(s===""){continue}const r=s.substring(s.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(s)){if(r.indexOf(".min")!==-1){n=".min"}t=s.substring(0,s.lastIndexOf("/"));break}}if(!t&&document.currentScript){const e=document.currentScript.src;if(e.indexOf(".min")!==-1){n=".min"}t=e.substring(0,e.lastIndexOf("/"))}}e.baseURL=new lS(o).toAbsolute(t);e.documentBaseURL=o;e.baseURI=new lS(e.baseURL);e.suffix=n;_b(e)},overrideDefaults(e){const t=e.base_url;if(t){this._setBaseUrl(t)}const o=e.suffix;if(e.suffix){this.suffix=o}this.defaultOptions=e;const n=e.plugin_base_urls;if(n!==undefined){xe(n,((e,t)=>{gi.PluginManager.urls[t]=e}))}},init(e){const t=this;let o;const n=fo.makeMap("area base basefont br col frame hr img input isindex link meta param embed source wbr track "+"colgroup option table tbody tfoot thead tr th td script noscript style textarea video audio iframe object menu"," ");const s=(e,t)=>e.inline&&t.tagName.toLowerCase()in n;const r=e=>{let t=e.id;if(!t){t=Me(e,"name").filter((e=>!I$.get(e))).getOrThunk(I$.uniqueId);e.setAttribute("id",t)}return t};const a=o=>{const n=e[o];if(!n){return}return n.apply(t,[])};const c=e=>{if(eo.browser.isIE()||eo.browser.isEdge()){oD("TinyMCE does not support the browser you are using. For a list of supported"+" browsers please see: https://www.tiny.cloud/docs/tinymce/6/support/#supportedwebbrowsers");return[]}else if(G$){oD("Failed to initialize the editor as the document is not in standards mode. "+"TinyMCE requires standards mode.");return[]}else if(v(e.selector)){return I$.select(e.selector)}else if(T(e.target)){return[e.target]}else{return[]}};let i=e=>{o=e};const l=()=>{let o=0;const n=[];let d;const u=(e,s,r)=>{const a=new H$(e,s,t);n.push(a);a.on("init",(()=>{if(++o===d.length){i(n)}}));a.targetElm=a.targetElm||r;a.render()};I$.unbind(window,"ready",l);a("onpageload");d=ke(c(e));fo.each(d,(e=>{$$(t.get(e.id))}));d=fo.grep(d,(e=>!t.get(e.id)));if(d.length===0){i([])}else{P$(d,(t=>{if(s(e,t)){oD("Could not initialize inline editor on invalid inline target element",t)}else{u(r(t),e,t)}}))}};I$.bind(window,"ready",l);return new Promise((e=>{if(o){e(o)}else{i=t=>{e(t)}}}))},get(e){if(arguments.length===0){return j$.slice(0)}else if(v(e)){return ae(j$,(t=>t.id===e)).getOr(null)}else if(E(e)){return j$[e]?j$[e]:null}else{return null}},add(e){const t=this;const o=t.get(e.id);if(o===e){return e}if(o===null){j$.push(e)}q$(true);t.activeEditor=e;t.dispatch("AddEditor",{editor:e});if(!V$){V$=e=>{const o=t.dispatch("BeforeUnload");if(o.returnValue){e.preventDefault();e.returnValue=o.returnValue;return o.returnValue}};window.addEventListener("beforeunload",V$)}return e},createEditor(e,t){return this.add(new H$(e,t,this))},remove(e){const t=this;let o,n;if(!e){for(o=j$.length-1;o>=0;o--){t.remove(j$[o])}return}if(v(e)){P$(I$.select(e),(e=>{n=t.get(e.id);if(n){t.remove(n)}}));return}n=e;if(x(t.get(n.id))){return null}if(W$(n)){t.dispatch("RemoveEditor",{editor:n})}if(j$.length===0){window.removeEventListener("beforeunload",V$)}n.remove();q$(j$.length>0);return n},execCommand(e,t,o){var n;const s=this;const r=k(o)?(n=o.id)!==null&&n!==void 0?n:o.index:o;switch(e){case"mceAddEditor":{if(!s.get(r)){const e=o.options;new H$(r,e,s).render()}return true}case"mceRemoveEditor":{const e=s.get(r);if(e){e.remove()}return true}case"mceToggleEditor":{const e=s.get(r);if(!e){s.execCommand("mceAddEditor",false,o);return true}if(e.isHidden()){e.show()}else{e.hide()}return true}}if(s.activeEditor){return s.activeEditor.execCommand(e,t,o)}return false},triggerSave:()=>{P$(j$,(e=>{e.save()}))},addI18n:(e,t)=>{mi.add(e,t)},translate:e=>mi.translate(e),setActive(e){const t=this.activeEditor;if(this.activeEditor!==e){if(t){t.dispatch("deactivate",{relatedTarget:e})}e.dispatch("activate",{relatedTarget:t})}this.activeEditor=e},_setBaseUrl(e){this.baseURL=new lS(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,""));this.baseURI=new lS(this.baseURL)}};K$.setup();const X$=()=>{const e=hi();const t=e=>({items:e,types:we(e),getType:t=>Me(e,t).getOrUndefined()});const o=t=>{e.set(t)};const n=()=>e.get().getOrUndefined();const s=e.clear;return{FakeClipboardItem:t,write:o,read:n,clear:s}};const Y$=X$();const J$=Math.min,Q$=Math.max,Z$=Math.round;const eG=(e,t,o)=>{let n=t.x;let s=t.y;const r=e.w;const a=e.h;const c=t.w;const i=t.h;const l=(o||"").split("");if(l[0]==="b"){s+=i}if(l[1]==="r"){n+=c}if(l[0]==="c"){s+=Z$(i/2)}if(l[1]==="c"){n+=Z$(c/2)}if(l[3]==="b"){s-=a}if(l[4]==="r"){n-=r}if(l[3]==="c"){s-=Z$(a/2)}if(l[4]==="c"){n-=Z$(r/2)}return rG(n,s,r,a)};const tG=(e,t,o,n)=>{let s,r;for(r=0;r<n.length;r++){s=eG(e,t,n[r]);if(s.x>=o.x&&s.x+s.w<=o.w+o.x&&s.y>=o.y&&s.y+s.h<=o.h+o.y){return n[r]}}return null};const oG=(e,t,o)=>rG(e.x-t,e.y-o,e.w+t*2,e.h+o*2);const nG=(e,t)=>{const o=Q$(e.x,t.x);const n=Q$(e.y,t.y);const s=J$(e.x+e.w,t.x+t.w);const r=J$(e.y+e.h,t.y+t.h);if(s-o<0||r-n<0){return null}return rG(o,n,s-o,r-n)};const sG=(e,t,o)=>{let n=e.x;let s=e.y;let r=e.x+e.w;let a=e.y+e.h;const c=t.x+t.w;const i=t.y+t.h;const l=Q$(0,t.x-n);const d=Q$(0,t.y-s);const u=Q$(0,r-c);const f=Q$(0,a-i);n+=l;s+=d;if(o){r+=l;a+=d;n-=u;s-=f}r-=u;a-=f;return rG(n,s,r-n,a-s)};const rG=(e,t,o,n)=>({x:e,y:t,w:o,h:n});const aG=e=>rG(e.left,e.top,e.width,e.height);const cG={inflate:oG,relativePosition:eG,findBestRelativePosition:tG,intersect:nG,clamp:sG,create:rG,fromClientRect:aG};const iG=(e,t,o=1e3)=>{let n=false;let s=null;const r=e=>(...t)=>{if(!n){n=true;if(s!==null){clearTimeout(s);s=null}e.apply(null,t)}};const a=r(e);const c=r(t);const i=(...e)=>{if(!n&&s===null){s=setTimeout((()=>c.apply(null,e)),o)}};return{start:i,resolve:a,reject:c}};const lG=()=>{const e={};const t={};const o=(o,n)=>{const s=`Script at URL "${n}" failed to load`;const r=`Script at URL "${n}" did not call \`tinymce.Resource.add('${o}', data)\` within 1 second`;if(e[o]!==undefined){return e[o]}else{const a=new Promise(((e,a)=>{const c=iG(e,a);t[o]=c.resolve;Zc.ScriptLoader.loadScript(n).then((()=>c.start(r)),(()=>c.reject(s)))}));e[o]=a;return a}};const n=(o,n)=>{if(t[o]!==undefined){t[o](n);delete t[o]}e[o]=Promise.resolve(n)};const s=t=>{delete e[t]};return{load:o,add:n,unload:s}};const dG=lG();const uG=()=>(()=>{let e={};let t=[];const o={getItem:t=>{const o=e[t];return o?o:null},setItem:(o,n)=>{t.push(o);e[o]=String(n)},key:e=>t[e],removeItem:o=>{t=t.filter((e=>e===o));delete e[o]},clear:()=>{t=[];e={}},length:0};Object.defineProperty(o,"length",{get:()=>t.length,configurable:false,enumerable:false});return o})();let fG;try{const e="__storage_test__";fG=window.localStorage;fG.setItem(e,e);fG.removeItem(e)}catch(e){fG=uG()}var mG=fG;const gG={geom:{Rect:cG},util:{Delay:ib,Tools:fo,VK:ah,URI:lS,EventDispatcher:n$,Observable:r$,I18n:mi,LocalStorage:mG,ImageUploader:bD},dom:{EventUtils:Hc,TreeWalker:vr,TextSeeker:Vi,DOMUtils:Gc,ScriptLoader:Zc,RangeUtils:iy,Serializer:sE,StyleSheetLoader:hr,ControlSelection:ch,BookmarkManager:Rp,Selection:WO,Event:Hc.Event},html:{Styles:xc,Entities:uc,Node:cv,Schema:_c,DomParser:xS,Writer:kv,Serializer:wv},Env:eo,AddOnManager:gi,Annotator:Np,Formatter:RD,UndoManager:ID,EditorCommands:PW,WindowManager:qE,NotificationManager:FE,EditorObservable:f$,Shortcuts:A$,Editor:H$,FocusManager:rb,EditorManager:K$,DOM:Gc.DOM,ScriptLoader:Zc.ScriptLoader,PluginManager:VE,ThemeManager:jE,ModelManager:SE,IconManager:CE,Resource:dG,FakeClipboard:Y$,trim:fo.trim,isArray:fo.isArray,is:fo.is,toArray:fo.toArray,makeMap:fo.makeMap,each:fo.each,map:fo.map,grep:fo.grep,inArray:fo.inArray,extend:fo.extend,walk:fo.walk,resolve:fo.resolve,explode:fo.explode,_addCacheSuffix:fo._addCacheSuffix};const pG=fo.extend(K$,gG);const hG=t=>{if(true){try{e.exports=t}catch(e){}}};const yG=e=>{window.tinymce=e;window.tinyMCE=e};yG(pG);hG(pG)})()}};var t={};function o(n){var s=t[n];if(s!==undefined){return s.exports}var r=t[n]={exports:{}};e[n](r,r.exports,o);return r.exports}var n={};(()=>{ /** * --------------------------------------------------------------------- * * GLPI - Gestionnaire Libre de Parc Informatique * * http://glpi-project.org * * @copyright 2015-2022 Teclib' and contributors. * @copyright 2003-2014 by the INDEPNET Development Team. * @licence https://www.gnu.org/licenses/gpl-3.0.html * * --------------------------------------------------------------------- * * LICENSE * * This file is part of GLPI. * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>. * * --------------------------------------------------------------------- */ window.tinymce=window.tinyMCE=o(475);o(476);o(477);o(479);o(480);o(482);o(484);o(486);o(488);o(489);o(491);o(493);o(495);o(497);o(499);o(501)})()})();