You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
amis/demo/scripts/chunk/2794.249b94cf.js

1 lines
1.3 MiB

This file contains hidden Unicode characters!

This file contains hidden Unicode characters that may be processed differently from what appears below. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to reveal hidden characters.

(self.webpackChunkamis_editor_demo=self.webpackChunkamis_editor_demo||[]).push([[2794],{62794:function(e,t,o){"use strict";o.r(t),o.d(t,{default:function(){return i}});var n=o(97582),r=o(67294),a=o(47575),s=o.n(a),i=(o(6890),o(38860),o(63557),o(14400),o(66884),o(15209),o(1236),o(72682),o(72170),o(39719),o(44446),o(82929),o(31295),o(644),o(88190),o(1080),o(73956),o(42540),o(38619),o(92936),o(43356),o(78843),o(73106),o(21449),o(31528),o(79835),o(35414),o(82960),function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.elementRef=r.createRef(),t}return(0,n.ZT)(t,e),t.prototype.componentDidMount=function(){var e=this,t=this.props.locale;this.config=(0,n.pi)((0,n.pi)({inline:!1,skin:!1,content_css:!1,height:400,language:t&&"zh-CN"!==t?"en":"zh_CN",branding:!1,plugins:["advlist","autolink","autoresize","link","image","lists","charmap","preview","anchor","pagebreak","searchreplace","wordcount","visualblocks","visualchars","code","fullscreen","insertdatetime","media","nonbreaking","table","emoticons","template","help","quickbars"],toolbar:"undo redo | blocks | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | preview media | fontfamily fontsize forecolor backcolor emoticons | print help",quickbars_selection_toolbar:"bold italic | link h2 h3 blockquote",quickbars_insert_toolbar:"quickimage quicktable",menu:{file:{title:"File",items:"newdocument restoredraft | preview | print "},edit:{title:"Edit",items:"undo redo | cut copy paste | selectall | searchreplace"},view:{title:"View",items:"code | visualaid visualchars visualblocks | preview fullscreen"},insert:{title:"Insert",items:"image link media template codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor toc | insertdatetime"},format:{title:"Format",items:"bold italic underline strikethrough superscript subscript codeformat | styles blocks fontsize align | forecolor backcolor | removeformat"},tools:{title:"Tools",items:"code wordcount"},table:{title:"Table",items:"inserttable | cell row column | tableprops deletetable"},help:{title:"Help",items:"help"}},paste_data_images:!0},this.props.config),{target:this.elementRef.current,readOnly:this.props.disabled,promotion:!1,setup:function(t){e.editor=t,t.on("init",(function(o){e.initEditor(o,t)}))}}),s().init(this.config)},t.prototype.componentDidUpdate=function(e){var t,o=this.props;o.model!==e.model&&o.model!==this.currentContent&&(null===(t=this.editor)||void 0===t||t.setContent(o.model||""))},t.prototype.componentWillUnmount=function(){s().remove(this.editor)},t.prototype.initEditor=function(e,t){var o=this,n=this.props,r=n.model,a=n.onModelChange,s=n.outputFormat,i=n.onFocus,l=n.onBlur,c=r||"";t.setContent(c),a&&t.on("change keyup setcontent",(function(e){var n=t.getContent({format:s});n!==o.currentContent&&(o.currentContent=n,a(n))})),i&&t.on("focus",i),l&&t.on("blur",l)},t.prototype.render=function(){return r.createElement("textarea",{ref:this.elementRef})},t.defaultProps={outputFormat:"html"},t}(r.Component));s().addI18n("zh_CN",{Redo:"重做",Undo:"撤销",Cut:"剪切",Copy:"复制",Paste:"粘贴","Select all":"全选","New document":"新文件",Ok:"确定",Cancel:"取消","Visual aids":"网格线",Bold:"粗体",Italic:"斜体",Underline:"下划线",Strikethrough:"删除线",Superscript:"上标",Subscript:"下标","Clear formatting":"清除格式","Align left":"左边对齐","Align center":"中间对齐","Align right":"右边对齐",Justify:"两端对齐","Bullet list":"项目符号","Numbered list":"编号列表","Decrease indent":"减少缩进","Increase indent":"增加缩进",Close:"关闭",Formats:"格式","Your browser doesn't support direct access to the clipboard. Please use the Ctrl+X/C/V keyboard shortcuts instead.":"你的浏览器不支持打开剪贴板,请使用Ctrl+X/C/V等快捷键。",Headers:"标题","Header 1":"标题1","Header 2":"标题2","Header 3":"标题3","Header 4":"标题4","Header 5":"标题5","Header 6":"标题6",Headings:"标题","Heading 1":"标题1","Heading 2":"标题2","Heading 3":"标题3","Heading 4":"标题4","Heading 5":"标题5","Heading 6":"标题6",Preformatted:"预先格式化的",Div:"Div",Pre:"Pre",Code:"代码",Paragraph:"段落",Blockquote:"引文区块",Inline:"文本",Blocks:"基块","Paste is now in plain text mode. Contents will now be pasted as plain text until you toggle this option off.":"当前为纯文本粘贴模式,再次点击可以回到普通粘贴模式。",Fonts:"字体","Font Sizes":"字号",Class:"类型","Browse for an image":"浏览图像",OR:"或","Drop an image here":"拖放一张图像至此",Upload:"上传",Block:"块",Align:"对齐",Default:"默认",Circle:"空心圆",Disc:"实心圆",Square:"方块","Lower Alpha":"小写英文字母","Lower Greek":"小写希腊字母","Lower Roman":"小写罗马字母","Upper Alpha":"大写英文字母","Upper Roman":"大写罗马字母","Anchor...":"锚点...",Name:"名称",Id:"标识符","Id should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores.":"标识符应该以字母开头,后跟字母、数字、破折号、点、冒号或下划线。","You have unsaved changes are you sure you want to navigate away?":"你还有文档尚未保存,确定要离开?","Restore last draft":"恢复上次的草稿","Special character...":"特殊字符...","Source code":"源代码","Insert/Edit code sample":"插入/编辑代码示例",Language:"语言","Code sample...":"示例代码...","Color Picker":"选色器",R:"R",G:"G",B:"B","Left to right":"从左到右","Right to left":"从右到左","Emoticons...":"表情符号...","Metadata and Document Properties":"元数据和文档属性",Title:"标题",Keywords:"关键词",Description:"描述",Robots:"机器人",Author:"作者",Encoding:"编码",Fullscreen:"全屏",Action:"操作",Shortcut:"快捷键",Help:"帮助",Address:"地址","Focus to menubar":"移动焦点到菜单栏","Focus to toolbar":"移动焦点到工具栏","Focus to element path":"移动焦点到元素路径","Focus to contextual toolbar":"移动焦点到上下文菜单","Insert link (if link plugin activated)":"插入链接 (如果链接插件已激活)","Save (if save plugin activated)":"保存(如果保存插件已激活)","Find (if searchreplace plugin activated)":"查找(如果查找替换插件已激活)","Plugins installed ({0}):":"已安装插件 ({0}):","Premium plugins:":"优秀插件:","Learn more...":"了解更多...","You are using {0}":"你正在使用 {0}",Plugins:"插件","Handy Shortcuts":"快捷键","Horizontal line":"水平分割线","Insert/edit image":"插入/编辑图片","Image description":"图片描述",Source:"地址",Dimensions:"大小","Constrain proportions":"保持纵横比",General:"普通",Advanced:"高级",Style:"样式","Vertical space":"垂直边距","Horizontal space":"水平边距",Border:"边框","Insert image":"插入图片","Image...":"图片...","Image list":"图片列表","Rotate counterclockwise":"逆时针旋转","Rotate clockwise":"顺时针旋转","Flip vertically":"垂直翻转","Flip horizontally":"水平翻转","Edit image":"编辑图片","Image options":"图片选项","Zoom in":"放大","Zoom out":"缩小",Crop:"裁剪",Resize:"调整大小",Orientation:"方向",Brightness:"亮度",Sharpen:"锐化",Contrast:"对比度","Color levels":"颜色层次",Gamma:"伽马值",Invert:"反转",Apply:"应用",Back:"后退","Insert date/time":"插入日期/时间","Date/time":"日期/时间","Insert/Edit Link":"插入/编辑链接","Insert/edit link":"插入/编辑链接","Text to display":"显示文字",Url:"地址","Open link in...":"链接打开位置...","Current window":"当前窗口",None:"无","New window":"在新窗口打开","Remove link":"删除链接",Anchors:"锚点","Link...":"链接...","Paste or type a link":"粘贴或输入链接","The URL you entered seems to be an email address. Do you want to add the required mailto: prefix?":"你所填写的URL地址为邮件地址,需要加上mailto:前缀吗?","The URL you entered seems to be an external link. Do you want to add the required http:// prefix?":"你所填写的URL地址属于外部链接,需要加上http://:前缀吗?","Link list":"链接列表","Insert video":"插入视频","Insert/edit video":"插入/编辑视频","Insert/edit media":"插入/编辑媒体","Alternative source":"镜像","Alternative source URL":"替代来源网址","Media poster (Image URL)":"封面(图片地址)","Paste your embed code below:":"将内嵌代码粘贴在下面:",Embed:"内嵌","Media...":"多媒体...","Nonbreaking space":"不间断空格","Page break":"分页符","Paste as text":"粘贴为文本",Preview:"预览","Print...":"打印...",Save:"保存",Find:"查找","Replace with":"替换为",Replace:"替换","Replace all":"全部替换",Previous:"上一个",Next:"下一个","Find and replace...":"查找并替换...","Could not find the specified string.":"未找到搜索内容.","Match case":"区分大小写","Find whole words only":"全字匹配","Spell check":"拼写检查",Ignore:"忽略","Ignore all":"全部忽略",Finish:"完成","Add to Dictionary":"添加到字典","Insert table":"插入表格","Table properties":"表格属性","Delete table":"删除表格",Cell:"单元格",Row:"行",Column:"列","Cell properties":"单元格属性","Merge cells":"合并单元格","Split cell":"拆分单元格","Insert row before":"在上方插入","Insert row after":"在下方插入","Delete row":"删除行","Row properties":"行属性","Cut row":"剪切行","Copy row":"复制行","Paste row before":"粘贴到上方","Paste row after":"粘贴到下方","Insert column before":"在左侧插入","Insert column after":"在右侧插入","Delete column":"删除列",Cols:"列",Rows:"行",Width:"宽",Height:"高","Cell spacing":"单元格外间距","Cell padding":"单元格内边距","Show caption":"显示标题",Left:"左对齐",Center:"居中",Right:"右对齐","Cell type":"单元格类型",Scope:"范围",Alignment:"对齐方式","H Align":"水平对齐","V Align":"垂直对齐",Top:"顶部对齐",Middle:"垂直居中",Bottom:"底部对齐","Header cell":"表头单元格","Row group":"行组","Column group":"列组","Row type":"行类型",Header:"表头",Body:"表体",Footer:"表尾","Border color":"边框颜色","Insert template...":"插入模板...",Templates:"模板",Template:"模板","Text color":"文字颜色","Background color":"背景色","Custom...":"自定义...","Custom color":"自定义颜色","No color":"无","Remove color":"移除颜色","Table of Contents":"内容列表","Show blocks":"显示区块边框","Show invisible characters":"显示不可见字符","Word count":"字数",Count:"计数",Document:"文档",Selection:"选择",Words:"单词","Words: {0}":"字数:{0}","{0} words":"{0} 字",File:"文件",Edit:"编辑",Insert:"插入",View:"视图",Format:"格式",Table:"表格",Tools:"工具","Powered by {0}":"由{0}驱动","Rich Text Area. Press ALT-F9 for menu. Press ALT-F10 for toolbar. Press ALT-0 for help":"在编辑区按ALT-F9打开菜单,按ALT-F10打开工具栏,按ALT-0查看帮助","Image title":"图片标题","Border width":"边框宽度","Border style":"边框样式",Error:"错误",Warn:"警告",Valid:"有效","To open the popup, press Shift+Enter":"按Shitf+Enter键打开对话框","Rich Text Area. Press ALT-0 for help.":"编辑区。按Alt+0键打开帮助。","System Font":"系统字体","Failed to upload image: {0}":"图片上传失败: {0}","Failed to load plugin: {0} from url {1}":"插件加载失败: {0} 来自链接 {1}","Failed to load plugin url: {0}":"插件加载失败 链接: {0}","Failed to initialize plugin: {0}":"插件初始化失败: {0}",example:"示例",Search:"搜索",All:"全部",Currency:"货币",Text:"文字",Quotations:"引用",Mathematical:"数学","Extended Latin":"拉丁语扩充",Symbols:"符号",Arrows:"箭头","User Defined":"自定义","dollar sign":"美元符号","currency sign":"货币符号","euro-currency sign":"欧元符号","colon sign":"冒号","cruzeiro sign":"克鲁赛罗币符号","french franc sign":"法郎符号","lira sign":"里拉符号","mill sign":"密尔符号","naira sign":"奈拉符号","peseta sign":"比塞塔符号","rupee sign":"卢比符号","won sign":"韩元符号","new sheqel sign":"新谢克尔符号","dong sign":"越南盾符号","kip sign":"老挝基普符号","tugrik sign":"图格里克符号","drachma sign":"德拉克马符号","german penny symbol":"德国便士符号","peso sign":"比索符号","guarani sign":"瓜拉尼符号","austral sign":"澳元符号","hryvnia sign":"格里夫尼亚符号","cedi sign":"塞地符号","livre tournois sign":"里弗弗尔符号","spesmilo sign":"spesmilo符号","tenge sign":"坚戈符号","indian rupee sign":"印度卢比","turkish lira sign":"土耳其里拉","nordic mark sign":"北欧马克","manat sign":"马纳特符号","ruble sign":"卢布符号","yen character":"日元字样","yuan character":"人民币元字样","yuan character, in hong kong and taiwan":"元字样(港台地区)","yen/yuan character variant one":"元字样(大写)","Loading emoticons...":"加载表情符号...","Could not load emoticons":"不能加载表情符号",People:"人类","Animals and Nature":"动物和自然","Food and Drink":"食物和饮品",Activity:"活动","Travel and Places":"旅游和地点",Objects:"物件",Flags:"旗帜",Characters:"字符","Characters (no spaces)":"字符(无空格)","{0} characters":"{0} 个字符","Error: Form submit field collision.":"错误: 表单提交字段冲突。","Error: No form element found.":"错误: 没有表单控件。",Update:"更新","Color swatch":"颜色样本",Turquoise:"青绿色",Green:"绿色",Blue:"蓝色",Purple:"紫色","Navy Blue":"海军蓝","Dark Turquoise":"深蓝绿色","Dark Green":"深绿色","Medium Blue":"中蓝色","Medium Purple":"中紫色","Midnight Blue":"深蓝色",Yellow:"黄色",Orange:"橙色",Red:"红色","Light Gray":"浅灰色",Gray:"灰色","Dark Yellow":"暗黄色","Dark Orange":"深橙色","Dark Red":"深红色","Medium Gray":"中灰色","Dark Gray":"深灰色","Light Green":"浅绿色","Light Yellow":"浅黄色","Light Red":"浅红色","Light Purple":"浅紫色","Light Blue":"浅蓝色","Dark Purple":"深紫色","Dark Blue":"深蓝色",Black:"黑色",White:"白色","Switch to or from fullscreen mode":"切换全屏模式","Open help dialog":"打开帮助对话框",history:"历史",styles:"样式",formatting:"格式化",alignment:"对齐",indentation:"缩进","permanent pen":"记号笔",comments:"备注","Format Painter":"格式刷","Insert/edit iframe":"插入/编辑框架",Capitalization:"大写",lowercase:"小写",UPPERCASE:"大写","Title Case":"首字母大写","Permanent Pen Properties":"永久笔属性","Permanent pen properties...":"永久笔属性...",Font:"字体",Size:"字号","More...":"更多...","Spellcheck Language":"拼写检查语言","Select...":"选择...",Preferences:"首选项",Yes:"是",No:"否","Keyboard Navigation":"键盘指引",Version:"版本",Anchor:"锚点","Special character":"特殊符号","Code sample":"代码示例",Color:"颜色",Emoticons:"表情","Document properties":"文档属性",Image:"图片","Insert link":"插入链接",Target:"打开方式",Link:"链接",Poster:"封面",Media:"媒体",Print:"打印",Prev:"上一个","Find and replace":"查找和替换","Whole words":"全字匹配",Spellcheck:"拼写检查",Caption:"标题","Insert template":"插入模板"})},88785:function(){tinymce.IconManager.add("default",{icons:{"accessibility-check":'<svg width="24" height="24"><path d="M12 2a2 2 0 0 1 2 2 2 2 0 0 1-2 2 2 2 0 0 1-2-2c0-1.1.9-2 2-2Zm8 7h-5v12c0 .6-.4 1-1 1a1 1 0 0 1-1-1v-5c0-.6-.4-1-1-1a1 1 0 0 0-1 1v5c0 .6-.4 1-1 1a1 1 0 0 1-1-1V9H4a1 1 0 1 1 0-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 0 0-1.4 1.4l7.7 7.7 7.7-7.7a1 1 0 1 0-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 0 0 1.4-1.4L12 6.6l-7.7 7.7a1 1 0 0 0 1.4 1.4L12 9.4l6.3 6.3Z"/></svg>',addtag:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M15 5a2 2 0 0 1 1.6.8L21 12l-4.4 6.2a2 2 0 0 1-1.6.8h-3v-2h3l3.5-5L15 7H5v3H3V7c0-1.1.9-2 2-2h10Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M6 12a1 1 0 0 0-1 1v2H3a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2H7v-2c0-.6-.4-1-1-1Z"/></svg>',"align-center":'<svg width="24" height="24"><path d="M5 5h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm3 4h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm-3-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-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 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0 4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-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 1 1 0-2Zm0 4h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Zm0-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"align-none":'<svg width="24" height="24"><path d="M14.2 5 13 7H5a1 1 0 1 1 0-2h9.2Zm4 0h.8a1 1 0 0 1 0 2h-2l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h6.8Zm4 0H19a1 1 0 0 1 0 2h-4.4l1.2-2Zm-6.4 4-1.2 2H5a1 1 0 0 1 0-2h4.4Zm4 0H19a1 1 0 0 1 0 2h-6.8l1.2-2ZM7 17l-1.2 2H5a1 1 0 0 1 0-2h2Zm4 0h8a1 1 0 0 1 0 2H9.8l1.2-2Zm5.2-13.5 1.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 1 1 0-2Zm6 4h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 8h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-6-4h14c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',"arrow-left":'<svg width="24" height="24"><path d="m5.6 13 12 6a1 1 0 0 0 1.4-1V6a1 1 0 0 0-1.4-.9l-12 6a1 1 0 0 0 0 1.8Z" fill-rule="evenodd"/></svg>',"arrow-right":'<svg width="24" height="24"><path d="m18.5 13-12 6A1 1 0 0 1 5 18V6a1 1 0 0 1 1.4-.9l12 6a1 1 0 0 1 0 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 0 1-.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 0 0-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 0 1-.7.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7v-1c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3Zm0-10a1 1 0 0 1-.7-.3A1 1 0 0 1 11 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 0 1-.7.3Zm7 4c.3 0 .5.1.7.3.2.2.3.4.3.7 0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-1a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h1ZM7 12c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3H5a1 1 0 0 1-.7-.3A1 1 0 0 1 4 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.5.7.8c.2.1.3.4.3.6 0 .3-.1.6-.3.8a1 1 0 0 1-.8.3 1 1 0 0 1-.6-.3l-.8-.7a1 1 0 0 1-.3-.8c0-.2.1-.5.3-.7a1 1 0 0 1 1.4 0Zm-10-7-.7-.8a1 1 0 0 1-.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 0 1-.7.3 1 1 0 0 1-.8-.3Zm10 0a1 1 0 0 1-.8.3 1 1 0 0 1-.7-.3 1 1 0 0 1-.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 0 1 0 1.4l-.8.8a1 1 0 0 1-.6.3 1 1 0 0 1-.8-.3 1 1 0 0 1-.3-.8c0-.2.1-.5.3-.6l.7-.8ZM12 8a4 4 0 0 1 3.7 2.4 4 4 0 0 1 0 3.2A4 4 0 0 1 12 16a4 4 0 0 1-3.7-2.4 4 4 0 0 1 0-3.2A4 4 0 0 1 12 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 0 1 2 2v12a2 2 0 0 1-2 2h-4v-2h4V8H5v10h4v2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9.4-2.3 2.3a1 1 0 1 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 0 1-1.4 1.4L13 13.4V20a1 1 0 0 1-2 0v-6.6Z" fill-rule="nonzero"/></svg>',cancel:'<svg width="24" height="24"><path d="M12 4.6a7.4 7.4 0 1 1 0 14.8 7.4 7.4 0 0 1 0-14.8ZM12 3a9 9 0 1 0 0 18 9 9 0 0 0 0-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 2 1.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 0 1-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 0 1-2-2v-5h2zm8-7V4h6a2 2 0 0 1 2 2h-8z" opacity=".2"/><path fill-rule="nonzero" d="M13 4v2H5v7H3V6c0-1.1.9-2 2-2h8zm-2.6 14.1.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 11-2 2H5v-2h6V6h2z"/><path fill-rule="nonzero" d="m18.4 8 1 1-1.8 1.9 4 4c.5.4.5 1.1 0 1.6l-4.3 4.2a1.2 1.2 0 0 1-1.6 0l-4.4-4.2c-.4-.5-.4-1.2 0-1.7l7-6.8Zm1.6 7-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 0 1-.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 0 1-1 .7h-.2a.7.7 0 0 1-.7-1l4-12a1 1 0 0 1 2 0l4 12a.7.7 0 0 1-.8 1h-.2a1 1 0 0 1-1-.7l-.8-2.6zm-.3-1.5-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.2V18.7l-.6.3H7c-.4 0-.7 0-1-.2a1 1 0 0 1-.3-.9c0-.3 0-.6.3-.8.3-.2.7-.4 1.2-.4l.6-.2h.3v-.2l-.1-.2a.8.8 0 0 0-.5-.1 1 1 0 0 0-.4 0l-.3.4h-1Zm2.3.8h-.2l-.2.1-.4.1a1 1 0 0 0-.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 0 0 1.2 0l.2-.8c0-.4 0-.6-.2-.8a.7.7 0 0 0-.6-.3l-.6.3-.2.8Zm6.1-.5c0-.2 0-.3-.2-.4a.8.8 0 0 0-.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 0 1-1.3.4c-.5 0-1-.2-1.3-.6a2 2 0 0 1-.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 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-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 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2h-8a1 1 0 0 1 0-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 0 1 0-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 0 1 0-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 0 1 0-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 0 1 1.6 1.2l-8 12a1 1 0 0 1-1.5.1l-5-5a1 1 0 1 1 1.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 0 1 0-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.3 4 5l3.8 3.7c.3.3.3.8 0 1-.4.4-.9.4-1.2 0L2.2 5.7a.8.8 0 0 1 0-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 0 1 0-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 0 1 0-1.1L6 5 2.2 1.3Z" fill-rule="nonzero"/></svg>',"chevron-up":'<svg width="10" height="10"><path d="M8.7 7.8 5 4 1.3 7.8c-.3.3-.8.3-1 0a.8.8 0 0 1 0-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.2 13.4 12l3.9 3.8a1 1 0 0 1-1.5 1.5L12 13.4l-3.8 3.9a1 1 0 0 1-1.5-1.5l3.9-3.8-3.9-3.8a1 1 0 0 1 1.5-1.5l3.8 3.9 3.8-3.9a1 1 0 0 1 1.5 1.5Z" fill-rule="evenodd"/></svg>',"code-sample":'<svg width="24" height="26"><path d="M7.1 11a2.8 2.8 0 0 1-.8 2 2.8 2.8 0 0 1 .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 0 1-.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 0 1-.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 0 1-.4-.4v-.8c0-.2.1-.4.4-.4.3 0 .6-.1.8-.4.3-.2.4-.5.4-.8V15a2.8 2.8 0 0 1 .8-2 2.8 2.8 0 0 1-.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 0 1-1.1 1c-.4.3-.8.4-1.1.4a.5.5 0 0 1-.5-.5V17a3 3 0 0 0 1-.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 0 1 18 14c0 .5 0 1-.2 1.4 0 .4-.3.9-.5 1.3a6.2 6.2 0 0 1-3.7 3 5.7 5.7 0 0 1-3.2 0A5.9 5.9 0 0 1 7.6 18a6.2 6.2 0 0 1-1.4-2.6 6.7 6.7 0 0 1 0-2.8c0-.4.1-.9.3-1.3a13.6 13.6 0 0 1 2.3-4A20 20 0 0 1 12 4a26.4 26.4 0 0 1 3.2 3.4 18.2 18.2 0 0 1 2.3 4Zm-2 4.5c.4-.7.5-1.4.5-2a7.3 7.3 0 0 0-1-3.2c.2.6.2 1.2.2 1.9a4.5 4.5 0 0 1-1.3 3 5.3 5.3 0 0 1-2.3 1.5 4.9 4.9 0 0 1-2 .1 4.3 4.3 0 0 0 2.4.8 4 4 0 0 0 2-.6 4 4 0 0 0 1.5-1.5Z" fill-rule="evenodd"/></svg>',"color-picker":'<svg width="24" height="24"><path d="M12 3a9 9 0 0 0 0 18 1.5 1.5 0 0 0 1.1-2.5c-.2-.3-.4-.6-.4-1 0-.8.7-1.5 1.5-1.5H16a5 5 0 0 0 5-5c0-4.4-4-8-9-8Zm-5.5 9a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3-4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Zm3 4a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3Z" fill-rule="nonzero"/></svg>',"color-swatch-remove-color":'<svg width="24" height="24"><path stroke="#000" stroke-width="2" d="M21 3 3 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 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/><path d="M13 10h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 0v-2H9a1 1 0 0 1 0-2h2V8a1 1 0 0 1 2 0v2Z"/></g></svg>',comment:'<svg width="24" height="24"><path fill-rule="nonzero" d="m9 19 3-2h7c.6 0 1-.4 1-1V6c0-.6-.4-1-1-1H5a1 1 0 0 0-1 1v10c0 .6.4 1 1 1h4v2Zm-2 4v-4H5a3 3 0 0 1-3-3V6a3 3 0 0 1 3-3h14a3 3 0 0 1 3 3v10a3 3 0 0 1-3 3h-6.4L7 23Z"/></svg>',contrast:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Zm-6 8a6 6 0 0 0 6 6V6a6 6 0 0 0-6 6Z" fill-rule="evenodd"/></svg>',copy:'<svg width="24" height="24"><path d="M16 3H6a2 2 0 0 0-2 2v11h2V5h10V3Zm1 4a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2h-7a2 2 0 0 1-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 0 1-1-1v-2H7V9H5a1 1 0 1 1 0-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 0 1 10.5 8v.5l1 1 4-4 1-.5a3.3 3.3 0 0 1 2 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 0 1 7 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 0 0-.7.4v.1a2.8 2.8 0 0 0-.6.8l-.1.4v.7l.2.5.5.2h.7a2.6 2.6 0 0 0 .8-.3 2.4 2.4 0 0 0 .7-.7 2.5 2.5 0 0 0 .3-.8 1.5 1.5 0 0 0 0-.8 1 1 0 0 0-.2-.4 1 1 0 0 0-.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 0 0-.5.3 1 1 0 0 0-.2.5v.7a2.5 2.5 0 0 0 .3.8l.2.3h.1l.4.4.4.2.4.1h.7L9 9l.2-.4a1.6 1.6 0 0 0 0-.8 2.6 2.6 0 0 0-.3-.8A2.5 2.5 0 0 0 7.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 0 1-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 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l2 2V3h14ZM8.5 15.3h-.3a2.6 2.6 0 0 0-.8.4 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3L9 18V18l.4-.4.2-.4.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2h-.5Zm7 0H15a1 1 0 0 0-.4.3 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4a2.8 2.8 0 0 0 .5.7h.1a2.8 2.8 0 0 0 .8.6l.4.1h.7l.5-.2.2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.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 0 1-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 0 1 8.6 14H9l1-1-4-4-.5-1a3.3 3.3 0 0 1 0-2c0-.4.3-.7.5-1l6 6 6-6 .5 1a3.3 3.3 0 0 1 0 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.2.1-.4v-.7a1 1 0 0 0-.2-.5 1 1 0 0 0-.4-.2 1.6 1.6 0 0 0-.8 0 2.6 2.6 0 0 0-.8.3 2.5 2.5 0 0 0-.9 1.1l-.1.4v.7l.2.5.5.2h.7a2.5 2.5 0 0 0 .8-.3 2.8 2.8 0 0 0 1-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 4 .2-.5v-.7a2.6 2.6 0 0 0-.3-.8 2.4 2.4 0 0 0-.7-.7 2.5 2.5 0 0 0-.8-.3 1.5 1.5 0 0 0-.8 0 1 1 0 0 0-.4.2 1 1 0 0 0-.2.5 1.5 1.5 0 0 0 0 .7v.4l.3.4.3.4a2.8 2.8 0 0 0 .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 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-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 0 1-2 2h-7a2 2 0 0 1-2-2V9c0-1.2.9-2 2-2h7a2 2 0 0 1 2 2v2Z"/><path d="M17 14h1a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1h-1a1 1 0 0 1 0-2h1v-1a1 1 0 0 1 2 0v1Z"/></g></svg>',"edit-block":'<svg width="24" height="24"><path fill-rule="nonzero" d="m19.8 8.8-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-.2 1-.9v-.3l-2.2-2.2a.3.3 0 0 0-.3 0l-1 1L18 8.5Zm-1 1-2.5-2.4-6 6 2.5 2.5 6-6Zm-7 7.1-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 0 0-2-2H7v2h11v9ZM6 17h15a1 1 0 0 1 0 2h-1v1a1 1 0 0 1-2 0v-1H6a2 2 0 0 1-2-2V7H3a1 1 0 1 1 0-2h1V4a1 1 0 1 1 2 0v13Zm3-5.3 1.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 0 1 19 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 0 0 8 19h3ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm11.8 9c.4-1.9 1-3.4 1.8-4.5a9.2 9.2 0 0 0-4 4.5h2.2Zm-3.4 0a12 12 0 0 1 2.8-4 12 12 0 0 0-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 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm4.8 2.6 5.6 4a.5.5 0 0 1 0 .8l-5.6 4A.5.5 0 0 1 9 16V8a.5.5 0 0 1 .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 0 0-1 1c0 .6.4 1 1 1Zm6 0c.6 0 1-.4 1-1s-.4-1-1-1a1 1 0 0 0-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 1 0 0 16 8 8 0 0 0 0-16Zm0 14.5a6.5 6.5 0 1 1 0-13 6.5 6.5 0 0 1 0 13Z" fill-rule="nonzero"/></svg>',export:'<svg width="24" height="24"><g fill-rule="nonzero"><path d="M14.4 3 18 7v1h-5V5H7v14h9a1 1 0 0 1 2 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 0 1 1.4.2l2.4 3.6-2.4 3.6a1 1 0 0 1-1.7-1v-.2l1.7-2.4-1.6-2.4a1 1 0 0 1 .2-1.4Z"/></g></svg>',fill:'<svg width="24" height="26"><path d="m16.6 12-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 0 0 2.2 0l5.5-5.5c.5-.6.5-1.6 0-2.2ZM5.2 13 10 8.2l4.8 4.8H5.2ZM19 14.5s-2 2.2-2 3.5c0 1.1.9 2 2 2a2 2 0 0 0 2-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 0 0-2 2Zm14-2v2h2a2 2 0 0 0-2-2Zm-7 16h2V3h-2v18Zm7-6h2v-2h-2v2Zm-4-8h2V5h-2v2Zm4 12a2 2 0 0 0 2-2h-2v2Z" fill-rule="nonzero"/></svg>',"flip-vertically":'<svg width="24" height="24"><path d="M5 14v2h2v-2H5Zm8 4v2h2v-2h-2Zm4-14H7a2 2 0 0 0-2 2v3h2V6h10v3h2V6a2 2 0 0 0-2-2Zm2 14h-2v2a2 2 0 0 0 2-2ZM3 11v2h18v-2H3Zm6 7v2h2v-2H9Zm8-4v2h2v-2h-2ZM5 18c0 1.1.9 2 2 2v-2H5Z" fill-rule="nonzero"/></svg>',footnote:'<svg width="24" height="24"><path d="M19 13c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h14Z"/><path fill-rule="evenodd" clip-rule="evenodd" d="M19 4v6h-1V5h-1.5V4h2.6Z"/><path d="M12 18c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 1 1 0-2h7ZM14 8c.6 0 1 .4 1 1s-.4 1-1 1H5a1 1 0 0 1 0-2h9Z"/></svg>',"format-painter":'<svg width="24" height="24"><path d="M18 5V4c0-.5-.4-1-1-1H5a1 1 0 0 0-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 0 1 0 2h-4v11a1 1 0 0 1-2 0V7H7a1 1 0 1 1 0-2h10Z"/></svg>',fullscreen:'<svg width="24" height="24"><path d="m15.3 10-1.2-1.3 2.9-3h-2.3a.9.9 0 1 1 0-1.7H19c.5 0 .9.4.9.9v4.4a.9.9 0 1 1-1.8 0V7l-2.9 3Zm0 4 3 3v-2.3a.9.9 0 1 1 1.7 0V19c0 .5-.4.9-.9.9h-4.4a.9.9 0 1 1 0-1.8H17l-3-2.9 1.3-1.2ZM10 15.4l-2.9 3h2.3a.9.9 0 1 1 0 1.7H5a.9.9 0 0 1-.9-.9v-4.4a.9.9 0 1 1 1.8 0V17l2.9-3 1.2 1.3ZM8.7 10 5.7 7v2.3a.9.9 0 0 1-1.7 0V5c0-.5.4-.9.9-.9h4.4a.9.9 0 0 1 0 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.7 2.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-3-2.5-2.4-6.4 6.5H19v-4ZM4 6h16c.6 0 1 .4 1 1v13c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V7c0-.6.4-1 1-1Zm6 7a2 2 0 1 1 0-4 2 2 0 0 1 0 4ZM4.5 4h15a.5.5 0 1 1 0 1h-15a.5.5 0 0 1 0-1Zm2-2h11a.5.5 0 1 1 0 1h-11a.5.5 0 0 1 0-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 0 1-1-1V4c0-.6.4-1 1-1Zm1 2v14h14V5H5Zm6.5 11.8V14L9.2 8.7a5.1 5.1 0 0 0-.4-.8l-.1-.2H8v-1l.3-.1.3-.1h.7a1 1 0 0 1 .6.5l.1.3a8.5 8.5 0 0 1 .3.6l1.9 4.6 2-5.2a1 1 0 0 1 1-.6.5.5 0 0 1 .5.6L13 14v2.8a.7.7 0 0 1-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 0 0-6 9 6.3 6.3 0 0 0 1.4 2l1 1a6.3 6.3 0 0 0 3.6 1 6.5 6.5 0 0 0 6-9 6.3 6.3 0 0 0-1.4-2l-1-1a6.3 6.3 0 0 0-3.6-1ZM12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 4Z"/><path d="M9.6 9.7a.7.7 0 0 1-.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 0 0-.8.8.8.8 0 0 1-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 0 1 2.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 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',image:'<svg width="24" height="24"><path d="m5 15.7 3.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-3-2.5-2.4-6.4 6.5H19v-4ZM4 3h16c.6 0 1 .4 1 1v16c0 .6-.4 1-1 1H4a1 1 0 0 1-1-1V4c0-.6.4-1 1-1Zm6 8a2 2 0 1 0 0-4 2 2 0 0 0 0 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 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm-2.6-3.8L6.2 12l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',info:'<svg width="24" height="24"><path d="M12 4a7.8 7.8 0 0 1 5.7 2.3A8 8 0 1 1 12 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 0 0 1.8-2.9 6.3 6.3 0 0 0-.1-4.1 5.8 5.8 0 0 0-3-3.2c-.6-.3-1.3-.5-2.1-.5a5.1 5.1 0 0 0-3.9 1.8 6.3 6.3 0 0 0-1.3 6 6.2 6.2 0 0 0 1.8 3l1.4.9V20H4v-4l1 2h4v-.5l-2-1L5.4 15A6.5 6.5 0 0 1 4 11c0-1 .2-1.9.6-2.7A7 7 0 0 1 6.3 6C7.1 5.4 8 5 9 4.5c1-.3 2-.5 3.1-.5a8.8 8.8 0 0 1 5.7 2 7 7 0 0 1 1.7 2.3 6 6 0 0 1 .2 4.8c-.2.7-.6 1.3-1 1.9a7.6 7.6 0 0 1-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 1 0 0-14 7 7 0 0 0 0 14Zm0 2a9 9 0 1 1 0-18 9 9 0 0 1 0 18Z"/><path d="M16 12h-3V7c0-.6-.4-1-1-1a1 1 0 0 0-1 1v7h5c.6 0 1-.4 1-1s-.4-1-1-1Z"/></g></svg>',invert:'<svg width="24" height="24"><path d="M18 19.3 16.5 18a5.8 5.8 0 0 1-3.1 1.9 6.1 6.1 0 0 1-5.5-1.6A5.8 5.8 0 0 1 6 14v-.3l.1-1.2A13.9 13.9 0 0 1 7.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 0 0 .2-1v-.2c0-.4 0-.8-.2-1.3l-.5-1.4a14.8 14.8 0 0 0-3-4.2L12 6a26.1 26.1 0 0 0-2.2 2.5l-1-1a20.9 20.9 0 0 1 2.9-3.3L12 4l1 .8a22.2 22.2 0 0 1 4 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.7-.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 1 1 0 18 9 9 0 0 1 0-18Zm4.3 13.3c-.5 1-1.2 2-2 2.9a7.5 7.5 0 0 0 3.2-2.1l-.2-.2a6 6 0 0 0-1-.6Zm-8.6 0c-.5.2-.9.5-1.2.8.9 1 2 1.7 3.2 2a10 10 0 0 1-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 0 1-.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.4-.3.1-1.3.8c.3.8.5 1.6.5 2.6h2.3a7.5 7.5 0 0 0-1.3-3.5Zm-9 0 2 .2V5.5a9 9 0 0 0-2 2.2Zm3.5-2.3V8c.6 0 1.3 0 1.9-.2a9 9 0 0 0-2-2.3Zm-3-.7h-.1c-1.1.4-2.1 1-3 1.8l1.2.7a10 10 0 0 1 1.9-2.5Zm4.4 0 .1.1a10 10 0 0 1 1.8 2.4l1.1-.7a7.5 7.5 0 0 0-3-1.8Z"/></svg>',"line-height":'<svg width="24" height="24"><path d="M21 5a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zm0 4a1 1 0 0 1 .1 2H13a1 1 0 0 1-.1-2H21zM7 3.6l3.7 3.7a1 1 0 0 1-1.3 1.5h-.1L8 7.3v9.2l1.3-1.3a1 1 0 0 1 1.3 0h.1c.4.4.4 1 0 1.3v.1L7 20.4l-3.7-3.7a1 1 0 0 1 1.3-1.5h.1L6 16.7V7.4L4.7 8.7a1 1 0 0 1-1.3 0h-.1a1 1 0 0 1 0-1.3v-.1L7 3.6z"/></svg>',line:'<svg width="24" height="24"><path d="m15 9-8 8H4v-3l8-8 3 3Zm1-1-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 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2-2a2 2 0 1 0-2.6-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.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 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 26a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 6ZM11 36a2 2 0 1 0 0-4 2 2 0 0 0 0 4Zm0 1a3 3 0 1 1 0-6 3 3 0 0 1 0 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.8h-.1l-1.5 1v-1.1l1.6-1.1h1.2v6zM33.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.6 34.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 0 0-.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 0 0-.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 17-.5-1.4h-2l-.5 1.4H35l2-6h1.6l2 6h-1.3Zm-1.6-4.7-.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 17-.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 0 1-.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 0 0-.3-.7A1 1 0 0 0 13 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.3.7Z" fill-rule="evenodd"/></svg>',ltr:'<svg width="24" height="24"><path d="M11 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 7.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L11 5ZM4.4 16.2 6.2 15l-1.8-1.2a1 1 0 0 1 1.2-1.6l3 2a1 1 0 0 1 0 1.6l-3 2a1 1 0 1 1-1.2-1.6Z" fill-rule="evenodd"/></svg>',minus:'<svg width="24" height="24"><path d="M19 11a1 1 0 0 1 .1 2H5a1 1 0 0 1-.1-2H19Z"/></svg>',"more-drawer":'<svg width="24" height="24"><path d="M6 10a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm12 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Zm-6 0a2 2 0 0 0-2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2 2 2 0 0 0-2-2Z" fill-rule="nonzero"/></svg>',"new-document":'<svg width="24" height="24"><path d="M14.4 3H7a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h10a2 2 0 0 0 2-2V7.6L14.4 3ZM17 19H7V5h6v4h4v10Z" fill-rule="nonzero"/></svg>',"new-tab":'<svg width="24" height="24"><path d="m15 13 2-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 1 1 0-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 0 1-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="M15.5 4 20 8.5v7L15.5 20h-7L4 15.5v-7L8.5 4h7ZM13 17v-2h-2v2h2Zm0-4V7h-2v6h2Z" fill-rule="evenodd" clip-rule="evenodd"/></svg>',"ordered-list-rtl":'<svg width="24" height="24"><path d="M6 17h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 0 1 0-2Zm0-6h8a1 1 0 0 1 0 2H6a1 1 0 1 1 0-2Zm13-1v3.5a.5.5 0 1 1-1 0V5h-.5a.5.5 0 1 1 0-1H19Zm-1 8.8.2.2h1.3a.5.5 0 1 1 0 1h-1.6a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2h-1.3a.5.5 0 0 1-.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 0 1 0-1h1.2a.3.3 0 1 0 0-.6h-1.3a.4.4 0 1 1 0-.8h1.3a.3.3 0 0 0 0-.6h-1.2a.5.5 0 1 1 0-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 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0-6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 1 1 0-2ZM6 4v3.5c0 .3-.2.5-.5.5a.5.5 0 0 1-.5-.5V5h-.5a.5.5 0 0 1 0-1H6Zm-1 8.8.2.2h1.3c.3 0 .5.2.5.5s-.2.5-.5.5H4.9a1 1 0 0 1-.9-1V13c0-.4.3-.8.6-1l1.2-.4.2-.3a.2.2 0 0 0-.2-.2H4.5a.5.5 0 0 1-.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 0 1 0-1h1.2c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.4a.4.4 0 1 1 0-.8h1.3c.2 0 .3-.1.3-.3 0-.2-.1-.3-.3-.3H4.5a.5.5 0 1 1 0-1H6c.6 0 1 .4 1 1Z" fill-rule="evenodd"/></svg>',orientation:'<svg width="24" height="24"><path d="M7.3 6.4 1 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 0 1 0-1.2L13.6.2c.3-.3.9-.3 1.2 0 .3.3.3.8 0 1.1L12 4h1a9 9 0 1 1-4.3 16.9l1.5-1.5A7 7 0 1 0 13 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 1 1 0-2Zm5 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm0 4h7c.6 0 1 .4 1 1s-.4 1-1 1h-7a1 1 0 0 1 0-2Zm-5 4h12a1 1 0 0 1 0 2H7a1 1 0 0 1 0-2Zm1.6-3.8a1 1 0 0 1-1.2 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 0 1 1.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 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h1c.6 0 1 .4 1 1s-.4 1-1 1h-1a1 1 0 0 1 0-2Zm4 0c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2ZM7 3v5h10V3c0-.6.4-1 1-1s1 .4 1 1v7H5V3c0-.6.4-1 1-1s1 .4 1 1ZM6 22a1 1 0 0 1-1-1v-7h14v7c0 .6-.4 1-1 1a1 1 0 0 1-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 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L10 5Z"/></svg>',"paste-column-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h7v2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm8 7v12h-6V8h6Zm-1.5 1.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-column-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V18c0 1-.8 2-1.9 2H11v-2h7V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v2H4V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm-2 7v12H4V8h6ZM8.5 9.5h-3v9h3v-9ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-after":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V11h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h14c0 1-.8 2-1.9 2H6c-1 0-2-.8-2-1.9V5c0-1 .8-2 1.9-2H9.2A3 3 0 0 1 12 1Zm10 11v5H8v-5h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-row-before":'<svg width="24" height="24"><path fill-rule="evenodd" d="M12 1a3 3 0 0 1 2.8 2H18c1 0 2 .8 2 1.9V7h-2V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-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 0 1 12 1Zm10 7v5H8V8h14Zm-1.5 1.5h-11v2h11v-2ZM12 3a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>',"paste-text":'<svg width="24" height="24"><path d="M18 9V5h-2v1c0 .6-.4 1-1 1H9a1 1 0 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-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 0 1-1-1V5H6v13h3V9h9ZM9 20H6a2 2 0 0 1-2-2V5c0-1.1.9-2 2-2h3.2A3 3 0 0 1 12 1a3 3 0 0 1 2.8 2H18a2 2 0 0 1 2 2v4h1v12H9v-1Zm1.5-9.5v9h9v-9h-9ZM12 3a1 1 0 0 0-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.5 8 20H3v-3l3.5-3.5a2 2 0 0 1 0-3L14 3l1 1-7.3 7.3a1 1 0 0 0 0 1.4l3.6 3.6c.4.4 1 .4 1.4 0L20 9l1 1-7.6 7.6a2 2 0 0 1-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 0 1 .1 2H13v6a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.1-2H11V5c0-.6.4-1 1-1Z"/></svg>',preferences:'<svg width="24" height="24"><path d="m20.1 13.5-1.9.2a5.8 5.8 0 0 1-.6 1.5l1.2 1.5c.4.4.3 1 0 1.4l-.7.7a1 1 0 0 1-1.4 0l-1.5-1.2a6.2 6.2 0 0 1-1.5.6l-.2 1.9c0 .5-.5.9-1 .9h-1a1 1 0 0 1-1-.9l-.2-1.9a5.8 5.8 0 0 1-1.5-.6l-1.5 1.2a1 1 0 0 1-1.4 0l-.7-.7a1 1 0 0 1 0-1.4l1.2-1.5a6.2 6.2 0 0 1-.6-1.5l-1.9-.2a1 1 0 0 1-.9-1v-1c0-.5.4-1 .9-1l1.9-.2a5.8 5.8 0 0 1 .6-1.5L5.2 7.3a1 1 0 0 1 0-1.4l.7-.7a1 1 0 0 1 1.4 0l1.5 1.2a6.2 6.2 0 0 1 1.5-.6l.2-1.9c0-.5.5-.9 1-.9h1c.5 0 1 .4 1 .9l.2 1.9a5.8 5.8 0 0 1 1.5.6l1.5-1.2a1 1 0 0 1 1.4 0l.7.7c.3.4.4 1 0 1.4l-1.2 1.5a6.2 6.2 0 0 1 .6 1.5l1.9.2c.5 0 .9.5.9 1v1c0 .5-.4 1-.9 1ZM12 15a3 3 0 1 0 0-6 3 3 0 0 0 0 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 0 0 2.1-2.8 15.7 15.7 0 0 0-2.1-2.8c-2-2-4.2-3.2-6.7-3.2a9.3 9.3 0 0 0-6.7 3.2A16.2 16.2 0 0 0 3.2 12c0 .2.2.3.3.5Zm-2.4-1 .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 0 1 2.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 0 1-2.8-3.7 1 1 0 0 1 0-1Zm12-3.3a2 2 0 1 0 2.7 2.6 4 4 0 1 1-2.6-2.6Z" fill-rule="nonzero"/></svg>',print:'<svg width="24" height="24"><path d="M18 8H6a3 3 0 0 0-3 3v6h2v3h14v-3h2v-6a3 3 0 0 0-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 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .8 1.3Zm8 0h.9c.4 0 .7-.2.9-.6L19 13V8c0-.6-.4-1-1-1h-4a1 1 0 0 0-1 1v4c0 .6.4 1 1 1h2l-1.3 2.7a1 1 0 0 0 .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 1 1-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 1 1 1.4-1.4l5 5a1 1 0 0 1 0 1.4l-5 5a1 1 0 0 1-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.1-1.2-4.7v-.2a1 1 0 0 1 1-1l5 .4a1 1 0 1 1-.2 2l-2.2-.2a7.8 7.8 0 0 0 8.4.2 7.5 7.5 0 0 0 3.5-6.4 1 1 0 1 1 2 0 9.5 9.5 0 0 1-4.5 8 9.9 9.9 0 0 1-10.2 0l.4 1.4a1 1 0 1 1-2 .5ZM13.6 7.4c0-.5.5-1 1-.9l2.8.2a8 8 0 0 0-9.5-1 7.5 7.5 0 0 0-3.6 7 1 1 0 0 1-2 0 9.5 9.5 0 0 1 4.5-8.6 10 10 0 0 1 10.9.3l-.3-1a1 1 0 0 1 2-.5l1.1 4.8a1 1 0 0 1-1 1.2l-5-.4a1 1 0 0 1-.9-1Z"/></g></svg>',"remove-formatting":'<svg width="24" height="24"><path d="M13.2 6a1 1 0 0 1 0 .2l-2.6 10a1 1 0 0 1-1 .8h-.2a.8.8 0 0 1-.8-1l2.6-10H8a1 1 0 1 1 0-2h9a1 1 0 0 1 0 2h-3.8ZM5 18h7a1 1 0 0 1 0 2H5a1 1 0 0 1 0-2Zm13 1.5L16.5 18 15 19.5a.7.7 0 0 1-1-1l1.5-1.5-1.5-1.5a.7.7 0 0 1 1-1l1.5 1.5 1.5-1.5a.7.7 0 0 1 1 1L17.5 17l1.5 1.5a.7.7 0 0 1-1 1Z" fill-rule="evenodd"/></svg>',remove:'<svg width="24" height="24"><path d="M16 7h3a1 1 0 0 1 0 2h-1v9a3 3 0 0 1-3 3H9a3 3 0 0 1-3-3V9H5a1 1 0 1 1 0-2h3V6a3 3 0 0 1 3-3h2a3 3 0 0 1 3 3v1Zm-2 0V6c0-.6-.4-1-1-1h-2a1 1 0 0 0-1 1v1h4Zm2 2H8v9c0 .6.4 1 1 1h6c.6 0 1-.4 1-1V9Zm-7 3a1 1 0 0 1 2 0v4a1 1 0 0 1-2 0v-4Zm4 0a1 1 0 0 1 2 0v4a1 1 0 0 1-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 1 1 9 2l-7 7A.5.5 0 1 1 1 8l7-7ZM8.1 5.1A.5.5 0 1 1 9 6l-3 3A.5.5 0 1 1 5 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 0 1-.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 0 1-.7.3h-6a1 1 0 0 1-.7-.3 1 1 0 0 1-.3-.7c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3.6L6 7.4V11c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3 1 1 0 0 1-.7-.3A1 1 0 0 1 4 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 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></g></svg>',"rotate-left":'<svg width="24" height="24"><path d="M4.7 10H9a1 1 0 0 1 0 2H3a1 1 0 0 1-1-1V5a1 1 0 1 1 2 0v3l2.5-2.4a9.2 9.2 0 0 1 10.8-1.5A9 9 0 0 1 13.4 21c-2.4.1-4.7-.7-6.5-2.2a1 1 0 1 1 1.3-1.5 7.2 7.2 0 0 0 11.6-3.7 7 7 0 0 0-3.5-7.7A7.2 7.2 0 0 0 8 7L4.7 10Z" fill-rule="nonzero"/></svg>',"rotate-right":'<svg width="24" height="24"><path d="M20 8V5a1 1 0 0 1 2 0v6c0 .6-.4 1-1 1h-6a1 1 0 0 1 0-2h4.3L16 7A7.2 7.2 0 0 0 7.7 6a7 7 0 0 0 3 13.1c1.9.1 3.7-.5 5-1.7a1 1 0 0 1 1.4 1.5A9.2 9.2 0 0 1 2.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 0 1 4.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.8-1.8L8 5Zm12 11.2a1 1 0 1 1-1 1.6l-3-2a1 1 0 0 1 0-1.6l3-2a1 1 0 1 1 1 1.6L18.4 15l1.8 1.2Z" fill-rule="evenodd"/></svg>',save:'<svg width="24" height="24"><path d="M5 16h14a2 2 0 0 1 2 2v2a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-2c0-1.1.9-2 2-2Zm0 2v2h14v-2H5Zm10 0h2v2h-2v-2Zm-4-6.4L8.7 9.3a1 1 0 1 0-1.4 1.4l4 4c.4.4 1 .4 1.4 0l4-4a1 1 0 1 0-1.4-1.4L13 11.6V4a1 1 0 0 0-2 0v7.6Z" fill-rule="nonzero"/></svg>',search:'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z" fill-rule="nonzero"/></svg>',"select-all":'<svg width="24" height="24"><path d="M3 5h2V3a2 2 0 0 0-2 2Zm0 8h2v-2H3v2Zm4 8h2v-2H7v2ZM3 9h2V7H3v2Zm10-6h-2v2h2V3Zm6 0v2h2a2 2 0 0 0-2-2ZM5 21v-2H3c0 1.1.9 2 2 2Zm-2-4h2v-2H3v2ZM9 3H7v2h2V3Zm2 18h2v-2h-2v2Zm8-8h2v-2h-2v2Zm0 8a2 2 0 0 0 2-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 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm3.6 10.9L7 12.3a.7.7 0 0 0-1 1L9.6 17 18 8.6a.7.7 0 0 0 0-1 .7.7 0 0 0-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 0 1-.2-.6V8H5a1 1 0 1 1 0-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 0 1-.2-.6V13H5a1 1 0 0 1 0-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 0 1-.2-.6V18H5a1 1 0 0 1 0-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 6 4 4-8 9-8-9 4-4h8Zm-4 10.2 5.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 0 1 0-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 0 0-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 0 1-.7-.3 1 1 0 0 1-.3-.7V5c0-.3.1-.5.3-.7.2-.2.4-.3.7-.3h3v1Zm-5 1.5-.1.7c-.1.2-.3.3-.6.3.3 0 .5.1.6.3l.1.7V10c0 .3-.1.5-.3.7a1 1 0 0 1-.7.3h-3V4h3c.3 0 .5.1.7.3.2.2.3.4.3.7v1.5ZM13 10V8h-2v2h2Zm0-3V5h-2v2h2Zm3 5 1 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 0 1 7 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 0 1 0 2H5a1 1 0 0 1 0-2Z" fill-rule="nonzero"/></g></svg>',subscript:'<svg width="24" height="24"><path d="m10.4 10 4.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 0 0-.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 0 1-1.3 1.3l-.6.6h2.6V19Z" fill-rule="nonzero"/></svg>',superscript:'<svg width="24" height="24"><path d="M15 9.4 10.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 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v7h-8v-2h6V6h-6V4Z" opacity=".2"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v7h-8v7H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-8 9H5v5h6v-5Zm8-7h-6v5h6V6Zm-8 0H5v5h6V6Z"/><path d="m18 20-2.6 1.6.7-3-2.4-2 3.1-.2 1.2-2.9 1.2 2.9 3.1.2-2.4 2 .7 3z"/></g></svg>',"table-delete-column":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm-4 4h-2V6h-2v2H9V6H5v12h4v-2h2v2h2v-2h2v2h4V6h-4v2Zm.3.5 1 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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14Zm0 2H5v3h2.5v2H5v2h2.5v2H5v3h14v-3h-2.5v-2H19v-2h-2.5V9H19V6Zm-4.7 1.8 1.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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 6v12h14V6H5Z"/><path d="m14.4 8.6 1.1 1-2.4 2.4 2.4 2.4-1.1 1.1-2.4-2.4-2.4 2.4-1-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 0 1-2 0V6h-8v12h8v-1a1 1 0 0 1 2 0v2c0 .5-.4 1-.9 1H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h15ZM9 13H5v5h4v-5Zm7-5c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H17v2a1 1 0 0 1-2 .1V13h-2a1 1 0 0 1-.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 0 1 2 2v12a2 2 0 0 1-2 2H4a1 1 0 0 1-1-1v-2a1 1 0 0 1 2 0v1h8V6H5v1a1 1 0 1 1-2 0V5c0-.6.4-1 1-1h15Zm0 9h-4v5h4v-5ZM8 8c.5 0 1 .4 1 .9V11h2a1 1 0 0 1 .1 2H9v2a1 1 0 0 1-2 .1V13H5a1 1 0 0 1-.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 1 1 0 2H5v6h14V6h-1a1 1 0 0 1 0-2h2c.6 0 1 .4 1 1v13a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5c0-.6.4-1 1-1h2Zm5 10H5v4h6v-4Zm8 0h-6v4h6v-4ZM12 3c.5 0 1 .4 1 .9V6h2a1 1 0 0 1 0 2h-2v2a1 1 0 0 1-2 .1V8H9a1 1 0 0 1 0-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 0 1 .1 2H13v2a1 1 0 0 1-2 .1V18H9a1 1 0 0 1-.1-2H11v-2c0-.6.4-1 1-1Zm6 7a1 1 0 0 1 0-2h1v-6H5v6h1a1 1 0 0 1 0 2H4a1 1 0 0 1-1-1V6c0-1.1.9-2 2-2h14a2 2 0 0 1 2 2v13c0 .5-.4 1-.9 1H18ZM11 6H5v4h6V6Zm8 0h-6v4h6V6Z"/></svg>',"table-left-header":'<svg width="24" height="24"><path d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 0-2 2v13c0 1.1.9 2 2 2h12a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2H6Zm0 12h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 11h8v3H6v-3Zm11 0c.6 0 1 .4 1 1v1a1 1 0 0 1-2 0v-1c0-.6.4-1 1-1ZM6 6h8v3H6V6Zm11 0c.6 0 1 .4 1 1v1a1 1 0 1 1-2 0V7c0-.6.4-1 1-1Z"/></svg>',"table-row-numbering":'<svg width="24" height="24"><path d="M18 4a2 2 0 0 1 2 2v13a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h12Zm0 12h-8v3h8v-3ZM7 16a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8v-3ZM7 11a1 1 0 0 0-1 1v1a1 1 0 0 0 2 0v-1c0-.6-.4-1-1-1Zm11-5h-8v3h8V6ZM7 6a1 1 0 0 0-1 1v1a1 1 0 1 0 2 0V7c0-.6-.4-1-1-1Z"/></svg>',"table-row-properties":'<svg width="24" height="24"><path fill-rule="nonzero" d="M19 4a2 2 0 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM8 15.5H5V18h3v-2.5Zm11-5h-9V18h9v-7.5Zm-2.5 1 1 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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-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 0 1 2 2v12a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2h14ZM5 14v4h6v-4H5Zm14 0h-6v4h6v-4Zm0-6h-6v4h6V8ZM5 12h6V8H5v4Z"/></svg>',"template-add":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M9 12v4H5a2 2 0 0 0-2 2v3h9.3a6 6 0 0 1-.3-2H5v-1h7a6 6 0 0 1 .8-2H11v-5l-.8-.6a3 3 0 1 1 3.6 0l-.8.6v4.7a6 6 0 0 1 2-1.9V12a5 5 0 1 0-6 0Z"/><path d="M18 15c.5 0 1 .4 1 .9V18h2a1 1 0 0 1 .1 2H19v2a1 1 0 0 1-2 .1V20h-2a1 1 0 0 1-.1-2H17v-2c0-.6.4-1 1-1Z"/></svg>',template:'<svg width="24" height="24"><path d="M19 19v-1H5v1h14ZM9 16v-4a5 5 0 1 1 6 0v4h4a2 2 0 0 1 2 2v3H3v-3c0-1.1.9-2 2-2h4Zm4 0v-5l.8-.6a3 3 0 1 0-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 1 1 1 0V6H15v1.6a8 8 0 1 1-6 0Zm-2.6 5.3a.5.5 0 0 0 .3.6c.3 0 .6 0 .6-.3l.1-.2a5 5 0 0 1 3.3-2.8c.3-.1.4-.4.4-.6-.1-.3-.4-.5-.6-.4a6 6 0 0 0-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 0 1-.5-.6l2.7-9c.1-.3.3-.4.5-.4h2.8c.2 0 .4.1.5.4l2.7 9a.5.5 0 0 1-.5.6h-.8a.5.5 0 0 1-.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.6-.6 2a.5.5 0 0 0 .5.6h1.6a.5.5 0 0 0 .5-.6l-.6-2c0-.3-.3-.4-.5-.4h-.4c-.2 0-.4.1-.5.4Z"/></g></svg>',"text-size-decrease":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM14 12a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2h-6Z"/></svg>',"text-size-increase":'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M14 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H4a1 1 0 0 1 0-2h10ZM17 9a1 1 0 0 0-1 1v2h-2a1 1 0 1 0 0 2h2v2a1 1 0 1 0 2 0v-2h2a1 1 0 1 0 0-2h-2v-2c0-.6-.4-1-1-1Z"/></svg>',toc:'<svg width="24" height="24"><path d="M5 5c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 1 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h11c.6 0 1 .4 1 1s-.4 1-1 1H8a1 1 0 0 1 0-2Zm0-4c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 1 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm-3 8c.6 0 1 .4 1 1s-.4 1-1 1a1 1 0 0 1 0-2Zm3 0h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Z" fill-rule="evenodd"/></svg>',translate:'<svg width="24" height="24"><path d="m12.7 14.3-.3.7-.4.7-2.2-2.2-3.1 3c-.3.4-.8.4-1 0a.7.7 0 0 1 0-1l3.1-3A12.4 12.4 0 0 1 6.7 9H8a10.1 10.1 0 0 0 1.7 2.4c.5-.5 1-1.1 1.4-1.8l.9-2H4.7a.7.7 0 1 1 0-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 0 1-1 2.4 13.5 13.5 0 0 1-1.7 2.3l1.9 1.8Zm4.3-3 2.7 7.3a.5.5 0 0 1-.4.7 1 1 0 0 1-1-.7l-.6-1.5h-3.4l-.6 1.5a1 1 0 0 1-1 .7.5.5 0 0 1-.4-.7l2.7-7.4a1 1 0 0 1 2 0Zm-2.2 4.4h2.4L16 12.5l-1.2 3.2Z" fill-rule="evenodd"/></svg>',typography:'<svg width="24" height="24"><path fill-rule="evenodd" clip-rule="evenodd" d="M17 5a1 1 0 1 1 0 2h-4v11a1 1 0 1 1-2 0V7H7a1 1 0 0 1 0-2h10Z"/><path d="m17.5 14 .8-1.7 1.7-.8-1.7-.8-.8-1.7-.8 1.7-1.7.8 1.7.8.8 1.7ZM7 14l1 2 2 1-2 1-1 2-1-2-2-1 2-1 1-2Z"/></svg>',underline:'<svg width="24" height="24"><path d="M16 5c.6 0 1 .4 1 1v5.5a4 4 0 0 1-.4 1.8l-1 1.4a5.3 5.3 0 0 1-5.5 1 5 5 0 0 1-1.6-1c-.5-.4-.8-.9-1.1-1.4a4 4 0 0 1-.4-1.8V6c0-.6.4-1 1-1s1 .4 1 1v5.5c0 .3 0 .6.2 1l.6.7a3.3 3.3 0 0 0 2.2.8 3.4 3.4 0 0 0 2.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 0 1 0-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 0 1-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 1 1-1.4 1.4l-5-5a1 1 0 0 1 0-1.4l5-5a1 1 0 0 1 1.4 1.4L6.4 8Z" fill-rule="nonzero"/></svg>',unlink:'<svg width="24" height="24"><path d="M6.2 12.3a1 1 0 0 1 1.4 1.4l-2 2a2 2 0 1 0 2.6 2.8l4.8-4.8a1 1 0 0 0 0-1.4 1 1 0 1 1 1.4-1.3 2.9 2.9 0 0 1 0 4L9.6 20a3.9 3.9 0 0 1-5.5-5.5l2-2Zm11.6-.6a1 1 0 0 1-1.4-1.4l2.1-2a2 2 0 1 0-2.7-2.8L11 10.3a1 1 0 0 0 0 1.4A1 1 0 1 1 9.6 13a2.9 2.9 0 0 1 0-4L14.4 4a3.9 3.9 0 0 1 5.5 5.5l-2 2ZM7.6 6.3a.8.8 0 0 1-1 1.1L3.3 4.2a.7.7 0 1 1 1-1l3.2 3.1ZM5.1 8.6a.8.8 0 0 1 0 1.5H3a.8.8 0 0 1 0-1.5H5Zm5-3.5a.8.8 0 0 1-1.5 0V3a.8.8 0 0 1 1.5 0V5Zm6 11.8a.8.8 0 0 1 1-1l3.2 3.2a.8.8 0 0 1-1 1L16 17Zm-2.2 2a.8.8 0 0 1 1.5 0V21a.8.8 0 0 1-1.5 0V19Zm5-3.5a.7.7 0 1 1 0-1.5H21a.8.8 0 0 1 0 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 0 0-.3-.7A1 1 0 0 0 16 7h-2a1 1 0 0 0-.7.3 1 1 0 0 0-.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 0 1-.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 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-2Zm0 6h8c.6 0 1 .4 1 1s-.4 1-1 1h-8a1 1 0 0 1 0-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 0 1 2 2v12a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V6c0-1.1.9-2 2-2Zm0 1a1 1 0 0 0-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 0 1 2 0v3c0 .6-.4 1-1 1H5a1 1 0 0 1-1-1v-3a1 1 0 0 1 2 0v2h12ZM11 6.4 8.7 8.7a1 1 0 0 1-1.4-1.4l4-4a1 1 0 0 1 1.4 0l4 4a1 1 0 1 1-1.4 1.4L13 6.4V16a1 1 0 0 1-2 0V6.4Z" fill-rule="nonzero"/></svg>',user:'<svg width="24" height="24"><path d="M12 24a12 12 0 1 1 0-24 12 12 0 0 1 0 24Zm-8.7-5.3a11 11 0 0 0 17.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 0 1 1.2 1.5l-.1.1-4.1 3-4-3a1 1 0 0 1 1-1.7l2 1.5V3c0-.6.4-1 1-1zm0 11.8 4 2.9a1 1 0 0 1-1 1.7l-2-1.5V21c0 .5-.4 1-.9 1H12a1 1 0 0 1-1-1v-4l-2 1.3a1 1 0 0 1-1.2-.1l-.1-.1a1 1 0 0 1 .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 0 1-2-2h2Zm8 0v2h-2v-2h2Zm8 0a2 2 0 0 1-2 2v-2h2Zm-4 0v2h-2v-2h2ZM15 7a1 1 0 0 1 0 2v7a1 1 0 0 1-2 0V9h-1v7a1 1 0 0 1-2 0v-4a2.5 2.5 0 0 1-.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 0 1 2 2h-2V3ZM9 3v2H7V3h2Zm8 0v2h-2V3h2Z" fill-rule="evenodd"/></svg>',visualchars:'<svg width="24" height="24"><path d="M10 5h7a1 1 0 0 1 0 2h-1v11a1 1 0 0 1-2 0V7h-2v11a1 1 0 0 1-2 0v-6c-.5 0-1 0-1.4-.3A3.4 3.4 0 0 1 6.8 10a3.3 3.3 0 0 1 0-2.8 3.4 3.4 0 0 1 1.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 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7c0 .3.1.5.3.7.2.2.4.3.7.3Zm.7-3 .3-4a1 1 0 0 0-.3-.7 1 1 0 0 0-.7-.3 1 1 0 0 0-.7.3 1 1 0 0 0-.3.7l.3 4h1.4Z" fill-rule="evenodd"/></svg>',"zoom-in":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-1-9a1 1 0 0 1 2 0v6a1 1 0 0 1-2 0V8Zm-2 4a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>',"zoom-out":'<svg width="24" height="24"><path d="M16 17.3a8 8 0 1 1 1.4-1.4l4.3 4.4a1 1 0 0 1-1.4 1.4l-4.4-4.3Zm-5-.3a6 6 0 1 0 0-12 6 6 0 0 0 0 12Zm-3-5a1 1 0 0 1 0-2h6a1 1 0 0 1 0 2H8Z" fill-rule="nonzero"/></svg>'}})},6890:function(e,t,o){o(88785)},63557:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.ModelManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=e=>t=>e===t,r=t("string"),a=t("object"),s=t("array"),i=n(null),l=o("boolean"),c=n(void 0),d=e=>!(e=>null==e)(e),u=o("function"),m=o("number"),g=()=>{},p=e=>()=>e,h=e=>e,f=(e,t)=>e===t;function y(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const b=e=>t=>!e(t),v=e=>e(),k=p(!1),w=p(!0);class _{constructor(e,t){this.tag=e,this.value=t}static some(e){return new _(!0,e)}static none(){return _.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?_.some(e(this.value)):_.none()}bind(e){return this.tag?e(this.value):_.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:_.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return d(e)?_.some(e):_.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}_.singletonNone=new _(!1);const x=Array.prototype.slice,C=Array.prototype.indexOf,S=Array.prototype.push,z=(e,t)=>{return o=e,n=t,C.call(o,n)>-1;var o,n},O=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return!0;return!1},T=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},E=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},A=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},M=(e,t)=>{const o=[],n=[];for(let r=0,a=e.length;r<a;r++){const a=e[r];(t(a,r)?o:n).push(a)}return{pass:o,fail:n}},N=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},R=(e,t,o)=>(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),D=(e,t,o)=>(A(e,((e,n)=>{o=t(o,e,n)})),o),B=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return _.some(r);if(o(r,n))break}return _.none()})(e,t,k),L=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return _.some(o);return _.none()},I=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!s(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);S.apply(t,e[o])}return t},H=(e,t)=>I(E(e,t)),P=(e,t)=>{for(let o=0,n=e.length;o<n;++o)if(!0!==t(e[o],o))return!1;return!0},F=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},j=(e,t)=>t>=0&&t<e.length?_.some(e[t]):_.none(),V=e=>j(e,0),Z=e=>j(e,e.length-1),U=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return _.none()},q=Object.keys,W=Object.hasOwnProperty,$=(e,t)=>{const o=q(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},G=(e,t)=>K(e,((e,o)=>({k:o,v:t(e,o)}))),K=(e,t)=>{const o={};return $(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},Y=(e,t)=>{const o=[];return $(e,((e,n)=>{o.push(t(e,n))})),o},X=e=>Y(e,h),J=(e,t)=>W.call(e,t),Q="undefined"!=typeof window?window:Function("return this;")(),ee=(e,t)=>((e,t)=>{let o=null!=t?t:Q;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),te=Object.getPrototypeOf,oe=e=>{const t=ee("ownerDocument.defaultView",e);return a(e)&&((e=>((e,t)=>{const o=((e,t)=>ee(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(te(e).constructor.name))},ne=e=>e.dom.nodeName.toLowerCase(),re=e=>e.dom.nodeType,ae=e=>t=>re(t)===e,se=e=>8===re(e)||"#comment"===ne(e),ie=e=>le(e)&&oe(e.dom),le=ae(1),ce=ae(3),de=ae(9),ue=ae(11),me=e=>t=>le(t)&&ne(t)===e,ge=(e,t,o)=>{if(!(r(o)||l(o)||m(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},pe=(e,t,o)=>{ge(e.dom,t,o)},he=(e,t)=>{const o=e.dom;$(t,((e,t)=>{ge(o,t,e)}))},fe=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},ye=(e,t)=>_.from(fe(e,t)),be=(e,t)=>{e.dom.removeAttribute(t)},ve=e=>D(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ke=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},we={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return ke(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return ke(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return ke(o)},fromDom:ke,fromPoint:(e,t,o)=>_.from(e.dom.elementFromPoint(t,o)).map(ke)},_e=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},xe=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,Ce=(e,t)=>{const o=void 0===t?document:t.dom;return xe(o)?_.none():_.from(o.querySelector(e)).map(we.fromDom)},Se=(e,t)=>e.dom===t.dom,ze=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},Oe=_e,Te=e=>we.fromDom(e.dom.ownerDocument),Ee=e=>de(e)?e:Te(e),Ae=e=>_.from(e.dom.parentNode).map(we.fromDom),Me=e=>_.from(e.dom.parentElement).map(we.fromDom),Ne=(e,t)=>{const o=u(t)?t:k;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=we.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r},Re=e=>_.from(e.dom.previousSibling).map(we.fromDom),De=e=>_.from(e.dom.nextSibling).map(we.fromDom),Be=e=>E(e.dom.childNodes,we.fromDom),Le=(e,t)=>{const o=e.dom.childNodes;return _.from(o[t]).map(we.fromDom)},Ie=(e,t)=>{Ae(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},He=(e,t)=>{De(e).fold((()=>{Ae(e).each((e=>{Fe(e,t)}))}),(e=>{Ie(e,t)}))},Pe=(e,t)=>{const o=(e=>Le(e,0))(e);o.fold((()=>{Fe(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},Fe=(e,t)=>{e.dom.appendChild(t.dom)},je=(e,t)=>{Ie(e,t),Fe(t,e)},Ve=(e,t)=>{A(t,((o,n)=>{const r=0===n?e:t[n-1];He(r,o)}))},Ze=(e,t)=>{A(t,(t=>{Fe(e,t)}))},Ue=e=>{e.dom.textContent="",A(Be(e),(e=>{qe(e)}))},qe=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},We=e=>{const t=Be(e);t.length>0&&Ve(e,t),qe(e)},$e=(e,t)=>we.fromDom(e.dom.cloneNode(t)),Ge=e=>$e(e,!1),Ke=e=>$e(e,!0),Ye=(e,t)=>{const o=we.fromTag(t),n=ve(e);return he(o,n),o},Xe=["tfoot","thead","tbody","colgroup"],Je=(e,t,o)=>({element:e,rowspan:t,colspan:o}),Qe=(e,t,o)=>({element:e,cells:t,section:o}),et=(e,t,o)=>({element:e,isNew:t,isLocked:o}),tt=(e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}),ot=u(Element.prototype.attachShadow)&&u(Node.prototype.getRootNode),nt=p(ot),rt=ot?e=>we.fromDom(e.dom.getRootNode()):Ee,at=e=>we.fromDom(e.dom.host),st=e=>{const t=ce(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=rt(e);return ue(o=t)&&d(o.dom.host)?_.some(t):_.none();var o})(we.fromDom(t)).fold((()=>o.body.contains(t)),(n=st,r=at,e=>n(r(e))));var n,r},it=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return we.fromDom(t)},lt=(e,t)=>{let o=[];return A(Be(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(lt(e,t))})),o},ct=(e,t,o)=>((e,o,n)=>N(Ne(e,n),(e=>_e(e,t))))(e,0,o),dt=(e,t)=>((e,o)=>N(Be(e),(e=>_e(e,t))))(e),ut=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return xe(o)?[]:E(o.querySelectorAll(e),we.fromDom)})(t,e);var mt=(e,t,o,n,r)=>e(o,n)?_.some(o):u(r)&&r(o)?_.none():t(o,n,r);const gt=(e,t,o)=>{let n=e.dom;const r=u(o)?o:k;for(;n.parentNode;){n=n.parentNode;const e=we.fromDom(n);if(t(e))return _.some(e);if(r(e))break}return _.none()},pt=(e,t,o)=>mt(((e,t)=>t(e)),gt,e,t,o),ht=(e,t,o)=>gt(e,(e=>_e(e,t)),o),ft=(e,t)=>((e,o)=>B(e.dom.childNodes,(e=>{return o=we.fromDom(e),_e(o,t);var o})).map(we.fromDom))(e),yt=(e,t)=>Ce(t,e),bt=(e,t,o)=>mt(((e,t)=>_e(e,t)),ht,e,t,o),vt=(e,t,o=f)=>e.exists((e=>o(e,t))),kt=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},wt=(e,t)=>e?_.some(t):_.none(),_t=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,xt=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!c(n)||r+t.length<=n)},Ct=(e,t)=>_t(e,t,0),St=(e,t)=>_t(e,t,e.length-t.length),zt=(e=>t=>t.replace(e,""))(/^\s+|\s+$/g),Ot=e=>e.length>0,Tt=e=>void 0!==e.style&&u(e.style.getPropertyValue),Et=(e,t,o)=>{if(!r(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Tt(e)&&e.style.setProperty(t,o)},At=(e,t,o)=>{const n=e.dom;Et(n,t,o)},Mt=(e,t)=>{const o=e.dom;$(t,((e,t)=>{Et(o,t,e)}))},Nt=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||st(e)?n:Rt(o,t)},Rt=(e,t)=>Tt(e)?e.style.getPropertyValue(t):"",Dt=(e,t)=>{const o=e.dom,n=Rt(o,t);return _.from(n).filter((e=>e.length>0))},Bt=(e,t)=>{((e,t)=>{Tt(e)&&e.style.removeProperty(t)})(e.dom,t),vt(ye(e,"style").map(zt),"")&&be(e,"style")},Lt=(e,t,o=0)=>ye(e,t).map((e=>parseInt(e,10))).getOr(o),It=(e,t)=>Lt(e,t,1),Ht=e=>me("col")(e)?Lt(e,"span",1)>1:It(e,"colspan")>1,Pt=e=>It(e,"rowspan")>1,Ft=(e,t)=>parseInt(Nt(e,t),10),jt=p(10),Vt=p(10),Zt=(e,t)=>Ut(e,t,w),Ut=(e,t,o)=>H(Be(e),(e=>_e(e,t)?o(e)?[e]:[]:Ut(e,t,o))),qt=(e,t)=>((e,t,o=k)=>o(t)?_.none():z(e,ne(t))?_.some(t):ht(t,e.join(","),(e=>_e(e,"table")||o(e))))(["td","th"],e,t),Wt=e=>Zt(e,"th,td"),$t=e=>_e(e,"colgroup")?dt(e,"col"):H(Yt(e),(e=>dt(e,"col"))),Gt=(e,t)=>bt(e,"table",t),Kt=e=>Zt(e,"tr"),Yt=e=>Gt(e).fold(p([]),(e=>dt(e,"colgroup"))),Xt=(e,t)=>E(e,(e=>{if("colgroup"===ne(e)){const t=E($t(e),(e=>{const t=Lt(e,"span",1);return Je(e,1,t)}));return Qe(e,t,"colgroup")}{const o=E(Wt(e),(e=>{const t=Lt(e,"rowspan",1),o=Lt(e,"colspan",1);return Je(e,t,o)}));return Qe(e,o,t(e))}})),Jt=e=>Ae(e).map((e=>{const t=ne(e);return(e=>z(Xe,e))(t)?t:"tbody"})).getOr("tbody"),Qt=e=>{const t=Kt(e),o=[...Yt(e),...t];return Xt(o,Jt)},eo=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},to=()=>oo(0,0),oo=(e,t)=>({major:e,minor:t}),no={nu:oo,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?to():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return oo(n(1),n(2))})(e,o)},unknown:to},ro=(e,t)=>{const o=String(t).toLowerCase();return B(e,(e=>e.search(o)))},ao=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,so=e=>t=>xt(t,e),io=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>xt(e,"edge/")&&xt(e,"chrome")&&xt(e,"safari")&&xt(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ao],search:e=>xt(e,"chrome")&&!xt(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>xt(e,"msie")||xt(e,"trident")},{name:"Opera",versionRegexes:[ao,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:so("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:so("firefox")},{name:"Safari",versionRegexes:[ao,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(xt(e,"safari")||xt(e,"mobile/"))&&xt(e,"applewebkit")}],lo=[{name:"Windows",search:so("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>xt(e,"iphone")||xt(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:so("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:so("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:so("linux"),versionRegexes:[]},{name:"Solaris",search:so("sunos"),versionRegexes:[]},{name:"FreeBSD",search:so("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:so("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],co={browsers:p(io),oses:p(lo)},uo="Edge",mo="Chromium",go="Opera",po="Firefox",ho="Safari",fo=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(uo),isChromium:n(mo),isIE:n("IE"),isOpera:n(go),isFirefox:n(po),isSafari:n(ho)}},yo=()=>fo({current:void 0,version:no.unknown()}),bo=fo,vo=(p(uo),p(mo),p("IE"),p(go),p(po),p(ho),"Windows"),ko="Android",wo="Linux",_o="macOS",xo="Solaris",Co="FreeBSD",So="ChromeOS",zo=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(vo),isiOS:n("iOS"),isAndroid:n(ko),isMacOS:n(_o),isLinux:n(wo),isSolaris:n(xo),isFreeBSD:n(Co),isChromeOS:n(So)}},Oo=()=>zo({current:void 0,version:no.unknown()}),To=zo,Eo=(p(vo),p("iOS"),p(ko),p(wo),p(_o),p(xo),p(Co),p(So),e=>window.matchMedia(e).matches);let Ao=eo((()=>((e,t,o)=>{const n=co.browsers(),r=co.oses(),a=t.bind((e=>((e,t)=>U(t.brands,(t=>{const o=t.brand.toLowerCase();return B(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:no.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>ro(e,t).map((e=>{const o=no.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(yo,bo),s=((e,t)=>ro(e,t).map((e=>{const o=no.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(Oo,To),i=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),a=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),i=s||n("(pointer:coarse)"),l=r||!a&&s&&n("(min-device-width:768px)"),c=a||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:p(r),isiPhone:p(a),isTablet:p(l),isPhone:p(c),isTouch:p(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:p(d),isDesktop:p(u)}})(s,a,e,o);return{browser:a,os:s,deviceType:i}})(navigator.userAgent,_.from(navigator.userAgentData),Eo)));const Mo=()=>Ao(),No=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Nt(o,e);return parseFloat(t)||0}return n},n=(e,t)=>D(t,((t,o)=>{const n=Nt(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!m(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;Tt(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},Ro=(e,t,o)=>((e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?_.none():_.some(t)})(e).getOr(t))(Nt(e,t),o),Do=No("width",(e=>e.dom.offsetWidth)),Bo=e=>Do.get(e),Lo=e=>Do.getOuter(e),Io=e=>((e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-Ro(e,`padding-${o}`,0)-Ro(e,`padding-${n}`,0)-Ro(e,`border-${o}-width`,0)-Ro(e,`border-${n}-width`,0))(e,n,"left","right")})(e,"content-box"),Ho=(e,t,o)=>{const n=e.cells,r=n.slice(0,t),a=n.slice(t),s=r.concat(o).concat(a);return jo(e,s)},Po=(e,t,o)=>Ho(e,t,[o]),Fo=(e,t,o)=>{e.cells[t]=o},jo=(e,t)=>tt(e.element,t,e.section,e.isNew),Vo=(e,t)=>e.cells[t],Zo=(e,t)=>Vo(e,t).element,Uo=e=>e.cells.length,qo=e=>{const t=M(e,(e=>"colgroup"===e.section));return{rows:t.fail,cols:t.pass}},Wo=(e,t,o)=>{const n=E(e.cells,o);return tt(t(e.element),n,e.section,!0)},$o="data-snooker-locked-cols",Go=e=>ye(e,$o).bind((e=>_.from(e.match(/\d+/g)))).map((e=>F(e,w))),Ko=e=>{const t=D(qo(e).rows,((e,t)=>(A(t.cells,((t,o)=>{t.isLocked&&(e[o]=!0)})),e)),{}),o=Y(t,((e,t)=>parseInt(t,10)));return((e,t)=>{const o=x.call(e,0);return o.sort(void 0),o})(o)},Yo=(e,t)=>e+","+t,Xo=(e,t)=>{const o=H(e.all,(e=>e.cells));return N(o,t)},Jo=e=>{const t={},o=[],n=V(e).map((e=>e.element)).bind(Gt).bind(Go).getOr({});let r=0,a=0,s=0;const{pass:i,fail:l}=M(e,(e=>"colgroup"===e.section));A(l,(e=>{const i=[];A(e.cells,(e=>{let o=0;for(;void 0!==t[Yo(s,o)];)o++;const r=((e,t)=>J(e,t)&&void 0!==e[t]&&null!==e[t])(n,o.toString()),l=((e,t,o,n,r,a)=>({element:e,rowspan:t,colspan:o,row:n,column:r,isLocked:a}))(e.element,e.rowspan,e.colspan,s,o,r);for(let n=0;n<e.colspan;n++)for(let r=0;r<e.rowspan;r++){const e=o+n,i=Yo(s+r,e);t[i]=l,a=Math.max(a,e+1)}i.push(l)})),r++,o.push(Qe(e.element,i,e.section)),s++}));const{columns:c,colgroups:d}=Z(i).map((e=>{const t=(e=>{const t={};let o=0;return A(e.cells,(e=>{const n=e.colspan;T(n,(r=>{const a=o+r;t[a]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,n,a)})),o+=n})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,X(t));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),u=((e,t)=>({rows:e,columns:t}))(r,a);return{grid:u,access:t,all:o,columns:c,colgroups:d}},Qo=e=>{const t=Qt(e);return Jo(t)},en=Jo,tn=(e,t,o)=>_.from(e.access[Yo(t,o)]),on=(e,t,o)=>{const n=Xo(e,(e=>o(t,e.element)));return n.length>0?_.some(n[0]):_.none()},nn=Xo,rn=e=>H(e.all,(e=>e.cells)),an=e=>X(e.columns),sn=e=>q(e.columns).length>0,ln=(e,t)=>_.from(e.columns[t]),cn=(e,t=w)=>{const o=e.grid,n=T(o.columns,h),r=T(o.rows,h);return E(n,(o=>dn((()=>H(r,(t=>tn(e,t,o).filter((e=>e.column===o)).toArray()))),(e=>1===e.colspan&&t(e.element)),(()=>tn(e,0,o)))))},dn=(e,t,o)=>{const n=e();return B(n,t).orThunk((()=>_.from(n[0]).orThunk(o))).map((e=>e.element))},un=e=>{const t=e.grid,o=T(t.rows,h),n=T(t.columns,h);return E(o,(t=>dn((()=>H(n,(o=>tn(e,t,o).filter((e=>e.row===t)).fold(p([]),(e=>[e]))))),(e=>1===e.rowspan),(()=>tn(e,t,0)))))},mn=(e,t)=>o=>"rtl"===gn(o)?t:e,gn=e=>"rtl"===Nt(e,"direction")?"rtl":"ltr",pn=No("height",(e=>{const t=e.dom;return st(e)?t.getBoundingClientRect().height:t.offsetHeight})),hn=e=>pn.get(e),fn=e=>pn.getOuter(e),yn=(e,t)=>({left:e,top:t,translate:(o,n)=>yn(e+o,t+n)}),bn=yn,vn=(e,t)=>void 0!==e?e:void 0!==t?t:0,kn=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return bn(o.offsetLeft,o.offsetTop);const a=vn(null==n?void 0:n.pageYOffset,r.scrollTop),s=vn(null==n?void 0:n.pageXOffset,r.scrollLeft),i=vn(r.clientTop,o.clientTop),l=vn(r.clientLeft,o.clientLeft);return wn(e).translate(s-l,a-i)},wn=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?bn(o.offsetLeft,o.offsetTop):st(e)?(e=>{const t=e.getBoundingClientRect();return bn(t.left,t.top)})(t):bn(0,0)},_n=(e,t)=>({row:e,y:t}),xn=(e,t)=>({col:e,x:t}),Cn=e=>kn(e).left+Lo(e),Sn=e=>kn(e).left,zn=(e,t)=>xn(e,Sn(t)),On=(e,t)=>xn(e,Cn(t)),Tn=e=>kn(e).top,En=(e,t)=>_n(e,Tn(t)),An=(e,t)=>_n(e,Tn(t)+fn(t)),Mn=(e,t,o)=>{if(0===o.length)return[];const n=E(o.slice(1),((t,o)=>t.map((t=>e(o,t))))),r=o[o.length-1].map((e=>t(o.length-1,e)));return n.concat([r])},Nn={delta:h,positions:e=>Mn(En,An,e),edge:Tn},Rn=mn({delta:h,edge:Sn,positions:e=>Mn(zn,On,e)},{delta:e=>-e,edge:Cn,positions:e=>Mn(On,zn,e)}),Dn={delta:(e,t)=>Rn(t).delta(e,t),positions:(e,t)=>Rn(t).positions(e,t),edge:e=>Rn(e).edge(e)},Bn={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:[""]},Ln=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,o=e=>`(?:${e})?`,n=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${n}))(.*)$`)})(),In=/(\d+(\.\d+)?)%/,Hn=/(\d+(\.\d+)?)px|em/,Pn=me("col"),Fn=(e,t,o)=>{const n=Me(e).getOrThunk((()=>it(Te(e))));return t(e)/o(n)*100},jn=(e,t)=>{At(e,"width",t+"px")},Vn=(e,t)=>{At(e,"width",t+"%")},Zn=(e,t)=>{At(e,"height",t+"px")},Un=e=>{const t=(e=>{return Ro(t=e,"height",t.dom.offsetHeight)+"px";var t})(e);return t?((e,t,o,n)=>{const r=parseFloat(e);return St(e,"%")&&"table"!==ne(t)?((e,t,o,n)=>{const r=Gt(e).map((e=>{const n=o(e);return Math.floor(t/100*n)})).getOr(t);return n(e,r),r})(t,r,o,n):r})(t,e,hn,Zn):hn(e)},qn=(e,t)=>Dt(e,t).orThunk((()=>ye(e,t).map((e=>e+"px")))),Wn=e=>qn(e,"width"),$n=e=>Fn(e,Bo,Io),Gn=e=>{return Pn(e)?Bo(e):Ro(t=e,"width",t.dom.offsetWidth);var t},Kn=e=>((e,t,o)=>o(e)/It(e,"rowspan"))(e,0,Un),Yn=(e,t,o)=>{At(e,"width",t+o)},Xn=e=>Fn(e,Bo,Io)+"%",Jn=p(In),Qn=me("col"),er=e=>Wn(e).getOrThunk((()=>Gn(e)+"px")),tr=e=>{return(t=e,qn(t,"height")).getOrThunk((()=>Kn(e)+"px"));var t},or=(e,t,o,n,r,a)=>e.filter(n).fold((()=>a(((e,t)=>{if(t<0||t>=e.length-1)return _.none();const o=e[t].fold((()=>{const o=(e=>{const t=x.call(e,0);return t.reverse(),t})(e.slice(0,t));return U(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>_.some({value:e,delta:0}))),n=e[t+1].fold((()=>{const o=e.slice(t+1);return U(o,((e,t)=>e.map((e=>({value:e,delta:t+1})))))}),(e=>_.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}))))})(o,t))),(e=>r(e))),nr=(e,t,o,n)=>{const r=cn(e),a=sn(e)?(e=>E(an(e),(e=>_.from(e.element))))(e):r,s=[_.some(Dn.edge(t))].concat(E(Dn.positions(r,t),(e=>e.map((e=>e.x))))),i=b(Ht);return E(a,((e,t)=>or(e,t,s,i,(e=>{if((e=>{const t=Mo().browser,o=t.isChromium()||t.isFirefox();return!Qn(e)||o})(e))return o(e);{const e=null!=(a=r[t])?h(a):_.none();return or(e,t,s,i,(e=>n(_.some(Bo(e)))),n)}var a}),n)))},rr=e=>e.map((e=>e+"px")).getOr(""),ar=(e,t,o)=>nr(e,t,Gn,(e=>e.getOrThunk(o.minCellWidth))),sr=(e,t,o,n,r)=>{const a=un(e),s=[_.some(o.edge(t))].concat(E(o.positions(a,t),(e=>e.map((e=>e.y)))));return E(a,((e,t)=>or(e,t,s,b(Pt),n,r)))},ir=(e,t)=>()=>st(e)?t(e):parseFloat(Dt(e,"width").getOr("0")),lr=e=>{const t=ir(e,(e=>parseFloat(Xn(e)))),o=ir(e,Bo);return{width:t,pixelWidth:o,getWidths:(t,o)=>((e,t,o)=>nr(e,t,$n,(e=>e.fold((()=>o.minCellWidth()),(e=>e/o.pixelWidth()*100)))))(t,e,o),getCellDelta:e=>e/o()*100,singleColumnWidth:(e,t)=>[100-e],minCellWidth:()=>jt()/o()*100,setElementWidth:Vn,adjustTableWidth:o=>{const n=t();Vn(e,n+o/100*n)},isRelative:!0,label:"percent"}},cr=e=>{const t=ir(e,Bo);return{width:t,pixelWidth:t,getWidths:(t,o)=>ar(t,e,o),getCellDelta:h,singleColumnWidth:(e,t)=>[Math.max(jt(),e+t)-e],minCellWidth:jt,setElementWidth:jn,adjustTableWidth:o=>{const n=t()+o;jn(e,n)},isRelative:!1,label:"pixel"}},dr=e=>Wn(e).fold((()=>(e=>{const t=ir(e,Bo),o=p(0);return{width:t,pixelWidth:t,getWidths:(t,o)=>ar(t,e,o),getCellDelta:o,singleColumnWidth:p([0]),minCellWidth:o,setElementWidth:g,adjustTableWidth:g,isRelative:!0,label:"none"}})(e)),(t=>((e,t)=>null!==Jn().exec(t)?lr(e):cr(e))(e,t))),ur=cr,mr=lr,gr=(e,t,o)=>{const n=e[o].element,r=we.fromTag("td");Fe(r,we.fromTag("br")),(t?Fe:Pe)(n,r)},pr=((e,t)=>{const o=t=>e(t)?_.from(t.dom.nodeValue):_.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(ce),hr=e=>pr.get(e),fr=e=>pr.getOption(e),yr=(e,t)=>pr.set(e,t),br=e=>"img"===ne(e)?1:fr(e).fold((()=>Be(e).length),(e=>e.length)),vr=["img","br"],kr=e=>fr(e).filter((e=>0!==e.trim().length||e.indexOf(" ")>-1)).isSome()||z(vr,ne(e))||(e=>ie(e)&&"false"===fe(e,"contenteditable"))(e),wr=e=>((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=we.fromDom(e.childNodes[n]);if(t(r))return _.some(r);const a=o(e.childNodes[n]);if(a.isSome())return a}return _.none()};return o(e.dom)})(e,kr),_r=e=>xr(e,kr),xr=(e,t)=>{const o=e=>{const n=Be(e);for(let e=n.length-1;e>=0;e--){const r=n[e];if(t(r))return _.some(r);const a=o(r);if(a.isSome())return a}return _.none()};return o(e)},Cr={scope:["row","col"]},Sr=e=>()=>{const t=we.fromTag("td",e.dom);return Fe(t,we.fromTag("br",e.dom)),t},zr=e=>()=>we.fromTag("col",e.dom),Or=e=>()=>we.fromTag("colgroup",e.dom),Tr=e=>()=>we.fromTag("tr",e.dom),Er=(e,t,o)=>{const n=((e,t)=>{const o=Ye(e,t),n=Be(Ke(e));return Ze(o,n),o})(e,t);return $(o,((e,t)=>{null===e?be(n,t):pe(n,t,e)})),n},Ar=e=>e,Mr=(e,t,o)=>{const n=(e,t)=>{((e,t)=>{const o=e.dom,n=t.dom;Tt(o)&&Tt(n)&&(n.style.cssText=o.style.cssText)})(e.element,t),Bt(t,"height"),1!==e.colspan&&Bt(t,"width")};return{col:o=>{const r=we.fromTag(ne(o.element),t.dom);return n(o,r),e(o.element,r),r},colgroup:Or(t),row:Tr(t),cell:r=>{const a=we.fromTag(ne(r.element),t.dom),s=o.getOr(["strong","em","b","i","span","font","h1","h2","h3","h4","h5","h6","p","div"]),i=s.length>0?((e,t,o)=>wr(e).map((n=>{const r=o.join(","),a=ct(n,r,(t=>Se(t,e)));return R(a,((e,t)=>{const o=Ge(t);return Fe(e,o),o}),t)})).getOr(t))(r.element,a,s):a;return Fe(i,we.fromTag("br")),n(r,a),((e,t)=>{$(Cr,((o,n)=>ye(e,n).filter((e=>z(o,e))).each((e=>pe(t,n,e)))))})(r.element,a),e(r.element,a),a},replace:Er,colGap:zr(t),gap:Sr(t)}},Nr=e=>({col:zr(e),colgroup:Or(e),row:Tr(e),cell:Sr(e),replace:Ar,colGap:zr(e),gap:Sr(e)}),Rr=e=>bt(e,"[contenteditable]"),Dr=(e,t=!1)=>st(e)?e.dom.isContentEditable:Rr(e).fold(p(t),(e=>"true"===Br(e))),Br=e=>e.dom.contentEditable,Lr=e=>we.fromDom(e.getBody()),Ir=e=>t=>Se(t,Lr(e)),Hr=e=>{be(e,"data-mce-style");const t=e=>be(e,"data-mce-style");A(Wt(e),t),A($t(e),t),A(Kt(e),t)},Pr=e=>we.fromDom(e.selection.getStart()),Fr=e=>e.getBoundingClientRect().width,jr=e=>e.getBoundingClientRect().height,Vr=e=>pt(e,me("table")).exists(Dr),Zr=(e,t)=>{const o=t.column,n=t.column+t.colspan-1,r=t.row,a=t.row+t.rowspan-1;return o<=e.finishCol&&n>=e.startCol&&r<=e.finishRow&&a>=e.startRow},Ur=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,qr=(e,t,o)=>{const n=on(e,t,Se),r=on(e,o,Se);return n.bind((e=>r.map((t=>{return o=e,n=t,{startRow:Math.min(o.row,n.row),startCol:Math.min(o.column,n.column),finishRow:Math.max(o.row+o.rowspan-1,n.row+n.rowspan-1),finishCol:Math.max(o.column+o.colspan-1,n.column+n.colspan-1)};var o,n}))))},Wr=(e,t,o)=>qr(e,t,o).map((t=>{const o=nn(e,y(Zr,t));return E(o,(e=>e.element))})),$r=(e,t)=>on(e,t,((e,t)=>ze(t,e))).map((e=>e.element)),Gr=(e,t,o)=>{const n=Yr(e);return Wr(n,t,o)},Kr=(e,t,o,n,r)=>{const a=Yr(e),s=Se(e,o)?_.some(t):$r(a,t),i=Se(e,r)?_.some(n):$r(a,n);return s.bind((e=>i.bind((t=>Wr(a,e,t)))))},Yr=Qo;var Xr=["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"],Jr=()=>({up:p({selector:ht,closest:bt,predicate:gt,all:Ne}),down:p({selector:ut,predicate:lt}),styles:p({get:Nt,getRaw:Dt,set:At,remove:Bt}),attrs:p({get:fe,set:pe,remove:be,copyTo:(e,t)=>{const o=ve(e);he(t,o)}}),insert:p({before:Ie,after:He,afterAll:Ve,append:Fe,appendAll:Ze,prepend:Pe,wrap:je}),remove:p({unwrap:We,remove:qe}),create:p({nu:we.fromTag,clone:e=>we.fromDom(e.dom.cloneNode(!1)),text:we.fromText}),query:p({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:Re,nextSibling:De}),property:p({children:Be,name:ne,parent:Ae,document:e=>Ee(e).dom,isText:ce,isComment:se,isElement:le,isSpecial:e=>{const t=ne(e);return z(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>le(e)?ye(e,"lang"):_.none(),getText:hr,setText:yr,isBoundary:e=>!!le(e)&&("body"===ne(e)||z(Xr,ne(e))),isEmptyTag:e=>!!le(e)&&z(["br","img","hr","input"],ne(e)),isNonEditable:e=>le(e)&&"false"===fe(e,"contenteditable")}),eq:Se,is:Oe});const Qr=(e,t,o,n)=>{const r=t(e,o);return R(n,((o,n)=>{const r=t(e,n);return ea(e,o,r)}),r)},ea=(e,t,o)=>t.bind((t=>o.filter(y(e.eq,t)))),ta=Jr(),oa=(e,t)=>((e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,Qr):_.none())(ta,((t,o)=>e(o)),t),na=e=>ht(e,"table"),ra=(e,t,o)=>{const n=e=>t=>void 0!==o&&o(t)||Se(t,e);return Se(e,t)?_.some({boxes:_.some([e]),start:e,finish:t}):na(e).bind((r=>na(t).bind((a=>{if(Se(r,a))return _.some({boxes:Gr(r,e,t),start:e,finish:t});if(ze(r,a)){const o=ct(t,"td,th",n(r)),s=o.length>0?o[o.length-1]:t;return _.some({boxes:Kr(r,e,r,t,a),start:e,finish:s})}if(ze(a,r)){const o=ct(e,"td,th",n(a)),s=o.length>0?o[o.length-1]:e;return _.some({boxes:Kr(a,e,r,t,a),start:e,finish:s})}return((e,t,o)=>((e,t,o,n=k)=>{const r=[t].concat(e.up().all(t)),a=[o].concat(e.up().all(o)),s=e=>L(e,n).fold((()=>e),(t=>e.slice(0,t+1))),i=s(r),l=s(a),c=B(i,(t=>O(l,((e,t)=>y(e.eq,t))(e,t))));return{firstpath:i,secondpath:l,shared:c}})(ta,e,t,void 0))(e,t).shared.bind((s=>bt(s,"table",o).bind((o=>{const s=ct(t,"td,th",n(o)),i=s.length>0?s[s.length-1]:t,l=ct(e,"td,th",n(o)),c=l.length>0?l[l.length-1]:e;return _.some({boxes:Kr(o,e,r,t,a),start:c,finish:i})}))))}))))},aa=(e,t)=>{const o=ut(e,t);return o.length>0?_.some(o):_.none()},sa=(e,t,o)=>yt(e,t).bind((t=>yt(e,o).bind((e=>oa(na,[t,e]).map((o=>({first:t,last:e,table:o}))))))),ia=(e,t,o,n,r)=>((e,t)=>B(e,(e=>_e(e,t))))(e,r).bind((e=>((e,t,o)=>Gt(e).bind((n=>((e,t,o,n)=>on(e,t,Se).bind((t=>{const r=o>0?t.row+t.rowspan-1:t.row,a=n>0?t.column+t.colspan-1:t.column;return tn(e,r+o,a+n).map((e=>e.element))})))(Yr(n),e,t,o))))(e,t,o).bind((e=>((e,t)=>ht(e,"table").bind((o=>yt(o,t).bind((t=>ra(t,e).bind((e=>e.boxes.map((t=>({boxes:t,start:e.start,finish:e.finish}))))))))))(e,n))))),la=(e,t)=>aa(e,t),ca=(e,t,o)=>sa(e,t,o).bind((t=>{const o=t=>Se(e,t),n="thead,tfoot,tbody,table",r=ht(t.first,n,o),a=ht(t.last,n,o);return r.bind((e=>a.bind((o=>Se(e,o)?((e,t,o)=>((e,t,o)=>qr(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=y(Ur,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let a=t.startCol;a<=t.finishCol;a++)o=o&&tn(e,r,a).exists(n);return o?_.some(t):_.none()})(e,t))))(Yr(e),t,o))(t.table,t.first,t.last):_.none()))))})),da=h,ua=e=>{const t=(e,t)=>ye(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&P(e,(e=>t(e,"rowspan")||t(e,"colspan")))?_.some(e):_.none()},ma=(e,t,o)=>t.length<=1?_.none():ca(e,o.firstSelectedSelector,o.lastSelectedSelector).map((e=>({bounds:e,cells:t}))),ga="data-mce-selected",pa="td["+ga+"],th["+ga+"]",ha="["+ga+"]",fa="data-mce-first-selected",ya="td["+fa+"],th["+fa+"]",ba="data-mce-last-selected",va=ha,ka={selected:ga,selectedSelector:pa,firstSelected:fa,firstSelectedSelector:ya,lastSelected:ba,lastSelectedSelector:"td["+ba+"],th["+ba+"]"},wa=(e,t,o)=>({element:o,mergable:ma(t,e,ka),unmergable:ua(e),selection:da(e)}),_a=e=>(t,o)=>{const n=ne(t),r="col"===n||"colgroup"===n?Gt(a=t).bind((e=>la(e,ka.firstSelectedSelector))).fold(p(a),(e=>e[0])):t;var a;return bt(r,e,o)},xa=_a("th,td,caption"),Ca=_a("th,td"),Sa=e=>{return t=e.model.table.getSelectedCells(),E(t,we.fromDom);var t},za=(e,t)=>{e.on("BeforeGetContent",(t=>{const o=o=>{t.preventDefault(),(e=>Gt(e[0]).map((e=>{const t=((e,t)=>{const o=e=>_e(e.element,t),n=Ke(e),r=Qt(n),a=dr(e),s=en(r),i=((e,t)=>{const o=e.grid.columns;let n=e.grid.rows,r=o,a=0,s=0;const i=[],l=[];return $(e.access,(e=>{if(i.push(e),t(e)){l.push(e);const t=e.row,o=t+e.rowspan-1,i=e.column,c=i+e.colspan-1;t<n?n=t:o>a&&(a=o),i<r?r=i:c>s&&(s=c)}})),((e,t,o,n,r,a)=>({minRow:e,minCol:t,maxRow:o,maxCol:n,allCells:r,selectedCells:a}))(n,r,a,s,i,l)})(s,o),l="th:not("+t+"),td:not("+t+")",c=Ut(n,"th,td",(e=>_e(e,l)));A(c,qe),((e,t,o,n)=>{const r=N(e,(e=>"colgroup"!==e.section)),a=t.grid.columns,s=t.grid.rows;for(let e=0;e<s;e++){let s=!1;for(let i=0;i<a;i++)e<o.minRow||e>o.maxRow||i<o.minCol||i>o.maxCol||(tn(t,e,i).filter(n).isNone()?gr(r,s,e):s=!0)}})(r,s,i,o);const d=((e,t,o,n)=>{if(0===n.minCol&&t.grid.columns===n.maxCol+1)return 0;const r=ar(t,e,o),a=D(r,((e,t)=>e+t),0),s=D(r.slice(n.minCol,n.maxCol+1),((e,t)=>e+t),0),i=s/a*o.pixelWidth()-o.pixelWidth();return o.getCellDelta(i)})(e,Qo(e),a,i);return((e,t,o,n)=>{$(o.columns,(e=>{(e.column<t.minCol||e.column>t.maxCol)&&qe(e.element)}));const r=N(Zt(e,"tr"),(e=>0===e.dom.childElementCount));A(r,qe),t.minCol!==t.maxCol&&t.minRow!==t.maxRow||A(Zt(e,"th,td"),(e=>{be(e,"rowspan"),be(e,"colspan")})),be(e,$o),be(e,"data-snooker-col-series"),dr(e).adjustTableWidth(n)})(n,i,s,d),n})(e,va);return Hr(t),[t]})))(o).each((o=>{t.content="text"===t.format?(e=>E(e,(e=>e.dom.innerText)).join(""))(o):((e,t)=>E(t,(t=>e.selection.serializer.serialize(t.dom,{}))).join(""))(e,o)}))};if(!0===t.selection){const t=(e=>N(Sa(e),(e=>_e(e,ka.selectedSelector))))(e);t.length>=1&&o(t)}})),e.on("BeforeSetContent",(o=>{if(!0===o.selection&&!0===o.paste){const n=Sa(e);V(n).each((n=>{Gt(n).each((r=>{const a=N(((e,t)=>{const o=document.createElement("div");return o.innerHTML=e,Be(we.fromDom(o))})(o.content),(e=>"meta"!==ne(e))),s=me("table");if(1===a.length&&s(a[0])){o.preventDefault();const s=we.fromDom(e.getDoc()),i=Nr(s),l=((e,t,o)=>({element:e,clipboard:t,generators:o}))(n,a[0],i);t.pasteCells(r,l).each((()=>{e.focus()}))}}))}))}}))},Oa=(e,t)=>({element:e,offset:t}),Ta=(e,t,o)=>e.property().isText(t)&&0===e.property().getText(t).trim().length||e.property().isComment(t)?o(t).bind((t=>Ta(e,t,o).orThunk((()=>_.some(t))))):_.none(),Ea=(e,t)=>e.property().isText(t)?e.property().getText(t).length:e.property().children(t).length,Aa=(e,t)=>{const o=Ta(e,t,e.query().prevSibling).getOr(t);if(e.property().isText(o))return Oa(o,Ea(e,o));const n=e.property().children(o);return n.length>0?Aa(e,n[n.length-1]):Oa(o,Ea(e,o))},Ma=Aa,Na=Jr(),Ra=(e,t)=>{if(!Ht(e)){const o=(e=>Wn(e).bind((e=>{return t=e,o=["fixed","relative","empty"],_.from(Ln.exec(t)).bind((e=>{const t=Number(e[1]),n=e[2];return((e,t)=>O(t,(t=>O(Bn[t],(t=>e===t)))))(n,o)?_.some({value:t,unit:n}):_.none()}));var t,o})))(e);o.each((o=>{const n=o.value/2;Yn(e,n,o.unit),Yn(t,n,o.unit)}))}},Da=e=>E(e,p(0)),Ba=(e,t,o,n,r)=>r(e.slice(0,t)).concat(n).concat(r(e.slice(o))),La=e=>(t,o,n,r)=>{if(e(n)){const e=Math.max(r,t[o]-Math.abs(n)),a=Math.abs(e-t[o]);return n>=0?a:-a}return n},Ia=La((e=>e<0)),Ha=La(w),Pa=()=>{const e=(e,t,o,n)=>{const r=(100+o)/100,a=Math.max(n,(e[t]+o)/r);return E(e,((e,o)=>(o===t?a:e/r)-e))},t=(t,o,n,r,a,s)=>s?e(t,o,r,a):((e,t,o,n,r)=>{const a=Ia(e,t,n,r);return Ba(e,t,o+1,[a,0],Da)})(t,o,n,r,a);return{resizeTable:(e,t)=>e(t),clampTableDelta:Ia,calcLeftEdgeDeltas:t,calcMiddleDeltas:(e,o,n,r,a,s,i)=>t(e,n,r,a,s,i),calcRightEdgeDeltas:(t,o,n,r,a,s)=>{if(s)return e(t,n,r,a);{const e=Ia(t,n,r,a);return Da(t.slice(0,n)).concat([e])}},calcRedestributedWidths:(e,t,o,n)=>{if(n){const n=(t+o)/t,r=E(e,(e=>e/n));return{delta:100*n-100,newSizes:r}}return{delta:o,newSizes:e}}}},Fa=()=>{const e=(e,t,o,n,r)=>{const a=Ha(e,n>=0?o:t,n,r);return Ba(e,t,o+1,[a,-a],Da)};return{resizeTable:(e,t,o)=>{o&&e(t)},clampTableDelta:(e,t,o,n,r)=>{if(r){if(o>=0)return o;{const t=D(e,((e,t)=>e+t-n),0);return Math.max(-t,o)}}return Ia(e,t,o,n)},calcLeftEdgeDeltas:e,calcMiddleDeltas:(t,o,n,r,a,s)=>e(t,n,r,a,s),calcRightEdgeDeltas:(e,t,o,n,r,a)=>{if(a)return Da(e);{const t=n/e.length;return E(e,p(t))}},calcRedestributedWidths:(e,t,o,n)=>({delta:0,newSizes:e})}},ja=e=>Qo(e).grid,Va=me("th"),Za=e=>P(e,(e=>Va(e.element))),Ua=(e,t)=>e&&t?"sectionCells":e?"section":"cells",qa=e=>{const t="thead"===e.section,o=vt(Wa(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:Ua(t,o)}:{type:"body"}},Wa=e=>{const t=N(e,(e=>Va(e.element)));return 0===t.length?_.some("td"):t.length===e.length?_.some("th"):_.none()},$a=(e,t,o)=>et(o(e.element,t),!0,e.isLocked),Ga=(e,t)=>e.section!==t?tt(e.element,e.cells,t,e.isNew):e,Ka=()=>({transformRow:Ga,transformCell:(e,t,o)=>{const n=o(e.element,t),r="td"!==ne(n)?((e,t)=>{const o=Ye(e,"td");He(e,o);const n=Be(e);return Ze(o,n),qe(e),o})(n):n;return et(r,e.isNew,e.isLocked)}}),Ya=()=>({transformRow:Ga,transformCell:$a}),Xa=()=>({transformRow:(e,t)=>Ga(e,"thead"===t?"tbody":t),transformCell:$a}),Ja=Ka,Qa=Ya,es=Xa,ts=()=>({transformRow:h,transformCell:$a}),os=(e,t,o,n)=>{o===n?be(e,t):pe(e,t,o)},ns=(e,t,o)=>{Z(dt(e,t)).fold((()=>Pe(e,o)),(e=>He(e,o)))},rs=(e,t)=>{const o=[],n=[],r=e=>E(e,(e=>{e.isNew&&o.push(e.element);const t=e.element;return Ue(t),A(e.cells,(e=>{e.isNew&&n.push(e.element),os(e.element,"colspan",e.colspan,1),os(e.element,"rowspan",e.rowspan,1),Fe(t,e.element)})),t})),a=e=>H(e,(e=>E(e.cells,(e=>(os(e.element,"span",e.colspan,1),e.element))))),s=(t,o)=>{const n=((e,t)=>{const o=ft(e,t).getOrThunk((()=>{const o=we.fromTag(t,Te(e).dom);return"thead"===t?ns(e,"caption,colgroup",o):"colgroup"===t?ns(e,"caption",o):Fe(e,o),o}));return Ue(o),o})(e,o),s=("colgroup"===o?a:r)(t);Ze(n,s)},i=(t,o)=>{t.length>0?s(t,o):(t=>{ft(e,t).each(qe)})(o)},l=[],c=[],d=[],u=[];return A(t,(e=>{switch(e.section){case"thead":l.push(e);break;case"tbody":c.push(e);break;case"tfoot":d.push(e);break;case"colgroup":u.push(e)}})),i(u,"colgroup"),i(l,"thead"),i(c,"tbody"),i(d,"tfoot"),{newRows:o,newCells:n}},as=(e,t)=>{if(0===e.length)return 0;const o=e[0];return L(e,(e=>!t(o.element,e.element))).getOr(e.length)},ss=(e,t)=>{const o=E(e,(e=>E(e.cells,k)));return E(e,((n,r)=>{const a=H(n.cells,((n,a)=>{if(!1===o[r][a]){const d=((e,t,o,n)=>{const r=((e,t)=>e[t])(e,t),a="colgroup"===r.section,s=as(r.cells.slice(o),n),i=a?1:as(((e,t)=>E(e,(e=>Vo(e,t))))(e.slice(t),o),n);return{colspan:s,rowspan:i}})(e,r,a,t);return((e,t,n,r)=>{for(let a=e;a<e+n;a++)for(let e=t;e<t+r;e++)o[a][e]=!0})(r,a,d.rowspan,d.colspan),[(s=n.element,i=d.rowspan,l=d.colspan,c=n.isNew,{element:s,rowspan:i,colspan:l,isNew:c})]}return[];var s,i,l,c}));return((e,t,o,n)=>({element:e,cells:t,section:o,isNew:n}))(n.element,a,n.section,n.isNew)}))},is=(e,t,o)=>{const n=[];A(e.colgroups,(r=>{const a=[];for(let n=0;n<e.grid.columns;n++){const r=ln(e,n).map((e=>et(e.element,o,!1))).getOrThunk((()=>et(t.colGap(),!0,!1)));a.push(r)}n.push(tt(r.element,a,"colgroup",o))}));for(let r=0;r<e.grid.rows;r++){const a=[];for(let n=0;n<e.grid.columns;n++){const s=tn(e,r,n).map((e=>et(e.element,o,e.isLocked))).getOrThunk((()=>et(t.gap(),!0,!1)));a.push(s)}const s=e.all[r],i=tt(s.element,a,s.section,o);n.push(i)}return n},ls=e=>ss(e,Se),cs=(e,t)=>U(e.all,(e=>B(e.cells,(e=>Se(t,e.element))))),ds=(e,t,o)=>{const n=E(t.selection,(t=>qt(t).bind((t=>cs(e,t))).filter(o))),r=kt(n);return wt(r.length>0,r)},us=(e,t,o,n,r)=>(a,s,i,l)=>{const c=Qo(a),d=_.from(null==l?void 0:l.section).getOrThunk(ts);return t(c,s).map((t=>{const o=((e,t)=>is(e,t,!1))(c,i),n=e(o,t,Se,r(i),d),a=Ko(n.grid);return{info:t,grid:ls(n.grid),cursor:n.cursor,lockedColumns:a}})).bind((e=>{const t=rs(a,e.grid),r=_.from(null==l?void 0:l.sizing).getOrThunk((()=>dr(a))),s=_.from(null==l?void 0:l.resize).getOrThunk(Fa);return o(a,e.grid,e.info,{sizing:r,resize:s,section:d}),n(a),be(a,$o),e.lockedColumns.length>0&&pe(a,$o,e.lockedColumns.join(",")),_.some({cursor:e.cursor,newRows:t.newRows,newCells:t.newCells})}))},ms=(e,t)=>ds(e,t,w).map((e=>({cells:e,generators:t.generators,clipboard:t.clipboard}))),gs=(e,t)=>ds(e,t,w),ps=(e,t)=>ds(e,t,(e=>!e.isLocked)),hs=(e,t)=>P(t,(t=>((e,t)=>cs(e,t).exists((e=>!e.isLocked)))(e,t))),fs=(e,t,o,n)=>{const r=qo(e).rows;let a=!0;for(let e=0;e<r.length;e++)for(let s=0;s<Uo(r[0]);s++){const i=r[e],l=Vo(i,s),c=o(l.element,t);c&&!a?Fo(i,s,et(n(),!0,l.isLocked)):c&&(a=!1)}return e},ys=e=>{const t=t=>t(e),o=p(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:w,isError:k,map:t=>vs.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:()=>_.some(e)};return r},bs=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:k,isError:w,map:t,mapError:t=>vs.error(t(e)),bind:t,exists:k,forall:w,getOr:h,or:h,getOrThunk:v,orThunk:v,getOrDie:(n=String(e),()=>{throw new Error(n)}),each:g,toOptional:_.none};var n;return o},vs={value:ys,error:bs,fromOption:(e,t)=>e.fold((()=>bs(t)),ys)},ks=(e,t)=>({rowDelta:0,colDelta:Uo(e[0])-Uo(t[0])}),ws=(e,t)=>({rowDelta:e.length-t.length,colDelta:0}),_s=(e,t,o,n)=>{const r="colgroup"===t.section?o.col:o.cell;return T(e,(e=>et(r(),!0,n(e))))},xs=(e,t,o,n)=>{const r=e[e.length-1];return e.concat(T(t,(()=>{const e="colgroup"===r.section?o.colgroup:o.row,t=Wo(r,e,h),a=_s(t.cells.length,t,o,(e=>J(n,e.toString())));return jo(t,a)})))},Cs=(e,t,o,n)=>E(e,(e=>{const r=_s(t,e,o,k);return Ho(e,n,r)})),Ss=(e,t,o)=>{const n=t.colDelta<0?Cs:h,r=t.rowDelta<0?xs:h,a=Ko(e),s=Uo(e[0]),i=O(a,(e=>e===s-1)),l=n(e,Math.abs(t.colDelta),o,i?s-1:s),c=Ko(l);return r(l,Math.abs(t.rowDelta),o,F(c,w))},zs=(e,t,o,n)=>{const r=y(n,Vo(e[t],o).element),a=e[t];return e.length>1&&Uo(a)>1&&(o>0&&r(Zo(a,o-1))||o<a.cells.length-1&&r(Zo(a,o+1))||t>0&&r(Zo(e[t-1],o))||t<e.length-1&&r(Zo(e[t+1],o)))},Os=(e,t,o)=>N(o,(o=>o>=e.column&&o<=Uo(t[0])+e.column)),Ts=(e,t,o,n,r)=>{((e,t,o,n)=>{t>0&&t<e[0].cells.length&&A(e,(e=>{const r=e.cells[t-1];let a=0;const s=n();for(;e.cells.length>t+a&&o(r.element,e.cells[t+a].element);)Fo(e,t+a,et(s,!0,e.cells[t+a].isLocked)),a++}))})(t,e,r,n.cell);const a=ws(o,t),s=Ss(o,a,n),i=ws(t,s),l=Ss(t,i,n);return E(l,((t,o)=>Ho(t,e,s[o].cells)))},Es=(e,t,o,n,r)=>{((e,t,o,n)=>{const r=qo(e).rows;if(t>0&&t<r.length){const e=((e,t)=>D(e,((e,o)=>O(e,(e=>t(e.element,o.element)))?e:e.concat([o])),[]))(r[t-1].cells,o);A(e,(e=>{let a=_.none();for(let s=t;s<r.length;s++)for(let t=0;t<Uo(r[0]);t++){const i=r[s],l=Vo(i,t);o(l.element,e.element)&&(a.isNone()&&(a=_.some(n())),a.each((e=>{Fo(i,t,et(e,!0,l.isLocked))})))}}))}})(t,e,r,n.cell);const a=Ko(t),s=ks(t,o),i={...s,colDelta:s.colDelta-a.length},l=Ss(t,i,n),{cols:c,rows:d}=qo(l),u=Ko(l),m=ks(o,t),g={...m,colDelta:m.colDelta+u.length},p=(f=n,y=u,E(o,(e=>D(y,((t,o)=>{const n=_s(1,e,f,w)[0];return Po(t,o,n)}),e)))),h=Ss(p,g,n);var f,y;return[...c,...d.slice(0,e),...h,...d.slice(e,d.length)]},As=(e,t,o,n,r)=>{const{rows:a,cols:s}=qo(e),i=a.slice(0,t),l=a.slice(t);return[...s,...i,((e,t,o,n)=>Wo(e,(e=>n(e,o)),t))(a[o],((e,o)=>t>0&&t<a.length&&n(Zo(a[t-1],o),Zo(a[t],o))?Vo(a[t],o):et(r(e.element,n),!0,e.isLocked)),n,r),...l]},Ms=(e,t,o,n,r)=>E(e,(e=>{const a=t>0&&t<Uo(e)&&n(Zo(e,t-1),Zo(e,t)),s=((e,t,o,n,r,a,s)=>{if("colgroup"!==o&&n)return Vo(e,t);{const t=Vo(e,r);return et(s(t.element,a),!0,!1)}})(e,t,e.section,a,o,n,r);return Po(e,t,s)})),Ns=(e,t,o,n)=>((e,t,o,n)=>void 0!==Zo(e[t],o)&&t>0&&n(Zo(e[t-1],o),Zo(e[t],o)))(e,t,o,n)||((e,t,o)=>t>0&&o(Zo(e,t-1),Zo(e,t)))(e[t],o,n),Rs=(e,t,o,n)=>{const r=e=>(e=>"row"===e?Pt(t):Ht(t))(e)?`${e}group`:e;return e?Va(t)?r(o):null:n&&Va(t)?r("row"===o?"col":"row"):null},Ds=(e,t,o)=>et(o(e.element,t),!0,e.isLocked),Bs=(e,t,o,n,r,a,s)=>E(e,((e,i)=>((e,l)=>{const c=e.cells,d=E(c,((e,l)=>{if((e=>O(t,(t=>o(e.element,t.element))))(e)){const t=s(e,i,l)?r(e,o,n):e;return a(t,i,l).each((e=>{var o,n;o=t.element,n={scope:_.from(e)},$(n,((e,t)=>{e.fold((()=>{be(o,t)}),(e=>{ge(o.dom,t,e)}))}))})),t}return e}));return tt(e.element,d,e.section,e.isNew)})(e))),Ls=(e,t,o)=>H(e,((n,r)=>Ns(e,r,t,o)?[]:[Vo(n,t)])),Is=(e,t,o,n,r)=>{const a=qo(e).rows,s=H(t,(e=>Ls(a,e,n))),i=E(a,(e=>Za(e.cells))),l=((e,t)=>P(t,h)&&Za(e)?w:(e,o,n)=>!("th"===ne(e.element)&&t[o]))(s,i),c=((e,t)=>(o,n)=>_.some(Rs(e,o.element,"row",t[n])))(o,i);return Bs(e,s,n,r,Ds,c,l)},Hs=(e,t,o,n)=>{const r=qo(e).rows,a=E(t,(e=>Vo(r[e.row],e.column)));return Bs(e,a,o,n,Ds,_.none,w)},Ps=e=>{if(!s(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return A(e,((n,r)=>{const a=q(n);if(1!==a.length)throw new Error("one and only one name per case");const i=a[0],l=n[i];if(void 0!==o[i])throw new Error("duplicate key detected:"+i);if("cata"===i)throw new Error("cannot have a case named cata (sorry)");if(!s(l))throw new Error("case arguments must be an array");t.push(i),o[i]=(...o)=>{const n=o.length;if(n!==l.length)throw new Error("Wrong number of arguments to case "+i+". Expected "+l.length+" ("+l+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=q(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!P(t,(e=>z(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[i].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:i,params:o})}}}})),o},Fs={...Ps([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}])},js=(e,t,o)=>{let n=0;for(let r=e;r<t;r++)n+=void 0!==o[r]?o[r]:0;return n},Vs=(e,t)=>{const o=rn(e);return E(o,(e=>{const o=js(e.row,e.row+e.rowspan,t);return{element:e.element,height:o,rowspan:e.rowspan}}))},Zs=(e,t,o)=>{const n=((e,t)=>sn(e)?((e,t)=>{const o=an(e);return E(o,((e,o)=>({element:e.element,width:t[o],colspan:e.colspan})))})(e,t):((e,t)=>{const o=rn(e);return E(o,(e=>{const o=js(e.column,e.column+e.colspan,t);return{element:e.element,width:o,colspan:e.colspan}}))})(e,t))(e,t);A(n,(e=>{o.setElementWidth(e.element,e.width)}))},Us=(e,t,o,n,r)=>{const a=Qo(e),s=r.getCellDelta(t),i=r.getWidths(a,r),l=o===a.grid.columns-1,c=n.clampTableDelta(i,o,s,r.minCellWidth(),l),d=((e,t,o,n,r)=>{const a=e.slice(0),s=((e,t)=>0===e.length?Fs.none():1===e.length?Fs.only(0):0===t?Fs.left(0,1):t===e.length-1?Fs.right(t-1,t):t>0&&t<e.length-1?Fs.middle(t-1,t,t+1):Fs.none())(e,t),i=p(E(a,p(0)));return s.fold(i,(e=>n.singleColumnWidth(a[e],o)),((e,t)=>r.calcLeftEdgeDeltas(a,e,t,o,n.minCellWidth(),n.isRelative)),((e,t,s)=>r.calcMiddleDeltas(a,e,t,s,o,n.minCellWidth(),n.isRelative)),((e,t)=>r.calcRightEdgeDeltas(a,e,t,o,n.minCellWidth(),n.isRelative)))})(i,o,c,r,n),u=E(d,((e,t)=>e+i[t]));Zs(a,u,r),n.resizeTable(r.adjustTableWidth,c,l)},qs=e=>D(e,((e,t)=>O(e,(e=>e.column===t.column))?e:e.concat([t])),[]).sort(((e,t)=>e.column-t.column)),Ws=me("col"),$s=me("colgroup"),Gs=e=>"tr"===ne(e)||$s(e),Ks=e=>({element:e,colspan:Lt(e,"colspan",1),rowspan:Lt(e,"rowspan",1)}),Ys=e=>ye(e,"scope").map((e=>e.substr(0,3))),Xs=(e,t=Ks)=>{const o=o=>{if(Gs(o))return $s((r={element:o}).element)?e.colgroup(r):e.row(r);{const r=o,a=(t=>Ws(t.element)?e.col(t):e.cell(t))(t(r));return n=_.some({item:r,replacement:a}),a}var r};let n=_.none();return{getOrInit:(e,t)=>n.fold((()=>o(e)),(n=>t(e,n.item)?n.replacement:o(e)))}},Js=e=>t=>{const o=[],n=n=>{const r="td"===e?{scope:null}:{},a=t.replace(n,e,r);return o.push({item:n,sub:a}),a};return{replaceOrInit:(e,t)=>{if(Gs(e)||Ws(e))return e;{const r=e;return((e,t)=>B(o,(o=>t(o.item,e))))(r,t).fold((()=>n(r)),(o=>t(e,o.item)?o.sub:n(r)))}}}},Qs=e=>({unmerge:t=>{const o=Ys(t);return o.each((e=>pe(t,"scope",e))),()=>{const n=e.cell({element:t,colspan:1,rowspan:1});return Bt(n,"width"),Bt(t,"width"),o.each((e=>pe(n,"scope",e))),n}},merge:e=>(Bt(e[0],"width"),(()=>{const t=kt(E(e,Ys));if(0===t.length)return _.none();{const e=t[0],o=["row","col"];return O(t,(t=>t!==e&&z(o,t)))?_.none():_.from(e)}})().fold((()=>be(e[0],"scope")),(t=>pe(e[0],"scope",t+"group"))),p(e[0]))}),ei=["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"],ti=Jr(),oi=e=>((e,t)=>{const o=e.property().name(t);return z(ei,o)})(ti,e),ni=e=>((e,t)=>{const o=e.property().name(t);return z(["ol","ul"],o)})(ti,e),ri=e=>{const t=me("br"),o=e=>_r(e).bind((o=>{const n=De(o).map((e=>!!oi(e)||!!((e,t)=>z(["br","img","hr","input"],e.property().name(t)))(ti,e)&&"img"!==ne(e))).getOr(!1);return Ae(o).map((r=>{return!0===n||("li"===ne(a=r)||gt(a,ni).isSome())||t(o)||oi(r)&&!Se(e,r)?[]:[we.fromTag("br")];var a}))})).getOr([]),n=(()=>{const n=H(e,(e=>{const n=Be(e);return(e=>P(e,(e=>t(e)||ce(e)&&0===hr(e).trim().length)))(n)?[]:n.concat(o(e))}));return 0===n.length?[we.fromTag("br")]:n})();Ue(e[0]),Ze(e[0],n)},ai=e=>Dr(e,!0),si=e=>{0===Wt(e).length&&qe(e)},ii=(e,t)=>({grid:e,cursor:t}),li=(e,t,o)=>{const n=((e,t,o)=>{var n,r;const a=qo(e).rows;return _.from(null===(r=null===(n=a[t])||void 0===n?void 0:n.cells[o])||void 0===r?void 0:r.element).filter(ai).orThunk((()=>(e=>U(e,(e=>U(e.cells,(e=>{const t=e.element;return wt(ai(t),t)})))))(a)))})(e,t,o);return ii(e,n)},ci=e=>D(e,((e,t)=>O(e,(e=>e.row===t.row))?e:e.concat([t])),[]).sort(((e,t)=>e.row-t.row)),di=(e,t)=>(o,n,r,a,s)=>{const i=ci(n),l=E(i,(e=>e.row)),c=((e,t,o,n,r,a,s)=>{const{cols:i,rows:l}=qo(e),c=l[t[0]],d=H(t,(e=>((e,t,o)=>{const n=e[t];return H(n.cells,((n,r)=>Ns(e,t,r,o)?[]:[n]))})(l,e,r))),u=E(c.cells,((e,t)=>Za(Ls(l,t,r)))),m=[...l];A(t,(e=>{m[e]=s.transformRow(l[e],o)}));const g=[...i,...m],p=((e,t)=>P(t,h)&&Za(e.cells)?w:(e,o,n)=>!("th"===ne(e.element)&&t[n]))(c,u),f=((e,t)=>(o,n,r)=>_.some(Rs(e,o.element,"col",t[r])))(n,u);return Bs(g,d,r,a,s.transformCell,f,p)})(o,l,e,t,r,a.replaceOrInit,s);return li(c,n[0].row,n[0].column)},ui=di("thead",!0),mi=di("tbody",!1),gi=di("tfoot",!1),pi=(e,t,o)=>{const n=((e,t)=>Xt(e,(()=>t)))(e,o.section),r=en(n);return is(r,t,!0)},hi=(e,t,o,n)=>((e,t,o,n)=>{const r=en(t),a=n.getWidths(r,n);Zs(r,a,n)})(0,t,0,n.sizing),fi=(e,t,o,n)=>((e,t,o,n,r)=>{const a=en(t),s=n.getWidths(a,n),i=n.pixelWidth(),{newSizes:l,delta:c}=r.calcRedestributedWidths(s,i,o.pixelDelta,n.isRelative);Zs(a,l,n),n.adjustTableWidth(c)})(0,t,o,n.sizing,n.resize),yi=(e,t)=>O(t,(e=>0===e.column&&e.isLocked)),bi=(e,t)=>O(t,(t=>t.column+t.colspan>=e.grid.columns&&t.isLocked)),vi=(e,t)=>{const o=cn(e),n=qs(t);return D(n,((e,t)=>e+o[t.column].map(Lo).getOr(0)),0)},ki=e=>(t,o)=>gs(t,o).filter((o=>!(e?yi:bi)(t,o))).map((e=>({details:e,pixelDelta:vi(t,e)}))),wi=e=>(t,o)=>ms(t,o).filter((o=>!(e?yi:bi)(t,o.cells))),_i=Js("th"),xi=Js("td"),Ci=us(((e,t,o,n)=>{const r=t[0].row,a=ci(t),s=R(a,((e,t)=>({grid:As(e.grid,r,t.row+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return li(s,r,t[0].column)}),gs,g,g,Xs),Si=us(((e,t,o,n)=>{const r=ci(t),a=r[r.length-1],s=a.row+a.rowspan,i=R(r,((e,t)=>As(e,s,t.row,o,n.getOrInit)),e);return li(i,s,t[0].column)}),gs,g,g,Xs),zi=us(((e,t,o,n)=>{const r=t.details,a=qs(r),s=a[0].column,i=R(a,((e,t)=>({grid:Ms(e.grid,s,t.column+e.delta,o,n.getOrInit),delta:e.delta+1})),{grid:e,delta:0}).grid;return li(i,r[0].row,s)}),ki(!0),fi,g,Xs),Oi=us(((e,t,o,n)=>{const r=t.details,a=r[r.length-1],s=a.column+a.colspan,i=qs(r),l=R(i,((e,t)=>Ms(e,s,t.column,o,n.getOrInit)),e);return li(l,r[0].row,s)}),ki(!1),fi,g,Xs),Ti=us(((e,t,o,n)=>{const r=qs(t.details),a=((e,t)=>H(e,(e=>{const o=e.cells,n=R(t,((e,t)=>t>=0&&t<e.length?e.slice(0,t).concat(e.slice(t+1)):e),o);return n.length>0?[tt(e.element,n,e.section,e.isNew)]:[]})))(e,E(r,(e=>e.column))),s=a.length>0?a[0].cells.length-1:0;return li(a,r[0].row,Math.min(r[0].column,s))}),((e,t)=>ps(e,t).map((t=>({details:t,pixelDelta:-vi(e,t)})))),fi,si,Xs),Ei=us(((e,t,o,n)=>{const r=ci(t),a=((e,t,o)=>{const{rows:n,cols:r}=qo(e);return[...r,...n.slice(0,t),...n.slice(o+1)]})(e,r[0].row,r[r.length-1].row),s=a.length>0?a.length-1:0;return li(a,Math.min(t[0].row,s),t[0].column)}),gs,g,si,Xs),Ai=us(((e,t,o,n)=>{const r=qs(t),a=E(r,(e=>e.column)),s=Is(e,a,!0,o,n.replaceOrInit);return li(s,t[0].row,t[0].column)}),ps,g,g,_i),Mi=us(((e,t,o,n)=>{const r=qs(t),a=E(r,(e=>e.column)),s=Is(e,a,!1,o,n.replaceOrInit);return li(s,t[0].row,t[0].column)}),ps,g,g,xi),Ni=us(ui,ps,g,g,_i),Ri=us(mi,ps,g,g,xi),Di=us(gi,ps,g,g,xi),Bi=us(((e,t,o,n)=>{const r=Hs(e,t,o,n.replaceOrInit);return li(r,t[0].row,t[0].column)}),ps,g,g,_i),Li=us(((e,t,o,n)=>{const r=Hs(e,t,o,n.replaceOrInit);return li(r,t[0].row,t[0].column)}),ps,g,g,xi),Ii=us(((e,t,o,n)=>{const r=t.cells;ri(r);const a=((e,t,o,n)=>{const r=qo(e).rows;if(0===r.length)return e;for(let e=t.startRow;e<=t.finishRow;e++)for(let o=t.startCol;o<=t.finishCol;o++){const t=r[e],a=Vo(t,o).isLocked;Fo(t,o,et(n(),!1,a))}return e})(e,t.bounds,0,n.merge(r));return ii(a,_.from(r[0]))}),((e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>hs(e,t.cells)))),hi,g,Qs),Hi=us(((e,t,o,n)=>{const r=R(t,((e,t)=>fs(e,t,o,n.unmerge(t))),e);return ii(r,_.from(t[0]))}),((e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>hs(e,t)))),hi,g,Qs),Pi=us(((e,t,o,n)=>{const r=((e,t)=>{const o=Qo(e);return is(o,t,!0)})(t.clipboard,t.generators);var a,s;return((e,t,o,n,r)=>{const a=Ko(t),s=((e,t,o)=>{const n=Uo(t[0]),r=qo(t).cols.length+e.row,a=T(n-e.column,(t=>t+e.column));return{row:r,column:B(a,(e=>P(o,(t=>t!==e)))).getOr(n-1)}})(e,t,a),i=qo(o).rows,l=Os(s,i,a),c=((e,t,o)=>{if(e.row>=t.length||e.column>Uo(t[0]))return vs.error("invalid start address out of table bounds, row: "+e.row+", column: "+e.column);const n=t.slice(e.row),r=n[0].cells.slice(e.column),a=Uo(o[0]),s=o.length;return vs.value({rowDelta:n.length-s,colDelta:r.length-a})})(s,t,i);return c.map((e=>{const o={...e,colDelta:e.colDelta-l.length},a=Ss(t,o,n),c=Ko(a),d=Os(s,i,c);return((e,t,o,n,r,a)=>{const s=e.row,i=e.column,l=s+o.length,c=i+Uo(o[0])+a.length,d=F(a,w);for(let e=s;e<l;e++){let a=0;for(let l=i;l<c;l++){if(d[l]){a++;continue}zs(t,e,l,r)&&fs(t,Zo(t[e],l),r,n.cell);const c=l-i-a,u=Vo(o[e-s],c),m=u.element,g=n.replace(m);Fo(t[e],l,et(g,!0,u.isLocked))}}return t})(s,a,i,n,r,d)}))})((a=t.row,s=t.column,{row:a,column:s}),e,r,t.generators,o).fold((()=>ii(e,_.some(t.element))),(e=>li(e,t.row,t.column)))}),((e,t)=>qt(t.element).bind((o=>cs(e,o).map((e=>({...e,generators:t.generators,clipboard:t.clipboard})))))),hi,g,Xs),Fi=us(((e,t,o,n)=>{const r=qo(e).rows,a=t.cells[0].column,s=r[t.cells[0].row],i=pi(t.clipboard,t.generators,s),l=Ts(a,e,i,t.generators,o);return li(l,t.cells[0].row,t.cells[0].column)}),wi(!0),g,g,Xs),ji=us(((e,t,o,n)=>{const r=qo(e).rows,a=t.cells[t.cells.length-1].column+t.cells[t.cells.length-1].colspan,s=r[t.cells[0].row],i=pi(t.clipboard,t.generators,s),l=Ts(a,e,i,t.generators,o);return li(l,t.cells[0].row,t.cells[0].column)}),wi(!1),g,g,Xs),Vi=us(((e,t,o,n)=>{const r=qo(e).rows,a=t.cells[0].row,s=r[a],i=pi(t.clipboard,t.generators,s),l=Es(a,e,i,t.generators,o);return li(l,t.cells[0].row,t.cells[0].column)}),ms,g,g,Xs),Zi=us(((e,t,o,n)=>{const r=qo(e).rows,a=t.cells[t.cells.length-1].row+t.cells[t.cells.length-1].rowspan,s=r[t.cells[0].row],i=pi(t.clipboard,t.generators,s),l=Es(a,e,i,t.generators,o);return li(l,t.cells[0].row,t.cells[0].column)}),ms,g,g,Xs),Ui=(e,t)=>{const o=Qo(e);return gs(o,t).bind((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,a=I(E(o.all,(e=>N(e.cells,(e=>e.column>=n&&e.column<r)))));return Wa(a)})).getOr("")},qi=(e,t)=>{const o=Qo(e);return gs(o,t).bind(Wa).getOr("")},Wi=(e,t)=>{const o=Qo(e);return gs(o,t).bind((e=>{const t=e[e.length-1],n=e[0].row,r=t.row+t.rowspan;return(e=>{const t=E(e,(e=>qa(e).type)),o=z(t,"header"),n=z(t,"footer");if(o||n){const e=z(t,"body");return!o||e||n?o||e||!n?_.none():_.some("footer"):_.some("header")}return _.some("body")})(o.all.slice(n,r))})).getOr("")},$i=(e,t)=>e.dispatch("NewRow",{node:t}),Gi=(e,t)=>e.dispatch("NewCell",{node:t}),Ki=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},Yi={structure:!1,style:!0},Xi={structure:!0,style:!1},Ji={structure:!0,style:!0},Qi=e=>t=>t.options.get(e),el="100%",tl=e=>{var t;const o=e.dom,n=null!==(t=o.getParent(e.selection.getStart(),o.isBlock))&&void 0!==t?t:e.getBody();return Io(we.fromDom(n))+"px"},ol=e=>_.from(e.options.get("table_clone_elements")),nl=Qi("table_header_type"),rl=Qi("table_column_resizing"),al=e=>"preservetable"===rl(e),sl=e=>"resizetable"===rl(e),il=Qi("table_sizing_mode"),ll=e=>"relative"===il(e),cl=e=>"fixed"===il(e),dl=e=>"responsive"===il(e),ul=Qi("table_resize_bars"),ml=Qi("table_style_by_css"),gl=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>dl(e)||ml(e)?t:cl(e)?{...t,width:tl(e)}:{...t,width:el})(e,o)},pl=Qi("table_use_colgroups"),hl=(e,t)=>ll(e)?mr(t):cl(e)?ur(t):dr(t),fl=(e,t,o)=>{const n=e=>"table"===ne(Lr(e)),r=ol(e),a=sl(e)?g:Ra,s=t=>{switch(nl(e)){case"section":return Ja();case"sectionCells":return Qa();case"cells":return es();default:return((e,t)=>{var o;switch((o=Qo(e),U(o.all,(e=>{const t=qa(e);return"header"===t.type?_.from(t.subType):_.none()}))).getOr(t)){case"section":return Ka();case"sectionCells":return Ya();case"cells":return Xa()}})(t,"section")}},i=(n,a,i,l)=>(c,d,u=!1)=>{Hr(c);const m=we.fromDom(e.getDoc()),g=Mr(i,m,r),p={sizing:hl(e,c),resize:sl(e)?Pa():Fa(),section:s(c)};return a(c)?n(c,d,g,p).bind((n=>{t.refresh(c.dom),A(n.newRows,(t=>{$i(e,t.dom)})),A(n.newCells,(t=>{Gi(e,t.dom)}));const r=((t,n)=>n.cursor.fold((()=>{const n=Wt(t);return V(n).filter(st).map((n=>{o.clearSelectedCells(t.dom);const r=e.dom.createRng();return r.selectNode(n.dom),e.selection.setRng(r),pe(n,"data-mce-selected","1"),r}))}),(n=>{const r=Ma(Na,n),a=e.dom.createRng();return a.setStart(r.element.dom,r.offset),a.setEnd(r.element.dom,r.offset),e.selection.setRng(a),o.clearSelectedCells(t.dom),_.some(a)})))(c,n);return st(c)&&(Hr(c),u||Ki(e,c.dom,l)),r.map((e=>({rng:e,effect:l})))})):_.none()},l=i(Ei,(t=>!n(e)||ja(t).rows>1),g,Xi),c=i(Ti,(t=>!n(e)||ja(t).columns>1),g,Xi);return{deleteRow:l,deleteColumn:c,insertRowsBefore:i(Ci,w,g,Xi),insertRowsAfter:i(Si,w,g,Xi),insertColumnsBefore:i(zi,w,a,Xi),insertColumnsAfter:i(Oi,w,a,Xi),mergeCells:i(Ii,w,g,Xi),unmergeCells:i(Hi,w,g,Xi),pasteColsBefore:i(Fi,w,g,Xi),pasteColsAfter:i(ji,w,g,Xi),pasteRowsBefore:i(Vi,w,g,Xi),pasteRowsAfter:i(Zi,w,g,Xi),pasteCells:i(Pi,w,g,Ji),makeCellsHeader:i(Bi,w,g,Xi),unmakeCellsHeader:i(Li,w,g,Xi),makeColumnsHeader:i(Ai,w,g,Xi),unmakeColumnsHeader:i(Mi,w,g,Xi),makeRowsHeader:i(Ni,w,g,Xi),makeRowsBody:i(Ri,w,g,Xi),makeRowsFooter:i(Di,w,g,Xi),getTableRowType:Wi,getTableCellType:qi,getTableColType:Ui}},yl=(e,t,o)=>{const n=Lt(e,t,1);1===o||n<=1?be(e,t):pe(e,t,Math.min(o,n))},bl=(e,t)=>o=>{const n=o.column+o.colspan-1,r=o.column;return n>=e&&r<t},vl=Ps([{invalid:["raw"]},{pixels:["value"]},{percent:["value"]}]),kl=(e,t,o)=>{const n=o.substring(0,o.length-e.length),r=parseFloat(n);return n===r.toString()?t(r):vl.invalid(o)},wl={...vl,from:e=>St(e,"%")?kl("%",vl.percent,e):St(e,"px")?kl("px",vl.pixels,e):vl.invalid(e)},_l=(e,t,o)=>{const n=wl.from(o),r=P(e,(e=>"0px"===e))?((e,t)=>{const o=e.fold((()=>p("")),(e=>p(e/t+"px")),(()=>p(100/t+"%")));return T(t,o)})(n,e.length):((e,t,o)=>e.fold((()=>t),(e=>((e,t,o)=>{const n=o/t;return E(e,(e=>wl.from(e).fold((()=>e),(e=>e*n+"px"),(e=>e/100*o+"px"))))})(t,o,e)),(e=>((e,t)=>E(e,(e=>wl.from(e).fold((()=>e),(e=>e/t*100+"%"),(e=>e+"%")))))(t,o))))(n,e,t);return Sl(r)},xl=(e,t)=>0===e.length?t:R(e,((e,t)=>wl.from(t).fold(p(0),h,h)+e),0),Cl=(e,t)=>wl.from(e).fold(p(e),(e=>e+t+"px"),(e=>e+t+"%")),Sl=e=>{if(0===e.length)return e;const t=R(e,((e,t)=>{const o=wl.from(t).fold((()=>({value:t,remainder:0})),(e=>((e,t)=>{const o=Math.floor(e);return{value:o+"px",remainder:e-o}})(e)),(e=>({value:e+"%",remainder:0})));return{output:[o.value].concat(e.output),remainder:e.remainder+o.remainder}}),{output:[],remainder:0}),o=t.output;return o.slice(0,o.length-1).concat([Cl(o[o.length-1],Math.round(t.remainder))])},zl=wl.from,Ol=e=>zl(e).fold(p("px"),p("px"),p("%")),Tl=(e,t,o)=>{const n=Qo(e),r=n.all,a=rn(n),s=an(n);t.each((t=>{const o=Ol(t),r=Bo(e),i=((e,t)=>nr(e,t,er,rr))(n,e),l=_l(i,r,t);sn(n)?((e,t,o)=>{A(t,((t,n)=>{const r=xl([e[n]],jt());At(t.element,"width",r+o)}))})(l,s,o):((e,t,o)=>{A(t,(t=>{const n=e.slice(t.column,t.colspan+t.column),r=xl(n,jt());At(t.element,"width",r+o)}))})(l,a,o),At(e,"width",t)})),o.each((t=>{const o=Ol(t),s=hn(e),i=((e,t,o)=>sr(e,t,o,tr,rr))(n,e,Nn);((e,t,o,n)=>{A(o,(t=>{const o=e.slice(t.row,t.rowspan+t.row),r=xl(o,Vt());At(t.element,"height",r+n)})),A(t,((t,o)=>{At(t.element,"height",e[o])}))})(_l(i,s,t),r,a,o),At(e,"height",t)}))},El=e=>Wn(e).exists((e=>In.test(e))),Al=e=>Wn(e).exists((e=>Hn.test(e))),Ml=e=>Wn(e).isNone(),Nl=e=>{be(e,"width")},Rl=e=>{const t=Xn(e);Tl(e,_.some(t),_.none()),Nl(e)},Dl=e=>{const t=(e=>Bo(e)+"px")(e);Tl(e,_.some(t),_.none()),Nl(e)},Bl=e=>{Bt(e,"width");const t=$t(e),o=t.length>0?t:Wt(e);A(o,(e=>{Bt(e,"width"),Nl(e)})),Nl(e)},Ll={styles:{"border-collapse":"collapse",width:"100%"},attributes:{border:"1"},colGroups:!1},Il=(e,t,o,n)=>T(e,(e=>((e,t,o,n)=>{const r=we.fromTag("tr");for(let a=0;a<e;a++){const e=we.fromTag(n<t||a<o?"th":"td");a<o&&pe(e,"scope","row"),n<t&&pe(e,"scope","col"),Fe(e,we.fromTag("br")),Fe(r,e)}return r})(t,o,n,e))),Hl=(e,t)=>{e.selection.select(t.dom,!0),e.selection.collapse(!0)},Pl=(e,t,o,n,a)=>{const s=(e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>dl(e)||!ml(e)?t:cl(e)?{...t,width:tl(e)}:{...t,width:el})(e,o)})(e),i={styles:s,attributes:gl(e),colGroups:pl(e)};return e.undoManager.ignore((()=>{const r=((e,t,o,n,r,a=Ll)=>{const s=we.fromTag("table"),i="cells"!==r;Mt(s,a.styles),he(s,a.attributes),a.colGroups&&Fe(s,(e=>{const t=we.fromTag("colgroup");return T(e,(()=>Fe(t,we.fromTag("col")))),t})(t));const l=Math.min(e,o);if(i&&o>0){const e=we.fromTag("thead");Fe(s,e);const a=Il(o,t,"sectionCells"===r?l:0,n);Ze(e,a)}const c=we.fromTag("tbody");Fe(s,c);const d=Il(i?e-l:e,t,i?0:o,n);return Ze(c,d),s})(o,t,a,n,nl(e),i);pe(r,"data-mce-id","__mce");const s=(e=>{const t=we.fromTag("div"),o=we.fromDom(e.dom.cloneNode(!0));return Fe(t,o),(e=>e.dom.innerHTML)(t)})(r);e.insertContent(s),e.addVisual()})),yt(Lr(e),'table[data-mce-id="__mce"]').map((t=>(cl(e)?Dl(t):dl(e)?Bl(t):(ll(e)||(e=>r(e)&&-1!==e.indexOf("%"))(s.width))&&Rl(t),Hr(t),be(t,"data-mce-id"),((e,t)=>{A(ut(t,"tr"),(t=>{$i(e,t.dom),A(ut(t,"th,td"),(t=>{Gi(e,t.dom)}))}))})(e,t),((e,t)=>{yt(t,"td,th").each(y(Hl,e))})(e,t),t.dom))).getOrNull()};var Fl=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const jl="x-tinymce/dom-table-",Vl=jl+"rows",Zl=jl+"columns",Ul=e=>{const t=Fl.FakeClipboardItem(e);Fl.write([t])},ql=e=>{var t;const o=null!==(t=Fl.read())&&void 0!==t?t:[];return U(o,(t=>_.from(t.getType(e))))},Wl=e=>{ql(e).isSome()&&Fl.clear()},$l=e=>{e.fold(Kl,(e=>Ul({[Vl]:e})))},Gl=()=>ql(Vl),Kl=()=>Wl(Vl),Yl=e=>{e.fold(Jl,(e=>Ul({[Zl]:e})))},Xl=()=>ql(Zl),Jl=()=>Wl(Zl),Ql=e=>xa(Pr(e),Ir(e)).filter(Vr),ec=(e,t)=>{const o=Ir(e),n=e=>Gt(e,o),s=t=>(e=>Ca(Pr(e),Ir(e)).filter(Vr))(e).bind((e=>n(e).map((o=>t(o,e))))),i=t=>{e.focus()},l=(t,o=!1)=>s(((n,r)=>{const a=wa(Sa(e),n,r);t(n,a,o).each(i)})),c=()=>s(((t,o)=>((e,t,o)=>{const n=Qo(e);return gs(n,t).bind((e=>{const t=is(n,o,!1),r=qo(t).rows.slice(e[0].row,e[e.length-1].row+e[e.length-1].rowspan),a=H(r,(e=>{const t=N(e.cells,(e=>!e.isLocked));return t.length>0?[{...e,cells:t}]:[]})),s=ls(a);return wt(s.length>0,s)})).map((e=>E(e,(e=>{const t=Ge(e.element);return A(e.cells,(e=>{const o=Ke(e.element);os(o,"colspan",e.colspan,1),os(o,"rowspan",e.rowspan,1),Fe(t,o)})),t}))))})(t,wa(Sa(e),t,o),Mr(g,we.fromDom(e.getDoc()),_.none())))),d=()=>s(((t,o)=>((e,t)=>{const o=Qo(e);return ps(o,t).map((e=>{const t=e[e.length-1],n=e[0].column,r=t.column+t.colspan,a=((e,t,o)=>{if(sn(e)){const n=N(an(e),bl(t,o)),r=E(n,(e=>{const n=Ke(e.element);return yl(n,"span",o-t),n})),a=we.fromTag("colgroup");return Ze(a,r),[a]}return[]})(o,n,r),s=((e,t,o)=>E(e.all,(e=>{const n=N(e.cells,bl(t,o)),r=E(n,(e=>{const n=Ke(e.element);return yl(n,"colspan",o-t),n})),a=we.fromTag("tr");return Ze(a,r),a})))(o,n,r);return[...a,...s]}))})(t,wa(Sa(e),t,o)))),u=(t,o)=>o().each((o=>{const n=E(o,(e=>Ke(e)));s(((o,r)=>{const a=Nr(we.fromDom(e.getDoc())),s=((e,t,o,n)=>({selection:da(e),clipboard:o,generators:n}))(Sa(e),0,n,a);t(o,s).each(i)}))})),p=e=>(t,o)=>((e,t)=>J(e,t)?_.from(e[t]):_.none())(o,"type").each((t=>{l(e(t),o.no_events)}));$({mceTableSplitCells:()=>l(t.unmergeCells),mceTableMergeCells:()=>l(t.mergeCells),mceTableInsertRowBefore:()=>l(t.insertRowsBefore),mceTableInsertRowAfter:()=>l(t.insertRowsAfter),mceTableInsertColBefore:()=>l(t.insertColumnsBefore),mceTableInsertColAfter:()=>l(t.insertColumnsAfter),mceTableDeleteCol:()=>l(t.deleteColumn),mceTableDeleteRow:()=>l(t.deleteRow),mceTableCutCol:()=>d().each((e=>{Yl(e),l(t.deleteColumn)})),mceTableCutRow:()=>c().each((e=>{$l(e),l(t.deleteRow)})),mceTableCopyCol:()=>d().each((e=>Yl(e))),mceTableCopyRow:()=>c().each((e=>$l(e))),mceTablePasteColBefore:()=>u(t.pasteColsBefore,Xl),mceTablePasteColAfter:()=>u(t.pasteColsAfter,Xl),mceTablePasteRowBefore:()=>u(t.pasteRowsBefore,Gl),mceTablePasteRowAfter:()=>u(t.pasteRowsAfter,Gl),mceTableDelete:()=>Ql(e).each((t=>{Gt(t,o).filter(b(o)).each((t=>{const o=we.fromText("");if(He(t,o),qe(t),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()}}))})),mceTableCellToggleClass:(t,o)=>{s((t=>{const n=Sa(e),r=P(n,(t=>e.formatter.match("tablecellclass",{value:o},t.dom))),a=r?e.formatter.remove:e.formatter.apply;A(n,(e=>a("tablecellclass",{value:o},e.dom))),Ki(e,t.dom,Yi)}))},mceTableToggleClass:(t,o)=>{s((t=>{e.formatter.toggle("tableclass",{value:o},t.dom),Ki(e,t.dom,Yi)}))},mceTableToggleCaption:()=>{Ql(e).each((t=>{Gt(t,o).each((o=>{ft(o,"caption").fold((()=>{const t=we.fromTag("caption");Fe(t,we.fromText("Caption")),((e,t,o)=>{Le(e,0).fold((()=>{Fe(e,t)}),(e=>{Ie(e,t)}))})(o,t),e.selection.setCursorLocation(t.dom,0)}),(n=>{me("caption")(t)&&Ce("td",o).each((t=>e.selection.setCursorLocation(t.dom,0))),qe(n)})),Ki(e,o.dom,Xi)}))}))},mceTableSizingMode:(t,n)=>(t=>Ql(e).each((n=>{dl(e)||cl(e)||ll(e)||Gt(n,o).each((o=>{"relative"!==t||El(o)?"fixed"!==t||Al(o)?"responsive"!==t||Ml(o)||Bl(o):Dl(o):Rl(o),Hr(o),Ki(e,o.dom,Xi)}))})))(n),mceTableCellType:p((e=>"th"===e?t.makeCellsHeader:t.unmakeCellsHeader)),mceTableColType:p((e=>"th"===e?t.makeColumnsHeader:t.unmakeColumnsHeader)),mceTableRowType:p((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)=>{((e,t,o,n={})=>{const r=e=>m(e)&&e>0;if(r(t)&&r(o)){const r=n.headerRows||0,a=n.headerColumns||0;return Pl(e,o,t,a,r)}console.error("Invalid values for mceInsertTable - rows and columns values are required to insert a table.")})(e,o.rows,o.columns,o.options)})),e.addCommand("mceTableApplyCellStyle",((t,o)=>{const s=e=>"tablecell"+e.toLowerCase().replace("-","");if(!a(o))return;const i=N(Sa(e),Vr);if(0===i.length)return;const l=((e,t)=>{const o={};return((e,t,o,n)=>{$(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(e=>(t,o)=>{e[o]=t})(o),g),o})(o,((t,o)=>e.formatter.has(s(o))&&r(t)));(e=>{for(const t in e)if(W.call(e,t))return!1;return!0})(l)||($(l,((t,o)=>{const n=s(o);A(i,(o=>{""===t?e.formatter.remove(n,{value:null},o.dom,!0):e.formatter.apply(n,{value:t},o.dom)}))})),n(i[0]).each((t=>Ki(e,t.dom,Yi))))}))},tc=Ps([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),oc={before:tc.before,on:tc.on,after:tc.after,cata:(e,t,o,n)=>e.fold(t,o,n),getStart:e=>e.fold(h,h,h)},nc=(e,t)=>({selection:e,kill:t}),rc=(e,t)=>{const o=e.document.createRange();return o.selectNode(t.dom),o},ac=(e,t)=>{const o=e.document.createRange();return sc(o,t),o},sc=(e,t)=>e.selectNodeContents(t.dom),ic=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},lc=(e,t,o,n,r)=>{const a=e.document.createRange();return a.setStart(t.dom,o),a.setEnd(n.dom,r),a},cc=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),dc=Ps([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),uc=(e,t,o)=>t(we.fromDom(o.startContainer),o.startOffset,we.fromDom(o.endContainer),o.endOffset),mc=(e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:p(e),rtl:_.none}),relative:(t,o)=>({ltr:eo((()=>ic(e,t,o))),rtl:eo((()=>_.some(ic(e,o,t))))}),exact:(t,o,n,r)=>({ltr:eo((()=>lc(e,t,o,n,r))),rtl:eo((()=>_.some(lc(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();return o.collapsed?t.rtl().filter((e=>!1===e.collapsed)).map((e=>dc.rtl(we.fromDom(e.endContainer),e.endOffset,we.fromDom(e.startContainer),e.startOffset))).getOrThunk((()=>uc(0,dc.ltr,o))):uc(0,dc.ltr,o)})(0,o)},gc=(e,t)=>mc(e,t).match({ltr:(t,o,n,r)=>{const a=e.document.createRange();return a.setStart(t.dom,o),a.setEnd(n.dom,r),a},rtl:(t,o,n,r)=>{const a=e.document.createRange();return a.setStart(n.dom,r),a.setEnd(t.dom,o),a}});dc.ltr,dc.rtl;const pc=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),hc=(e,t,o,n)=>({start:oc.on(e,t),finish:oc.on(o,n)}),fc=(e,t)=>{const o=gc(e,t);return pc(we.fromDom(o.startContainer),o.startOffset,we.fromDom(o.endContainer),o.endOffset)},yc=hc,bc=(e,t,o,n,r)=>Se(o,n)?_.none():ra(o,n,t).bind((t=>{const n=t.boxes.getOr([]);return n.length>1?(r(e,n,t.start,t.finish),_.some(nc(_.some(yc(o,0,o,br(o))),!0))):_.none()})),vc=(e,t)=>({item:e,mode:t}),kc=(e,t,o,n=wc)=>e.property().parent(t).map((e=>vc(e,n))),wc=(e,t,o,n=_c)=>o.sibling(e,t).map((e=>vc(e,n))),_c=(e,t,o,n=_c)=>{const r=e.property().children(t);return o.first(r).map((e=>vc(e,n)))},xc=[{current:kc,next:wc,fallback:_.none()},{current:wc,next:_c,fallback:_.some(kc)},{current:_c,next:_c,fallback:_.some(wc)}],Cc=(e,t,o,n,r=xc)=>B(r,(e=>e.current===o)).bind((o=>o.current(e,t,n,o.next).orThunk((()=>o.fallback.bind((o=>Cc(e,t,o,n))))))),Sc=(e,t,o,n,r,a)=>Cc(e,t,n,r).bind((t=>a(t.item)?_.none():o(t.item)?_.some(t.item):Sc(e,t.item,o,t.mode,r,a))),zc=e=>t=>0===e.property().children(t).length,Oc=(e,t,o,n)=>Sc(e,t,o,wc,{sibling:(e,t)=>e.query().prevSibling(t),first:e=>e.length>0?_.some(e[e.length-1]):_.none()},n),Tc=(e,t,o,n)=>Sc(e,t,o,wc,{sibling:(e,t)=>e.query().nextSibling(t),first:e=>e.length>0?_.some(e[0]):_.none()},n),Ec=Jr(),Ac=(e,t)=>((e,t,o)=>Oc(e,t,zc(e),o))(Ec,e,t),Mc=(e,t)=>((e,t,o)=>Tc(e,t,zc(e),o))(Ec,e,t),Nc=Ps([{none:["message"]},{success:[]},{failedUp:["cell"]},{failedDown:["cell"]}]),Rc=e=>bt(e,"tr"),Dc={...Nc,verify:(e,t,o,n,r,a,s)=>bt(n,"td,th",s).bind((o=>bt(t,"td,th",s).map((t=>Se(o,t)?Se(n,o)&&br(o)===r?a(t):Nc.none("in same cell"):oa(Rc,[o,t]).fold((()=>((e,t,o)=>{const n=e.getRect(t),r=e.getRect(o);return r.right>n.left&&r.left<n.right})(e,t,o)?Nc.success():a(t)),(e=>a(t))))))).getOr(Nc.none("default")),cata:(e,t,o,n,r)=>e.fold(t,o,n,r)},Bc=me("br"),Lc=(e,t,o)=>t(e,o).bind((e=>ce(e)&&0===hr(e).trim().length?Lc(e,t,o):_.some(e))),Ic=(e,t,o,n)=>((e,t)=>Le(e,t).filter(Bc).orThunk((()=>Le(e,t-1).filter(Bc))))(t,o).bind((t=>n.traverse(t).fold((()=>Lc(t,n.gather,e).map(n.relative)),(e=>(e=>Ae(e).bind((t=>{const o=Be(t);return((e,t)=>L(e,y(Se,t)))(o,e).map((n=>((e,t,o,n)=>({parent:e,children:t,element:o,index:n}))(t,o,e,n)))})))(e).map((e=>oc.on(e.parent,e.index))))))),Hc=(e,t)=>({left:e.left,top:e.top+t,right:e.right,bottom:e.bottom+t}),Pc=(e,t)=>({left:e.left,top:e.top-t,right:e.right,bottom:e.bottom-t}),Fc=(e,t,o)=>({left:e.left+t,top:e.top+o,right:e.right+t,bottom:e.bottom+o}),jc=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom}),Vc=(e,t)=>_.some(e.getRect(t)),Zc=(e,t,o)=>le(t)?Vc(e,t).map(jc):ce(t)?((e,t,o)=>o>=0&&o<br(t)?e.getRangedRect(t,o,t,o+1):o>0?e.getRangedRect(t,o-1,t,o):_.none())(e,t,o).map(jc):_.none(),Uc=(e,t)=>le(t)?Vc(e,t).map(jc):ce(t)?e.getRangedRect(t,0,t,br(t)).map(jc):_.none(),qc=Ps([{none:[]},{retry:["caret"]}]),Wc=(e,t,o)=>pt(t,oi).fold(k,(t=>Uc(e,t).exists((e=>((e,t)=>e.left<t.left||Math.abs(t.right-e.left)<1||e.left>t.right)(o,e))))),$c={point:e=>e.bottom,adjuster:(e,t,o,n,r)=>{const a=Hc(r,5);return Math.abs(o.bottom-n.bottom)<1||o.top>r.bottom?qc.retry(a):o.top===r.bottom?qc.retry(Hc(r,1)):Wc(e,t,r)?qc.retry(Fc(a,5,0)):qc.none()},move:Hc,gather:Mc},Gc=(e,t,o,n,r)=>0===r?_.some(n):((e,t,o)=>e.elementFromPoint(t,o).filter((e=>"table"===ne(e))).isSome())(e,n.left,t.point(n))?((e,t,o,n,r)=>Gc(e,t,o,t.move(n,5),r))(e,t,o,n,r-1):e.situsFromPoint(n.left,t.point(n)).bind((a=>a.start.fold(_.none,(a=>Uc(e,a).bind((s=>t.adjuster(e,a,s,o,n).fold(_.none,(n=>Gc(e,t,o,n,r-1))))).orThunk((()=>_.some(n)))),_.none))),Kc=(e,t,o)=>{const n=e.move(o,5),r=Gc(t,e,o,n,100).getOr(n);return((e,t,o)=>e.point(t)>o.getInnerHeight()?_.some(e.point(t)-o.getInnerHeight()):e.point(t)<0?_.some(-e.point(t)):_.none())(e,r,t).fold((()=>t.situsFromPoint(r.left,e.point(r))),(o=>(t.scrollBy(0,o),t.situsFromPoint(r.left,e.point(r)-o))))},Yc={tryUp:y(Kc,{point:e=>e.top,adjuster:(e,t,o,n,r)=>{const a=Pc(r,5);return Math.abs(o.top-n.top)<1||o.bottom<r.top?qc.retry(a):o.bottom===r.top?qc.retry(Pc(r,1)):Wc(e,t,r)?qc.retry(Fc(a,5,0)):qc.none()},move:Pc,gather:Ac}),tryDown:y(Kc,$c),getJumpSize:p(5)},Xc=(e,t,o)=>e.getSelection().bind((n=>((e,t,o,n)=>{const r=Bc(t)?((e,t,o)=>o.traverse(t).orThunk((()=>Lc(t,o.gather,e))).map(o.relative))(e,t,n):Ic(e,t,o,n);return r.map((e=>({start:e,finish:e})))})(t,n.finish,n.foffset,o).fold((()=>_.some(Oa(n.finish,n.foffset))),(r=>{const a=e.fromSitus(r);return s=Dc.verify(e,n.finish,n.foffset,a.finish,a.foffset,o.failure,t),Dc.cata(s,(e=>_.none()),(()=>_.none()),(e=>_.some(Oa(e,0))),(e=>_.some(Oa(e,br(e)))));var s})))),Jc=(e,t,o,n,r,a)=>0===a?_.none():td(e,t,o,n,r).bind((s=>{const i=e.fromSitus(s),l=Dc.verify(e,o,n,i.finish,i.foffset,r.failure,t);return Dc.cata(l,(()=>_.none()),(()=>_.some(s)),(s=>Se(o,s)&&0===n?Qc(e,o,n,Pc,r):Jc(e,t,s,0,r,a-1)),(s=>Se(o,s)&&n===br(s)?Qc(e,o,n,Hc,r):Jc(e,t,s,br(s),r,a-1)))})),Qc=(e,t,o,n,r)=>Zc(e,t,o).bind((t=>ed(e,r,n(t,Yc.getJumpSize())))),ed=(e,t,o)=>{const n=Mo().browser;return n.isChromium()||n.isSafari()||n.isFirefox()?t.retry(e,o):_.none()},td=(e,t,o,n,r)=>Zc(e,o,n).bind((t=>ed(e,r,t))),od=(e,t,o,n,r)=>bt(n,"td,th",t).bind((n=>bt(n,"table",t).bind((a=>((e,t)=>gt(e,(e=>Ae(e).exists((e=>Se(e,t)))),void 0).isSome())(r,a)?((e,t,o)=>Xc(e,t,o).bind((n=>Jc(e,t,n.element,n.offset,o,20).map(e.fromSitus))))(e,t,o).bind((e=>bt(e.finish,"td,th",t).map((t=>({start:n,finish:t,range:e}))))):_.none())))),nd=(e,t,o,n,r,a)=>a(n,t).orThunk((()=>od(e,t,o,n,r).map((e=>{const t=e.range;return nc(_.some(yc(t.start,t.soffset,t.finish,t.foffset)),!0)})))),rd=(e,t)=>bt(e,"tr",t).bind((e=>bt(e,"table",t).bind((o=>{const n=ut(o,"tr");return Se(e,n[0])?((e,t,o)=>Oc(Ec,e,(e=>_r(e).isSome()),o))(o,0,t).map((e=>{const t=br(e);return nc(_.some(yc(e,t,e,t)),!0)})):_.none()})))),ad=(e,t)=>bt(e,"tr",t).bind((e=>bt(e,"table",t).bind((o=>{const n=ut(o,"tr");return Se(e,n[n.length-1])?((e,t,o)=>Tc(Ec,e,(e=>wr(e).isSome()),o))(o,0,t).map((e=>nc(_.some(yc(e,0,e,0)),!0))):_.none()})))),sd=(e,t,o,n,r,a,s)=>od(e,o,n,r,a).bind((e=>bc(t,o,e.start,e.finish,s))),id=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},ld=()=>{const e=(e=>{const t=id(_.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(_.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(_.some(e))}}})(g);return{...e,on:t=>e.get().each(t)}},cd=(e,t)=>bt(e,"td,th",t),dd=e=>Me(e).exists(Dr),ud={traverse:De,gather:Mc,relative:oc.before,retry:Yc.tryDown,failure:Dc.failedDown},md={traverse:Re,gather:Ac,relative:oc.before,retry:Yc.tryUp,failure:Dc.failedUp},gd=e=>t=>t===e,pd=gd(38),hd=gd(40),fd=e=>e>=37&&e<=40,yd={isBackward:gd(37),isForward:gd(39)},bd={isBackward:gd(39),isForward:gd(37)},vd=Ps([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),kd={domRange:vd.domRange,relative:vd.relative,exact:vd.exact,exactFromRange:e=>vd.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>we.fromDom(e.startContainer),relative:(e,t)=>oc.getStart(e),exact:(e,t,o,n)=>e}))(e);return we.fromDom(Ee(t).dom.defaultView)},range:pc},wd=document.caretPositionFromPoint?(e,t,o)=>{var n,r;return _.from(null===(r=(n=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(n,t,o)).bind((t=>{if(null===t.offsetNode)return _.none();const o=e.dom.createRange();return o.setStart(t.offsetNode,t.offset),o.collapse(),_.some(o)}))}:document.caretRangeFromPoint?(e,t,o)=>{var n,r;return _.from(null===(r=(n=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(n,t,o))}:_.none,_d=(e,t)=>{const o=ne(e);return"input"===o?oc.after(e):z(["br","img"],o)?0===t?oc.before(e):oc.after(e):oc.on(e,t)},xd=e=>_.from(e.getSelection()),Cd=(e,t)=>{xd(e).each((e=>{e.removeAllRanges(),e.addRange(t)}))},Sd=(e,t,o,n,r)=>{const a=lc(e,t,o,n,r);Cd(e,a)},zd=(e,t)=>mc(e,t).match({ltr:(t,o,n,r)=>{Sd(e,t,o,n,r)},rtl:(t,o,n,r)=>{xd(e).each((a=>{if(a.setBaseAndExtent)a.setBaseAndExtent(t.dom,o,n.dom,r);else if(a.extend)try{((e,t,o,n,r,a)=>{t.collapse(o.dom,n),t.extend(r.dom,a)})(0,a,t,o,n,r)}catch(a){Sd(e,n,r,t,o)}else Sd(e,n,r,t,o)}))}}),Od=(e,t,o,n,r)=>{const a=((e,t,o,n)=>{const r=_d(e,t),a=_d(o,n);return kd.relative(r,a)})(t,o,n,r);zd(e,a)},Td=(e,t,o)=>{const n=((e,t)=>{const o=e.fold(oc.before,_d,oc.after),n=t.fold(oc.before,_d,oc.after);return kd.relative(o,n)})(t,o);zd(e,n)},Ed=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return _.some(pc(we.fromDom(t.startContainer),t.startOffset,we.fromDom(o.endContainer),o.endOffset))}return _.none()},Ad=e=>{if(null===e.anchorNode||null===e.focusNode)return Ed(e);{const t=we.fromDom(e.anchorNode),o=we.fromDom(e.focusNode);return((e,t,o,n)=>{const r=((e,t,o,n)=>{const r=Te(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),a=Se(e,o)&&t===n;return r.collapsed&&!a})(t,e.anchorOffset,o,e.focusOffset)?_.some(pc(t,e.anchorOffset,o,e.focusOffset)):Ed(e)}},Md=(e,t,o=!0)=>{const n=(o?ac:rc)(e,t);Cd(e,n)},Nd=e=>(e=>xd(e).filter((e=>e.rangeCount>0)).bind(Ad))(e).map((e=>kd.exact(e.start,e.soffset,e.finish,e.foffset))),Rd=e=>({elementFromPoint:(t,o)=>we.fromPoint(we.fromDom(e.document),t,o),getRect:e=>e.dom.getBoundingClientRect(),getRangedRect:(t,o,n,r)=>{const a=kd.exact(t,o,n,r);return((e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?_.some(o).map(cc):_.none()})(gc(e,t)))(e,a)},getSelection:()=>Nd(e).map((t=>fc(e,t))),fromSitus:t=>{const o=kd.relative(t.start,t.finish);return fc(e,o)},situsFromPoint:(t,o)=>((e,t,o)=>((e,t,o)=>{const n=we.fromDom(e.document);return wd(n,t,o).map((e=>pc(we.fromDom(e.startContainer),e.startOffset,we.fromDom(e.endContainer),e.endOffset)))})(e,t,o))(e,t,o).map((e=>hc(e.start,e.soffset,e.finish,e.foffset))),clearSelection:()=>{(e=>{xd(e).each((e=>e.removeAllRanges()))})(e)},collapseSelection:(t=!1)=>{Nd(e).each((o=>o.fold((e=>e.collapse(t)),((o,n)=>{const r=t?o:n;Td(e,r,r)}),((o,n,r,a)=>{const s=t?o:r,i=t?n:a;Od(e,s,i,s,i)}))))},setSelection:t=>{Od(e,t.start,t.soffset,t.finish,t.foffset)},setRelativeSelection:(t,o)=>{Td(e,t,o)},selectNode:t=>{Md(e,t,!1)},selectContents:t=>{Md(e,t)},getInnerHeight:()=>e.innerHeight,getScrollY:()=>(e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return bn(o,n)})(we.fromDom(e.document)).top,scrollBy:(t,o)=>{((e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollBy(e,t)})(t,o,we.fromDom(e.document))}}),Dd=(e,t)=>({rows:e,cols:t}),Bd=e=>pt(e,ie).exists(Dr),Ld=(e,t)=>Bd(e)||Bd(t),Id=e=>void 0!==e.dom.classList,Hd=(e,t)=>((e,t,o)=>{const n=((e,t)=>{const o=fe(e,t);return void 0===o||""===o?[]:o.split(" ")})(e,t).concat([o]);return pe(e,t,n.join(" ")),!0})(e,"class",t),Pd=(e,t)=>{Id(e)?e.dom.classList.add(t):Hd(e,t)},Fd=(e,t)=>Id(e)&&e.dom.classList.contains(t),jd=()=>({tag:"none"}),Vd=e=>({tag:"multiple",elements:e}),Zd=e=>({tag:"single",element:e}),Ud=e=>{const t=we.fromDom((e=>{if(nt()&&d(e.target)){const t=we.fromDom(e.target);if(le(t)&&d(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return V(t)}}return _.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=(a=n,s=o,(...e)=>a(s.apply(null,e)));var a,s;return((e,t,o,n,r,a,s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:a,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)},qd=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Wd=w,$d=(e,t,o)=>((e,t,o,n)=>((e,t,o,n,r)=>{const a=((e,t)=>o=>{e(o)&&t(Ud(o))})(o,n);return e.dom.addEventListener(t,a,r),{unbind:y(qd,e,t,a,r)}})(e,t,o,n,!1))(e,t,Wd,o),Gd=Ud,Kd=e=>!Fd(we.fromDom(e.target),"ephox-snooker-resizer-bar"),Yd=(e,t)=>{const o=(r=ka.selectedSelector,{get:()=>la(we.fromDom(e.getBody()),r).fold((()=>Ca(Pr(e),Ir(e)).fold(jd,Zd)),Vd)}),n=((e,t,o)=>{const n=t=>{be(t,e.selected),be(t,e.firstSelected),be(t,e.lastSelected)},r=t=>{pe(t,e.selected,"1")},a=e=>{s(e),o()},s=t=>{const o=ut(t,`${e.selectedSelector},${e.firstSelectedSelector},${e.lastSelectedSelector}`);A(o,n)};return{clearBeforeUpdate:s,clear:a,selectRange:(o,n,s,i)=>{a(o),A(n,r),pe(s,e.firstSelected,"1"),pe(i,e.lastSelected,"1"),t(n,s,i)},selectedSelector:e.selectedSelector,firstSelectedSelector:e.firstSelectedSelector,lastSelectedSelector:e.lastSelectedSelector}})(ka,((t,o,n)=>{Gt(o).each((r=>{const a=ol(e),s=Mr(g,we.fromDom(e.getDoc()),a),i=((e,t,o)=>{const n=Qo(e);return gs(n,t).map((e=>{const t=is(n,o,!1),{rows:r}=qo(t),a=((e,t)=>{const o=e.slice(0,t[t.length-1].row+1),n=ls(o);return H(n,(e=>{const o=e.cells.slice(0,t[t.length-1].column+1);return E(o,(e=>e.element))}))})(r,e),s=((e,t)=>{const o=e.slice(t[0].row+t[0].rowspan-1,e.length),n=ls(o);return H(n,(e=>{const o=e.cells.slice(t[0].column+t[0].colspan-1,e.cells.length);return E(o,(e=>e.element))}))})(r,e);return{upOrLeftCells:a,downOrRightCells:s}}))})(r,{selection:Sa(e)},s);((e,t,o,n,r)=>{e.dispatch("TableSelectionChange",{cells:t,start:o,finish:n,otherCells:r})})(e,t,o,n,i)}))}),(()=>(e=>{e.dispatch("TableSelectionClear")})(e)));var r;return e.on("init",(o=>{const r=e.getWin(),a=Lr(e),s=Ir(e),i=((e,t,o,n)=>{const r=((e,t,o,n)=>{const r=ld(),a=r.clear,s=a=>{r.on((r=>{n.clearBeforeUpdate(t),cd(a.target,o).each((s=>{ra(r,s,o).each((o=>{const r=o.boxes.getOr([]);if(1===r.length){const o=r[0],s="false"===Br(o),i=vt(Rr(a.target),o,Se);s&&i&&(n.selectRange(t,r,o,o),e.selectContents(o))}else r.length>1&&(n.selectRange(t,r,o.start,o.finish),e.selectContents(s))}))}))}))};return{clearstate:a,mousedown:e=>{n.clear(t),cd(e.target,o).filter(dd).each(r.set)},mouseover:e=>{s(e)},mouseup:e=>{s(e),a()}}})(Rd(e),t,o,n);return{clearstate:r.clearstate,mousedown:r.mousedown,mouseover:r.mouseover,mouseup:r.mouseup}})(r,a,s,n),l=((e,t,o,n)=>{const r=Rd(e),a=()=>(n.clear(t),_.none());return{keydown:(e,s,i,l,c,d)=>{const u=e.raw,m=u.which,g=!0===u.shiftKey,p=aa(t,n.selectedSelector).fold((()=>(fd(m)&&!g&&n.clearBeforeUpdate(t),fd(m)&&g&&!Ld(s,l)?_.none:hd(m)&&g?y(sd,r,t,o,ud,l,s,n.selectRange):pd(m)&&g?y(sd,r,t,o,md,l,s,n.selectRange):hd(m)?y(nd,r,o,ud,l,s,ad):pd(m)?y(nd,r,o,md,l,s,rd):_.none)),(e=>{const o=o=>()=>{const a=U(o,(o=>((e,t,o,n,r)=>ia(n,e,t,r.firstSelectedSelector,r.lastSelectedSelector).map((e=>(r.clearBeforeUpdate(o),r.selectRange(o,e.boxes,e.start,e.finish),e.boxes))))(o.rows,o.cols,t,e,n)));return a.fold((()=>sa(t,n.firstSelectedSelector,n.lastSelectedSelector).map((e=>{const o=hd(m)||d.isForward(m)?oc.after:oc.before;return r.setRelativeSelection(oc.on(e.first,0),o(e.table)),n.clear(t),nc(_.none(),!0)}))),(e=>_.some(nc(_.none(),!0))))};return fd(m)&&g&&!Ld(s,l)?_.none:hd(m)&&g?o([Dd(1,0)]):pd(m)&&g?o([Dd(-1,0)]):d.isBackward(m)&&g?o([Dd(0,-1),Dd(-1,0)]):d.isForward(m)&&g?o([Dd(0,1),Dd(1,0)]):fd(m)&&!g?a:_.none}));return p()},keyup:(e,r,a,s,i)=>aa(t,n.selectedSelector).fold((()=>{const l=e.raw,c=l.which;return!0===l.shiftKey&&fd(c)&&Ld(r,s)?((e,t,o,n,r,a,s)=>Se(o,r)&&n===a?_.none():bt(o,"td,th",t).bind((o=>bt(r,"td,th",t).bind((n=>bc(e,t,o,n,s))))))(t,o,r,a,s,i,n.selectRange):_.none()}),_.none)}})(r,a,s,n),c=((e,t,o,n)=>{const r=Rd(e);return(e,a)=>{n.clearBeforeUpdate(t),ra(e,a,o).each((e=>{const o=e.boxes.getOr([]);n.selectRange(t,o,e.start,e.finish),r.selectContents(a),r.collapseSelection()}))}})(r,a,s,n);e.on("TableSelectorChange",(e=>c(e.start,e.finish)));const d=(t,o)=>{(e=>!0===e.raw.shiftKey)(t)&&(o.kill&&t.kill(),o.selection.each((t=>{const o=kd.relative(t.start,t.finish),n=gc(r,o);e.selection.setRng(n)})))},u=e=>0===e.button,m=(()=>{const e=id(we.fromDom(a)),t=id(0);return{touchEnd:o=>{const n=we.fromDom(o.target);if(me("td")(n)||me("th")(n)){const r=e.get(),a=t.get();Se(r,n)&&o.timeStamp-a<300&&(o.preventDefault(),c(n,n))}e.set(n),t.set(o.timeStamp)}}})();e.on("dragstart",(e=>{i.clearstate()})),e.on("mousedown",(e=>{u(e)&&Kd(e)&&i.mousedown(Gd(e))})),e.on("mouseover",(e=>{var t;void 0!==(t=e).buttons&&0==(1&t.buttons)||!Kd(e)||i.mouseover(Gd(e))})),e.on("mouseup",(e=>{u(e)&&Kd(e)&&i.mouseup(Gd(e))})),e.on("touchend",m.touchEnd),e.on("keyup",(t=>{const o=Gd(t);if(o.raw.shiftKey&&fd(o.raw.which)){const t=e.selection.getRng(),n=we.fromDom(t.startContainer),r=we.fromDom(t.endContainer);l.keyup(o,n,t.startOffset,r,t.endOffset).each((e=>{d(o,e)}))}})),e.on("keydown",(o=>{const n=Gd(o);t.hide();const r=e.selection.getRng(),a=we.fromDom(r.startContainer),s=we.fromDom(r.endContainer),i=mn(yd,bd)(we.fromDom(e.selection.getStart()));l.keydown(n,a,r.startOffset,s,r.endOffset,i).each((e=>{d(n,e)})),t.show()})),e.on("NodeChange",(()=>{const t=e.selection,o=we.fromDom(t.getStart()),r=we.fromDom(t.getEnd());oa(Gt,[o,r]).fold((()=>n.clear(a)),g)}))})),e.on("PreInit",(()=>{e.serializer.addTempAttr(ka.firstSelected),e.serializer.addTempAttr(ka.lastSelected)})),{getSelectedCells:()=>((e,t,o,n)=>{switch(e.tag){case"none":return t();case"single":return(e=>[e.dom])(e.element);case"multiple":return(e=>E(e,(e=>e.dom)))(e.elements)}})(o.get(),p([])),clearSelectedCells:e=>n.clear(we.fromDom(e))}},Xd=e=>{let t=[];return{bind:e=>{if(void 0===e)throw new Error("Event bind error: undefined handler");t.push(e)},unbind:e=>{t=N(t,(t=>t!==e))},trigger:(...o)=>{const n={};A(e,((e,t)=>{n[e]=o[t]})),A(t,(e=>{e(n)}))}}},Jd=e=>({registry:G(e,(e=>({bind:e.bind,unbind:e.unbind}))),trigger:G(e,(e=>e.trigger))}),Qd=e=>e.slice(0).sort(),eu=(e,t)=>{const o=N(t,(t=>!z(e,t)));o.length>0&&(e=>{throw new Error("Unsupported keys for object: "+Qd(e).join(", "))})(o)},tu=e=>((e,t)=>((e,t,o)=>{if(0===t.length)throw new Error("You must specify at least one required field.");return((e,t)=>{if(!s(t))throw new Error("The "+e+" fields must be an array. Was: "+t+".");A(t,(t=>{if(!r(t))throw new Error("The value "+t+" in the "+e+" fields was not a string.")}))})("required",t),(e=>{const t=Qd(e);B(t,((e,o)=>o<t.length-1&&e===t[o+1])).each((e=>{throw new Error("The field: "+e+" occurs more than once in the combined fields: ["+t.join(", ")+"].")}))})(t),n=>{const r=q(n);P(t,(e=>z(r,e)))||((e,t)=>{throw new Error("All required keys ("+Qd(e).join(", ")+") were not specified. Specified keys were: "+Qd(t).join(", ")+".")})(t,r),e(t,r);const a=N(t,(e=>!o.validate(n[e],e)));return a.length>0&&((e,t)=>{throw new Error("All values need to be of type: "+t+". Keys ("+Qd(e).join(", ")+") were not.")})(a,o.label),n}})(e,t,{validate:u,label:"function"}))(eu,e),ou=tu(["compare","extract","mutate","sink"]),nu=tu(["element","start","stop","destroy"]),ru=tu(["forceDrop","drop","move","delayDrop"]),au=()=>{const e=(()=>{const e=Jd({move:Xd(["info"])});return{onEvent:g,reset:g,events:e.registry}})(),t=(()=>{let e=_.none();const t=Jd({move:Xd(["info"])});return{onEvent:(o,n)=>{n.extract(o).each((o=>{const r=((t,o)=>{const n=e.map((e=>t.compare(e,o)));return e=_.some(o),n})(n,o);r.each((e=>{t.trigger.move(e)}))}))},reset:()=>{e=_.none()},events:t.registry}})();let o=e;return{on:()=>{o.reset(),o=t},off:()=>{o.reset(),o=e},isOn:()=>o===t,onEvent:(e,t)=>{o.onEvent(e,t)},events:t.events}},su=e=>{const t=e.replace(/\./g,"-");return{resolve:e=>t+"-"+e}},iu=su("ephox-dragster").resolve;var lu=ou({compare:(e,t)=>bn(t.left-e.left,t.top-e.top),extract:e=>_.some(bn(e.x,e.y)),sink:(e,t)=>{const o=(e=>{const t={layerClass:iu("blocker"),...e},o=we.fromTag("div");return pe(o,"role","presentation"),Mt(o,{position:"fixed",left:"0px",top:"0px",width:"100%",height:"100%"}),Pd(o,iu("blocker")),Pd(o,t.layerClass),{element:p(o),destroy:()=>{qe(o)}}})(t),n=$d(o.element(),"mousedown",e.forceDrop),r=$d(o.element(),"mouseup",e.drop),a=$d(o.element(),"mousemove",e.move),s=$d(o.element(),"mouseout",e.delayDrop);return nu({element:o.element,start:e=>{Fe(e,o.element())},stop:()=>{qe(o.element())},destroy:()=>{o.destroy(),r.unbind(),a.unbind(),s.unbind(),n.unbind()}})},mutate:(e,t)=>{e.mutate(t.left,t.top)}});const cu=su("ephox-snooker").resolve,du=cu("resizer-bar"),uu=cu("resizer-rows"),mu=cu("resizer-cols"),gu=e=>{const t=ut(e.parent(),"."+du);A(t,qe)},pu=(e,t,o)=>{const n=e.origin();A(t,(t=>{t.each((t=>{const r=o(n,t);Pd(r,du),Fe(e.parent(),r)}))}))},hu=(e,t,o,n,r)=>{const a=kn(o),s=t.isResizable,i=n.length>0?Nn.positions(n,o):[],l=i.length>0?((e,t)=>H(e.all,((e,o)=>t(e.element)?[o]:[])))(e,s):[];((e,t,o,n)=>{pu(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const a=we.fromTag("div");return Mt(a,{position:"absolute",left:t+"px",top:o-3.5+"px",height:"7px",width:n+"px"}),he(a,{"data-row":e,role:"presentation"}),a})(t.row,o.left-e.left,t.y-e.top,n);return Pd(r,uu),r}))})(t,N(i,((e,t)=>O(l,(e=>t===e)))),a,Lo(o));const c=r.length>0?Dn.positions(r,o):[],d=c.length>0?((e,t)=>{const o=[];return T(e.grid.columns,(n=>{ln(e,n).map((e=>e.element)).forall(t)&&o.push(n)})),N(o,(o=>{const n=nn(e,(e=>e.column===o));return P(n,(e=>t(e.element)))}))})(e,s):[];((e,t,o,n)=>{pu(e,t,((e,t)=>{const r=((e,t,o,n,r)=>{const a=we.fromTag("div");return Mt(a,{position:"absolute",left:t-3.5+"px",top:o+"px",height:r+"px",width:"7px"}),he(a,{"data-column":e,role:"presentation"}),a})(t.col,t.x-e.left,o.top-e.top,0,n);return Pd(r,mu),r}))})(t,N(c,((e,t)=>O(d,(e=>t===e)))),a,fn(o))},fu=(e,t)=>{if(gu(e),e.isResizable(t)){const o=Qo(t),n=un(o),r=cn(o);hu(o,e,t,n,r)}},yu=(e,t)=>{const o=ut(e.parent(),"."+du);A(o,t)},bu=e=>{yu(e,(e=>{At(e,"display","none")}))},vu=e=>{yu(e,(e=>{At(e,"display","block")}))},ku=cu("resizer-bar-dragging"),wu=e=>{const t=(()=>{const e=Jd({drag:Xd(["xDelta","yDelta","target"])});let t=_.none();const o=(()=>{const e=Jd({drag:Xd(["xDelta","yDelta"])});return{mutate:(t,o)=>{e.trigger.drag(t,o)},events:e.registry}})();return o.events.drag.bind((o=>{t.each((t=>{e.trigger.drag(o.xDelta,o.yDelta,t)}))})),{assign:e=>{t=_.some(e)},get:()=>t,mutate:o.mutate,events:e.registry}})(),o=((e,t={})=>{var o;return((e,t,o)=>{let n=!1;const r=Jd({start:Xd([]),stop:Xd([])}),a=au(),s=()=>{d.stop(),a.isOn()&&(a.off(),r.trigger.stop())},l=((e,t)=>{let o=null;const n=()=>{i(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...t)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,t)}),200)}}})(s);a.events.move.bind((o=>{t.mutate(e,o.info)}));const c=e=>(...t)=>{n&&e.apply(null,t)},d=t.sink(ru({forceDrop:s,drop:c(s),move:c((e=>{l.cancel(),a.onEvent(e,t)})),delayDrop:c(l.throttle)}),o);return{element:d.element,go:e=>{d.start(e),a.on(),r.trigger.start()},on:()=>{n=!0},off:()=>{n=!1},isActive:()=>n,destroy:()=>{d.destroy()},events:r.registry}})(e,null!==(o=t.mode)&&void 0!==o?o:lu,t)})(t,{});let n=_.none();const r=(e,t)=>_.from(fe(e,t));t.events.drag.bind((e=>{r(e.target,"data-row").each((t=>{const o=Ft(e.target,"top");At(e.target,"top",o+e.yDelta+"px")})),r(e.target,"data-column").each((t=>{const o=Ft(e.target,"left");At(e.target,"left",o+e.xDelta+"px")}))}));const a=(e,t)=>Ft(e,t)-Lt(e,"data-initial-"+t,0);o.events.stop.bind((()=>{t.get().each((t=>{n.each((o=>{r(t,"data-row").each((e=>{const n=a(t,"top");be(t,"data-initial-top"),u.trigger.adjustHeight(o,n,parseInt(e,10))})),r(t,"data-column").each((e=>{const n=a(t,"left");be(t,"data-initial-left"),u.trigger.adjustWidth(o,n,parseInt(e,10))})),fu(e,o)}))}))}));const s=(n,r)=>{u.trigger.startAdjust(),t.assign(n),pe(n,"data-initial-"+r,Ft(n,r)),Pd(n,ku),At(n,"opacity","0.2"),o.go(e.parent())},l=$d(e.parent(),"mousedown",(e=>{var t;t=e.target,Fd(t,uu)&&s(e.target,"top"),(e=>Fd(e,mu))(e.target)&&s(e.target,"left")})),c=t=>Se(t,e.view()),d=$d(e.view(),"mouseover",(t=>{var r;(r=t.target,bt(r,"table",c).filter(Dr)).fold((()=>{st(t.target)&&gu(e)}),(t=>{o.isActive()&&(n=_.some(t),fu(e,t))}))})),u=Jd({adjustHeight:Xd(["table","delta","row"]),adjustWidth:Xd(["table","delta","column"]),startAdjust:Xd([])});return{destroy:()=>{l.unbind(),d.unbind(),o.destroy(),gu(e)},refresh:t=>{fu(e,t)},on:o.on,off:o.off,hideBars:y(bu,e),showBars:y(vu,e),events:u.registry}},_u=(e,t,o)=>{const n=Nn,r=Dn,a=wu(e),s=Jd({beforeResize:Xd(["table","type"]),afterResize:Xd(["table","type"]),startDrag:Xd([])});return a.events.adjustHeight.bind((e=>{const t=e.table;s.trigger.beforeResize(t,"row");((e,t,o,n)=>{const r=Qo(e),a=((e,t,o)=>sr(e,t,o,Kn,(e=>e.getOrThunk(Vt))))(r,e,n),s=E(a,((e,n)=>o===n?Math.max(t+e,Vt()):e)),i=Vs(r,s),l=((e,t)=>E(e.all,((e,o)=>({element:e.element,height:t[o]}))))(r,s);A(l,(e=>{Zn(e.element,e.height)})),A(i,(e=>{Zn(e.element,e.height)}));const c=R(s,((e,t)=>e+t),0);Zn(e,c)})(t,n.delta(e.delta,t),e.row,n),s.trigger.afterResize(t,"row")})),a.events.startAdjust.bind((e=>{s.trigger.startDrag()})),a.events.adjustWidth.bind((e=>{const n=e.table;s.trigger.beforeResize(n,"col");const a=r.delta(e.delta,n),i=o(n);Us(n,a,e.column,t,i),s.trigger.afterResize(n,"col")})),{on:a.on,off:a.off,refreshBars:a.refresh,hideBars:a.hideBars,showBars:a.showBars,destroy:a.destroy,events:s.registry}},xu=e=>d(e)&&"TABLE"===e.nodeName,Cu="bar-",Su=e=>"false"!==fe(e,"data-mce-resize"),zu=e=>{const t=ld(),o=ld(),n=ld();let r,a;const s=t=>hl(e,t),i=()=>al(e)?Fa():Pa();return e.on("init",(()=>{const r=((e,t)=>e.inline?((e,t,o)=>({parent:p(t),view:p(e),origin:p(bn(0,0)),isResizable:o}))(we.fromDom(e.getBody()),(()=>{const e=we.fromTag("div");return Mt(e,{position:"static",height:"0",width:"0",padding:"0",margin:"0",border:"0"}),Fe(it(we.fromDom(document)),e),e})(),t):((e,t)=>{const o=de(e)?(e=>we.fromDom(Ee(e).dom.documentElement))(e):e;return{parent:p(o),view:p(e),origin:p(bn(0,0)),isResizable:t}})(we.fromDom(e.getDoc()),t))(e,Su);if(n.set(r),(e=>{const t=e.options.get("object_resizing");return z(t.split(","),"table")})(e)&&ul(e)){const n=i(),a=_u(r,n,s);a.on(),a.events.startDrag.bind((o=>{t.set(e.selection.getRng())})),a.events.beforeResize.bind((t=>{const o=t.table.dom;((e,t,o,n,r)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:r})})(e,o,Fr(o),jr(o),Cu+t.type)})),a.events.afterResize.bind((o=>{const n=o.table,r=n.dom;Hr(n),t.on((t=>{e.selection.setRng(t),e.focus()})),((e,t,o,n,r)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:r})})(e,r,Fr(r),jr(r),Cu+o.type),e.undoManager.add()})),o.set(a)}})),e.on("ObjectResizeStart",(t=>{const o=t.target;if(xu(o)){const n=we.fromDom(o);A(e.dom.select(".mce-clonedresizable"),(t=>{e.dom.addClass(t,"mce-"+rl(e)+"-columns")})),!Al(n)&&cl(e)?Dl(n):!El(n)&&ll(e)&&Rl(n),Ml(n)&&Ct(t.origin,Cu)&&Rl(n),r=t.width,a=dl(e)?"":((e,t)=>{const o=e.dom.getStyle(t,"width")||e.dom.getAttrib(t,"width");return _.from(o).filter(Ot)})(e,o).getOr("")}})),e.on("ObjectResized",(t=>{const o=t.target;if(xu(o)){const n=we.fromDom(o),l=t.origin;Ct(l,"corner-")&&((t,o,n)=>{const l=St(o,"e");if(""===a&&Rl(t),n!==r&&""!==a){At(t,"width",a);const o=i(),c=s(t),d=al(e)||l?(e=>ja(e).columns)(t)-1:0;Us(t,n-r,d,o,c)}else if((e=>/^(\d+(\.\d+)?)%$/.test(e))(a)){const e=parseFloat(a.replace("%",""));At(t,"width",n*e/r+"%")}(e=>/^(\d+(\.\d+)?)px$/.test(e))(a)&&(e=>{const t=Qo(e);sn(t)||A(Wt(e),(e=>{const t=Nt(e,"width");At(e,"width",t),be(e,"width")}))})(t)})(n,l,t.width),Hr(n),Ki(e,n.dom,Yi)}})),e.on("SwitchMode",(()=>{o.on((t=>{e.mode.isReadOnly()?t.hideBars():t.showBars()}))})),e.on("dragstart dragend",(e=>{o.on((t=>{"dragstart"===e.type?(t.hideBars(),t.off()):(t.on(),t.showBars())}))})),e.on("remove",(()=>{o.on((e=>{e.destroy()})),n.on((t=>{((e,t)=>{e.inline&&qe(t.parent())})(e,t)}))})),{refresh:e=>{o.on((t=>t.refreshBars(we.fromDom(e))))},hide:()=>{o.on((e=>e.hideBars()))},show:()=>{o.on((e=>e.showBars()))}}},Ou=e=>{(e=>{const t=e.options.register;t("table_clone_elements",{processor:"string[]"}),t("table_use_colgroups",{processor:"boolean",default:!0}),t("table_header_type",{processor:e=>{const t=z(["section","cells","sectionCells","auto"],e);return t?{value:e,valid:t}:{valid:!1,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"}}),t("table_column_resizing",{processor:e=>{const t=z(["preservetable","resizetable"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be preservetable, or resizetable."}},default:"preservetable"}),t("table_resize_bars",{processor:"boolean",default:!0}),t("table_style_by_css",{processor:"boolean",default:!0})})(e);const t=zu(e),o=Yd(e,t),n=fl(e,t,o);return ec(e,n),((e,t)=>{const o=Ir(e),n=t=>Ca(Pr(e)).bind((n=>Gt(n,o).map((o=>{const r=wa(Sa(e),o,n);return t(o,r)})))).getOr("");$({mceTableRowType:()=>n(t.getTableRowType),mceTableCellType:()=>n(t.getTableCellType),mceTableColType:()=>n(t.getTableColType)},((t,o)=>e.addQueryValueHandler(o,t)))})(e,n),za(e,n),{getSelectedCells:o.getSelectedCells,clearSelectedCells:o.clearSelectedCells}};e.add("dom",(e=>({table:Ou(e)})))}()},14400:function(e,t,o){o(92242)},92242:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t,o)=>{const n="UL"===t?"InsertUnorderedList":"InsertOrderedList";e.execCommand(n,!1,!1===o?null:{"list-style-type":o})},o=e=>t=>t.options.get(e),n=o("advlist_number_styles"),r=o("advlist_bullet_styles"),a=e=>null==e,s=e=>!a(e);var i=tinymce.util.Tools.resolve("tinymce.util.Tools");class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return s(e)?l.some(e):l.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);const c=e=>t=>s(t)&&e.test(t.nodeName),d=c(/^(OL|UL|DL)$/),u=c(/^(TH|TD)$/),m=e=>a(e)||"default"===e?"":e,g=(e,t)=>o=>((e,t)=>{const o=e.selection.getNode();return t({parents:e.dom.getParents(o),element:o}),e.on("NodeChange",t),()=>e.off("NodeChange",t)})(e,(n=>((e,n)=>{const r=e.selection.getStart(!0);o.setActive(((e,t,o)=>((e,t,o)=>{for(let t=0,r=e.length;t<r;t++){const r=e[t];if(d(n=r)&&!/\btox\-/.test(n.className))return l.some(r);if(o(r,t))break}var n;return l.none()})(t,0,u).exists((t=>t.nodeName===o&&((e,t)=>e.dom.isChildOf(t,e.getBody()))(e,t))))(e,n,t)),o.setEnabled(!((e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return((e,t)=>null!==t&&!e.dom.isEditable(t))(e,o)})(e,r))})(e,n.parents))),p=(e,o,n,r,a,s)=>{s.length>1?((e,o,n,r,a,s)=>{e.ui.registry.addSplitButton(o,{tooltip:n,icon:"OL"===a?"ordered-list":"unordered-list",presets:"listpreview",columns:3,fetch:e=>{e(i.map(s,(e=>{const t="OL"===a?"num":"bull",o="disc"===e||"decimal"===e?"default":e,n=m(e),r=(e=>e.replace(/\-/g," ").replace(/\b\w/g,(e=>e.toUpperCase())))(e);return{type:"choiceitem",value:n,icon:"list-"+t+"-"+o,text:r}})))},onAction:()=>e.execCommand(r),onItemAction:(o,n)=>{t(e,a,n)},select:t=>{const o=(e=>{const t=e.dom.getParent(e.selection.getNode(),"ol,ul"),o=e.dom.getStyle(t,"listStyleType");return l.from(o)})(e);return o.map((e=>t===e)).getOr(!1)},onSetup:g(e,a)})})(e,o,n,r,a,s):((e,o,n,r,a,s)=>{e.ui.registry.addToggleButton(o,{active:!1,tooltip:n,icon:"OL"===a?"ordered-list":"unordered-list",onSetup:g(e,a),onAction:()=>e.queryCommandState(r)||""===s?e.execCommand(r):t(e,a,s)})})(e,o,n,r,a,m(s[0]))};e.add("advlist",(e=>{e.hasPlugin("lists")?((e=>{const t=e.options.register;t("advlist_number_styles",{processor:"string[]",default:"default,lower-alpha,lower-greek,lower-roman,upper-alpha,upper-roman".split(",")}),t("advlist_bullet_styles",{processor:"string[]",default:"default,circle,square".split(",")})})(e),(e=>{p(e,"numlist","Numbered list","InsertOrderedList","OL",n(e)),p(e,"bullist","Bullet list","InsertUnorderedList","UL",r(e))})(e),(e=>{e.addCommand("ApplyUnorderedListStyle",((o,n)=>{t(e,"UL",n["list-style-type"])})),e.addCommand("ApplyOrderedListStyle",((o,n)=>{t(e,"OL",n["list-style-type"])}))})(e)):console.error("Please use the Lists plugin together with the Advanced List plugin.")}))}()},82929:function(e,t,o){o(94773)},94773:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=("allow_html_in_named_anchor",e=>e.options.get("allow_html_in_named_anchor"));const r="a:not([href])",a=e=>!e,s=e=>e.getAttribute("id")||e.getAttribute("name")||"",i=e=>(e=>"a"===e.nodeName.toLowerCase())(e)&&!e.getAttribute("href")&&""!==s(e),l=e=>e.dom.getParent(e.selection.getStart(),r),c=(e,r)=>{const a=l(e);a?((e,t,o)=>{o.removeAttribute("name"),o.id=t,e.addVisual(),e.undoManager.add()})(e,r,a):((e,r)=>{e.undoManager.transact((()=>{n(e)||e.selection.collapse(!0),e.selection.isCollapsed()?e.insertContent(e.dom.createHTML("a",{id:r})):((e=>{const n=e.dom;t(n).walk(e.selection.getRng(),(e=>{o.each(e,(e=>{var t;i(t=e)&&!t.firstChild&&n.remove(e,!1)}))}))})(e),e.formatter.remove("namedAnchor",void 0,void 0,!0),e.formatter.apply("namedAnchor",{value:r}),e.addVisual())}))})(e,r),e.focus()},d=e=>(e=>a(e.attr("href"))&&!a(e.attr("id")||e.attr("name")))(e)&&!e.firstChild,u=e=>t=>{for(let o=0;o<t.length;o++){const n=t[o];d(n)&&n.attr("contenteditable",e)}};e.add("anchor",(e=>{(e=>{(0,e.options.register)("allow_html_in_named_anchor",{processor:"boolean",default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("a",u("false")),e.serializer.addNodeFilter("a",u(null))}))})(e),(e=>{e.addCommand("mceAnchor",(()=>{(e=>{const t=(e=>{const t=l(e);return t?s(t):""})(e);e.windowManager.open({title:"Anchor",size:"normal",body:{type:"panel",items:[{name:"id",type:"input",label:"ID",placeholder:"example"}]},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:{id:t},onSubmit:t=>{((e,t)=>/^[A-Za-z][A-Za-z0-9\-:._]*$/.test(t)?(c(e,t),!0):(e.windowManager.alert("ID should start with a letter, followed only by letters, numbers, dashes, dots, colons or underscores."),!1))(e,t.getData().id)&&t.close()}})})(e)}))})(e),(e=>{const t=()=>e.execCommand("mceAnchor");e.ui.registry.addToggleButton("anchor",{icon:"bookmark",tooltip:"Anchor",onAction:t,onSetup:t=>e.selection.selectorChangedWithUnbind("a:not([href])",t.setActive).unbind}),e.ui.registry.addMenuItem("anchor",{icon:"bookmark",text:"Anchor...",onAction:t})})(e),e.on("PreInit",(()=>{(e=>{e.formatter.register("namedAnchor",{inline:"a",selector:r,remove:"all",split:!0,deep:!0,attributes:{id:"%value"},onmatch:(e,t,o)=>i(e)})})(e)}))}))}()},66884:function(e,t,o){o(7652)},7652:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),o=t("autolink_pattern"),n=t("link_default_target"),r=t("link_default_protocol"),a=t("allow_unsafe_link_target"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(e));const i=(void 0,e=>undefined===e);const l=e=>!(e=>null==e)(e),c=Object.hasOwnProperty,d=e=>"\ufeff"===e;var u=tinymce.util.Tools.resolve("tinymce.dom.TextSeeker");const m=e=>/^[(\[{ \u00a0]$/.test(e),g=(e,t,o)=>{for(let n=t-1;n>=0;n--){const t=e.charAt(n);if(!d(t)&&o(t))return n}return-1},p=(e,t)=>{var n;const a=e.schema.getVoidElements(),s=o(e),{dom:l,selection:d}=e;if(null!==l.getParent(d.getNode(),"a[href]"))return null;const p=d.getRng(),h=u(l,(e=>{return l.isBlock(e)||(t=a,o=e.nodeName.toLowerCase(),c.call(t,o))||"false"===l.getContentEditable(e);var t,o})),{container:f,offset:y}=((e,t)=>{let o=e,n=t;for(;1===o.nodeType&&o.childNodes[n];)o=o.childNodes[n],n=3===o.nodeType?o.data.length:o.childNodes.length;return{container:o,offset:n}})(p.endContainer,p.endOffset),b=null!==(n=l.getParent(f,l.isBlock))&&void 0!==n?n:l.getRoot(),v=h.backwards(f,y+t,((e,t)=>{const o=e.data,n=g(o,t,(r=m,e=>!r(e)));var r,a;return-1===n||(a=o[n],/[?!,.;:]/.test(a))?n:n+1}),b);if(!v)return null;let k=v.container;const w=h.backwards(v.container,v.offset,((e,t)=>{k=e;const o=g(e.data,t,m);return-1===o?o:o+1}),b),_=l.createRng();w?_.setStart(w.container,w.offset):_.setStart(k,0),_.setEnd(v.container,v.offset);const x=_.toString().replace(/\uFEFF/g,"").match(s);if(x){let t=x[0];return S="www.",(C=t).length>=4&&C.substr(0,4)===S?t=r(e)+"://"+t:((e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!i(n)||r+t.length<=n)})(t,"@")&&!(e=>/^([A-Za-z][A-Za-z\d.+-]*:\/\/)|mailto:/.test(e))(t)&&(t="mailto:"+t),{rng:_,url:t}}var C,S;return null},h=(e,t)=>{const{dom:o,selection:r}=e,{rng:i,url:l}=t,c=r.getBookmark();r.setRng(i);const d="createlink",u={command:d,ui:!1,value:l};if(!e.dispatch("BeforeExecCommand",u).isDefaultPrevented()){e.getDoc().execCommand(d,!1,l),e.dispatch("ExecCommand",u);const t=n(e);if(s(t)){const n=r.getNode();o.setAttrib(n,"target",t),"_blank"!==t||a(e)||o.setAttrib(n,"rel","noopener")}}r.moveToBookmark(c),e.nodeChanged()},f=e=>{const t=p(e,-1);l(t)&&h(e,t)},y=f;e.add("autolink",(e=>{(e=>{const t=e.options.register;t("autolink_pattern",{processor:"regexp",default:new RegExp("^"+/(?:[A-Za-z][A-Za-z\d.+-]{0,14}:\/\/(?:[-.~*+=!&;:'%@?^${}(),\w]+@)?|www\.|[-;:&=+$,.\w]+@)[A-Za-z\d-]+(?:\.[A-Za-z\d-]+)*(?::\d+)?(?:\/(?:[-.~*+=!;:'%@$(),\/\w]*[-~*+=%@$()\/\w])?)?(?:\?(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?(?:#(?:[-.~*+=!&;:'%@?^${}(),\/\w]+))?/g.source+"$","i")}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"})})(e),(e=>{e.on("keydown",(t=>{13!==t.keyCode||t.isDefaultPrevented()||(e=>{const t=p(e,0);l(t)&&h(e,t)})(e)})),e.on("keyup",(t=>{32===t.keyCode?f(e):(48===t.keyCode&&t.shiftKey||221===t.keyCode)&&y(e)}))})(e)}))}()},15209:function(e,t,o){o(78578)},78578:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("min_height"),r=o("max_height"),a=o("autoresize_overflow_padding"),s=o("autoresize_bottom_margin"),i=(e,t)=>{const o=e.getBody();o&&(o.style.overflowY=t?"":"hidden",t||(o.scrollTop=0))},l=(e,t,o,n)=>{var r;const a=parseInt(null!==(r=e.getStyle(t,o,n))&&void 0!==r?r:"",10);return isNaN(a)?0:a},c=(e,o,s,d)=>{var u;const m=e.dom,g=e.getDoc();if(!g)return;if((e=>e.plugins.fullscreen&&e.plugins.fullscreen.isFullscreen())(e))return void i(e,!0);const p=g.documentElement,h=d?d():a(e),f=null!==(u=n(e))&&void 0!==u?u:e.getElement().offsetHeight;let y=f;const b=l(m,p,"margin-top",!0),v=l(m,p,"margin-bottom",!0);let k=p.offsetHeight+b+v+h;k<0&&(k=0);const w=e.getContainer().offsetHeight-e.getContentAreaContainer().offsetHeight;k+w>f&&(y=k+w);const _=r(e);if(_&&y>_?(y=_,i(e,!0)):i(e,!1),y!==o.get()){const n=y-o.get();if(m.setStyle(e.getContainer(),"height",y+"px"),o.set(y),(e=>{e.dispatch("ResizeEditor")})(e),t.browser.isSafari()&&(t.os.isMacOS()||t.os.isiOS())){const t=e.getWin();t.scrollTo(t.pageXOffset,t.pageYOffset)}e.hasFocus()&&(e=>{if("setcontent"===(null==e?void 0:e.type.toLowerCase())){const t=e;return!0===t.selection||!0===t.paste}return!1})(s)&&e.selection.scrollIntoView(),(t.browser.isSafari()||t.browser.isChromium())&&n<0&&c(e,o,s,d)}};e.add("autoresize",(e=>{if((e=>{const t=e.options.register;t("autoresize_overflow_padding",{processor:"number",default:1}),t("autoresize_bottom_margin",{processor:"number",default:50})})(e),e.options.isSet("resize")||e.options.set("resize",!1),!e.inline){const o=(e=>{let t=0;return{get:()=>t,set:e=>{t=e}}})();((e,t)=>{e.addCommand("mceAutoResize",(()=>{c(e,t)}))})(e,o),((e,o)=>{let n,r,i=()=>s(e);e.on("init",(r=>{n=0;const s=a(e),l=e.dom;l.setStyles(e.getDoc().documentElement,{height:"auto"}),t.browser.isEdge()||t.browser.isIE()?l.setStyles(e.getBody(),{paddingLeft:s,paddingRight:s,"min-height":0}):l.setStyles(e.getBody(),{paddingLeft:s,paddingRight:s}),c(e,o,r,i),n+=1})),e.on("NodeChange SetContent keyup FullscreenStateChanged ResizeContent",(t=>{if(1===n)r=e.getContainer().offsetHeight,c(e,o,t,i),n+=1;else if(2===n){const t=r<e.getContainer().offsetHeight;if(t){const t=e.dom,o=e.getDoc();t.setStyles(o.documentElement,{"min-height":0}),t.setStyles(e.getBody(),{"min-height":"inherit"})}i=t?(0,()=>0):i,n+=1}else c(e,o,t,i)}))})(e,o)}}))}()},39719:function(e,t,o){o(97660)},97660:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t)=>{const o=((e,t)=>e.dispatch("insertCustomChar",{chr:t}))(e,t).chr;e.execCommand("mceInsertContent",!1,o)},o=e=>t=>e===t,n=("array",e=>"array"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(e));const r=o(null),a=o(void 0),s=e=>"function"==typeof e,i=(!1,()=>false);class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?l.none():l.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);const c=Array.prototype.push,d=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n};var u=tinymce.util.Tools.resolve("tinymce.util.Tools");const m=e=>t=>t.options.get(e),g=m("charmap"),p=m("charmap_append"),h=u.isArray,f="User Defined",y=e=>{return h(e)?(t=e,u.grep(t,(e=>h(e)&&2===e.length))):"function"==typeof e?e():[];var t},b=e=>{const t=((e,t)=>{const o=g(e);o&&(t=[{name:f,characters:y(o)}]);const n=p(e);if(n){const e=u.grep(t,(e=>e.name===f));return e.length?(e[0].characters=[...e[0].characters,...y(n)],t):t.concat({name:f,characters:y(n)})}return t})(e,[{name:"Currency",characters:[[36,"dollar sign"],[162,"cent sign"],[8364,"euro sign"],[163,"pound sign"],[165,"yen sign"],[164,"currency sign"],[8352,"euro-currency sign"],[8353,"colon sign"],[8354,"cruzeiro sign"],[8355,"french franc sign"],[8356,"lira sign"],[8357,"mill sign"],[8358,"naira sign"],[8359,"peseta sign"],[8360,"rupee sign"],[8361,"won sign"],[8362,"new sheqel sign"],[8363,"dong sign"],[8365,"kip sign"],[8366,"tugrik sign"],[8367,"drachma sign"],[8368,"german penny symbol"],[8369,"peso sign"],[8370,"guarani sign"],[8371,"austral sign"],[8372,"hryvnia sign"],[8373,"cedi sign"],[8374,"livre tournois sign"],[8375,"spesmilo sign"],[8376,"tenge sign"],[8377,"indian rupee sign"],[8378,"turkish lira sign"],[8379,"nordic mark sign"],[8380,"manat sign"],[8381,"ruble sign"],[20870,"yen character"],[20803,"yuan character"],[22291,"yuan character, in hong kong and taiwan"],[22278,"yen/yuan character variant one"]]},{name:"Text",characters:[[169,"copyright sign"],[174,"registered sign"],[8482,"trade mark sign"],[8240,"per mille sign"],[181,"micro sign"],[183,"middle dot"],[8226,"bullet"],[8230,"three dot leader"],[8242,"minutes / feet"],[8243,"seconds / inches"],[167,"section sign"],[182,"paragraph sign"],[223,"sharp s / ess-zed"]]},{name:"Quotations",characters:[[8249,"single left-pointing angle quotation mark"],[8250,"single right-pointing angle quotation mark"],[171,"left pointing guillemet"],[187,"right pointing guillemet"],[8216,"left single quotation mark"],[8217,"right single quotation mark"],[8220,"left double quotation mark"],[8221,"right double quotation mark"],[8218,"single low-9 quotation mark"],[8222,"double low-9 quotation mark"],[60,"less-than sign"],[62,"greater-than sign"],[8804,"less-than or equal to"],[8805,"greater-than or equal to"],[8211,"en dash"],[8212,"em dash"],[175,"macron"],[8254,"overline"],[164,"currency sign"],[166,"broken bar"],[168,"diaeresis"],[161,"inverted exclamation mark"],[191,"turned question mark"],[710,"circumflex accent"],[732,"small tilde"],[176,"degree sign"],[8722,"minus sign"],[177,"plus-minus sign"],[247,"division sign"],[8260,"fraction slash"],[215,"multiplication sign"],[185,"superscript one"],[178,"superscript two"],[179,"superscript three"],[188,"fraction one quarter"],[189,"fraction one half"],[190,"fraction three quarters"]]},{name:"Mathematical",characters:[[402,"function / florin"],[8747,"integral"],[8721,"n-ary sumation"],[8734,"infinity"],[8730,"square root"],[8764,"similar to"],[8773,"approximately equal to"],[8776,"almost equal to"],[8800,"not equal to"],[8801,"identical to"],[8712,"element of"],[8713,"not an element of"],[8715,"contains as member"],[8719,"n-ary product"],[8743,"logical and"],[8744,"logical or"],[172,"not sign"],[8745,"intersection"],[8746,"union"],[8706,"partial differential"],[8704,"for all"],[8707,"there exists"],[8709,"diameter"],[8711,"backward difference"],[8727,"asterisk operator"],[8733,"proportional to"],[8736,"angle"]]},{name:"Extended Latin",characters:[[192,"A - grave"],[193,"A - acute"],[194,"A - circumflex"],[195,"A - tilde"],[196,"A - diaeresis"],[197,"A - ring above"],[256,"A - macron"],[198,"ligature AE"],[199,"C - cedilla"],[200,"E - grave"],[201,"E - acute"],[202,"E - circumflex"],[203,"E - diaeresis"],[274,"E - macron"],[204,"I - grave"],[205,"I - acute"],[206,"I - circumflex"],[207,"I - diaeresis"],[298,"I - macron"],[208,"ETH"],[209,"N - tilde"],[210,"O - grave"],[211,"O - acute"],[212,"O - circumflex"],[213,"O - tilde"],[214,"O - diaeresis"],[216,"O - slash"],[332,"O - macron"],[338,"ligature OE"],[352,"S - caron"],[217,"U - grave"],[218,"U - acute"],[219,"U - circumflex"],[220,"U - diaeresis"],[362,"U - macron"],[221,"Y - acute"],[376,"Y - diaeresis"],[562,"Y - macron"],[222,"THORN"],[224,"a - grave"],[225,"a - acute"],[226,"a - circumflex"],[227,"a - tilde"],[228,"a - diaeresis"],[229,"a - ring above"],[257,"a - macron"],[230,"ligature ae"],[231,"c - cedilla"],[232,"e - grave"],[233,"e - acute"],[234,"e - circumflex"],[235,"e - diaeresis"],[275,"e - macron"],[236,"i - grave"],[237,"i - acute"],[238,"i - circumflex"],[239,"i - diaeresis"],[299,"i - macron"],[240,"eth"],[241,"n - tilde"],[242,"o - grave"],[243,"o - acute"],[244,"o - circumflex"],[245,"o - tilde"],[246,"o - diaeresis"],[248,"o slash"],[333,"o macron"],[339,"ligature oe"],[353,"s - caron"],[249,"u - grave"],[250,"u - acute"],[251,"u - circumflex"],[252,"u - diaeresis"],[363,"u - macron"],[253,"y - acute"],[254,"thorn"],[255,"y - diaeresis"],[563,"y - macron"],[913,"Alpha"],[914,"Beta"],[915,"Gamma"],[916,"Delta"],[917,"Epsilon"],[918,"Zeta"],[919,"Eta"],[920,"Theta"],[921,"Iota"],[922,"Kappa"],[923,"Lambda"],[924,"Mu"],[925,"Nu"],[926,"Xi"],[927,"Omicron"],[928,"Pi"],[929,"Rho"],[931,"Sigma"],[932,"Tau"],[933,"Upsilon"],[934,"Phi"],[935,"Chi"],[936,"Psi"],[937,"Omega"],[945,"alpha"],[946,"beta"],[947,"gamma"],[948,"delta"],[949,"epsilon"],[950,"zeta"],[951,"eta"],[952,"theta"],[953,"iota"],[954,"kappa"],[955,"lambda"],[956,"mu"],[957,"nu"],[958,"xi"],[959,"omicron"],[960,"pi"],[961,"rho"],[962,"final sigma"],[963,"sigma"],[964,"tau"],[965,"upsilon"],[966,"phi"],[967,"chi"],[968,"psi"],[969,"omega"]]},{name:"Symbols",characters:[[8501,"alef symbol"],[982,"pi symbol"],[8476,"real part symbol"],[978,"upsilon - hook symbol"],[8472,"Weierstrass p"],[8465,"imaginary part"]]},{name:"Arrows",characters:[[8592,"leftwards arrow"],[8593,"upwards arrow"],[8594,"rightwards arrow"],[8595,"downwards arrow"],[8596,"left right arrow"],[8629,"carriage return"],[8656,"leftwards double arrow"],[8657,"upwards double arrow"],[8658,"rightwards double arrow"],[8659,"downwards double arrow"],[8660,"left right double arrow"],[8756,"therefore"],[8834,"subset of"],[8835,"superset of"],[8836,"not a subset of"],[8838,"subset of or equal to"],[8839,"superset of or equal to"],[8853,"circled plus"],[8855,"circled times"],[8869,"perpendicular"],[8901,"dot operator"],[8968,"left ceiling"],[8969,"right ceiling"],[8970,"left floor"],[8971,"right floor"],[9001,"left-pointing angle bracket"],[9002,"right-pointing angle bracket"],[9674,"lozenge"],[9824,"black spade suit"],[9827,"black club suit"],[9829,"black heart suit"],[9830,"black diamond suit"],[8194,"en space"],[8195,"em space"],[8201,"thin space"],[8204,"zero width non-joiner"],[8205,"zero width joiner"],[8206,"left-to-right mark"],[8207,"right-to-left mark"]]}]);return t.length>1?[{name:"All",characters:(o=t,r=e=>e.characters,(e=>{const t=[];for(let o=0,r=e.length;o<r;++o){if(!n(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);c.apply(t,e[o])}return t})(d(o,r)))}].concat(t):t;var o,r},v=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},k=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!a(n)||r+t.length<=n)},w=String.fromCodePoint,_=(e,t)=>{const o=[],n=t.toLowerCase();return((e,t)=>{for(let t=0,a=e.length;t<a;t++)((e,t,o)=>!!k(w(e).toLowerCase(),o)||k(t.toLowerCase(),o)||k(t.toLowerCase().replace(/\s+/g,""),o))((r=e[t])[0],r[1],n)&&o.push(r);var r})(e.characters),d(o,(e=>({text:e[1],value:w(e[0]),icon:w(e[0])})))},x="pattern",C=(e,o)=>{const n=()=>[{label:"Search",type:"input",name:x},{type:"collection",name:"results"}],a=1===o.length?v(f):v("All"),s=((e,t)=>{let o=null;const n=()=>{r(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...t)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,t)}),40)}}})((e=>{const t=e.getData().pattern;((e,t)=>{var n,r;(n=o,r=e=>e.name===a.get(),((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return l.some(r);if(o(r,n))break}return l.none()})(n,r,i)).each((o=>{const n=_(o,t);e.setData({results:n})}))})(e,t)})),c={title:"Special Character",size:"normal",body:1===o.length?{type:"panel",items:n()}:{type:"tabpanel",tabs:d(o,(e=>({title:e.name,name:e.name,items:n()})))},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{pattern:"",results:_(o[0],"")},onAction:(o,n)=>{"results"===n.name&&(t(e,n.value),o.close())},onTabChange:(e,t)=>{a.set(t.newTabName),s.throttle(e)},onChange:(e,t)=>{t.name===x&&s.throttle(e)}};e.windowManager.open(c).focus(x)};e.add("charmap",(e=>{(e=>{const t=e.options.register,o=e=>s(e)||n(e);t("charmap",{processor:o}),t("charmap_append",{processor:o})})(e);const o=b(e);return((e,t)=>{e.addCommand("mceShowCharmap",(()=>{C(e,t)}))})(e,o),(e=>{const t=()=>e.execCommand("mceShowCharmap");e.ui.registry.addButton("charmap",{icon:"insert-character",tooltip:"Special character",onAction:t}),e.ui.registry.addMenuItem("charmap",{icon:"insert-character",text:"Special character...",onAction:t})})(e),((e,t)=>{e.ui.registry.addAutocompleter("charmap",{trigger:":",columns:"auto",minChars:2,fetch:(e,o)=>new Promise(((o,n)=>{o(_(t,e))})),onAction:(t,o,n)=>{e.selection.setRng(o),e.insertContent(n),t.hide()}})})(e,o[0]),(e=>({getCharMap:()=>b(e),insertChar:o=>{t(e,o)}}))(e)}))}()},88190:function(e,t,o){o(7440)},7440:function(){!function(){"use strict";tinymce.util.Tools.resolve("tinymce.PluginManager").add("code",(e=>((e=>{e.addCommand("mceCodeEditor",(()=>{(e=>{const t=(e=>e.getContent({source_view:!0}))(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:!0}],initialData:{code:t},onSubmit:t=>{((e,t)=>{e.focus(),e.undoManager.transact((()=>{e.setContent(t)})),e.selection.setCursorLocation(),e.nodeChanged()})(e,t.getData().code),t.close()}})})(e)}))})(e),(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})})(e),{})))}()},79835:function(e,t,o){o(55534)},35414:function(){window.tinymce.Resource.add("tinymce.plugins.emoticons",{grinning:{keywords:["face","smile","happy","joy",":D","grin"],char:"😀",fitzpatrick_scale:!1,category:"people"},grimacing:{keywords:["face","grimace","teeth"],char:"😬",fitzpatrick_scale:!1,category:"people"},grin:{keywords:["face","happy","smile","joy","kawaii"],char:"😁",fitzpatrick_scale:!1,category:"people"},joy:{keywords:["face","cry","tears","weep","happy","happytears","haha"],char:"😂",fitzpatrick_scale:!1,category:"people"},rofl:{keywords:["face","rolling","floor","laughing","lol","haha"],char:"🤣",fitzpatrick_scale:!1,category:"people"},partying:{keywords:["face","celebration","woohoo"],char:"🥳",fitzpatrick_scale:!1,category:"people"},smiley:{keywords:["face","happy","joy","haha",":D",":)","smile","funny"],char:"😃",fitzpatrick_scale:!1,category:"people"},smile:{keywords:["face","happy","joy","funny","haha","laugh","like",":D",":)"],char:"😄",fitzpatrick_scale:!1,category:"people"},sweat_smile:{keywords:["face","hot","happy","laugh","sweat","smile","relief"],char:"😅",fitzpatrick_scale:!1,category:"people"},laughing:{keywords:["happy","joy","lol","satisfied","haha","face","glad","XD","laugh"],char:"😆",fitzpatrick_scale:!1,category:"people"},innocent:{keywords:["face","angel","heaven","halo"],char:"😇",fitzpatrick_scale:!1,category:"people"},wink:{keywords:["face","happy","mischievous","secret",";)","smile","eye"],char:"😉",fitzpatrick_scale:!1,category:"people"},blush:{keywords:["face","smile","happy","flushed","crush","embarrassed","shy","joy"],char:"😊",fitzpatrick_scale:!1,category:"people"},slightly_smiling_face:{keywords:["face","smile"],char:"🙂",fitzpatrick_scale:!1,category:"people"},upside_down_face:{keywords:["face","flipped","silly","smile"],char:"🙃",fitzpatrick_scale:!1,category:"people"},relaxed:{keywords:["face","blush","massage","happiness"],char:"☺",fitzpatrick_scale:!1,category:"people"},yum:{keywords:["happy","joy","tongue","smile","face","silly","yummy","nom","delicious","savouring"],char:"😋",fitzpatrick_scale:!1,category:"people"},relieved:{keywords:["face","relaxed","phew","massage","happiness"],char:"😌",fitzpatrick_scale:!1,category:"people"},heart_eyes:{keywords:["face","love","like","affection","valentines","infatuation","crush","heart"],char:"😍",fitzpatrick_scale:!1,category:"people"},smiling_face_with_three_hearts:{keywords:["face","love","like","affection","valentines","infatuation","crush","hearts","adore"],char:"🥰",fitzpatrick_scale:!1,category:"people"},kissing_heart:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😘",fitzpatrick_scale:!1,category:"people"},kissing:{keywords:["love","like","face","3","valentines","infatuation","kiss"],char:"😗",fitzpatrick_scale:!1,category:"people"},kissing_smiling_eyes:{keywords:["face","affection","valentines","infatuation","kiss"],char:"😙",fitzpatrick_scale:!1,category:"people"},kissing_closed_eyes:{keywords:["face","love","like","affection","valentines","infatuation","kiss"],char:"😚",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_winking_eye:{keywords:["face","prank","childish","playful","mischievous","smile","wink","tongue"],char:"😜",fitzpatrick_scale:!1,category:"people"},zany:{keywords:["face","goofy","crazy"],char:"🤪",fitzpatrick_scale:!1,category:"people"},raised_eyebrow:{keywords:["face","distrust","scepticism","disapproval","disbelief","surprise"],char:"🤨",fitzpatrick_scale:!1,category:"people"},monocle:{keywords:["face","stuffy","wealthy"],char:"🧐",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue_closed_eyes:{keywords:["face","prank","playful","mischievous","smile","tongue"],char:"😝",fitzpatrick_scale:!1,category:"people"},stuck_out_tongue:{keywords:["face","prank","childish","playful","mischievous","smile","tongue"],char:"😛",fitzpatrick_scale:!1,category:"people"},money_mouth_face:{keywords:["face","rich","dollar","money"],char:"🤑",fitzpatrick_scale:!1,category:"people"},nerd_face:{keywords:["face","nerdy","geek","dork"],char:"🤓",fitzpatrick_scale:!1,category:"people"},sunglasses:{keywords:["face","cool","smile","summer","beach","sunglass"],char:"😎",fitzpatrick_scale:!1,category:"people"},star_struck:{keywords:["face","smile","starry","eyes","grinning"],char:"🤩",fitzpatrick_scale:!1,category:"people"},clown_face:{keywords:["face"],char:"🤡",fitzpatrick_scale:!1,category:"people"},cowboy_hat_face:{keywords:["face","cowgirl","hat"],char:"🤠",fitzpatrick_scale:!1,category:"people"},hugs:{keywords:["face","smile","hug"],char:"🤗",fitzpatrick_scale:!1,category:"people"},smirk:{keywords:["face","smile","mean","prank","smug","sarcasm"],char:"😏",fitzpatrick_scale:!1,category:"people"},no_mouth:{keywords:["face","hellokitty"],char:"😶",fitzpatrick_scale:!1,category:"people"},neutral_face:{keywords:["indifference","meh",":|","neutral"],char:"😐",fitzpatrick_scale:!1,category:"people"},expressionless:{keywords:["face","indifferent","-_-","meh","deadpan"],char:"😑",fitzpatrick_scale:!1,category:"people"},unamused:{keywords:["indifference","bored","straight face","serious","sarcasm","unimpressed","skeptical","dubious","side_eye"],char:"😒",fitzpatrick_scale:!1,category:"people"},roll_eyes:{keywords:["face","eyeroll","frustrated"],char:"🙄",fitzpatrick_scale:!1,category:"people"},thinking:{keywords:["face","hmmm","think","consider"],char:"🤔",fitzpatrick_scale:!1,category:"people"},lying_face:{keywords:["face","lie","pinocchio"],char:"🤥",fitzpatrick_scale:!1,category:"people"},hand_over_mouth:{keywords:["face","whoops","shock","surprise"],char:"🤭",fitzpatrick_scale:!1,category:"people"},shushing:{keywords:["face","quiet","shhh"],char:"🤫",fitzpatrick_scale:!1,category:"people"},symbols_over_mouth:{keywords:["face","swearing","cursing","cussing","profanity","expletive"],char:"🤬",fitzpatrick_scale:!1,category:"people"},exploding_head:{keywords:["face","shocked","mind","blown"],char:"🤯",fitzpatrick_scale:!1,category:"people"},flushed:{keywords:["face","blush","shy","flattered"],char:"😳",fitzpatrick_scale:!1,category:"people"},disappointed:{keywords:["face","sad","upset","depressed",":("],char:"😞",fitzpatrick_scale:!1,category:"people"},worried:{keywords:["face","concern","nervous",":("],char:"😟",fitzpatrick_scale:!1,category:"people"},angry:{keywords:["mad","face","annoyed","frustrated"],char:"😠",fitzpatrick_scale:!1,category:"people"},rage:{keywords:["angry","mad","hate","despise"],char:"😡",fitzpatrick_scale:!1,category:"people"},pensive:{keywords:["face","sad","depressed","upset"],char:"😔",fitzpatrick_scale:!1,category:"people"},confused:{keywords:["face","indifference","huh","weird","hmmm",":/"],char:"😕",fitzpatrick_scale:!1,category:"people"},slightly_frowning_face:{keywords:["face","frowning","disappointed","sad","upset"],char:"🙁",fitzpatrick_scale:!1,category:"people"},frowning_face:{keywords:["face","sad","upset","frown"],char:"☹",fitzpatrick_scale:!1,category:"people"},persevere:{keywords:["face","sick","no","upset","oops"],char:"😣",fitzpatrick_scale:!1,category:"people"},confounded:{keywords:["face","confused","sick","unwell","oops",":S"],char:"😖",fitzpatrick_scale:!1,category:"people"},tired_face:{keywords:["sick","whine","upset","frustrated"],char:"😫",fitzpatrick_scale:!1,category:"people"},weary:{keywords:["face","tired","sleepy","sad","frustrated","upset"],char:"😩",fitzpatrick_scale:!1,category:"people"},pleading:{keywords:["face","begging","mercy"],char:"🥺",fitzpatrick_scale:!1,category:"people"},triumph:{keywords:["face","gas","phew","proud","pride"],char:"😤",fitzpatrick_scale:!1,category:"people"},open_mouth:{keywords:["face","surprise","impressed","wow","whoa",":O"],char:"😮",fitzpatrick_scale:!1,category:"people"},scream:{keywords:["face","munch","scared","omg"],char:"😱",fitzpatrick_scale:!1,category:"people"},fearful:{keywords:["face","scared","terrified","nervous","oops","huh"],char:"😨",fitzpatrick_scale:!1,category:"people"},cold_sweat:{keywords:["face","nervous","sweat"],char:"😰",fitzpatrick_scale:!1,category:"people"},hushed:{keywords:["face","woo","shh"],char:"😯",fitzpatrick_scale:!1,category:"people"},frowning:{keywords:["face","aw","what"],char:"😦",fitzpatrick_scale:!1,category:"people"},anguished:{keywords:["face","stunned","nervous"],char:"😧",fitzpatrick_scale:!1,category:"people"},cry:{keywords:["face","tears","sad","depressed","upset",":'("],char:"😢",fitzpatrick_scale:!1,category:"people"},disappointed_relieved:{keywords:["face","phew","sweat","nervous"],char:"😥",fitzpatrick_scale:!1,category:"people"},drooling_face:{keywords:["face"],char:"🤤",fitzpatrick_scale:!1,category:"people"},sleepy:{keywords:["face","tired","rest","nap"],char:"😪",fitzpatrick_scale:!1,category:"people"},sweat:{keywords:["face","hot","sad","tired","exercise"],char:"😓",fitzpatrick_scale:!1,category:"people"},hot:{keywords:["face","feverish","heat","red","sweating"],char:"🥵",fitzpatrick_scale:!1,category:"people"},cold:{keywords:["face","blue","freezing","frozen","frostbite","icicles"],char:"🥶",fitzpatrick_scale:!1,category:"people"},sob:{keywords:["face","cry","tears","sad","upset","depressed"],char:"😭",fitzpatrick_scale:!1,category:"people"},dizzy_face:{keywords:["spent","unconscious","xox","dizzy"],char:"😵",fitzpatrick_scale:!1,category:"people"},astonished:{keywords:["face","xox","surprised","poisoned"],char:"😲",fitzpatrick_scale:!1,category:"people"},zipper_mouth_face:{keywords:["face","sealed","zipper","secret"],char:"🤐",fitzpatrick_scale:!1,category:"people"},nauseated_face:{keywords:["face","vomit","gross","green","sick","throw up","ill"],char:"🤢",fitzpatrick_scale:!1,category:"people"},sneezing_face:{keywords:["face","gesundheit","sneeze","sick","allergy"],char:"🤧",fitzpatrick_scale:!1,category:"people"},vomiting:{keywords:["face","sick"],char:"🤮",fitzpatrick_scale:!1,category:"people"},mask:{keywords:["face","sick","ill","disease"],char:"😷",fitzpatrick_scale:!1,category:"people"},face_with_thermometer:{keywords:["sick","temperature","thermometer","cold","fever"],char:"🤒",fitzpatrick_scale:!1,category:"people"},face_with_head_bandage:{keywords:["injured","clumsy","bandage","hurt"],char:"🤕",fitzpatrick_scale:!1,category:"people"},woozy:{keywords:["face","dizzy","intoxicated","tipsy","wavy"],char:"🥴",fitzpatrick_scale:!1,category:"people"},sleeping:{keywords:["face","tired","sleepy","night","zzz"],char:"😴",fitzpatrick_scale:!1,category:"people"},zzz:{keywords:["sleepy","tired","dream"],char:"💤",fitzpatrick_scale:!1,category:"people"},poop:{keywords:["hankey","shitface","fail","turd","shit"],char:"💩",fitzpatrick_scale:!1,category:"people"},smiling_imp:{keywords:["devil","horns"],char:"😈",fitzpatrick_scale:!1,category:"people"},imp:{keywords:["devil","angry","horns"],char:"👿",fitzpatrick_scale:!1,category:"people"},japanese_ogre:{keywords:["monster","red","mask","halloween","scary","creepy","devil","demon","japanese","ogre"],char:"👹",fitzpatrick_scale:!1,category:"people"},japanese_goblin:{keywords:["red","evil","mask","monster","scary","creepy","japanese","goblin"],char:"👺",fitzpatrick_scale:!1,category:"people"},skull:{keywords:["dead","skeleton","creepy","death"],char:"💀",fitzpatrick_scale:!1,category:"people"},ghost:{keywords:["halloween","spooky","scary"],char:"👻",fitzpatrick_scale:!1,category:"people"},alien:{keywords:["UFO","paul","weird","outer_space"],char:"👽",fitzpatrick_scale:!1,category:"people"},robot:{keywords:["computer","machine","bot"],char:"🤖",fitzpatrick_scale:!1,category:"people"},smiley_cat:{keywords:["animal","cats","happy","smile"],char:"😺",fitzpatrick_scale:!1,category:"people"},smile_cat:{keywords:["animal","cats","smile"],char:"😸",fitzpatrick_scale:!1,category:"people"},joy_cat:{keywords:["animal","cats","haha","happy","tears"],char:"😹",fitzpatrick_scale:!1,category:"people"},heart_eyes_cat:{keywords:["animal","love","like","affection","cats","valentines","heart"],char:"😻",fitzpatrick_scale:!1,category:"people"},smirk_cat:{keywords:["animal","cats","smirk"],char:"😼",fitzpatrick_scale:!1,category:"people"},kissing_cat:{keywords:["animal","cats","kiss"],char:"😽",fitzpatrick_scale:!1,category:"people"},scream_cat:{keywords:["animal","cats","munch","scared","scream"],char:"🙀",fitzpatrick_scale:!1,category:"people"},crying_cat_face:{keywords:["animal","tears","weep","sad","cats","upset","cry"],char:"😿",fitzpatrick_scale:!1,category:"people"},pouting_cat:{keywords:["animal","cats"],char:"😾",fitzpatrick_scale:!1,category:"people"},palms_up:{keywords:["hands","gesture","cupped","prayer"],char:"🤲",fitzpatrick_scale:!0,category:"people"},raised_hands:{keywords:["gesture","hooray","yea","celebration","hands"],char:"🙌",fitzpatrick_scale:!0,category:"people"},clap:{keywords:["hands","praise","applause","congrats","yay"],char:"👏",fitzpatrick_scale:!0,category:"people"},wave:{keywords:["hands","gesture","goodbye","solong","farewell","hello","hi","palm"],char:"👋",fitzpatrick_scale:!0,category:"people"},call_me_hand:{keywords:["hands","gesture"],char:"🤙",fitzpatrick_scale:!0,category:"people"},"+1":{keywords:["thumbsup","yes","awesome","good","agree","accept","cool","hand","like"],char:"👍",fitzpatrick_scale:!0,category:"people"},"-1":{keywords:["thumbsdown","no","dislike","hand"],char:"👎",fitzpatrick_scale:!0,category:"people"},facepunch:{keywords:["angry","violence","fist","hit","attack","hand"],char:"👊",fitzpatrick_scale:!0,category:"people"},fist:{keywords:["fingers","hand","grasp"],char:"✊",fitzpatrick_scale:!0,category:"people"},fist_left:{keywords:["hand","fistbump"],char:"🤛",fitzpatrick_scale:!0,category:"people"},fist_right:{keywords:["hand","fistbump"],char:"🤜",fitzpatrick_scale:!0,category:"people"},v:{keywords:["fingers","ohyeah","hand","peace","victory","two"],char:"✌",fitzpatrick_scale:!0,category:"people"},ok_hand:{keywords:["fingers","limbs","perfect","ok","okay"],char:"👌",fitzpatrick_scale:!0,category:"people"},raised_hand:{keywords:["fingers","stop","highfive","palm","ban"],char:"✋",fitzpatrick_scale:!0,category:"people"},raised_back_of_hand:{keywords:["fingers","raised","backhand"],char:"🤚",fitzpatrick_scale:!0,category:"people"},open_hands:{keywords:["fingers","butterfly","hands","open"],char:"👐",fitzpatrick_scale:!0,category:"people"},muscle:{keywords:["arm","flex","hand","summer","strong","biceps"],char:"💪",fitzpatrick_scale:!0,category:"people"},pray:{keywords:["please","hope","wish","namaste","highfive"],char:"🙏",fitzpatrick_scale:!0,category:"people"},foot:{keywords:["kick","stomp"],char:"🦶",fitzpatrick_scale:!0,category:"people"},leg:{keywords:["kick","limb"],char:"🦵",fitzpatrick_scale:!0,category:"people"},handshake:{keywords:["agreement","shake"],char:"🤝",fitzpatrick_scale:!1,category:"people"},point_up:{keywords:["hand","fingers","direction","up"],char:"☝",fitzpatrick_scale:!0,category:"people"},point_up_2:{keywords:["fingers","hand","direction","up"],char:"👆",fitzpatrick_scale:!0,category:"people"},point_down:{keywords:["fingers","hand","direction","down"],char:"👇",fitzpatrick_scale:!0,category:"people"},point_left:{keywords:["direction","fingers","hand","left"],char:"👈",fitzpatrick_scale:!0,category:"people"},point_right:{keywords:["fingers","hand","direction","right"],char:"👉",fitzpatrick_scale:!0,category:"people"},fu:{keywords:["hand","fingers","rude","middle","flipping"],char:"🖕",fitzpatrick_scale:!0,category:"people"},raised_hand_with_fingers_splayed:{keywords:["hand","fingers","palm"],char:"🖐",fitzpatrick_scale:!0,category:"people"},love_you:{keywords:["hand","fingers","gesture"],char:"🤟",fitzpatrick_scale:!0,category:"people"},metal:{keywords:["hand","fingers","evil_eye","sign_of_horns","rock_on"],char:"🤘",fitzpatrick_scale:!0,category:"people"},crossed_fingers:{keywords:["good","lucky"],char:"🤞",fitzpatrick_scale:!0,category:"people"},vulcan_salute:{keywords:["hand","fingers","spock","star trek"],char:"🖖",fitzpatrick_scale:!0,category:"people"},writing_hand:{keywords:["lower_left_ballpoint_pen","stationery","write","compose"],char:"✍",fitzpatrick_scale:!0,category:"people"},selfie:{keywords:["camera","phone"],char:"🤳",fitzpatrick_scale:!0,category:"people"},nail_care:{keywords:["beauty","manicure","finger","fashion","nail"],char:"💅",fitzpatrick_scale:!0,category:"people"},lips:{keywords:["mouth","kiss"],char:"👄",fitzpatrick_scale:!1,category:"people"},tooth:{keywords:["teeth","dentist"],char:"🦷",fitzpatrick_scale:!1,category:"people"},tongue:{keywords:["mouth","playful"],char:"👅",fitzpatrick_scale:!1,category:"people"},ear:{keywords:["face","hear","sound","listen"],char:"👂",fitzpatrick_scale:!0,category:"people"},nose:{keywords:["smell","sniff"],char:"👃",fitzpatrick_scale:!0,category:"people"},eye:{keywords:["face","look","see","watch","stare"],char:"👁",fitzpatrick_scale:!1,category:"people"},eyes:{keywords:["look","watch","stalk","peek","see"],char:"👀",fitzpatrick_scale:!1,category:"people"},brain:{keywords:["smart","intelligent"],char:"🧠",fitzpatrick_scale:!1,category:"people"},bust_in_silhouette:{keywords:["user","person","human"],char:"👤",fitzpatrick_scale:!1,category:"people"},busts_in_silhouette:{keywords:["user","person","human","group","team"],char:"👥",fitzpatrick_scale:!1,category:"people"},speaking_head:{keywords:["user","person","human","sing","say","talk"],char:"🗣",fitzpatrick_scale:!1,category:"people"},baby:{keywords:["child","boy","girl","toddler"],char:"👶",fitzpatrick_scale:!0,category:"people"},child:{keywords:["gender-neutral","young"],char:"🧒",fitzpatrick_scale:!0,category:"people"},boy:{keywords:["man","male","guy","teenager"],char:"👦",fitzpatrick_scale:!0,category:"people"},girl:{keywords:["female","woman","teenager"],char:"👧",fitzpatrick_scale:!0,category:"people"},adult:{keywords:["gender-neutral","person"],char:"🧑",fitzpatrick_scale:!0,category:"people"},man:{keywords:["mustache","father","dad","guy","classy","sir","moustache"],char:"👨",fitzpatrick_scale:!0,category:"people"},woman:{keywords:["female","girls","lady"],char:"👩",fitzpatrick_scale:!0,category:"people"},blonde_woman:{keywords:["woman","female","girl","blonde","person"],char:"👱",fitzpatrick_scale:!0,category:"people"},blonde_man:{keywords:["man","male","boy","blonde","guy","person"],char:"👱",fitzpatrick_scale:!0,category:"people"},bearded_person:{keywords:["person","bewhiskered"],char:"🧔",fitzpatrick_scale:!0,category:"people"},older_adult:{keywords:["human","elder","senior","gender-neutral"],char:"🧓",fitzpatrick_scale:!0,category:"people"},older_man:{keywords:["human","male","men","old","elder","senior"],char:"👴",fitzpatrick_scale:!0,category:"people"},older_woman:{keywords:["human","female","women","lady","old","elder","senior"],char:"👵",fitzpatrick_scale:!0,category:"people"},man_with_gua_pi_mao:{keywords:["male","boy","chinese"],char:"👲",fitzpatrick_scale:!0,category:"people"},woman_with_headscarf:{keywords:["female","hijab","mantilla","tichel"],char:"🧕",fitzpatrick_scale:!0,category:"people"},woman_with_turban:{keywords:["female","indian","hinduism","arabs","woman"],char:"👳",fitzpatrick_scale:!0,category:"people"},man_with_turban:{keywords:["male","indian","hinduism","arabs"],char:"👳",fitzpatrick_scale:!0,category:"people"},policewoman:{keywords:["woman","police","law","legal","enforcement","arrest","911","female"],char:"👮",fitzpatrick_scale:!0,category:"people"},policeman:{keywords:["man","police","law","legal","enforcement","arrest","911"],char:"👮",fitzpatrick_scale:!0,category:"people"},construction_worker_woman:{keywords:["female","human","wip","build","construction","worker","labor","woman"],char:"👷",fitzpatrick_scale:!0,category:"people"},construction_worker_man:{keywords:["male","human","wip","guy","build","construction","worker","labor"],char:"👷",fitzpatrick_scale:!0,category:"people"},guardswoman:{keywords:["uk","gb","british","female","royal","woman"],char:"💂",fitzpatrick_scale:!0,category:"people"},guardsman:{keywords:["uk","gb","british","male","guy","royal"],char:"💂",fitzpatrick_scale:!0,category:"people"},female_detective:{keywords:["human","spy","detective","female","woman"],char:"🕵",fitzpatrick_scale:!0,category:"people"},male_detective:{keywords:["human","spy","detective"],char:"🕵",fitzpatrick_scale:!0,category:"people"},woman_health_worker:{keywords:["doctor","nurse","therapist","healthcare","woman","human"],char:"👩",fitzpatrick_scale:!0,category:"people"},man_health_worker:{keywords:["doctor","nurse","therapist","healthcare","man","human"],char:"👨",fitzpatrick_scale:!0,category:"people"},woman_farmer:{keywords:["rancher","gardener","woman","human"],char:"👩🌾",fitzpatrick_scale:!0,category:"people"},man_farmer:{keywords:["rancher","gardener","man","human"],char:"👨🌾",fitzpatrick_scale:!0,category:"people"},woman_cook:{keywords:["chef","woman","human"],char:"👩🍳",fitzpatrick_scale:!0,category:"people"},man_cook:{keywords:["chef","man","human"],char:"👨🍳",fitzpatrick_scale:!0,category:"people"},woman_student:{keywords:["graduate","woman","human"],char:"👩🎓",fitzpatrick_scale:!0,category:"people"},man_student:{keywords:["graduate","man","human"],char:"👨🎓",fitzpatrick_scale:!0,category:"people"},woman_singer:{keywords:["rockstar","entertainer","woman","human"],char:"👩🎤",fitzpatrick_scale:!0,category:"people"},man_singer:{keywords:["rockstar","entertainer","man","human"],char:"👨🎤",fitzpatrick_scale:!0,category:"people"},woman_teacher:{keywords:["instructor","professor","woman","human"],char:"👩🏫",fitzpatrick_scale:!0,category:"people"},man_teacher:{keywords:["instructor","professor","man","human"],char:"👨🏫",fitzpatrick_scale:!0,category:"people"},woman_factory_worker:{keywords:["assembly","industrial","woman","human"],char:"👩🏭",fitzpatrick_scale:!0,category:"people"},man_factory_worker:{keywords:["assembly","industrial","man","human"],char:"👨🏭",fitzpatrick_scale:!0,category:"people"},woman_technologist:{keywords:["coder","developer","engineer","programmer","software","woman","human","laptop","computer"],char:"👩💻",fitzpatrick_scale:!0,category:"people"},man_technologist:{keywords:["coder","developer","engineer","programmer","software","man","human","laptop","computer"],char:"👨💻",fitzpatrick_scale:!0,category:"people"},woman_office_worker:{keywords:["business","manager","woman","human"],char:"👩💼",fitzpatrick_scale:!0,category:"people"},man_office_worker:{keywords:["business","manager","man","human"],char:"👨💼",fitzpatrick_scale:!0,category:"people"},woman_mechanic:{keywords:["plumber","woman","human","wrench"],char:"👩🔧",fitzpatrick_scale:!0,category:"people"},man_mechanic:{keywords:["plumber","man","human","wrench"],char:"👨🔧",fitzpatrick_scale:!0,category:"people"},woman_scientist:{keywords:["biologist","chemist","engineer","physicist","woman","human"],char:"👩🔬",fitzpatrick_scale:!0,category:"people"},man_scientist:{keywords:["biologist","chemist","engineer","physicist","man","human"],char:"👨🔬",fitzpatrick_scale:!0,category:"people"},woman_artist:{keywords:["painter","woman","human"],char:"👩🎨",fitzpatrick_scale:!0,category:"people"},man_artist:{keywords:["painter","man","human"],char:"👨🎨",fitzpatrick_scale:!0,category:"people"},woman_firefighter:{keywords:["fireman","woman","human"],char:"👩🚒",fitzpatrick_scale:!0,category:"people"},man_firefighter:{keywords:["fireman","man","human"],char:"👨🚒",fitzpatrick_scale:!0,category:"people"},woman_pilot:{keywords:["aviator","plane","woman","human"],char:"👩",fitzpatrick_scale:!0,category:"people"},man_pilot:{keywords:["aviator","plane","man","human"],char:"👨",fitzpatrick_scale:!0,category:"people"},woman_astronaut:{keywords:["space","rocket","woman","human"],char:"👩🚀",fitzpatrick_scale:!0,category:"people"},man_astronaut:{keywords:["space","rocket","man","human"],char:"👨🚀",fitzpatrick_scale:!0,category:"people"},woman_judge:{keywords:["justice","court","woman","human"],char:"👩",fitzpatrick_scale:!0,category:"people"},man_judge:{keywords:["justice","court","man","human"],char:"👨",fitzpatrick_scale:!0,category:"people"},woman_superhero:{keywords:["woman","female","good","heroine","superpowers"],char:"🦸",fitzpatrick_scale:!0,category:"people"},man_superhero:{keywords:["man","male","good","hero","superpowers"],char:"🦸",fitzpatrick_scale:!0,category:"people"},woman_supervillain:{keywords:["woman","female","evil","bad","criminal","heroine","superpowers"],char:"🦹",fitzpatrick_scale:!0,category:"people"},man_supervillain:{keywords:["man","male","evil","bad","criminal","hero","superpowers"],char:"🦹",fitzpatrick_scale:!0,category:"people"},mrs_claus:{keywords:["woman","female","xmas","mother christmas"],char:"🤶",fitzpatrick_scale:!0,category:"people"},santa:{keywords:["festival","man","male","xmas","father christmas"],char:"🎅",fitzpatrick_scale:!0,category:"people"},sorceress:{keywords:["woman","female","mage","witch"],char:"🧙",fitzpatrick_scale:!0,category:"people"},wizard:{keywords:["man","male","mage","sorcerer"],char:"🧙",fitzpatrick_scale:!0,category:"people"},woman_elf:{keywords:["woman","female"],char:"🧝",fitzpatrick_scale:!0,category:"people"},man_elf:{keywords:["man","male"],char:"🧝",fitzpatrick_scale:!0,category:"people"},woman_vampire:{keywords:["woman","female"],char:"🧛",fitzpatrick_scale:!0,category:"people"},man_vampire:{keywords:["man","male","dracula"],char:"🧛",fitzpatrick_scale:!0,category:"people"},woman_zombie:{keywords:["woman","female","undead","walking dead"],char:"🧟",fitzpatrick_scale:!1,category:"people"},man_zombie:{keywords:["man","male","dracula","undead","walking dead"],char:"🧟",fitzpatrick_scale:!1,category:"people"},woman_genie:{keywords:["woman","female"],char:"🧞",fitzpatrick_scale:!1,category:"people"},man_genie:{keywords:["man","male"],char:"🧞",fitzpatrick_scale:!1,category:"people"},mermaid:{keywords:["woman","female","merwoman","ariel"],char:"🧜",fitzpatrick_scale:!0,category:"people"},merman:{keywords:["man","male","triton"],char:"🧜",fitzpatrick_scale:!0,category:"people"},woman_fairy:{keywords:["woman","female"],char:"🧚",fitzpatrick_scale:!0,category:"people"},man_fairy:{keywords:["man","male"],char:"🧚",fitzpatrick_scale:!0,category:"people"},angel:{keywords:["heaven","wings","halo"],char:"👼",fitzpatrick_scale:!0,category:"people"},pregnant_woman:{keywords:["baby"],char:"🤰",fitzpatrick_scale:!0,category:"people"},breastfeeding:{keywords:["nursing","baby"],char:"🤱",fitzpatrick_scale:!0,category:"people"},princess:{keywords:["girl","woman","female","blond","crown","royal","queen"],char:"👸",fitzpatrick_scale:!0,category:"people"},prince:{keywords:["boy","man","male","crown","royal","king"],char:"🤴",fitzpatrick_scale:!0,category:"people"},bride_with_veil:{keywords:["couple","marriage","wedding","woman","bride"],char:"👰",fitzpatrick_scale:!0,category:"people"},man_in_tuxedo:{keywords:["couple","marriage","wedding","groom"],char:"🤵",fitzpatrick_scale:!0,category:"people"},running_woman:{keywords:["woman","walking","exercise","race","running","female"],char:"🏃",fitzpatrick_scale:!0,category:"people"},running_man:{keywords:["man","walking","exercise","race","running"],char:"🏃",fitzpatrick_scale:!0,category:"people"},walking_woman:{keywords:["human","feet","steps","woman","female"],char:"🚶",fitzpatrick_scale:!0,category:"people"},walking_man:{keywords:["human","feet","steps"],char:"🚶",fitzpatrick_scale:!0,category:"people"},dancer:{keywords:["female","girl","woman","fun"],char:"💃",fitzpatrick_scale:!0,category:"people"},man_dancing:{keywords:["male","boy","fun","dancer"],char:"🕺",fitzpatrick_scale:!0,category:"people"},dancing_women:{keywords:["female","bunny","women","girls"],char:"👯",fitzpatrick_scale:!1,category:"people"},dancing_men:{keywords:["male","bunny","men","boys"],char:"👯",fitzpatrick_scale:!1,category:"people"},couple:{keywords:["pair","people","human","love","date","dating","like","affection","valentines","marriage"],char:"👫",fitzpatrick_scale:!1,category:"people"},two_men_holding_hands:{keywords:["pair","couple","love","like","bromance","friendship","people","human"],char:"👬",fitzpatrick_scale:!1,category:"people"},two_women_holding_hands:{keywords:["pair","friendship","couple","love","like","female","people","human"],char:"👭",fitzpatrick_scale:!1,category:"people"},bowing_woman:{keywords:["woman","female","girl"],char:"🙇",fitzpatrick_scale:!0,category:"people"},bowing_man:{keywords:["man","male","boy"],char:"🙇",fitzpatrick_scale:!0,category:"people"},man_facepalming:{keywords:["man","male","boy","disbelief"],char:"🤦",fitzpatrick_scale:!0,category:"people"},woman_facepalming:{keywords:["woman","female","girl","disbelief"],char:"🤦",fitzpatrick_scale:!0,category:"people"},woman_shrugging:{keywords:["woman","female","girl","confused","indifferent","doubt"],char:"🤷",fitzpatrick_scale:!0,category:"people"},man_shrugging:{keywords:["man","male","boy","confused","indifferent","doubt"],char:"🤷",fitzpatrick_scale:!0,category:"people"},tipping_hand_woman:{keywords:["female","girl","woman","human","information"],char:"💁",fitzpatrick_scale:!0,category:"people"},tipping_hand_man:{keywords:["male","boy","man","human","information"],char:"💁",fitzpatrick_scale:!0,category:"people"},no_good_woman:{keywords:["female","girl","woman","nope"],char:"🙅",fitzpatrick_scale:!0,category:"people"},no_good_man:{keywords:["male","boy","man","nope"],char:"🙅",fitzpatrick_scale:!0,category:"people"},ok_woman:{keywords:["women","girl","female","pink","human","woman"],char:"🙆",fitzpatrick_scale:!0,category:"people"},ok_man:{keywords:["men","boy","male","blue","human","man"],char:"🙆",fitzpatrick_scale:!0,category:"people"},raising_hand_woman:{keywords:["female","girl","woman"],char:"🙋",fitzpatrick_scale:!0,category:"people"},raising_hand_man:{keywords:["male","boy","man"],char:"🙋",fitzpatrick_scale:!0,category:"people"},pouting_woman:{keywords:["female","girl","woman"],char:"🙎",fitzpatrick_scale:!0,category:"people"},pouting_man:{keywords:["male","boy","man"],char:"🙎",fitzpatrick_scale:!0,category:"people"},frowning_woman:{keywords:["female","girl","woman","sad","depressed","discouraged","unhappy"],char:"🙍",fitzpatrick_scale:!0,category:"people"},frowning_man:{keywords:["male","boy","man","sad","depressed","discouraged","unhappy"],char:"🙍",fitzpatrick_scale:!0,category:"people"},haircut_woman:{keywords:["female","girl","woman"],char:"💇",fitzpatrick_scale:!0,category:"people"},haircut_man:{keywords:["male","boy","man"],char:"💇",fitzpatrick_scale:!0,category:"people"},massage_woman:{keywords:["female","girl","woman","head"],char:"💆",fitzpatrick_scale:!0,category:"people"},massage_man:{keywords:["male","boy","man","head"],char:"💆",fitzpatrick_scale:!0,category:"people"},woman_in_steamy_room:{keywords:["female","woman","spa","steamroom","sauna"],char:"🧖",fitzpatrick_scale:!0,category:"people"},man_in_steamy_room:{keywords:["male","man","spa","steamroom","sauna"],char:"🧖",fitzpatrick_scale:!0,category:"people"},couple_with_heart_woman_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"💑",fitzpatrick_scale:!1,category:"people"},couple_with_heart_woman_woman:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👩👩",fitzpatrick_scale:!1,category:"people"},couple_with_heart_man_man:{keywords:["pair","love","like","affection","human","dating","valentines","marriage"],char:"👨👨",fitzpatrick_scale:!1,category:"people"},couplekiss_man_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"💏",fitzpatrick_scale:!1,category:"people"},couplekiss_woman_woman:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👩💋👩",fitzpatrick_scale:!1,category:"people"},couplekiss_man_man:{keywords:["pair","valentines","love","like","dating","marriage"],char:"👨💋👨",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy:{keywords:["home","parents","child","mom","dad","father","mother","people","human"],char:"👪",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl:{keywords:["home","parents","people","human","child"],char:"👨👩👧",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨👩👧👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨👩👦👦",fitzpatrick_scale:!1,category:"people"},family_man_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨👩👧👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy:{keywords:["home","parents","people","human","children"],char:"👩👩👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl:{keywords:["home","parents","people","human","children"],char:"👩👩👧",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_boy:{keywords:["home","parents","people","human","children"],char:"👩👩👧👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_boy_boy:{keywords:["home","parents","people","human","children"],char:"👩👩👦👦",fitzpatrick_scale:!1,category:"people"},family_woman_woman_girl_girl:{keywords:["home","parents","people","human","children"],char:"👩👩👧👧",fitzpatrick_scale:!1,category:"people"},family_man_man_boy:{keywords:["home","parents","people","human","children"],char:"👨👨👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl:{keywords:["home","parents","people","human","children"],char:"👨👨👧",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_boy:{keywords:["home","parents","people","human","children"],char:"👨👨👧👦",fitzpatrick_scale:!1,category:"people"},family_man_man_boy_boy:{keywords:["home","parents","people","human","children"],char:"👨👨👦👦",fitzpatrick_scale:!1,category:"people"},family_man_man_girl_girl:{keywords:["home","parents","people","human","children"],char:"👨👨👧👧",fitzpatrick_scale:!1,category:"people"},family_woman_boy:{keywords:["home","parent","people","human","child"],char:"👩👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl:{keywords:["home","parent","people","human","child"],char:"👩👧",fitzpatrick_scale:!1,category:"people"},family_woman_girl_boy:{keywords:["home","parent","people","human","children"],char:"👩👧👦",fitzpatrick_scale:!1,category:"people"},family_woman_boy_boy:{keywords:["home","parent","people","human","children"],char:"👩👦👦",fitzpatrick_scale:!1,category:"people"},family_woman_girl_girl:{keywords:["home","parent","people","human","children"],char:"👩👧👧",fitzpatrick_scale:!1,category:"people"},family_man_boy:{keywords:["home","parent","people","human","child"],char:"👨👦",fitzpatrick_scale:!1,category:"people"},family_man_girl:{keywords:["home","parent","people","human","child"],char:"👨👧",fitzpatrick_scale:!1,category:"people"},family_man_girl_boy:{keywords:["home","parent","people","human","children"],char:"👨👧👦",fitzpatrick_scale:!1,category:"people"},family_man_boy_boy:{keywords:["home","parent","people","human","children"],char:"👨👦👦",fitzpatrick_scale:!1,category:"people"},family_man_girl_girl:{keywords:["home","parent","people","human","children"],char:"👨👧👧",fitzpatrick_scale:!1,category:"people"},yarn:{keywords:["ball","crochet","knit"],char:"🧶",fitzpatrick_scale:!1,category:"people"},thread:{keywords:["needle","sewing","spool","string"],char:"🧵",fitzpatrick_scale:!1,category:"people"},coat:{keywords:["jacket"],char:"🧥",fitzpatrick_scale:!1,category:"people"},labcoat:{keywords:["doctor","experiment","scientist","chemist"],char:"🥼",fitzpatrick_scale:!1,category:"people"},womans_clothes:{keywords:["fashion","shopping_bags","female"],char:"👚",fitzpatrick_scale:!1,category:"people"},tshirt:{keywords:["fashion","cloth","casual","shirt","tee"],char:"👕",fitzpatrick_scale:!1,category:"people"},jeans:{keywords:["fashion","shopping"],char:"👖",fitzpatrick_scale:!1,category:"people"},necktie:{keywords:["shirt","suitup","formal","fashion","cloth","business"],char:"👔",fitzpatrick_scale:!1,category:"people"},dress:{keywords:["clothes","fashion","shopping"],char:"👗",fitzpatrick_scale:!1,category:"people"},bikini:{keywords:["swimming","female","woman","girl","fashion","beach","summer"],char:"👙",fitzpatrick_scale:!1,category:"people"},kimono:{keywords:["dress","fashion","women","female","japanese"],char:"👘",fitzpatrick_scale:!1,category:"people"},lipstick:{keywords:["female","girl","fashion","woman"],char:"💄",fitzpatrick_scale:!1,category:"people"},kiss:{keywords:["face","lips","love","like","affection","valentines"],char:"💋",fitzpatrick_scale:!1,category:"people"},footprints:{keywords:["feet","tracking","walking","beach"],char:"👣",fitzpatrick_scale:!1,category:"people"},flat_shoe:{keywords:["ballet","slip-on","slipper"],char:"🥿",fitzpatrick_scale:!1,category:"people"},high_heel:{keywords:["fashion","shoes","female","pumps","stiletto"],char:"👠",fitzpatrick_scale:!1,category:"people"},sandal:{keywords:["shoes","fashion","flip flops"],char:"👡",fitzpatrick_scale:!1,category:"people"},boot:{keywords:["shoes","fashion"],char:"👢",fitzpatrick_scale:!1,category:"people"},mans_shoe:{keywords:["fashion","male"],char:"👞",fitzpatrick_scale:!1,category:"people"},athletic_shoe:{keywords:["shoes","sports","sneakers"],char:"👟",fitzpatrick_scale:!1,category:"people"},hiking_boot:{keywords:["backpacking","camping","hiking"],char:"🥾",fitzpatrick_scale:!1,category:"people"},socks:{keywords:["stockings","clothes"],char:"🧦",fitzpatrick_scale:!1,category:"people"},gloves:{keywords:["hands","winter","clothes"],char:"🧤",fitzpatrick_scale:!1,category:"people"},scarf:{keywords:["neck","winter","clothes"],char:"🧣",fitzpatrick_scale:!1,category:"people"},womans_hat:{keywords:["fashion","accessories","female","lady","spring"],char:"👒",fitzpatrick_scale:!1,category:"people"},tophat:{keywords:["magic","gentleman","classy","circus"],char:"🎩",fitzpatrick_scale:!1,category:"people"},billed_hat:{keywords:["cap","baseball"],char:"🧢",fitzpatrick_scale:!1,category:"people"},rescue_worker_helmet:{keywords:["construction","build"],char:"⛑",fitzpatrick_scale:!1,category:"people"},mortar_board:{keywords:["school","college","degree","university","graduation","cap","hat","legal","learn","education"],char:"🎓",fitzpatrick_scale:!1,category:"people"},crown:{keywords:["king","kod","leader","royalty","lord"],char:"👑",fitzpatrick_scale:!1,category:"people"},school_satchel:{keywords:["student","education","bag","backpack"],char:"🎒",fitzpatrick_scale:!1,category:"people"},luggage:{keywords:["packing","travel"],char:"🧳",fitzpatrick_scale:!1,category:"people"},pouch:{keywords:["bag","accessories","shopping"],char:"👝",fitzpatrick_scale:!1,category:"people"},purse:{keywords:["fashion","accessories","money","sales","shopping"],char:"👛",fitzpatrick_scale:!1,category:"people"},handbag:{keywords:["fashion","accessory","accessories","shopping"],char:"👜",fitzpatrick_scale:!1,category:"people"},briefcase:{keywords:["business","documents","work","law","legal","job","career"],char:"💼",fitzpatrick_scale:!1,category:"people"},eyeglasses:{keywords:["fashion","accessories","eyesight","nerdy","dork","geek"],char:"👓",fitzpatrick_scale:!1,category:"people"},dark_sunglasses:{keywords:["face","cool","accessories"],char:"🕶",fitzpatrick_scale:!1,category:"people"},goggles:{keywords:["eyes","protection","safety"],char:"🥽",fitzpatrick_scale:!1,category:"people"},ring:{keywords:["wedding","propose","marriage","valentines","diamond","fashion","jewelry","gem","engagement"],char:"💍",fitzpatrick_scale:!1,category:"people"},closed_umbrella:{keywords:["weather","rain","drizzle"],char:"🌂",fitzpatrick_scale:!1,category:"people"},dog:{keywords:["animal","friend","nature","woof","puppy","pet","faithful"],char:"🐶",fitzpatrick_scale:!1,category:"animals_and_nature"},cat:{keywords:["animal","meow","nature","pet","kitten"],char:"🐱",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse:{keywords:["animal","nature","cheese_wedge","rodent"],char:"🐭",fitzpatrick_scale:!1,category:"animals_and_nature"},hamster:{keywords:["animal","nature"],char:"🐹",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit:{keywords:["animal","nature","pet","spring","magic","bunny"],char:"🐰",fitzpatrick_scale:!1,category:"animals_and_nature"},fox_face:{keywords:["animal","nature","face"],char:"🦊",fitzpatrick_scale:!1,category:"animals_and_nature"},bear:{keywords:["animal","nature","wild"],char:"🐻",fitzpatrick_scale:!1,category:"animals_and_nature"},panda_face:{keywords:["animal","nature","panda"],char:"🐼",fitzpatrick_scale:!1,category:"animals_and_nature"},koala:{keywords:["animal","nature"],char:"🐨",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger:{keywords:["animal","cat","danger","wild","nature","roar"],char:"🐯",fitzpatrick_scale:!1,category:"animals_and_nature"},lion:{keywords:["animal","nature"],char:"🦁",fitzpatrick_scale:!1,category:"animals_and_nature"},cow:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐮",fitzpatrick_scale:!1,category:"animals_and_nature"},pig:{keywords:["animal","oink","nature"],char:"🐷",fitzpatrick_scale:!1,category:"animals_and_nature"},pig_nose:{keywords:["animal","oink"],char:"🐽",fitzpatrick_scale:!1,category:"animals_and_nature"},frog:{keywords:["animal","nature","croak","toad"],char:"🐸",fitzpatrick_scale:!1,category:"animals_and_nature"},squid:{keywords:["animal","nature","ocean","sea"],char:"🦑",fitzpatrick_scale:!1,category:"animals_and_nature"},octopus:{keywords:["animal","creature","ocean","sea","nature","beach"],char:"🐙",fitzpatrick_scale:!1,category:"animals_and_nature"},shrimp:{keywords:["animal","ocean","nature","seafood"],char:"🦐",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey_face:{keywords:["animal","nature","circus"],char:"🐵",fitzpatrick_scale:!1,category:"animals_and_nature"},gorilla:{keywords:["animal","nature","circus"],char:"🦍",fitzpatrick_scale:!1,category:"animals_and_nature"},see_no_evil:{keywords:["monkey","animal","nature","haha"],char:"🙈",fitzpatrick_scale:!1,category:"animals_and_nature"},hear_no_evil:{keywords:["animal","monkey","nature"],char:"🙉",fitzpatrick_scale:!1,category:"animals_and_nature"},speak_no_evil:{keywords:["monkey","animal","nature","omg"],char:"🙊",fitzpatrick_scale:!1,category:"animals_and_nature"},monkey:{keywords:["animal","nature","banana","circus"],char:"🐒",fitzpatrick_scale:!1,category:"animals_and_nature"},chicken:{keywords:["animal","cluck","nature","bird"],char:"🐔",fitzpatrick_scale:!1,category:"animals_and_nature"},penguin:{keywords:["animal","nature"],char:"🐧",fitzpatrick_scale:!1,category:"animals_and_nature"},bird:{keywords:["animal","nature","fly","tweet","spring"],char:"🐦",fitzpatrick_scale:!1,category:"animals_and_nature"},baby_chick:{keywords:["animal","chicken","bird"],char:"🐤",fitzpatrick_scale:!1,category:"animals_and_nature"},hatching_chick:{keywords:["animal","chicken","egg","born","baby","bird"],char:"🐣",fitzpatrick_scale:!1,category:"animals_and_nature"},hatched_chick:{keywords:["animal","chicken","baby","bird"],char:"🐥",fitzpatrick_scale:!1,category:"animals_and_nature"},duck:{keywords:["animal","nature","bird","mallard"],char:"🦆",fitzpatrick_scale:!1,category:"animals_and_nature"},eagle:{keywords:["animal","nature","bird"],char:"🦅",fitzpatrick_scale:!1,category:"animals_and_nature"},owl:{keywords:["animal","nature","bird","hoot"],char:"🦉",fitzpatrick_scale:!1,category:"animals_and_nature"},bat:{keywords:["animal","nature","blind","vampire"],char:"🦇",fitzpatrick_scale:!1,category:"animals_and_nature"},wolf:{keywords:["animal","nature","wild"],char:"🐺",fitzpatrick_scale:!1,category:"animals_and_nature"},boar:{keywords:["animal","nature"],char:"🐗",fitzpatrick_scale:!1,category:"animals_and_nature"},horse:{keywords:["animal","brown","nature"],char:"🐴",fitzpatrick_scale:!1,category:"animals_and_nature"},unicorn:{keywords:["animal","nature","mystical"],char:"🦄",fitzpatrick_scale:!1,category:"animals_and_nature"},honeybee:{keywords:["animal","insect","nature","bug","spring","honey"],char:"🐝",fitzpatrick_scale:!1,category:"animals_and_nature"},bug:{keywords:["animal","insect","nature","worm"],char:"🐛",fitzpatrick_scale:!1,category:"animals_and_nature"},butterfly:{keywords:["animal","insect","nature","caterpillar"],char:"🦋",fitzpatrick_scale:!1,category:"animals_and_nature"},snail:{keywords:["slow","animal","shell"],char:"🐌",fitzpatrick_scale:!1,category:"animals_and_nature"},beetle:{keywords:["animal","insect","nature","ladybug"],char:"🐞",fitzpatrick_scale:!1,category:"animals_and_nature"},ant:{keywords:["animal","insect","nature","bug"],char:"🐜",fitzpatrick_scale:!1,category:"animals_and_nature"},grasshopper:{keywords:["animal","cricket","chirp"],char:"🦗",fitzpatrick_scale:!1,category:"animals_and_nature"},spider:{keywords:["animal","arachnid"],char:"🕷",fitzpatrick_scale:!1,category:"animals_and_nature"},scorpion:{keywords:["animal","arachnid"],char:"🦂",fitzpatrick_scale:!1,category:"animals_and_nature"},crab:{keywords:["animal","crustacean"],char:"🦀",fitzpatrick_scale:!1,category:"animals_and_nature"},snake:{keywords:["animal","evil","nature","hiss","python"],char:"🐍",fitzpatrick_scale:!1,category:"animals_and_nature"},lizard:{keywords:["animal","nature","reptile"],char:"🦎",fitzpatrick_scale:!1,category:"animals_and_nature"},"t-rex":{keywords:["animal","nature","dinosaur","tyrannosaurus","extinct"],char:"🦖",fitzpatrick_scale:!1,category:"animals_and_nature"},sauropod:{keywords:["animal","nature","dinosaur","brachiosaurus","brontosaurus","diplodocus","extinct"],char:"🦕",fitzpatrick_scale:!1,category:"animals_and_nature"},turtle:{keywords:["animal","slow","nature","tortoise"],char:"🐢",fitzpatrick_scale:!1,category:"animals_and_nature"},tropical_fish:{keywords:["animal","swim","ocean","beach","nemo"],char:"🐠",fitzpatrick_scale:!1,category:"animals_and_nature"},fish:{keywords:["animal","food","nature"],char:"🐟",fitzpatrick_scale:!1,category:"animals_and_nature"},blowfish:{keywords:["animal","nature","food","sea","ocean"],char:"🐡",fitzpatrick_scale:!1,category:"animals_and_nature"},dolphin:{keywords:["animal","nature","fish","sea","ocean","flipper","fins","beach"],char:"🐬",fitzpatrick_scale:!1,category:"animals_and_nature"},shark:{keywords:["animal","nature","fish","sea","ocean","jaws","fins","beach"],char:"🦈",fitzpatrick_scale:!1,category:"animals_and_nature"},whale:{keywords:["animal","nature","sea","ocean"],char:"🐳",fitzpatrick_scale:!1,category:"animals_and_nature"},whale2:{keywords:["animal","nature","sea","ocean"],char:"🐋",fitzpatrick_scale:!1,category:"animals_and_nature"},crocodile:{keywords:["animal","nature","reptile","lizard","alligator"],char:"🐊",fitzpatrick_scale:!1,category:"animals_and_nature"},leopard:{keywords:["animal","nature"],char:"🐆",fitzpatrick_scale:!1,category:"animals_and_nature"},zebra:{keywords:["animal","nature","stripes","safari"],char:"🦓",fitzpatrick_scale:!1,category:"animals_and_nature"},tiger2:{keywords:["animal","nature","roar"],char:"🐅",fitzpatrick_scale:!1,category:"animals_and_nature"},water_buffalo:{keywords:["animal","nature","ox","cow"],char:"🐃",fitzpatrick_scale:!1,category:"animals_and_nature"},ox:{keywords:["animal","cow","beef"],char:"🐂",fitzpatrick_scale:!1,category:"animals_and_nature"},cow2:{keywords:["beef","ox","animal","nature","moo","milk"],char:"🐄",fitzpatrick_scale:!1,category:"animals_and_nature"},deer:{keywords:["animal","nature","horns","venison"],char:"🦌",fitzpatrick_scale:!1,category:"animals_and_nature"},dromedary_camel:{keywords:["animal","hot","desert","hump"],char:"🐪",fitzpatrick_scale:!1,category:"animals_and_nature"},camel:{keywords:["animal","nature","hot","desert","hump"],char:"🐫",fitzpatrick_scale:!1,category:"animals_and_nature"},giraffe:{keywords:["animal","nature","spots","safari"],char:"🦒",fitzpatrick_scale:!1,category:"animals_and_nature"},elephant:{keywords:["animal","nature","nose","th","circus"],char:"🐘",fitzpatrick_scale:!1,category:"animals_and_nature"},rhinoceros:{keywords:["animal","nature","horn"],char:"🦏",fitzpatrick_scale:!1,category:"animals_and_nature"},goat:{keywords:["animal","nature"],char:"🐐",fitzpatrick_scale:!1,category:"animals_and_nature"},ram:{keywords:["animal","sheep","nature"],char:"🐏",fitzpatrick_scale:!1,category:"animals_and_nature"},sheep:{keywords:["animal","nature","wool","shipit"],char:"🐑",fitzpatrick_scale:!1,category:"animals_and_nature"},racehorse:{keywords:["animal","gamble","luck"],char:"🐎",fitzpatrick_scale:!1,category:"animals_and_nature"},pig2:{keywords:["animal","nature"],char:"🐖",fitzpatrick_scale:!1,category:"animals_and_nature"},rat:{keywords:["animal","mouse","rodent"],char:"🐀",fitzpatrick_scale:!1,category:"animals_and_nature"},mouse2:{keywords:["animal","nature","rodent"],char:"🐁",fitzpatrick_scale:!1,category:"animals_and_nature"},rooster:{keywords:["animal","nature","chicken"],char:"🐓",fitzpatrick_scale:!1,category:"animals_and_nature"},turkey:{keywords:["animal","bird"],char:"🦃",fitzpatrick_scale:!1,category:"animals_and_nature"},dove:{keywords:["animal","bird"],char:"🕊",fitzpatrick_scale:!1,category:"animals_and_nature"},dog2:{keywords:["animal","nature","friend","doge","pet","faithful"],char:"🐕",fitzpatrick_scale:!1,category:"animals_and_nature"},poodle:{keywords:["dog","animal","101","nature","pet"],char:"🐩",fitzpatrick_scale:!1,category:"animals_and_nature"},cat2:{keywords:["animal","meow","pet","cats"],char:"🐈",fitzpatrick_scale:!1,category:"animals_and_nature"},rabbit2:{keywords:["animal","nature","pet","magic","spring"],char:"🐇",fitzpatrick_scale:!1,category:"animals_and_nature"},chipmunk:{keywords:["animal","nature","rodent","squirrel"],char:"🐿",fitzpatrick_scale:!1,category:"animals_and_nature"},hedgehog:{keywords:["animal","nature","spiny"],char:"🦔",fitzpatrick_scale:!1,category:"animals_and_nature"},raccoon:{keywords:["animal","nature"],char:"🦝",fitzpatrick_scale:!1,category:"animals_and_nature"},llama:{keywords:["animal","nature","alpaca"],char:"🦙",fitzpatrick_scale:!1,category:"animals_and_nature"},hippopotamus:{keywords:["animal","nature"],char:"🦛",fitzpatrick_scale:!1,category:"animals_and_nature"},kangaroo:{keywords:["animal","nature","australia","joey","hop","marsupial"],char:"🦘",fitzpatrick_scale:!1,category:"animals_and_nature"},badger:{keywords:["animal","nature","honey"],char:"🦡",fitzpatrick_scale:!1,category:"animals_and_nature"},swan:{keywords:["animal","nature","bird"],char:"🦢",fitzpatrick_scale:!1,category:"animals_and_nature"},peacock:{keywords:["animal","nature","peahen","bird"],char:"🦚",fitzpatrick_scale:!1,category:"animals_and_nature"},parrot:{keywords:["animal","nature","bird","pirate","talk"],char:"🦜",fitzpatrick_scale:!1,category:"animals_and_nature"},lobster:{keywords:["animal","nature","bisque","claws","seafood"],char:"🦞",fitzpatrick_scale:!1,category:"animals_and_nature"},mosquito:{keywords:["animal","nature","insect","malaria"],char:"🦟",fitzpatrick_scale:!1,category:"animals_and_nature"},paw_prints:{keywords:["animal","tracking","footprints","dog","cat","pet","feet"],char:"🐾",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon:{keywords:["animal","myth","nature","chinese","green"],char:"🐉",fitzpatrick_scale:!1,category:"animals_and_nature"},dragon_face:{keywords:["animal","myth","nature","chinese","green"],char:"🐲",fitzpatrick_scale:!1,category:"animals_and_nature"},cactus:{keywords:["vegetable","plant","nature"],char:"🌵",fitzpatrick_scale:!1,category:"animals_and_nature"},christmas_tree:{keywords:["festival","vacation","december","xmas","celebration"],char:"🎄",fitzpatrick_scale:!1,category:"animals_and_nature"},evergreen_tree:{keywords:["plant","nature"],char:"🌲",fitzpatrick_scale:!1,category:"animals_and_nature"},deciduous_tree:{keywords:["plant","nature"],char:"🌳",fitzpatrick_scale:!1,category:"animals_and_nature"},palm_tree:{keywords:["plant","vegetable","nature","summer","beach","mojito","tropical"],char:"🌴",fitzpatrick_scale:!1,category:"animals_and_nature"},seedling:{keywords:["plant","nature","grass","lawn","spring"],char:"🌱",fitzpatrick_scale:!1,category:"animals_and_nature"},herb:{keywords:["vegetable","plant","medicine","weed","grass","lawn"],char:"🌿",fitzpatrick_scale:!1,category:"animals_and_nature"},shamrock:{keywords:["vegetable","plant","nature","irish","clover"],char:"☘",fitzpatrick_scale:!1,category:"animals_and_nature"},four_leaf_clover:{keywords:["vegetable","plant","nature","lucky","irish"],char:"🍀",fitzpatrick_scale:!1,category:"animals_and_nature"},bamboo:{keywords:["plant","nature","vegetable","panda","pine_decoration"],char:"🎍",fitzpatrick_scale:!1,category:"animals_and_nature"},tanabata_tree:{keywords:["plant","nature","branch","summer"],char:"🎋",fitzpatrick_scale:!1,category:"animals_and_nature"},leaves:{keywords:["nature","plant","tree","vegetable","grass","lawn","spring"],char:"🍃",fitzpatrick_scale:!1,category:"animals_and_nature"},fallen_leaf:{keywords:["nature","plant","vegetable","leaves"],char:"🍂",fitzpatrick_scale:!1,category:"animals_and_nature"},maple_leaf:{keywords:["nature","plant","vegetable","ca","fall"],char:"🍁",fitzpatrick_scale:!1,category:"animals_and_nature"},ear_of_rice:{keywords:["nature","plant"],char:"🌾",fitzpatrick_scale:!1,category:"animals_and_nature"},hibiscus:{keywords:["plant","vegetable","flowers","beach"],char:"🌺",fitzpatrick_scale:!1,category:"animals_and_nature"},sunflower:{keywords:["nature","plant","fall"],char:"🌻",fitzpatrick_scale:!1,category:"animals_and_nature"},rose:{keywords:["flowers","valentines","love","spring"],char:"🌹",fitzpatrick_scale:!1,category:"animals_and_nature"},wilted_flower:{keywords:["plant","nature","flower"],char:"🥀",fitzpatrick_scale:!1,category:"animals_and_nature"},tulip:{keywords:["flowers","plant","nature","summer","spring"],char:"🌷",fitzpatrick_scale:!1,category:"animals_and_nature"},blossom:{keywords:["nature","flowers","yellow"],char:"🌼",fitzpatrick_scale:!1,category:"animals_and_nature"},cherry_blossom:{keywords:["nature","plant","spring","flower"],char:"🌸",fitzpatrick_scale:!1,category:"animals_and_nature"},bouquet:{keywords:["flowers","nature","spring"],char:"💐",fitzpatrick_scale:!1,category:"animals_and_nature"},mushroom:{keywords:["plant","vegetable"],char:"🍄",fitzpatrick_scale:!1,category:"animals_and_nature"},chestnut:{keywords:["food","squirrel"],char:"🌰",fitzpatrick_scale:!1,category:"animals_and_nature"},jack_o_lantern:{keywords:["halloween","light","pumpkin","creepy","fall"],char:"🎃",fitzpatrick_scale:!1,category:"animals_and_nature"},shell:{keywords:["nature","sea","beach"],char:"🐚",fitzpatrick_scale:!1,category:"animals_and_nature"},spider_web:{keywords:["animal","insect","arachnid","silk"],char:"🕸",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_americas:{keywords:["globe","world","USA","international"],char:"🌎",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_africa:{keywords:["globe","world","international"],char:"🌍",fitzpatrick_scale:!1,category:"animals_and_nature"},earth_asia:{keywords:["globe","world","east","international"],char:"🌏",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon:{keywords:["nature","yellow","twilight","planet","space","night","evening","sleep"],char:"🌕",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_gibbous_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep","waxing_gibbous_moon"],char:"🌖",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌗",fitzpatrick_scale:!1,category:"animals_and_nature"},waning_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌘",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌑",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_crescent_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌒",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌓",fitzpatrick_scale:!1,category:"animals_and_nature"},waxing_gibbous_moon:{keywords:["nature","night","sky","gray","twilight","planet","space","evening","sleep"],char:"🌔",fitzpatrick_scale:!1,category:"animals_and_nature"},new_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌚",fitzpatrick_scale:!1,category:"animals_and_nature"},full_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌝",fitzpatrick_scale:!1,category:"animals_and_nature"},first_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌛",fitzpatrick_scale:!1,category:"animals_and_nature"},last_quarter_moon_with_face:{keywords:["nature","twilight","planet","space","night","evening","sleep"],char:"🌜",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_with_face:{keywords:["nature","morning","sky"],char:"🌞",fitzpatrick_scale:!1,category:"animals_and_nature"},crescent_moon:{keywords:["night","sleep","sky","evening","magic"],char:"🌙",fitzpatrick_scale:!1,category:"animals_and_nature"},star:{keywords:["night","yellow"],char:"⭐",fitzpatrick_scale:!1,category:"animals_and_nature"},star2:{keywords:["night","sparkle","awesome","good","magic"],char:"🌟",fitzpatrick_scale:!1,category:"animals_and_nature"},dizzy:{keywords:["star","sparkle","shoot","magic"],char:"💫",fitzpatrick_scale:!1,category:"animals_and_nature"},sparkles:{keywords:["stars","shine","shiny","cool","awesome","good","magic"],char:"✨",fitzpatrick_scale:!1,category:"animals_and_nature"},comet:{keywords:["space"],char:"☄",fitzpatrick_scale:!1,category:"animals_and_nature"},sunny:{keywords:["weather","nature","brightness","summer","beach","spring"],char:"☀",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_small_cloud:{keywords:["weather"],char:"🌤",fitzpatrick_scale:!1,category:"animals_and_nature"},partly_sunny:{keywords:["weather","nature","cloudy","morning","fall","spring"],char:"⛅",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_large_cloud:{keywords:["weather"],char:"🌥",fitzpatrick_scale:!1,category:"animals_and_nature"},sun_behind_rain_cloud:{keywords:["weather"],char:"🌦",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud:{keywords:["weather","sky"],char:"☁",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_rain:{keywords:["weather"],char:"🌧",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning_and_rain:{keywords:["weather","lightning"],char:"⛈",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_lightning:{keywords:["weather","thunder"],char:"🌩",fitzpatrick_scale:!1,category:"animals_and_nature"},zap:{keywords:["thunder","weather","lightning bolt","fast"],char:"⚡",fitzpatrick_scale:!1,category:"animals_and_nature"},fire:{keywords:["hot","cook","flame"],char:"🔥",fitzpatrick_scale:!1,category:"animals_and_nature"},boom:{keywords:["bomb","explode","explosion","collision","blown"],char:"💥",fitzpatrick_scale:!1,category:"animals_and_nature"},snowflake:{keywords:["winter","season","cold","weather","christmas","xmas"],char:"❄",fitzpatrick_scale:!1,category:"animals_and_nature"},cloud_with_snow:{keywords:["weather"],char:"🌨",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman:{keywords:["winter","season","cold","weather","christmas","xmas","frozen","without_snow"],char:"⛄",fitzpatrick_scale:!1,category:"animals_and_nature"},snowman_with_snow:{keywords:["winter","season","cold","weather","christmas","xmas","frozen"],char:"☃",fitzpatrick_scale:!1,category:"animals_and_nature"},wind_face:{keywords:["gust","air"],char:"🌬",fitzpatrick_scale:!1,category:"animals_and_nature"},dash:{keywords:["wind","air","fast","shoo","fart","smoke","puff"],char:"💨",fitzpatrick_scale:!1,category:"animals_and_nature"},tornado:{keywords:["weather","cyclone","twister"],char:"🌪",fitzpatrick_scale:!1,category:"animals_and_nature"},fog:{keywords:["weather"],char:"🌫",fitzpatrick_scale:!1,category:"animals_and_nature"},open_umbrella:{keywords:["weather","spring"],char:"☂",fitzpatrick_scale:!1,category:"animals_and_nature"},umbrella:{keywords:["rainy","weather","spring"],char:"☔",fitzpatrick_scale:!1,category:"animals_and_nature"},droplet:{keywords:["water","drip","faucet","spring"],char:"💧",fitzpatrick_scale:!1,category:"animals_and_nature"},sweat_drops:{keywords:["water","drip","oops"],char:"💦",fitzpatrick_scale:!1,category:"animals_and_nature"},ocean:{keywords:["sea","water","wave","nature","tsunami","disaster"],char:"🌊",fitzpatrick_scale:!1,category:"animals_and_nature"},green_apple:{keywords:["fruit","nature"],char:"🍏",fitzpatrick_scale:!1,category:"food_and_drink"},apple:{keywords:["fruit","mac","school"],char:"🍎",fitzpatrick_scale:!1,category:"food_and_drink"},pear:{keywords:["fruit","nature","food"],char:"🍐",fitzpatrick_scale:!1,category:"food_and_drink"},tangerine:{keywords:["food","fruit","nature","orange"],char:"🍊",fitzpatrick_scale:!1,category:"food_and_drink"},lemon:{keywords:["fruit","nature"],char:"🍋",fitzpatrick_scale:!1,category:"food_and_drink"},banana:{keywords:["fruit","food","monkey"],char:"🍌",fitzpatrick_scale:!1,category:"food_and_drink"},watermelon:{keywords:["fruit","food","picnic","summer"],char:"🍉",fitzpatrick_scale:!1,category:"food_and_drink"},grapes:{keywords:["fruit","food","wine"],char:"🍇",fitzpatrick_scale:!1,category:"food_and_drink"},strawberry:{keywords:["fruit","food","nature"],char:"🍓",fitzpatrick_scale:!1,category:"food_and_drink"},melon:{keywords:["fruit","nature","food"],char:"🍈",fitzpatrick_scale:!1,category:"food_and_drink"},cherries:{keywords:["food","fruit"],char:"🍒",fitzpatrick_scale:!1,category:"food_and_drink"},peach:{keywords:["fruit","nature","food"],char:"🍑",fitzpatrick_scale:!1,category:"food_and_drink"},pineapple:{keywords:["fruit","nature","food"],char:"🍍",fitzpatrick_scale:!1,category:"food_and_drink"},coconut:{keywords:["fruit","nature","food","palm"],char:"🥥",fitzpatrick_scale:!1,category:"food_and_drink"},kiwi_fruit:{keywords:["fruit","food"],char:"🥝",fitzpatrick_scale:!1,category:"food_and_drink"},mango:{keywords:["fruit","food","tropical"],char:"🥭",fitzpatrick_scale:!1,category:"food_and_drink"},avocado:{keywords:["fruit","food"],char:"🥑",fitzpatrick_scale:!1,category:"food_and_drink"},broccoli:{keywords:["fruit","food","vegetable"],char:"🥦",fitzpatrick_scale:!1,category:"food_and_drink"},tomato:{keywords:["fruit","vegetable","nature","food"],char:"🍅",fitzpatrick_scale:!1,category:"food_and_drink"},eggplant:{keywords:["vegetable","nature","food","aubergine"],char:"🍆",fitzpatrick_scale:!1,category:"food_and_drink"},cucumber:{keywords:["fruit","food","pickle"],char:"🥒",fitzpatrick_scale:!1,category:"food_and_drink"},carrot:{keywords:["vegetable","food","orange"],char:"🥕",fitzpatrick_scale:!1,category:"food_and_drink"},hot_pepper:{keywords:["food","spicy","chilli","chili"],char:"🌶",fitzpatrick_scale:!1,category:"food_and_drink"},potato:{keywords:["food","tuber","vegatable","starch"],char:"🥔",fitzpatrick_scale:!1,category:"food_and_drink"},corn:{keywords:["food","vegetable","plant"],char:"🌽",fitzpatrick_scale:!1,category:"food_and_drink"},leafy_greens:{keywords:["food","vegetable","plant","bok choy","cabbage","kale","lettuce"],char:"🥬",fitzpatrick_scale:!1,category:"food_and_drink"},sweet_potato:{keywords:["food","nature"],char:"🍠",fitzpatrick_scale:!1,category:"food_and_drink"},peanuts:{keywords:["food","nut"],char:"🥜",fitzpatrick_scale:!1,category:"food_and_drink"},honey_pot:{keywords:["bees","sweet","kitchen"],char:"🍯",fitzpatrick_scale:!1,category:"food_and_drink"},croissant:{keywords:["food","bread","french"],char:"🥐",fitzpatrick_scale:!1,category:"food_and_drink"},bread:{keywords:["food","wheat","breakfast","toast"],char:"🍞",fitzpatrick_scale:!1,category:"food_and_drink"},baguette_bread:{keywords:["food","bread","french"],char:"🥖",fitzpatrick_scale:!1,category:"food_and_drink"},bagel:{keywords:["food","bread","bakery","schmear"],char:"🥯",fitzpatrick_scale:!1,category:"food_and_drink"},pretzel:{keywords:["food","bread","twisted"],char:"🥨",fitzpatrick_scale:!1,category:"food_and_drink"},cheese:{keywords:["food","chadder"],char:"🧀",fitzpatrick_scale:!1,category:"food_and_drink"},egg:{keywords:["food","chicken","breakfast"],char:"🥚",fitzpatrick_scale:!1,category:"food_and_drink"},bacon:{keywords:["food","breakfast","pork","pig","meat"],char:"🥓",fitzpatrick_scale:!1,category:"food_and_drink"},steak:{keywords:["food","cow","meat","cut","chop","lambchop","porkchop"],char:"🥩",fitzpatrick_scale:!1,category:"food_and_drink"},pancakes:{keywords:["food","breakfast","flapjacks","hotcakes"],char:"🥞",fitzpatrick_scale:!1,category:"food_and_drink"},poultry_leg:{keywords:["food","meat","drumstick","bird","chicken","turkey"],char:"🍗",fitzpatrick_scale:!1,category:"food_and_drink"},meat_on_bone:{keywords:["good","food","drumstick"],char:"🍖",fitzpatrick_scale:!1,category:"food_and_drink"},bone:{keywords:["skeleton"],char:"🦴",fitzpatrick_scale:!1,category:"food_and_drink"},fried_shrimp:{keywords:["food","animal","appetizer","summer"],char:"🍤",fitzpatrick_scale:!1,category:"food_and_drink"},fried_egg:{keywords:["food","breakfast","kitchen","egg"],char:"🍳",fitzpatrick_scale:!1,category:"food_and_drink"},hamburger:{keywords:["meat","fast food","beef","cheeseburger","mcdonalds","burger king"],char:"🍔",fitzpatrick_scale:!1,category:"food_and_drink"},fries:{keywords:["chips","snack","fast food"],char:"🍟",fitzpatrick_scale:!1,category:"food_and_drink"},stuffed_flatbread:{keywords:["food","flatbread","stuffed","gyro"],char:"🥙",fitzpatrick_scale:!1,category:"food_and_drink"},hotdog:{keywords:["food","frankfurter"],char:"🌭",fitzpatrick_scale:!1,category:"food_and_drink"},pizza:{keywords:["food","party"],char:"🍕",fitzpatrick_scale:!1,category:"food_and_drink"},sandwich:{keywords:["food","lunch","bread"],char:"🥪",fitzpatrick_scale:!1,category:"food_and_drink"},canned_food:{keywords:["food","soup"],char:"🥫",fitzpatrick_scale:!1,category:"food_and_drink"},spaghetti:{keywords:["food","italian","noodle"],char:"🍝",fitzpatrick_scale:!1,category:"food_and_drink"},taco:{keywords:["food","mexican"],char:"🌮",fitzpatrick_scale:!1,category:"food_and_drink"},burrito:{keywords:["food","mexican"],char:"🌯",fitzpatrick_scale:!1,category:"food_and_drink"},green_salad:{keywords:["food","healthy","lettuce"],char:"🥗",fitzpatrick_scale:!1,category:"food_and_drink"},shallow_pan_of_food:{keywords:["food","cooking","casserole","paella"],char:"🥘",fitzpatrick_scale:!1,category:"food_and_drink"},ramen:{keywords:["food","japanese","noodle","chopsticks"],char:"🍜",fitzpatrick_scale:!1,category:"food_and_drink"},stew:{keywords:["food","meat","soup"],char:"🍲",fitzpatrick_scale:!1,category:"food_and_drink"},fish_cake:{keywords:["food","japan","sea","beach","narutomaki","pink","swirl","kamaboko","surimi","ramen"],char:"🍥",fitzpatrick_scale:!1,category:"food_and_drink"},fortune_cookie:{keywords:["food","prophecy"],char:"🥠",fitzpatrick_scale:!1,category:"food_and_drink"},sushi:{keywords:["food","fish","japanese","rice"],char:"🍣",fitzpatrick_scale:!1,category:"food_and_drink"},bento:{keywords:["food","japanese","box"],char:"🍱",fitzpatrick_scale:!1,category:"food_and_drink"},curry:{keywords:["food","spicy","hot","indian"],char:"🍛",fitzpatrick_scale:!1,category:"food_and_drink"},rice_ball:{keywords:["food","japanese"],char:"🍙",fitzpatrick_scale:!1,category:"food_and_drink"},rice:{keywords:["food","china","asian"],char:"🍚",fitzpatrick_scale:!1,category:"food_and_drink"},rice_cracker:{keywords:["food","japanese"],char:"🍘",fitzpatrick_scale:!1,category:"food_and_drink"},oden:{keywords:["food","japanese"],char:"🍢",fitzpatrick_scale:!1,category:"food_and_drink"},dango:{keywords:["food","dessert","sweet","japanese","barbecue","meat"],char:"🍡",fitzpatrick_scale:!1,category:"food_and_drink"},shaved_ice:{keywords:["hot","dessert","summer"],char:"🍧",fitzpatrick_scale:!1,category:"food_and_drink"},ice_cream:{keywords:["food","hot","dessert"],char:"🍨",fitzpatrick_scale:!1,category:"food_and_drink"},icecream:{keywords:["food","hot","dessert","summer"],char:"🍦",fitzpatrick_scale:!1,category:"food_and_drink"},pie:{keywords:["food","dessert","pastry"],char:"🥧",fitzpatrick_scale:!1,category:"food_and_drink"},cake:{keywords:["food","dessert"],char:"🍰",fitzpatrick_scale:!1,category:"food_and_drink"},cupcake:{keywords:["food","dessert","bakery","sweet"],char:"🧁",fitzpatrick_scale:!1,category:"food_and_drink"},moon_cake:{keywords:["food","autumn"],char:"🥮",fitzpatrick_scale:!1,category:"food_and_drink"},birthday:{keywords:["food","dessert","cake"],char:"🎂",fitzpatrick_scale:!1,category:"food_and_drink"},custard:{keywords:["dessert","food"],char:"🍮",fitzpatrick_scale:!1,category:"food_and_drink"},candy:{keywords:["snack","dessert","sweet","lolly"],char:"🍬",fitzpatrick_scale:!1,category:"food_and_drink"},lollipop:{keywords:["food","snack","candy","sweet"],char:"🍭",fitzpatrick_scale:!1,category:"food_and_drink"},chocolate_bar:{keywords:["food","snack","dessert","sweet"],char:"🍫",fitzpatrick_scale:!1,category:"food_and_drink"},popcorn:{keywords:["food","movie theater","films","snack"],char:"🍿",fitzpatrick_scale:!1,category:"food_and_drink"},dumpling:{keywords:["food","empanada","pierogi","potsticker"],char:"🥟",fitzpatrick_scale:!1,category:"food_and_drink"},doughnut:{keywords:["food","dessert","snack","sweet","donut"],char:"🍩",fitzpatrick_scale:!1,category:"food_and_drink"},cookie:{keywords:["food","snack","oreo","chocolate","sweet","dessert"],char:"🍪",fitzpatrick_scale:!1,category:"food_and_drink"},milk_glass:{keywords:["beverage","drink","cow"],char:"🥛",fitzpatrick_scale:!1,category:"food_and_drink"},beer:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍺",fitzpatrick_scale:!1,category:"food_and_drink"},beers:{keywords:["relax","beverage","drink","drunk","party","pub","summer","alcohol","booze"],char:"🍻",fitzpatrick_scale:!1,category:"food_and_drink"},clinking_glasses:{keywords:["beverage","drink","party","alcohol","celebrate","cheers","wine","champagne","toast"],char:"🥂",fitzpatrick_scale:!1,category:"food_and_drink"},wine_glass:{keywords:["drink","beverage","drunk","alcohol","booze"],char:"🍷",fitzpatrick_scale:!1,category:"food_and_drink"},tumbler_glass:{keywords:["drink","beverage","drunk","alcohol","liquor","booze","bourbon","scotch","whisky","glass","shot"],char:"🥃",fitzpatrick_scale:!1,category:"food_and_drink"},cocktail:{keywords:["drink","drunk","alcohol","beverage","booze","mojito"],char:"🍸",fitzpatrick_scale:!1,category:"food_and_drink"},tropical_drink:{keywords:["beverage","cocktail","summer","beach","alcohol","booze","mojito"],char:"🍹",fitzpatrick_scale:!1,category:"food_and_drink"},champagne:{keywords:["drink","wine","bottle","celebration"],char:"🍾",fitzpatrick_scale:!1,category:"food_and_drink"},sake:{keywords:["wine","drink","drunk","beverage","japanese","alcohol","booze"],char:"🍶",fitzpatrick_scale:!1,category:"food_and_drink"},tea:{keywords:["drink","bowl","breakfast","green","british"],char:"🍵",fitzpatrick_scale:!1,category:"food_and_drink"},cup_with_straw:{keywords:["drink","soda"],char:"🥤",fitzpatrick_scale:!1,category:"food_and_drink"},coffee:{keywords:["beverage","caffeine","latte","espresso"],char:"☕",fitzpatrick_scale:!1,category:"food_and_drink"},baby_bottle:{keywords:["food","container","milk"],char:"🍼",fitzpatrick_scale:!1,category:"food_and_drink"},salt:{keywords:["condiment","shaker"],char:"🧂",fitzpatrick_scale:!1,category:"food_and_drink"},spoon:{keywords:["cutlery","kitchen","tableware"],char:"🥄",fitzpatrick_scale:!1,category:"food_and_drink"},fork_and_knife:{keywords:["cutlery","kitchen"],char:"🍴",fitzpatrick_scale:!1,category:"food_and_drink"},plate_with_cutlery:{keywords:["food","eat","meal","lunch","dinner","restaurant"],char:"🍽",fitzpatrick_scale:!1,category:"food_and_drink"},bowl_with_spoon:{keywords:["food","breakfast","cereal","oatmeal","porridge"],char:"🥣",fitzpatrick_scale:!1,category:"food_and_drink"},takeout_box:{keywords:["food","leftovers"],char:"🥡",fitzpatrick_scale:!1,category:"food_and_drink"},chopsticks:{keywords:["food"],char:"🥢",fitzpatrick_scale:!1,category:"food_and_drink"},soccer:{keywords:["sports","football"],char:"⚽",fitzpatrick_scale:!1,category:"activity"},basketball:{keywords:["sports","balls","NBA"],char:"🏀",fitzpatrick_scale:!1,category:"activity"},football:{keywords:["sports","balls","NFL"],char:"🏈",fitzpatrick_scale:!1,category:"activity"},baseball:{keywords:["sports","balls"],char:"⚾",fitzpatrick_scale:!1,category:"activity"},softball:{keywords:["sports","balls"],char:"🥎",fitzpatrick_scale:!1,category:"activity"},tennis:{keywords:["sports","balls","green"],char:"🎾",fitzpatrick_scale:!1,category:"activity"},volleyball:{keywords:["sports","balls"],char:"🏐",fitzpatrick_scale:!1,category:"activity"},rugby_football:{keywords:["sports","team"],char:"🏉",fitzpatrick_scale:!1,category:"activity"},flying_disc:{keywords:["sports","frisbee","ultimate"],char:"🥏",fitzpatrick_scale:!1,category:"activity"},"8ball":{keywords:["pool","hobby","game","luck","magic"],char:"🎱",fitzpatrick_scale:!1,category:"activity"},golf:{keywords:["sports","business","flag","hole","summer"],char:"⛳",fitzpatrick_scale:!1,category:"activity"},golfing_woman:{keywords:["sports","business","woman","female"],char:"🏌",fitzpatrick_scale:!1,category:"activity"},golfing_man:{keywords:["sports","business"],char:"🏌",fitzpatrick_scale:!0,category:"activity"},ping_pong:{keywords:["sports","pingpong"],char:"🏓",fitzpatrick_scale:!1,category:"activity"},badminton:{keywords:["sports"],char:"🏸",fitzpatrick_scale:!1,category:"activity"},goal_net:{keywords:["sports"],char:"🥅",fitzpatrick_scale:!1,category:"activity"},ice_hockey:{keywords:["sports"],char:"🏒",fitzpatrick_scale:!1,category:"activity"},field_hockey:{keywords:["sports"],char:"🏑",fitzpatrick_scale:!1,category:"activity"},lacrosse:{keywords:["sports","ball","stick"],char:"🥍",fitzpatrick_scale:!1,category:"activity"},cricket:{keywords:["sports"],char:"🏏",fitzpatrick_scale:!1,category:"activity"},ski:{keywords:["sports","winter","cold","snow"],char:"🎿",fitzpatrick_scale:!1,category:"activity"},skier:{keywords:["sports","winter","snow"],char:"⛷",fitzpatrick_scale:!1,category:"activity"},snowboarder:{keywords:["sports","winter"],char:"🏂",fitzpatrick_scale:!0,category:"activity"},person_fencing:{keywords:["sports","fencing","sword"],char:"🤺",fitzpatrick_scale:!1,category:"activity"},women_wrestling:{keywords:["sports","wrestlers"],char:"🤼",fitzpatrick_scale:!1,category:"activity"},men_wrestling:{keywords:["sports","wrestlers"],char:"🤼",fitzpatrick_scale:!1,category:"activity"},woman_cartwheeling:{keywords:["gymnastics"],char:"🤸",fitzpatrick_scale:!0,category:"activity"},man_cartwheeling:{keywords:["gymnastics"],char:"🤸",fitzpatrick_scale:!0,category:"activity"},woman_playing_handball:{keywords:["sports"],char:"🤾",fitzpatrick_scale:!0,category:"activity"},man_playing_handball:{keywords:["sports"],char:"🤾",fitzpatrick_scale:!0,category:"activity"},ice_skate:{keywords:["sports"],char:"⛸",fitzpatrick_scale:!1,category:"activity"},curling_stone:{keywords:["sports"],char:"🥌",fitzpatrick_scale:!1,category:"activity"},skateboard:{keywords:["board"],char:"🛹",fitzpatrick_scale:!1,category:"activity"},sled:{keywords:["sleigh","luge","toboggan"],char:"🛷",fitzpatrick_scale:!1,category:"activity"},bow_and_arrow:{keywords:["sports"],char:"🏹",fitzpatrick_scale:!1,category:"activity"},fishing_pole_and_fish:{keywords:["food","hobby","summer"],char:"🎣",fitzpatrick_scale:!1,category:"activity"},boxing_glove:{keywords:["sports","fighting"],char:"🥊",fitzpatrick_scale:!1,category:"activity"},martial_arts_uniform:{keywords:["judo","karate","taekwondo"],char:"🥋",fitzpatrick_scale:!1,category:"activity"},rowing_woman:{keywords:["sports","hobby","water","ship","woman","female"],char:"🚣",fitzpatrick_scale:!0,category:"activity"},rowing_man:{keywords:["sports","hobby","water","ship"],char:"🚣",fitzpatrick_scale:!0,category:"activity"},climbing_woman:{keywords:["sports","hobby","woman","female","rock"],char:"🧗",fitzpatrick_scale:!0,category:"activity"},climbing_man:{keywords:["sports","hobby","man","male","rock"],char:"🧗",fitzpatrick_scale:!0,category:"activity"},swimming_woman:{keywords:["sports","exercise","human","athlete","water","summer","woman","female"],char:"🏊",fitzpatrick_scale:!0,category:"activity"},swimming_man:{keywords:["sports","exercise","human","athlete","water","summer"],char:"🏊",fitzpatrick_scale:!0,category:"activity"},woman_playing_water_polo:{keywords:["sports","pool"],char:"🤽",fitzpatrick_scale:!0,category:"activity"},man_playing_water_polo:{keywords:["sports","pool"],char:"🤽",fitzpatrick_scale:!0,category:"activity"},woman_in_lotus_position:{keywords:["woman","female","meditation","yoga","serenity","zen","mindfulness"],char:"🧘",fitzpatrick_scale:!0,category:"activity"},man_in_lotus_position:{keywords:["man","male","meditation","yoga","serenity","zen","mindfulness"],char:"🧘",fitzpatrick_scale:!0,category:"activity"},surfing_woman:{keywords:["sports","ocean","sea","summer","beach","woman","female"],char:"🏄",fitzpatrick_scale:!0,category:"activity"},surfing_man:{keywords:["sports","ocean","sea","summer","beach"],char:"🏄",fitzpatrick_scale:!0,category:"activity"},bath:{keywords:["clean","shower","bathroom"],char:"🛀",fitzpatrick_scale:!0,category:"activity"},basketball_woman:{keywords:["sports","human","woman","female"],char:"⛹",fitzpatrick_scale:!0,category:"activity"},basketball_man:{keywords:["sports","human"],char:"⛹",fitzpatrick_scale:!0,category:"activity"},weight_lifting_woman:{keywords:["sports","training","exercise","woman","female"],char:"🏋",fitzpatrick_scale:!0,category:"activity"},weight_lifting_man:{keywords:["sports","training","exercise"],char:"🏋",fitzpatrick_scale:!0,category:"activity"},biking_woman:{keywords:["sports","bike","exercise","hipster","woman","female"],char:"🚴",fitzpatrick_scale:!0,category:"activity"},biking_man:{keywords:["sports","bike","exercise","hipster"],char:"🚴",fitzpatrick_scale:!0,category:"activity"},mountain_biking_woman:{keywords:["transportation","sports","human","race","bike","woman","female"],char:"🚵",fitzpatrick_scale:!0,category:"activity"},mountain_biking_man:{keywords:["transportation","sports","human","race","bike"],char:"🚵",fitzpatrick_scale:!0,category:"activity"},horse_racing:{keywords:["animal","betting","competition","gambling","luck"],char:"🏇",fitzpatrick_scale:!0,category:"activity"},business_suit_levitating:{keywords:["suit","business","levitate","hover","jump"],char:"🕴",fitzpatrick_scale:!0,category:"activity"},trophy:{keywords:["win","award","contest","place","ftw","ceremony"],char:"🏆",fitzpatrick_scale:!1,category:"activity"},running_shirt_with_sash:{keywords:["play","pageant"],char:"🎽",fitzpatrick_scale:!1,category:"activity"},medal_sports:{keywords:["award","winning"],char:"🏅",fitzpatrick_scale:!1,category:"activity"},medal_military:{keywords:["award","winning","army"],char:"🎖",fitzpatrick_scale:!1,category:"activity"},"1st_place_medal":{keywords:["award","winning","first"],char:"🥇",fitzpatrick_scale:!1,category:"activity"},"2nd_place_medal":{keywords:["award","second"],char:"🥈",fitzpatrick_scale:!1,category:"activity"},"3rd_place_medal":{keywords:["award","third"],char:"🥉",fitzpatrick_scale:!1,category:"activity"},reminder_ribbon:{keywords:["sports","cause","support","awareness"],char:"🎗",fitzpatrick_scale:!1,category:"activity"},rosette:{keywords:["flower","decoration","military"],char:"🏵",fitzpatrick_scale:!1,category:"activity"},ticket:{keywords:["event","concert","pass"],char:"🎫",fitzpatrick_scale:!1,category:"activity"},tickets:{keywords:["sports","concert","entrance"],char:"🎟",fitzpatrick_scale:!1,category:"activity"},performing_arts:{keywords:["acting","theater","drama"],char:"🎭",fitzpatrick_scale:!1,category:"activity"},art:{keywords:["design","paint","draw","colors"],char:"🎨",fitzpatrick_scale:!1,category:"activity"},circus_tent:{keywords:["festival","carnival","party"],char:"🎪",fitzpatrick_scale:!1,category:"activity"},woman_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹",fitzpatrick_scale:!0,category:"activity"},man_juggling:{keywords:["juggle","balance","skill","multitask"],char:"🤹",fitzpatrick_scale:!0,category:"activity"},microphone:{keywords:["sound","music","PA","sing","talkshow"],char:"🎤",fitzpatrick_scale:!1,category:"activity"},headphones:{keywords:["music","score","gadgets"],char:"🎧",fitzpatrick_scale:!1,category:"activity"},musical_score:{keywords:["treble","clef","compose"],char:"🎼",fitzpatrick_scale:!1,category:"activity"},musical_keyboard:{keywords:["piano","instrument","compose"],char:"🎹",fitzpatrick_scale:!1,category:"activity"},drum:{keywords:["music","instrument","drumsticks","snare"],char:"🥁",fitzpatrick_scale:!1,category:"activity"},saxophone:{keywords:["music","instrument","jazz","blues"],char:"🎷",fitzpatrick_scale:!1,category:"activity"},trumpet:{keywords:["music","brass"],char:"🎺",fitzpatrick_scale:!1,category:"activity"},guitar:{keywords:["music","instrument"],char:"🎸",fitzpatrick_scale:!1,category:"activity"},violin:{keywords:["music","instrument","orchestra","symphony"],char:"🎻",fitzpatrick_scale:!1,category:"activity"},clapper:{keywords:["movie","film","record"],char:"🎬",fitzpatrick_scale:!1,category:"activity"},video_game:{keywords:["play","console","PS4","controller"],char:"🎮",fitzpatrick_scale:!1,category:"activity"},space_invader:{keywords:["game","arcade","play"],char:"👾",fitzpatrick_scale:!1,category:"activity"},dart:{keywords:["game","play","bar","target","bullseye"],char:"🎯",fitzpatrick_scale:!1,category:"activity"},game_die:{keywords:["dice","random","tabletop","play","luck"],char:"🎲",fitzpatrick_scale:!1,category:"activity"},chess_pawn:{keywords:["expendable"],char:"♟",fitzpatrick_scale:!1,category:"activity"},slot_machine:{keywords:["bet","gamble","vegas","fruit machine","luck","casino"],char:"🎰",fitzpatrick_scale:!1,category:"activity"},jigsaw:{keywords:["interlocking","puzzle","piece"],char:"🧩",fitzpatrick_scale:!1,category:"activity"},bowling:{keywords:["sports","fun","play"],char:"🎳",fitzpatrick_scale:!1,category:"activity"},red_car:{keywords:["red","transportation","vehicle"],char:"🚗",fitzpatrick_scale:!1,category:"travel_and_places"},taxi:{keywords:["uber","vehicle","cars","transportation"],char:"🚕",fitzpatrick_scale:!1,category:"travel_and_places"},blue_car:{keywords:["transportation","vehicle"],char:"🚙",fitzpatrick_scale:!1,category:"travel_and_places"},bus:{keywords:["car","vehicle","transportation"],char:"🚌",fitzpatrick_scale:!1,category:"travel_and_places"},trolleybus:{keywords:["bart","transportation","vehicle"],char:"🚎",fitzpatrick_scale:!1,category:"travel_and_places"},racing_car:{keywords:["sports","race","fast","formula","f1"],char:"🏎",fitzpatrick_scale:!1,category:"travel_and_places"},police_car:{keywords:["vehicle","cars","transportation","law","legal","enforcement"],char:"🚓",fitzpatrick_scale:!1,category:"travel_and_places"},ambulance:{keywords:["health","911","hospital"],char:"🚑",fitzpatrick_scale:!1,category:"travel_and_places"},fire_engine:{keywords:["transportation","cars","vehicle"],char:"🚒",fitzpatrick_scale:!1,category:"travel_and_places"},minibus:{keywords:["vehicle","car","transportation"],char:"🚐",fitzpatrick_scale:!1,category:"travel_and_places"},truck:{keywords:["cars","transportation"],char:"🚚",fitzpatrick_scale:!1,category:"travel_and_places"},articulated_lorry:{keywords:["vehicle","cars","transportation","express"],char:"🚛",fitzpatrick_scale:!1,category:"travel_and_places"},tractor:{keywords:["vehicle","car","farming","agriculture"],char:"🚜",fitzpatrick_scale:!1,category:"travel_and_places"},kick_scooter:{keywords:["vehicle","kick","razor"],char:"🛴",fitzpatrick_scale:!1,category:"travel_and_places"},motorcycle:{keywords:["race","sports","fast"],char:"🏍",fitzpatrick_scale:!1,category:"travel_and_places"},bike:{keywords:["sports","bicycle","exercise","hipster"],char:"🚲",fitzpatrick_scale:!1,category:"travel_and_places"},motor_scooter:{keywords:["vehicle","vespa","sasha"],char:"🛵",fitzpatrick_scale:!1,category:"travel_and_places"},rotating_light:{keywords:["police","ambulance","911","emergency","alert","error","pinged","law","legal"],char:"🚨",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_police_car:{keywords:["vehicle","law","legal","enforcement","911"],char:"🚔",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_bus:{keywords:["vehicle","transportation"],char:"🚍",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_automobile:{keywords:["car","vehicle","transportation"],char:"🚘",fitzpatrick_scale:!1,category:"travel_and_places"},oncoming_taxi:{keywords:["vehicle","cars","uber"],char:"🚖",fitzpatrick_scale:!1,category:"travel_and_places"},aerial_tramway:{keywords:["transportation","vehicle","ski"],char:"🚡",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_cableway:{keywords:["transportation","vehicle","ski"],char:"🚠",fitzpatrick_scale:!1,category:"travel_and_places"},suspension_railway:{keywords:["vehicle","transportation"],char:"🚟",fitzpatrick_scale:!1,category:"travel_and_places"},railway_car:{keywords:["transportation","vehicle"],char:"🚃",fitzpatrick_scale:!1,category:"travel_and_places"},train:{keywords:["transportation","vehicle","carriage","public","travel"],char:"🚋",fitzpatrick_scale:!1,category:"travel_and_places"},monorail:{keywords:["transportation","vehicle"],char:"🚝",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_side:{keywords:["transportation","vehicle"],char:"🚄",fitzpatrick_scale:!1,category:"travel_and_places"},bullettrain_front:{keywords:["transportation","vehicle","speed","fast","public","travel"],char:"🚅",fitzpatrick_scale:!1,category:"travel_and_places"},light_rail:{keywords:["transportation","vehicle"],char:"🚈",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_railway:{keywords:["transportation","vehicle"],char:"🚞",fitzpatrick_scale:!1,category:"travel_and_places"},steam_locomotive:{keywords:["transportation","vehicle","train"],char:"🚂",fitzpatrick_scale:!1,category:"travel_and_places"},train2:{keywords:["transportation","vehicle"],char:"🚆",fitzpatrick_scale:!1,category:"travel_and_places"},metro:{keywords:["transportation","blue-square","mrt","underground","tube"],char:"🚇",fitzpatrick_scale:!1,category:"travel_and_places"},tram:{keywords:["transportation","vehicle"],char:"🚊",fitzpatrick_scale:!1,category:"travel_and_places"},station:{keywords:["transportation","vehicle","public"],char:"🚉",fitzpatrick_scale:!1,category:"travel_and_places"},flying_saucer:{keywords:["transportation","vehicle","ufo"],char:"🛸",fitzpatrick_scale:!1,category:"travel_and_places"},helicopter:{keywords:["transportation","vehicle","fly"],char:"🚁",fitzpatrick_scale:!1,category:"travel_and_places"},small_airplane:{keywords:["flight","transportation","fly","vehicle"],char:"🛩",fitzpatrick_scale:!1,category:"travel_and_places"},airplane:{keywords:["vehicle","transportation","flight","fly"],char:"✈",fitzpatrick_scale:!1,category:"travel_and_places"},flight_departure:{keywords:["airport","flight","landing"],char:"🛫",fitzpatrick_scale:!1,category:"travel_and_places"},flight_arrival:{keywords:["airport","flight","boarding"],char:"🛬",fitzpatrick_scale:!1,category:"travel_and_places"},sailboat:{keywords:["ship","summer","transportation","water","sailing"],char:"⛵",fitzpatrick_scale:!1,category:"travel_and_places"},motor_boat:{keywords:["ship"],char:"🛥",fitzpatrick_scale:!1,category:"travel_and_places"},speedboat:{keywords:["ship","transportation","vehicle","summer"],char:"🚤",fitzpatrick_scale:!1,category:"travel_and_places"},ferry:{keywords:["boat","ship","yacht"],char:"⛴",fitzpatrick_scale:!1,category:"travel_and_places"},passenger_ship:{keywords:["yacht","cruise","ferry"],char:"🛳",fitzpatrick_scale:!1,category:"travel_and_places"},rocket:{keywords:["launch","ship","staffmode","NASA","outer space","outer_space","fly"],char:"🚀",fitzpatrick_scale:!1,category:"travel_and_places"},artificial_satellite:{keywords:["communication","gps","orbit","spaceflight","NASA","ISS"],char:"🛰",fitzpatrick_scale:!1,category:"travel_and_places"},seat:{keywords:["sit","airplane","transport","bus","flight","fly"],char:"💺",fitzpatrick_scale:!1,category:"travel_and_places"},canoe:{keywords:["boat","paddle","water","ship"],char:"🛶",fitzpatrick_scale:!1,category:"travel_and_places"},anchor:{keywords:["ship","ferry","sea","boat"],char:"⚓",fitzpatrick_scale:!1,category:"travel_and_places"},construction:{keywords:["wip","progress","caution","warning"],char:"🚧",fitzpatrick_scale:!1,category:"travel_and_places"},fuelpump:{keywords:["gas station","petroleum"],char:"⛽",fitzpatrick_scale:!1,category:"travel_and_places"},busstop:{keywords:["transportation","wait"],char:"🚏",fitzpatrick_scale:!1,category:"travel_and_places"},vertical_traffic_light:{keywords:["transportation","driving"],char:"🚦",fitzpatrick_scale:!1,category:"travel_and_places"},traffic_light:{keywords:["transportation","signal"],char:"🚥",fitzpatrick_scale:!1,category:"travel_and_places"},checkered_flag:{keywords:["contest","finishline","race","gokart"],char:"🏁",fitzpatrick_scale:!1,category:"travel_and_places"},ship:{keywords:["transportation","titanic","deploy"],char:"🚢",fitzpatrick_scale:!1,category:"travel_and_places"},ferris_wheel:{keywords:["photo","carnival","londoneye"],char:"🎡",fitzpatrick_scale:!1,category:"travel_and_places"},roller_coaster:{keywords:["carnival","playground","photo","fun"],char:"🎢",fitzpatrick_scale:!1,category:"travel_and_places"},carousel_horse:{keywords:["photo","carnival"],char:"🎠",fitzpatrick_scale:!1,category:"travel_and_places"},building_construction:{keywords:["wip","working","progress"],char:"🏗",fitzpatrick_scale:!1,category:"travel_and_places"},foggy:{keywords:["photo","mountain"],char:"🌁",fitzpatrick_scale:!1,category:"travel_and_places"},tokyo_tower:{keywords:["photo","japanese"],char:"🗼",fitzpatrick_scale:!1,category:"travel_and_places"},factory:{keywords:["building","industry","pollution","smoke"],char:"🏭",fitzpatrick_scale:!1,category:"travel_and_places"},fountain:{keywords:["photo","summer","water","fresh"],char:"⛲",fitzpatrick_scale:!1,category:"travel_and_places"},rice_scene:{keywords:["photo","japan","asia","tsukimi"],char:"🎑",fitzpatrick_scale:!1,category:"travel_and_places"},mountain:{keywords:["photo","nature","environment"],char:"⛰",fitzpatrick_scale:!1,category:"travel_and_places"},mountain_snow:{keywords:["photo","nature","environment","winter","cold"],char:"🏔",fitzpatrick_scale:!1,category:"travel_and_places"},mount_fuji:{keywords:["photo","mountain","nature","japanese"],char:"🗻",fitzpatrick_scale:!1,category:"travel_and_places"},volcano:{keywords:["photo","nature","disaster"],char:"🌋",fitzpatrick_scale:!1,category:"travel_and_places"},japan:{keywords:["nation","country","japanese","asia"],char:"🗾",fitzpatrick_scale:!1,category:"travel_and_places"},camping:{keywords:["photo","outdoors","tent"],char:"🏕",fitzpatrick_scale:!1,category:"travel_and_places"},tent:{keywords:["photo","camping","outdoors"],char:"⛺",fitzpatrick_scale:!1,category:"travel_and_places"},national_park:{keywords:["photo","environment","nature"],char:"🏞",fitzpatrick_scale:!1,category:"travel_and_places"},motorway:{keywords:["road","cupertino","interstate","highway"],char:"🛣",fitzpatrick_scale:!1,category:"travel_and_places"},railway_track:{keywords:["train","transportation"],char:"🛤",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise:{keywords:["morning","view","vacation","photo"],char:"🌅",fitzpatrick_scale:!1,category:"travel_and_places"},sunrise_over_mountains:{keywords:["view","vacation","photo"],char:"🌄",fitzpatrick_scale:!1,category:"travel_and_places"},desert:{keywords:["photo","warm","saharah"],char:"🏜",fitzpatrick_scale:!1,category:"travel_and_places"},beach_umbrella:{keywords:["weather","summer","sunny","sand","mojito"],char:"🏖",fitzpatrick_scale:!1,category:"travel_and_places"},desert_island:{keywords:["photo","tropical","mojito"],char:"🏝",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunrise:{keywords:["photo","good morning","dawn"],char:"🌇",fitzpatrick_scale:!1,category:"travel_and_places"},city_sunset:{keywords:["photo","evening","sky","buildings"],char:"🌆",fitzpatrick_scale:!1,category:"travel_and_places"},cityscape:{keywords:["photo","night life","urban"],char:"🏙",fitzpatrick_scale:!1,category:"travel_and_places"},night_with_stars:{keywords:["evening","city","downtown"],char:"🌃",fitzpatrick_scale:!1,category:"travel_and_places"},bridge_at_night:{keywords:["photo","sanfrancisco"],char:"🌉",fitzpatrick_scale:!1,category:"travel_and_places"},milky_way:{keywords:["photo","space","stars"],char:"🌌",fitzpatrick_scale:!1,category:"travel_and_places"},stars:{keywords:["night","photo"],char:"🌠",fitzpatrick_scale:!1,category:"travel_and_places"},sparkler:{keywords:["stars","night","shine"],char:"🎇",fitzpatrick_scale:!1,category:"travel_and_places"},fireworks:{keywords:["photo","festival","carnival","congratulations"],char:"🎆",fitzpatrick_scale:!1,category:"travel_and_places"},rainbow:{keywords:["nature","happy","unicorn_face","photo","sky","spring"],char:"🌈",fitzpatrick_scale:!1,category:"travel_and_places"},houses:{keywords:["buildings","photo"],char:"🏘",fitzpatrick_scale:!1,category:"travel_and_places"},european_castle:{keywords:["building","royalty","history"],char:"🏰",fitzpatrick_scale:!1,category:"travel_and_places"},japanese_castle:{keywords:["photo","building"],char:"🏯",fitzpatrick_scale:!1,category:"travel_and_places"},stadium:{keywords:["photo","place","sports","concert","venue"],char:"🏟",fitzpatrick_scale:!1,category:"travel_and_places"},statue_of_liberty:{keywords:["american","newyork"],char:"🗽",fitzpatrick_scale:!1,category:"travel_and_places"},house:{keywords:["building","home"],char:"🏠",fitzpatrick_scale:!1,category:"travel_and_places"},house_with_garden:{keywords:["home","plant","nature"],char:"🏡",fitzpatrick_scale:!1,category:"travel_and_places"},derelict_house:{keywords:["abandon","evict","broken","building"],char:"🏚",fitzpatrick_scale:!1,category:"travel_and_places"},office:{keywords:["building","bureau","work"],char:"🏢",fitzpatrick_scale:!1,category:"travel_and_places"},department_store:{keywords:["building","shopping","mall"],char:"🏬",fitzpatrick_scale:!1,category:"travel_and_places"},post_office:{keywords:["building","envelope","communication"],char:"🏣",fitzpatrick_scale:!1,category:"travel_and_places"},european_post_office:{keywords:["building","email"],char:"🏤",fitzpatrick_scale:!1,category:"travel_and_places"},hospital:{keywords:["building","health","surgery","doctor"],char:"🏥",fitzpatrick_scale:!1,category:"travel_and_places"},bank:{keywords:["building","money","sales","cash","business","enterprise"],char:"🏦",fitzpatrick_scale:!1,category:"travel_and_places"},hotel:{keywords:["building","accomodation","checkin"],char:"🏨",fitzpatrick_scale:!1,category:"travel_and_places"},convenience_store:{keywords:["building","shopping","groceries"],char:"🏪",fitzpatrick_scale:!1,category:"travel_and_places"},school:{keywords:["building","student","education","learn","teach"],char:"🏫",fitzpatrick_scale:!1,category:"travel_and_places"},love_hotel:{keywords:["like","affection","dating"],char:"🏩",fitzpatrick_scale:!1,category:"travel_and_places"},wedding:{keywords:["love","like","affection","couple","marriage","bride","groom"],char:"💒",fitzpatrick_scale:!1,category:"travel_and_places"},classical_building:{keywords:["art","culture","history"],char:"🏛",fitzpatrick_scale:!1,category:"travel_and_places"},church:{keywords:["building","religion","christ"],char:"⛪",fitzpatrick_scale:!1,category:"travel_and_places"},mosque:{keywords:["islam","worship","minaret"],char:"🕌",fitzpatrick_scale:!1,category:"travel_and_places"},synagogue:{keywords:["judaism","worship","temple","jewish"],char:"🕍",fitzpatrick_scale:!1,category:"travel_and_places"},kaaba:{keywords:["mecca","mosque","islam"],char:"🕋",fitzpatrick_scale:!1,category:"travel_and_places"},shinto_shrine:{keywords:["temple","japan","kyoto"],char:"⛩",fitzpatrick_scale:!1,category:"travel_and_places"},watch:{keywords:["time","accessories"],char:"⌚",fitzpatrick_scale:!1,category:"objects"},iphone:{keywords:["technology","apple","gadgets","dial"],char:"📱",fitzpatrick_scale:!1,category:"objects"},calling:{keywords:["iphone","incoming"],char:"📲",fitzpatrick_scale:!1,category:"objects"},computer:{keywords:["technology","laptop","screen","display","monitor"],char:"💻",fitzpatrick_scale:!1,category:"objects"},keyboard:{keywords:["technology","computer","type","input","text"],char:"⌨",fitzpatrick_scale:!1,category:"objects"},desktop_computer:{keywords:["technology","computing","screen"],char:"🖥",fitzpatrick_scale:!1,category:"objects"},printer:{keywords:["paper","ink"],char:"🖨",fitzpatrick_scale:!1,category:"objects"},computer_mouse:{keywords:["click"],char:"🖱",fitzpatrick_scale:!1,category:"objects"},trackball:{keywords:["technology","trackpad"],char:"🖲",fitzpatrick_scale:!1,category:"objects"},joystick:{keywords:["game","play"],char:"🕹",fitzpatrick_scale:!1,category:"objects"},clamp:{keywords:["tool"],char:"🗜",fitzpatrick_scale:!1,category:"objects"},minidisc:{keywords:["technology","record","data","disk","90s"],char:"💽",fitzpatrick_scale:!1,category:"objects"},floppy_disk:{keywords:["oldschool","technology","save","90s","80s"],char:"💾",fitzpatrick_scale:!1,category:"objects"},cd:{keywords:["technology","dvd","disk","disc","90s"],char:"💿",fitzpatrick_scale:!1,category:"objects"},dvd:{keywords:["cd","disk","disc"],char:"📀",fitzpatrick_scale:!1,category:"objects"},vhs:{keywords:["record","video","oldschool","90s","80s"],char:"📼",fitzpatrick_scale:!1,category:"objects"},camera:{keywords:["gadgets","photography"],char:"📷",fitzpatrick_scale:!1,category:"objects"},camera_flash:{keywords:["photography","gadgets"],char:"📸",fitzpatrick_scale:!1,category:"objects"},video_camera:{keywords:["film","record"],char:"📹",fitzpatrick_scale:!1,category:"objects"},movie_camera:{keywords:["film","record"],char:"🎥",fitzpatrick_scale:!1,category:"objects"},film_projector:{keywords:["video","tape","record","movie"],char:"📽",fitzpatrick_scale:!1,category:"objects"},film_strip:{keywords:["movie"],char:"🎞",fitzpatrick_scale:!1,category:"objects"},telephone_receiver:{keywords:["technology","communication","dial"],char:"📞",fitzpatrick_scale:!1,category:"objects"},phone:{keywords:["technology","communication","dial","telephone"],char:"☎",fitzpatrick_scale:!1,category:"objects"},pager:{keywords:["bbcall","oldschool","90s"],char:"📟",fitzpatrick_scale:!1,category:"objects"},fax:{keywords:["communication","technology"],char:"📠",fitzpatrick_scale:!1,category:"objects"},tv:{keywords:["technology","program","oldschool","show","television"],char:"📺",fitzpatrick_scale:!1,category:"objects"},radio:{keywords:["communication","music","podcast","program"],char:"📻",fitzpatrick_scale:!1,category:"objects"},studio_microphone:{keywords:["sing","recording","artist","talkshow"],char:"🎙",fitzpatrick_scale:!1,category:"objects"},level_slider:{keywords:["scale"],char:"🎚",fitzpatrick_scale:!1,category:"objects"},control_knobs:{keywords:["dial"],char:"🎛",fitzpatrick_scale:!1,category:"objects"},compass:{keywords:["magnetic","navigation","orienteering"],char:"🧭",fitzpatrick_scale:!1,category:"objects"},stopwatch:{keywords:["time","deadline"],char:"⏱",fitzpatrick_scale:!1,category:"objects"},timer_clock:{keywords:["alarm"],char:"⏲",fitzpatrick_scale:!1,category:"objects"},alarm_clock:{keywords:["time","wake"],char:"⏰",fitzpatrick_scale:!1,category:"objects"},mantelpiece_clock:{keywords:["time"],char:"🕰",fitzpatrick_scale:!1,category:"objects"},hourglass_flowing_sand:{keywords:["oldschool","time","countdown"],char:"⏳",fitzpatrick_scale:!1,category:"objects"},hourglass:{keywords:["time","clock","oldschool","limit","exam","quiz","test"],char:"⌛",fitzpatrick_scale:!1,category:"objects"},satellite:{keywords:["communication","future","radio","space"],char:"📡",fitzpatrick_scale:!1,category:"objects"},battery:{keywords:["power","energy","sustain"],char:"🔋",fitzpatrick_scale:!1,category:"objects"},electric_plug:{keywords:["charger","power"],char:"🔌",fitzpatrick_scale:!1,category:"objects"},bulb:{keywords:["light","electricity","idea"],char:"💡",fitzpatrick_scale:!1,category:"objects"},flashlight:{keywords:["dark","camping","sight","night"],char:"🔦",fitzpatrick_scale:!1,category:"objects"},candle:{keywords:["fire","wax"],char:"🕯",fitzpatrick_scale:!1,category:"objects"},fire_extinguisher:{keywords:["quench"],char:"🧯",fitzpatrick_scale:!1,category:"objects"},wastebasket:{keywords:["bin","trash","rubbish","garbage","toss"],char:"🗑",fitzpatrick_scale:!1,category:"objects"},oil_drum:{keywords:["barrell"],char:"🛢",fitzpatrick_scale:!1,category:"objects"},money_with_wings:{keywords:["dollar","bills","payment","sale"],char:"💸",fitzpatrick_scale:!1,category:"objects"},dollar:{keywords:["money","sales","bill","currency"],char:"💵",fitzpatrick_scale:!1,category:"objects"},yen:{keywords:["money","sales","japanese","dollar","currency"],char:"💴",fitzpatrick_scale:!1,category:"objects"},euro:{keywords:["money","sales","dollar","currency"],char:"💶",fitzpatrick_scale:!1,category:"objects"},pound:{keywords:["british","sterling","money","sales","bills","uk","england","currency"],char:"💷",fitzpatrick_scale:!1,category:"objects"},moneybag:{keywords:["dollar","payment","coins","sale"],char:"💰",fitzpatrick_scale:!1,category:"objects"},credit_card:{keywords:["money","sales","dollar","bill","payment","shopping"],char:"💳",fitzpatrick_scale:!1,category:"objects"},gem:{keywords:["blue","ruby","diamond","jewelry"],char:"💎",fitzpatrick_scale:!1,category:"objects"},balance_scale:{keywords:["law","fairness","weight"],char:"⚖",fitzpatrick_scale:!1,category:"objects"},toolbox:{keywords:["tools","diy","fix","maintainer","mechanic"],char:"🧰",fitzpatrick_scale:!1,category:"objects"},wrench:{keywords:["tools","diy","ikea","fix","maintainer"],char:"🔧",fitzpatrick_scale:!1,category:"objects"},hammer:{keywords:["tools","build","create"],char:"🔨",fitzpatrick_scale:!1,category:"objects"},hammer_and_pick:{keywords:["tools","build","create"],char:"⚒",fitzpatrick_scale:!1,category:"objects"},hammer_and_wrench:{keywords:["tools","build","create"],char:"🛠",fitzpatrick_scale:!1,category:"objects"},pick:{keywords:["tools","dig"],char:"⛏",fitzpatrick_scale:!1,category:"objects"},nut_and_bolt:{keywords:["handy","tools","fix"],char:"🔩",fitzpatrick_scale:!1,category:"objects"},gear:{keywords:["cog"],char:"⚙",fitzpatrick_scale:!1,category:"objects"},brick:{keywords:["bricks"],char:"🧱",fitzpatrick_scale:!1,category:"objects"},chains:{keywords:["lock","arrest"],char:"⛓",fitzpatrick_scale:!1,category:"objects"},magnet:{keywords:["attraction","magnetic"],char:"🧲",fitzpatrick_scale:!1,category:"objects"},gun:{keywords:["violence","weapon","pistol","revolver"],char:"🔫",fitzpatrick_scale:!1,category:"objects"},bomb:{keywords:["boom","explode","explosion","terrorism"],char:"💣",fitzpatrick_scale:!1,category:"objects"},firecracker:{keywords:["dynamite","boom","explode","explosion","explosive"],char:"🧨",fitzpatrick_scale:!1,category:"objects"},hocho:{keywords:["knife","blade","cutlery","kitchen","weapon"],char:"🔪",fitzpatrick_scale:!1,category:"objects"},dagger:{keywords:["weapon"],char:"🗡",fitzpatrick_scale:!1,category:"objects"},crossed_swords:{keywords:["weapon"],char:"⚔",fitzpatrick_scale:!1,category:"objects"},shield:{keywords:["protection","security"],char:"🛡",fitzpatrick_scale:!1,category:"objects"},smoking:{keywords:["kills","tobacco","cigarette","joint","smoke"],char:"🚬",fitzpatrick_scale:!1,category:"objects"},skull_and_crossbones:{keywords:["poison","danger","deadly","scary","death","pirate","evil"],char:"☠",fitzpatrick_scale:!1,category:"objects"},coffin:{keywords:["vampire","dead","die","death","rip","graveyard","cemetery","casket","funeral","box"],char:"⚰",fitzpatrick_scale:!1,category:"objects"},funeral_urn:{keywords:["dead","die","death","rip","ashes"],char:"⚱",fitzpatrick_scale:!1,category:"objects"},amphora:{keywords:["vase","jar"],char:"🏺",fitzpatrick_scale:!1,category:"objects"},crystal_ball:{keywords:["disco","party","magic","circus","fortune_teller"],char:"🔮",fitzpatrick_scale:!1,category:"objects"},prayer_beads:{keywords:["dhikr","religious"],char:"📿",fitzpatrick_scale:!1,category:"objects"},nazar_amulet:{keywords:["bead","charm"],char:"🧿",fitzpatrick_scale:!1,category:"objects"},barber:{keywords:["hair","salon","style"],char:"💈",fitzpatrick_scale:!1,category:"objects"},alembic:{keywords:["distilling","science","experiment","chemistry"],char:"⚗",fitzpatrick_scale:!1,category:"objects"},telescope:{keywords:["stars","space","zoom","science","astronomy"],char:"🔭",fitzpatrick_scale:!1,category:"objects"},microscope:{keywords:["laboratory","experiment","zoomin","science","study"],char:"🔬",fitzpatrick_scale:!1,category:"objects"},hole:{keywords:["embarrassing"],char:"🕳",fitzpatrick_scale:!1,category:"objects"},pill:{keywords:["health","medicine","doctor","pharmacy","drug"],char:"💊",fitzpatrick_scale:!1,category:"objects"},syringe:{keywords:["health","hospital","drugs","blood","medicine","needle","doctor","nurse"],char:"💉",fitzpatrick_scale:!1,category:"objects"},dna:{keywords:["biologist","genetics","life"],char:"🧬",fitzpatrick_scale:!1,category:"objects"},microbe:{keywords:["amoeba","bacteria","germs"],char:"🦠",fitzpatrick_scale:!1,category:"objects"},petri_dish:{keywords:["bacteria","biology","culture","lab"],char:"🧫",fitzpatrick_scale:!1,category:"objects"},test_tube:{keywords:["chemistry","experiment","lab","science"],char:"🧪",fitzpatrick_scale:!1,category:"objects"},thermometer:{keywords:["weather","temperature","hot","cold"],char:"🌡",fitzpatrick_scale:!1,category:"objects"},broom:{keywords:["cleaning","sweeping","witch"],char:"🧹",fitzpatrick_scale:!1,category:"objects"},basket:{keywords:["laundry"],char:"🧺",fitzpatrick_scale:!1,category:"objects"},toilet_paper:{keywords:["roll"],char:"🧻",fitzpatrick_scale:!1,category:"objects"},label:{keywords:["sale","tag"],char:"🏷",fitzpatrick_scale:!1,category:"objects"},bookmark:{keywords:["favorite","label","save"],char:"🔖",fitzpatrick_scale:!1,category:"objects"},toilet:{keywords:["restroom","wc","washroom","bathroom","potty"],char:"🚽",fitzpatrick_scale:!1,category:"objects"},shower:{keywords:["clean","water","bathroom"],char:"🚿",fitzpatrick_scale:!1,category:"objects"},bathtub:{keywords:["clean","shower","bathroom"],char:"🛁",fitzpatrick_scale:!1,category:"objects"},soap:{keywords:["bar","bathing","cleaning","lather"],char:"🧼",fitzpatrick_scale:!1,category:"objects"},sponge:{keywords:["absorbing","cleaning","porous"],char:"🧽",fitzpatrick_scale:!1,category:"objects"},lotion_bottle:{keywords:["moisturizer","sunscreen"],char:"🧴",fitzpatrick_scale:!1,category:"objects"},key:{keywords:["lock","door","password"],char:"🔑",fitzpatrick_scale:!1,category:"objects"},old_key:{keywords:["lock","door","password"],char:"🗝",fitzpatrick_scale:!1,category:"objects"},couch_and_lamp:{keywords:["read","chill"],char:"🛋",fitzpatrick_scale:!1,category:"objects"},sleeping_bed:{keywords:["bed","rest"],char:"🛌",fitzpatrick_scale:!0,category:"objects"},bed:{keywords:["sleep","rest"],char:"🛏",fitzpatrick_scale:!1,category:"objects"},door:{keywords:["house","entry","exit"],char:"🚪",fitzpatrick_scale:!1,category:"objects"},bellhop_bell:{keywords:["service"],char:"🛎",fitzpatrick_scale:!1,category:"objects"},teddy_bear:{keywords:["plush","stuffed"],char:"🧸",fitzpatrick_scale:!1,category:"objects"},framed_picture:{keywords:["photography"],char:"🖼",fitzpatrick_scale:!1,category:"objects"},world_map:{keywords:["location","direction"],char:"🗺",fitzpatrick_scale:!1,category:"objects"},parasol_on_ground:{keywords:["weather","summer"],char:"⛱",fitzpatrick_scale:!1,category:"objects"},moyai:{keywords:["rock","easter island","moai"],char:"🗿",fitzpatrick_scale:!1,category:"objects"},shopping:{keywords:["mall","buy","purchase"],char:"🛍",fitzpatrick_scale:!1,category:"objects"},shopping_cart:{keywords:["trolley"],char:"🛒",fitzpatrick_scale:!1,category:"objects"},balloon:{keywords:["party","celebration","birthday","circus"],char:"🎈",fitzpatrick_scale:!1,category:"objects"},flags:{keywords:["fish","japanese","koinobori","carp","banner"],char:"🎏",fitzpatrick_scale:!1,category:"objects"},ribbon:{keywords:["decoration","pink","girl","bowtie"],char:"🎀",fitzpatrick_scale:!1,category:"objects"},gift:{keywords:["present","birthday","christmas","xmas"],char:"🎁",fitzpatrick_scale:!1,category:"objects"},confetti_ball:{keywords:["festival","party","birthday","circus"],char:"🎊",fitzpatrick_scale:!1,category:"objects"},tada:{keywords:["party","congratulations","birthday","magic","circus","celebration"],char:"🎉",fitzpatrick_scale:!1,category:"objects"},dolls:{keywords:["japanese","toy","kimono"],char:"🎎",fitzpatrick_scale:!1,category:"objects"},wind_chime:{keywords:["nature","ding","spring","bell"],char:"🎐",fitzpatrick_scale:!1,category:"objects"},crossed_flags:{keywords:["japanese","nation","country","border"],char:"🎌",fitzpatrick_scale:!1,category:"objects"},izakaya_lantern:{keywords:["light","paper","halloween","spooky"],char:"🏮",fitzpatrick_scale:!1,category:"objects"},red_envelope:{keywords:["gift"],char:"🧧",fitzpatrick_scale:!1,category:"objects"},email:{keywords:["letter","postal","inbox","communication"],char:"✉",fitzpatrick_scale:!1,category:"objects"},envelope_with_arrow:{keywords:["email","communication"],char:"📩",fitzpatrick_scale:!1,category:"objects"},incoming_envelope:{keywords:["email","inbox"],char:"📨",fitzpatrick_scale:!1,category:"objects"},"e-mail":{keywords:["communication","inbox"],char:"📧",fitzpatrick_scale:!1,category:"objects"},love_letter:{keywords:["email","like","affection","envelope","valentines"],char:"💌",fitzpatrick_scale:!1,category:"objects"},postbox:{keywords:["email","letter","envelope"],char:"📮",fitzpatrick_scale:!1,category:"objects"},mailbox_closed:{keywords:["email","communication","inbox"],char:"📪",fitzpatrick_scale:!1,category:"objects"},mailbox:{keywords:["email","inbox","communication"],char:"📫",fitzpatrick_scale:!1,category:"objects"},mailbox_with_mail:{keywords:["email","inbox","communication"],char:"📬",fitzpatrick_scale:!1,category:"objects"},mailbox_with_no_mail:{keywords:["email","inbox"],char:"📭",fitzpatrick_scale:!1,category:"objects"},package:{keywords:["mail","gift","cardboard","box","moving"],char:"📦",fitzpatrick_scale:!1,category:"objects"},postal_horn:{keywords:["instrument","music"],char:"📯",fitzpatrick_scale:!1,category:"objects"},inbox_tray:{keywords:["email","documents"],char:"📥",fitzpatrick_scale:!1,category:"objects"},outbox_tray:{keywords:["inbox","email"],char:"📤",fitzpatrick_scale:!1,category:"objects"},scroll:{keywords:["documents","ancient","history","paper"],char:"📜",fitzpatrick_scale:!1,category:"objects"},page_with_curl:{keywords:["documents","office","paper"],char:"📃",fitzpatrick_scale:!1,category:"objects"},bookmark_tabs:{keywords:["favorite","save","order","tidy"],char:"📑",fitzpatrick_scale:!1,category:"objects"},receipt:{keywords:["accounting","expenses"],char:"🧾",fitzpatrick_scale:!1,category:"objects"},bar_chart:{keywords:["graph","presentation","stats"],char:"📊",fitzpatrick_scale:!1,category:"objects"},chart_with_upwards_trend:{keywords:["graph","presentation","stats","recovery","business","economics","money","sales","good","success"],char:"📈",fitzpatrick_scale:!1,category:"objects"},chart_with_downwards_trend:{keywords:["graph","presentation","stats","recession","business","economics","money","sales","bad","failure"],char:"📉",fitzpatrick_scale:!1,category:"objects"},page_facing_up:{keywords:["documents","office","paper","information"],char:"📄",fitzpatrick_scale:!1,category:"objects"},date:{keywords:["calendar","schedule"],char:"📅",fitzpatrick_scale:!1,category:"objects"},calendar:{keywords:["schedule","date","planning"],char:"📆",fitzpatrick_scale:!1,category:"objects"},spiral_calendar:{keywords:["date","schedule","planning"],char:"🗓",fitzpatrick_scale:!1,category:"objects"},card_index:{keywords:["business","stationery"],char:"📇",fitzpatrick_scale:!1,category:"objects"},card_file_box:{keywords:["business","stationery"],char:"🗃",fitzpatrick_scale:!1,category:"objects"},ballot_box:{keywords:["election","vote"],char:"🗳",fitzpatrick_scale:!1,category:"objects"},file_cabinet:{keywords:["filing","organizing"],char:"🗄",fitzpatrick_scale:!1,category:"objects"},clipboard:{keywords:["stationery","documents"],char:"📋",fitzpatrick_scale:!1,category:"objects"},spiral_notepad:{keywords:["memo","stationery"],char:"🗒",fitzpatrick_scale:!1,category:"objects"},file_folder:{keywords:["documents","business","office"],char:"📁",fitzpatrick_scale:!1,category:"objects"},open_file_folder:{keywords:["documents","load"],char:"📂",fitzpatrick_scale:!1,category:"objects"},card_index_dividers:{keywords:["organizing","business","stationery"],char:"🗂",fitzpatrick_scale:!1,category:"objects"},newspaper_roll:{keywords:["press","headline"],char:"🗞",fitzpatrick_scale:!1,category:"objects"},newspaper:{keywords:["press","headline"],char:"📰",fitzpatrick_scale:!1,category:"objects"},notebook:{keywords:["stationery","record","notes","paper","study"],char:"📓",fitzpatrick_scale:!1,category:"objects"},closed_book:{keywords:["read","library","knowledge","textbook","learn"],char:"📕",fitzpatrick_scale:!1,category:"objects"},green_book:{keywords:["read","library","knowledge","study"],char:"📗",fitzpatrick_scale:!1,category:"objects"},blue_book:{keywords:["read","library","knowledge","learn","study"],char:"📘",fitzpatrick_scale:!1,category:"objects"},orange_book:{keywords:["read","library","knowledge","textbook","study"],char:"📙",fitzpatrick_scale:!1,category:"objects"},notebook_with_decorative_cover:{keywords:["classroom","notes","record","paper","study"],char:"📔",fitzpatrick_scale:!1,category:"objects"},ledger:{keywords:["notes","paper"],char:"📒",fitzpatrick_scale:!1,category:"objects"},books:{keywords:["literature","library","study"],char:"📚",fitzpatrick_scale:!1,category:"objects"},open_book:{keywords:["book","read","library","knowledge","literature","learn","study"],char:"📖",fitzpatrick_scale:!1,category:"objects"},safety_pin:{keywords:["diaper"],char:"🧷",fitzpatrick_scale:!1,category:"objects"},link:{keywords:["rings","url"],char:"🔗",fitzpatrick_scale:!1,category:"objects"},paperclip:{keywords:["documents","stationery"],char:"📎",fitzpatrick_scale:!1,category:"objects"},paperclips:{keywords:["documents","stationery"],char:"🖇",fitzpatrick_scale:!1,category:"objects"},scissors:{keywords:["stationery","cut"],char:"✂",fitzpatrick_scale:!1,category:"objects"},triangular_ruler:{keywords:["stationery","math","architect","sketch"],char:"📐",fitzpatrick_scale:!1,category:"objects"},straight_ruler:{keywords:["stationery","calculate","length","math","school","drawing","architect","sketch"],char:"📏",fitzpatrick_scale:!1,category:"objects"},abacus:{keywords:["calculation"],char:"🧮",fitzpatrick_scale:!1,category:"objects"},pushpin:{keywords:["stationery","mark","here"],char:"📌",fitzpatrick_scale:!1,category:"objects"},round_pushpin:{keywords:["stationery","location","map","here"],char:"📍",fitzpatrick_scale:!1,category:"objects"},triangular_flag_on_post:{keywords:["mark","milestone","place"],char:"🚩",fitzpatrick_scale:!1,category:"objects"},white_flag:{keywords:["losing","loser","lost","surrender","give up","fail"],char:"🏳",fitzpatrick_scale:!1,category:"objects"},black_flag:{keywords:["pirate"],char:"🏴",fitzpatrick_scale:!1,category:"objects"},rainbow_flag:{keywords:["flag","rainbow","pride","gay","lgbt","glbt","queer","homosexual","lesbian","bisexual","transgender"],char:"🏳🌈",fitzpatrick_scale:!1,category:"objects"},closed_lock_with_key:{keywords:["security","privacy"],char:"🔐",fitzpatrick_scale:!1,category:"objects"},lock:{keywords:["security","password","padlock"],char:"🔒",fitzpatrick_scale:!1,category:"objects"},unlock:{keywords:["privacy","security"],char:"🔓",fitzpatrick_scale:!1,category:"objects"},lock_with_ink_pen:{keywords:["security","secret"],char:"🔏",fitzpatrick_scale:!1,category:"objects"},pen:{keywords:["stationery","writing","write"],char:"🖊",fitzpatrick_scale:!1,category:"objects"},fountain_pen:{keywords:["stationery","writing","write"],char:"🖋",fitzpatrick_scale:!1,category:"objects"},black_nib:{keywords:["pen","stationery","writing","write"],char:"✒",fitzpatrick_scale:!1,category:"objects"},memo:{keywords:["write","documents","stationery","pencil","paper","writing","legal","exam","quiz","test","study","compose"],char:"📝",fitzpatrick_scale:!1,category:"objects"},pencil2:{keywords:["stationery","write","paper","writing","school","study"],char:"✏",fitzpatrick_scale:!1,category:"objects"},crayon:{keywords:["drawing","creativity"],char:"🖍",fitzpatrick_scale:!1,category:"objects"},paintbrush:{keywords:["drawing","creativity","art"],char:"🖌",fitzpatrick_scale:!1,category:"objects"},mag:{keywords:["search","zoom","find","detective"],char:"🔍",fitzpatrick_scale:!1,category:"objects"},mag_right:{keywords:["search","zoom","find","detective"],char:"🔎",fitzpatrick_scale:!1,category:"objects"},heart:{keywords:["love","like","valentines"],char:"❤",fitzpatrick_scale:!1,category:"symbols"},orange_heart:{keywords:["love","like","affection","valentines"],char:"🧡",fitzpatrick_scale:!1,category:"symbols"},yellow_heart:{keywords:["love","like","affection","valentines"],char:"💛",fitzpatrick_scale:!1,category:"symbols"},green_heart:{keywords:["love","like","affection","valentines"],char:"💚",fitzpatrick_scale:!1,category:"symbols"},blue_heart:{keywords:["love","like","affection","valentines"],char:"💙",fitzpatrick_scale:!1,category:"symbols"},purple_heart:{keywords:["love","like","affection","valentines"],char:"💜",fitzpatrick_scale:!1,category:"symbols"},black_heart:{keywords:["evil"],char:"🖤",fitzpatrick_scale:!1,category:"symbols"},broken_heart:{keywords:["sad","sorry","break","heart","heartbreak"],char:"💔",fitzpatrick_scale:!1,category:"symbols"},heavy_heart_exclamation:{keywords:["decoration","love"],char:"❣",fitzpatrick_scale:!1,category:"symbols"},two_hearts:{keywords:["love","like","affection","valentines","heart"],char:"💕",fitzpatrick_scale:!1,category:"symbols"},revolving_hearts:{keywords:["love","like","affection","valentines"],char:"💞",fitzpatrick_scale:!1,category:"symbols"},heartbeat:{keywords:["love","like","affection","valentines","pink","heart"],char:"💓",fitzpatrick_scale:!1,category:"symbols"},heartpulse:{keywords:["like","love","affection","valentines","pink"],char:"💗",fitzpatrick_scale:!1,category:"symbols"},sparkling_heart:{keywords:["love","like","affection","valentines"],char:"💖",fitzpatrick_scale:!1,category:"symbols"},cupid:{keywords:["love","like","heart","affection","valentines"],char:"💘",fitzpatrick_scale:!1,category:"symbols"},gift_heart:{keywords:["love","valentines"],char:"💝",fitzpatrick_scale:!1,category:"symbols"},heart_decoration:{keywords:["purple-square","love","like"],char:"💟",fitzpatrick_scale:!1,category:"symbols"},peace_symbol:{keywords:["hippie"],char:"☮",fitzpatrick_scale:!1,category:"symbols"},latin_cross:{keywords:["christianity"],char:"✝",fitzpatrick_scale:!1,category:"symbols"},star_and_crescent:{keywords:["islam"],char:"☪",fitzpatrick_scale:!1,category:"symbols"},om:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"🕉",fitzpatrick_scale:!1,category:"symbols"},wheel_of_dharma:{keywords:["hinduism","buddhism","sikhism","jainism"],char:"☸",fitzpatrick_scale:!1,category:"symbols"},star_of_david:{keywords:["judaism"],char:"✡",fitzpatrick_scale:!1,category:"symbols"},six_pointed_star:{keywords:["purple-square","religion","jewish","hexagram"],char:"🔯",fitzpatrick_scale:!1,category:"symbols"},menorah:{keywords:["hanukkah","candles","jewish"],char:"🕎",fitzpatrick_scale:!1,category:"symbols"},yin_yang:{keywords:["balance"],char:"☯",fitzpatrick_scale:!1,category:"symbols"},orthodox_cross:{keywords:["suppedaneum","religion"],char:"☦",fitzpatrick_scale:!1,category:"symbols"},place_of_worship:{keywords:["religion","church","temple","prayer"],char:"🛐",fitzpatrick_scale:!1,category:"symbols"},ophiuchus:{keywords:["sign","purple-square","constellation","astrology"],char:"⛎",fitzpatrick_scale:!1,category:"symbols"},aries:{keywords:["sign","purple-square","zodiac","astrology"],char:"♈",fitzpatrick_scale:!1,category:"symbols"},taurus:{keywords:["purple-square","sign","zodiac","astrology"],char:"♉",fitzpatrick_scale:!1,category:"symbols"},gemini:{keywords:["sign","zodiac","purple-square","astrology"],char:"♊",fitzpatrick_scale:!1,category:"symbols"},cancer:{keywords:["sign","zodiac","purple-square","astrology"],char:"♋",fitzpatrick_scale:!1,category:"symbols"},leo:{keywords:["sign","purple-square","zodiac","astrology"],char:"♌",fitzpatrick_scale:!1,category:"symbols"},virgo:{keywords:["sign","zodiac","purple-square","astrology"],char:"♍",fitzpatrick_scale:!1,category:"symbols"},libra:{keywords:["sign","purple-square","zodiac","astrology"],char:"♎",fitzpatrick_scale:!1,category:"symbols"},scorpius:{keywords:["sign","zodiac","purple-square","astrology","scorpio"],char:"♏",fitzpatrick_scale:!1,category:"symbols"},sagittarius:{keywords:["sign","zodiac","purple-square","astrology"],char:"♐",fitzpatrick_scale:!1,category:"symbols"},capricorn:{keywords:["sign","zodiac","purple-square","astrology"],char:"♑",fitzpatrick_scale:!1,category:"symbols"},aquarius:{keywords:["sign","purple-square","zodiac","astrology"],char:"♒",fitzpatrick_scale:!1,category:"symbols"},pisces:{keywords:["purple-square","sign","zodiac","astrology"],char:"♓",fitzpatrick_scale:!1,category:"symbols"},id:{keywords:["purple-square","words"],char:"🆔",fitzpatrick_scale:!1,category:"symbols"},atom_symbol:{keywords:["science","physics","chemistry"],char:"⚛",fitzpatrick_scale:!1,category:"symbols"},u7a7a:{keywords:["kanji","japanese","chinese","empty","sky","blue-square"],char:"🈳",fitzpatrick_scale:!1,category:"symbols"},u5272:{keywords:["cut","divide","chinese","kanji","pink-square"],char:"🈹",fitzpatrick_scale:!1,category:"symbols"},radioactive:{keywords:["nuclear","danger"],char:"☢",fitzpatrick_scale:!1,category:"symbols"},biohazard:{keywords:["danger"],char:"☣",fitzpatrick_scale:!1,category:"symbols"},mobile_phone_off:{keywords:["mute","orange-square","silence","quiet"],char:"📴",fitzpatrick_scale:!1,category:"symbols"},vibration_mode:{keywords:["orange-square","phone"],char:"📳",fitzpatrick_scale:!1,category:"symbols"},u6709:{keywords:["orange-square","chinese","have","kanji"],char:"🈶",fitzpatrick_scale:!1,category:"symbols"},u7121:{keywords:["nothing","chinese","kanji","japanese","orange-square"],char:"🈚",fitzpatrick_scale:!1,category:"symbols"},u7533:{keywords:["chinese","japanese","kanji","orange-square"],char:"🈸",fitzpatrick_scale:!1,category:"symbols"},u55b6:{keywords:["japanese","opening hours","orange-square"],char:"🈺",fitzpatrick_scale:!1,category:"symbols"},u6708:{keywords:["chinese","month","moon","japanese","orange-square","kanji"],char:"🈷",fitzpatrick_scale:!1,category:"symbols"},eight_pointed_black_star:{keywords:["orange-square","shape","polygon"],char:"✴",fitzpatrick_scale:!1,category:"symbols"},vs:{keywords:["words","orange-square"],char:"🆚",fitzpatrick_scale:!1,category:"symbols"},accept:{keywords:["ok","good","chinese","kanji","agree","yes","orange-circle"],char:"🉑",fitzpatrick_scale:!1,category:"symbols"},white_flower:{keywords:["japanese","spring"],char:"💮",fitzpatrick_scale:!1,category:"symbols"},ideograph_advantage:{keywords:["chinese","kanji","obtain","get","circle"],char:"🉐",fitzpatrick_scale:!1,category:"symbols"},secret:{keywords:["privacy","chinese","sshh","kanji","red-circle"],char:"㊙",fitzpatrick_scale:!1,category:"symbols"},congratulations:{keywords:["chinese","kanji","japanese","red-circle"],char:"㊗",fitzpatrick_scale:!1,category:"symbols"},u5408:{keywords:["japanese","chinese","join","kanji","red-square"],char:"🈴",fitzpatrick_scale:!1,category:"symbols"},u6e80:{keywords:["full","chinese","japanese","red-square","kanji"],char:"🈵",fitzpatrick_scale:!1,category:"symbols"},u7981:{keywords:["kanji","japanese","chinese","forbidden","limit","restricted","red-square"],char:"🈲",fitzpatrick_scale:!1,category:"symbols"},a:{keywords:["red-square","alphabet","letter"],char:"🅰",fitzpatrick_scale:!1,category:"symbols"},b:{keywords:["red-square","alphabet","letter"],char:"🅱",fitzpatrick_scale:!1,category:"symbols"},ab:{keywords:["red-square","alphabet"],char:"🆎",fitzpatrick_scale:!1,category:"symbols"},cl:{keywords:["alphabet","words","red-square"],char:"🆑",fitzpatrick_scale:!1,category:"symbols"},o2:{keywords:["alphabet","red-square","letter"],char:"🅾",fitzpatrick_scale:!1,category:"symbols"},sos:{keywords:["help","red-square","words","emergency","911"],char:"🆘",fitzpatrick_scale:!1,category:"symbols"},no_entry:{keywords:["limit","security","privacy","bad","denied","stop","circle"],char:"⛔",fitzpatrick_scale:!1,category:"symbols"},name_badge:{keywords:["fire","forbid"],char:"📛",fitzpatrick_scale:!1,category:"symbols"},no_entry_sign:{keywords:["forbid","stop","limit","denied","disallow","circle"],char:"🚫",fitzpatrick_scale:!1,category:"symbols"},x:{keywords:["no","delete","remove","cancel","red"],char:"❌",fitzpatrick_scale:!1,category:"symbols"},o:{keywords:["circle","round"],char:"⭕",fitzpatrick_scale:!1,category:"symbols"},stop_sign:{keywords:["stop"],char:"🛑",fitzpatrick_scale:!1,category:"symbols"},anger:{keywords:["angry","mad"],char:"💢",fitzpatrick_scale:!1,category:"symbols"},hotsprings:{keywords:["bath","warm","relax"],char:"♨",fitzpatrick_scale:!1,category:"symbols"},no_pedestrians:{keywords:["rules","crossing","walking","circle"],char:"🚷",fitzpatrick_scale:!1,category:"symbols"},do_not_litter:{keywords:["trash","bin","garbage","circle"],char:"🚯",fitzpatrick_scale:!1,category:"symbols"},no_bicycles:{keywords:["cyclist","prohibited","circle"],char:"🚳",fitzpatrick_scale:!1,category:"symbols"},"non-potable_water":{keywords:["drink","faucet","tap","circle"],char:"🚱",fitzpatrick_scale:!1,category:"symbols"},underage:{keywords:["18","drink","pub","night","minor","circle"],char:"🔞",fitzpatrick_scale:!1,category:"symbols"},no_mobile_phones:{keywords:["iphone","mute","circle"],char:"📵",fitzpatrick_scale:!1,category:"symbols"},exclamation:{keywords:["heavy_exclamation_mark","danger","surprise","punctuation","wow","warning"],char:"❗",fitzpatrick_scale:!1,category:"symbols"},grey_exclamation:{keywords:["surprise","punctuation","gray","wow","warning"],char:"❕",fitzpatrick_scale:!1,category:"symbols"},question:{keywords:["doubt","confused"],char:"❓",fitzpatrick_scale:!1,category:"symbols"},grey_question:{keywords:["doubts","gray","huh","confused"],char:"❔",fitzpatrick_scale:!1,category:"symbols"},bangbang:{keywords:["exclamation","surprise"],char:"‼",fitzpatrick_scale:!1,category:"symbols"},interrobang:{keywords:["wat","punctuation","surprise"],char:"⁉",fitzpatrick_scale:!1,category:"symbols"},100:{keywords:["score","perfect","numbers","century","exam","quiz","test","pass","hundred"],char:"💯",fitzpatrick_scale:!1,category:"symbols"},low_brightness:{keywords:["sun","afternoon","warm","summer"],char:"🔅",fitzpatrick_scale:!1,category:"symbols"},high_brightness:{keywords:["sun","light"],char:"🔆",fitzpatrick_scale:!1,category:"symbols"},trident:{keywords:["weapon","spear"],char:"🔱",fitzpatrick_scale:!1,category:"symbols"},fleur_de_lis:{keywords:["decorative","scout"],char:"⚜",fitzpatrick_scale:!1,category:"symbols"},part_alternation_mark:{keywords:["graph","presentation","stats","business","economics","bad"],char:"〽",fitzpatrick_scale:!1,category:"symbols"},warning:{keywords:["exclamation","wip","alert","error","problem","issue"],char:"⚠",fitzpatrick_scale:!1,category:"symbols"},children_crossing:{keywords:["school","warning","danger","sign","driving","yellow-diamond"],char:"🚸",fitzpatrick_scale:!1,category:"symbols"},beginner:{keywords:["badge","shield"],char:"🔰",fitzpatrick_scale:!1,category:"symbols"},recycle:{keywords:["arrow","environment","garbage","trash"],char:"♻",fitzpatrick_scale:!1,category:"symbols"},u6307:{keywords:["chinese","point","green-square","kanji"],char:"🈯",fitzpatrick_scale:!1,category:"symbols"},chart:{keywords:["green-square","graph","presentation","stats"],char:"💹",fitzpatrick_scale:!1,category:"symbols"},sparkle:{keywords:["stars","green-square","awesome","good","fireworks"],char:"❇",fitzpatrick_scale:!1,category:"symbols"},eight_spoked_asterisk:{keywords:["star","sparkle","green-square"],char:"✳",fitzpatrick_scale:!1,category:"symbols"},negative_squared_cross_mark:{keywords:["x","green-square","no","deny"],char:"❎",fitzpatrick_scale:!1,category:"symbols"},white_check_mark:{keywords:["green-square","ok","agree","vote","election","answer","tick"],char:"✅",fitzpatrick_scale:!1,category:"symbols"},diamond_shape_with_a_dot_inside:{keywords:["jewel","blue","gem","crystal","fancy"],char:"💠",fitzpatrick_scale:!1,category:"symbols"},cyclone:{keywords:["weather","swirl","blue","cloud","vortex","spiral","whirlpool","spin","tornado","hurricane","typhoon"],char:"🌀",fitzpatrick_scale:!1,category:"symbols"},loop:{keywords:["tape","cassette"],char:"➿",fitzpatrick_scale:!1,category:"symbols"},globe_with_meridians:{keywords:["earth","international","world","internet","interweb","i18n"],char:"🌐",fitzpatrick_scale:!1,category:"symbols"},m:{keywords:["alphabet","blue-circle","letter"],char:"Ⓜ",fitzpatrick_scale:!1,category:"symbols"},atm:{keywords:["money","sales","cash","blue-square","payment","bank"],char:"🏧",fitzpatrick_scale:!1,category:"symbols"},sa:{keywords:["japanese","blue-square","katakana"],char:"🈂",fitzpatrick_scale:!1,category:"symbols"},passport_control:{keywords:["custom","blue-square"],char:"🛂",fitzpatrick_scale:!1,category:"symbols"},customs:{keywords:["passport","border","blue-square"],char:"🛃",fitzpatrick_scale:!1,category:"symbols"},baggage_claim:{keywords:["blue-square","airport","transport"],char:"🛄",fitzpatrick_scale:!1,category:"symbols"},left_luggage:{keywords:["blue-square","travel"],char:"🛅",fitzpatrick_scale:!1,category:"symbols"},wheelchair:{keywords:["blue-square","disabled","a11y","accessibility"],char:"♿",fitzpatrick_scale:!1,category:"symbols"},no_smoking:{keywords:["cigarette","blue-square","smell","smoke"],char:"🚭",fitzpatrick_scale:!1,category:"symbols"},wc:{keywords:["toilet","restroom","blue-square"],char:"🚾",fitzpatrick_scale:!1,category:"symbols"},parking:{keywords:["cars","blue-square","alphabet","letter"],char:"🅿",fitzpatrick_scale:!1,category:"symbols"},potable_water:{keywords:["blue-square","liquid","restroom","cleaning","faucet"],char:"🚰",fitzpatrick_scale:!1,category:"symbols"},mens:{keywords:["toilet","restroom","wc","blue-square","gender","male"],char:"🚹",fitzpatrick_scale:!1,category:"symbols"},womens:{keywords:["purple-square","woman","female","toilet","loo","restroom","gender"],char:"🚺",fitzpatrick_scale:!1,category:"symbols"},baby_symbol:{keywords:["orange-square","child"],char:"🚼",fitzpatrick_scale:!1,category:"symbols"},restroom:{keywords:["blue-square","toilet","refresh","wc","gender"],char:"🚻",fitzpatrick_scale:!1,category:"symbols"},put_litter_in_its_place:{keywords:["blue-square","sign","human","info"],char:"🚮",fitzpatrick_scale:!1,category:"symbols"},cinema:{keywords:["blue-square","record","film","movie","curtain","stage","theater"],char:"🎦",fitzpatrick_scale:!1,category:"symbols"},signal_strength:{keywords:["blue-square","reception","phone","internet","connection","wifi","bluetooth","bars"],char:"📶",fitzpatrick_scale:!1,category:"symbols"},koko:{keywords:["blue-square","here","katakana","japanese","destination"],char:"🈁",fitzpatrick_scale:!1,category:"symbols"},ng:{keywords:["blue-square","words","shape","icon"],char:"🆖",fitzpatrick_scale:!1,category:"symbols"},ok:{keywords:["good","agree","yes","blue-square"],char:"🆗",fitzpatrick_scale:!1,category:"symbols"},up:{keywords:["blue-square","above","high"],char:"🆙",fitzpatrick_scale:!1,category:"symbols"},cool:{keywords:["words","blue-square"],char:"🆒",fitzpatrick_scale:!1,category:"symbols"},new:{keywords:["blue-square","words","start"],char:"🆕",fitzpatrick_scale:!1,category:"symbols"},free:{keywords:["blue-square","words"],char:"🆓",fitzpatrick_scale:!1,category:"symbols"},zero:{keywords:["0","numbers","blue-square","null"],char:"0",fitzpatrick_scale:!1,category:"symbols"},one:{keywords:["blue-square","numbers","1"],char:"1",fitzpatrick_scale:!1,category:"symbols"},two:{keywords:["numbers","2","prime","blue-square"],char:"2",fitzpatrick_scale:!1,category:"symbols"},three:{keywords:["3","numbers","prime","blue-square"],char:"3",fitzpatrick_scale:!1,category:"symbols"},four:{keywords:["4","numbers","blue-square"],char:"4",fitzpatrick_scale:!1,category:"symbols"},five:{keywords:["5","numbers","blue-square","prime"],char:"5",fitzpatrick_scale:!1,category:"symbols"},six:{keywords:["6","numbers","blue-square"],char:"6",fitzpatrick_scale:!1,category:"symbols"},seven:{keywords:["7","numbers","blue-square","prime"],char:"7",fitzpatrick_scale:!1,category:"symbols"},eight:{keywords:["8","blue-square","numbers"],char:"8",fitzpatrick_scale:!1,category:"symbols"},nine:{keywords:["blue-square","numbers","9"],char:"9",fitzpatrick_scale:!1,category:"symbols"},keycap_ten:{keywords:["numbers","10","blue-square"],char:"🔟",fitzpatrick_scale:!1,category:"symbols"},asterisk:{keywords:["star","keycap"],char:"*",fitzpatrick_scale:!1,category:"symbols"},1234:{keywords:["numbers","blue-square"],char:"🔢",fitzpatrick_scale:!1,category:"symbols"},eject_button:{keywords:["blue-square"],char:"⏏",fitzpatrick_scale:!1,category:"symbols"},arrow_forward:{keywords:["blue-square","right","direction","play"],char:"▶",fitzpatrick_scale:!1,category:"symbols"},pause_button:{keywords:["pause","blue-square"],char:"⏸",fitzpatrick_scale:!1,category:"symbols"},next_track_button:{keywords:["forward","next","blue-square"],char:"⏭",fitzpatrick_scale:!1,category:"symbols"},stop_button:{keywords:["blue-square"],char:"⏹",fitzpatrick_scale:!1,category:"symbols"},record_button:{keywords:["blue-square"],char:"⏺",fitzpatrick_scale:!1,category:"symbols"},play_or_pause_button:{keywords:["blue-square","play","pause"],char:"⏯",fitzpatrick_scale:!1,category:"symbols"},previous_track_button:{keywords:["backward"],char:"⏮",fitzpatrick_scale:!1,category:"symbols"},fast_forward:{keywords:["blue-square","play","speed","continue"],char:"⏩",fitzpatrick_scale:!1,category:"symbols"},rewind:{keywords:["play","blue-square"],char:"⏪",fitzpatrick_scale:!1,category:"symbols"},twisted_rightwards_arrows:{keywords:["blue-square","shuffle","music","random"],char:"🔀",fitzpatrick_scale:!1,category:"symbols"},repeat:{keywords:["loop","record"],char:"🔁",fitzpatrick_scale:!1,category:"symbols"},repeat_one:{keywords:["blue-square","loop"],char:"🔂",fitzpatrick_scale:!1,category:"symbols"},arrow_backward:{keywords:["blue-square","left","direction"],char:"◀",fitzpatrick_scale:!1,category:"symbols"},arrow_up_small:{keywords:["blue-square","triangle","direction","point","forward","top"],char:"🔼",fitzpatrick_scale:!1,category:"symbols"},arrow_down_small:{keywords:["blue-square","direction","bottom"],char:"🔽",fitzpatrick_scale:!1,category:"symbols"},arrow_double_up:{keywords:["blue-square","direction","top"],char:"⏫",fitzpatrick_scale:!1,category:"symbols"},arrow_double_down:{keywords:["blue-square","direction","bottom"],char:"⏬",fitzpatrick_scale:!1,category:"symbols"},arrow_right:{keywords:["blue-square","next"],char:"➡",fitzpatrick_scale:!1,category:"symbols"},arrow_left:{keywords:["blue-square","previous","back"],char:"⬅",fitzpatrick_scale:!1,category:"symbols"},arrow_up:{keywords:["blue-square","continue","top","direction"],char:"⬆",fitzpatrick_scale:!1,category:"symbols"},arrow_down:{keywords:["blue-square","direction","bottom"],char:"⬇",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_right:{keywords:["blue-square","point","direction","diagonal","northeast"],char:"↗",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_right:{keywords:["blue-square","direction","diagonal","southeast"],char:"↘",fitzpatrick_scale:!1,category:"symbols"},arrow_lower_left:{keywords:["blue-square","direction","diagonal","southwest"],char:"↙",fitzpatrick_scale:!1,category:"symbols"},arrow_upper_left:{keywords:["blue-square","point","direction","diagonal","northwest"],char:"↖",fitzpatrick_scale:!1,category:"symbols"},arrow_up_down:{keywords:["blue-square","direction","way","vertical"],char:"↕",fitzpatrick_scale:!1,category:"symbols"},left_right_arrow:{keywords:["shape","direction","horizontal","sideways"],char:"↔",fitzpatrick_scale:!1,category:"symbols"},arrows_counterclockwise:{keywords:["blue-square","sync","cycle"],char:"🔄",fitzpatrick_scale:!1,category:"symbols"},arrow_right_hook:{keywords:["blue-square","return","rotate","direction"],char:"↪",fitzpatrick_scale:!1,category:"symbols"},leftwards_arrow_with_hook:{keywords:["back","return","blue-square","undo","enter"],char:"↩",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_up:{keywords:["blue-square","direction","top"],char:"⤴",fitzpatrick_scale:!1,category:"symbols"},arrow_heading_down:{keywords:["blue-square","direction","bottom"],char:"⤵",fitzpatrick_scale:!1,category:"symbols"},hash:{keywords:["symbol","blue-square","twitter"],char:"#",fitzpatrick_scale:!1,category:"symbols"},information_source:{keywords:["blue-square","alphabet","letter"],char:"ℹ",fitzpatrick_scale:!1,category:"symbols"},abc:{keywords:["blue-square","alphabet"],char:"🔤",fitzpatrick_scale:!1,category:"symbols"},abcd:{keywords:["blue-square","alphabet"],char:"🔡",fitzpatrick_scale:!1,category:"symbols"},capital_abcd:{keywords:["alphabet","words","blue-square"],char:"🔠",fitzpatrick_scale:!1,category:"symbols"},symbols:{keywords:["blue-square","music","note","ampersand","percent","glyphs","characters"],char:"🔣",fitzpatrick_scale:!1,category:"symbols"},musical_note:{keywords:["score","tone","sound"],char:"🎵",fitzpatrick_scale:!1,category:"symbols"},notes:{keywords:["music","score"],char:"🎶",fitzpatrick_scale:!1,category:"symbols"},wavy_dash:{keywords:["draw","line","moustache","mustache","squiggle","scribble"],char:"〰",fitzpatrick_scale:!1,category:"symbols"},curly_loop:{keywords:["scribble","draw","shape","squiggle"],char:"➰",fitzpatrick_scale:!1,category:"symbols"},heavy_check_mark:{keywords:["ok","nike","answer","yes","tick"],char:"✔",fitzpatrick_scale:!1,category:"symbols"},arrows_clockwise:{keywords:["sync","cycle","round","repeat"],char:"🔃",fitzpatrick_scale:!1,category:"symbols"},heavy_plus_sign:{keywords:["math","calculation","addition","more","increase"],char:"➕",fitzpatrick_scale:!1,category:"symbols"},heavy_minus_sign:{keywords:["math","calculation","subtract","less"],char:"➖",fitzpatrick_scale:!1,category:"symbols"},heavy_division_sign:{keywords:["divide","math","calculation"],char:"➗",fitzpatrick_scale:!1,category:"symbols"},heavy_multiplication_x:{keywords:["math","calculation"],char:"✖",fitzpatrick_scale:!1,category:"symbols"},infinity:{keywords:["forever"],char:"♾",fitzpatrick_scale:!1,category:"symbols"},heavy_dollar_sign:{keywords:["money","sales","payment","currency","buck"],char:"💲",fitzpatrick_scale:!1,category:"symbols"},currency_exchange:{keywords:["money","sales","dollar","travel"],char:"💱",fitzpatrick_scale:!1,category:"symbols"},copyright:{keywords:["ip","license","circle","law","legal"],char:"©",fitzpatrick_scale:!1,category:"symbols"},registered:{keywords:["alphabet","circle"],char:"®",fitzpatrick_scale:!1,category:"symbols"},tm:{keywords:["trademark","brand","law","legal"],char:"™",fitzpatrick_scale:!1,category:"symbols"},end:{keywords:["words","arrow"],char:"🔚",fitzpatrick_scale:!1,category:"symbols"},back:{keywords:["arrow","words","return"],char:"🔙",fitzpatrick_scale:!1,category:"symbols"},on:{keywords:["arrow","words"],char:"🔛",fitzpatrick_scale:!1,category:"symbols"},top:{keywords:["words","blue-square"],char:"🔝",fitzpatrick_scale:!1,category:"symbols"},soon:{keywords:["arrow","words"],char:"🔜",fitzpatrick_scale:!1,category:"symbols"},ballot_box_with_check:{keywords:["ok","agree","confirm","black-square","vote","election","yes","tick"],char:"☑",fitzpatrick_scale:!1,category:"symbols"},radio_button:{keywords:["input","old","music","circle"],char:"🔘",fitzpatrick_scale:!1,category:"symbols"},white_circle:{keywords:["shape","round"],char:"⚪",fitzpatrick_scale:!1,category:"symbols"},black_circle:{keywords:["shape","button","round"],char:"⚫",fitzpatrick_scale:!1,category:"symbols"},red_circle:{keywords:["shape","error","danger"],char:"🔴",fitzpatrick_scale:!1,category:"symbols"},large_blue_circle:{keywords:["shape","icon","button"],char:"🔵",fitzpatrick_scale:!1,category:"symbols"},small_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔸",fitzpatrick_scale:!1,category:"symbols"},small_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔹",fitzpatrick_scale:!1,category:"symbols"},large_orange_diamond:{keywords:["shape","jewel","gem"],char:"🔶",fitzpatrick_scale:!1,category:"symbols"},large_blue_diamond:{keywords:["shape","jewel","gem"],char:"🔷",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle:{keywords:["shape","direction","up","top"],char:"🔺",fitzpatrick_scale:!1,category:"symbols"},black_small_square:{keywords:["shape","icon"],char:"▪",fitzpatrick_scale:!1,category:"symbols"},white_small_square:{keywords:["shape","icon"],char:"▫",fitzpatrick_scale:!1,category:"symbols"},black_large_square:{keywords:["shape","icon","button"],char:"⬛",fitzpatrick_scale:!1,category:"symbols"},white_large_square:{keywords:["shape","icon","stone","button"],char:"⬜",fitzpatrick_scale:!1,category:"symbols"},small_red_triangle_down:{keywords:["shape","direction","bottom"],char:"🔻",fitzpatrick_scale:!1,category:"symbols"},black_medium_square:{keywords:["shape","button","icon"],char:"◼",fitzpatrick_scale:!1,category:"symbols"},white_medium_square:{keywords:["shape","stone","icon"],char:"◻",fitzpatrick_scale:!1,category:"symbols"},black_medium_small_square:{keywords:["icon","shape","button"],char:"◾",fitzpatrick_scale:!1,category:"symbols"},white_medium_small_square:{keywords:["shape","stone","icon","button"],char:"◽",fitzpatrick_scale:!1,category:"symbols"},black_square_button:{keywords:["shape","input","frame"],char:"🔲",fitzpatrick_scale:!1,category:"symbols"},white_square_button:{keywords:["shape","input"],char:"🔳",fitzpatrick_scale:!1,category:"symbols"},speaker:{keywords:["sound","volume","silence","broadcast"],char:"🔈",fitzpatrick_scale:!1,category:"symbols"},sound:{keywords:["volume","speaker","broadcast"],char:"🔉",fitzpatrick_scale:!1,category:"symbols"},loud_sound:{keywords:["volume","noise","noisy","speaker","broadcast"],char:"🔊",fitzpatrick_scale:!1,category:"symbols"},mute:{keywords:["sound","volume","silence","quiet"],char:"🔇",fitzpatrick_scale:!1,category:"symbols"},mega:{keywords:["sound","speaker","volume"],char:"📣",fitzpatrick_scale:!1,category:"symbols"},loudspeaker:{keywords:["volume","sound"],char:"📢",fitzpatrick_scale:!1,category:"symbols"},bell:{keywords:["sound","notification","christmas","xmas","chime"],char:"🔔",fitzpatrick_scale:!1,category:"symbols"},no_bell:{keywords:["sound","volume","mute","quiet","silent"],char:"🔕",fitzpatrick_scale:!1,category:"symbols"},black_joker:{keywords:["poker","cards","game","play","magic"],char:"🃏",fitzpatrick_scale:!1,category:"symbols"},mahjong:{keywords:["game","play","chinese","kanji"],char:"🀄",fitzpatrick_scale:!1,category:"symbols"},spades:{keywords:["poker","cards","suits","magic"],char:"♠",fitzpatrick_scale:!1,category:"symbols"},clubs:{keywords:["poker","cards","magic","suits"],char:"♣",fitzpatrick_scale:!1,category:"symbols"},hearts:{keywords:["poker","cards","magic","suits"],char:"♥",fitzpatrick_scale:!1,category:"symbols"},diamonds:{keywords:["poker","cards","magic","suits"],char:"♦",fitzpatrick_scale:!1,category:"symbols"},flower_playing_cards:{keywords:["game","sunset","red"],char:"🎴",fitzpatrick_scale:!1,category:"symbols"},thought_balloon:{keywords:["bubble","cloud","speech","thinking","dream"],char:"💭",fitzpatrick_scale:!1,category:"symbols"},right_anger_bubble:{keywords:["caption","speech","thinking","mad"],char:"🗯",fitzpatrick_scale:!1,category:"symbols"},speech_balloon:{keywords:["bubble","words","message","talk","chatting"],char:"💬",fitzpatrick_scale:!1,category:"symbols"},left_speech_bubble:{keywords:["words","message","talk","chatting"],char:"🗨",fitzpatrick_scale:!1,category:"symbols"},clock1:{keywords:["time","late","early","schedule"],char:"🕐",fitzpatrick_scale:!1,category:"symbols"},clock2:{keywords:["time","late","early","schedule"],char:"🕑",fitzpatrick_scale:!1,category:"symbols"},clock3:{keywords:["time","late","early","schedule"],char:"🕒",fitzpatrick_scale:!1,category:"symbols"},clock4:{keywords:["time","late","early","schedule"],char:"🕓",fitzpatrick_scale:!1,category:"symbols"},clock5:{keywords:["time","late","early","schedule"],char:"🕔",fitzpatrick_scale:!1,category:"symbols"},clock6:{keywords:["time","late","early","schedule","dawn","dusk"],char:"🕕",fitzpatrick_scale:!1,category:"symbols"},clock7:{keywords:["time","late","early","schedule"],char:"🕖",fitzpatrick_scale:!1,category:"symbols"},clock8:{keywords:["time","late","early","schedule"],char:"🕗",fitzpatrick_scale:!1,category:"symbols"},clock9:{keywords:["time","late","early","schedule"],char:"🕘",fitzpatrick_scale:!1,category:"symbols"},clock10:{keywords:["time","late","early","schedule"],char:"🕙",fitzpatrick_scale:!1,category:"symbols"},clock11:{keywords:["time","late","early","schedule"],char:"🕚",fitzpatrick_scale:!1,category:"symbols"},clock12:{keywords:["time","noon","midnight","midday","late","early","schedule"],char:"🕛",fitzpatrick_scale:!1,category:"symbols"},clock130:{keywords:["time","late","early","schedule"],char:"🕜",fitzpatrick_scale:!1,category:"symbols"},clock230:{keywords:["time","late","early","schedule"],char:"🕝",fitzpatrick_scale:!1,category:"symbols"},clock330:{keywords:["time","late","early","schedule"],char:"🕞",fitzpatrick_scale:!1,category:"symbols"},clock430:{keywords:["time","late","early","schedule"],char:"🕟",fitzpatrick_scale:!1,category:"symbols"},clock530:{keywords:["time","late","early","schedule"],char:"🕠",fitzpatrick_scale:!1,category:"symbols"},clock630:{keywords:["time","late","early","schedule"],char:"🕡",fitzpatrick_scale:!1,category:"symbols"},clock730:{keywords:["time","late","early","schedule"],char:"🕢",fitzpatrick_scale:!1,category:"symbols"},clock830:{keywords:["time","late","early","schedule"],char:"🕣",fitzpatrick_scale:!1,category:"symbols"},clock930:{keywords:["time","late","early","schedule"],char:"🕤",fitzpatrick_scale:!1,category:"symbols"},clock1030:{keywords:["time","late","early","schedule"],char:"🕥",fitzpatrick_scale:!1,category:"symbols"},clock1130:{keywords:["time","late","early","schedule"],char:"🕦",fitzpatrick_scale:!1,category:"symbols"},clock1230:{keywords:["time","late","early","schedule"],char:"🕧",fitzpatrick_scale:!1,category:"symbols"},afghanistan:{keywords:["af","flag","nation","country","banner"],char:"🇦🇫",fitzpatrick_scale:!1,category:"flags"},aland_islands:{keywords:["Åland","islands","flag","nation","country","banner"],char:"🇦🇽",fitzpatrick_scale:!1,category:"flags"},albania:{keywords:["al","flag","nation","country","banner"],char:"🇦🇱",fitzpatrick_scale:!1,category:"flags"},algeria:{keywords:["dz","flag","nation","country","banner"],char:"🇩🇿",fitzpatrick_scale:!1,category:"flags"},american_samoa:{keywords:["american","ws","flag","nation","country","banner"],char:"🇦🇸",fitzpatrick_scale:!1,category:"flags"},andorra:{keywords:["ad","flag","nation","country","banner"],char:"🇦🇩",fitzpatrick_scale:!1,category:"flags"},angola:{keywords:["ao","flag","nation","country","banner"],char:"🇦🇴",fitzpatrick_scale:!1,category:"flags"},anguilla:{keywords:["ai","flag","nation","country","banner"],char:"🇦🇮",fitzpatrick_scale:!1,category:"flags"},antarctica:{keywords:["aq","flag","nation","country","banner"],char:"🇦🇶",fitzpatrick_scale:!1,category:"flags"},antigua_barbuda:{keywords:["antigua","barbuda","flag","nation","country","banner"],char:"🇦🇬",fitzpatrick_scale:!1,category:"flags"},argentina:{keywords:["ar","flag","nation","country","banner"],char:"🇦🇷",fitzpatrick_scale:!1,category:"flags"},armenia:{keywords:["am","flag","nation","country","banner"],char:"🇦🇲",fitzpatrick_scale:!1,category:"flags"},aruba:{keywords:["aw","flag","nation","country","banner"],char:"🇦🇼",fitzpatrick_scale:!1,category:"flags"},australia:{keywords:["au","flag","nation","country","banner"],char:"🇦🇺",fitzpatrick_scale:!1,category:"flags"},austria:{keywords:["at","flag","nation","country","banner"],char:"🇦🇹",fitzpatrick_scale:!1,category:"flags"},azerbaijan:{keywords:["az","flag","nation","country","banner"],char:"🇦🇿",fitzpatrick_scale:!1,category:"flags"},bahamas:{keywords:["bs","flag","nation","country","banner"],char:"🇧🇸",fitzpatrick_scale:!1,category:"flags"},bahrain:{keywords:["bh","flag","nation","country","banner"],char:"🇧🇭",fitzpatrick_scale:!1,category:"flags"},bangladesh:{keywords:["bd","flag","nation","country","banner"],char:"🇧🇩",fitzpatrick_scale:!1,category:"flags"},barbados:{keywords:["bb","flag","nation","country","banner"],char:"🇧🇧",fitzpatrick_scale:!1,category:"flags"},belarus:{keywords:["by","flag","nation","country","banner"],char:"🇧🇾",fitzpatrick_scale:!1,category:"flags"},belgium:{keywords:["be","flag","nation","country","banner"],char:"🇧🇪",fitzpatrick_scale:!1,category:"flags"},belize:{keywords:["bz","flag","nation","country","banner"],char:"🇧🇿",fitzpatrick_scale:!1,category:"flags"},benin:{keywords:["bj","flag","nation","country","banner"],char:"🇧🇯",fitzpatrick_scale:!1,category:"flags"},bermuda:{keywords:["bm","flag","nation","country","banner"],char:"🇧🇲",fitzpatrick_scale:!1,category:"flags"},bhutan:{keywords:["bt","flag","nation","country","banner"],char:"🇧🇹",fitzpatrick_scale:!1,category:"flags"},bolivia:{keywords:["bo","flag","nation","country","banner"],char:"🇧🇴",fitzpatrick_scale:!1,category:"flags"},caribbean_netherlands:{keywords:["bonaire","flag","nation","country","banner"],char:"🇧🇶",fitzpatrick_scale:!1,category:"flags"},bosnia_herzegovina:{keywords:["bosnia","herzegovina","flag","nation","country","banner"],char:"🇧🇦",fitzpatrick_scale:!1,category:"flags"},botswana:{keywords:["bw","flag","nation","country","banner"],char:"🇧🇼",fitzpatrick_scale:!1,category:"flags"},brazil:{keywords:["br","flag","nation","country","banner"],char:"🇧🇷",fitzpatrick_scale:!1,category:"flags"},british_indian_ocean_territory:{keywords:["british","indian","ocean","territory","flag","nation","country","banner"],char:"🇮🇴",fitzpatrick_scale:!1,category:"flags"},british_virgin_islands:{keywords:["british","virgin","islands","bvi","flag","nation","country","banner"],char:"🇻🇬",fitzpatrick_scale:!1,category:"flags"},brunei:{keywords:["bn","darussalam","flag","nation","country","banner"],char:"🇧🇳",fitzpatrick_scale:!1,category:"flags"},bulgaria:{keywords:["bg","flag","nation","country","banner"],char:"🇧🇬",fitzpatrick_scale:!1,category:"flags"},burkina_faso:{keywords:["burkina","faso","flag","nation","country","banner"],char:"🇧🇫",fitzpatrick_scale:!1,category:"flags"},burundi:{keywords:["bi","flag","nation","country","banner"],char:"🇧🇮",fitzpatrick_scale:!1,category:"flags"},cape_verde:{keywords:["cabo","verde","flag","nation","country","banner"],char:"🇨🇻",fitzpatrick_scale:!1,category:"flags"},cambodia:{keywords:["kh","flag","nation","country","banner"],char:"🇰🇭",fitzpatrick_scale:!1,category:"flags"},cameroon:{keywords:["cm","flag","nation","country","banner"],char:"🇨🇲",fitzpatrick_scale:!1,category:"flags"},canada:{keywords:["ca","flag","nation","country","banner"],char:"🇨🇦",fitzpatrick_scale:!1,category:"flags"},canary_islands:{keywords:["canary","islands","flag","nation","country","banner"],char:"🇮🇨",fitzpatrick_scale:!1,category:"flags"},cayman_islands:{keywords:["cayman","islands","flag","nation","country","banner"],char:"🇰🇾",fitzpatrick_scale:!1,category:"flags"},central_african_republic:{keywords:["central","african","republic","flag","nation","country","banner"],char:"🇨🇫",fitzpatrick_scale:!1,category:"flags"},chad:{keywords:["td","flag","nation","country","banner"],char:"🇹🇩",fitzpatrick_scale:!1,category:"flags"},chile:{keywords:["flag","nation","country","banner"],char:"🇨🇱",fitzpatrick_scale:!1,category:"flags"},cn:{keywords:["china","chinese","prc","flag","country","nation","banner"],char:"🇨🇳",fitzpatrick_scale:!1,category:"flags"},christmas_island:{keywords:["christmas","island","flag","nation","country","banner"],char:"🇨🇽",fitzpatrick_scale:!1,category:"flags"},cocos_islands:{keywords:["cocos","keeling","islands","flag","nation","country","banner"],char:"🇨🇨",fitzpatrick_scale:!1,category:"flags"},colombia:{keywords:["co","flag","nation","country","banner"],char:"🇨🇴",fitzpatrick_scale:!1,category:"flags"},comoros:{keywords:["km","flag","nation","country","banner"],char:"🇰🇲",fitzpatrick_scale:!1,category:"flags"},congo_brazzaville:{keywords:["congo","flag","nation","country","banner"],char:"🇨🇬",fitzpatrick_scale:!1,category:"flags"},congo_kinshasa:{keywords:["congo","democratic","republic","flag","nation","country","banner"],char:"🇨🇩",fitzpatrick_scale:!1,category:"flags"},cook_islands:{keywords:["cook","islands","flag","nation","country","banner"],char:"🇨🇰",fitzpatrick_scale:!1,category:"flags"},costa_rica:{keywords:["costa","rica","flag","nation","country","banner"],char:"🇨🇷",fitzpatrick_scale:!1,category:"flags"},croatia:{keywords:["hr","flag","nation","country","banner"],char:"🇭🇷",fitzpatrick_scale:!1,category:"flags"},cuba:{keywords:["cu","flag","nation","country","banner"],char:"🇨🇺",fitzpatrick_scale:!1,category:"flags"},curacao:{keywords:["curaçao","flag","nation","country","banner"],char:"🇨🇼",fitzpatrick_scale:!1,category:"flags"},cyprus:{keywords:["cy","flag","nation","country","banner"],char:"🇨🇾",fitzpatrick_scale:!1,category:"flags"},czech_republic:{keywords:["cz","flag","nation","country","banner"],char:"🇨🇿",fitzpatrick_scale:!1,category:"flags"},denmark:{keywords:["dk","flag","nation","country","banner"],char:"🇩🇰",fitzpatrick_scale:!1,category:"flags"},djibouti:{keywords:["dj","flag","nation","country","banner"],char:"🇩🇯",fitzpatrick_scale:!1,category:"flags"},dominica:{keywords:["dm","flag","nation","country","banner"],char:"🇩🇲",fitzpatrick_scale:!1,category:"flags"},dominican_republic:{keywords:["dominican","republic","flag","nation","country","banner"],char:"🇩🇴",fitzpatrick_scale:!1,category:"flags"},ecuador:{keywords:["ec","flag","nation","country","banner"],char:"🇪🇨",fitzpatrick_scale:!1,category:"flags"},egypt:{keywords:["eg","flag","nation","country","banner"],char:"🇪🇬",fitzpatrick_scale:!1,category:"flags"},el_salvador:{keywords:["el","salvador","flag","nation","country","banner"],char:"🇸🇻",fitzpatrick_scale:!1,category:"flags"},equatorial_guinea:{keywords:["equatorial","gn","flag","nation","country","banner"],char:"🇬🇶",fitzpatrick_scale:!1,category:"flags"},eritrea:{keywords:["er","flag","nation","country","banner"],char:"🇪🇷",fitzpatrick_scale:!1,category:"flags"},estonia:{keywords:["ee","flag","nation","country","banner"],char:"🇪🇪",fitzpatrick_scale:!1,category:"flags"},ethiopia:{keywords:["et","flag","nation","country","banner"],char:"🇪🇹",fitzpatrick_scale:!1,category:"flags"},eu:{keywords:["european","union","flag","banner"],char:"🇪🇺",fitzpatrick_scale:!1,category:"flags"},falkland_islands:{keywords:["falkland","islands","malvinas","flag","nation","country","banner"],char:"🇫🇰",fitzpatrick_scale:!1,category:"flags"},faroe_islands:{keywords:["faroe","islands","flag","nation","country","banner"],char:"🇫🇴",fitzpatrick_scale:!1,category:"flags"},fiji:{keywords:["fj","flag","nation","country","banner"],char:"🇫🇯",fitzpatrick_scale:!1,category:"flags"},finland:{keywords:["fi","flag","nation","country","banner"],char:"🇫🇮",fitzpatrick_scale:!1,category:"flags"},fr:{keywords:["banner","flag","nation","france","french","country"],char:"🇫🇷",fitzpatrick_scale:!1,category:"flags"},french_guiana:{keywords:["french","guiana","flag","nation","country","banner"],char:"🇬🇫",fitzpatrick_scale:!1,category:"flags"},french_polynesia:{keywords:["french","polynesia","flag","nation","country","banner"],char:"🇵🇫",fitzpatrick_scale:!1,category:"flags"},french_southern_territories:{keywords:["french","southern","territories","flag","nation","country","banner"],char:"🇹🇫",fitzpatrick_scale:!1,category:"flags"},gabon:{keywords:["ga","flag","nation","country","banner"],char:"🇬🇦",fitzpatrick_scale:!1,category:"flags"},gambia:{keywords:["gm","flag","nation","country","banner"],char:"🇬🇲",fitzpatrick_scale:!1,category:"flags"},georgia:{keywords:["ge","flag","nation","country","banner"],char:"🇬🇪",fitzpatrick_scale:!1,category:"flags"},de:{keywords:["german","nation","flag","country","banner"],char:"🇩🇪",fitzpatrick_scale:!1,category:"flags"},ghana:{keywords:["gh","flag","nation","country","banner"],char:"🇬🇭",fitzpatrick_scale:!1,category:"flags"},gibraltar:{keywords:["gi","flag","nation","country","banner"],char:"🇬🇮",fitzpatrick_scale:!1,category:"flags"},greece:{keywords:["gr","flag","nation","country","banner"],char:"🇬🇷",fitzpatrick_scale:!1,category:"flags"},greenland:{keywords:["gl","flag","nation","country","banner"],char:"🇬🇱",fitzpatrick_scale:!1,category:"flags"},grenada:{keywords:["gd","flag","nation","country","banner"],char:"🇬🇩",fitzpatrick_scale:!1,category:"flags"},guadeloupe:{keywords:["gp","flag","nation","country","banner"],char:"🇬🇵",fitzpatrick_scale:!1,category:"flags"},guam:{keywords:["gu","flag","nation","country","banner"],char:"🇬🇺",fitzpatrick_scale:!1,category:"flags"},guatemala:{keywords:["gt","flag","nation","country","banner"],char:"🇬🇹",fitzpatrick_scale:!1,category:"flags"},guernsey:{keywords:["gg","flag","nation","country","banner"],char:"🇬🇬",fitzpatrick_scale:!1,category:"flags"},guinea:{keywords:["gn","flag","nation","country","banner"],char:"🇬🇳",fitzpatrick_scale:!1,category:"flags"},guinea_bissau:{keywords:["gw","bissau","flag","nation","country","banner"],char:"🇬🇼",fitzpatrick_scale:!1,category:"flags"},guyana:{keywords:["gy","flag","nation","country","banner"],char:"🇬🇾",fitzpatrick_scale:!1,category:"flags"},haiti:{keywords:["ht","flag","nation","country","banner"],char:"🇭🇹",fitzpatrick_scale:!1,category:"flags"},honduras:{keywords:["hn","flag","nation","country","banner"],char:"🇭🇳",fitzpatrick_scale:!1,category:"flags"},hong_kong:{keywords:["hong","kong","flag","nation","country","banner"],char:"🇭🇰",fitzpatrick_scale:!1,category:"flags"},hungary:{keywords:["hu","flag","nation","country","banner"],char:"🇭🇺",fitzpatrick_scale:!1,category:"flags"},iceland:{keywords:["is","flag","nation","country","banner"],char:"🇮🇸",fitzpatrick_scale:!1,category:"flags"},india:{keywords:["in","flag","nation","country","banner"],char:"🇮🇳",fitzpatrick_scale:!1,category:"flags"},indonesia:{keywords:["flag","nation","country","banner"],char:"🇮🇩",fitzpatrick_scale:!1,category:"flags"},iran:{keywords:["iran,","islamic","republic","flag","nation","country","banner"],char:"🇮🇷",fitzpatrick_scale:!1,category:"flags"},iraq:{keywords:["iq","flag","nation","country","banner"],char:"🇮🇶",fitzpatrick_scale:!1,category:"flags"},ireland:{keywords:["ie","flag","nation","country","banner"],char:"🇮🇪",fitzpatrick_scale:!1,category:"flags"},isle_of_man:{keywords:["isle","man","flag","nation","country","banner"],char:"🇮🇲",fitzpatrick_scale:!1,category:"flags"},israel:{keywords:["il","flag","nation","country","banner"],char:"🇮🇱",fitzpatrick_scale:!1,category:"flags"},it:{keywords:["italy","flag","nation","country","banner"],char:"🇮🇹",fitzpatrick_scale:!1,category:"flags"},cote_divoire:{keywords:["ivory","coast","flag","nation","country","banner"],char:"🇨🇮",fitzpatrick_scale:!1,category:"flags"},jamaica:{keywords:["jm","flag","nation","country","banner"],char:"🇯🇲",fitzpatrick_scale:!1,category:"flags"},jp:{keywords:["japanese","nation","flag","country","banner"],char:"🇯🇵",fitzpatrick_scale:!1,category:"flags"},jersey:{keywords:["je","flag","nation","country","banner"],char:"🇯🇪",fitzpatrick_scale:!1,category:"flags"},jordan:{keywords:["jo","flag","nation","country","banner"],char:"🇯🇴",fitzpatrick_scale:!1,category:"flags"},kazakhstan:{keywords:["kz","flag","nation","country","banner"],char:"🇰🇿",fitzpatrick_scale:!1,category:"flags"},kenya:{keywords:["ke","flag","nation","country","banner"],char:"🇰🇪",fitzpatrick_scale:!1,category:"flags"},kiribati:{keywords:["ki","flag","nation","country","banner"],char:"🇰🇮",fitzpatrick_scale:!1,category:"flags"},kosovo:{keywords:["xk","flag","nation","country","banner"],char:"🇽🇰",fitzpatrick_scale:!1,category:"flags"},kuwait:{keywords:["kw","flag","nation","country","banner"],char:"🇰🇼",fitzpatrick_scale:!1,category:"flags"},kyrgyzstan:{keywords:["kg","flag","nation","country","banner"],char:"🇰🇬",fitzpatrick_scale:!1,category:"flags"},laos:{keywords:["lao","democratic","republic","flag","nation","country","banner"],char:"🇱🇦",fitzpatrick_scale:!1,category:"flags"},latvia:{keywords:["lv","flag","nation","country","banner"],char:"🇱🇻",fitzpatrick_scale:!1,category:"flags"},lebanon:{keywords:["lb","flag","nation","country","banner"],char:"🇱🇧",fitzpatrick_scale:!1,category:"flags"},lesotho:{keywords:["ls","flag","nation","country","banner"],char:"🇱🇸",fitzpatrick_scale:!1,category:"flags"},liberia:{keywords:["lr","flag","nation","country","banner"],char:"🇱🇷",fitzpatrick_scale:!1,category:"flags"},libya:{keywords:["ly","flag","nation","country","banner"],char:"🇱🇾",fitzpatrick_scale:!1,category:"flags"},liechtenstein:{keywords:["li","flag","nation","country","banner"],char:"🇱🇮",fitzpatrick_scale:!1,category:"flags"},lithuania:{keywords:["lt","flag","nation","country","banner"],char:"🇱🇹",fitzpatrick_scale:!1,category:"flags"},luxembourg:{keywords:["lu","flag","nation","country","banner"],char:"🇱🇺",fitzpatrick_scale:!1,category:"flags"},macau:{keywords:["macao","flag","nation","country","banner"],char:"🇲🇴",fitzpatrick_scale:!1,category:"flags"},macedonia:{keywords:["macedonia,","flag","nation","country","banner"],char:"🇲🇰",fitzpatrick_scale:!1,category:"flags"},madagascar:{keywords:["mg","flag","nation","country","banner"],char:"🇲🇬",fitzpatrick_scale:!1,category:"flags"},malawi:{keywords:["mw","flag","nation","country","banner"],char:"🇲🇼",fitzpatrick_scale:!1,category:"flags"},malaysia:{keywords:["my","flag","nation","country","banner"],char:"🇲🇾",fitzpatrick_scale:!1,category:"flags"},maldives:{keywords:["mv","flag","nation","country","banner"],char:"🇲🇻",fitzpatrick_scale:!1,category:"flags"},mali:{keywords:["ml","flag","nation","country","banner"],char:"🇲🇱",fitzpatrick_scale:!1,category:"flags"},malta:{keywords:["mt","flag","nation","country","banner"],char:"🇲🇹",fitzpatrick_scale:!1,category:"flags"},marshall_islands:{keywords:["marshall","islands","flag","nation","country","banner"],char:"🇲🇭",fitzpatrick_scale:!1,category:"flags"},martinique:{keywords:["mq","flag","nation","country","banner"],char:"🇲🇶",fitzpatrick_scale:!1,category:"flags"},mauritania:{keywords:["mr","flag","nation","country","banner"],char:"🇲🇷",fitzpatrick_scale:!1,category:"flags"},mauritius:{keywords:["mu","flag","nation","country","banner"],char:"🇲🇺",fitzpatrick_scale:!1,category:"flags"},mayotte:{keywords:["yt","flag","nation","country","banner"],char:"🇾🇹",fitzpatrick_scale:!1,category:"flags"},mexico:{keywords:["mx","flag","nation","country","banner"],char:"🇲🇽",fitzpatrick_scale:!1,category:"flags"},micronesia:{keywords:["micronesia,","federated","states","flag","nation","country","banner"],char:"🇫🇲",fitzpatrick_scale:!1,category:"flags"},moldova:{keywords:["moldova,","republic","flag","nation","country","banner"],char:"🇲🇩",fitzpatrick_scale:!1,category:"flags"},monaco:{keywords:["mc","flag","nation","country","banner"],char:"🇲🇨",fitzpatrick_scale:!1,category:"flags"},mongolia:{keywords:["mn","flag","nation","country","banner"],char:"🇲🇳",fitzpatrick_scale:!1,category:"flags"},montenegro:{keywords:["me","flag","nation","country","banner"],char:"🇲🇪",fitzpatrick_scale:!1,category:"flags"},montserrat:{keywords:["ms","flag","nation","country","banner"],char:"🇲🇸",fitzpatrick_scale:!1,category:"flags"},morocco:{keywords:["ma","flag","nation","country","banner"],char:"🇲🇦",fitzpatrick_scale:!1,category:"flags"},mozambique:{keywords:["mz","flag","nation","country","banner"],char:"🇲🇿",fitzpatrick_scale:!1,category:"flags"},myanmar:{keywords:["mm","flag","nation","country","banner"],char:"🇲🇲",fitzpatrick_scale:!1,category:"flags"},namibia:{keywords:["na","flag","nation","country","banner"],char:"🇳🇦",fitzpatrick_scale:!1,category:"flags"},nauru:{keywords:["nr","flag","nation","country","banner"],char:"🇳🇷",fitzpatrick_scale:!1,category:"flags"},nepal:{keywords:["np","flag","nation","country","banner"],char:"🇳🇵",fitzpatrick_scale:!1,category:"flags"},netherlands:{keywords:["nl","flag","nation","country","banner"],char:"🇳🇱",fitzpatrick_scale:!1,category:"flags"},new_caledonia:{keywords:["new","caledonia","flag","nation","country","banner"],char:"🇳🇨",fitzpatrick_scale:!1,category:"flags"},new_zealand:{keywords:["new","zealand","flag","nation","country","banner"],char:"🇳🇿",fitzpatrick_scale:!1,category:"flags"},nicaragua:{keywords:["ni","flag","nation","country","banner"],char:"🇳🇮",fitzpatrick_scale:!1,category:"flags"},niger:{keywords:["ne","flag","nation","country","banner"],char:"🇳🇪",fitzpatrick_scale:!1,category:"flags"},nigeria:{keywords:["flag","nation","country","banner"],char:"🇳🇬",fitzpatrick_scale:!1,category:"flags"},niue:{keywords:["nu","flag","nation","country","banner"],char:"🇳🇺",fitzpatrick_scale:!1,category:"flags"},norfolk_island:{keywords:["norfolk","island","flag","nation","country","banner"],char:"🇳🇫",fitzpatrick_scale:!1,category:"flags"},northern_mariana_islands:{keywords:["northern","mariana","islands","flag","nation","country","banner"],char:"🇲🇵",fitzpatrick_scale:!1,category:"flags"},north_korea:{keywords:["north","korea","nation","flag","country","banner"],char:"🇰🇵",fitzpatrick_scale:!1,category:"flags"},norway:{keywords:["no","flag","nation","country","banner"],char:"🇳🇴",fitzpatrick_scale:!1,category:"flags"},oman:{keywords:["om_symbol","flag","nation","country","banner"],char:"🇴🇲",fitzpatrick_scale:!1,category:"flags"},pakistan:{keywords:["pk","flag","nation","country","banner"],char:"🇵🇰",fitzpatrick_scale:!1,category:"flags"},palau:{keywords:["pw","flag","nation","country","banner"],char:"🇵🇼",fitzpatrick_scale:!1,category:"flags"},palestinian_territories:{keywords:["palestine","palestinian","territories","flag","nation","country","banner"],char:"🇵🇸",fitzpatrick_scale:!1,category:"flags"},panama:{keywords:["pa","flag","nation","country","banner"],char:"🇵🇦",fitzpatrick_scale:!1,category:"flags"},papua_new_guinea:{keywords:["papua","new","guinea","flag","nation","country","banner"],char:"🇵🇬",fitzpatrick_scale:!1,category:"flags"},paraguay:{keywords:["py","flag","nation","country","banner"],char:"🇵🇾",fitzpatrick_scale:!1,category:"flags"},peru:{keywords:["pe","flag","nation","country","banner"],char:"🇵🇪",fitzpatrick_scale:!1,category:"flags"},philippines:{keywords:["ph","flag","nation","country","banner"],char:"🇵🇭",fitzpatrick_scale:!1,category:"flags"},pitcairn_islands:{keywords:["pitcairn","flag","nation","country","banner"],char:"🇵🇳",fitzpatrick_scale:!1,category:"flags"},poland:{keywords:["pl","flag","nation","country","banner"],char:"🇵🇱",fitzpatrick_scale:!1,category:"flags"},portugal:{keywords:["pt","flag","nation","country","banner"],char:"🇵🇹",fitzpatrick_scale:!1,category:"flags"},puerto_rico:{keywords:["puerto","rico","flag","nation","country","banner"],char:"🇵🇷",fitzpatrick_scale:!1,category:"flags"},qatar:{keywords:["qa","flag","nation","country","banner"],char:"🇶🇦",fitzpatrick_scale:!1,category:"flags"},reunion:{keywords:["réunion","flag","nation","country","banner"],char:"🇷🇪",fitzpatrick_scale:!1,category:"flags"},romania:{keywords:["ro","flag","nation","country","banner"],char:"🇷🇴",fitzpatrick_scale:!1,category:"flags"},ru:{keywords:["russian","federation","flag","nation","country","banner"],char:"🇷🇺",fitzpatrick_scale:!1,category:"flags"},rwanda:{keywords:["rw","flag","nation","country","banner"],char:"🇷🇼",fitzpatrick_scale:!1,category:"flags"},st_barthelemy:{keywords:["saint","barthélemy","flag","nation","country","banner"],char:"🇧🇱",fitzpatrick_scale:!1,category:"flags"},st_helena:{keywords:["saint","helena","ascension","tristan","cunha","flag","nation","country","banner"],char:"🇸🇭",fitzpatrick_scale:!1,category:"flags"},st_kitts_nevis:{keywords:["saint","kitts","nevis","flag","nation","country","banner"],char:"🇰🇳",fitzpatrick_scale:!1,category:"flags"},st_lucia:{keywords:["saint","lucia","flag","nation","country","banner"],char:"🇱🇨",fitzpatrick_scale:!1,category:"flags"},st_pierre_miquelon:{keywords:["saint","pierre","miquelon","flag","nation","country","banner"],char:"🇵🇲",fitzpatrick_scale:!1,category:"flags"},st_vincent_grenadines:{keywords:["saint","vincent","grenadines","flag","nation","country","banner"],char:"🇻🇨",fitzpatrick_scale:!1,category:"flags"},samoa:{keywords:["ws","flag","nation","country","banner"],char:"🇼🇸",fitzpatrick_scale:!1,category:"flags"},san_marino:{keywords:["san","marino","flag","nation","country","banner"],char:"🇸🇲",fitzpatrick_scale:!1,category:"flags"},sao_tome_principe:{keywords:["sao","tome","principe","flag","nation","country","banner"],char:"🇸🇹",fitzpatrick_scale:!1,category:"flags"},saudi_arabia:{keywords:["flag","nation","country","banner"],char:"🇸🇦",fitzpatrick_scale:!1,category:"flags"},senegal:{keywords:["sn","flag","nation","country","banner"],char:"🇸🇳",fitzpatrick_scale:!1,category:"flags"},serbia:{keywords:["rs","flag","nation","country","banner"],char:"🇷🇸",fitzpatrick_scale:!1,category:"flags"},seychelles:{keywords:["sc","flag","nation","country","banner"],char:"🇸🇨",fitzpatrick_scale:!1,category:"flags"},sierra_leone:{keywords:["sierra","leone","flag","nation","country","banner"],char:"🇸🇱",fitzpatrick_scale:!1,category:"flags"},singapore:{keywords:["sg","flag","nation","country","banner"],char:"🇸🇬",fitzpatrick_scale:!1,category:"flags"},sint_maarten:{keywords:["sint","maarten","dutch","flag","nation","country","banner"],char:"🇸🇽",fitzpatrick_scale:!1,category:"flags"},slovakia:{keywords:["sk","flag","nation","country","banner"],char:"🇸🇰",fitzpatrick_scale:!1,category:"flags"},slovenia:{keywords:["si","flag","nation","country","banner"],char:"🇸🇮",fitzpatrick_scale:!1,category:"flags"},solomon_islands:{keywords:["solomon","islands","flag","nation","country","banner"],char:"🇸🇧",fitzpatrick_scale:!1,category:"flags"},somalia:{keywords:["so","flag","nation","country","banner"],char:"🇸🇴",fitzpatrick_scale:!1,category:"flags"},south_africa:{keywords:["south","africa","flag","nation","country","banner"],char:"🇿🇦",fitzpatrick_scale:!1,category:"flags"},south_georgia_south_sandwich_islands:{keywords:["south","georgia","sandwich","islands","flag","nation","country","banner"],char:"🇬🇸",fitzpatrick_scale:!1,category:"flags"},kr:{keywords:["south","korea","nation","flag","country","banner"],char:"🇰🇷",fitzpatrick_scale:!1,category:"flags"},south_sudan:{keywords:["south","sd","flag","nation","country","banner"],char:"🇸🇸",fitzpatrick_scale:!1,category:"flags"},es:{keywords:["spain","flag","nation","country","banner"],char:"🇪🇸",fitzpatrick_scale:!1,category:"flags"},sri_lanka:{keywords:["sri","lanka","flag","nation","country","banner"],char:"🇱🇰",fitzpatrick_scale:!1,category:"flags"},sudan:{keywords:["sd","flag","nation","country","banner"],char:"🇸🇩",fitzpatrick_scale:!1,category:"flags"},suriname:{keywords:["sr","flag","nation","country","banner"],char:"🇸🇷",fitzpatrick_scale:!1,category:"flags"},swaziland:{keywords:["sz","flag","nation","country","banner"],char:"🇸🇿",fitzpatrick_scale:!1,category:"flags"},sweden:{keywords:["se","flag","nation","country","banner"],char:"🇸🇪",fitzpatrick_scale:!1,category:"flags"},switzerland:{keywords:["ch","flag","nation","country","banner"],char:"🇨🇭",fitzpatrick_scale:!1,category:"flags"},syria:{keywords:["syrian","arab","republic","flag","nation","country","banner"],char:"🇸🇾",fitzpatrick_scale:!1,category:"flags"},taiwan:{keywords:["tw","flag","nation","country","banner"],char:"🇹🇼",fitzpatrick_scale:!1,category:"flags"},tajikistan:{keywords:["tj","flag","nation","country","banner"],char:"🇹🇯",fitzpatrick_scale:!1,category:"flags"},tanzania:{keywords:["tanzania,","united","republic","flag","nation","country","banner"],char:"🇹🇿",fitzpatrick_scale:!1,category:"flags"},thailand:{keywords:["th","flag","nation","country","banner"],char:"🇹🇭",fitzpatrick_scale:!1,category:"flags"},timor_leste:{keywords:["timor","leste","flag","nation","country","banner"],char:"🇹🇱",fitzpatrick_scale:!1,category:"flags"},togo:{keywords:["tg","flag","nation","country","banner"],char:"🇹🇬",fitzpatrick_scale:!1,category:"flags"},tokelau:{keywords:["tk","flag","nation","country","banner"],char:"🇹🇰",fitzpatrick_scale:!1,category:"flags"},tonga:{keywords:["to","flag","nation","country","banner"],char:"🇹🇴",fitzpatrick_scale:!1,category:"flags"},trinidad_tobago:{keywords:["trinidad","tobago","flag","nation","country","banner"],char:"🇹🇹",fitzpatrick_scale:!1,category:"flags"},tunisia:{keywords:["tn","flag","nation","country","banner"],char:"🇹🇳",fitzpatrick_scale:!1,category:"flags"},tr:{keywords:["turkey","flag","nation","country","banner"],char:"🇹🇷",fitzpatrick_scale:!1,category:"flags"},turkmenistan:{keywords:["flag","nation","country","banner"],char:"🇹🇲",fitzpatrick_scale:!1,category:"flags"},turks_caicos_islands:{keywords:["turks","caicos","islands","flag","nation","country","banner"],char:"🇹🇨",fitzpatrick_scale:!1,category:"flags"},tuvalu:{keywords:["flag","nation","country","banner"],char:"🇹🇻",fitzpatrick_scale:!1,category:"flags"},uganda:{keywords:["ug","flag","nation","country","banner"],char:"🇺🇬",fitzpatrick_scale:!1,category:"flags"},ukraine:{keywords:["ua","flag","nation","country","banner"],char:"🇺🇦",fitzpatrick_scale:!1,category:"flags"},united_arab_emirates:{keywords:["united","arab","emirates","flag","nation","country","banner"],char:"🇦🇪",fitzpatrick_scale:!1,category:"flags"},uk:{keywords:["united","kingdom","great","britain","northern","ireland","flag","nation","country","banner","british","UK","english","england","union jack"],char:"🇬🇧",fitzpatrick_scale:!1,category:"flags"},england:{keywords:["flag","english"],char:"🏴󠁧󠁢󠁥󠁮󠁧󠁿",fitzpatrick_scale:!1,category:"flags"},scotland:{keywords:["flag","scottish"],char:"🏴󠁧󠁢󠁳󠁣󠁴󠁿",fitzpatrick_scale:!1,category:"flags"},wales:{keywords:["flag","welsh"],char:"🏴󠁧󠁢󠁷󠁬󠁳󠁿",fitzpatrick_scale:!1,category:"flags"},us:{keywords:["united","states","america","flag","nation","country","banner"],char:"🇺🇸",fitzpatrick_scale:!1,category:"flags"},us_virgin_islands:{keywords:["virgin","islands","us","flag","nation","country","banner"],char:"🇻🇮",fitzpatrick_scale:!1,category:"flags"},uruguay:{keywords:["uy","flag","nation","country","banner"],char:"🇺🇾",fitzpatrick_scale:!1,category:"flags"},uzbekistan:{keywords:["uz","flag","nation","country","banner"],char:"🇺🇿",fitzpatrick_scale:!1,category:"flags"},vanuatu:{keywords:["vu","flag","nation","country","banner"],char:"🇻🇺",fitzpatrick_scale:!1,category:"flags"},vatican_city:{keywords:["vatican","city","flag","nation","country","banner"],char:"🇻🇦",fitzpatrick_scale:!1,category:"flags"},venezuela:{keywords:["ve","bolivarian","republic","flag","nation","country","banner"],char:"🇻🇪",fitzpatrick_scale:!1,category:"flags"},vietnam:{keywords:["viet","nam","flag","nation","country","banner"],char:"🇻🇳",fitzpatrick_scale:!1,category:"flags"},wallis_futuna:{keywords:["wallis","futuna","flag","nation","country","banner"],char:"🇼🇫",fitzpatrick_scale:!1,category:"flags"},western_sahara:{keywords:["western","sahara","flag","nation","country","banner"],char:"🇪🇭",fitzpatrick_scale:!1,category:"flags"},yemen:{keywords:["ye","flag","nation","country","banner"],char:"🇾🇪",fitzpatrick_scale:!1,category:"flags"},zambia:{keywords:["zm","flag","nation","country","banner"],char:"🇿🇲",fitzpatrick_scale:!1,category:"flags"},zimbabwe:{keywords:["zw","flag","nation","country","banner"],char:"🇿🇼",fitzpatrick_scale:!1,category:"flags"},united_nations:{keywords:["un","flag","banner"],char:"🇺🇳",fitzpatrick_scale:!1,category:"flags"},pirate_flag:{keywords:["skull","crossbones","flag","banner"],char:"🏴",fitzpatrick_scale:!1,category:"flags"}})},55534:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>e===t,o=t(null),n=t(void 0),r=()=>{},a=()=>!1;class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this: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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?s.none():s.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const i=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},l=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},c=Object.keys,d=Object.hasOwnProperty,u=(e,t)=>{const o=c(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},m=(e,t)=>d.call(e,t),g=(p=(e,t)=>t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let o=0;o<e.length;o++){const n=e[o];for(const e in n)m(n,e)&&(t[e]=p(t[e],n[e]))}return t});var p;const h=()=>{const e=(e=>{const t=l(s.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(s.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(s.some(e))}}})(r);return{...e,on:t=>e.get().each(t)}},f=(e,t,o=0,r)=>{const a=e.indexOf(t,o);return-1!==a&&(!!n(r)||a+t.length<=r)};var y=tinymce.util.Tools.resolve("tinymce.Resource");const b=e=>t=>t.options.get(e),v=b("emoticons_database"),k=b("emoticons_database_url"),w=b("emoticons_database_id"),_=b("emoticons_append"),x=b("emoticons_images_url"),C="All",S={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"},z=(e,t)=>m(e,t)?e[t]:t,O=e=>{const t=_(e);return o=e=>({keywords:[],category:"user",...e}),((e,t)=>{const o={};return u(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o})(t,((e,t)=>({k:t,v:o(e)})));var o},T=(e,t)=>f(e.title.toLowerCase(),t)||((e,o)=>{for(let o=0,r=e.length;o<r;o++)if(n=e[o],f(n.toLowerCase(),t))return!0;var n;return!1})(e.keywords),E=(e,t,o)=>{const n=[],r=t.toLowerCase(),s=o.fold((()=>a),(e=>t=>t>=e));for(let o=0;o<e.length&&(0!==t.length&&!T(e[o],r)||(n.push({value:e[o].char,text:e[o].title,icon:e[o].char}),!s(n.length)));o++);return n},A="pattern",M=(e,t)=>{const n={pattern:"",results:E(t.listAll(),"",s.some(300))},r=l(C),a=((e,t)=>{let n=null;const r=()=>{o(n)||(clearTimeout(n),n=null)};return{cancel:r,throttle:(...t)=>{r(),n=setTimeout((()=>{n=null,e.apply(null,t)}),200)}}})((e=>{(e=>{const o=e.getData(),n=r.get(),a=t.listCategory(n),i=E(a,o[A],n===C?s.some(300):s.none());e.setData({results:i})})(e)})),c={label:"Search",type:"input",name:A},d={type:"collection",name:"results"},u=()=>({title:"Emojis",size:"normal",body:{type:"tabpanel",tabs:i(t.listCategories(),(e=>({title:e,name:e,items:[c,d]})))},initialData:n,onTabChange:(e,t)=>{r.set(t.newTabName),a.throttle(e)},onChange:a.throttle,onAction:(t,o)=>{"results"===o.name&&(((e,t)=>{e.insertContent(t)})(e,o.value),t.close())},buttons:[{type:"cancel",text:"Close",primary:!0}]}),m=e.windowManager.open(u());m.focus(A),t.hasLoaded()||(m.block("Loading emojis..."),t.waitForLoad().then((()=>{m.redial(u()),a.throttle(m),m.focus(A),m.unblock()})).catch((e=>{m.redial({title:"Emojis",body:{type:"panel",items:[{type:"alertbanner",level:"error",icon:"warning",text:"Could not load emojis"}]},buttons:[{type:"cancel",text:"Close",primary:!0}],initialData:{pattern:"",results:[]}}),m.focus(A),m.unblock()})))};e.add("emoticons",((e,t)=>{((e,t)=>{const o=e.options.register;o("emoticons_database",{processor:"string",default:"emojis"}),o("emoticons_database_url",{processor:"string",default:`${t}/js/${v(e)}${e.suffix}.js`}),o("emoticons_database_id",{processor:"string",default:"tinymce.plugins.emoticons"}),o("emoticons_append",{processor:"object",default:{}}),o("emoticons_images_url",{processor:"string",default:"https://twemoji.maxcdn.com/v/13.0.1/72x72/"})})(e,t);const o=((e,t,o)=>{const n=h(),r=h(),a=x(e),i=e=>{return o="<img",(t=e.char).length>=4&&t.substr(0,4)===o?e.char.replace(/src="([^"]+)"/,((e,t)=>`src="${a}${t}"`)):e.char;var t,o};e.on("init",(()=>{y.load(o,t).then((t=>{const o=O(e);(e=>{const t={},o=[];u(e,((e,n)=>{const r={title:n,keywords:e.keywords,char:i(e),category:z(S,e.category)},a=void 0!==t[r.category]?t[r.category]:[];t[r.category]=a.concat([r]),o.push(r)})),n.set(t),r.set(o)})(g(t,o))}),(e=>{console.log(`Failed to load emojis: ${e}`),n.set({}),r.set([])}))}));const l=()=>r.get().getOr([]),d=()=>n.isSet()&&r.isSet();return{listCategories:()=>[C].concat(c(n.get().getOr({}))),hasLoaded:d,waitForLoad:()=>d()?Promise.resolve(!0):new Promise(((e,o)=>{let n=15;const r=setInterval((()=>{d()?(clearInterval(r),e(!0)):(n--,n<0&&(console.log("Could not load emojis from url: "+t),clearInterval(r),o(!1)))}),100)})),listAll:l,listCategory:e=>e===C?l():n.get().bind((t=>s.from(t[e]))).getOr([])}})(e,k(e),w(e));((e,t)=>{e.addCommand("mceEmoticons",(()=>M(e,t)))})(e,o),(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})})(e),((e,t)=>{e.ui.registry.addAutocompleter("emoticons",{trigger:":",columns:"auto",minChars:2,fetch:(e,o)=>t.waitForLoad().then((()=>{const n=t.listAll();return E(n,e,s.some(o))})),onAction:(t,o,n)=>{e.selection.setRng(o),e.insertContent(n),t.hide()}})})(e,o),(e=>{e.on("PreInit",(()=>{e.parser.addAttributeFilter("data-emoticon",(e=>{((e,t)=>{for(let t=0,n=e.length;t<n;t++)(o=e[t]).attr("data-mce-resize","false"),o.attr("data-mce-placeholder","1");var o})(e)}))}))})(e)}))}()},1080:function(e,t,o){o(94844)},94844:function(){!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const o=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,n=e=>t=>typeof t===e,r=e=>t=>e===t,a=o("string"),s=o("array"),i=r(null),l=n("boolean"),c=r(void 0),d=e=>!(e=>null==e)(e),u=n("function"),m=n("number"),g=()=>{},p=e=>()=>e;function h(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const f=p(!1),y=p(!0);class b{constructor(e,t){this.tag=e,this.value=t}static some(e){return new b(!0,e)}static none(){return b.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?b.some(e(this.value)):b.none()}bind(e){return this.tag?e(this.value):b.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this: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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return d(e)?b.some(e):b.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(!1);const v=t=>{const o=e(b.none()),n=()=>o.get().each(t);return{clear:()=>{n(),o.set(b.none())},isSet:()=>o.get().isSome(),get:()=>o.get(),set:e=>{n(),o.set(b.some(e))}}},k=()=>v((e=>e.unbind())),w=Array.prototype.push,_=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},x=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},C=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},S=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return b.some(r);if(o(r,n))break}return b.none()})(e,t,f),z=Object.keys,O=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!c(n)||r+t.length<=n)},T=e=>void 0!==e.style&&u(e.style.getPropertyValue),E=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},A=E;"undefined"!=typeof window?window:Function("return this;")();const M=e=>t=>(e=>e.dom.nodeType)(t)===e,N=M(1),R=M(3),D=M(9),B=M(11),L=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},I=e=>A(e.dom.ownerDocument),H=e=>_(e.dom.childNodes,A),P=u(Element.prototype.attachShadow)&&u(Node.prototype.getRootNode),F=p(P),j=P?e=>A(e.dom.getRootNode()):e=>D(e)?e:I(e),V=e=>{const t=j(e);return B(o=t)&&d(o.dom.host)?b.some(t):b.none();var o},Z=e=>A(e.dom.host),U=e=>{const t=R(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return V(A(t)).fold((()=>o.body.contains(t)),(n=U,r=Z,e=>n(r(e))));var n,r},q=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},W=(e,t)=>{e.dom.removeAttribute(t)},$=(e,t)=>{const o=e.dom;((e,t)=>{const o=z(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(t,((e,t)=>{((e,t,o)=>{if(!a(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);T(e)&&e.style.setProperty(t,o)})(o,t,e)}))},G=e=>{const t=A((e=>{if(F()&&d(e.target)){const t=A(e.target);if(N(t)&&d(t.dom.shadowRoot)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return((e,t)=>0<e.length?b.some(e[0]):b.none())(t)}}return b.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=(a=n,s=o,(...e)=>a(s.apply(null,e)));var a,s;return((e,t,o,n,r,a,s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:a,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)},K=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Y=y,X=(e,t,o)=>((e,t,o,n)=>((e,t,o,n,r)=>{const a=((e,t)=>o=>{e(o)&&t(G(o))})(o,n);return e.dom.addEventListener(t,a,r),{unbind:h(K,e,t,a,r)}})(e,t,o,n,!1))(e,t,Y,o),J=()=>Q(0,0),Q=(e,t)=>({major:e,minor:t}),ee={nu:Q,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?J():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return Q(n(1),n(2))})(e,o)},unknown:J},te=(e,t)=>{const o=String(t).toLowerCase();return S(e,(e=>e.search(o)))},oe=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ne=e=>t=>O(t,e),re=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>O(e,"edge/")&&O(e,"chrome")&&O(e,"safari")&&O(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,oe],search:e=>O(e,"chrome")&&!O(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>O(e,"msie")||O(e,"trident")},{name:"Opera",versionRegexes:[oe,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ne("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ne("firefox")},{name:"Safari",versionRegexes:[oe,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(O(e,"safari")||O(e,"mobile/"))&&O(e,"applewebkit")}],ae=[{name:"Windows",search:ne("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>O(e,"iphone")||O(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ne("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:ne("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ne("linux"),versionRegexes:[]},{name:"Solaris",search:ne("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ne("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ne("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],se={browsers:p(re),oses:p(ae)},ie="Edge",le="Chromium",ce="Opera",de="Firefox",ue="Safari",me=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(ie),isChromium:n(le),isIE:n("IE"),isOpera:n(ce),isFirefox:n(de),isSafari:n(ue)}},ge=()=>me({current:void 0,version:ee.unknown()}),pe=me,he=(p(ie),p(le),p("IE"),p(ce),p(de),p(ue),"Windows"),fe="Android",ye="Linux",be="macOS",ve="Solaris",ke="FreeBSD",we="ChromeOS",_e=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(he),isiOS:n("iOS"),isAndroid:n(fe),isMacOS:n(be),isLinux:n(ye),isSolaris:n(ve),isFreeBSD:n(ke),isChromeOS:n(we)}},xe=()=>_e({current:void 0,version:ee.unknown()}),Ce=_e,Se=(p(he),p("iOS"),p(fe),p(ye),p(be),p(ve),p(ke),p(we),(e,t,o)=>{const n=se.browsers(),r=se.oses(),a=t.bind((e=>((e,t)=>((e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o]);if(n.isSome())return n}return b.none()})(t.brands,(t=>{const o=t.brand.toLowerCase();return S(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:ee.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>te(e,t).map((e=>{const o=ee.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(ge,pe),s=((e,t)=>te(e,t).map((e=>{const o=ee.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(xe,Ce),i=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),a=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),i=s||n("(pointer:coarse)"),l=r||!a&&s&&n("(min-device-width:768px)"),c=a||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:p(r),isiPhone:p(a),isTablet:p(l),isPhone:p(c),isTouch:p(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:p(d),isDesktop:p(u)}})(s,a,e,o);return{browser:a,os:s,deviceType:i}}),ze=e=>window.matchMedia(e).matches;let Oe=(e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)})((()=>Se(navigator.userAgent,b.from(navigator.userAgentData),ze)));const Te=(e,t)=>({left:e,top:t,translate:(o,n)=>Te(e+o,t+n)}),Ee=Te,Ae=e=>{const t=void 0===e?window:e;return Oe().browser.isFirefox()?b.none():b.from(t.visualViewport)},Me=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Ne=e=>{const t=void 0===e?window:e,o=t.document,n=(e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return Ee(o,n)})(A(o));return Ae(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,r=e.clientHeight;return Me(n.left,n.top,o,r)}),(e=>Me(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))},Re=(e,t,o)=>Ae(o).map((o=>{const n=e=>t(G(e));return o.addEventListener(e,n),{unbind:()=>o.removeEventListener(e,n)}})).getOrThunk((()=>({unbind:g})));var De=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),Be=tinymce.util.Tools.resolve("tinymce.Env");const Le=(e,t)=>{e.dispatch("FullscreenStateChanged",{state:t}),e.dispatch("ResizeEditor")},Ie=("fullscreen_native",e=>e.options.get("fullscreen_native"));const He=e=>{return e.dom===(void 0!==(t=I(e).dom).fullscreenElement?t.fullscreenElement:void 0!==t.msFullscreenElement?t.msFullscreenElement:void 0!==t.webkitFullscreenElement?t.webkitFullscreenElement:null);var t},Pe=(e,t,o)=>((e,t,o)=>C(((e,t)=>{const o=u(t)?t:f;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=A(e);if(r.push(t),!0===o(t))break;n=e}return r})(e,o),t))(e,(e=>L(e,t)),o),Fe=(e,t)=>((e,o)=>{return C((e=>b.from(e.dom.parentNode).map(A))(n=e).map(H).map((e=>C(e,(e=>{return t=e,!(n.dom===t.dom);var t})))).getOr([]),(e=>L(e,t)));var n})(e),je="data-ephox-mobile-fullscreen-style",Ve="position:absolute!important;",Ze="top:0!important;left:0!important;margin:0!important;padding:0!important;width:100%!important;height:100%!important;overflow:visible!important;",Ue=Be.os.isAndroid(),qe=e=>{const t=((e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||U(e)?n:((e,t)=>T(e)?e.style.getPropertyValue(t):"")(o,t)})(e,"background-color");return void 0!==t&&""!==t?"background-color:"+t+"!important":"background-color:rgb(255,255,255)!important;"},We=De.DOM,$e=Ae().fold((()=>({bind:g,unbind:g})),(e=>{const t=(()=>{const e=v(g);return{...e,on:t=>e.get().each(t)}})(),o=k(),n=k(),r=((e,t)=>{let o=null;return{cancel:()=>{i(o)||(clearTimeout(o),o=null)},throttle:(...t)=>{i(o)&&(o=setTimeout((()=>{o=null,e.apply(null,t)}),50))}}})((()=>{document.body.scrollTop=0,document.documentElement.scrollTop=0,window.requestAnimationFrame((()=>{t.on((t=>$(t,{top:e.offsetTop+"px",left:e.offsetLeft+"px",height:e.height+"px",width:e.width+"px"})))}))}));return{bind:e=>{t.set(e),r.throttle(),o.set(Re("resize",r.throttle)),n.set(Re("scroll",r.throttle))},unbind:()=>{t.on((()=>{o.clear(),n.clear()})),t.clear()}}})),Ge=(e,t)=>{const o=document.body,n=document.documentElement,r=e.getContainer(),i=A(r),c=(e=>{const t=A(e.getElement());return V(t).map(Z).getOrThunk((()=>(e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return A(t)})(I(t))))})(e),d=t.get(),u=A(e.getBody()),g=Be.deviceType.isTouch(),p=r.style,h=e.iframeElement,f=null==h?void 0:h.style,y=e=>{e(o,"tox-fullscreen"),e(n,"tox-fullscreen"),e(r,"tox-fullscreen"),V(i).map((e=>Z(e).dom)).each((t=>{e(t,"tox-fullscreen"),e(t,"tox-shadowhost")}))},v=()=>{g&&(e=>{const t=((e,t)=>{const o=document;return 1!==(n=o).nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount?[]:_(o.querySelectorAll(e),A);var n})("["+je+"]");x(t,(t=>{const o=q(t,je);o&&"no-styles"!==o?$(t,e.parseStyle(o)):W(t,"style"),W(t,je)}))})(e.dom),y(We.removeClass),$e.unbind(),b.from(t.get()).each((e=>e.fullscreenChangeHandler.unbind()))};if(d)d.fullscreenChangeHandler.unbind(),Ie(e)&&He(c)&&(e=>{const t=e.dom;t.exitFullscreen?t.exitFullscreen():t.msExitFullscreen?t.msExitFullscreen():t.webkitCancelFullScreen&&t.webkitCancelFullScreen()})(I(c)),f.width=d.iframeWidth,f.height=d.iframeHeight,p.width=d.containerWidth,p.height=d.containerHeight,p.top=d.containerTop,p.left=d.containerLeft,v(),k=d.scrollPos,window.scrollTo(k.x,k.y),t.set(null),Le(e,!1),e.off("remove",v);else{const o=X(I(c),void 0!==document.fullscreenElement?"fullscreenchange":void 0!==document.msFullscreenElement?"MSFullscreenChange":void 0!==document.webkitFullscreenElement?"webkitfullscreenchange":"fullscreenchange",(o=>{Ie(e)&&(He(c)||null===t.get()||Ge(e,t))})),n={scrollPos:Ne(window),containerWidth:p.width,containerHeight:p.height,containerTop:p.top,containerLeft:p.left,iframeWidth:f.width,iframeHeight:f.height,fullscreenChangeHandler:o};g&&((e,t,o)=>{const n=t=>o=>{const n=q(o,"style"),r=void 0===n?"no-styles":n.trim();r!==t&&(((e,t,o)=>{((e,t,o)=>{if(!(a(o)||l(o)||m(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)})(o,je,r),$(o,e.parseStyle(t)))},r=Pe(t,"*"),i=(e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!s(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);w.apply(t,e[o])}return t})(_(r,(e=>Fe(e,"*:not(.tox-silver-sink)")))),c=qe(o);x(i,n("display:none!important;")),x(r,n(Ve+Ze+c)),n((!0===Ue?"":Ve)+Ze+c)(t)})(e.dom,i,u),f.width=f.height="100%",p.width=p.height="",y(We.addClass),$e.bind(i),e.on("remove",v),t.set(n),Ie(e)&&(e=>{const t=e.dom;t.requestFullscreen?t.requestFullscreen():t.msRequestFullscreen?t.msRequestFullscreen():t.webkitRequestFullScreen&&t.webkitRequestFullScreen()})(c),Le(e,!0)}var k},Ke=(e,t)=>o=>{o.setActive(null!==t.get());const n=e=>o.setActive(e.state);return e.on("FullscreenStateChanged",n),()=>e.off("FullscreenStateChanged",n)};t.add("fullscreen",(t=>{const o=e(null);return t.inline||((e=>{(0,e.options.register)("fullscreen_native",{processor:"boolean",default:!1})})(t),((e,t)=>{e.addCommand("mceFullScreen",(()=>{Ge(e,t)}))})(t,o),((e,t)=>{const o=()=>e.execCommand("mceFullScreen");e.ui.registry.addToggleMenuItem("fullscreen",{text:"Fullscreen",icon:"fullscreen",shortcut:"Meta+Shift+F",onAction:o,onSetup:Ke(e,t)}),e.ui.registry.addToggleButton("fullscreen",{tooltip:"Fullscreen",icon:"fullscreen",onAction:o,onSetup:Ke(e,t)})})(t,o),t.addShortcut("Meta+Shift+F","","mceFullScreen")),(e=>({isFullscreen:()=>null!==e.get()}))(o)}))}()},92936:function(e,t,o){o(56537)},56537:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");let t=0;const o=e=>{const o=(new Date).getTime(),n=Math.floor(1e9*Math.random());return t++,e+"_"+n+t+String(o)},n=e=>t=>t.options.get(e),r=n("help_tabs"),a=n("forced_plugins"),s=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(e));const i=(void 0,e=>undefined===e);const l=e=>"function"==typeof e,c=(!1,()=>false);class d{constructor(e,t){this.tag=e,this.value=t}static some(e){return new d(!0,e)}static none(){return d.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?d.some(e(this.value)):d.none()}bind(e){return this.tag?e(this.value):d.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:d.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?d.none():d.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}d.singletonNone=new d(!1);const u=Array.prototype.slice,m=Array.prototype.indexOf,g=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},p=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},h=(e,t)=>{const o=u.call(e,0);return o.sort(t),o},f=Object.keys,y=Object.hasOwnProperty,b=(e,t)=>y.call(e,t);var v=tinymce.util.Tools.resolve("tinymce.Env");const k=e=>{const t=v.os.isMacOS()||v.os.isiOS(),o=t?{alt:"&#x2325;",ctrl:"&#x2303;",shift:"&#x21E7;",meta:"&#x2318;",access:"&#x2303;&#x2325;"}:{meta:"Ctrl ",access:"Shift + Alt "},n=e.split("+"),r=g(n,(e=>{const t=e.toLowerCase().trim();return b(o,t)?o[t]:e}));return t?r.join("").replace(/\s/,""):r.join("+")},w=[{shortcuts:["Meta + B"],action:"Bold"},{shortcuts:["Meta + I"],action:"Italic"},{shortcuts:["Meta + U"],action:"Underline"},{shortcuts:["Meta + A"],action:"Select all"},{shortcuts:["Meta + Y","Meta + Shift + Z"],action:"Redo"},{shortcuts:["Meta + Z"],action:"Undo"},{shortcuts:["Access + 1"],action:"Heading 1"},{shortcuts:["Access + 2"],action:"Heading 2"},{shortcuts:["Access + 3"],action:"Heading 3"},{shortcuts:["Access + 4"],action:"Heading 4"},{shortcuts:["Access + 5"],action:"Heading 5"},{shortcuts:["Access + 6"],action:"Heading 6"},{shortcuts:["Access + 7"],action:"Paragraph"},{shortcuts:["Access + 8"],action:"Div"},{shortcuts:["Access + 9"],action:"Address"},{shortcuts:["Alt + 0"],action:"Open help dialog"},{shortcuts:["Alt + F9"],action:"Focus to menubar"},{shortcuts:["Alt + F10"],action:"Focus to toolbar"},{shortcuts:["Alt + F11"],action:"Focus to element path"},{shortcuts:["Ctrl + F9"],action:"Focus to contextual toolbar"},{shortcuts:["Shift + Enter"],action:"Open popup menu for split buttons"},{shortcuts:["Meta + K"],action:"Insert link (if link plugin activated)"},{shortcuts:["Meta + S"],action:"Save (if save plugin activated)"},{shortcuts:["Meta + F"],action:"Find (if searchreplace plugin activated)"},{shortcuts:["Meta + Shift + F"],action:"Switch to or from fullscreen mode"}],_=()=>({name:"shortcuts",title:"Handy Shortcuts",items:[{type:"table",header:["Action","Shortcut"],cells:g(w,(e=>{const t=g(e.shortcuts,k).join(" or ");return[e.action,t]}))}]});var x=tinymce.util.Tools.resolve("tinymce.util.I18n");const C=g([{key:"advlist",name:"Advanced List"},{key:"anchor",name:"Anchor"},{key:"autolink",name:"Autolink"},{key:"autoresize",name:"Autoresize"},{key:"autosave",name:"Autosave"},{key:"charmap",name:"Character Map"},{key:"code",name:"Code"},{key:"codesample",name:"Code Sample"},{key:"colorpicker",name:"Color Picker"},{key:"directionality",name:"Directionality"},{key:"emoticons",name:"Emoticons"},{key:"fullscreen",name:"Full Screen"},{key:"help",name:"Help"},{key:"image",name:"Image"},{key:"importcss",name:"Import CSS"},{key:"insertdatetime",name:"Insert Date/Time"},{key:"link",name:"Link"},{key:"lists",name:"Lists"},{key:"media",name:"Media"},{key:"nonbreaking",name:"Nonbreaking"},{key:"pagebreak",name:"Page Break"},{key:"preview",name:"Preview"},{key:"quickbars",name:"Quick Toolbars"},{key:"save",name:"Save"},{key:"searchreplace",name:"Search and Replace"},{key:"table",name:"Table"},{key:"template",name:"Template"},{key:"textcolor",name:"Text Color"},{key:"visualblocks",name:"Visual Blocks"},{key:"visualchars",name:"Visual Characters"},{key:"wordcount",name:"Word Count"},{key:"a11ychecker",name:"Accessibility Checker",type:"premium"},{key:"advcode",name:"Advanced Code Editor",type:"premium"},{key:"advtable",name:"Advanced Tables",type:"premium"},{key:"advtemplate",name:"Advanced Templates",type:"premium",slug:"advanced-templates"},{key:"casechange",name:"Case Change",type:"premium"},{key:"checklist",name:"Checklist",type:"premium"},{key:"editimage",name:"Enhanced Image Editing",type:"premium"},{key:"footnotes",name:"Footnotes",type:"premium"},{key:"typography",name:"Advanced Typography",type:"premium",slug:"advanced-typography"},{key:"mediaembed",name:"Enhanced Media Embed",type:"premium",slug:"introduction-to-mediaembed"},{key:"export",name:"Export",type:"premium"},{key:"formatpainter",name:"Format Painter",type:"premium"},{key:"inlinecss",name:"Inline CSS",type:"premium",slug:"inline-css"},{key:"linkchecker",name:"Link Checker",type:"premium"},{key:"mentions",name:"Mentions",type:"premium"},{key:"mergetags",name:"Merge Tags",type:"premium"},{key:"pageembed",name:"Page Embed",type:"premium"},{key:"permanentpen",name:"Permanent Pen",type:"premium"},{key:"powerpaste",name:"PowerPaste",type:"premium",slug:"introduction-to-powerpaste"},{key:"rtc",name:"Real-Time Collaboration",type:"premium",slug:"rtc-introduction"},{key:"tinymcespellchecker",name:"Spell Checker Pro",type:"premium",slug:"introduction-to-tiny-spellchecker"},{key:"autocorrect",name:"Spelling Autocorrect",type:"premium"},{key:"tableofcontents",name:"Table of Contents",type:"premium"},{key:"tinycomments",name:"Tiny Comments",type:"premium",slug:"introduction-to-tiny-comments"},{key:"tinydrive",name:"Tiny Drive",type:"premium",slug:"tinydrive-introduction"}],(e=>({...e,type:e.type||"opensource",slug:e.slug||e.key}))),S=e=>{const t=e=>`<a href="${e.url}" target="_blank" rel="noopener">${e.name}</a>`,o=(e,o)=>{return(n=C,r=e=>e.key===o,((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return d.some(r);if(o(r,n))break}return d.none()})(n,r,c)).fold((()=>((e,o)=>{const n=e.plugins[o].getMetadata;if(l(n)){const e=n();return{name:e.name,html:t(e)}}return{name:o,html:o}})(e,o)),(e=>{const o="premium"===e.type?`${e.name}*`:e.name;return{name:o,html:t({name:o,url:`https://www.tiny.cloud/docs/tinymce/6/${e.slug}/`})}}));var n,r},n=e=>{const t=(e=>{const t=f(e.plugins),o=a(e);return i(o)?t:p(t,(e=>!(((e,t)=>m.call(e,t))(o,e)>-1)))})(e),n=h(g(t,(t=>o(e,t))),((e,t)=>e.name.localeCompare(t.name))),r=g(n,(e=>"<li>"+e.html+"</li>")),s=r.length,l=r.join("");return"<p><b>"+x.translate(["Plugins installed ({0}):",s])+"</b></p><ul>"+l+"</ul>"},r={type:"htmlpanel",presets:"document",html:[(e=>null==e?"":'<div data-mce-tabstop="1" tabindex="-1">'+n(e)+"</div>")(e),(()=>{const e=p(C,(({type:e})=>"premium"===e)),t=h(g(e,(e=>e.name)),((e,t)=>e.localeCompare(t))),o=g(t,(e=>`<li>${e}</li>`)).join("");return'<div data-mce-tabstop="1" tabindex="-1"><p><b>'+x.translate("Premium plugins:")+"</b></p><ul>"+o+'<li class="tox-help__more-link" "><a href="https://www.tiny.cloud/pricing/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">'+x.translate("Learn more...")+"</a></li></ul></div>"})()].join("")};return{name:"plugins",title:"Plugins",items:[r]}};var z=tinymce.util.Tools.resolve("tinymce.EditorManager");const O=(e,t)=>()=>{const{tabs:n,names:a}=((e,t)=>{const n=_(),a={name:"keyboardnav",title:"Keyboard Navigation",items:[{type:"htmlpanel",presets:"document",html:"<h1>Editor UI keyboard navigation</h1>\n\n<h2>Activating keyboard navigation</h2>\n\n<p>The sections of the outer UI of the editor - the menubar, toolbar, sidebar and footer - are all keyboard navigable. As such, there are multiple ways to activate keyboard navigation:</p>\n<ul>\n <li>Focus the menubar: Alt + F9 (Windows) or &#x2325;F9 (MacOS)</li>\n <li>Focus the toolbar: Alt + F10 (Windows) or &#x2325;F10 (MacOS)</li>\n <li>Focus the footer: Alt + F11 (Windows) or &#x2325;F11 (MacOS)</li>\n</ul>\n\n<p>Focusing the menubar or toolbar will start keyboard navigation at the first item in the menubar or toolbar, which will be highlighted with a gray background. Focusing the footer will start keyboard navigation at the first item in the element path, which will be highlighted with an underline. </p>\n\n<h2>Moving between UI sections</h2>\n\n<p>When keyboard navigation is active, pressing tab will move the focus to the next major section of the UI, where applicable. These sections are:</p>\n<ul>\n <li>the menubar</li>\n <li>each group of the toolbar </li>\n <li>the sidebar</li>\n <li>the element path in the footer </li>\n <li>the wordcount toggle button in the footer </li>\n <li>the branding link in the footer </li>\n <li>the editor resize handle in the footer</li>\n</ul>\n\n<p>Pressing shift + tab will move backwards through the same sections, except when moving from the footer to the toolbar. Focusing the element path then pressing shift + tab will move focus to the first toolbar group, not the last.</p>\n\n<h2>Moving within UI sections</h2>\n\n<p>Keyboard navigation within UI sections can usually be achieved using the left and right arrow keys. This includes:</p>\n<ul>\n <li>moving between menus in the menubar</li>\n <li>moving between buttons in a toolbar group</li>\n <li>moving between items in the element path</li>\n</ul>\n\n<p>In all these UI sections, keyboard navigation will cycle within the section. For example, focusing the last button in a toolbar group then pressing right arrow will move focus to the first item in the same toolbar group. </p>\n\n<h1>Executing buttons</h1>\n\n<p>To execute a button, navigate the selection to the desired button and hit space or enter.</p>\n\n<h1>Opening, navigating and closing menus</h1>\n\n<p>When focusing a menubar button or a toolbar button with a menu, pressing space, enter or down arrow will open the menu. When the menu opens the first item will be selected. To move up or down the menu, press the up or down arrow key respectively. This is the same for submenus, which can also be opened and closed using the left and right arrow keys.</p>\n\n<p>To close any active menu, hit the escape key. When a menu is closed the selection will be restored to its previous selection. This also works for closing submenus.</p>\n\n<h1>Context toolbars and menus</h1>\n\n<p>To focus an open context toolbar such as the table context toolbar, press Ctrl + F9 (Windows) or &#x2303;F9 (MacOS).</p>\n\n<p>Context toolbar navigation is the same as toolbar navigation, and context menu navigation is the same as standard menu navigation.</p>\n\n<h1>Dialog navigation</h1>\n\n<p>There are two types of dialog UIs in TinyMCE: tabbed dialogs and non-tabbed dialogs.</p>\n\n<p>When a non-tabbed dialog is opened, the first interactive component in the dialog will be focused. Users can navigate between interactive components by pressing tab. This includes any footer buttons. Navigation will cycle back to the first dialog component if tab is pressed while focusing the last component in the dialog. Pressing shift + tab will navigate backwards.</p>\n\n<p>When a tabbed dialog is opened, the first button in the tab menu is focused. Pressing tab will navigate to the first interactive component in that tab, and will cycle through the tab’s components, the footer buttons, then back to the tab button. To switch to another tab, focus the tab button for the current tab, then use the arrow keys to cycle through the tab buttons.</p>"}]},i=S(e),l=(()=>{var e,t;const o='<a href="https://www.tiny.cloud/docs/tinymce/6/changelog/?utm_campaign=editor_referral&utm_medium=help_dialog&utm_source=tinymce" rel="noopener" target="_blank">TinyMCE '+(e=z.majorVersion,t=z.minorVersion,(0===e.indexOf("@")?"X.X.X":e+"."+t)+"</a>");return{name:"versions",title:"Version",items:[{type:"htmlpanel",html:"<p>"+x.translate(["You are using {0}",o])+"</p>",presets:"document"}]}})(),c={[n.name]:n,[a.name]:a,[i.name]:i,[l.name]:l,...t.get()};return d.from(r(e)).fold((()=>(e=>{const t=f(e),o=t.indexOf("versions");return-1!==o&&(t.splice(o,1),t.push("versions")),{tabs:e,names:t}})(c)),(e=>((e,t)=>{const n={},r=g(e,(e=>{var r;if(s(e))return b(t,e)&&(n[e]=t[e]),e;{const t=null!==(r=e.name)&&void 0!==r?r:o("tab-name");return n[t]=e,t}}));return{tabs:n,names:r}})(e,c)))})(e,t),i={type:"tabpanel",tabs:(e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t})(g(a,(e=>{return b(t=n,o=e)?d.from(t[o]):d.none();var t,o})))};e.windowManager.open({title:"Help",size:"normal",body:i,buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{}})};e.add("help",(e=>{const t=(e=>{let t={};return{get:()=>t,set:e=>{t=e}}})(),n=(e=>({addTab:t=>{var n;const r=null!==(n=t.name)&&void 0!==n?n:o("tab-name"),a=e.get();a[r]=t,e.set(a)}}))(t);(e=>{(0,e.options.register)("help_tabs",{processor:"array"})})(e);const r=O(e,t);return((e,t)=>{e.ui.registry.addButton("help",{icon:"help",tooltip:"Help",onAction:t}),e.ui.registry.addMenuItem("help",{text:"Help",icon:"help",shortcut:"Alt+0",onAction:t})})(e,r),((e,t)=>{e.addCommand("mceHelp",t)})(e,r),e.shortcuts.add("Alt+0","Open help dialog","mceHelp"),n}))}()},72170:function(e,t,o){o(53302)},53302:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=Object.getPrototypeOf,o=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},n=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&o(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,r=e=>t=>typeof t===e,a=n("string"),s=n("object"),i=e=>((e,n)=>s(e)&&o(e,n,((e,o)=>t(e)===o)))(e,Object),l=n("array"),c=(null,e=>null===e);const d=r("boolean"),u=e=>!(e=>null==e)(e),m=r("function"),g=r("number"),p=()=>{};class h{constructor(e,t){this.tag=e,this.value=t}static some(e){return new h(!0,e)}static none(){return h.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?h.some(e(this.value)):h.none()}bind(e){return this.tag?e(this.value):h.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:h.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return u(e)?h.some(e):h.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}h.singletonNone=new h(!1);const f=Object.keys,y=Object.hasOwnProperty,b=(e,t)=>y.call(e,t),v=Array.prototype.push,k=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);v.apply(t,e[o])}return t};"undefined"!=typeof window?window:Function("return this;")();const w=(e,t,o)=>{((e,t,o)=>{if(!(a(o)||d(o)||g(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)},_=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},x=_;var C=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),S=tinymce.util.Tools.resolve("tinymce.util.URI");const z=e=>e.length>0,O=e=>t=>t.options.get(e),T=O("image_dimensions"),E=O("image_advtab"),A=O("image_uploadtab"),M=O("image_prepend_url"),N=O("image_class_list"),R=O("image_description"),D=O("image_title"),B=O("image_caption"),L=O("image_list"),I=O("a11y_advanced_options"),H=O("automatic_uploads"),P=(e,t)=>Math.max(parseInt(e,10),parseInt(t,10)),F=e=>(e&&(e=e.replace(/px$/,"")),e),j=e=>(e.length>0&&/^[0-9]+$/.test(e)&&(e+="px"),e),V=e=>"IMG"===e.nodeName&&(e.hasAttribute("data-mce-object")||e.hasAttribute("data-mce-placeholder")),Z=(e,t)=>{const o=e.options.get;return S.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")})},U=C.DOM,q=e=>e.style.marginLeft&&e.style.marginRight&&e.style.marginLeft===e.style.marginRight?F(e.style.marginLeft):"",W=e=>e.style.marginTop&&e.style.marginBottom&&e.style.marginTop===e.style.marginBottom?F(e.style.marginTop):"",$=e=>e.style.borderWidth?F(e.style.borderWidth):"",G=(e,t)=>{var o;return e.hasAttribute(t)&&null!==(o=e.getAttribute(t))&&void 0!==o?o:""},K=e=>null!==e.parentNode&&"FIGURE"===e.parentNode.nodeName,Y=(e,t,o)=>{""===o||null===o?e.removeAttribute(t):e.setAttribute(t,o)},X=(e,t)=>{const o=e.getAttribute("style"),n=t(null!==o?o:"");n.length>0?(e.setAttribute("style",n),e.setAttribute("data-mce-style",n)):e.removeAttribute("style")},J=(e,t)=>(e,o,n)=>{const r=e.style;r[o]?(r[o]=j(n),X(e,t)):Y(e,o,n)},Q=(e,t)=>e.style[t]?F(e.style[t]):G(e,t),ee=(e,t)=>{const o=j(t);e.style.marginLeft=o,e.style.marginRight=o},te=(e,t)=>{const o=j(t);e.style.marginTop=o,e.style.marginBottom=o},oe=(e,t)=>{const o=j(t);e.style.borderWidth=o},ne=(e,t)=>{e.style.borderStyle=t},re=e=>{var t;return null!==(t=e.style.borderStyle)&&void 0!==t?t:""},ae=e=>u(e)&&"FIGURE"===e.nodeName,se=e=>0===U.getAttrib(e,"alt").length&&"presentation"===U.getAttrib(e,"role"),ie=e=>se(e)?"":G(e,"alt"),le=(e,t)=>{var o;const n=document.createElement("img");return Y(n,"style",t.style),(q(n)||""!==t.hspace)&&ee(n,t.hspace),(W(n)||""!==t.vspace)&&te(n,t.vspace),($(n)||""!==t.border)&&oe(n,t.border),(re(n)||""!==t.borderStyle)&&ne(n,t.borderStyle),e(null!==(o=n.getAttribute("style"))&&void 0!==o?o:"")},ce=(e,t)=>({src:G(t,"src"),alt:ie(t),title:G(t,"title"),width:Q(t,"width"),height:Q(t,"height"),class:G(t,"class"),style:e(G(t,"style")),caption:K(t),hspace:q(t),vspace:W(t),border:$(t),borderStyle:re(t),isDecorative:se(t)}),de=(e,t,o,n,r)=>{o[n]!==t[n]&&r(e,n,String(o[n]))},ue=(e,t,o)=>{if(o){U.setAttrib(e,"role","presentation");const t=x(e);w(t,"alt","")}else{if(c(t)){"alt",x(e).dom.removeAttribute("alt")}else{const o=x(e);w(o,"alt",t)}"presentation"===U.getAttrib(e,"role")&&U.setAttrib(e,"role","")}},me=(e,t)=>(o,n,r)=>{e(o,r),X(o,t)},ge=(e,t,o)=>{const n=ce(e,o);de(o,n,t,"caption",((e,t,o)=>(e=>{K(e)?(e=>{const t=e.parentNode;u(t)&&(U.insertAfter(e,t),U.remove(t))})(e):(e=>{const t=U.create("figure",{class:"image"});U.insertAfter(t,e),t.appendChild(e),t.appendChild(U.create("figcaption",{contentEditable:"true"},"Caption")),t.contentEditable="false"})(e)})(e))),de(o,n,t,"src",Y),de(o,n,t,"title",Y),de(o,n,t,"width",J(0,e)),de(o,n,t,"height",J(0,e)),de(o,n,t,"class",Y),de(o,n,t,"style",me(((e,t)=>Y(e,"style",t)),e)),de(o,n,t,"hspace",me(ee,e)),de(o,n,t,"vspace",me(te,e)),de(o,n,t,"border",me(oe,e)),de(o,n,t,"borderStyle",me(ne,e)),((e,t,o)=>{o.alt===t.alt&&o.isDecorative===t.isDecorative||ue(e,o.alt,o.isDecorative)})(o,n,t)},pe=(e,t)=>{const o=(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})(e.dom.styles.parse(t)),n=e.dom.styles.parse(e.dom.styles.serialize(o));return e.dom.styles.serialize(n)},he=e=>{const t=e.selection.getNode(),o=e.dom.getParent(t,"figure.image");return o?e.dom.select("img",o)[0]:t&&("IMG"!==t.nodeName||V(t))?null:t},fe=(e,t)=>{var o;const n=e.dom,r=((t,o)=>{const n={};var r;return((e,t,o,n)=>{((e,t)=>{const o=f(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(t,((t,o)=>!e.schema.isValidChild(o,"figure")),(r=n,(e,t)=>{r[t]=e}),p),n})(e.schema.getTextBlockElements()),a=n.getParent(t.parentNode,(e=>{return t=r,o=e.nodeName,b(t,o)&&void 0!==t[o]&&null!==t[o];var t,o}),e.getBody());return a&&null!==(o=n.split(a,t))&&void 0!==o?o:t},ye=(e,t)=>{const o=((t,o)=>{const n=document.createElement("img");if(ge((t=>pe(e,t)),{...o,caption:!1},n),ue(n,o.alt,o.isDecorative),o.caption){const e=U.create("figure",{class:"image"});return e.appendChild(n),e.appendChild(U.create("figcaption",{contentEditable:"true"},"Caption")),e.contentEditable="false",e}return n})(0,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];if(e.dom.setAttrib(n,"data-mce-id",null),ae(n)){const t=fe(e,n);e.selection.select(t)}else e.selection.select(n)},be=(e,t)=>{const o=he(e);if(o){const n={...ce((t=>pe(e,t)),o),...t},r=((e,t)=>{const o=t.src;return{...t,src:Z(e,o)?o:""}})(e,n);n.src?((e,t)=>{const o=he(e);if(o)if(ge((t=>pe(e,t)),t,o),((e,t)=>{e.dom.setAttrib(t,"src",t.getAttribute("src"))})(e,o),ae(o.parentNode)){const t=o.parentNode;fe(e,t),e.selection.select(o.parentNode)}else e.selection.select(o),((e,t,o)=>{const n=()=>{o.onload=o.onerror=null,e.selection&&(e.selection.select(o),e.nodeChanged())};o.onload=()=>{t.width||t.height||!T(e)||e.dom.setAttribs(o,{width:String(o.clientWidth),height:String(o.clientHeight)}),n()},o.onerror=n})(e,t,o)})(e,r):((e,t)=>{if(t){const o=e.dom.is(t.parentNode,"figure.image")?t.parentNode:t;e.dom.remove(o),e.focus(),e.nodeChanged(),e.dom.isEmpty(e.getBody())&&(e.setContent(""),e.selection.setCursorLocation())}})(e,o)}else t.src&&ye(e,{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1,...t})},ve=(ke=(e,t)=>i(e)&&i(t)?ve(e,t):t,(...e)=>{if(0===e.length)throw new Error("Can't merge zero objects");const t={};for(let o=0;o<e.length;o++){const n=e[o];for(const e in n)b(n,e)&&(t[e]=ke(t[e],n[e]))}return t});var ke,we=tinymce.util.Tools.resolve("tinymce.util.ImageUploader"),_e=tinymce.util.Tools.resolve("tinymce.util.Tools");const xe=e=>a(e.value)?e.value:"",Ce=(e,t)=>{const o=[];return _e.each(e,(e=>{const n=(e=>a(e.text)?e.text:a(e.title)?e.title:"")(e);if(void 0!==e.menu){const r=Ce(e.menu,t);o.push({text:n,items:r})}else{const r=t(e);o.push({text:n,value:r})}})),o},Se=(e=xe)=>t=>t?h.from(t).map((t=>Ce(t,e))):h.none(),ze=(e,t)=>((e,o)=>{for(let o=0;o<e.length;o++){const r=(e=>b(e,"items"))(n=e[o])?ze(n.items,t):n.value===t?h.some(n):h.none();if(r.isSome())return r}var n;return h.none()})(e),Oe=Se,Te=(e,t)=>e.bind((e=>ze(e,t))),Ee=e=>{const t=Oe((t=>e.convertURL(t.value||t.url||"","src"))),o=new Promise((o=>{((e,t)=>{const o=L(e);a(o)?fetch(o).then((e=>{e.ok&&e.json().then(t)})):m(o)?o(t):t(o)})(e,(e=>{o(t(e).map((e=>k([[{text:"None",value:""}],e]))))}))})),n=(w=N(e),Se(xe)(w)),r=E(e),s=A(e),i=(e=>z(e.options.get("images_upload_url")))(e),l=(e=>u(e.options.get("images_upload_handler")))(e),c=(e=>{const t=he(e);return t?ce((t=>pe(e,t)),t):{src:"",alt:"",title:"",width:"",height:"",class:"",style:"",caption:!1,hspace:"",vspace:"",border:"",borderStyle:"",isDecorative:!1}})(e),d=R(e),g=D(e),p=T(e),f=B(e),y=I(e),b=H(e),v=h.some(M(e)).filter((e=>a(e)&&e.length>0));var w;return o.then((e=>({image:c,imageList:e,classList:n,hasAdvTab:r,hasUploadTab:s,hasUploadUrl:i,hasUploadHandler:l,hasDescription:d,hasImageTitle:g,hasDimensions:p,hasImageCaption:f,prependURL:v,hasAccessibilityOptions:y,automaticUploads:b})))},Ae=e=>{const t=e.imageList.map((e=>({name:"images",type:"listbox",label:"Image list",items:e}))),o={name:"alt",type:"input",label:"Alternative description",enabled:!(e.hasAccessibilityOptions&&e.image.isDecorative)},n=e.classList.map((e=>({name:"classes",type:"listbox",label:"Class",items:e})));return k([[{name:"src",type:"urlinput",filetype:"image",label:"Source"}],t.toArray(),e.hasAccessibilityOptions&&e.hasDescription?[{type:"label",label:"Accessibility",items:[{name:"isDecorative",type:"checkbox",label:"Image is decorative"}]}]:[],e.hasDescription?[o]:[],e.hasImageTitle?[{name:"title",type:"input",label:"Image title"}]:[],e.hasDimensions?[{name:"dimensions",type:"sizeinput"}]:[],[{...(r=e.classList.isSome()&&e.hasImageCaption,r?{type:"grid",columns:2}:{type:"panel"}),items:k([n.toArray(),e.hasImageCaption?[{type:"label",label:"Caption",items:[{type:"checkbox",name:"caption",label:"Show caption"}]}]:[]])}]]);var r},Me=e=>({title:"General",name:"general",items:Ae(e)}),Ne=Ae,Re=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}),De=(e,t)=>({src:e.src.value,alt:null!==e.alt&&0!==e.alt.length||!t?e.alt:null,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}),Be=(e,t,o,n)=>{((e,t)=>{const o=t.getData();((e,t)=>/^(?:[a-zA-Z]+:)?\/\//.test(t)?h.none():e.prependURL.bind((e=>t.substring(0,e.length)!==e?h.some(e+t):h.none())))(e,o.src.value).each((e=>{t.setData({src:{value:e,meta:o.src.meta}})}))})(t,n),((e,t)=>{const o=t.getData(),n=o.src.meta;if(void 0!==n){const r=ve({},o);((e,t,o)=>{e.hasDescription&&a(o.alt)&&(t.alt=o.alt),e.hasAccessibilityOptions&&(t.isDecorative=o.isDecorative||t.isDecorative||!1),e.hasImageTitle&&a(o.title)&&(t.title=o.title),e.hasDimensions&&(a(o.width)&&(t.dimensions.width=o.width),a(o.height)&&(t.dimensions.height=o.height)),a(o.class)&&Te(e.classList,o.class).each((e=>{t.classes=e.value})),e.hasImageCaption&&d(o.caption)&&(t.caption=o.caption),e.hasAdvTab&&(a(o.style)&&(t.style=o.style),a(o.vspace)&&(t.vspace=o.vspace),a(o.border)&&(t.border=o.border),a(o.hspace)&&(t.hspace=o.hspace),a(o.borderstyle)&&(t.borderstyle=o.borderstyle))})(e,r,n),t.setData(r)}})(t,n),((e,t,o,n)=>{const r=n.getData(),a=r.src.value,s=r.src.meta||{};s.width||s.height||!t.hasDimensions||(z(a)?e.imageSize(a).then((e=>{o.open&&n.setData({dimensions:e})})).catch((e=>console.error(e))):n.setData({dimensions:{width:"",height:""}}))})(e,t,o,n),((e,t,o)=>{const n=o.getData(),r=Te(e.imageList,n.src.value);t.prevImage=r,o.setData({images:r.map((e=>e.value)).getOr("")})})(t,o,n)},Le=(e,t,o,n)=>{const r=n.getData();var a;n.block("Uploading image"),(a=r.fileinput,((e,t)=>0<e.length?h.some(e[0]):h.none())(a)).fold((()=>{n.unblock()}),(r=>{const a=URL.createObjectURL(r),s=()=>{n.unblock(),URL.revokeObjectURL(a)},i=r=>{n.setData({src:{value:r,meta:{}}}),n.showTab("general"),Be(e,t,o,n)};var l;(l=r,new Promise(((e,t)=>{const o=new FileReader;o.onload=()=>{e(o.result)},o.onerror=()=>{var e;t(null===(e=o.error)||void 0===e?void 0:e.message)},o.readAsDataURL(l)}))).then((o=>{const l=e.createBlobCache(r,a,o);t.automaticUploads?e.uploadImage(l).then((e=>{i(e.url),s()})).catch((t=>{s(),e.alertErr(t)})):(e.addToBlobCache(l),i(l.blobUri()),n.unblock())}))}))},Ie=(e,t,o)=>(n,r)=>{"src"===r.name?Be(e,t,o,n):"images"===r.name?((e,t,o,n)=>{const r=n.getData(),a=Te(t.imageList,r.images);a.each((e=>{const t=""===r.alt||o.prevImage.map((e=>e.text===r.alt)).getOr(!1);t?""===e.value?n.setData({src:e,alt:o.prevAlt}):n.setData({src:e,alt:e.text}):n.setData({src:e})})),o.prevImage=a,Be(e,t,o,n)})(e,t,o,n):"alt"===r.name?o.prevAlt=n.getData().alt:"fileinput"===r.name?Le(e,t,o,n):"isDecorative"===r.name&&n.setEnabled("alt",!n.getData().isDecorative)},He=e=>()=>{e.open=!1},Pe=e=>e.hasAdvTab||e.hasUploadUrl||e.hasUploadHandler?{type:"tabpanel",tabs:k([[Me(e)],e.hasAdvTab?[{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"}]}]}]}]:[],e.hasUploadTab&&(e.hasUploadUrl||e.hasUploadHandler)?[{title:"Upload",name:"upload",items:[{type:"dropzone",name:"fileinput"}]}]:[]])}:{type:"panel",items:Ne(e)},Fe=(e,t,o)=>n=>{const r=ve(Re(t.image),n.getData()),a={...r,style:le(o.normalizeCss,De(r,!1))};e.execCommand("mceUpdateImage",!1,De(a,t.hasAccessibilityOptions)),e.editorUpload.uploadImagesAuto(),n.close()},je=e=>t=>Z(e,t)?(e=>new Promise((t=>{const o=document.createElement("img"),n=e=>{o.onload=o.onerror=null,o.parentNode&&o.parentNode.removeChild(o),t(e)};o.onload=()=>{const e={width:P(o.width,o.clientWidth),height:P(o.height,o.clientHeight)};n(Promise.resolve(e))},o.onerror=()=>{n(Promise.reject(`Failed to get image dimensions for: ${e}`))};const r=o.style;r.visibility="hidden",r.position="fixed",r.bottom=r.left="0px",r.width=r.height="auto",document.body.appendChild(o),o.src=e})))(e.documentBaseURI.toAbsolute(t)).then((e=>({width:String(e.width),height:String(e.height)}))):Promise.resolve({width:"",height:""}),Ve=e=>(t,o,n)=>{var r;return e.editorUpload.blobCache.create({blob:t,blobUri:o,name:null===(r=t.name)||void 0===r?void 0:r.replace(/\.[^\.]+$/,""),filename:t.name,base64:n.split(",")[1]})},Ze=e=>t=>{e.editorUpload.blobCache.add(t)},Ue=e=>t=>{e.windowManager.alert(t)},qe=e=>t=>pe(e,t),We=e=>t=>e.dom.parseStyle(t),$e=e=>(t,o)=>e.dom.serializeStyle(t,o),Ge=e=>t=>we(e).upload([t],!1).then((e=>{var t;return 0===e.length?Promise.reject("Failed to upload image"):!1===e[0].status?Promise.reject(null===(t=e[0].error)||void 0===t?void 0:t.message):e[0]})),Ke=e=>{const t={imageSize:je(e),addToBlobCache:Ze(e),createBlobCache:Ve(e),alertErr:Ue(e),normalizeCss:qe(e),parseStyle:We(e),serializeStyle:$e(e),uploadImage:Ge(e)};return{open:()=>{Ee(e).then((o=>{const n=(e=>({prevImage:Te(e.imageList,e.image.src),prevAlt:e.image.alt,open:!0}))(o);return{title:"Insert/Edit Image",size:"normal",body:Pe(o),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:Re(o.image),onSubmit:Fe(e,o,t),onChange:Ie(t,o,n),onClose:He(n)}})).then(e.windowManager.open)}}},Ye=e=>{const t=e.attr("class");return u(t)&&/\bimage\b/.test(t)},Xe=e=>t=>{let o=t.length;const n=t=>{t.attr("contenteditable",e?"true":null)};for(;o--;){const r=t[o];Ye(r)&&(r.attr("contenteditable",e?"false":null),_e.each(r.getAll("figcaption"),n))}};e.add("image",(e=>{(e=>{const t=e.options.register;t("image_dimensions",{processor:"boolean",default:!0}),t("image_advtab",{processor:"boolean",default:!1}),t("image_uploadtab",{processor:"boolean",default:!0}),t("image_prepend_url",{processor:"string",default:""}),t("image_class_list",{processor:"object[]"}),t("image_description",{processor:"boolean",default:!0}),t("image_title",{processor:"boolean",default:!1}),t("image_caption",{processor:"boolean",default:!1}),t("image_list",{processor:e=>{const t=!1===e||a(e)||((e,t)=>{if(l(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1})(e,s)||m(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be false, a string, an array or a function."}},default:!1})})(e),(e=>{e.on("PreInit",(()=>{e.parser.addNodeFilter("figure",Xe(!0)),e.serializer.addNodeFilter("figure",Xe(!1))}))})(e),(e=>{e.ui.registry.addToggleButton("image",{icon:"image",tooltip:"Insert/edit image",onAction:Ke(e).open,onSetup:t=>(t.setActive(u(he(e))),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:Ke(e).open}),e.ui.registry.addContextMenu("image",{update:e=>ae(e)||"IMG"===e.nodeName&&!V(e)?["image"]:[]})})(e),(e=>{e.addCommand("mceImage",Ke(e).open),e.addCommand("mceUpdateImage",((t,o)=>{e.undoManager.transact((()=>be(e,o)))}))})(e)}))}()},73956:function(e,t,o){o(38006)},38006:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>t.options.get(e),o=t("insertdatetime_dateformat"),n=t("insertdatetime_timeformat"),r=t("insertdatetime_formats"),a=t("insertdatetime_element"),s="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),i="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),l="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),c="January February March April May June July August September October November December".split(" "),d=(e,t)=>{if((e=""+e).length<t)for(let o=0;o<t-e.length;o++)e="0"+e;return e},u=(e,t,o=new Date)=>(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+o.getFullYear())).replace("%y",""+o.getYear())).replace("%m",d(o.getMonth()+1,2))).replace("%d",d(o.getDate(),2))).replace("%H",""+d(o.getHours(),2))).replace("%M",""+d(o.getMinutes(),2))).replace("%S",""+d(o.getSeconds(),2))).replace("%I",""+((o.getHours()+11)%12+1))).replace("%p",o.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(c[o.getMonth()]))).replace("%b",""+e.translate(l[o.getMonth()]))).replace("%A",""+e.translate(i[o.getDay()]))).replace("%a",""+e.translate(s[o.getDay()]))).replace("%%","%"),m=(e,t)=>{if(a(e)){const o=u(e,t);let n;n=/%[HMSIp]/.test(t)?u(e,"%Y-%m-%dT%H:%M"):u(e,"%Y-%m-%d");const r=e.dom.getParent(e.selection.getStart(),"time");r?((e,t,o,n)=>{const r=e.dom.create("time",{datetime:o},n);e.dom.replace(r,t),e.selection.select(r,!0),e.selection.collapse(!1)})(e,r,n,o):e.insertContent('<time datetime="'+n+'">'+o+"</time>")}else e.insertContent(u(e,t))};var g=tinymce.util.Tools.resolve("tinymce.util.Tools");e.add("insertdatetime",(e=>{(e=>{const t=e.options.register;t("insertdatetime_dateformat",{processor:"string",default:e.translate("%Y-%m-%d")}),t("insertdatetime_timeformat",{processor:"string",default:e.translate("%H:%M:%S")}),t("insertdatetime_formats",{processor:"string[]",default:["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"]}),t("insertdatetime_element",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mceInsertDate",((t,n)=>{m(e,null!=n?n:o(e))})),e.addCommand("mceInsertTime",((t,o)=>{m(e,null!=o?o:n(e))}))})(e),(e=>{const t=r(e),o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})((e=>{const t=r(e);return t.length>0?t[0]:n(e)})(e)),a=t=>e.execCommand("mceInsertDate",!1,t);e.ui.registry.addSplitButton("insertdatetime",{icon:"insert-time",tooltip:"Insert date/time",select:e=>e===o.get(),fetch:o=>{o(g.map(t,(t=>({type:"choiceitem",text:u(e,t),value:t}))))},onAction:e=>{a(o.get())},onItemAction:(e,t)=>{o.set(t),a(t)}});const s=e=>()=>{o.set(e),a(e)};e.ui.registry.addNestedMenuItem("insertdatetime",{icon:"insert-time",text:"Date/time",getSubmenuItems:()=>g.map(t,(t=>({type:"menuitem",text:u(e,t),onAction:s(t)})))})})(e)}))}()},72682:function(e,t,o){o(27384)},27384:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=t("array"),s=(null,e=>null===e);const i=o("boolean"),l=e=>!(e=>null==e)(e),c=o("function"),d=(e,t)=>{if(a(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1},u=()=>{},m=(e,t)=>e===t;class g{constructor(e,t){this.tag=e,this.value=t}static some(e){return new g(!0,e)}static none(){return g.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?g.some(e(this.value)):g.none()}bind(e){return this.tag?e(this.value):g.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this: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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return l(e)?g.some(e):g.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(!1);const p=Array.prototype.indexOf,h=Array.prototype.push,f=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!a(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);h.apply(t,e[o])}return t},y=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return g.none()},b=(e,t,o=m)=>e.exists((e=>o(e,t))),v=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},k=(e,t)=>e?g.some(t):g.none(),w=e=>t=>t.options.get(e),_=w("link_assume_external_targets"),x=w("link_context_toolbar"),C=w("link_list"),S=w("link_default_target"),z=w("link_default_protocol"),O=w("link_target_list"),T=w("link_rel_list"),E=w("link_class_list"),A=w("link_title"),M=w("allow_unsafe_link_target"),N=w("link_quicklink");var R=tinymce.util.Tools.resolve("tinymce.util.Tools");const D=e=>n(e.value)?e.value:"",B=(e,t)=>{const o=[];return R.each(e,(e=>{const r=(e=>n(e.text)?e.text:n(e.title)?e.title:"")(e);if(void 0!==e.menu){const n=B(e.menu,t);o.push({text:r,items:n})}else{const n=t(e);o.push({text:r,value:n})}})),o},L=(e=D)=>t=>g.from(t).map((t=>B(t,e))),I=e=>L(D)(e),H=L,P=(e,t)=>o=>({name:e,type:"listbox",label:t,items:o}),F=D,j=Object.keys,V=Object.hasOwnProperty,Z=(e,t)=>V.call(e,t);var U=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),q=tinymce.util.Tools.resolve("tinymce.util.URI");const W=e=>l(e)&&"a"===e.nodeName.toLowerCase(),$=e=>W(e)&&!!Y(e),G=(e,t)=>{if(e.collapsed)return[];{const o=e.cloneContents(),n=o.firstChild,r=new U(n,o),a=[];let s=n;do{t(s)&&a.push(s)}while(s=r.next());return a}},K=e=>/^\w+:/i.test(e),Y=e=>{var t,o;return null!==(o=null!==(t=e.getAttribute("data-mce-href"))&&void 0!==t?t:e.getAttribute("href"))&&void 0!==o?o:""},X=(e,t)=>{const o=["noopener"],n=e?e.split(/\s+/):[],r=e=>e.filter((e=>-1===R.inArray(o,e))),a=t?(e=>(e=r(e)).length>0?e.concat(o):o)(n):r(n);return a.length>0?(e=>R.trim(e.sort().join(" ")))(a):""},J=(e,t)=>(t=t||te(e.selection.getRng())[0]||e.selection.getNode(),ae(t)?g.from(e.dom.select("a[href]",t)[0]):g.from(e.dom.getParent(t,"a[href]"))),Q=(e,t)=>J(e,t).isSome(),ee=(e,t)=>t.fold((()=>e.getContent({format:"text"})),(e=>e.innerText||e.textContent||"")).replace(/\uFEFF/g,""),te=e=>G(e,$),oe=e=>R.grep(e,$),ne=e=>oe(e).length>0,re=e=>{const t=e.schema.getTextInlineElements();if(J(e).exists((e=>e.hasAttribute("data-mce-block"))))return!1;const o=e.selection.getRng();return!!o.collapsed||0===G(o,(e=>1===e.nodeType&&!W(e)&&!Z(t,e.nodeName.toLowerCase()))).length},ae=e=>l(e)&&"FIGURE"===e.nodeName&&/\bimage\b/i.test(e.className),se=(e,t,o)=>{const n=e.selection.getNode(),r=J(e,n),a=((e,t)=>{const o={...t};if(0===T(e).length&&!M(e)){const e=X(o.rel,"_blank"===o.target);o.rel=e||null}return g.from(o.target).isNone()&&!1===O(e)&&(o.target=S(e)),o.href=((e,t)=>"http"!==t&&"https"!==t||K(e)?e:t+"://"+e)(o.href,_(e)),o})(e,(e=>{return t=["title","rel","class","target"],o=(t,o)=>(e[o].each((e=>{t[o]=e.length>0?e:null})),t),n={href:e.href},((e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)})(t,((e,t)=>{n=o(n,e)})),n;var t,o,n})(o));e.undoManager.transact((()=>{o.href===t.href&&t.attach(),r.fold((()=>{((e,t,o,n)=>{const r=e.dom;ae(t)?ue(r,t,n):o.fold((()=>{e.execCommand("mceInsertLink",!1,n)}),(t=>{e.insertContent(r.createHTML("a",n,r.encode(t)))}))})(e,n,o.text,a)}),(t=>{e.focus(),((e,t,o,n)=>{o.each((e=>{Z(t,"innerText")?t.innerText=e:t.textContent=e})),e.dom.setAttribs(t,n),e.selection.select(t)})(e,t,o.text,a)}))}))},ie=e=>{const{class:t,href:o,rel:n,target:r,text:a,title:i}=e;return((e,t)=>{const o={};var n;return((e,t,o,n)=>{((e,t)=>{const o=j(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,((e,t)=>!1===s(e)),(n=o,(e,t)=>{n[t]=e}),u),o})({class:t.getOrNull(),href:o,rel:n.getOrNull(),target:r.getOrNull(),text:a.getOrNull(),title:i.getOrNull()})},le=(e,t,o)=>{const n=((e,t)=>{const o=e.options.get,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")},r=t.href;return{...t,href:q.isDomSafe(r,"a",n)?r:""}})(e,o);e.hasPlugin("rtc",!0)?e.execCommand("createlink",!1,ie(n)):se(e,t,n)},ce=e=>{e.hasPlugin("rtc",!0)?e.execCommand("unlink"):(e=>{e.undoManager.transact((()=>{const t=e.selection.getNode();ae(t)?de(e,t):(e=>{const t=e.dom,o=e.selection,n=o.getBookmark(),r=o.getRng().cloneRange(),a=t.getParent(r.startContainer,"a[href]",e.getBody()),s=t.getParent(r.endContainer,"a[href]",e.getBody());a&&r.setStartBefore(a),s&&r.setEndAfter(s),o.setRng(r),e.execCommand("unlink"),o.moveToBookmark(n)})(e),e.focus()}))})(e)},de=(e,t)=>{var o;const n=e.dom.select("img",t)[0];if(n){const r=e.dom.getParents(n,"a[href]",t)[0];r&&(null===(o=r.parentNode)||void 0===o||o.insertBefore(n,r),e.dom.remove(r))}},ue=(e,t,o)=>{var n;const r=e.select("img",t)[0];if(r){const t=e.create("a",o);null===(n=r.parentNode)||void 0===n||n.insertBefore(t,r),t.appendChild(r)}},me=(e,t)=>y(t,(t=>(e=>{return Z(t=e,o="items")&&void 0!==t[o]&&null!==t[o];var t,o})(t)?me(e,t.items):k(t.value===e,t))),ge=(e,t)=>{const o={text:e.text,title:e.title},n=(e,n)=>{const r=(a=t,s=n,"link"===s?a.link:"anchor"===s?a.anchor:g.none()).getOr([]);var a,s;return((e,t,o,n)=>{const r=n[t],a=e.length>0;return void 0!==r?me(r,o).map((t=>({url:{value:t.value,meta:{text:a?e:t.text,attach:u}},text:a?e:t.text}))):g.none()})(o.text,n,r,e)};return{onChange:(e,t)=>{const r=t.name;return"url"===r?(e=>{const t=(n=e.url,k(o.text.length<=0,g.from(null===(r=n.meta)||void 0===r?void 0:r.text).getOr(n.value)));var n,r;const a=(e=>{var t;return k(o.title.length<=0,g.from(null===(t=e.meta)||void 0===t?void 0:t.title).getOr(""))})(e.url);return t.isSome()||a.isSome()?g.some({...t.map((e=>({text:e}))).getOr({}),...a.map((e=>({title:e}))).getOr({})}):g.none()})(e()):((e,t)=>p.call(e,t))(["anchor","link"],r)>-1?n(e(),r):"text"===r||"title"===r?(o[r]=e()[r],g.none()):g.none()}}};var pe=tinymce.util.Tools.resolve("tinymce.util.Delay");const he=e=>{const t=e.href;return t.indexOf("@")>0&&-1===t.indexOf("/")&&-1===t.indexOf("mailto:")?g.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})}):g.none()},fe=(e,t)=>o=>{const n=o.href;return 1===e&&!K(n)||0===e&&/^\s*www(\.|\d\.)/i.test(n)?g.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})}):g.none()},ye=e=>{const t=e.dom.select("a:not([href])"),o=f(((e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n})(t,(e=>{const t=e.name||e.id;return t?[{text:t,value:"#"+t}]:[]})));return o.length>0?g.some([{text:"None",value:""}].concat(o)):g.none()},be=e=>{const t=E(e);return t.length>0?I(t):g.none()},ve=e=>{try{return g.some(JSON.parse(e))}catch(e){return g.none()}},ke=(e,t)=>{const o=T(e);if(o.length>0){const n=b(t,"_blank"),r=e=>X(F(e),n);return(!1===M(e)?H(r):I)(o)}return g.none()},we=[{text:"Current window",value:""},{text:"New window",value:"_blank"}],_e=e=>{const t=O(e);return a(t)?I(t).orThunk((()=>g.some(we))):!1===t?g.none():g.some(we)},xe=(e,t,o)=>{const n=e.getAttrib(t,o);return null!==n&&n.length>0?g.some(n):g.none()},Ce=(e,t)=>(e=>{const t=t=>e.convertURL(t.value||t.url||"","href"),o=C(e);return new Promise((e=>{n(o)?fetch(o).then((e=>e.ok?e.text().then(ve):Promise.reject())).then(e,(()=>e(g.none()))):c(o)?o((t=>e(g.some(t)))):e(g.from(o))})).then((e=>e.bind(H(t)).map((e=>e.length>0?[{text:"None",value:""}].concat(e):e))))})(e).then((o=>{const n=((e,t)=>{const o=e.dom,n=re(e)?g.some(ee(e.selection,t)):g.none(),r=t.bind((e=>g.from(o.getAttrib(e,"href")))),a=t.bind((e=>g.from(o.getAttrib(e,"target")))),s=t.bind((e=>xe(o,e,"rel"))),i=t.bind((e=>xe(o,e,"class")));return{url:r,text:n,title:t.bind((e=>xe(o,e,"title"))),target:a,rel:s,linkClass:i}})(e,t);return{anchor:n,catalogs:{targets:_e(e),rels:ke(e,n.target),classes:be(e),anchor:ye(e),link:o},optNode:t,flags:{titleEnabled:A(e)}}})),Se=e=>{const t=(e=>{const t=J(e);return Ce(e,t)})(e);t.then((t=>{const o=((e,t)=>o=>{const n=o.getData();if(!n.url.value)return ce(e),void o.close();const r=e=>g.from(n[e]).filter((o=>!b(t.anchor[e],o))),a={href:n.url.value,text:r("text"),target:r("target"),rel:r("rel"),class:r("linkClass"),title:r("title")},s={href:n.url.value,attach:void 0!==n.url.meta&&n.url.meta.attach?n.url.meta.attach:u};((e,t)=>y([he,fe(_(e),z(e))],(e=>e(t))).fold((()=>Promise.resolve(t)),(o=>new Promise((n=>{((e,t,o)=>{const n=e.selection.getRng();pe.setEditorTimeout(e,(()=>{e.windowManager.confirm(t,(t=>{e.selection.setRng(n),o(t)}))}))})(e,o.message,(e=>{n(e?o.preprocess(t):t)}))})))))(e,a).then((t=>{le(e,s,t)})),o.close()})(e,t);return((e,t,o)=>{const n=e.anchor.text.map((()=>({name:"text",type:"input",label:"Text to display"}))).toArray(),r=e.flags.titleEnabled?[{name:"title",type:"input",label:"Title"}]:[],a=((e,t)=>{const o=e.anchor,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("")}})(e,g.from(S(o))),s=e.catalogs,i=ge(a,s);return{title:"Insert/Edit Link",size:"normal",body:{type:"panel",items:f([[{name:"url",type:"urlinput",filetype:"file",label:"URL"}],n,r,v([s.anchor.map(P("anchor","Anchors")),s.rels.map(P("rel","Rel")),s.targets.map(P("target","Open link in...")),s.link.map(P("link","Link list")),s.classes.map(P("linkClass","Class"))])])},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:a,onChange:(e,{name:t})=>{i.onChange(e.getData,{name:t}).each((t=>{e.setData(t)}))},onSubmit:t}})(t,o,e)})).then((t=>{e.windowManager.open(t)}))};var ze=tinymce.util.Tools.resolve("tinymce.util.VK");const Oe=(e,t)=>e.dom.getParent(t,"a[href]"),Te=e=>Oe(e,e.selection.getStart()),Ee=(e,t)=>{if(t){const o=Y(t);if(/^#/.test(o)){const t=e.dom.select(o);t.length&&e.selection.scrollIntoView(t[0],!0)}else(e=>{const t=document.createElement("a");t.target="_blank",t.href=e,t.rel="noreferrer noopener";const o=document.createEvent("MouseEvents");o.initMouseEvent("click",!0,!0,window,0,0,0,0,0,!1,!1,!1,!1,0,null),((e,t)=>{document.body.appendChild(e),e.dispatchEvent(t),document.body.removeChild(e)})(t,o)})(t.href)}},Ae=e=>()=>{e.execCommand("mceLink",!1,{dialog:!0})},Me=e=>()=>{Ee(e,Te(e))},Ne=(e,t)=>(e.on("NodeChange",t),()=>e.off("NodeChange",t)),Re=e=>t=>{const o=()=>t.setActive(!e.mode.isReadOnly()&&Q(e,e.selection.getNode()));return o(),Ne(e,o)},De=e=>t=>{const o=()=>t.setEnabled((e=>1===(e.selection.isCollapsed()?oe(e.dom.getParents(e.selection.getStart())):te(e.selection.getRng())).length)(e));return o(),Ne(e,o)},Be=e=>t=>{const o=t=>{return ne(t)||(o=e.selection.getRng(),te(o).length>0);var o},n=e.dom.getParents(e.selection.getStart());return t.setEnabled(o(n)),Ne(e,(e=>t.setEnabled(o(e.parents))))};e.add("link",(e=>{(e=>{const t=e.options.register;t("link_assume_external_targets",{processor:e=>{const t=n(e)||i(e);return t?!0===e?{value:1,valid:t}:"http"===e||"https"===e?{value:e,valid:t}:{value:0,valid:t}:{valid:!1,message:"Must be a string or a boolean."}},default:!1}),t("link_context_toolbar",{processor:"boolean",default:!1}),t("link_list",{processor:e=>n(e)||c(e)||d(e,r)}),t("link_default_target",{processor:"string"}),t("link_default_protocol",{processor:"string",default:"https"}),t("link_target_list",{processor:e=>i(e)||d(e,r),default:!0}),t("link_rel_list",{processor:"object[]",default:[]}),t("link_class_list",{processor:"object[]",default:[]}),t("link_title",{processor:"boolean",default:!0}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("link_quicklink",{processor:"boolean",default:!1})})(e),(e=>{e.ui.registry.addToggleButton("link",{icon:"link",tooltip:"Insert/edit link",onAction:Ae(e),onSetup:Re(e)}),e.ui.registry.addButton("openlink",{icon:"new-tab",tooltip:"Open link",onAction:Me(e),onSetup:De(e)}),e.ui.registry.addButton("unlink",{icon:"unlink",tooltip:"Remove link",onAction:()=>ce(e),onSetup:Be(e)})})(e),(e=>{e.ui.registry.addMenuItem("openlink",{text:"Open link",icon:"new-tab",onAction:Me(e),onSetup:De(e)}),e.ui.registry.addMenuItem("link",{icon:"link",text:"Link...",shortcut:"Meta+K",onAction:Ae(e)}),e.ui.registry.addMenuItem("unlink",{icon:"unlink",text:"Remove link",onAction:()=>ce(e),onSetup:Be(e)})})(e),(e=>{e.ui.registry.addContextMenu("link",{update:t=>e.dom.isEditable(t)?ne(e.dom.getParents(t,"a"))?"link unlink openlink":"link":""})})(e),(e=>{const t=t=>{const o=e.selection.getNode();return t.setEnabled(Q(e,o)),u};e.ui.registry.addContextForm("quicklink",{launch:{type:"contextformtogglebutton",icon:"link",tooltip:"Link",onSetup:Re(e)},label:"Link",predicate:t=>x(e)&&Q(e,t),initValue:()=>J(e).fold((()=>""),Y),commands:[{type:"contextformtogglebutton",icon:"link",tooltip:"Link",primary:!0,onSetup:t=>{const o=e.selection.getNode();return t.setActive(Q(e,o)),Re(e)(t)},onAction:t=>{const o=t.getValue(),n=(t=>{const o=J(e),n=re(e);if(o.isNone()&&n){const n=ee(e.selection,o);return k(0===n.length,t)}return g.none()})(o);le(e,{href:o,attach:u},{href:o,text:n,title:g.none(),rel:g.none(),target:g.none(),class:g.none()}),(e=>{e.selection.collapse(!1)})(e),t.hide()}},{type:"contextformbutton",icon:"unlink",tooltip:"Remove link",onSetup:t,onAction:t=>{ce(e),t.hide()}},{type:"contextformbutton",icon:"new-tab",tooltip:"Open link",onSetup:t,onAction:t=>{Me(e)(),t.hide()}}]})})(e),(e=>{e.on("click",(t=>{const o=Oe(e,t.target);o&&ze.metaKeyPressed(t)&&(t.preventDefault(),Ee(e,o))})),e.on("keydown",(t=>{if(!t.isDefaultPrevented()&&13===t.keyCode&&(e=>!0===e.altKey&&!1===e.shiftKey&&!1===e.ctrlKey&&!1===e.metaKey)(t)){const o=Te(e);o&&(t.preventDefault(),Ee(e,o))}}))})(e),(e=>{e.addCommand("mceLink",((t,o)=>{!0!==(null==o?void 0:o.dialog)&&N(e)?e.dispatch("contexttoolbar-show",{toolbarKey:"quicklink"}):Se(e)}))})(e),(e=>{e.addShortcut("Meta+K","",(()=>{e.execCommand("mceLink")}))})(e)}))}()},1236:function(e,t,o){o(77585)},77585:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=t("array"),s=o("boolean"),i=e=>!(e=>null==e)(e),l=o("function"),c=o("number"),d=()=>{},u=(e,t)=>e===t,m=e=>t=>!e(t),g=(!1,()=>false);class p{constructor(e,t){this.tag=e,this.value=t}static some(e){return new p(!0,e)}static none(){return p.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?p.some(e(this.value)):p.none()}bind(e){return this.tag?e(this.value):p.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:p.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return i(e)?p.some(e):p.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}p.singletonNone=new p(!1);const h=Array.prototype.slice,f=Array.prototype.indexOf,y=Array.prototype.push,b=(e,t)=>{return o=e,n=t,f.call(o,n)>-1;var o,n},v=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return!0;return!1},k=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},w=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},_=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},x=(e,t,o)=>(w(e,((e,n)=>{o=t(o,e,n)})),o),C=(e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return p.some(r);if(o(r,n))break}return p.none()},S=(e,t)=>C(e,t,g),z=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!a(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);y.apply(t,e[o])}return t})(k(e,t)),O=e=>{const t=h.call(e,0);return t.reverse(),t},T=(e,t)=>t>=0&&t<e.length?p.some(e[t]):p.none(),E=e=>T(e,0),A=e=>T(e,e.length-1),M=(e,t)=>{const o=[],n=l(t)?e=>v(o,(o=>t(o,e))):e=>b(o,e);for(let t=0,r=e.length;t<r;t++){const r=e[t];n(r)||o.push(r)}return o},N=(e,t,o=u)=>e.exists((e=>o(e,t))),R=(e,t,o)=>e.isSome()&&t.isSome()?p.some(o(e.getOrDie(),t.getOrDie())):p.none(),D=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},B=(e,t)=>{const o=(t||document).createElement(e);return D(o)},L=D,I=(e,t)=>e.dom===t.dom;"undefined"!=typeof window?window:Function("return this;")();const H=e=>e.dom.nodeName.toLowerCase(),P=(1,e=>1===(e=>e.dom.nodeType)(e));const F=e=>t=>P(t)&&H(t)===e,j=e=>p.from(e.dom.parentNode).map(L),V=e=>k(e.dom.childNodes,L),Z=(e,t)=>{const o=e.dom.childNodes;return p.from(o[t]).map(L)},U=e=>Z(e,0),q=e=>Z(e,e.dom.childNodes.length-1),W=(e,t,o)=>{let n=e.dom;const r=l(o)?o:g;for(;n.parentNode;){n=n.parentNode;const e=L(n);if(t(e))return p.some(e);if(r(e))break}return p.none()},$=(e,t,o)=>((e,t,o,n,r)=>n(o)?p.some(o):l(r)&&r(o)?p.none():t(o,n,r))(0,W,e,t,o),G=(e,t)=>{j(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},K=(e,t)=>{e.dom.appendChild(t.dom)},Y=(e,t)=>{w(t,(t=>{K(e,t)}))},X=e=>{e.dom.textContent="",w(V(e),(e=>{J(e)}))},J=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)};var Q=tinymce.util.Tools.resolve("tinymce.dom.RangeUtils"),ee=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker"),te=tinymce.util.Tools.resolve("tinymce.util.VK");const oe=e=>k(e,L),ne=Object.keys,re=(e,t)=>{const o=ne(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},ae=(e,t)=>{const o=e.dom;re(t,((e,t)=>{((e,t,o)=>{if(!(n(o)||s(o)||c(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(o,t,e)}))},se=e=>x(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}),ie=e=>((e,t)=>L(e.dom.cloneNode(!0)))(e),le=(e,t)=>{const o=((e,t)=>{const o=B(t),n=se(e);return ae(o,n),o})(e,t);var n,r;r=o,(e=>p.from(e.dom.nextSibling).map(L))(n=e).fold((()=>{j(n).each((e=>{K(e,r)}))}),(e=>{G(e,r)}));const a=V(e);return Y(o,a),J(e),o};var ce=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),de=tinymce.util.Tools.resolve("tinymce.util.Tools");const ue=e=>t=>i(t)&&t.nodeName.toLowerCase()===e,me=e=>t=>i(t)&&e.test(t.nodeName),ge=e=>i(e)&&3===e.nodeType,pe=e=>i(e)&&1===e.nodeType,he=me(/^(OL|UL|DL)$/),fe=me(/^(OL|UL)$/),ye=ue("ol"),be=me(/^(LI|DT|DD)$/),ve=me(/^(DT|DD)$/),ke=me(/^(TH|TD)$/),we=ue("br"),_e=(e,t)=>i(t)&&t.nodeName in e.schema.getTextBlockElements(),xe=(e,t)=>i(e)&&e.nodeName in t,Ce=(e,t)=>i(t)&&t.nodeName in e.schema.getVoidElements(),Se=(e,t,o)=>{const n=e.isEmpty(t);return!(o&&e.select("span[data-mce-type=bookmark]",t).length>0)&&n},ze=(e,t)=>e.isChildOf(t,e.getRoot()),Oe=e=>t=>t.options.get(e),Te=Oe("lists_indent_on_tab"),Ee=Oe("forced_root_block"),Ae=Oe("forced_root_block_attrs"),Me=(e,t)=>{const o=e.dom,n=e.schema.getBlockElements(),r=o.createFragment(),a=Ee(e),s=Ae(e);let i,l,c=!1;for(l=o.create(a,s),xe(t.firstChild,n)||r.appendChild(l);i=t.firstChild;){const e=i.nodeName;c||"SPAN"===e&&"bookmark"===i.getAttribute("data-mce-type")||(c=!0),xe(i,n)?(r.appendChild(i),l=null):(l||(l=o.create(a,s),r.appendChild(l)),l.appendChild(i))}return!c&&l&&l.appendChild(o.create("br",{"data-mce-bogus":"1"})),r},Ne=ce.DOM,Re=F("dd"),De=F("dt"),Be=(e,t)=>{var o;Re(t)?le(t,"dt"):De(t)&&(o=t,p.from(o.dom.parentElement).map(L)).each((o=>((e,t,o)=>{const n=Ne.select('span[data-mce-type="bookmark"]',t),r=Me(e,o),a=Ne.createRng();a.setStartAfter(o),a.setEndAfter(t);const s=a.extractContents();for(let t=s.firstChild;t;t=t.firstChild)if("LI"===t.nodeName&&e.dom.isEmpty(t)){Ne.remove(t);break}e.dom.isEmpty(s)||Ne.insertAfter(s,t),Ne.insertAfter(r,t);const i=o.parentElement;i&&Se(e.dom,i)&&(e=>{const t=e.parentNode;t&&de.each(n,(e=>{t.insertBefore(e,o.parentNode)})),Ne.remove(e)})(i),Ne.remove(o),Se(e.dom,t)&&Ne.remove(t)})(e,o.dom,t.dom)))},Le=e=>{De(e)&&le(e,"dd")},Ie=(e,t)=>{if(ge(e))return{container:e,offset:t};const o=Q.getNode(e,t);return ge(o)?{container:o,offset:t>=e.childNodes.length?o.data.length:0}:o.previousSibling&&ge(o.previousSibling)?{container:o.previousSibling,offset:o.previousSibling.data.length}:o.nextSibling&&ge(o.nextSibling)?{container:o.nextSibling,offset:0}:{container:e,offset:t}},He=e=>{const t=e.cloneRange(),o=Ie(e.startContainer,e.startOffset);t.setStart(o.container,o.offset);const n=Ie(e.endContainer,e.endOffset);return t.setEnd(n.container,n.offset),t},Pe=["OL","UL","DL"],Fe=Pe.join(","),je=(e,t)=>{const o=t||e.selection.getStart(!0);return e.dom.getParent(o,Fe,Ue(e,o))},Ve=e=>{const t=e.selection.getSelectedBlocks();return _(((e,t)=>{const o=de.map(t,(t=>e.dom.getParent(t,"li,dd,dt",Ue(e,t))||t));return M(o)})(e,t),be)},Ze=(e,t)=>{const o=e.dom.getParents(t,"TD,TH");return o.length>0?o[0]:e.getBody()},Ue=(e,t)=>{const o=e.dom.getParents(t,e.dom.isBlock),n=S(o,(t=>{return o=e.schema,!he(n=t)&&!be(n)&&v(Pe,(e=>o.isValidChild(n.nodeName,e)));var o,n}));return n.getOr(e.getBody())},qe=(e,t)=>{const o=e.dom.getParents(t,"ol,ul",Ue(e,t));return A(o)},We=(e,t)=>{const o=k(t,(t=>qe(e,t).getOr(t)));return M(o)},$e=e=>/\btox\-/.test(e.className),Ge=(e,t)=>C(e,he,ke).exists((e=>e.nodeName===t&&!$e(e))),Ke=(e,t)=>null!==t&&!e.dom.isEditable(t),Ye=(e,t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return Ke(e,o)},Xe=(e,t)=>{const o=e.selection.getNode();return t({parents:e.dom.getParents(o),element:o}),e.on("NodeChange",t),()=>e.off("NodeChange",t)},Je=(e,t,o)=>e.dispatch("ListMutation",{action:t,element:o}),Qe=(et=/^\s+|\s+$/g,e=>e.replace(et,""));var et;const tt=(e,t,o)=>{((e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);(e=>void 0!==e.style&&l(e.style.getPropertyValue))(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},ot=(e,t)=>{K(e.item,t.list)},nt=(e,t)=>{const o={list:B(t,e),item:B("li",e)};return K(o.list,o.item),o},rt=e=>((e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}})(e,"OL,UL"),at=e=>U(e).exists(rt),st=e=>e.depth>0,it=e=>e.isSelected,lt=e=>{const t=V(e),o=q(e).exists(rt)?t.slice(0,-1):t;return k(o,ie)},ct=e=>(w(e,((t,o)=>{((e,t)=>{const o=e[t].depth,n=e=>e.depth===o&&!e.dirty,r=e=>e.depth<o;return C(O(e.slice(0,t)),n,r).orThunk((()=>C(e.slice(t+1),n,r)))})(e,o).fold((()=>{t.dirty&&(e=>{e.listAttributes=((e,t)=>{const o={};var n;return((e,t,o,n)=>{re(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(n=o,(e,t)=>{n[t]=e}),d),o})(e.listAttributes,((e,t)=>"start"!==t))})(t)}),(e=>{return n=e,(o=t).listType=n.listType,void(o.listAttributes={...n.listAttributes});var o,n}))})),e),dt=(e,t,o,n)=>U(n).filter(rt).fold((()=>{t.each((e=>{I(e.start,n)&&o.set(!0)}));const r=((e,t,o)=>j(e).filter(P).map((n=>({depth:t,dirty:!1,isSelected:o,content:lt(e),itemAttributes:se(e),listAttributes:se(n),listType:H(n)}))))(n,e,o.get());t.each((e=>{I(e.end,n)&&o.set(!1)}));const a=q(n).filter(rt).map((n=>ut(e,t,o,n))).getOr([]);return r.toArray().concat(a)}),(n=>ut(e,t,o,n))),ut=(e,t,o,n)=>z(V(n),(n=>(rt(n)?ut:dt)(e+1,t,o,n))),mt=(e,t)=>{const o=ct(t);return((e,t)=>{const o=x(t,((t,o)=>o.depth>t.length?((e,t,o)=>{const n=((e,t,o)=>{const n=[];for(let r=0;r<o;r++)n.push(nt(e,t.listType));return n})(e,o,o.depth-t.length);var r;return(e=>{for(let t=1;t<e.length;t++)ot(e[t-1],e[t])})(n),((e,t)=>{for(let t=0;t<e.length-1;t++)tt(e[t].item,"list-style-type","none");A(e).each((e=>{ae(e.list,t.listAttributes),ae(e.item,t.itemAttributes),Y(e.item,t.content)}))})(n,o),r=n,R(A(t),E(r),ot),t.concat(n)})(e,t,o):((e,t,o)=>{const n=t.slice(0,o.depth);return A(n).each((t=>{const n=((e,t,o)=>{const n=B("li",e);return ae(n,t),Y(n,o),n})(e,o.itemAttributes,o.content);((e,t)=>{K(e.list,t),e.item=t})(t,n),((e,t)=>{H(e.list)!==t.listType&&(e.list=le(e.list,t.listType)),ae(e.list,t.listAttributes)})(t,o)})),n})(e,t,o)),[]);return E(o).map((e=>e.list))})(e.contentDocument,o).toArray()},gt=(e,t,o)=>{const n=((e,t)=>{const o=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();return k(e,(e=>({sourceList:e,entries:ut(0,t,o,e)})))})(t,(e=>{const t=k(Ve(e),L);return R(S(t,m(at)),S(O(t),m(at)),((e,t)=>({start:e,end:t})))})(e));w(n,(t=>{((e,t)=>{w(_(e,it),(e=>((e,t)=>{switch(e){case"Indent":t.depth++;break;case"Outdent":t.depth--;break;case"Flatten":t.depth=0}t.dirty=!0})(t,e)))})(t.entries,o);const n=((e,t)=>z(((e,t)=>{if(0===e.length)return[];{let o=t(e[0]);const n=[];let r=[];for(let a=0,s=e.length;a<s;a++){const s=e[a],i=t(s);i!==o&&(n.push(r),r=[]),o=i,r.push(s)}return 0!==r.length&&n.push(r),n}})(t,st),(t=>E(t).exists(st)?mt(e,t):((e,t)=>{const o=ct(t);return k(o,(t=>{const o=((e,t)=>{const o=document.createDocumentFragment();return w(e,(e=>{o.appendChild(e.dom)})),L(o)})(t.content);return L(Me(e,o.dom))}))})(e,t))))(e,t.entries);var r;w(n,(t=>{Je(e,"Indent"===o?"IndentList":"OutdentList",t.dom)})),r=t.sourceList,w(n,(e=>{G(r,e)})),J(t.sourceList)}))},pt=(e,t)=>{const o=oe((e=>{const t=(e=>{const t=qe(e,e.selection.getStart()),o=_(e.selection.getSelectedBlocks(),fe);return t.toArray().concat(o)})(e);return We(e,t)})(e)),n=oe((e=>_(Ve(e),ve))(e));let r=!1;if(o.length||n.length){const a=e.selection.getBookmark();gt(e,o,t),((e,t,o)=>{w(o,"Indent"===t?Le:t=>Be(e,t))})(e,t,n),e.selection.moveToBookmark(a),e.selection.setRng(He(e.selection.getRng())),e.nodeChanged(),r=!0}return r},ht=(e,t)=>!(e=>{const t=je(e);return Ke(e,t)})(e)&&pt(e,t),ft=e=>ht(e,"Indent"),yt=e=>ht(e,"Outdent"),bt=e=>ht(e,"Flatten"),vt=e=>"\ufeff"===e;var kt=tinymce.util.Tools.resolve("tinymce.dom.BookmarkManager");const wt=ce.DOM,_t=e=>{const t={},o=o=>{let n=e[o?"startContainer":"endContainer"],r=e[o?"startOffset":"endOffset"];if(pe(n)){const e=wt.create("span",{"data-mce-type":"bookmark"});n.hasChildNodes()?(r=Math.min(r,n.childNodes.length-1),o?n.insertBefore(e,n.childNodes[r]):wt.insertAfter(e,n.childNodes[r])):n.appendChild(e),n=e,r=0}t[o?"startContainer":"endContainer"]=n,t[o?"startOffset":"endOffset"]=r};return o(!0),e.collapsed||o(),t},xt=e=>{const t=t=>{let o=e[t?"startContainer":"endContainer"],n=e[t?"startOffset":"endOffset"];if(o){if(pe(o)&&o.parentNode){const e=o;n=(e=>{var t;let o=null===(t=e.parentNode)||void 0===t?void 0:t.firstChild,n=0;for(;o;){if(o===e)return n;pe(o)&&"bookmark"===o.getAttribute("data-mce-type")||n++,o=o.nextSibling}return-1})(o),o=o.parentNode,wt.remove(e),!o.hasChildNodes()&&wt.isBlock(o)&&o.appendChild(wt.create("br"))}e[t?"startContainer":"endContainer"]=o,e[t?"startOffset":"endOffset"]=n}};t(!0),t();const o=wt.createRng();return o.setStart(e.startContainer,e.startOffset),e.endContainer&&o.setEnd(e.endContainer,e.endOffset),He(o)},Ct=e=>{switch(e){case"UL":return"ToggleUlList";case"OL":return"ToggleOlList";case"DL":return"ToggleDLList"}},St=(e,t)=>{de.each(t,((t,o)=>{e.setAttribute(o,t)}))},zt=(e,t,o)=>{((e,t,o)=>{const n=o["list-style-type"]?o["list-style-type"]:null;e.setStyle(t,"list-style-type",n)})(e,t,o),((e,t,o)=>{St(t,o["list-attributes"]),de.each(e.select("li",t),(e=>{St(e,o["list-item-attributes"])}))})(e,t,o)},Ot=(e,t)=>i(t)&&!xe(t,e.schema.getBlockElements()),Tt=(e,t,o,n)=>{let r=t[o?"startContainer":"endContainer"];const a=t[o?"startOffset":"endOffset"];pe(r)&&(r=r.childNodes[Math.min(a,r.childNodes.length-1)]||r),!o&&we(r.nextSibling)&&(r=r.nextSibling);const s=(t,o)=>{var r;const a=new ee(t,n),s=o?"next":"prev";let i;for(;i=a[s]();)if(!Ce(e,i)&&!vt(i.textContent)&&0!==(null===(r=i.textContent)||void 0===r?void 0:r.length))return p.some(i);return p.none()};if(o&&ge(r))if(vt(r.textContent))r=s(r,!1).getOr(r);else for(null!==r.parentNode&&Ot(e,r.parentNode)&&(r=r.parentNode);null!==r.previousSibling&&(Ot(e,r.previousSibling)||ge(r.previousSibling));)r=r.previousSibling;if(!o&&ge(r))if(vt(r.textContent))r=s(r,!0).getOr(r);else for(null!==r.parentNode&&Ot(e,r.parentNode)&&(r=r.parentNode);null!==r.nextSibling&&(Ot(e,r.nextSibling)||ge(r.nextSibling));)r=r.nextSibling;for(;r.parentNode!==n;){const t=r.parentNode;if(_e(e,r))return r;if(/^(TD|TH)$/.test(t.nodeName))return r;r=t}return r},Et=(e,t,o)=>{const n=e.selection.getRng();let r="LI";const a=Ue(e,e.selection.getStart(!0)),s=e.dom;if("false"===s.getContentEditable(e.selection.getNode()))return;"DL"===(t=t.toUpperCase())&&(r="DT");const i=_t(n),l=((e,t,o)=>{const n=[],r=e.dom,a=Tt(e,t,!0,o),s=Tt(e,t,!1,o);let i;const l=[];for(let e=a;e&&(l.push(e),e!==s);e=e.nextSibling);return de.each(l,(t=>{var a;if(_e(e,t))return n.push(t),void(i=null);if(r.isBlock(t)||we(t))return we(t)&&r.remove(t),void(i=null);const s=t.nextSibling;kt.isBookmarkNode(t)&&(he(s)||_e(e,s)||!s&&t.parentNode===o)?i=null:(i||(i=r.create("p"),null===(a=t.parentNode)||void 0===a||a.insertBefore(i,t),n.push(i)),i.appendChild(t))})),n})(e,n,a);de.each(l,(n=>{let a;const i=n.previousSibling,l=n.parentNode;be(l)||(i&&he(i)&&i.nodeName===t&&((e,t,o)=>{const n=e.getStyle(t,"list-style-type");let r=o?o["list-style-type"]:"";return r=null===r?"":r,n===r})(s,i,o)?(a=i,n=s.rename(n,r),i.appendChild(n)):(a=s.create(t),l.insertBefore(a,n),a.appendChild(n),n=s.rename(n,r)),((e,t,o)=>{de.each(["margin","margin-right","margin-bottom","margin-left","margin-top","padding","padding-right","padding-bottom","padding-left","padding-top"],(o=>e.setStyle(t,o,"")))})(s,n),zt(s,a,o),Mt(e.dom,a))})),e.selection.setRng(xt(i))},At=(e,t,o)=>{return((e,t)=>he(e)&&e.nodeName===(null==t?void 0:t.nodeName))(t,o)&&((e,t,o)=>e.getStyle(t,"list-style-type",!0)===e.getStyle(o,"list-style-type",!0))(e,t,o)&&(n=o,t.className===n.className);var n},Mt=(e,t)=>{let o,n=t.nextSibling;if(At(e,t,n)){const r=n;for(;o=r.firstChild;)t.appendChild(o);e.remove(r)}if(n=t.previousSibling,At(e,t,n)){const r=n;for(;o=r.lastChild;)t.insertBefore(o,t.firstChild);e.remove(r)}},Nt=e=>"list-style-type"in e,Rt=(e,t,o)=>{const n=je(e);if(Ye(e,n)||(e=>v(e.selection.getSelectedBlocks(),m(e.dom.isEditable)))(e))return;const a=(e=>{const t=je(e),o=e.selection.getSelectedBlocks();return((e,t)=>i(e)&&1===t.length&&t[0]===e)(t,o)?(e=>_(e.querySelectorAll(Fe),he))(t):_(o,(e=>he(e)&&t!==e))})(e),s=r(o)?o:{};a.length>0?((e,t,o,n,r)=>{const a=he(t);if(a&&t.nodeName===n&&!Nt(r))bt(e);else{Et(e,n,r);const s=_t(e.selection.getRng()),i=a?[t,...o]:o;de.each(i,(t=>{((e,t,o,n)=>{if(t.nodeName!==o){const r=e.dom.rename(t,o);zt(e.dom,r,n),Je(e,Ct(o),r)}else zt(e.dom,t,n),Je(e,Ct(o),t)})(e,t,n,r)})),e.selection.setRng(xt(s))}})(e,n,a,t,s):((e,t,o,n)=>{if(t!==e.getBody())if(t)if(t.nodeName!==o||Nt(n)||$e(t)){const r=_t(e.selection.getRng());zt(e.dom,t,n);const a=e.dom.rename(t,o);Mt(e.dom,a),e.selection.setRng(xt(r)),Et(e,o,n),Je(e,Ct(o),a)}else bt(e);else Et(e,o,n),Je(e,Ct(o),t)})(e,n,t,s)},Dt=ce.DOM,Bt=(e,t)=>{const o=de.grep(e.select("ol,ul",t));de.each(o,(t=>{((e,t)=>{const o=t.parentElement;if(o&&"LI"===o.nodeName&&o.firstChild===t){const n=o.previousSibling;n&&"LI"===n.nodeName?(n.appendChild(t),Se(e,o)&&Dt.remove(o)):Dt.setStyle(o,"listStyleType","none")}if(he(o)){const e=o.previousSibling;e&&"LI"===e.nodeName&&e.appendChild(t)}})(e,t)}))},Lt=(e,t,o,n)=>{let r=t.startContainer;const a=t.startOffset;if(ge(r)&&(o?a<r.data.length:a>0))return r;const s=e.schema.getNonEmptyElements();pe(r)&&(r=Q.getNode(r,a));const i=new ee(r,n);o&&((e,t)=>!!we(t)&&e.isBlock(t.nextSibling)&&!we(t.previousSibling))(e.dom,r)&&i.next();const l=o?i.next.bind(i):i.prev2.bind(i);for(;r=l();){if("LI"===r.nodeName&&!r.hasChildNodes())return r;if(s[r.nodeName])return r;if(ge(r)&&r.data.length>0)return r}return null},It=(e,t)=>{const o=t.childNodes;return 1===o.length&&!he(o[0])&&e.isBlock(o[0])},Ht=(e,t,o)=>{let n;const r=t.parentNode;if(!ze(e,t)||!ze(e,o))return;he(o.lastChild)&&(n=o.lastChild),r===o.lastChild&&we(r.previousSibling)&&e.remove(r.previousSibling);const a=o.lastChild;a&&we(a)&&t.hasChildNodes()&&e.remove(a),Se(e,o,!0)&&X(L(o)),((e,t,o)=>{let n;const r=It(e,o)?o.firstChild:o;if(((e,t)=>{It(e,t)&&e.remove(t.firstChild,!0)})(e,t),!Se(e,t,!0))for(;n=t.firstChild;)r.appendChild(n)})(e,t,o),n&&o.appendChild(n);const s=((e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)})(L(o),L(t))?e.getParents(t,he,o):[];e.remove(t),w(s,(t=>{Se(e,t)&&t!==e.getRoot()&&e.remove(t)}))},Pt=(e,t)=>{const o=e.dom,n=e.selection,r=n.getStart(),a=Ze(e,r),s=o.getParent(n.getStart(),"LI",a);if(s){const r=s.parentElement;if(r===e.getBody()&&Se(o,r))return!0;const i=He(n.getRng()),l=o.getParent(Lt(e,i,t,a),"LI",a);if(l&&l!==s)return e.undoManager.transact((()=>{var o,n;t?((e,t,o,n)=>{const r=e.dom;if(r.isEmpty(n))((e,t,o)=>{X(L(o)),Ht(e.dom,t,o),e.selection.setCursorLocation(o,0)})(e,o,n);else{const a=_t(t);Ht(r,o,n),e.selection.setRng(xt(a))}})(e,i,l,s):(null===(n=(o=s).parentNode)||void 0===n?void 0:n.firstChild)===o?yt(e):((e,t,o,n)=>{const r=_t(t);Ht(e.dom,o,n);const a=xt(r);e.selection.setRng(a)})(e,i,s,l)})),!0;if(!l&&!t&&0===i.startOffset&&0===i.endOffset)return e.undoManager.transact((()=>{bt(e)})),!0}return!1},Ft=e=>{const t=e.selection.getStart(),o=Ze(e,t);return e.dom.getParent(t,"LI,DT,DD",o)||Ve(e).length>0},jt=(e,t)=>{const o=e.selection;return!Ye(e,o.getNode())&&(o.isCollapsed()?((e,t)=>Pt(e,t)||((e,t)=>{const o=e.dom,n=e.selection.getStart(),r=Ze(e,n),a=o.getParent(n,o.isBlock,r);if(a&&o.isEmpty(a)){const n=He(e.selection.getRng()),s=o.getParent(Lt(e,n,t,r),"LI",r);if(s){const i=e=>b(["td","th","caption"],H(e)),l=e=>e.dom===r;return!!((e,t,o=u)=>R(e,t,o).getOr(e.isNone()&&t.isNone()))($(L(s),i,l),$(L(n.startContainer),i,l),I)&&(e.undoManager.transact((()=>{((e,t,o)=>{const n=e.getParent(t.parentNode,e.isBlock,o);e.remove(t),n&&e.isEmpty(n)&&e.remove(n)})(o,a,r),Mt(o,s.parentNode),e.selection.select(s,!0),e.selection.collapse(t)})),!0)}}return!1})(e,t))(e,t):(e=>!!Ft(e)&&(e.undoManager.transact((()=>{e.execCommand("Delete"),Bt(e.dom,e.getBody())})),!0))(e))},Vt=e=>{const t=O(Qe(e).split("")),o=k(t,((e,t)=>{const o=e.toUpperCase().charCodeAt(0)-"A".charCodeAt(0)+1;return Math.pow(26,t)*o}));return x(o,((e,t)=>e+t),0)},Zt=e=>{if(--e<0)return"";{const t=e%26,o=Math.floor(e/26);return Zt(o)+String.fromCharCode("A".charCodeAt(0)+t)}},Ut=e=>{const t=parseInt(e.start,10);return N(e.listStyleType,"upper-alpha")?Zt(t):N(e.listStyleType,"lower-alpha")?Zt(t).toLowerCase():e.start},qt=(e,t)=>()=>{const o=je(e);return i(o)&&o.nodeName===t},Wt=e=>{e.addCommand("mceListProps",(()=>{(e=>{const t=je(e);ye(t)&&!Ye(e,t)&&e.windowManager.open({title:"List Properties",body:{type:"panel",items:[{type:"input",name:"start",label:"Start list at number",inputMode:"numeric"}]},initialData:{start:Ut({start:e.dom.getAttrib(t,"start","1"),listStyleType:p.from(e.dom.getStyle(t,"list-style-type"))})},buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{(e=>{switch((e=>/^[0-9]+$/.test(e)?2:/^[A-Z]+$/.test(e)?0:/^[a-z]+$/.test(e)?1:e.length>0?4:3)(e)){case 2:return p.some({listStyleType:p.none(),start:e});case 0:return p.some({listStyleType:p.some("upper-alpha"),start:Vt(e).toString()});case 1:return p.some({listStyleType:p.some("lower-alpha"),start:Vt(e).toString()});case 3:return p.some({listStyleType:p.none(),start:""});case 4:return p.none()}})(t.getData().start).each((t=>{e.execCommand("mceListUpdate",!1,{attrs:{start:"1"===t.start?"":t.start},styles:{"list-style-type":t.listStyleType.getOr("")}})})),t.close()}})})(e)}))};var $t=tinymce.util.Tools.resolve("tinymce.html.Node");const Gt=e=>3===e.type,Kt=e=>0===e.length,Yt=e=>{const t=(t,o)=>{const n=$t.create("li");w(t,(e=>n.append(e))),o?e.insert(n,o,!0):e.append(n)},o=x(e.children(),((e,o)=>Gt(o)?[...e,o]:Kt(e)||Gt(o)?e:(t(e,o),[])),[]);Kt(o)||t(o)},Xt=(e,t)=>o=>Xe(e,(n=>{o.setActive(Ge(n.parents,t)),o.setEnabled(!Ye(e,n.element))})),Jt=(e,t)=>o=>Xe(e,(n=>o.setEnabled(Ge(n.parents,t)&&!Ye(e,n.element))));e.add("lists",(e=>((e=>{(0,e.options.register)("lists_indent_on_tab",{processor:"boolean",default:!0})})(e),(e=>{e.on("PreInit",(()=>{const{parser:t}=e;t.addNodeFilter("ul,ol",(e=>w(e,Yt)))}))})(e),e.hasPlugin("rtc",!0)?Wt(e):((e=>{Te(e)&&(e=>{e.on("keydown",(t=>{t.keyCode!==te.TAB||te.metaKeyPressed(t)||e.undoManager.transact((()=>{(t.shiftKey?yt(e):ft(e))&&t.preventDefault()}))}))})(e),(e=>{e.on("ExecCommand",(t=>{const o=t.command.toLowerCase();"delete"!==o&&"forwarddelete"!==o||!Ft(e)||Bt(e.dom,e.getBody())})),e.on("keydown",(t=>{t.keyCode===te.BACKSPACE?jt(e,!1)&&t.preventDefault():t.keyCode===te.DELETE&&jt(e,!0)&&t.preventDefault()}))})(e)})(e),(e=>{e.on("BeforeExecCommand",(t=>{const o=t.command.toLowerCase();"indent"===o?ft(e):"outdent"===o&&yt(e)})),e.addCommand("InsertUnorderedList",((t,o)=>{Rt(e,"UL",o)})),e.addCommand("InsertOrderedList",((t,o)=>{Rt(e,"OL",o)})),e.addCommand("InsertDefinitionList",((t,o)=>{Rt(e,"DL",o)})),e.addCommand("RemoveList",(()=>{bt(e)})),Wt(e),e.addCommand("mceListUpdate",((t,o)=>{r(o)&&((e,t)=>{const o=je(e);null===o||Ye(e,o)||e.undoManager.transact((()=>{r(t.styles)&&e.dom.setStyles(o,t.styles),r(t.attrs)&&re(t.attrs,((t,n)=>e.dom.setAttrib(o,n,t)))}))})(e,o)})),e.addQueryStateHandler("InsertUnorderedList",qt(e,"UL")),e.addQueryStateHandler("InsertOrderedList",qt(e,"OL")),e.addQueryStateHandler("InsertDefinitionList",qt(e,"DL"))})(e)),(e=>{const t=t=>()=>e.execCommand(t);e.hasPlugin("advlist")||(e.ui.registry.addToggleButton("numlist",{icon:"ordered-list",active:!1,tooltip:"Numbered list",onAction:t("InsertOrderedList"),onSetup:Xt(e,"OL")}),e.ui.registry.addToggleButton("bullist",{icon:"unordered-list",active:!1,tooltip:"Bullet list",onAction:t("InsertUnorderedList"),onSetup:Xt(e,"UL")}))})(e),(e=>{const t={text:"List properties...",icon:"ordered-list",onAction:()=>e.execCommand("mceListProps"),onSetup:Jt(e,"OL")};e.ui.registry.addMenuItem("listprops",t),e.ui.registry.addContextMenu("lists",{update:t=>{const o=je(e,t);return ye(o)?["listprops"]:[]}})})(e),(e=>({backspaceDelete:t=>{jt(e,t)}}))(e))))}()},42540:function(e,t,o){o(33167)},33167:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=t("string"),n=t("object"),r=t("array"),a=e=>!(e=>null==e)(e);class s{constructor(e,t){this.tag=e,this.value=t}static some(e){return new s(!0,e)}static none(){return s.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?s.some(e(this.value)):s.none()}bind(e){return this.tag?e(this.value):s.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this: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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return a(e)?s.some(e):s.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}s.singletonNone=new s(!1);const i=Array.prototype.push,l=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},c=e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!r(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);i.apply(t,e[o])}return t},d=Object.keys,u=Object.hasOwnProperty,m=(e,t)=>g(e,t)?s.from(e[t]):s.none(),g=(e,t)=>u.call(e,t),p=e=>t=>t.options.get(e),h=p("audio_template_callback"),f=p("video_template_callback"),y=p("iframe_template_callback"),b=p("media_live_embeds"),v=p("media_filter_html"),k=p("media_url_resolver"),w=p("media_alt_source"),_=p("media_poster"),x=p("media_dimensions");var C=tinymce.util.Tools.resolve("tinymce.util.Tools"),S=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),z=tinymce.util.Tools.resolve("tinymce.html.DomParser");const O=S.DOM,T=e=>e.replace(/px$/,""),E=e=>{const t=e.attr("style"),o=t?O.parseStyle(t):{};return{type:"ephox-embed-iri",source:e.attr("data-ephox-embed-iri"),altsource:"",poster:"",width:m(o,"max-width").map(T).getOr(""),height:m(o,"max-height").map(T).getOr("")}},A=(e,t)=>{let o={};for(let n=z({validate:!1,forced_root_block:!1},t).parse(e);n;n=n.walk())if(1===n.type){const e=n.name;if(n.attr("data-ephox-embed-iri")){o=E(n);break}o.source||"param"!==e||(o.source=n.attr("movie")),"iframe"!==e&&"object"!==e&&"embed"!==e&&"video"!==e&&"audio"!==e||(o.type||(o.type=e),o=C.extend(n.attributes.map,o)),"script"===e&&(o={type:"script",source:n.attr("src")}),"source"===e&&(o.source?o.altsource||(o.altsource=n.attr("src")):o.source=n.attr("src")),"img"!==e||o.poster||(o.poster=n.attr("src"))}return o.source=o.source||o.src||"",o.altsource=o.altsource||"",o.poster=o.poster||"",o},M=e=>{var t;const o=null!==(t=e.toLowerCase().split(".").pop())&&void 0!==t?t:"";return m({mp3:"audio/mpeg",m4a:"audio/x-m4a",wav:"audio/wav",mp4:"video/mp4",webm:"video/webm",ogg:"video/ogg",swf:"application/x-shockwave-flash"},o).getOr("")};var N=tinymce.util.Tools.resolve("tinymce.html.Node"),R=tinymce.util.Tools.resolve("tinymce.html.Serializer");const D=(e,t={})=>z({forced_root_block:!1,validate:!1,allow_conditional_comments:!0,...t},e),B=S.DOM,L=e=>/^[0-9.]+$/.test(e)?e+"px":e,I=(e,t)=>{const o=t.attr("style"),n=o?B.parseStyle(o):{};a(e.width)&&(n["max-width"]=L(e.width)),a(e.height)&&(n["max-height"]=L(e.height)),t.attr("style",B.serializeStyle(n))},H=["source","altsource"],P=(e,t,o,n)=>{let r=0,a=0;const s=D(n);s.addNodeFilter("source",(e=>r=e.length));const i=s.parse(e);for(let e=i;e;e=e.walk())if(1===e.type){const n=e.name;if(e.attr("data-ephox-embed-iri")){I(t,e);break}switch(n){case"video":case"object":case"embed":case"img":case"iframe":void 0!==t.height&&void 0!==t.width&&(e.attr("width",t.width),e.attr("height",t.height))}if(o)switch(n){case"video":e.attr("poster",t.poster),e.attr("src",null);for(let o=r;o<2;o++)if(t[H[o]]){const n=new N("source",1);n.attr("src",t[H[o]]),n.attr("type",t[H[o]+"mime"]||null),e.append(n)}break;case"iframe":e.attr("src",t.source);break;case"object":const o=e.getAll("img").length>0;if(t.poster&&!o){e.attr("src",t.poster);const o=new N("img",1);o.attr("src",t.poster),o.attr("width",t.width),o.attr("height",t.height),e.append(o)}break;case"source":if(a<2&&(e.attr("src",t[H[a]]),e.attr("type",t[H[a]+"mime"]||null),!t[H[a]])){e.remove();continue}a++;break;case"img":t.poster||e.remove()}}return R({},n).serialize(i)},F=[{regex:/youtu\.be\/([\w\-_\?&=.]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/youtube\.com(.+)v=([^&]+)(&([a-z0-9&=\-_]+))?/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$2?$4",allowFullscreen:!0},{regex:/youtube.com\/embed\/([a-z0-9\?&=\-_]+)/i,type:"iframe",w:560,h:314,url:"www.youtube.com/embed/$1",allowFullscreen:!0},{regex:/vimeo\.com\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$1?title=0&byline=0&portrait=0&color=8dc7dc",allowFullscreen:!0},{regex:/vimeo\.com\/(.*)\/([0-9]+)/,type:"iframe",w:425,h:350,url:"player.vimeo.com/video/$2?title=0&amp;byline=0",allowFullscreen:!0},{regex:/maps\.google\.([a-z]{2,3})\/maps\/(.+)msid=(.+)/,type:"iframe",w:425,h:350,url:'maps.google.com/maps/ms?msid=$2&output=embed"',allowFullscreen:!1},{regex:/dailymotion\.com\/video\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0},{regex:/dai\.ly\/([^_]+)/,type:"iframe",w:480,h:270,url:"www.dailymotion.com/embed/video/$1",allowFullscreen:!0}],j=(e,t)=>{const o=(e=>{const t=e.match(/^(https?:\/\/|www\.)(.+)$/i);return t&&t.length>1?"www."===t[1]?"https://":t[1]:"https://"})(t),n=e.regex.exec(t);let r=o+e.url;if(a(n))for(let e=0;e<n.length;e++)r=r.replace("$"+e,(()=>n[e]?n[e]:""));return r.replace(/\?$/,"")},V=(e,t)=>{var o;const n=C.extend({},t);if(!n.source&&(C.extend(n,A(null!==(o=n.embed)&&void 0!==o?o:"",e.schema)),!n.source))return"";n.altsource||(n.altsource=""),n.poster||(n.poster=""),n.source=e.convertURL(n.source,"source"),n.altsource=e.convertURL(n.altsource,"source"),n.sourcemime=M(n.source),n.altsourcemime=M(n.altsource),n.poster=e.convertURL(n.poster,"poster");const r=(e=>{const t=F.filter((t=>t.regex.test(e)));return t.length>0?C.extend({},t[0],{url:j(t[0],e)}):null})(n.source);if(r&&(n.source=r.url,n.type=r.type,n.allowfullscreen=r.allowFullscreen,n.width=n.width||String(r.w),n.height=n.height||String(r.h)),n.embed)return P(n.embed,n,!0,e.schema);{const t=h(e),o=f(e),r=y(e);return n.width=n.width||"300",n.height=n.height||"150",C.each(n,((t,o)=>{n[o]=e.dom.encode(""+t)})),"iframe"===n.type?((e,t)=>{if(t)return t(e);{const t=e.allowfullscreen?' allowFullscreen="1"':"";return'<iframe src="'+e.source+'" width="'+e.width+'" height="'+e.height+'"'+t+"></iframe>"}})(n,r):"application/x-shockwave-flash"===n.sourcemime?(e=>{let t='<object data="'+e.source+'" width="'+e.width+'" height="'+e.height+'" type="application/x-shockwave-flash">';return e.poster&&(t+='<img src="'+e.poster+'" width="'+e.width+'" height="'+e.height+'" />'),t+="</object>",t})(n):-1!==n.sourcemime.indexOf("audio")?((e,t)=>t?t(e):'<audio controls="controls" src="'+e.source+'">'+(e.altsource?'\n<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</audio>")(n,t):"script"===n.type?(e=>'<script src="'+e.source+'"><\/script>')(n):((e,t)=>t?t(e):'<video width="'+e.width+'" height="'+e.height+'"'+(e.poster?' poster="'+e.poster+'"':"")+' controls="controls">\n<source src="'+e.source+'"'+(e.sourcemime?' type="'+e.sourcemime+'"':"")+" />\n"+(e.altsource?'<source src="'+e.altsource+'"'+(e.altsourcemime?' type="'+e.altsourcemime+'"':"")+" />\n":"")+"</video>")(n,o)}},Z=e=>e.hasAttribute("data-mce-object")||e.hasAttribute("data-ephox-embed-iri"),U={},q=e=>t=>V(e,t),W=(e,t)=>{const o=k(e);return o?((e,t,o)=>new Promise(((n,r)=>{const a=o=>(o.html&&(U[e.source]=o),n({url:e.source,html:o.html?o.html:t(e)}));U[e.source]?a(U[e.source]):o({url:e.source},a,r)})))(t,q(e),o):((e,t)=>Promise.resolve({html:t(e),url:e.source}))(t,q(e))},$=(e,t)=>{const o={};return m(e,"dimensions").each((e=>{l(["width","height"],(n=>{m(t,n).orThunk((()=>m(e,n))).each((e=>o[n]=e))}))})),o},G=(e,t)=>{const o=t&&"dimensions"!==t?((e,t)=>m(t,e).bind((e=>m(e,"meta"))))(t,e).getOr({}):{},r=((e,t,o)=>r=>{const a=()=>m(e,r),i=()=>m(t,r),l=e=>m(e,"value").bind((e=>e.length>0?s.some(e):s.none()));return{[r]:(r===o?a().bind((e=>n(e)?l(e).orThunk(i):i().orThunk((()=>s.from(e))))):i().orThunk((()=>a().bind((e=>n(e)?l(e):s.from(e)))))).getOr("")}})(e,o,t);return{...r("source"),...r("altsource"),...r("poster"),...r("embed"),...$(e,o)}},K=e=>{const t={...e,source:{value:m(e,"source").getOr("")},altsource:{value:m(e,"altsource").getOr("")},poster:{value:m(e,"poster").getOr("")}};return l(["width","height"],(o=>{m(e,o).each((e=>{const n=t.dimensions||{};n[o]=e,t.dimensions=n}))})),t},Y=e=>t=>{const o=t&&t.msg?"Media embed handler error: "+t.msg:"Media embed handler threw unknown error.";e.notificationManager.open({type:"error",text:o})},X=(e,t)=>n=>{if(o(n.url)&&n.url.trim().length>0){const o=n.html,r={...A(o,t.schema),source:n.url,embed:o};e.setData(K(r))}},J=(e,t)=>{const o=e.dom.select("*[data-mce-object]");e.insertContent(t),((e,t)=>{const o=e.dom.select("*[data-mce-object]");for(let e=0;e<t.length;e++)for(let n=o.length-1;n>=0;n--)t[e]===o[n]&&o.splice(n,1);e.selection.select(o[0])})(e,o),e.nodeChanged()},Q=e=>{const t=(e=>{const t=e.selection.getNode(),o=Z(t)?e.serializer.serialize(t,{selection:!0}):"";return{embed:o,...A(o,e.schema)}})(e),o=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(t),n=K(t),r=x(e)?[{type:"sizeinput",name:"dimensions",label:"Constrain proportions",constrain:!0}]:[],a={title:"General",name:"general",items:c([[{name:"source",type:"urlinput",filetype:"media",label:"Source"}],r])},s=[];w(e)&&s.push({name:"altsource",type:"urlinput",filetype:"media",label:"Alternative source URL"}),_(e)&&s.push({name:"poster",type:"urlinput",filetype:"image",label:"Media poster (Image URL)"});const i={title:"Advanced",name:"advanced",items:s},l=[a,{title:"Embed",items:[{type:"textarea",name:"embed",label:"Paste your embed code below:"}]}];s.length>0&&l.push(i);const d={type:"tabpanel",tabs:l},u=e.windowManager.open({title:"Insert/Edit Media",size:"normal",body:d,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:t=>{const n=G(t.getData());((e,t,o)=>{var n,r;t.embed=P(null!==(n=t.embed)&&void 0!==n?n:"",t,!1,o.schema),t.embed&&(e.source===t.source||(r=t.source,g(U,r)))?J(o,t.embed):W(o,t).then((e=>{J(o,e.html)})).catch(Y(o))})(o.get(),n,e),t.close()},onChange:(t,n)=>{switch(n.name){case"source":((t,o)=>{const n=G(o.getData(),"source");t.source!==n.source&&(X(u,e)({url:n.source,html:""}),W(e,n).then(X(u,e)).catch(Y(e)))})(o.get(),t);break;case"embed":(t=>{var o;const n=G(t.getData()),r=A(null!==(o=n.embed)&&void 0!==o?o:"",e.schema);t.setData(K(r))})(t);break;case"dimensions":case"altsource":case"poster":((t,o)=>{const n=G(t.getData(),o),r=V(e,n);t.setData(K({...n,embed:r}))})(t,n.name)}o.set(G(t.getData()))},initialData:n})};var ee=tinymce.util.Tools.resolve("tinymce.Env");const te=e=>{const t=e.name;return"iframe"===t||"video"===t||"audio"===t},oe=(e,t,o,n=null)=>{const r=e.attr(o);return a(r)?r:g(t,o)?null:n},ne=(e,t,o)=>{const n="img"===t.name||"video"===e.name,r=n?"300":null,a="audio"===e.name?"30":"150",s=n?a:null;t.attr({width:oe(e,o,"width",r),height:oe(e,o,"height",s)})},re=(e,t)=>{const o=t.name,n=new N("img",1);return se(e,t,n),ne(t,n,{}),n.attr({style:t.attr("style"),src:ee.transparentSrc,"data-mce-object":o,class:"mce-object mce-object-"+o}),n},ae=(e,t)=>{var o;const n=t.name,r=new N("span",1);r.attr({contentEditable:"false",style:t.attr("style"),"data-mce-object":n,class:"mce-preview-object mce-object-"+n}),se(e,t,r);const s=e.dom.parseStyle(null!==(o=t.attr("style"))&&void 0!==o?o:""),i=new N(n,1);if(ne(t,i,s),i.attr({src:t.attr("src"),style:t.attr("style"),class:t.attr("class")}),"iframe"===n)i.attr({allowfullscreen:t.attr("allowfullscreen"),frameborder:"0"});else{l(["controls","crossorigin","currentTime","loop","muted","poster","preload"],(e=>{i.attr(e,t.attr(e))}));const o=r.attr("data-mce-html");a(o)&&((e,t,o,n)=>{const r=D(e.schema).parse(n,{context:t});for(;r.firstChild;)o.append(r.firstChild)})(e,n,i,unescape(o))}const c=new N("span",1);return c.attr("class","mce-shim"),r.append(i),r.append(c),r},se=(e,t,o)=>{var n;const r=null!==(n=t.attributes)&&void 0!==n?n:[];let a=r.length;for(;a--;){const t=r[a].name;let n=r[a].value;"width"===t||"height"===t||"style"===t||(i="data-mce-",(s=t).length>=9&&s.substr(0,9)===i)||("data"!==t&&"src"!==t||(n=e.convertURL(n,t)),o.attr("data-mce-p-"+t,n))}var s,i;const c=R({inner:!0},e.schema),d=new N("div",1);l(t.children(),(e=>d.append(e)));const u=c.serialize(d);u&&(o.attr("data-mce-html",escape(u)),o.empty())},ie=e=>{const t=e.attr("class");return o(t)&&/\btiny-pageembed\b/.test(t)},le=e=>{let t=e;for(;t=t.parent;)if(t.attr("data-ephox-embed-iri")||ie(t))return!0;return!1},ce=(e,t,o)=>{const n=(0,e.options.get)("xss_sanitization"),r=v(e);return D(e.schema,{sanitize:n,validate:r}).parse(o,{context:t})};e.add("media",(e=>((e=>{const t=e.options.register;t("audio_template_callback",{processor:"function"}),t("video_template_callback",{processor:"function"}),t("iframe_template_callback",{processor:"function"}),t("media_live_embeds",{processor:"boolean",default:!0}),t("media_filter_html",{processor:"boolean",default:!0}),t("media_url_resolver",{processor:"function"}),t("media_alt_source",{processor:"boolean",default:!0}),t("media_poster",{processor:"boolean",default:!0}),t("media_dimensions",{processor:"boolean",default:!0})})(e),(e=>{e.addCommand("mceMedia",(()=>{Q(e)}))})(e),(e=>{const t=()=>e.execCommand("mceMedia");e.ui.registry.addToggleButton("media",{tooltip:"Insert/edit media",icon:"embed",onAction:t,onSetup:t=>{const o=e.selection;return t.setActive(Z(o.getNode())),o.selectorChangedWithUnbind("img[data-mce-object],span[data-mce-object],div[data-ephox-embed-iri]",t.setActive).unbind}}),e.ui.registry.addMenuItem("media",{icon:"embed",text:"Media...",onAction:t})})(e),(e=>{e.on("ResolveName",(e=>{let t;1===e.target.nodeType&&(t=e.target.getAttribute("data-mce-object"))&&(e.name=t)}))})(e),(e=>{e.on("PreInit",(()=>{const{schema:t,serializer:o,parser:n}=e,r=t.getBoolAttrs();l("webkitallowfullscreen mozallowfullscreen".split(" "),(e=>{r[e]={}})),((e,t)=>{const o=d(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}})({embed:["wmode"]},((e,o)=>{const n=t.getElementRule(o);n&&l(e,(e=>{n.attributes[e]={},n.attributesOrder.push(e)}))})),n.addNodeFilter("iframe,video,audio,object,embed,script",(e=>t=>{let o,n=t.length;for(;n--;)o=t[n],o.parent&&(o.parent.attr("data-mce-object")||(te(o)&&b(e)?le(o)||o.replace(ae(e,o)):le(o)||o.replace(re(e,o))))})(e)),o.addAttributeFilter("data-mce-object",((t,o)=>{var n;let r=t.length;for(;r--;){const a=t[r];if(!a.parent)continue;const s=a.attr(o),i=new N(s,1);if("audio"!==s&&"script"!==s){const e=a.attr("class");e&&-1!==e.indexOf("mce-preview-object")&&a.firstChild?i.attr({width:a.firstChild.attr("width"),height:a.firstChild.attr("height")}):i.attr({width:a.attr("width"),height:a.attr("height")})}i.attr({style:a.attr("style")});const c=null!==(n=a.attributes)&&void 0!==n?n:[];let d=c.length;for(;d--;){const e=c[d].name;0===e.indexOf("data-mce-p-")&&i.attr(e.substr(11),c[d].value)}"script"===s&&i.attr("type","text/javascript");const u=a.attr("data-mce-html");if(u){const t=ce(e,s,unescape(u));l(t.children(),(e=>i.append(e)))}a.replace(i)}}))})),e.on("SetContent",(()=>{const t=e.dom;l(t.select("span.mce-preview-object"),(e=>{0===t.select("span.mce-shim",e).length&&t.add(e,"span",{class:"mce-shim"})}))}))})(e),(e=>{e.on("click keyup touchend",(()=>{const t=e.selection.getNode();t&&e.dom.hasClass(t,"mce-preview-object")&&e.dom.getAttrib(t,"data-mce-selected")&&t.setAttribute("data-mce-selected","2")})),e.on("ObjectSelected",(e=>{"script"===e.target.getAttribute("data-mce-object")&&e.preventDefault()})),e.on("ObjectResized",(t=>{const o=t.target;if(o.getAttribute("data-mce-object")){let n=o.getAttribute("data-mce-html");n&&(n=unescape(n),o.setAttribute("data-mce-html",escape(P(n,{width:String(t.width),height:String(t.height)},!1,e.schema))))}}))})(e),(e=>({showDialog:()=>{Q(e)}}))(e))))}()},31528:function(e,t,o){o(41100)},41100:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=t("boolean"),n=t("number"),r=e=>t=>t.options.get(e),a=r("nonbreaking_force_tab"),s=r("nonbreaking_wrap"),i=(e,t)=>{let o="";for(let n=0;n<t;n++)o+=e;return o},l=(e,t)=>{const o=s(e)||e.plugins.visualchars?`<span class="${(e=>!!e.plugins.visualchars&&e.plugins.visualchars.isEnabled())(e)?"mce-nbsp-wrap mce-nbsp":"mce-nbsp-wrap"}" contenteditable="false">${i("&nbsp;",t)}</span>`:i("&nbsp;",t);e.undoManager.transact((()=>e.insertContent(o)))};var c=tinymce.util.Tools.resolve("tinymce.util.VK");e.add("nonbreaking",(e=>{(e=>{const t=e.options.register;t("nonbreaking_force_tab",{processor:e=>o(e)?{value:e?3:0,valid:!0}:n(e)?{value:e,valid:!0}:{valid:!1,message:"Must be a boolean or number."},default:!1}),t("nonbreaking_wrap",{processor:"boolean",default:!0})})(e),(e=>{e.addCommand("mceNonBreaking",(()=>{l(e,1)}))})(e),(e=>{const t=()=>e.execCommand("mceNonBreaking");e.ui.registry.addButton("nonbreaking",{icon:"non-breaking",tooltip:"Nonbreaking space",onAction:t}),e.ui.registry.addMenuItem("nonbreaking",{icon:"non-breaking",text:"Nonbreaking space",onAction:t})})(e),(e=>{const t=a(e);t>0&&e.on("keydown",(o=>{if(o.keyCode===c.TAB&&!o.isDefaultPrevented()){if(o.shiftKey)return;o.preventDefault(),o.stopImmediatePropagation(),l(e,t)}}))})(e)}))}()},78843:function(e,t,o){o(40243)},40243:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env");const o=e=>t=>t.options.get(e),n=o("pagebreak_separator"),r=o("pagebreak_split_block"),a="mce-pagebreak",s=e=>{const o=`<img src="${t.transparentSrc}" class="${a}" data-mce-resize="false" data-mce-placeholder />`;return e?`<p>${o}</p>`:o};e.add("pagebreak",(e=>{(e=>{const t=e.options.register;t("pagebreak_separator",{processor:"string",default:"\x3c!-- pagebreak --\x3e"}),t("pagebreak_split_block",{processor:"boolean",default:!1})})(e),(e=>{e.addCommand("mcePageBreak",(()=>{e.insertContent(s(r(e)))}))})(e),(e=>{const t=()=>e.execCommand("mcePageBreak");e.ui.registry.addButton("pagebreak",{icon:"page-break",tooltip:"Page break",onAction:t}),e.ui.registry.addMenuItem("pagebreak",{text:"Page break",icon:"page-break",onAction:t})})(e),(e=>{const t=n(e),o=()=>r(e),i=new RegExp(t.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,(e=>"\\"+e)),"gi");e.on("BeforeSetContent",(e=>{e.content=e.content.replace(i,s(o()))})),e.on("PreInit",(()=>{e.serializer.addNodeFilter("img",(n=>{let r,s,i=n.length;for(;i--;)if(r=n[i],s=r.attr("class"),s&&-1!==s.indexOf(a)){const n=r.parent;if(n&&e.schema.getBlockElements()[n.name]&&o()){n.type=3,n.value=t,n.raw=!0,r.remove();continue}r.type=3,r.value=t,r.raw=!0}}))}))})(e),(e=>{e.on("ResolveName",(t=>{"IMG"===t.target.nodeName&&e.dom.hasClass(t.target,a)&&(t.name="pagebreak")}))})(e)}))}()},44446:function(e,t,o){o(18495)},18495:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager"),t=tinymce.util.Tools.resolve("tinymce.Env"),o=tinymce.util.Tools.resolve("tinymce.util.Tools");const n=e=>t=>t.options.get(e),r=n("content_style"),a=n("content_css_cors"),s=n("body_class"),i=n("body_id");e.add("preview",(e=>{(e=>{e.addCommand("mcePreview",(()=>{(e=>{const n=(e=>{var n;let l="";const c=e.dom.encode,d=null!==(n=r(e))&&void 0!==n?n:"";l+='<base href="'+c(e.documentBaseURI.getURI())+'">';const u=a(e)?' crossorigin="anonymous"':"";o.each(e.contentCSS,(t=>{l+='<link type="text/css" rel="stylesheet" href="'+c(e.documentBaseURI.toAbsolute(t))+'"'+u+">"})),d&&(l+='<style type="text/css">'+d+"</style>");const m=i(e),g=s(e),p='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(t.os.isMacOS()||t.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",h=e.getBody().dir,f=h?' dir="'+c(h)+'"':"";return"<!DOCTYPE html><html><head>"+l+'</head><body id="'+c(m)+'" class="mce-content-body '+c(g)+'"'+f+">"+e.getContent()+p+"</body></html>"})(e);e.windowManager.open({title:"Preview",size:"large",body:{type:"panel",items:[{name:"preview",type:"iframe",sandboxed:!0,transparent:!1}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}],initialData:{preview:n}}).focus("close")})(e)}))})(e),(e=>{const t=()=>e.execCommand("mcePreview");e.ui.registry.addButton("preview",{icon:"preview",tooltip:"Preview",onAction:t}),e.ui.registry.addMenuItem("preview",{icon:"preview",text:"Preview",onAction:t})})(e)}))}()},82960:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>typeof t===e,o=("string",e=>"string"===(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(e));const n=t("boolean"),r=t("function"),a=e=>t=>t.options.get(e),s=a("quickbars_selection_toolbar"),i=a("quickbars_insert_toolbar"),l=a("quickbars_image_toolbar");let c=0;var d=tinymce.util.Tools.resolve("tinymce.util.Delay");const u=e=>{e.ui.registry.addButton("quickimage",{icon:"image",tooltip:"Insert image",onAction:()=>{(e=>new Promise((t=>{let o=!1;const n=document.createElement("input");n.type="file",n.accept="image/*",n.style.position="fixed",n.style.left="0",n.style.top="0",n.style.opacity="0.001",document.body.appendChild(n);const r=e=>{var r;o||(null===(r=n.parentNode)||void 0===r||r.removeChild(n),o=!0,t(e))},a=e=>{r(Array.prototype.slice.call(e.target.files))};n.addEventListener("input",a),n.addEventListener("change",a);const s=t=>{const n=()=>{r([])};o||("focusin"===t.type?d.setEditorTimeout(e,n,1e3):n()),e.off("focusin remove",s)};e.on("focusin remove",s),n.click()})))(e).then((t=>{if(t.length>0){const o=t[0];(e=>new Promise((t=>{const o=new FileReader;o.onloadend=()=>{t(o.result.split(",")[1])},o.readAsDataURL(e)})))(o).then((t=>{((e,t,o)=>{const n=e.editorUpload.blobCache,r=n.create((e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return c++,"mceu_"+o+c+String(t)})(),o,t);n.add(r),e.insertContent(e.dom.createHTML("img",{src:r.blobUri()}))})(e,t,o)}))}}))}}),e.ui.registry.addButton("quicktable",{icon:"table",tooltip:"Insert table",onAction:()=>{((e,t,o)=>{e.execCommand("mceInsertTable",!1,{rows:2,columns:2})})(e)}})},m=(!1,()=>false);class g{constructor(e,t){this.tag=e,this.value=t}static some(e){return new g(!0,e)}static none(){return g.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?g.some(e(this.value)):g.none()}bind(e){return this.tag?e(this.value):g.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this: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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?g.none():g.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}g.singletonNone=new g(!1),"undefined"!=typeof window?window:Function("return this;")();var p=(e,t,o,n,a)=>e(o,n)?g.some(o):r(a)&&a(o)?g.none():t(o,n,a);const h=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},f=h,y=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},b=(e,t,o)=>{let n=e.dom;const a=r(o)?o:m;for(;n.parentNode;){n=n.parentNode;const e=f(n);if(t(e))return g.some(e);if(a(e))break}return g.none()},v=(e,t,o)=>b(e,(e=>y(e,t)),o),k=e=>{const t=i(e);t.length>0&&e.ui.registry.addContextToolbar("quickblock",{predicate:t=>{const o=f(t),n=e.schema.getTextBlockElements(),r=t=>t.dom===e.getBody();return!((e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute("data-mce-bogus")})(o)&&((e,t,o)=>p(((e,t)=>y(e,t)),v,e,'table,[data-mce-bogus="all"]',o))(o,0,r).fold((()=>((e,t,o)=>((e,t,o)=>p(((e,t)=>t(e)),b,e,t,o))(e,t,o).isSome())(o,(t=>t.dom.nodeName.toLowerCase()in n&&e.dom.isEmpty(t.dom)),r)),m)},items:t,position:"line",scope:"editor"})};e.add("quickbars",(e=>{(e=>{const t=e.options.register,r=e=>t=>{const r=n(t)||o(t);return r?n(t)?{value:t?e:"",valid:r}:{value:t.trim(),valid:r}:{valid:!1,message:"Must be a boolean or string."}},a="bold italic | quicklink h2 h3 blockquote";t("quickbars_selection_toolbar",{processor:r(a),default:a});const s="quickimage quicktable";t("quickbars_insert_toolbar",{processor:r(s),default:s});const i="alignleft aligncenter alignright";t("quickbars_image_toolbar",{processor:r(i),default:i})})(e),u(e),k(e),(e=>{const t=e=>"IMG"===e.nodeName||"FIGURE"===e.nodeName&&/image/i.test(e.className),o=l(e);o.length>0&&e.ui.registry.addContextToolbar("imageselection",{predicate:t,items:o,position:"node"});const n=s(e);n.length>0&&e.ui.registry.addContextToolbar("textselection",{predicate:o=>!t(o)&&!e.selection.isCollapsed()&&(t=>"false"!==e.dom.getContentEditableParent(t))(o),items:n,position:"selection",scope:"editor"})})(e)}))}()},31295:function(e,t,o){o(76834)},76834:function(){!function(){"use strict";const e=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}};var t=tinymce.util.Tools.resolve("tinymce.PluginManager");const o=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,n=e=>t=>typeof t===e,r=o("string"),a=o("array"),s=n("boolean"),i=n("number"),l=()=>{},c=e=>()=>e,d=c(!0),u=c("[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]");class m{constructor(e,t){this.tag=e,this.value=t}static some(e){return new m(!0,e)}static none(){return m.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?m.some(e(this.value)):m.none()}bind(e){return this.tag?e(this.value):m.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:m.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?m.none():m.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}m.singletonNone=new m(!1);const g=u;var p=tinymce.util.Tools.resolve("tinymce.Env"),h=tinymce.util.Tools.resolve("tinymce.util.Tools");const f=Array.prototype.slice,y=Array.prototype.push,b=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},v=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},k=(e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)},w=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!a(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);y.apply(t,e[o])}return t})(b(e,t)),_=Object.hasOwnProperty,x=(e,t)=>_.call(e,t);"undefined"!=typeof window?window:Function("return this;")();const C=(3,e=>3===(e=>e.dom.nodeType)(e));const S=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},z=S,O=(e,t)=>({element:e,offset:t}),T=(e,t)=>{((e,t)=>{const o=(e=>m.from(e.dom.parentNode).map(z))(e);o.each((o=>{o.dom.insertBefore(t.dom,e.dom)}))})(e,t),((e,t)=>{e.dom.appendChild(t.dom)})(t,e)},E=((e,t)=>{const o=t=>e(t)?m.from(t.dom.nodeValue):m.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(C),A=e=>E.get(e);var M=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const N=(e,t)=>e.isBlock(t)||x(e.schema.getVoidElements(),t.nodeName),R=(e,t)=>"false"===e.getContentEditable(t),D=(e,t)=>!e.isBlock(t)&&x(e.schema.getWhitespaceElements(),t.nodeName),B=(e,t)=>((e,t)=>{const o=(e=>b(e.dom.childNodes,z))(e);return o.length>0&&t<o.length?O(o[t],0):O(e,t)})(z(e),t),L=(e,t,o,n,r,a=!0)=>{let s=a?t(!1):o;for(;s;){const o=R(e,s);if(o||D(e,s)){if(o?n.cef(s):n.boundary(s))break;s=t(!0)}else{if(N(e,s)){if(n.boundary(s))break}else 3===s.nodeType&&n.text(s);if(s===r)break;s=t(!1)}}},I=(e,t,o,n,r)=>{var a;if(((e,t)=>N(e,t)||R(e,t)||D(e,t)||((e,t)=>"true"===e.getContentEditable(t)&&t.parentNode&&"false"===e.getContentEditableParent(t.parentNode))(e,t))(e,o))return;const s=null!==(a=e.getParent(n,e.isBlock))&&void 0!==a?a:e.getRoot(),i=new M(o,s),l=r?i.next.bind(i):i.prev.bind(i);L(e,l,o,{boundary:d,cef:d,text:e=>{r?t.fOffset+=e.length:t.sOffset+=e.length,t.elements.push(z(e))}})},H=(e,t,o,n,r,a=!0)=>{const s=new M(o,t),i=[];let l={sOffset:0,fOffset:0,elements:[]};I(e,l,o,t,!1);const c=()=>(l.elements.length>0&&(i.push(l),l={sOffset:0,fOffset:0,elements:[]}),!1);return L(e,s.next.bind(s),o,{boundary:c,cef:e=>(c(),r&&i.push(...r.cef(e)),!1),text:e=>{l.elements.push(z(e)),r&&r.text(e,l)}},n,a),n&&I(e,l,n,t,!0),c(),i},P=(e,t)=>{const o=B(t.startContainer,t.startOffset),n=o.element.dom,r=B(t.endContainer,t.endOffset),a=r.element.dom;return H(e,t.commonAncestorContainer,n,a,{text:(e,t)=>{e===a?t.fOffset+=e.length-r.offset:e===n&&(t.sOffset+=o.offset)},cef:t=>{return((e,t)=>{const o=f.call(e,0);return o.sort(((e,t)=>((e,t)=>((e,t,o)=>0!=(e.compareDocumentPosition(t)&o))(e,t,Node.DOCUMENT_POSITION_PRECEDING))(e.elements[0].dom,t.elements[0].dom)?1:-1)),o})(w((o=z(t),((e,t)=>{const o=void 0===t?document:t.dom;return 1!==(n=o).nodeType&&9!==n.nodeType&&11!==n.nodeType||0===n.childElementCount?[]:b(o.querySelectorAll(e),z);var n})("*[contenteditable=true]",o)),(t=>{const o=t.dom;return H(e,o,o)})));var o}},!1)},F=(e,t)=>t.collapsed?[]:P(e,t),j=(e,t)=>{const o=e.createRng();return o.selectNode(t),F(e,o)},V=(e,t)=>w(t,(t=>{const o=t.elements,n=b(o,A).join(""),r=((e,t,o=0,n=e.length)=>{const r=t.regex;r.lastIndex=o;const a=[];let s;for(;s=r.exec(e);){const e=s[t.matchIndex],o=s.index+s[0].indexOf(e),i=o+e.length;if(i>n)break;a.push({start:o,finish:i}),r.lastIndex=i}return a})(n,e,t.sOffset,n.length-t.fOffset);return((e,t)=>{const o=(n=e,r=(e,o)=>{const n=A(o),r=e.last,a=r+n.length,s=w(t,((e,t)=>e.start<a&&e.finish>r?[{element:o,start:Math.max(r,e.start)-r,finish:Math.min(a,e.finish)-r,matchId:t}]:[]));return{results:e.results.concat(s),last:a}},a={results:[],last:0},v(n,((e,t)=>{a=r(a,e)})),a).results;var n,r,a;return((e,t)=>{if(0===e.length)return[];{let o=t(e[0]);const n=[];let r=[];for(let a=0,s=e.length;a<s;a++){const s=e[a],i=t(s);i!==o&&(n.push(r),r=[]),o=i,r.push(s)}return 0!==r.length&&n.push(r),n}})(o,(e=>e.matchId))})(o,r)})),Z=(e,t)=>{k(e,((e,o)=>{k(e,(e=>{const n=z(t.cloneNode(!1));((e,t,o)=>{((e,t,o)=>{if(!(r(o)||s(o)||i(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)})(n,"data-mce-index",o);const a=e.element.dom;if(a.length===e.finish&&0===e.start)T(e.element,n);else{a.length!==e.finish&&a.splitText(e.finish);const t=a.splitText(e.start);T(z(t),n)}}))}))},U=e=>e.getAttribute("data-mce-index"),q=(e,t,o,n)=>{const r=e.dom.create("span",{"data-mce-bogus":1});r.className="mce-match-marker";const a=e.getBody();return te(e,t,!1),n?((e,t,o,n)=>{const r=o.getBookmark(),a=e.select("td[data-mce-selected],th[data-mce-selected]"),s=a.length>0?((e,t)=>w(t,(t=>j(e,t))))(e,a):F(e,o.getRng()),i=V(t,s);return Z(i,n),o.moveToBookmark(r),i.length})(e.dom,o,e.selection,r):((e,t,o,n)=>{const r=j(e,o),a=V(t,r);return Z(a,n),a.length})(e.dom,o,a,r)},W=e=>{var t;const o=e.parentNode;e.firstChild&&o.insertBefore(e.firstChild,e),null===(t=e.parentNode)||void 0===t||t.removeChild(e)},$=(e,t)=>{const o=[],n=h.toArray(e.getBody().getElementsByTagName("span"));if(n.length)for(let e=0;e<n.length;e++){const r=U(n[e]);null!==r&&r.length&&r===t.toString()&&o.push(n[e])}return o},G=(e,t,o)=>{const n=t.get();let r=n.index;const a=e.dom;o?r+1===n.count?r=0:r++:r-1==-1?r=n.count-1:r--,a.removeClass($(e,n.index),"mce-match-marker-selected");const s=$(e,r);return s.length?(a.addClass($(e,r),"mce-match-marker-selected"),e.selection.scrollIntoView(s[0]),r):-1},K=(e,t)=>{const o=t.parentNode;e.remove(t),o&&e.isEmpty(o)&&e.remove(o)},Y=(e,t,o,n,r,a)=>{const s=e.selection,i=((e,t)=>{const o="("+e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&").replace(/\s/g,"[^\\S\\r\\n\\uFEFF]")+")";return t?`(?:^|\\s|${g()})`+o+`(?=$|\\s|${g()})`:o})(o,r),l=s.isForward(),c={regex:new RegExp(i,n?"g":"gi"),matchIndex:1},d=q(e,t,c,a);if(p.browser.isSafari()&&s.setRng(s.getRng(),l),d){const s=G(e,t,!0);t.set({index:s,count:d,text:o,matchCase:n,wholeWord:r,inSelection:a})}return d},X=(e,t)=>{const o=G(e,t,!0);t.set({...t.get(),index:o})},J=(e,t)=>{const o=G(e,t,!1);t.set({...t.get(),index:o})},Q=e=>{const t=U(e);return null!==t&&t.length>0},ee=(e,t,o,n,r)=>{const a=t.get(),s=a.index;let i,l=s;n=!1!==n;const c=e.getBody(),d=h.grep(h.toArray(c.getElementsByTagName("span")),Q);for(let t=0;t<d.length;t++){const c=U(d[t]);let u=i=parseInt(c,10);if(r||u===a.index){for(o.length?(d[t].innerText=o,W(d[t])):K(e.dom,d[t]);d[++t];){if(u=parseInt(U(d[t]),10),u!==i){t--;break}K(e.dom,d[t])}n&&l--}else i>s&&d[t].setAttribute("data-mce-index",String(i-1))}return t.set({...a,count:r?0:a.count-1,index:l}),n?X(e,t):J(e,t),!r&&t.get().count>0},te=(e,t,o)=>{let n,r;const a=t.get(),s=h.toArray(e.getBody().getElementsByTagName("span"));for(let e=0;e<s.length;e++){const t=U(s[e]);null!==t&&t.length&&(t===a.index.toString()&&(n||(n=s[e].firstChild),r=s[e].firstChild),W(s[e]))}if(t.set({...a,index:-1,count:0,text:""}),n&&r){const t=e.dom.createRng();return t.setStart(n,0),t.setEnd(r,r.data.length),!1!==o&&e.selection.setRng(t),t}},oe=(t,o)=>{const n=(()=>{const t=(t=>{const o=e(m.none()),n=()=>o.get().each(t);return{clear:()=>{n(),o.set(m.none())},isSet:()=>o.get().isSome(),get:()=>o.get(),set:e=>{n(),o.set(m.some(e))}}})(l);return{...t,on:e=>t.get().each(e)}})();t.undoManager.add();const r=h.trim(t.selection.getContent({format:"text"})),a=e=>{e.setEnabled("next",((e,t)=>t.get().count>1)(0,o)),e.setEnabled("prev",((e,t)=>t.get().count>1)(0,o))},s=(e,t)=>{v(["replace","replaceall","prev","next"],(o=>e.setEnabled(o,!t)))},i=(e,t)=>{p.browser.isSafari()&&p.deviceType.isTouch()&&("find"===t||"replace"===t||"replaceall"===t)&&e.focus(t)},c=e=>{te(t,o,!1),s(e,!0),a(e)},d=e=>{const n=e.getData(),r=o.get();if(n.findtext.length){if(r.text===n.findtext&&r.matchCase===n.matchcase&&r.wholeWord===n.wholewords)X(t,o);else{const r=Y(t,o,n.findtext,n.matchcase,n.wholewords,n.inselection);r<=0&&(e=>{e.redial(y(!0,e.getData()))})(e),s(e,0===r)}a(e)}else c(e)},u=o.get(),g={findtext:r,replacetext:"",wholewords:u.wholeWord,matchcase:u.matchCase,inselection:u.inSelection},f=e=>{const t=[{type:"bar",items:[{type:"input",name:"findtext",placeholder:"Find",maximized:!0,inputMode:"search"},{type:"button",name:"prev",text:"Previous",icon:"action-prev",enabled:!1,borderless:!0},{type:"button",name:"next",text:"Next",icon:"action-next",enabled:!1,borderless:!0}]},{type:"input",name:"replacetext",placeholder:"Replace with",inputMode:"search"}];return e&&t.push({type:"alertbanner",level:"error",text:"Could not find the specified string.",icon:"warning"}),t},y=(e,n)=>({title:"Find and Replace",size:"normal",body:{type:"panel",items:f(e)},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:!0},{type:"custom",name:"replace",text:"Replace",enabled:!1},{type:"custom",name:"replaceall",text:"Replace all",enabled:!1}],initialData:n,onChange:(t,n)=>{e&&t.redial(y(!1,t.getData())),"findtext"===n.name&&o.get().count>0&&c(t)},onAction:(e,n)=>{const r=e.getData();switch(n.name){case"find":d(e);break;case"replace":ee(t,o,r.replacetext)?a(e):c(e);break;case"replaceall":ee(t,o,r.replacetext,!0,!0),c(e);break;case"prev":J(t,o),a(e);break;case"next":X(t,o),a(e);break;case"matchcase":case"wholewords":case"inselection":(e=>{const t=e.getData(),n=o.get();o.set({...n,matchCase:t.matchcase,wholeWord:t.wholewords,inSelection:t.inselection})})(e),c(e)}i(e,n.name)},onSubmit:e=>{d(e),i(e,"find")},onClose:()=>{t.focus(),te(t,o),t.undoManager.add()}});n.set(t.windowManager.open(y(!1,g),{inline:"toolbar"}))},ne=(e,t)=>()=>{oe(e,t)};t.add("searchreplace",(t=>{const o=e({index:-1,count:0,text:"",matchCase:!1,wholeWord:!1,inSelection:!1});return((e,t)=>{e.addCommand("SearchReplace",(()=>{oe(e,t)}))})(t,o),((e,t)=>{e.ui.registry.addMenuItem("searchreplace",{text:"Find and replace...",shortcut:"Meta+F",onAction:ne(e,t),icon:"search"}),e.ui.registry.addButton("searchreplace",{tooltip:"Find and replace",onAction:ne(e,t),icon:"search"}),e.shortcuts.add("Meta+F","",ne(e,t))})(t,o),((e,t)=>({done:o=>te(e,t,o),find:(o,n,r,a=!1)=>Y(e,t,o,n,r,a),next:()=>X(e,t),prev:()=>J(e,t),replace:(o,n,r)=>ee(e,t,o,n,r)}))(t,o)}))}()},38619:function(e,t,o){o(42590)},42590:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("array"),a=o("boolean"),s=(void 0,e=>undefined===e);const i=e=>!(e=>null==e)(e),l=o("function"),c=o("number"),d=()=>{},u=e=>()=>e,m=e=>e,g=(e,t)=>e===t;function p(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const h=e=>{e()},f=u(!1),y=u(!0);class b{constructor(e,t){this.tag=e,this.value=t}static some(e){return new b(!0,e)}static none(){return b.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?b.some(e(this.value)):b.none()}bind(e){return this.tag?e(this.value):b.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this: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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return i(e)?b.some(e):b.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}b.singletonNone=new b(!1);const v=Object.keys,k=Object.hasOwnProperty,w=(e,t)=>{const o=v(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},_=(e,t)=>{const o={};var n;return((e,t,o,n)=>{w(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))})(e,t,(n=o,(e,t)=>{n[t]=e}),d),o},x=e=>v(e).length,C=(e,t)=>S(e,t)?b.from(e[t]):b.none(),S=(e,t)=>k.call(e,t),z=(e,t)=>S(e,t)&&void 0!==e[t]&&null!==e[t],O=Array.prototype.indexOf,T=Array.prototype.push,E=(e,t)=>((e,t)=>O.call(e,t))(e,t)>-1,A=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return!0;return!1},M=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},N=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},R=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},D=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},B=(e,t,o)=>(R(e,((e,n)=>{o=t(o,e,n)})),o),L=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return b.some(r);if(o(r,n))break}return b.none()})(e,t,f),I=(e,t)=>(e=>{const t=[];for(let o=0,n=e.length;o<n;++o){if(!r(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);T.apply(t,e[o])}return t})(N(e,t)),H=(e,t)=>{for(let o=0,n=e.length;o<n;++o)if(!0!==t(e[o],o))return!1;return!0},P=(e,t)=>t>=0&&t<e.length?b.some(e[t]):b.none(),F=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return b.none()},j=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},V={fromHtml:(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return j(o.childNodes[0])},fromTag:(e,t)=>{const o=(t||document).createElement(e);return j(o)},fromText:(e,t)=>{const o=(t||document).createTextNode(e);return j(o)},fromDom:j,fromPoint:(e,t,o)=>b.from(e.dom.elementFromPoint(t,o)).map(j)},Z=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},U=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,q=(e,t)=>e.dom===t.dom,W=Z;"undefined"!=typeof window?window:Function("return this;")();const $=e=>e.dom.nodeName.toLowerCase(),G=e=>e.dom.nodeType,K=e=>t=>G(t)===e,Y=K(1),X=K(3),J=K(9),Q=K(11),ee=e=>t=>Y(t)&&$(t)===e,te=e=>J(e)?e:V.fromDom(e.dom.ownerDocument),oe=e=>b.from(e.dom.parentNode).map(V.fromDom),ne=e=>b.from(e.dom.nextSibling).map(V.fromDom),re=e=>N(e.dom.childNodes,V.fromDom),ae=l(Element.prototype.attachShadow)&&l(Node.prototype.getRootNode)?e=>V.fromDom(e.dom.getRootNode()):te,se=e=>V.fromDom(e.dom.host),ie=e=>{const t=X(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=ae(e);return Q(o=t)&&i(o.dom.host)?b.some(t):b.none();var o})(V.fromDom(t)).fold((()=>o.body.contains(t)),(n=ie,r=se,e=>n(r(e))));var n,r};var le=(e,t,o,n,r)=>e(o,n)?b.some(o):l(r)&&r(o)?b.none():t(o,n,r);const ce=(e,t,o)=>{let n=e.dom;const r=l(o)?o:f;for(;n.parentNode;){n=n.parentNode;const e=V.fromDom(n);if(t(e))return b.some(e);if(r(e))break}return b.none()},de=(e,t,o)=>ce(e,(e=>Z(e,t)),o),ue=(e,t)=>((e,o)=>L(e.dom.childNodes,(e=>{return o=V.fromDom(e),Z(o,t);var o})).map(V.fromDom))(e),me=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return U(o)?b.none():b.from(o.querySelector(e)).map(V.fromDom)})(t,e),ge=(e,t,o)=>le(((e,t)=>Z(e,t)),de,e,t,o),pe=(e,t=!1)=>{return ie(e)?e.dom.isContentEditable:(o=e,ge(o,"[contenteditable]")).fold(u(t),(e=>"true"===he(e)));var o},he=e=>e.dom.contentEditable,fe=e=>t=>q(t,(e=>V.fromDom(e.getBody()))(e)),ye=e=>/^\d+(\.\d+)?$/.test(e)?e+"px":e,be=e=>V.fromDom(e.selection.getStart()),ve=(e,t)=>{let o=[];return R(re(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(ve(e,t))})),o},ke=(e,t)=>((e,o)=>D(re(e),(e=>Z(e,t))))(e),we=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return U(o)?[]:N(o.querySelectorAll(e),V.fromDom)})(t,e),_e=(e,t,o)=>{if(!(n(o)||a(o)||c(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},xe=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},Ce=(e,t)=>b.from(xe(e,t)),Se=(e,t)=>{e.dom.removeAttribute(t)},ze=(e,t,o=g)=>e.exists((e=>o(e,t))),Oe=(e,t,o)=>e.isSome()&&t.isSome()?b.some(o(e.getOrDie(),t.getOrDie())):b.none(),Te=(e,t)=>((e,t,o)=>""===t||e.length>=t.length&&e.substr(0,0+t.length)===t)(e,t),Ee=(Ae=/^\s+|\s+$/g,e=>e.replace(Ae,""));var Ae;const Me=e=>e.length>0,Ne=(e,t=10)=>{const o=parseInt(e,t);return isNaN(o)?b.none():b.some(o)},Re=e=>void 0!==e.style&&l(e.style.getPropertyValue),De=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||ie(e)?n:Be(o,t)},Be=(e,t)=>Re(e)?e.style.getPropertyValue(t):"",Le=(e,t)=>{const o=e.dom,n=Be(o,t);return b.from(n).filter((e=>e.length>0))},Ie=(e,t,o=0)=>Ce(e,t).map((e=>parseInt(e,10))).getOr(o),He=(e,t)=>Pe(e,t,y),Pe=(e,t,o)=>I(re(e),(e=>Z(e,t)?o(e)?[e]:[]:Pe(e,t,o))),Fe=["tfoot","thead","tbody","colgroup"],je=(e,t,o)=>({element:e,rowspan:t,colspan:o}),Ve=(e,t,o)=>({element:e,cells:t,section:o}),Ze=(e,t)=>ge(e,"table",t),Ue=e=>He(e,"tr"),qe=e=>Ze(e).fold(u([]),(e=>ke(e,"colgroup"))),We=e=>oe(e).map((e=>{const t=$(e);return(e=>E(Fe,e))(t)?t:"tbody"})).getOr("tbody"),$e=e=>Ce(e,"data-snooker-locked-cols").bind((e=>b.from(e.match(/\d+/g)))).map((e=>((e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o})(e,y))),Ge=(e,t)=>e+","+t,Ke=e=>{const t={},o=[];var n;const r=(n=e,P(n,0)).map((e=>e.element)).bind(Ze).bind($e).getOr({});let a=0,s=0,i=0;const{pass:l,fail:c}=((e,t)=>{const o=[],n=[];for(let t=0,a=e.length;t<a;t++){const a=e[t];(r=a,"colgroup"===r.section?o:n).push(a)}var r;return{pass:o,fail:n}})(e);R(c,(e=>{const n=[];R(e.cells,(e=>{let o=0;for(;void 0!==t[Ge(i,o)];)o++;const a=z(r,o.toString()),l=((e,t,o,n,r,a)=>({element:e,rowspan:t,colspan:o,row:n,column:r,isLocked:a}))(e.element,e.rowspan,e.colspan,i,o,a);for(let n=0;n<e.colspan;n++)for(let r=0;r<e.rowspan;r++){const e=o+n,a=Ge(i+r,e);t[a]=l,s=Math.max(s,e+1)}n.push(l)})),a++,o.push(Ve(e.element,n,e.section)),i++}));const{columns:d,colgroups:u}=(e=>P(e,e.length-1))(l).map((e=>{const t=(e=>{const t={};let o=0;return R(e.cells,(e=>{const n=e.colspan;M(n,(r=>{const a=o+r;t[a]=((e,t,o)=>({element:e,colspan:t,column:o}))(e.element,n,a)})),o+=n})),t})(e),o=((e,t)=>({element:e,columns:t}))(e.element,((e,t)=>{const o=[];return w(e,((e,n)=>{o.push(t(e,n))})),o})(t,m));return{colgroups:[o],columns:t}})).getOrThunk((()=>({colgroups:[],columns:{}}))),g=((e,t)=>({rows:e,columns:t}))(a,s);return{grid:g,access:t,all:o,columns:d,colgroups:u}},Ye=e=>{const t=(e=>{const t=Ue(e);return((e,t)=>N(e,(e=>{if("colgroup"===$(e)){const t=N((e=>Z(e,"colgroup")?ke(e,"col"):I(qe(e),(e=>ke(e,"col"))))(e),(e=>{const t=Ie(e,"span",1);return je(e,1,t)}));return Ve(e,t,"colgroup")}{const o=N((e=>He(e,"th,td"))(e),(e=>{const t=Ie(e,"rowspan",1),o=Ie(e,"colspan",1);return je(e,t,o)}));return Ve(e,o,t(e))}})))([...qe(e),...t],We)})(e);return Ke(t)},Xe=(e,t,o)=>b.from(e.access[Ge(t,o)]),Je=(e,t,o)=>{const n=((e,t)=>{const o=I(e.all,(e=>e.cells));return D(o,t)})(e,(e=>o(t,e.element)));return n.length>0?b.some(n[0]):b.none()},Qe=(e,t)=>b.from(e.columns[t]);var et=tinymce.util.Tools.resolve("tinymce.util.Tools");const tt=(e,t,o)=>{const n=e.select("td,th",t);let r;for(let t=0;t<n.length;t++){const a=e.getStyle(n[t],o);if(s(r)&&(r=a),r!==a)return""}return r},ot=(e,t,o)=>{et.each("left center right".split(" "),(n=>{n!==o&&e.formatter.remove("align"+n,{},t)})),o&&e.formatter.apply("align"+o,{},t)},nt=(e,t,o)=>{e.dispatch("TableModified",{...o,table:t})},rt=(e,t,o)=>((e,t)=>(e=>{const t=parseFloat(e);return isNaN(t)?b.none():b.some(t)})(e).getOr(t))(De(e,t),o),at=e=>((e,t)=>{const o=e.dom,n=o.getBoundingClientRect().width||o.offsetWidth;return"border-box"===t?n:((e,t,o,n)=>t-rt(e,`padding-${o}`,0)-rt(e,`padding-${n}`,0)-rt(e,`border-${o}-width`,0)-rt(e,`border-${n}-width`,0))(e,n,"left","right")})(e,"content-box");var st=tinymce.util.Tools.resolve("tinymce.Env");const it=M(5,(e=>{const t=`${e+1}px`;return{title:t,value:t}})),lt=N(["Solid","Dotted","Dashed","Double","Groove","Ridge","Inset","Outset","None","Hidden"],(e=>({title:e,value:e.toLowerCase()}))),ct="100%",dt=e=>{var t;const o=e.dom,n=null!==(t=o.getParent(e.selection.getStart(),o.isBlock))&&void 0!==t?t:e.getBody();return at(V.fromDom(n))+"px"},ut=e=>t=>t.options.get(e),mt=ut("table_sizing_mode"),gt=ut("table_border_widths"),pt=ut("table_border_styles"),ht=ut("table_cell_advtab"),ft=ut("table_row_advtab"),yt=ut("table_advtab"),bt=ut("table_appearance_options"),vt=ut("table_grid"),kt=ut("table_style_by_css"),wt=ut("table_cell_class_list"),_t=ut("table_row_class_list"),xt=ut("table_class_list"),Ct=ut("table_toolbar"),St=ut("table_background_color_map"),zt=ut("table_border_color_map"),Ot=e=>"fixed"===mt(e),Tt=e=>"responsive"===mt(e),Et=e=>{const t=e.options,o=t.get("table_default_styles");return t.isSet("table_default_styles")?o:((e,t)=>Tt(e)||!kt(e)?t:Ot(e)?{...t,width:dt(e)}:{...t,width:ct})(e,o)},At=e=>{const t=e.options,o=t.get("table_default_attributes");return t.isSet("table_default_attributes")?o:((e,t)=>Tt(e)||kt(e)?t:Ot(e)?{...t,width:dt(e)}:{...t,width:ct})(e,o)},Mt=(e,t)=>t.column>=e.startCol&&t.column+t.colspan-1<=e.finishCol&&t.row>=e.startRow&&t.row+t.rowspan-1<=e.finishRow,Nt=(e,t,o)=>((e,t,o)=>{const n=Je(e,t,q),r=Je(e,o,q);return n.bind((e=>r.map((t=>{return o=e,n=t,{startRow:Math.min(o.row,n.row),startCol:Math.min(o.column,n.column),finishRow:Math.max(o.row+o.rowspan-1,n.row+n.rowspan-1),finishCol:Math.max(o.column+o.colspan-1,n.column+n.colspan-1)};var o,n}))))})(e,t,o).bind((t=>((e,t)=>{let o=!0;const n=p(Mt,t);for(let r=t.startRow;r<=t.finishRow;r++)for(let a=t.startCol;a<=t.finishCol;a++)o=o&&Xe(e,r,a).exists(n);return o?b.some(t):b.none()})(e,t))),Rt=Ye,Dt=(e,t)=>{oe(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Bt=(e,t)=>{ne(e).fold((()=>{oe(e).each((e=>{Lt(e,t)}))}),(e=>{Dt(e,t)}))},Lt=(e,t)=>{e.dom.appendChild(t.dom)},It=(e,t)=>{R(t,((o,n)=>{const r=0===n?e:t[n-1];Bt(r,o)}))},Ht=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Pt=((e,t)=>{const o=t=>e(t)?b.from(t.dom.nodeValue):b.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(X);var Ft=["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"];const jt=(e,t,o,n)=>{const r=t(e,o);return a=(o,n)=>{const r=t(e,n);return Vt(e,o,r)},s=r,((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(n,((e,t)=>{s=a(s,e)})),s;var a,s},Vt=(e,t,o)=>t.bind((t=>o.filter(p(e.eq,t)))),Zt={up:u({selector:de,closest:ge,predicate:ce,all:(e,t)=>{const o=l(t)?t:f;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=V.fromDom(e);if(r.push(t),!0===o(t))break;n=e}return r}}),down:u({selector:we,predicate:ve}),styles:u({get:De,getRaw:Le,set:(e,t,o)=>{((e,t,o)=>{if(!n(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Re(e)&&e.style.setProperty(t,o)})(e.dom,t,o)},remove:(e,t)=>{((e,t)=>{Re(e)&&e.style.removeProperty(t)})(e.dom,t),ze(Ce(e,"style").map(Ee),"")&&Se(e,"style")}}),attrs:u({get:xe,set:(e,t,o)=>{_e(e.dom,t,o)},remove:Se,copyTo:(e,t)=>{((e,t)=>{const o=e.dom;w(t,((e,t)=>{_e(o,t,e)}))})(t,B(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))}}),insert:u({before:Dt,after:Bt,afterAll:It,append:Lt,appendAll:(e,t)=>{R(t,(t=>{Lt(e,t)}))},prepend:(e,t)=>{(e=>((e,t)=>{const o=e.dom.childNodes;return b.from(o[0]).map(V.fromDom)})(e))(e).fold((()=>{Lt(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},wrap:(e,t)=>{Dt(e,t),Lt(t,e)}}),remove:u({unwrap:e=>{const t=re(e);t.length>0&&It(e,t),Ht(e)},remove:Ht}),create:u({nu:V.fromTag,clone:e=>V.fromDom(e.dom.cloneNode(!1)),text:V.fromText}),query:u({comparePosition:(e,t)=>e.dom.compareDocumentPosition(t.dom),prevSibling:e=>b.from(e.dom.previousSibling).map(V.fromDom),nextSibling:ne}),property:u({children:re,name:$,parent:oe,document:e=>te(e).dom,isText:X,isComment:e=>8===G(e)||"#comment"===$(e),isElement:Y,isSpecial:e=>{const t=$(e);return E(["script","noscript","iframe","noframes","noembed","title","style","textarea","xmp"],t)},getLanguage:e=>Y(e)?Ce(e,"lang"):b.none(),getText:e=>Pt.get(e),setText:(e,t)=>Pt.set(e,t),isBoundary:e=>!!Y(e)&&("body"===$(e)||E(Ft,$(e))),isEmptyTag:e=>!!Y(e)&&E(["br","img","hr","input"],$(e)),isNonEditable:e=>Y(e)&&"false"===xe(e,"contenteditable")}),eq:q,is:W},Ut=e=>de(e,"table"),qt=(e,t,o)=>me(e,t).bind((t=>me(e,o).bind((e=>{return(o=Ut,n=[t,e],((e,t,o)=>o.length>0?((e,t,o,n)=>n(e,t,o[0],o.slice(1)))(e,t,o,jt):b.none())(Zt,((e,t)=>o(t)),n)).map((o=>({first:t,last:e,table:o})));var o,n})))),Wt=e=>N(e,V.fromDom),$t="data-mce-selected",Gt="data-mce-first-selected",Kt="data-mce-last-selected",Yt={selected:$t,selectedSelector:"td["+$t+"],th["+$t+"]",firstSelected:Gt,firstSelectedSelector:"td["+Gt+"],th["+Gt+"]",lastSelected:Kt,lastSelectedSelector:"td["+Kt+"],th["+Kt+"]"},Xt=e=>(t,o)=>{const n=$(t),r="col"===n||"colgroup"===n?Ze(a=t).bind((e=>((e,t)=>((e,t)=>{const o=we(e,t);return o.length>0?b.some(o):b.none()})(e,t))(e,Yt.firstSelectedSelector))).fold(u(a),(e=>e[0])):t;var a;return ge(r,e,o)},Jt=Xt("th,td,caption"),Qt=Xt("th,td"),eo=e=>Wt(e.model.table.getSelectedCells()),to=(e,t)=>{const o=Qt(e),n=o.bind((e=>Ze(e))).map((e=>Ue(e)));return Oe(o,n,((e,o)=>D(o,(o=>A(Wt(o.dom.cells),(o=>"1"===xe(o,t)||q(o,e))))))).getOr([])},oo=[{text:"None",value:""},{text:"Top",value:"top"},{text:"Middle",value:"middle"},{text:"Bottom",value:"bottom"}],no=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,ro=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,ao=e=>{return(t=e,"#",Te(t,"#")?((e,t)=>e.substring(1))(t):t).toUpperCase();var t},so=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},io=e=>{return t=so(e.red)+so(e.green)+so(e.blue),{value:ao(t)};var t},lo=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,co=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,uo=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),mo=(e,t,o,n)=>{const r=parseInt(e,10),a=parseInt(t,10),s=parseInt(o,10),i=parseFloat(n);return uo(r,a,s,i)},go=e=>{if("transparent"===e)return b.some(uo(0,0,0,0));const t=lo.exec(e);if(null!==t)return b.some(mo(t[1],t[2],t[3],"1"));const o=co.exec(e);return null!==o?b.some(mo(o[1],o[2],o[3],o[4])):b.none()},po=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},ho=(e,t,o)=>n=>{const r=(e=>{const t=po(b.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(b.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(b.some(e))}}})((e=>e.unbind())),a=!Me(o),s=()=>{const s=eo(e),i=n=>e.formatter.match(t,{value:o},n.dom,a);a?(n.setActive(!A(s,i)),r.set(e.formatter.formatChanged(t,(e=>n.setActive(!e)),!0))):(n.setActive(H(s,i)),r.set(e.formatter.formatChanged(t,n.setActive,!1,{value:o})))};return e.initialized?s():e.on("init",s),r.clear},fo=e=>z(e,"menu"),yo=e=>N(e,(e=>{const t=e.text||e.title||"";return fo(e)?{text:t,items:yo(e.menu)}:{text:t,value:e.value}})),bo=(e,t,o,n)=>N(t,(t=>{const r=t.text||t.title;return fo(t)?{type:"nestedmenuitem",text:r,getSubmenuItems:()=>bo(e,t.menu,o,n)}:{text:r,type:"togglemenuitem",onAction:()=>n(t.value),onSetup:ho(e,o,t.value)}})),vo=(e,t)=>o=>{e.execCommand("mceTableApplyCellStyle",!1,{[t]:o})},ko=e=>I(e,(e=>fo(e)?[{...e,menu:ko(e.menu)}]:Me(e.value)?[e]:[])),wo=(e,t,o,n)=>r=>r(bo(e,t,o,n)),_o=(e,t,o)=>{const n=N(t,(e=>{return{text:e.title,value:"#"+(o=e.value,(t=o,(e=>no.test(e)||ro.test(e))(t)?b.some({value:ao(t)}):b.none()).orThunk((()=>go(o).map(io))).getOrThunk((()=>{const e=document.createElement("canvas");e.height=1,e.width=1;const t=e.getContext("2d");t.clearRect(0,0,e.width,e.height),t.fillStyle="#FFFFFF",t.fillStyle=o,t.fillRect(0,0,1,1);const n=t.getImageData(0,0,1,1).data,r=n[0],a=n[1],s=n[2],i=n[3];return io(uo(r,a,s,i))}))).value,type:"choiceitem"};var t,o}));return[{type:"fancymenuitem",fancytype:"colorswatch",initData:{colors:n.length>0?n:void 0,allowCustomColors:!1},onAction:t=>{const n="remove"===t.value?"":t.value;e.execCommand("mceTableApplyCellStyle",!1,{[o]:n})}}]},xo=e=>()=>{const t="header"===e.queryCommandValue("mceTableRowType")?"body":"header";e.execCommand("mceTableRowType",!1,{type:t})},Co=e=>()=>{const t="th"===e.queryCommandValue("mceTableColType")?"td":"th";e.execCommand("mceTableColType",!1,{type:t})},So=[{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:oo}],zo=e=>So.concat((e=>{const t=yo(wt(e));return t.length>0?b.some({name:"class",type:"listbox",label:"Class",items:t}):b.none()})(e).toArray()),Oo=(e,t)=>{const o=[{name:"borderstyle",type:"listbox",label:"Border style",items:[{text:"Select...",value:""}].concat(yo(pt(e)))},{name:"bordercolor",type:"colorinput",label:"Border color"},{name:"backgroundcolor",type:"colorinput",label:"Background color"}];return{title:"Advanced",name:"advanced",items:"cell"===t?[{name:"borderwidth",type:"input",label:"Border width"}].concat(o):o}},To=(e,t)=>{const o=e.dom;return{setAttrib:(e,n)=>{o.setAttrib(t,e,n)},setStyle:(e,n)=>{o.setStyle(t,e,n)},setFormat:(o,n)=>{""===n?e.formatter.remove(o,{value:null},t,!0):e.formatter.apply(o,{value:n},t)}}},Eo=ee("th"),Ao=(e,t)=>e&&t?"sectionCells":e?"section":"cells",Mo=e=>{const t=N(e,(e=>(e=>{const t="thead"===e.section,o=ze((e=>{const t=D(e,(e=>Eo(e.element)));return 0===t.length?b.some("td"):t.length===e.length?b.some("th"):b.none()})(e.cells),"th");return"tfoot"===e.section?{type:"footer"}:t||o?{type:"header",subType:Ao(t,o)}:{type:"body"}})(e).type)),o=E(t,"header"),n=E(t,"footer");if(o||n){const e=E(t,"body");return!o||e||n?o||e||!n?b.none():b.some("footer"):b.some("header")}return b.some("body")},No=(e,t)=>F(e.all,(e=>L(e.cells,(e=>q(t,e.element))))),Ro=(e,t,o)=>{const n=(e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t})(N(t.selection,(t=>{return(n=t,((e,t,o=f)=>o(t)?b.none():E(e,$(t))?b.some(t):de(t,e.join(","),(e=>Z(e,"table")||o(e))))(["td","th"],n,r)).bind((t=>No(e,t))).filter(o);var n,r})));return r=n,n.length>0?b.some(r):b.none();var r},Do=(e,t)=>Ro(e,t,y),Bo=(e,t)=>H(t,(t=>((e,t)=>No(e,t).exists((e=>!e.isLocked)))(e,t))),Lo=(e,t)=>((e,t)=>t.mergable)(0,t).filter((t=>Bo(e,t.cells))),Io=(e,t)=>((e,t)=>t.unmergable)(0,t).filter((t=>Bo(e,t))),Ho=((e=>{if(!r(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};R(e,((n,a)=>{const s=v(n);if(1!==s.length)throw new Error("one and only one name per case");const i=s[0],l=n[i];if(void 0!==o[i])throw new Error("duplicate key detected:"+i);if("cata"===i)throw new Error("cannot have a case named cata (sorry)");if(!r(l))throw new Error("case arguments must be an array");t.push(i),o[i]=(...o)=>{const n=o.length;if(n!==l.length)throw new Error("Wrong number of arguments to case "+i+". Expected "+l.length+" ("+l+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[a].apply(null,o)},match:e=>{const n=v(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!H(t,(e=>E(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[i].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:i,params:o})}}}}))})([{none:[]},{only:["index"]},{left:["index","next"]},{middle:["prev","index","next"]},{right:["prev","index"]}]),(e,t)=>{const o=Ye(e);return Do(o,t).bind((e=>{const t=e[e.length-1],n=e[0].row,r=t.row+t.rowspan,a=o.all.slice(n,r);return Mo(a)})).getOr("")}),Po=e=>{return Te(e,"rgb")?go(t=e).map(io).map((e=>"#"+e.value)).getOr(t):e;var t},Fo=e=>{const t=V.fromDom(e);return{borderwidth:Le(t,"border-width").getOr(""),borderstyle:Le(t,"border-style").getOr(""),bordercolor:Le(t,"border-color").map(Po).getOr(""),backgroundcolor:Le(t,"background-color").map(Po).getOr("")}},jo=e=>{const t=e[0],o=e.slice(1);return R(o,(e=>{R(v(t),(o=>{w(e,((e,n)=>{const r=t[o];""!==r&&o===n&&r!==e&&(t[o]="")}))}))})),t},Vo=(e,t,o,n)=>L(e,(e=>!s(o.formatter.matchNode(n,t+e)))).getOr(""),Zo=p(Vo,["left","center","right"],"align"),Uo=p(Vo,["top","middle","bottom"],"valign"),qo=e=>Ze(V.fromDom(e)).map((t=>{const o={selection:Wt(e.cells)};return Ho(t,o)})).getOr(""),Wo=(e,t)=>{const o=Ye(e),n=(e=>I(e.all,(e=>e.cells)))(o),r=D(n,(e=>A(t,(t=>q(e.element,t)))));return N(r,(e=>({element:e.element.dom,column:Qe(o,e.column).map((e=>e.element.dom))})))},$o=(e,t,o,n)=>{const r=n.getData();n.close(),e.undoManager.transact((()=>{((e,t,o,n)=>{const r=_(n,((e,t)=>o[t]!==e));x(r)>0&&t.length>=1&&Ze(t[0]).each((o=>{const a=Wo(o,t),s=x(_(r,((e,t)=>"scope"!==t&&"celltype"!==t)))>0,i=S(r,"celltype");(s||S(r,"scope"))&&((e,t,o,n)=>{const r=1===t.length;R(t,(t=>{const a=t.element,s=r?y:n,i=To(e,a);((e,t,o,n)=>{n("scope")&&e.setAttrib("scope",o.scope),n("class")&&e.setAttrib("class",o.class),n("height")&&e.setStyle("height",ye(o.height)),n("width")&&t.setStyle("width",ye(o.width))})(i,t.column.map((t=>To(e,t))).getOr(i),o,s),ht(e)&&((e,t,o)=>{o("backgroundcolor")&&e.setFormat("tablecellbackgroundcolor",t.backgroundcolor),o("bordercolor")&&e.setFormat("tablecellbordercolor",t.bordercolor),o("borderstyle")&&e.setFormat("tablecellborderstyle",t.borderstyle),o("borderwidth")&&e.setFormat("tablecellborderwidth",ye(t.borderwidth))})(i,o,s),n("halign")&&ot(e,a,o.halign),n("valign")&&((e,t,o)=>{et.each("top middle bottom".split(" "),(n=>{n!==o&&e.formatter.remove("valign"+n,{},t)})),o&&e.formatter.apply("valign"+o,{},t)})(e,a,o.valign)}))})(e,a,n,p(S,r)),i&&((e,t)=>{e.execCommand("mceTableCellType",!1,{type:t.celltype,no_events:!0})})(e,n),nt(e,o.dom,{structure:i,style:s})}))})(e,t,o,r),e.focus()}))},Go=e=>{const t=eo(e);if(0===t.length)return;const o=((e,t)=>{const o=Ze(t[0]).map((o=>N(Wo(o,t),(t=>((e,t,o,n)=>{const r=e.dom,a=(e,t)=>r.getStyle(e,t)||r.getAttrib(e,t);return{width:a(n.getOr(t),"width"),height:a(t,"height"),scope:r.getAttrib(t,"scope"),celltype:(s=t,s.nodeName.toLowerCase()),class:r.getAttrib(t,"class",""),halign:Zo(e,t),valign:Uo(e,t),...o?Fo(t):{}};var s})(e,t.element,ht(e),t.column)))));return jo(o.getOrDie())})(e,t),n={type:"tabpanel",tabs:[{title:"General",name:"general",items:zo(e)},Oo(e,"cell")]},r={type:"panel",items:[{type:"grid",columns:2,items:zo(e)}]};e.windowManager.open({title:"Cell Properties",size:"normal",body:ht(e)?n:r,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:o,onSubmit:p($o,e,t,o)})},Ko=[{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"}],Yo=e=>Ko.concat((e=>{const t=yo(_t(e));return t.length>0?b.some({name:"class",type:"listbox",label:"Class",items:t}):b.none()})(e).toArray()),Xo=(e,t,o,n)=>{const r=n.getData();n.close(),e.undoManager.transact((()=>{((e,t,o,n)=>{const r=_(n,((e,t)=>o[t]!==e));if(x(r)>0){const o=S(r,"type"),a=!o||x(r)>1;a&&((e,t,o,n)=>{const r=1===t.length?y:n;R(t,(t=>{const a=To(e,t);((e,t,o)=>{o("class")&&e.setAttrib("class",t.class),o("height")&&e.setStyle("height",ye(t.height))})(a,o,r),ft(e)&&((e,t,o)=>{o("backgroundcolor")&&e.setStyle("background-color",t.backgroundcolor),o("bordercolor")&&e.setStyle("border-color",t.bordercolor),o("borderstyle")&&e.setStyle("border-style",t.borderstyle)})(a,o,r),n("align")&&ot(e,t,o.align)}))})(e,t,n,p(S,r)),o&&((e,t)=>{e.execCommand("mceTableRowType",!1,{type:t.type,no_events:!0})})(e,n),Ze(V.fromDom(t[0])).each((t=>nt(e,t.dom,{structure:o,style:a})))}})(e,t,o,r),e.focus()}))},Jo=e=>{const t=to(be(e),Yt.selected);if(0===t.length)return;const o=N(t,(t=>((e,t,o)=>{const n=e.dom;return{height:n.getStyle(t,"height")||n.getAttrib(t,"height"),class:n.getAttrib(t,"class",""),type:qo(t),align:Zo(e,t),...o?Fo(t):{}}})(e,t.dom,ft(e)))),n=jo(o),r={type:"tabpanel",tabs:[{title:"General",name:"general",items:Yo(e)},Oo(e,"row")]},a={type:"panel",items:[{type:"grid",columns:2,items:Yo(e)}]};e.windowManager.open({title:"Row Properties",size:"normal",body:ft(e)?r:a,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:n,onSubmit:p(Xo,e,N(t,(e=>e.dom)),n)})},Qo=(e,t,o)=>{const n=o?[{type:"input",name:"cols",label:"Cols",inputMode:"numeric"},{type:"input",name:"rows",label:"Rows",inputMode:"numeric"}]:[],r=bt(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"}]}]:[],a=t.length>0?[{type:"listbox",name:"class",label:"Class",items:t}]:[];return n.concat([{type:"input",name:"width",label:"Width"},{type:"input",name:"height",label:"Height"}]).concat(r).concat([{type:"listbox",name:"align",label:"Alignment",items:[{text:"None",value:""},{text:"Left",value:"left"},{text:"Center",value:"center"},{text:"Right",value:"right"}]}]).concat(a)},en=(e,t,o,r)=>{if("TD"===t.tagName||"TH"===t.tagName)n(o)&&i(r)?e.setStyle(t,o,r):e.setStyles(t,o);else if(t.children)for(let n=0;n<t.children.length;n++)en(e,t.children[n],o,r)},tn=(e,t,o,n)=>{const r=e.dom,a=n.getData(),i=_(a,((e,t)=>o[t]!==e));n.close(),""===a.class&&delete a.class,e.undoManager.transact((()=>{if(!t){const o=Ne(a.cols).getOr(1),n=Ne(a.rows).getOr(1);e.execCommand("mceInsertTable",!1,{rows:n,columns:o}),t=Qt(be(e),fe(e)).bind((t=>Ze(t,fe(e)))).map((e=>e.dom)).getOrDie()}if(x(i)>0){((e,t,o)=>{const n=e.dom,r={},a={};if(s(o.class)||(r.class=o.class),a.height=ye(o.height),kt(e)?a.width=ye(o.width):n.getAttrib(t,"width")&&(r.width=(e=>e?e.replace(/px$/,""):"")(o.width)),kt(e)?(a["border-width"]=ye(o.border),a["border-spacing"]=ye(o.cellspacing)):(r.border=o.border,r.cellpadding=o.cellpadding,r.cellspacing=o.cellspacing),kt(e)&&t.children)for(let r=0;r<t.children.length;r++)en(n,t.children[r],{"border-width":ye(o.border),padding:ye(o.cellpadding)}),yt(e)&&en(n,t.children[r],{"border-color":o.bordercolor});if(yt(e)){const e=o;a["background-color"]=e.backgroundcolor,a["border-color"]=e.bordercolor,a["border-style"]=e.borderstyle}r.style=n.serializeStyle({...Et(e),...a}),n.setAttribs(t,{...At(e),...r})})(e,t,a);const o=r.select("caption",t)[0];(o&&!a.caption||!o&&a.caption)&&e.execCommand("mceTableToggleCaption"),ot(e,t,a.align)}if(e.focus(),e.addVisual(),x(i)>0){const o=S(i,"caption"),n=!o||x(i)>1;nt(e,t,{structure:o,style:n})}}))},on=(e,t)=>{const o=e.dom;let n,r=((e,t)=>{const o=Et(e),n=At(e),r=t?{borderstyle:C(o,"border-style").getOr(""),bordercolor:Po(C(o,"border-color").getOr("")),backgroundcolor:Po(C(o,"background-color").getOr(""))}:{};return{height:"",width:"100%",cellspacing:"",cellpadding:"",caption:!1,class:"",align:"",border:"",...o,...n,...r,...(()=>{const t=o["border-width"];return kt(e)&&t?{border:t}:C(n,"border").fold((()=>({})),(e=>({border:e})))})(),...{...C(o,"border-spacing").or(C(n,"cellspacing")).fold((()=>({})),(e=>({cellspacing:e}))),...C(o,"border-padding").or(C(n,"cellpadding")).fold((()=>({})),(e=>({cellpadding:e})))}}})(e,yt(e));t?(r.cols="1",r.rows="1",yt(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor="")):(n=o.getParent(e.selection.getStart(),"table",e.getBody()),n?r=((e,t,o)=>{const n=e.dom,r=kt(e)?n.getStyle(t,"border-spacing")||n.getAttrib(t,"cellspacing"):n.getAttrib(t,"cellspacing")||n.getStyle(t,"border-spacing"),a=kt(e)?tt(n,t,"padding")||n.getAttrib(t,"cellpadding"):n.getAttrib(t,"cellpadding")||tt(n,t,"padding");return{width:n.getStyle(t,"width")||n.getAttrib(t,"width"),height:n.getStyle(t,"height")||n.getAttrib(t,"height"),cellspacing:null!=r?r:"",cellpadding:null!=a?a:"",border:((t,o)=>{const n=Le(V.fromDom(o),"border-width");return kt(e)&&n.isSome()?n.getOr(""):t.getAttrib(o,"border")||tt(e.dom,o,"border-width")||tt(e.dom,o,"border")||""})(n,t),caption:!!n.select("caption",t)[0],class:n.getAttrib(t,"class",""),align:Zo(e,t),...o?Fo(t):{}}})(e,n,yt(e)):yt(e)&&(r.borderstyle="",r.bordercolor="",r.backgroundcolor=""));const a=yo(xt(e));a.length>0&&r.class&&(r.class=r.class.replace(/\s*mce\-item\-table\s*/g,""));const s={type:"grid",columns:2,items:Qo(e,a,t)},i=yt(e)?{type:"tabpanel",tabs:[{title:"General",name:"general",items:[s]},Oo(e,"table")]}:{type:"panel",items:[s]};e.windowManager.open({title:"Table Properties",size:"normal",body:i,onSubmit:p(tn,e,n,r),buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],initialData:r})},nn=e=>{w({mceTableProps:p(on,e,!1),mceTableRowProps:p(Jo,e),mceTableCellProps:p(Go,e),mceInsertTableDialog:p(on,e,!0)},((t,o)=>e.addCommand(o,(()=>{return o=t,void((e=>{return(t=e,o=ee("table"),le(((e,t)=>t(e)),ce,t,o,void 0)).forall(pe);var t,o})(be(e))&&o());var o}))))},rn=m,an=e=>{const t=(e,t)=>Ce(e,t).exists((e=>parseInt(e,10)>1));return e.length>0&&H(e,(e=>t(e,"rowspan")||t(e,"colspan")))?b.some(e):b.none()},sn=(e,t,o)=>{return t.length<=1?b.none():(n=e,r=o.firstSelectedSelector,a=o.lastSelectedSelector,qt(n,r,a).bind((e=>{const t=e=>q(n,e),o="thead,tfoot,tbody,table",r=de(e.first,o,t),a=de(e.last,o,t);return r.bind((t=>a.bind((o=>q(t,o)?((e,t,o)=>{const n=Rt(e);return Nt(n,t,o)})(e.table,e.first,e.last):b.none()))))}))).map((e=>({bounds:e,cells:t})));var n,r,a},ln=e=>{const t=po(b.none()),o=po([]);let n=b.none();const r=ee("caption"),a=e=>n.forall((t=>!t[e])),s=()=>Jt(be(e),fe(e)).bind((t=>{return o=Oe(Ze(t),Jt((e=>V.fromDom(e.selection.getEnd()))(e),fe(e)).bind(Ze),((o,n)=>q(o,n)?r(t)?b.some((e=>({element:e,mergable:b.none(),unmergable:b.none(),selection:[e]}))(t)):b.some(((e,t,o)=>({element:o,mergable:sn(t,e,Yt),unmergable:an(e),selection:rn(e)}))(eo(e),o,t)):b.none())),o.bind(m);var o})),i=e=>Ze(e.element).map((t=>{const o=Ye(t),n=Do(o,e).getOr([]),r=B(n,((e,t)=>(t.isLocked&&(e.onAny=!0,0===t.column?e.onFirst=!0:t.column+t.colspan>=o.grid.columns&&(e.onLast=!0)),e)),{onAny:!1,onFirst:!1,onLast:!1});return{mergeable:Lo(o,e).isSome(),unmergeable:Io(o,e).isSome(),locked:r}})),l=()=>{t.set((e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)})(s)()),n=t.get().bind(i),R(o.get(),h)},c=e=>(e(),o.set(o.get().concat([e])),()=>{o.set(D(o.get(),(t=>t!==e)))}),d=(e,o)=>c((()=>t.get().fold((()=>{e.setEnabled(!1)}),(t=>{e.setEnabled(!o(t))})))),u=(e,o,n)=>c((()=>t.get().fold((()=>{e.setEnabled(!1),e.setActive(!1)}),(t=>{e.setEnabled(!o(t)),e.setActive(n(t))})))),g=e=>n.exists((t=>t.locked[e])),p=(t,o)=>n=>u(n,(e=>r(e.element)),(()=>e.queryCommandValue(t)===o)),y=p("mceTableRowType","header"),v=p("mceTableColType","th");return e.on("NodeChange ExecCommand TableSelectorChange",l),{onSetupTable:e=>d(e,(e=>!1)),onSetupCellOrRow:e=>d(e,(e=>r(e.element))),onSetupColumn:e=>t=>d(t,(t=>r(t.element)||g(e))),onSetupPasteable:e=>t=>d(t,(t=>r(t.element)||e().isNone())),onSetupPasteableColumn:(e,t)=>o=>d(o,(o=>r(o.element)||e().isNone()||g(t))),onSetupMergeable:e=>d(e,(e=>a("mergeable"))),onSetupUnmergeable:e=>d(e,(e=>a("unmergeable"))),resetTargets:l,onSetupTableWithCaption:t=>u(t,f,(t=>Ze(t.element,fe(e)).exists((e=>ue(e,"caption").isSome())))),onSetupTableRowHeaders:y,onSetupTableColumnHeaders:v,targets:t.get}};var cn=tinymce.util.Tools.resolve("tinymce.FakeClipboard");const dn="x-tinymce/dom-table-",un=dn+"rows",mn=dn+"columns",gn=e=>{var t;const o=null!==(t=cn.read())&&void 0!==t?t:[];return F(o,(t=>b.from(t.getType(e))))},pn=()=>gn(un),hn=()=>gn(mn);e.add("table",(e=>{const t=ln(e);(e=>{const t=e.options.register;t("table_border_widths",{processor:"object[]",default:it}),t("table_border_styles",{processor:"object[]",default:lt}),t("table_cell_advtab",{processor:"boolean",default:!0}),t("table_row_advtab",{processor:"boolean",default:!0}),t("table_advtab",{processor:"boolean",default:!0}),t("table_appearance_options",{processor:"boolean",default:!0}),t("table_grid",{processor:"boolean",default:!st.deviceType.isTouch()}),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:"tableprops tabledelete | tableinsertrowbefore tableinsertrowafter tabledeleterow | tableinsertcolbefore tableinsertcolafter tabledeletecol"}),t("table_background_color_map",{processor:"object[]",default:[]}),t("table_border_color_map",{processor:"object[]",default:[]})})(e),nn(e),((e,t)=>{const o=t=>()=>e.execCommand(t),n=(t,n)=>!!e.queryCommandSupported(n.command)&&(e.ui.registry.addMenuItem(t,{...n,onAction:l(n.onAction)?n.onAction:o(n.command)}),!0),r=(t,n)=>{e.queryCommandSupported(n.command)&&e.ui.registry.addToggleMenuItem(t,{...n,onAction:l(n.onAction)?n.onAction:o(n.command)})},a=t=>{e.execCommand("mceInsertTable",!1,{rows:t.numRows,columns:t.numColumns})},s=[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(pn)}),n("tablepasterowafter",{text:"Paste row after",icon:"paste-row-after",command:"mceTablePasteRowAfter",onSetup:t.onSetupPasteable(pn)})],i=[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(hn,"onFirst")}),n("tablepastecolumnafter",{text:"Paste column after",icon:"paste-column-after",command:"mceTablePasteColAfter",onSetup:t.onSetupPasteableColumn(hn,"onLast")})],c=[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})];vt(e)?e.ui.registry.addNestedMenuItem("inserttable",{text:"Table",icon:"table",getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"inserttable",onAction:a}]}):e.ui.registry.addMenuItem("inserttable",{text:"Table",icon:"table",onAction:o("mceInsertTableDialog")}),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"}),E(s,!0)&&e.ui.registry.addNestedMenuItem("row",{type:"nestedmenuitem",text:"Row",getSubmenuItems:u("tableinsertrowbefore tableinsertrowafter tabledeleterow tablerowprops | tablecutrow tablecopyrow tablepasterowbefore tablepasterowafter")}),E(i,!0)&&e.ui.registry.addNestedMenuItem("column",{type:"nestedmenuitem",text:"Column",getSubmenuItems:u("tableinsertcolumnbefore tableinsertcolumnafter tabledeletecolumn | tablecutcolumn tablecopycolumn tablepastecolumnbefore tablepastecolumnafter")}),E(c,!0)&&e.ui.registry.addNestedMenuItem("cell",{type:"nestedmenuitem",text:"Cell",getSubmenuItems:u("tablecellprops tablemergecells tablesplitcells")}),e.ui.registry.addContextMenu("table",{update:()=>(t.resetTargets(),t.targets().fold(u(""),(e=>"caption"===$(e.element)?"tableprops deletetable":"cell row column | advtablesort | tableprops deletetable")))});const d=ko(xt(e));0!==d.length&&e.queryCommandSupported("mceTableToggleClass")&&e.ui.registry.addNestedMenuItem("tableclass",{icon:"table-classes",text:"Table styles",getSubmenuItems:()=>bo(e,d,"tableclass",(t=>e.execCommand("mceTableToggleClass",!1,t))),onSetup:t.onSetupTable});const m=ko(wt(e));0!==m.length&&e.queryCommandSupported("mceTableCellToggleClass")&&e.ui.registry.addNestedMenuItem("tablecellclass",{icon:"table-cell-classes",text:"Cell styles",getSubmenuItems:()=>bo(e,m,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",!1,t))),onSetup:t.onSetupCellOrRow}),e.queryCommandSupported("mceTableApplyCellStyle")&&(e.ui.registry.addNestedMenuItem("tablecellvalign",{icon:"vertical-align",text:"Vertical align",getSubmenuItems:()=>bo(e,oo,"tablecellverticalalign",vo(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderwidth",{icon:"border-width",text:"Border width",getSubmenuItems:()=>bo(e,gt(e),"tablecellborderwidth",vo(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellborderstyle",{icon:"border-style",text:"Border style",getSubmenuItems:()=>bo(e,pt(e),"tablecellborderstyle",vo(e,"border-style")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbackgroundcolor",{icon:"cell-background-color",text:"Background color",getSubmenuItems:()=>_o(e,St(e),"background-color"),onSetup:t.onSetupCellOrRow}),e.ui.registry.addNestedMenuItem("tablecellbordercolor",{icon:"cell-border-color",text:"Border color",getSubmenuItems:()=>_o(e,zt(e),"border-color"),onSetup:t.onSetupCellOrRow})),r("tablecaption",{icon:"table-caption",text:"Table caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption}),r("tablerowheader",{text:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:xo(e),onSetup:t.onSetupTableRowHeaders}),r("tablecolheader",{text:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Co(e),onSetup:t.onSetupTableRowHeaders})})(e,t),((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),n=(t,n)=>{e.queryCommandSupported(n.command)&&e.ui.registry.addButton(t,{...n,onAction:l(n.onAction)?n.onAction:o(n.command)})},r=(t,n)=>{e.queryCommandSupported(n.command)&&e.ui.registry.addToggleButton(t,{...n,onAction:l(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(pn)}),n("tablepasterowafter",{tooltip:"Paste row after",command:"mceTablePasteRowAfter",icon:"paste-row-after",onSetup:t.onSetupPasteable(pn)}),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(hn,"onFirst")}),n("tablepastecolafter",{tooltip:"Paste column after",command:"mceTablePasteColAfter",icon:"paste-column-after",onSetup:t.onSetupPasteableColumn(hn,"onLast")}),n("tableinsertdialog",{tooltip:"Insert table",command:"mceInsertTableDialog",icon:"table"});const a=ko(xt(e));0!==a.length&&e.queryCommandSupported("mceTableToggleClass")&&e.ui.registry.addMenuButton("tableclass",{icon:"table-classes",tooltip:"Table styles",fetch:wo(e,a,"tableclass",(t=>e.execCommand("mceTableToggleClass",!1,t))),onSetup:t.onSetupTable});const s=ko(wt(e));0!==s.length&&e.queryCommandSupported("mceTableCellToggleClass")&&e.ui.registry.addMenuButton("tablecellclass",{icon:"table-cell-classes",tooltip:"Cell styles",fetch:wo(e,s,"tablecellclass",(t=>e.execCommand("mceTableCellToggleClass",!1,t))),onSetup:t.onSetupCellOrRow}),e.queryCommandSupported("mceTableApplyCellStyle")&&(e.ui.registry.addMenuButton("tablecellvalign",{icon:"vertical-align",tooltip:"Vertical align",fetch:wo(e,oo,"tablecellverticalalign",vo(e,"vertical-align")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderwidth",{icon:"border-width",tooltip:"Border width",fetch:wo(e,gt(e),"tablecellborderwidth",vo(e,"border-width")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellborderstyle",{icon:"border-style",tooltip:"Border style",fetch:wo(e,pt(e),"tablecellborderstyle",vo(e,"border-style")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbackgroundcolor",{icon:"cell-background-color",tooltip:"Background color",fetch:t=>t(_o(e,St(e),"background-color")),onSetup:t.onSetupCellOrRow}),e.ui.registry.addMenuButton("tablecellbordercolor",{icon:"cell-border-color",tooltip:"Border color",fetch:t=>t(_o(e,zt(e),"border-color")),onSetup:t.onSetupCellOrRow})),r("tablecaption",{tooltip:"Table caption",icon:"table-caption",command:"mceTableToggleCaption",onSetup:t.onSetupTableWithCaption}),r("tablerowheader",{tooltip:"Row header",icon:"table-top-header",command:"mceTableRowType",onAction:xo(e),onSetup:t.onSetupTableRowHeaders}),r("tablecolheader",{tooltip:"Column header",icon:"table-left-header",command:"mceTableColType",onAction:Co(e),onSetup:t.onSetupTableColumnHeaders})})(e,t),(e=>{const t=Ct(e);t.length>0&&e.ui.registry.addContextToolbar("table",{predicate:t=>e.dom.is(t,"table")&&e.getBody().contains(t),items:t,scope:"node",position:"node"})})(e)}))}()},21449:function(e,t,o){o(18745)},18745:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=t("string"),n=t("object"),r=t("array"),a=("function",e=>"function"==typeof e);const s=(!1,()=>false);var i=tinymce.util.Tools.resolve("tinymce.util.Tools");const l=e=>t=>t.options.get(e),c=l("template_cdate_classes"),d=l("template_mdate_classes"),u=l("template_selected_content_classes"),m=l("template_preview_replace_values"),g=l("template_replace_values"),p=l("templates"),h=l("template_cdate_format"),f=l("template_mdate_format"),y=l("content_style"),b=l("content_css_cors"),v=l("body_class"),k=(e,t)=>{if((e=""+e).length<t)for(let o=0;o<t-e.length;o++)e="0"+e;return e},w=(e,t,o=new Date)=>{const n="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),r="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),a="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),s="January February March April May June July August September October November December".split(" ");return(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=(t=t.replace("%D","%m/%d/%Y")).replace("%r","%I:%M:%S %p")).replace("%Y",""+o.getFullYear())).replace("%y",""+o.getYear())).replace("%m",k(o.getMonth()+1,2))).replace("%d",k(o.getDate(),2))).replace("%H",""+k(o.getHours(),2))).replace("%M",""+k(o.getMinutes(),2))).replace("%S",""+k(o.getSeconds(),2))).replace("%I",""+((o.getHours()+11)%12+1))).replace("%p",o.getHours()<12?"AM":"PM")).replace("%B",""+e.translate(s[o.getMonth()]))).replace("%b",""+e.translate(a[o.getMonth()]))).replace("%A",""+e.translate(r[o.getDay()]))).replace("%a",""+e.translate(n[o.getDay()]))).replace("%%","%")};class _{constructor(e,t){this.tag=e,this.value=t}static some(e){return new _(!0,e)}static none(){return _.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?_.some(e(this.value)):_.none()}bind(e){return this.tag?e(this.value):_.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:_.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?_.none():_.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}_.singletonNone=new _(!1);const x=Object.hasOwnProperty;var C=tinymce.util.Tools.resolve("tinymce.html.Serializer");const S={'"':"&quot;","<":"&lt;",">":"&gt;","&":"&amp;","'":"&#039;"},z=e=>e.replace(/["'<>&]/g,(e=>{return(t=S,o=e,((e,t)=>x.call(e,t))(t,o)?_.from(t[o]):_.none()).getOr(e);var t,o})),O=(e,t,o)=>((o,n)=>{for(let n=0,a=o.length;n<a;n++)if(r=o[n],e.hasClass(t,r))return!0;var r;return!1})(o.split(/\s+/)),T=(e,t)=>C({validate:!0},e.schema).serialize(e.parser.parse(t,{insert:!0})),E=(e,t)=>(i.each(t,((t,o)=>{a(t)&&(t=t(o)),e=e.replace(new RegExp("\\{\\$"+o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")+"\\}","g"),t)})),e),A=(e,t)=>{const o=e.dom,n=g(e);i.each(o.select("*",t),(e=>{i.each(n,((t,n)=>{o.hasClass(e,n)&&a(t)&&t(e)}))}))},M=(e,t,o)=>{const n=e.dom,r=e.selection.getContent();o=E(o,g(e));let a=n.create("div",{},T(e,o));const s=n.select(".mceTmpl",a);s&&s.length>0&&(a=n.create("div"),a.appendChild(s[0].cloneNode(!0))),i.each(n.select("*",a),(t=>{O(n,t,c(e))&&(t.innerHTML=w(e,h(e))),O(n,t,d(e))&&(t.innerHTML=w(e,f(e))),O(n,t,u(e))&&(t.innerHTML=r)})),A(e,a),e.execCommand("mceInsertContent",!1,a.innerHTML),e.addVisual()};var N=tinymce.util.Tools.resolve("tinymce.Env");const R=(e,t)=>{const o=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return _.some(r);if(o(r,n))break}return _.none()})(e,(e=>e.text===t),s),n=t=>{e.windowManager.alert("Could not load the specified template.",(()=>t.focus("template")))},r=e=>e.value.url.fold((()=>Promise.resolve(e.value.content.getOr(""))),(e=>fetch(e).then((e=>e.ok?e.text():Promise.reject())))),a=(e,t)=>(a,s)=>{if("template"===s.name){const s=a.getData().template;o(e,s).each((e=>{a.block("Loading..."),r(e).then((o=>{t(a,e,o)})).catch((()=>{t(a,e,""),a.setEnabled("save",!1),n(a)}))}))}},l=t=>a=>{const s=a.getData();o(t,s.template).each((t=>{r(t).then((t=>{e.execCommand("mceInsertTemplate",!1,t),a.close()})).catch((()=>{a.setEnabled("save",!1),n(a)}))}))};(()=>{if(!t||0===t.length){const t=e.translate("No templates defined.");return e.notificationManager.open({text:t,type:"info"}),_.none()}return _.from(i.map(t,((e,t)=>{const o=e=>void 0!==e.url;return{selected:0===t,text:e.title,value:{url:o(e)?_.from(e.url):_.none(),content:o(e)?_.none():_.from(e.content),description:e.description}}})))})().each((t=>{const o=(e=>((e,t)=>{const o=e.length,n=new Array(o);for(let t=0;t<o;t++){const o=e[t];n[t]={text:(r=o).text,value:r.text}}var r;return n})(e))(t),s=(e,o)=>({title:"Insert Template",size:"large",body:{type:"panel",items:e},initialData:o,buttons:[{type:"cancel",name:"cancel",text:"Cancel"},{type:"submit",name:"save",text:"Save",primary:!0}],onSubmit:l(t),onChange:a(t,c)}),c=(t,n,r)=>{const a=((e,t)=>{var o;if(-1===t.indexOf("<html>")){let n="";const r=null!==(o=y(e))&&void 0!==o?o:"",a=b(e)?' crossorigin="anonymous"':"";i.each(e.contentCSS,(t=>{n+='<link type="text/css" rel="stylesheet" href="'+e.documentBaseURI.toAbsolute(t)+'"'+a+">"})),r&&(n+='<style type="text/css">'+r+"</style>");const s=v(e),l=e.dom.encode,c='<script>document.addEventListener && document.addEventListener("click", function(e) {for (var elm = e.target; elm; elm = elm.parentNode) {if (elm.nodeName === "A" && !('+(N.os.isMacOS()||N.os.isiOS()?"e.metaKey":"e.ctrlKey && !e.altKey")+")) {e.preventDefault();}}}, false);<\/script> ",d=e.getBody().dir,u=d?' dir="'+l(d)+'"':"";t='<!DOCTYPE html><html><head><base href="'+l(e.documentBaseURI.getURI())+'">'+n+c+'</head><body class="'+l(s)+'"'+u+">"+T(e,t)+"</body></html>"}return E(t,m(e))})(e,r),l=[{type:"selectbox",name:"template",label:"Templates",items:o},{type:"htmlpanel",html:`<p aria-live="polite">${z(n.value.description)}</p>`},{label:"Preview",type:"iframe",name:"preview",sandboxed:!1,transparent:!1}],c={template:n.text,preview:a};t.unblock(),t.redial(s(l,c)),t.focus("template")},d=e.windowManager.open(s([],{template:"",preview:""}));d.block("Loading..."),r(t[0]).then((e=>{c(d,t[0],e)})).catch((()=>{c(d,t[0],""),d.setEnabled("save",!1),n(d)}))}))};e.add("template",(e=>{(e=>{const t=e.options.register;t("template_cdate_classes",{processor:"string",default:"cdate"}),t("template_mdate_classes",{processor:"string",default:"mdate"}),t("template_selected_content_classes",{processor:"string",default:"selcontent"}),t("template_preview_replace_values",{processor:"object"}),t("template_replace_values",{processor:"object"}),t("templates",{processor:e=>o(e)||((e,t)=>{if(r(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1})(e,n)||a(e),default:[]}),t("template_cdate_format",{processor:"string",default:e.translate("%Y-%m-%d")}),t("template_mdate_format",{processor:"string",default:e.translate("%Y-%m-%d")})})(e),(e=>{const t=()=>e.execCommand("mceTemplate");e.ui.registry.addButton("template",{icon:"template",tooltip:"Insert template",onAction:t}),e.ui.registry.addMenuItem("template",{icon:"template",text:"Insert template...",onAction:t})})(e),(e=>{e.addCommand("mceInsertTemplate",function(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}(M,e)),e.addCommand("mceTemplate",((e,t)=>()=>{const n=p(e);a(n)?n(t):o(n)?fetch(n).then((e=>{e.ok&&e.json().then(t)})):t(n)})(e,(e=>t=>{R(e,t)})(e)))})(e),(e=>{e.on("PreProcess",(t=>{const o=e.dom,n=f(e);i.each(o.select("div",t.node),(t=>{o.hasClass(t,"mceTmpl")&&(i.each(o.select("*",t),(t=>{O(o,t,d(e))&&(t.innerHTML=w(e,n))})),A(e,t))}))}))})(e)}))}()},644:function(e,t,o){o(33951)},33951:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(e,t,o)=>{e.dom.toggleClass(e.getBody(),"mce-visualblocks"),o.set(!o.get()),((e,t)=>{e.dispatch("VisualBlocks",{state:t})})(e,o.get())},o=("visualblocks_default_state",e=>e.options.get("visualblocks_default_state"));const n=(e,t)=>o=>{o.setActive(t.get());const n=e=>o.setActive(e.state);return e.on("VisualBlocks",n),()=>e.off("VisualBlocks",n)};e.add("visualblocks",((e,r)=>{(e=>{(0,e.options.register)("visualblocks_default_state",{processor:"boolean",default:!1})})(e);const a=(e=>{let t=!1;return{get:()=>t,set:e=>{t=e}}})();((e,o,n)=>{e.addCommand("mceVisualBlocks",(()=>{t(e,0,n)}))})(e,0,a),((e,t)=>{const o=()=>e.execCommand("mceVisualBlocks");e.ui.registry.addToggleButton("visualblocks",{icon:"visualblocks",tooltip:"Show blocks",onAction:o,onSetup:n(e,t)}),e.ui.registry.addToggleMenuItem("visualblocks",{text:"Show blocks",icon:"visualblocks",onAction:o,onSetup:n(e,t)})})(e,a),((e,n,r)=>{e.on("PreviewFormats AfterPreviewFormats",(t=>{r.get()&&e.dom.toggleClass(e.getBody(),"mce-visualblocks","afterpreviewformats"===t.type)})),e.on("init",(()=>{o(e)&&t(e,0,r)}))})(e,0,a)}))}()},73106:function(e,t,o){o(41943)},41943:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=e=>t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&(o=n=e,(r=String).prototype.isPrototypeOf(o)||(null===(a=n.constructor)||void 0===a?void 0:a.name)===r.name)?"string":t;var o,n,r,a})(t)===e,o=e=>t=>typeof t===e,n=t("string"),r=t("object"),a=(null,e=>null===e);const s=o("boolean"),i=o("number");class l{constructor(e,t){this.tag=e,this.value=t}static some(e){return new l(!0,e)}static none(){return l.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?l.some(e(this.value)):l.none()}bind(e){return this.tag?e(this.value):l.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:l.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return null==e?l.none():l.some(e)}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}l.singletonNone=new l(!1);const c=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},d=Object.keys,u=(e,t)=>{const o=d(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},m="undefined"!=typeof window?window:Function("return this;")(),g=(e,t)=>((e,t)=>{let o=null!=t?t:m;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),p=Object.getPrototypeOf,h=e=>{const t=g("ownerDocument.defaultView",e);return r(e)&&((e=>((e,t)=>{const o=((e,t)=>g(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(p(e).constructor.name))},f=e=>e.dom.nodeValue,y=e=>t=>(e=>e.dom.nodeType)(t)===e,b=e=>v(e)&&h(e.dom),v=y(1),k=y(3),w=(e,t,o)=>{((e,t,o)=>{if(!(n(o)||s(o)||i(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")})(e.dom,t,o)},_=(e,t)=>{e.dom.removeAttribute(t)},x=(e,t)=>{const o=((e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o})(e,t);return void 0===o||""===o?[]:o.split(" ")},C=e=>void 0!==e.dom.classList,S=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},z=S,O={" ":"nbsp","­":"shy"},T=(e,t)=>{let o="";return u(e,((e,t)=>{o+=t})),new RegExp("["+o+"]",t?"g":"")},E=T(O),A=T(O,!0),M=(e=>{let t="";return u(e,(e=>{t&&(t+=","),t+="span.mce-"+e})),t})(O),N="mce-nbsp",R=e=>e.dom.contentEditable,D=e=>'<span data-mce-bogus="1" class="mce-'+O[e]+'">'+e+"</span>",B=e=>"span"===e.nodeName.toLowerCase()&&e.classList.contains("mce-nbsp-wrap"),L=e=>{const t=f(e);return k(e)&&n(t)&&E.test(t)},I=(e,t,o)=>{let n=[];const r=((e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n})(e.dom.childNodes,z);return c(r,(e=>{var r;o&&(B((r=e).dom)||!(e=>b(e)&&"false"===R(e))(r))&&t(e)&&(n=n.concat([e])),n=n.concat(I(e,t,((e,t)=>{if(b(e)&&!B(e.dom)){const t=R(e);if("true"===t)return!0;if("false"===t)return!1}return t})(e,o)))})),n},H=(e,t)=>{const o=e.dom,n=I(z(t),L,e.dom.isEditable(t));c(n,(t=>{var n;const r=t.dom.parentNode;if(B(r))a=z(r),s=N,C(a)?a.dom.classList.add(s):((e,t)=>{((e,t,o)=>{const n=x(e,t).concat([o]);w(e,t,n.join(" "))})(e,"class",t)})(a,s);else{const r=o.encode(null!==(n=f(t))&&void 0!==n?n:"").replace(A,D),a=o.create("div",{},r);let s;for(;s=a.lastChild;)o.insertAfter(s,t.dom);e.dom.remove(t.dom)}var a,s}))},P=(e,t)=>{const o=e.dom.select(M,t);c(o,(t=>{var o,n;B(t)?(o=z(t),n=N,C(o)?o.dom.classList.remove(n):((e,t)=>{((e,t,o)=>{const n=((e,t)=>{const n=[];for(let t=0,r=e.length;t<r;t++){const r=e[t];r!==o&&n.push(r)}return n})(x(e,t));n.length>0?w(e,t,n.join(" ")):_(e,t)})(e,"class",t)})(o,n),(e=>{const t=C(e)?e.dom.classList:(e=>x(e,"class"))(e);0===t.length&&_(e,"class")})(o)):e.dom.remove(t,!0)}))},F=e=>{const t=e.getBody(),o=e.selection.getBookmark();let n=((e,t)=>{for(;e.parentNode;){if(e.parentNode===t)return t;e=e.parentNode}})(e.selection.getNode(),t);n=void 0!==n?n:t,P(e,n),H(e,n),e.selection.moveToBookmark(o)},j=(e,t)=>{((e,t)=>{e.dispatch("VisualChars",{state:t})})(e,t.get());const o=e.getBody();!0===t.get()?H(e,o):P(e,o)},V=("visualchars_default_state",e=>e.options.get("visualchars_default_state"));const Z=(e,t)=>{const o=((e,t)=>{let o=null;return{cancel:()=>{a(o)||(clearTimeout(o),o=null)},throttle:(...t)=>{a(o)&&(o=setTimeout((()=>{o=null,e.apply(null,t)}),300))}}})((()=>{F(e)}));e.on("keydown",(n=>{!0===t.get()&&(13===n.keyCode?F(e):o.throttle())})),e.on("remove",o.cancel)},U=(e,t)=>o=>{o.setActive(t.get());const n=e=>o.setActive(e.state);return e.on("VisualChars",n),()=>e.off("VisualChars",n)};e.add("visualchars",(e=>{(e=>{(0,e.options.register)("visualchars_default_state",{processor:"boolean",default:!1})})(e);const t=(e=>{let t=e;return{get:()=>t,set:e=>{t=e}}})(V(e));return((e,t)=>{e.addCommand("mceVisualChars",(()=>{((e,t)=>{t.set(!t.get());const o=e.selection.getBookmark();j(e,t),e.selection.moveToBookmark(o)})(e,t)}))})(e,t),((e,t)=>{const o=()=>e.execCommand("mceVisualChars");e.ui.registry.addToggleButton("visualchars",{tooltip:"Show invisible characters",icon:"visualchars",onAction:o,onSetup:U(e,t)}),e.ui.registry.addToggleMenuItem("visualchars",{text:"Show invisible characters",icon:"visualchars",onAction:o,onSetup:U(e,t)})})(e,t),Z(e,t),((e,t)=>{e.on("init",(()=>{j(e,t)}))})(e,t),(e=>({isEnabled:()=>e.get()}))(t)}))}()},43356:function(e,t,o){o(43562)},43562:function(){!function(){"use strict";var e=tinymce.util.Tools.resolve("tinymce.PluginManager");const t=(null,e=>null===e);const o=e=>e,n="[-'\\.‘’․﹒'.]",r="[:··״‧︓﹕:]",a="[±+*/,;;։،؍٬߸⁄︐︔﹐﹔,;]",s="[0-9٠-٩٫۰-۹߀-߉०-९০-৯੦-੯૦-૯୦-୯௦-௯౦-౯೦-೯൦-൯๐-๙໐-໙༠-༩၀-၉႐-႙០-៩᠐-᠙᥆-᥏᧐-᧙᪀-᪉᪐-᪙᭐-᭙᮰-᮹᱀-᱉᱐-᱙꘠-꘩꣐-꣙꤀-꤉꧐-꧙꩐-꩙꯰-꯹]",i="\\r",l="\\n",c="[\v\f…\u2028\u2029]",d="[̀-ͯ҃-҉֑-ׇֽֿׁׂׅׄؐ-ًؚ-ٰٟۖ-ۜ۟-۪ۤۧۨ-ܑۭܰ-݊ަ-ް߫-߳-----------------------------------------༿------------------ᦰ-ᧀᧈᧉ---᩿-----------᷿--⵿-ⷿ-----------꪿---゙゚]",u="[­؀-؃۝܏---\ufeff-]",m="[〱-〵゛゜゠-ヺー-ヿㇰ-ㇿ㋐-㋾㌀-㍗ヲ-ン]",g="[=_‿⁀⁔︳︴﹍-﹏_∀-⋿<>]",p="[!-#%-*,-\\/:;?@\\[-\\]_{}¡«·»¿;·՚-՟։֊־׀׃׆׳״؉؊،؍؛؞؟٪-٭۔܀-܍߷-߹࠰-࠾࡞।॥॰෴๏๚๛༄-༒༺-༽྅࿐-࿔࿙࿚၊-၏჻፡-፨᐀᙭᙮᚛᚜᛫-᛭᜵᜶។-៖៘-៚᠀-᠊᥄᥅᨞᨟᪠-᪦᪨-᪭᭚-᭠᯼-᯿᰻-᰿᱾᱿᳓‐-‧‰-⁃⁅-⁑⁓-⁞⁽⁾₍₎〈〉❨-❵⟅⟆⟦-⟯⦃-⦘⧘-⧛⧼⧽⳹-⳼⳾⳿⵰⸀-⸮⸰⸱、-〃〈-】〔-〟〰〽゠・꓾꓿꘍-꘏꙳꙾꛲-꛷꡴-꡷꣎꣏꣸-꣺꤮꤯꥟꧁-꧍꧞꧟꩜-꩟꫞꫟꯫﴾﴿︐-︙︰-﹒﹔-﹡﹣﹨﹪﹫!-#%-*,-/:;?@[-]_{}⦅-・]",h=[new RegExp("[A-Za-zªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԧԱ-Ֆՙա-ևא-תװ-׳ؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘऄ-हऽॐक़-ॡॱ-ॷॹ-ॿঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-ళవ-హఽౘౙౠౡಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೞೠೡೱೲഅ-ഌഎ-ഐഒ-ഺഽൎൠൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆༀཀ-ཇཉ-ཬྈ-ྌႠ-Ⴥა-ჺჼᄀ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏼᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛰᜀ-ᜌᜎ-ᜑᜠ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰᠠ-ᡷᢀ-ᢨᢪᢰ-ᣵᤀ-ᤜᨀ-ᨖᬅ-ᬳᭅ-ᭋᮃ-ᮠᮮᮯᯀ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᳩ-ᳬᳮ-ᳱᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕℙ-ℝℤΩℨK-ℭℯ-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⒶ-ⓩⰀ-Ⱞⰰ-ⱞⱠ-ⳤⳫ-ⳮⴀ-ⴥⴰ-ⵥⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞⸯ々〻〼ㄅ-ㄭㄱ-ㆎㆠ-ㆺꀀ-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚗꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꞎꞐꞑꞠ-ꞩꟺ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꨀ-ꨨꩀ-ꩂꩄ-ꩋꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꯀ-ꯢ가-힣ힰ-ퟆퟋ-ퟻff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zᅠ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ]"),new RegExp(n),new RegExp(r),new RegExp(a),new RegExp(s),new RegExp(i),new RegExp(l),new RegExp(c),new RegExp(d),new RegExp(u),new RegExp(m),new RegExp(g),new RegExp("@")],f=new RegExp("^"+p+"$"),y=h,b=e=>{let t=13;const o=y.length;for(let n=0;n<o;++n){const o=y[n];if(o&&o.test(e)){t=n;break}}return t},v=(e,t)=>{const o=e[t],n=e[t+1];if(t<0||t>e.length-1&&0!==t)return!1;if(0===o&&0===n)return!1;const r=e[t+2];if(0===o&&(2===n||1===n||12===n)&&0===r)return!1;const a=e[t-1];return(2!==o&&1!==o&&12!==n||0!==n||0!==a)&&(4!==o&&0!==o||4!==n&&0!==n)&&(3!==o&&1!==o||4!==n||4!==a)&&(4!==o||3!==n&&1!==n||4!==r)&&8!==o&&9!==o&&8!==a&&9!==a&&8!==n&&9!==n&&(5!==o||6!==n)&&(7===o||5===o||6===o||7===n||5===n||6===n||(10!==o||10!==n)&&(11!==n||0!==o&&4!==o&&10!==o&&11!==o)&&(11!==o||0!==n&&4!==n&&10!==n)&&12!==o)},k=/^\s+$/,w=f,_=e=>"http"===e||"https"===e,x=(e,t)=>{const o=((e,t)=>{let o;for(o=t;o<e.length&&!k.test(e[o]);o++);return o})(e,t+1);return"://"===e.slice(t+1,o).join("").substr(0,3)?o:t},C=(e,t,o)=>{o={includeWhitespace:!1,includePunctuation:!1,...o};const n=[],r=[];for(let o=0;o<e.length;o++){const a=t(e[o]);"\ufeff"!==a&&(n.push(e[o]),r.push(a))}return((e,t,o,n)=>{const r=[];let a=[];for(let s=0;s<o.length;++s)if(a.push(e[s]),v(o,s)){const o=t[s];if((n.includeWhitespace||!k.test(o))&&(n.includePunctuation||!w.test(o))){const o=s-a.length+1,n=s+1,i=t.slice(o,n).join("");if(_(i)){const o=x(t,s),r=e.slice(n,o);Array.prototype.push.apply(a,r),s=o}r.push(a)}a=[]}return r})(n,r,((e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n})(r,(e=>{const t={};return o=>{if(t[o])return t[o];{const n=e(o);return t[o]=n,n}}})(b)),o)};var S=tinymce.util.Tools.resolve("tinymce.dom.TreeWalker");const z=(e,t)=>{const o=t.getBlockElements(),n=t.getVoidElements(),r=e=>o[e.nodeName]||n[e.nodeName],a=[];let s="";const i=new S(e,e);let l;for(;l=i.next();)3===l.nodeType?s+=l.data.replace(/\uFEFF/g,""):r(l)&&s.length&&(a.push(s),s="");return s.length&&a.push(s),a},O=e=>e.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,"_").length,T=(e,t)=>{const n=(e=>e.replace(/\u200B/g,""))(z(e,t).join("\n"));return C(n.split(""),o).length},E=(e,t)=>{const o=z(e,t).join("");return O(o)},A=(e,t)=>{const o=z(e,t).join("").replace(/\s/g,"");return O(o)},M=(e,t)=>()=>t(e.getBody(),e.schema),N=(e,t)=>()=>t(e.selection.getRng().cloneContents(),e.schema),R=e=>M(e,T);var D=tinymce.util.Tools.resolve("tinymce.util.Delay");const B=(e,t)=>{((e,t)=>{e.dispatch("wordCountUpdate",{wordCount:{words:t.body.getWordCount(),characters:t.body.getCharacterCount(),charactersWithoutSpaces:t.body.getCharacterCountWithoutSpaces()}})})(e,t)},L=(e,o,n)=>{const r=((e,o)=>{let n=null;return{cancel:()=>{t(n)||(clearTimeout(n),n=null)},throttle:(...r)=>{t(n)&&(n=setTimeout((()=>{n=null,e.apply(null,r)}),o))}}})((()=>B(e,o)),n);e.on("init",(()=>{B(e,o),D.setEditorTimeout(e,(()=>{e.on("SetContent BeforeAddUndo Undo Redo ViewUpdate keyup",r.throttle)}),0),e.on("remove",r.cancel)}))};((t=300)=>{e.add("wordcount",(e=>{const o=(e=>({body:{getWordCount:R(e),getCharacterCount:M(e,E),getCharacterCountWithoutSpaces:M(e,A)},selection:{getWordCount:N(e,T),getCharacterCount:N(e,E),getCharacterCountWithoutSpaces:N(e,A)},getCount:R(e)}))(e);return((e,t)=>{e.addCommand("mceWordCount",(()=>((e,t)=>{e.windowManager.open({title:"Word Count",body:{type:"panel",items:[{type:"table",header:["Count","Document","Selection"],cells:[["Words",String(t.body.getWordCount()),String(t.selection.getWordCount())],["Characters (no spaces)",String(t.body.getCharacterCountWithoutSpaces()),String(t.selection.getCharacterCountWithoutSpaces())],["Characters",String(t.body.getCharacterCount()),String(t.selection.getCharacterCount())]]}]},buttons:[{type:"cancel",name:"close",text:"Close",primary:!0}]})})(e,t)))})(e,o),(e=>{const t=()=>e.execCommand("mceWordCount");e.ui.registry.addButton("wordcount",{tooltip:"Word count",icon:"character-count",onAction:t}),e.ui.registry.addMenuItem("wordcount",{text:"Word count",icon:"character-count",onAction:t})})(e),L(e,o,t),o}))})()}()},38860:function(e,t,o){o(51768)},51768:function(){!function(){"use strict";const e=Object.getPrototypeOf,t=(e,t,o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},o=e=>o=>(e=>{const o=typeof e;return null===e?"null":"object"===o&&Array.isArray(e)?"array":"object"===o&&t(e,String,((e,t)=>t.isPrototypeOf(e)))?"string":o})(o)===e,n=e=>t=>typeof t===e,r=e=>t=>e===t,a=o("string"),s=o("object"),i=o=>((o,n)=>s(o)&&t(o,n,((t,o)=>e(t)===o)))(o,Object),l=o("array"),c=r(null),d=n("boolean"),u=r(void 0),m=e=>null==e,g=e=>!m(e),p=n("function"),h=n("number"),f=(e,t)=>{if(l(e)){for(let o=0,n=e.length;o<n;++o)if(!t(e[o]))return!1;return!0}return!1},y=()=>{},b=e=>()=>e(),v=(e,t)=>(...o)=>e(t.apply(null,o)),k=e=>()=>e,w=e=>e,_=(e,t)=>e===t;function x(e,...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const C=e=>t=>!e(t),S=e=>()=>{throw new Error(e)},z=e=>e(),O=k(!1),T=k(!0);class E{constructor(e,t){this.tag=e,this.value=t}static some(e){return new E(!0,e)}static none(){return E.singletonNone}fold(e,t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?E.some(e(this.value)):E.none()}bind(e){return this.tag?e(this.value):E.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:E.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return g(e)?E.some(e):E.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}E.singletonNone=new E(!1);const A=Array.prototype.slice,M=Array.prototype.indexOf,N=Array.prototype.push,R=(e,t)=>M.call(e,t),D=(e,t)=>{const o=R(e,t);return-1===o?E.none():E.some(o)},B=(e,t)=>R(e,t)>-1,L=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return!0;return!1},I=(e,t)=>{const o=[];for(let n=0;n<e;n++)o.push(t(n));return o},H=(e,t)=>{const o=[];for(let n=0;n<e.length;n+=t){const r=A.call(e,n,n+t);o.push(r)}return o},P=(e,t)=>{const o=e.length,n=new Array(o);for(let r=0;r<o;r++){const o=e[r];n[r]=t(o,r)}return n},F=(e,t)=>{for(let o=0,n=e.length;o<n;o++)t(e[o],o)},j=(e,t)=>{const o=[],n=[];for(let r=0,a=e.length;r<a;r++){const a=e[r];(t(a,r)?o:n).push(a)}return{pass:o,fail:n}},V=(e,t)=>{const o=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t(r,n)&&o.push(r)}return o},Z=(e,t,o)=>(((e,t)=>{for(let o=e.length-1;o>=0;o--)t(e[o],o)})(e,((e,n)=>{o=t(o,e,n)})),o),U=(e,t,o)=>(F(e,((e,n)=>{o=t(o,e,n)})),o),q=(e,t)=>((e,t,o)=>{for(let n=0,r=e.length;n<r;n++){const r=e[n];if(t(r,n))return E.some(r);if(o(r,n))break}return E.none()})(e,t,O),W=(e,t)=>{for(let o=0,n=e.length;o<n;o++)if(t(e[o],o))return E.some(o);return E.none()},$=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);N.apply(t,e[o])}return t},G=(e,t)=>$(P(e,t)),K=(e,t)=>{for(let o=0,n=e.length;o<n;++o)if(!0!==t(e[o],o))return!1;return!0},Y=e=>{const t=A.call(e,0);return t.reverse(),t},X=(e,t)=>V(e,(e=>!B(t,e))),J=(e,t)=>{const o={};for(let n=0,r=e.length;n<r;n++){const r=e[n];o[String(r)]=t(r,n)}return o},Q=e=>[e],ee=(e,t)=>{const o=A.call(e,0);return o.sort(t),o},te=(e,t)=>t>=0&&t<e.length?E.some(e[t]):E.none(),oe=e=>te(e,0),ne=e=>te(e,e.length-1),re=p(Array.from)?Array.from:e=>A.call(e),ae=(e,t)=>{for(let o=0;o<e.length;o++){const n=t(e[o],o);if(n.isSome())return n}return E.none()},se=Object.keys,ie=Object.hasOwnProperty,le=(e,t)=>{const o=se(e);for(let n=0,r=o.length;n<r;n++){const r=o[n];t(e[r],r)}},ce=(e,t)=>de(e,((e,o)=>({k:o,v:t(e,o)}))),de=(e,t)=>{const o={};return le(e,((e,n)=>{const r=t(e,n);o[r.k]=r.v})),o},ue=e=>(t,o)=>{e[o]=t},me=(e,t,o,n)=>{le(e,((e,r)=>{(t(e,r)?o:n)(e,r)}))},ge=(e,t)=>{const o={};return me(e,t,ue(o),y),o},pe=(e,t)=>{const o=[];return le(e,((e,n)=>{o.push(t(e,n))})),o},he=(e,t)=>{const o=se(e);for(let n=0,r=o.length;n<r;n++){const r=o[n],a=e[r];if(t(a,r,e))return E.some(a)}return E.none()},fe=e=>pe(e,w),ye=(e,t)=>be(e,t)?E.from(e[t]):E.none(),be=(e,t)=>ie.call(e,t),ve=(e,t)=>be(e,t)&&void 0!==e[t]&&null!==e[t],ke=(e,t,o=_)=>e.exists((e=>o(e,t))),we=e=>{const t=[],o=e=>{t.push(e)};for(let t=0;t<e.length;t++)e[t].each(o);return t},_e=(e,t,o)=>e.isSome()&&t.isSome()?E.some(o(e.getOrDie(),t.getOrDie())):E.none(),xe=(e,t)=>null!=e?E.some(t(e)):E.none(),Ce=(e,t)=>e?E.some(t):E.none(),Se=(e,t,o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,ze=(e,t)=>Te(e,t)?((e,t)=>e.substring(t))(e,t.length):e,Oe=(e,t,o=0,n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!u(n)||r+t.length<=n)},Te=(e,t)=>Se(e,t,0),Ee=(e,t)=>Se(e,t,e.length-t.length),Ae=(Eo=/^\s+|\s+$/g,e=>e.replace(Eo,"")),Me=e=>e.length>0,Ne=e=>void 0!==e.style&&p(e.style.getPropertyValue),Re=e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},De=(e,t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return Re(o.childNodes[0])},Be=(e,t)=>{const o=(t||document).createElement(e);return Re(o)},Le=(e,t)=>{const o=(t||document).createTextNode(e);return Re(o)},Ie=Re,He="undefined"!=typeof window?window:Function("return this;")(),Pe=(e,t)=>((e,t)=>{let o=null!=t?t:He;for(let t=0;t<e.length&&null!=o;++t)o=o[e[t]];return o})(e.split("."),t),Fe=Object.getPrototypeOf,je=e=>{const t=Pe("ownerDocument.defaultView",e);return s(e)&&((e=>((e,t)=>{const o=((e,t)=>Pe(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Fe(e).constructor.name))},Ve=e=>e.dom.nodeName.toLowerCase(),Ze=e=>t=>(e=>e.dom.nodeType)(t)===e,Ue=e=>qe(e)&&je(e.dom),qe=Ze(1),We=Ze(3),$e=Ze(9),Ge=Ze(11),Ke=e=>t=>qe(t)&&Ve(t)===e,Ye=(e,t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},Xe=e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,Je=(e,t)=>e.dom===t.dom,Qe=(e,t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},et=e=>Ie(e.dom.ownerDocument),tt=e=>$e(e)?e:et(e),ot=e=>Ie(tt(e).dom.documentElement),nt=e=>Ie(tt(e).dom.defaultView),rt=e=>E.from(e.dom.parentNode).map(Ie),at=e=>E.from(e.dom.parentElement).map(Ie),st=e=>E.from(e.dom.offsetParent).map(Ie),it=e=>P(e.dom.childNodes,Ie),lt=(e,t)=>{const o=e.dom.childNodes;return E.from(o[t]).map(Ie)},ct=e=>lt(e,0),dt=(e,t)=>({element:e,offset:t}),ut=(e,t)=>{const o=it(e);return o.length>0&&t<o.length?dt(o[t],0):dt(e,t)},mt=e=>Ge(e)&&g(e.dom.host),gt=p(Element.prototype.attachShadow)&&p(Node.prototype.getRootNode),pt=k(gt),ht=gt?e=>Ie(e.dom.getRootNode()):tt,ft=e=>mt(e)?e:Ie(tt(e).dom.body),yt=e=>{const t=ht(e);return mt(t)?E.some(t):E.none()},bt=e=>Ie(e.dom.host),vt=e=>{const t=We(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return yt(Ie(t)).fold((()=>o.body.contains(t)),(n=vt,r=bt,e=>n(r(e))));var n,r},kt=()=>wt(Ie(document)),wt=e=>{const t=e.dom.body;if(null==t)throw new Error("Body is not available yet");return Ie(t)},_t=(e,t,o)=>{if(!(a(o)||d(o)||h(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},xt=(e,t,o)=>{_t(e.dom,t,o)},Ct=(e,t)=>{const o=e.dom;le(t,((e,t)=>{_t(o,t,e)}))},St=(e,t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},zt=(e,t)=>E.from(St(e,t)),Ot=(e,t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)},Tt=(e,t)=>{e.dom.removeAttribute(t)},Et=(e,t,o)=>{if(!a(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);Ne(e)&&e.style.setProperty(t,o)},At=(e,t)=>{Ne(e)&&e.style.removeProperty(t)},Mt=(e,t,o)=>{const n=e.dom;Et(n,t,o)},Nt=(e,t)=>{const o=e.dom;le(t,((e,t)=>{Et(o,t,e)}))},Rt=(e,t)=>{const o=e.dom;le(t,((e,t)=>{e.fold((()=>{At(o,t)}),(e=>{Et(o,t,e)}))}))},Dt=(e,t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||vt(e)?n:Bt(o,t)},Bt=(e,t)=>Ne(e)?e.style.getPropertyValue(t):"",Lt=(e,t)=>{const o=e.dom,n=Bt(o,t);return E.from(n).filter((e=>e.length>0))},It=e=>{const t={},o=e.dom;if(Ne(o))for(let e=0;e<o.style.length;e++){const n=o.style.item(e);t[n]=o.style[n]}return t},Ht=(e,t,o)=>{const n=Be(e);return Mt(n,t,o),Lt(n,t).isSome()},Pt=(e,t)=>{const o=e.dom;At(o,t),ke(zt(e,"style").map(Ae),"")&&Tt(e,"style")},Ft=e=>e.dom.offsetWidth,jt=(e,t)=>{const o=o=>{const n=t(o);if(n<=0||null===n){const t=Dt(o,e);return parseFloat(t)||0}return n},n=(e,t)=>U(t,((t,o)=>{const n=Dt(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t,o)=>{if(!h(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;Ne(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e,t,o)=>{const r=n(e,o);return t>r?t-r:0}}},Vt=jt("height",(e=>{const t=e.dom;return vt(e)?t.getBoundingClientRect().height:t.offsetHeight})),Zt=e=>Vt.get(e),Ut=e=>Vt.getOuter(e),qt=(e,t)=>({left:e,top:t,translate:(o,n)=>qt(e+o,t+n)}),Wt=qt,$t=(e,t)=>void 0!==e?e:void 0!==t?t:0,Gt=e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return Wt(o.offsetLeft,o.offsetTop);const a=$t(null==n?void 0:n.pageYOffset,r.scrollTop),s=$t(null==n?void 0:n.pageXOffset,r.scrollLeft),i=$t(r.clientTop,o.clientTop),l=$t(r.clientLeft,o.clientLeft);return Kt(e).translate(s-l,a-i)},Kt=e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?Wt(o.offsetLeft,o.offsetTop):vt(e)?(e=>{const t=e.getBoundingClientRect();return Wt(t.left,t.top)})(t):Wt(0,0)},Yt=jt("width",(e=>e.dom.offsetWidth)),Xt=e=>Yt.get(e),Jt=e=>Yt.getOuter(e),Qt=e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},eo=()=>to(0,0),to=(e,t)=>({major:e,minor:t}),oo={nu:to,detect:(e,t)=>{const o=String(t).toLowerCase();return 0===e.length?eo():((e,t)=>{const o=((e,t)=>{for(let o=0;o<e.length;o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n=e=>Number(t.replace(o,"$"+e));return to(n(1),n(2))})(e,o)},unknown:eo},no=(e,t)=>{const o=String(t).toLowerCase();return q(e,(e=>e.search(o)))},ro=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,ao=e=>t=>Oe(t,e),so=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search:e=>Oe(e,"edge/")&&Oe(e,"chrome")&&Oe(e,"safari")&&Oe(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,ro],search:e=>Oe(e,"chrome")&&!Oe(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search:e=>Oe(e,"msie")||Oe(e,"trident")},{name:"Opera",versionRegexes:[ro,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:ao("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:ao("firefox")},{name:"Safari",versionRegexes:[ro,/.*?cpu os ([0-9]+)_([0-9]+).*/],search:e=>(Oe(e,"safari")||Oe(e,"mobile/"))&&Oe(e,"applewebkit")}],io=[{name:"Windows",search:ao("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search:e=>Oe(e,"iphone")||Oe(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:ao("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:ao("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:ao("linux"),versionRegexes:[]},{name:"Solaris",search:ao("sunos"),versionRegexes:[]},{name:"FreeBSD",search:ao("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:ao("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],lo={browsers:k(so),oses:k(io)},co="Edge",uo="Chromium",mo="Opera",go="Firefox",po="Safari",ho=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isEdge:n(co),isChromium:n(uo),isIE:n("IE"),isOpera:n(mo),isFirefox:n(go),isSafari:n(po)}},fo=()=>ho({current:void 0,version:oo.unknown()}),yo=ho,bo=(k(co),k(uo),k("IE"),k(mo),k(go),k(po),"Windows"),vo="Android",ko="Linux",wo="macOS",_o="Solaris",xo="FreeBSD",Co="ChromeOS",So=e=>{const t=e.current,o=e.version,n=e=>()=>t===e;return{current:t,version:o,isWindows:n(bo),isiOS:n("iOS"),isAndroid:n(vo),isMacOS:n(wo),isLinux:n(ko),isSolaris:n(_o),isFreeBSD:n(xo),isChromeOS:n(Co)}},zo=()=>So({current:void 0,version:oo.unknown()}),Oo=So,To=(k(bo),k("iOS"),k(vo),k(ko),k(wo),k(_o),k(xo),k(Co),e=>window.matchMedia(e).matches);var Eo;let Ao=Qt((()=>((e,t,o)=>{const n=lo.browsers(),r=lo.oses(),a=t.bind((e=>((e,t)=>ae(t.brands,(t=>{const o=t.brand.toLowerCase();return q(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:oo.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e,t)=>no(e,t).map((e=>{const o=oo.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(fo,yo),s=((e,t)=>no(e,t).map((e=>{const o=oo.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(zo,Oo),i=((e,t,o,n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),a=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),i=s||n("(pointer:coarse)"),l=r||!a&&s&&n("(min-device-width:768px)"),c=a||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:k(r),isiPhone:k(a),isTablet:k(l),isPhone:k(c),isTouch:k(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:k(d),isDesktop:k(u)}})(s,a,e,o);return{browser:a,os:s,deviceType:i}})(navigator.userAgent,E.from(navigator.userAgentData),To)));const Mo=()=>Ao(),No=e=>{const t=Ie((e=>{if(pt()&&g(e.target)){const t=Ie(e.target);if(qe(t)&&(e=>g(e.dom.shadowRoot))(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return oe(t)}}return E.from(e.target)})(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=v(n,o);return((e,t,o,n,r,a,s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:a,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)},Ro=(e,t,o,n,r)=>{const a=((e,t)=>o=>{e(o)&&t(No(o))})(o,n);return e.dom.addEventListener(t,a,r),{unbind:x(Do,e,t,a,r)}},Do=(e,t,o,n)=>{e.dom.removeEventListener(t,o,n)},Bo=(e,t)=>{rt(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},Lo=(e,t)=>{const o=(e=>E.from(e.dom.nextSibling).map(Ie))(e);o.fold((()=>{rt(e).each((e=>{Ho(e,t)}))}),(e=>{Bo(e,t)}))},Io=(e,t)=>{ct(e).fold((()=>{Ho(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},Ho=(e,t)=>{e.dom.appendChild(t.dom)},Po=(e,t)=>{F(t,(t=>{Ho(e,t)}))},Fo=e=>{e.dom.textContent="",F(it(e),(e=>{jo(e)}))},jo=e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},Vo=e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return Wt(o,n)},Zo=(e,t,o)=>{const n=(void 0!==o?o.dom:document).defaultView;n&&n.scrollTo(e,t)},Uo=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),qo=e=>{const t=void 0===e?window:e,o=t.document,n=Vo(Ie(o));return(e=>{const t=void 0===e?window:e;return Mo().browser.isFirefox()?E.none():E.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,r=e.clientHeight;return Uo(n.left,n.top,o,r)}),(e=>Uo(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))},Wo=()=>Ie(document),$o=(e,t)=>e.view(t).fold(k([]),(t=>{const o=e.owner(t),n=$o(e,o);return[t].concat(n)}));var Go=Object.freeze({__proto__:null,view:e=>{var t;return(e.dom===document?E.none():E.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(Ie)},owner:e=>et(e)});const Ko=e=>{const t=Wo(),o=Vo(t),n=((e,t)=>{const o=t.owner(e),n=$o(t,o);return E.some(n)})(e,Go);return n.fold(x(Gt,e),(t=>{const n=Kt(e),r=Z(t,((e,t)=>{const o=Kt(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return Wt(r.left+n.left+o.left,r.top+n.top+o.top)}))},Yo=(e,t,o,n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Xo=e=>{const t=Gt(e),o=Jt(e),n=Ut(e);return Yo(t.left,t.top,o,n)},Jo=e=>{const t=Ko(e),o=Jt(e),n=Ut(e);return Yo(t.left,t.top,o,n)},Qo=(e,t)=>{const o=Math.max(e.x,t.x),n=Math.max(e.y,t.y),r=Math.min(e.right,t.right),a=Math.min(e.bottom,t.bottom);return Yo(o,n,r-o,a-n)},en=()=>qo(window);var tn=tinymce.util.Tools.resolve("tinymce.ThemeManager");const on=e=>{const t=t=>t(e),o=k(e),n=()=>r,r={tag:!0,inner:e,fold:(t,o)=>o(e),isValue:T,isError:O,map:t=>rn.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:()=>E.some(e)};return r},nn=e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t,o)=>t(e),isValue:O,isError:T,map:t,mapError:t=>rn.error(t(e)),bind:t,exists:O,forall:T,getOr:w,or:w,getOrThunk:z,orThunk:z,getOrDie:S(String(e)),each:y,toOptional:E.none};return o},rn={value:on,error:nn,fromOption:(e,t)=>e.fold((()=>nn(t)),on)};var an;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(an||(an={}));const sn=(e,t,o)=>e.stype===an.Error?t(e.serror):o(e.svalue),ln=e=>({stype:an.Value,svalue:e}),cn=e=>({stype:an.Error,serror:e}),dn=ln,un=cn,mn=sn,gn=(e,t,o,n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n}),pn=(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)}},hn=e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const o={};for(let n=0;n<t.length;n++){const r=t[n];for(const t in r)be(r,t)&&(o[t]=e(o[t],r[t]))}return o},fn=hn(((e,t)=>i(e)&&i(t)?fn(e,t):t)),yn=hn(((e,t)=>t)),bn=e=>({tag:"defaultedThunk",process:e}),vn=e=>bn(k(e)),kn=e=>({tag:"mergeWithThunk",process:e}),wn=e=>{const t=(e=>{const t=[],o=[];return F(e,(e=>{sn(e,(e=>o.push(e)),(e=>t.push(e)))})),{values:t,errors:o}})(e);return t.errors.length>0?(o=t.errors,v(un,$)(o)):dn(t.values);var o},_n=e=>s(e)&&se(e).length>100?" removed due to size":JSON.stringify(e,null,2),xn=(e,t)=>un([{path:e,getErrorInfo:t}]),Cn=e=>({extract:(t,o)=>((e,t)=>e.stype===an.Error?t(e.serror):e)(e(o),(e=>((e,t)=>xn(e,k(t)))(t,e))),toString:k("val")}),Sn=Cn(dn),zn=(e,t,o,n)=>n(ye(e,t).getOrThunk((()=>o(e)))),On=(e,t,o,n,r)=>{const a=e=>r.extract(t.concat([n]),e),s=e=>e.fold((()=>dn(E.none())),(e=>((e,t)=>e.stype===an.Value?{stype:an.Value,svalue:t(e.svalue)}:e)(r.extract(t.concat([n]),e),E.some)));switch(e.tag){case"required":return((e,t,o,n)=>ye(t,o).fold((()=>((e,t,o)=>xn(e,(()=>'Could not find valid *required* value for "'+t+'" in '+_n(o))))(e,o,t)),n))(t,o,n,a);case"defaultedThunk":return zn(o,n,e.process,a);case"option":return((e,t,o)=>o(ye(e,t)))(o,n,s);case"defaultedOptionThunk":return((e,t,o,n)=>n(ye(e,t).map((t=>!0===t?o(e):t))))(o,n,e.process,s);case"mergeWithThunk":return zn(o,n,k({}),(t=>{const n=fn(e.process(o),t);return a(n)}))}},Tn=e=>({extract:(t,o)=>e().extract(t,o),toString:()=>e().toString()}),En=e=>se(ge(e,g)),An=e=>{const t=Mn(e),o=Z(e,((e,t)=>pn(t,(t=>fn(e,{[t]:!0})),k(e))),{});return{extract:(e,n)=>{const r=d(n)?[]:En(n),a=V(r,(e=>!ve(o,e)));return 0===a.length?t.extract(e,n):((e,t)=>xn(e,(()=>"There are unsupported fields: ["+t.join(", ")+"] specified")))(e,a)},toString:t.toString}},Mn=e=>({extract:(t,o)=>((e,t,o)=>{const n={},r=[];for(const a of o)pn(a,((o,a,s,i)=>{const l=On(s,e,t,o,i);mn(l,(e=>{r.push(...e)}),(e=>{n[a]=e}))}),((e,o)=>{n[e]=o(t)}));return r.length>0?un(r):dn(n)})(t,o,e),toString:()=>{const t=P(e,(e=>pn(e,((e,t,o,n)=>e+" -> "+n.toString()),((e,t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),Nn=e=>({extract:(t,o)=>{const n=P(o,((o,n)=>e.extract(t.concat(["["+n+"]"]),o)));return wn(n)},toString:()=>"array("+e.toString()+")"}),Rn=(e,t)=>{const o=void 0!==t?t:w;return{extract:(t,n)=>{const r=[];for(const a of e){const e=a.extract(t,n);if(e.stype===an.Value)return{stype:an.Value,svalue:o(e.svalue)};r.push(e)}return wn(r)},toString:()=>"oneOf("+P(e,(e=>e.toString())).join(", ")+")"}},Dn=(e,t)=>({extract:(o,n)=>{const r=se(n),a=((t,o)=>Nn(Cn(e)).extract(t,o))(o,r);return((e,t)=>e.stype===an.Value?t(e.svalue):e)(a,(e=>{const r=P(e,(e=>gn(e,e,{tag:"required",process:{}},t)));return Mn(r).extract(o,n)}))},toString:()=>"setOf("+t.toString()+")"}),Bn=v(Nn,Mn),Ln=k(Sn),In=(e,t)=>Cn((o=>{const n=typeof o;return e(o)?dn(o):un(`Expected type: ${t} but got: ${n}`)})),Hn=In(h,"number"),Pn=In(a,"string"),Fn=In(d,"boolean"),jn=In(p,"function"),Vn=e=>{if(Object(e)!==e)return!0;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!0;case"Array":case"Object":return Object.keys(e).every((t=>Vn(e[t])));default:return!1}},Zn=Cn((e=>Vn(e)?dn(e):un("Expected value to be acceptable for sending via postMessage"))),Un=(e,t)=>({extract:(o,n)=>ye(n,e).fold((()=>((e,t)=>xn(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(o,e)),(e=>((e,t,o,n)=>ye(o,n).fold((()=>((e,t,o)=>xn(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+_n(t))))(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t))))(o,n,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+se(t)}),qn=e=>Cn((t=>e(t).fold(un,dn))),Wn=(e,t)=>Dn((t=>e(t).fold(cn,ln)),t),$n=(e,t,o)=>{return n=((e,t,o)=>((e,t)=>e.stype===an.Error?{stype:an.Error,serror:t(e.serror)}:e)(t.extract([e],o),(e=>({input:o,errors:e}))))(e,t,o),sn(n,rn.error,rn.value);var n},Gn=e=>e.fold((e=>{throw new Error(Yn(e))}),w),Kn=(e,t,o)=>Gn($n(e,t,o)),Yn=e=>"Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:k("... (only showing first ten failures)")}]):e;return P(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})(e.errors).join("\n")+"\n\nInput object: "+_n(e.input),Xn=(e,t)=>Un(e,ce(t,Mn)),Jn=(e,t)=>((e,t)=>{const o=Qt(t);return{extract:(e,t)=>o().extract(e,t),toString:()=>o().toString()}})(0,t),Qn=gn,er=(e,t)=>({tag:"custom",newKey:e,instantiator:t}),tr=e=>qn((t=>B(e,t)?rn.value(t):rn.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`))),or=e=>Qn(e,e,{tag:"required",process:{}},Ln()),nr=(e,t)=>Qn(e,e,{tag:"required",process:{}},t),rr=e=>nr(e,Hn),ar=e=>nr(e,Pn),sr=(e,t)=>Qn(e,e,{tag:"required",process:{}},tr(t)),ir=e=>nr(e,jn),lr=(e,t)=>Qn(e,e,{tag:"required",process:{}},Mn(t)),cr=(e,t)=>Qn(e,e,{tag:"required",process:{}},Bn(t)),dr=(e,t)=>Qn(e,e,{tag:"required",process:{}},Nn(t)),ur=e=>Qn(e,e,{tag:"option",process:{}},Ln()),mr=(e,t)=>Qn(e,e,{tag:"option",process:{}},t),gr=e=>mr(e,Hn),pr=e=>mr(e,Pn),hr=(e,t)=>mr(e,tr(t)),fr=e=>mr(e,jn),yr=(e,t)=>mr(e,Nn(t)),br=(e,t)=>mr(e,Mn(t)),vr=(e,t)=>Qn(e,e,vn(t),Ln()),kr=(e,t,o)=>Qn(e,e,vn(t),o),wr=(e,t)=>kr(e,t,Hn),_r=(e,t)=>kr(e,t,Pn),xr=(e,t,o)=>kr(e,t,tr(o)),Cr=(e,t)=>kr(e,t,Fn),Sr=(e,t)=>kr(e,t,jn),zr=(e,t,o)=>kr(e,t,Nn(o)),Or=(e,t,o)=>kr(e,t,Mn(o)),Tr=e=>{let t=e;return{get:()=>t,set:e=>{t=e}}},Er=e=>{if(!l(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return F(e,((n,r)=>{const a=se(n);if(1!==a.length)throw new Error("one and only one name per case");const s=a[0],i=n[s];if(void 0!==o[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!l(i))throw new Error("case arguments must be an array");t.push(s),o[s]=(...o)=>{const n=o.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+i.length+" ("+i+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match:e=>{const n=se(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!K(t,(e=>B(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,o)},log:e=>{console.log(e,{constructors:t,constructor:s,params:o})}}}})),o};Er([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const Ar=(e,t)=>((e,t)=>({[e]:t}))(e,t),Mr=e=>(e=>{const t={};return F(e,(e=>{t[e.key]=e.value})),t})(e),Nr=e=>p(e)?e:O,Rr=(e,t,o)=>{let n=e.dom;const r=Nr(o);for(;n.parentNode;){n=n.parentNode;const e=Ie(n),o=t(e);if(o.isSome())return o;if(r(e))break}return E.none()},Dr=(e,t,o)=>{const n=t(e),r=Nr(o);return n.orThunk((()=>r(e)?E.none():Rr(e,t,r)))},Br=(e,t)=>Je(e.element,t.event.target),Lr={can:T,abort:O,run:y},Ir=e=>{if(!ve(e,"can")&&!ve(e,"abort")&&!ve(e,"run"))throw new Error("EventHandler defined by: "+JSON.stringify(e,null,2)+" does not have can, abort, or run!");return{...Lr,...e}},Hr=k,Pr=Hr("touchstart"),Fr=Hr("touchmove"),jr=Hr("touchend"),Vr=Hr("touchcancel"),Zr=Hr("mousedown"),Ur=Hr("mousemove"),qr=Hr("mouseout"),Wr=Hr("mouseup"),$r=Hr("mouseover"),Gr=Hr("focusin"),Kr=Hr("focusout"),Yr=Hr("keydown"),Xr=Hr("keyup"),Jr=Hr("input"),Qr=Hr("change"),ea=Hr("click"),ta=Hr("transitioncancel"),oa=Hr("transitionend"),na=Hr("transitionstart"),ra=Hr("selectstart"),aa=e=>k("alloy."+e),sa={tap:aa("tap")},ia=aa("focus"),la=aa("blur.post"),ca=aa("paste.post"),da=aa("receive"),ua=aa("execute"),ma=aa("focus.item"),ga=sa.tap,pa=aa("longpress"),ha=aa("sandbox.close"),fa=aa("typeahead.cancel"),ya=aa("system.init"),ba=aa("system.touchmove"),va=aa("system.touchend"),ka=aa("system.scroll"),wa=aa("system.resize"),_a=aa("system.attached"),xa=aa("system.detached"),Ca=aa("system.dismissRequested"),Sa=aa("system.repositionRequested"),za=aa("focusmanager.shifted"),Oa=aa("slotcontainer.visibility"),Ta=aa("system.external.element.scroll"),Ea=aa("change.tab"),Aa=aa("dismiss.tab"),Ma=aa("highlight"),Na=aa("dehighlight"),Ra=(e,t)=>{Ia(e,e.element,t,{})},Da=(e,t,o)=>{Ia(e,e.element,t,o)},Ba=e=>{Ra(e,ua())},La=(e,t,o)=>{Ia(e,t,o,{})},Ia=(e,t,o,n)=>{const r={target:t,...n};e.getSystem().triggerEvent(o,t,r)},Ha=(e,t,o,n)=>{e.getSystem().triggerEvent(o,t,n.event)},Pa=e=>Mr(e),Fa=(e,t)=>({key:e,value:Ir({abort:t})}),ja=e=>({key:e,value:Ir({run:(e,t)=>{t.event.prevent()}})}),Va=(e,t)=>({key:e,value:Ir({run:t})}),Za=(e,t,o)=>({key:e,value:Ir({run:(e,n)=>{t.apply(void 0,[e,n].concat(o))}})}),Ua=e=>t=>({key:e,value:Ir({run:(e,o)=>{Br(e,o)&&t(e,o)}})}),qa=(e,t,o)=>((e,t)=>Va(e,((o,n)=>{o.getSystem().getByUid(t).each((t=>{Ha(t,t.element,e,n)}))})))(e,t.partUids[o]),Wa=(e,t)=>Va(e,((e,o)=>{const n=o.event,r=e.getSystem().getByDom(n.target).getOrThunk((()=>Dr(n.target,(t=>e.getSystem().getByDom(t).toOptional()),O).getOr(e)));t(e,r,o)})),$a=e=>Va(e,((e,t)=>{t.cut()})),Ga=e=>Va(e,((e,t)=>{t.stop()})),Ka=(e,t)=>Ua(e)(t),Ya=Ua(_a()),Xa=Ua(xa()),Ja=Ua(ya()),Qa=(as=ua(),e=>Va(as,e)),es=e=>e.dom.innerHTML,ts=(e,t)=>{const o=et(e).dom,n=Ie(o.createDocumentFragment()),r=((e,t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,it(Ie(o))})(t,o);Po(n,r),Fo(e),Ho(e,n)},os=e=>mt(e)?"#shadow-root":(e=>{const t=Be("div"),o=Ie(e.dom.cloneNode(!0));return Ho(t,o),es(t)})((e=>((e,t)=>Ie(e.dom.cloneNode(!1)))(e))(e)),ns=e=>os(e),rs=Pa([((e,t)=>({key:e,value:Ir({can:(e,t)=>{const o=t.event,n=o.originator,r=o.target;return!((e,t,o)=>Je(t,e.element)&&!Je(t,o))(e,n,r)||(console.warn(ia()+" did not get interpreted by the desired target. \nOriginator: "+ns(n)+"\nTarget: "+ns(r)+"\nCheck the "+ia()+" event handlers"),!1)}})}))(ia())]);var as,ss=Object.freeze({__proto__:null,events:rs});let is=0;const ls=e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return is++,e+"_"+o+is+String(t)},cs=k("alloy-id-"),ds=k("data-alloy-id"),us=cs(),ms=ds(),gs=(e,t)=>{Object.defineProperty(e.dom,ms,{value:t,writable:!0})},ps=e=>{const t=qe(e)?e.dom[ms]:null;return E.from(t)},hs=e=>ls(e),fs=w,ys=e=>{const t=t=>`The component must be in a context to execute: ${t}`+(e?"\n"+ns(e().element)+" is not in context.":""),o=e=>()=>{throw new Error(t(e))},n=e=>()=>{console.warn(t(e))};return{debugInfo:k("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:O}},bs=ys(),vs=e=>P(e,(e=>Ee(e,"/*")?e.substring(0,e.length-2):e)),ks=(e,t)=>{const o=e.toString(),n=o.indexOf(")")+1,r=o.indexOf("("),a=o.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:vs(a)}),e},ws=ls("alloy-premade"),_s=e=>(Object.defineProperty(e.element.dom,ws,{value:e.uid,writable:!0}),Ar(ws,e)),xs=e=>ye(e,ws),Cs=e=>((e,t)=>{const o=t.toString(),n=o.indexOf(")")+1,r=o.indexOf("("),a=o.substring(r+1,n-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:"OVERRIDE",parameters:vs(a.slice(1))}),e})(((t,...o)=>e(t.getApis(),t,...o)),e),Ss={init:()=>zs({readState:k("No State required")})},zs=e=>e,Os=(e,t)=>{const o={};return le(e,((e,n)=>{le(e,((e,r)=>{const a=ye(o,r).getOr([]);o[r]=a.concat([t(n,e)])}))})),o},Ts=e=>({classes:u(e.classes)?[]:e.classes,attributes:u(e.attributes)?{}:e.attributes,styles:u(e.styles)?{}:e.styles}),Es=e=>e.cHandler,As=(e,t)=>({name:e,handler:t}),Ms=(e,t)=>{const o={};return F(e,(e=>{o[e.name()]=e.handlers(t)})),o},Ns=(e,t,o)=>{const n=t[o];return n?((e,t,o,n)=>{try{const r=ee(o,((o,r)=>{const a=o[t],s=r[t],i=n.indexOf(a),l=n.indexOf(s);if(-1===i)throw new Error("The ordering for "+e+" does not have an entry for "+a+".\nOrder specified: "+JSON.stringify(n,null,2));if(-1===l)throw new Error("The ordering for "+e+" does not have an entry for "+s+".\nOrder specified: "+JSON.stringify(n,null,2));return i<l?-1:l<i?1:0}));return rn.value(r)}catch(e){return rn.error([e])}})("Event: "+o,"name",e,n).map((e=>(e=>{const t=((e,t)=>(...t)=>U(e,((e,o)=>e&&(e=>e.can)(o).apply(void 0,t)),!0))(e),o=((e,t)=>(...t)=>U(e,((e,o)=>e||(e=>e.abort)(o).apply(void 0,t)),!1))(e);return{can:t,abort:o,run:(...t)=>{F(e,(e=>{e.run.apply(void 0,t)}))}}})(P(e,(e=>e.handler))))):((e,t)=>rn.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(P(t,(e=>e.name)),null,2)]))(o,e)},Rs=(e,t)=>((e,t)=>{const o=(e=>{const t=[],o=[];return F(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))})),{errors:t,values:o}})(e);return o.errors.length>0?(n=o.errors,rn.error($(n))):((e,t)=>0===e.length?rn.value(t):rn.value(fn(t,yn.apply(void 0,e))))(o.values,t);var n})(pe(e,((e,o)=>(1===e.length?rn.value(e[0].handler):Ns(e,t,o)).map((n=>{const r=(e=>{const t=(e=>p(e)?{can:T,abort:O,run:e}:e)(e);return(e,o,...n)=>{const r=[e,o].concat(n);t.abort.apply(void 0,r)?o.stop():t.can.apply(void 0,r)&&t.run.apply(void 0,r)}})(n),a=e.length>1?V(t[o],(t=>L(e,(e=>e.name===t)))).join(" > "):e[0].name;return Ar(o,((e,t)=>({handler:e,purpose:t}))(r,a))})))),{}),Ds="alloy.base.behaviour",Bs=Mn([Qn("dom","dom",{tag:"required",process:{}},Mn([or("tag"),vr("styles",{}),vr("classes",[]),vr("attributes",{}),ur("value"),ur("innerHtml")])),or("components"),or("uid"),vr("events",{}),vr("apis",{}),Qn("eventOrder","eventOrder",(ii={[ua()]:["disabling",Ds,"toggling","typeaheadevents"],[ia()]:[Ds,"focusing","keying"],[ya()]:[Ds,"disabling","toggling","representing"],[Jr()]:[Ds,"representing","streaming","invalidating"],[xa()]:[Ds,"representing","item-events","tooltipping"],[Zr()]:["focusing",Ds,"item-type-events"],[Pr()]:["focusing",Ds,"item-type-events"],[$r()]:["item-type-events","tooltipping"],[da()]:["receiving","reflecting","tooltipping"]},kn(k(ii))),Ln()),ur("domModification")]),Ls=e=>e.events,Is=(e,t)=>{const o=St(e,t);return void 0===o||""===o?[]:o.split(" ")},Hs=e=>void 0!==e.dom.classList,Ps=e=>Is(e,"class"),Fs=(e,t)=>{Hs(e)?e.dom.classList.add(t):((e,t)=>{((e,t,o)=>{const n=Is(e,t).concat([o]);xt(e,t,n.join(" "))})(e,"class",t)})(e,t)},js=(e,t)=>{Hs(e)?e.dom.classList.remove(t):((e,t)=>{((e,t,o)=>{const n=V(Is(e,t),(e=>e!==o));n.length>0?xt(e,t,n.join(" ")):Tt(e,t)})(e,"class",t)})(e,t),(e=>{0===(Hs(e)?e.dom.classList:Ps(e)).length&&Tt(e,"class")})(e)},Vs=(e,t)=>Hs(e)&&e.dom.classList.contains(t),Zs=(e,t)=>{F(t,(t=>{Fs(e,t)}))},Us=(e,t)=>{F(t,(t=>{js(e,t)}))},qs=(e,t)=>K(t,(t=>Vs(e,t))),Ws=e=>e.dom.value,$s=(e,t)=>{if(void 0===t)throw new Error("Value.set was undefined");e.dom.value=t},Gs=(e,t,o)=>{o.fold((()=>Ho(e,t)),(e=>{Je(e,t)||(Bo(e,t),jo(e))}))},Ks=(e,t,o)=>{const n=P(t,o),r=it(e);return F(r.slice(n.length),jo),n},Ys=(e,t,o,n)=>{const r=lt(e,t),a=n(o,r),s=((e,t,o)=>lt(e,t).map((e=>{if(o.exists((t=>!Je(t,e)))){const t=o.map(Ve).getOr("span"),n=Be(t);return Bo(e,n),n}return e})))(e,t,r);return Gs(e,a.element,s),a},Xs=(e,t)=>{const o=se(e),n=se(t),r=X(n,o),a=((e,o)=>{const n={},r={};return me(e,((e,o)=>!be(t,o)||e!==t[o]),ue(n),ue(r)),{t:n,f:r}})(e).t;return{toRemove:r,toSet:a}},Js=(e,t)=>{const{class:o,style:n,...r}=(e=>U(e.dom.attributes,((e,t)=>(e[t.name]=t.value,e)),{}))(t),{toSet:a,toRemove:s}=Xs(e.attributes,r),i=It(t),{toSet:l,toRemove:c}=Xs(e.styles,i),d=(e=>Hs(e)?(e=>{const t=e.dom.classList,o=new Array(t.length);for(let e=0;e<t.length;e++){const n=t.item(e);null!==n&&(o[e]=n)}return o})(e):Ps(e))(t),u=X(d,e.classes),m=X(e.classes,d);return F(s,(e=>Tt(t,e))),Ct(t,a),Zs(t,m),Us(t,u),F(c,(e=>Pt(t,e))),Nt(t,l),e.innerHtml.fold((()=>{const o=e.domChildren;((e,t)=>{Ks(e,t,((t,o)=>{const n=lt(e,o);return Gs(e,t,n),t}))})(t,o)}),(e=>{ts(t,e)})),(()=>{const o=t,n=e.value.getOrUndefined();n!==Ws(o)&&$s(o,null!=n?n:"")})(),t},Qs=e=>{const t=(e=>{const t=ye(e,"behaviours").getOr({});return G(se(t),(e=>{const o=t[e];return g(o)?[o.me]:[]}))})(e);return((e,t)=>((e,t)=>{const o=P(t,(e=>br(e.name(),[or("config"),vr("state",Ss)]))),n=$n("component.behaviours",Mn(o),e.behaviours).fold((t=>{throw new Error(Yn(t)+"\nComplete spec:\n"+JSON.stringify(e,null,2))}),w);return{list:t,data:ce(n,(e=>{const t=e.map((e=>({config:e.config,state:e.state.init(e.config)})));return k(t)}))}})(e,t))(e,t)},ei=(e,t)=>{const o=()=>m,n=Tr(bs),r=Gn((e=>$n("custom.definition",Bs,e))(e)),a=Qs(e),s=(e=>e.list)(a),i=(e=>e.data)(a),l=((e,t,o)=>{const n={...(r=e).dom,uid:r.uid,domChildren:P(r.components,(e=>e.element))};var r;const a=(e=>e.domModification.fold((()=>Ts({})),Ts))(e),s={"alloy.base.modification":a},i=t.length>0?((e,t,o,n)=>{const r={...t};F(o,(t=>{r[t.name()]=t.exhibit(e,n)}));const a=Os(r,((e,t)=>({name:e,modification:t}))),s=e=>Z(e,((e,t)=>({...t.modification,...e})),{}),i=Z(a.classes,((e,t)=>t.modification.concat(e)),[]),l=s(a.attributes),c=s(a.styles);return Ts({classes:i,attributes:l,styles:c})})(o,s,t,n):a;return l=n,c=i,{...l,attributes:{...l.attributes,...c.attributes},styles:{...l.styles,...c.styles},classes:l.classes.concat(c.classes)};var l,c})(r,s,i),c=((e,t)=>{const o=t.filter((t=>Ve(t)===e.tag&&!(e=>e.innerHtml.isSome()&&e.domChildren.length>0)(e)&&!(e=>be(e.dom,ws))(t))).bind((t=>((e,t)=>{try{const o=Js(e,t);return E.some(o)}catch(e){return E.none()}})(e,t))).getOrThunk((()=>(e=>{const t=Be(e.tag);Ct(t,e.attributes),Zs(t,e.classes),Nt(t,e.styles),e.innerHtml.each((e=>ts(t,e)));const o=e.domChildren;return Po(t,o),e.value.each((e=>{$s(t,e)})),t})(e)));return gs(o,e.uid),o})(l,t),d=((e,t,o)=>{const n={"alloy.base.behaviour":Ls(e)};return((e,t,o,n)=>{const r=((e,t,o)=>{const n={...o,...Ms(t,e)};return Os(n,As)})(e,o,n);return Rs(r,t)})(o,e.eventOrder,t,n).getOrDie()})(r,s,i),u=Tr(r.components),m={uid:e.uid,getSystem:n.get,config:t=>{const o=i;return(p(o[t.name()])?o[t.name()]:()=>{throw new Error("Could not find "+t.name()+" in "+JSON.stringify(e,null,2))})()},hasConfigured:e=>p(i[e.name()]),spec:e,readState:e=>i[e]().map((e=>e.state.readState())).getOr("not enabled"),getApis:()=>r.apis,connect:e=>{n.set(e)},disconnect:()=>{n.set(ys(o))},element:c,syncComponents:()=>{const e=it(c),t=G(e,(e=>n.get().getByDom(e).fold((()=>[]),Q)));u.set(t)},components:u.get,events:d};return m},ti=e=>{const t=Le(e);return oi({element:t})},oi=e=>{const t=Kn("external.component",An([or("element"),ur("uid")]),e),o=Tr(ys()),n=t.uid.getOrThunk((()=>hs("external")));gs(t.element,n);const r={uid:n,getSystem:o.get,config:E.none,hasConfigured:O,connect:e=>{o.set(e)},disconnect:()=>{o.set(ys((()=>r)))},getApis:()=>({}),element:t.element,spec:e,readState:k("No state"),syncComponents:y,components:k([]),events:{}};return _s(r)},ni=hs,ri=(e,t)=>xs(e).getOrThunk((()=>((e,t)=>{const{events:o,...n}=fs(e),r=((e,t)=>{const o=ye(e,"components").getOr([]);return t.fold((()=>P(o,ai)),(e=>P(o,((t,o)=>ri(t,lt(e,o))))))})(n,t),a={...n,events:{...ss,...o},components:r};return rn.value(ei(a,t))})((e=>be(e,"uid"))(e)?e:{uid:ni(""),...e},t).getOrDie())),ai=e=>ri(e,E.none()),si=_s;var ii,li=(e,t,o,n,r)=>e(o,n)?E.some(o):p(r)&&r(o)?E.none():t(o,n,r);const ci=(e,t,o)=>{let n=e.dom;const r=p(o)?o:O;for(;n.parentNode;){n=n.parentNode;const e=Ie(n);if(t(e))return E.some(e);if(r(e))break}return E.none()},di=(e,t,o)=>li(((e,t)=>t(e)),ci,e,t,o),ui=(e,t,o)=>di(e,t,o).isSome(),mi=(e,t,o)=>ci(e,(e=>Ye(e,t)),o),gi=(e,t)=>((e,o)=>q(e.dom.childNodes,(e=>{return o=Ie(e),Ye(o,t);var o})).map(Ie))(e),pi=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Xe(o)?E.none():E.from(o.querySelector(e)).map(Ie)})(t,e),hi=(e,t,o)=>li(((e,t)=>Ye(e,t)),mi,e,t,o),fi="aria-controls",yi=()=>{const e=ls(fi);return{id:e,link:t=>{xt(t,fi,e)},unlink:e=>{Tt(e,fi)}}},bi=(e,t)=>ui(t,(t=>Je(t,e.element)),O)||((e,t)=>(e=>di(e,(e=>{if(!qe(e))return!1;const t=St(e,"id");return void 0!==t&&t.indexOf(fi)>-1})).bind((e=>{const t=St(e,"id"),o=ht(e);return pi(o,`[${fi}="${t}"]`)})))(t).exists((t=>bi(e,t))))(e,t);var vi;!function(e){e[e.STOP=0]="STOP",e[e.NORMAL=1]="NORMAL",e[e.LOGGING=2]="LOGGING"}(vi||(vi={}));const ki=Tr({}),wi=["alloy/data/Fields","alloy/debugging/Debugging"],_i=(e,t,o)=>((e,t,o)=>{switch(ye(ki.get(),e).orThunk((()=>{const t=se(ki.get());return ae(t,(t=>e.indexOf(t)>-1?E.some(ki.get()[t]):E.none()))})).getOr(vi.NORMAL)){case vi.NORMAL:return o(xi());case vi.LOGGING:{const n=((e,t)=>{const o=[],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 r=(new Date).getTime();B(["mousemove","mouseover","mouseout",ya()],e)||console.log(e,{event:e,time:r-n,target:t.dom,sequence:P(o,(e=>B(["cut","stopped","response"],e.outcome)?"{"+e.purpose+"} "+e.outcome+" at ("+ns(e.target)+")":e.outcome))})}}})(e,t),r=o(n);return n.write(),r}case vi.STOP:return!0}})(e,t,o),xi=k({logEventCut:y,logEventStopped:y,logNoParent:y,logEventNoHandlers:y,logEventResponse:y,write:y}),Ci=k([or("menu"),or("selectedMenu")]),Si=k([or("item"),or("selectedItem")]);k(Mn(Si().concat(Ci())));const zi=k(Mn(Si())),Oi=lr("initSize",[or("numColumns"),or("numRows")]),Ti=()=>lr("markers",[or("backgroundMenu")].concat(Ci()).concat(Si())),Ei=e=>lr("markers",P(e,or)),Ai=(e,t,o)=>((()=>{const e=new Error;if(void 0!==e.stack){const t=e.stack.split("\n");q(t,(e=>e.indexOf("alloy")>0&&!L(wi,(t=>e.indexOf(t)>-1)))).getOr("unknown")}})(),Qn(t,t,o,qn((e=>rn.value(((...t)=>e.apply(void 0,t))))))),Mi=e=>Ai(0,e,vn(y)),Ni=e=>Ai(0,e,vn(E.none)),Ri=e=>Ai(0,e,{tag:"required",process:{}}),Di=e=>Ai(0,e,{tag:"required",process:{}}),Bi=(e,t)=>er(e,k(t)),Li=e=>er(e,w),Ii=k(Oi),Hi=(e,t,o,n,r,a,s,i=!1)=>({x:e,y:t,bubble:o,direction:n,placement:r,restriction:a,label:`${s}-${r}`,alwaysFit:i}),Pi=Er([{southeast:[]},{southwest:[]},{northeast:[]},{northwest:[]},{south:[]},{north:[]},{east:[]},{west:[]}]),Fi=Pi.southeast,ji=Pi.southwest,Vi=Pi.northeast,Zi=Pi.northwest,Ui=Pi.south,qi=Pi.north,Wi=Pi.east,$i=Pi.west,Gi=(e,t,o,n)=>{const r=e+t;return r>n?o:r<o?n:r},Ki=(e,t,o)=>Math.min(Math.max(e,t),o),Yi=(e,t)=>J(["left","right","top","bottom"],(o=>ye(t,o).map((t=>((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}})(e,t))))),Xi="layout",Ji=e=>e.x,Qi=(e,t)=>e.x+e.width/2-t.width/2,el=(e,t)=>e.x+e.width-t.width,tl=(e,t)=>e.y-t.height,ol=e=>e.y+e.height,nl=(e,t)=>e.y+e.height/2-t.height/2,rl=(e,t,o)=>Hi(Ji(e),ol(e),o.southeast(),Fi(),"southeast",Yi(e,{left:1,top:3}),Xi),al=(e,t,o)=>Hi(el(e,t),ol(e),o.southwest(),ji(),"southwest",Yi(e,{right:0,top:3}),Xi),sl=(e,t,o)=>Hi(Ji(e),tl(e,t),o.northeast(),Vi(),"northeast",Yi(e,{left:1,bottom:2}),Xi),il=(e,t,o)=>Hi(el(e,t),tl(e,t),o.northwest(),Zi(),"northwest",Yi(e,{right:0,bottom:2}),Xi),ll=(e,t,o)=>Hi(Qi(e,t),tl(e,t),o.north(),qi(),"north",Yi(e,{bottom:2}),Xi),cl=(e,t,o)=>Hi(Qi(e,t),ol(e),o.south(),Ui(),"south",Yi(e,{top:3}),Xi),dl=(e,t,o)=>Hi((e=>e.x+e.width)(e),nl(e,t),o.east(),Wi(),"east",Yi(e,{left:0}),Xi),ul=(e,t,o)=>Hi(((e,t)=>e.x-t.width)(e,t),nl(e,t),o.west(),$i(),"west",Yi(e,{right:1}),Xi),ml=()=>[rl,al,sl,il,cl,ll,dl,ul],gl=()=>[al,rl,il,sl,cl,ll,dl,ul],pl=()=>[sl,il,rl,al,ll,cl],hl=()=>[il,sl,al,rl,ll,cl],fl=()=>[rl,al,sl,il,cl,ll],yl=()=>[al,rl,il,sl,cl,ll];var bl=Object.freeze({__proto__:null,events:e=>Pa([Va(da(),((t,o)=>{const n=e.channels,r=se(n),a=o,s=((e,t)=>t.universal?e:V(e,(e=>B(t.channels,e))))(r,a);F(s,(e=>{const o=n[e],r=o.schema,s=Kn("channel["+e+"] data\nReceiver: "+ns(t.element),r,a.data);o.onReceive(t,s)}))}))])}),vl=[nr("channels",Wn(rn.value,An([Ri("onReceive"),vr("schema",Ln())])))];const kl=(e,t,o)=>Ja(((n,r)=>{o(n,e,t)})),wl=e=>({key:e,value:void 0}),_l=(e,t,o,n,r,a,s)=>{const i=e=>ve(e,o)?e[o]():E.none(),l=ce(r,((e,t)=>((e,t,o)=>((e,t,o)=>{const n=o.toString(),r=n.indexOf(")")+1,a=n.indexOf("("),s=n.substring(a+1,r-1).split(/,\s*/);return e.toFunctionAnnotation=()=>({name:t,parameters:vs(s.slice(0,1).concat(s.slice(3)))}),e})(((n,...r)=>{const a=[n].concat(r);return n.config({name:k(e)}).fold((()=>{throw new Error("We could not find any behaviour configuration for: "+e+". Using API: "+o)}),(e=>{const o=Array.prototype.slice.call(a,1);return t.apply(void 0,[n,e.config,e.state].concat(o))}))}),o,t))(o,e,t))),c={...ce(a,((e,t)=>ks(e,t))),...l,revoke:x(wl,o),config:t=>{const n=Kn(o+"-config",e,t);return{key:o,value:{config:n,me:c,configAsRaw:Qt((()=>Kn(o+"-config",e,t))),initialConfig:t,state:s}}},schema:k(t),exhibit:(e,t)=>_e(i(e),ye(n,"exhibit"),((e,o)=>o(t,e.config,e.state))).getOrThunk((()=>Ts({}))),name:k(o),handlers:e=>i(e).map((e=>ye(n,"events").getOr((()=>({})))(e.config,e.state))).getOr({})};return c},xl=e=>Mr(e),Cl=An([or("fields"),or("name"),vr("active",{}),vr("apis",{}),vr("state",Ss),vr("extra",{})]),Sl=e=>{const t=Kn("Creating behaviour: "+e.name,Cl,e);return((e,t,o,n,r,a)=>{const s=An(e),i=br(t,[("config",l=e,mr("config",An(l)))]);var l;return _l(s,i,t,o,n,r,a)})(t.fields,t.name,t.active,t.apis,t.extra,t.state)},zl=An([or("branchKey"),or("branches"),or("name"),vr("active",{}),vr("apis",{}),vr("state",Ss),vr("extra",{})]),Ol=e=>{const t=Kn("Creating behaviour: "+e.name,zl,e);return((e,t,o,n,r,a)=>{const s=e,i=br(t,[mr("config",e)]);return _l(s,i,t,o,n,r,a)})(Xn(t.branchKey,t.branches),t.name,t.active,t.apis,t.extra,t.state)},Tl=k(void 0),El=Sl({fields:vl,name:"receiving",active:bl});var Al=Object.freeze({__proto__:null,exhibit:(e,t)=>Ts({classes:[],styles:t.useFixed()?{}:{position:"relative"}})});const Ml=e=>e.dom.focus(),Nl=e=>e.dom.blur(),Rl=e=>{const t=ht(e).dom;return e.dom===t.activeElement},Dl=(e=Wo())=>E.from(e.dom.activeElement).map(Ie),Bl=e=>Dl(ht(e)).filter((t=>e.dom.contains(t.dom))),Ll=(e,t)=>{const o=ht(t),n=Dl(o).bind((e=>{const o=t=>Je(e,t);return o(t)?E.some(t):((e,t)=>{const o=e=>{for(let n=0;n<e.childNodes.length;n++){const r=Ie(e.childNodes[n]);if(t(r))return E.some(r);const a=o(e.childNodes[n]);if(a.isSome())return a}return E.none()};return o(e.dom)})(t,o)})),r=e(t);return n.each((e=>{Dl(o).filter((t=>Je(t,e))).fold((()=>{Ml(e)}),y)})),r},Il=(e,t,o,n,r)=>{const a=e=>e+"px";return{position:e,left:t.map(a),top:o.map(a),right:n.map(a),bottom:r.map(a)}},Hl=(e,t)=>{Rt(e,(e=>({...e,position:E.some(e.position)}))(t))},Pl=Er([{none:[]},{relative:["x","y","width","height"]},{fixed:["x","y","width","height"]}]),Fl=(e,t,o,n,r,a)=>{const s=t.rect,i=s.x-o,l=s.y-n,c=r-(i+s.width),d=a-(l+s.height),u=E.some(i),m=E.some(l),g=E.some(c),p=E.some(d),h=E.none();return t.direction.fold((()=>Il(e,u,m,h,h)),(()=>Il(e,h,m,g,h)),(()=>Il(e,u,h,h,p)),(()=>Il(e,h,h,g,p)),(()=>Il(e,u,m,h,h)),(()=>Il(e,u,h,h,p)),(()=>Il(e,u,m,h,h)),(()=>Il(e,h,m,g,h)))},jl=(e,t)=>e.fold((()=>{const e=t.rect;return Il("absolute",E.some(e.x),E.some(e.y),E.none(),E.none())}),((e,o,n,r)=>Fl("absolute",t,e,o,n,r)),((e,o,n,r)=>Fl("fixed",t,e,o,n,r))),Vl=(e,t)=>{const o=x(Ko,t),n=e.fold(o,o,(()=>{const e=Vo();return Ko(t).translate(-e.left,-e.top)})),r=Jt(t),a=Ut(t);return Yo(n.left,n.top,r,a)},Zl=(e,t)=>t.fold((()=>e.fold(en,en,Yo)),(t=>e.fold(k(t),k(t),(()=>{const o=Ul(e,t.x,t.y);return Yo(o.left,o.top,t.width,t.height)})))),Ul=(e,t,o)=>{const n=Wt(t,o);return e.fold(k(n),k(n),(()=>{const e=Vo();return n.translate(-e.left,-e.top)}))};Pl.none;const ql=Pl.relative,Wl=Pl.fixed,$l="data-alloy-placement",Gl=e=>zt(e,$l),Kl=Er([{fit:["reposition"]},{nofit:["reposition","visibleW","visibleH","isVisible"]}]),Yl=(e,t,o,n)=>{const r=e.bubble,a=r.offset,s=((e,t,o)=>{const n=(n,r)=>t[n].map((t=>{const a="top"===n||"bottom"===n,s=a?o.top:o.left,i=("left"===n||"top"===n?Math.max:Math.min)(t,r)+s;return a?Ki(i,e.y,e.bottom):Ki(i,e.x,e.right)})).getOr(r),r=n("left",e.x),a=n("top",e.y),s=n("right",e.right),i=n("bottom",e.bottom);return Yo(r,a,s-r,i-a)})(n,e.restriction,a),i=e.x+a.left,l=e.y+a.top,c=Yo(i,l,t,o),{originInBounds:d,sizeInBounds:u,visibleW:m,visibleH:g}=((e,t)=>{const{x:o,y:n,right:r,bottom:a}=t,{x:s,y:i,right:l,bottom:c,width:d,height:u}=e;return{originInBounds:s>=o&&s<=r&&i>=n&&i<=a,sizeInBounds:l<=r&&l>=o&&c<=a&&c>=n,visibleW:Math.min(d,s>=o?r-s:l-o),visibleH:Math.min(u,i>=n?a-i:c-n)}})(c,s),p=d&&u,h=p?c:((e,t)=>{const{x:o,y:n,right:r,bottom:a}=t,{x:s,y:i,width:l,height:c}=e,d=Math.max(o,r-l),u=Math.max(n,a-c),m=Ki(s,o,d),g=Ki(i,n,u),p=Math.min(m+l,r)-m,h=Math.min(g+c,a)-g;return Yo(m,g,p,h)})(c,s),f=h.width>0&&h.height>0,{maxWidth:y,maxHeight:b}=((e,t,o)=>{const n=k(t.bottom-o.y),r=k(o.bottom-t.y),a=((e,t,o,n)=>e.fold(t,t,n,n,t,n,o,o))(e,r,r,n),s=k(t.right-o.x),i=k(o.right-t.x),l=((e,t,o,n)=>e.fold(t,n,t,n,o,o,t,n))(e,i,i,s);return{maxWidth:l,maxHeight:a}})(e.direction,h,n),v={rect:h,maxHeight:b,maxWidth:y,direction:e.direction,placement:e.placement,classes:{on:r.classesOn,off:r.classesOff},layout:e.label,testY:l};return p||e.alwaysFit?Kl.fit(v):Kl.nofit(v,m,g,f)},Xl=e=>{const t=Tr(E.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(E.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set:e=>{o(),t.set(E.some(e))}}},Jl=()=>Xl((e=>e.unbind())),Ql=()=>{const e=Xl(y);return{...e,on:t=>e.get().each(t)}},ec=T,tc=(e,t,o)=>((e,t,o,n)=>Ro(e,t,o,n,!1))(e,t,ec,o),oc=(e,t,o)=>((e,t,o,n)=>Ro(e,t,o,n,!0))(e,t,ec,o),nc=No,rc=["top","bottom","right","left"],ac="data-alloy-transition-timer",sc=(e,t,o,n,r,s)=>{const i=((e,t,o)=>o.exists((o=>{const n=e.mode;return"all"===n||o[n]!==t[n]})))(n,r,s);if(i||((e,t)=>qs(e,t.classes))(e,n)){Mt(e,"position",o.position);const s=Vl(t,e),l=jl(t,{...r,rect:s}),c=J(rc,(e=>l[e]));((e,t)=>{const o=e=>parseFloat(e).toFixed(3);return he(t,((t,n)=>!((e,t,o=_)=>_e(e,t,o).getOr(e.isNone()&&t.isNone()))(e[n].map(o),t.map(o)))).isSome()})(o,c)&&(Rt(e,c),i&&((e,t)=>{Zs(e,t.classes),zt(e,ac).each((t=>{clearTimeout(parseInt(t,10)),Tt(e,ac)})),((e,t)=>{const o=Jl(),n=Jl();let r;const s=t=>{var o;const n=null!==(o=t.raw.pseudoElement)&&void 0!==o?o:"";return Je(t.target,e)&&!Me(n)&&B(rc,t.raw.propertyName)},i=a=>{if(m(a)||s(a)){o.clear(),n.clear();const s=null==a?void 0:a.raw.type;(m(s)||s===oa())&&(clearTimeout(r),Tt(e,ac),Us(e,t.classes))}},l=tc(e,na(),(t=>{s(t)&&(l.unbind(),o.set(tc(e,oa(),i)),n.set(tc(e,ta(),i)))})),c=(e=>{const t=t=>{const o=Dt(e,t).split(/\s*,\s*/);return V(o,Me)},o=e=>{if(a(e)&&/^[\d.]+/.test(e)){const t=parseFloat(e);return Ee(e,"ms")?t:1e3*t}return 0},n=t("transition-delay"),r=t("transition-duration");return U(r,((e,t,r)=>{const a=o(n[r])+o(t);return Math.max(e,a)}),0)})(e);requestAnimationFrame((()=>{r=setTimeout(i,c+17),xt(e,ac,r)}))})(e,t)})(e,n),Ft(e))}else Us(e,n.classes)},ic=(e,t)=>{((e,t)=>{const o=Vt.max(e,t,["margin-top","border-top-width","padding-top","padding-bottom","border-bottom-width","margin-bottom"]);Mt(e,"max-height",o+"px")})(e,Math.floor(t))},lc=k(((e,t)=>{ic(e,t),Nt(e,{"overflow-x":"hidden","overflow-y":"auto"})})),cc=k(((e,t)=>{ic(e,t)})),dc=(e,t,o)=>void 0===e[t]?o:e[t],uc=(e,t,o,n)=>{const r=((e,t,o,n)=>{Pt(t,"max-height"),Pt(t,"max-width");const r={width:Jt(a=t),height:Ut(a)};var a;return((e,t,o,n,r,a)=>{const s=n.width,i=n.height,l=(t,l,c,d,u)=>{const m=t(o,n,r,e,a),g=Yl(m,s,i,a);return g.fold(k(g),((e,t,o,n)=>(u===n?o>d||t>c:!u&&n)?g:Kl.nofit(l,c,d,u)))};return U(t,((e,t)=>{const o=x(l,t);return e.fold(k(e),o)}),Kl.nofit({rect:o,maxHeight:n.height,maxWidth:n.width,direction:Fi(),placement:"southeast",classes:{on:[],off:[]},layout:"none",testY:o.y},-1,-1,!1)).fold(w,w)})(t,n.preference,e,r,o,n.bounds)})(e,t,o,n);return((e,t,o)=>{const n=jl(o.origin,t);o.transition.each((r=>{sc(e,o.origin,n,r,t,o.lastPlacement)})),Hl(e,n)})(t,r,n),((e,t)=>{((e,t)=>{xt(e,$l,t)})(e,t.placement)})(t,r),((e,t)=>{const o=t.classes;Us(e,o.off),Zs(e,o.on)})(t,r),((e,t,o)=>{(0,o.maxHeightFunction)(e,t.maxHeight)})(t,r,n),((e,t,o)=>{(0,o.maxWidthFunction)(e,t.maxWidth)})(t,r,n),{layout:r.layout,placement:r.placement}},mc=["valignCentre","alignLeft","alignRight","alignCentre","top","bottom","left","right","inset"],gc=(e,t,o,n=1)=>{const r=e*n,a=t*n,s=e=>ye(o,e).getOr([]),i=(e,t,o)=>{const n=X(mc,o);return{offset:Wt(e,t),classesOn:G(o,s),classesOff:G(n,s)}};return{southeast:()=>i(-e,t,["top","alignLeft"]),southwest:()=>i(e,t,["top","alignRight"]),south:()=>i(-e/2,t,["top","alignCentre"]),northeast:()=>i(-e,-t,["bottom","alignLeft"]),northwest:()=>i(e,-t,["bottom","alignRight"]),north:()=>i(-e/2,-t,["bottom","alignCentre"]),east:()=>i(e,-t/2,["valignCentre","left"]),west:()=>i(-e,-t/2,["valignCentre","right"]),insetNortheast:()=>i(r,a,["top","alignLeft","inset"]),insetNorthwest:()=>i(-r,a,["top","alignRight","inset"]),insetNorth:()=>i(-r/2,a,["top","alignCentre","inset"]),insetSoutheast:()=>i(r,-a,["bottom","alignLeft","inset"]),insetSouthwest:()=>i(-r,-a,["bottom","alignRight","inset"]),insetSouth:()=>i(-r/2,-a,["bottom","alignCentre","inset"]),insetEast:()=>i(-r,-a/2,["valignCentre","right","inset"]),insetWest:()=>i(r,-a/2,["valignCentre","left","inset"])}},pc=()=>gc(0,0,{}),hc=w,fc=(e,t)=>o=>"rtl"===yc(o)?t:e,yc=e=>"rtl"===Dt(e,"direction")?"rtl":"ltr";var bc;!function(e){e.TopToBottom="toptobottom",e.BottomToTop="bottomtotop"}(bc||(bc={}));const vc="data-alloy-vertical-dir",kc=e=>ui(e,(e=>qe(e)&&St(e,"data-alloy-vertical-dir")===bc.BottomToTop)),wc=()=>br("layouts",[or("onLtr"),or("onRtl"),ur("onBottomLtr"),ur("onBottomRtl")]),_c=(e,t,o,n,r,a,s)=>{const i=s.map(kc).getOr(!1),l=t.layouts.map((t=>t.onLtr(e))),c=t.layouts.map((t=>t.onRtl(e))),d=i?t.layouts.bind((t=>t.onBottomLtr.map((t=>t(e))))).or(l).getOr(r):l.getOr(o),u=i?t.layouts.bind((t=>t.onBottomRtl.map((t=>t(e))))).or(c).getOr(a):c.getOr(n);return fc(d,u)(e)};var xc=[or("hotspot"),ur("bubble"),vr("overrides",{}),wc(),Bi("placement",((e,t,o)=>{const n=t.hotspot,r=Vl(o,n.element),a=_c(e.element,t,fl(),yl(),pl(),hl(),E.some(t.hotspot.element));return E.some(hc({anchorBox:r,bubble:t.bubble.getOr(pc()),overrides:t.overrides,layouts:a}))}))],Cc=[or("x"),or("y"),vr("height",0),vr("width",0),vr("bubble",pc()),vr("overrides",{}),wc(),Bi("placement",((e,t,o)=>{const n=Ul(o,t.x,t.y),r=Yo(n.left,n.top,t.width,t.height),a=_c(e.element,t,ml(),gl(),ml(),gl(),E.none());return E.some(hc({anchorBox:r,bubble:t.bubble,overrides:t.overrides,layouts:a}))}))];const Sc=Er([{screen:["point"]},{absolute:["point","scrollLeft","scrollTop"]}]),zc=e=>e.fold(w,((e,t,o)=>e.translate(-t,-o))),Oc=e=>e.fold(w,w),Tc=e=>U(e,((e,t)=>e.translate(t.left,t.top)),Wt(0,0)),Ec=e=>{const t=P(e,Oc);return Tc(t)},Ac=Sc.screen,Mc=Sc.absolute,Nc=(e,t,o)=>{const n=et(e.element),r=Vo(n),a=((e,t,o)=>{const n=nt(o.root).dom;return E.from(n.frameElement).map(Ie).filter((t=>{const o=et(t),n=et(e.element);return Je(o,n)})).map(Gt)})(e,0,o).getOr(r);return Mc(a,r.left,r.top)},Rc=(e,t,o,n)=>{const r=Ac(Wt(e,t));return E.some(((e,t,o)=>({point:e,width:t,height:o}))(r,o,n))},Dc=(e,t,o,n,r)=>e.map((e=>{const a=[t,e.point],s=(i=()=>Ec(a),l=()=>Ec(a),c=()=>(e=>{const t=P(e,zc);return Tc(t)})(a),n.fold(i,l,c));var i,l,c;const d=(p=s.left,h=s.top,f=e.width,y=e.height,{x:p,y:h,width:f,height:y}),u=o.showAbove?pl():fl(),m=o.showAbove?hl():yl(),g=_c(r,o,u,m,u,m,E.none());var p,h,f,y;return hc({anchorBox:d,bubble:o.bubble.getOr(pc()),overrides:o.overrides,layouts:g})}));var Bc=[or("node"),or("root"),ur("bubble"),wc(),vr("overrides",{}),vr("showAbove",!1),Bi("placement",((e,t,o)=>{const n=Nc(e,0,t);return t.node.filter(vt).bind((r=>{const a=r.dom.getBoundingClientRect(),s=Rc(a.left,a.top,a.width,a.height),i=t.node.getOr(e.element);return Dc(s,n,t,o,i)}))}))];const Lc=(e,t,o,n)=>({start:e,soffset:t,finish:o,foffset:n}),Ic=Er([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),Hc=(Ic.before,Ic.on,Ic.after,e=>e.fold(w,w,w)),Pc=Er([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),Fc={domRange:Pc.domRange,relative:Pc.relative,exact:Pc.exact,exactFromRange:e=>Pc.exact(e.start,e.soffset,e.finish,e.foffset),getWin:e=>{const t=(e=>e.match({domRange:e=>Ie(e.startContainer),relative:(e,t)=>Hc(e),exact:(e,t,o,n)=>e}))(e);return nt(t)},range:Lc},jc=(e,t,o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e,t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e,t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t,o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},Vc=(e,t,o,n,r)=>{const a=e.document.createRange();return a.setStart(t.dom,o),a.setEnd(n.dom,r),a},Zc=e=>({left:e.left,top:e.top,right:e.right,bottom:e.bottom,width:e.width,height:e.height}),Uc=Er([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),qc=(e,t,o)=>t(Ie(o.startContainer),o.startOffset,Ie(o.endContainer),o.endOffset),Wc=(e,t)=>((e,t)=>{const o=((e,t)=>t.match({domRange:e=>({ltr:k(e),rtl:E.none}),relative:(t,o)=>({ltr:Qt((()=>jc(e,t,o))),rtl:Qt((()=>E.some(jc(e,o,t))))}),exact:(t,o,n,r)=>({ltr:Qt((()=>Vc(e,t,o,n,r))),rtl:Qt((()=>E.some(Vc(e,n,r,t,o))))})}))(e,t);return((e,t)=>{const o=t.ltr();return o.collapsed?t.rtl().filter((e=>!1===e.collapsed)).map((e=>Uc.rtl(Ie(e.endContainer),e.endOffset,Ie(e.startContainer),e.startOffset))).getOrThunk((()=>qc(0,Uc.ltr,o))):qc(0,Uc.ltr,o)})(0,o)})(e,t).match({ltr:(t,o,n,r)=>{const a=e.document.createRange();return a.setStart(t.dom,o),a.setEnd(n.dom,r),a},rtl:(t,o,n,r)=>{const a=e.document.createRange();return a.setStart(n.dom,r),a.setEnd(t.dom,o),a}});Uc.ltr,Uc.rtl;const $c=(e,t)=>((e,t)=>{const o=void 0===t?document:t.dom;return Xe(o)?[]:P(o.querySelectorAll(e),Ie)})(t,e),Gc=e=>{if(e.rangeCount>0){const t=e.getRangeAt(0),o=e.getRangeAt(e.rangeCount-1);return E.some(Lc(Ie(t.startContainer),t.startOffset,Ie(o.endContainer),o.endOffset))}return E.none()},Kc=e=>{if(null===e.anchorNode||null===e.focusNode)return Gc(e);{const t=Ie(e.anchorNode),o=Ie(e.focusNode);return((e,t,o,n)=>{const r=((e,t,o,n)=>{const r=et(e).dom.createRange();return r.setStart(e.dom,t),r.setEnd(o.dom,n),r})(e,t,o,n),a=Je(e,o)&&t===n;return r.collapsed&&!a})(t,e.anchorOffset,o,e.focusOffset)?E.some(Lc(t,e.anchorOffset,o,e.focusOffset)):Gc(e)}},Yc=(e,t)=>(e=>{const t=e.getClientRects(),o=t.length>0?t[0]:e.getBoundingClientRect();return o.width>0||o.height>0?E.some(o).map(Zc):E.none()})(Wc(e,t)),Xc=((e,t)=>{const o=t=>e(t)?E.from(t.dom.nodeValue):E.none();return{get:t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t,o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(We),Jc=(e,t)=>({element:e,offset:t}),Qc=(e,t)=>We(e)?Jc(e,t):((e,t)=>{const o=it(e);if(0===o.length)return Jc(e,t);if(t<o.length)return Jc(o[t],0);{const e=o[o.length-1],t=We(e)?(e=>Xc.get(e))(e).length:it(e).length;return Jc(e,t)}})(e,t),ed=(e,t)=>t.getSelection.getOrThunk((()=>()=>(e=>(e=>E.from(e.getSelection()))(e).filter((e=>e.rangeCount>0)).bind(Kc))(e)))().map((e=>{const t=Qc(e.start,e.soffset),o=Qc(e.finish,e.foffset);return Fc.range(t.element,t.offset,o.element,o.offset)}));var td=[ur("getSelection"),or("root"),ur("bubble"),wc(),vr("overrides",{}),vr("showAbove",!1),Bi("placement",((e,t,o)=>{const n=nt(t.root).dom,r=Nc(e,0,t),a=ed(n,t).bind((e=>{const t=((e,t)=>(e=>{const t=e.getBoundingClientRect();return t.width>0||t.height>0?E.some(t).map(Zc):E.none()})(Wc(e,t)))(n,Fc.exactFromRange(e)).orThunk((()=>{const t=Le("\ufeff");Bo(e.start,t);const o=Yc(n,Fc.exact(t,0,t,1));return jo(t),o}));return t.bind((e=>Rc(e.left,e.top,e.width,e.height)))})),s=ed(n,t).bind((e=>qe(e.start)?E.some(e.start):at(e.start))).getOr(e.element);return Dc(a,r,t,o,s)}))];const od="link-layout",nd=e=>e.x+e.width,rd=(e,t)=>e.x-t.width,ad=(e,t)=>e.y-t.height+e.height,sd=e=>e.y,id=(e,t,o)=>Hi(nd(e),sd(e),o.southeast(),Fi(),"southeast",Yi(e,{left:0,top:2}),od),ld=(e,t,o)=>Hi(rd(e,t),sd(e),o.southwest(),ji(),"southwest",Yi(e,{right:1,top:2}),od),cd=(e,t,o)=>Hi(nd(e),ad(e,t),o.northeast(),Vi(),"northeast",Yi(e,{left:0,bottom:3}),od),dd=(e,t,o)=>Hi(rd(e,t),ad(e,t),o.northwest(),Zi(),"northwest",Yi(e,{right:1,bottom:3}),od),ud=()=>[id,ld,cd,dd],md=()=>[ld,id,dd,cd];var gd=[or("item"),wc(),vr("overrides",{}),Bi("placement",((e,t,o)=>{const n=Vl(o,t.item.element),r=_c(e.element,t,ud(),md(),ud(),md(),E.none());return E.some(hc({anchorBox:n,bubble:pc(),overrides:t.overrides,layouts:r}))}))],pd=Xn("type",{selection:td,node:Bc,hotspot:xc,submenu:gd,makeshift:Cc});const hd=[dr("classes",Pn),xr("mode","all",["all","layout","placement"])],fd=[vr("useFixed",O),ur("getBounds")],yd=[nr("anchor",pd),br("transition",hd)],bd=(e,t,o,n,r,a)=>{const s=Kn("placement.info",Mn(yd),r),i=s.anchor,l=n.element,c=o.get(n.uid);Ll((()=>{Mt(l,"position","fixed");const r=Lt(l,"visibility");Mt(l,"visibility","hidden");const d=t.useFixed()?(()=>{const e=document.documentElement;return Wl(0,0,e.clientWidth,e.clientHeight)})():(e=>{const t=Gt(e.element),o=e.element.dom.getBoundingClientRect();return ql(t.left,t.top,o.width,o.height)})(e);i.placement(e,i,d).each((e=>{const r=a.orThunk((()=>t.getBounds.map(z))),i=((e,t,o,n,r,a)=>((e,t,o,n,r,a,s,i)=>{const l=dc(s,"maxHeightFunction",lc()),c=dc(s,"maxWidthFunction",y),d=e.anchorBox,u=e.origin,m={bounds:Zl(u,a),origin:u,preference:n,maxHeightFunction:l,maxWidthFunction:c,lastPlacement:r,transition:i};return uc(d,t,o,m)})(((e,t)=>((e,t)=>({anchorBox:e,origin:t}))(e,t))(t.anchorBox,e),n.element,t.bubble,t.layouts,r,o,t.overrides,a))(d,e,r,n,c,s.transition);o.set(n.uid,i)})),r.fold((()=>{Pt(l,"visibility")}),(e=>{Mt(l,"visibility",e)})),Lt(l,"left").isNone()&&Lt(l,"top").isNone()&&Lt(l,"right").isNone()&&Lt(l,"bottom").isNone()&&ke(Lt(l,"position"),"fixed")&&Pt(l,"position")}),l)};var vd=Object.freeze({__proto__:null,position:(e,t,o,n,r)=>{const a=E.none();bd(e,t,o,n,r,a)},positionWithinBounds:bd,getMode:(e,t,o)=>t.useFixed()?"fixed":"absolute",reset:(e,t,o,n)=>{const r=n.element;F(["position","left","right","top","bottom"],(e=>Pt(r,e))),(e=>{Tt(e,$l)})(r),o.clear(n.uid)}});const kd=Sl({fields:fd,name:"positioning",active:Al,apis:vd,state:Object.freeze({__proto__:null,init:()=>{let e={};return zs({readState:()=>e,clear:t=>{g(t)?delete e[t]:e={}},set:(t,o)=>{e[t]=o},get:t=>ye(e,t)})}})}),wd=e=>e.getSystem().isConnected(),_d=e=>{Ra(e,xa());const t=e.components();F(t,_d)},xd=e=>{const t=e.components();F(t,xd),Ra(e,_a())},Cd=(e,t)=>{e.getSystem().addToWorld(t),vt(e.element)&&xd(t)},Sd=e=>{_d(e),e.getSystem().removeFromWorld(e)},zd=(e,t)=>{Ho(e.element,t.element)},Od=(e,t)=>{Td(e,t,Ho)},Td=(e,t,o)=>{e.getSystem().addToWorld(t),o(e.element,t.element),vt(e.element)&&xd(t),e.syncComponents()},Ed=e=>{_d(e),jo(e.element),e.getSystem().removeFromWorld(e)},Ad=e=>{const t=rt(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()));Ed(e),t.each((e=>{e.syncComponents()}))},Md=e=>{const t=e.components();F(t,Ed),Fo(e.element),e.syncComponents()},Nd=(e,t)=>{Dd(e,t,Ho)},Rd=(e,t)=>{Dd(e,t,Lo)},Dd=(e,t,o)=>{o(e,t.element);const n=it(t.element);F(n,(e=>{t.getByDom(e).each(xd)}))},Bd=e=>{const t=it(e.element);F(t,(t=>{e.getByDom(t).each(_d)})),jo(e.element)},Ld=(e,t,o,n)=>{o.get().each((t=>{Md(e)}));const r=t.getAttachPoint(e);Od(r,e);const a=e.getSystem().build(n);return Od(e,a),o.set(a),a},Id=(e,t,o,n)=>{const r=Ld(e,t,o,n);return t.onOpen(e,r),r},Hd=(e,t,o)=>{o.get().each((n=>{Md(e),Ad(e),t.onClose(e,n),o.clear()}))},Pd=(e,t,o)=>o.isOpen(),Fd=(e,t,o)=>{const n=t.getAttachPoint(e);Mt(e.element,"position",kd.getMode(n)),((e,t,o,n)=>{Lt(e.element,t).fold((()=>{Tt(e.element,o)}),(t=>{xt(e.element,o,t)})),Mt(e.element,t,"hidden")})(e,"visibility",t.cloakVisibilityAttr)},jd=(e,t,o)=>{(e=>L(["top","left","right","bottom"],(t=>Lt(e,t).isSome())))(e.element)||Pt(e.element,"position"),((e,t,o)=>{zt(e.element,o).fold((()=>Pt(e.element,t)),(o=>Mt(e.element,t,o)))})(e,"visibility",t.cloakVisibilityAttr)};var Vd=Object.freeze({__proto__:null,cloak:Fd,decloak:jd,open:Id,openWhileCloaked:(e,t,o,n,r)=>{Fd(e,t),Id(e,t,o,n),r(),jd(e,t)},close:Hd,isOpen:Pd,isPartOf:(e,t,o,n)=>Pd(0,0,o)&&o.get().exists((o=>t.isPartOf(e,o,n))),getState:(e,t,o)=>o.get(),setContent:(e,t,o,n)=>o.get().map((()=>Ld(e,t,o,n)))}),Zd=Object.freeze({__proto__:null,events:(e,t)=>Pa([Va(ha(),((o,n)=>{Hd(o,e,t)}))])}),Ud=[Mi("onOpen"),Mi("onClose"),or("isPartOf"),or("getAttachPoint"),vr("cloakVisibilityAttr","data-precloak-visibility")],qd=Object.freeze({__proto__:null,init:()=>{const e=Ql(),t=k("not-implemented");return zs({readState:t,isOpen:e.isSet,clear:e.clear,set:e.set,get:e.get})}});const Wd=Sl({fields:Ud,name:"sandboxing",active:Zd,apis:Vd,state:qd}),$d=k("dismiss.popups"),Gd=k("reposition.popups"),Kd=k("mouse.released"),Yd=An([vr("isExtraPart",O),br("fireEventInstead",[vr("event",Ca())])]),Xd=e=>{const t=Kn("Dismissal",Yd,e);return{[$d()]:{schema:An([or("target")]),onReceive:(e,o)=>{Wd.isOpen(e)&&(Wd.isPartOf(e,o.target)||t.isExtraPart(e,o.target)||t.fireEventInstead.fold((()=>Wd.close(e)),(t=>Ra(e,t.event))))}}}},Jd=An([br("fireEventInstead",[vr("event",Sa())]),ir("doReposition")]),Qd=e=>{const t=Kn("Reposition",Jd,e);return{[Gd()]:{onReceive:e=>{Wd.isOpen(e)&&t.fireEventInstead.fold((()=>t.doReposition(e)),(t=>Ra(e,t.event)))}}}},eu=(e,t,o)=>{t.store.manager.onLoad(e,t,o)},tu=(e,t,o)=>{t.store.manager.onUnload(e,t,o)};var ou=Object.freeze({__proto__:null,onLoad:eu,onUnload:tu,setValue:(e,t,o,n)=>{t.store.manager.setValue(e,t,o,n)},getValue:(e,t,o)=>t.store.manager.getValue(e,t,o),getState:(e,t,o)=>o}),nu=Object.freeze({__proto__:null,events:(e,t)=>{const o=e.resetOnDom?[Ya(((o,n)=>{eu(o,e,t)})),Xa(((o,n)=>{tu(o,e,t)}))]:[kl(e,t,eu)];return Pa(o)}});const ru=()=>{const e=Tr(null);return zs({set:e.set,get:e.get,isNotSet:()=>null===e.get(),clear:()=>{e.set(null)},readState:()=>({mode:"memory",value:e.get()})})},au=()=>{const e=Tr({}),t=Tr({});return zs({readState:()=>({mode:"dataset",dataByValue:e.get(),dataByText:t.get()}),lookup:o=>ye(e.get(),o).orThunk((()=>ye(t.get(),o))),update:o=>{const n=e.get(),r=t.get(),a={},s={};F(o,(e=>{a[e.value]=e,ye(e,"meta").each((t=>{ye(t,"text").each((t=>{s[t]=e}))}))})),e.set({...n,...a}),t.set({...r,...s})},clear:()=>{e.set({}),t.set({})}})};var su=Object.freeze({__proto__:null,memory:ru,dataset:au,manual:()=>zs({readState:y}),init:e=>e.store.manager.state(e)});const iu=(e,t,o,n)=>{const r=t.store;o.update([n]),r.setValue(e,n),t.onSetValue(e,n)};var lu=[ur("initialValue"),or("getFallbackEntry"),or("getDataKey"),or("setValue"),Bi("manager",{setValue:iu,getValue:(e,t,o)=>{const n=t.store,r=n.getDataKey(e);return o.lookup(r).getOrThunk((()=>n.getFallbackEntry(r)))},onLoad:(e,t,o)=>{t.store.initialValue.each((n=>{iu(e,t,o,n)}))},onUnload:(e,t,o)=>{o.clear()},state:au})],cu=[or("getValue"),vr("setValue",y),ur("initialValue"),Bi("manager",{setValue:(e,t,o,n)=>{t.store.setValue(e,n),t.onSetValue(e,n)},getValue:(e,t,o)=>t.store.getValue(e),onLoad:(e,t,o)=>{t.store.initialValue.each((o=>{t.store.setValue(e,o)}))},onUnload:y,state:Ss.init})],du=[ur("initialValue"),Bi("manager",{setValue:(e,t,o,n)=>{o.set(n),t.onSetValue(e,n)},getValue:(e,t,o)=>o.get(),onLoad:(e,t,o)=>{t.store.initialValue.each((e=>{o.isNotSet()&&o.set(e)}))},onUnload:(e,t,o)=>{o.clear()},state:ru})],uu=[kr("store",{mode:"memory"},Xn("mode",{memory:du,manual:cu,dataset:lu})),Mi("onSetValue"),vr("resetOnDom",!1)];const mu=Sl({fields:uu,name:"representing",active:nu,apis:ou,extra:{setValueFrom:(e,t)=>{const o=mu.getValue(t);mu.setValue(e,o)}},state:su}),gu=(e,t)=>Or(e,{},P(t,(t=>{return o=t.name(),n="Cannot configure "+t.name()+" for "+e,Qn(o,o,{tag:"option",process:{}},Cn((e=>un("The field: "+o+" is forbidden. "+n))));var o,n})).concat([er("dump",w)])),pu=e=>e.dump,hu=(e,t)=>({...xl(t),...e.dump}),fu=gu,yu=hu,bu="placeholder",vu=Er([{single:["required","valueThunk"]},{multiple:["required","valueThunks"]}]),ku=e=>be(e,"uiType"),wu=(e,t,o,n)=>((e,t,o,n)=>ku(o)&&o.uiType===bu?((e,t,o,n)=>e.exists((e=>e!==o.owner))?vu.single(!0,k(o)):ye(n,o.name).fold((()=>{throw new Error("Unknown placeholder component: "+o.name+"\nKnown: ["+se(n)+"]\nNamespace: "+e.getOr("none")+"\nSpec: "+JSON.stringify(o,null,2))}),(e=>e.replace())))(e,0,o,n):vu.single(!1,k(o)))(e,0,o,n).fold(((r,a)=>{const s=ku(o)?a(t,o.config,o.validated):a(t),i=ye(s,"components").getOr([]),l=G(i,(o=>wu(e,t,o,n)));return[{...s,components:l}]}),((e,n)=>{if(ku(o)){const e=n(t,o.config,o.validated);return o.validated.preprocess.getOr(w)(e)}return n(t)})),_u=vu.single,xu=vu.multiple,Cu=k(bu),Su=Er([{required:["data"]},{external:["data"]},{optional:["data"]},{group:["data"]}]),zu=vr("factory",{sketch:w}),Ou=vr("schema",[]),Tu=or("name"),Eu=Qn("pname","pname",bn((e=>"<alloy."+ls(e.name)+">")),Ln()),Au=er("schema",(()=>[ur("preprocess")])),Mu=vr("defaults",k({})),Nu=vr("overrides",k({})),Ru=Mn([zu,Ou,Tu,Eu,Mu,Nu]),Du=Mn([zu,Ou,Tu,Mu,Nu]),Bu=Mn([zu,Ou,Tu,Eu,Mu,Nu]),Lu=Mn([zu,Au,Tu,or("unit"),Eu,Mu,Nu]),Iu=e=>e.fold(E.some,E.none,E.some,E.some),Hu=e=>{const t=e=>e.name;return e.fold(t,t,t,t)},Pu=(e,t)=>o=>{const n=Kn("Converting part type",t,o);return e(n)},Fu=Pu(Su.required,Ru),ju=Pu(Su.external,Du),Vu=Pu(Su.optional,Bu),Zu=Pu(Su.group,Lu),Uu=k("entirety");var qu=Object.freeze({__proto__:null,required:Fu,external:ju,optional:Vu,group:Zu,asNamedPart:Iu,name:Hu,asCommon:e=>e.fold(w,w,w,w),original:Uu});const Wu=(e,t,o,n)=>fn(t.defaults(e,o,n),o,{uid:e.partUids[t.name]},t.overrides(e,o,n)),$u=(e,t)=>{const o={};return F(t,(t=>{Iu(t).each((t=>{const n=Gu(e,t.pname);o[t.name]=o=>{const r=Kn("Part: "+t.name+" in "+e,Mn(t.schema),o);return{...n,config:o,validated:r}}}))})),o},Gu=(e,t)=>({uiType:Cu(),owner:e,name:t}),Ku=(e,t,o)=>({uiType:Cu(),owner:e,name:t,config:o,validated:{}}),Yu=e=>G(e,(e=>e.fold(E.none,E.some,E.none,E.none).map((e=>lr(e.name,e.schema.concat([Li(Uu())])))).toArray())),Xu=e=>P(e,Hu),Ju=(e,t,o)=>((e,t,o)=>{const n={},r={};return F(o,(e=>{e.fold((e=>{n[e.pname]=_u(!0,((t,o,n)=>e.factory.sketch(Wu(t,e,o,n))))}),(e=>{const o=t.parts[e.name];r[e.name]=k(e.factory.sketch(Wu(t,e,o[Uu()]),o))}),(e=>{n[e.pname]=_u(!1,((t,o,n)=>e.factory.sketch(Wu(t,e,o,n))))}),(e=>{n[e.pname]=xu(!0,((t,o,n)=>{const r=t[e.name];return P(r,(o=>e.factory.sketch(fn(e.defaults(t,o,n),o,e.overrides(t,o)))))}))}))})),{internals:k(n),externals:k(r)}})(0,t,o),Qu=(e,t,o)=>((e,t,o,n)=>{const r=ce(n,((e,t)=>((e,t)=>{let o=!1;return{name:k(e),required:()=>t.fold(((e,t)=>e),((e,t)=>e)),used:()=>o,replace:()=>{if(o)throw new Error("Trying to use the same placeholder more than once: "+e);return o=!0,t}}})(t,e))),a=((e,t,o,n)=>G(o,(o=>wu(e,t,o,n))))(e,t,o,r);return le(r,(o=>{if(!1===o.used()&&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))})),a})(E.some(e),t,t.components,o),em=(e,t,o)=>{const n=t.partUids[o];return e.getSystem().getByUid(n).toOptional()},tm=(e,t,o)=>em(e,t,o).getOrDie("Could not find part: "+o),om=(e,t,o)=>{const n={},r=t.partUids,a=e.getSystem();return F(o,(e=>{n[e]=k(a.getByUid(r[e]))})),n},nm=(e,t)=>{const o=e.getSystem();return ce(t.partUids,((e,t)=>k(o.getByUid(e))))},rm=e=>se(e.partUids),am=(e,t,o)=>{const n={},r=t.partUids,a=e.getSystem();return F(o,(e=>{n[e]=k(a.getByUid(r[e]).getOrDie())})),n},sm=(e,t)=>{const o=Xu(t);return Mr(P(o,(t=>({key:t,value:e+"-"+t}))))},im=e=>Qn("partUids","partUids",kn((t=>sm(t.uid,e))),Ln());var lm=Object.freeze({__proto__:null,generate:$u,generateOne:Ku,schemas:Yu,names:Xu,substitutes:Ju,components:Qu,defaultUids:sm,defaultUidsSchema:im,getAllParts:nm,getAllPartNames:rm,getPart:em,getPartOrDie:tm,getParts:om,getPartsOrDie:am});const cm=(e,t,o,n,r)=>{const a=((e,t)=>(e.length>0?[lr("parts",e)]:[]).concat([or("uid"),vr("dom",{}),vr("components",[]),Li("originalSpec"),vr("debug.sketcher",{})]).concat(t))(n,r);return Kn(e+" [SpecSchema]",An(a.concat(t)),o)},dm=(e,t,o,n,r)=>{const a=um(r),s=Yu(o),i=im(o),l=cm(e,t,a,s,[i]),c=Ju(0,l,o);return n(l,Qu(e,l,c.internals()),a,c.externals())},um=e=>(e=>be(e,"uid"))(e)?e:{...e,uid:hs("uid")},mm=An([or("name"),or("factory"),or("configFields"),vr("apis",{}),vr("extraApis",{})]),gm=An([or("name"),or("factory"),or("configFields"),or("partFields"),vr("apis",{}),vr("extraApis",{})]),pm=e=>{const t=Kn("Sketcher for "+e.name,mm,e),o=ce(t.apis,Cs),n=ce(t.extraApis,((e,t)=>ks(e,t)));return{name:t.name,configFields:t.configFields,sketch:e=>((e,t,o,n)=>{const r=um(n);return o(cm(e,t,r,[],[]),r)})(t.name,t.configFields,t.factory,e),...o,...n}},hm=e=>{const t=Kn("Sketcher for "+e.name,gm,e),o=$u(t.name,t.partFields),n=ce(t.apis,Cs),r=ce(t.extraApis,((e,t)=>ks(e,t)));return{name:t.name,partFields:t.partFields,configFields:t.configFields,sketch:e=>dm(t.name,t.configFields,t.partFields,t.factory,e),parts:o,...n,...r}},fm=e=>Ke("input")(e)&&"radio"!==St(e,"type")||Ke("textarea")(e);var ym=Object.freeze({__proto__:null,getCurrent:(e,t,o)=>t.find(e)});const bm=[or("find")],vm=Sl({fields:bm,name:"composing",apis:ym}),km=["input","button","textarea","select"],wm=(e,t,o)=>{(t.disabled()?Om:Tm)(e,t)},_m=(e,t)=>!0===t.useNative&&B(km,Ve(e.element)),xm=e=>{xt(e.element,"disabled","disabled")},Cm=e=>{Tt(e.element,"disabled")},Sm=e=>{xt(e.element,"aria-disabled","true")},zm=e=>{xt(e.element,"aria-disabled","false")},Om=(e,t,o)=>{t.disableClass.each((t=>{Fs(e.element,t)})),(_m(e,t)?xm:Sm)(e),t.onDisabled(e)},Tm=(e,t,o)=>{t.disableClass.each((t=>{js(e.element,t)})),(_m(e,t)?Cm:zm)(e),t.onEnabled(e)},Em=(e,t)=>_m(e,t)?(e=>Ot(e.element,"disabled"))(e):(e=>"true"===St(e.element,"aria-disabled"))(e);var Am=Object.freeze({__proto__:null,enable:Tm,disable:Om,isDisabled:Em,onLoad:wm,set:(e,t,o,n)=>{(n?Om:Tm)(e,t)}}),Mm=Object.freeze({__proto__:null,exhibit:(e,t)=>Ts({classes:t.disabled()?t.disableClass.toArray():[]}),events:(e,t)=>Pa([Fa(ua(),((t,o)=>Em(t,e))),kl(e,t,wm)])}),Nm=[Sr("disabled",O),vr("useNative",!0),ur("disableClass"),Mi("onDisabled"),Mi("onEnabled")];const Rm=Sl({fields:Nm,name:"disabling",active:Mm,apis:Am}),Dm=(e,t,o,n)=>{const r=$c(e.element,"."+t.highlightClass);F(r,(o=>{L(n,(e=>Je(e.element,o)))||(js(o,t.highlightClass),e.getSystem().getByDom(o).each((o=>{t.onDehighlight(e,o),Ra(o,Na())})))}))},Bm=(e,t,o,n)=>{Dm(e,t,0,[n]),Lm(e,t,o,n)||(Fs(n.element,t.highlightClass),t.onHighlight(e,n),Ra(n,Ma()))},Lm=(e,t,o,n)=>Vs(n.element,t.highlightClass),Im=(e,t,o)=>pi(e.element,"."+t.itemClass).bind((t=>e.getSystem().getByDom(t).toOptional())),Hm=(e,t,o)=>{const n=$c(e.element,"."+t.itemClass);return(n.length>0?E.some(n[n.length-1]):E.none()).bind((t=>e.getSystem().getByDom(t).toOptional()))},Pm=(e,t,o,n)=>{const r=$c(e.element,"."+t.itemClass);return W(r,(e=>Vs(e,t.highlightClass))).bind((t=>{const o=Gi(t,n,0,r.length-1);return e.getSystem().getByDom(r[o]).toOptional()}))},Fm=(e,t,o)=>{const n=$c(e.element,"."+t.itemClass);return we(P(n,(t=>e.getSystem().getByDom(t).toOptional())))};var jm=Object.freeze({__proto__:null,dehighlightAll:(e,t,o)=>Dm(e,t,0,[]),dehighlight:(e,t,o,n)=>{Lm(e,t,o,n)&&(js(n.element,t.highlightClass),t.onDehighlight(e,n),Ra(n,Na()))},highlight:Bm,highlightFirst:(e,t,o)=>{Im(e,t).each((n=>{Bm(e,t,o,n)}))},highlightLast:(e,t,o)=>{Hm(e,t).each((n=>{Bm(e,t,o,n)}))},highlightAt:(e,t,o,n)=>{((e,t,o,n)=>{const r=$c(e.element,"."+t.itemClass);return E.from(r[n]).fold((()=>rn.error(new Error("No element found with index "+n))),e.getSystem().getByDom)})(e,t,0,n).fold((e=>{throw e}),(n=>{Bm(e,t,o,n)}))},highlightBy:(e,t,o,n)=>{const r=Fm(e,t);q(r,n).each((n=>{Bm(e,t,o,n)}))},isHighlighted:Lm,getHighlighted:(e,t,o)=>pi(e.element,"."+t.highlightClass).bind((t=>e.getSystem().getByDom(t).toOptional())),getFirst:Im,getLast:Hm,getPrevious:(e,t,o)=>Pm(e,t,0,-1),getNext:(e,t,o)=>Pm(e,t,0,1),getCandidates:Fm}),Vm=[or("highlightClass"),or("itemClass"),Mi("onHighlight"),Mi("onDehighlight")];const Zm=Sl({fields:Vm,name:"highlighting",apis:jm}),Um=[8],qm=[9],Wm=[13],$m=[27],Gm=[32],Km=[37],Ym=[38],Xm=[39],Jm=[40],Qm=(e,t,o)=>{const n=Y(e.slice(0,t)),r=Y(e.slice(t+1));return q(n.concat(r),o)},eg=(e,t,o)=>{const n=Y(e.slice(0,t));return q(n,o)},tg=(e,t,o)=>{const n=e.slice(0,t),r=e.slice(t+1);return q(r.concat(n),o)},og=(e,t,o)=>{const n=e.slice(t+1);return q(n,o)},ng=e=>t=>{const o=t.raw;return B(e,o.which)},rg=e=>t=>K(e,(e=>e(t))),ag=e=>!0===e.raw.shiftKey,sg=e=>!0===e.raw.ctrlKey,ig=C(ag),lg=(e,t)=>({matches:e,classification:t}),cg=(e,t,o)=>{t.exists((e=>o.exists((t=>Je(t,e)))))||Da(e,za(),{prevFocus:t,newFocus:o})},dg=()=>{const e=e=>Bl(e.element);return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().triggerFocus(o,t.element);const r=e(t);cg(t,n,r)}}},ug=()=>{const e=e=>Zm.getHighlighted(e).map((e=>e.element));return{get:e,set:(t,o)=>{const n=e(t);t.getSystem().getByDom(o).fold(y,(e=>{Zm.highlight(t,e)}));const r=e(t);cg(t,n,r)}}};var mg;!function(e){e.OnFocusMode="onFocus",e.OnEnterOrSpaceMode="onEnterOrSpace",e.OnApiMode="onApi"}(mg||(mg={}));const gg=(e,t,o,n,r)=>{const a=(e,t,o,n,r)=>{return(a=o(e,t,n,r),s=t.event,q(a,(e=>e.matches(s))).map((e=>e.classification))).bind((o=>o(e,t,n,r)));var a,s},s={schema:()=>e.concat([vr("focusManager",dg()),kr("focusInside","onFocus",qn((e=>B(["onFocus","onEnterOrSpace","onApi"],e)?rn.value(e):rn.error("Invalid value for focusInside")))),Bi("handler",s),Bi("state",t),Bi("sendFocusIn",r)]),processKey:a,toEvents:(e,t)=>{const s=e.focusInside!==mg.OnFocusMode?E.none():r(e).map((o=>Va(ia(),((n,r)=>{o(n,e,t),r.stop()})))),i=[Va(Yr(),((n,s)=>{a(n,s,o,e,t).fold((()=>{((o,n)=>{const a=ng(Gm.concat(Wm))(n.event);e.focusInside===mg.OnEnterOrSpaceMode&&a&&Br(o,n)&&r(e).each((r=>{r(o,e,t),n.stop()}))})(n,s)}),(e=>{s.stop()}))})),Va(Xr(),((o,r)=>{a(o,r,n,e,t).each((e=>{r.stop()}))}))];return Pa(s.toArray().concat(i))}};return s},pg=e=>{const t=[ur("onEscape"),ur("onEnter"),vr("selector",'[data-alloy-tabstop="true"]:not(:disabled)'),vr("firstTabstop",0),vr("useTabstopAt",T),ur("visibilitySelector")].concat([e]),o=(e,t)=>{const o=e.visibilitySelector.bind((e=>hi(t,e))).getOr(t);return Zt(o)>0},n=(e,t,n)=>{((e,t)=>{const n=$c(e.element,t.selector),r=V(n,(e=>o(t,e)));return E.from(r[t.firstTabstop])})(e,t).each((o=>{t.focusManager.set(e,o)}))},r=(e,t,n,r)=>{const a=$c(e.element,n.selector);return((e,t)=>t.focusManager.get(e).bind((e=>hi(e,t.selector))))(e,n).bind((t=>W(a,x(Je,t)).bind((t=>((e,t,n,r,a)=>a(t,n,(e=>((e,t)=>o(e,t)&&e.useTabstopAt(t))(r,e))).fold((()=>r.cyclic?E.some(!0):E.none()),(t=>(r.focusManager.set(e,t),E.some(!0)))))(e,a,t,n,r)))))},a=k([lg(rg([ag,ng(qm)]),((e,t,o)=>{const n=o.cyclic?Qm:eg;return r(e,0,o,n)})),lg(ng(qm),((e,t,o)=>{const n=o.cyclic?tg:og;return r(e,0,o,n)})),lg(rg([ig,ng(Wm)]),((e,t,o)=>o.onEnter.bind((o=>o(e,t)))))]),s=k([lg(ng($m),((e,t,o)=>o.onEscape.bind((o=>o(e,t)))))]);return gg(t,Ss.init,a,s,(()=>E.some(n)))};var hg=pg(er("cyclic",O)),fg=pg(er("cyclic",T));const yg=(e,t,o)=>fm(o)&&ng(Gm)(t.event)?E.none():((e,t,o)=>(La(e,o,ua()),E.some(!0)))(e,0,o),bg=(e,t)=>E.some(!0),vg=[vr("execute",yg),vr("useSpace",!1),vr("useEnter",!0),vr("useControlEnter",!1),vr("useDown",!1)],kg=(e,t,o)=>o.execute(e,t,e.element);var wg=gg(vg,Ss.init,((e,t,o,n)=>{const r=o.useSpace&&!fm(e.element)?Gm:[],a=o.useEnter?Wm:[],s=o.useDown?Jm:[],i=r.concat(a).concat(s);return[lg(ng(i),kg)].concat(o.useControlEnter?[lg(rg([sg,ng(Wm)]),kg)]:[])}),((e,t,o,n)=>o.useSpace&&!fm(e.element)?[lg(ng(Gm),bg)]:[]),(()=>E.none()));const _g=()=>{const e=Ql();return zs({readState:()=>e.get().map((e=>({numRows:String(e.numRows),numColumns:String(e.numColumns)}))).getOr({numRows:"?",numColumns:"?"}),setGridSize:(t,o)=>{e.set({numRows:t,numColumns:o})},getNumRows:()=>e.get().map((e=>e.numRows)),getNumColumns:()=>e.get().map((e=>e.numColumns))})};var xg=Object.freeze({__proto__:null,flatgrid:_g,init:e=>e.state(e)});const Cg=e=>(t,o,n,r)=>{const a=e(t.element);return Tg(a,t,o,n,r)},Sg=(e,t)=>{const o=fc(e,t);return Cg(o)},zg=(e,t)=>{const o=fc(t,e);return Cg(o)},Og=e=>(t,o,n,r)=>Tg(e,t,o,n,r),Tg=(e,t,o,n,r)=>n.focusManager.get(t).bind((o=>e(t.element,o,n,r))).map((e=>(n.focusManager.set(t,e),!0))),Eg=Og,Ag=Og,Mg=Og,Ng=e=>!(e=>e.offsetWidth<=0&&e.offsetHeight<=0)(e.dom),Rg=(e,t,o)=>{const n=$c(e,o);return((e,o)=>W(e,(e=>Je(e,t))).map((t=>({index:t,candidates:e}))))(V(n,Ng))},Dg=(e,t)=>W(e,(e=>Je(t,e))),Bg=(e,t,o,n)=>n(Math.floor(t/o),t%o).bind((t=>{const n=t.row*o+t.column;return n>=0&&n<e.length?E.some(e[n]):E.none()})),Lg=(e,t,o,n,r)=>Bg(e,t,n,((t,a)=>{const s=t===o-1?e.length-t*n:n,i=Gi(a,r,0,s-1);return E.some({row:t,column:i})})),Ig=(e,t,o,n,r)=>Bg(e,t,n,((t,a)=>{const s=Gi(t,r,0,o-1),i=s===o-1?e.length-s*n:n,l=Ki(a,0,i-1);return E.some({row:s,column:l})})),Hg=[or("selector"),vr("execute",yg),Ni("onEscape"),vr("captureTab",!1),Ii()],Pg=(e,t,o)=>{pi(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},Fg=e=>(t,o,n,r)=>Rg(t,o,n.selector).bind((t=>e(t.candidates,t.index,r.getNumRows().getOr(n.initSize.numRows),r.getNumColumns().getOr(n.initSize.numColumns)))),jg=(e,t,o)=>o.captureTab?E.some(!0):E.none(),Vg=Fg(((e,t,o,n)=>Lg(e,t,o,n,-1))),Zg=Fg(((e,t,o,n)=>Lg(e,t,o,n,1))),Ug=Fg(((e,t,o,n)=>Ig(e,t,o,n,-1))),qg=Fg(((e,t,o,n)=>Ig(e,t,o,n,1))),Wg=k([lg(ng(Km),Sg(Vg,Zg)),lg(ng(Xm),zg(Vg,Zg)),lg(ng(Ym),Eg(Ug)),lg(ng(Jm),Ag(qg)),lg(rg([ag,ng(qm)]),jg),lg(rg([ig,ng(qm)]),jg),lg(ng(Gm.concat(Wm)),((e,t,o,n)=>((e,t)=>t.focusManager.get(e).bind((e=>hi(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n)))))]),$g=k([lg(ng($m),((e,t,o)=>o.onEscape(e,t))),lg(ng(Gm),bg)]);var Gg=gg(Hg,_g,Wg,$g,(()=>E.some(Pg)));const Kg=(e,t,o,n,r)=>{const a=(e,t,o)=>r(e,t,n,0,o.length-1,o[t],(t=>{return n=o[t],"button"===Ve(n)&&"disabled"===St(n,"disabled")?a(e,t,o):E.from(o[t]);var n}));return Rg(e,o,t).bind((e=>{const t=e.index,o=e.candidates;return a(t,t,o)}))},Yg=(e,t,o,n)=>Kg(e,t,o,n,((e,t,o,n,r,a,s)=>{const i=Ki(t+o,n,r);return i===e?E.from(a):s(i)})),Xg=(e,t,o,n)=>Kg(e,t,o,n,((e,t,o,n,r,a,s)=>{const i=Gi(t,o,n,r);return i===e?E.none():s(i)})),Jg=[or("selector"),vr("getInitial",E.none),vr("execute",yg),Ni("onEscape"),vr("executeOnMove",!1),vr("allowVertical",!0),vr("allowHorizontal",!0),vr("cycles",!0)],Qg=(e,t,o)=>((e,t)=>t.focusManager.get(e).bind((e=>hi(e,t.selector))))(e,o).bind((n=>o.execute(e,t,n))),ep=(e,t,o)=>{t.getInitial(e).orThunk((()=>pi(e.element,t.selector))).each((o=>{t.focusManager.set(e,o)}))},tp=(e,t,o)=>(o.cycles?Xg:Yg)(e,o.selector,t,-1),op=(e,t,o)=>(o.cycles?Xg:Yg)(e,o.selector,t,1),np=e=>(t,o,n,r)=>e(t,o,n,r).bind((()=>n.executeOnMove?Qg(t,o,n):E.some(!0))),rp=k([lg(ng(Gm),bg),lg(ng($m),((e,t,o)=>o.onEscape(e,t)))]);var ap=gg(Jg,Ss.init,((e,t,o,n)=>{const r=[...o.allowHorizontal?Km:[]].concat(o.allowVertical?Ym:[]),a=[...o.allowHorizontal?Xm:[]].concat(o.allowVertical?Jm:[]);return[lg(ng(r),np(Sg(tp,op))),lg(ng(a),np(zg(tp,op))),lg(ng(Wm),Qg),lg(ng(Gm),Qg)]}),rp,(()=>E.some(ep)));const sp=(e,t,o)=>E.from(e[t]).bind((e=>E.from(e[o]).map((e=>({rowIndex:t,columnIndex:o,cell:e}))))),ip=(e,t,o,n)=>{const r=e[t].length,a=Gi(o,n,0,r-1);return sp(e,t,a)},lp=(e,t,o,n)=>{const r=Gi(o,n,0,e.length-1),a=e[r].length,s=Ki(t,0,a-1);return sp(e,r,s)},cp=(e,t,o,n)=>{const r=e[t].length,a=Ki(o+n,0,r-1);return sp(e,t,a)},dp=(e,t,o,n)=>{const r=Ki(o+n,0,e.length-1),a=e[r].length,s=Ki(t,0,a-1);return sp(e,r,s)},up=[lr("selectors",[or("row"),or("cell")]),vr("cycles",!0),vr("previousSelector",E.none),vr("execute",yg)],mp=(e,t,o)=>{t.previousSelector(e).orThunk((()=>{const o=t.selectors;return pi(e.element,o.cell)})).each((o=>{t.focusManager.set(e,o)}))},gp=(e,t)=>(o,n,r)=>{const a=r.cycles?e:t;return hi(n,r.selectors.row).bind((e=>{const t=$c(e,r.selectors.cell);return Dg(t,n).bind((t=>{const n=$c(o,r.selectors.row);return Dg(n,e).bind((e=>{const o=((e,t)=>P(e,(e=>$c(e,t.selectors.cell))))(n,r);return a(o,e,t).map((e=>e.cell))}))}))}))},pp=gp(((e,t,o)=>ip(e,t,o,-1)),((e,t,o)=>cp(e,t,o,-1))),hp=gp(((e,t,o)=>ip(e,t,o,1)),((e,t,o)=>cp(e,t,o,1))),fp=gp(((e,t,o)=>lp(e,o,t,-1)),((e,t,o)=>dp(e,o,t,-1))),yp=gp(((e,t,o)=>lp(e,o,t,1)),((e,t,o)=>dp(e,o,t,1))),bp=k([lg(ng(Km),Sg(pp,hp)),lg(ng(Xm),zg(pp,hp)),lg(ng(Ym),Eg(fp)),lg(ng(Jm),Ag(yp)),lg(ng(Gm.concat(Wm)),((e,t,o)=>Bl(e.element).bind((n=>o.execute(e,t,n)))))]),vp=k([lg(ng(Gm),bg)]);var kp=gg(up,Ss.init,bp,vp,(()=>E.some(mp)));const wp=[or("selector"),vr("execute",yg),vr("moveOnTab",!1)],_p=(e,t,o)=>o.focusManager.get(e).bind((n=>o.execute(e,t,n))),xp=(e,t,o)=>{pi(e.element,t.selector).each((o=>{t.focusManager.set(e,o)}))},Cp=(e,t,o)=>Xg(e,o.selector,t,-1),Sp=(e,t,o)=>Xg(e,o.selector,t,1),zp=k([lg(ng(Ym),Mg(Cp)),lg(ng(Jm),Mg(Sp)),lg(rg([ag,ng(qm)]),((e,t,o,n)=>o.moveOnTab?Mg(Cp)(e,t,o,n):E.none())),lg(rg([ig,ng(qm)]),((e,t,o,n)=>o.moveOnTab?Mg(Sp)(e,t,o,n):E.none())),lg(ng(Wm),_p),lg(ng(Gm),_p)]),Op=k([lg(ng(Gm),bg)]);var Tp=gg(wp,Ss.init,zp,Op,(()=>E.some(xp)));const Ep=[Ni("onSpace"),Ni("onEnter"),Ni("onShiftEnter"),Ni("onLeft"),Ni("onRight"),Ni("onTab"),Ni("onShiftTab"),Ni("onUp"),Ni("onDown"),Ni("onEscape"),vr("stopSpaceKeyup",!1),ur("focusIn")];var Ap=gg(Ep,Ss.init,((e,t,o)=>[lg(ng(Gm),o.onSpace),lg(rg([ig,ng(Wm)]),o.onEnter),lg(rg([ag,ng(Wm)]),o.onShiftEnter),lg(rg([ag,ng(qm)]),o.onShiftTab),lg(rg([ig,ng(qm)]),o.onTab),lg(ng(Ym),o.onUp),lg(ng(Jm),o.onDown),lg(ng(Km),o.onLeft),lg(ng(Xm),o.onRight),lg(ng(Gm),o.onSpace)]),((e,t,o)=>[...o.stopSpaceKeyup?[lg(ng(Gm),bg)]:[],lg(ng($m),o.onEscape)]),(e=>e.focusIn));const Mp=hg.schema(),Np=fg.schema(),Rp=ap.schema(),Dp=Gg.schema(),Bp=kp.schema(),Lp=wg.schema(),Ip=Tp.schema(),Hp=Ap.schema(),Pp=Ol({branchKey:"mode",branches:Object.freeze({__proto__:null,acyclic:Mp,cyclic:Np,flow:Rp,flatgrid:Dp,matrix:Bp,execution:Lp,menu:Ip,special:Hp}),name:"keying",active:{events:(e,t)=>e.handler.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,r)=>{(e=>ve(e,"setGridSize"))(o)?o.setGridSize(n,r):console.error("Layout does not support setGridSize")}},state:xg}),Fp=(e,t)=>{Ll((()=>{((e,t,o)=>{const n=e.components();(e=>{F(e.components(),(e=>jo(e.element))),Fo(e.element),e.syncComponents()})(e);const r=o(t),a=X(n,r);F(a,(t=>{_d(t),e.getSystem().removeFromWorld(t)})),F(r,(t=>{wd(t)?zd(e,t):(e.getSystem().addToWorld(t),zd(e,t),vt(e.element)&&xd(t))})),e.syncComponents()})(e,t,(()=>P(t,e.getSystem().build)))}),e.element)},jp=(e,t)=>{Ll((()=>{((o,n,r)=>{const a=o.components(),s=G(n,(e=>xs(e).toArray()));F(a,(e=>{B(s,e)||Sd(e)}));const i=((e,t,o)=>Ks(e,t,((t,n)=>Ys(e,n,t,o))))(e.element,t,e.getSystem().buildOrPatch),l=X(a,i);F(l,(e=>{wd(e)&&Sd(e)})),F(i,(e=>{wd(e)||Cd(o,e)})),o.syncComponents()})(e,t)}),e.element)},Vp=(e,t,o,n)=>{Sd(t);const r=Ys(e.element,o,n,e.getSystem().buildOrPatch);Cd(e,r),e.syncComponents()},Zp=(e,t,o)=>{const n=e.getSystem().build(o);Td(e,n,t)},Up=(e,t,o,n)=>{Ad(t),Zp(e,((e,t)=>((e,t,o)=>{lt(e,o).fold((()=>{Ho(e,t)}),(e=>{Bo(e,t)}))})(e,t,o)),n)},qp=(e,t)=>e.components(),Wp=(e,t,o,n,r)=>{const a=qp(e);return E.from(a[n]).map((o=>(r.fold((()=>Ad(o)),(r=>{(t.reuseDom?Vp:Up)(e,o,n,r)})),o)))};var $p=Object.freeze({__proto__:null,append:(e,t,o,n)=>{Zp(e,Ho,n)},prepend:(e,t,o,n)=>{Zp(e,Io,n)},remove:(e,t,o,n)=>{const r=qp(e),a=q(r,(e=>Je(n.element,e.element)));a.each(Ad)},replaceAt:Wp,replaceBy:(e,t,o,n,r)=>{const a=qp(e);return W(a,n).bind((o=>Wp(e,t,0,o,r)))},set:(e,t,o,n)=>(t.reuseDom?jp:Fp)(e,n),contents:qp});const Gp=Sl({fields:[Cr("reuseDom",!0)],name:"replacing",apis:$p}),Kp=(e,t)=>{const o=((e,t)=>{const o=Pa(t);return Sl({fields:[or("enabled")],name:e,active:{events:k(o)}})})(e,t);return{key:e,value:{config:{},me:o,configAsRaw:k({}),initialConfig:{},state:Ss}}},Yp=(e,t)=>{t.ignore||(Ml(e.element),t.onFocus(e))};var Xp=Object.freeze({__proto__:null,focus:Yp,blur:(e,t)=>{t.ignore||Nl(e.element)},isFocused:e=>Rl(e.element)}),Jp=Object.freeze({__proto__:null,exhibit:(e,t)=>{const o=t.ignore?{}:{attributes:{tabindex:"-1"}};return Ts(o)},events:e=>Pa([Va(ia(),((t,o)=>{Yp(t,e),o.stop()}))].concat(e.stopMousedown?[Va(Zr(),((e,t)=>{t.event.prevent()}))]:[]))}),Qp=[Mi("onFocus"),vr("stopMousedown",!1),vr("ignore",!1)];const eh=Sl({fields:Qp,name:"focusing",active:Jp,apis:Xp}),th=(e,t,o,n)=>{const r=o.get();o.set(n),((e,t,o)=>{t.toggleClass.each((t=>{o.get()?Fs(e.element,t):js(e.element,t)}))})(e,t,o),((e,t,o)=>{const n=t.aria;n.update(e,n,o.get())})(e,t,o),r!==n&&t.onToggled(e,n)},oh=(e,t,o)=>{th(e,t,o,!o.get())},nh=(e,t,o)=>{th(e,t,o,t.selected)};var rh=Object.freeze({__proto__:null,onLoad:nh,toggle:oh,isOn:(e,t,o)=>o.get(),on:(e,t,o)=>{th(e,t,o,!0)},off:(e,t,o)=>{th(e,t,o,!1)},set:th}),ah=Object.freeze({__proto__:null,exhibit:()=>Ts({}),events:(e,t)=>{const o=(n=e,r=t,a=oh,Qa((e=>{a(e,n,r)})));var n,r,a;const s=kl(e,t,nh);return Pa($([e.toggleOnExecute?[o]:[],[s]]))}});const sh=(e,t,o)=>{xt(e.element,"aria-expanded",o)};var ih=[vr("selected",!1),ur("toggleClass"),vr("toggleOnExecute",!0),Mi("onToggled"),kr("aria",{mode:"none"},Xn("mode",{pressed:[vr("syncWithExpanded",!1),Bi("update",((e,t,o)=>{xt(e.element,"aria-pressed",o),t.syncWithExpanded&&sh(e,0,o)}))],checked:[Bi("update",((e,t,o)=>{xt(e.element,"aria-checked",o)}))],expanded:[Bi("update",sh)],selected:[Bi("update",((e,t,o)=>{xt(e.element,"aria-selected",o)}))],none:[Bi("update",y)]}))];const lh=Sl({fields:ih,name:"toggling",active:ah,apis:rh,state:(!1,{init:()=>{const e=Tr(false);return{get:()=>e.get(),set:t=>e.set(t),clear:()=>e.set(false),readState:()=>e.get()}}})});const ch=()=>{const e=(e,t)=>{t.stop(),Ba(e)};return[Va(ea(),e),Va(ga(),e),$a(Pr()),$a(Zr())]},dh=e=>Pa($([e.map((e=>Qa(((t,o)=>{e(t),o.stop()})))).toArray(),ch()])),uh="alloy.item-hover",mh="alloy.item-focus",gh="alloy.item-toggled",ph=e=>{(Bl(e.element).isNone()||eh.isFocused(e))&&(eh.isFocused(e)||eh.focus(e),Da(e,uh,{item:e}))},hh=e=>{Da(e,mh,{item:e})},fh=k(uh),yh=k(mh),bh=k(gh),vh=e=>e.toggling.map((e=>e.exclusive?"menuitemradio":"menuitemcheckbox")).getOr("menuitem"),kh=[or("data"),or("components"),or("dom"),vr("hasSubmenu",!1),ur("toggling"),fu("itemBehaviours",[lh,eh,Pp,mu]),vr("ignoreFocus",!1),vr("domModification",{}),Bi("builder",(e=>({dom:e.dom,domModification:{...e.domModification,attributes:{role:vh(e),...e.domModification.attributes,"aria-haspopup":e.hasSubmenu,...e.hasSubmenu?{"aria-expanded":!1}:{}}},behaviours:yu(e.itemBehaviours,[e.toggling.fold(lh.revoke,(e=>lh.config((e=>({aria:{mode:"checked"},...ge(e,((e,t)=>"exclusive"!==t)),onToggled:(t,o)=>{p(e.onToggled)&&e.onToggled(t,o),((e,t)=>{Da(e,gh,{item:e,state:t})})(t,o)}}))(e)))),eh.config({ignore:e.ignoreFocus,stopMousedown:e.ignoreFocus,onFocus:e=>{hh(e)}}),Pp.config({mode:"execution"}),mu.config({store:{mode:"memory",initialValue:e.data}}),Kp("item-type-events",[...ch(),Va($r(),ph),Va(ma(),eh.focus)])]),components:e.components,eventOrder:e.eventOrder}))),vr("eventOrder",{})],wh=[or("dom"),or("components"),Bi("builder",(e=>({dom:e.dom,components:e.components,events:Pa([Ga(ma())])})))],_h=k("item-widget"),xh=k([Fu({name:"widget",overrides:e=>({behaviours:xl([mu.config({store:{mode:"manual",getValue:t=>e.data,setValue:y}})])})})]),Ch=[or("uid"),or("data"),or("components"),or("dom"),vr("autofocus",!1),vr("ignoreFocus",!1),fu("widgetBehaviours",[mu,eh,Pp]),vr("domModification",{}),im(xh()),Bi("builder",(e=>{const t=Ju(_h(),e,xh()),o=Qu(_h(),e,t.internals()),n=t=>em(t,e,"widget").map((e=>(Pp.focusIn(e),e))),r=(t,o)=>fm(o.event.target)?E.none():e.autofocus?(o.setSource(t.element),E.none()):E.none();return{dom:e.dom,components:o,domModification:e.domModification,events:Pa([Qa(((e,t)=>{n(e).each((e=>{t.stop()}))})),Va($r(),ph),Va(ma(),((t,o)=>{e.autofocus?n(t):eh.focus(t)}))]),behaviours:yu(e.widgetBehaviours,[mu.config({store:{mode:"memory",initialValue:e.data}}),eh.config({ignore:e.ignoreFocus,onFocus:e=>{hh(e)}}),Pp.config({mode:"special",focusIn:e.autofocus?e=>{n(e)}:Tl(),onLeft:r,onRight:r,onEscape:(t,o)=>eh.isFocused(t)||e.autofocus?e.autofocus?(o.setSource(t.element),E.none()):E.none():(eh.focus(t),E.some(!0))})])}}))],Sh=Xn("type",{widget:Ch,item:kh,separator:wh}),zh=k([Zu({factory:{sketch:e=>{const t=Kn("menu.spec item",Sh,e);return t.builder(t)}},name:"items",unit:"item",defaults:(e,t)=>be(t,"uid")?t:{...t,uid:hs("item")},overrides:(e,t)=>({type:t.type,ignoreFocus:e.fakeFocus,domModification:{classes:[e.markers.item]}})})]),Oh=k([or("value"),or("items"),or("dom"),or("components"),vr("eventOrder",{}),gu("menuBehaviours",[Zm,mu,vm,Pp]),kr("movement",{mode:"menu",moveOnTab:!0},Xn("mode",{grid:[Ii(),Bi("config",((e,t)=>({mode:"flatgrid",selector:"."+e.markers.item,initSize:{numColumns:t.initSize.numColumns,numRows:t.initSize.numRows},focusManager:e.focusManager})))],matrix:[Bi("config",((e,t)=>({mode:"matrix",selectors:{row:t.rowSelector,cell:"."+e.markers.item},previousSelector:t.previousSelector,focusManager:e.focusManager}))),or("rowSelector"),vr("previousSelector",E.none)],menu:[vr("moveOnTab",!0),Bi("config",((e,t)=>({mode:"menu",selector:"."+e.markers.item,moveOnTab:t.moveOnTab,focusManager:e.focusManager})))]})),nr("markers",zi()),vr("fakeFocus",!1),vr("focusManager",dg()),Mi("onHighlight"),Mi("onDehighlight")]),Th=k("alloy.menu-focus"),Eh=hm({name:"Menu",configFields:Oh(),partFields:zh(),factory:(e,t,o,n)=>({uid:e.uid,dom:e.dom,markers:e.markers,behaviours:hu(e.menuBehaviours,[Zm.config({highlightClass:e.markers.selectedItem,itemClass:e.markers.item,onHighlight:e.onHighlight,onDehighlight:e.onDehighlight}),mu.config({store:{mode:"memory",initialValue:e.value}}),vm.config({find:E.some}),Pp.config(e.movement.config(e,e.movement))]),events:Pa([Va(yh(),((e,t)=>{const o=t.event;e.getSystem().getByDom(o.target).each((o=>{Zm.highlight(e,o),t.stop(),Da(e,Th(),{menu:e,item:o})}))})),Va(fh(),((e,t)=>{const o=t.event.item;Zm.highlight(e,o)})),Va(bh(),((e,t)=>{const{item:o,state:n}=t.event;n&&"menuitemradio"===St(o.element,"role")&&((e,t)=>{const o=$c(e.element,'[role="menuitemradio"][aria-checked="true"]');F(o,(o=>{Je(o,t.element)||e.getSystem().getByDom(o).each((e=>{lh.off(e)}))}))})(e,o)}))]),components:t,eventOrder:e.eventOrder,domModification:{attributes:{role:"menu"}}})}),Ah=(e,t,o,n)=>ye(o,n).bind((n=>ye(e,n).bind((n=>{const r=Ah(e,t,o,n);return E.some([n].concat(r))})))).getOr([]),Mh=e=>"prepared"===e.type?E.some(e.menu):E.none(),Nh=()=>{const e=Tr({}),t=Tr({}),o=Tr({}),n=Ql(),r=Tr({}),a=e=>s(e).bind(Mh),s=e=>ye(t.get(),e),i=t=>ye(e.get(),t);return{setMenuBuilt:(e,o)=>{t.set({...t.get(),[e]:{type:"prepared",menu:o}})},setContents:(a,s,i,l)=>{n.set(a),e.set(i),t.set(s),r.set(l);const c=((e,t)=>{const o={};le(e,((e,t)=>{F(e,(e=>{o[e]=t}))}));const n=t,r=de(t,((e,t)=>({k:e,v:t}))),a=ce(r,((e,t)=>[t].concat(Ah(o,n,r,t))));return ce(o,(e=>ye(a,e).getOr([e])))})(l,i);o.set(c)},expand:t=>ye(e.get(),t).map((e=>{const n=ye(o.get(),t).getOr([]);return[e].concat(n)})),refresh:e=>ye(o.get(),e),collapse:e=>ye(o.get(),e).bind((e=>e.length>1?E.some(e.slice(1)):E.none())),lookupMenu:s,lookupItem:i,otherMenus:e=>{const t=r.get();return X(se(t),e)},getPrimary:()=>n.get().bind(a),getMenus:()=>t.get(),clear:()=>{e.set({}),t.set({}),o.set({}),n.clear()},isClear:()=>n.get().isNone(),getTriggeringPath:(t,r)=>{const s=V(i(t).toArray(),(e=>a(e).isSome()));return ye(o.get(),t).bind((t=>{const o=Y(s.concat(t));return(e=>{const t=[];for(let o=0;o<e.length;o++){const n=e[o];if(!n.isSome())return E.none();t.push(n.getOrDie())}return E.some(t)})(G(o,((t,s)=>((t,o,n)=>a(t).bind((r=>(t=>he(e.get(),((e,o)=>e===t)))(t).bind((e=>o(e).map((e=>({triggeredMenu:r,triggeringItem:e,triggeringPath:n}))))))))(t,r,o.slice(0,s+1)).fold((()=>ke(n.get(),t)?[]:[E.none()]),(e=>[E.some(e)])))))}))}}},Rh=Mh,Dh=ls("tiered-menu-item-highlight"),Bh=ls("tiered-menu-item-dehighlight");var Lh;!function(e){e[e.HighlightMenuAndItem=0]="HighlightMenuAndItem",e[e.HighlightJustMenu=1]="HighlightJustMenu",e[e.HighlightNone=2]="HighlightNone"}(Lh||(Lh={}));const Ih=k("collapse-item"),Hh=pm({name:"TieredMenu",configFields:[Di("onExecute"),Di("onEscape"),Ri("onOpenMenu"),Ri("onOpenSubmenu"),Mi("onRepositionMenu"),Mi("onCollapseMenu"),vr("highlightOnOpen",Lh.HighlightMenuAndItem),lr("data",[or("primary"),or("menus"),or("expansions")]),vr("fakeFocus",!1),Mi("onHighlightItem"),Mi("onDehighlightItem"),Mi("onHover"),Ti(),or("dom"),vr("navigateOnHover",!0),vr("stayInDom",!1),gu("tmenuBehaviours",[Pp,Zm,vm,Gp]),vr("eventOrder",{})],apis:{collapseMenu:(e,t)=>{e.collapseMenu(t)},highlightPrimary:(e,t)=>{e.highlightPrimary(t)},repositionMenus:(e,t)=>{e.repositionMenus(t)}},factory:(e,t)=>{const o=Ql(),n=Nh(),r=e=>mu.getValue(e).value,a=t=>ce(e.data.menus,((e,t)=>G(e.items,(e=>"separator"===e.type?[]:[e.data.value])))),s=Zm.highlight,i=(t,o)=>{s(t,o),Zm.getHighlighted(o).orThunk((()=>Zm.getFirst(o))).each((n=>{e.fakeFocus?Zm.highlight(o,n):La(t,n.element,ma())}))},l=(e,t)=>we(P(t,(t=>e.lookupMenu(t).bind((e=>"prepared"===e.type?E.some(e.menu):E.none()))))),c=(t,o,n)=>{const r=l(o,o.otherMenus(n));F(r,(o=>{Us(o.element,[e.markers.backgroundMenu]),e.stayInDom||Gp.remove(t,o)}))},d=(t,n)=>{const a=(t=>o.get().getOrThunk((()=>{const n={},a=$c(t.element,`.${e.markers.item}`),s=V(a,(e=>"true"===St(e,"aria-haspopup")));return F(s,(e=>{t.getSystem().getByDom(e).each((e=>{const t=r(e);n[t]=e}))})),o.set(n),n})))(t);le(a,((e,t)=>{const o=B(n,t);xt(e.element,"aria-expanded",o)}))},u=(t,o,n)=>E.from(n[0]).bind((r=>o.lookupMenu(r).bind((r=>{if("notbuilt"===r.type)return E.none();{const a=r.menu,s=l(o,n.slice(1));return F(s,(t=>{Fs(t.element,e.markers.backgroundMenu)})),vt(a.element)||Gp.append(t,si(a)),Us(a.element,[e.markers.backgroundMenu]),i(t,a),c(t,o,n),E.some(a)}}))));let m;!function(e){e[e.HighlightSubmenu=0]="HighlightSubmenu",e[e.HighlightParent=1]="HighlightParent"}(m||(m={}));const g=(t,o,a=m.HighlightSubmenu)=>{if(o.hasConfigured(Rm)&&Rm.isDisabled(o))return E.some(o);{const s=r(o);return n.expand(s).bind((r=>(d(t,r),E.from(r[0]).bind((s=>n.lookupMenu(s).bind((i=>{const l=((e,t,o)=>{if("notbuilt"===o.type){const r=e.getSystem().build(o.nbMenu());return n.setMenuBuilt(t,r),r}return o.menu})(t,s,i);return vt(l.element)||Gp.append(t,si(l)),e.onOpenSubmenu(t,o,l,Y(r)),a===m.HighlightSubmenu?(Zm.highlightFirst(l),u(t,n,r)):(Zm.dehighlightAll(l),E.some(o))})))))))}},p=(t,o)=>{const a=r(o);return n.collapse(a).bind((r=>(d(t,r),u(t,n,r).map((n=>(e.onCollapseMenu(t,o,n),n))))))},h=t=>(o,n)=>hi(n.getSource(),`.${e.markers.item}`).bind((e=>o.getSystem().getByDom(e).toOptional().bind((e=>t(o,e).map(T))))),f=Pa([Va(Th(),((e,t)=>{const o=t.event.item;n.lookupItem(r(o)).each((()=>{const o=t.event.menu;Zm.highlight(e,o);const a=r(t.event.item);n.refresh(a).each((t=>c(e,n,t)))}))})),Qa(((t,o)=>{const n=o.event.target;t.getSystem().getByDom(n).each((o=>{0===r(o).indexOf("collapse-item")&&p(t,o),g(t,o,m.HighlightSubmenu).fold((()=>{e.onExecute(t,o)}),y)}))})),Ya(((t,o)=>{(t=>{const o=((t,o,n)=>ce(n,((n,r)=>{const a=()=>Eh.sketch({...n,value:r,markers:e.markers,fakeFocus:e.fakeFocus,onHighlight:(e,t)=>{Da(e,Dh,{menuComp:e,itemComp:t})},onDehighlight:(e,t)=>{Da(e,Bh,{menuComp:e,itemComp:t})},focusManager:e.fakeFocus?ug():dg()});return r===o?{type:"prepared",menu:t.getSystem().build(a())}:{type:"notbuilt",nbMenu:a}})))(t,e.data.primary,e.data.menus),r=a();return n.setContents(e.data.primary,o,e.data.expansions,r),n.getPrimary()})(t).each((o=>{Gp.append(t,si(o)),e.onOpenMenu(t,o),e.highlightOnOpen===Lh.HighlightMenuAndItem?i(t,o):e.highlightOnOpen===Lh.HighlightJustMenu&&s(t,o)}))})),Va(Dh,((t,o)=>{e.onHighlightItem(t,o.event.menuComp,o.event.itemComp)})),Va(Bh,((t,o)=>{e.onDehighlightItem(t,o.event.menuComp,o.event.itemComp)})),...e.navigateOnHover?[Va(fh(),((t,o)=>{const a=o.event.item;((e,t)=>{const o=r(t);n.refresh(o).bind((t=>(d(e,t),u(e,n,t))))})(t,a),g(t,a,m.HighlightParent),e.onHover(t,a)}))]:[]]),b=e=>Zm.getHighlighted(e).bind(Zm.getHighlighted),v={collapseMenu:e=>{b(e).each((t=>{p(e,t)}))},highlightPrimary:e=>{n.getPrimary().each((t=>{i(e,t)}))},repositionMenus:t=>{const o=n.getPrimary().bind((e=>b(t).bind((e=>{const t=r(e),o=fe(n.getMenus()),a=we(P(o,Rh));return n.getTriggeringPath(t,(e=>((e,t,o)=>ae(t,(e=>{if(!e.getSystem().isConnected())return E.none();const t=Zm.getCandidates(e);return q(t,(e=>r(e)===o))})))(0,a,e)))})).map((t=>({primary:e,triggeringPath:t})))));o.fold((()=>{(e=>E.from(e.components()[0]).filter((e=>"menu"===St(e.element,"role"))))(t).each((o=>{e.onRepositionMenu(t,o,[])}))}),(({primary:o,triggeringPath:n})=>{e.onRepositionMenu(t,o,n)}))}};return{uid:e.uid,dom:e.dom,markers:e.markers,behaviours:hu(e.tmenuBehaviours,[Pp.config({mode:"special",onRight:h(((e,t)=>fm(t.element)?E.none():g(e,t,m.HighlightSubmenu))),onLeft:h(((e,t)=>fm(t.element)?E.none():p(e,t))),onEscape:h(((t,o)=>p(t,o).orThunk((()=>e.onEscape(t,o).map((()=>t)))))),focusIn:(e,t)=>{n.getPrimary().each((t=>{La(e,t.element,ma())}))}}),Zm.config({highlightClass:e.markers.selectedMenu,itemClass:e.markers.menu}),vm.config({find:e=>Zm.getHighlighted(e)}),Gp.config({})]),eventOrder:e.eventOrder,apis:v,events:f}},extraApis:{tieredData:(e,t,o)=>({primary:e,menus:t,expansions:o}),singleData:(e,t)=>({primary:e,menus:Ar(e,t),expansions:{}}),collapseItem:e=>({value:ls(Ih()),meta:{text:e}})}}),Ph=pm({name:"InlineView",configFields:[or("lazySink"),Mi("onShow"),Mi("onHide"),fr("onEscape"),gu("inlineBehaviours",[Wd,mu,El]),br("fireDismissalEventInstead",[vr("event",Ca())]),br("fireRepositionEventInstead",[vr("event",Sa())]),vr("getRelated",E.none),vr("isExtraPart",O),vr("eventOrder",E.none)],factory:(e,t)=>{const o=(t,o,n,r)=>{const a=e.lazySink(t).getOrDie();Wd.openWhileCloaked(t,o,(()=>kd.positionWithinBounds(a,t,n,r()))),mu.setValue(t,E.some({mode:"position",config:n,getBounds:r}))},n=(t,o,n,r)=>{const a=((e,t,o,n,r)=>{const a=()=>e.lazySink(t),s="horizontal"===n.type?{layouts:{onLtr:()=>fl(),onRtl:()=>yl()}}:{},i=e=>(e=>2===e.length)(e)?s:{};return Hh.sketch({dom:{tag:"div"},data:n.data,markers:n.menu.markers,highlightOnOpen:n.menu.highlightOnOpen,fakeFocus:n.menu.fakeFocus,onEscape:()=>(Wd.close(t),e.onEscape.map((e=>e(t))),E.some(!0)),onExecute:()=>E.some(!0),onOpenMenu:(e,t)=>{kd.positionWithinBounds(a().getOrDie(),t,o,r())},onOpenSubmenu:(e,t,o,n)=>{const r=a().getOrDie();kd.position(r,o,{anchor:{type:"submenu",item:t,...i(n)}})},onRepositionMenu:(e,t,n)=>{const s=a().getOrDie();kd.positionWithinBounds(s,t,o,r()),F(n,(e=>{const t=i(e.triggeringPath);kd.position(s,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem,...t}})}))}})})(e,t,o,n,r);Wd.open(t,a),mu.setValue(t,E.some({mode:"menu",menu:a}))},r=t=>{Wd.isOpen(t)&&mu.getValue(t).each((o=>{switch(o.mode){case"menu":Wd.getState(t).each(Hh.repositionMenus);break;case"position":const n=e.lazySink(t).getOrDie();kd.positionWithinBounds(n,t,o.config,o.getBounds())}}))},a={setContent:(e,t)=>{Wd.setContent(e,t)},showAt:(e,t,n)=>{const r=E.none;o(e,t,n,r)},showWithinBounds:o,showMenuAt:(e,t,o)=>{n(e,t,o,E.none)},showMenuWithinBounds:n,hide:e=>{Wd.isOpen(e)&&(mu.setValue(e,E.none()),Wd.close(e))},getContent:e=>Wd.getState(e),reposition:r,isOpen:Wd.isOpen};return{uid:e.uid,dom:e.dom,behaviours:hu(e.inlineBehaviours,[Wd.config({isPartOf:(t,o,n)=>bi(o,n)||((t,o)=>e.getRelated(t).exists((e=>bi(e,o))))(t,n),getAttachPoint:t=>e.lazySink(t).getOrDie(),onOpen:t=>{e.onShow(t)},onClose:t=>{e.onHide(t)}}),mu.config({store:{mode:"memory",initialValue:E.none()}}),El.config({channels:{...Xd({isExtraPart:t.isExtraPart,...e.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...Qd({...e.fireRepositionEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({}),doReposition:r})}})]),eventOrder:e.eventOrder,apis:a}},apis:{showAt:(e,t,o,n)=>{e.showAt(t,o,n)},showWithinBounds:(e,t,o,n,r)=>{e.showWithinBounds(t,o,n,r)},showMenuAt:(e,t,o,n)=>{e.showMenuAt(t,o,n)},showMenuWithinBounds:(e,t,o,n,r)=>{e.showMenuWithinBounds(t,o,n,r)},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 Fh=tinymce.util.Tools.resolve("tinymce.util.Delay");const jh=pm({name:"Button",factory:e=>{const t=dh(e.action),o=e.dom.tag,n=t=>ye(e.dom,"attributes").bind((e=>ye(e,t)));return{uid:e.uid,dom:e.dom,components:e.components,events:t,behaviours:yu(e.buttonBehaviours,[eh.config({}),Pp.config({mode:"execution",useSpace:!0,useEnter:!0})]),domModification:{attributes:"button"===o?{type:n("type").getOr("button"),...n("role").map((e=>({role:e}))).getOr({})}:{role:e.role.getOr(n("role").getOr("button"))}},eventOrder:e.eventOrder}},configFields:[vr("uid",void 0),or("dom"),vr("components",[]),fu("buttonBehaviours",[eh,Pp]),ur("action"),ur("role"),vr("eventOrder",{})]}),Vh=e=>{const t=(e=>void 0!==e.uid)(e)&&ve(e,"uid")?e.uid:hs("memento");return{get:e=>e.getSystem().getByUid(t).getOrDie(),getOpt:e=>e.getSystem().getByUid(t).toOptional(),asSpec:()=>({...e,uid:t})}};var Zh=tinymce.util.Tools.resolve("tinymce.util.I18n");const Uh={indent:!0,outdent:!0,"table-insert-column-after":!0,"table-insert-column-before":!0,"paste-column-after":!0,"paste-column-before":!0,"unordered-list":!0,"list-bull-circle":!0,"list-bull-default":!0,"list-bull-square":!0},qh="temporary-placeholder",Wh=e=>()=>ye(e,qh).getOr("!not found!"),$h=(e,t)=>{const o=e.toLowerCase();if(Zh.isRtl()){const e=((e,t)=>Ee(e,t)?e:((e,t)=>e+t)(e,t))(o,"-rtl");return be(t,e)?e:o}return o},Gh=(e,t)=>ye(t,$h(e,t)),Kh=(e,t)=>{const o=t();return Gh(e,o).getOrThunk(Wh(o))},Yh=()=>Kp("add-focusable",[Ya((e=>{gi(e.element,"svg").each((e=>xt(e,"focusable","false")))}))]),Xh=(e,t,o,n)=>{var r,a;const s=(e=>!!Zh.isRtl()&&be(Uh,e))(t)?["tox-icon--flip"]:[],i=ye(o,$h(t,o)).or(n).getOrThunk(Wh(o));return{dom:{tag:e.tag,attributes:null!==(r=e.attributes)&&void 0!==r?r:{},classes:e.classes.concat(s),innerHtml:i},behaviours:xl([...null!==(a=e.behaviours)&&void 0!==a?a:[],Yh()])}},Jh=(e,t,o,n=E.none())=>Xh(t,e,o(),n),Qh={success:"checkmark",error:"warning",err:"error",warning:"warning",warn:"warning",info:"info"},ef=pm({name:"Notification",factory:e=>{const t=Vh({dom:{tag:"p",innerHtml:e.translationProvider(e.text)},behaviours:xl([Gp.config({})])}),o=e=>({dom:{tag:"div",classes:["tox-bar"],styles:{width:`${e}%`}}}),n=e=>({dom:{tag:"div",classes:["tox-text"],innerHtml:`${e}%`}}),r=Vh({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:xl([Gp.config({})])}),a={updateProgress:(e,t)=>{e.getSystem().isConnected()&&r.getOpt(e).each((e=>{Gp.set(e,[{dom:{tag:"div",classes:["tox-bar-container"]},components:[o(t)]},n(t)])}))},updateText:(e,o)=>{if(e.getSystem().isConnected()){const n=t.get(e);Gp.set(n,[ti(o)])}}},s=$([e.icon.toArray(),e.level.toArray(),e.level.bind((e=>E.from(Qh[e]))).toArray()]),i=Vh(jh.sketch({dom:{tag:"button",classes:["tox-notification__dismiss","tox-button","tox-button--naked","tox-button--icon"]},components:[Jh("close",{tag:"div",classes:["tox-icon"],attributes:{"aria-label":e.translationProvider("Close")}},e.iconProvider)],action:t=>{e.onAction(t)}})),l=((e,t,o)=>{const n=o(),r=q(e,(e=>be(n,$h(e,n))));return Xh({tag:"div",classes:["tox-notification__icon"]},r.getOr(qh),n,E.none())})(s,0,e.iconProvider),c=[l,{dom:{tag:"div",classes:["tox-notification__body"]},components:[t.asSpec()],behaviours:xl([Gp.config({})])}];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:xl([eh.config({}),Kp("notification-events",[Va(Gr(),(e=>{i.getOpt(e).each(eh.focus)}))])]),components:c.concat(e.progress?[r.asSpec()]:[]).concat(e.closeButton?[i.asSpec()]:[]),apis:a}},configFields:[ur("level"),or("progress"),ur("icon"),or("onAction"),or("text"),or("iconProvider"),or("translationProvider"),Cr("closeButton",!0)],apis:{updateProgress:(e,t,o)=>{e.updateProgress(t,o)},updateText:(e,t,o)=>{e.updateText(t,o)}}});var tf,of,nf=tinymce.util.Tools.resolve("tinymce.dom.DOMUtils"),rf=tinymce.util.Tools.resolve("tinymce.EditorManager"),af=tinymce.util.Tools.resolve("tinymce.Env");!function(e){e.default="wrap",e.floating="floating",e.sliding="sliding",e.scrolling="scrolling"}(tf||(tf={})),function(e){e.auto="auto",e.top="top",e.bottom="bottom"}(of||(of={}));const sf=e=>t=>t.options.get(e),lf=e=>t=>E.from(e(t)),cf=e=>{const t=af.deviceType.isPhone(),o=af.deviceType.isTablet()||t,n=e.options.register,r=e=>a(e)||!1===e,s=e=>a(e)||h(e);n("skin",{processor:e=>a(e)||!1===e,default:"oxide"}),n("skin_url",{processor:"string"}),n("height",{processor:s,default:Math.max(e.getElement().offsetHeight,400)}),n("width",{processor:s,default:nf.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:!1}),n("style_formats_autohide",{processor:"boolean",default:!1}),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("font_size_input_default_unit",{processor:"string",default:"pt"}),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=>a(e)||d(e),default:!t}),n("menu",{processor:"object",default:{}}),n("toolbar",{processor:e=>d(e)||a(e)||l(e)?{value:e,valid:!0}:{valid:!1,message:"Must be a boolean, string or array."},default:!0}),I(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:of.auto}),n("toolbar_persist",{processor:"boolean",default:!1}),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("ui_mode",{processor:"string",default:"combined"}),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:!0}),n("anchor_top",{processor:r,default:"#top"}),n("anchor_bottom",{processor:r,default:"#bottom"}),n("draggable_modal",{processor:"boolean",default:!1}),n("statusbar",{processor:"boolean",default:!0}),n("elementpath",{processor:"boolean",default:!0}),n("branding",{processor:"boolean",default:!0}),n("promotion",{processor:"boolean",default:!0}),n("resize",{processor:e=>"both"===e||d(e),default:!af.deviceType.isTouch()}),n("sidebar_show",{processor:"string"})},df=sf("readonly"),uf=sf("height"),mf=sf("width"),gf=lf(sf("min_width")),pf=lf(sf("min_height")),hf=lf(sf("max_width")),ff=lf(sf("max_height")),yf=lf(sf("style_formats")),bf=sf("style_formats_merge"),vf=sf("style_formats_autohide"),kf=sf("content_langs"),wf=sf("removed_menuitems"),_f=sf("toolbar_mode"),xf=sf("toolbar_groups"),Cf=sf("toolbar_location"),Sf=sf("fixed_toolbar_container"),zf=sf("fixed_toolbar_container_target"),Of=sf("toolbar_persist"),Tf=sf("toolbar_sticky_offset"),Ef=sf("menubar"),Af=sf("toolbar"),Mf=sf("file_picker_callback"),Nf=sf("file_picker_validator_handler"),Rf=sf("font_size_input_default_unit"),Df=sf("file_picker_types"),Bf=sf("typeahead_urls"),Lf=sf("anchor_top"),If=sf("anchor_bottom"),Hf=sf("draggable_modal"),Pf=sf("statusbar"),Ff=sf("elementpath"),jf=sf("branding"),Vf=sf("resize"),Zf=sf("paste_as_text"),Uf=sf("sidebar_show"),qf=sf("promotion"),Wf=e=>!1===e.options.get("skin"),$f=e=>!1!==e.options.get("menubar"),Gf=e=>{const t=e.options.get("skin_url");if(Wf(e))return t;if(t)return e.documentBaseURI.toAbsolute(t);{const t=e.options.get("skin");return rf.baseURL+"/skins/ui/"+t}},Kf=e=>e.options.get("line_height_formats").split(" "),Yf=e=>{const t=Af(e),o=a(t),n=l(t)&&t.length>0;return!Jf(e)&&(n||o||!0===t)},Xf=e=>{const t=I(9,(t=>e.options.get("toolbar"+(t+1)))),o=V(t,a);return Ce(o.length>0,o)},Jf=e=>Xf(e).fold((()=>{const t=Af(e);return f(t,a)&&t.length>0}),T),Qf=e=>Cf(e)===of.bottom,ey=e=>{var t;if(!e.inline)return E.none();const o=null!==(t=Sf(e))&&void 0!==t?t:"";if(o.length>0)return pi(kt(),o);const n=zf(e);return g(n)?E.some(Ie(n)):E.none()},ty=e=>e.inline&&ey(e).isSome(),oy=e=>ey(e).getOrThunk((()=>ft(ht(Ie(e.getElement()))))),ny=e=>e.inline&&!$f(e)&&!Yf(e)&&!Jf(e),ry=e=>(e.options.get("toolbar_sticky")||e.inline)&&!ty(e)&&!ny(e),ay=e=>!ty(e)&&"split"===e.options.get("ui_mode"),sy=e=>{const t=e.options.get("menu");return ce(t,(e=>({...e,items:e.items})))};var iy=Object.freeze({__proto__:null,get ToolbarMode(){return tf},get ToolbarLocation(){return of},register:cf,getSkinUrl:Gf,isReadOnly:df,isSkinDisabled:Wf,getHeightOption:uf,getWidthOption:mf,getMinWidthOption:gf,getMinHeightOption:pf,getMaxWidthOption:hf,getMaxHeightOption:ff,getUserStyleFormats:yf,shouldMergeStyleFormats:bf,shouldAutoHideStyleFormats:vf,getLineHeightFormats:Kf,getContentLanguages:kf,getRemovedMenuItems:wf,isMenubarEnabled:$f,isMultipleToolbars:Jf,isToolbarEnabled:Yf,isToolbarPersist:Of,getMultipleToolbarsOption:Xf,getUiContainer:oy,useFixedContainer:ty,isSplitUiMode:ay,getToolbarMode:_f,isDraggableModal:Hf,isDistractionFree:ny,isStickyToolbar:ry,getStickyToolbarOffset:Tf,getToolbarLocation:Cf,isToolbarLocationBottom:Qf,getToolbarGroups:xf,getMenus:sy,getMenubar:Ef,getToolbar:Af,getFilePickerCallback:Mf,getFilePickerTypes:Df,useTypeaheadUrls:Bf,getAnchorTop:Lf,getAnchorBottom:If,getFilePickerValidatorHandler:Nf,getFontSizeInputDefaultUnit:Rf,useStatusBar:Pf,useElementPath:Ff,promotionEnabled:qf,useBranding:jf,getResize:Vf,getPasteAsText:Zf,getSidebarShow:Uf});const ly="[data-mce-autocompleter]",cy=e=>hi(e,ly);var dy;!function(e){e[e.CLOSE_ON_EXECUTE=0]="CLOSE_ON_EXECUTE",e[e.BUBBLE_TO_SANDBOX=1]="BUBBLE_TO_SANDBOX"}(dy||(dy={}));var uy=dy;const my="tox-menu-nav__js",gy="tox-collection__item",py="tox-swatch",hy={normal:my,color:py},fy="tox-collection__item--enabled",yy="tox-collection__item-icon",by="tox-collection__item-label",vy="tox-collection__item-caret",ky="tox-collection__item--active",wy="tox-collection__item-container",_y="tox-collection__item-container--row",xy=e=>ye(hy,e).getOr(my),Cy=e=>"color"===e?"tox-swatches":"tox-menu",Sy=e=>({backgroundMenu:"tox-background-menu",selectedMenu:"tox-selected-menu",selectedItem:"tox-collection__item--active",hasIcons:"tox-menu--has-icons",menu:Cy(e),tieredMenu:"tox-tiered-menu"}),zy=e=>{const t=Sy(e);return{backgroundMenu:t.backgroundMenu,selectedMenu:t.selectedMenu,menu:t.menu,selectedItem:t.selectedItem,item:xy(e)}},Oy=(e,t,o)=>{const n=Sy(o);return{tag:"div",classes:$([[n.menu,`tox-menu-${t}-column`],e?[n.hasIcons]:[]])}},Ty=[Eh.parts.items({})],Ey=(e,t,o)=>{const n=Sy(o);return{dom:{tag:"div",classes:$([[n.tieredMenu]])},markers:zy(o)}},Ay=k([ur("data"),vr("inputAttributes",{}),vr("inputStyles",{}),vr("tag","input"),vr("inputClasses",[]),Mi("onSetValue"),vr("styles",{}),vr("eventOrder",{}),gu("inputBehaviours",[mu,eh]),vr("selectOnFocus",!0)]),My=e=>xl([eh.config({onFocus:e.selectOnFocus?e=>{const t=e.element,o=Ws(t);t.dom.setSelectionRange(0,o.length)}:y})]),Ny=e=>({...My(e),...hu(e.inputBehaviours,[mu.config({store:{mode:"manual",...e.data.map((e=>({initialValue:e}))).getOr({}),getValue:e=>Ws(e.element),setValue:(e,t)=>{Ws(e.element)!==t&&$s(e.element,t)}},onSetValue:e.onSetValue})])}),Ry=e=>({tag:e.tag,attributes:{type:"text",...e.inputAttributes},styles:e.inputStyles,classes:e.inputClasses}),Dy=pm({name:"Input",configFields:Ay(),factory:(e,t)=>({uid:e.uid,dom:Ry(e),components:[],behaviours:Ny(e),eventOrder:e.eventOrder})}),By=ls("refetch-trigger-event"),Ly=ls("redirect-menu-item-interaction"),Iy="tox-menu__searcher",Hy=e=>pi(e.element,`.${Iy}`).bind((t=>e.getSystem().getByDom(t).toOptional())),Py=Hy,Fy=e=>({fetchPattern:mu.getValue(e),selectionStart:e.element.dom.selectionStart,selectionEnd:e.element.dom.selectionEnd}),jy=e=>{const t=(e,t)=>(t.cut(),E.none()),o=(e,t)=>{const o={interactionEvent:t.event,eventType:t.event.raw.type};return Da(e,Ly,o),E.some(!0)},n="searcher-events";return{dom:{tag:"div",classes:[gy]},components:[Dy.sketch({inputClasses:[Iy,"tox-textfield"],inputAttributes:{...e.placeholder.map((t=>({placeholder:e.i18n(t)}))).getOr({}),type:"search","aria-autocomplete":"list"},inputBehaviours:xl([Kp(n,[Va(Jr(),(e=>{Ra(e,By)})),Va(Yr(),((e,t)=>{"Escape"===t.event.raw.key&&t.stop()}))]),Pp.config({mode:"special",onLeft:t,onRight:t,onSpace:t,onEnter:o,onEscape:o,onUp:o,onDown:o})]),eventOrder:{keydown:[n,Pp.name()]}})]}},Vy="tox-collection--results__js",Zy=e=>{var t;return e.dom?{...e,dom:{...e.dom,attributes:{...null!==(t=e.dom.attributes)&&void 0!==t?t:{},id:ls("aria-item-search-result-id"),"aria-selected":"false"}}}:e},Uy=(e,t)=>o=>{const n=H(o,t);return P(n,(t=>({dom:e,components:t})))},qy=(e,t)=>{const o=[];let n=[];return F(e,((e,r)=>{t(e,r)?(n.length>0&&o.push(n),n=[],(be(e.dom,"innerHtml")||e.components&&e.components.length>0)&&n.push(e)):n.push(e)})),n.length>0&&o.push(n),P(o,(e=>({dom:{tag:"div",classes:["tox-collection__group"]},components:e})))},Wy=(e,t,o)=>Eh.parts.items({preprocess:n=>{const r=P(n,o);return"auto"!==e&&e>1?Uy({tag:"div",classes:["tox-collection__group"]},e)(r):qy(r,((e,o)=>"separator"===t[o].type))}}),$y=(e,t,o=!0)=>({dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[Wy(e,t,w)]}),Gy=e=>L(e,(e=>"icon"in e&&void 0!==e.icon)),Ky=e=>(console.error(Yn(e)),console.log(e),E.none()),Yy=(e,t,o,n,r)=>{const a=(s=o,{dom:{tag:"div",classes:["tox-collection","tox-collection--horizontal"]},components:[Eh.parts.items({preprocess:e=>qy(e,((e,t)=>"separator"===s[t].type))})]});var s;return{value:e,dom:a.dom,components:a.components,items:o}},Xy=(e,t,o,n,r)=>{if("color"===r.menuType){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-swatches-menu"]},components:[{dom:{tag:"div",classes:["tox-swatches"]},components:[Eh.parts.items({preprocess:"auto"!==e?Uy({tag:"div",classes:["tox-swatches__row"]},e):w})]}]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType&&"auto"===n){const t=$y(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if("normal"===r.menuType||"searchable"===r.menuType){const t="searchable"!==r.menuType?$y(n,o):"search-with-field"===r.searchMode.searchMode?((e,t,o)=>{const n=ls("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection"].concat(1===e?["tox-collection--list"]:["tox-collection--grid"])},components:[jy({i18n:Zh.translate,placeholder:o.placeholder}),{dom:{tag:"div",classes:[...1===e?["tox-collection--list"]:["tox-collection--grid"],Vy],attributes:{id:n}},components:[Wy(e,t,Zy)]}]}})(n,o,r.searchMode):((e,t,o=!0)=>{const n=ls("aria-controls-search-results");return{dom:{tag:"div",classes:["tox-menu","tox-collection",Vy].concat(1===e?["tox-collection--list"]:["tox-collection--grid"]),attributes:{id:n}},components:[Wy(e,t,Zy)]}})(n,o);return{value:e,dom:t.dom,components:t.components,items:o}}if("listpreview"===r.menuType&&"auto"!==n){const t=(e=>({dom:{tag:"div",classes:["tox-menu","tox-collection","tox-collection--toolbar","tox-collection--toolbar-lg"]},components:[Eh.parts.items({preprocess:Uy({tag:"div",classes:["tox-collection__group"]},e)})]}))(n);return{value:e,dom:t.dom,components:t.components,items:o}}return{value:e,dom:Oy(t,n,r.menuType),components:Ty,items:o}},Jy=ar("type"),Qy=ar("name"),eb=ar("label"),tb=ar("text"),ob=ar("title"),nb=ar("icon"),rb=ar("value"),ab=ir("fetch"),sb=ir("getSubmenuItems"),ib=ir("onAction"),lb=ir("onItemAction"),cb=Sr("onSetup",(()=>y)),db=pr("name"),ub=pr("text"),mb=pr("icon"),gb=pr("tooltip"),pb=pr("label"),hb=pr("shortcut"),fb=fr("select"),yb=Cr("active",!1),bb=Cr("borderless",!1),vb=Cr("enabled",!0),kb=Cr("primary",!1),wb=e=>vr("columns",e),_b=vr("meta",{}),xb=Sr("onAction",y),Cb=e=>_r("type",e),Sb=e=>Qn("name","name",bn((()=>ls(`${e}-name`))),Pn),zb=Mn([Jy,ub]),Ob=Mn([Cb("autocompleteitem"),yb,vb,_b,rb,ub,mb]),Tb=[vb,gb,mb,ub,cb],Eb=Mn([Jy,ib].concat(Tb)),Ab=e=>$n("toolbarbutton",Eb,e),Mb=[yb].concat(Tb),Nb=Mn(Mb.concat([Jy,ib])),Rb=e=>$n("ToggleButton",Nb,e),Db=[Sr("predicate",O),xr("scope","node",["node","editor"]),xr("position","selection",["node","selection","line"])],Bb=Tb.concat([Cb("contextformbutton"),kb,ib,er("original",w)]),Lb=Mb.concat([Cb("contextformbutton"),kb,ib,er("original",w)]),Ib=Tb.concat([Cb("contextformbutton")]),Hb=Mb.concat([Cb("contextformtogglebutton")]),Pb=Xn("type",{contextformbutton:Bb,contextformtogglebutton:Lb}),Fb=Mn([Cb("contextform"),Sr("initValue",k("")),pb,dr("commands",Pb),mr("launch",Xn("type",{contextformbutton:Ib,contextformtogglebutton:Hb}))].concat(Db)),jb=Mn([Cb("contexttoolbar"),ar("items")].concat(Db)),Vb=[Jy,ar("src"),pr("alt"),zr("classes",[],Pn)],Zb=Mn(Vb),Ub=[Jy,tb,db,zr("classes",["tox-collection__item-label"],Pn)],qb=Mn(Ub),Wb=Tn((()=>Un("type",{cardimage:Zb,cardtext:qb,cardcontainer:$b}))),$b=Mn([Jy,_r("direction","horizontal"),_r("align","left"),_r("valign","middle"),dr("items",Wb)]),Gb=[vb,ub,hb,("menuitem",Qn("value","value",bn((()=>ls("menuitem-value"))),Ln())),_b];const Kb=Mn([Jy,pb,dr("items",Wb),cb,xb].concat(Gb)),Yb=Mn([Jy,yb,mb].concat(Gb)),Xb=[Jy,ar("fancytype"),xb],Jb=[vr("initData",{})].concat(Xb),Qb=[fr("select"),Or("initData",{},[Cr("allowCustomColors",!0),_r("storageKey","default"),yr("colors",Ln())])].concat(Xb),ev=Xn("fancytype",{inserttable:Jb,colorswatch:Qb}),tv=Mn([Jy,cb,xb,mb].concat(Gb)),ov=Mn([Jy,sb,cb,mb].concat(Gb)),nv=Mn([Jy,mb,yb,cb,ib].concat(Gb)),rv=(e,t,o)=>{const n=$c(e.element,"."+o);if(n.length>0){const e=W(n,(e=>{const o=e.dom.getBoundingClientRect().top,r=n[0].dom.getBoundingClientRect().top;return Math.abs(o-r)>t})).getOr(n.length);return E.some({numColumns:e,numRows:Math.ceil(n.length/e)})}return E.none()},av=e=>((e,t)=>xl([Kp(e,t)]))(ls("unnamed-events"),e),sv=ls("tooltip.exclusive"),iv=ls("tooltip.show"),lv=ls("tooltip.hide"),cv=(e,t,o)=>{e.getSystem().broadcastOn([sv],{})};var dv=Object.freeze({__proto__:null,hideAllExclusive:cv,setComponents:(e,t,o,n)=>{o.getTooltip().each((e=>{e.getSystem().isConnected()&&Gp.set(e,n)}))}}),uv=Object.freeze({__proto__:null,events:(e,t)=>{const o=o=>{t.getTooltip().each((n=>{Ad(n),e.onHide(o,n),t.clearTooltip()})),t.clearTimer()};return Pa($([[Va(iv,(o=>{t.resetTimer((()=>{(o=>{if(!t.isShowing()){cv(o);const n=e.lazySink(o).getOrDie(),r=o.getSystem().build({dom:e.tooltipDom,components:e.tooltipComponents,events:Pa("normal"===e.mode?[Va($r(),(e=>{Ra(o,iv)})),Va(qr(),(e=>{Ra(o,lv)}))]:[]),behaviours:xl([Gp.config({})])});t.setTooltip(r),Od(n,r),e.onShow(o,r),kd.position(n,r,{anchor:e.anchor(o)})}})(o)}),e.delay)})),Va(lv,(n=>{t.resetTimer((()=>{o(n)}),e.delay)})),Va(da(),((e,t)=>{const n=t;n.universal||B(n.channels,sv)&&o(e)})),Xa((e=>{o(e)}))],"normal"===e.mode?[Va(Gr(),(e=>{Ra(e,iv)})),Va(la(),(e=>{Ra(e,lv)})),Va($r(),(e=>{Ra(e,iv)})),Va(qr(),(e=>{Ra(e,lv)}))]:[Va(Ma(),((e,t)=>{Ra(e,iv)})),Va(Na(),(e=>{Ra(e,lv)}))]]))}}),mv=[or("lazySink"),or("tooltipDom"),vr("exclusive",!0),vr("tooltipComponents",[]),vr("delay",300),xr("mode","normal",["normal","follow-highlight"]),vr("anchor",(e=>({type:"hotspot",hotspot:e,layouts:{onLtr:k([cl,ll,rl,sl,al,il]),onRtl:k([cl,ll,rl,sl,al,il])}}))),Mi("onHide"),Mi("onShow")],gv=Object.freeze({__proto__:null,init:()=>{const e=Ql(),t=Ql(),o=()=>{e.on(clearTimeout)},n=k("not-implemented");return zs({getTooltip:t.get,isShowing:t.isSet,setTooltip:t.set,clearTooltip:t.clear,clearTimer:o,resetTimer:(t,n)=>{o(),e.set(setTimeout(t,n))},readState:n})}});const pv=Sl({fields:mv,name:"tooltipping",active:uv,state:gv,apis:dv}),hv="silver.readonly",fv=Mn([("readonly",nr("readonly",Fn))]);const yv=(e,t)=>{const o=e.mainUi.outerContainer.element,n=[e.mainUi.mothership,...e.uiMotherships];t&&F(n,(e=>{e.broadcastOn([$d()],{target:o})})),F(n,(e=>{e.broadcastOn([hv],{readonly:t})}))},bv=(e,t)=>{e.on("init",(()=>{e.mode.isReadOnly()&&yv(t,!0)})),e.on("SwitchMode",(()=>yv(t,e.mode.isReadOnly()))),df(e)&&e.mode.set("readonly")},vv=()=>El.config({channels:{[hv]:{schema:fv,onReceive:(e,t)=>{Rm.set(e,t.readonly)}}}}),kv=e=>Rm.config({disabled:e}),wv=e=>Rm.config({disabled:e,disableClass:"tox-tbtn--disabled"}),_v=e=>Rm.config({disabled:e,disableClass:"tox-tbtn--disabled",useNative:!1}),xv=(e,t)=>{const o=e.getApi(t);return e=>{e(o)}},Cv=(e,t)=>Ya((o=>{xv(e,o)((o=>{const n=e.onSetup(o);p(n)&&t.set(n)}))})),Sv=(e,t)=>Xa((o=>xv(e,o)(t.get()))),zv=(e,t)=>Qa(((o,n)=>{xv(e,o)(e.onAction),e.triggersSubmenu||t!==uy.CLOSE_ON_EXECUTE||(o.getSystem().isConnected()&&Ra(o,ha()),n.stop())})),Ov={[ua()]:["disabling","alloy.base.behaviour","toggling","item-events"]},Tv=we,Ev=(e,t,o,n)=>{const r=Tr(y);return{type:"item",dom:t.dom,components:Tv(t.optComponents),data:e.data,eventOrder:Ov,hasSubmenu:e.triggersSubmenu,itemBehaviours:xl([Kp("item-events",[zv(e,o),Cv(e,r),Sv(e,r)]),(a=()=>!e.enabled||n.isDisabled(),Rm.config({disabled:a,disableClass:"tox-collection__item--state-disabled"})),vv(),Gp.config({})].concat(e.itemBehaviours))};var a},Av=e=>({value:e.value,meta:{text:e.text.getOr(""),...e.meta}}),Mv=e=>{const t=af.os.isMacOS()||af.os.isiOS(),o=t?{alt:"⌥",ctrl:"⌃",shift:"⇧",meta:"⌘",access:"⌃⌥"}:{meta:"Ctrl",access:"Shift+Alt"},n=e.split("+"),r=P(n,(e=>{const t=e.toLowerCase().trim();return be(o,t)?o[t]:e}));return t?r.join(""):r.join("+")},Nv=(e,t,o=[yy])=>Jh(e,{tag:"div",classes:o},t),Rv=e=>({dom:{tag:"div",classes:[by]},components:[ti(Zh.translate(e))]}),Dv=(e,t)=>({dom:{tag:"div",classes:t,innerHtml:e}}),Bv=(e,t)=>({dom:{tag:"div",classes:[by]},components:[{dom:{tag:e.tag,styles:e.styles},components:[ti(Zh.translate(t))]}]}),Lv=e=>({dom:{tag:"div",classes:["tox-collection__item-accessory"]},components:[ti(Mv(e))]}),Iv=e=>Nv("checkmark",e,["tox-collection__item-checkmark"]),Hv=e=>{const t=e.map((e=>({attributes:{title:Zh.translate(e)}}))).getOr({});return{tag:"div",classes:[my,gy],...t}},Pv=(e,t,o,n=E.none())=>"color"===e.presets?((e,t,o)=>{const n=e.ariaLabel,r=e.value,a=e.iconContent.map((e=>((e,t,o)=>{const n=t();return Gh(e,n).or(o).getOrThunk(Wh(n))})(e,t.icons,o)));return{dom:(()=>{const e=py,o=a.getOr(""),s=n.map((e=>({title:t.translate(e)}))).getOr({}),i={tag:"div",attributes:s,classes:[e]};return"custom"===r?{...i,tag:"button",classes:[...i.classes,"tox-swatches__picker-btn"],innerHtml:o}:"remove"===r?{...i,classes:[...i.classes,"tox-swatch--remove"],innerHtml:o}:g(r)?{...i,attributes:{...i.attributes,"data-mce-color":r},styles:{"background-color":r},innerHtml:o}:i})(),optComponents:[]}})(e,t,n):((e,t,o,n)=>{const r={tag:"div",classes:[yy]},a=o?e.iconContent.map((e=>Jh(e,r,t.icons,n))).orThunk((()=>E.some({dom:r}))):E.none(),s=e.checkMark,i=E.from(e.meta).fold((()=>Rv),(e=>be(e,"style")?x(Bv,e.style):Rv)),l=e.htmlContent.fold((()=>e.textContent.map(i)),(e=>E.some(Dv(e,[by]))));return{dom:Hv(e.ariaLabel),optComponents:[a,l,e.shortcutContent.map(Lv),s,e.caret]}})(e,t,o,n),Fv=(e,t)=>ye(e,"tooltipWorker").map((e=>[pv.config({lazySink:t.getSink,tooltipDom:{tag:"div",classes:["tox-tooltip-worker-container"]},tooltipComponents:[],anchor:e=>({type:"submenu",item:e,overrides:{maxHeightFunction:cc}}),mode:"follow-highlight",onShow:(t,o)=>{e((e=>{pv.setComponents(t,[oi({element:Ie(e)})])}))}})])).getOr([]),jv=(e,t)=>{const o=(e=>nf.DOM.encode(e))(Zh.translate(e));if(t.length>0){const e=new RegExp((e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"))(t),"gi");return o.replace(e,(e=>`<span class="tox-autocompleter-highlight">${e}</span>`))}return o},Vv=(e,t)=>P(e,(e=>{switch(e.type){case"cardcontainer":return((e,t)=>{const o="vertical"===e.direction?"tox-collection__item-container--column":_y,n="left"===e.align?"tox-collection__item-container--align-left":"tox-collection__item-container--align-right";return{dom:{tag:"div",classes:[wy,o,n,(()=>{switch(e.valign){case"top":return"tox-collection__item-container--valign-top";case"middle":return"tox-collection__item-container--valign-middle";case"bottom":return"tox-collection__item-container--valign-bottom"}})()]},components:t}})(e,Vv(e.items,t));case"cardimage":return((e,t,o)=>({dom:{tag:"img",classes:t,attributes:{src:e,alt:o.getOr("")}}}))(e.src,e.classes,e.alt);case"cardtext":const o=e.name.exists((e=>B(t.cardText.highlightOn,e))),n=o?E.from(t.cardText.matchText).getOr(""):"";return Dv(jv(e.text,n),e.classes)}})),Zv=$u(_h(),xh()),Uv=e=>({value:Gv(e)}),qv=/^#?([a-f\d])([a-f\d])([a-f\d])$/i,Wv=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,$v=e=>qv.test(e)||Wv.test(e),Gv=e=>ze(e,"#").toUpperCase(),Kv=e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Yv=e=>{const t=Kv(e.red)+Kv(e.green)+Kv(e.blue);return Uv(t)},Xv=Math.min,Jv=Math.max,Qv=Math.round,ek=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,tk=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,ok=(e,t,o,n)=>({red:e,green:t,blue:o,alpha:n}),nk=e=>{const t=parseInt(e,10);return t.toString()===e&&t>=0&&t<=255},rk=e=>{let t,o,n;const r=(e.hue||0)%360;let a=e.saturation/100,s=e.value/100;if(a=Jv(0,Xv(a,1)),s=Jv(0,Xv(s,1)),0===a)return t=o=n=Qv(255*s),ok(t,o,n,1);const i=r/60,l=s*a,c=l*(1-Math.abs(i%2-1)),d=s-l;switch(Math.floor(i)){case 0:t=l,o=c,n=0;break;case 1:t=c,o=l,n=0;break;case 2:t=0,o=l,n=c;break;case 3:t=0,o=c,n=l;break;case 4:t=c,o=0,n=l;break;case 5:t=l,o=0,n=c;break;default:t=o=n=0}return t=Qv(255*(t+d)),o=Qv(255*(o+d)),n=Qv(255*(n+d)),ok(t,o,n,1)},ak=e=>{const t=(e=>{const t=(e=>{const t=e.value.replace(qv,((e,t,o,n)=>t+t+o+o+n+n));return{value:t}})(e),o=Wv.exec(t.value);return null===o?["FFFFFF","FF","FF","FF"]:o})(e),o=parseInt(t[1],16),n=parseInt(t[2],16),r=parseInt(t[3],16);return ok(o,n,r,1)},sk=(e,t,o,n)=>{const r=parseInt(e,10),a=parseInt(t,10),s=parseInt(o,10),i=parseFloat(n);return ok(r,a,s,i)},ik=e=>{if("transparent"===e)return E.some(ok(0,0,0,0));const t=ek.exec(e);if(null!==t)return E.some(sk(t[1],t[2],t[3],"1"));const o=tk.exec(e);return null!==o?E.some(sk(o[1],o[2],o[3],o[4])):E.none()},lk=e=>`rgba(${e.red},${e.green},${e.blue},${e.alpha})`,ck=ok(255,0,0,1),dk=(e,t)=>{e.dispatch("ResizeContent",t)},uk=(e,t)=>{e.dispatch("TextColorChange",t)},mk=(e,t)=>e.dispatch("ResolveName",{name:t.nodeName.toLowerCase(),target:t});var gk=tinymce.util.Tools.resolve("tinymce.util.LocalStorage");const pk={},hk=e=>ye(pk,e).getOrThunk((()=>{const t=`tinymce-custom-colors-${e}`,o=gk.getItem(t);if(m(o)){const e=gk.getItem("tinymce-custom-colors");gk.setItem(t,g(e)?e:"[]")}const n=((e,t=10)=>{const o=gk.getItem(e),n=a(o)?JSON.parse(o):[],r=t-(s=n).length<0?s.slice(0,t):s;var s;const i=e=>{r.splice(e,1)};return{add:o=>{D(r,o).each(i),r.unshift(o),r.length>t&&r.pop(),gk.setItem(e,JSON.stringify(r))},state:()=>r.slice(0)}})(t,10);return pk[e]=n,n})),fk=(e,t)=>{hk(e).add(t)},yk=(e,t,o)=>({hue:e,saturation:t,value:o}),bk=e=>{let t=0,o=0,n=0;const r=e.red/255,a=e.green/255,s=e.blue/255,i=Math.min(r,Math.min(a,s)),l=Math.max(r,Math.max(a,s));return i===l?(n=i,yk(0,0,100*n)):(t=r===i?3:s===i?1:5,t=60*(t-(r===i?a-s:s===i?r-a:s-r)/(l-i)),o=(l-i)/l,n=l,yk(Math.round(t),Math.round(100*o),Math.round(100*n)))},vk=e=>Yv(rk(e)),kk=e=>{return(t=e,$v(t)?E.some({value:Gv(t)}):E.none()).orThunk((()=>ik(e).map(Yv))).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,r=n[0],a=n[1],s=n[2],i=n[3];return Yv(ok(r,a,s,i))}));var t},wk="forecolor",_k="hilitecolor",xk=e=>Math.max(5,Math.ceil(Math.sqrt(e))),Ck=(e,t)=>{const o=xk(t),n=zk("color_cols")(e);return 5===o?n:o},Sk=e=>{const t=[];for(let o=0;o<e.length;o+=2)t.push({text:e[o+1],value:"#"+kk(e[o]).value,icon:"checkmark",type:"choiceitem"});return t},zk=e=>t=>t.options.get(e),Ok="#000000",Tk=(e,t)=>{const o=((e,t)=>t===wk?zk("color_cols_foreground")(e):t===_k?zk("color_cols_background")(e):zk("color_cols")(e))(e,t);return o>0?o:5},Ek=zk("custom_colors"),Ak=(e,t)=>t===wk&&e.options.isSet("color_map_foreground")?zk("color_map_foreground")(e):t===_k&&e.options.isSet("color_map_background")?zk("color_map_background")(e):zk("color_map")(e),Mk=zk("color_default_foreground"),Nk=zk("color_default_background"),Rk=(e,t)=>{const o=Ie(e.selection.getStart()),n="hilitecolor"===t?Dr(o,(e=>{if(qe(e)){const t=Dt(e,"background-color");return Ce(ik(t).exists((e=>0!==e.alpha)),t)}return E.none()})).getOr("rgba(0, 0, 0, 0)"):Dt(o,"color");return ik(n).map((e=>"#"+Yv(e).value))},Dk=e=>{const t="choiceitem",o={type:t,text:"Remove color",icon:"color-swatch-remove-color",value:"remove"};return e?[o,{type:t,text:"Custom color",icon:"color-picker",value:"custom"}]:[o]},Bk=(e,t,o,n)=>{"custom"===o?Vk(e)((o=>{o.each((o=>{fk(t,o),e.execCommand("mceApplyTextcolor",t,o),n(o)}))}),Rk(e,t).getOr(Ok)):"remove"===o?(n(""),e.execCommand("mceRemoveTextcolor",t)):(n(o),e.execCommand("mceApplyTextcolor",t,o))},Lk=(e,t,o)=>e.concat((e=>P(hk(e).state(),(e=>({type:"choiceitem",text:e,icon:"checkmark",value:e}))))(t).concat(Dk(o))),Ik=(e,t,o)=>n=>{n(Lk(e,t,o))},Hk=(e,t,o)=>{const n="forecolor"===t?"tox-icon-text-color__color":"tox-icon-highlight-bg-color__color";e.setIconFill(n,o)},Pk=(e,t)=>o=>{const n=Rk(e,t);return ke(n,o.toUpperCase())},Fk=(e,t,o,n,r)=>{e.ui.registry.addSplitButton(t,{tooltip:n,presets:"color",icon:"forecolor"===t?"text-color":"highlight-bg-color",select:Pk(e,o),columns:Tk(e,o),fetch:Ik(Ak(e,o),o,Ek(e)),onAction:t=>{Bk(e,o,r.get(),y)},onItemAction:(n,a)=>{Bk(e,o,a,(o=>{r.set(o),uk(e,{name:t,color:o})}))},onSetup:o=>{Hk(o,t,r.get());const n=e=>{e.name===t&&Hk(o,e.name,e.color)};return e.on("TextColorChange",n),()=>{e.off("TextColorChange",n)}}})},jk=(e,t,o,n,r)=>{e.ui.registry.addNestedMenuItem(t,{text:n,icon:"forecolor"===t?"text-color":"highlight-bg-color",onSetup:e=>(Hk(e,t,r.get()),y),getSubmenuItems:()=>[{type:"fancymenuitem",fancytype:"colorswatch",select:Pk(e,o),initData:{storageKey:o},onAction:n=>{Bk(e,o,n.value,(o=>{r.set(o),uk(e,{name:t,color:o})}))}}]})},Vk=e=>(t,o)=>{let n=!1;const r={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:!0}],initialData:r,onAction:(e,t)=>{"hex-valid"===t.name&&(n=t.value)},onSubmit:o=>{const r=o.getData().colorpicker;n?(t(E.from(r)),o.close()):e.windowManager.alert(e.translate(["Invalid hex color code: {0}",r]))},onClose:y,onCancel:()=>{t(E.none())}})},Zk=(e,t,o,n,r,a,s,i)=>{const l=Gy(t),c=Uk(t,o,n,"color"!==r?"normal":"color",a,s,i);return Xy(e,l,c,n,{menuType:r})},Uk=(e,t,o,n,r,a,s)=>we(P(e,(i=>{return"choiceitem"===i.type?(l=i,$n("choicemenuitem",Yb,l)).fold(Ky,(i=>E.some(((e,t,o,n,r,a,s,i=!0)=>{const l=Pv({presets:o,textContent:t?e.text:E.none(),htmlContent:E.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:t?e.shortcut:E.none(),checkMark:t?E.some(Iv(s.icons)):E.none(),caret:E.none(),value:e.value},s,i);return fn(Ev({data:Av(e),enabled:e.enabled,getApi:e=>({setActive:t=>{lh.set(e,t)},isActive:()=>lh.isOn(e),isEnabled:()=>!Rm.isDisabled(e),setEnabled:t=>Rm.set(e,!t)}),onAction:t=>n(e.value),onSetup:e=>(e.setActive(r),y),triggersSubmenu:!1,itemBehaviours:[]},l,a,s),{toggling:{toggleClass:fy,toggleOnExecute:!1,selected:e.active,exclusive:!0}})})(i,1===o,n,t,a(i.value),r,s,Gy(e))))):E.none();var l}))),qk=(e,t)=>{const o=zy(t);return 1===e?{mode:"menu",moveOnTab:!0}:"auto"===e?{mode:"grid",selector:"."+o.item,initSize:{numColumns:1,numRows:1}}:{mode:"matrix",rowSelector:"."+("color"===t?"tox-swatches__row":"tox-collection__group"),previousSelector:e=>"color"===t?pi(e.element,"[aria-checked=true]"):E.none()}},Wk=ls("cell-over"),$k=ls("cell-execute"),Gk=(e,t,o)=>{const n=o=>Da(o,$k,{row:e,col:t}),r=(e,t)=>{t.stop(),n(e)};return ai({dom:{tag:"div",attributes:{role:"button","aria-labelledby":o}},behaviours:xl([Kp("insert-table-picker-cell",[Va($r(),eh.focus),Va(ua(),n),Va(ea(),r),Va(ga(),r)]),lh.config({toggleClass:"tox-insert-table-picker__selected",toggleOnExecute:!1}),eh.config({onFocus:o=>Da(o,Wk,{row:e,col:t})})])})},Kk=e=>G(e,(e=>P(e,si))),Yk=(e,t)=>ti(`${t}x${e}`),Xk={inserttable:e=>{const t=ls("size-label"),o=((e,t,o)=>{const n=[];for(let t=0;t<10;t++){const o=[];for(let n=0;n<10;n++)o.push(Gk(t,n,e));n.push(o)}return n})(t),n=Yk(0,0),r=Vh({dom:{tag:"span",classes:["tox-insert-table-picker__label"],attributes:{id:t}},components:[n],behaviours:xl([Gp.config({})])});return{type:"widget",data:{value:ls("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Zv.widget({dom:{tag:"div",classes:["tox-insert-table-picker"]},components:Kk(o).concat(r.asSpec()),behaviours:xl([Kp("insert-table-picker",[Ya((e=>{Gp.set(r.get(e),[n])})),Wa(Wk,((e,t,n)=>{const{row:a,col:s}=n.event;((e,t,o,n,r)=>{for(let n=0;n<10;n++)for(let r=0;r<10;r++)lh.set(e[n][r],n<=t&&r<=o)})(o,a,s),Gp.set(r.get(e),[Yk(a+1,s+1)])})),Wa($k,((t,o,n)=>{const{row:r,col:a}=n.event;e.onAction({numRows:r+1,numColumns:a+1}),Ra(t,ha())}))]),Pp.config({initSize:{numRows:10,numColumns:10},mode:"flatgrid",selector:'[role="button"]'})])})]}},colorswatch:(e,t)=>{const o=((e,t)=>{const o=e.initData.allowCustomColors&&t.colorinput.hasCustomColors();return e.initData.colors.fold((()=>Lk(t.colorinput.getColors(e.initData.storageKey),e.initData.storageKey,o)),(e=>e.concat(Dk(o))))})(e,t),n=t.colorinput.getColorCols(e.initData.storageKey),r="color",a={...Zk(ls("menu-value"),o,(t=>{e.onAction({value:t})}),n,r,uy.CLOSE_ON_EXECUTE,e.select.getOr(O),t.shared.providers),markers:zy(r),movement:qk(n,r)};return{type:"widget",data:{value:ls("widget-id")},dom:{tag:"div",classes:["tox-fancymenuitem"]},autofocus:!0,components:[Zv.widget(Eh.sketch(a))]}}},Jk=e=>({type:"separator",dom:{tag:"div",classes:[gy,"tox-collection__group-heading"]},components:e.text.map(ti).toArray()});var Qk=Object.freeze({__proto__:null,getCoupled:(e,t,o,n)=>o.getOrCreate(e,t,n),getExistingCoupled:(e,t,o,n)=>o.getExisting(e,t,n)}),ew=[nr("others",Wn(rn.value,Ln()))],tw=Object.freeze({__proto__:null,init:()=>{const e={},t=(t,o)=>{if(0===se(t.others).length)throw new Error("Cannot find any known coupled components");return ye(e,o)},o=k({});return zs({readState:o,getExisting:(e,o,n)=>t(o,n).orThunk((()=>(ye(o.others,n).getOrDie("No information found for coupled component: "+n),E.none()))),getOrCreate:(o,n,r)=>t(n,r).getOrThunk((()=>{const t=ye(n.others,r).getOrDie("No information found for coupled component: "+r)(o),a=o.getSystem().build(t);return e[r]=a,a}))})}});const ow=Sl({fields:ew,name:"coupling",apis:Qk,state:tw}),nw=e=>{let t=E.none(),o=[];const n=e=>{r()?a(e):o.push(e)},r=()=>t.isSome(),a=e=>{t.each((t=>{setTimeout((()=>{e(t)}),0)}))};return e((e=>{r()||(t=E.some(e),F(o,a),o=[])})),{get:n,map:e=>nw((t=>{n((o=>{t(e(o))}))})),isReady:r}},rw={nu:nw,pure:e=>nw((t=>{t(e)}))},aw=e=>{setTimeout((()=>{throw e}),0)},sw=e=>{const t=t=>{e().then(t,aw)};return{map:t=>sw((()=>e().then(t))),bind:t=>sw((()=>e().then((e=>t(e).toPromise())))),anonBind:t=>sw((()=>e().then((()=>t.toPromise())))),toLazy:()=>rw.nu(t),toCached:()=>{let t=null;return sw((()=>(null===t&&(t=e()),t)))},toPromise:e,get:t}},iw=e=>sw((()=>new Promise(e))),lw=e=>sw((()=>Promise.resolve(e))),cw=k("sink"),dw=k(Vu({name:cw(),overrides:k({dom:{tag:"div"},behaviours:xl([kd.config({useFixed:T})]),events:Pa([$a(Yr()),$a(Zr()),$a(ea())])})})),uw=(e,t)=>{const o=e.getHotspot(t).getOr(t),n="hotspot",r=e.getAnchorOverrides();return e.layouts.fold((()=>({type:n,hotspot:o,overrides:r})),(e=>({type:n,hotspot:o,overrides:r,layouts:e})))},mw=(e,t,o,n,r,a,s)=>{const i=((e,t,o,n,r,a,s)=>{const i=((e,t,o)=>(0,e.fetch)(o).map(t))(e,t,n),l=hw(n,e);return i.map((e=>e.bind((e=>E.from(Hh.sketch({...a.menu(),uid:hs(""),data:e,highlightOnOpen:s,onOpenMenu:(e,t)=>{const n=l().getOrDie();kd.position(n,t,{anchor:o}),Wd.decloak(r)},onOpenSubmenu:(e,t,o)=>{const n=l().getOrDie();kd.position(n,o,{anchor:{type:"submenu",item:t}}),Wd.decloak(r)},onRepositionMenu:(e,t,n)=>{const r=l().getOrDie();kd.position(r,t,{anchor:o}),F(n,(e=>{kd.position(r,e.triggeredMenu,{anchor:{type:"submenu",item:e.triggeringItem}})}))},onEscape:()=>(eh.focus(n),Wd.close(r),E.some(!0))}))))))})(e,t,uw(e,o),o,n,r,s);return i.map((e=>(e.fold((()=>{Wd.isOpen(n)&&Wd.close(n)}),(e=>{Wd.cloak(n),Wd.open(n,e),a(n)})),n)))},gw=(e,t,o,n,r,a,s)=>(Wd.close(n),lw(n)),pw=(e,t,o,n,r,a)=>{const s=ow.getCoupled(o,"sandbox");return(Wd.isOpen(s)?gw:mw)(e,t,o,s,n,r,a)},hw=(e,t)=>e.getSystem().getByUid(t.uid+"-"+cw()).map((e=>()=>rn.value(e))).getOrThunk((()=>t.lazySink.fold((()=>()=>rn.error(new Error("No internal sink is specified, nor could an external sink be found"))),(t=>()=>t(e))))),fw=e=>{Wd.getState(e).each((e=>{Hh.repositionMenus(e)}))},yw=(e,t,o)=>{const n=yi(),r=hw(t,e);return{dom:{tag:"div",classes:e.sandboxClasses,attributes:{id:n.id,role:"listbox"}},behaviours:yu(e.sandboxBehaviours,[mu.config({store:{mode:"memory",initialValue:t}}),Wd.config({onOpen:(r,a)=>{const s=uw(e,t);n.link(t.element),e.matchWidth&&((e,t,o)=>{const n=vm.getCurrent(t).getOr(t),r=Xt(e.element);o?Mt(n.element,"min-width",r+"px"):((e,t)=>{Yt.set(e,t)})(n.element,r)})(s.hotspot,a,e.useMinWidth),e.onOpen(s,r,a),void 0!==o&&void 0!==o.onOpen&&o.onOpen(r,a)},onClose:(e,r)=>{n.unlink(t.element),void 0!==o&&void 0!==o.onClose&&o.onClose(e,r)},isPartOf:(e,o,n)=>bi(o,n)||bi(t,n),getAttachPoint:()=>r().getOrDie()}),vm.config({find:e=>Wd.getState(e).bind((e=>vm.getCurrent(e)))}),El.config({channels:{...Xd({isExtraPart:O}),...Qd({doReposition:fw})}})])}},bw=e=>{const t=ow.getCoupled(e,"sandbox");fw(t)},vw=()=>[vr("sandboxClasses",[]),fu("sandboxBehaviours",[vm,El,Wd,mu])],kw=k([or("dom"),or("fetch"),Mi("onOpen"),Ni("onExecute"),vr("getHotspot",E.some),vr("getAnchorOverrides",k({})),wc(),gu("dropdownBehaviours",[lh,ow,Pp,eh]),or("toggleClass"),vr("eventOrder",{}),ur("lazySink"),vr("matchWidth",!1),vr("useMinWidth",!1),ur("role")].concat(vw())),ww=k([ju({schema:[Ti(),vr("fakeFocus",!1)],name:"menu",defaults:e=>({onExecute:e.onExecute})}),dw()]),_w=hm({name:"Dropdown",configFields:kw(),partFields:ww(),factory:(e,t,o,n)=>{const r=e=>{Wd.getState(e).each((e=>{Hh.highlightPrimary(e)}))},a=(t,o,r)=>pw(e,w,t,n,o,r),s={expand:e=>{lh.isOn(e)||a(e,y,Lh.HighlightNone).get(y)},open:e=>{lh.isOn(e)||a(e,y,Lh.HighlightMenuAndItem).get(y)},refetch:t=>ow.getExistingCoupled(t,"sandbox").fold((()=>a(t,y,Lh.HighlightMenuAndItem).map(y)),(o=>mw(e,w,t,o,n,y,Lh.HighlightMenuAndItem).map(y))),isOpen:lh.isOn,close:e=>{lh.isOn(e)&&a(e,y,Lh.HighlightMenuAndItem).get(y)},repositionMenus:e=>{lh.isOn(e)&&bw(e)}},i=(e,t)=>(Ba(e),E.some(!0));return{uid:e.uid,dom:e.dom,components:t,behaviours:hu(e.dropdownBehaviours,[lh.config({toggleClass:e.toggleClass,aria:{mode:"expanded"}}),ow.config({others:{sandbox:t=>yw(e,t,{onOpen:()=>lh.on(t),onClose:()=>lh.off(t)})}}),Pp.config({mode:"special",onSpace:i,onEnter:i,onDown:(e,t)=>{if(_w.isOpen(e)){const t=ow.getCoupled(e,"sandbox");r(t)}else _w.open(e);return E.some(!0)},onEscape:(e,t)=>_w.isOpen(e)?(_w.close(e),E.some(!0)):E.none()}),eh.config({})]),events:dh(E.some((e=>{a(e,r,Lh.HighlightMenuAndItem).get(y)}))),eventOrder:{...e.eventOrder,[ua()]:["disabling","toggling","alloy.base.behaviour"]},apis:s,domModification:{attributes:{"aria-haspopup":"true",...e.role.fold((()=>({})),(e=>({role:e}))),..."button"===e.dom.tag?{type:("type",ye(e.dom,"attributes").bind((e=>ye(e,"type")))).getOr("button")}:{}}}}},apis:{open:(e,t)=>e.open(t),refetch:(e,t)=>e.refetch(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)}}),xw=(e,t,o)=>{Py(e).each((e=>{var n;((e,t)=>{zt(t.element,"id").each((t=>xt(e.element,"aria-activedescendant",t)))})(e,o),(Vs((n=t).element,Vy)?E.some(n.element):pi(n.element,"."+Vy)).each((t=>{zt(t,"id").each((t=>xt(e.element,"aria-controls",t)))}))})),xt(o.element,"aria-selected","true")},Cw=(e,t,o)=>{xt(o.element,"aria-selected","false")},Sw=e=>ow.getExistingCoupled(e,"sandbox").bind(Hy).map(Fy).map((e=>e.fetchPattern)).getOr("");var zw;!function(e){e[e.ContentFocus=0]="ContentFocus",e[e.UiFocus=1]="UiFocus"}(zw||(zw={}));const Ow=(e,t,o,n,r)=>{const a=o.shared.providers,s=e=>r?{...e,shortcut:E.none(),icon:e.text.isSome()?E.none():e.icon}:e;switch(e.type){case"menuitem":return(i=e,$n("menuitem",tv,i)).fold(Ky,(e=>E.some(((e,t,o,n=!0)=>{const r=Pv({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:E.none(),ariaLabel:e.text,caret:E.none(),checkMark:E.none(),shortcutContent:e.shortcut},o,n);return Ev({data:Av(e),getApi:e=>({isEnabled:()=>!Rm.isDisabled(e),setEnabled:t=>Rm.set(e,!t)}),enabled:e.enabled,onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t,o)})(s(e),t,a,n))));case"nestedmenuitem":return(e=>$n("nestedmenuitem",ov,e))(e).fold(Ky,(e=>E.some(((e,t,o,n=!0,r=!1)=>{const a=r?(s=o.icons,Nv("chevron-down",s,[vy])):(e=>Nv("chevron-right",e,[vy]))(o.icons);var s;const i=Pv({presets:"normal",iconContent:e.icon,textContent:e.text,htmlContent:E.none(),ariaLabel:e.text,caret:E.some(a),checkMark:E.none(),shortcutContent:e.shortcut},o,n);return Ev({data:Av(e),getApi:e=>({isEnabled:()=>!Rm.isDisabled(e),setEnabled:t=>Rm.set(e,!t),setIconFill:(t,o)=>{pi(e.element,`svg path[id="${t}"], rect[id="${t}"]`).each((e=>{xt(e,"fill",o)}))}}),enabled:e.enabled,onAction:y,onSetup:e.onSetup,triggersSubmenu:!0,itemBehaviours:[]},i,t,o)})(s(e),t,a,n,r))));case"togglemenuitem":return(e=>$n("togglemenuitem",nv,e))(e).fold(Ky,(e=>E.some(((e,t,o,n=!0)=>{const r=Pv({iconContent:e.icon,textContent:e.text,htmlContent:E.none(),ariaLabel:e.text,checkMark:E.some(Iv(o.icons)),caret:E.none(),shortcutContent:e.shortcut,presets:"normal",meta:e.meta},o,n);return fn(Ev({data:Av(e),enabled:e.enabled,getApi:e=>({setActive:t=>{lh.set(e,t)},isActive:()=>lh.isOn(e),isEnabled:()=>!Rm.isDisabled(e),setEnabled:t=>Rm.set(e,!t)}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:[]},r,t,o),{toggling:{toggleClass:fy,toggleOnExecute:!1,selected:e.active}})})(s(e),t,a,n))));case"separator":return(e=>$n("separatormenuitem",zb,e))(e).fold(Ky,(e=>E.some(Jk(e))));case"fancymenuitem":return(e=>$n("fancymenuitem",ev,e))(e).fold(Ky,(e=>((e,t)=>ye(Xk,e.fancytype).map((o=>o(e,t))))(e,o)));default:return console.error("Unknown item in general menu",e),E.none()}var i},Tw=(e,t,o,n,r,a,s)=>{const i=1===n,l=!i||Gy(e);return we(P(e,(e=>{switch(e.type){case"separator":return(n=e,$n("Autocompleter.Separator",zb,n)).fold(Ky,(e=>E.some(Jk(e))));case"cardmenuitem":return(e=>$n("cardmenuitem",Kb,e))(e).fold(Ky,(e=>E.some(((e,t,o,n)=>{const r={dom:Hv(e.label),optComponents:[E.some({dom:{tag:"div",classes:[wy,_y]},components:Vv(e.items,n)})]};return Ev({data:Av({text:E.none(),...e}),enabled:e.enabled,getApi:e=>({isEnabled:()=>!Rm.isDisabled(e),setEnabled:t=>{Rm.set(e,!t),F($c(e.element,"*"),(o=>{e.getSystem().getByDom(o).each((e=>{e.hasConfigured(Rm)&&Rm.set(e,!t)}))}))}}),onAction:e.onAction,onSetup:e.onSetup,triggersSubmenu:!1,itemBehaviours:E.from(n.itemBehaviours).getOr([])},r,t,o.providers)})({...e,onAction:t=>{e.onAction(t),o(e.value,e.meta)}},r,a,{itemBehaviours:Fv(e.meta,a),cardText:{matchText:t,highlightOn:s}}))));default:return(e=>$n("Autocompleter.Item",Ob,e))(e).fold(Ky,(e=>E.some(((e,t,o,n,r,a,s,i=!0)=>{const l=Pv({presets:n,textContent:E.none(),htmlContent:o?e.text.map((e=>jv(e,t))):E.none(),ariaLabel:e.text,iconContent:e.icon,shortcutContent:E.none(),checkMark:E.none(),caret:E.none(),value:e.value},s.providers,i,e.icon);return Ev({data:Av(e),enabled:e.enabled,getApi:k({}),onAction:t=>r(e.value,e.meta),onSetup:k(y),triggersSubmenu:!1,itemBehaviours:Fv(e.meta,s)},l,a,s.providers)})(e,t,i,"normal",o,r,a,l))))}var n})))},Ew=(e,t,o,n,r,a)=>{const s=Gy(t),i=we(P(t,(e=>{const t=e=>Ow(e,o,n,(e=>r?!be(e,"text"):s)(e),r);return"nestedmenuitem"===e.type&&e.getSubmenuItems().length<=0?t({...e,enabled:!1}):t(e)}))),l=(e=>"no-search"===e.searchMode?{menuType:"normal"}:{menuType:"searchable",searchMode:e})(a);return(r?Yy:Xy)(e,s,i,1,l)},Aw=e=>Hh.singleData(e.value,e),Mw=(e,t)=>{const o=Tr(!1),n=Tr(!1),r=ai(Ph.sketch({dom:{tag:"div",classes:["tox-autocompleter"]},components:[],fireDismissalEventInstead:{},inlineBehaviours:xl([Kp("dismissAutocompleter",[Va(Ca(),(()=>c()))])]),lazySink:t.getSink})),a=()=>Ph.isOpen(r),s=n.get,i=()=>{a()&&Ph.hide(r)},l=()=>Ph.getContent(r).bind((e=>te(e.components(),0))),c=()=>e.execCommand("mceAutocompleterClose"),d=n=>{const a=(n=>{const r=ae(n,(e=>E.from(e.columns))).getOr(1);return G(n,(n=>{const a=n.items;return Tw(a,n.matchText,((t,r)=>{const a=e.selection.getRng();((e,t)=>cy(Ie(t.startContainer)).map((t=>{const o=e.createRng();return o.selectNode(t.dom),o})))(e.dom,a).each((a=>{const s={hide:()=>c(),reload:t=>{i(),e.execCommand("mceAutocompleterReload",!1,{fetchOptions:t})}};o.set(!0),n.onAction(s,a,t,r),o.set(!1)}))}),r,uy.BUBBLE_TO_SANDBOX,t,n.highlightOn)}))})(n);a.length>0?((t,o)=>{var n;(n=Ie(e.getBody()),pi(n,ly)).each((n=>{const a=ae(t,(e=>E.from(e.columns))).getOr(1);Ph.showMenuAt(r,{anchor:{type:"node",root:Ie(e.getBody()),node:E.from(n)}},((e,t,o,n)=>{const r=qk(t,n),a=zy(n);return{data:Aw({...e,movement:r,menuBehaviours:av("auto"!==t?[]:[Ya(((e,t)=>{rv(e,4,a.item).each((({numColumns:t,numRows:o})=>{Pp.setGridSize(e,o,t)}))}))])}),menu:{markers:zy(n),fakeFocus:o===zw.ContentFocus}}})(Xy("autocompleter-value",!0,o,a,{menuType:"normal"}),a,zw.ContentFocus,"normal"))})),l().each(Zm.highlightFirst)})(n,a):i()};e.on("AutocompleterStart",(({lookupData:e})=>{n.set(!0),o.set(!1),d(e)})),e.on("AutocompleterUpdate",(({lookupData:e})=>d(e))),e.on("AutocompleterEnd",(()=>{i(),n.set(!1),o.set(!1)}));((e,t)=>{const o=(e,t)=>{Da(e,Yr(),{raw:t})},n=()=>e.getMenu().bind(Zm.getHighlighted);t.on("keydown",(t=>{const r=t.which;e.isActive()&&(e.isMenuOpen()?13===r?(n().each(Ba),t.preventDefault()):40===r?(n().fold((()=>{e.getMenu().each(Zm.highlightFirst)}),(e=>{o(e,t)})),t.preventDefault(),t.stopImmediatePropagation()):37!==r&&38!==r&&39!==r||n().each((e=>{o(e,t),t.preventDefault(),t.stopImmediatePropagation()})):13!==r&&38!==r&&40!==r||e.cancelIfNecessary())})),t.on("NodeChange",(t=>{e.isActive()&&!e.isProcessingAction()&&cy(Ie(t.element)).isNone()&&e.cancelIfNecessary()}))})({cancelIfNecessary:c,isMenuOpen:a,isActive:s,isProcessingAction:o.get,getMenu:l},e)},Nw=["visible","hidden"],Rw=e=>{if(Ue(e)){const t=Dt(e,"overflow");return Ae(t).length>0&&!B(Nw,t)}return!1},Dw=(e,t)=>ay(e)?(e=>{const t=(o=Rw,V(((e,t)=>{const o=p(t)?t:O;let n=e.dom;const r=[];for(;null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=Ie(e);if(r.push(t),!0===o(t))break;n=e}return r})(e,n),o));var o,n;return oe(t).map((e=>({element:e,others:t.slice(1)})))})(t):E.none(),Bw=e=>{const t=[...P(e.others,Xo),en()];return((e,t)=>U(t,((e,t)=>Qo(e,t)),e))(Xo(e.element),t)},Lw=(e,t,o)=>hi(e,t,o).isSome(),Iw=(e,t)=>{let o=null;return{cancel:()=>{null!==o&&(clearTimeout(o),o=null)},schedule:(...n)=>{o=setTimeout((()=>{e.apply(null,n),o=null}),t)}}},Hw=e=>{const t=e.raw;return void 0===t.touches||1!==t.touches.length?E.none():E.some(t.touches[0])},Pw=(e,t)=>{const o={stopBackspace:!0,...t},n=(e=>{const t=Ql(),o=Tr(!1),n=Iw((t=>{e.triggerEvent(pa(),t),o.set(!0)}),400),r=Mr([{key:Pr(),value:e=>(Hw(e).each((r=>{n.cancel();const a={x:r.clientX,y:r.clientY,target:e.target};n.schedule(e),o.set(!1),t.set(a)})),E.none())},{key:Fr(),value:e=>(n.cancel(),Hw(e).each((e=>{t.on((o=>{((e,t)=>{const o=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y);return o>5||n>5})(e,o)&&t.clear()}))})),E.none())},{key:jr(),value:r=>(n.cancel(),t.get().filter((e=>Je(e.target,r.target))).map((t=>o.get()?(r.prevent(),!1):e.triggerEvent(ga(),r))))}]);return{fireIfReady:(e,t)=>ye(r,t).bind((t=>t(e)))}})(o),r=P(["touchstart","touchmove","touchend","touchcancel","gesturestart","mousedown","mouseup","mouseover","mousemove","mouseout","click"].concat(["selectstart","input","contextmenu","change","transitionend","transitioncancel","drag","dragstart","dragend","dragenter","dragleave","dragover","drop","keyup"]),(t=>tc(e,t,(e=>{n.fireIfReady(e,t).each((t=>{t&&e.kill()})),o.triggerEvent(t,e)&&e.kill()})))),a=Ql(),s=tc(e,"paste",(e=>{n.fireIfReady(e,"paste").each((t=>{t&&e.kill()})),o.triggerEvent("paste",e)&&e.kill(),a.set(setTimeout((()=>{o.triggerEvent(ca(),e)}),0))})),i=tc(e,"keydown",(e=>{o.triggerEvent("keydown",e)?e.kill():o.stopBackspace&&(e=>e.raw.which===Um[0]&&!B(["input","textarea"],Ve(e.target))&&!Lw(e.target,'[contenteditable="true"]'))(e)&&e.prevent()})),l=tc(e,"focusin",(e=>{o.triggerEvent("focusin",e)&&e.kill()})),c=Ql(),d=tc(e,"focusout",(e=>{o.triggerEvent("focusout",e)&&e.kill(),c.set(setTimeout((()=>{o.triggerEvent(la(),e)}),0))}));return{unbind:()=>{F(r,(e=>{e.unbind()})),i.unbind(),l.unbind(),d.unbind(),s.unbind(),a.on(clearTimeout),c.on(clearTimeout)}}},Fw=(e,t)=>{const o=ye(e,"target").getOr(t);return Tr(o)},jw=Er([{stopped:[]},{resume:["element"]},{complete:[]}]),Vw=(e,t,o,n,r,a)=>{const s=e(t,n),i=((e,t)=>{const o=Tr(!1),n=Tr(!1);return{stop:()=>{o.set(!0)},cut:()=>{n.set(!0)},isStopped:o.get,isCut:n.get,event:e,setSource:t.set,getSource:t.get}})(o,r);return s.fold((()=>(a.logEventNoHandlers(t,n),jw.complete())),(e=>{const o=e.descHandler;return Es(o)(i),i.isStopped()?(a.logEventStopped(t,e.element,o.purpose),jw.stopped()):i.isCut()?(a.logEventCut(t,e.element,o.purpose),jw.complete()):rt(e.element).fold((()=>(a.logNoParent(t,e.element,o.purpose),jw.complete())),(n=>(a.logEventResponse(t,e.element,o.purpose),jw.resume(n))))}))},Zw=(e,t,o,n,r,a)=>Vw(e,t,o,n,r,a).fold(T,(n=>Zw(e,t,o,n,r,a)),O),Uw=(e,t,o,n,r)=>{const a=Fw(o,n);return Zw(e,t,o,n,a,r)},qw=()=>{const e=(()=>{const e={};return{registerId:(t,o,n)=>{le(n,((n,r)=>{const a=void 0!==e[r]?e[r]:{};a[o]=((e,t)=>({cHandler:x.apply(void 0,[e.handler].concat(t)),purpose:e.purpose}))(n,t),e[r]=a}))},unregisterId:t=>{le(e,((e,o)=>{be(e,t)&&delete e[t]}))},filterByType:t=>ye(e,t).map((e=>pe(e,((e,t)=>((e,t)=>({id:e,descHandler:t}))(t,e))))).getOr([]),find:(t,o,n)=>ye(e,o).bind((e=>Dr(n,(t=>((e,t)=>ps(t).bind((t=>ye(e,t))).map((e=>((e,t)=>({element:e,descHandler:t}))(t,e))))(e,t)),t)))}})(),t={},o=o=>{ps(o.element).each((o=>{delete t[o],e.unregisterId(o)}))};return{find:(t,o,n)=>e.find(t,o,n),filter:t=>e.filterByType(t),register:n=>{const r=(e=>{const t=e.element;return ps(t).getOrThunk((()=>((e,t)=>{const o=ls(us+"uid-");return gs(t,o),o})(0,e.element)))})(n);ve(t,r)&&((e,n)=>{const r=t[n];if(r!==e)throw new Error('The tagId "'+n+'" is already used by: '+ns(r.element)+"\nCannot use it for: "+ns(e.element)+"\nThe conflicting element is"+(vt(r.element)?" ":" not ")+"already in the DOM");o(e)})(n,r);const a=[n];e.registerId(a,r,n.events),t[r]=n},unregister:o,getById:e=>ye(t,e)}},Ww=pm({name:"Container",factory:e=>{const{attributes:t,...o}=e.dom;return{uid:e.uid,dom:{tag:"div",attributes:{role:"presentation",...t},...o},components:e.components,behaviours:pu(e.containerBehaviours),events:e.events,domModification:e.domModification,eventOrder:e.eventOrder}},configFields:[vr("components",[]),gu("containerBehaviours",[]),vr("events",{}),vr("domModification",{}),vr("eventOrder",{})]}),$w=e=>{const t=t=>rt(e.element).fold(T,(e=>Je(t,e))),o=qw(),n=(e,n)=>o.find(t,e,n),r=Pw(e.element,{triggerEvent:(e,t)=>_i(e,t.target,(o=>((e,t,o,n)=>Uw(e,t,o,o.target,n))(n,e,t,o)))}),a={debugInfo:k("real"),triggerEvent:(e,t,o)=>{_i(e,t,(r=>Uw(n,e,o,t,r)))},triggerFocus:(e,t)=>{ps(e).fold((()=>{Ml(e)}),(o=>{_i(ia(),e,(o=>(((e,t,o,n,r)=>{const a=Fw(o,n);Vw(e,t,o,n,a,r)})(n,ia(),{originator:t,kill:y,prevent:y,target:e},e,o),!1)))}))},triggerEscape:(e,t)=>{a.triggerEvent("keydown",e.element,t.event)},getByUid:e=>p(e),getByDom:e=>h(e),build:ai,buildOrPatch:ri,addToGui:e=>{l(e)},removeFromGui:e=>{c(e)},addToWorld:e=>{s(e)},removeFromWorld:e=>{i(e)},broadcast:e=>{u(e)},broadcastOn:(e,t)=>{m(e,t)},broadcastEvent:(e,t)=>{g(e,t)},isConnected:T},s=e=>{e.connect(a),We(e.element)||(o.register(e),F(e.components(),s),a.triggerEvent(ya(),e.element,{target:e.element}))},i=e=>{We(e.element)||(F(e.components(),i),o.unregister(e)),e.disconnect()},l=t=>{Od(e,t)},c=e=>{Ad(e)},d=e=>{const t=o.filter(da());F(t,(t=>{const o=t.descHandler;Es(o)(e)}))},u=e=>{d({universal:!0,data:e})},m=(e,t)=>{d({universal:!1,channels:e,data:t})},g=(e,t)=>((e,t,o)=>{const n=(e=>{const t=Tr(!1);return{stop:()=>{t.set(!0)},cut:y,isStopped:t.get,isCut:O,event:e,setSource:S("Cannot set source of a broadcasted event"),getSource:S("Cannot get source of a broadcasted event")}})(t);return F(e,(e=>{const t=e.descHandler;Es(t)(n)})),n.isStopped()})(o.filter(e),t),p=e=>o.getById(e).fold((()=>rn.error(new Error('Could not find component with uid: "'+e+'" in system.'))),rn.value),h=e=>{const t=ps(e).getOr("not found");return p(t)};return s(e),{root:e,element:e.element,destroy:()=>{r.unbind(),jo(e.element)},add:l,remove:c,getByUid:p,getByDom:h,addToWorld:s,removeFromWorld:i,broadcast:u,broadcastOn:m,broadcastEvent:g}},Gw=k([vr("prefix","form-field"),gu("fieldBehaviours",[vm,mu])]),Kw=k([Vu({schema:[or("dom")],name:"label"}),Vu({factory:{sketch:e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[or("text")],name:"aria-descriptor"}),Fu({factory:{sketch:e=>{const t=((e,t)=>{const o={};return le(e,((e,n)=>{B(t,n)||(o[n]=e)})),o})(e,["factory"]);return e.factory.sketch(t)}},schema:[or("factory")],name:"field"})]),Yw=hm({name:"FormField",configFields:Gw(),partFields:Kw(),factory:(e,t,o,n)=>{const r=hu(e.fieldBehaviours,[vm.config({find:t=>em(t,e,"field")}),mu.config({store:{mode:"manual",getValue:e=>vm.getCurrent(e).bind(mu.getValue),setValue:(e,t)=>{vm.getCurrent(e).each((e=>{mu.setValue(e,t)}))}}})]),a=Pa([Ya(((t,o)=>{const n=om(t,e,["label","field","aria-descriptor"]);n.field().each((t=>{const o=ls(e.prefix);n.label().each((e=>{xt(e.element,"for",o),xt(t.element,"id",o)})),n["aria-descriptor"]().each((o=>{const n=ls(e.prefix);xt(o.element,"id",n),xt(t.element,"aria-describedby",n)}))}))}))]),s={getField:t=>em(t,e,"field"),getLabel:t=>em(t,e,"label")};return{uid:e.uid,dom:e.dom,components:t,behaviours:r,events:a,apis:s}},apis:{getField:(e,t)=>e.getField(t),getLabel:(e,t)=>e.getLabel(t)}});var Xw=Object.freeze({__proto__:null,exhibit:(e,t)=>Ts({attributes:Mr([{key:t.tabAttr,value:"true"}])})}),Jw=[vr("tabAttr","data-alloy-tabstop")];const Qw=Sl({fields:Jw,name:"tabstopping",active:Xw});var e_=tinymce.util.Tools.resolve("tinymce.html.Entities");const t_=(e,t,o,n)=>{const r=o_(e,t,o,n);return Yw.sketch(r)},o_=(e,t,o,n)=>({dom:n_(o),components:e.toArray().concat([t]),fieldBehaviours:xl(n)}),n_=e=>({tag:"div",classes:["tox-form__group"].concat(e)}),r_=(e,t)=>Yw.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[ti(t.translate(e))]}),a_=ls("form-component-change"),s_=ls("form-close"),i_=ls("form-cancel"),l_=ls("form-action"),c_=ls("form-submit"),d_=ls("form-block"),u_=ls("form-unblock"),m_=ls("form-tabchange"),g_=ls("form-resize"),p_=["input","textarea"],h_=e=>{const t=Ve(e);return B(p_,t)},f_=(e,t)=>{const o=t.getRoot(e).getOr(e.element);js(o,t.invalidClass),t.notify.each((t=>{h_(e.element)&&xt(e.element,"aria-invalid",!1),t.getContainer(e).each((e=>{ts(e,t.validHtml)})),t.onValid(e)}))},y_=(e,t,o,n)=>{const r=t.getRoot(e).getOr(e.element);Fs(r,t.invalidClass),t.notify.each((t=>{h_(e.element)&&xt(e.element,"aria-invalid",!0),t.getContainer(e).each((e=>{ts(e,n)})),t.onInvalid(e,n)}))},b_=(e,t,o)=>t.validator.fold((()=>lw(rn.value(!0))),(t=>t.validate(e))),v_=(e,t,o)=>(t.notify.each((t=>{t.onValidate(e)})),b_(e,t).map((o=>e.getSystem().isConnected()?o.fold((o=>(y_(e,t,0,o),rn.error(o))),(o=>(f_(e,t),rn.value(o)))):rn.error("No longer in system"))));var k_=Object.freeze({__proto__:null,markValid:f_,markInvalid:y_,query:b_,run:v_,isInvalid:(e,t)=>{const o=t.getRoot(e).getOr(e.element);return Vs(o,t.invalidClass)}}),w_=Object.freeze({__proto__:null,events:(e,t)=>e.validator.map((t=>Pa([Va(t.onEvent,(t=>{v_(t,e).get(w)}))].concat(t.validateOnLoad?[Ya((t=>{v_(t,e).get(y)}))]:[])))).getOr({})}),__=[or("invalidClass"),vr("getRoot",E.none),br("notify",[vr("aria","alert"),vr("getContainer",E.none),vr("validHtml",""),Mi("onValid"),Mi("onInvalid"),Mi("onValidate")]),br("validator",[or("validate"),vr("onEvent","input"),vr("validateOnLoad",!0)])];const x_=Sl({fields:__,name:"invalidating",active:w_,apis:k_,extra:{validation:e=>t=>{const o=mu.getValue(t);return lw(e(o))}}}),C_=Sl({fields:[],name:"unselecting",active:Object.freeze({__proto__:null,events:()=>Pa([Fa(ra(),T)]),exhibit:()=>Ts({styles:{"-webkit-user-select":"none","user-select":"none","-ms-user-select":"none","-moz-user-select":"-moz-none"},attributes:{unselectable:"on"}})})}),S_=ls("color-input-change"),z_=ls("color-swatch-change"),O_=ls("color-picker-cancel"),T_=Vu({schema:[or("dom")],name:"label"}),E_=e=>Vu({name:e+"-edge",overrides:t=>t.model.manager.edgeActions[e].fold((()=>({})),(e=>({events:Pa([Za(Pr(),((t,o,n)=>e(t,n)),[t]),Za(Zr(),((t,o,n)=>e(t,n)),[t]),Za(Ur(),((t,o,n)=>{n.mouseIsDown.get()&&e(t,n)}),[t])])})))}),A_=E_("top-left"),M_=E_("top"),N_=E_("top-right"),R_=E_("right"),D_=E_("bottom-right"),B_=E_("bottom"),L_=E_("bottom-left");var I_=[T_,E_("left"),R_,M_,B_,A_,N_,L_,D_,Fu({name:"thumb",defaults:k({dom:{styles:{position:"absolute"}}}),overrides:e=>({events:Pa([qa(Pr(),e,"spectrum"),qa(Fr(),e,"spectrum"),qa(jr(),e,"spectrum"),qa(Zr(),e,"spectrum"),qa(Ur(),e,"spectrum"),qa(Wr(),e,"spectrum")])})}),Fu({schema:[er("mouseIsDown",(()=>Tr(!1)))],name:"spectrum",overrides:e=>{const t=e.model.manager,o=(o,n)=>t.getValueFromEvent(n).map((n=>t.setValueFrom(o,e,n)));return{behaviours:xl([Pp.config({mode:"special",onLeft:o=>t.onLeft(o,e),onRight:o=>t.onRight(o,e),onUp:o=>t.onUp(o,e),onDown:o=>t.onDown(o,e)}),eh.config({})]),events:Pa([Va(Pr(),o),Va(Fr(),o),Va(Zr(),o),Va(Ur(),((t,n)=>{e.mouseIsDown.get()&&o(t,n)}))])}}})];const H_=k("slider.change.value"),P_=e=>{const t=e.event.raw;if((e=>-1!==e.type.indexOf("touch"))(t)){const e=t;return void 0!==e.touches&&1===e.touches.length?E.some(e.touches[0]).map((e=>Wt(e.clientX,e.clientY))):E.none()}{const e=t;return void 0!==e.clientX?E.some(e).map((e=>Wt(e.clientX,e.clientY))):E.none()}},F_=e=>e.model.minX,j_=e=>e.model.minY,V_=e=>e.model.minX-1,Z_=e=>e.model.minY-1,U_=e=>e.model.maxX,q_=e=>e.model.maxY,W_=e=>e.model.maxX+1,$_=e=>e.model.maxY+1,G_=(e,t,o)=>t(e)-o(e),K_=e=>G_(e,U_,F_),Y_=e=>G_(e,q_,j_),X_=e=>K_(e)/2,J_=e=>Y_(e)/2,Q_=e=>e.stepSize,ex=e=>e.snapToGrid,tx=e=>e.snapStart,ox=e=>e.rounded,nx=(e,t)=>void 0!==e[t+"-edge"],rx=e=>nx(e,"left"),ax=e=>nx(e,"right"),sx=e=>nx(e,"top"),ix=e=>nx(e,"bottom"),lx=e=>e.model.value.get(),cx=(e,t)=>({x:e,y:t}),dx=(e,t)=>{Da(e,H_(),{value:t})},ux=(e,t,o,n)=>e<t?e:e>o?o:e===t?t-1:Math.max(t,e-n),mx=(e,t,o,n)=>e>o?e:e<t?t:e===o?o+1:Math.min(o,e+n),gx=(e,t,o)=>Math.max(t,Math.min(o,e)),px=e=>{const{min:t,max:o,range:n,value:r,step:a,snap:s,snapStart:i,rounded:l,hasMinEdge:c,hasMaxEdge:d,minBound:u,maxBound:m,screenRange:g}=e,p=c?t-1:t,h=d?o+1:o;if(r<u)return p;if(r>m)return h;{const e=((e,t,o)=>Math.min(o,Math.max(e,t))-t)(r,u,m),c=gx(e/g*n+t,p,h);return s&&c>=t&&c<=o?((e,t,o,n,r)=>r.fold((()=>{const r=e-t,a=Math.round(r/n)*n;return gx(t+a,t-1,o+1)}),(t=>{const r=(e-t)%n,a=Math.round(r/n),s=Math.floor((e-t)/n),i=Math.floor((o-t)/n),l=t+Math.min(i,s+a)*n;return Math.max(t,l)})))(c,t,o,a,i):l?Math.round(c):c}},hx=e=>{const{min:t,max:o,range:n,value:r,hasMinEdge:a,hasMaxEdge:s,maxBound:i,maxOffset:l,centerMinEdge:c,centerMaxEdge:d}=e;return r<t?a?0:c:r>o?s?i:d:(r-t)/n*l},fx="top",yx="right",bx="bottom",vx="left",kx=e=>e.element.dom.getBoundingClientRect(),wx=(e,t)=>e[t],_x=e=>{const t=kx(e);return wx(t,vx)},xx=e=>{const t=kx(e);return wx(t,yx)},Cx=e=>{const t=kx(e);return wx(t,fx)},Sx=e=>{const t=kx(e);return wx(t,bx)},zx=e=>{const t=kx(e);return wx(t,"width")},Ox=e=>{const t=kx(e);return wx(t,"height")},Tx=(e,t,o)=>(e+t)/2-o,Ex=(e,t)=>{const o=kx(e),n=kx(t),r=wx(o,vx),a=wx(o,yx),s=wx(n,vx);return Tx(r,a,s)},Ax=(e,t)=>{const o=kx(e),n=kx(t),r=wx(o,fx),a=wx(o,bx),s=wx(n,fx);return Tx(r,a,s)},Mx=(e,t)=>{Da(e,H_(),{value:t})},Nx=(e,t,o)=>{const n={min:F_(t),max:U_(t),range:K_(t),value:o,step:Q_(t),snap:ex(t),snapStart:tx(t),rounded:ox(t),hasMinEdge:rx(t),hasMaxEdge:ax(t),minBound:_x(e),maxBound:xx(e),screenRange:zx(e)};return px(n)},Rx=e=>(t,o)=>((e,t,o)=>{const n=(e>0?mx:ux)(lx(o),F_(o),U_(o),Q_(o));return Mx(t,n),E.some(n)})(e,t,o).map(T),Dx=(e,t,o,n,r,a)=>{const s=((e,t,o,n,r)=>{const a=zx(e),s=n.bind((t=>E.some(Ex(t,e)))).getOr(0),i=r.bind((t=>E.some(Ex(t,e)))).getOr(a),l={min:F_(t),max:U_(t),range:K_(t),value:o,hasMinEdge:rx(t),hasMaxEdge:ax(t),minBound:_x(e),minOffset:0,maxBound:xx(e),maxOffset:a,centerMinEdge:s,centerMaxEdge:i};return hx(l)})(t,a,o,n,r);return _x(t)-_x(e)+s},Bx=Rx(-1),Lx=Rx(1),Ix=E.none,Hx=E.none,Px={"top-left":E.none(),top:E.none(),"top-right":E.none(),right:E.some(((e,t)=>{dx(e,W_(t))})),"bottom-right":E.none(),bottom:E.none(),"bottom-left":E.none(),left:E.some(((e,t)=>{dx(e,V_(t))}))};var Fx=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=Nx(e,t,o);return Mx(e,n),n},setToMin:(e,t)=>{const o=F_(t);Mx(e,o)},setToMax:(e,t)=>{const o=U_(t);Mx(e,o)},findValueOfOffset:Nx,getValueFromEvent:e=>P_(e).map((e=>e.left)),findPositionOfValue:Dx,setPositionFromValue:(e,t,o,n)=>{const r=lx(o),a=Dx(e,n.getSpectrum(e),r,n.getLeftEdge(e),n.getRightEdge(e),o),s=Xt(t.element)/2;Mt(t.element,"left",a-s+"px")},onLeft:Bx,onRight:Lx,onUp:Ix,onDown:Hx,edgeActions:Px});const jx=(e,t)=>{Da(e,H_(),{value:t})},Vx=(e,t,o)=>{const n={min:j_(t),max:q_(t),range:Y_(t),value:o,step:Q_(t),snap:ex(t),snapStart:tx(t),rounded:ox(t),hasMinEdge:sx(t),hasMaxEdge:ix(t),minBound:Cx(e),maxBound:Sx(e),screenRange:Ox(e)};return px(n)},Zx=e=>(t,o)=>((e,t,o)=>{const n=(e>0?mx:ux)(lx(o),j_(o),q_(o),Q_(o));return jx(t,n),E.some(n)})(e,t,o).map(T),Ux=(e,t,o,n,r,a)=>{const s=((e,t,o,n,r)=>{const a=Ox(e),s=n.bind((t=>E.some(Ax(t,e)))).getOr(0),i=r.bind((t=>E.some(Ax(t,e)))).getOr(a),l={min:j_(t),max:q_(t),range:Y_(t),value:o,hasMinEdge:sx(t),hasMaxEdge:ix(t),minBound:Cx(e),minOffset:0,maxBound:Sx(e),maxOffset:a,centerMinEdge:s,centerMaxEdge:i};return hx(l)})(t,a,o,n,r);return Cx(t)-Cx(e)+s},qx=E.none,Wx=E.none,$x=Zx(-1),Gx=Zx(1),Kx={"top-left":E.none(),top:E.some(((e,t)=>{dx(e,Z_(t))})),"top-right":E.none(),right:E.none(),"bottom-right":E.none(),bottom:E.some(((e,t)=>{dx(e,$_(t))})),"bottom-left":E.none(),left:E.none()};var Yx=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=Vx(e,t,o);return jx(e,n),n},setToMin:(e,t)=>{const o=j_(t);jx(e,o)},setToMax:(e,t)=>{const o=q_(t);jx(e,o)},findValueOfOffset:Vx,getValueFromEvent:e=>P_(e).map((e=>e.top)),findPositionOfValue:Ux,setPositionFromValue:(e,t,o,n)=>{const r=lx(o),a=Ux(e,n.getSpectrum(e),r,n.getTopEdge(e),n.getBottomEdge(e),o),s=Zt(t.element)/2;Mt(t.element,"top",a-s+"px")},onLeft:qx,onRight:Wx,onUp:$x,onDown:Gx,edgeActions:Kx});const Xx=(e,t)=>{Da(e,H_(),{value:t})},Jx=(e,t)=>({x:e,y:t}),Qx=(e,t)=>(o,n)=>((e,t,o,n)=>{const r=e>0?mx:ux,a=t?lx(n).x:r(lx(n).x,F_(n),U_(n),Q_(n)),s=t?r(lx(n).y,j_(n),q_(n),Q_(n)):lx(n).y;return Xx(o,Jx(a,s)),E.some(a)})(e,t,o,n).map(T),eC=Qx(-1,!1),tC=Qx(1,!1),oC=Qx(-1,!0),nC=Qx(1,!0),rC={"top-left":E.some(((e,t)=>{dx(e,cx(V_(t),Z_(t)))})),top:E.some(((e,t)=>{dx(e,cx(X_(t),Z_(t)))})),"top-right":E.some(((e,t)=>{dx(e,cx(W_(t),Z_(t)))})),right:E.some(((e,t)=>{dx(e,cx(W_(t),J_(t)))})),"bottom-right":E.some(((e,t)=>{dx(e,cx(W_(t),$_(t)))})),bottom:E.some(((e,t)=>{dx(e,cx(X_(t),$_(t)))})),"bottom-left":E.some(((e,t)=>{dx(e,cx(V_(t),$_(t)))})),left:E.some(((e,t)=>{dx(e,cx(V_(t),J_(t)))}))};var aC=Object.freeze({__proto__:null,setValueFrom:(e,t,o)=>{const n=Nx(e,t,o.left),r=Vx(e,t,o.top),a=Jx(n,r);return Xx(e,a),a},setToMin:(e,t)=>{const o=F_(t),n=j_(t);Xx(e,Jx(o,n))},setToMax:(e,t)=>{const o=U_(t),n=q_(t);Xx(e,Jx(o,n))},getValueFromEvent:e=>P_(e),setPositionFromValue:(e,t,o,n)=>{const r=lx(o),a=Dx(e,n.getSpectrum(e),r.x,n.getLeftEdge(e),n.getRightEdge(e),o),s=Ux(e,n.getSpectrum(e),r.y,n.getTopEdge(e),n.getBottomEdge(e),o),i=Xt(t.element)/2,l=Zt(t.element)/2;Mt(t.element,"left",a-i+"px"),Mt(t.element,"top",s-l+"px")},onLeft:eC,onRight:tC,onUp:oC,onDown:nC,edgeActions:rC});const sC=hm({name:"Slider",configFields:[vr("stepSize",1),vr("onChange",y),vr("onChoose",y),vr("onInit",y),vr("onDragStart",y),vr("onDragEnd",y),vr("snapToGrid",!1),vr("rounded",!0),ur("snapStart"),nr("model",Xn("mode",{x:[vr("minX",0),vr("maxX",100),er("value",(e=>Tr(e.mode.minX))),or("getInitialValue"),Bi("manager",Fx)],y:[vr("minY",0),vr("maxY",100),er("value",(e=>Tr(e.mode.minY))),or("getInitialValue"),Bi("manager",Yx)],xy:[vr("minX",0),vr("maxX",100),vr("minY",0),vr("maxY",100),er("value",(e=>Tr({x:e.mode.minX,y:e.mode.minY}))),or("getInitialValue"),Bi("manager",aC)]})),gu("sliderBehaviours",[Pp,mu]),er("mouseIsDown",(()=>Tr(!1)))],partFields:I_,factory:(e,t,o,n)=>{const r=t=>tm(t,e,"thumb"),a=t=>tm(t,e,"spectrum"),s=t=>em(t,e,"left-edge"),i=t=>em(t,e,"right-edge"),l=t=>em(t,e,"top-edge"),c=t=>em(t,e,"bottom-edge"),d=e.model,u=d.manager,m=(t,o)=>{u.setPositionFromValue(t,o,e,{getLeftEdge:s,getRightEdge:i,getTopEdge:l,getBottomEdge:c,getSpectrum:a})},g=(e,t)=>{d.value.set(t);const o=r(e);m(e,o)},p=t=>{const o=e.mouseIsDown.get();e.mouseIsDown.set(!1),o&&em(t,e,"thumb").each((o=>{const n=d.value.get();e.onChoose(t,o,n)}))},h=(t,o)=>{o.stop(),e.mouseIsDown.set(!0),e.onDragStart(t,r(t))},f=(t,o)=>{o.stop(),e.onDragEnd(t,r(t)),p(t)};return{uid:e.uid,dom:e.dom,components:t,behaviours:hu(e.sliderBehaviours,[Pp.config({mode:"special",focusIn:t=>em(t,e,"spectrum").map(Pp.focusIn).map(T)}),mu.config({store:{mode:"manual",getValue:e=>d.value.get(),setValue:g}}),El.config({channels:{[Kd()]:{onReceive:p}}})]),events:Pa([Va(H_(),((t,o)=>{((t,o)=>{g(t,o);const n=r(t);e.onChange({value: t},n,o),E.some(!0)})(t,o.event.value)})),Ya(((t, o)=>{const n=d.getInitialValue();d.value.set(n);const s=r(t);m(t,s);const i=a(t);e.onInit(t,s,i,d.value.get())})),Va(Pr(),h),Va(jr(),f),Va(Zr(),h),Va(Wr(),f)]),apis:{resetToMin: t=>{u.setToMin(t,e)},resetToMax: t=>{u.setToMax(t,e)},setValue:g,refresh:m},domModification:{styles:{position:"relative"}}}},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)}}}),iC=ls("rgb-hex-update"),lC=ls("slider-update"),cC=ls("palette-update"),dC="form",uC=[gu("formBehaviours",[mu])],mC= e=>"<alloy.field."+e+">",gC=(e, t)=>({uid:e.uid,dom:e.dom,components:t,behaviours:hu(e.formBehaviours,[mu.config({store:{mode:"manual",getValue: t=>{const o=nm(t,e);return ce(o,((e, t)=>e().bind((e=>{return o=vm.getCurrent(e),n=new Error(`Cannot find a current component to extract the value from for form part '${t}': `+ns(e.element)),o.fold((()=>rn.error(n)),rn.value);var o,n})).map(mu.getValue)))},setValue:(t, o)=>{le(o,((o, n)=>{em(t,e,n).each((e=>{vm.getCurrent(e).each((e=>{mu.setValue(e,o)}))}))}))}}})]),apis:{getField:(t, o)=>em(t,e,o).bind(vm.getCurrent)}}),pC={getField:Cs(((e, t, o)=>e.getField(t,o))),sketch: e=>{const t=(()=>{const e=[];return{field:(t, o)=>(e.push(t),Ku(dC,mC(t),o)),record:k(e)}})(),o=e(t),n=t.record(),r=P(n,(e=>Fu({name:e,pname:mC(e)})));return dm(dC,uC,r,gC,o)}},hC=ls("valid-input"),fC=ls("invalid-input"),yC=ls("validating-input"),bC="colorcustom.rgb.",vC=(e, t, o, n)=>{const r=(o, n)=>x_.config({invalidClass:t("invalid"),notify:{onValidate: e=>{Da(e,yC,{type:o})},onValid: e=>{Da(e,hC,{type:o,value:mu.getValue(e)})},onInvalid: e=>{Da(e,fC,{type:o,value:mu.getValue(e)})}},validator:{validate: t=>{const o=mu.getValue(t),r=n(o)?rn.value(!0):rn.error(e("aria.input.invalid"));return lw(r)},validateOnLoad:!1}}),a=(o, n, a, s, i)=>{const l=e(bC+"range"),c=Yw.parts.label({dom:{tag:"label",attributes:{"aria-label":s}},components:[ti(a)]}),d=Yw.parts.field({data:i,factory:Dy,inputAttributes:{type:"text",..."hex"===n?{"aria-live":"polite"}:{}},inputClasses:[t("textfield")],inputBehaviours:xl([r(n,o),Qw.config({})]),onSetValue: e=>{x_.isInvalid(e)&&x_.run(e).get(y)}}),u=[c,d],m="hex"!==n?[Yw.parts["aria-descriptor"]({text:l})]:[];return{dom:{tag:"div",attributes:{role:"presentation"}},components:u.concat(m)}},s=(e, t)=>{const o=t.red,n=t.green,r=t.blue;mu.setValue(e,{red:o,green:n,blue:r})},i=Vh({dom:{tag:"div",classes:[t("rgba-preview")],styles:{"background-color":"white"},attributes:{role:"presentation"}}}),l=(e, t)=>{i.getOpt(e).each((e=>{Mt(e.element,"background-color","#"+t.value)}))},c=pm({factory:()=>{const r={red:Tr(E.some(255)),green:Tr(E.some(255)),blue:Tr(E.some(255)),hex:Tr(E.some("ffffff"))},c= e=>r[e].get(),d=(e, t)=>{r[e].set(t)},u= e=>{const t=e.red,o=e.green,n=e.blue;d("red",E.some(t)),d("green",E.some(o)),d("blue",E.some(n))},m=(e, t)=>{const o=t.event;"hex"!==o.type?d(o.type,E.none()):n(e)},g=(e, t)=>{const n=t.event;(e=>"hex"===e.type)(n)?((e, t)=>{o(e);const n=Uv(t);d("hex",E.some(n.value));const r=ak(n);s(e,r),u(r),Da(e,iC,{hex:n}),l(e,n)})(e,n.value):((e, t, o)=>{const n=parseInt(o,10);d(t,E.some(n)),c("red").bind((e=>c("green").bind((t=>c("blue").map((o=>ok(e,t,o,1))))))).each((t=>{const o=((e, t)=>{const o=Yv(t);return pC.getField(e,"hex").each((t=>{eh.isFocused(t)||mu.setValue(e,{hex:o.value})})),o})(e,t);Da(e,iC,{hex:o}),l(e,o)}))})(e,n.type,n.value)},p= t=>({label:e(bC+t+".label"),description:e(bC+t+".description")}),h=p("red"),f=p("green"),y=p("blue"),b=p("hex");return fn(pC.sketch((o=>({dom:{tag:"form",classes:[t("rgb-form")],attributes:{"aria-label":e("aria.color.picker")}},components:[o.field("red",Yw.sketch(a(nk,"red",h.label,h.description,255))),o.field("green",Yw.sketch(a(nk,"green",f.label,f.description,255))),o.field("blue",Yw.sketch(a(nk,"blue",y.label,y.description,255))),o.field("hex",Yw.sketch(a($v,"hex",b.label,b.description,"ffffff"))),i.asSpec()],formBehaviours:xl([x_.config({invalidClass:t("form-invalid")}),Kp("rgb-form-events",[Va(hC,g),Va(fC,m),Va(yC,m)])])}))),{apis:{updateHex:(e, t)=>{mu.setValue(e,{hex:t.value}),((e, t)=>{const o=ak(t);s(e,o),u(o)})(e,t),l(e,t)}}})},name:"RgbForm",configFields:[],apis:{updateHex:(e, t, o)=>{e.updateHex(t,o)}},extraApis:{}});return c},kC=(e, t)=>{const o=pm({name:"ColourPicker",configFields:[or("dom"),vr("onValidHex",y),vr("onInvalidHex",y)],factory: o=>{const n=vC(e,t,o.onValidHex,o.onInvalidHex),r=((e, t)=>{const o=sC.parts.spectrum({dom:{tag:"canvas",attributes:{role:"presentation"},classes:[t("sv-palette-spectrum")]}}),n=sC.parts.thumb({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette-thumb")],innerHtml:`<div class=${t("sv-palette-inner-thumb")} role="presentation"></div>`}}),r=(e, t)=>{const{width:o,height:n}=e,r=e.getContext("2d");if(null===r)return;r.fillStyle=t,r.fillRect(0,0,o,n);const a=r.createLinearGradient(0,0,o,0);a.addColorStop(0,"rgba(255,255,255,1)"),a.addColorStop(1,"rgba(255,255,255,0)"),r.fillStyle=a,r.fillRect(0,0,o,n);const s=r.createLinearGradient(0,0,0,n);s.addColorStop(0,"rgba(0,0,0,0)"),s.addColorStop(1,"rgba(0,0,0,1)"),r.fillStyle=s,r.fillRect(0,0,o,n)};return pm({factory: e=>{const a=k({x:0,y:0}),s=xl([vm.config({find:E.some}),eh.config({})]);return sC.sketch({dom:{tag:"div",attributes:{role:"presentation"},classes:[t("sv-palette")]},model:{mode:"xy",getInitialValue:a},rounded:!1,components:[o,n],onChange:(e, t, o)=>{Da(e,cC,{value:o})},onInit:(e, t, o, n)=>{r(o.element.dom,lk(ck))},sliderBehaviours:s})},name:"SaturationBrightnessPalette",configFields:[],apis:{setHue:(e, t, o)=>{((e, t)=>{const o=e.components()[0].element.dom,n=yk(t,100,100),a=rk(n);r(o,lk(a))})(t,o)},setThumb:(e, t, o)=>{((e, t)=>{const o=bk(ak(t));sC.setValue(e,{x:o.saturation,y:100-o.value})})(t,o)}},extraApis:{}})})(0,t),a={paletteRgba:Tr(ck),paletteHue:Tr(0)},s=Vh(((e, t)=>{const o=sC.parts.spectrum({dom:{tag:"div",classes:[t("hue-slider-spectrum")],attributes:{role:"presentation"}}}),n=sC.parts.thumb({dom:{tag:"div",classes:[t("hue-slider-thumb")],attributes:{role:"presentation"}}});return sC.sketch({dom:{tag:"div",classes:[t("hue-slider")],attributes:{role:"presentation"}},rounded:!1,model:{mode:"y",getInitialValue:k(0)},components:[o,n],sliderBehaviours:xl([eh.config({})]),onChange:(e, t, o)=>{Da(e,lC,{value:o})}})})(0,t)),i=Vh(r.sketch({})),l=Vh(n.sketch({})),c=(e, t, o)=>{i.getOpt(e).each((e=>{r.setHue(e,o)}))},d=(e, t)=>{l.getOpt(e).each((e=>{n.updateHex(e,t)}))},u=(e, t, o)=>{s.getOpt(e).each((e=>{sC.setValue(e,(e=>100-e/360*100)(o))}))},m=(e, t)=>{i.getOpt(e).each((e=>{r.setThumb(e,t)}))},g=(e, t, o, n)=>{((e, t)=>{const o=ak(e);a.paletteRgba.set(o),a.paletteHue.set(t)})(t,o),F(n,(n=>{n(e,t,o)}))};return{uid:o.uid,dom:o.dom,components:[i.asSpec(),s.asSpec(),l.asSpec()],behaviours:xl([Kp("colour-picker-events",[Va(iC,(()=>{const e=[c,u,m];return(t, o)=>{const n=o.event.hex,r=(e=>bk(ak(e)))(n);g(t,n,r.hue,e)}})()),Va(cC,(()=>{const e=[d];return(t, o)=>{const n=o.event.value,r=a.paletteHue.get(),s=yk(r,n.x,100-n.y),i=vk(s);g(t,i,r,e)}})()),Va(lC,(()=>{const e=[c,d];return(t, o)=>{const n=(e=>(100-e)/100*360)(o.event.value),r=a.paletteRgba.get(),s=bk(r),i=yk(n,s.saturation,s.value),l=vk(i);g(t,l,n,e)}})())]),vm.config({find: e=>l.getOpt(e)}),Pp.config({mode:"acyclic"})])}}});return o},wC=()=>vm.config({find:E.some}),_C= e=>vm.config({find: t=>lt(t.element,e).bind((e=>t.getSystem().getByDom(e).toOptional()))}),xC=Mn([vr("preprocess",w),vr("postprocess",w)]),CC=(e, t, o)=>mu.config({store:{mode:"manual",...e.map((e=>({initialValue:e}))).getOr({}),getValue:t,setValue:o}}),SC=(e, t, o)=>CC(e,(e=>t(e.element)),((e, t)=>o(e.element,t))),zC=(e, t)=>{const o=Kn("RepresentingConfigs.memento processors",xC,t);return mu.config({store:{mode:"manual",getValue: t=>{const n=e.get(t),r=mu.getValue(n);return o.postprocess(r)},setValue:(t, n)=>{const r=o.preprocess(n),a=e.get(t);mu.setValue(a,r)}}})},OC=SC,TC=CC,EC= e=>mu.config({store:{mode:"memory",initialValue:e}}),AC={"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"};var MC=tinymce.util.Tools.resolve("tinymce.Resource"),NC=tinymce.util.Tools.resolve("tinymce.util.Tools");const RC=ls("alloy-fake-before-tabstop"),DC=ls("alloy-fake-after-tabstop"),BC= e=>({dom:{tag:"div",styles:{width:"1px",height:"1px",outline:"none"},attributes:{tabindex:"0"},classes:e},behaviours:xl([eh.config({ignore:!0}),Qw.config({})])}),LC= e=>({dom:{tag:"div",classes:["tox-navobj"]},components:[BC([RC]),e,BC([DC])],behaviours:xl([_C(1)])}),IC=(e, t)=>{Da(e,Yr(),{raw:{which:9,shiftKey:t}})},HC=(e, t)=>{const o=t.element;Vs(o,RC)?IC(e,!0):Vs(o,DC)&&IC(e,!1)},PC= e=>Lw(e,["."+RC,"."+DC].join(","),O),FC=ls("toolbar.button.execute"),jC=ls("common-button-display-events"),VC={[ua()]:["disabling","alloy.base.behaviour","toggling","toolbar-button-events"],[_a()]:["toolbar-button-events",jC],[Zr()]:["focusing","alloy.base.behaviour",jC]},ZC= e=>Mt(e.element,"width",Dt(e.element,"width")),UC=(e, t, o)=>Jh(e,{tag:"span",classes:["tox-icon","tox-tbtn__icon-wrap"],behaviours:o},t),qC=(e, t)=>UC(e,t,[]),WC=(e, t)=>UC(e,t,[Gp.config({})]),$C=(e, t, o)=>({dom:{tag:"span",classes:[`${t}__select-label`]},components:[ti(o.translate(e))],behaviours:xl([Gp.config({})])}),GC=ls("update-menu-text"),KC=ls("update-menu-icon"),YC=(e, t, o)=>{const n=Tr(y),r=e.text.map((e=>Vh($C(e,t,o.providers)))),a=e.icon.map((e=>Vh(WC(e,o.providers.icons)))),s=(e, t)=>{const o=mu.getValue(e);return eh.focus(o),Da(o,"keydown",{raw:t.event.raw}),_w.close(o),E.some(!0)},i=e.role.fold((()=>({})),(e=>({role:e}))),l=e.tooltip.fold((()=>({})),(e=>{const t=o.providers.translate(e);return{title:t,"aria-label":t}})),c=Jh("chevron-down",{tag:"div",classes:[`${t}__select-chevron`]},o.providers.icons),d=ls("common-button-display-events"),u=Vh(_w.sketch({...e.uid?{uid:e.uid}:{},...i,dom:{tag:"button",classes:[t,`${t}--select`].concat(P(e.classes,(e=>`${t}--${e}`))),attributes:{...l}},components:Tv([a.map((e=>e.asSpec())),r.map((e=>e.asSpec())),E.some(c)]),matchWidth:!0,useMinWidth:!0,onOpen:(t, o, n)=>{e.searchable&&(e=>{Py(e).each((e=>eh.focus(e)))})(n)},dropdownBehaviours:xl([...e.dropdownBehaviours,kv((()=>e.disabled||o.providers.isDisabled())),vv(),C_.config({}),Gp.config({}),Kp("dropdown-events",[Cv(e,n),Sv(e,n)]),Kp(d,[Ya(((e, t)=>ZC(e)))]),Kp("menubutton-update-display-text",[Va(GC,((e, t)=>{r.bind((t=>t.getOpt(e))).each((e=>{Gp.set(e,[ti(o.providers.translate(t.event.text))])}))})),Va(KC,((e, t)=>{a.bind((t=>t.getOpt(e))).each((e=>{Gp.set(e,[WC(t.event.icon,o.providers.icons)])}))}))])]),eventOrder:fn(VC,{mousedown:["focusing","alloy.base.behaviour","item-type-events","normal-dropdown-events"],[_a()]:["toolbar-button-events","dropdown-events",d]}),sandboxBehaviours:xl([Pp.config({mode:"special",onLeft:s,onRight:s}),Kp("dropdown-sandbox-events",[Va(By,((e, t)=>{(e=>{const t=mu.getValue(e),o=Hy(e).map(Fy);_w.refetch(t).get((()=>{const e=ow.getCoupled(t,"sandbox");o.each((t=>Hy(e).each((e=>((e, t)=>{mu.setValue(e,t.fetchPattern),e.element.dom.selectionStart=t.selectionStart,e.element.dom.selectionEnd=t.selectionEnd})(e,t)))))}))})(e),t.stop()})),Va(Ly,((e, t)=>{((e, t)=>{(e=>Wd.getState(e).bind(Zm.getHighlighted).bind(Zm.getHighlighted))(e).each((o=>{((e, t, o, n)=>{const r={...n,target:t};e.getSystem().triggerEvent(o,t,r)})(e,o.element,t.event.eventType,t.event.interactionEvent)}))})(e,t),t.stop()}))])]),lazySink:o.getSink,toggleClass:`${t}--active`,parts:{menu:{...Ey(0,e.columns,e.presets),fakeFocus:e.searchable,onHighlightItem:xw,onCollapseMenu:(e, t, o)=>{Zm.getHighlighted(o).each((t=>{xw(e,o,t)}))},onDehighlightItem:Cw}},fetch: t=>iw(x(e.fetch,t))}));return u.asSpec()},XC= e=>"separator"===e.type,JC={type:"separator"},QC=(e, t)=>{const o=((e, t)=>{const o=U(e,((e, o)=>(e=>a(e))(o)?""===o?e:"|"===o?e.length>0&&!XC(e[e.length-1])?e.concat([JC]):e:be(t,o.toLowerCase())?e.concat([t[o.toLowerCase()]]):e:e.concat([o])),[]);return o.length>0&&XC(o[o.length-1])&&o.pop(),o})(a(e)?e.split(" "):e,t);return Z(o,((e, o)=>{if((e=>be(e,"getSubmenuItems"))(o)){const n=(e=>{const t=ye(e,"value").getOrThunk((()=>ls("generated-menu-item")));return fn({value:t},e)})(o),r=((e, t)=>{const o=e.getSubmenuItems(),n=QC(o,t);return{item:e,menus:fn(n.menus,{[e.value]:n.items}),expansions:fn(n.expansions,{[e.value]:e.value})}})(n,t);return{menus:fn(e.menus,r.menus),items:[r.item,...e.items],expansions:fn(e.expansions,r.expansions)}}return{...e,items:[o,...e.items]}}),{menus:{},expansions:{},items:[]})},eS=(e, t, o, n)=>{const r=ls("primary-menu"),a=QC(e,o.shared.providers.menuItems());if(0===a.items.length)return E.none();const s=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-field",placeholder:e.placeholder}))))(n),i=Ew(r,a.items,t,o,n.isHorizontalMenu,s),l=(e=>e.search.fold((()=>({searchMode:"no-search"})),(e=>({searchMode:"search-with-results"}))))(n),c=ce(a.menus,((e, n)=>Ew(n,e,t,o,!1,l))),d=fn(c,Ar(r,i));return E.from(Hh.tieredData(r,d,a.expansions))},tS= e=>!be(e,"items"),oS="data-value",nS=(e, t, o, n)=>P(o,(o=>tS(o)?{type:"togglemenuitem",text:o.text,value:o.value,active:o.value===n,onAction:()=>{mu.setValue(e,o.value),Da(e,a_,{name:t}),eh.focus(e)}}:{type:"nestedmenuitem",text:o.text,getSubmenuItems:()=>nS(e,t,o.items,n)})),rS=(e, t)=>ae(e,(e=>tS(e)?Ce(e.value===t,e):rS(e.items,t))),aS=pm({name:"HtmlSelect",configFields:[or("options"),gu("selectBehaviours",[eh,mu]),vr("selectClasses",[]),vr("selectAttributes",{}),ur("data")],factory:(e, t)=>{const o=P(e.options,(e=>({dom:{tag:"option",value:e.value,innerHtml:e.text}}))),n=e.data.map((e=>Ar("initialValue",e))).getOr({});return{uid:e.uid,dom:{tag:"select",classes:e.selectClasses,attributes:e.selectAttributes},components:o,behaviours:hu(e.selectBehaviours,[eh.config({}),mu.config({store:{mode:"manual",getValue: e=>Ws(e.element),setValue:(t, o)=>{const n=oe(e.options);q(e.options,(e=>e.value===o)).isSome()?$s(t.element,o):-1===t.element.dom.selectedIndex&&""===o&&n.each((e=>$s(t.element,e.value)))},...n}})])}}}),sS=k([vr("field1Name","field1"),vr("field2Name","field2"),Ri("onLockedChange"),Ei(["lockClass"]),vr("locked",!1),fu("coupledFieldBehaviours",[vm,mu])]),iS=(e, t)=>Fu({factory:Yw,name:e,overrides: e=>({fieldBehaviours:xl([Kp("coupled-input-behaviour",[Va(Jr(),(o=>{((e, t, o)=>em(e,t,o).bind(vm.getCurrent))(o,e,t).each((t=>{em(o,e,"lock").each((n=>{lh.isOn(n)&&e.onLockedChange(o,t,n)}))}))}))])])})}),lS=k([iS("field1","field2"),iS("field2","field1"),Fu({factory:jh,schema:[or("dom")],name:"lock",overrides: e=>({buttonBehaviours:xl([lh.config({selected:e.locked,toggleClass:e.markers.lockClass,aria:{mode:"pressed"}})])})})]),cS=hm({name:"FormCoupledInputs",configFields:sS(),partFields:lS(),factory:(e, t, o, n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:yu(e.coupledFieldBehaviours,[vm.config({find:E.some}),mu.config({store:{mode:"manual",getValue: t=>{const o=am(t,e,["field1","field2"]);return{[e.field1Name]:mu.getValue(o.field1()),[e.field2Name]:mu.getValue(o.field2())}},setValue:(t, o)=>{const n=am(t,e,["field1","field2"]);ve(o,e.field1Name)&&mu.setValue(n.field1(),o[e.field1Name]),ve(o,e.field2Name)&&mu.setValue(n.field2(),o[e.field2Name])}}})]),apis:{getField1: t=>em(t,e,"field1"),getField2: t=>em(t,e,"field2"),getLock: t=>em(t,e,"lock")}}),apis:{getField1:(e, t)=>e.getField1(t),getField2:(e, t)=>e.getField2(t),getLock:(e, t)=>e.getLock(t)}}),dS= e=>{const t=/^\s*(\d+(?:\.\d+)?)\s*(|cm|mm|in|px|pt|pc|em|ex|ch|rem|vw|vh|vmin|vmax|%)\s*$/.exec(e);if(null!==t){const e=parseFloat(t[1]),o=t[2];return rn.value({value:e,unit:o})}return rn.error(e)},uS=(e, t)=>{const o={"":96,px:96,pt:72,cm:2.54,pc:12,mm:25.4,in:1},n= e=>be(o,e);return e.unit===t?E.some(e.value):n(e.unit)&&n(t)?o[e.unit]===o[t]?E.some(e.value):E.some(e.value/o[e.unit]*o[t]):E.none()},mS= e=>E.none(),gS=(e, t)=>{const o=e.label.map((e=>r_(e,t))),n=[Rm.config({disabled:()=>e.disabled||t.isDisabled()}),vv(),Pp.config({mode:"execution",useEnter:!0!==e.multiline,useControlEnter:!0===e.multiline,execute: e=>(Ra(e,c_),E.some(!0))}),Kp("textfield-change",[Va(Jr(),((t, o)=>{Da(t,a_,{name:e.name})})),Va(ca(),((t, o)=>{Da(t,a_,{name:e.name})}))]),Qw.config({})],r=e.validation.map((e=>x_.config({getRoot: e=>at(e.element),invalidClass:"tox-invalid",validator:{validate: t=>{const o=mu.getValue(t),n=e.validator(o);return lw(!0===n?rn.value(o):rn.error(n))},validateOnLoad:e.validateOnLoad}}))).toArray(),a={...e.placeholder.fold(k({}),(e=>({placeholder:t.translate(e)}))),...e.inputMode.fold(k({}),(e=>({inputmode:e})))},s=Yw.parts.field({tag:!0===e.multiline?"textarea":"input",...e.data.map((e=>({data:e}))).getOr({}),inputAttributes:a,inputClasses:[e.classname],inputBehaviours:xl($([n,r])),selectOnFocus:!1,factory:Dy}),i=e.multiline?{dom:{tag:"div",classes:["tox-textarea-wrap"]},components:[s]}:s,l=(e.flex?["tox-form__group--stretched"]:[]).concat(e.maximized?["tox-form-group--maximize"]:[]),c=[Rm.config({disabled:()=>e.disabled||t.isDisabled(),onDisabled: e=>{Yw.getField(e).each(Rm.disable)},onEnabled: e=>{Yw.getField(e).each(Rm.enable)}}),vv()];return t_(o,i,l,c)},pS=(e, t)=>t.getAnimationRoot.fold((()=>e.element),(t=>t(e))),hS= e=>e.dimension.property,fS=(e, t)=>e.dimension.getDimension(t),yS=(e, t)=>{const o=pS(e,t);Us(o,[t.shrinkingClass,t.growingClass])},bS=(e, t)=>{js(e.element,t.openClass),Fs(e.element,t.closedClass),Mt(e.element,hS(t),"0px"),Ft(e.element)},vS=(e, t)=>{js(e.element,t.closedClass),Fs(e.element,t.openClass),Pt(e.element,hS(t))},kS=(e, t, o, n)=>{o.setCollapsed(),Mt(e.element,hS(t),fS(t,e.element)),yS(e,t),bS(e,t),t.onStartShrink(e),t.onShrunk(e)},wS=(e, t, o, n)=>{const r=n.getOrThunk((()=>fS(t,e.element)));o.setCollapsed(),Mt(e.element,hS(t),r),Ft(e.element);const a=pS(e,t);js(a,t.growingClass),Fs(a,t.shrinkingClass),bS(e,t),t.onStartShrink(e)},_S=(e, t, o)=>{const n=fS(t,e.element);("0px"===n?kS:wS)(e,t,o,E.some(n))},xS=(e, t, o)=>{const n=pS(e,t),r=Vs(n,t.shrinkingClass),a=fS(t,e.element);vS(e,t);const s=fS(t,e.element);(r?()=>{Mt(e.element,hS(t),a),Ft(e.element)}:()=>{bS(e,t)})(),js(n,t.shrinkingClass),Fs(n,t.growingClass),vS(e,t),Mt(e.element,hS(t),s),o.setExpanded(),t.onStartGrow(e)},CS=(e, t, o)=>{const n=pS(e,t);return!0===Vs(n,t.growingClass)},SS=(e, t, o)=>{const n=pS(e,t);return!0===Vs(n,t.shrinkingClass)};var zS=Object.freeze({__proto__:null,refresh:(e, t, o)=>{if(o.isExpanded()){Pt(e.element,hS(t));const o=fS(t,e.element);Mt(e.element,hS(t),o)}},grow:(e, t, o)=>{o.isExpanded()||xS(e,t,o)},shrink:(e, t, o)=>{o.isExpanded()&&_S(e,t,o)},immediateShrink:(e, t, o)=>{o.isExpanded()&&kS(e,t,o)},hasGrown:(e, t, o)=>o.isExpanded(),hasShrunk:(e, t, o)=>o.isCollapsed(),isGrowing:CS,isShrinking:SS,isTransitioning:(e, t, o)=>CS(e,t)||SS(e,t),toggleGrow:(e, t, o)=>{(o.isExpanded()?_S:xS)(e,t,o)},disableTransitions:yS,immediateGrow:(e, t, o)=>{o.isExpanded()||(vS(e,t),Mt(e.element,hS(t),fS(t,e.element)),yS(e,t),o.setExpanded(),t.onStartGrow(e),t.onGrown(e))}}),OS=Object.freeze({__proto__:null,exhibit:(e, t, o)=>{const n=t.expanded;return Ts(n?{classes:[t.openClass],styles:{}}:{classes:[t.closedClass],styles:Ar(t.dimension.property,"0px")})},events:(e, t)=>Pa([Ka(oa(),((o, n)=>{n.event.raw.propertyName===e.dimension.property&&(yS(o,e),t.isExpanded()&&Pt(o.element,e.dimension.property),(t.isExpanded()?e.onGrown:e.onShrunk)(o))}))])}),TS=[or("closedClass"),or("openClass"),or("shrinkingClass"),or("growingClass"),ur("getAnimationRoot"),Mi("onShrunk"),Mi("onStartShrink"),Mi("onGrown"),Mi("onStartGrow"),vr("expanded",!1),nr("dimension",Xn("property",{width:[Bi("property","width"),Bi("getDimension",(e=>Xt(e)+"px"))],height:[Bi("property","height"),Bi("getDimension",(e=>Zt(e)+"px"))]}))];const ES=Sl({fields:TS,name:"sliding",active:OS,apis:zS,state:Object.freeze({__proto__:null,init: e=>{const t=Tr(e.expanded);return zs({isExpanded:()=>!0===t.get(),isCollapsed:()=>!1===t.get(),setCollapsed:x(t.set,!1),setExpanded:x(t.set,!0),readState:()=>"expanded: "+t.get()})}})}),AS= e=>({isEnabled:()=>!Rm.isDisabled(e),setEnabled: t=>Rm.set(e,!t),setActive: t=>{const o=e.element;t?(Fs(o,"tox-tbtn--enabled"),xt(o,"aria-pressed",!0)):(js(o,"tox-tbtn--enabled"),Tt(o,"aria-pressed"))},isActive:()=>Vs(e.element,"tox-tbtn--enabled"),setText: t=>{Da(e,GC,{text:t})},setIcon: t=>Da(e,KC,{icon:t})}),MS=(e, t, o, n, r=!0)=>YC({text:e.text,icon:e.icon,tooltip:e.tooltip,searchable:e.search.isSome(),role:n,fetch:(t, n)=>{const r={pattern:e.search.isSome()?Sw(t):""};e.fetch((t=>{n(eS(t,uy.CLOSE_ON_EXECUTE,o,{isHorizontalMenu:!1,search:e.search}))}),r,AS(t))},onSetup:e.onSetup,getApi:AS,columns:1,presets:"normal",classes:[],dropdownBehaviours:[...r?[Qw.config({})]:[]]},t,o.shared),NS=(e, t, o)=>{const n= e=> n=>{const r=!n.isActive();n.setActive(r),e.storage.set(r),o.shared.getSink().each((o=>{t().getOpt(o).each((t=>{Ml(t.element),Da(t,l_,{name:e.name,value:e.storage.get()})}))}))},r= e=> t=>{t.setActive(e.storage.get())};return t=>{t(P(e,(e=>{const t=e.text.fold((()=>({})),(e=>({text:e})));return{type:e.type,active:!1,...t,onAction:n(e),onSetup:r(e)}})))}},RS= e=>({dom:{tag:"span",classes:["tox-tree__label"],attributes:{title:e,"aria-label":e}},components:[ti(e)]}),DS=ls("leaf-label-event-id"),BS=({leaf:e,onLeafAction:t,visible:o,treeId:n,backstage:r})=>{const a=e.menu.map((e=>MS(e,"tox-mbtn",r,E.none(),o))),s=[RS(e.title)];return a.each((e=>s.push(e))),jh.sketch({dom:{tag:"div",classes:["tox-tree--leaf__label","tox-trbtn"].concat(o?["tox-tree--leaf__label--visible"]:[])},components:s,role:"treeitem",action: o=>{t(e.id),o.getSystem().broadcastOn([`update-active-item-${n}`],{value:e.id})},eventOrder:{[Yr()]:[DS,"keying"]},buttonBehaviours:xl([...o?[Qw.config({})]:[],lh.config({toggleClass:"tox-trbtn--enabled",toggleOnExecute:!1,aria:{mode:"selected"}}),El.config({channels:{[`update-active-item-${n}`]:{onReceive:(t, o)=>{(o.value===e.id?lh.on:lh.off)(t)}}}}),Kp(DS,[Va(Yr(),((e, t)=>{const o="ArrowLeft"===t.event.raw.code,n="ArrowRight"===t.event.raw.code;o?(mi(e.element,".tox-tree--directory").each((t=>{e.getSystem().getByDom(t).each((e=>{gi(t,".tox-tree--directory__label").each((t=>{e.getSystem().getByDom(t).each(eh.focus)}))}))})),t.stop()):n&&t.stop()}))])])})},LS=ls("directory-label-event-id"),IS=({directory:e,visible:t,noChildren:o,backstage:n})=>{const r=e.menu.map((e=>MS(e,"tox-mbtn",n,E.none()))),a=[{dom:{tag:"div",classes:["tox-chevron"]},components:[(s="chevron-right",i=n.shared.providers.icons,((e, t, o)=>Jh(e,{tag:"span",classes:["tox-tree__icon-wrap","tox-icon"],behaviours:[]},t))(s,i))]},RS(e.title)];var s,i;r.each((e=>{a.push(e)}));const l= e=>{mi(e.element,".tox-tree--directory").each((t=>{e.getSystem().getByDom(t).each((e=>lh.toggle(e)))}))};return jh.sketch({dom:{tag:"div",classes:["tox-tree--directory__label","tox-trbtn"].concat(t?["tox-tree--directory__label--visible"]:[])},components:a,action:l,eventOrder:{[Yr()]:[LS,"keying"]},buttonBehaviours:xl([...t?[Qw.config({})]:[],Kp(LS,[Va(Yr(),((e, t)=>{const n="ArrowRight"===t.event.raw.code,r="ArrowLeft"===t.event.raw.code;n&&o&&t.stop(),(n||r)&&mi(e.element,".tox-tree--directory").each((o=>{e.getSystem().getByDom(o).each((o=>{!lh.isOn(o)&&n||lh.isOn(o)&&r?(l(e),t.stop()):r&&!lh.isOn(o)&&(mi(o.element,".tox-tree--directory").each((e=>{gi(e,".tox-tree--directory__label").each((e=>{o.getSystem().getByDom(e).each(eh.focus)}))})),t.stop())}))}))}))])])})},HS=({children:e,onLeafAction:t,visible:o,treeId:n,backstage:r})=>({dom:{tag:"div",classes:["tox-tree--directory__children"]},components:e.map((e=>"leaf"===e.type?BS({leaf:e,onLeafAction:t,visible:o,treeId:n,backstage:r}):PS({directory:e,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:r}))),behaviours:xl([ES.config({dimension:{property:"height"},closedClass:"tox-tree--directory__children--closed",openClass:"tox-tree--directory__children--open",growingClass:"tox-tree--directory__children--growing",shrinkingClass:"tox-tree--directory__children--shrinking"}),Gp.config({})])}),PS=({directory:e,onLeafAction:t,labelTabstopping:o,treeId:n,backstage:r})=>{const{children:a}=e;return{dom:{tag:"div",classes:["tox-tree--directory"],attributes:{role:"treeitem"}},components:[IS({directory:e,visible:o,noChildren:0===e.children.length,backstage:r}),HS({children:a,onLeafAction:t,visible:!1,treeId:n,backstage:r})],behaviours:xl([lh.config({...e.children.length>0?{aria:{mode:"expanded"}}:{},toggleClass:"tox-tree--directory--expanded",onToggled:(e, o)=>{const s=e.components()[1],i=(l=o,a.map((e=>"leaf"===e.type?BS({leaf:e,onLeafAction:t,visible:l,treeId:n,backstage:r}):PS({directory:e,onLeafAction:t,labelTabstopping:l,treeId:n,backstage:r}))));var l;o?ES.grow(s):ES.shrink(s),Gp.set(s,i)}})])}};var FS=Object.freeze({__proto__:null,events:(e, t)=>{const o=e.stream.streams.setup(e,t);return Pa([Va(e.event,o),Xa((()=>t.cancel()))].concat(e.cancelEvent.map((e=>[Va(e,(()=>t.cancel()))])).getOr([])))}});const jS=(e, t)=>{let o=null;const n=()=>{c(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}},VS= e=>{const t=Tr(null);return zs({readState:()=>({timer:null!==t.get()?"set":"unset"}),setTimer: e=>{t.set(e)},cancel:()=>{const e=t.get();null!==e&&e.cancel()}})};var ZS=Object.freeze({__proto__:null,throttle:VS,init: e=>e.stream.streams.state(e)}),US=[nr("stream",Xn("mode",{throttle:[or("delay"),vr("stopEvent",!0),Bi("streams",{setup:(e, t)=>{const o=e.stream,n=jS(e.onStream,o.delay);return t.setTimer(n),(e, t)=>{n.throttle(e,t),o.stopEvent&&t.stop()}},state:VS})]})),vr("event","input"),ur("cancelEvent"),Ri("onStream")];const qS=Sl({fields:US,name:"streaming",active:FS,state:ZS}),WS=(e, t, o)=>{const n=mu.getValue(o);mu.setValue(t,n),GS(t)},$S=(e, t)=>{const o=e.element,n=Ws(o),r=o.dom;"number"!==St(o,"type")&&t(r,n)},GS= e=>{$S(e,((e, t)=>e.setSelectionRange(t.length,t.length)))},KS=k("alloy.typeahead.itemexecute"),YS=k([ur("lazySink"),or("fetch"),vr("minChars",5),vr("responseTime",1e3),Mi("onOpen"),vr("getHotspot",E.some),vr("getAnchorOverrides",k({})),vr("layouts",E.none()),vr("eventOrder",{}),Or("model",{},[vr("getDisplayText",(e=>void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.value)),vr("selectsOver",!0),vr("populateFromBrowse",!0)]),Mi("onSetValue"),Ni("onExecute"),Mi("onItemExecute"),vr("inputClasses",[]),vr("inputAttributes",{}),vr("inputStyles",{}),vr("matchWidth",!0),vr("useMinWidth",!1),vr("dismissOnBlur",!0),Ei(["openClass"]),ur("initialData"),gu("typeaheadBehaviours",[eh,mu,qS,Pp,lh,ow]),er("lazyTypeaheadComp",(()=>Tr(E.none))),er("previewing",(()=>Tr(!0)))].concat(Ay()).concat(vw())),XS=k([ju({schema:[Ti()],name:"menu",overrides: e=>({fakeFocus:!0,onHighlightItem:(t, o, n)=>{e.previewing.get()?e.lazyTypeaheadComp.get().each((t=>{((e, t, o)=>{if(e.selectsOver){const n=mu.getValue(t),r=e.getDisplayText(n),a=mu.getValue(o);return 0===e.getDisplayText(a).indexOf(r)?E.some((()=>{WS(0,t,o),((e, t)=>{$S(e,((e, o)=>e.setSelectionRange(t,o.length)))})(t,r.length)})):E.none()}return E.none()})(e.model,t,n).fold((()=>{e.model.selectsOver?(Zm.dehighlight(o,n),e.previewing.set(!0)):e.previewing.set(!1)}),(t=>{t(),e.previewing.set(!1)}))})):e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&WS(e.model,t,n)}))},onExecute:(t, o)=>e.lazyTypeaheadComp.get().map((e=>(Da(e,KS(),{item:o}),!0))),onHover:(t, o)=>{e.previewing.set(!1),e.lazyTypeaheadComp.get().each((t=>{e.model.populateFromBrowse&&WS(e.model,t,o)}))}})})]),JS=hm({name:"Typeahead",configFields:YS(),partFields:XS(),factory:(e, t, o, n)=>{const r=(t, o, r)=>{e.previewing.set(!1);const a=ow.getCoupled(t,"sandbox");if(Wd.isOpen(a))vm.getCurrent(a).each((e=>{Zm.getHighlighted(e).fold((()=>{r(e)}),(()=>{Ha(a,e.element,"keydown",o)}))}));else{const o= e=>{vm.getCurrent(e).each(r)};mw(e,s(t),t,a,n,o,Lh.HighlightMenuAndItem).get(y)}},a=My(e),s= e=> t=>t.map((t=>{const o=fe(t.menus),n=G(o,(e=>V(e.items,(e=>"item"===e.type))));return mu.getState(e).update(P(n,(e=>e.data))),t})),i= e=>vm.getCurrent(e),l="typeaheadevents",c=[eh.config({}),mu.config({onSetValue:e.onSetValue,store:{mode:"dataset",getDataKey: e=>Ws(e.element),getFallbackEntry: e=>({value:e,meta:{}}),setValue:(t, o)=>{$s(t.element,e.model.getDisplayText(o))},...e.initialData.map((e=>Ar("initialValue",e))).getOr({})}}),qS.config({stream:{mode:"throttle",delay:e.responseTime,stopEvent:!1},onStream:(t, o)=>{const r=ow.getCoupled(t,"sandbox");if(eh.isFocused(t)&&Ws(t.element).length>=e.minChars){const o=i(r).bind((e=>Zm.getHighlighted(e).map(mu.getValue)));e.previewing.set(!0);const a= t=>{i(r).each((t=>{o.fold((()=>{e.model.selectsOver&&Zm.highlightFirst(t)}),(e=>{Zm.highlightBy(t,(t=>mu.getValue(t).value===e.value)),Zm.getHighlighted(t).orThunk((()=>(Zm.highlightFirst(t),E.none())))}))}))};mw(e,s(t),t,r,n,a,Lh.HighlightJustMenu).get(y)}},cancelEvent:fa()}),Pp.config({mode:"special",onDown:(e, t)=>(r(e,t,Zm.highlightFirst),E.some(!0)),onEscape: e=>{const t=ow.getCoupled(e,"sandbox");return Wd.isOpen(t)?(Wd.close(t),E.some(!0)):E.none()},onUp:(e, t)=>(r(e,t,Zm.highlightLast),E.some(!0)),onEnter: t=>{const o=ow.getCoupled(t,"sandbox"),n=Wd.isOpen(o);if(n&&!e.previewing.get())return i(o).bind((e=>Zm.getHighlighted(e))).map((e=>(Da(t,KS(),{item:e}),!0)));{const r=mu.getValue(t);return Ra(t,fa()),e.onExecute(o,t,r),n&&Wd.close(o),E.some(!0)}}}),lh.config({toggleClass:e.markers.openClass,aria:{mode:"expanded"}}),ow.config({others:{sandbox: t=>yw(e,t,{onOpen:()=>lh.on(t),onClose:()=>lh.off(t)})}}),Kp(l,[Ya((t=>{e.lazyTypeaheadComp.set(E.some(t))})),Xa((t=>{e.lazyTypeaheadComp.set(E.none())})),Qa((t=>{const o=y;pw(e,s(t),t,n,o,Lh.HighlightMenuAndItem).get(y)})),Va(KS(),((t, o)=>{const n=ow.getCoupled(t,"sandbox");WS(e.model,t,o.event.item),Ra(t,fa()),e.onItemExecute(t,n,o.event.item,mu.getValue(t)),Wd.close(n),GS(t)}))].concat(e.dismissOnBlur?[Va(la(),(e=>{const t=ow.getCoupled(e,"sandbox");Bl(t.element).isNone()&&Wd.close(t)}))]:[]))],d={[xa()]:[mu.name(),qS.name(),l],...e.eventOrder};return{uid:e.uid,dom:Ry(fn(e,{inputAttributes:{role:"combobox","aria-autocomplete":"list","aria-haspopup":"true"}})),behaviours:{...a,...hu(e.typeaheadBehaviours,c)},eventOrder:d}}}),QS= e=>({...e,toCached:()=>QS(e.toCached()),bindFuture: t=>QS(e.bind((e=>e.fold((e=>lw(rn.error(e))),(e=>t(e)))))),bindResult: t=>QS(e.map((e=>e.bind(t)))),mapResult: t=>QS(e.map((e=>e.map(t)))),mapError: t=>QS(e.map((e=>e.mapError(t)))),foldResult:(t, o)=>e.map((e=>e.fold(t,o))),withTimeout:(t, o)=>QS(iw((n=>{let r=!1;const a=setTimeout((()=>{r=!0,n(rn.error(o()))}),t);e.get((e=>{r||(clearTimeout(a),n(e))}))})))}),ez= e=>QS(iw(e)),tz=(e, t, o=[], n, r, a)=>{const s=t.fold((()=>({})),(e=>({action:e}))),i={buttonBehaviours:xl([kv((()=>!e.enabled||a.isDisabled())),vv(),Qw.config({}),Kp("button press",[ja("click"),ja("mousedown")])].concat(o)),eventOrder:{click:["button press","alloy.base.behaviour"],mousedown:["button press","alloy.base.behaviour"]},...s},l=fn(i,{dom:n});return fn(l,{components:r})},oz=(e, t, o, n=[])=>{const r={tag:"button",classes:["tox-tbtn"],attributes:e.tooltip.map((e=>({"aria-label":o.translate(e),title:o.translate(e)}))).getOr({})},a=e.icon.map((e=>qC(e,o.icons))),s=Tv([a]);return tz(e,t,n,r,s,o)},nz= e=>{switch(e){case"primary":return["tox-button"];case"toolbar":return["tox-tbtn"];default:return["tox-button","tox-button--secondary"]}},rz=(e, t, o, n=[], r=[])=>{const a=o.translate(e.text),s=e.icon.map((e=>qC(e,o.icons))),i=[s.getOrThunk((()=>ti(a)))],l=e.buttonType.getOr(e.primary||e.borderless?"primary":"secondary"),c=[...nz(l),...s.isSome()?["tox-button--icon"]:[],...e.borderless?["tox-button--naked"]:[],...r];return tz(e,t,n,{tag:"button",classes:c,attributes:{title:a}},i,o)},az=(e, t, o, n=[], r=[])=>{const a=rz(e,E.some(t),o,n,r);return jh.sketch(a)},sz=(e, t)=> o=>{"custom"===t?Da(o,l_,{name:e,value:{}}):"submit"===t?Ra(o,c_):"cancel"===t?Ra(o,i_):console.error("Unknown button type: ",t)},iz=(e, t, o)=>{if(((e, t)=>"menu"===t)(0,t)){const t=()=>a,n=e,r={...e,type:"menubutton",search:E.none(),onSetup: t=>(t.setEnabled(e.enabled),y),fetch:NS(n.items,t,o)},a=Vh(MS(r,"tox-tbtn",o,E.none()));return a.asSpec()}if(((e, t)=>"custom"===t||"cancel"===t||"submit"===t)(0,t)){const n=sz(e.name,t),r={...e,borderless:!1};return az(r,n,o.shared.providers,[])}if(((e, t)=>"togglebutton"===t)(0,t))return((e, t)=>{var o,n,r;const a=E.from(e.icon).map((e=>WC(e,t.icons))).map(Vh),s={...e,name:null!==(o=e.name)&&void 0!==o?o:"",primary:"primary"===e.buttonType,buttonType:E.from(e.buttonType),tooltip:E.from(e.tooltip),icon:E.from(e.name),enabled:null!==(n=e.enabled)&&void 0!==n&&n,borderless:!1},i=s.tooltip.map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),l=nz(null!==(r=e.buttonType)&&void 0!==r?r:"secondary"),c=!!e.icon&&!!e.text,d={tag:"button",classes:[...l.concat(["tox-button--icon"]),...e.active?["tox-button--enabled"]:[],...c?["tox-button--icon-and-text"]:[]],attributes:i},u=t.translate(e.text),m=ti(u),g=[...Tv([a.map((e=>e.asSpec()))]),...c?[m]:[]],p=tz(s,E.some((o=>{Da(o,l_,{name:e.name,value:{setIcon: e=>{a.map((n=>n.getOpt(o).each((o=>{Gp.set(o,[WC(e,t.icons)])}))))}}})})),[],d,g,t);return jh.sketch(p)})({...e,tooltip:e.tooltip,text:e.text.getOrUndefined(),buttonType:e.buttonType.getOrUndefined()},o.shared.providers);throw console.error("Unknown footer button type: ",t),new Error("Unknown footer button type")},lz={type:"separator"},cz= e=>({type:"menuitem",value:e.url,text:e.title,meta:{attach:e.attach},onAction:y}),dz=(e, t)=>({type:"menuitem",value:t,text:e,meta:{attach:void 0},onAction:y}),uz=(e, t)=>(e=>P(e,cz))(((e, t)=>V(t,(t=>t.type===e)))(e,t)),mz= e=>uz("header",e.targets),gz= e=>uz("anchor",e.targets),pz= e=>E.from(e.anchorTop).map((e=>dz("<top>",e))).toArray(),hz= e=>E.from(e.anchorBottom).map((e=>dz("<bottom>",e))).toArray(),fz=(e, t)=>{const o=e.toLowerCase();return V(t,(e=>{var t;const n=void 0!==e.meta&&void 0!==e.meta.text?e.meta.text:e.text,r=null!==(t=e.value)&&void 0!==t?t:"";return Oe(n.toLowerCase(),o)||Oe(r.toLowerCase(),o)}))},yz=ls("aria-invalid"),bz=(e, t)=>{e.dom.checked=t},vz= e=>e.dom.checked,kz= e=>(t, o, n, r)=>ye(o,"name").fold((()=>e(o,r,E.none())),(a=>t.field(a,e(o,r,ye(n,a))))),wz={bar:kz(((e, t)=>((e, t)=>({dom:{tag:"div",classes:["tox-bar","tox-form__controls-h-stack"]},components:P(e.items,t.interpreter)}))(e,t.shared))),collection:kz(((e, t, o)=>((e, t, o)=>{const n=e.label.map((e=>r_(e,t))),r= e=>(t, o)=>{hi(o.event.target,"[data-collection-item-value]").each((n=>{e(t,o,n,St(n,"data-collection-item-value"))}))},a=r(((o, n, r, a)=>{n.stop(),t.isDisabled()||Da(o,l_,{name:e.name,value:a})})),s=[Va($r(),r(((e, t, o)=>{Ml(o)}))),Va(ea(),a),Va(ga(),a),Va(Gr(),r(((e, t, o)=>{pi(e.element,"."+ky).each((e=>{js(e,ky)})),Fs(o,ky)}))),Va(Kr(),r((e=>{pi(e.element,"."+ky).each((e=>{js(e,ky)}))}))),Qa(r(((t, o, n, r)=>{Da(t,l_,{name:e.name,value:r})})))],i=(e, t)=>P($c(e.element,".tox-collection__item"),t),l=Yw.parts.field({dom:{tag:"div",classes:["tox-collection"].concat(1!==e.columns?["tox-collection--grid"]:["tox-collection--list"])},components:[],factory:{sketch:w},behaviours:xl([Rm.config({disabled:t.isDisabled,onDisabled: e=>{i(e,(e=>{Fs(e,"tox-collection__item--state-disabled"),xt(e,"aria-disabled",!0)}))},onEnabled: e=>{i(e,(e=>{js(e,"tox-collection__item--state-disabled"),Tt(e,"aria-disabled")}))}}),vv(),Gp.config({}),mu.config({store:{mode:"memory",initialValue:o.getOr([])},onSetValue:(o, n)=>{((o, n)=>{const r=P(n,(o=>{const n=Zh.translate(o.text),r=1===e.columns?`<div class="tox-collection__item-label">${n}</div>`:"",a=`<div class="tox-collection__item-icon">${o.icon}</div>`,s={_:" "," - ":" ","-":" "},i=n.replace(/\_| \- |\-/g,(e=>s[e]));return`<div class="tox-collection__item${t.isDisabled()?" tox-collection__item--state-disabled":""}" tabindex="-1" data-collection-item-value="${e_.encodeAllRaw(o.value)}" title="${i}" aria-label="${i}">${a}${r}</div>`})),a="auto"!==e.columns&&e.columns>1?H(r,e.columns):[r],s=P(a,(e=>`<div class="tox-collection__group">${e.join("")}</div>`));ts(o.element,s.join(""))})(o,n),"auto"===e.columns&&rv(o,5,"tox-collection__item").each((({numRows:e,numColumns:t})=>{Pp.setGridSize(o,e,t)})),Ra(o,g_)}}),Qw.config({}),Pp.config((c=e.columns,1===c?{mode:"menu",moveOnTab:!1,selector:".tox-collection__item"}:"auto"===c?{mode:"flatgrid",selector:".tox-collection__item",initSize:{numColumns:1,numRows:1}}:{mode:"matrix",selectors:{row:".tox-collection__group",cell:`.${gy}`}})),Kp("collection-events",s)]),eventOrder:{[ua()]:["disabling","alloy.base.behaviour","collection-events"]}});var c;return t_(n,l,["tox-form__group--collection"],[])})(e,t.shared.providers,o))),alertbanner:kz(((e, t)=>((e, t)=>Ww.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:[jh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--naked","tox-button--icon"],innerHtml:Kh(e.icon,t.icons),attributes:{title:t.translate(e.iconTooltip)}},action: t=>{Da(t,l_,{name:"alert-banner",value:e.url})},buttonBehaviours:xl([Yh()])})]},{dom:{tag:"div",classes:["tox-notification__body"],innerHtml:t.translate(e.text)}}]}))(e,t.shared.providers))),input:kz(((e, t, o)=>((e, t, o)=>gS({name:e.name,multiline:!1,label:e.label,inputMode:e.inputMode,placeholder:e.placeholder,flex:!1,disabled:!e.enabled,classname:"tox-textfield",validation:E.none(),maximized:e.maximized,data:o},t))(e,t.shared.providers,o))),textarea:kz(((e, t, o)=>((e, t, o)=>gS({name:e.name,multiline:!0,label:e.label,inputMode:E.none(),placeholder:e.placeholder,flex:!0,disabled:!e.enabled,classname:"tox-textarea",validation:E.none(),maximized:e.maximized,data:o},t))(e,t.shared.providers,o))),label:kz(((e, t)=>((e, t)=>{return{dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"label",classes:["tox-label"]},components:[ti(t.providers.translate(e.label))]},...P(e.items,t.interpreter)],behaviours:xl([wC(),Gp.config({}),(o=E.none(),SC(o,es,ts)),Pp.config({mode:"acyclic"})])};var o})(e,t.shared))),iframe:(WO=(e, t, o)=>((e, t, o)=>{const n=e.sandboxed,r=e.transparent,a="tox-dialog__iframe",s={...e.label.map((e=>({title:e}))).getOr({}),...o.map((e=>({srcdoc:e}))).getOr({}),...n?{sandbox:"allow-scripts allow-same-origin"}:{}},i=(e=>{const t=Tr(e.getOr(""));return{getValue: e=>t.get(),setValue:(e, o)=>{t.get()!==o&&xt(e.element,"srcdoc",o),t.set(o)}}})(o),l=e.label.map((e=>r_(e,t))),c=Yw.parts.field({factory:{sketch: e=>LC({uid:e.uid,dom:{tag:"iframe",attributes:s,classes:r?[a]:[a,`${a}--opaque`]},behaviours:xl([Qw.config({}),eh.config({}),TC(o,i.getValue,i.setValue)])})}});return t_(l,c,["tox-form__group--stretched"],[])})(e,t.shared.providers,o),(e, t, o, n)=>{const r=fn(t,{source:"dynamic"});return kz(WO)(e,r,o,n)}),button:kz(((e, t)=>((e, t)=>{const o=sz(e.name,"custom");return n=E.none(),r=Yw.parts.field({factory:jh,...rz(e,E.some(o),t,[EC(""),wC()])}),t_(n,r,[],[]);var n,r})(e,t.shared.providers))),checkbox:kz(((e, t, o)=>((e, t, o)=>{const n= e=>(e.element.dom.click(),E.some(!0)),r=Yw.parts.field({factory:{sketch:w},dom:{tag:"input",classes:["tox-checkbox__input"],attributes:{type:"checkbox"}},behaviours:xl([wC(),Rm.config({disabled:()=>!e.enabled||t.isDisabled()}),Qw.config({}),eh.config({}),OC(o,vz,bz),Pp.config({mode:"special",onEnter:n,onSpace:n,stopSpaceKeyup:!0}),Kp("checkbox-events",[Va(Qr(),((t, o)=>{Da(t,a_,{name:e.name})}))])])}),a=Yw.parts.label({dom:{tag:"span",classes:["tox-checkbox__label"]},components:[ti(t.translate(e.label))],behaviours:xl([C_.config({})])}),s= e=>Jh("checked"===e?"selected":"unselected",{tag:"span",classes:["tox-icon","tox-checkbox-icon__"+e]},t.icons),i=Vh({dom:{tag:"div",classes:["tox-checkbox__icons"]},components:[s("checked"),s("unchecked")]});return Yw.sketch({dom:{tag:"label",classes:["tox-checkbox"]},components:[r,i.asSpec(),a],fieldBehaviours:xl([Rm.config({disabled:()=>!e.enabled||t.isDisabled(),disableClass:"tox-checkbox--disabled",onDisabled: e=>{Yw.getField(e).each(Rm.disable)},onEnabled: e=>{Yw.getField(e).each(Rm.enable)}}),vv()])})})(e,t.shared.providers,o))),colorinput:kz(((e, t, o)=>((e, t, o, n)=>{const r=Yw.parts.field({factory:Dy,inputClasses:["tox-textfield"],data:n,onSetValue: e=>x_.run(e).get(y),inputBehaviours:xl([Rm.config({disabled:t.providers.isDisabled}),vv(),Qw.config({}),x_.config({invalidClass:"tox-textbox-field-invalid",getRoot: e=>at(e.element),notify:{onValid: e=>{const t=mu.getValue(e);Da(e,S_,{color:t})}},validator:{validateOnLoad:!1,validate: e=>{const t=mu.getValue(e);if(0===t.length)return lw(rn.value(!0));{const e=Be("span");Mt(e,"background-color",t);const o=Lt(e,"background-color").fold((()=>rn.error("blah")),(e=>rn.value(t)));return lw(o)}}}})]),selectOnFocus:!1}),a=e.label.map((e=>r_(e,t.providers))),s=(e, t)=>{Da(e,z_,{value:t})},i=Vh(((e, t)=>_w.sketch({dom:e.dom,components:e.components,toggleClass:"mce-active",dropdownBehaviours:xl([kv(t.providers.isDisabled),vv(),C_.config({}),Qw.config({})]),layouts:e.layouts,sandboxClasses:["tox-dialog__popups"],lazySink:t.getSink,fetch: o=>iw((t=>e.fetch(t))).map((n=>E.from(Aw(fn(Zk(ls("menu-value"),n,(t=>{e.onItemAction(o,t)}),e.columns,e.presets,uy.CLOSE_ON_EXECUTE,O,t.providers),{movement:qk(e.columns,e.presets)}))))),parts:{menu:Ey(0,0,e.presets)}}))({dom:{tag:"span",attributes:{"aria-label":t.providers.translate("Color swatch")}},layouts:{onRtl:()=>[al,rl,cl],onLtr:()=>[rl,al,cl]},components:[],fetch:Ik(o.getColors(e.storageKey),e.storageKey,o.hasCustomColors()),columns:o.getColorCols(e.storageKey),presets:"color",onItemAction:(t, n)=>{i.getOpt(t).each((t=>{"custom"===n?o.colorPicker((o=>{o.fold((()=>Ra(t,O_)),(o=>{s(t,o),fk(e.storageKey,o)}))}),"#ffffff"):s(t,"remove"===n?"":n)}))}},t));return Yw.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:a.toArray().concat([{dom:{tag:"div",classes:["tox-color-input"]},components:[r,i.asSpec()]}]),fieldBehaviours:xl([Kp("form-field-events",[Va(S_,((t, o)=>{i.getOpt(t).each((e=>{Mt(e.element,"background-color",o.event.color)})),Da(t,a_,{name:e.name})})),Va(z_,((e, t)=>{Yw.getField(e).each((o=>{mu.setValue(o,t.event.value),vm.getCurrent(e).each(eh.focus)}))})),Va(O_,((e, t)=>{Yw.getField(e).each((t=>{vm.getCurrent(e).each(eh.focus)}))}))])])})})(e,t.shared,t.colorinput,o))),colorpicker:kz(((e, t, o)=>((e, t, o)=>{const n= e=>"tox-"+e,r=kC((e=> t=>e.translate(AC[t]))(t),n),a=Vh(r.sketch({dom:{tag:"div",classes:[n("color-picker-container")],attributes:{role:"presentation"}},onValidHex: e=>{Da(e,l_,{name:"hex-valid",value:!0})},onInvalidHex: e=>{Da(e,l_,{name:"hex-valid",value:!1})}}));return{dom:{tag:"div"},components:[a.asSpec()],behaviours:xl([TC(o,(e=>{const t=a.get(e);return vm.getCurrent(t).bind((e=>mu.getValue(e).hex)).map((e=>"#"+ze(e,"#"))).getOr("")}),((e, t)=>{const o=E.from(/^#([a-fA-F0-9]{3}(?:[a-fA-F0-9]{3})?)/.exec(t)).bind((e=>te(e,1))),n=a.get(e);vm.getCurrent(n).fold((()=>{console.log("Can not find form")}),(e=>{mu.setValue(e,{hex:o.getOr("")}),pC.getField(e,"hex").each((e=>{Ra(e,Jr())}))}))})),wC()])}})(0,t.shared.providers,o))),dropzone:kz(((e, t, o)=>((e, t, o)=>{const n=(e, t)=>{t.stop()},r= e=>(t, o)=>{F(e,(e=>{e(t,o)}))},a=(e, t)=>{var o;if(!Rm.isDisabled(e)){const n=t.event.raw;i(e,null===(o=n.dataTransfer)||void 0===o?void 0:o.files)}},s=(e, t)=>{const o=t.event.raw.target;i(e,o.files)},i=(o, n)=>{n&&(mu.setValue(o,((e, t)=>{const o=NC.explode(t.getOption("images_file_types"));return V(re(e),(e=>L(o,(t=>Ee(e.name.toLowerCase(),`.${t.toLowerCase()}`)))))})(n,t)),Da(o,a_,{name:e.name}))},l=Vh({dom:{tag:"input",attributes:{type:"file",accept:"image/*"},styles:{display:"none"}},behaviours:xl([Kp("input-file-events",[$a(ea()),$a(ga())])])}),c=e.label.map((e=>r_(e,t))),d=Yw.parts.field({factory:{sketch: e=>({uid:e.uid,dom:{tag:"div",classes:["tox-dropzone-container"]},behaviours:xl([EC(o.getOr([])),wC(),Rm.config({}),lh.config({toggleClass:"dragenter",toggleOnExecute:!1}),Kp("dropzone-events",[Va("dragenter",r([n,lh.toggle])),Va("dragleave",r([n,lh.toggle])),Va("dragover",n),Va("drop",r([n,a])),Va(Qr(),s)])]),components:[{dom:{tag:"div",classes:["tox-dropzone"],styles:{}},components:[{dom:{tag:"p"},components:[ti(t.translate("Drop an image here"))]},jh.sketch({dom:{tag:"button",styles:{position:"relative"},classes:["tox-button","tox-button--secondary"]},components:[ti(t.translate("Browse for an image")),l.asSpec()],action: e=>{l.get(e).element.dom.click()},buttonBehaviours:xl([Qw.config({}),kv(t.isDisabled),vv()])})]}]})}});return t_(c,d,["tox-form__group--stretched"],[])})(e,t.shared.providers,o))),grid:kz(((e, t)=>((e, t)=>({dom:{tag:"div",classes:["tox-form__grid",`tox-form__grid--${e.columns}col`]},components:P(e.items,t.interpreter)}))(e,t.shared))),listbox:kz(((e, t, o)=>((e, t, o)=>{const n=t.shared.providers,r=o.bind((t=>rS(e.items,t))).orThunk((()=>oe(e.items).filter(tS))),a=e.label.map((e=>r_(e,n))),s=Yw.parts.field({dom:{},factory:{sketch: o=>YC({uid:o.uid,text:r.map((e=>e.text)),icon:E.none(),tooltip:e.label,role:E.none(),fetch:(o, n)=>{const r=nS(o,e.name,e.items,mu.getValue(o));n(eS(r,uy.CLOSE_ON_EXECUTE,t,{isHorizontalMenu:!1,search:E.none()}))},onSetup:k(y),getApi:k({}),columns:1,presets:"normal",classes:[],dropdownBehaviours:[Qw.config({}),TC(r.map((e=>e.value)),(e=>St(e.element,oS)),((t, o)=>{rS(e.items,o).each((e=>{xt(t.element,oS,e.value),Da(t,GC,{text:e.text})}))}))]},"tox-listbox",t.shared)}}),i={dom:{tag:"div",classes:["tox-listboxfield"]},components:[s]};return Yw.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:$([a.toArray(),[i]]),fieldBehaviours:xl([Rm.config({disabled:k(!e.enabled),onDisabled: e=>{Yw.getField(e).each(Rm.disable)},onEnabled: e=>{Yw.getField(e).each(Rm.enable)}})])})})(e,t,o))),selectbox:kz(((e, t, o)=>((e, t, o)=>{const n=P(e.items,(e=>({text:t.translate(e.text),value:e.value}))),r=e.label.map((e=>r_(e,t))),a=Yw.parts.field({dom:{},...o.map((e=>({data:e}))).getOr({}),selectAttributes:{size:e.size},options:n,factory:aS,selectBehaviours:xl([Rm.config({disabled:()=>!e.enabled||t.isDisabled()}),Qw.config({}),Kp("selectbox-change",[Va(Qr(),((t, o)=>{Da(t,a_,{name:e.name})}))])])}),s=e.size>1?E.none():E.some(Jh("chevron-down",{tag:"div",classes:["tox-selectfield__icon-js"]},t.icons)),i={dom:{tag:"div",classes:["tox-selectfield"]},components:$([[a],s.toArray()])};return Yw.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:$([r.toArray(),[i]]),fieldBehaviours:xl([Rm.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled: e=>{Yw.getField(e).each(Rm.disable)},onEnabled: e=>{Yw.getField(e).each(Rm.enable)}}),vv()])})})(e,t.shared.providers,o))),sizeinput:kz(((e, t)=>((e, t)=>{let o=mS;const n=ls("ratio-event"),r= e=>Jh(e,{tag:"span",classes:["tox-icon","tox-lock-icon__"+e]},t.icons),a=cS.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:[r("lock"),r("unlock")],buttonBehaviours:xl([Rm.config({disabled:()=>!e.enabled||t.isDisabled()}),vv(),Qw.config({})])}),s= e=>({dom:{tag:"div",classes:["tox-form__group"]},components:e}),i= o=>Yw.parts.field({factory:Dy,inputClasses:["tox-textfield"],inputBehaviours:xl([Rm.config({disabled:()=>!e.enabled||t.isDisabled()}),vv(),Qw.config({}),Kp("size-input-events",[Va(Gr(),((e, t)=>{Da(e,n,{isField1:o})})),Va(Qr(),((t, o)=>{Da(t,a_,{name:e.name})}))])]),selectOnFocus:!1}),l= e=>({dom:{tag:"label",classes:["tox-label"]},components:[ti(t.translate(e))]}),c=cS.parts.field1(s([Yw.parts.label(l("Width")),i(!0)])),d=cS.parts.field2(s([Yw.parts.label(l("Height")),i(!1)]));return cS.sketch({dom:{tag:"div",classes:["tox-form__group"]},components:[{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:[c,d,s([l(" "),a])]}],field1Name:"width",field2Name:"height",locked:!0,markers:{lockClass:"tox-locked"},onLockedChange:(e, t, n)=>{dS(mu.getValue(e)).each((e=>{o(e).each((e=>{mu.setValue(t,(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};let o=e.value.toFixed((n=e.unit)in t?t[n]:1);var n;return-1!==o.indexOf(".")&&(o=o.replace(/\.?0*$/,"")),o+e.unit})(e))}))}))},coupledFieldBehaviours:xl([Rm.config({disabled:()=>!e.enabled||t.isDisabled(),onDisabled: e=>{cS.getField1(e).bind(Yw.getField).each(Rm.disable),cS.getField2(e).bind(Yw.getField).each(Rm.disable),cS.getLock(e).each(Rm.disable)},onEnabled: e=>{cS.getField1(e).bind(Yw.getField).each(Rm.enable),cS.getField2(e).bind(Yw.getField).each(Rm.enable),cS.getLock(e).each(Rm.enable)}}),vv(),Kp("size-input-events2",[Va(n,((e, t)=>{const n=t.event.isField1,r=n?cS.getField1(e):cS.getField2(e),a=n?cS.getField2(e):cS.getField1(e),s=r.map(mu.getValue).getOr(""),i=a.map(mu.getValue).getOr("");o=((e, t)=>{const o=dS(e).toOptional(),n=dS(t).toOptional();return _e(o,n,((e, t)=>uS(e,t.unit).map((e=>t.value/e)).map((e=>{return o=e,n=t.unit, e=>uS(e,n).map((e=>({value:e*o,unit:n})));var o,n})).getOr(mS))).getOr(mS)})(s,i)}))])])})})(e,t.shared.providers))),slider:kz(((e, t, o)=>((e, t, o)=>{const n=sC.parts.label({dom:{tag:"label",classes:["tox-label"]},components:[ti(t.translate(e.label))]}),r=sC.parts.spectrum({dom:{tag:"div",classes:["tox-slider__rail"],attributes:{role:"presentation"}}}),a=sC.parts.thumb({dom:{tag:"div",classes:["tox-slider__handle"],attributes:{role:"presentation"}}});return sC.sketch({dom:{tag:"div",classes:["tox-slider"],attributes:{role:"presentation"}},model:{mode:"x",minX:e.min,maxX:e.max,getInitialValue:k(o.getOrThunk((()=>(Math.abs(e.max)-Math.abs(e.min))/2)))},components:[n,r,a],sliderBehaviours:xl([wC(),eh.config({})]),onChoose:(t, o, n)=>{Da(t,a_,{name:e.name,value:n})}})})(e,t.shared.providers,o))),urlinput:kz(((e, t, o)=>((e, t, o, n)=>{const r=t.shared.providers,a= t=>{const n=mu.getValue(t);o.addToHistory(n.value,e.filetype)},s={...n.map((e=>({initialData:e}))).getOr({}),dismissOnBlur:!0,inputClasses:["tox-textfield"],sandboxClasses:["tox-dialog__popups"],inputAttributes:{"aria-errormessage":yz,type:"url"},minChars:0,responseTime:0,fetch: n=>{const r=((e, t, o)=>{var n,r;const a=mu.getValue(t),s=null!==(r=null===(n=null==a?void 0:a.meta)||void 0===n?void 0:n.text)&&void 0!==r?r:a.value;return o.getLinkInformation().fold((()=>[]),(t=>{const n=fz(s,(e=>P(e,(e=>dz(e,e))))(o.getHistory(e)));return"file"===e?(r=[n,fz(s,mz(t)),fz(s,$([pz(t),gz(t),hz(t)]))],U(r,((e, t)=>0===e.length||0===t.length?e.concat(t):e.concat(lz,t)),[])):n;var r}))})(e.filetype,n,o),a=eS(r,uy.BUBBLE_TO_SANDBOX,t,{isHorizontalMenu:!1,search:E.none()});return lw(a)},getHotspot: e=>g.getOpt(e),onSetValue:(e, t)=>{e.hasConfigured(x_)&&x_.run(e).get(y)},typeaheadBehaviours:xl([...o.getValidationHandler().map((t=>x_.config({getRoot: e=>at(e.element),invalidClass:"tox-control-wrap--status-invalid",notify:{onInvalid:(e, t)=>{c.getOpt(e).each((e=>{xt(e.element,"title",r.translate(t))}))}},validator:{validate: o=>{const n=mu.getValue(o);return ez((o=>{t({type:e.filetype,url:n.value},(e=>{if("invalid"===e.status){const t=rn.error(e.message);o(t)}else{const t=rn.value(e.message);o(t)}}))}))},validateOnLoad:!1}}))).toArray(),Rm.config({disabled:()=>!e.enabled||r.isDisabled()}),Qw.config({}),Kp("urlinput-events",[Va(Jr(),(t=>{const o=Ws(t.element),n=o.trim();n!==o&&$s(t.element,n),"file"===e.filetype&&Da(t,a_,{name:e.name})})),Va(Qr(),(t=>{Da(t,a_,{name:e.name}),a(t)})),Va(ca(),(t=>{Da(t,a_,{name:e.name}),a(t)}))])]),eventOrder:{[Jr()]:["streaming","urlinput-events","invalidating"]},model:{getDisplayText: e=>e.value,selectsOver:!1,populateFromBrowse:!1},markers:{openClass:"tox-textfield--popup-open"},lazySink:t.shared.getSink,parts:{menu:Ey(0,0,"normal")},onExecute:(e, t, o)=>{Da(t,c_,{})},onItemExecute:(t, o, n, r)=>{a(t),Da(t,a_,{name:e.name})}},i=Yw.parts.field({...s,factory:JS}),l=e.label.map((e=>r_(e,r))),c=Vh(((e, t, o=e, n=e)=>Jh(o,{tag:"div",classes:["tox-icon","tox-control-wrap__status-icon-"+e],attributes:{title:r.translate(n),"aria-live":"polite",...t.fold((()=>({})),(e=>({id:e})))}},r.icons))("invalid",E.some(yz),"warning")),d=Vh({dom:{tag:"div",classes:["tox-control-wrap__status-icon-wrap"]},components:[c.asSpec()]}),u=o.getUrlPicker(e.filetype),m=ls("browser.url.event"),g=Vh({dom:{tag:"div",classes:["tox-control-wrap"]},components:[i,d.asSpec()],behaviours:xl([Rm.config({disabled:()=>!e.enabled||r.isDisabled()})])}),p=Vh(az({name:e.name,icon:E.some("browse"),text:e.label.getOr(""),enabled:e.enabled,primary:!1,buttonType:E.none(),borderless:!0},(e=>Ra(e,m)),r,[],["tox-browse-url"]));return Yw.sketch({dom:n_([]),components:l.toArray().concat([{dom:{tag:"div",classes:["tox-form__controls-h-stack"]},components:$([[g.asSpec()],u.map((()=>p.asSpec())).toArray()])}]),fieldBehaviours:xl([Rm.config({disabled:()=>!e.enabled||r.isDisabled(),onDisabled: e=>{Yw.getField(e).each(Rm.disable),p.getOpt(e).each(Rm.disable)},onEnabled: e=>{Yw.getField(e).each(Rm.enable),p.getOpt(e).each(Rm.enable)}}),vv(),Kp("url-input-events",[Va(m,(t=>{vm.getCurrent(t).each((o=>{const n=mu.getValue(o),r={fieldname:e.name,...n};u.each((n=>{n(r).get((n=>{mu.setValue(o,n),Da(t,a_,{name:e.name})}))}))}))}))])])})})(e,t,t.urlinput,o))),customeditor:kz((e=>{const t=Ql(),o=Vh({dom:{tag:e.tag}}),n=Ql();return{dom:{tag:"div",classes:["tox-custom-editor"]},behaviours:xl([Kp("custom-editor-events",[Ya((r=>{o.getOpt(r).each((o=>{((e=>be(e,"init"))(e)?e.init(o.element.dom):MC.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)}))}))}))]),TC(E.none(),(()=>t.get().fold((()=>n.get().getOr("")),(e=>e.getValue()))),((e, o)=>{t.get().fold((()=>n.set(o)),(e=>e.setValue(o)))})),wC()]),components:[o.asSpec()]}})),htmlpanel:kz((e=>"presentation"===e.presets?Ww.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html}}):Ww.sketch({dom:{tag:"div",classes:["tox-form__group"],innerHtml:e.html,attributes:{role:"document"}},containerBehaviours:xl([Qw.config({}),eh.config({})])}))),imagepreview:kz(((e, t, o)=>((e, t)=>{const o=Tr(t.getOr({url:""})),n=Vh({dom:{tag:"img",classes:["tox-imagepreview__image"],attributes:t.map((e=>({src:e.url}))).getOr({})}}),r=Vh({dom:{tag:"div",classes:["tox-imagepreview__container"],attributes:{role:"presentation"}},components:[n.asSpec()]}),a={};e.height.each((e=>a.height=e));const s=t.map((e=>({url:e.url,zoom:E.from(e.zoom),cachedWidth:E.from(e.cachedWidth),cachedHeight:E.from(e.cachedHeight)})));return{dom:{tag:"div",classes:["tox-imagepreview"],styles:a,attributes:{role:"presentation"}},components:[r.asSpec()],behaviours:xl([wC(),TC(s,(()=>o.get()),((e, t)=>{const a={url:t.url};t.zoom.each((e=>a.zoom=e)),t.cachedWidth.each((e=>a.cachedWidth=e)),t.cachedHeight.each((e=>a.cachedHeight=e)),o.set(a);const s=()=>{const{cachedWidth:t,cachedHeight:o,zoom:n}=a;if(!u(t)&&!u(o)){if(u(n)){const n=((e, t, o)=>{const n=Xt(e),r=Zt(e);return Math.min(n/t,r/o,1)})(e.element,t,o);a.zoom=n}const s=((e, t, o, n, r)=>{const a=o*r,s=n*r,i=Math.max(0,e/2-a/2),l=Math.max(0,t/2-s/2);return{left:i.toString()+"px",top:l.toString()+"px",width:a.toString()+"px",height:s.toString()+"px"}})(Xt(e.element),Zt(e.element),t,o,a.zoom);r.getOpt(e).each((e=>{Nt(e.element,s)}))}};n.getOpt(e).each((o=>{const n=o.element;var r;t.url!==St(n,"src")&&(xt(n,"src",t.url),js(e.element,"tox-imagepreview__loaded")),s(),(r=n,new Promise(((e, t)=>{const o=()=>{a(),e(r)},n=[tc(r,"load",o),tc(r,"error",(()=>{a(),t("Unable to load data from image: "+r.dom.src)}))],a=()=>F(n,(e=>e.unbind()));r.dom.complete&&o()}))).then((t=>{e.getSystem().isConnected()&&(Fs(e.element,"tox-imagepreview__loaded"),a.cachedWidth=t.dom.naturalWidth,a.cachedHeight=t.dom.naturalHeight,s())}))}))}))])}})(e,o))),table:kz(((e, t)=>((e, t)=>{const o= e=>({dom:{tag:"td",innerHtml:t.translate(e)}});return{dom:{tag:"table",classes:["tox-dialog__table"]},components:[(r=e.header,{dom:{tag:"thead"},components:[{dom:{tag:"tr"},components:P(r,(e=>({dom:{tag:"th",innerHtml:t.translate(e)}})))}]}),(n=e.cells,{dom:{tag:"tbody"},components:P(n,(e=>({dom:{tag:"tr"},components:P(e,o)})))})],behaviours:xl([Qw.config({}),eh.config({})])};var n,r})(e,t.shared.providers))),tree:kz(((e, t)=>((e, t)=>{const o=e.onLeafAction.getOr(y),n=ls("tree-id");return{dom:{tag:"div",classes:["tox-tree"],attributes:{role:"tree"}},components:e.items.map((e=>"leaf"===e.type?BS({leaf:e,onLeafAction:o,visible:!0,treeId:n,backstage:t}):PS({directory:e,onLeafAction:o,labelTabstopping:!0,treeId:n,backstage:t}))),behaviours:xl([Pp.config({mode:"flow",selector:".tox-tree--leaf__label--visible, .tox-tree--directory__label--visible",cycles:!1})])}})(e,t))),panel:kz(((e, t)=>((e, t)=>({dom:{tag:"div",classes:e.classes},components:P(e.items,t.shared.interpreter)}))(e,t)))},_z={field:(e, t)=>t,record:k([])},xz=(e, t, o, n)=>{const r=fn(n,{shared:{interpreter: t=>Cz(e,t,o,r)}});return Cz(e,t,o,r)},Cz=(e, t, o, n)=>ye(wz,t.type).fold((()=>(console.error(`Unknown factory type "${t.type}", defaulting to container: `,t),t)),(r=>r(e,t,o,n))),Sz=(e, t, o)=>Cz(_z,e,t,o),zz="layout-inset",Oz= e=>e.x,Tz=(e, t)=>e.x+e.width/2-t.width/2,Ez=(e, t)=>e.x+e.width-t.width,Az= e=>e.y,Mz=(e, t)=>e.y+e.height-t.height,Nz=(e, t)=>e.y+e.height/2-t.height/2,Rz=(e, t, o)=>Hi(Ez(e,t),Mz(e,t),o.insetSouthwest(),Zi(),"southwest",Yi(e,{right:0,bottom:3}),zz),Dz=(e, t, o)=>Hi(Oz(e),Mz(e,t),o.insetSoutheast(),Vi(),"southeast",Yi(e,{left:1,bottom:3}),zz),Bz=(e, t, o)=>Hi(Ez(e,t),Az(e),o.insetNorthwest(),ji(),"northwest",Yi(e,{right:0,top:2}),zz),Lz=(e, t, o)=>Hi(Oz(e),Az(e),o.insetNortheast(),Fi(),"northeast",Yi(e,{left:1,top:2}),zz),Iz=(e, t, o)=>Hi(Tz(e,t),Az(e),o.insetNorth(),Ui(),"north",Yi(e,{top:2}),zz),Hz=(e, t, o)=>Hi(Tz(e,t),Mz(e,t),o.insetSouth(),qi(),"south",Yi(e,{bottom:3}),zz),Pz=(e, t, o)=>Hi(Ez(e,t),Nz(e,t),o.insetEast(),$i(),"east",Yi(e,{right:0}),zz),Fz=(e, t, o)=>Hi(Oz(e),Nz(e,t),o.insetWest(),Wi(),"west",Yi(e,{left:1}),zz),jz= e=>{switch(e){case"north":return Iz;case"northeast":return Lz;case"northwest":return Bz;case"south":return Hz;case"southeast":return Dz;case"southwest":return Rz;case"east":return Pz;case"west":return Fz}},Vz=(e, t, o, n, r)=>Gl(n).map(jz).getOr(Iz)(e,t,o,n,r),Zz= e=>{switch(e){case"north":return Hz;case"northeast":return Dz;case"northwest":return Rz;case"south":return Iz;case"southeast":return Lz;case"southwest":return Bz;case"east":return Fz;case"west":return Pz}},Uz=(e, t, o, n, r)=>Gl(n).map(Zz).getOr(Iz)(e,t,o,n,r),qz={valignCentre:[],alignCentre:[],alignLeft:[],alignRight:[],right:[],left:[],bottom:[],top:[]},Wz=(e, t, o)=>{const n={maxHeightFunction:cc()};return()=>o()?{type:"node",root:ft(ht(e())),node:E.from(e()),bubble:gc(12,12,qz),layouts:{onRtl:()=>[Lz],onLtr:()=>[Bz]},overrides:n}:{type:"hotspot",hotspot:t(),bubble:gc(-12,12,qz),layouts:{onRtl:()=>[rl,al,cl],onLtr:()=>[al,rl,cl]},overrides:n}},$z=(e, t, o)=>()=>o()?{type:"node",root:ft(ht(e())),node:E.from(e()),layouts:{onRtl:()=>[Iz],onLtr:()=>[Iz]}}:{type:"hotspot",hotspot:t(),layouts:{onRtl:()=>[cl],onLtr:()=>[cl]}},Gz=(e, t)=>()=>({type:"selection",root:t(),getSelection:()=>{const t=e.selection.getRng();return E.some(Fc.range(Ie(t.startContainer),t.startOffset,Ie(t.endContainer),t.endOffset))}}),Kz= e=> t=>({type:"node",root:e(),node:t}),Yz=(e, t, o)=>{const n=ty(e),r=()=>Ie(e.getBody()),a=()=>Ie(e.getContentAreaContainer()),s=()=>n||!o();return{inlineDialog:Wz(a,t,s),banner:$z(a,t,s),cursor:Gz(e,r),node:Kz(r)}},Xz= e=>(t, o)=>{Vk(e)(t,o)},Jz= e=>()=>Ek(e),Qz= e=> t=>Ak(e,t),eO= e=> t=>Tk(e,t),tO= e=>()=>Hf(e),oO= e=>ve(e,"items"),nO= e=>ve(e,"format"),rO=[{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"}]}],aO= e=>U(e,((e, t)=>{if(be(t,"items")){const o=aO(t.items);return{customFormats:e.customFormats.concat(o.customFormats),formats:e.formats.concat([{title:t.title,items:o.formats}])}}if(be(t,"inline")||(e=>be(e,"block"))(t)||(e=>be(e,"selector"))(t)){const o=`custom-${a(t.name)?t.name:t.title.toLowerCase()}`;return{customFormats:e.customFormats.concat([{name:o,format:t}]),formats:e.formats.concat([{title:t.title,format:o,icon:t.icon}])}}return{...e,formats:e.formats.concat(t)}}),{customFormats:[],formats:[]}),sO= e=>yf(e).map((t=>{const o=((e, t)=>{const o=aO(t),n= t=>{F(t,(t=>{e.formatter.has(t.name)||e.formatter.register(t.name,t.format)}))};return e.formatter?n(o.customFormats):e.on("init",(()=>{n(o.customFormats)})),o.formats})(e,t);return bf(e)?rO.concat(o):o})).getOr(rO),iO=(e, t, o)=>({...e,type:"formatter",isSelected:t(e.format),getStylePreview:o(e.format)}),lO=(e, t, o, n)=>{const r= t=>P(t,(t=>oO(t)?(e=>{const t=r(e.items);return{...e,type:"submenu",getStyleItems:k(t)}})(t):nO(t)?(e=>iO(e,o,n))(t):(e=>{const t=se(e);return 1===t.length&&B(t,"title")})(t)?{...t,type:"separator"}:(t=>{const r=a(t.name)?t.name:ls(t.title),s=`custom-${r}`,i={...t,type:"formatter",format:s,isSelected:o(s),getStylePreview:n(s)};return e.formatter.register(r,i),i})(t)));return r(t)},cO=NC.trim,dO= e=> t=>{if((e=>g(e)&&1===e.nodeType)(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},uO=dO("true"),mO=dO("false"),gO=(e, t, o, n, r)=>({type:e,title:t,url:o,level:n,attach:r}),pO= e=>e.innerText||e.textContent,hO= e=>(e=>e&&"A"===e.nodeName&&void 0!==(e.id||e.name))(e)&&yO(e),fO= e=>e&&/^(H[1-6])$/.test(e.nodeName),yO= e=>(e=>{let t=e;for(; t=t.parentNode;){const e=t.contentEditable;if(e&&"inherit"!==e)return uO(t)}return!1})(e)&&!mO(e),bO= e=>fO(e)&&yO(e),vO= e=>{var t;const o=(e=>e.id?e.id:ls("h"))(e);return gO("header",null!==(t=pO(e))&&void 0!==t?t:"","#"+o,(e=>fO(e)?parseInt(e.nodeName.substr(1),10):0)(e),(()=>{e.id=o}))},kO= e=>{const t=e.id||e.name,o=pO(e);return gO("anchor",o||"#"+t,"#"+t,0,y)},wO= e=>cO(e.title).length>0,_O= e=>{const t=(e=>{const t=P($c(Ie(e),"h1,h2,h3,h4,h5,h6,a:not([href])"),(e=>e.dom));return t})(e);return V((e=>P(V(e,bO),vO))(t).concat((e=>P(V(e,hO),kO))(t)),wO)},xO="tinymce-url-history",CO= e=>a(e)&&/^https?/.test(e),SO= e=>s(e)&&he(e,(e=>{return!(l(t=e)&&t.length<=5&&K(t,CO));var t})).isNone(),zO=()=>{const e=gk.getItem(xO);if(null===e)return{};let t;try{t=JSON.parse(e)}catch(e){if(e instanceof SyntaxError)return console.log("Local storage "+xO+" was not valid JSON",e),{};throw e}return SO(t)?t:(console.log("Local storage "+xO+" was not valid format",t),{})},OO= e=>{const t=zO();return ye(t,e).getOr([])},TO=(e, t)=>{if(!CO(e))return;const o=zO(),n=ye(o,t).getOr([]),r=V(n,(t=>t!==e));o[t]=[e].concat(r).slice(0,5),(e=>{if(!SO(e))throw new Error("Bad format for history:\n"+JSON.stringify(e));gk.setItem(xO,JSON.stringify(e))})(o)},EO= e=>!!e,AO= e=>ce(NC.makeMap(e,/[, ]/),EO),MO= e=>E.from(Mf(e)),NO= e=>E.from(e).filter(a).getOrUndefined(),RO= e=>({getHistory:OO,addToHistory:TO,getLinkInformation:()=>(e=>Bf(e)?E.some({targets:_O(e.getBody()),anchorTop:NO(Lf(e)),anchorBottom:NO(If(e))}):E.none())(e),getValidationHandler:()=>(e=>E.from(Nf(e)))(e),getUrlPicker: t=>((e, t)=>((e, t)=>{const o=(e=>{const t=E.from(Df(e)).filter(EO).map(AO);return MO(e).fold(O,(e=>t.fold(T,(e=>se(e).length>0&&e))))})(e);return d(o)?o?MO(e):E.none():o[t]?MO(e):E.none()})(e,t).map((o=> n=>iw((r=>{const i={filetype:t,fieldname:n.fieldname,...E.from(n.meta).getOr({})};o.call(e,((e, t)=>{if(!a(e))throw new Error("Expected value to be string");if(void 0!==t&&!s(t))throw new Error("Expected meta to be a object");r({value:e,meta:t})}),n.value,i)})))))(e,t)}),DO=lm,BO=qu,LO=k([vr("shell",!1),or("makeItem"),vr("setupItem",y),fu("listBehaviours",[Gp])]),IO=Vu({name:"items",overrides:()=>({behaviours:xl([Gp.config({})])})}),HO=k([IO]),PO=hm({name:k("CustomList")(),configFields:LO(),partFields:HO(),factory:(e, t, o, n)=>{const r=e.shell?{behaviours:[Gp.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:r.components,behaviours:hu(e.listBehaviours,r.behaviours),apis:{setItems:(t, o)=>{var n;(n=t,e.shell?E.some(n):em(n,e,"items")).fold((()=>{throw console.error("Custom List was defined to not be a shell, but no item container was specified in components"),new Error("Custom List was defined to not be a shell, but no item container was specified in components")}),(n=>{const r=Gp.contents(n),a=o.length,s=a-r.length,i=s>0?I(s,(()=>e.makeItem())):[],l=r.slice(a);F(l,(e=>Gp.remove(n,e))),F(i,(e=>Gp.append(n,e)));const c=Gp.contents(n);F(c,((n, r)=>{e.setupItem(t,n,o[r],r)}))}))}}}},apis:{setItems:(e, t, o)=>{e.setItems(t,o)}}}),FO=k([or("dom"),vr("shell",!0),gu("toolbarBehaviours",[Gp])]),jO=k([Vu({name:"groups",overrides:()=>({behaviours:xl([Gp.config({})])})})]),VO=hm({name:"Toolbar",configFields:FO(),partFields:jO(),factory:(e, t, o, n)=>{const r=e.shell?{behaviours:[Gp.config({})],components:[]}:{behaviours:[],components:t};return{uid:e.uid,dom:e.dom,components:r.components,behaviours:hu(e.toolbarBehaviours,r.behaviours),apis:{setGroups:(t, o)=>{var n;(n=t,e.shell?E.some(n):em(n,e,"groups")).fold((()=>{throw console.error("Toolbar was defined to not be a shell, but no groups container was specified in components"),new Error("Toolbar was defined to not be a shell, but no groups container was specified in components")}),(e=>{Gp.set(e,o)}))}},domModification:{attributes:{role:"group"}}}},apis:{setGroups:(e, t, o)=>{e.setGroups(t,o)}}}),ZO=y,UO=O,qO=k([]);var WO,$O=Object.freeze({__proto__:null,setup:ZO,isDocked:UO,getBehaviours:qO});const GO= e=>(ke(Lt(e,"position"),"fixed")?E.none():st(e)).orThunk((()=>{const t=Be("span");return rt(e).bind((e=>{Ho(e,t);const o=st(t);return jo(t),o}))})),KO= e=>GO(e).map(Gt).getOrThunk((()=>Wt(0,0))),YO=(e, t)=>{const o=e.element;Fs(o,t.transitionClass),js(o,t.fadeOutClass),Fs(o,t.fadeInClass),t.onShow(e)},XO=(e, t)=>{const o=e.element;Fs(o,t.transitionClass),js(o,t.fadeInClass),Fs(o,t.fadeOutClass),t.onHide(e)},JO=(e, t)=>e.y>=t.y,QO=(e, t)=>e.bottom<=t.bottom,eT=(e, t, o)=>({location:"top",leftX:t,topY:o.bounds.y-e.y}),tT=(e, t, o)=>({location:"bottom",leftX:t,bottomY:e.bottom-o.bounds.bottom}),oT= e=>e.box.x-e.win.x,nT=(e, t, o)=>o.getInitialPos().map((o=>{const n=((e, t)=>{const o=t.optScrollEnv.fold(k(e.bounds.y),(t=>t.scrollElmTop+(e.bounds.y-t.currentScrollTop)));return Wt(e.bounds.x,o)})(o,t);return{box:Yo(n.left,n.top,Xt(e),Zt(e)),location:o.location}})),rT=(e, t, o, n, r)=>{const a=((e, t)=>{const o=t.optScrollEnv.fold(k(e.y),(t=>e.y+t.currentScrollTop-t.scrollElmTop));return Wt(e.x,o)})(t,o),s=Yo(a.left,a.top,t.width,t.height);n.setInitialPos({style:It(e),position:Dt(e,"position")||"static",bounds:s,location:r.location})},aT=(e, t, o)=>o.getInitialPos().bind((n=>{var r;switch(o.clearInitialPos(),n.position){case"static":return E.some({morph:"static"});case"absolute":const o=GO(e).getOr(kt()),a=Xo(o),s=null!==(r=o.dom.scrollTop)&&void 0!==r?r:0;return E.some({morph:"absolute",positionCss:Il("absolute",ye(n.style,"left").map((e=>t.x-a.x)),ye(n.style,"top").map((e=>t.y-a.y+s)),ye(n.style,"right").map((e=>a.right-t.right)),ye(n.style,"bottom").map((e=>a.bottom-t.bottom)))});default:return E.none()}})),sT= e=>{switch(e.location){case"top":return E.some({morph:"fixed",positionCss:Il("fixed",E.some(e.leftX),E.some(e.topY),E.none(),E.none())});case"bottom":return E.some({morph:"fixed",positionCss:Il("fixed",E.some(e.leftX),E.none(),E.none(),E.some(e.bottomY))});default:return E.none()}},iT=(e, t, o)=>{const n=e.element;return ke(Lt(n,"position"),"fixed")?((e, t, o)=>((e, t, o)=>nT(e,t,o).filter((({box:e})=>((e, t, o)=>K(e,(e=>{switch(e){case"bottom":return QO(t,o.bounds);case"top":return JO(t,o.bounds)}})))(o.getModes(),e,t))).bind((({box:t})=>aT(e,t,o))))(e,t,o).orThunk((()=>t.optScrollEnv.bind((n=>nT(e,t,o))).bind((({box:e,location:o})=>{const n=en(),r=oT({win:n,box:e}),a="top"===o?eT(n,r,t):tT(n,r,t);return sT(a)})))))(n,t,o):((e, t, o)=>{const n=Xo(e),r=en(),a=((e, t, o)=>{const n=t.win,r=t.box,a=oT(t);return ae(e,(e=>{switch(e){case"bottom":return QO(r,o.bounds)?E.none():E.some(tT(n,a,o));case"top":return JO(r,o.bounds)?E.none():E.some(eT(n,a,o));default:return E.none()}})).getOr({location:"no-dock"})})(o.getModes(),{win:r,box:n},t);return"top"===a.location||"bottom"===a.location?(rT(e,n,t,o,a),sT(a)):E.none()})(n,t,o)},lT=(e, t, o)=>{o.setDocked(!1),F(["left","right","top","bottom","position"],(t=>Pt(e.element,t))),t.onUndocked(e)},cT=(e, t, o, n)=>{const r="fixed"===n.position;o.setDocked(r),Hl(e.element,n),(r?t.onDocked:t.onUndocked)(e)},dT=(e, t, o, n, r=!1)=>{t.contextual.each((t=>{t.lazyContext(e).each((a=>{const s=((e, t)=>e.y<t.bottom&&e.bottom>t.y)(a,n.bounds);s!==o.isVisible()&&(o.setVisible(s),r&&!s?(Zs(e.element,[t.fadeOutClass]),t.onHide(e)):(s?YO:XO)(e,t))}))}))},uT=(e, t, o, n, r)=>{dT(e,t,o,n,!0),cT(e,t,o,r.positionCss)},mT=(e, t, o)=>{e.getSystem().isConnected()&&((e, t, o)=>{const n=t.lazyViewport(e);dT(e,t,o,n),iT(e,n,o).each((r=>{((e, t, o, n, r)=>{switch(r.morph){case"static":return lT(e,t,o);case"absolute":return cT(e,t,o,r.positionCss);case"fixed":uT(e,t,o,n,r)}})(e,t,o,n,r)}))})(e,t,o)},gT=(e, t, o)=>{o.isDocked()&&((e, t, o)=>{const n=e.element;o.setDocked(!1);const r=t.lazyViewport(e);((e, t, o)=>{const n=e.element;return nT(n,t,o).bind((({box:e})=>aT(n,e,o)))})(e,r,o).each((n=>{switch(n.morph){case"static":lT(e,t,o);break;case"absolute":cT(e,t,o,n.positionCss)}})),o.setVisible(!0),t.contextual.each((t=>{Us(n,[t.fadeInClass,t.fadeOutClass,t.transitionClass]),t.onShow(e)})),mT(e,t,o)})(e,t,o)},pT= e=>(t, o, n)=>{const r=o.lazyViewport(t);((e, t, o, n)=>{const r=Xo(e),a=en(),s=n(a,oT({win:a,box:r}),t);return"bottom"===s.location||"top"===s.location?(((e, t, o, n, r)=>{n.getInitialPos().fold((()=>rT(e,t,o,n,r)),(()=>y))})(e,r,t,o,s),sT(s)):E.none()})(t.element,r,n,e).each((e=>{uT(t,o,n,r,e)}))},hT=pT(eT),fT=pT(tT);var yT=Object.freeze({__proto__:null,refresh:mT,reset:gT,isDocked:(e, t, o)=>o.isDocked(),getModes:(e, t, o)=>o.getModes(),setModes:(e, t, o, n)=>o.setModes(n),forceDockToTop:hT,forceDockToBottom:fT}),bT=Object.freeze({__proto__:null,events:(e, t)=>Pa([Ka(oa(),((o, n)=>{e.contextual.each((e=>{Vs(o.element,e.transitionClass)&&(Us(o.element,[e.transitionClass,e.fadeInClass]),(t.isVisible()?e.onShown:e.onHidden)(o)),n.stop()}))})),Va(ka(),((o, n)=>{mT(o,e,t)})),Va(Ta(),((o, n)=>{mT(o,e,t)})),Va(wa(),((o, n)=>{gT(o,e,t)}))])}),vT=[br("contextual",[ar("fadeInClass"),ar("fadeOutClass"),ar("transitionClass"),ir("lazyContext"),Mi("onShow"),Mi("onShown"),Mi("onHide"),Mi("onHidden")]),Sr("lazyViewport",(()=>({bounds:en(),optScrollEnv:E.none()}))),zr("modes",["top","bottom"],Pn),Mi("onDocked"),Mi("onUndocked")];const kT=Sl({fields:vT,name:"docking",active:bT,apis:yT,state:Object.freeze({__proto__:null,init: e=>{const t=Tr(!1),o=Tr(!0),n=Ql(),r=Tr(e.modes);return zs({isDocked:t.get,setDocked:t.set,getInitialPos:n.get,setInitialPos:n.set,clearInitialPos:n.clear,isVisible:o.get,setVisible:o.set,getModes:r.get,setModes:r.set,readState:()=>`docked: ${t.get()}, visible: ${o.get()}, modes: ${r.get().join(",")}`})}})}),wT=k(ls("toolbar-height-change")),_T={fadeInClass:"tox-editor-dock-fadein",fadeOutClass:"tox-editor-dock-fadeout",transitionClass:"tox-editor-dock-transition"},xT="tox-tinymce--toolbar-sticky-on",CT="tox-tinymce--toolbar-sticky-off",ST=(e, t)=>B(kT.getModes(e),t),zT= e=>{const t=e.element;at(t).each((o=>{const n="padding-"+kT.getModes(e)[0];if(kT.isDocked(e)){const e=Xt(o);Mt(t,"width",e+"px"),Mt(o,n,(e=>Ut(e)+(parseInt(Dt(e,"margin-top"),10)||0)+(parseInt(Dt(e,"margin-bottom"),10)||0))(t)+"px")}else Pt(t,"width"),Pt(o,n)}))},OT=(e, t)=>{t?(js(e,_T.fadeOutClass),Zs(e,[_T.transitionClass,_T.fadeInClass])):(js(e,_T.fadeInClass),Zs(e,[_T.fadeOutClass,_T.transitionClass]))},TT=(e, t)=>{const o=Ie(e.getContainer());t?(Fs(o,xT),js(o,CT)):(Fs(o,CT),js(o,xT))},ET=(e, t)=>{const o=Ql(),n=t.getSink,r= e=>{n().each((t=>e(t.element)))},a= t=>{e.inline||zT(t),TT(e,kT.isDocked(t)),t.getSystem().broadcastOn([Gd()],{}),n().each((e=>e.getSystem().broadcastOn([Gd()],{})))},s=e.inline?[]:[El.config({channels:{[wT()]:{onReceive:zT}}})];return[eh.config({}),kT.config({contextual:{lazyContext: t=>{const o=Ut(t.element),n=e.inline?e.getContentAreaContainer():e.getContainer();return E.from(n).map((n=>{const r=Xo(Ie(n));return Dw(e,t.element).fold((()=>{const e=r.height-o,n=r.y+(ST(t,"top")?0:o);return Yo(r.x,n,r.width,e)}),(e=>{const t=Qo(r,Bw(e));return Yo(t.x,t.y,t.width,t.height-o)}))}))},onShow:()=>{r((e=>OT(e,!0)))},onShown: e=>{r((e=>Us(e,[_T.transitionClass,_T.fadeInClass]))),o.get().each((t=>{((e, t)=>{const o=et(t);Dl(o).filter((e=>!Je(t,e))).filter((t=>Je(t,Ie(o.dom.body))||Qe(e,t))).each((()=>Ml(t)))})(e.element,t),o.clear()}))},onHide: e=>{((e, t)=>Bl(e).orThunk((()=>t().toOptional().bind((e=>Bl(e.element))))))(e.element,n).fold(o.clear,o.set),r((e=>OT(e,!1)))},onHidden:()=>{r((e=>Us(e,[_T.transitionClass])))},..._T},lazyViewport: t=>Dw(e,t.element).fold((()=>{const o=en(),n=Tf(e),r=o.y+(ST(t,"top")?n:0),a=o.height-(ST(t,"bottom")?n:0);return{bounds:Yo(o.x,r,o.width,a),optScrollEnv:E.none()}}),(e=>({bounds:Bw(e),optScrollEnv:E.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Gt(e.element).top})}))),modes:[t.header.getDockingMode()],onDocked:a,onUndocked:a}),...s]};var AT=Object.freeze({__proto__:null,setup:(e, t, o)=>{e.inline||(t.header.isPositionedAtTop()||e.on("ResizeEditor",(()=>{o().each(kT.reset)})),e.on("ResizeWindow ResizeEditor",(()=>{o().each(zT)})),e.on("SkinLoaded",(()=>{o().each((e=>{kT.isDocked(e)?kT.reset(e):kT.refresh(e)}))})),e.on("FullscreenStateChanged",(()=>{o().each(kT.reset)}))),e.on("AfterScrollIntoView",(e=>{o().each((t=>{kT.refresh(t);const o=t.element;Ng(o)&&((e, t)=>{const o=et(t),n=nt(t).dom.innerHeight,r=Vo(o),a=Ie(e.elm),s=Jo(a),i=Zt(a),l=s.y,c=l+i,d=Gt(t),u=Zt(t),m=d.top,g=m+u,p=Math.abs(m-r.top)<2,h=Math.abs(g-(r.top+n))<2;if(p&&l<g)Zo(r.left,l-u,o);else if(h&&c>m){const e=l-n+i+u;Zo(r.left,e,o)}})(e,o)}))})),e.on("PostRender",(()=>{TT(e,!1)}))},isDocked: e=>e().map(kT.isDocked).getOr(!1),getBehaviours:ET});const MT=Mn([Jy,nr("items",Rn([Bn([Qy,dr("items",Pn)]),Pn]))].concat(Tb)),NT=[pr("text"),pr("tooltip"),pr("icon"),kr("search",!1,Rn([Fn,Mn([pr("placeholder")])],(e=>d(e)?e?E.some({placeholder:E.none()}):E.none():E.some(e)))),ir("fetch"),Sr("onSetup",(()=>y))],RT=Mn([Jy,...NT]),DT= e=>$n("menubutton",RT,e),BT=Mn([Jy,gb,mb,ub,fb,ab,cb,xr("presets","normal",["normal","color","listpreview"]),wb(1),ib,lb]);var LT=pm({factory:(e, t)=>{const o={focus:Pp.focusIn,setMenus:(e, o)=>{const n=P(o,(e=>{const o={type:"menubutton",text:e.text,fetch: t=>{t(e.getItems())}},n=DT(o).mapError((e=>Yn(e))).getOrDie();return MS(n,"tox-mbtn",t.backstage,E.some("menuitem"))}));Gp.set(e,n)}};return{uid:e.uid,dom:e.dom,components:[],behaviours:xl([Gp.config({}),Kp("menubar-events",[Ya((t=>{e.onSetup(t)})),Va($r(),((e, t)=>{pi(e.element,".tox-mbtn--active").each((o=>{hi(t.event.target,".tox-mbtn").each((t=>{Je(o,t)||e.getSystem().getByDom(o).each((o=>{e.getSystem().getByDom(t).each((e=>{_w.expand(e),_w.close(o),eh.focus(e)}))}))}))}))})),Va(za(),((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=>{_w.isOpen(o)&&(_w.expand(e),_w.close(o))}))}))}))]),Pp.config({mode:"flow",selector:".tox-mbtn",onEscape: t=>(e.onEscape(t),E.some(!0))}),Qw.config({})]),apis:o,domModification:{attributes:{role:"menubar"}}}},name:"silver.Menubar",configFields:[or("dom"),or("uid"),or("onEscape"),or("backstage"),vr("onSetup",y)],apis:{focus:(e, t)=>{e.focus(t)},setMenus:(e, t, o)=>{e.setMenus(t,o)}}});const IT="container",HT=[gu("slotBehaviours",[])],PT= e=>"<alloy.field."+e+">",FT=(e, t)=>{const o= t=>rm(e),n=(t, o)=>(n, r)=>em(n,e,r).map((e=>t(e,r))).getOr(o),r=(e, t)=>"true"!==St(e.element,"aria-hidden"),a=n(r,!1),s=n(((e, t)=>{if(r(e)){const o=e.element;Mt(o,"display","none"),xt(o,"aria-hidden","true"),Da(e,Oa(),{name:t,visible:!1})}})),i=(e=>(t, o)=>{F(o,(o=>e(t,o)))})(s),l=n(((e, t)=>{if(!r(e)){const o=e.element;Pt(o,"display"),Tt(o,"aria-hidden"),Da(e,Oa(),{name:t,visible:!0})}})),c={getSlotNames:o,getSlot:(t, o)=>em(t,e,o),isShowing:a,hideSlot:s,hideAllSlots: e=>i(e,o()),showSlot:l};return{uid:e.uid,dom:e.dom,components:t,behaviours:pu(e.slotBehaviours),apis:c}},jT=ce({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=>Cs(e))),VT={...jT,sketch: e=>{const t=(()=>{const e=[];return{slot:(t, o)=>(e.push(t),Ku(IT,PT(t),o)),record:k(e)}})(),o=e(t),n=t.record(),r=P(n,(e=>Fu({name:e,pname:PT(e)})));return dm(IT,HT,r,FT,o)}},ZT=Mn([mb,gb,Sr("onShow",y),Sr("onHide",y),cb]),UT= e=>({element:()=>e.element.dom}),qT=(e, t)=>{const o=P(se(t),(e=>{const o=t[e],n=Gn((e=>$n("sidebar",ZT,e))(o));return{name:e,getApi:UT,onSetup:n.onSetup,onShow:n.onShow,onHide:n.onHide}}));return P(o,(t=>{const n=Tr(y);return e.slot(t.name,{dom:{tag:"div",classes:["tox-sidebar__pane"]},behaviours:av([Cv(t,n),Sv(t,n),Va(Oa(),((e, t)=>{const n=t.event,r=q(o,(e=>e.name===n.name));r.each((t=>{(n.visible?t.onShow:t.onHide)(t.getApi(e))}))}))])})}))},WT= e=>VT.sketch((t=>({dom:{tag:"div",classes:["tox-sidebar__pane-container"]},components:qT(t,e),slotBehaviours:av([Ya((e=>VT.hideAllSlots(e)))])}))),$T=(e, t)=>{xt(e,"role",t)},GT= e=>vm.getCurrent(e).bind((e=>ES.isGrowing(e)||ES.hasGrown(e)?vm.getCurrent(e).bind((e=>q(VT.getSlotNames(e),(t=>VT.isShowing(e,t))))):E.none())),KT=ls("FixSizeEvent"),YT=ls("AutoSizeEvent");var XT=Object.freeze({__proto__:null,block:(e, t, o, n)=>{xt(e.element,"aria-busy",!0);const r=t.getRoot(e).getOr(e),a=xl([Pp.config({mode:"special",onTab:()=>E.some(!0),onShiftTab:()=>E.some(!0)}),eh.config({})]),s=n(r,a),i=r.getSystem().build(s);Gp.append(r,si(i)),i.hasConfigured(Pp)&&t.focus&&Pp.focusIn(i),o.isBlocked()||t.onBlock(e),o.blockWith((()=>Gp.remove(r,i)))},unblock:(e, t, o)=>{Tt(e.element,"aria-busy"),o.isBlocked()&&t.onUnblock(e),o.clear()}}),JT=[Sr("getRoot",E.none),Cr("focus",!0),Mi("onBlock"),Mi("onUnblock")];const QT=Sl({fields:JT,name:"blocking",apis:XT,state:Object.freeze({__proto__:null,init:()=>{const e=Xl((e=>e.destroy()));return zs({readState:e.isSet,blockWith: t=>{e.set({destroy:t})},clear:e.clear,isBlocked:e.isSet})}})}),eE= e=>{const t=De(e),o=it(t),n=(e=>{const t=void 0!==e.dom.attributes?e.dom.attributes:[];return U(t,((e, t)=>"class"===t.name?e:{...e,[t.name]:t.value}),{})})(t),r=(e=>Array.prototype.slice.call(e.dom.classList,0))(t),a=0===o.length?{}:{innerHtml:es(t)};return{tag:Ve(t),classes:r,attributes:n,...a}},tE= e=>vm.getCurrent(e).each((e=>Ml(e.element))),oE=(e, t, o)=>{const n=Tr(!1),r=Ql(),a= o=>{var r;n.get()&&(!(e=>"focusin"===e.type)(r=o)||!(r.composed?oe(r.composedPath()):E.from(r.target)).map(Ie).filter(qe).exists((e=>Vs(e,"mce-pastebin"))))&&(o.preventDefault(),tE(t()),e.editorManager.setActive(e))};e.inline||e.on("PreInit",(()=>{e.dom.bind(e.getWin(),"focusin",a),e.on("BeforeExecCommand",(e=>{"mcefocus"===e.command.toLowerCase()&&!0!==e.value&&a(e)}))}));const s= r=>{r!==n.get()&&(n.set(r),((e, t, o, n)=>{const r=t.element;if(((e, t)=>{const o="tabindex",n=`data-mce-${o}`;E.from(e.iframeElement).map(Ie).each((e=>{t?(zt(e,o).each((t=>xt(e,n,t))),xt(e,o,-1)):(Tt(e,o),zt(e,n).each((t=>{xt(e,o,t),Tt(e,n)})))}))})(e,o),o)QT.block(t,(e=>(t, o)=>({dom:{tag:"div",attributes:{"aria-label":e.translate("Loading..."),tabindex:"0"},classes:["tox-throbber__busy-spinner"]},components:[{dom:eE('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}))(n)),Pt(r,"display"),Tt(r,"aria-hidden"),e.hasFocus()&&tE(t);else{const o=vm.getCurrent(t).exists((e=>Rl(e.element)));QT.unblock(t),Mt(r,"display","none"),xt(r,"aria-hidden","true"),o&&e.focus()}})(e,t(),r,o.providers),((e, t)=>{e.dispatch("AfterProgressState",{state:t})})(e,r))};e.on("ProgressState",(t=>{if(r.on(clearTimeout),h(t.time)){const o=Fh.setEditorTimeout(e,(()=>s(t.state)),t.time);r.set(o)}else s(t.state),r.clear()}))},nE=(e, t, o)=>({within:e,extra:t,withinWidth:o}),rE=(e, t, o)=>{const n=U(e,((e, t)=>((e, t)=>{const n=o(e);return E.some({element:e,start:t,finish:t+n,width:n})})(t,e.len).fold(k(e),(t=>({len:t.finish,list:e.list.concat([t])})))),{len:0,list:[]}).list,r=V(n,(e=>e.finish<=t)),a=Z(r,((e, t)=>e+t.width),0);return{within:r,extra:n.slice(r.length),withinWidth:a}},aE= e=>P(e,(e=>e.element)),sE=(e, t)=>{const o=P(t,(e=>si(e)));VO.setGroups(e,o)},iE=(e, t, o)=>{const n=t.builtGroups.get();if(0===n.length)return;const r=tm(e,t,"primary"),a=ow.getCoupled(e,"overflowGroup");Mt(r.element,"visibility","hidden");const s=n.concat([a]),i=ae(s,(e=>Bl(e.element).bind((t=>e.getSystem().getByDom(t).toOptional()))));o([]),sE(r,s);const l=((e, t, o, n)=>{const r=((e, t, o)=>{const n=rE(t,e,o);return 0===n.extra.length?E.some(n):E.none()})(e,t,o).getOrThunk((()=>rE(t,e-o(n),o))),a=r.within,s=r.extra,i=r.withinWidth;return 1===s.length&&s[0].width<=o(n)?((e, t, o)=>{const n=aE(e.concat(t));return nE(n,[],o)})(a,s,i):s.length>=1?((e, t, o, n)=>{const r=aE(e).concat([o]);return nE(r,aE(t),n)})(a,s,n,i):((e, t, o)=>nE(aE(e),[],o))(a,0,i)})(Xt(r.element),t.builtGroups.get(),(e=>Xt(e.element)),a);0===l.extra.length?(Gp.remove(r,a),o([])):(sE(r,l.within),o(l.extra)),Pt(r.element,"visibility"),Ft(r.element),i.each(eh.focus)},lE=k([gu("splitToolbarBehaviours",[ow]),er("builtGroups",(()=>Tr([])))]),cE=k([Ei(["overflowToggledClass"]),fr("getOverflowBounds"),or("lazySink"),er("overflowGroups",(()=>Tr([]))),Mi("onOpened"),Mi("onClosed")].concat(lE())),dE=k([Fu({factory:VO,schema:FO(),name:"primary"}),ju({schema:FO(),name:"overflow"}),ju({name:"overflow-button"}),ju({name:"overflow-group"})]),uE=k(((e, t)=>{((e, t)=>{const o=Yt.max(e,t,["margin-left","border-left-width","padding-left","padding-right","border-right-width","margin-right"]);Mt(e,"max-width",o+"px")})(e,Math.floor(t))})),mE=k([Ei(["toggledClass"]),or("lazySink"),ir("fetch"),fr("getBounds"),br("fireDismissalEventInstead",[vr("event",Ca())]),wc(),Mi("onToggled")]),gE=k([ju({name:"button",overrides: e=>({dom:{attributes:{"aria-haspopup":"true"}},buttonBehaviours:xl([lh.config({toggleClass:e.markers.toggledClass,aria:{mode:"expanded"},toggleOnExecute:!1,onToggled:e.onToggled})])})}),ju({factory:VO,schema:FO(),name:"toolbar",overrides: e=>({toolbarBehaviours:xl([Pp.config({mode:"cyclic",onEscape: t=>(em(t,e,"button").each(eh.focus),E.none())})])})})]),pE=Ql(),hE=(e, t)=>{const o=ow.getCoupled(e,"toolbarSandbox");Wd.isOpen(o)?Wd.close(o):Wd.open(o,t.toolbar())},fE=(e, t, o, n)=>{const r=o.getBounds.map((e=>e())),a=o.lazySink(e).getOrDie();kd.positionWithinBounds(a,t,{anchor:{type:"hotspot",hotspot:e,layouts:n,overrides:{maxWidthFunction:uE()}}},r)},yE=(e, t, o, n, r)=>{VO.setGroups(t,r),fE(e,t,o,n),lh.on(e)},bE=hm({name:"FloatingToolbarButton",factory:(e, t, o, n)=>({...jh.sketch({...n.button(),action: e=>{hE(e,n)},buttonBehaviours:yu({dump:n.button().buttonBehaviours},[ow.config({others:{toolbarSandbox: t=>((e, t, o)=>{const n=yi();return{dom:{tag:"div",attributes:{id:n.id}},behaviours:xl([Pp.config({mode:"special",onEscape: e=>(Wd.close(e),E.some(!0))}),Wd.config({onOpen:(r, a)=>{const s=pE.get().getOr(!1);o.fetch().get((r=>{yE(e,a,o,t.layouts,r),n.link(e.element),s||Pp.focusIn(a)}))},onClose:()=>{lh.off(e),pE.get().getOr(!1)||eh.focus(e),n.unlink(e.element)},isPartOf:(t, o, n)=>bi(o,n)||bi(e,n),getAttachPoint:()=>o.lazySink(e).getOrDie()}),El.config({channels:{...Xd({isExtraPart:O,...o.fireDismissalEventInstead.map((e=>({fireEventInstead:{event:e.event}}))).getOr({})}),...Qd({doReposition:()=>{Wd.getState(ow.getCoupled(e,"toolbarSandbox")).each((n=>{fE(e,n,o,t.layouts)}))}})}})])}})(t,o,e)}})])}),apis:{setGroups:(t, n)=>{Wd.getState(ow.getCoupled(t,"toolbarSandbox")).each((r=>{yE(t,r,e,o.layouts,n)}))},reposition: t=>{Wd.getState(ow.getCoupled(t,"toolbarSandbox")).each((n=>{fE(t,n,e,o.layouts)}))},toggle: e=>{hE(e,n)},toggleWithoutFocusing: e=>{((e, t)=>{pE.set(!0),hE(e,t),pE.clear()})(e,n)},getToolbar: e=>Wd.getState(ow.getCoupled(e,"toolbarSandbox")),isOpen: e=>Wd.isOpen(ow.getCoupled(e,"toolbarSandbox"))}}),configFields:mE(),partFields:gE(),apis:{setGroups:(e, t, o)=>{e.setGroups(t,o)},reposition:(e, t)=>{e.reposition(t)},toggle:(e, t)=>{e.toggle(t)},toggleWithoutFocusing:(e, t)=>{e.toggleWithoutFocusing(t)},getToolbar:(e, t)=>e.getToolbar(t),isOpen:(e, t)=>e.isOpen(t)}}),vE=k([or("items"),Ei(["itemSelector"]),gu("tgroupBehaviours",[Pp])]),kE=k([Zu({name:"items",unit:"item"})]),wE=hm({name:"ToolbarGroup",configFields:vE(),partFields:kE(),factory:(e, t, o, n)=>({uid:e.uid,dom:e.dom,components:t,behaviours:hu(e.tgroupBehaviours,[Pp.config({mode:"flow",selector:e.markers.itemSelector})]),domModification:{attributes:{role:"toolbar"}}})}),_E= e=>P(e,(e=>si(e))),xE=(e, t, o)=>{iE(e,o,(n=>{o.overflowGroups.set(n),t.getOpt(e).each((e=>{bE.setGroups(e,_E(n))}))}))},CE=hm({name:"SplitFloatingToolbar",configFields:cE(),partFields:dE(),factory:(e, t, o, n)=>{const r=Vh(bE.sketch({fetch:()=>iw((t=>{t(_E(e.overflowGroups.get()))})),layouts:{onLtr:()=>[al,rl],onRtl:()=>[rl,al],onBottomLtr:()=>[il,sl],onBottomRtl:()=>[sl,il]},getBounds:o.getOverflowBounds,lazySink:e.lazySink,fireDismissalEventInstead:{},markers:{toggledClass:e.markers.overflowToggledClass},parts:{button:n["overflow-button"](),toolbar:n.overflow()},onToggled:(t, o)=>e[o?"onOpened":"onClosed"](t)}));return{uid:e.uid,dom:e.dom,components:t,behaviours:hu(e.splitToolbarBehaviours,[ow.config({others:{overflowGroup:()=>wE.sketch({...n["overflow-group"](),items:[r.asSpec()]})}})]),apis:{setGroups:(t, o)=>{e.builtGroups.set(P(o,t.getSystem().build)),xE(t,r,e)},refresh: t=>xE(t,r,e),toggle: e=>{r.getOpt(e).each((e=>{bE.toggle(e)}))},toggleWithoutFocusing: e=>{r.getOpt(e).each(bE.toggleWithoutFocusing)},isOpen: e=>r.getOpt(e).map(bE.isOpen).getOr(!1),reposition: e=>{r.getOpt(e).each((e=>{bE.reposition(e)}))},getOverflow: e=>r.getOpt(e).bind(bE.getToolbar)},domModification:{attributes:{role:"group"}}}},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)},toggleWithoutFocusing:(e, t)=>{e.toggle(t)},isOpen:(e, t)=>e.isOpen(t),getOverflow:(e, t)=>e.getOverflow(t)}}),SE=k([Ei(["closedClass","openClass","shrinkingClass","growingClass","overflowToggledClass"]),Mi("onOpened"),Mi("onClosed")].concat(lE())),zE=k([Fu({factory:VO,schema:FO(),name:"primary"}),Fu({factory:VO,schema:FO(),name:"overflow",overrides: e=>({toolbarBehaviours:xl([ES.config({dimension:{property:"height"},closedClass:e.markers.closedClass,openClass:e.markers.openClass,shrinkingClass:e.markers.shrinkingClass,growingClass:e.markers.growingClass,onShrunk: t=>{em(t,e,"overflow-button").each((e=>{lh.off(e),eh.focus(e)})),e.onClosed(t)},onGrown: t=>{Pp.focusIn(t),e.onOpened(t)},onStartGrow: t=>{em(t,e,"overflow-button").each(lh.on)}}),Pp.config({mode:"acyclic",onEscape: t=>(em(t,e,"overflow-button").each(eh.focus),E.some(!0))})])})}),ju({name:"overflow-button",overrides: e=>({buttonBehaviours:xl([lh.config({toggleClass:e.markers.overflowToggledClass,aria:{mode:"pressed"},toggleOnExecute:!1})])})}),ju({name:"overflow-group"})]),OE=(e, t)=>{em(e,t,"overflow-button").bind((()=>em(e,t,"overflow"))).each((o=>{TE(e,t),ES.toggleGrow(o)}))},TE=(e, t)=>{em(e,t,"overflow").each((o=>{iE(e,t,(e=>{const t=P(e,(e=>si(e)));VO.setGroups(o,t)})),em(e,t,"overflow-button").each((e=>{ES.hasGrown(o)&&lh.on(e)})),ES.refresh(o)}))},EE=hm({name:"SplitSlidingToolbar",configFields:SE(),partFields:zE(),factory:(e, t, o, n)=>{const r="alloy.toolbar.toggle";return{uid:e.uid,dom:e.dom,components:t,behaviours:hu(e.splitToolbarBehaviours,[ow.config({others:{overflowGroup: e=>wE.sketch({...n["overflow-group"](),items:[jh.sketch({...n["overflow-button"](),action: t=>{Ra(e,r)}})]})}}),Kp("toolbar-toggle-events",[Va(r,(t=>{OE(t,e)}))])]),apis:{setGroups:(t, o)=>{((t, o)=>{const n=P(o,t.getSystem().build);e.builtGroups.set(n)})(t,o),TE(t,e)},refresh: t=>TE(t,e),toggle: t=>OE(t,e),isOpen: t=>((e, t)=>em(e,t,"overflow").map(ES.hasGrown).getOr(!1))(t,e)},domModification:{attributes:{role:"group"}}}},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)}}),AE= e=>{const t=e.title.fold((()=>({})),(e=>({attributes:{title:e}})));return{dom:{tag:"div",classes:["tox-toolbar__group"],...t},components:[wE.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]), .tox-number-input:not([disabled])"},tgroupBehaviours:xl([Qw.config({}),eh.config({})])}},ME= e=>wE.sketch(AE(e)),NE=(e, t)=>{const o=Ya((t=>{const o=P(e.initGroups,ME);VO.setGroups(t,o)}));return xl([_v(e.providers.isDisabled),vv(),Pp.config({mode:t,onEscape:e.onEscape,selector:".tox-toolbar__group"}),Kp("toolbar-events",[o])])},RE= e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return{uid:e.uid,dom:{tag:"div",classes:["tox-toolbar-overlord"]},parts:{"overflow-group":AE({title:E.none(),items:[]}),"overflow-button":oz({name:"more",icon:E.some("more-drawer"),enabled:!0,tooltip:E.some("More..."),primary:!1,buttonType:E.none(),borderless:!1},E.none(),e.providers)},splitToolbarBehaviours:NE(e,t)}},DE= e=>{const t=RE(e),o=CE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}});return CE.sketch({...t,lazySink:e.getSink,getOverflowBounds:()=>{const t=e.moreDrawerData.lazyHeader().element,o=Jo(t),n=ot(t),r=Jo(n),a=Math.max(n.dom.scrollHeight,r.height);return Yo(o.x+4,r.y,o.width-8,a)},parts:{...t.parts,overflow:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:e.attributes}}},components:[o],markers:{overflowToggledClass:"tox-tbtn--enabled"},onOpened: t=>e.onToggled(t,!0),onClosed: t=>e.onToggled(t,!1)})},BE= e=>{const t=EE.parts.primary({dom:{tag:"div",classes:["tox-toolbar__primary"]}}),o=EE.parts.overflow({dom:{tag:"div",classes:["tox-toolbar__overflow"]}}),n=RE(e);return EE.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: t=>{t.getSystem().broadcastOn([wT()],{type:"opened"}),e.onToggled(t,!0)},onClosed: t=>{t.getSystem().broadcastOn([wT()],{type:"closed"}),e.onToggled(t,!1)}})},LE= e=>{const t=e.cyclicKeying?"cyclic":"acyclic";return VO.sketch({uid:e.uid,dom:{tag:"div",classes:["tox-toolbar"].concat(e.type===tf.scrolling?["tox-toolbar--scrolling"]:[])},components:[VO.parts.groups({})],toolbarBehaviours:NE(e,t)})},IE=[ub,mb,pr("tooltip"),xr("buttonType","secondary",["primary","secondary"]),Cr("borderless",!1),ir("onAction")],HE={button:[...IE,tb,sr("type",["button"])],togglebutton:[...IE,Cr("active",!1),sr("type",["togglebutton"])]},PE=[sr("type",["group"]),zr("buttons",[],Xn("type",HE))],FE=Xn("type",{...HE,group:PE}),jE=Mn([zr("buttons",[],FE),ir("onShow"),ir("onHide")]),VE=(e, t)=>((e, t)=>{var o,n;const r="togglebutton"===e.type,a=e.icon.map((e=>WC(e,t.icons))).map(Vh),s={...e,name:r?e.text.getOr(e.icon.getOr("")):null!==(o=e.text)&&void 0!==o?o:e.icon.getOr(""),primary:"primary"===e.buttonType,buttonType:E.from(e.buttonType),tooltip:e.tooltip,icon:e.icon,enabled:!0,borderless:e.borderless},i=nz(null!==(n=e.buttonType)&&void 0!==n?n:"secondary"),l=r?e.text.map(t.translate):E.some(t.translate(e.text)),c=l.map(ti),d=s.tooltip.or(l).map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),u=a.map((e=>e.asSpec())),m=Tv([u,c]),g=e.icon.isSome()&&c.isSome(),p={tag:"button",classes:i.concat(...e.icon.isSome()&&!g?["tox-button--icon"]:[]).concat(...g?["tox-button--icon-and-text"]:[]).concat(...e.borderless?["tox-button--naked"]:[]).concat(..."togglebutton"===e.type&&e.active?["tox-button--enabled"]:[]),attributes:d},h=tz(s,E.some((o=>{const n= e=>{a.map((n=>n.getOpt(o).each((o=>{Gp.set(o,[WC(e,t.icons)])}))))};return r?e.onAction({setIcon:n,setActive: e=>{const t=o.element;e?(Fs(t,"tox-button--enabled"),xt(t,"aria-pressed",!0)):(js(t,"tox-button--enabled"),Tt(t,"aria-pressed"))},isActive:()=>Vs(o.element,"tox-button--enabled")}):"button"===e.type?e.onAction({setIcon:n}):void 0})),[],p,m,t);return jh.sketch(h)})(e,t),ZE=Mo().deviceType,UE=ZE.isPhone(),qE=ZE.isTablet();var WE=hm({name:"silver.View",configFields:[or("viewConfig")],partFields:[Vu({factory:{sketch: e=>{let t=!1;const o=P(e.buttons,(o=>"group"===o.type?(t=!0,((e, t)=>({dom:{tag:"div",classes:["tox-view__toolbar__group"]},components:P(e.buttons,(e=>VE(e,t)))}))(o,e.providers)):VE(o,e.providers)));return{uid:e.uid,dom:{tag:"div",classes:[t?"tox-view__toolbar":"tox-view__header",...UE||qE?["tox-view--mobile","tox-view--scrolling"]:[]]},behaviours:xl([eh.config({}),Pp.config({mode:"flow",selector:"button, .tox-button",focusInside:mg.OnEnterOrSpaceMode})]),components:t?o:[Ww.sketch({dom:{tag:"div",classes:["tox-view__header-start"]},components:[]}),Ww.sketch({dom:{tag:"div",classes:["tox-view__header-end"]},components:o})]}}},schema:[or("buttons"),or("providers")],name:"header"}),Vu({factory:{sketch: e=>({uid:e.uid,dom:{tag:"div",classes:["tox-view__pane"]}})},schema:[],name:"pane"})],factory:(e, t, o, n)=>{const r={getPane: t=>DO.getPart(t,e,"pane"),getOnShow: t=>e.viewConfig.onShow,getOnHide: t=>e.viewConfig.onHide};return{uid:e.uid,dom:e.dom,components:t,apis:r}},apis:{getPane:(e, t)=>e.getPane(t),getOnShow:(e, t)=>e.getOnShow(t),getOnHide:(e, t)=>e.getOnHide(t)}});const $E=(e, t, o)=>pe(t,((t, n)=>{const r=Gn($n("view",jE,t));return e.slot(n,WE.sketch({dom:{tag:"div",classes:["tox-view"]},viewConfig:r,components:[...r.buttons.length>0?[WE.parts.header({buttons:r.buttons,providers:o})]:[],WE.parts.pane({})]}))})),GE=(e, t)=>VT.sketch((o=>({dom:{tag:"div",classes:["tox-view-wrap__slot-container"]},components:$E(o,e,t),slotBehaviours:av([Ya((e=>VT.hideAllSlots(e)))])}))),KE= e=>q(VT.getSlotNames(e),(t=>VT.isShowing(e,t))),YE=(e, t, o)=>{VT.getSlot(e,t).each((e=>{WE.getPane(e).each((t=>{var n;o(e)((n=t.element.dom,{getContainer:k(n)}))}))}))};var XE=pm({factory:(e, t)=>{const o={setViews:(e, o)=>{Gp.set(e,[GE(o,t.backstage.shared.providers)])},whichView: e=>vm.getCurrent(e).bind(KE),toggleView:(e, t, o, n)=>vm.getCurrent(e).exists((r=>{const a=KE(r),s=a.exists((e=>n===e)),i=VT.getSlot(r,n).isSome();return i&&(VT.hideAllSlots(r),s?((e=>{const t=e.element;Mt(t,"display","none"),xt(t,"aria-hidden","true")})(e),t()):(o(),(e=>{const t=e.element;Pt(t,"display"),Tt(t,"aria-hidden")})(e),VT.showSlot(r,n),((e, t)=>{YE(e,t,WE.getOnShow)})(r,n)),a.each((e=>((e, t)=>YE(e,t,WE.getOnHide))(r,e)))),i}))};return{uid:e.uid,dom:{tag:"div",classes:["tox-view-wrap"],attributes:{"aria-hidden":"true"},styles:{display:"none"}},components:[],behaviours:xl([Gp.config({}),vm.config({find: e=>{const t=Gp.contents(e);return oe(t)}})]),apis:o}},name:"silver.ViewWrapper",configFields:[or("backstage")],apis:{setViews:(e, t, o)=>e.setViews(t,o),toggleView:(e, t, o, n, r)=>e.toggleView(t,o,n,r),whichView:(e, t)=>e.whichView(t)}});const JE=BO.optional({factory:LT,name:"menubar",schema:[or("backstage")]}),QE=BO.optional({factory:{sketch: e=>PO.sketch({uid:e.uid,dom:e.dom,listBehaviours:xl([Pp.config({mode:"acyclic",selector:".tox-toolbar"})]),makeItem:()=>LE({type:e.type,uid:ls("multiple-toolbar-item"),cyclicKeying:!1,initGroups:[],providers:e.providers,onEscape:()=>(e.onEscape(),E.some(!0))}),setupItem:(e, t, o, n)=>{VO.setGroups(t,o)},shell:!0})},name:"multiple-toolbar",schema:[or("dom"),or("onEscape")]}),eA=BO.optional({factory:{sketch: e=>{const t=(e=>e.type===tf.sliding?BE:e.type===tf.floating?DE:LE)(e);return t({type:e.type,uid:e.uid,onEscape:()=>(e.onEscape(),E.some(!0)),onToggled:(t, o)=>e.onToolbarToggled(o),cyclicKeying:!1,initGroups:[],getSink:e.getSink,providers:e.providers,moreDrawerData:{lazyToolbar:e.lazyToolbar,lazyMoreButton:e.lazyMoreButton,lazyHeader:e.lazyHeader},attributes:e.attributes})}},name:"toolbar",schema:[or("dom"),or("onEscape"),or("getSink")]}),tA=BO.optional({factory:{sketch: e=>{const t=e.editor,o=e.sticky?ET:qO;return{uid:e.uid,dom:e.dom,components:e.components,behaviours:xl(o(t,e.sharedBackstage))}}},name:"header",schema:[or("dom")]}),oA=BO.optional({factory:{sketch: e=>({uid:e.uid,dom:e.dom,components:[{dom:{tag:"a",attributes:{href:"https://www.tiny.cloud/tinymce-self-hosted-premium-features/?utm_source=TinyMCE&utm_medium=SPAP&utm_campaign=SPAP&utm_id=editorreferral",rel:"noopener",target:"_blank","aria-hidden":"true"},classes:["tox-promotion-link"],innerHtml:"⚡Upgrade"}}]})},name:"promotion",schema:[or("dom")]}),nA=BO.optional({name:"socket",schema:[or("dom")]}),rA=BO.optional({factory:{sketch: e=>({uid:e.uid,dom:{tag:"div",classes:["tox-sidebar"],attributes:{role:"presentation"}},components:[{dom:{tag:"div",classes:["tox-sidebar__slider"]},components:[],behaviours:xl([Qw.config({}),eh.config({}),ES.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=>{vm.getCurrent(e).each(VT.hideAllSlots),Ra(e,YT)},onGrown: e=>{Ra(e,YT)},onStartGrow: e=>{Da(e,KT,{width:Lt(e.element,"width").getOr("")})},onStartShrink: e=>{Da(e,KT,{width:Xt(e.element)+"px"})}}),Gp.config({}),vm.config({find: e=>{const t=Gp.contents(e);return oe(t)}})])}],behaviours:xl([_C(0),Kp("sidebar-sliding-events",[Va(KT,((e, t)=>{Mt(e.element,"width",t.event.width)})),Va(YT,((e, t)=>{Pt(e.element,"width")}))])])})},name:"sidebar",schema:[or("dom")]}),aA=BO.optional({factory:{sketch: e=>({uid:e.uid,dom:{tag:"div",attributes:{"aria-hidden":"true"},classes:["tox-throbber"],styles:{display:"none"}},behaviours:xl([Gp.config({}),QT.config({focus:!1}),vm.config({find: e=>oe(e.components())})]),components:[]})},name:"throbber",schema:[or("dom")]}),sA=BO.optional({factory:XE,name:"viewWrapper",schema:[or("backstage")]}),iA=BO.optional({factory:{sketch: e=>({uid:e.uid,dom:{tag:"div",classes:["tox-editor-container"]},components:e.components})},name:"editorContainer",schema:[]});var lA=hm({name:"OuterContainer",factory:(e, t, o)=>{let n=!1;const r={getSocket: t=>DO.getPart(t,e,"socket"),setSidebar:(t, o, n)=>{DO.getPart(t,e,"sidebar").each((e=>((e, t, o)=>{vm.getCurrent(e).each((n=>{Gp.set(n,[WT(t)]);const r=null==o?void 0:o.toLowerCase();a(r)&&be(t,r)&&vm.getCurrent(n).each((t=>{VT.showSlot(t,r),ES.immediateGrow(n),Pt(n.element,"width"),$T(e.element,"region")}))}))})(e,o,n)))},toggleSidebar:(t, o)=>{DO.getPart(t,e,"sidebar").each((e=>((e, t)=>{vm.getCurrent(e).each((o=>{vm.getCurrent(o).each((n=>{ES.hasGrown(o)?VT.isShowing(n,t)?(ES.shrink(o),$T(e.element,"presentation")):(VT.hideAllSlots(n),VT.showSlot(n,t),$T(e.element,"region")):(VT.hideAllSlots(n),VT.showSlot(n,t),ES.grow(o),$T(e.element,"region"))}))}))})(e,o)))},whichSidebar: t=>DO.getPart(t,e,"sidebar").bind(GT).getOrNull(),getHeader: t=>DO.getPart(t,e,"header"),getToolbar: t=>DO.getPart(t,e,"toolbar"),setToolbar:(t, o)=>{DO.getPart(t,e,"toolbar").each((e=>{const t=P(o,ME);e.getApis().setGroups(e,t)}))},setToolbars:(t, o)=>{DO.getPart(t,e,"multiple-toolbar").each((e=>{const t=P(o,(e=>P(e,ME)));PO.setItems(e,t)}))},refreshToolbar: t=>{DO.getPart(t,e,"toolbar").each((e=>e.getApis().refresh(e)))},toggleToolbarDrawer: t=>{DO.getPart(t,e,"toolbar").each((e=>{xe(e.getApis().toggle,(t=>t(e)))}))},toggleToolbarDrawerWithoutFocusing: t=>{DO.getPart(t,e,"toolbar").each((e=>{xe(e.getApis().toggleWithoutFocusing,(t=>t(e)))}))},isToolbarDrawerToggled: t=>DO.getPart(t,e,"toolbar").bind((e=>E.from(e.getApis().isOpen).map((t=>t(e))))).getOr(!1),getThrobber: t=>DO.getPart(t,e,"throbber"),focusToolbar: t=>{DO.getPart(t,e,"toolbar").orThunk((()=>DO.getPart(t,e,"multiple-toolbar"))).each((e=>{Pp.focusIn(e)}))},setMenubar:(t, o)=>{DO.getPart(t,e,"menubar").each((e=>{LT.setMenus(e,o)}))},focusMenubar: t=>{DO.getPart(t,e,"menubar").each((e=>{LT.focus(e)}))},setViews:(t, o)=>{DO.getPart(t,e,"viewWrapper").each((e=>{XE.setViews(e,o)}))},toggleView:(t, o)=>DO.getPart(t,e,"viewWrapper").exists((e=>XE.toggleView(e,(()=>r.showMainView(t)),(()=>r.hideMainView(t)),o))),whichView: t=>DO.getPart(t,e,"viewWrapper").bind(XE.whichView).getOrNull(),hideMainView: t=>{n=r.isToolbarDrawerToggled(t),n&&r.toggleToolbarDrawer(t),DO.getPart(t,e,"editorContainer").each((e=>{const t=e.element;Mt(t,"display","none"),xt(t,"aria-hidden","true")}))},showMainView: t=>{n&&r.toggleToolbarDrawer(t),DO.getPart(t,e,"editorContainer").each((e=>{const t=e.element;Pt(t,"display"),Tt(t,"aria-hidden")})),r.refreshToolbar(t)}};return{uid:e.uid,dom:e.dom,components:t,apis:r,behaviours:e.behaviours}},configFields:[or("dom"),or("behaviours")],partFields:[tA,JE,eA,QE,nA,rA,oA,aA,sA,iA],apis:{getSocket:(e, t)=>e.getSocket(t),setSidebar:(e, t, o, n)=>{e.setSidebar(t,o,n)},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)=>{e.setToolbar(t,o)},setToolbars:(e, t, o)=>{e.setToolbars(t,o)},refreshToolbar:(e, t)=>e.refreshToolbar(t),toggleToolbarDrawer:(e, t)=>{e.toggleToolbarDrawer(t)},toggleToolbarDrawerWithoutFocusing:(e, t)=>{e.toggleToolbarDrawerWithoutFocusing(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)},setViews:(e, t, o)=>{e.setViews(t,o)},toggleView:(e, t, o)=>e.toggleView(t,o),whichView:(e, t)=>e.whichView(t)}});const cA={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 inserttemplate codesample inserttable | charmap emoticons hr | pagebreak nonbreaking anchor tableofcontents footnotes | mergetags | 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 | autocorrect capitalization | a11ycheck code typography wordcount addtemplate"},table:{title:"Table",items:"inserttable | cell row column | advtablesort | tableprops deletetable"},help:{title:"Help",items:"help"}},dA= e=>e.split(" "),uA=(e, t)=>{const o={...cA,...t.menus},n=se(t.menus).length>0,r=void 0===t.menubar||!0===t.menubar?dA("file edit view insert format tools table help"):dA(!1===t.menubar?"":t.menubar),s=V(r,(e=>{const o=be(cA,e);return n?o||ye(t.menus,e).exists((e=>be(e,"items"))):o})),i=P(s,(n=>{const r=o[n];return((e, t, o)=>{const n=wf(o).split(/[ ,]/);return{text:e.title,getItems:()=>G(e.items,(e=>{const o=e.toLowerCase();return 0===o.trim().length||L(n,(e=>e===o))?[]:"separator"===o||"|"===o?[{type:"separator"}]:t.menuItems[o]?[t.menuItems[o]]:[]}))}})({title:r.title,items:dA(r.items)},t,e)}));return V(i,(e=>e.getItems().length>0&&L(e.getItems(),(e=>a(e)||"separator"!==e.type))))},mA= e=>{const t=()=>{e._skinLoaded=!0,(e=>{e.dispatch("SkinLoaded")})(e)};return()=>{e.initialized?t():e.on("init",t)}},gA=(e, t, o)=>(e.on("remove",(()=>o.unload(t))),o.load(t)),pA=(e, t)=>gA(e,t+"/skin.min.css",e.ui.styleSheetLoader),hA=(e, t)=>{var o;return o=Ie(e.getElement()),yt(o).isSome()?gA(e,t+"/skin.shadowdom.min.css",nf.DOM.styleSheetLoader):Promise.resolve()},fA=(e, t)=>{const o=Gf(t);return o&&t.contentCSS.push(o+(e?"/content.inline":"/content")+".min.css"),!Wf(t)&&a(o)?Promise.all([pA(t,o),hA(t,o)]).then(mA(t),((e, t)=>()=>((e, t)=>{e.dispatch("SkinLoadError",t)})(e,{message:"Skin could not be loaded"}))(t)):Promise.resolve(mA(t)())},yA=x(fA,!1),bA=x(fA,!0),vA=(e, t)=> o=>{const n=Jl(),r=()=>{o.setActive(e.formatter.match(t));const r=e.formatter.formatChanged(t,o.setActive);n.set(r)};return e.initialized?r():e.once("init",r),()=>{e.off("init",r),n.clear()}},kA=(e, t, o)=> n=>{const r=()=>o(n),a=()=>{o(n),e.on(t,r)};return e.initialized?a():e.once("init",a),()=>{e.off("init",a),e.off(t,r)}},wA= e=> t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("mceToggleFormat",!1,t.format)}))},_A=(e, t)=>()=>e.execCommand(t),xA=(e, t, o)=>{const n=(e, n, a, s)=>{const i=t.shared.providers.translate(e.title);if("separator"===e.type)return E.some({type:"separator",text:i});if("submenu"===e.type){const t=G(e.getStyleItems(),(e=>r(e,n,s)));return 0===n&&t.length<=0?E.none():E.some({type:"nestedmenuitem",text:i,enabled:t.length>0,getSubmenuItems:()=>G(e.getStyleItems(),(e=>r(e,n,s)))})}return E.some({type:"togglemenuitem",text:i,icon:e.icon,active:e.isSelected(s),enabled:!a,onAction:o.onAction(e),...e.getStylePreview().fold((()=>({})),(e=>({meta:{style:e}})))})},r=(e, t, r)=>{const a="formatter"===e.type&&o.isInvalid(e);return 0===t?a?[]:n(e,t,!1,r).toArray():n(e,t,a,r).toArray()},a= e=>{const t=o.getCurrentValue(),n=o.shouldHide?0:1;return G(e,(e=>r(e,n,t)))};return{validateItems:a,getFetch:(e, t)=>(o, n)=>{const r=t(),s=a(r);n(eS(s,uy.CLOSE_ON_EXECUTE,e,{isHorizontalMenu:!1,search:E.none()}))}}},CA=(e, t, o)=>{const n=o.dataset,r="basic"===n.type?()=>P(n.data,(e=>iO(e,o.isSelectedFor,o.getPreviewFor))):n.getData;return{items:xA(0,t,o),getStyleItems:r}},SA=(e, t, o)=>{const{items:n,getStyleItems:r}=CA(0,t,o),a=kA(e,"NodeChange",(e=>{const t=e.getComponent();o.updateText(t)}));return YC({text:o.icon.isSome()?E.none():o.text,icon:o.icon,tooltip:E.from(o.tooltip),role:E.none(),fetch:n.getFetch(t,r),onSetup:a,getApi: e=>({getComponent:k(e)}),columns:1,presets:"normal",classes:o.icon.isSome()?[]:["bespoke"],dropdownBehaviours:[]},"tox-tbtn",t.shared)};var zA;!function(e){e[e.SemiColon=0]="SemiColon",e[e.Space=1]="Space"}(zA||(zA={}));const OA=(e, t, o)=>{const n=(r=((e, t)=>t===zA.SemiColon?e.replace(/;$/,"").split(";"):e.split(" "))(e.options.get(t),o),P(r,(e=>{let t=e,o=e;const n=e.split("=");return n.length>1&&(t=n[0],o=n[1]),{title:t,format:o}})));var r;return{type:"basic",data:n}},TA=[{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"}],EA= e=>{const t={type:"basic",data:TA};return{tooltip:"Align",text:E.none(),icon:E.some("align-left"),isSelectedFor: t=>()=>e.formatter.match(t),getCurrentValue:E.none,getPreviewFor: e=>E.none,onAction: t=>()=>q(TA,(e=>e.format===t.format)).each((t=>e.execCommand(t.command))),updateText: t=>{const o=q(TA,(t=>e.formatter.match(t.format))).fold(k("left"),(e=>e.title.toLowerCase()));Da(t,KC,{icon:`align-${o}`})},dataset:t,shouldHide:!1,isInvalid: t=>!e.formatter.canApply(t.format)}},AA=(e, t)=>{const o=t(),n=P(o,(e=>e.format));return E.from(e.formatter.closest(n)).bind((e=>q(o,(t=>t.format===e)))).orThunk((()=>Ce(e.formatter.match("p"),{title:"Paragraph",format:"p"})))},MA= e=>{const t="Paragraph",o=OA(e,"block_formats",zA.SemiColon);return{tooltip:"Blocks",text:E.some(t),icon:E.none(),isSelectedFor: t=>()=>e.formatter.match(t),getCurrentValue:E.none,getPreviewFor: t=>()=>{const o=e.formatter.get(t);return o?E.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):E.none()},onAction:wA(e),updateText: n=>{const r=AA(e,(()=>o.data)).fold(k(t),(e=>e.title));Da(n,GC,{text:r})},dataset:o,shouldHide:!1,isInvalid: t=>!e.formatter.canApply(t.format)}},NA=["-apple-system","Segoe UI","Roboto","Helvetica Neue","sans-serif"],RA= e=>{const t=e.split(/\s*,\s*/);return P(t,(e=>e.replace(/^['"]+|['"]+$/g,"")))},DA= e=>{const t="System Font",o=()=>{const o= e=>e?RA(e)[0]:"",r=e.queryCommandValue("FontName"),a=n.data,s=r?r.toLowerCase():"",i=q(a,(e=>{const t=e.format;return t.toLowerCase()===s||o(t).toLowerCase()===o(s).toLowerCase()})).orThunk((()=>Ce((e=>0===e.indexOf("-apple-system")&&(()=>{const t=RA(e.toLowerCase());return K(NA,(e=>t.indexOf(e.toLowerCase())>-1))})())(s),{title:t,format:s})));return{matchOpt:i,font:r}},n=OA(e,"font_family_formats",zA.SemiColon);return{tooltip:"Fonts",text:E.some(t),icon:E.none(),isSelectedFor: e=> t=>t.exists((t=>t.format===e)),getCurrentValue:()=>{const{matchOpt:e}=o();return e},getPreviewFor: e=>()=>E.some({tag:"div",styles:-1===e.indexOf("dings")?{"font-family":e}:{}}),onAction: t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("FontName",!1,t.format)}))},updateText: e=>{const{matchOpt:t,font:n}=o(),r=t.fold(k(n),(e=>e.title));Da(e,GC,{text:r})},dataset:n,shouldHide:!1,isInvalid:O}},BA={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:[""]},LA=(()=>{const e="[0-9]+",t="[eE][+-]?"+e,o= e=>`(?:${e})?`,n=["Infinity",e+"\\."+o(e)+o(t),"\\."+e+o(t),e+o(t)].join("|");return new RegExp(`^([+-]?(?:${n}))(.*)$`)})(),IA=(e, t)=>E.from(LA.exec(e)).bind((e=>{const o=Number(e[1]),n=e[2];return((e, t)=>L(t,(t=>L(BA[t],(t=>e===t)))))(n,t)?E.some({value:o,unit:n}):E.none()})),HA={tab:k(9),escape:k(27),enter:k(13),backspace:k(8),delete:k(46),left:k(37),up:k(38),right:k(39),down:k(40),space:k(32),home:k(36),end:k(35),pageUp:k(33),pageDown:k(34)},PA={"8pt":"1","10pt":"2","12pt":"3","14pt":"4","18pt":"5","24pt":"6","36pt":"7"},FA={"xx-small":"7pt","x-small":"8pt",small:"10pt",medium:"12pt",large:"14pt","x-large":"18pt","xx-large":"24pt"},jA=(e, t)=>/[0-9.]+px$/.test(e)?((e, t)=>{const o=Math.pow(10,t);return Math.round(e*o)/o})(72*parseInt(e,10)/96,t||0)+"pt":ye(FA,e).getOr(e),VA= e=>ye(PA,e).getOr(""),ZA= e=>{const t=()=>{let t=E.none();const o=n.data,r=e.queryCommandValue("FontSize");if(r)for(let e=3; t.isNone()&&e>=0; e--){const n=jA(r,e),a=VA(n);t=q(o,(e=>e.format===r||e.format===n||e.format===a))}return{matchOpt:t,size:r}},o=k(E.none),n=OA(e,"font_size_formats",zA.Space);return{tooltip:"Font sizes",text:E.some("12pt"),icon:E.none(),isSelectedFor: e=> t=>t.exists((t=>t.format===e)),getPreviewFor:o,getCurrentValue:()=>{const{matchOpt:e}=t();return e},onAction: t=>()=>{e.undoManager.transact((()=>{e.focus(),e.execCommand("FontSize",!1,t.format)}))},updateText: e=>{const{matchOpt:o,size:n}=t(),r=o.fold(k(n),(e=>e.title));Da(e,GC,{text:r})},dataset:n,shouldHide:!1,isInvalid:O}},UA=(e, t)=>{const o="Paragraph";return{tooltip:"Formats",text:E.some(o),icon:E.none(),isSelectedFor: t=>()=>e.formatter.match(t),getCurrentValue:E.none,getPreviewFor: t=>()=>{const o=e.formatter.get(t);return void 0!==o?E.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):E.none()},onAction:wA(e),updateText: t=>{const n= e=>oO(e)?G(e.items,n):nO(e)?[{title:e.title,format:e.format}]:[],r=G(sO(e),n),a=AA(e,k(r)).fold(k(o),(e=>e.title));Da(t,GC,{text:a})},shouldHide:vf(e),isInvalid: t=>!e.formatter.canApply(t.format),dataset:t}},qA=k([or("toggleClass"),or("fetch"),Ri("onExecute"),vr("getHotspot",E.some),vr("getAnchorOverrides",k({})),wc(),Ri("onItemExecute"),ur("lazySink"),or("dom"),Mi("onOpen"),gu("splitDropdownBehaviours",[ow,Pp,eh]),vr("matchWidth",!1),vr("useMinWidth",!1),vr("eventOrder",{}),ur("role")].concat(vw())),WA=Fu({factory:jh,schema:[or("dom")],name:"arrow",defaults:()=>({buttonBehaviours:xl([eh.revoke()])}),overrides: e=>({dom:{tag:"span",attributes:{role:"presentation"}},action: t=>{t.getSystem().getByUid(e.uid).each(Ba)},buttonBehaviours:xl([lh.config({toggleOnExecute:!1,toggleClass:e.toggleClass})])})}),$A=Fu({factory:jh,schema:[or("dom")],name:"button",defaults:()=>({buttonBehaviours:xl([eh.revoke()])}),overrides: e=>({dom:{tag:"span",attributes:{role:"presentation"}},action: t=>{t.getSystem().getByUid(e.uid).each((o=>{e.onExecute(o,t)}))}})}),GA=k([WA,$A,Vu({factory:{sketch: e=>({uid:e.uid,dom:{tag:"span",styles:{display:"none"},attributes:{"aria-hidden":"true"},innerHtml:e.text}})},schema:[or("text")],name:"aria-descriptor"}),ju({schema:[Ti()],name:"menu",defaults: e=>({onExecute:(t, o)=>{t.getSystem().getByUid(e.uid).each((n=>{e.onItemExecute(n,t,o)}))}})}),dw()]),KA=hm({name:"SplitDropdown",configFields:qA(),partFields:GA(),factory:(e, t, o, n)=>{const r= e=>{vm.getCurrent(e).each((e=>{Zm.highlightFirst(e),Pp.focusIn(e)}))},a= t=>{pw(e,w,t,n,r,Lh.HighlightMenuAndItem).get(y)},s= t=>{const o=tm(t,e,"button");return Ba(o),E.some(!0)},i={...Pa([Ya(((t, o)=>{em(t,e,"aria-descriptor").each((e=>{const o=ls("aria");xt(e.element,"id",o),xt(t.element,"aria-describedby",o)}))}))]),...dh(E.some(a))},l={repositionMenus: e=>{lh.isOn(e)&&bw(e)}};return{uid:e.uid,dom:e.dom,components:t,apis:l,eventOrder:{...e.eventOrder,[ua()]:["disabling","toggling","alloy.base.behaviour"]},events:i,behaviours:hu(e.splitDropdownBehaviours,[ow.config({others:{sandbox: t=>{const o=tm(t,e,"arrow");return yw(e,t,{onOpen:()=>{lh.on(o),lh.on(t)},onClose:()=>{lh.off(o),lh.off(t)}})}}}),Pp.config({mode:"special",onSpace:s,onEnter:s,onDown: e=>(a(e),E.some(!0))}),eh.config({}),lh.config({toggleOnExecute:!1,aria:{mode:"expanded"}})]),domModification:{attributes:{role:e.role.getOr("button"),"aria-haspopup":!0}}}},apis:{repositionMenus:(e, t)=>e.repositionMenus(t)}}),YA= e=>({isEnabled:()=>!Rm.isDisabled(e),setEnabled: t=>Rm.set(e,!t),setText: t=>Da(e,GC,{text:t}),setIcon: t=>Da(e,KC,{icon:t})}),XA= e=>({setActive: t=>{lh.set(e,t)},isActive:()=>lh.isOn(e),isEnabled:()=>!Rm.isDisabled(e),setEnabled: t=>Rm.set(e,!t),setText: t=>Da(e,GC,{text:t}),setIcon: t=>Da(e,KC,{icon:t})}),JA=(e, t)=>e.map((e=>({"aria-label":t.translate(e),title:t.translate(e)}))).getOr({}),QA=ls("focus-button"),eM=(e, t, o, n, r)=>{const a=t.map((e=>Vh($C(e,"tox-tbtn",r)))),s=e.map((e=>Vh(WC(e,r.icons))));return{dom:{tag:"button",classes:["tox-tbtn"].concat(t.isSome()?["tox-tbtn--select"]:[]),attributes:JA(o,r)},components:Tv([s.map((e=>e.asSpec())),a.map((e=>e.asSpec()))]),eventOrder:{[Zr()]:["focusing","alloy.base.behaviour",jC],[_a()]:[jC,"toolbar-group-button-events"]},buttonBehaviours:xl([_v(r.isDisabled),vv(),Kp(jC,[Ya(((e, t)=>ZC(e))),Va(GC,((e, t)=>{a.bind((t=>t.getOpt(e))).each((e=>{Gp.set(e,[ti(r.translate(t.event.text))])}))})),Va(KC,((e, t)=>{s.bind((t=>t.getOpt(e))).each((e=>{Gp.set(e,[WC(t.event.icon,r.icons)])}))})),Va(Zr(),((e, t)=>{t.event.prevent(),Ra(e,QA)}))])].concat(n.getOr([])))}},tM=(e, t, o)=>{var n;const r=Tr(y),a=eM(e.icon,e.text,e.tooltip,E.none(),o);return jh.sketch({dom:a.dom,components:a.components,eventOrder:VC,buttonBehaviours:{...xl([Kp("toolbar-button-events",[(s={onAction:e.onAction,getApi:t.getApi},Qa(((e, t)=>{xv(s,e)((t=>{Da(e,FC,{buttonApi:t}),s.onAction(t)}))}))),Cv(t,r),Sv(t,r)]),_v((()=>!e.enabled||o.isDisabled())),vv()].concat(t.toolbarButtonBehaviours)),[jC]:null===(n=a.buttonBehaviours)||void 0===n?void 0:n[jC]}});var s},oM=(e, t, o)=>tM(e,{toolbarButtonBehaviours:o.length>0?[Kp("toolbarButtonWith",o)]:[],getApi:YA,onSetup:e.onSetup},t),nM=(e, t, o)=>tM(e,{toolbarButtonBehaviours:[Gp.config({}),lh.config({toggleClass:"tox-tbtn--enabled",aria:{mode:"pressed"},toggleOnExecute:!1})].concat(o.length>0?[Kp("toolbarToggleButtonWith",o)]:[]),getApi:XA,onSetup:e.onSetup},t),rM=(e, t, o)=> n=>iw((e=>t.fetch(e))).map((r=>E.from(Aw(fn(Zk(ls("menu-value"),r,(o=>{t.onItemAction(e(n),o)}),t.columns,t.presets,uy.CLOSE_ON_EXECUTE,t.select.getOr(O),o),{movement:qk(t.columns,t.presets),menuBehaviours:av("auto"!==t.columns?[]:[Ya(((e, o)=>{rv(e,4,xy(t.presets)).each((({numRows:t,numColumns:o})=>{Pp.setGridSize(e,t,o)}))}))])}))))),aM=[{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"]}],sM=(e, t)=>(o, n, r)=>{const a=e(o).mapError((e=>Yn(e))).getOrDie();return t(a,n,r)},iM={button:sM(Ab,((e, t)=>{return o=e,n=t.shared.providers,oM(o,n,[]);var o,n})),togglebutton:sM(Rb,((e, t)=>{return o=e,n=t.shared.providers,nM(o,n,[]);var o,n})),menubutton:sM(DT,((e, t)=>MS(e,"tox-tbtn",t,E.none(),!1))),splitbutton:sM((e=>$n("SplitButton",BT,e)),((e, t)=>((e, t)=>{const o= e=>({isEnabled:()=>!Rm.isDisabled(e),setEnabled: t=>Rm.set(e,!t),setIconFill:(t, o)=>{pi(e.element,`svg path[id="${t}"], rect[id="${t}"]`).each((e=>{xt(e,"fill",o)}))},setActive: t=>{xt(e.element,"aria-pressed",t),pi(e.element,"span").each((o=>{e.getSystem().getByDom(o).each((e=>lh.set(e,t)))}))},isActive:()=>pi(e.element,"span").exists((t=>e.getSystem().getByDom(t).exists(lh.isOn))),setText: t=>pi(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>Da(e,GC,{text:t}))))),setIcon: t=>pi(e.element,"span").each((o=>e.getSystem().getByDom(o).each((e=>Da(e,KC,{icon:t})))))}),n=Tr(y),r={getApi:o,onSetup:e.onSetup};return KA.sketch({dom:{tag:"div",classes:["tox-split-button"],attributes:{"aria-pressed":!1,...JA(e.tooltip,t.providers)}},onExecute: t=>{const n=o(t);n.isEnabled()&&e.onAction(n)},onItemExecute:(e, t, o)=>{},splitDropdownBehaviours:xl([wv(t.providers.isDisabled),vv(),Kp("split-dropdown-events",[Ya(((e, t)=>ZC(e))),Va(QA,eh.focus),Cv(r,n),Sv(r,n)]),C_.config({})]),eventOrder:{[_a()]:["alloy.base.behaviour","split-dropdown-events"]},toggleClass:"tox-tbtn--enabled",lazySink:t.getSink,fetch:rM(o,e,t.providers),parts:{menu:Ey(0,e.columns,e.presets)},components:[KA.parts.button(eM(e.icon,e.text,E.none(),E.some([lh.config({toggleClass:"tox-tbtn--enabled",toggleOnExecute:!1})]),t.providers)),KA.parts.arrow({dom:{tag:"button",classes:["tox-tbtn","tox-split-button__chevron"],innerHtml:Kh("chevron-down",t.providers.icons)},buttonBehaviours:xl([wv(t.providers.isDisabled),vv(),Yh()])}),KA.parts["aria-descriptor"]({text:t.providers.translate("To open the popup, press Shift+Enter")})]})})(e,t.shared))),grouptoolbarbutton:sM((e=>$n("GroupToolbarButton",MT,e)),((e, t, o)=>{const n=o.ui.registry.getAll().buttons,r={[vc]:t.shared.header.isPositionedAtTop()?bc.TopToBottom:bc.BottomToTop};if(_f(o)===tf.floating)return((e, t, o, n)=>{const r=t.shared,a=Tr(y),s={toolbarButtonBehaviours:[],getApi:YA,onSetup:e.onSetup},i=[Kp("toolbar-group-button-events",[Cv(s,a),Sv(s,a)])];return bE.sketch({lazySink:r.getSink,fetch:()=>iw((t=>{t(P(o(e.items),ME))})),markers:{toggledClass:"tox-tbtn--enabled"},parts:{button:eM(e.icon,e.text,e.tooltip,E.some(i),r.providers),toolbar:{dom:{tag:"div",classes:["tox-toolbar__overflow"],attributes:n}}}})})(e,t,(e=>cM(o,{buttons:n,toolbar:e,allowToolbarGroups:!1},t,E.none())),r);throw new Error("Toolbar groups are only supported when using floating toolbar mode")}))},lM={styles:(e, t)=>{const o={type:"advanced",...t.styles};return SA(e,t,UA(e,o))},fontsize:(e, t)=>SA(e,t,ZA(e)),fontsizeinput:(e, t)=>((e, t, o)=>{let n=E.none();const r=kA(e,"NodeChange",(e=>{const t=e.getComponent();n=E.some(t),o.updateInputValue(t)})),a= e=>({getComponent:k(e)}),s=Tr(y),i=ls("custom-number-input-events"),l=(e, t, r)=>{const a=n.map((e=>mu.getValue(e))).getOr(""),s=o.getNewValue(a,e),i=a.length-`${s}`.length,l=n.map((e=>e.element.dom.selectionStart-i)),c=n.map((e=>e.element.dom.selectionEnd-i));o.onAction(s,r),n.each((e=>{mu.setValue(e,s),t&&(l.each((t=>e.element.dom.selectionStart=t)),c.each((t=>e.element.dom.selectionEnd=t)))}))},c=(e, t)=>l(((e, t)=>e-t),e,t),d=(e, t)=>l(((e, t)=>e+t),e,t),u= e=>at(e.element).fold(E.none,(e=>(Ml(e),E.some(!0)))),m= e=>Rl(e.element)?(ct(e.element).each((e=>Ml(e))),E.some(!0)):E.none(),g=(e, o, n, r)=>{const a=t.shared.providers.translate(n),s=ls("altExecuting"),i=()=>e(!0);return jh.sketch({dom:{tag:"button",attributes:{title:a,"aria-label":a},classes:r.concat(o)},components:[qC(o,t.shared.providers.icons)],buttonBehaviours:xl([Kp(s,[Va(Yr(),((t, o)=>{o.event.raw.keyCode!==HA.space()&&o.event.raw.keyCode!==HA.enter()||e(!1)})),Va(ea(),i),Va(jr(),i)])]),eventOrder:{[Yr()]:[s,"keying"],[ea()]:[s,"alloy.base.behaviour"],[jr()]:[s,"alloy.base.behaviour"]}})},p=Vh(g((e=>c(!1,e)),"minus","Decrease font size",["highlight-on-focus"])),h=Vh(g((e=>d(!1,e)),"plus","Increase font size",["highlight-on-focus"])),f=Vh({dom:{tag:"div",classes:["tox-input-wrapper","highlight-on-focus"]},components:[Dy.sketch({inputBehaviours:xl([Kp(i,[Cv({onSetup:r,getApi:a},s),Sv({getApi:a},s)]),Kp("input-update-display-text",[Va(GC,((e, t)=>{mu.setValue(e,t.event.text)})),Va(Kr(),(e=>{o.onAction(mu.getValue(e))})),Va(Qr(),(e=>{o.onAction(mu.getValue(e))}))]),Pp.config({mode:"special",onEnter: e=>(l(w,!0,!0),E.some(!0)),onEscape:u,onUp: e=>(d(!0,!1),E.some(!0)),onDown: e=>(c(!0,!1),E.some(!0)),onLeft:(e, t)=>(t.cut(),E.none()),onRight:(e, t)=>(t.cut(),E.none())})])})],behaviours:xl([eh.config({}),Pp.config({mode:"special",onEnter:m,onSpace:m,onEscape:u}),Kp("input-wrapper-events",[Va($r(),(e=>{F([p,h],(t=>{const o=Ie(t.get(e).element.dom);Rl(o)&&Nl(o)}))}))])])});return{dom:{tag:"div",classes:["tox-number-input"]},components:[p.asSpec(),f.asSpec(),h.asSpec()],behaviours:xl([eh.config({}),Pp.config({mode:"flow",focusInside:mg.OnEnterOrSpaceMode,cycles:!1,selector:"button, .tox-input-wrapper",onEscape: e=>Rl(e.element)?E.none():(Ml(e.element),E.some(!0))})])}})(e,t,(e=>{const t=()=>e.queryCommandValue("FontSize");return{updateInputValue: e=>Da(e,GC,{text:t()}),onAction:(t, o)=>e.execCommand("FontSize",!1,t,{skip_focus:!o}),getNewValue:(o, n)=>{IA(o,["unsupportedLength","empty"]);const r=IA(o,["unsupportedLength","empty"]).or(IA(t(),["unsupportedLength","empty"])),a=r.map((e=>e.value)).getOr(16),s=Rf(e),i=r.map((e=>e.unit)).filter((e=>""!==e)).getOr(s),l=n(a,(e=>{var t;return null!==(t={em:{step:.1},cm:{step:.1},in:{step:.1},pc:{step:.1},ch:{step:.1},rem:{step:.1}}[e])&&void 0!==t?t:{step:1}})(i).step);return`${(e=>e>=0)(l)?l:a}${i}`}}})(e)),fontfamily:(e, t)=>SA(e,t,DA(e)),blocks:(e, t)=>SA(e,t,MA(e)),align:(e, t)=>SA(e,t,EA(e))},cM=(e, t, o, n)=>{const r=(e=>{const t=e.toolbar,o=e.buttons;return!1===t?[]:void 0===t||!0===t?(e=>{const t=P(aM,(t=>{const o=V(t.items,(t=>be(e,t)||be(lM,t)));return{name:t.name,items:o}}));return V(t,(e=>e.items.length>0))})(o):a(t)?(e=>{const t=e.split("|");return P(t,(e=>({items:e.trim().split(" ")})))})(t):(e=>f(e,(e=>be(e,"name")&&be(e,"items"))))(t)?t:(console.error("Toolbar type should be string, string[], boolean or ToolbarGroup[]"),[])})(t),s=P(r,(r=>{const a=G(r.items,(r=>0===r.trim().length?[]:((e, t, o, n, r, a)=>ye(t,o.toLowerCase()).orThunk((()=>a.bind((e=>ae(e,(e=>ye(t,e+o.toLowerCase()))))))).fold((()=>ye(lM,o.toLowerCase()).map((t=>t(e,r)))),(t=>"grouptoolbarbutton"!==t.type||n?((e, t, o)=>ye(iM,e.type).fold((()=>(console.error("skipping button defined by",e),E.none())),(n=>E.some(n(e,t,o)))))(t,r,e):(console.warn(`Ignoring the '${o}' toolbar button. Group toolbar buttons are only supported when using floating toolbar mode and cannot be nested.`),E.none()))))(e,t.buttons,r,t.allowToolbarGroups,o,n).toArray()));return{title:E.from(e.translate(r.name)),items:a}}));return V(s,(e=>e.items.length>0))},dM=(e, t, o, n)=>{const r=t.mainUi.outerContainer,s=o.toolbar,i=o.buttons;if(f(s,a)){const t=s.map((t=>{const r={toolbar:t,buttons:i,allowToolbarGroups:o.allowToolbarGroups};return cM(e,r,n,E.none())}));lA.setToolbars(r,t)}else lA.setToolbar(r,cM(e,o,n,E.none()))},uM=Mo(),mM=uM.os.isiOS()&&uM.os.version.major<=12;var gM=Object.freeze({__proto__:null,render:async(e, t, o, n, r)=>{const{mainUi:a,uiMotherships:s}=t,i=Tr(0),l=a.outerContainer;await yA(e);const d=Ie(r.targetNode),u=ft(ht(d));Rd(d,a.mothership),((e, t, o)=>{ay(e)&&Rd(o.mainUi.mothership.element,o.popupUi.mothership),Nd(t,o.dialogUi.mothership)})(e,u,t),e.on("PostRender",(()=>{lA.setSidebar(l,o.sidebar,Uf(e)),dM(e,t,o,n),i.set(e.getWin().innerWidth),lA.setMenubar(l,uA(e,o)),lA.setViews(l,o.views),((e, t)=>{const{uiMotherships:o}=t,n=e.dom;let r=e.getWin();const a=e.getDoc().documentElement,s=Tr(Wt(r.innerWidth,r.innerHeight)),i=Tr(Wt(a.offsetWidth,a.offsetHeight)),l=()=>{const t=s.get();t.left===r.innerWidth&&t.top===r.innerHeight||(s.set(Wt(r.innerWidth,r.innerHeight)),dk(e))},c=()=>{const t=e.getDoc().documentElement,o=i.get();o.left===t.offsetWidth&&o.top===t.offsetHeight||(i.set(Wt(t.offsetWidth,t.offsetHeight)),dk(e))},d= t=>{((e, t)=>{e.dispatch("ScrollContent",t)})(e,t)};n.bind(r,"resize",l),n.bind(r,"scroll",d);const u=oc(Ie(e.getBody()),"load",c);e.on("hide",(()=>{F(o,(e=>{Mt(e.element,"display","none")}))})),e.on("show",(()=>{F(o,(e=>{Pt(e.element,"display")}))})),e.on("NodeChange",c),e.on("remove",(()=>{u.unbind(),n.unbind(r,"resize",l),n.unbind(r,"scroll",d),r=null}))})(e,t)}));const m=lA.getSocket(l).getOrDie("Could not find expected socket element");if(mM){Nt(m.element,{overflow:"scroll","-webkit-overflow-scrolling":"touch"});const t=((e, t)=>{let o=null;return{cancel:()=>{c(o)||(clearTimeout(o),o=null)},throttle:(...t)=>{c(o)&&(o=setTimeout((()=>{o=null,e.apply(null,t)}),20))}}})((()=>{e.dispatch("ScrollContent")})),o=tc(m.element,"scroll",t.throttle);e.on("remove",o.unbind)}bv(e,t),e.addCommand("ToggleSidebar",((t, o)=>{lA.toggleSidebar(l,o),e.dispatch("ToggleSidebar")})),e.addQueryValueHandler("ToggleSidebar",(()=>{var e;return null!==(e=lA.whichSidebar(l))&&void 0!==e?e:""})),e.addCommand("ToggleView",((t, o)=>{if(lA.toggleView(l,o)){const t=l.element;a.mothership.broadcastOn([$d()],{target:t}),F(s,(e=>{e.broadcastOn([$d()],{target:t})})),c(lA.whichView(l))&&(e.focus(),e.nodeChanged())}})),e.addQueryValueHandler("ToggleView",(()=>{var e;return null!==(e=lA.whichView(l))&&void 0!==e?e:""}));const g=_f(e);g!==tf.sliding&&g!==tf.floating||e.on("ResizeWindow ResizeEditor ResizeContent",(()=>{const o=e.getWin().innerWidth;o!==i.get()&&(lA.refreshToolbar(t.mainUi.outerContainer),i.set(o))}));const p={setEnabled: e=>{yv(t,!e)},isEnabled:()=>!Rm.isDisabled(l)};return{iframeContainer:m.element.dom,editorContainer:l.element.dom,api:p}}});const pM= e=>/^[0-9\.]+(|px)$/i.test(""+e)?E.some(parseInt(""+e,10)):E.none(),hM= e=>h(e)?e+"px":e,fM=(e, t, o)=>{const n=t.filter((t=>e<t)),r=o.filter((t=>e>t));return n.or(r).getOr(e)},yM= e=>{const t=mf(e),o=gf(e),n=hf(e);return pM(t).map((e=>fM(e,o,n)))},{ToolbarLocation:bM,ToolbarMode:vM}=iy,kM=(e, t, o, n, r)=>{const{mainUi:a,uiMotherships:s}=o,i=nf.DOM,l=ty(e),c=ry(e),d=hf(e).or(yM(e)),u=n.shared.header,m=u.isPositionedAtTop,g=_f(e),p=g===vM.sliding||g===vM.floating,h=Tr(!1),f=()=>h.get()&&!e.removed,y= e=>p?e.fold(k(0),(e=>e.components().length>1?Zt(e.components()[1].element):0)):0,b=()=>{F(s,(e=>{e.broadcastOn([Gd()],{})}))},v= o=>{if(!f())return;l||r.on((e=>{const o=d.getOrThunk((()=>{const e=pM(Dt(kt(),"margin-left")).getOr(0);return Xt(kt())-Gt(t).left+e}));Mt(e.element,"max-width",o+"px")}));const n=l?E.none():(()=>{if(l)return E.none();if(Gt(a.outerContainer.element).left+Jt(a.outerContainer.element)>=window.innerWidth-40||Lt(a.outerContainer.element,"width").isSome()){Mt(a.outerContainer.element,"position","absolute"),Mt(a.outerContainer.element,"left","0px"),Pt(a.outerContainer.element,"width");const e=Jt(a.outerContainer.element);return E.some(e)}return E.none()})();p&&lA.refreshToolbar(a.outerContainer),l||(o=>{r.on((n=>{const r=lA.getToolbar(a.outerContainer),s=y(r),i=Xo(t),{top:l,left:c}=((e, t)=>ay(e)?GO(t):E.none())(e,a.outerContainer.element).fold((()=>({top:m()?Math.max(i.y-Zt(n.element)+s,0):i.bottom,left:i.x})),(e=>{var t;const o=Xo(e),r=null!==(t=e.dom.scrollTop)&&void 0!==t?t:0,a=Je(e,kt()),l=a?Math.max(i.y-Zt(n.element)+s,0):i.y-o.y+r-Zt(n.element)+s;return{top:m()?l:i.bottom,left:a?i.x:i.x-o.x}})),d={position:"absolute",left:Math.round(c)+"px",top:Math.round(l)+"px"},u=o.map((e=>{const t=Vo(),o=window.innerWidth-(c-t.left);return{width:Math.max(Math.min(e,o),150)+"px"}})).getOr({});Nt(a.outerContainer.element,{...d,...u})}))})(n),c&&r.on(o),b()},w=()=>!(l||!c||!f())&&r.get().exists((o=>{const n=u.getDockingMode(),s=(o=>{switch(Cf(e)){case bM.auto:const e=lA.getToolbar(a.outerContainer),n=y(e),r=Zt(o.element)-n,s=Xo(t);if(s.y>r)return"top";{const e=ot(t),o=Math.max(e.dom.scrollHeight,Zt(e));return s.bottom<o-r||en().bottom<s.bottom-r?"bottom":"top"}case bM.bottom:return"bottom";case bM.top:default:return"top"}})(o);return s!==n&&(i=s,r.on((e=>{kT.setModes(e,[i]),u.setDockingMode(i);const t=m()?bc.TopToBottom:bc.BottomToTop;xt(e.element,vc,t)})),!0);var i}));return{isVisible:f,isPositionedAtTop:m,show:()=>{h.set(!0),Mt(a.outerContainer.element,"display","flex"),i.addClass(e.getBody(),"mce-edit-focus"),F(s,(e=>{Pt(e.element,"display")})),w(),ay(e)?v((e=>kT.isDocked(e)?kT.reset(e):kT.refresh(e))):v(kT.refresh)},hide:()=>{h.set(!1),Mt(a.outerContainer.element,"display","none"),i.removeClass(e.getBody(),"mce-edit-focus"),F(s,(e=>{Mt(e.element,"display","none")}))},update:v,updateMode:()=>{w()&&v(kT.reset)},repositionPopups:b}},wM=(e, t)=>{const o=Xo(e);return{pos:t?o.y:o.bottom,bounds:o}};var _M=Object.freeze({__proto__:null,render:async(e, t, o, n, r)=>{const{mainUi:a}=t,s=Ql(),i=Ie(r.targetNode),l=kM(e,i,t,n,s),c=Of(e);await bA(e);const d=()=>{if(s.isSet())return void l.show();s.set(lA.getHeader(a.outerContainer).getOrDie());const r=oy(e);ay(e)?(Rd(i,a.mothership),Rd(i,t.popupUi.mothership)):Nd(r,a.mothership),Nd(r,t.dialogUi.mothership),dM(e,t,o,n),lA.setMenubar(a.outerContainer,uA(e,o)),l.show(),((e, t, o, n)=>{const r=Tr(wM(t,o.isPositionedAtTop())),a= n=>{const{pos:a,bounds:s}=wM(t,o.isPositionedAtTop()),{pos:i,bounds:l}=r.get(),c=s.height!==l.height||s.width!==l.width;r.set({pos:a,bounds:s}),c&&dk(e,n),o.isVisible()&&(i!==a?o.update(kT.reset):c&&(o.updateMode(),o.repositionPopups()))};n||(e.on("activate",o.show),e.on("deactivate",o.hide)),e.on("SkinLoaded ResizeWindow",(()=>o.update(kT.reset))),e.on("NodeChange keydown",(e=>{requestAnimationFrame((()=>a(e)))}));let s=0;const i=jS((()=>o.update(kT.refresh)),33);e.on("ScrollWindow",(()=>{const e=Vo().left;e!==s&&(s=e,i.throttle()),o.updateMode()})),ay(e)&&e.on("ElementScroll",(e=>{o.update(kT.refresh)}));const l=Jl();l.set(oc(Ie(e.getBody()),"load",(e=>a(e.raw)))),e.on("remove",(()=>{l.clear()}))})(e,i,l,c),e.nodeChanged()};e.on("show",d),e.on("hide",l.hide),c||(e.on("focus",d),e.on("blur",l.hide)),e.on("init",(()=>{(e.hasFocus()||c)&&d()})),bv(e,t);const u={show:d,hide:l.hide,setEnabled: e=>{yv(t,!e)},isEnabled:()=>!Rm.isDisabled(a.outerContainer)};return{editorContainer:a.outerContainer.element.dom,api:u}}});const xM="contexttoolbar-hide",CM=(e, t)=>Va(FC,((o, n)=>{const r=(e=>({hide:()=>Ra(e,ha()),getValue:()=>mu.getValue(e)}))(e.get(o));t.onAction(r,n.event.buttonApi)})),SM=(e, t)=>{const o=e.label.fold((()=>({})),(e=>({"aria-label":e}))),n=Vh(Dy.sketch({inputClasses:["tox-toolbar-textfield","tox-toolbar-nav-js"],data:e.initValue(),inputAttributes:o,selectOnFocus:!0,inputBehaviours:xl([Pp.config({mode:"special",onEnter: e=>r.findPrimary(e).map((e=>(Ba(e),!0))),onLeft:(e, t)=>(t.cut(),E.none()),onRight:(e, t)=>(t.cut(),E.none())})])})),r=((e, t, o)=>{const n=P(t,(t=>Vh(((e, t, o)=>(e=>"contextformtogglebutton"===e.type)(t)?((e, t, o)=>{const{primary:n,...r}=t.original,a=Gn(Rb({...r,type:"togglebutton",onAction:y}));return nM(a,o,[CM(e,t)])})(e,t,o):((e, t, o)=>{const{primary:n,...r}=t.original,a=Gn(Ab({...r,type:"button",onAction:y}));return oM(a,o,[CM(e,t)])})(e,t,o))(e,t,o))));return{asSpecs:()=>P(n,(e=>e.asSpec())),findPrimary: e=>ae(t,((t, o)=>t.primary?E.from(n[o]).bind((t=>t.getOpt(e))).filter(C(Rm.isDisabled)):E.none()))}})(n,e.commands,t);return[{title:E.none(),items:[n.asSpec()]},{title:E.none(),items:r.asSpecs()}]},zM=(e, t, o)=>t.bottom-e.y>=o&&e.bottom-t.y>=o,OM= e=>{const t=(e=>{const t=e.getBoundingClientRect();if(t.height<=0&&t.width<=0){const o=ut(Ie(e.startContainer),e.startOffset).element;return(We(o)?rt(o):E.some(o)).filter(qe).map((e=>e.dom.getBoundingClientRect())).getOr(t)}return t})(e.selection.getRng());if(e.inline){const e=Vo();return Yo(e.left+t.left,e.top+t.top,t.width,t.height)}{const o=Jo(Ie(e.getBody()));return Yo(o.x+t.left,o.y+t.top,t.width,t.height)}},TM=(e, t, o, n=0)=>{const r=qo(window),a=Xo(Ie(e.getContentAreaContainer())),s=$f(e)||Yf(e)||Jf(e),{x:i,width:l}=((e, t, o)=>{const n=Math.max(e.x+o,t.x);return{x:n,width:Math.min(e.right-o,t.right)-n}})(a,r,n);if(e.inline&&!s)return Yo(i,r.y,l,r.height);{const s=t.header.isPositionedAtTop(),{y:c,bottom:d}=((e, t, o, n, r, a)=>{const s=Ie(e.getContainer()),i=pi(s,".tox-editor-header").getOr(s),l=Xo(i),c=l.y>=t.bottom,d=n&&!c;if(e.inline&&d)return{y:Math.max(l.bottom+a,o.y),bottom:o.bottom};if(e.inline&&!d)return{y:o.y,bottom:Math.min(l.y-a,o.bottom)};const u="line"===r?Xo(s):t;return d?{y:Math.max(l.bottom+a,o.y),bottom:Math.min(u.bottom-a,o.bottom)}:{y:Math.max(u.y+a,o.y),bottom:Math.min(l.y-a,o.bottom)}})(e,a,r,s,o,n);return Yo(i,c,l,d-c)}},EM={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"]},AM={maxHeightFunction:cc(),maxWidthFunction:uE()},MM= e=>"node"===e,NM=(e, t, o, n, r)=>{const a=OM(e),s=n.lastElement().exists((e=>Je(o,e)));return((e, t)=>{const o=e.selection.getRng(),n=ut(Ie(o.startContainer),o.startOffset);return o.startContainer===o.endContainer&&o.startOffset===o.endOffset-1&&Je(n.element,t)})(e,o)?s?Vz:Iz:s?((e, o, r)=>{const s=Lt(e,"position");Mt(e,"position",o);const i=zM(a,Xo(t),-20)&&!n.isReposition()?Uz:Vz;return s.each((t=>Mt(e,"position",t))),i})(t,n.getMode()):("fixed"===n.getMode()?r.y+Vo().top:r.y)+(Zt(t)+12)<=a.y?Iz:Hz},RM=(e, t, o, n)=>{const r= t=>(n, r, a, s, i)=>({...NM(e,s,t,o,i)({...n,y:i.y,height:i.height},r,a,s,i),alwaysFit:!0}),a= e=>MM(n)?[r(e)]:[];return t?{onLtr: e=>[cl,rl,al,sl,il,ll].concat(a(e)),onRtl: e=>[cl,al,rl,il,sl,ll].concat(a(e))}:{onLtr: e=>[ll,cl,sl,rl,il,al].concat(a(e)),onRtl: e=>[ll,cl,il,al,sl,rl].concat(a(e))}},DM=(e, t)=>{const o=V(t,(t=>t.predicate(e.dom))),{pass:n,fail:r}=j(o,(e=>"contexttoolbar"===e.type));return{contextToolbars:n,contextForms:r}},BM=(e, t)=>{const o={},n=[],r=[],a={},s={},i=se(e);return F(i,(i=>{const l=e[i];"contextform"===l.type?((e, i)=>{const l=Gn($n("ContextForm",Fb,i));o[e]=l,l.launch.map((o=>{a["form:"+e]={...i.launch,type:"contextformtogglebutton"===o.type?"togglebutton":"button",onAction:()=>{t(l)}}})),"editor"===l.scope?r.push(l):n.push(l),s[e]=l})(i,l):"contexttoolbar"===l.type&&((e, t)=>{var o;(o=t,$n("ContextToolbar",jb,o)).each((o=>{"editor"===t.scope?r.push(o):n.push(o),s[e]=o}))})(i,l)})),{forms:o,inNodeScope:n,inEditorScope:r,lookupTable:s,formNavigators:a}},LM=ls("forward-slide"),IM=ls("backward-slide"),HM=ls("change-slide-event"),PM="tox-pop--resizing",FM="tox-pop--transition",jM=(e, t, o, n)=>{const r=n.backstage,a=r.shared,s=Mo().deviceType.isTouch,i=Ql(),l=Ql(),c=Ql(),d=ai((e=>{const t=Tr([]);return Ph.sketch({dom:{tag:"div",classes:["tox-pop"]},fireDismissalEventInstead:{event:"doNotDismissYet"},onShow: e=>{t.set([]),Ph.getContent(e).each((e=>{Pt(e.element,"visibility")})),js(e.element,PM),Pt(e.element,"width")},inlineBehaviours:xl([Kp("context-toolbar-events",[Ka(oa(),((e, t)=>{"width"===t.event.raw.propertyName&&(js(e.element,PM),Pt(e.element,"width"))})),Va(HM,((e, t)=>{const o=e.element;Pt(o,"width");const n=Xt(o);Ph.setContent(e,t.event.contents),Fs(o,PM);const r=Xt(o);Mt(o,"width",n+"px"),Ph.getContent(e).each((e=>{t.event.focus.bind((e=>(Ml(e),Bl(o)))).orThunk((()=>(Pp.focusIn(e),Dl(ht(o)))))})),setTimeout((()=>{Mt(e.element,"width",r+"px")}),0)})),Va(LM,((e, o)=>{Ph.getContent(e).each((o=>{t.set(t.get().concat([{bar:o,focus:Dl(ht(e.element))}]))})),Da(e,HM,{contents:o.event.forwardContents,focus:E.none()})})),Va(IM,((e, o)=>{ne(t.get()).each((o=>{t.set(t.get().slice(0,t.get().length-1)),Da(e,HM,{contents:si(o.bar),focus:o.focus})}))}))]),Pp.config({mode:"special",onEscape: o=>ne(t.get()).fold((()=>e.onEscape()),(e=>(Ra(o,IM),E.some(!0))))})]),lazySink:()=>rn.value(e.sink)})})({sink:o,onEscape:()=>(e.focus(),E.some(!0))})),u=()=>{const t=c.get().getOr("node"),o=MM(t)?1:0;return TM(e,a,t,o)},m=()=>!(e.removed||s()&&r.isContextMenuOpen()),g=()=>{if(m()){const t=u(),o=ke(c.get(),"node")?((e, t)=>t.filter((e=>vt(e)&&Ue(e))).map(Jo).getOrThunk((()=>OM(e))))(e,i.get()):OM(e);return t.height<=0||!zM(o,t,.01)}return!0},p=()=>{i.clear(),l.clear(),c.clear(),Ph.hide(d)},h=()=>{if(Ph.isOpen(d)){const e=d.element;Pt(e,"display"),g()?Mt(e,"display","none"):(l.set(0),Ph.reposition(d))}},f= t=>({dom:{tag:"div",classes:["tox-pop__dialog"]},components:[t],behaviours:xl([Pp.config({mode:"acyclic"}),Kp("pop-dialog-wrap-events",[Ya((t=>{e.shortcuts.add("ctrl+F9","focus statusbar",(()=>Pp.focusIn(t)))})),Xa((t=>{e.shortcuts.remove("ctrl+F9")}))])])}),b=Qt((()=>BM(t,(e=>{const t=v([e]);Da(d,LM,{forwardContents:f(t)})})))),v= t=>{const{buttons:o}=e.ui.registry.getAll(),r={...o,...b().formNavigators},s=_f(e)===tf.scrolling?tf.scrolling:tf.default,i=$(P(t,(t=>"contexttoolbar"===t.type?((t, o)=>cM(e,{buttons:t,toolbar:o.items,allowToolbarGroups:!1},n.backstage,E.some(["form:"])))(r,t):((e, t)=>SM(e,t))(t,a.providers))));return LE({type:s,uid:ls("context-toolbar"),initGroups:i,onEscape:E.none,cyclicKeying:!0,providers:a.providers})},k=(t, n)=>{if(_.cancel(),!m())return;const r=v(t),p=t[0].position,h=((t, n)=>{const r="node"===t?a.anchors.node(n):a.anchors.cursor(),c=((e, t, o, n)=>"line"===t?{bubble:gc(12,0,EM),layouts:{onLtr:()=>[dl],onRtl:()=>[ul]},overrides:AM}:{bubble:gc(0,12,EM,1/12),layouts:RM(e,o,n,t),overrides:AM})(e,t,s(),{lastElement:i.get,isReposition:()=>ke(l.get(),0),getMode:()=>kd.getMode(o)});return fn(r,c)})(p,n);c.set(p),l.set(1);const y=d.element;Pt(y,"display"),(e=>ke(_e(e,i.get(),Je),!0))(n)||(js(y,FM),kd.reset(o,d)),Ph.showWithinBounds(d,f(r),{anchor:h,transition:{classes:[FM],mode:"placement"}},(()=>E.some(u()))),n.fold(i.clear,i.set),g()&&Mt(y,"display","none")};let w=!1;const _=jS((()=>{!e.hasFocus()||e.removed||w||(Vs(d.element,FM)?_.throttle():((e, t)=>{const o=Ie(t.getBody()),n= e=>Je(e,o),r=Ie(t.selection.getNode());return(e=>!n(e)&&!Qe(o,e))(r)?E.none():((e, t, o)=>{const n=DM(e,t);if(n.contextForms.length>0)return E.some({elem:e,toolbars:[n.contextForms[0]]});{const t=DM(e,o);if(t.contextForms.length>0)return E.some({elem:e,toolbars:[t.contextForms[0]]});if(n.contextToolbars.length>0||t.contextToolbars.length>0){const o=(e=>{if(e.length<=1)return e;{const t= t=>L(e,(e=>e.position===t)),o= t=>V(e,(e=>e.position===t)),n=t("selection"),r=t("node");if(n||r){if(r&&n){const e=o("node"),t=P(o("selection"),(e=>({...e,position:"node"})));return e.concat(t)}return o(n?"selection":"node")}return o("line")}})(n.contextToolbars.concat(t.contextToolbars));return E.some({elem:e,toolbars:o})}return E.none()}})(r,e.inNodeScope,e.inEditorScope).orThunk((()=>((e, t, o)=>e(t)?E.none():Rr(t,(e=>{if(qe(e)){const{contextToolbars:t,contextForms:n}=DM(e,o.inNodeScope),r=n.length>0?n:(e=>{if(e.length<=1)return e;{const t= t=>q(e,(e=>e.position===t));return t("selection").orThunk((()=>t("node"))).orThunk((()=>t("line"))).map((e=>e.position)).fold((()=>[]),(t=>V(e,(e=>e.position===t))))}})(t);return r.length>0?E.some({elem:e,toolbars:r}):E.none()}return E.none()}),e))(n,r,e)))})(b(),e).fold(p,(e=>{k(e.toolbars,E.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",_.throttle),e.on(xM,p),e.on("contexttoolbar-show",(t=>{const o=b();ye(o.lookupTable,t.toolbarKey).each((o=>{k([o],Ce(t.target!==e,t.target)),Ph.getContent(d).each(Pp.focusIn)}))})),e.on("focusout",(t=>{Fh.setEditorTimeout(e,(()=>{Bl(o.element).isNone()&&Bl(d.element).isNone()&&p()}),0)})),e.on("SwitchMode",(()=>{e.mode.isReadOnly()&&p()})),e.on("AfterProgressState",(t=>{t.state?p():e.hasFocus()&&_.throttle()})),e.on("dragstart",(()=>{w=!0})),e.on("dragend drop",(()=>{w=!1})),e.on("NodeChange",(e=>{Bl(d.element).fold(_.throttle,y)}))}))},VM=(e, t)=>{const o=()=>{const o=t.getOptions(e),n=t.getCurrent(e).map(t.hash),r=Ql();return P(o,(o=>({type:"togglemenuitem",text:t.display(o),onSetup: a=>{const s= e=>{e&&(r.on((e=>e.setActive(!1))),r.set(a)),a.setActive(e)};s(ke(n,t.hash(o)));const i=t.watcher(e,o,s);return()=>{r.clear(),i()}},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})},ZM={name:"lineheight",text:"Line height",icon:"line-height",getOptions:Kf,hash: e=>((e, t)=>IA(e,["fixed","relative","empty"]).map((({value:e,unit:t})=>e+t)))(e).getOr(e),display:w,watcher:(e, t, o)=>e.formatter.formatChanged("lineheight",o,!1,{value:t}).unbind,getCurrent: e=>E.from(e.queryCommandValue("LineHeight")),setCurrent:(e, t)=>e.execCommand("LineHeight",!1,t)},UM= e=>kA(e,"NodeChange",(t=>{t.setEnabled(e.queryCommandState("outdent"))})),qM=(e, t)=> o=>{o.setActive(t.get());const n= e=>{t.set(e.state),o.setActive(e.state)};return e.on("PastePlainTextToggle",n),()=>e.off("PastePlainTextToggle",n)},WM=(e, t)=>()=>{e.execCommand("mceToggleFormat",!1,t)},$M= e=>{(e=>{(e=>{NC.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:vA(e,t.name),onAction:WM(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:vA(e,o),onAction:WM(e,o)})}})(e),(e=>{NC.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:_A(e,t.action)})}))})(e),(e=>{NC.each([{name:"blockquote",text:"Blockquote",action:"mceBlockQuote",icon:"quote"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:_A(e,t.action),onSetup:vA(e,t.name)})}))})(e)})(e),(e=>{NC.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:_A(e,t.action)})})),e.ui.registry.addMenuItem("codeformat",{text:"Code",icon:"sourcecode",onAction:WM(e,"code")})})(e)},GM=(e, t)=>kA(e,"Undo Redo AddUndo TypingUndo ClearUndos SwitchMode",(o=>{o.setEnabled(!e.mode.isReadOnly()&&e.undoManager[t]())})),KM= e=>kA(e,"VisualAid",(t=>{t.setActive(e.hasVisual)})),YM=(e, t)=>{(e=>{F([{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"}],(t=>{e.ui.registry.addToggleButton(t.name,{tooltip:t.text,icon:t.icon,onAction:_A(e,t.cmd),onSetup:vA(e,t.name)})})),e.ui.registry.addButton("alignnone",{tooltip:"No alignment",icon:"align-none",onAction:_A(e,"JustifyNone")})})(e),$M(e),((e, t)=>{((e, t)=>{const o=CA(0,t,EA(e));e.ui.registry.addNestedMenuItem("align",{text:t.shared.providers.translate("Align"),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e, t)=>{const o=CA(0,t,DA(e));e.ui.registry.addNestedMenuItem("fontfamily",{text:t.shared.providers.translate("Fonts"),getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e, t)=>{const o={type:"advanced",...t.styles},n=CA(0,t,UA(e,o));e.ui.registry.addNestedMenuItem("styles",{text:"Formats",getSubmenuItems:()=>n.items.validateItems(n.getStyleItems())})})(e,t),((e, t)=>{const o=CA(0,t,MA(e));e.ui.registry.addNestedMenuItem("blocks",{text:"Blocks",getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t),((e, t)=>{const o=CA(0,t,ZA(e));e.ui.registry.addNestedMenuItem("fontsize",{text:"Font sizes",getSubmenuItems:()=>o.items.validateItems(o.getStyleItems())})})(e,t)})(e,t),(e=>{(e=>{e.ui.registry.addMenuItem("undo",{text:"Undo",icon:"undo",shortcut:"Meta+Z",onSetup:GM(e,"hasUndo"),onAction:_A(e,"undo")}),e.ui.registry.addMenuItem("redo",{text:"Redo",icon:"redo",shortcut:"Meta+Y",onSetup:GM(e,"hasRedo"),onAction:_A(e,"redo")})})(e),(e=>{e.ui.registry.addButton("undo",{tooltip:"Undo",icon:"undo",enabled:!1,onSetup:GM(e,"hasUndo"),onAction:_A(e,"undo")}),e.ui.registry.addButton("redo",{tooltip:"Redo",icon:"redo",enabled:!1,onSetup:GM(e,"hasRedo"),onAction:_A(e,"redo")})})(e)})(e),(e=>{(e=>{e.addCommand("mceApplyTextcolor",((t, o)=>{((e, t, o)=>{e.undoManager.transact((()=>{e.focus(),e.formatter.apply(t,{value:o}),e.nodeChanged()}))})(e,t,o)})),e.addCommand("mceRemoveTextcolor",(t=>{((e, t)=>{e.undoManager.transact((()=>{e.focus(),e.formatter.remove(t,{value:null},void 0,!0),e.nodeChanged()}))})(e,t)}))})(e);const t=Mk(e),o=Nk(e),n=Tr(t),r=Tr(o);Fk(e,"forecolor","forecolor","Text color",n),Fk(e,"backcolor","hilitecolor","Background color",r),jk(e,"forecolor","forecolor","Text color",n),jk(e,"backcolor","hilitecolor","Background color",r)})(e),(e=>{(e=>{e.ui.registry.addButton("visualaid",{tooltip:"Visual aids",text:"Visual aids",onAction:_A(e,"mceToggleVisualAid")})})(e),(e=>{e.ui.registry.addToggleMenuItem("visualaid",{text:"Visual aids",onSetup:KM(e),onAction:_A(e,"mceToggleVisualAid")})})(e)})(e),(e=>{(e=>{e.ui.registry.addButton("outdent",{tooltip:"Decrease indent",icon:"outdent",onSetup:UM(e),onAction:_A(e,"outdent")}),e.ui.registry.addButton("indent",{tooltip:"Increase indent",icon:"indent",onAction:_A(e,"indent")})})(e)})(e),(e=>{VM(e,ZM),(e=>E.from(kf(e)).map((t=>({name:"language",text:"Language",icon:"language",getOptions:k(t),hash: e=>u(e.customCode)?e.code:`${e.code}/${e.customCode}`,display: e=>e.title,watcher:(e, t, o)=>{var n;return e.formatter.formatChanged("lang",o,!1,{value:t.code,customValue:null!==(n=t.customCode)&&void 0!==n?n:null}).unbind},getCurrent: e=>{const t=Ie(e.selection.getNode());return Dr(t,(e=>E.some(e).filter(qe).bind((e=>zt(e,"lang").map((t=>({code:t,customCode:zt(e,"data-mce-lang").getOrUndefined(),title:""})))))))},setCurrent:(e, t)=>e.execCommand("Lang",!1,t),onToolbarSetup: t=>{const o=Jl();return t.setActive(e.formatter.match("lang",{},void 0,!0)),o.set(e.formatter.formatChanged("lang",t.setActive,!0)),o.clear}}))))(e).each((t=>VM(e,t)))})(e),(e=>{const t=Tr(Zf(e)),o=()=>e.execCommand("mceTogglePlainTextPaste");e.ui.registry.addToggleButton("pastetext",{active:!1,icon:"paste-text",tooltip:"Paste as text",onAction:o,onSetup:qM(e,t)}),e.ui.registry.addToggleMenuItem("pastetext",{text:"Paste as text",icon:"paste-text",onAction:o,onSetup:qM(e,t)})})(e)},XM= e=>a(e)?e.split(/[ ,]/):e,JM= e=> t=>t.options.get(e),QM=JM("contextmenu_never_use_native"),eN=JM("contextmenu_avoid_overlap"),tN= e=>{const t=e.ui.registry.getAll().contextMenus,o=e.options.get("contextmenu");return e.options.isSet("contextmenu")?o:V(o,(e=>be(t,e)))},oN=(e, t)=>({type:"makeshift",x:e,y:t}),nN= e=>"longpress"===e.type||0===e.type.indexOf("touch"),rN=(e, t)=>"contextmenu"===t.type||"longpress"===t.type?e.inline?(e=>{if(nN(e)){const t=e.touches[0];return oN(t.pageX,t.pageY)}return oN(e.pageX,e.pageY)})(t):((e, t)=>{const o=nf.DOM.getPos(e);return((e, t, o)=>oN(e.x+t,e.y+o))(t,o.x,o.y)})(e.getContentAreaContainer(),(e=>{if(nN(e)){const t=e.touches[0];return oN(t.clientX,t.clientY)}return oN(e.clientX,e.clientY)})(t)):aN(e),aN= e=>({type:"selection",root:Ie(e.selection.getNode())}),sN=(e, t, o)=>{switch(o){case"node":return(e=>({type:"node",node:E.some(Ie(e.selection.getNode())),root:Ie(e.getBody())}))(e);case"point":return rN(e,t);case"selection":return aN(e)}},iN=(e, t, o, n, r, a)=>{const s=o(),i=sN(e,t,a);eS(s,uy.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!1,search:E.none()}).map((e=>{t.preventDefault(),Ph.showMenuAt(r,{anchor:i},{menu:{markers:zy("normal")},data:e})}))},lN={onLtr:()=>[cl,rl,al,sl,il,ll,Iz,Hz,Lz,Dz,Bz,Rz],onRtl:()=>[cl,al,rl,il,sl,ll,Iz,Hz,Bz,Rz,Lz,Dz]},cN={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"]},dN=(e, t, o, n, r, a)=>{const s=Mo(),i=s.os.isiOS(),l=s.os.isMacOS(),c=s.os.isAndroid(),d=s.deviceType.isTouch(),u=()=>{const s=o();((e, t, o, n, r, a, s)=>{const i=((e, t, o)=>{const n=sN(e,t,o);return{bubble:gc(0,"point"===o?12:0,cN),layouts:lN,overrides:{maxWidthFunction:uE(),maxHeightFunction:cc()},...n}})(e,t,a);eS(o,uy.CLOSE_ON_EXECUTE,n,{isHorizontalMenu:!0,search:E.none()}).map((o=>{t.preventDefault();const l=s?Lh.HighlightMenuAndItem:Lh.HighlightNone;Ph.showMenuWithinBounds(r,{anchor:i},{menu:{markers:zy("normal"),highlightOnOpen:l},data:o,type:"horizontal"},(()=>E.some(TM(e,n.shared,"node"===a?"node":"selection")))),e.dispatch(xM)}))})(e,t,s,n,r,a,!(c||i||l&&d))};if((l||i)&&"node"!==a){const o=()=>{(e=>{const t=e.selection.getRng(),o=()=>{Fh.setEditorTimeout(e,(()=>{e.selection.setRng(t)}),10),a()};e.once("touchend",o);const n= e=>{e.preventDefault(),e.stopImmediatePropagation()};e.on("mousedown",n,!0);const r=()=>a();e.once("longpresscancel",r);const a=()=>{e.off("touchend",o),e.off("longpresscancel",r),e.off("mousedown",n)}})(e),u()};((e, t)=>{const o=e.selection;if(o.isCollapsed()||t.touches.length<1)return!1;{const n=t.touches[0],r=o.getRng();return Yc(e.getWin(),Fc.domRange(r)).exists((e=>e.left<=n.clientX&&e.right>=n.clientX&&e.top<=n.clientY&&e.bottom>=n.clientY))}})(e,t)?o():(e.once("selectionchange",o),e.once("touchend",(()=>e.off("selectionchange",o))))}else u()},uN= e=>a(e)?"|"===e:"separator"===e.type,mN={type:"separator"},gN= e=>{const t= e=>({text:e.text,icon:e.icon,enabled:e.enabled,shortcut:e.shortcut});if(a(e))return e;switch(e.type){case"separator":return mN;case"submenu":return{type:"nestedmenuitem",...t(e),getSubmenuItems:()=>{const t=e.getSubmenuItems();return a(t)?t:P(t,gN)}};default:const o=e;return{type:"menuitem",...t(o),onAction:b(o.onAction)}}},pN=(e, t)=>{if(0===t.length)return e;const o=ne(e).filter((e=>!uN(e))).fold((()=>[]),(e=>[mN]));return e.concat(o).concat(t).concat([mN])},hN=(e, t)=>!(e=>"longpress"===e.type||be(e,"touches"))(t)&&(2!==t.button||t.target===e.getBody()&&""===t.pointerType),fN=(e, t)=>hN(e,t)?e.selection.getStart(!0):t.target,yN=(e, t, o)=>{const n=Mo().deviceType.isTouch,r=ai(Ph.sketch({dom:{tag:"div"},lazySink:t,onEscape:()=>e.focus(),onShow:()=>o.setContextMenuState(!0),onHide:()=>o.setContextMenuState(!1),fireDismissalEventInstead:{},inlineBehaviours:xl([Kp("dismissContextMenu",[Va(Ca(),((t, o)=>{Wd.close(t),e.focus()}))])])})),s=()=>Ph.hide(r),i= t=>{if(QM(e)&&t.preventDefault(),((e, t)=>t.ctrlKey&&!QM(e))(e,t)||(e=>0===tN(e).length)(e))return;const s=((e, t)=>{const o=eN(e),n=hN(e,t)?"selection":"point";if(Me(o)){const r=fN(e,t);return Lw(Ie(r),o)?"node":n}return n})(e,t);(n()?dN:iN)(e,t,(()=>{const o=fN(e,t),n=e.ui.registry.getAll(),r=tN(e);return((e, t, o)=>{const n=U(t,((t, n)=>ye(e,n.toLowerCase()).map((e=>{const n=e.update(o);if(a(n))return pN(t,n.split(" "));if(n.length>0){const e=P(n,gN);return pN(t,e)}return t})).getOrThunk((()=>t.concat([n])))),[]);return n.length>0&&uN(n[n.length-1])&&n.pop(),n})(n.contextMenus,r,o)}),o,r,s)};e.on("init",(()=>{const t="ResizeEditor ScrollContent ScrollWindow longpresscancel"+(n()?"":" ResizeWindow");e.on(t,s),e.on("longpress contextmenu",i)}))},bN=Er([{offset:["x","y"]},{absolute:["x","y"]},{fixed:["x","y"]}]),vN= e=> t=>t.translate(-e.left,-e.top),kN= e=> t=>t.translate(e.left,e.top),wN= e=>(t, o)=>U(e,((e, t)=>t(e)),Wt(t,o)),_N=(e, t, o)=>e.fold(wN([kN(o),vN(t)]),wN([vN(t)]),wN([])),xN=(e, t, o)=>e.fold(wN([kN(o)]),wN([]),wN([kN(t)])),CN=(e, t, o)=>e.fold(wN([]),wN([vN(o)]),wN([kN(t),vN(o)])),SN=(e, t, o)=>{const n=e.fold(((e, t)=>({position:E.some("absolute"),left:E.some(e+"px"),top:E.some(t+"px")})),((e, t)=>({position:E.some("absolute"),left:E.some(e-o.left+"px"),top:E.some(t-o.top+"px")})),((e, t)=>({position:E.some("fixed"),left:E.some(e+"px"),top:E.some(t+"px")})));return{right:E.none(),bottom:E.none(),...n}},zN=(e, t, o, n)=>{const r=(e, r)=>(a, s)=>{const i=e(t,o,n);return r(a.getOr(i.left),s.getOr(i.top))};return e.fold(r(CN,ON),r(xN,TN),r(_N,EN))},ON=bN.offset,TN=bN.absolute,EN=bN.fixed,AN=(e, t)=>{const o=St(e,t);return u(o)?NaN:parseInt(o,10)},MN=(e, t, o, n, r, a)=>{const s=((e, t, o, n)=>((e, t)=>{const o=e.element,n=AN(o,t.leftAttr),r=AN(o,t.topAttr);return isNaN(n)||isNaN(r)?E.none():E.some(Wt(n,r))})(e,t).fold((()=>o),(e=>EN(e.left+n.left,e.top+n.top))))(e,t,o,n),i=t.mustSnap?RN(e,t,s,r,a):DN(e,t,s,r,a),l=_N(s,r,a);return((e, t, o)=>{const n=e.element;xt(n,t.leftAttr,o.left+"px"),xt(n,t.topAttr,o.top+"px")})(e,t,l),i.fold((()=>({coord:EN(l.left,l.top),extra:E.none()})),(e=>({coord:e.output,extra:e.extra})))},NN=(e, t, o, n)=>ae(e,(e=>{const r=e.sensor,a=((e, t, o, n, r, a)=>{const s=xN(e,r,a),i=xN(t,r,a);return Math.abs(s.left-i.left)<=o&&Math.abs(s.top-i.top)<=n})(t,r,e.range.left,e.range.top,o,n);return a?E.some({output:zN(e.output,t,o,n),extra:e.extra}):E.none()})),RN=(e, t, o, n, r)=>{const a=t.getSnapPoints(e);return NN(a,o,n,r).orThunk((()=>{const e=U(a,((e, t)=>{const a=t.sensor,s=((e, t, o, n, r, a)=>{const s=xN(e,r,a),i=xN(t,r,a),l=Math.abs(s.left-i.left),c=Math.abs(s.top-i.top);return Wt(l,c)})(o,a,t.range.left,t.range.top,n,r);return e.deltas.fold((()=>({deltas:E.some(s),snap:E.some(t)})),(o=>(s.left+s.top)/2<=(o.left+o.top)/2?{deltas:E.some(s),snap:E.some(t)}:e))}),{deltas:E.none(),snap:E.none()});return e.snap.map((e=>({output:zN(e.output,o,n,r),extra:e.extra})))}))},DN=(e, t, o, n, r)=>{const a=t.getSnapPoints(e);return NN(a,o,n,r)};var BN=Object.freeze({__proto__:null,snapTo:(e, t, o, n)=>{const r=t.getTarget(e.element);if(t.repositionTarget){const t=et(e.element),o=Vo(t),a=KO(r),s=((e, t, o)=>({coord:zN(e.output,e.output,t,o),extra:e.extra}))(n,o,a),i=SN(s.coord,0,a);Rt(r,i)}}});const LN="data-initial-z-index",IN=(e, t)=>{e.getSystem().addToGui(t),(e=>{rt(e.element).filter(qe).each((t=>{Lt(t,"z-index").each((e=>{xt(t,LN,e)})),Mt(t,"z-index",Dt(e.element,"z-index"))}))})(t)},HN= e=>{(e=>{rt(e.element).filter(qe).each((e=>{zt(e,LN).fold((()=>Pt(e,"z-index")),(t=>Mt(e,"z-index",t))),Tt(e,LN)}))})(e),e.getSystem().removeFromGui(e)},PN=(e, t, o)=>e.getSystem().build(Ww.sketch({dom:{styles:{left:"0px",top:"0px",width:"100%",height:"100%",position:"fixed","z-index":"1000000000000000"},classes:[t]},events:o}));var FN=br("snaps",[or("getSnapPoints"),Mi("onSensor"),or("leftAttr"),or("topAttr"),vr("lazyViewport",en),vr("mustSnap",!1)]);const jN=[vr("useFixed",O),or("blockerClass"),vr("getTarget",w),vr("onDrag",y),vr("repositionTarget",!0),vr("onDrop",y),Sr("getBounds",en),FN],VN= e=>{return(t=Lt(e,"left"),o=Lt(e,"top"),n=Lt(e,"position"),t.isSome()&&o.isSome()&&n.isSome()?E.some(((e, t, o)=>("fixed"===o?EN:ON)(parseInt(e,10),parseInt(t,10)))(t.getOrDie(),o.getOrDie(),n.getOrDie())):E.none()).getOrThunk((()=>{const t=Gt(e);return TN(t.left,t.top)}));var t,o,n},ZN=(e, t)=>({bounds:e.getBounds(),height:Ut(t.element),width:Jt(t.element)}),UN=(e, t, o, n, r)=>{const a=o.update(n,r),s=o.getStartData().getOrThunk((()=>ZN(t,e)));a.each((o=>{((e, t, o, n)=>{const r=t.getTarget(e.element);if(t.repositionTarget){const a=et(e.element),s=Vo(a),i=KO(r),l=VN(r),c=((e, t, o, n, r, a, s)=>((e, t, o, n, r)=>{const a=r.bounds,s=xN(t,o,n),i=Ki(s.left,a.x,a.x+a.width-r.width),l=Ki(s.top,a.y,a.y+a.height-r.height),c=TN(i,l);return t.fold((()=>{const e=CN(c,o,n);return ON(e.left,e.top)}),k(c),(()=>{const e=_N(c,o,n);return EN(e.left,e.top)}))})(0,t.fold((()=>{const e=(t=o,s=a.left,i=a.top,t.fold(((e, t)=>ON(e+s,t+i)),((e, t)=>TN(e+s,t+i)),((e, t)=>EN(e+s,t+i))));var t,s,i;const l=_N(e,n,r);return EN(l.left,l.top)}),(t=>{const s=MN(e,t,o,a,n,r);return s.extra.each((o=>{t.onSensor(e,o)})),s.coord})),n,r,s))(e,t.snaps,l,s,i,n,o),d=SN(c,0,i);Rt(r,d)}t.onDrag(e,r,n)})(e,t,s,o)}))},qN=(e, t, o, n)=>{t.each(HN),o.snaps.each((t=>{((e, t)=>{((e, t)=>{const o=e.element;Tt(o,t.leftAttr),Tt(o,t.topAttr)})(e,t)})(e,t)}));const r=o.getTarget(e.element);n.reset(),o.onDrop(e,r)},WN= e=>(t, o)=>{const n= e=>{o.setStartData(ZN(t,e))};return Pa([Va(ka(),(e=>{o.getStartData().each((()=>n(e)))})),...e(t,o,n)])};var $N=Object.freeze({__proto__:null,getData: e=>E.from(Wt(e.x,e.y)),getDelta:(e, t)=>Wt(t.left-e.left,t.top-e.top)});const GN=(e, t, o)=>[Va(Zr(),((n, r)=>{if(0!==r.event.raw.button)return;r.stop();const a=()=>qN(n,E.some(l),e,t),s=Iw(a,200),i={drop:a,delayDrop:s.schedule,forceDrop:a,move: o=>{s.cancel(),UN(n,e,t,$N,o)}},l=PN(n,e.blockerClass,(e=>Pa([Va(Zr(),e.forceDrop),Va(Wr(),e.drop),Va(Ur(),((t, o)=>{e.move(o.event)})),Va(qr(),e.delayDrop)]))(i));o(n),IN(n,l)}))],KN=[...jN,Bi("dragger",{handlers:WN(GN)})];var YN=Object.freeze({__proto__:null,getData: e=>{const t=e.raw.touches;return 1===t.length?(e=>{const t=e[0];return E.some(Wt(t.clientX,t.clientY))})(t):E.none()},getDelta:(e, t)=>Wt(t.left-e.left,t.top-e.top)});const XN=(e, t, o)=>{const n=Ql(),r= o=>{qN(o,n.get(),e,t),n.clear()};return[Va(Pr(),((a, s)=>{s.stop();const i=()=>r(a),l={drop:i,delayDrop:y,forceDrop:i,move: o=>{UN(a,e,t,YN,o)}},c=PN(a,e.blockerClass,(e=>Pa([Va(Pr(),e.forceDrop),Va(jr(),e.drop),Va(Vr(),e.drop),Va(Fr(),((t, o)=>{e.move(o.event)}))]))(l));n.set(c),o(a),IN(a,c)})),Va(Fr(),((o, n)=>{n.stop(),UN(o,e,t,YN,n.event)})),Va(jr(),((e, t)=>{t.stop(),r(e)})),Va(Vr(),r)]},JN=KN,QN=[...jN,Bi("dragger",{handlers:WN(XN)})],eR=[...jN,Bi("dragger",{handlers:WN(((e, t, o)=>[...GN(e,t,o),...XN(e,t,o)]))})];var tR=Object.freeze({__proto__:null,mouse:JN,touch:QN,mouseOrTouch:eR}),oR=Object.freeze({__proto__:null,init:()=>{let e=E.none(),t=E.none();const o=k({});return zs({readState:o,reset:()=>{e=E.none(),t=E.none()},update:(t, o)=>t.getData(o).bind((o=>((t, o)=>{const n=e.map((e=>t.getDelta(e,o)));return e=E.some(o),n})(t,o))),getStartData:()=>t,setStartData: e=>{t=E.some(e)}})}});const nR=Ol({branchKey:"mode",branches:tR,name:"dragging",active:{events:(e, t)=>e.dragger.handlers(e,t)},extra:{snap: e=>({sensor:e.sensor,range:e.range,output:e.output,extra:E.from(e.extra)})},state:oR,apis:BN}),rR=(e, t, o, n, r, a)=>e.fold((()=>nR.snap({sensor:TN(o-20,n-20),range:Wt(r,a),output:TN(E.some(o),E.some(n)),extra:{td:t}})),(e=>{const r=o-20,a=n-20,s=e.element.dom.getBoundingClientRect();return nR.snap({sensor:TN(r,a),range:Wt(40,40),output:TN(E.some(o-s.width/2),E.some(n-s.height/2)),extra:{td:t}})})),aR=(e, t, o)=>({getSnapPoints:e,leftAttr:"data-drag-left",topAttr:"data-drag-top",onSensor:(e, n)=>{const r=n.td;((e, t)=>e.exists((e=>Je(e,t))))(t.get(),r)||(t.set(r),o(r))},mustSnap:!0}),sR= e=>Vh(jh.sketch({dom:{tag:"div",classes:["tox-selector"]},buttonBehaviours:xl([nR.config({mode:"mouseOrTouch",blockerClass:"blocker",snaps:e}),C_.config({})]),eventOrder:{mousedown:["dragging","alloy.base.behaviour"],touchstart:["dragging","alloy.base.behaviour"]}})),iR=(e, t)=>{const o=Tr([]),n=Tr([]),r=Tr(!1),a=Ql(),s=Ql(),i= e=>{const o=Jo(e);return rR(u.getOpt(t),e,o.x,o.y,o.width,o.height)},l= e=>{const o=Jo(e);return rR(m.getOpt(t),e,o.right,o.bottom,o.width,o.height)},c=aR((()=>P(o.get(),(e=>i(e)))),a,(t=>{s.get().each((o=>{e.dispatch("TableSelectorChange",{start:t,finish:o})}))})),d=aR((()=>P(n.get(),(e=>l(e)))),s,(t=>{a.get().each((o=>{e.dispatch("TableSelectorChange",{start:o,finish:t})}))})),u=sR(c),m=sR(d),g=ai(u.asSpec()),p=ai(m.asSpec()),h=(t, o, n, r)=>{const a=n(o);nR.snapTo(t,a),((t, o, n, a)=>{const s=o.dom.getBoundingClientRect();Pt(t.element,"display");const i=nt(Ie(e.getBody())).dom.innerHeight,l=s[r]<0,c=((e, t)=>e[r]>t)(s,i);(l||c)&&Mt(t.element,"display","none")})(t,o)},f= e=>h(g,e,i,"top"),y= e=>h(p,e,l,"bottom");Mo().deviceType.isTouch()&&(e.on("TableSelectionChange",(e=>{r.get()||(Od(t,g),Od(t,p),r.set(!0)),a.set(e.start),s.set(e.finish),e.otherCells.each((t=>{o.set(t.upOrLeftCells),n.set(t.downOrRightCells),f(e.start),y(e.finish)}))})),e.on("ResizeEditor ResizeWindow ScrollContent",(()=>{a.get().each(f),s.get().each(y)})),e.on("TableSelectionClear",(()=>{r.get()&&(Ad(g),Ad(p),r.set(!1)),a.clear(),s.clear()})))},lR=(e, t, o)=>{var n;const r=null!==(n=t.delimiter)&&void 0!==n?n:"›";return{dom:{tag:"div",classes:["tox-statusbar__path"],attributes:{role:"navigation"}},behaviours:xl([Pp.config({mode:"flow",selector:"div[role=button]"}),Rm.config({disabled:o.isDisabled}),vv(),Qw.config({}),Gp.config({}),Kp("elementPathEvents",[Ya(((t, n)=>{e.shortcuts.add("alt+F11","focus statusbar elementpath",(()=>Pp.focusIn(t))),e.on("NodeChange",(n=>{const a=(t=>{const o=[];let n=t.length;for(; n-- >0;){const a=t[n];if(1===a.nodeType&&"BR"!==(r=a).nodeName&&!r.getAttribute("data-mce-bogus")&&"bookmark"!==r.getAttribute("data-mce-type")){const t=mk(e,a);if(t.isDefaultPrevented()||o.push({name:t.name,element:a}),t.isPropagationStopped())break}}var r;return o})(n.parents),s=a.length>0?U(a,((t, n, a)=>{const s=((t, n, r)=>jh.sketch({dom:{tag:"div",classes:["tox-statusbar__path-item"],attributes:{"data-index":r,"aria-level":r+1}},components:[ti(t)],action: t=>{e.focus(),e.selection.select(n),e.nodeChanged()},buttonBehaviours:xl([kv(o.isDisabled),vv()])}))(n.name,n.element,a);return 0===a?t.concat([s]):t.concat([{dom:{tag:"div",classes:["tox-statusbar__path-divider"],attributes:{"aria-hidden":!0}},components:[ti(` ${r} `)]},s])}),[]):[];Gp.set(t,s)}))}))])]),components:[]}};var cR;!function(e){e[e.None=0]="None",e[e.Both=1]="Both",e[e.Vertical=2]="Vertical"}(cR||(cR={}));const dR=(e, t, o)=>{const n=Ie(e.getContainer()),r=((e, t, o, n, r)=>{const a={height:fM(n+t.top,pf(e),ff(e))};return o===cR.Both&&(a.width=fM(r+t.left,gf(e),hf(e))),a})(e,t,o,Zt(n),Xt(n));le(r,((e, t)=>{h(e)&&Mt(n,t,hM(e))})),(e=>{e.dispatch("ResizeEditor")})(e)},uR=(e, t, o, n)=>{const r=Wt(20*o,20*n);return dR(e,r,t),E.some(!0)},mR=(e, t)=>({dom:{tag:"div",classes:["tox-statusbar"]},components:(()=>{const o=(()=>{const o=[];return Ff(e)&&o.push(lR(e,{},t)),e.hasPlugin("wordcount")&&o.push(((e, t)=>{const o=(e, o, n)=>Gp.set(e,[ti(t.translate(["{0} "+n,o[n]]))]);return jh.sketch({dom:{tag:"button",classes:["tox-statusbar__wordcount"]},components:[],buttonBehaviours:xl([kv(t.isDisabled),vv(),Qw.config({}),Gp.config({}),mu.config({store:{mode:"memory",initialValue:{mode:"words",count:{words:0,characters:0}}}}),Kp("wordcount-events",[Qa((e=>{const t=mu.getValue(e),n="words"===t.mode?"characters":"words";mu.setValue(e,{mode:n,count:t.count}),o(e,t.count,n)})),Ya((t=>{e.on("wordCountUpdate",(e=>{const{mode:n}=mu.getValue(t);mu.setValue(t,{mode:n,count:e.wordCount}),o(t,e.wordCount,n)}))}))])]),eventOrder:{[ua()]:["disabling","alloy.base.behaviour","wordcount-events"]}})})(e,t)),jf(e)&&o.push({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":Zh.translate(["Powered by {0}","Tiny"])},innerHtml:'<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'.trim()},behaviours:xl([eh.config({})])}]}),o.length>0?[{dom:{tag:"div",classes:["tox-statusbar__text-container"]},components:o}]:[]})(),n=((e, t)=>{const o=(e=>{const t=Vf(e);return!1===t?cR.None:"both"===t?cR.Both:cR.Vertical})(e);return o===cR.None?E.none():E.some(Jh("resize-handle",{tag:"div",classes:["tox-statusbar__resize-handle"],attributes:{title:t.translate("Resize")},behaviours:[nR.config({mode:"mouse",repositionTarget:!1,onDrag:(t, n, r)=>dR(e,r,o),blockerClass:"tox-blocker"}),Pp.config({mode:"special",onLeft:()=>uR(e,o,-1,0),onRight:()=>uR(e,o,1,0),onUp:()=>uR(e,o,0,-1),onDown:()=>uR(e,o,0,1)}),Qw.config({}),eh.config({})]},t.icons))})(e,t);return o.concat(n.toArray())})()}),gR=(e, t)=>t.get().getOrDie(`UI for ${e} has not been rendered`),pR=(e, t)=>{const o=e.inline,n=o?_M:gM,r=ry(e)?AT:$O,a=(()=>{const e=Ql(),t=Ql(),o=Ql();return{dialogUi:e,popupUi:t,mainUi:o,getUiMotherships:()=>{const o=e.get().map((e=>e.mothership)),n=t.get().map((e=>e.mothership));return o.fold((()=>n.toArray()),(e=>n.fold((()=>[e]),(t=>Je(e.element,t.element)?[e]:[e,t]))))},lazyGetInOuterOrDie:(e, t)=>()=>o.get().bind((e=>t(e.outerContainer))).getOrDie(`Could not find ${e} element in OuterContainer`)}})(),s=Ql(),i=Ql(),l=Ql(),c=Mo().deviceType.isTouch()?["tox-platform-touch"]:[],d=Qf(e),u=_f(e),m=Vh({dom:{tag:"div",classes:["tox-anchorbar"]}}),g=()=>a.mainUi.get().map((e=>e.outerContainer)).bind(lA.getHeader),p=a.lazyGetInOuterOrDie("anchor bar",m.getOpt),h=a.lazyGetInOuterOrDie("toolbar",lA.getToolbar),f=a.lazyGetInOuterOrDie("throbber",lA.getThrobber),y=((e, t, o)=>{const n=Tr(!1),r=(e=>{const t=Tr(Qf(e)?"bottom":"top");return{isPositionedAtTop:()=>"top"===t.get(),getDockingMode:t.get,setDockingMode:t.set}})(t),a={icons:()=>t.ui.registry.getAll().icons,menuItems:()=>t.ui.registry.getAll().menuItems,translate:Zh.translate,isDisabled:()=>t.mode.isReadOnly()||!t.ui.isEnabled(),getOption:t.options.get},s=RO(t),i=(e=>{const t= t=>()=>e.formatter.match(t),o= t=>()=>{const o=e.formatter.get(t);return void 0!==o?E.some({tag:o.length>0&&(o[0].inline||o[0].block)||"div",styles:e.dom.parseStyle(e.formatter.getCssText(t))}):E.none()},n=Tr([]),r=Tr([]),a=Tr(!1);return e.on("PreInit",(r=>{const a=sO(e),s=lO(e,a,t,o);n.set(s)})),e.on("addStyleModifications",(n=>{const s=lO(e,n.items,t,o);r.set(s),a.set(n.replace)})),{getData:()=>{const e=a.get()?[]:n.get(),t=r.get();return e.concat(t)}}})(t),l=(e=>({colorPicker:Xz(e),hasCustomColors:Jz(e),getColors:Qz(e),getColorCols:eO(e)}))(t),c=(e=>({isDraggableModal:tO(e)}))(t),d={shared:{providers:a,anchors:Yz(t,o,r.isPositionedAtTop),header:r},urlinput:s,styles:i,colorinput:l,dialog:c,isContextMenuOpen:()=>n.get(),setContextMenuState: e=>n.set(e)},u={...d,shared:{...d.shared,interpreter: e=>Sz(e,{},u),getSink:e.popup}},m={...d,shared:{...d.shared,interpreter: e=>Sz(e,{},m),getSink:e.dialog}};return{popup:u,dialog:m}})({popup:()=>rn.fromOption(a.popupUi.get().map((e=>e.sink)),"(popup) UI has not been rendered"),dialog:()=>rn.fromOption(a.dialogUi.get().map((e=>e.sink)),"UI has not been rendered")},e,p),b=()=>{const t=(()=>{const t={attributes:{[vc]:d?bc.BottomToTop:bc.TopToBottom}},o=lA.parts.menubar({dom:{tag:"div",classes:["tox-menubar"]},backstage:y.popup,onEscape:()=>{e.focus()}}),n=lA.parts.toolbar({dom:{tag:"div",classes:["tox-toolbar"]},getSink:y.popup.shared.getSink,providers:y.popup.shared.providers,onEscape:()=>{e.focus()},onToolbarToggled: t=>{((e, t)=>{e.dispatch("ToggleToolbarDrawer",{state:t})})(e,t)},type:u,lazyToolbar:h,lazyHeader:()=>g().getOrDie("Could not find header element"),...t}),r=lA.parts["multiple-toolbar"]({dom:{tag:"div",classes:["tox-toolbar-overlord"]},providers:y.popup.shared.providers,onEscape:()=>{e.focus()},type:u}),a=Jf(e),s=Yf(e),i=$f(e),l=qf(e),c=lA.parts.promotion({dom:{tag:"div",classes:["tox-promotion"]}}),p=a||s||i,f=l?[c,o]:[o];return lA.parts.header({dom:{tag:"div",classes:["tox-editor-header"].concat(p?[]:["tox-editor-header--empty"]),...t},components:$([i?f:[],a?[r]:s?[n]:[],ty(e)?[]:[m.asSpec()]]),sticky:ry(e),editor:e,sharedBackstage:y.popup.shared})})(),n={dom:{tag:"div",classes:["tox-sidebar-wrap"]},components:[lA.parts.socket({dom:{tag:"div",classes:["tox-edit-area"]}}),lA.parts.sidebar({dom:{tag:"div",classes:["tox-sidebar"]}})]},r=lA.parts.throbber({dom:{tag:"div",classes:["tox-throbber"]},backstage:y.popup}),a=lA.parts.viewWrapper({backstage:y.popup}),i=Pf(e)&&!o?E.some(mR(e,y.popup.shared.providers)):E.none(),l=$([d?[]:[t],o?[]:[n],d?[t]:[]]),p=lA.parts.editorContainer({components:$([l,o?[]:i.toArray()])}),f=ny(e),b={role:"application",...Zh.isRtl()?{dir:"rtl"}:{},...f?{"aria-hidden":"true"}:{}},v=ai(lA.sketch({dom:{tag:"div",classes:["tox","tox-tinymce"].concat(o?["tox-tinymce-inline"]:[]).concat(d?["tox-tinymce--toolbar-bottom"]:[]).concat(c),styles:{visibility:"hidden",...f?{opacity:"0",border:"0"}:{}},attributes:b},components:[p,...o?[]:[a],r],behaviours:xl([vv(),Rm.config({disableClass:"tox-tinymce--disabled"}),Pp.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"})])})),k=$w(v);return s.set(k),{mothership:k,outerContainer:v}},v= t=>{const o=hM((e=>{const t=(e=>{const t=uf(e),o=pf(e),n=ff(e);return pM(t).map((e=>fM(e,o,n)))})(e);return t.getOr(uf(e))})(e)),n=hM((e=>yM(e).getOr(mf(e)))(e));return e.inline||(Ht("div","width",n)&&Mt(t.element,"width",n),Ht("div","height",o)?Mt(t.element,"height",o):Mt(t.element,"height","400px")),o};return{popups:{backstage:y.popup,getMothership:()=>gR("popups",l)},dialogs:{backstage:y.dialog,getMothership:()=>gR("dialogs",i)},renderUI:()=>{const o=b(),s=(()=>{const t=oy(e),o=Je(kt(),t)&&"grid"===Dt(t,"display"),n={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-tinymce-aux"].concat(c),attributes:{...Zh.isRtl()?{dir:"rtl"}:{}}},behaviours:xl([kd.config({useFixed:()=>r.isDocked(g)})])},a={dom:{styles:{width:document.body.clientWidth+"px"}},events:Pa([Va(wa(),(e=>{Mt(e.element,"width",document.body.clientWidth+"px")}))])},s=ai(fn(n,o?a:{})),l=$w(s);return i.set(l),{sink:s,mothership:l}})(),d=ay(e)?(()=>{const e={dom:{tag:"div",classes:["tox","tox-silver-sink","tox-silver-popup-sink","tox-tinymce-aux"].concat(c),attributes:{...Zh.isRtl()?{dir:"rtl"}:{}}},behaviours:xl([kd.config({useFixed:()=>r.isDocked(g),getBounds:()=>t.getPopupSinkBounds()})])},o=ai(e),n=$w(o);return l.set(n),{sink:o,mothership:n}})():(e=>(l.set(e.mothership),e))(s);a.dialogUi.set(s),a.popupUi.set(d),a.mainUi.set(o);return(t=>{const{mainUi:o,popupUi:a,uiMotherships:s}=t;ce(xf(e),((t, o)=>{e.ui.registry.addGroupToolbarButton(o,t)}));const{buttons:i,menuItems:l,contextToolbars:c,sidebars:d,views:m}=e.ui.registry.getAll(),p=Xf(e),h={menuItems:l,menus:sy(e),menubar:Ef(e),toolbar:p.getOrThunk((()=>Af(e))),allowToolbarGroups:u===tf.floating,buttons:i,sidebar:d,views:m};var b;b=o.outerContainer,e.addShortcut("alt+F9","focus menubar",(()=>{lA.focusMenubar(b)})),e.addShortcut("alt+F10","focus toolbar",(()=>{lA.focusToolbar(b)})),e.addCommand("ToggleToolbarDrawer",((e, t)=>{(null==t?void 0:t.skipFocus)?lA.toggleToolbarDrawerWithoutFocusing(b):lA.toggleToolbarDrawer(b)})),e.addQueryStateHandler("ToggleToolbarDrawer",(()=>lA.isToolbarDrawerToggled(b))),((e, t, o)=>{const n=(e, n)=>{F([t,...o],(t=>{t.broadcastEvent(e,n)}))},r=(e, n)=>{F([t,...o],(t=>{t.broadcastOn([e],n)}))},a= e=>r($d(),{target:e.target}),s=Wo(),i=tc(s,"touchstart",a),l=tc(s,"touchmove",(e=>n(ba(),e))),c=tc(s,"touchend",(e=>n(va(),e))),d=tc(s,"mousedown",a),u=tc(s,"mouseup",(e=>{0===e.raw.button&&r(Kd(),{target:e.target})})),m= e=>r($d(),{target:Ie(e.target)}),g= e=>{0===e.button&&r(Kd(),{target:Ie(e.target)})},p=()=>{F(e.editorManager.get(),(t=>{e!==t&&t.dispatch("DismissPopups",{relatedTarget:e})}))},h= e=>n(ka(),nc(e)),f= e=>{r(Gd(),{}),n(wa(),nc(e))},y=ht(Ie(e.getElement())),b=oc(y,"scroll",(o=>{requestAnimationFrame((()=>{if(null!=e.getContainer()){const r=Dw(e,t.element).map((e=>[e.element,...e.others])).getOr([]);L(r,(e=>Je(e,o.target)))&&(e.dispatch("ElementScroll",{target:o.target.dom}),n(Ta(),o))}}))})),v=()=>r(Gd(),{}),k= t=>{t.state&&r($d(),{target:Ie(e.getContainer())})},w= e=>{r($d(),{target:Ie(e.relatedTarget.getContainer())})};e.on("PostRender",(()=>{e.on("click",m),e.on("tap",m),e.on("mouseup",g),e.on("mousedown",p),e.on("ScrollWindow",h),e.on("ResizeWindow",f),e.on("ResizeEditor",v),e.on("AfterProgressState",k),e.on("DismissPopups",w)})),e.on("remove",(()=>{e.off("click",m),e.off("tap",m),e.off("mouseup",g),e.off("mousedown",p),e.off("ScrollWindow",h),e.off("ResizeWindow",f),e.off("ResizeEditor",v),e.off("AfterProgressState",k),e.off("DismissPopups",w),d.unbind(),i.unbind(),l.unbind(),c.unbind(),u.unbind(),b.unbind()})),e.on("detach",(()=>{F([t,...o],Bd),F([t,...o],(e=>e.destroy()))}))})(e,o.mothership,s),r.setup(e,y.popup.shared,g),YM(e,y.popup),yN(e,y.popup.shared.getSink,y.popup),(e=>{const{sidebars:t}=e.ui.registry.getAll();F(se(t),(o=>{const n=t[o],r=()=>ke(E.from(e.queryCommandValue("ToggleSidebar")),o);e.ui.registry.addToggleButton(o,{icon:n.icon,tooltip:n.tooltip,onAction: t=>{e.execCommand("ToggleSidebar",!1,o),t.setActive(r())},onSetup: t=>{t.setActive(r());const o=()=>t.setActive(r());return e.on("ToggleSidebar",o),()=>{e.off("ToggleSidebar",o)}}})}))})(e),oE(e,f,y.popup.shared),jM(e,c,a.sink,{backstage:y.popup}),iR(e,a.sink);const k={targetNode:e.getElement(),height:v(o.outerContainer)};return n.render(e,t,h,y.popup,k)})({popupUi:d,dialogUi:s,mainUi:o,uiMotherships:a.getUiMotherships()})}}},hR=k([or("lazySink"),ur("dragBlockClass"),Sr("getBounds",en),vr("useTabstopAt",T),vr("firstTabstop",0),vr("eventOrder",{}),gu("modalBehaviours",[Pp]),Ni("onExecute"),Di("onEscape")]),fR={sketch:w},yR=k([Vu({name:"draghandle",overrides:(e, t)=>({behaviours:xl([nR.config({mode:"mouse",getTarget: e=>mi(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})])})}),Fu({schema:[or("dom")],name:"title"}),Fu({factory:fR,schema:[or("dom")],name:"close"}),Fu({factory:fR,schema:[or("dom")],name:"body"}),Vu({factory:fR,schema:[or("dom")],name:"footer"}),ju({factory:{sketch:(e, t)=>({...e,dom:t.dom,components:t.components})},schema:[vr("dom",{tag:"div",styles:{position:"fixed",left:"0px",top:"0px",right:"0px",bottom:"0px"}}),vr("components",[])],name:"blocker"})]),bR=hm({name:"ModalDialog",configFields:hR(),partFields:yR(),factory:(e, t, o, n)=>{const r=Ql(),a=ls("modal-events"),s={...e.eventOrder,[_a()]:[a].concat(e.eventOrder["alloy.system.attached"]||[])};return{uid:e.uid,dom:e.dom,components:t,apis:{show: t=>{r.set(t);const o=e.lazySink(t).getOrDie(),a=n.blocker(),s=o.getSystem().build({...a,components:a.components.concat([si(t)]),behaviours:xl([eh.config({}),Kp("dialog-blocker-events",[Ka(Gr(),(()=>{Pp.focusIn(t)}))])])});Od(o,s),Pp.focusIn(t)},hide: e=>{r.clear(),rt(e.element).each((t=>{e.getSystem().getByDom(t).each((e=>{Ad(e)}))}))},getBody: t=>tm(t,e,"body"),getFooter: t=>tm(t,e,"footer"),setIdle: e=>{QT.unblock(e)},setBusy:(e, t)=>{QT.block(e,t)}},eventOrder:s,domModification:{attributes:{role:"dialog","aria-modal":"true"}},behaviours:hu(e.modalBehaviours,[Gp.config({}),Pp.config({mode:"cyclic",onEnter:e.onExecute,onEscape:e.onEscape,useTabstopAt:e.useTabstopAt,firstTabstop:e.firstTabstop}),QT.config({getRoot:r.get}),Kp(a,[Ya((t=>{((e, t)=>{const o=zt(e,"id").fold((()=>{const e=ls("dialog-label");return xt(t,"id",e),e}),w);xt(e,"aria-labelledby",o)})(t.element,tm(t,e,"title").element),((e, t)=>{const o=E.from(St(e,"id")).fold((()=>{const e=ls("dialog-describe");return xt(t,"id",e),e}),w);xt(e,"aria-describedby",o)})(t.element,tm(t,e,"body").element)}))])])}},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)}}}),vR=Mn([Jy,Qy].concat(Gb)),kR=Fn,wR=[Sb("button"),mb,xr("align","end",["start","end"]),kb,vb,hr("buttonType",["primary","secondary"])],_R=[...wR,tb],xR=[sr("type",["submit","cancel","custom"]),..._R],CR=[sr("type",["menu"]),ub,gb,mb,dr("items",vR),...wR],SR=[...wR,sr("type",["togglebutton"]),ar("tooltip"),nb,ub,Cr("active",!1)],zR=Xn("type",{submit:xR,cancel:xR,custom:xR,menu:CR,togglebutton:SR}),OR=[Jy,tb,sr("level",["info","warn","error","success"]),nb,vr("url","")],TR=Mn(OR),ER=[Jy,tb,vb,Sb("button"),mb,bb,hr("buttonType",["primary","secondary","toolbar"]),kb],AR=Mn(ER),MR=[Jy,Qy],NR=MR.concat([pb]),RR=MR.concat([eb,vb]),DR=Mn(RR),BR=Fn,LR=NR.concat([wb("auto")]),IR=Mn(LR),HR=Bn([rb,tb,nb]),PR=NR.concat([_r("storageKey","default")]),FR=Mn(PR),jR=Pn,VR=Mn(NR),ZR=Pn,UR=MR.concat([_r("tag","textarea"),ar("scriptId"),ar("scriptUrl"),kr("settings",void 0,Zn)]),qR=MR.concat([_r("tag","textarea"),ir("init")]),WR=qn((e=>$n("customeditor.old",An(qR),e).orThunk((()=>$n("customeditor.new",An(UR),e))))),$R=Pn,GR=Mn(NR),KR=Nn(Sn),YR= e=>[Jy,rr("columns"),e],XR=[Jy,ar("html"),xr("presets","presentation",["presentation","document"])],JR=Mn(XR),QR=NR.concat([Cr("sandboxed",!0),Cr("transparent",!0)]),eD=Mn(QR),tD=Pn,oD=Mn(MR.concat([pr("height")])),nD=Mn([ar("url"),gr("zoom"),gr("cachedWidth"),gr("cachedHeight")]),rD=NR.concat([pr("inputMode"),pr("placeholder"),Cr("maximized",!1),vb]),aD=Mn(rD),sD=Pn,iD= e=>[Jy,eb,e],lD=[tb,rb],cD=[tb,dr("items",Jn(0,(()=>dD)))],dD=Rn([Mn(lD),Mn(cD)]),uD=NR.concat([dr("items",dD),vb]),mD=Mn(uD),gD=Pn,pD=NR.concat([cr("items",[tb,rb]),wr("size",1),vb]),hD=Mn(pD),fD=Pn,yD=NR.concat([Cr("constrain",!0),vb]),bD=Mn(yD),vD=Mn([ar("width"),ar("height")]),kD=MR.concat([eb,wr("min",0),wr("max",0)]),wD=Mn(kD),_D=Hn,xD=[Jy,dr("header",Pn),dr("cells",Nn(Pn))],CD=Mn(xD),SD=NR.concat([pr("placeholder"),Cr("maximized",!1),vb]),zD=Mn(SD),OD=Pn,TD=[sr("type",["directory","leaf"]),ob,ar("id"),mr("menu",RT)],ED=Mn(TD),AD=TD.concat([dr("children",Jn(0,(()=>Un("type",{directory:MD,leaf:ED}))))]),MD=Mn(AD),ND=Un("type",{directory:MD,leaf:ED}),RD=[Jy,dr("items",ND),fr("onLeafAction")],DD=Mn(RD),BD=NR.concat([xr("filetype","file",["image","media","file"]),vb]),LD=Mn(BD),ID=Mn([rb,_b]),HD= e=>Qn("items","items",{tag:"required",process:{}},Nn(qn((t=>$n(`Checking item of ${e}`,PD,t).fold((e=>rn.error(Yn(e))),(e=>rn.value(e))))))),PD=Tn((()=>{return Un("type",{alertbanner:TR,bar:Mn((e=HD("bar"),[Jy,e])),button:AR,checkbox:DR,colorinput:FR,colorpicker:VR,dropzone:GR,grid:Mn(YR(HD("grid"))),iframe:eD,input:aD,listbox:mD,selectbox:hD,sizeinput:bD,slider:wD,textarea:zD,urlinput:LD,customeditor:WR,htmlpanel:JR,imagepreview:oD,collection:IR,label:Mn(iD(HD("label"))),table:CD,tree:DD,panel:jD});var e})),FD=[Jy,vr("classes",[]),dr("items",PD)],jD=Mn(FD),VD=[Sb("tab"),ob,dr("items",PD)],ZD=[Jy,cr("tabs",VD)],UD=Mn(ZD),qD=_R,WD=zR,$D=Mn([ar("title"),nr("body",Un("type",{panel:jD,tabpanel:UD})),_r("size","normal"),dr("buttons",WD),vr("initialData",{}),Sr("onAction",y),Sr("onChange",y),Sr("onSubmit",y),Sr("onClose",y),Sr("onCancel",y),Sr("onTabChange",y)]),GD=Mn([sr("type",["cancel","custom"]),...qD]),KD=Mn([ar("title"),ar("url"),gr("height"),gr("width"),yr("buttons",GD),Sr("onAction",y),Sr("onCancel",y),Sr("onClose",y),Sr("onMessage",y)]),YD= e=>s(e)?[e].concat(G(fe(e),YD)):l(e)?G(e,YD):[],XD= e=>a(e.type)&&a(e.name),JD={checkbox:BR,colorinput:jR,colorpicker:ZR,dropzone:KR,input:sD,iframe:tD,imagepreview:nD,selectbox:fD,sizeinput:vD,slider:_D,listbox:gD,size:vD,textarea:OD,urlinput:ID,customeditor:$R,collection:HR,togglemenuitem:kR},QD= e=>{const t=(e=>V(YD(e),XD))(e),o=G(t,(e=>(e=>E.from(JD[e.type]))(e).fold((()=>[]),(t=>[nr(e.name,t)]))));return Mn(o)},eB= e=>{var t;return{internalDialog:Gn($n("dialog",$D,e)),dataValidator:QD(e),initialData:null!==(t=e.initialData)&&void 0!==t?t:{}}},tB={open:(e, t)=>{const o=eB(t);return e(o.internalDialog,o.initialData,o.dataValidator)},openUrl:(e, t)=>e(Gn($n("dialog",KD,t))),redial: e=>eB(e)};var oB=Object.freeze({__proto__:null,events:(e, t)=>{const o=(o, n)=>{e.updateState.each((e=>{const r=e(o,n);t.set(r)})),e.renderComponents.each((r=>{const a=r(n,t.get());(e.reuseDom?jp:Fp)(o,a)}))};return Pa([Va(da(),((t, n)=>{const r=n;if(!r.universal){const n=e.channel;B(r.channels,n)&&o(t,r.data)}})),Ya(((t, n)=>{e.initialData.each((e=>{o(t,e)}))}))])}}),nB=Object.freeze({__proto__:null,getState:(e, t, o)=>o}),rB=[or("channel"),ur("renderComponents"),ur("updateState"),ur("initialData"),Cr("reuseDom",!0)];const aB=Sl({fields:rB,name:"reflecting",active:oB,apis:nB,state:Object.freeze({__proto__:null,init:()=>{const e=Tr(E.none());return{readState:()=>e.get().getOr("none"),get:e.get,set:e.set,clear:()=>e.set(E.none())}}})}),sB= e=>{const t=[],o={};return le(e,((e, n)=>{e.fold((()=>{t.push(n)}),(e=>{o[n]=e}))})),t.length>0?rn.error(t):rn.value(o)},iB=(e, t, o)=>{const n=Vh(pC.sketch((n=>({dom:{tag:"div",classes:["tox-form"].concat(e.classes)},components:P(e.items,(e=>xz(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:xl([Pp.config({mode:"acyclic",useTabstopAt:C(PC)}),(r=n,vm.config({find:r.getOpt})),zC(n,{postprocess: e=>sB(e).fold((e=>(console.error(e),{})),w)})])};var r},lB=pm({name:"TabButton",configFields:[vr("uid",void 0),or("value"),Qn("dom","dom",kn((()=>({attributes:{role:"tab",id:ls("aria"),"aria-selected":"false"}}))),Ln()),ur("action"),vr("domModification",{}),gu("tabButtonBehaviours",[eh,Pp,mu]),or("view")],factory:(e, t)=>({uid:e.uid,dom:e.dom,components:e.components,events:dh(e.action),behaviours:hu(e.tabButtonBehaviours,[eh.config({}),Pp.config({mode:"execution",useSpace:!0,useEnter:!0}),mu.config({store:{mode:"memory",initialValue:e.value}})]),domModification:e.domModification})}),cB=k([or("tabs"),or("dom"),vr("clickToDismiss",!1),gu("tabbarBehaviours",[Zm,Pp]),Ei(["tabClass","selectedClass"])]),dB=Zu({factory:lB,name:"tabs",unit:"tab",overrides: e=>{const t=(e, t)=>{Zm.dehighlight(e,t),Da(e,Aa(),{tabbar:e,button:t})},o=(e, t)=>{Zm.highlight(e,t),Da(e,Ea(),{tabbar:e,button:t})};return{action: n=>{const r=n.getSystem().getByUid(e.uid).getOrDie(),a=Zm.isHighlighted(r,n);(a&&e.clickToDismiss?t:a?y:o)(r,n)},domModification:{classes:[e.markers.tabClass]}}}}),uB=k([dB]),mB=hm({name:"Tabbar",configFields:cB(),partFields:uB(),factory:(e, t, o, n)=>({uid:e.uid,dom:e.dom,components:t,"debug.sketcher":"Tabbar",domModification:{attributes:{role:"tablist"}},behaviours:hu(e.tabbarBehaviours,[Zm.config({highlightClass:e.markers.selectedClass,itemClass:e.markers.tabClass,onHighlight:(e, t)=>{xt(t.element,"aria-selected","true")},onDehighlight:(e, t)=>{xt(t.element,"aria-selected","false")}}),Pp.config({mode:"flow",getInitial: e=>Zm.getHighlighted(e).map((e=>e.element)),selector:"."+e.markers.tabClass,executeOnMove:!0})])})}),gB=pm({name:"Tabview",configFields:[gu("tabviewBehaviours",[Gp])],factory:(e, t)=>({uid:e.uid,dom:e.dom,behaviours:hu(e.tabviewBehaviours,[Gp.config({})]),domModification:{attributes:{role:"tabpanel"}}})}),pB=k([vr("selectFirst",!0),Mi("onChangeTab"),Mi("onDismissTab"),vr("tabs",[]),gu("tabSectionBehaviours",[])]),hB=Fu({factory:mB,schema:[or("dom"),lr("markers",[or("tabClass"),or("selectedClass")])],name:"tabbar",defaults: e=>({tabs:e.tabs})}),fB=Fu({factory:gB,name:"tabview"}),yB=k([hB,fB]),bB=hm({name:"TabSection",configFields:pB(),partFields:yB(),factory:(e, t, o, n)=>{const r=(t, o)=>{em(t,e,"tabbar").each((e=>{o(e).each(Ba)}))};return{uid:e.uid,dom:e.dom,components:t,behaviours:pu(e.tabSectionBehaviours),events:Pa($([e.selectFirst?[Ya(((e, t)=>{r(e,Zm.getFirst)}))]:[],[Va(Ea(),((t, o)=>{(t=>{const o=mu.getValue(t);em(t,e,"tabview").each((n=>{q(e.tabs,(e=>e.value===o)).each((o=>{const r=o.view();zt(t.element,"id").each((e=>{xt(n.element,"aria-labelledby",e)})),Gp.set(n,r),e.onChangeTab(n,t,r)}))}))})(o.event.button)})),Va(Aa(),((t, o)=>{const n=o.event.button;e.onDismissTab(t,n)}))]])),apis:{getViewItems: t=>em(t,e,"tabview").map((e=>Gp.contents(e))).getOr([]),showTab:(e, t)=>{r(e,(e=>{const o=Zm.getCandidates(e);return q(o,(e=>mu.getValue(e)===t)).filter((t=>!Zm.isHighlighted(e,t)))}))}}}},apis:{getViewItems:(e, t)=>e.getViewItems(t),showTab:(e, t, o)=>{e.showTab(t,o)}}}),vB=(e, t)=>{Mt(e,"height",t+"px"),Mt(e,"flex-basis",t+"px")},kB=(e, t, o)=>{mi(e,'[role="dialog"]').each((e=>{pi(e,'[role="tablist"]').each((n=>{o.get().map((o=>(Mt(t,"height","0"),Mt(t,"flex-basis","0"),Math.min(o,((e, t, o)=>{const n=ot(e).dom,r=mi(e,".tox-dialog-wrap").getOr(e);let a;a="fixed"===Dt(r,"position")?Math.max(n.clientHeight,window.innerHeight):Math.max(n.offsetHeight,n.scrollHeight);const s=Zt(t),i=t.dom.offsetLeft>=o.dom.offsetLeft+Xt(o)?Math.max(Zt(o),s):s,l=parseInt(Dt(e,"margin-top"),10)||0,c=parseInt(Dt(e,"margin-bottom"),10)||0;return a-(Zt(e)+l+c-i)})(e,t,n))))).each((e=>{vB(t,e)}))}))}))},wB= e=>pi(e,'[role="tabpanel"]'),_B="send-data-to-section",xB="send-data-to-view",CB=(e, t, o)=>{const n=Tr({}),r= e=>{const t=mu.getValue(e),o=sB(t).getOr({}),r=n.get(),a=fn(r,o);n.set(a)},a= e=>{const t=n.get();mu.setValue(e,t)},s=Tr(null),i=P(e.tabs,(e=>({value:e.name,dom:{tag:"div",classes:["tox-dialog__body-nav-item"]},components:[ti(o.shared.providers.translate(e.title))],view:()=>[pC.sketch((n=>({dom:{tag:"div",classes:["tox-form"]},components:P(e.items,(e=>xz(n,e,t,o))),formBehaviours:xl([Pp.config({mode:"acyclic",useTabstopAt:C(PC)}),Kp("TabView.form.events",[Ya(a),Xa(r)]),El.config({channels:Mr([{key:_B,value:{onReceive:r}},{key:xB,value:{onReceive:a}}])})])})))]}))),l=(e=>{const t=Ql(),o=[Ya((o=>{const n=o.element;wB(n).each((r=>{Mt(r,"visibility","hidden"),o.getSystem().getByDom(r).toOptional().each((o=>{const n=((e, t, o)=>P(e,((n, r)=>{Gp.set(o,e[r].view());const a=t.dom.getBoundingClientRect();return Gp.set(o,[]),a.height})))(e,r,o),a=(e=>oe(ee(e,((e, t)=>e>t?-1:e<t?1:0))))(n);a.fold(t.clear,t.set)})),kB(n,r,t),Pt(r,"visibility"),((e, t)=>{oe(e).each((e=>bB.showTab(t,e.value)))})(e,o),requestAnimationFrame((()=>{kB(n,r,t)}))}))})),Va(wa(),(e=>{const o=e.element;wB(o).each((e=>{kB(o,e,t)}))})),Va(g_,((e, o)=>{const n=e.element;wB(n).each((e=>{const o=Dl(ht(e));Mt(e,"visibility","hidden");const r=Lt(e,"height").map((e=>parseInt(e,10)));Pt(e,"height"),Pt(e,"flex-basis");const a=e.dom.getBoundingClientRect().height;r.forall((e=>a>e))?(t.set(a),kB(n,e,t)):r.each((t=>{vB(e,t)})),Pt(e,"visibility"),o.each(Ml)}))}))];return{extraEvents:o,selectFirst:!1}})(i);return bB.sketch({dom:{tag:"div",classes:["tox-dialog__body"]},onChangeTab:(e, t, o)=>{const n=mu.getValue(t);Da(e,m_,{name:n,oldName:s.get()}),s.set(n)},tabs:i,components:[bB.parts.tabbar({dom:{tag:"div",classes:["tox-dialog__body-nav"]},components:[mB.parts.tabs({})],markers:{tabClass:"tox-tab",selectedClass:"tox-dialog__body-nav-item--active"},tabbarBehaviours:xl([Qw.config({})])}),bB.parts.tabview({dom:{tag:"div",classes:["tox-dialog__body-content"]}})],selectFirst:l.selectFirst,tabSectionBehaviours:xl([Kp("tabpanel",l.extraEvents),Pp.config({mode:"acyclic"}),vm.config({find: e=>oe(bB.getViewItems(e))}),TC(E.none(),(e=>(e.getSystem().broadcastOn([_B],{}),n.get())),((e, t)=>{n.set(t),e.getSystem().broadcastOn([xB],{})}))])})},SB=ls("update-dialog"),zB=ls("update-title"),OB=ls("update-body"),TB=ls("update-footer"),EB=ls("body-send-message"),AB=(e, t, o, n, r)=>({dom:{tag:"div",classes:["tox-dialog__content-js"],attributes:{...o.map((e=>({id:e}))).getOr({}),...r?{"aria-live":"polite"}:{}}},components:[],behaviours:xl([_C(0),aB.config({channel:`${OB}-${t}`,updateState:(e, t)=>E.some({isTabPanel:()=>"tabpanel"===t.body.type}),renderComponents: e=>{const t=e.body;return"tabpanel"===t.type?[CB(t,e.initialData,n)]:[iB(t,e.initialData,n)]},initialData:e})])});function MB(e){return MB="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},MB(e)}function NB(e, t){return NB=Object.setPrototypeOf||function(e, t){return e.__proto__=t,e},NB(e,t)}function RB(e, t, o){return RB=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e, t, o){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return o&&NB(r,o.prototype),r},RB.apply(null,arguments)}function DB(e){return function(e){if(Array.isArray(e))return BB(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e, t){if(e){if("string"==typeof e)return BB(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?BB(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function BB(e, t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t); o<t; o++)n[o]=e[o];return n}var LB=Object.hasOwnProperty,IB=Object.setPrototypeOf,HB=Object.isFrozen,PB=Object.getPrototypeOf,FB=Object.getOwnPropertyDescriptor,jB=Object.freeze,VB=Object.seal,ZB=Object.create,UB="undefined"!=typeof Reflect&&Reflect,qB=UB.apply,WB=UB.construct;qB||(qB=function(e, t, o){return e.apply(t,o)}),jB||(jB=function(e){return e}),VB||(VB=function(e){return e}),WB||(WB=function(e, t){return RB(e,DB(t))});var $B,GB=rL(Array.prototype.forEach),KB=rL(Array.prototype.pop),YB=rL(Array.prototype.push),XB=rL(String.prototype.toLowerCase),JB=rL(String.prototype.match),QB=rL(String.prototype.replace),eL=rL(String.prototype.indexOf),tL=rL(String.prototype.trim),oL=rL(RegExp.prototype.test),nL=($B=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0; o<e; o++)t[o]=arguments[o];return WB($B,t)});function rL(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1; r<o; r++)n[r-1]=arguments[r];return qB(e,t,n)}}function aL(e, t){IB&&IB(e,null);for(var o=t.length; o--;){var n=t[o];if("string"==typeof n){var r=XB(n);r!==n&&(HB(t)||(t[o]=r),n=r)}e[n]=!0}return e}function sL(e){var t,o=ZB(null);for(t in e)qB(LB,e,[t])&&(o[t]=e[t]);return o}function iL(e, t){for(; null!==e;){var o=FB(e,t);if(o){if(o.get)return rL(o.get);if("function"==typeof o.value)return rL(o.value)}e=PB(e)}return function(e){return console.warn("fallback value for",e),null}}var lL=jB(["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"]),cL=jB(["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"]),dL=jB(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),uL=jB(["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"]),mL=jB(["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"]),gL=jB(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pL=jB(["#text"]),hL=jB(["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"]),fL=jB(["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"]),yL=jB(["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"]),bL=jB(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vL=VB(/\{\{[\w\W]*|[\w\W]*\}\}/gm),kL=VB(/<%[\w\W]*|[\w\W]*%>/gm),wL=VB(/^data-[\-\w.\u00B7-\uFFFF]/),_L=VB(/^aria-[\-\w]+$/),xL=VB(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),CL=VB(/^(?:\w+script|data):/i),SL=VB(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zL=VB(/^html$/i),OL=function(){return"undefined"==typeof window?null:window},TL=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:OL(),o=function(t){return e(t)};if(o.version="2.3.8",o.removed=[],!t||!t.document||9!==t.document.nodeType)return o.isSupported=!1,o;var n=t.document,r=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,i=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,u=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,m=t.HTMLFormElement,g=t.DOMParser,p=t.trustedTypes,h=l.prototype,f=iL(h,"cloneNode"),y=iL(h,"nextSibling"),b=iL(h,"childNodes"),v=iL(h,"parentNode");if("function"==typeof s){var k=r.createElement("template");k.content&&k.content.ownerDocument&&(r=k.content.ownerDocument)}var w=function(e, t){if("object"!==MB(e)||"function"!=typeof e.createPolicy)return null;var o=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(o=t.currentScript.getAttribute(n));var r="dompurify"+(o?"#"+o:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,n),_=w?w.createHTML(""):"",x=r,C=x.implementation,S=x.createNodeIterator,z=x.createDocumentFragment,O=x.getElementsByTagName,T=n.importNode,E={};try{E=sL(r).documentMode?r.documentMode:{}}catch(e){}var A={};o.isSupported="function"==typeof v&&C&&void 0!==C.createHTMLDocument&&9!==E;var M,N,R=vL,D=kL,B=wL,L=_L,I=CL,H=SL,P=xL,F=null,j=aL({},[].concat(DB(lL),DB(cL),DB(dL),DB(mL),DB(pL))),V=null,Z=aL({},[].concat(DB(hL),DB(fL),DB(yL),DB(bL))),U=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null,$=!0,G=!0,K=!1,Y=!1,X=!1,J=!1,Q=!1,ee=!1,te=!1,oe=!1,ne=!0,re=!0,ae=!1,se={},ie=null,le=aL({},["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"]),ce=null,de=aL({},["audio","video","img","source","image","track"]),ue=null,me=aL({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",fe=he,ye=!1,be=["application/xhtml+xml","text/html"],ve=null,ke=r.createElement("form"),we=function(e){return e instanceof RegExp||e instanceof Function},_e=function(e){ve&&ve===e||(e&&"object"===MB(e)||(e={}),e=sL(e),F="ALLOWED_TAGS"in e?aL({},e.ALLOWED_TAGS):j,V="ALLOWED_ATTR"in e?aL({},e.ALLOWED_ATTR):Z,ue="ADD_URI_SAFE_ATTR"in e?aL(sL(me),e.ADD_URI_SAFE_ATTR):me,ce="ADD_DATA_URI_TAGS"in e?aL(sL(de),e.ADD_DATA_URI_TAGS):de,ie="FORBID_CONTENTS"in e?aL({},e.FORBID_CONTENTS):le,q="FORBID_TAGS"in e?aL({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?aL({},e.FORBID_ATTR):{},se="USE_PROFILES"in e&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||P,fe=e.NAMESPACE||he,e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M=M=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===M?function(e){return e}:XB,Y&&(G=!1),te&&(ee=!0),se&&(F=aL({},DB(pL)),V=[],!0===se.html&&(aL(F,lL),aL(V,hL)),!0===se.svg&&(aL(F,cL),aL(V,fL),aL(V,bL)),!0===se.svgFilters&&(aL(F,dL),aL(V,fL),aL(V,bL)),!0===se.mathMl&&(aL(F,mL),aL(V,yL),aL(V,bL))),e.ADD_TAGS&&(F===j&&(F=sL(F)),aL(F,e.ADD_TAGS)),e.ADD_ATTR&&(V===Z&&(V=sL(V)),aL(V,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&aL(ue,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ie===le&&(ie=sL(ie)),aL(ie,e.FORBID_CONTENTS)),re&&(F["#text"]=!0),X&&aL(F,["html","head","body"]),F.table&&(aL(F,["tbody"]),delete q.tbody),jB&&jB(e),ve=e)},xe=aL({},["mi","mo","mn","ms","mtext"]),Ce=aL({},["foreignobject","desc","title","annotation-xml"]),Se=aL({},["title","style","font","a","script"]),ze=aL({},cL);aL(ze,dL),aL(ze,uL);var Oe=aL({},mL);aL(Oe,gL);var Te=function(e){YB(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=_}catch(t){e.remove()}}},Ee=function(e, t){try{YB(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){YB(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!V[e])if(ee||te)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ae=function(e){var t,o;if(Q)e="<remove></remove>"+e;else{var n=JB(e,/^[\r\n\t ]+/);o=n&&n[0]}"application/xhtml+xml"===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=w?w.createHTML(e):e;if(fe===he)try{t=(new g).parseFromString(a,M)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(fe,"template",null);try{t.documentElement.innerHTML=ye?"":a}catch(e){}}var s=t.body||t.documentElement;return e&&o&&s.insertBefore(r.createTextNode(o),s.childNodes[0]||null),fe===he?O.call(t,X?"html":"body")[0]:X?t.documentElement:s},Me=function(e){return S.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Ne=function(e){return"object"===MB(i)?e instanceof i:e&&"object"===MB(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Re=function(e, t, n){A[e]&&GB(A[e],(function(e){e.call(o,t,n,ve)}))},De=function(e){var t,n;if(Re("beforeSanitizeElements",e,null),(n=e)instanceof m&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof u)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore))return Te(e),!0;if(oL(/[\u0080-\uFFFF]/,e.nodeName))return Te(e),!0;var r=N(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:r,allowedTags:F}),e.hasChildNodes()&&!Ne(e.firstElementChild)&&(!Ne(e.content)||!Ne(e.content.firstElementChild))&&oL(/<[/\w]/g,e.innerHTML)&&oL(/<[/\w]/g,e.textContent))return Te(e),!0;if("select"===r&&oL(/<template/i,e.innerHTML))return Te(e),!0;if(!F[r]||q[r]){if(!q[r]&&Le(r)){if(U.tagNameCheck instanceof RegExp&&oL(U.tagNameCheck,r))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(r))return!1}if(re&&!ie[r]){var a=v(e)||e.parentNode,s=b(e)||e.childNodes;if(s&&a)for(var i=s.length-1; i>=0; --i)a.insertBefore(f(s[i],!0),y(e))}return Te(e),!0}return e instanceof l&&!function(e){var t=v(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var o=XB(e.tagName),n=XB(t.tagName);return e.namespaceURI===pe?t.namespaceURI===he?"svg"===o:t.namespaceURI===ge?"svg"===o&&("annotation-xml"===n||xe[n]):Boolean(ze[o]):e.namespaceURI===ge?t.namespaceURI===he?"math"===o:t.namespaceURI===pe?"math"===o&&Ce[n]:Boolean(Oe[o]):e.namespaceURI===he&&!(t.namespaceURI===pe&&!Ce[n])&&!(t.namespaceURI===ge&&!xe[n])&&!Oe[o]&&(Se[o]||!ze[o])}(e)?(Te(e),!0):"noscript"!==r&&"noembed"!==r||!oL(/<\/no(script|embed)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=QB(t,R," "),t=QB(t,D," "),e.textContent!==t&&(YB(o.removed,{element:e.cloneNode()}),e.textContent=t)),Re("afterSanitizeElements",e,null),!1):(Te(e),!0)},Be=function(e, t, o){if(ne&&("id"===t||"name"===t)&&(o in r||o in ke))return!1;if(G&&!W[t]&&oL(B,t));else if($&&oL(L,t));else if(!V[t]||W[t]){if(!(Le(e)&&(U.tagNameCheck instanceof RegExp&&oL(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&oL(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&oL(U.tagNameCheck,o)||U.tagNameCheck instanceof Function&&U.tagNameCheck(o))))return!1}else if(ue[t]);else if(oL(P,QB(o,H,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==eL(o,"data:")||!ce[e])if(K&&!oL(I,QB(o,H,"")));else if(o)return!1;return!0},Le=function(e){return e.indexOf("-")>0},Ie=function(e){var t,o,n,r;Re("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V};for(r=a.length; r--;){var i=t=a[r],l=i.name,c=i.namespaceURI;o="value"===l?t.value:tL(t.value),n=N(l);var d=o;if(s.attrName=n,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,s),o=s.attrValue,!s.forceKeepAttr)if(s.keepAttr)if(oL(/\/>/i,o))Ee(l,e);else{Y&&(o=QB(o,R," "),o=QB(o,D," "));var u=N(e.nodeName);if(Be(u,n,o)){if(o!==d)try{c?e.setAttributeNS(c,l,o):e.setAttribute(l,o)}catch(t){Ee(l,e)}}else Ee(l,e)}else Ee(l,e)}Re("afterSanitizeAttributes",e,null)}},He=function e(t){var o,n=Me(t);for(Re("beforeSanitizeShadowDOM",t,null); o=n.nextNode();)Re("uponSanitizeShadowNode",o,null),De(o)||(o.content instanceof a&&e(o.content),Ie(o));Re("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e, r){var s,l,c,d,u;if((ye=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw nL("toString is not a function");if("string"!=typeof(e=e.toString()))throw nL("dirty is not a string, aborting")}if(!o.isSupported){if("object"===MB(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Ne(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||_e(r),o.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){var m=N(e.nodeName);if(!F[m]||q[m])throw nL("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof i)1===(l=(s=Ae("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?s=l:s.appendChild(l);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(!(s=Ae(e)))return ee?null:oe?_:""}s&&Q&&Te(s.firstChild);for(var g=Me(ae?e:s); c=g.nextNode();)3===c.nodeType&&c===d||De(c)||(c.content instanceof a&&He(c.content),Ie(c),d=c);if(d=null,ae)return e;if(ee){if(te)for(u=z.call(s.ownerDocument); s.firstChild;)u.appendChild(s.firstChild);else u=s;return V.shadowroot&&(u=T.call(n,u,!0)),u}var p=X?s.outerHTML:s.innerHTML;return X&&F["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&oL(zL,s.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+s.ownerDocument.doctype.name+">\n"+p),Y&&(p=QB(p,R," "),p=QB(p,D," ")),w&&oe?w.createHTML(p):p},o.setConfig=function(e){_e(e),J=!0},o.clearConfig=function(){ve=null,J=!1},o.isValidAttribute=function(e, t, o){ve||_e({});var n=N(e),r=N(t);return Be(n,r,o)},o.addHook=function(e, t){"function"==typeof t&&(A[e]=A[e]||[],YB(A[e],t))},o.removeHook=function(e){if(A[e])return KB(A[e])},o.removeHooks=function(e){A[e]&&(A[e]=[])},o.removeAllHooks=function(){A={}},o}();const EL= e=>TL().sanitize(e),AL=af.deviceType.isTouch(),ML=(e, t)=>({dom:{tag:"div",styles:{display:"none"},classes:["tox-dialog__header"]},components:[e,t]}),NL=(e, t)=>bR.parts.close(jh.sketch({dom:{tag:"button",classes:["tox-button","tox-button--icon","tox-button--naked"],attributes:{type:"button","aria-label":t.translate("Close")}},action:e,buttonBehaviours:xl([Qw.config({})])})),RL=()=>bR.parts.title({dom:{tag:"div",classes:["tox-dialog__title"],innerHtml:"",styles:{display:"none"}}}),DL=(e, t)=>bR.parts.body({dom:{tag:"div",classes:["tox-dialog__body"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-content"]},components:[{dom:eE(`<p>${EL(t.translate(e))}</p>`)}]}]}),BL= e=>bR.parts.footer({dom:{tag:"div",classes:["tox-dialog__footer"]},components:e}),LL=(e, t)=>[Ww.sketch({dom:{tag:"div",classes:["tox-dialog__footer-start"]},components:e}),Ww.sketch({dom:{tag:"div",classes:["tox-dialog__footer-end"]},components:t})],IL= e=>{const t="tox-dialog",o=t+"-wrap",n=o+"__backdrop",r=t+"__disable-scroll";return bR.sketch({lazySink:e.lazySink,onEscape: t=>(e.onEscape(t),E.some(!0)),useTabstopAt: e=>!PC(e),firstTabstop:e.firstTabstop,dom:{tag:"div",classes:[t].concat(e.extraClasses),styles:{position:"relative",...e.extraStyles}},components:[e.header,e.body,...e.footer.toArray()],parts:{blocker:{dom:eE(`<div class="${o}"></div>`),components:[{dom:{tag:"div",classes:AL?[n,n+"--opaque"]:[n]}}]}},dragBlockClass:o,modalBehaviours:xl([eh.config({}),Kp("dialog-events",e.dialogEvents.concat([Ka(Gr(),((e, t)=>{Pp.focusIn(e)}))])),Kp("scroll-lock",[Ya((()=>{Fs(kt(),r)})),Xa((()=>{js(kt(),r)}))]),...e.extraBehaviours]),eventOrder:{[ua()]:["dialog-events"],[_a()]:["scroll-lock","dialog-events","alloy.base.behaviour"],[xa()]:["alloy.base.behaviour","dialog-events","scroll-lock"],...e.eventOrder}})},HL= e=>jh.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")}},buttonBehaviours:xl([Qw.config({})]),components:[Jh("close",{tag:"div",classes:["tox-icon"]},e.icons)],action: e=>{Ra(e,i_)}}),PL=(e, t, o, n)=>({dom:{tag:"div",classes:["tox-dialog__title"],attributes:{...o.map((e=>({id:e}))).getOr({})}},components:[],behaviours:xl([aB.config({channel:`${zB}-${t}`,initialData:e,renderComponents: e=>[ti(n.translate(e.title))]})])}),FL=()=>({dom:eE('<div class="tox-dialog__draghandle"></div>')}),jL=(e, t, o)=>((e, t, o)=>{const n=bR.parts.title(PL(e,t,E.none(),o)),r=bR.parts.draghandle(FL()),a=bR.parts.close(HL(o)),s=[n].concat(e.draggable?[r]:[]).concat([a]);return Ww.sketch({dom:eE('<div class="tox-dialog__header"></div>'),components:s})})({title:o.shared.providers.translate(e),draggable:o.dialog.isDraggableModal()},t,o.shared.providers),VL=(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:eE('<div class="tox-spinner"><div></div><div></div><div></div></div>')}]}),ZL=(e, t, o)=>({onClose:()=>o.closeWindow(),onBlock: o=>{bR.setBusy(e(),((e, n)=>VL(o.message,n,t)))},onUnblock:()=>{bR.setIdle(e())}}),UL=(e, t, o, n)=>ai(IL({...e,firstTabstop:1,lazySink:n.shared.getSink,extraBehaviours:[aB.config({channel:`${SB}-${e.id}`,updateState:(e, t)=>E.some(t),initialData:t}),EC({}),...e.extraBehaviours],onEscape: e=>{Ra(e,i_)},dialogEvents:o,eventOrder:{[da()]:[aB.name(),El.name()],[_a()]:["scroll-lock",aB.name(),"messages","dialog-events","alloy.base.behaviour"],[xa()]:["alloy.base.behaviour","dialog-events","messages",aB.name(),"scroll-lock"]}})),qL=(e, t={})=>P(e,(e=>"menu"===e.type?(e=>{const o=P(e.items,(e=>{const o=ye(t,e.name).getOr(Tr(!1));return{...e,storage:o}}));return{...e,items:o}})(e):e)),WL= e=>U(e,((e, t)=>"menu"===t.type?U(t.items,((e, t)=>(e[t.name]=t.storage,e)),e):e),{}),$L=(e, t)=>[Wa(Gr(),HC),e(s_,((e, o, n, r)=>{Dl(ht(r.element)).fold(y,Nl),t.onClose(),o.onClose()})),e(i_,((e, t, o, n)=>{t.onCancel(e),Ra(n,s_)})),Va(u_,((e, o)=>t.onUnblock())),Va(d_,((e, o)=>t.onBlock(o.event)))],GL=(e, t, o)=>{const n=(t, o)=>Va(t,((t, n)=>{r(t,((r, a)=>{o(e(),r,n.event,t)}))})),r=(e, t)=>{aB.getState(e).get().each((o=>{t(o.internalDialog,e)}))};return[...$L(n,t),n(c_,((e, t)=>t.onSubmit(e))),n(a_,((e, t, o)=>{t.onChange({value: e},{name:o.name})})),n(l_,((e, t, n, r)=>{const a=()=>Pp.focusIn(r),s= e=>Ot(e,"disabled")||zt(e,"aria-disabled").exists((e=>"true"===e)),i=ht(r.element),l=Dl(i);t.onAction(e,{name:n.name,value:n.value}),Dl(i).fold(a,(e=>{s(e)||l.exists((t=>Qe(e,t)&&s(t)))?a():o().toOptional().filter((t=>!Qe(t.element,e))).each(a)}))})),n(m_,((e, t, o)=>{t.onTabChange(e,{newTabName:o.name,oldTabName:o.oldName})})),Xa((t=>{const o=e();mu.setValue(t,o.getData())}))]},KL=(e, t)=>{const o=t.map((e=>e.footerButtons)).getOr([]),n=j(o,(e=>"start"===e.align)),r=(e, t)=>Ww.sketch({dom:{tag:"div",classes:[`tox-dialog__footer-${e}`]},components:P(t,(e=>e.memento.asSpec()))});return[r("start",n.pass),r("end",n.fail)]},YL=(e, t, o)=>({dom:eE('<div class="tox-dialog__footer"></div>'),components:[],behaviours:xl([aB.config({channel:`${TB}-${t}`,initialData:e,updateState:(e, t)=>{const n=P(t.buttons,(e=>{const t=Vh(((e, t)=>iz(e,e.type,t))(e,o));return{name:e.name,align:e.align,memento:t}}));return E.some({lookupByName: t=>((e, t, o)=>q(t,(e=>e.name===o)).bind((t=>t.memento.getOpt(e))))(e,n,t),footerButtons:n})},renderComponents:KL})])}),XL=(e, t, o)=>bR.parts.footer(YL(e,t,o)),JL=(e, t)=>{if(e.getRoot().getSystem().isConnected()){const o=vm.getCurrent(e.getFormWrapper()).getOr(e.getFormWrapper());return pC.getField(o,t).orThunk((()=>{const o=e.getFooter();return aB.getState(o).get().bind((e=>e.lookupByName(t)))}))}return E.none()},QL=(e, t, o)=>{const n= t=>{const o=e.getRoot();o.getSystem().isConnected()&&t(o)},r={getData:()=>{const t=e.getRoot(),n=t.getSystem().isConnected()?e.getFormWrapper():t;return{...mu.getValue(n),...ce(o,(e=>e.get()))}},setData: t=>{n((n=>{const a=r.getData(),s=fn(a,t),i=((e, t)=>{const o=e.getRoot();return aB.getState(o).get().map((e=>Gn($n("data",e.dataValidator,t)))).getOr(t)})(e,s),l=e.getFormWrapper();mu.setValue(l,i),le(o,((e, t)=>{be(s,t)&&e.set(s[t])}))}))},setEnabled:(t, o)=>{JL(e,t).each(o?Rm.enable:Rm.disable)},focus: t=>{JL(e,t).each(eh.focus)},block: e=>{if(!a(e))throw new Error("The dialogInstanceAPI.block function should be passed a blocking message of type string as an argument");n((t=>{Da(t,d_,{message:e})}))},unblock:()=>{n((e=>{Ra(e,u_)}))},showTab: t=>{n((o=>{const n=e.getBody();aB.getState(n).get().exists((e=>e.isTabPanel()))&&vm.getCurrent(n).each((e=>{bB.showTab(e,t)}))}))},redial: a=>{n((n=>{const s=e.getId(),i=t(a),l=qL(i.internalDialog.buttons,o);n.getSystem().broadcastOn([`${SB}-${s}`],i),n.getSystem().broadcastOn([`${zB}-${s}`],i.internalDialog),n.getSystem().broadcastOn([`${OB}-${s}`],i.internalDialog),n.getSystem().broadcastOn([`${TB}-${s}`],{...i.internalDialog,buttons:l}),r.setData(i.initialData)}))},close:()=>{n((e=>{Ra(e,s_)}))},toggleFullscreen:e.toggleFullscreen};return r};var eI=tinymce.util.Tools.resolve("tinymce.util.URI");const tI=["insertContent","setContent","execCommand","close","block","unblock"],oI= e=>s(e)&&-1!==tI.indexOf(e.mceAction),nI=(e, t, o, n)=>{const r=ls("dialog"),i=jL(e.title,r,n),l=(e=>{const t={dom:{tag:"div",classes:["tox-dialog__content-js"]},components:[{dom:{tag:"div",classes:["tox-dialog__body-iframe"]},components:[LC({dom:{tag:"iframe",attributes:{src:e.url}},behaviours:xl([Qw.config({}),eh.config({})])})]}],behaviours:xl([Pp.config({mode:"acyclic",useTabstopAt:C(PC)})])};return bR.parts.body(t)})(e),c=e.buttons.bind((e=>0===e.length?E.none():E.some(XL({buttons:e},r,n)))),u=((e, t)=>{const o=(t, o)=>Va(t,((t, r)=>{n(t,((n, a)=>{o(e(),n,r.event,t)}))})),n=(e, t)=>{aB.getState(e).get().each((o=>{t(o,e)}))};return[...$L(o,t),o(l_,((e, t, o)=>{t.onAction(e,{name:o.name})}))]})((()=>k),ZL((()=>v),n.shared.providers,t)),m={...e.height.fold((()=>({})),(e=>({height:e+"px","max-height":e+"px"}))),...e.width.fold((()=>({})),(e=>({width:e+"px","max-width":e+"px"})))},p=e.width.isNone()&&e.height.isNone()?["tox-dialog--width-lg"]:[],h=new eI(e.url,{base_uri:new eI(window.location.href)}),f=`${h.protocol}://${h.host}${h.port?":"+h.port:""}`,y=Jl(),b=[Kp("messages",[Ya((()=>{const t=tc(Ie(window),"message",(t=>{if(h.isSameOrigin(new eI(t.raw.origin))){const n=t.raw.data;oI(n)?((e, t, o)=>{switch(o.mceAction){case"insertContent":e.insertContent(o.content);break;case"setContent":e.setContent(o.content);break;case"execCommand":const n=!!d(o.ui)&&o.ui;e.execCommand(o.cmd,n,o.value);break;case"close":t.close();break;case"block":t.block(o.message);break;case"unblock":t.unblock()}})(o,k,n):(e=>!oI(e)&&s(e)&&be(e,"mceAction"))(n)&&e.onMessage(k,n)}}));y.set(t)})),Xa(y.clear)]),El.config({channels:{[EB]:{onReceive:(e, t)=>{pi(e.element,"iframe").each((e=>{const o=e.dom.contentWindow;g(o)&&o.postMessage(t,f)}))}}}})],v=UL({id:r,header:i,body:l,footer:c,extraClasses:p,extraBehaviours:b,extraStyles:m},e,u,n),k=(e=>{const t= t=>{e.getSystem().isConnected()&&t(e)};return{block: e=>{if(!a(e))throw new Error("The urlDialogInstanceAPI.block function should be passed a blocking message of type string as an argument");t((t=>{Da(t,d_,{message:e})}))},unblock:()=>{t((e=>{Ra(e,u_)}))},close:()=>{t((e=>{Ra(e,s_)}))},sendMessage: e=>{t((t=>{t.getSystem().broadcastOn([EB],e)}))}}})(v);return{dialog:v,instanceApi:k}},rI=(e, t, o)=>t&&o?[]:[kT.config({contextual:{lazyContext:()=>E.some(Xo(Ie(e.getContentAreaContainer()))),fadeInClass:"tox-dialog-dock-fadein",fadeOutClass:"tox-dialog-dock-fadeout",transitionClass:"tox-dialog-dock-transition"},modes:["top"],lazyViewport: t=>Dw(e,t.element).map((e=>({bounds:Bw(e),optScrollEnv:E.some({currentScrollTop:e.element.dom.scrollTop,scrollElmTop:Gt(e.element).top})}))).getOrThunk((()=>({bounds:en(),optScrollEnv:E.none()})))})],aI= e=>{const t=e.editor,o=ry(t),n=(e=>{const t=e.shared;return{open:(o, n)=>{const r=()=>{bR.hide(l),n()},a=Vh(iz({name:"close-alert",text:"OK",primary:!0,buttonType:E.some("primary"),align:"end",enabled:!0,icon:E.none()},"cancel",e)),s=RL(),i=NL(r,t.providers),l=ai(IL({lazySink:()=>t.getSink(),header:ML(s,i),body:DL(o,t.providers),footer:E.some(BL(LL([],[a.asSpec()]))),onEscape:r,extraClasses:["tox-alert-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Va(i_,r)],eventOrder:{}}));bR.show(l);const c=a.get(l);eh.focus(c)}}})(e.backstages.dialog),r=(e=>{const t=e.shared;return{open:(o, n)=>{const r= e=>{bR.hide(c),n(e)},a=Vh(iz({name:"yes",text:"Yes",primary:!0,buttonType:E.some("primary"),align:"end",enabled:!0,icon:E.none()},"submit",e)),s=iz({name:"no",text:"No",primary:!1,buttonType:E.some("secondary"),align:"end",enabled:!0,icon:E.none()},"cancel",e),i=RL(),l=NL((()=>r(!1)),t.providers),c=ai(IL({lazySink:()=>t.getSink(),header:ML(i,l),body:DL(o,t.providers),footer:E.some(BL(LL([],[s,a.asSpec()]))),onEscape:()=>r(!1),extraClasses:["tox-confirm-dialog"],extraBehaviours:[],extraStyles:{},dialogEvents:[Va(i_,(()=>r(!1))),Va(c_,(()=>r(!0)))],eventOrder:{}}));bR.show(c);const d=a.get(c);eh.focus(d)}}})(e.backstages.dialog),a=(t, o)=>tB.open(((t, n, r)=>{const a=n,s=((e, t, o)=>{const n=ls("dialog"),r=e.internalDialog,a=jL(r.title,n,o),s=((e, t, o)=>{const n=AB(e,t,E.none(),o,!1);return bR.parts.body(n)})({body:r.body,initialData:r.initialData},n,o),i=qL(r.buttons),l=WL(i),c=XL({buttons:i},n,o),d=GL((()=>h),ZL((()=>g),o.shared.providers,t),o.shared.getSink),u=(e=>{switch(e){case"large":return["tox-dialog--width-lg"];case"medium":return["tox-dialog--width-md"];default:return[]}})(r.size),m={id:n,header:a,body:s,footer:E.some(c),extraClasses:u,extraBehaviours:[],extraStyles:{}},g=UL(m,e,d,o),p={getId:k(n),getRoot:k(g),getBody:()=>bR.getBody(g),getFooter:()=>bR.getFooter(g),getFormWrapper:()=>{const e=bR.getBody(g);return vm.getCurrent(e).getOr(e)},toggleFullscreen:()=>{const e="tox-dialog--fullscreen",t=Ie(g.element.dom);Vs(t,e)?(js(t,e),Zs(t,u)):(Us(t,u),Fs(t,e))}},h=QL(p,t.redial,l);return{dialog:g,instanceApi:h}})({dataValidator:r,initialData:a,internalDialog:t},{redial:tB.redial,closeWindow:()=>{bR.hide(s.dialog),o(s.instanceApi)}},e.backstages.dialog);return bR.show(s.dialog),s.instanceApi.setData(a),s.instanceApi}),t),s=(n, r, a, s=!1)=>tB.open(((n, i, l)=>{const c=Gn($n("data",l,i)),d=Ql(),u=e.backstages.popup.shared.header.isPositionedAtTop(),m=()=>d.on((e=>{Ph.reposition(e),kT.refresh(e)})),g=((e, t, o, n)=>{const r=ls("dialog"),a=ls("dialog-label"),s=ls("dialog-content"),i=e.internalDialog,l=Vh(((e, t, o, n)=>Ww.sketch({dom:eE('<div class="tox-dialog__header"></div>'),components:[PL(e,t,E.some(o),n),FL(),HL(n)],containerBehaviours:xl([nR.config({mode:"mouse",blockerClass:"blocker",getTarget: e=>hi(e,'[role="dialog"]').getOrDie(),snaps:{getSnapPoints:()=>[],leftAttr:"data-drag-left",topAttr:"data-drag-top"}})])}))({title:i.title,draggable:!0},r,a,o.shared.providers)),c=Vh(((e, t, o, n, r)=>AB(e,t,E.some(o),n,r))({body:i.body,initialData:i.initialData},r,s,o,n)),d=qL(i.buttons),u=WL(d),m=Vh(((e, t, o)=>YL(e,t,o))({buttons:d},r,o)),g=GL((()=>f),{onBlock: e=>{QT.block(h,((t, n)=>VL(e.message,n,o.shared.providers)))},onUnblock:()=>{QT.unblock(h)},onClose:()=>t.closeWindow()},o.shared.getSink),p="tox-dialog-inline",h=ai({dom:{tag:"div",classes:["tox-dialog",p],attributes:{role:"dialog","aria-labelledby":a,"aria-describedby":s}},eventOrder:{[da()]:[aB.name(),El.name()],[ua()]:["execute-on-form"],[_a()]:["reflecting","execute-on-form"]},behaviours:xl([Pp.config({mode:"cyclic",onEscape: e=>(Ra(e,s_),E.some(!0)),useTabstopAt: e=>!PC(e)&&("button"!==Ve(e)||"disabled"!==St(e,"disabled")),firstTabstop:1}),aB.config({channel:`${SB}-${r}`,updateState:(e, t)=>E.some(t),initialData:e}),eh.config({}),Kp("execute-on-form",g.concat([Ka(Gr(),((e, t)=>{Pp.focusIn(e)}))])),QT.config({getRoot:()=>E.some(h)}),Gp.config({}),EC({})]),components:[l.asSpec(),c.asSpec(),m.asSpec()]}),f=QL({getId:k(r),getRoot:k(h),getFooter:()=>m.get(h),getBody:()=>c.get(h),getFormWrapper:()=>{const e=c.get(h);return vm.getCurrent(e).getOr(e)},toggleFullscreen:()=>{const e="tox-dialog--fullscreen",t=Ie(h.element.dom);qs(t,[e])?(Us(t,[e]),Zs(t,[p])):(Us(t,[p]),Zs(t,[e]))}},t.redial,u);return{dialog:h,instanceApi:f}})({dataValidator:l,initialData:c,internalDialog:n},{redial:tB.redial,closeWindow:()=>{d.on(Ph.hide),t.off("ResizeEditor",m),d.clear(),a(g.instanceApi)}},e.backstages.popup,s),p=ai(Ph.sketch({lazySink:e.backstages.popup.shared.getSink,dom:{tag:"div",classes:[]},fireDismissalEventInstead:{},...u?{}:{fireRepositionEventInstead:{}},inlineBehaviours:xl([Kp("window-manager-inline-events",[Va(Ca(),((e, t)=>{Ra(g.dialog,i_)}))]),...rI(t,o,u)]),isExtraPart:(e, t)=>(e=>Lw(e,".tox-alert-dialog")||Lw(e,".tox-confirm-dialog"))(t)}));return d.set(p),Ph.showWithinBounds(p,si(g.dialog),{anchor:r},(()=>{const e=t.inline?kt():Ie(t.getContainer()),o=Xo(e);return E.some(o)})),o&&u||(kT.refresh(p),t.on("ResizeEditor",m)),g.instanceApi.setData(c),Pp.focusIn(g.dialog),g.instanceApi}),n);return{open:(t, o, n)=>void 0!==o&&"toolbar"===o.inline?s(t,e.backstages.popup.shared.anchors.inlineDialog(),n,o.ariaAttrs):void 0!==o&&"cursor"===o.inline?s(t,e.backstages.popup.shared.anchors.cursor(),n,o.ariaAttrs):a(t,n),openUrl:(o, n)=>((o, n)=>tB.openUrl((o=>{const r=nI(o,{closeWindow:()=>{bR.hide(r.dialog),n(r.instanceApi)}},t,e.backstages.dialog);return bR.show(r.dialog),r.instanceApi}),o))(o,n),alert:(e, t)=>{n.open(e,t)},close: e=>{e.close()},confirm:(e, t)=>{r.open(e,t)}}};tn.add("silver",(e=>{(e=>{cf(e),(e=>{const t=e.options.register,o= e=>f(e,a)?{value:Sk(e),valid:!0}:{valid:!1,message:"Must be an array of strings."};t("color_map",{processor:o,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_map_background",{processor:o}),t("color_map_foreground",{processor:o}),t("color_cols",{processor:"number",default:xk(Ak(e,"default").length)}),t("color_cols_foreground",{processor:"number",default:Ck(e,Ak(e,wk).length)}),t("color_cols_background",{processor:"number",default:Ck(e,Ak(e,_k).length)}),t("custom_colors",{processor:"boolean",default:!0}),t("color_default_foreground",{processor:"string",default:Ok}),t("color_default_background",{processor:"string",default:Ok})})(e),(e=>{const t=e.options.register;t("contextmenu_avoid_overlap",{processor:"string",default:""}),t("contextmenu_never_use_native",{processor:"boolean",default:!1}),t("contextmenu",{processor: e=>!1===e?{value:[],valid:!0}:a(e)||f(e,a)?{value:XM(e),valid:!0}:{valid:!1,message:"Must be false or a string."},default:"link linkchecker image editimage table spellchecker configurepermanentpen"})})(e)})(e);let t=()=>en();const{dialogs:o,popups:n,renderUI:r}=pR(e,{getPopupSinkBounds:()=>t()});Mw(e,n.backstage.shared);const s=aI({editor:e,backstages:{popup:n.backstage,dialog:o.backstage}});return{renderUI:async()=>{const o=await r();return Dw(e,n.getMothership().element).each((e=>{t=()=>Bw(e)})),o},getWindowManagerImpl:k(s),getNotificationManagerImpl:()=>((e, t, o)=>{const n=t.backstage.shared,r=()=>{const t=Xo(Ie(e.getContentAreaContainer())),o=en(),n=Ki(o.x,t.x,t.right),r=Ki(o.y,t.y,t.bottom),a=Math.max(t.right,o.right),s=Math.max(t.bottom,o.bottom);return E.some(Yo(n,r,a-n,s-r))};return{open:(t, a)=>{const s=()=>{a(),Ph.hide(l)},i=ai(ef.sketch({text:t.text,level:B(["success","error","warning","warn","info"],t.type)?t.type:void 0,progress:!0===t.progressBar,icon:t.icon,closeButton:t.closeButton,onAction:s,iconProvider:n.providers.icons,translationProvider:n.providers.translate})),l=ai(Ph.sketch({dom:{tag:"div",classes:["tox-notifications-container"]},lazySink:n.getSink,fireDismissalEventInstead:{},...n.header.isPositionedAtTop()?{}:{fireRepositionEventInstead:{}}}));o.add(l),h(t.timeout)&&t.timeout>0&&Fh.setEditorTimeout(e,(()=>{s()}),t.timeout);const c={close:s,reposition:()=>{const t=si(i),o={maxHeightFunction:cc()},a=e.notificationManager.getNotifications();if(a[0]===c){const e={...n.anchors.banner(),overrides:o};Ph.showWithinBounds(l,t,{anchor:e},r)}else D(a,c).each((e=>{const n=a[e-1].getEl(),s={type:"node",root:kt(),node:E.some(Ie(n)),overrides:o,layouts:{onRtl:()=>[cl],onLtr:()=>[cl]}};Ph.showWithinBounds(l,t,{anchor:s},r)}))},text: e=>{ef.updateText(i,e)},settings:t,getEl:()=>i.element.dom,progressBar:{value: e=>{ef.updateProgress(i,e)}}};return c},close: e=>{e.close()},getArgs: e=>e.settings}})(e,{backstage:n.backstage},n.getMothership())}}))}()},47575:function(e){!function(){"use strict";var t=function(e){if(null===e)return"null";if(void 0===e)return"undefined";var t=typeof e;return"object"===t&&(Array.prototype.isPrototypeOf(e)||e.constructor&&"Array"===e.constructor.name)?"array":"object"===t&&(String.prototype.isPrototypeOf(e)||e.constructor&&"String"===e.constructor.name)?"string":t},o=function(e){return{eq:e}},n=o((function(e, t){return e===t})),r=function(e){return o((function(t, o){if(t.length!==o.length)return!1;for(var n=t.length,r=0; r<n; r++)if(!e.eq(t[r],o[r]))return!1;return!0}))},a=function(e){return o((function(t, a){var s=Object.keys(t),i=Object.keys(a);if(!function(e, t){return function(e, t){return o((function(o, n){return e.eq(t(o),t(n))}))}(r(e),(function(e){return function(e, t){return Array.prototype.slice.call(e).sort(t)}(e,t)}))}(n).eq(s,i))return!1;for(var l=s.length,c=0; c<l; c++){var d=s[c];if(!e.eq(t[d],a[d]))return!1}return!0}))},s=o((function(e, o){if(e===o)return!0;var n=t(e);return n===t(o)&&(function(e){return-1!==["undefined","boolean","number","string","function","xml","null"].indexOf(e)}(n)?e===o:"array"===n?r(s).eq(e,o):"object"===n&&a(s).eq(e,o))}));const i=Object.getPrototypeOf,l=(e, t, o)=>{var n;return!!o(e,t.prototype)||(null===(n=e.constructor)||void 0===n?void 0:n.name)===t.name},c= e=> t=>(e=>{const t=typeof e;return null===e?"null":"object"===t&&Array.isArray(e)?"array":"object"===t&&l(e,String,((e, t)=>t.isPrototypeOf(e)))?"string":t})(t)===e,d= e=> t=>typeof t===e,u= e=> t=>e===t,m=(e, t)=>p(e)&&l(e,t,((e, t)=>i(e)===t)),g=c("string"),p=c("object"),h= e=>m(e,Object),f=c("array"),y=u(null),b=d("boolean"),v=u(void 0),k= e=>null==e,w= e=>!k(e),_=d("function"),x=d("number"),C=(e, t)=>{if(f(e)){for(let o=0,n=e.length; o<n; ++o)if(!t(e[o]))return!1;return!0}return!1},S=()=>{},z=(e, t)=>(...o)=>e(t.apply(null,o)),O=(e, t)=> o=>e(t(o)),T= e=>()=>e,E= e=>e,A=(e, t)=>e===t;function M(e, ...t){return(...o)=>{const n=t.concat(o);return e.apply(null,n)}}const N= e=> t=>!e(t),R= e=>()=>{throw new Error(e)},D= e=>e(),B= e=>{e()},L=T(!1),I=T(!0);class H{constructor(e, t){this.tag=e,this.value=t}static some(e){return new H(!0,e)}static none(){return H.singletonNone}fold(e, t){return this.tag?t(this.value):e()}isSome(){return this.tag}isNone(){return!this.tag}map(e){return this.tag?H.some(e(this.value)):H.none()}bind(e){return this.tag?e(this.value):H.none()}exists(e){return this.tag&&e(this.value)}forall(e){return!this.tag||e(this.value)}filter(e){return!this.tag||e(this.value)?this:H.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)return this.value;throw new Error(null!=e?e:"Called getOrDie on None")}static from(e){return w(e)?H.some(e):H.none()}getOrNull(){return this.tag?this.value:null}getOrUndefined(){return this.value}each(e){this.tag&&e(this.value)}toArray(){return this.tag?[this.value]:[]}toString(){return this.tag?`some(${this.value})`:"none()"}}H.singletonNone=new H(!1);const P=Array.prototype.slice,F=Array.prototype.indexOf,j=Array.prototype.push,V=(e, t)=>F.call(e,t),Z=(e, t)=>V(e,t)>-1,U=(e, t)=>{for(let o=0,n=e.length; o<n; o++)if(t(e[o],o))return!0;return!1},q=(e, t)=>{const o=e.length,n=new Array(o);for(let r=0; r<o; r++){const o=e[r];n[r]=t(o,r)}return n},W=(e, t)=>{for(let o=0,n=e.length; o<n; o++)t(e[o],o)},$=(e, t)=>{for(let o=e.length-1; o>=0; o--)t(e[o],o)},G=(e, t)=>{const o=[],n=[];for(let r=0,a=e.length; r<a; r++){const a=e[r];(t(a,r)?o:n).push(a)}return{pass:o,fail:n}},K=(e, t)=>{const o=[];for(let n=0,r=e.length; n<r; n++){const r=e[n];t(r,n)&&o.push(r)}return o},Y=(e, t, o)=>($(e,((e, n)=>{o=t(o,e,n)})),o),X=(e, t, o)=>(W(e,((e, n)=>{o=t(o,e,n)})),o),J=(e, t, o)=>{for(let n=0,r=e.length; n<r; n++){const r=e[n];if(t(r,n))return H.some(r);if(o(r,n))break}return H.none()},Q=(e, t)=>J(e,t,L),ee=(e, t)=>{for(let o=0,n=e.length; o<n; o++)if(t(e[o],o))return H.some(o);return H.none()},te= e=>{const t=[];for(let o=0,n=e.length; o<n; ++o){if(!f(e[o]))throw new Error("Arr.flatten item "+o+" was not an array, input: "+e);j.apply(t,e[o])}return t},oe=(e, t)=>te(q(e,t)),ne=(e, t)=>{for(let o=0,n=e.length; o<n; ++o)if(!0!==t(e[o],o))return!1;return!0},re= e=>{const t=P.call(e,0);return t.reverse(),t},ae=(e, t)=>K(e,(e=>!Z(t,e))),se=(e, t)=>{const o={};for(let n=0,r=e.length; n<r; n++){const r=e[n];o[String(r)]=t(r,n)}return o},ie=(e, t)=>{const o=P.call(e,0);return o.sort(t),o},le=(e, t)=>t>=0&&t<e.length?H.some(e[t]):H.none(),ce= e=>le(e,0),de= e=>le(e,e.length-1),ue=_(Array.from)?Array.from: e=>P.call(e),me=(e, t)=>{for(let o=0; o<e.length; o++){const n=t(e[o],o);if(n.isSome())return n}return H.none()},ge=Object.keys,pe=Object.hasOwnProperty,he=(e, t)=>{const o=ge(e);for(let n=0,r=o.length; n<r; n++){const r=o[n];t(e[r],r)}},fe=(e, t)=>ye(e,((e, o)=>({k:o,v:t(e,o)}))),ye=(e, t)=>{const o={};return he(e,((e, n)=>{const r=t(e,n);o[r.k]=r.v})),o},be= e=>(t, o)=>{e[o]=t},ve=(e, t, o, n)=>{he(e,((e, r)=>{(t(e,r)?o:n)(e,r)}))},ke=(e, t)=>{const o={};return ve(e,t,be(o),S),o},we=(e, t)=>{const o=[];return he(e,((e, n)=>{o.push(t(e,n))})),o},_e= e=>we(e,E),xe=(e, t)=>Ce(e,t)?H.from(e[t]):H.none(),Ce=(e, t)=>pe.call(e,t),Se=(e, t)=>Ce(e,t)&&void 0!==e[t]&&null!==e[t],ze= e=>{const t={};return W(e,(e=>{t[e]={}})),ge(t)},Oe= e=>void 0!==e.length,Te=Array.isArray,Ee=(e, t, o)=>{if(!e)return!1;if(o=o||e,Oe(e)){for(let n=0,r=e.length; n<r; n++)if(!1===t.call(o,e[n],n,e))return!1}else for(const n in e)if(Ce(e,n)&&!1===t.call(o,e[n],n,e))return!1;return!0},Ae=(e, t)=>{const o=[];return Ee(e,((n, r)=>{o.push(t(n,r,e))})),o},Me=(e, t)=>{const o=[];return Ee(e,((n, r)=>{t&&!t(n,r,e)||o.push(n)})),o},Ne=(e, t, o, n)=>{let r=v(o)?e[0]:o;for(let o=0; o<e.length; o++)r=t.call(n,r,e[o],o);return r},Re=(e, t, o)=>{for(let n=0,r=e.length; n<r; n++)if(t.call(o,e[n],n,e))return n;return-1},De= e=>e[e.length-1],Be= e=>{let t,o=!1;return(...n)=>(o||(o=!0,t=e.apply(null,n)),t)},Le=()=>Ie(0,0),Ie=(e, t)=>({major:e,minor:t}),He={nu:Ie,detect:(e, t)=>{const o=String(t).toLowerCase();return 0===e.length?Le():((e, t)=>{const o=((e, t)=>{for(let o=0; o<e.length; o++){const n=e[o];if(n.test(t))return n}})(e,t);if(!o)return{major:0,minor:0};const n= e=>Number(t.replace(o,"$"+e));return Ie(n(1),n(2))})(e,o)},unknown:Le},Pe=(e, t)=>{const o=String(t).toLowerCase();return Q(e,(e=>e.search(o)))},Fe=(e, t, o)=>""===t||e.length>=t.length&&e.substr(o,o+t.length)===t,je=(e, t)=>Ze(e,t)?((e, t)=>e.substring(t))(e,t.length):e,Ve=(e, t, o=0, n)=>{const r=e.indexOf(t,o);return-1!==r&&(!!v(n)||r+t.length<=n)},Ze=(e, t)=>Fe(e,t,0),Ue=(e, t)=>Fe(e,t,e.length-t.length),qe= e=> t=>t.replace(e,""),We=qe(/^\s+|\s+$/g),$e=qe(/^\s+/g),Ge=qe(/\s+$/g),Ke= e=>e.length>0,Ye= e=>!Ke(e),Xe=(e, t=10)=>{const o=parseInt(e,t);return isNaN(o)?H.none():H.some(o)},Je=/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,Qe= e=> t=>Ve(t,e),et=[{name:"Edge",versionRegexes:[/.*?edge\/ ?([0-9]+)\.([0-9]+)$/],search: e=>Ve(e,"edge/")&&Ve(e,"chrome")&&Ve(e,"safari")&&Ve(e,"applewebkit")},{name:"Chromium",brand:"Chromium",versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/,Je],search: e=>Ve(e,"chrome")&&!Ve(e,"chromeframe")},{name:"IE",versionRegexes:[/.*?msie\ ?([0-9]+)\.([0-9]+).*/,/.*?rv:([0-9]+)\.([0-9]+).*/],search: e=>Ve(e,"msie")||Ve(e,"trident")},{name:"Opera",versionRegexes:[Je,/.*?opera\/([0-9]+)\.([0-9]+).*/],search:Qe("opera")},{name:"Firefox",versionRegexes:[/.*?firefox\/\ ?([0-9]+)\.([0-9]+).*/],search:Qe("firefox")},{name:"Safari",versionRegexes:[Je,/.*?cpu os ([0-9]+)_([0-9]+).*/],search: e=>(Ve(e,"safari")||Ve(e,"mobile/"))&&Ve(e,"applewebkit")}],tt=[{name:"Windows",search:Qe("win"),versionRegexes:[/.*?windows\ nt\ ?([0-9]+)\.([0-9]+).*/]},{name:"iOS",search: e=>Ve(e,"iphone")||Ve(e,"ipad"),versionRegexes:[/.*?version\/\ ?([0-9]+)\.([0-9]+).*/,/.*cpu os ([0-9]+)_([0-9]+).*/,/.*cpu iphone os ([0-9]+)_([0-9]+).*/]},{name:"Android",search:Qe("android"),versionRegexes:[/.*?android\ ?([0-9]+)\.([0-9]+).*/]},{name:"macOS",search:Qe("mac os x"),versionRegexes:[/.*?mac\ os\ x\ ?([0-9]+)_([0-9]+).*/]},{name:"Linux",search:Qe("linux"),versionRegexes:[]},{name:"Solaris",search:Qe("sunos"),versionRegexes:[]},{name:"FreeBSD",search:Qe("freebsd"),versionRegexes:[]},{name:"ChromeOS",search:Qe("cros"),versionRegexes:[/.*?chrome\/([0-9]+)\.([0-9]+).*/]}],ot={browsers:T(et),oses:T(tt)},nt="Edge",rt="Chromium",at="Opera",st="Firefox",it="Safari",lt= e=>{const t=e.current,o=e.version,n= e=>()=>t===e;return{current:t,version:o,isEdge:n(nt),isChromium:n(rt),isIE:n("IE"),isOpera:n(at),isFirefox:n(st),isSafari:n(it)}},ct=()=>lt({current:void 0,version:He.unknown()}),dt=lt,ut=(T(nt),T(rt),T("IE"),T(at),T(st),T(it),"Windows"),mt="Android",gt="Linux",pt="macOS",ht="Solaris",ft="FreeBSD",yt="ChromeOS",bt= e=>{const t=e.current,o=e.version,n= e=>()=>t===e;return{current:t,version:o,isWindows:n(ut),isiOS:n("iOS"),isAndroid:n(mt),isMacOS:n(pt),isLinux:n(gt),isSolaris:n(ht),isFreeBSD:n(ft),isChromeOS:n(yt)}},vt=()=>bt({current:void 0,version:He.unknown()}),kt=bt,wt=(T(ut),T("iOS"),T(mt),T(gt),T(pt),T(ht),T(ft),T(yt), e=>window.matchMedia(e).matches);let _t=Be((()=>((e, t, o)=>{const n=ot.browsers(),r=ot.oses(),a=t.bind((e=>((e, t)=>me(t.brands,(t=>{const o=t.brand.toLowerCase();return Q(e,(e=>{var t;return o===(null===(t=e.brand)||void 0===t?void 0:t.toLowerCase())})).map((e=>({current:e.name,version:He.nu(parseInt(t.version,10),0)})))})))(n,e))).orThunk((()=>((e, t)=>Pe(e,t).map((e=>{const o=He.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(n,e))).fold(ct,dt),s=((e, t)=>Pe(e,t).map((e=>{const o=He.detect(e.versionRegexes,t);return{current:e.name,version:o}})))(r,e).fold(vt,kt),i=((e, t, o, n)=>{const r=e.isiOS()&&!0===/ipad/i.test(o),a=e.isiOS()&&!r,s=e.isiOS()||e.isAndroid(),i=s||n("(pointer:coarse)"),l=r||!a&&s&&n("(min-device-width:768px)"),c=a||s&&!l,d=t.isSafari()&&e.isiOS()&&!1===/safari/i.test(o),u=!c&&!l&&!d;return{isiPad:T(r),isiPhone:T(a),isTablet:T(l),isPhone:T(c),isTouch:T(i),isAndroid:e.isAndroid,isiOS:e.isiOS,isWebView:T(d),isDesktop:T(u)}})(s,a,e,o);return{browser:a,os:s,deviceType:i}})(navigator.userAgent,H.from(navigator.userAgentData),wt)));const xt=()=>_t(),Ct=navigator.userAgent,St=xt(),zt=St.browser,Ot=St.os,Tt=St.deviceType,Et=-1!==Ct.indexOf("Windows Phone"),At={transparentSrc:"data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",documentMode:zt.isIE()?document.documentMode||7:10,cacheSuffix:null,container:null,canHaveCSP:!zt.isIE(),windowsPhone:Et,browser:{current:zt.current,version:zt.version,isChromium:zt.isChromium,isEdge:zt.isEdge,isFirefox:zt.isFirefox,isIE:zt.isIE,isOpera:zt.isOpera,isSafari:zt.isSafari},os:{current:Ot.current,version:Ot.version,isAndroid:Ot.isAndroid,isChromeOS:Ot.isChromeOS,isFreeBSD:Ot.isFreeBSD,isiOS:Ot.isiOS,isLinux:Ot.isLinux,isMacOS:Ot.isMacOS,isSolaris:Ot.isSolaris,isWindows:Ot.isWindows},deviceType:{isDesktop:Tt.isDesktop,isiPad:Tt.isiPad,isiPhone:Tt.isiPhone,isPhone:Tt.isPhone,isTablet:Tt.isTablet,isTouch:Tt.isTouch,isWebView:Tt.isWebView}},Mt=/^\s*|\s*$/g,Nt= e=>k(e)?"":(""+e).replace(Mt,""),Rt=function(e, t, o, n){n=n||this,e&&(o&&(e=e[o]),Ee(e,((e, r)=>!1!==t.call(n,e,r,o)&&(Rt(e,t,o,n),!0))))},Dt={trim:Nt,isArray:Te,is:(e, t)=>t?!("array"!==t||!Te(e))||typeof e===t:void 0!==e,toArray: e=>{if(Te(e))return e;{const t=[];for(let o=0,n=e.length; o<n; o++)t[o]=e[o];return t}},makeMap:(e, t, o={})=>{const n=g(e)?e.split(t||","):e||[];let r=n.length;for(; r--;)o[n[r]]={};return o},each:Ee,map:Ae,grep:Me,inArray:(e, t)=>{if(e)for(let o=0,n=e.length; o<n; o++)if(e[o]===t)return o;return-1},hasOwn:Ce,extend:(e, ...t)=>{for(let o=0; o<t.length; o++){const n=t[o];for(const t in n)if(Ce(n,t)){const o=n[t];void 0!==o&&(e[t]=o)}}return e},walk:Rt,resolve:(e, t=window)=>{const o=e.split(".");for(let e=0,n=o.length; e<n&&(t=t[o[e]]); e++);return t},explode:(e, t)=>f(e)?e:""===e?[]:Ae(e.split(t||","),Nt),_addCacheSuffix: e=>{const t=At.cacheSuffix;return t&&(e+=(-1===e.indexOf("?")?"?":"&")+t),e}},Bt=(e, t, o=A)=>e.exists((e=>o(e,t))),Lt=(e, t, o)=>e.isSome()&&t.isSome()?H.some(o(e.getOrDie(),t.getOrDie())):H.none(),It=(e, t)=>e?H.some(t):H.none(),Ht="undefined"!=typeof window?window:Function("return this;")(),Pt=(e, t)=>((e, t)=>{let o=null!=t?t:Ht;for(let t=0; t<e.length&&null!=o; ++t)o=o[e[t]];return o})(e.split("."),t),Ft=Object.getPrototypeOf,jt= e=>{const t=Pt("ownerDocument.defaultView",e);return p(e)&&((e=>((e, t)=>{const o=((e, t)=>Pt(e,t))(e,t);if(null==o)throw new Error(e+" not available on this browser");return o})("HTMLElement",e))(t).prototype.isPrototypeOf(e)||/^HTML\w*Element$/.test(Ft(e).constructor.name))},Vt= e=>e.dom.nodeName.toLowerCase(),Zt= e=>e.dom.nodeType,Ut= e=> t=>Zt(t)===e,qt=Ut(1),Wt=Ut(3),$t=Ut(9),Gt=Ut(11),Kt= e=> t=>qt(t)&&Vt(t)===e,Yt=(e, t, o)=>{if(!(g(o)||b(o)||x(o)))throw console.error("Invalid call to Attribute.set. Key ",t,":: Value ",o,":: Element ",e),new Error("Attribute value was not simple");e.setAttribute(t,o+"")},Xt=(e, t, o)=>{Yt(e.dom,t,o)},Jt=(e, t)=>{const o=e.dom;he(t,((e, t)=>{Yt(o,t,e)}))},Qt=(e, t)=>{const o=e.dom.getAttribute(t);return null===o?void 0:o},eo=(e, t)=>H.from(Qt(e,t)),to=(e, t)=>{const o=e.dom;return!(!o||!o.hasAttribute)&&o.hasAttribute(t)},oo=(e, t)=>{e.dom.removeAttribute(t)},no= e=>X(e.dom.attributes,((e, t)=>(e[t.name]=t.value,e)),{}),ro=(e, t)=>{const o=Qt(e,t);return void 0===o||""===o?[]:o.split(" ")},ao= e=>void 0!==e.dom.classList,so= e=>ro(e,"class"),io=(e, t)=>((e, t, o)=>{const n=ro(e,t).concat([o]);return Xt(e,t,n.join(" ")),!0})(e,"class",t),lo=(e, t)=>((e, t, o)=>{const n=K(ro(e,t),(e=>e!==o));return n.length>0?Xt(e,t,n.join(" ")):oo(e,t),!1})(e,"class",t),co=(e, t)=>{ao(e)?e.dom.classList.add(t):io(e,t)},uo= e=>{0===(ao(e)?e.dom.classList:so(e)).length&&oo(e,"class")},mo=(e, t)=>{ao(e)?e.dom.classList.remove(t):lo(e,t),uo(e)},go=(e, t)=>ao(e)&&e.dom.classList.contains(t),po= e=>{if(null==e)throw new Error("Node cannot be null or undefined");return{dom:e}},ho=(e, t)=>{const o=(t||document).createElement("div");if(o.innerHTML=e,!o.hasChildNodes()||o.childNodes.length>1){const t="HTML does not have a single root node";throw console.error(t,e),new Error(t)}return po(o.childNodes[0])},fo=(e, t)=>{const o=(t||document).createElement(e);return po(o)},yo=(e, t)=>{const o=(t||document).createTextNode(e);return po(o)},bo=po,vo=(e, t, o)=>H.from(e.dom.elementFromPoint(t,o)).map(po),ko=(e, t)=>{const o=[],n= e=>(o.push(e),t(e));let r=t(e);do{r=r.bind(n)}while(r.isSome());return o},wo=(e, t)=>{const o=e.dom;if(1!==o.nodeType)return!1;{const e=o;if(void 0!==e.matches)return e.matches(t);if(void 0!==e.msMatchesSelector)return e.msMatchesSelector(t);if(void 0!==e.webkitMatchesSelector)return e.webkitMatchesSelector(t);if(void 0!==e.mozMatchesSelector)return e.mozMatchesSelector(t);throw new Error("Browser lacks native selectors")}},_o= e=>1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType||0===e.childElementCount,xo=(e, t)=>e.dom===t.dom,Co=(e, t)=>{const o=e.dom,n=t.dom;return o!==n&&o.contains(n)},So= e=>bo(e.dom.ownerDocument),zo= e=>$t(e)?e:So(e),Oo= e=>bo(zo(e).dom.defaultView),To= e=>H.from(e.dom.parentNode).map(bo),Eo= e=>H.from(e.dom.parentElement).map(bo),Ao=(e, t)=>{const o=_(t)?t:L;let n=e.dom;const r=[];for(; null!==n.parentNode&&void 0!==n.parentNode;){const e=n.parentNode,t=bo(e);if(r.push(t),!0===o(t))break;n=e}return r},Mo= e=>H.from(e.dom.previousSibling).map(bo),No= e=>H.from(e.dom.nextSibling).map(bo),Ro= e=>re(ko(e,Mo)),Do= e=>ko(e,No),Bo= e=>q(e.dom.childNodes,bo),Lo=(e, t)=>{const o=e.dom.childNodes;return H.from(o[t]).map(bo)},Io= e=>Lo(e,0),Ho= e=>Lo(e,e.dom.childNodes.length-1),Po= e=>e.dom.childNodes.length,Fo= e=>Gt(e)&&w(e.dom.host),jo=_(Element.prototype.attachShadow)&&_(Node.prototype.getRootNode),Vo=T(jo),Zo=jo? e=>bo(e.dom.getRootNode()):zo,Uo= e=>Fo(e)?e:(e=>{const t=e.dom.head;if(null==t)throw new Error("Head is not available yet");return bo(t)})(zo(e)),qo= e=>bo(e.dom.host),Wo= e=>{if(Vo()&&w(e.target)){const t=bo(e.target);if(qt(t)&&$o(t)&&e.composed&&e.composedPath){const t=e.composedPath();if(t)return ce(t)}}return H.from(e.target)},$o= e=>w(e.dom.shadowRoot),Go= e=>{const t=Wt(e)?e.dom.parentNode:e.dom;if(null==t||null===t.ownerDocument)return!1;const o=t.ownerDocument;return(e=>{const t=Zo(e);return Fo(t)?H.some(t):H.none()})(bo(t)).fold((()=>o.body.contains(t)),O(Go,qo))};var Ko=(e, t, o, n, r)=>e(o,n)?H.some(o):_(r)&&r(o)?H.none():t(o,n,r);const Yo=(e, t, o)=>{let n=e.dom;const r=_(o)?o:L;for(; n.parentNode;){n=n.parentNode;const e=bo(n);if(t(e))return H.some(e);if(r(e))break}return H.none()},Xo=(e, t, o)=>Ko(((e, t)=>t(e)),Yo,e,t,o),Jo=(e, t, o)=>Yo(e,(e=>wo(e,t)),o),Qo=(e, t)=>((e, t)=>{const o=void 0===t?document:t.dom;return _o(o)?H.none():H.from(o.querySelector(e)).map(bo)})(t,e),en=(e, t, o)=>Ko(((e, t)=>wo(e,t)),Jo,e,t,o),tn=(e, t=!1)=>{return Go(e)?e.dom.isContentEditable:(o=e,en(o,"[contenteditable]")).fold(T(t),(e=>"true"===on(e)));var o},on= e=>e.dom.contentEditable,nn= e=>void 0!==e.style&&_(e.style.getPropertyValue),rn=(e, t, o)=>{if(!g(o))throw console.error("Invalid call to CSS.set. Property ",t,":: Value ",o,":: Element ",e),new Error("CSS value must be a string: "+o);nn(e)&&e.style.setProperty(t,o)},an=(e, t, o)=>{const n=e.dom;rn(n,t,o)},sn=(e, t)=>{const o=e.dom;he(t,((e, t)=>{rn(o,t,e)}))},ln=(e, t)=>{const o=e.dom,n=window.getComputedStyle(o).getPropertyValue(t);return""!==n||Go(e)?n:cn(o,t)},cn=(e, t)=>nn(e)?e.style.getPropertyValue(t):"",dn=(e, t)=>{const o=e.dom,n=cn(o,t);return H.from(n).filter((e=>e.length>0))},un= e=>{const t={},o=e.dom;if(nn(o))for(let e=0; e<o.style.length; e++){const n=o.style.item(e);t[n]=o.style[n]}return t},mn=(e, t)=>{((e, t)=>{nn(e)&&e.style.removeProperty(t)})(e.dom,t),Bt(eo(e,"style").map(We),"")&&oo(e,"style")},gn=(e, t)=>{To(e).each((o=>{o.dom.insertBefore(t.dom,e.dom)}))},pn=(e, t)=>{No(e).fold((()=>{To(e).each((e=>{fn(e,t)}))}),(e=>{gn(e,t)}))},hn=(e, t)=>{Io(e).fold((()=>{fn(e,t)}),(o=>{e.dom.insertBefore(t.dom,o.dom)}))},fn=(e, t)=>{e.dom.appendChild(t.dom)},yn=(e, t)=>{gn(e,t),fn(t,e)},bn=(e, t)=>{W(t,(t=>{fn(e,t)}))},vn= e=>{e.dom.textContent="",W(Bo(e),(e=>{kn(e)}))},kn= e=>{const t=e.dom;null!==t.parentNode&&t.parentNode.removeChild(t)},wn= e=>{const t=Bo(e);var o,n;t.length>0&&(o=e,W(n=t,((e, t)=>{const r=0===t?o:n[t-1];pn(r,e)}))),kn(e)},_n= e=>q(e,bo),xn= e=>e.dom.innerHTML,Cn=(e, t)=>{const o=So(e).dom,n=bo(o.createDocumentFragment()),r=((e, t)=>{const o=(t||document).createElement("div");return o.innerHTML=e,Bo(bo(o))})(t,o);bn(n,r),vn(e),fn(e,n)},Sn=(e, t, o, n)=>((e, t, o, n, r)=>{const a=((e, t)=> o=>{e(o)&&t((e=>{const t=bo(Wo(e).getOr(e.target)),o=()=>e.stopPropagation(),n=()=>e.preventDefault(),r=z(n,o);return((e, t, o, n, r, a, s)=>({target:e,x:t,y:o,stop:n,prevent:r,kill:a,raw:s}))(t,e.clientX,e.clientY,o,n,r,e)})(o))})(o,n);return e.dom.addEventListener(t,a,false),{unbind:M(zn,e,t,a,false)}})(e,t,o,n),zn=(e, t, o, n)=>{e.dom.removeEventListener(t,o,n)},On=(e, t)=>({left:e,top:t,translate:(o, n)=>On(e+o,t+n)}),Tn=On,En=(e, t)=>void 0!==e?e:void 0!==t?t:0,An= e=>{const t=e.dom,o=t.ownerDocument.body;return o===t?Tn(o.offsetLeft,o.offsetTop):Go(e)?(e=>{const t=e.getBoundingClientRect();return Tn(t.left,t.top)})(t):Tn(0,0)},Mn= e=>{const t=void 0!==e?e.dom:document,o=t.body.scrollLeft||t.documentElement.scrollLeft,n=t.body.scrollTop||t.documentElement.scrollTop;return Tn(o,n)},Nn=(e, t)=>{xt().browser.isSafari()&&_(e.dom.scrollIntoViewIfNeeded)?e.dom.scrollIntoViewIfNeeded(!1):e.dom.scrollIntoView(t)},Rn=(e, t, o, n)=>({x:e,y:t,width:o,height:n,right:e+o,bottom:t+n}),Dn= e=>{const t=void 0===e?window:e,o=t.document,n=Mn(bo(o));return(e=>{const t=void 0===e?window:e;return xt().browser.isFirefox()?H.none():H.from(t.visualViewport)})(t).fold((()=>{const e=t.document.documentElement,o=e.clientWidth,r=e.clientHeight;return Rn(n.left,n.top,o,r)}),(e=>Rn(Math.max(e.pageLeft,n.left),Math.max(e.pageTop,n.top),e.width,e.height)))},Bn=(e, t)=>{let o=[];return W(Bo(e),(e=>{t(e)&&(o=o.concat([e])),o=o.concat(Bn(e,t))})),o},Ln=(e, t)=>((e, t)=>{const o=void 0===t?document:t.dom;return _o(o)?[]:q(o.querySelectorAll(e),bo)})(t,e),In=(e, t, o)=>Jo(e,t,o).isSome();class Hn{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){return this.node=this.findSibling(this.node,"firstChild","nextSibling",e),this.node}prev(e){return this.node=this.findSibling(this.node,"lastChild","previousSibling",e),this.node}prev2(e){return this.node=this.findPreviousNode(this.node,e),this.node}findSibling(e, t, o, n){if(e){if(!n&&e[t])return e[t];if(e!==this.rootNode){let t=e[o];if(t)return t;for(let n=e.parentNode; n&&n!==this.rootNode; n=n.parentNode)if(t=n[o],t)return t}}}findPreviousNode(e, t){if(e){const o=e.previousSibling;if(this.rootNode&&o===this.rootNode)return;if(o){if(!t)for(let e=o.lastChild; e; e=e.lastChild)if(!e.lastChild)return e;return o}const n=e.parentNode;if(n&&n!==this.rootNode)return n}}}const Pn= e=> t=>!!t&&t.nodeType===e,Fn= e=>!!e&&!Object.getPrototypeOf(e),jn=Pn(1),Vn= e=>{const t=e.toLowerCase();return e=>w(e)&&e.nodeName.toLowerCase()===t},Zn= e=>{const t=e.map((e=>e.toLowerCase()));return e=>{if(e&&e.nodeName){const o=e.nodeName.toLowerCase();return Z(t,o)}return!1}},Un=(e, t)=>{const o=t.toLowerCase().split(" ");return t=>{if(jn(t)){const n=t.ownerDocument.defaultView;if(n)for(let r=0; r<o.length; r++){const a=n.getComputedStyle(t,null);if((a?a.getPropertyValue(e):null)===o[r])return!0}}return!1}},qn= e=> t=>jn(t)&&t.hasAttribute(e),Wn= e=>jn(e)&&e.hasAttribute("data-mce-bogus"),$n= e=>jn(e)&&"TABLE"===e.tagName,Gn= e=> t=>{if(jn(t)){if(t.contentEditable===e)return!0;if(t.getAttribute("data-mce-contenteditable")===e)return!0}return!1},Kn=Zn(["textarea","input"]),Yn=Pn(3),Xn=Pn(4),Jn=Pn(7),Qn=Pn(8),er=Pn(9),tr=Pn(11),or=Vn("br"),nr=Vn("img"),rr=Gn("true"),ar=Gn("false"),sr=Zn(["td","th"]),ir=Zn(["td","th","caption"]),lr=Zn(["video","audio","object","embed"]),cr=Vn("li"),dr="\ufeff",ur=" ",mr= e=>e===dr,gr=((e, t)=>{const o= t=>e(t)?H.from(t.dom.nodeValue):H.none();return{get: t=>{if(!e(t))throw new Error("Can only get text value of a text node");return o(t).getOr("")},getOption:o,set:(t, o)=>{if(!e(t))throw new Error("Can only set raw text value of a text node");t.dom.nodeValue=o}}})(Wt),pr= e=>gr.get(e),hr= e=>gr.getOption(e),fr=["pre"].concat(["h1","h2","h3","h4","h5","h6"]),yr= e=>{let t;return o=>(t=t||se(e,I),Ce(t,Vt(o)))},br=yr(["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"]),vr= e=>qt(e)&&!br(e),kr= e=>qt(e)&&"br"===Vt(e),wr=yr(["h1","h2","h3","h4","h5","h6","p","div","address","pre","form","blockquote","center","dir","fieldset","header","footer","article","section","hgroup","aside","nav","figure"]),_r=yr(["ul","ol","dl"]),xr=yr(["li","dd","dt"]),Cr=yr(["thead","tbody","tfoot"]),Sr=yr(["td","th"]),zr=yr(["pre","script","textarea","style"]),Or=yr(fr),Tr= e=>Or(e)||vr(e),Er=()=>{const e=fo("br");return Xt(e,"data-mce-bogus","1"),e},Ar= e=>{vn(e),fn(e,Er())},Mr= e=>{Ho(e).each((t=>{Mo(t).each((o=>{br(e)&&kr(t)&&br(o)&&kn(t)}))}))},Nr=dr,Rr=mr,Dr= e=>e.replace(/\uFEFF/g,""),Br=jn,Lr=Yn,Ir= e=>(Lr(e)&&(e=e.parentNode),Br(e)&&e.hasAttribute("data-mce-caret")),Hr= e=>Lr(e)&&Rr(e.data),Pr= e=>Ir(e)||Hr(e),Fr= e=>e.firstChild!==e.lastChild||!or(e.firstChild),jr= e=>{const t=e.container();return!!Yn(t)&&(t.data.charAt(e.offset())===Nr||e.isAtStart()&&Hr(t.previousSibling))},Vr= e=>{const t=e.container();return!!Yn(t)&&(t.data.charAt(e.offset()-1)===Nr||e.isAtEnd()&&Hr(t.nextSibling))},Zr= e=>Lr(e)&&e.data[0]===Nr,Ur= e=>Lr(e)&&e.data[e.data.length-1]===Nr,qr= e=>e&&e.hasAttribute("data-mce-caret")?((e=>{var t;const o=e.getElementsByTagName("br"),n=o[o.length-1];Wn(n)&&(null===(t=n.parentNode)||void 0===t||t.removeChild(n))})(e),e.removeAttribute("data-mce-caret"),e.removeAttribute("data-mce-bogus"),e.removeAttribute("style"),e.removeAttribute("data-mce-style"),e.removeAttribute("_moz_abspos"),e):null,Wr= e=>Ir(e.startContainer),$r=rr,Gr=ar,Kr=or,Yr=Yn,Xr=Zn(["script","style","textarea"]),Jr=Zn(["img","input","textarea","hr","iframe","video","audio","object","embed"]),Qr=Zn(["table"]),ea=Pr,ta= e=>!ea(e)&&(Yr(e)?!Xr(e.parentNode):Jr(e)||Kr(e)||Qr(e)||oa(e)),oa= e=>!(e=>jn(e)&&"true"===e.getAttribute("unselectable"))(e)&&Gr(e),na=(e, t)=>ta(e)&&((e, t)=>{for(let o=e.parentNode; o&&o!==t; o=o.parentNode){if(oa(o))return!1;if($r(o))return!0}return!0})(e,t),ra=/^[ \t\r\n]*$/,aa= e=>ra.test(e),sa= e=>"\n"===e||"\r"===e,ia=(e, t=4, o=!0, n=!0)=>{const r=((e, t)=>t<=0?"":new Array(t+1).join(" "))(0,t),a=e.replace(/\t/g,r),s=X(a,((e, t)=>(e=>-1!==" \f\t\v".indexOf(e))(t)||t===ur?e.pcIsSpace||""===e.str&&o||e.str.length===a.length-1&&n||((e, t)=>t<e.length&&t>=0&&sa(e[t]))(a,e.str.length+1)?{pcIsSpace:!1,str:e.str+ur}:{pcIsSpace:!0,str:e.str+" "}:{pcIsSpace:sa(t),str:e.str+t}),{pcIsSpace:!1,str:""});return s.str},la=(e, t)=>ta(e)&&!((e, t)=>Yn(e)&&aa(e.data)&&!((e, t)=>{const o=bo(t),n=bo(e);return In(n,"pre,code",M(xo,o))})(e,t))(e,t)||(e=>jn(e)&&"A"===e.nodeName&&!e.hasAttribute("href")&&(e.hasAttribute("name")||e.hasAttribute("id")))(e)||ca(e),ca=qn("data-mce-bookmark"),da=qn("data-mce-bogus"),ua=("data-mce-bogus","all", e=>jn(e)&&"all"===e.getAttribute("data-mce-bogus"));const ma=(e, t=!0)=>((e, t)=>{let o=0;if(la(e,e))return!1;{let n=e.firstChild;if(!n)return!0;const r=new Hn(n,e);do{if(t){if(ua(n)){n=r.next(!0);continue}if(da(n)){n=r.next();continue}}if(or(n))o++,n=r.next();else{if(la(n,e))return!1;n=r.next()}}while(n);return o<=1}})(e.dom,t),ga="data-mce-block",pa= e=>(e=>K(ge(e),(e=>!/[A-Z]/.test(e))))(e).join(","),ha=(e, t)=>w(t.querySelector(e))?(t.setAttribute(ga,"true"),"inline-boundary"===t.getAttribute("data-mce-selected")&&t.removeAttribute("data-mce-selected"),!0):(t.removeAttribute(ga),!1),fa=(e, t)=>{const o=pa(e.getTransparentElements()),n=pa(e.getBlockElements());return K(t.querySelectorAll(o),(e=>ha(n,e)))},ya=(e, t)=>{var o;const n=t?"lastChild":"firstChild";for(let t=e[n]; t; t=t[n])if(ma(bo(t)))return void(null===(o=t.parentNode)||void 0===o||o.removeChild(t))},ba=(e, t, o)=>{const n=e.getBlockElements(),r=bo(t),a= e=>Vt(e)in n,s= e=>xo(e,r);W(_n(o),(t=>{Yo(t,a,s).each((o=>{const n=((t, n)=>K(Bo(t),(t=>a(t)&&!e.isValidChild(Vt(o),Vt(t)))))(t);if(n.length>0){const t=Eo(o);W(n,(e=>{Yo(e,a,s).each((t=>{((e, t)=>{const o=document.createRange(),n=e.parentNode;if(n){o.setStartBefore(e),o.setEndBefore(t);const r=o.extractContents();ya(r,!0),o.setStartAfter(t),o.setEndAfter(e);const a=o.extractContents();ya(a,!1),ma(bo(r))||n.insertBefore(r,e),ma(bo(t))||n.insertBefore(t,e),ma(bo(a))||n.insertBefore(a,e),n.removeChild(e)}})(t.dom,e.dom)}))})),t.each((t=>fa(e,t.dom)))}}))}))},va=(e, t)=>{const o=fa(e,t);ba(e,t,o),((e, t, o)=>{W([...o,...Ca(e,t)?[t]:[]],(t=>W(Ln(bo(t),t.nodeName.toLowerCase()),(t=>{Sa(e,t.dom)&&wn(t)}))))})(e,t,o)},ka=(e, t)=>{if(xa(e,t)){const o=pa(e.getBlockElements());ha(o,t)}},wa= e=>e.hasAttribute(ga),_a=(e, t)=>Ce(e.getTransparentElements(),t),xa=(e, t)=>jn(t)&&_a(e,t.nodeName),Ca=(e, t)=>xa(e,t)&&wa(t),Sa=(e, t)=>xa(e,t)&&!wa(t),za=(e, t)=>1===t.type&&_a(e,t.name)&&v(t.attr(ga)),Oa=xt().browser,Ta= e=>Q(e,qt),Ea=(e, t)=>e.children&&Z(e.children,t),Aa=(e, t={})=>{let o=0;const n={},r=bo(e),a=zo(r),s= e=>new Promise(((s, i)=>{let l;const c=Dt._addCacheSuffix(e),d=(e=>xe(n,e).getOrThunk((()=>({id:"mce-u"+o++,passed:[],failed:[],count:0}))))(c);n[c]=d,d.count++;const u=(e, t)=>{W(e,B),d.status=t,d.passed=[],d.failed=[],l&&(l.onload=null,l.onerror=null,l=null)},m=()=>u(d.passed,2),g=()=>u(d.failed,3);if(s&&d.passed.push(s),i&&d.failed.push(i),1===d.status)return;if(2===d.status)return void m();if(3===d.status)return void g();d.status=1;const p=fo("link",a.dom);var h;Jt(p,{rel:"stylesheet",type:"text/css",id:d.id}),t.contentCssCors&&Xt(p,"crossOrigin","anonymous"),t.referrerPolicy&&Xt(p,"referrerpolicy",t.referrerPolicy),l=p.dom,l.onload=m,l.onerror=g,h=p,fn(Uo(r),h),Xt(p,"href",c)})),i= e=>{const t=Dt._addCacheSuffix(e);xe(n,t).each((e=>{0==--e.count&&(delete n[t],(e=>{const t=Uo(r);Qo(t,"#"+e).each(kn)})(e.id))}))};return{load:s,loadAll: e=>Promise.allSettled(q(e,(e=>s(e).then(T(e))))).then((e=>{const t=G(e,(e=>"fulfilled"===e.status));return t.fail.length>0?Promise.reject(q(t.fail,(e=>e.reason))):q(t.pass,(e=>e.value))})),unload:i,unloadAll: e=>{W(e,(e=>{i(e)}))},_setReferrerPolicy: e=>{t.referrerPolicy=e},_setContentCssCors: e=>{t.contentCssCors=e}}},Ma=(()=>{const e=new WeakMap;return{forElement:(t, o)=>{const n=Zo(t).dom;return H.from(e.get(n)).getOrThunk((()=>{const t=Aa(n,o);return e.set(n,t),t}))}}})(),Na=(e, t)=>w(e)&&(la(e,t)||vr(bo(e))),Ra= e=>(e=>"span"===e.nodeName.toLowerCase())(e)&&"bookmark"===e.getAttribute("data-mce-type"),Da=(e, t, o)=>{var n;const r=o||t;if(jn(t)&&Ra(t))return t;const a=t.childNodes;for(let t=a.length-1; t>=0; t--)Da(e,a[t],r);if(jn(t)){const e=t.childNodes;1===e.length&&Ra(e[0])&&(null===(n=t.parentNode)||void 0===n||n.insertBefore(e[0],t))}return(e=>tr(e)||er(e))(t)||la(t,r)||(e=>!!jn(e)&&e.childNodes.length>0)(t)||((e, t)=>Yn(e)&&e.data.length>0&&((e, t)=>{const o=new Hn(e,t).prev(!1),n=new Hn(e,t).next(!1),r=v(o)||Na(o,t),a=v(n)||Na(n,t);return r&&a})(e,t))(t,r)||e.remove(t),t},Ba=Dt.makeMap,La=/[&<>\"\u0060\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ia=/[<>&\u007E-\uD7FF\uE000-\uFFEF]|[\uD800-\uDBFF][\uDC00-\uDFFF]/g,Ha=/[<>&\"\']/g,Pa=/&#([a-z0-9]+);?|&([a-z0-9]+);/gi,Fa={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:"Ÿ"},ja={'"':"&quot;","'":"&#39;","<":"&lt;",">":"&gt;","&":"&amp;","`":"&#96;"},Va={"&lt;":"<","&gt;":">","&amp;":"&","&quot;":'"',"&apos;":"'"},Za=(e, t)=>{const o={};if(e){const n=e.split(",");t=t||10;for(let e=0; e<n.length; e+=2){const r=String.fromCharCode(parseInt(n[e],t));if(!ja[r]){const t="&"+n[e+1]+";";o[r]=t,o[t]=r}}return o}},Ua=Za("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),qa=(e, t)=>e.replace(t?La:Ia,(e=>ja[e]||e)),Wa=(e, t)=>e.replace(t?La:Ia,(e=>e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":ja[e]||"&#"+e.charCodeAt(0)+";")),$a=(e, t, o)=>{const n=o||Ua;return e.replace(t?La:Ia,(e=>ja[e]||n[e]||e))},Ga={encodeRaw:qa,encodeAllRaw: e=>(""+e).replace(Ha,(e=>ja[e]||e)),encodeNumeric:Wa,encodeNamed:$a,getEncodeFunc:(e, t)=>{const o=Za(t)||Ua,n=Ba(e.replace(/\+/g,","));return n.named&&n.numeric?(e, t)=>e.replace(t?La:Ia,(e=>void 0!==ja[e]?ja[e]:void 0!==o[e]?o[e]:e.length>1?"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";":"&#"+e.charCodeAt(0)+";")):n.named?t?(e, t)=>$a(e,t,o):$a:n.numeric?Wa:qa},decode: e=>e.replace(Pa,((e, t)=>t?(t="x"===t.charAt(0).toLowerCase()?parseInt(t.substr(1),16):parseInt(t,10))>65535?(t-=65536,String.fromCharCode(55296+(t>>10),56320+(1023&t))):Fa[t]||String.fromCharCode(t):Va[e]||Ua[e]||(e=>{const t=fo("div").dom;return t.innerHTML=e,t.textContent||t.innerText||e})(e)))},Ka={},Ya={},Xa={},Ja=Dt.makeMap,Qa=Dt.each,es=Dt.extend,ts=Dt.explode,os=Dt.inArray,ns=(e, t)=>(e=Dt.trim(e))?e.split(t||" "):[],rs=(e, t={})=>{const o=Ja(e," ",Ja(e.toUpperCase()," "));return es(o,t)},as= e=>rs("td th li dt dd figcaption caption details summary",e.getTextBlockElements()),ss=(e, t)=>{if(e){const o={};return g(e)&&(e={"*":e}),Qa(e,((e, n)=>{o[n]=o[n.toUpperCase()]="map"===t?Ja(e,/[, ]/):ts(e,/[, ]/)})),o}},is=(e={})=>{var t;const o={},n={};let r=[];const a={},s={},i=(t, o, n)=>{const r=e[t];if(r)return Ja(r,/[, ]/,Ja(r.toUpperCase(),/[, ]/));{let e=Ya[t];return e||(e=rs(o,n),Ya[t]=e),e}},l=null!==(t=e.schema)&&void 0!==t?t:"html5",c=(e=>{const t={};let o,n,r,a;const s=(e, n="", r="")=>{const a=ns(r),s=ns(e);let i=s.length;for(; i--;){const e=ns([o,n].join(" "));t[s[i]]={attributes:se(e,(()=>({}))),attributesOrder:e,children:se(a,T(Xa))}}},i=(e, o)=>{const n=ns(e),r=ns(o);let a=n.length;for(; a--;){const e=t[n[a]];for(let t=0,o=r.length; t<o; t++)e.attributes[r[t]]={},e.attributesOrder.push(r[t])}};if(Ka[e])return Ka[e];if(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",r="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","html4"!==e&&(o+=" contenteditable contextmenu draggable dropzone hidden spellcheck translate",n+=" article aside details dialog figure main header footer hgroup section nav a ins del canvas map",r+=" audio canvas command datalist mark meter output picture progress time wbr video ruby bdi keygen"),"html5-strict"!==e){o+=" xml:lang";const e="acronym applet basefont big font strike tt";r=[r,e].join(" "),Qa(ns(e),(e=>{s(e,"",r)}));const t="center dir isindex noframes";n=[n,t].join(" "),a=[n,r].join(" "),Qa(ns(t),(e=>{s(e,"",a)}))}return a=a||[n,r].join(" "),s("html","manifest","head body"),s("head","","base command link meta noscript script style title"),s("title hr noscript br"),s("base","href target"),s("link","href rel media hreflang type sizes hreflang"),s("meta","name http-equiv content charset"),s("style","media type scoped"),s("script","src async defer type charset"),s("body","onafterprint onbeforeprint onbeforeunload onblur onerror onfocus onhashchange onload onmessage onoffline ononline onpagehide onpageshow onpopstate onresize onscroll onstorage onunload",a),s("address dt dd div caption","",a),s("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","",r),s("blockquote","cite",a),s("ol","reversed start type","li"),s("ul","","li"),s("li","value",a),s("dl","","dt dd"),s("a","href target rel media hreflang type",a),s("q","cite",r),s("ins del","cite datetime",a),s("img","src sizes srcset alt usemap ismap width height"),s("iframe","src name width height",a),s("embed","src type width height"),s("object","data type typemustmatch name usemap form width height",[a,"param"].join(" ")),s("param","name value"),s("map","name",[a,"area"].join(" ")),s("area","alt coords shape href target rel media hreflang type"),s("table","border","caption colgroup thead tfoot tbody tr"+("html4"===e?" col":"")),s("colgroup","span","col"),s("col","span"),s("tbody thead tfoot","","tr"),s("tr","","td th"),s("td","colspan rowspan headers",a),s("th","colspan rowspan headers scope abbr",a),s("form","accept-charset action autocomplete enctype method name novalidate target",a),s("fieldset","disabled form name",[a,"legend"].join(" ")),s("label","form for",r),s("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"),s("button","disabled form formaction formenctype formmethod formnovalidate formtarget name type value","html4"===e?a:r),s("select","disabled form multiple name required size","option optgroup"),s("optgroup","disabled label","option"),s("option","disabled label selected value"),s("textarea","cols dirname disabled form maxlength name readonly required rows wrap"),s("menu","type label",[a,"li"].join(" ")),s("noscript","",a),"html4"!==e&&(s("wbr"),s("ruby","",[r,"rt rp"].join(" ")),s("figcaption","",a),s("mark rt rp summary bdi","",r),s("canvas","width height",a),s("video","src crossorigin poster preload autoplay mediagroup loop muted controls width height buffered",[a,"track source"].join(" ")),s("audio","src crossorigin preload autoplay mediagroup loop muted controls buffered volume",[a,"track source"].join(" ")),s("picture","","img source"),s("source","src srcset type media sizes"),s("track","kind src srclang label default"),s("datalist","",[r,"option"].join(" ")),s("article section nav aside main header footer","",a),s("hgroup","","h1 h2 h3 h4 h5 h6"),s("figure","",[a,"figcaption"].join(" ")),s("time","datetime",r),s("dialog","open",a),s("command","type label icon disabled checked radiogroup command"),s("output","for form name",r),s("progress","value max",r),s("meter","value min max low high optimum",r),s("details","open",[a,"summary"].join(" ")),s("keygen","autofocus challenge disabled form keytype name")),"html5-strict"!==e&&(i("script","language xml:space"),i("style","xml:space"),i("object","declare classid code codebase codetype archive standby align border hspace vspace"),i("embed","align name hspace vspace"),i("param","valuetype type"),i("a","charset name rev shape coords"),i("br","clear"),i("applet","codebase archive code object alt name width height align hspace vspace"),i("img","name longdesc align border hspace vspace"),i("iframe","longdesc frameborder marginwidth marginheight scrolling align"),i("font basefont","size color face"),i("input","usemap align"),i("select"),i("textarea"),i("h1 h2 h3 h4 h5 h6 div p legend caption","align"),i("ul","type compact"),i("li","type"),i("ol dl menu dir","compact"),i("pre","width xml:space"),i("hr","align noshade size width"),i("isindex","prompt"),i("table","summary width frame rules cellspacing cellpadding align bgcolor"),i("col","width align char charoff valign"),i("colgroup","width align char charoff valign"),i("thead","align char charoff valign"),i("tr","align char charoff valign bgcolor"),i("th","axis align char charoff valign nowrap bgcolor width height"),i("form","accept"),i("td","abbr axis scope align char charoff valign nowrap bgcolor width height"),i("tfoot","align char charoff valign"),i("tbody","align char charoff valign"),i("area","nohref"),i("body","background bgcolor text link vlink alink")),"html4"!==e&&(i("input button select textarea","autofocus"),i("input textarea","placeholder"),i("a","download"),i("link script img","crossorigin"),i("img","loading"),i("iframe","sandbox seamless allow allowfullscreen loading")),"html4"!==e&&W([t.video,t.audio],(e=>{delete e.children.audio,delete e.children.video})),Qa(ns("a form meter progress dfn"),(e=>{t[e]&&delete t[e].children[e]})),delete t.caption.children.table,delete t.script,Ka[e]=t,t})(l);!1===e.verify_html&&(e.valid_elements="*[*]");const d=ss(e.valid_styles),u=ss(e.invalid_styles,"map"),m=ss(e.valid_classes,"map"),g=i("whitespace_elements","pre script noscript style textarea video audio iframe object code"),p=i("self_closing_elements","colgroup dd dt li option p td tfoot th thead tr"),h=i("void_elements","area base basefont br col frame hr img input isindex link meta param embed source wbr track"),f=i("boolean_attributes","checked compact declare defer disabled ismap multiple nohref noresize noshade nowrap readonly selected autoplay loop controls allowfullscreen"),y="td th iframe video audio object script code",b=i("non_empty_elements",y+" pre",h),v=i("move_caret_before_on_enter_elements",y+" table",h),k=i("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"),w=i("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),_=i("text_inline_elements","span strong b em i font s strike u var cite dfn code mark q sup sub samp"),x=i("transparent_elements","a ins del canvas map");Qa("script noscript iframe noframes noembed title style textarea xmp plaintext".split(" "),(e=>{s[e]=new RegExp("</"+e+"[^>]*>","gi")}));const C= e=>new RegExp("^"+e.replace(/([?+*])/g,".$1")+"$"),S= e=>{const t=/^([#+\-])?([^\[!\/]+)(?:\/([^\[!]+))?(?:(!?)\[([^\]]+)])?$/,n=/^([!\-])?(\w+[\\:]:\w+|[^=~<]+)?(?:([=~<])(.*))?$/,a=/[*?+]/;if(e){const s=ns(e,",");let i,l;o["@"]&&(i=o["@"].attributes,l=o["@"].attributesOrder);for(let e=0,c=s.length; e<c; e++){let c=t.exec(s[e]);if(c){const e=c[1],t=c[2],s=c[3],d=c[5],u={},m=[],g={attributes:u,attributesOrder:m};if("#"===e&&(g.paddEmpty=!0),"-"===e&&(g.removeEmpty=!0),"!"===c[4]&&(g.removeEmptyAttrs=!0),i&&(he(i,((e, t)=>{u[t]=e})),l&&m.push(...l)),d){const e=ns(d,"|");for(let t=0,o=e.length; t<o; t++)if(c=n.exec(e[t]),c){const e={},t=c[1],o=c[2].replace(/[\\:]:/g,":"),n=c[3],r=c[4];if("!"===t&&(g.attributesRequired=g.attributesRequired||[],g.attributesRequired.push(o),e.required=!0),"-"===t){delete u[o],m.splice(os(m,o),1);continue}if(n&&("="===n&&(g.attributesDefault=g.attributesDefault||[],g.attributesDefault.push({name:o,value:r}),e.defaultValue=r),"~"===n&&(g.attributesForced=g.attributesForced||[],g.attributesForced.push({name:o,value:r}),e.forcedValue=r),"<"===n&&(e.validValues=Ja(r,"?"))),a.test(o)){const t=e;g.attributePatterns=g.attributePatterns||[],t.pattern=C(o),g.attributePatterns.push(t)}else u[o]||m.push(o),u[o]=e}}if(i||"@"!==t||(i=u,l=m),s&&(g.outputName=t,o[s]=g),a.test(t)){const e=g;e.pattern=C(t),r.push(e)}else o[t]=g}}}},z= e=>{r=[],W(ge(o),(e=>{delete o[e]})),S(e),Qa(c,((e, t)=>{n[t]=e.children}))},O= e=>{const t=/^(~)?(.+)$/;e&&(delete Ya.text_block_elements,delete Ya.block_elements,Qa(ns(e,","),(e=>{const r=t.exec(e);if(r){const e="~"===r[1],t=e?"span":"div",s=r[2];if(n[s]=n[t],a[s]=t,b[s.toUpperCase()]={},b[s]={},e||(w[s.toUpperCase()]={},w[s]={}),!o[s]){let e=o[t];e=es({},e),delete e.removeEmptyAttrs,delete e.removeEmpty,o[s]=e}Qa(n,((e, o)=>{e[t]&&(n[o]=e=es({},n[o]),e[s]=e[t])}))}})))},E= 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]+)\[([^\]]+)]$/;delete Ka[l],e&&Qa(ns(e,","),(e=>{const o=t.exec(e);if(o){const e=o[1];let t;t=e?n[o[2]]:n[o[2]]={"#comment":{}},t=n[o[2]],Qa(ns(o[3],"|"),(o=>{"-"===e?delete t[o]:t[o]={}}))}}))},A= e=>{const t=o[e];if(t)return t;let n=r.length;for(; n--;){const t=r[n];if(t.pattern.test(e))return t}};e.valid_elements?z(e.valid_elements):(Qa(c,((e, t)=>{o[t]={attributes:e.attributes,attributesOrder:e.attributesOrder},n[t]=e.children})),Qa(ns("strong/b em/i"),(e=>{const t=ns(e,"/");o[t[1]].outputName=t[0]})),Qa(_,((t, n)=>{o[n]&&(e.padd_empty_block_inline_children&&(o[n].paddInEmptyBlock=!0),o[n].removeEmpty=!0)})),Qa(ns("ol ul blockquote a table tbody"),(e=>{o[e]&&(o[e].removeEmpty=!0)})),Qa(ns("p h1 h2 h3 h4 h5 h6 th td pre div address caption li"),(e=>{o[e].paddEmpty=!0})),Qa(ns("span"),(e=>{o[e].removeEmptyAttrs=!0}))),O(e.custom_elements),E(e.valid_children),S(e.extended_valid_elements),E("+ol[ul|ol],+ul[ul|ol]"),Qa({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)=>{o[t]&&(o[t].parentsRequired=ns(e))})),e.invalid_elements&&Qa(ts(e.invalid_elements),(e=>{o[e]&&delete o[e]})),A("span")||S("span[!data-mce-type|*]");const M=T(d),N=T(u),R=T(m),D=T(f),B=T(w),L=T(k),I=T(_),H=T(Object.seal(h)),P=T(p),F=T(b),j=T(v),V=T(g),Z=T(x),U=T(Object.seal(s)),q=T(a);return{type:l,children:n,elements:o,getValidStyles:M,getValidClasses:R,getBlockElements:B,getInvalidStyles:N,getVoidElements:H,getTextBlockElements:L,getTextInlineElements:I,getBoolAttrs:D,getElementRule:A,getSelfClosingElements:P,getNonEmptyElements:F,getMoveCaretBeforeOnEnterElements:j,getWhitespaceElements:V,getTransparentElements:Z,getSpecialElements:U,isValidChild:(e, t)=>{const o=n[e.toLowerCase()];return!(!o||!o[t.toLowerCase()])},isValid:(e, t)=>{const o=A(e);if(o){if(!t)return!0;{if(o.attributes[t])return!0;const e=o.attributePatterns;if(e){let o=e.length;for(; o--;)if(e[o].pattern.test(t))return!0}}}return!1},getCustomElements:q,addValidElements:S,setValidElements:z,addCustomElements:O,addValidChildren:E}},ls=(e={}, t)=>{const o=/(?:url(?:(?:\(\s*\"([^\"]+)\"\s*\))|(?:\(\s*\'([^\']+)\'\s*\))|(?:\(\s*([^)\s]+)\s*\))))|(?:\'([^\']+)\')|(?:\"([^\"]+)\")/gi,n=/\s*([^:]+):\s*([^;]+);?/g,r=/\s+$/,a={};let s,i;const l=dr;t&&(s=t.getValidStyles(),i=t.getInvalidStyles());const c="\\\" \\' \\; \\: ; : \ufeff".split(" ");for(let e=0; e<c.length; e++)a[c[e]]=l+e,a[l+e]=c[e];const d={parse: t=>{const s={};let i=!1;const c=e.url_converter,u=e.url_converter_scope||d,m=(e, t, o)=>{const n=s[e+"-top"+t];if(!n)return;const r=s[e+"-right"+t];if(!r)return;const a=s[e+"-bottom"+t];if(!a)return;const i=s[e+"-left"+t];if(!i)return;const l=[n,r,a,i];let c=l.length-1;for(; c--&&l[c]===l[c+1];);c>-1&&o||(s[e+t]=-1===c?l[0]:l.join(" "),delete s[e+"-top"+t],delete s[e+"-right"+t],delete s[e+"-bottom"+t],delete s[e+"-left"+t])},g= e=>{const t=s[e];if(!t)return;const o=t.split(" ");let n=o.length;for(; n--;)if(o[n]!==o[0])return!1;return s[e]=o[0],!0},p= e=>(i=!0,a[e]),h=(e, t)=>(i&&(e=e.replace(/\uFEFF[0-9]/g,(e=>a[e]))),t||(e=e.replace(/\\([\'\";:])/g,"$1")),e),f= e=>String.fromCharCode(parseInt(e.slice(1),16)),y= e=>e.replace(/\\[0-9a-f]+/gi,f),b=(t, o, n, r, a, s)=>{if(a=a||s)return"'"+(a=h(a)).replace(/\'/g,"\\'")+"'";if(o=h(o||n||r||""),!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""}return c&&(o=c.call(u,o,"style")),"url('"+o.replace(/\'/g,"\\'")+"')"};if(t){let a;for(t=(t=t.replace(/[\u0000-\u001F]/g,"")).replace(/\\[\"\';:\uFEFF]/g,p).replace(/\"[^\"]+\"|\'[^\']+\'/g,(e=>e.replace(/[;:]/g,p))); a=n.exec(t);){n.lastIndex=a.index+a[0].length;let t=a[1].replace(r,"").toLowerCase(),c=a[2].replace(r,"");if(t&&c){if(t=y(t),c=y(c),-1!==t.indexOf(l)||-1!==t.indexOf('"'))continue;if(!e.allow_script_urls&&("behavior"===t||/expression\s*\(|\/\*|\*\//.test(c)))continue;"font-weight"===t&&"700"===c?c="bold":"color"!==t&&"background-color"!==t||(c=c.toLowerCase()),c=c.replace(o,b),s[t]=i?h(c,!0):c}}m("border","",!0),m("border","-width"),m("border","-color"),m("border","-style"),m("padding",""),m("margin",""),"border",k="border-style",w="border-color",g(v="border-width")&&g(k)&&g(w)&&(s.border=s[v]+" "+s[k]+" "+s[w],delete s[v],delete s[k],delete s[w]),"medium none"===s.border&&delete s.border,"none"===s["border-image"]&&delete s["border-image"]}var v,k,w;return s},serialize:(e, t)=>{let o="";const n=(t, n)=>{const r=n[t];if(r)for(let t=0,n=r.length; t<n; t++){const n=r[t],a=e[n];a&&(o+=(o.length>0?" ":"")+n+": "+a+";")}};return t&&s?(n("*",s),n(t,s)):he(e,((e, n)=>{e&&((e, t)=>{if(!i||!t)return!0;let o=i["*"];return!(o&&o[e]||(o=i[t],o&&o[e]))})(n,t)&&(o+=(o.length>0?" ":"")+n+": "+e+";")})),o}};return d},cs={keyLocation:!0,layerX:!0,layerY:!0,returnValue:!0,webkitMovementX:!0,webkitMovementY:!0,keyIdentifier:!0,mozPressure:!0},ds=(e, t)=>{const o=null!=t?t:{};for(const t in e)Ce(cs,t)||(o[t]=e[t]);return w(e.composedPath)&&(o.composedPath=()=>e.composedPath()),o},us=(e, t, o, n)=>{var r;const a=ds(t,n);return a.type=e,k(a.target)&&(a.target=null!==(r=a.srcElement)&&void 0!==r?r:o),(e=>k(e.preventDefault)||(e=>e instanceof Event||_(e.initEvent))(e))(t)&&(a.preventDefault=()=>{a.defaultPrevented=!0,a.isDefaultPrevented=I,_(t.preventDefault)&&t.preventDefault()},a.stopPropagation=()=>{a.cancelBubble=!0,a.isPropagationStopped=I,_(t.stopPropagation)&&t.stopPropagation()},a.stopImmediatePropagation=()=>{a.isImmediatePropagationStopped=I,a.stopPropagation()},(e=>e.isDefaultPrevented===I||e.isDefaultPrevented===L)(a)||(a.isDefaultPrevented=!0===a.defaultPrevented?I:L,a.isPropagationStopped=!0===a.cancelBubble?I:L,a.isImmediatePropagationStopped=L)),a},ms=/^(?:mouse|contextmenu)|click/,gs=(e, t, o, n)=>{e.addEventListener(t,o,n||!1)},ps=(e, t, o, n)=>{e.removeEventListener(t,o,n||!1)},hs=(e, t)=>{const o=us(e.type,e,document,t);if((e=>w(e)&&ms.test(e.type))(e)&&v(e.pageX)&&!v(e.clientX)){const t=o.target.ownerDocument||document,n=t.documentElement,r=t.body,a=o;a.pageX=e.clientX+(n&&n.scrollLeft||r&&r.scrollLeft||0)-(n&&n.clientLeft||r&&r.clientLeft||0),a.pageY=e.clientY+(n&&n.scrollTop||r&&r.scrollTop||0)-(n&&n.clientTop||r&&r.clientTop||0)}return o},fs=(e, t, o)=>{const n=e.document,r={type:"ready"};if(o.domLoaded)return void t(r);const a=()=>{ps(e,"DOMContentLoaded",a),ps(e,"load",a),o.domLoaded||(o.domLoaded=!0,t(r)),e=null};"complete"===n.readyState||"interactive"===n.readyState&&n.body?a():gs(e,"DOMContentLoaded",a),o.domLoaded||gs(e,"load",a)};class ys{constructor(){this.domLoaded=!1,this.events={},this.count=1,this.expando="mce-data-"+(+new Date).toString(32),this.hasFocusIn="onfocusin"in document.documentElement,this.count=1}bind(e, t, o, n){const r=this;let a;const s=window,i= e=>{r.executeHandlers(hs(e||s.event),l)};if(!e||Yn(e)||Qn(e))return o;let l;e[r.expando]?l=e[r.expando]:(l=r.count++,e[r.expando]=l,r.events[l]={}),n=n||e;const c=t.split(" ");let d=c.length;for(; d--;){let t=c[d],u=i,m=!1,g=!1;"DOMContentLoaded"===t&&(t="ready"),r.domLoaded&&"ready"===t&&"complete"===e.readyState?o.call(n,hs({type:t})):(r.hasFocusIn||"focusin"!==t&&"focusout"!==t||(m=!0,g="focusin"===t?"focus":"blur",u= e=>{const t=hs(e||s.event);t.type="focus"===t.type?"focusin":"focusout",r.executeHandlers(t,l)}),a=r.events[l][t],a?"ready"===t&&r.domLoaded?o(hs({type:t})):a.push({func:o,scope:n}):(r.events[l][t]=a=[{func:o,scope:n}],a.fakeName=g,a.capture=m,a.nativeHandler=u,"ready"===t?fs(e,u,r):gs(e,g||t,u,m)))}return e=a=null,o}unbind(e, t, o){if(!e||Yn(e)||Qn(e))return this;const n=e[this.expando];if(n){let r=this.events[n];if(t){const n=t.split(" ");let a=n.length;for(; a--;){const t=n[a],s=r[t];if(s){if(o){let e=s.length;for(; e--;)if(s[e].func===o){const o=s.nativeHandler,n=s.fakeName,a=s.capture,i=s.slice(0,e).concat(s.slice(e+1));i.nativeHandler=o,i.fakeName=n,i.capture=a,r[t]=i}}o&&0!==s.length||(delete r[t],ps(e,s.fakeName||t,s.nativeHandler,s.capture))}}}else he(r,((t, o)=>{ps(e,t.fakeName||o,t.nativeHandler,t.capture)})),r={};for(const e in r)if(Ce(r,e))return this;delete this.events[n];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){if(!e||Yn(e)||Qn(e))return this;const n=hs({type:t,target:e},o);do{const t=e[this.expando];t&&this.executeHandlers(n,t),e=e.parentNode||e.ownerDocument||e.defaultView||e.parentWindow}while(e&&!n.isPropagationStopped());return this}clean(e){if(!e||Yn(e)||Qn(e))return this;if(e[this.expando]&&this.unbind(e),e.getElementsByTagName||(e=e.document),e&&e.getElementsByTagName){this.unbind(e);const t=e.getElementsByTagName("*");let o=t.length;for(; o--;)(e=t[o])[this.expando]&&this.unbind(e)}return this}destroy(){this.events={}}cancel(e){return e&&(e.preventDefault(),e.stopImmediatePropagation()),!1}executeHandlers(e, t){const o=this.events[t],n=o&&o[e.type];if(n)for(let t=0,o=n.length; t<o; t++){const o=n[t];if(o&&!1===o.func.call(o.scope,e)&&e.preventDefault(),e.isImmediatePropagationStopped())return}}}ys.Event=new ys;const bs=Dt.each,vs=Dt.grep,ks="data-mce-style",ws=Dt.makeMap("fill-opacity font-weight line-height opacity orphans widows z-index zoom"," "),_s=(e, t, o)=>{k(o)||""===o?oo(e,t):Xt(e,t,o)},xs= e=>e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),Cs=(e, t)=>{let o=0;if(e)for(let n=e.nodeType,r=e.previousSibling; r; r=r.previousSibling){const e=r.nodeType;(!t||!Yn(r)||e!==n&&r.data.length)&&(o++,n=e)}return o},Ss=(e, t)=>{const o=Qt(t,"style"),n=e.serialize(e.parse(o),Vt(t));_s(t,ks,n)},zs=(e, t, o)=>{const n=xs(t);k(o)||""===o?mn(e,n):an(e,n,((e, t)=>x(e)?Ce(ws,t)?e+"":e+"px":e)(o,n))},Os=(e, t={})=>{const o={},n=window,r={};let a=0;const s=Ma.forElement(bo(e),{contentCssCors:t.contentCssCors,referrerPolicy:t.referrerPolicy}),i=[],l=t.schema?t.schema:is({}),c=ls({url_converter:t.url_converter,url_converter_scope:t.url_converter_scope},t.schema),d=t.ownEvents?new ys:ys.Event,u=l.getBlockElements(),m= t=>t&&e&&g(t)?e.getElementById(t):t,p= e=>{const t=m(e);return w(t)?bo(t):null},h=(e, t, o="")=>{let n;const r=p(e);if(w(r)&&qt(r)){const e=K[t];n=e&&e.get?e.get(r.dom,t):Qt(r,t)}return w(n)?n:o},y= e=>{const t=m(e);return k(t)?[]:t.attributes},b=(e, o, n)=>{M(e,(e=>{if(jn(e)){const r=bo(e),a=""===n?null:n,s=Qt(r,o),i=K[o];i&&i.set?i.set(r.dom,a,o):_s(r,o,a),s!==a&&t.onSetAttrib&&t.onSetAttrib({attrElm:r.dom,attrName:o,attrValue:a})}}))},v=()=>t.root_element||e.body,x=(t, o)=>((e, t, o)=>{let n=0,r=0;const a=e.ownerDocument;if(o=o||e,t){if(o===e&&t.getBoundingClientRect&&"static"===ln(bo(e),"position")){const o=t.getBoundingClientRect();return n=o.left+(a.documentElement.scrollLeft||e.scrollLeft)-a.documentElement.clientLeft,r=o.top+(a.documentElement.scrollTop||e.scrollTop)-a.documentElement.clientTop,{x:n,y:r}}let s=t;for(; s&&s!==o&&s.nodeType&&!Ea(s,o);){const e=s;n+=e.offsetLeft||0,r+=e.offsetTop||0,s=e.offsetParent}for(s=t.parentNode; s&&s!==o&&s.nodeType&&!Ea(s,o);)n-=s.scrollLeft||0,r-=s.scrollTop||0,s=s.parentNode;r+=(e=>Oa.isFirefox()&&"table"===Vt(e)?Ta(Bo(e)).filter((e=>"caption"===Vt(e))).bind((e=>Ta(Do(e)).map((t=>{const o=t.dom.offsetTop,n=e.dom.offsetTop,r=e.dom.offsetHeight;return o<=n?-r:0})))).getOr(0):0)(bo(t))}return{x:n,y:r}})(e.body,m(t),o),C=(e, t, o)=>{const n=m(e);if(!k(n)&&jn(n))return o?ln(bo(n),xs(t)):("float"===(t=t.replace(/-(\D)/g,((e, t)=>t.toUpperCase())))&&(t="cssFloat"),n.style?n.style[t]:void 0)},z= e=>{const t=m(e);if(!t)return{w:0,h:0};let o=C(t,"width"),n=C(t,"height");return o&&-1!==o.indexOf("px")||(o="0"),n&&-1!==n.indexOf("px")||(n="0"),{w:parseInt(o,10)||t.offsetWidth||t.clientWidth,h:parseInt(n,10)||t.offsetHeight||t.clientHeight}},O=(e, t)=>{if(!e)return!1;const o=f(e)?e:[e];return U(o,(e=>wo(bo(e),t)))},E=(e, t, o, n)=>{const r=[];let a=m(e);n=void 0===n;const s=o||("BODY"!==v().nodeName?v().parentNode:null);if(g(t))if("*"===t)t=jn;else{const e=t;t= t=>O(t,e)}for(; a&&!(a===s||k(a.nodeType)||er(a)||tr(a));){if(!t||t(a)){if(!n)return[a];r.push(a)}a=a.parentNode}return n?r:null},A=(e, t, o)=>{let n=t;if(e){g(t)&&(n= e=>O(e,t));for(let t=e[o]; t; t=t[o])if(_(n)&&n(t))return t}return null},M=function(e, t, o){const n=null!=o?o:this;if(f(e)){const o=[];return bs(e,((e, r)=>{const a=m(e);a&&o.push(t.call(n,a,r))})),o}{const o=m(e);return!!o&&t.call(n,o)}},N=(e, t)=>{M(e,(e=>{he(t,((t, o)=>{b(e,o,t)}))}))},R=(e, t)=>{M(e,(e=>{const o=bo(e);Cn(o,t)}))},D=(t, o, n, r, a)=>M(t,(t=>{const s=g(o)?e.createElement(o):o;return w(n)&&N(s,n),r&&(!g(r)&&r.nodeType?s.appendChild(r):g(r)&&R(s,r)),a?s:t.appendChild(s)})),B=(t, o, n)=>D(e.createElement(t),t,o,n,!0),L=Ga.encodeAllRaw,I=(e, t)=>M(e,(e=>{const o=bo(e);return t&&W(Bo(o),(e=>{Wt(e)&&0===e.dom.length?kn(e):gn(o,e)})),kn(o),o.dom})),H=(e, t, o)=>{M(e,(e=>{if(jn(e)){const n=bo(e),r=t.split(" ");W(r,(e=>{w(o)?(o?co:mo)(n,e):((e, t)=>{const o=ao(e)?e.dom.classList.toggle(t):((e, t)=>Z(so(e),t)?lo(e,t):io(e,t))(e,t);uo(e)})(n,e)}))}}))},P=(e, t, o)=>M(t,(n=>{var r;const a=f(t)?e.cloneNode(!0):e;return o&&bs(vs(n.childNodes),(e=>{a.appendChild(e)})),null===(r=n.parentNode)||void 0===r||r.replaceChild(a,n),n})),F= e=>{if(jn(e)){const t="a"===e.nodeName.toLowerCase()&&!h(e,"href")&&h(e,"id");if(h(e,"name")||h(e,"data-mce-bookmark")||t)return!0}return!1},j=()=>e.createRange(),V=(o, r, a, s)=>{if(f(o)){let e=o.length;const t=[];for(; e--;)t[e]=V(o[e],r,a,s);return t}return!t.collect||o!==e&&o!==n||i.push([o,r,a,s]),d.bind(o,r,a,s||G)},q=(t, o, r)=>{if(f(t)){let e=t.length;const n=[];for(; e--;)n[e]=q(t[e],o,r);return n}if(i.length>0&&(t===e||t===n)){let e=i.length;for(; e--;){const[n,a,s]=i[e];t!==n||o&&o!==a||r&&r!==s||d.unbind(n,a,s)}}return d.unbind(t,o,r)},$= e=>{if(e&&jn(e)){const t=e.getAttribute("data-mce-contenteditable");return t&&"inherit"!==t?t:"inherit"!==e.contentEditable?e.contentEditable:null}return null},G={doc:e,settings:t,win:n,files:r,stdMode:!0,boxModel:!0,styleSheetLoader:s,boundEvents:i,styles:c,schema:l,events:d,isBlock: e=>g(e)?Ce(u,e):jn(e)&&(Ce(u,e.nodeName)||Ca(l,e)),root:null,clone:(e, t)=>e.cloneNode(t),getRoot:v,getViewPort: e=>{const t=Dn(e);return{x:t.x,y:t.y,w:t.width,h:t.height}},getRect: e=>{const t=m(e),o=x(t),n=z(t);return{x:o.x,y:o.y,w:n.w,h:n.h}},getSize:z,getParent:(e, t, o)=>{const n=E(e,t,o,!1);return n&&n.length>0?n[0]:null},getParents:E,get:m,getNext:(e, t)=>A(e,t,"nextSibling"),getPrev:(e, t)=>A(e,t,"previousSibling"),select:(o, n)=>{var r,a;const s=null!==(a=null!==(r=m(n))&&void 0!==r?r:t.root_element)&&void 0!==a?a:e;return _(s.querySelectorAll)?ue(s.querySelectorAll(o)):[]},is:O,add:D,create:B,createHTML:(e, t, o="")=>{let n="<"+e;for(const e in t)Se(t,e)&&(n+=" "+e+'="'+L(t[e])+'"');return Ye(o)&&Ce(l.getVoidElements(),e)?n+" />":n+">"+o+"</"+e+">"},createFragment: t=>{const o=e.createElement("div"),n=e.createDocumentFragment();let r;for(n.appendChild(o),t&&(o.innerHTML=t); r=o.firstChild;)n.appendChild(r);return n.removeChild(o),n},remove:I,setStyle:(e, o, n)=>{M(e,(e=>{const r=bo(e);zs(r,o,n),t.update_styles&&Ss(c,r)}))},getStyle:C,setStyles:(e, o)=>{M(e,(e=>{const n=bo(e);he(o,((e, t)=>{zs(n,t,e)})),t.update_styles&&Ss(c,n)}))},removeAllAttribs: e=>M(e,(e=>{const t=e.attributes;for(let o=t.length-1; o>=0; o--)e.removeAttributeNode(t.item(o))})),setAttrib:b,setAttribs:N,getAttrib:h,getPos:x,parseStyle: e=>c.parse(e),serializeStyle:(e, t)=>c.serialize(e,t),addStyle: t=>{if(G!==Os.DOM&&e===document){if(o[t])return;o[t]=!0}let n=e.getElementById("mceDefaultStyles");if(!n){n=e.createElement("style"),n.id="mceDefaultStyles",n.type="text/css";const t=e.head;t.firstChild?t.insertBefore(n,t.firstChild):t.appendChild(n)}n.styleSheet?n.styleSheet.cssText+=t:n.appendChild(e.createTextNode(t))},loadCSS: e=>{e||(e=""),W(e.split(","),(e=>{r[e]=!0,s.load(e).catch(S)}))},addClass:(e, t)=>{H(e,t,!0)},removeClass:(e, t)=>{H(e,t,!1)},hasClass:(e, t)=>{const o=p(e),n=t.split(" ");return w(o)&&ne(n,(e=>go(o,e)))},toggleClass:H,show: e=>{M(e,(e=>mn(bo(e),"display")))},hide: e=>{M(e,(e=>an(bo(e),"display","none")))},isHidden: e=>{const t=p(e);return w(t)&&Bt(dn(t,"display"),"none")},uniqueId: e=>(e||"mce_")+a++,setHTML:R,getOuterHTML: e=>{const t=p(e);return w(t)?jn(t.dom)?t.dom.outerHTML:(e=>{const t=fo("div"),o=bo(e.dom.cloneNode(!0));return fn(t,o),xn(t)})(t):""},setOuterHTML:(e, t)=>{M(e,(e=>{jn(e)&&(e.outerHTML=t)}))},decode:Ga.decode,encode:L,insertAfter:(e, t)=>{const o=m(t);return M(e,(e=>{const t=null==o?void 0:o.parentNode,n=null==o?void 0:o.nextSibling;return t&&(n?t.insertBefore(e,n):t.appendChild(e)),e}))},replace:P,rename:(e, t)=>{if(e.nodeName!==t.toUpperCase()){const o=B(t);return bs(y(e),(t=>{b(o,t.nodeName,h(e,t.nodeName))})),P(o,e,!0),o}return e},findCommonAncestor:(e, t)=>{let o=e;for(; o;){let e=t;for(; e&&o!==e;)e=e.parentNode;if(o===e)break;o=o.parentNode}return!o&&e.ownerDocument?e.ownerDocument.documentElement:o},run:M,getAttribs:y,isEmpty:(e, t)=>{let o=0;if(F(e))return!1;const n=e.firstChild;if(n){const r=new Hn(n,e),a=l?l.getWhitespaceElements():{},s=t||(l?l.getNonEmptyElements():null);let i=n;do{if(jn(i)){const e=i.getAttribute("data-mce-bogus");if(e){i=r.next("all"===e);continue}const t=i.nodeName.toLowerCase();if(s&&s[t]){if("br"===t){o++,i=r.next();continue}return!1}if(F(i))return!1}if(Qn(i))return!1;if(Yn(i)&&!aa(i.data))return!1;if(Yn(i)&&i.parentNode&&a[i.parentNode.nodeName]&&aa(i.data))return!1;i=r.next()}while(i)}return o<=1},createRng:j,nodeIndex:Cs,split:(e, t, o)=>{let n,r,a=j();if(e&&t&&e.parentNode&&t.parentNode){const s=e.parentNode;return a.setStart(s,Cs(e)),a.setEnd(t.parentNode,Cs(t)),n=a.extractContents(),a=j(),a.setStart(t.parentNode,Cs(t)+1),a.setEnd(s,Cs(e)+1),r=a.extractContents(),s.insertBefore(Da(G,n),e),o?s.insertBefore(o,e):s.insertBefore(t,e),s.insertBefore(Da(G,r),e),I(e),o||t}},bind:V,unbind:q,fire:(e, t, o)=>d.dispatch(e,t,o),dispatch:(e, t, o)=>d.dispatch(e,t,o),getContentEditable:$,getContentEditableParent: e=>{const t=v();let o=null;for(let n=e; n&&n!==t&&(o=$(n),null===o); n=n.parentNode);return o},isEditable: e=>{if(w(e)){const t=jn(e)?e:e.parentElement,o="true"===$(v());return w(t)&&tn(bo(t),o)}return!1},destroy:()=>{if(i.length>0){let e=i.length;for(; e--;){const[t,o,n]=i[e];d.unbind(t,o,n)}}he(r,((e, t)=>{s.unload(t),delete r[t]}))},isChildOf:(e, t)=>e===t||t.contains(e),dumpRng: e=>"startContainer: "+e.startContainer.nodeName+", startOffset: "+e.startOffset+", endContainer: "+e.endContainer.nodeName+", endOffset: "+e.endOffset},K=((e, t, o)=>{const n=t.keep_values,r={set:(e, n, r)=>{const a=bo(e);_(t.url_converter)&&w(n)&&(n=t.url_converter.call(t.url_converter_scope||o(),String(n),r,e)),_s(a,"data-mce-"+r,n),_s(a,r,n)},get:(e, t)=>{const o=bo(e);return Qt(o,"data-mce-"+t)||Qt(o,t)}},a={style:{set:(t, o)=>{const r=bo(t);n&&_s(r,ks,o),oo(r,"style"),g(o)&&sn(r,e.parse(o))},get: t=>{const o=bo(t),n=Qt(o,ks)||Qt(o,"style");return e.serialize(e.parse(n),Vt(o))}}};return n&&(a.href=a.src=r),a})(c,t,T(G));return G};Os.DOM=Os(document),Os.nodeIndex=Cs;const Ts=Os.DOM;class Es{constructor(e={}){this.states={},this.queue=[],this.scriptLoadedCallbacks={},this.queueLoadedCallbacks=[],this.loading=!1,this.settings=e}_setReferrerPolicy(e){this.settings.referrerPolicy=e}loadScript(e){return new Promise(((t, o)=>{const n=Ts;let r;const a=()=>{n.remove(s),r&&(r.onerror=r.onload=r=null)},s=n.uniqueId();r=document.createElement("script"),r.id=s,r.type="text/javascript",r.src=Dt._addCacheSuffix(e),this.settings.referrerPolicy&&n.setAttrib(r,"referrerpolicy",this.settings.referrerPolicy),r.onload=()=>{a(),t()},r.onerror=()=>{a(),o("Failed to load script: "+e)},(document.getElementsByTagName("head")[0]||document.body).appendChild(r)}))}isDone(e){return 2===this.states[e]}markDone(e){this.states[e]=2}add(e){const t=this;return t.queue.push(e),void 0===t.states[e]&&(t.states[e]=0),new Promise(((o, n)=>{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;return this.queue=[],this.loadScripts(e)}loadScripts(e){const t=this,o=(e, o)=>{xe(t.scriptLoadedCallbacks,o).each((t=>{W(t,(t=>t[e](o)))})),delete t.scriptLoadedCallbacks[o]},n= e=>{const t=K(e,(e=>"rejected"===e.status));return t.length>0?Promise.reject(oe(t,(({reason:e})=>f(e)?e:[e]))):Promise.resolve()},r= e=>Promise.allSettled(q(e,(e=>2===t.states[e]?(o("resolve",e),Promise.resolve()):3===t.states[e]?(o("reject",e),Promise.reject(e)):(t.states[e]=1,t.loadScript(e).then((()=>{t.states[e]=2,o("resolve",e);const a=t.queue;return a.length>0?(t.queue=[],r(a).then(n)):Promise.resolve()}),(()=>(t.states[e]=3,o("reject",e),Promise.reject(e)))))))),a= e=>(t.loading=!0,r(e).then((e=>{t.loading=!1;const o=t.queueLoadedCallbacks.shift();return H.from(o).each(B),n(e)}))),s=ze(e);return t.loading?new Promise(((e, o)=>{t.queueLoadedCallbacks.push((()=>a(s).then(e,o)))})):a(s)}}Es.ScriptLoader=new Es;const As= e=>{let t=e;return{get:()=>t,set: e=>{t=e}}},Ms={},Ns=As("en"),Rs=()=>xe(Ms,Ns.get()),Ds={getData:()=>fe(Ms,(e=>({...e}))),setCode: e=>{e&&Ns.set(e)},getCode:()=>Ns.get(),add:(e, t)=>{let o=Ms[e];o||(Ms[e]=o={}),he(t,((e, t)=>{o[t.toLowerCase()]=e}))},translate: e=>{const t=Rs().getOr({}),o= e=>_(e)?Object.prototype.toString.call(e):n(e)?"":""+e,n= e=>""===e||null==e,r= e=>{const n=o(e);return xe(t,n.toLowerCase()).map(o).getOr(n)},a= e=>e.replace(/{context:\w+}$/,"");if(n(e))return"";if(p(s=e)&&Ce(s,"raw"))return o(e.raw);var s;if((e=>f(e)&&e.length>1)(e)){const t=e.slice(1);return a(r(e[0]).replace(/\{([0-9]+)\}/g,((e, n)=>Ce(t,n)?o(t[n]):e)))}return a(r(e))},isRtl:()=>Rs().bind((e=>xe(e,"_dir"))).exists((e=>"rtl"===e)),hasCode: e=>Ce(Ms,e)},Bs=()=>{const e=[],t={},o={},n=[],r=(e, t)=>{const o=K(n,(o=>o.name===e&&o.state===t));W(o,(e=>e.resolve()))},a= e=>Ce(t,e),s=(e, o)=>{const n=Ds.getCode();!n||o&&-1===(","+(o||"")+",").indexOf(","+n+",")||Es.ScriptLoader.add(t[e]+"/langs/"+n+".js")},i=(e, t="added")=>"added"===t&&(e=>Ce(o,e))(e)||"loaded"===t&&a(e)?Promise.resolve():new Promise((o=>{n.push({name:e,state:t,resolve:o})}));return{items:e,urls:t,lookup:o,get: e=>{if(o[e])return o[e].instance},requireLangPack:(e, t)=>{!1!==Bs.languageLoad&&(a(e)?s(e,t):i(e,"loaded").then((()=>s(e,t))))},add:(t, n)=>(e.push(n),o[t]={instance:n},r(t,"added"),n),remove: e=>{delete t[e],delete o[e]},createUrl:(e, t)=>g(t)?g(e)?{prefix:"",resource:t,suffix:""}:{prefix:e.prefix,resource:t,suffix:e.suffix}:t,load:(e, n)=>{if(t[e])return Promise.resolve();let a=g(n)?n:n.prefix+n.resource+n.suffix;0!==a.indexOf("/")&&-1===a.indexOf("://")&&(a=Bs.baseURL+"/"+a),t[e]=a.substring(0,a.lastIndexOf("/"));const s=()=>(r(e,"loaded"),Promise.resolve());return o[e]?s():Es.ScriptLoader.add(a).then(s)},waitFor:i}};Bs.languageLoad=!0,Bs.baseURL="",Bs.PluginManager=Bs(),Bs.ThemeManager=Bs(),Bs.ModelManager=Bs();const Ls= e=>{const t=As(H.none()),o=()=>t.get().each((e=>clearInterval(e)));return{clear:()=>{o(),t.set(H.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set: n=>{o(),t.set(H.some(setInterval(n,e)))}}},Is=()=>{const e=(e=>{const t=As(H.none()),o=()=>t.get().each(e);return{clear:()=>{o(),t.set(H.none())},isSet:()=>t.get().isSome(),get:()=>t.get(),set: e=>{o(),t.set(H.some(e))}}})(S);return{...e,on: t=>e.get().each(t)}},Hs=(e, t)=>{let o=null;return{cancel:()=>{y(o)||(clearTimeout(o),o=null)},throttle:(...n)=>{y(o)&&(o=setTimeout((()=>{o=null,e.apply(null,n)}),t))}}},Ps=(e, t)=>{let o=null;const n=()=>{y(o)||(clearTimeout(o),o=null)};return{cancel:n,throttle:(...r)=>{n(),o=setTimeout((()=>{o=null,e.apply(null,r)}),t)}}},Fs=T("mce-annotation"),js=T("data-mce-annotation"),Vs=T("data-mce-annotation-uid"),Zs=T("data-mce-annotation-active"),Us=T("data-mce-annotation-classes"),qs=T("data-mce-annotation-attrs"),Ws= e=> t=>xo(t,e),$s=(e, t)=>{const o=e.selection.getRng(),n=bo(o.startContainer),r=bo(e.getBody()),a=t.fold((()=>"."+Fs()),(e=>`[${js()}="${e}"]`)),s=Lo(n,o.startOffset).getOr(n);return en(s,a,Ws(r)).bind((t=>eo(t,`${Vs()}`).bind((o=>eo(t,`${js()}`).map((t=>{const n=Ks(e,o);return{uid:o,name:t,elements:n}}))))))},Gs=(e, t)=>to(e,"data-mce-bogus")||In(e,'[data-mce-bogus="all"]',Ws(t)),Ks=(e, t)=>{const o=bo(e.getBody()),n=Ln(o,`[${Vs()}="${t}"]`);return K(n,(e=>!Gs(e,o)))},Ys=(e, t)=>{const o=bo(e.getBody()),n=Ln(o,`[${js()}="${t}"]`),r={};return W(n,(e=>{if(!Gs(e,o)){const t=Qt(e,Vs()),o=xe(r,t).getOr([]);r[t]=o.concat([e])}})),r};let Xs=0;const Js= e=>{const t=(new Date).getTime(),o=Math.floor(1e9*Math.random());return Xs++,e+"_"+o+Xs+String(t)},Qs=(e, t)=>bo(e.dom.cloneNode(t)),ei= e=>Qs(e,!1),ti= e=>Qs(e,!0),oi=(e, t, o=L)=>{const n=new Hn(e,t),r= e=>{let t;do{t=n[e]()}while(t&&!Yn(t)&&!o(t));return H.from(t).filter(Yn)};return{current:()=>H.from(n.current()).filter(Yn),next:()=>r("next"),prev:()=>r("prev"),prev2:()=>r("prev2")}},ni=(e, t)=>{const o=t||(t=>e.isBlock(t)||or(t)||ar(t)),n=(e, t, o, r)=>{if(Yn(e)){const o=r(e,t,e.data);if(-1!==o)return H.some({container:e,offset:o})}return o().bind((e=>n(e.container,e.offset,o,r)))};return{backwards:(t, r, a, s)=>{const i=oi(t,null!=s?s:e.getRoot(),o);return n(t,r,(()=>i.prev().map((e=>({container:e,offset:e.length})))),a).getOrNull()},forwards:(t, r, a, s)=>{const i=oi(t,null!=s?s:e.getRoot(),o);return n(t,r,(()=>i.next().map((e=>({container:e,offset:0})))),a).getOrNull()}}},ri=Math.round,ai= e=>e?{left:ri(e.left),top:ri(e.top),bottom:ri(e.bottom),right:ri(e.right),width:ri(e.width),height:ri(e.height)}:{left:0,top:0,bottom:0,right:0,width:0,height:0},si=(e, t)=>(e=ai(e),t||(e.left=e.left+e.width),e.right=e.left,e.width=0,e),ii=(e, t, o)=>e>=0&&e<=Math.min(t.height,o.height)/2,li=(e, t)=>{const o=Math.min(t.height/2,e.height/2);return e.bottom-o<t.top||!(e.top>t.bottom)&&ii(t.top-e.bottom,e,t)},ci=(e, t)=>e.top>t.bottom||!(e.bottom<t.top)&&ii(t.bottom-e.top,e,t),di=(e, t, o)=>{const n=Math.max(Math.min(t,e.left+e.width),e.left),r=Math.max(Math.min(o,e.top+e.height),e.top);return Math.sqrt((t-n)*(t-n)+(o-r)*(o-r))},ui= e=>{const t=e.startContainer,o=e.startOffset;return t===e.endContainer&&t.hasChildNodes()&&e.endOffset===o+1?t.childNodes[o]:null},mi=(e, t)=>{if(jn(e)&&e.hasChildNodes()){const o=e.childNodes,n=((e, t, o)=>Math.min(Math.max(e,0),o))(t,0,o.length-1);return o[n]}return e},gi=new RegExp("[̀-ͯ҃-҇҈-҉֑-ֽֿׁ-ׂׄ-ׇׅؐ-ًؚ-ٰٟۖ-ۜ۟-ۤۧ-۪ۨ-ܑۭܰ-݊ަ-ް߫-߳--------------------ି-------ಿ-----------------------------------------᩿------------------᷿------⵿-ⷿ-------------------꪿---゙-゚]"),pi= e=>g(e)&&e.charCodeAt(0)>=768&&gi.test(e),hi=jn,fi=ta,yi=Un("display","block table"),bi=Un("float","left right"),vi=((...e)=> t=>{for(let o=0; o<e.length; o++)if(!e[o](t))return!1;return!0})(hi,fi,N(bi)),ki=N(Un("white-space","pre pre-line pre-wrap")),wi=Yn,_i=or,xi=Os.nodeIndex,Ci=(e, t)=>t<0&&jn(e)&&e.hasChildNodes()?void 0:mi(e,t),Si= e=>e?e.createRange():Os.DOM.createRng(),zi= e=>g(e)&&/[\r\n\t ]/.test(e),Oi= e=>!!e.setStart&&!!e.setEnd,Ti= e=>{const t=e.startContainer,o=e.startOffset;if(zi(e.toString())&&ki(t.parentNode)&&Yn(t)){const e=t.data;if(zi(e[o-1])||zi(e[o+1]))return!0}return!1},Ei= e=>0===e.left&&0===e.right&&0===e.top&&0===e.bottom,Ai= e=>{var t;let o;const n=e.getClientRects();return o=n.length>0?ai(n[0]):ai(e.getBoundingClientRect()),!Oi(e)&&_i(e)&&Ei(o)?(e=>{const t=e.ownerDocument,o=Si(t),n=t.createTextNode(ur),r=e.parentNode;r.insertBefore(n,e),o.setStart(n,0),o.setEnd(n,1);const a=ai(o.getBoundingClientRect());return r.removeChild(n),a})(e):Ei(o)&&Oi(e)&&null!==(t=(e=>{const t=e.startContainer,o=e.endContainer,n=e.startOffset,r=e.endOffset;if(t===o&&Yn(o)&&0===n&&1===r){const t=e.cloneRange();return t.setEndAfter(o),Ai(t)}return null})(e))&&void 0!==t?t:o},Mi=(e, t)=>{const o=si(e,t);return o.width=1,o.right=o.left+1,o},Ni=(e, t, o)=>{const n=()=>(o||(o=(e=>{const t=[],o= e=>{var o,n;0!==e.height&&(t.length>0&&(o=e,n=t[t.length-1],o.left===n.left&&o.top===n.top&&o.bottom===n.bottom&&o.right===n.right)||t.push(e))},n=(e, t)=>{const n=Si(e.ownerDocument);if(t<e.data.length){if(pi(e.data[t]))return;if(pi(e.data[t-1])&&(n.setStart(e,t),n.setEnd(e,t+1),!Ti(n)))return void o(Mi(Ai(n),!1))}t>0&&(n.setStart(e,t-1),n.setEnd(e,t),Ti(n)||o(Mi(Ai(n),!1))),t<e.data.length&&(n.setStart(e,t),n.setEnd(e,t+1),Ti(n)||o(Mi(Ai(n),!0)))},r=e.container(),a=e.offset();if(wi(r))return n(r,a),t;if(hi(r))if(e.isAtEnd()){const e=Ci(r,a);wi(e)&&n(e,e.data.length),vi(e)&&!_i(e)&&o(Mi(Ai(e),!1))}else{const s=Ci(r,a);if(wi(s)&&n(s,0),vi(s)&&e.isAtEnd())return o(Mi(Ai(s),!1)),t;const i=Ci(e.container(),e.offset()-1);vi(i)&&!_i(i)&&(yi(i)||yi(s)||!vi(s))&&o(Mi(Ai(i),!1)),vi(s)&&o(Mi(Ai(s),!0))}return t})(Ni(e,t))),o);return{container:T(e),offset:T(t),toRange:()=>{const o=Si(e.ownerDocument);return o.setStart(e,t),o.setEnd(e,t),o},getClientRects:n,isVisible:()=>n().length>0,isAtStart:()=>(wi(e),0===t),isAtEnd:()=>wi(e)?t>=e.data.length:t>=e.childNodes.length,isEqual: o=>o&&e===o.container()&&t===o.offset(),getNode: o=>Ci(e,o?t-1:t)}};Ni.fromRangeStart= e=>Ni(e.startContainer,e.startOffset),Ni.fromRangeEnd= e=>Ni(e.endContainer,e.endOffset),Ni.after= e=>Ni(e.parentNode,xi(e)+1),Ni.before= e=>Ni(e.parentNode,xi(e)),Ni.isAbove=(e, t)=>Lt(ce(t.getClientRects()),de(e.getClientRects()),li).getOr(!1),Ni.isBelow=(e, t)=>Lt(de(t.getClientRects()),ce(e.getClientRects()),ci).getOr(!1),Ni.isAtStart= e=>!!e&&e.isAtStart(),Ni.isAtEnd= e=>!!e&&e.isAtEnd(),Ni.isTextPosition= e=>!!e&&Yn(e.container()),Ni.isElementPosition= e=>!Ni.isTextPosition(e);const Ri=(e, t)=>{Yn(t)&&0===t.data.length&&e.remove(t)},Di=(e, t, o)=>{tr(o)?((e, t, o)=>{const n=H.from(o.firstChild),r=H.from(o.lastChild);t.insertNode(o),n.each((t=>Ri(e,t.previousSibling))),r.each((t=>Ri(e,t.nextSibling)))})(e,t,o):((e, t, o)=>{t.insertNode(o),Ri(e,o.previousSibling),Ri(e,o.nextSibling)})(e,t,o)},Bi=Yn,Li=Wn,Ii=Os.nodeIndex,Hi= e=>{const t=e.parentNode;return Li(t)?Hi(t):t},Pi= e=>e?Ne(e.childNodes,((e, t)=>(Li(t)&&"BR"!==t.nodeName?e=e.concat(Pi(t)):e.push(t),e)),[]):[],Fi= e=> t=>e===t,ji= e=>(Bi(e)?"text()":e.nodeName.toLowerCase())+"["+(e=>{let t,o;t=Pi(Hi(e)),o=Re(t,Fi(e),e),t=t.slice(0,o+1);const n=Ne(t,((e, o, n)=>(Bi(o)&&Bi(t[n-1])&&e++,e)),0);return t=Me(t,Zn([e.nodeName])),o=Re(t,Fi(e),e),o-n})(e)+"]",Vi=(e, t)=>{let o,n=[],r=t.container(),a=t.offset();if(Bi(r))o=((e, t)=>{let o=e;for(; (o=o.previousSibling)&&Bi(o);)t+=o.data.length;return t})(r,a);else{const e=r.childNodes;a>=e.length?(o="after",a=e.length-1):o="before",r=e[a]}n.push(ji(r));let s=((e, t, o)=>{const n=[];for(let o=t.parentNode; o&&o!==e; o=o.parentNode)n.push(o);return n})(e,r);return s=Me(s,N(Wn)),n=n.concat(Ae(s,(e=>ji(e)))),n.reverse().join("/")+","+o},Zi=(e, t)=>{if(!t)return null;const o=t.split(","),n=o[0].split("/"),r=o.length>1?o[1]:"before",a=Ne(n,((e, t)=>{const o=/([\w\-\(\)]+)\[([0-9]+)\]/.exec(t);return o?("text()"===o[1]&&(o[1]="#text"),((e, t, o)=>{let n=Pi(e);return n=Me(n,((e, t)=>!Bi(e)||!Bi(n[t-1]))),n=Me(n,Zn([t])),n[o]})(e,o[1],parseInt(o[2],10))):null}),e);if(!a)return null;if(!Bi(a)&&a.parentNode){let e;return e="after"===r?Ii(a)+1:Ii(a),Ni(a.parentNode,e)}return((e, t)=>{let o=e,n=0;for(; Bi(o);){const r=o.data.length;if(t>=n&&t<=n+r){e=o,t-=n;break}if(!Bi(o.nextSibling)){e=o,t=r;break}n+=r,o=o.nextSibling}return Bi(e)&&t>e.data.length&&(t=e.data.length),Ni(e,t)})(a,parseInt(r,10))},Ui=ar,qi=(e, t, o, n, r)=>{const a=r?n.startContainer:n.endContainer;let s=r?n.startOffset:n.endOffset;const i=[],l=e.getRoot();if(Yn(a))i.push(o?((e, t, o)=>{let n=e(t.data.slice(0,o)).length;for(let o=t.previousSibling; o&&Yn(o); o=o.previousSibling)n+=e(o.data).length;return n})(t,a,s):s);else{let t=0;const n=a.childNodes;s>=n.length&&n.length&&(t=1,s=Math.max(0,n.length-1)),i.push(e.nodeIndex(n[s],o)+t)}for(let t=a; t&&t!==l; t=t.parentNode)i.push(e.nodeIndex(t,o));return i},Wi=(e, t, o)=>{let n=0;return Dt.each(e.select(t),(e=>"all"===e.getAttribute("data-mce-bogus")?void 0:e!==o&&void n++)),n},$i=(e, t)=>{let o=t?e.startContainer:e.endContainer,n=t?e.startOffset:e.endOffset;if(jn(o)&&"TR"===o.nodeName){const r=o.childNodes;o=r[Math.min(t?n:n-1,r.length-1)],o&&(n=t?0:o.childNodes.length,t?e.setStart(o,n):e.setEnd(o,n))}},Gi= e=>($i(e,!0),$i(e,!1),e),Ki=(e, t)=>{if(jn(e)&&(e=mi(e,t),Ui(e)))return e;if(Pr(e)){Yn(e)&&Ir(e)&&(e=e.parentNode);let t=e.previousSibling;if(Ui(t))return t;if(t=e.nextSibling,Ui(t))return t}},Yi=(e, t, o)=>{const n=o.getNode(),r=o.getRng();if("IMG"===n.nodeName||Ui(n)){const e=n.nodeName;return{name:e,index:Wi(o.dom,e,n)}}const a=(e=>Ki(e.startContainer,e.startOffset)||Ki(e.endContainer,e.endOffset))(r);if(a){const e=a.tagName;return{name:e,index:Wi(o.dom,e,a)}}return((e, t, o, n)=>{const r=t.dom,a=qi(r,e,o,n,!0),s=t.isForward(),i=Wr(n)?{isFakeCaret:!0}:{};return t.isCollapsed()?{start:a,forward:s,...i}:{start:a,end:qi(r,e,o,n,!1),forward:s,...i}})(e,o,t,r)},Xi=(e, t, o)=>{const n={"data-mce-type":"bookmark",id:t,style:"overflow:hidden;line-height:0px"};return o?e.create("span",n,"&#xFEFF;"):e.create("span",n)},Ji=(e, t)=>{const o=e.dom;let n=e.getRng();const r=o.uniqueId(),a=e.isCollapsed(),s=e.getNode(),i=s.nodeName,l=e.isForward();if("IMG"===i)return{name:i,index:Wi(o,i,s)};const c=Gi(n.cloneRange());if(!a){c.collapse(!1);const e=Xi(o,r+"_end",t);Di(o,c,e)}n=Gi(n),n.collapse(!0);const d=Xi(o,r+"_start",t);return Di(o,n,d),e.moveToBookmark({id:r,keep:!0,forward:l}),{id:r,forward:l}},Qi=M(Yi,E,!0),el= e=>{const t= t=>t(e),o=T(e),n=()=>r,r={tag:!0,inner:e,fold:(t, o)=>o(e),isValue:I,isError:L,map: t=>ol.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:()=>H.some(e)};return r},tl= e=>{const t=()=>o,o={tag:!1,inner:e,fold:(t, o)=>t(e),isValue:L,isError:I,map:t,mapError: t=>ol.error(t(e)),bind:t,exists:L,forall:I,getOr:E,or:E,getOrThunk:D,orThunk:D,getOrDie:R(String(e)),each:S,toOptional:H.none};return o},ol={value:el,error:tl,fromOption:(e, t)=>e.fold((()=>tl(t)),el)},nl= e=>{if(!f(e))throw new Error("cases must be an array");if(0===e.length)throw new Error("there must be at least one case");const t=[],o={};return W(e,((n, r)=>{const a=ge(n);if(1!==a.length)throw new Error("one and only one name per case");const s=a[0],i=n[s];if(void 0!==o[s])throw new Error("duplicate key detected:"+s);if("cata"===s)throw new Error("cannot have a case named cata (sorry)");if(!f(i))throw new Error("case arguments must be an array");t.push(s),o[s]=(...o)=>{const n=o.length;if(n!==i.length)throw new Error("Wrong number of arguments to case "+s+". Expected "+i.length+" ("+i+"), got "+n);return{fold:(...t)=>{if(t.length!==e.length)throw new Error("Wrong number of arguments to fold. Expected "+e.length+", got "+t.length);return t[r].apply(null,o)},match: e=>{const n=ge(e);if(t.length!==n.length)throw new Error("Wrong number of arguments to match. Expected: "+t.join(",")+"\nActual: "+n.join(","));if(!ne(t,(e=>Z(n,e))))throw new Error("Not all branches were specified when using match. Specified: "+n.join(", ")+"\nRequired: "+t.join(", "));return e[s].apply(null,o)},log: e=>{console.log(e,{constructors:t,constructor:s,params:o})}}}})),o};nl([{bothErrors:["error1","error2"]},{firstError:["error1","value2"]},{secondError:["value1","error2"]},{bothValues:["value1","value2"]}]);const rl= e=>"inline-command"===e.type||"inline-format"===e.type,al= e=>"block-command"===e.type||"block-format"===e.type,sl= e=>{const t= t=>ol.error({message:t,pattern:e}),o=(o, n, r)=>{if(void 0!==e.format){let r;if(f(e.format)){if(!ne(e.format,g))return t(o+" pattern has non-string items in the `format` array");r=e.format}else{if(!g(e.format))return t(o+" pattern has non-string `format` parameter");r=[e.format]}return ol.value(n(r))}return void 0!==e.cmd?g(e.cmd)?ol.value(r(e.cmd,e.value)):t(o+" pattern has non-string `cmd` parameter"):t(o+" pattern is missing both `format` and `cmd` parameters")};if(!p(e))return t("Raw pattern is not an object");if(!g(e.start))return t("Raw pattern is missing `start` parameter");if(void 0!==e.end){if(!g(e.end))return t("Inline pattern has non-string `end` parameter");if(0===e.start.length&&0===e.end.length)return t("Inline pattern has empty `start` and `end` parameters");let n=e.start,r=e.end;return 0===r.length&&(r=n,n=""),o("Inline",(e=>({type:"inline-format",start:n,end:r,format:e})),((e, t)=>({type:"inline-command",start:n,end:r,cmd:e,value:t})))}return void 0!==e.replacement?g(e.replacement)?0===e.start.length?t("Replacement pattern has empty `start` parameter"):ol.value({type:"inline-command",start:"",end:e.start,cmd:"mceInsertContent",value:e.replacement}):t("Replacement pattern has non-string `replacement` parameter"):0===e.start.length?t("Block pattern has empty `start` parameter"):o("Block",(t=>({type:"block-format",start:e.start,format:t[0]})),((t, o)=>({type:"block-command",start:e.start,cmd:t,value:o})))},il= e=>K(e,al),ll= e=>K(e,rl),cl= e=>{const t=(e=>{const t=[],o=[];return W(e,(e=>{e.fold((e=>{t.push(e)}),(e=>{o.push(e)}))})),{errors:t,values:o}})(q(e,sl));return W(t.errors,(e=>console.error(e.message,e.pattern))),t.values},dl=xt().deviceType,ul=dl.isTouch(),ml=Os.DOM,gl= e=>m(e,RegExp),pl= e=> t=>t.options.get(e),hl= e=>g(e)||p(e),fl=(e, t="")=> o=>{const n=g(o);if(n){if(-1!==o.indexOf("=")){const r=(e=>{const t=e.indexOf("=")>0?e.split(/[;,](?![^=;,]*(?:[;,]|$))/):e.split(",");return X(t,((e, t)=>{const o=t.split("="),n=o[0],r=o.length>1?o[1]:n;return e[We(n)]=We(r),e}),{})})(o);return{value:xe(r,e.id).getOr(t),valid:n}}return{value:o,valid:n}}return{valid:!1,message:"Must be a string."}},yl=pl("iframe_attrs"),bl=pl("doctype"),vl=pl("document_base_url"),kl=pl("body_id"),wl=pl("body_class"),_l=pl("content_security_policy"),xl=pl("br_in_pre"),Cl=pl("forced_root_block"),Sl=pl("forced_root_block_attrs"),zl=pl("newline_behavior"),Ol=pl("br_newline_selector"),Tl=pl("no_newline_selector"),El=pl("keep_styles"),Al=pl("end_container_on_empty_block"),Ml=pl("automatic_uploads"),Nl=pl("images_reuse_filename"),Rl=pl("images_replace_blob_uris"),Dl=pl("icons"),Bl=pl("icons_url"),Ll=pl("images_upload_url"),Il=pl("images_upload_base_path"),Hl=pl("images_upload_credentials"),Pl=pl("images_upload_handler"),Fl=pl("content_css_cors"),jl=pl("referrer_policy"),Vl=pl("language"),Zl=pl("language_url"),Ul=pl("indent_use_margin"),ql=pl("indentation"),Wl=pl("content_css"),$l=pl("content_style"),Gl=pl("font_css"),Kl=pl("directionality"),Yl=pl("inline_boundaries_selector"),Xl=pl("object_resizing"),Jl=pl("resize_img_proportional"),Ql=pl("placeholder"),ec=pl("event_root"),tc=pl("service_message"),oc=pl("theme"),nc=pl("theme_url"),rc=pl("model"),ac=pl("model_url"),sc=pl("inline_boundaries"),ic=pl("formats"),lc=pl("preview_styles"),cc=pl("format_empty_lines"),dc=pl("format_noneditable_selector"),uc=pl("custom_ui_selector"),mc=pl("inline"),gc=pl("hidden_input"),pc=pl("submit_patch"),hc=pl("add_form_submit_trigger"),fc=pl("add_unload_trigger"),yc=pl("custom_undo_redo_levels"),bc=pl("disable_nodechange"),vc=pl("readonly"),kc=pl("content_css_cors"),wc=pl("plugins"),_c=pl("external_plugins"),xc=pl("block_unsupported_drop"),Cc=pl("visual"),Sc=pl("visual_table_class"),zc=pl("visual_anchor_class"),Oc=pl("iframe_aria_text"),Tc=pl("setup"),Ec=pl("init_instance_callback"),Ac=pl("urlconverter_callback"),Mc=pl("auto_focus"),Nc=pl("browser_spellcheck"),Rc=pl("protect"),Dc=pl("paste_block_drop"),Bc=pl("paste_data_images"),Lc=pl("paste_preprocess"),Ic=pl("paste_postprocess"),Hc=pl("paste_webkit_styles"),Pc=pl("paste_remove_styles_if_webkit"),Fc=pl("paste_merge_formats"),jc=pl("smart_paste"),Vc=pl("paste_as_text"),Zc=pl("paste_tab_spaces"),Uc=pl("allow_html_data_urls"),qc=pl("text_patterns"),Wc=pl("text_patterns_lookup"),$c=pl("noneditable_class"),Gc=pl("editable_class"),Kc=pl("noneditable_regexp"),Yc=pl("preserve_cdata"),Xc=pl("highlight_on_focus"),Jc=pl("xss_sanitization"),Qc= e=>Dt.explode(e.options.get("images_file_types")),ed=pl("table_tab_navigation"),td=jn,od=Yn,nd= e=>{const t=e.parentNode;t&&t.removeChild(e)},rd= e=>{const t=Dr(e);return{count:e.length-t.length,text:t}},ad= e=>{let t;for(; -1!==(t=e.data.lastIndexOf(Nr));)e.deleteData(t,1)},sd=(e, t)=>(ld(e),t),id=(e, t)=>Ni.isTextPosition(t)?((e, t)=>od(e)&&t.container()===e?((e, t)=>{const o=rd(e.data.substr(0,t.offset())),n=rd(e.data.substr(t.offset()));return(o.text+n.text).length>0?(ad(e),Ni(e,t.offset()-o.count)):t})(e,t):sd(e,t))(e,t):((e, t)=>t.container()===e.parentNode?((e, t)=>{const o=t.container(),n=((e, t)=>{const o=V(e,t);return-1===o?H.none():H.some(o)})(ue(o.childNodes),e).map((e=>e<t.offset()?Ni(o,t.offset()-1):t)).getOr(t);return ld(e),n})(e,t):sd(e,t))(e,t),ld= e=>{td(e)&&Pr(e)&&(Fr(e)?e.removeAttribute("data-mce-caret"):nd(e)),od(e)&&(ad(e),0===e.data.length&&nd(e))},cd=ar,dd=lr,ud=sr,md=(e, t, o)=>{const n=si(t.getBoundingClientRect(),o);let r,a;if("BODY"===e.tagName){const t=e.ownerDocument.documentElement;r=e.scrollLeft||t.scrollLeft,a=e.scrollTop||t.scrollTop}else{const t=e.getBoundingClientRect();r=e.scrollLeft-t.left,a=e.scrollTop-t.top}n.left+=r,n.right+=r,n.top+=a,n.bottom+=a,n.width=1;let s=t.offsetWidth-t.clientWidth;return s>0&&(o&&(s*=-1),n.left+=s,n.right+=s),n},gd=(e, t, o, n)=>{const r=Is();let a,s;const i=Cl(e),l=e.dom,c=()=>{(e=>{var t,o;const n=Ln(bo(e),"*[contentEditable=false],video,audio,embed,object");for(let e=0; e<n.length; e++){const r=n[e].dom;let a=r.previousSibling;if(Ur(a)){const e=a.data;1===e.length?null===(t=a.parentNode)||void 0===t||t.removeChild(a):a.deleteData(e.length-1,1)}a=r.nextSibling,Zr(a)&&(1===a.data.length?null===(o=a.parentNode)||void 0===o||o.removeChild(a):a.deleteData(0,1))}})(t),s&&(ld(s),s=null),r.on((e=>{l.remove(e.caret),r.clear()})),a&&(clearInterval(a),a=void 0)};return{show:(e, d)=>{let u;if(c(),ud(d))return null;if(!o(d))return s=((e, t)=>{var o;const n=(null!==(o=e.ownerDocument)&&void 0!==o?o:document).createTextNode(Nr),r=e.parentNode;if(t){const t=e.previousSibling;if(Lr(t)){if(Pr(t))return t;if(Ur(t))return t.splitText(t.data.length-1)}null==r||r.insertBefore(n,e)}else{const t=e.nextSibling;if(Lr(t)){if(Pr(t))return t;if(Zr(t))return t.splitText(1),t}e.nextSibling?null==r||r.insertBefore(n,e.nextSibling):null==r||r.appendChild(n)}return n})(d,e),u=d.ownerDocument.createRange(),hd(s.nextSibling)?(u.setStart(s,0),u.setEnd(s,0)):(u.setStart(s,1),u.setEnd(s,1)),u;{const o=((e, t, o)=>{var n;const r=(null!==(n=t.ownerDocument)&&void 0!==n?n:document).createElement(e);r.setAttribute("data-mce-caret",o?"before":"after"),r.setAttribute("data-mce-bogus","all"),r.appendChild(Er().dom);const a=t.parentNode;return o?null==a||a.insertBefore(r,t):t.nextSibling?null==a||a.insertBefore(r,t.nextSibling):null==a||a.appendChild(r),r})(i,d,e),c=md(t,d,e);l.setStyle(o,"top",c.top),s=o;const m=l.create("div",{class:"mce-visual-caret","data-mce-bogus":"all"});l.setStyles(m,{...c}),l.add(t,m),r.set({caret:m,element:d,before:e}),e&&l.addClass(m,"mce-visual-caret-before"),a=setInterval((()=>{r.on((e=>{n()?l.toggleClass(e.caret,"mce-visual-caret-hidden"):l.addClass(e.caret,"mce-visual-caret-hidden")}))}),500),u=d.ownerDocument.createRange(),u.setStart(o,0),u.setEnd(o,0)}return u},hide:c,getCss:()=>".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;}",reposition:()=>{r.on((e=>{const o=md(t,e.element,e.before);l.setStyles(e.caret,{...o})}))},destroy:()=>clearInterval(a)}},pd=()=>At.browser.isFirefox(),hd= e=>cd(e)||dd(e),fd= e=>(hd(e)||$n(e)&&pd())&&Eo(bo(e)).exists(tn),yd=rr,bd=ar,vd=lr,kd=Un("display","block table table-cell table-caption list-item"),wd=Pr,_d=Ir,xd=jn,Cd=Yn,Sd=ta,zd= e=>e>0,Od= e=>e<0,Td=(e, t)=>{let o;for(; o=e(t);)if(!_d(o))return o;return null},Ed=(e, t, o, n, r)=>{const a=new Hn(e,n),s=bd(e)||_d(e);let i;if(Od(t)){if(s&&(i=Td(a.prev.bind(a),!0),o(i)))return i;for(; i=Td(a.prev.bind(a),r);)if(o(i))return i}if(zd(t)){if(s&&(i=Td(a.next.bind(a),!0),o(i)))return i;for(; i=Td(a.next.bind(a),r);)if(o(i))return i}return null},Ad=(e, t)=>{for(; e&&e!==t;){if(kd(e))return e;e=e.parentNode}return null},Md=(e, t, o)=>Ad(e.container(),o)===Ad(t.container(),o),Nd=(e, t)=>{if(!t)return H.none();const o=t.container(),n=t.offset();return xd(o)?H.from(o.childNodes[n+e]):H.none()},Rd=(e, t)=>{var o;const n=(null!==(o=t.ownerDocument)&&void 0!==o?o:document).createRange();return e?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),n},Dd=(e, t, o)=>Ad(t,e)===Ad(o,e),Bd=(e, t, o)=>{const n=e?"previousSibling":"nextSibling";let r=o;for(; r&&r!==t;){let e=r[n];if(e&&wd(e)&&(e=e[n]),bd(e)||vd(e)){if(Dd(t,e,r))return e;break}if(Sd(e))break;r=r.parentNode}return null},Ld=M(Rd,!0),Id=M(Rd,!1),Hd=(e, t, o)=>{let n;const r=M(Bd,!0,t),a=M(Bd,!1,t),s=o.startContainer,i=o.startOffset;if(Ir(s)){const e=Cd(s)?s.parentNode:s,t=e.getAttribute("data-mce-caret");if("before"===t&&(n=e.nextSibling,fd(n)))return Ld(n);if("after"===t&&(n=e.previousSibling,fd(n)))return Id(n)}if(!o.collapsed)return o;if(Yn(s)){if(wd(s)){if(1===e){if(n=a(s),n)return Ld(n);if(n=r(s),n)return Id(n)}if(-1===e){if(n=r(s),n)return Id(n);if(n=a(s),n)return Ld(n)}return o}if(Ur(s)&&i>=s.data.length-1)return 1===e&&(n=a(s),n)?Ld(n):o;if(Zr(s)&&i<=1)return-1===e&&(n=r(s),n)?Id(n):o;if(i===s.data.length)return n=a(s),n?Ld(n):o;if(0===i)return n=r(s),n?Id(n):o}return o},Pd=(e, t)=>Nd(e?0:-1,t).filter(bd),Fd=(e, t, o)=>{const n=Hd(e,t,o);return-1===e?Ni.fromRangeStart(n):Ni.fromRangeEnd(n)},jd= e=>H.from(e.getNode()).map(bo),Vd=(e, t)=>{let o=t;for(; o=e(o);)if(o.isVisible())return o;return o},Zd=(e, t)=>{const o=Md(e,t);return!(o||!or(e.getNode()))||o};var Ud;!function(e){e[e.Backwards=-1]="Backwards",e[e.Forwards=1]="Forwards"}(Ud||(Ud={}));const qd=ar,Wd=Yn,$d=jn,Gd=or,Kd=ta,Yd= e=>Jr(e)||(e=>!!oa(e)&&!X(ue(e.getElementsByTagName("*")),((e, t)=>e||$r(t)),!1))(e),Xd=na,Jd=(e, t)=>e.hasChildNodes()&&t<e.childNodes.length?e.childNodes[t]:null,Qd=(e, t)=>{if(zd(e)){if(Kd(t.previousSibling)&&!Wd(t.previousSibling))return Ni.before(t);if(Wd(t))return Ni(t,0)}if(Od(e)){if(Kd(t.nextSibling)&&!Wd(t.nextSibling))return Ni.after(t);if(Wd(t))return Ni(t,t.data.length)}return Od(e)?Gd(t)?Ni.before(t):Ni.after(t):Ni.before(t)},eu=(e, t, o)=>{let n,r,a,s;if(!$d(o)||!t)return null;if(t.isEqual(Ni.after(o))&&o.lastChild){if(s=Ni.after(o.lastChild),Od(e)&&Kd(o.lastChild)&&$d(o.lastChild))return Gd(o.lastChild)?Ni.before(o.lastChild):s}else s=t;const i=s.container();let l=s.offset();if(Wd(i)){if(Od(e)&&l>0)return Ni(i,--l);if(zd(e)&&l<i.length)return Ni(i,++l);n=i}else{if(Od(e)&&l>0&&(r=Jd(i,l-1),Kd(r)))return!Yd(r)&&(a=Ed(r,e,Xd,r),a)?Wd(a)?Ni(a,a.data.length):Ni.after(a):Wd(r)?Ni(r,r.data.length):Ni.before(r);if(zd(e)&&l<i.childNodes.length&&(r=Jd(i,l),Kd(r)))return Gd(r)?((e, t)=>{const o=t.nextSibling;return o&&Kd(o)?Wd(o)?Ni(o,0):Ni.before(o):eu(Ud.Forwards,Ni.after(t),e)})(o,r):!Yd(r)&&(a=Ed(r,e,Xd,r),a)?Wd(a)?Ni(a,0):Ni.before(a):Wd(r)?Ni(r,0):Ni.after(r);n=r||s.getNode()}if(n&&(zd(e)&&s.isAtEnd()||Od(e)&&s.isAtStart())&&(n=Ed(n,e,I,o,!0),Xd(n,o)))return Qd(e,n);r=n?Ed(n,e,Xd,o):n;const c=De(K(((e, t)=>{const o=[];let n=e;for(; n&&n!==t;)o.push(n),n=n.parentNode;return o})(i,o),qd));return!c||r&&c.contains(r)?r?Qd(e,r):null:(s=zd(e)?Ni.after(c):Ni.before(c),s)},tu= e=>({next: t=>eu(Ud.Forwards,t,e),prev: t=>eu(Ud.Backwards,t,e)}),ou= e=>Ni.isTextPosition(e)?0===e.offset():ta(e.getNode()),nu= e=>{if(Ni.isTextPosition(e)){const t=e.container();return e.offset()===t.data.length}return ta(e.getNode(!0))},ru=(e, t)=>!Ni.isTextPosition(e)&&!Ni.isTextPosition(t)&&e.getNode()===t.getNode(!0),au=(e, t, o)=>{const n=tu(t);return H.from(e?n.next(o):n.prev(o))},su=(e, t, o)=>au(e,t,o).bind((n=>Md(o,n,t)&&((e, t, o)=>{return e?!ru(t,o)&&(n=t,!(!Ni.isTextPosition(n)&&or(n.getNode())))&&nu(t)&&ou(o):!ru(o,t)&&ou(t)&&nu(o);var n})(e,o,n)?au(e,t,n):H.some(n))),iu=(e, t, o, n)=>su(e,t,o).bind((o=>n(o)?iu(e,t,o,n):H.some(o))),lu=(e, t)=>{const o=e?t.firstChild:t.lastChild;return Yn(o)?H.some(Ni(o,e?0:o.data.length)):o?ta(o)?H.some(e?Ni.before(o):or(n=o)?Ni.before(n):Ni.after(n)):((e, t, o)=>{const n=e?Ni.before(o):Ni.after(o);return au(e,t,n)})(e,t,o):H.none();var n},cu=M(au,!0),du=M(au,!1),uu=M(lu,!0),mu=M(lu,!1),gu="_mce_caret",pu= e=>jn(e)&&e.id===gu,hu=(e, t)=>{let o=t;for(; o&&o!==e;){if(pu(o))return o;o=o.parentNode}return null},fu= e=>Ce(e,"name"),yu= e=>Dt.isArray(e.start),bu= e=>!(!fu(e)&&b(e.forward))||e.forward,vu=(e, t)=>(jn(t)&&e.isBlock(t)&&!t.innerHTML&&(t.innerHTML='<br data-mce-bogus="1" />'),t),ku=(e, t)=>mu(e).fold(L,(e=>(t.setStart(e.container(),e.offset()),t.setEnd(e.container(),e.offset()),!0))),wu=(e, t, o)=>!(!(e=>!e.hasChildNodes())(t)||!hu(e,t)||(((e, t)=>{var o;const n=(null!==(o=e.ownerDocument)&&void 0!==o?o:document).createTextNode(Nr);e.appendChild(n),t.setStart(n,0),t.setEnd(n,0)})(t,o),0)),_u=(e, t, o, n)=>{const r=o[t?"start":"end"],a=e.getRoot();if(r){let e=a,o=r[0];for(let t=r.length-1; e&&t>=1; t--){const o=e.childNodes;if(wu(a,e,n))return!0;if(r[t]>o.length-1)return!!wu(a,e,n)||ku(e,n);e=o[r[t]]}Yn(e)&&(o=Math.min(r[0],e.data.length)),jn(e)&&(o=Math.min(r[0],e.childNodes.length)),t?n.setStart(e,o):n.setEnd(e,o)}return!0},xu= e=>Yn(e)&&e.data.length>0,Cu=(e, t, o)=>{const n=e.get(o.id+"_"+t),r=null==n?void 0:n.parentNode,a=o.keep;if(n&&r){let s,i;if("start"===t?a?n.hasChildNodes()?(s=n.firstChild,i=1):xu(n.nextSibling)?(s=n.nextSibling,i=0):xu(n.previousSibling)?(s=n.previousSibling,i=n.previousSibling.data.length):(s=r,i=e.nodeIndex(n)+1):(s=r,i=e.nodeIndex(n)):a?n.hasChildNodes()?(s=n.firstChild,i=1):xu(n.previousSibling)?(s=n.previousSibling,i=n.previousSibling.data.length):(s=r,i=e.nodeIndex(n)):(s=r,i=e.nodeIndex(n)),!a){const r=n.previousSibling,a=n.nextSibling;let l;for(Dt.each(Dt.grep(n.childNodes),(e=>{Yn(e)&&(e.data=e.data.replace(/\uFEFF/g,""))})); l=e.get(o.id+"_"+t);)e.remove(l,!0);if(Yn(a)&&Yn(r)&&!At.browser.isOpera()){const t=r.data.length;r.appendData(a.data),e.remove(a),s=r,i=t}}return H.some(Ni(s,i))}return H.none()},Su=(e, t, o)=>((e, t, o=!1)=>2===t?Yi(Dr,o,e):3===t?(e=>{const t=e.getRng();return{start:Vi(e.dom.getRoot(),Ni.fromRangeStart(t)),end:Vi(e.dom.getRoot(),Ni.fromRangeEnd(t)),forward:e.isForward()}})(e):t?(e=>({rng:e.getRng(),forward:e.isForward()}))(e):Ji(e,!1))(e,t,o),zu=(e, t)=>{((e, t)=>{const o=e.dom;if(t){if(yu(t))return((e, t)=>{const o=e.createRng();return _u(e,!0,t,o)&&_u(e,!1,t,o)?H.some({range:o,forward:bu(t)}):H.none()})(o,t);if((e=>g(e.start))(t))return((e, t)=>{const o=H.from(Zi(e.getRoot(),t.start)),n=H.from(Zi(e.getRoot(),t.end));return Lt(o,n,((o, n)=>{const r=e.createRng();return r.setStart(o.container(),o.offset()),r.setEnd(n.container(),n.offset()),{range:r,forward:bu(t)}}))})(o,t);if((e=>Ce(e,"id"))(t))return((e, t)=>{const o=Cu(e,"start",t),n=Cu(e,"end",t);return Lt(o,n.or(o),((o, n)=>{const r=e.createRng();return r.setStart(vu(e,o.container()),o.offset()),r.setEnd(vu(e,n.container()),n.offset()),{range:r,forward:bu(t)}}))})(o,t);if(fu(t))return((e, t)=>H.from(e.select(t.name)[t.index]).map((t=>{const o=e.createRng();return o.selectNode(t),{range:o,forward:!0}})))(o,t);if((e=>Ce(e,"rng"))(t))return H.some({range:t.rng,forward:bu(t)})}return H.none()})(e,t).each((({range:t,forward:o})=>{e.setRng(t,o)}))},Ou= e=>jn(e)&&"SPAN"===e.tagName&&"bookmark"===e.getAttribute("data-mce-type"),Tu=(Eu=ur, e=>Eu===e);var Eu;const Au= e=>""!==e&&-1!==" \f\n\r\t\v".indexOf(e),Mu= e=>!Au(e)&&!Tu(e)&&!mr(e),Nu= e=>{const t=e.toString(16);return(1===t.length?"0"+t:t).toUpperCase()},Ru= e=>(e=>{return{value:(t=e,je(t,"#").toUpperCase())};var t})(Nu(e.red)+Nu(e.green)+Nu(e.blue)),Du=/^\s*rgb\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)\s*$/i,Bu=/^\s*rgba\s*\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d?(?:\.\d+)?)\s*\)\s*$/i,Lu=(e, t, o, n)=>({red:e,green:t,blue:o,alpha:n}),Iu=(e, t, o, n)=>{const r=parseInt(e,10),a=parseInt(t,10),s=parseInt(o,10),i=parseFloat(n);return Lu(r,a,s,i)},Hu= e=>(e=>{if("transparent"===e)return H.some(Lu(0,0,0,0));const t=Du.exec(e);if(null!==t)return H.some(Iu(t[1],t[2],t[3],"1"));const o=Bu.exec(e);return null!==o?H.some(Iu(o[1],o[2],o[3],o[4])):H.none()})(e).map(Ru).map((e=>"#"+e.value)).getOr(e),Pu= e=>{const t=[];if(e)for(let o=0; o<e.rangeCount; o++)t.push(e.getRangeAt(o));return t},Fu=(e, t)=>{const o=Ln(t,"td[data-mce-selected],th[data-mce-selected]");return o.length>0?o:(e=>K((e=>oe(e,(e=>{const t=ui(e);return t?[bo(t)]:[]})))(e),Sr))(e)},ju= e=>Fu(Pu(e.selection.getSel()),bo(e.getBody())),Vu=(e, t)=>Jo(e,"table",t),Zu= e=>Io(e).fold(T([e]),(t=>[e].concat(Zu(t)))),Uu= e=>Ho(e).fold(T([e]),(t=>"br"===Vt(t)?Mo(t).map((t=>[e].concat(Uu(t)))).getOr([]):[e].concat(Uu(t)))),qu=(e, t)=>Lt((e=>{const t=e.startContainer,o=e.startOffset;return Yn(t)?0===o?H.some(bo(t)):H.none():H.from(t.childNodes[o]).map(bo)})(t),(e=>{const t=e.endContainer,o=e.endOffset;return Yn(t)?o===t.data.length?H.some(bo(t)):H.none():H.from(t.childNodes[o-1]).map(bo)})(t),((t, o)=>{const n=Q(Zu(e),M(xo,t)),r=Q(Uu(e),M(xo,o));return n.isSome()&&r.isSome()})).getOr(!1),Wu=(e, t, o, n)=>{const r=o,a=new Hn(o,r),s=ke(e.schema.getMoveCaretBeforeOnEnterElements(),((e, t)=>!Z(["td","th","table"],t.toLowerCase())));let i=o;do{if(Yn(i)&&0!==Dt.trim(i.data).length)return void(n?t.setStart(i,0):t.setEnd(i,i.data.length));if(s[i.nodeName])return void(n?t.setStartBefore(i):"BR"===i.nodeName?t.setEndBefore(i):t.setEndAfter(i))}while(i=n?a.next():a.prev());"BODY"===r.nodeName&&(n?t.setStart(r,0):t.setEnd(r,r.childNodes.length))},$u= e=>{const t=e.selection.getSel();return w(t)&&t.rangeCount>0},Gu=(e, t)=>{const o=ju(e);o.length>0?W(o,(o=>{const n=o.dom,r=e.dom.createRng();r.setStartBefore(n),r.setEndAfter(n),t(r,!0)})):t(e.selection.getRng(),!1)},Ku=(e, t, o)=>{const n=Ji(e,t);o(n),e.moveToBookmark(n)},Yu= e=>x(null==e?void 0:e.nodeType),Xu= e=>jn(e)&&!Ou(e)&&!pu(e)&&!Wn(e),Ju= e=>!0===e.isContentEditable,Qu=(e, t, o)=>{const{selection:n,dom:r}=e,a=n.getNode(),s=ar(a);Ku(n,!0,(()=>{t()})),s&&ar(a)&&r.isChildOf(a,e.getBody())?e.selection.select(a):o(n.getStart())&&em(r,n)},em=(e, t)=>{var o,n;const r=t.getRng(),{startContainer:a,startOffset:s}=r;if(!((e, t)=>{if(Xu(t)&&!/^(TD|TH)$/.test(t.nodeName)){const o=e.getAttrib(t,"data-mce-selected"),n=parseInt(o,10);return!isNaN(n)&&n>0}return!1})(e,t.getNode())&&jn(a)){const i=a.childNodes,l=e.getRoot();let c;if(s<i.length){const t=i[s];c=new Hn(t,null!==(o=e.getParent(t,e.isBlock))&&void 0!==o?o:l)}else{const t=i[i.length-1];c=new Hn(t,null!==(n=e.getParent(t,e.isBlock))&&void 0!==n?n:l),c.next(!0)}for(let o=c.current(); o; o=c.next()){if("false"===e.getContentEditable(o))return;if(Yn(o)&&!rm(o))return r.setStart(o,0),void t.setRng(r)}}},tm=(e, t, o)=>{if(e){const n=t?"nextSibling":"previousSibling";for(e=o?e:e[n]; e; e=e[n])if(jn(e)||!rm(e))return e}},om=(e, t)=>!!e.getTextBlockElements()[t.nodeName.toLowerCase()]||Ca(e,t),nm=(e, t, o)=>e.schema.isValidChild(t,o),rm=(e, t=!1)=>{if(w(e)&&Yn(e)){const o=t?e.data.replace(/ /g," "):e.data;return aa(o)}return!1},am=(e, t)=>{const o=e.dom;return Xu(t)&&"false"===o.getContentEditable(t)&&((e, t)=>{const o="[data-mce-cef-wrappable]",n=dc(e),r=Ye(n)?o:`${o},${n}`;return wo(bo(t),r)})(e,t)&&0===o.select('[contenteditable="true"]',t).length},sm=(e, t)=>_(e)?e(t):(w(t)&&(e=e.replace(/%(\w+)/g,((e, o)=>t[o]||e))),e),im=(e, t)=>(t=t||"",e=""+((e=e||"").nodeName||e),t=""+(t.nodeName||t),e.toLowerCase()===t.toLowerCase()),lm=(e, t)=>{if(k(e))return null;{let o=String(e);return"color"!==t&&"backgroundColor"!==t||(o=Hu(o)),"fontWeight"===t&&700===e&&(o="bold"),"fontFamily"===t&&(o=o.replace(/[\'\"]/g,"").replace(/,\s+/g,",")),o}},cm=(e, t, o)=>{const n=e.getStyle(t,o);return lm(n,o)},dm=(e, t)=>{let o;return e.getParent(t,(t=>!!jn(t)&&(o=e.getStyle(t,"text-decoration"),!!o&&"none"!==o))),o},um=(e, t, o)=>e.getParents(t,o,e.getRoot()),mm=(e, t, o)=>{const n=e.formatter.get(t);return w(n)&&U(n,o)},gm= e=>Se(e,"block"),pm= e=>Se(e,"selector"),hm= e=>Se(e,"inline"),fm= e=>pm(e)&&!1!==e.expand&&!hm(e),ym=Ou,bm=um,vm=rm,km=om,wm=(e, t)=>{let o=t;for(; o;){if(jn(o)&&e.getContentEditable(o))return"false"===e.getContentEditable(o)?o:t;o=o.parentNode}return t},_m=(e, t, o, n)=>{const r=t.data;if(e){for(let e=o; e>0; e--)if(n(r.charAt(e-1)))return e}else for(let e=o; e<r.length; e++)if(n(r.charAt(e)))return e;return-1},xm=(e, t, o)=>_m(e,t,o,(e=>Tu(e)||Au(e))),Cm=(e, t, o)=>_m(e,t,o,Mu),Sm=(e, t, o, n, r, a)=>{let s;const i=e.getParent(o,e.isBlock)||t,l=(t, o, n)=>{const a=ni(e),l=r?a.backwards:a.forwards;return H.from(l(t,o,((e, t)=>ym(e.parentNode)?-1:(s=e,n(r,e,t))),i))};return l(o,n,xm).bind((e=>a?l(e.container,e.offset+(r?-1:0),Cm):H.some(e))).orThunk((()=>s?H.some({container:s,offset:r?0:s.length}):H.none()))},zm=(e, t, o, n, r)=>{const a=n[r];Yn(n)&&Ye(n.data)&&a&&(n=a);const s=bm(e,n);for(let n=0; n<s.length; n++)for(let r=0; r<t.length; r++){const a=t[r];if((!w(a.collapsed)||a.collapsed===o.collapsed)&&pm(a)&&e.is(s[n],a.selector))return s[n]}return n},Om=(e, t, o, n)=>{var r;let a=o;const s=e.getRoot(),i=t[0];if(gm(i)&&(a=i.wrapper?null:e.getParent(o,i.block,s)),!a){const t=null!==(r=e.getParent(o,"LI,TD,TH"))&&void 0!==r?r:s;a=e.getParent(Yn(o)?o.parentNode:o,(t=>t!==s&&km(e.schema,t)),t)}if(a&&gm(i)&&i.wrapper&&(a=bm(e,a,"ul,ol").reverse()[0]||a),!a)for(a=o; a&&a[n]&&!e.isBlock(a[n])&&(a=a[n],!im(a,"br")););return a||o},Tm=(e, t, o, n)=>{const r=o.parentNode;return!w(o[n])&&(!(r!==t&&!k(r)&&!e.isBlock(r))||Tm(e,t,r,n))},Em=(e, t, o, n, r)=>{let a=o;const s=r?"previousSibling":"nextSibling",i=e.getRoot();if(Yn(o)&&!vm(o)&&(r?n>0:n<o.data.length))return o;for(; a;){if(!t[0].block_expand&&e.isBlock(a))return a;for(let t=a[s]; t; t=t[s]){const o=Yn(t)&&!Tm(e,i,t,s);if(!ym(t)&&(!or(l=t)||!l.getAttribute("data-mce-bogus")||l.nextSibling)&&!vm(t,o))return a}if(a===i||a.parentNode===i){o=a;break}a=a.parentNode}var l;return o},Am= e=>ym(e.parentNode)||ym(e),Mm=(e, t, o, n=!1)=>{let{startContainer:r,startOffset:a,endContainer:s,endOffset:i}=t;const l=o[0];return jn(r)&&r.hasChildNodes()&&(r=mi(r,a),Yn(r)&&(a=0)),jn(s)&&s.hasChildNodes()&&(s=mi(s,t.collapsed?i:i-1),Yn(s)&&(i=s.data.length)),r=wm(e,r),s=wm(e,s),Am(r)&&(r=ym(r)?r:r.parentNode,r=t.collapsed?r.previousSibling||r:r.nextSibling||r,Yn(r)&&(a=t.collapsed?r.length:0)),Am(s)&&(s=ym(s)?s:s.parentNode,s=t.collapsed?s.nextSibling||s:s.previousSibling||s,Yn(s)&&(i=t.collapsed?0:s.length)),t.collapsed&&(Sm(e,e.getRoot(),r,a,!0,n).each((({container:e,offset:t})=>{r=e,a=t})),Sm(e,e.getRoot(),s,i,!1,n).each((({container:e,offset:t})=>{s=e,i=t}))),(hm(l)||l.block_expand)&&(hm(l)&&Yn(r)&&0!==a||(r=Em(e,o,r,a,!0)),hm(l)&&Yn(s)&&i!==s.data.length||(s=Em(e,o,s,i,!1))),fm(l)&&(r=zm(e,o,t,r,"previousSibling"),s=zm(e,o,t,s,"nextSibling")),(gm(l)||pm(l))&&(r=Om(e,o,r,"previousSibling"),s=Om(e,o,s,"nextSibling"),gm(l)&&(e.isBlock(r)||(r=Em(e,o,r,a,!0)),e.isBlock(s)||(s=Em(e,o,s,i,!1)))),jn(r)&&r.parentNode&&(a=e.nodeIndex(r),r=r.parentNode),jn(s)&&s.parentNode&&(i=e.nodeIndex(s)+1,s=s.parentNode),{startContainer:r,startOffset:a,endContainer:s,endOffset:i}},Nm=(e, t, o)=>{var n;const r=t.startOffset,a=mi(t.startContainer,r),s=t.endOffset,i=mi(t.endContainer,s-1),l= e=>{const t=e[0];Yn(t)&&t===a&&r>=t.data.length&&e.splice(0,1);const o=e[e.length-1];return 0===s&&e.length>0&&o===i&&Yn(o)&&e.splice(e.length-1,1),e},c=(e, t, o)=>{const n=[];for(; e&&e!==o; e=e[t])n.push(e);return n},d=(t, o)=>e.getParent(t,(e=>e.parentNode===o),o),u=(e, t, n)=>{const r=n?"nextSibling":"previousSibling";for(let a=e,s=a.parentNode; a&&a!==t; a=s){s=a.parentNode;const t=c(a===e?a:a[r],r);t.length&&(n||t.reverse(),o(l(t)))}};if(a===i)return o(l([a]));const m=null!==(n=e.findCommonAncestor(a,i))&&void 0!==n?n:e.getRoot();if(e.isChildOf(a,i))return u(a,m,!0);if(e.isChildOf(i,a))return u(i,m);const g=d(a,m)||a,p=d(i,m)||i;u(a,g,!0);const h=c(g===a?g:g.nextSibling,"nextSibling",p===i?p.nextSibling:p);h.length&&o(l(h)),u(i,p)},Rm=['pre[class*=language-][contenteditable="false"]',"figure.image","div[data-ephox-embed-iri]","div.tiny-pageembed","div.mce-toc","div[data-mce-toc]"],Dm=(e, t, o, n, r, a)=>{const{uid:s=t,...i}=o;co(e,Fs()),Xt(e,`${Vs()}`,s),Xt(e,`${js()}`,n);const{attributes:l={},classes:c=[]}=r(s,i);if(Jt(e,l),((e, t)=>{W(t,(t=>{co(e,t)}))})(e,c),a){c.length>0&&Xt(e,`${Us()}`,c.join(","));const t=ge(l);t.length>0&&Xt(e,`${qs()}`,t.join(","))}},Bm=(e, t, o, n, r)=>{const a=fo("span",e);return Dm(a,t,o,n,r,!1),a},Lm=(e, t, o, n, r, a)=>{const s=[],i=Bm(e.getDoc(),o,a,n,r),l=Is(),c=()=>{l.clear()},d= e=>{W(e,u)},u= t=>{switch(((e, t, o, n)=>To(t).fold((()=>"skipping"),(r=>"br"===n||(e=>Wt(e)&&pr(e)===Nr)(t)?"valid":(e=>qt(e)&&go(e,Fs()))(t)?"existing":pu(t.dom)?"caret":U(Rm,(e=>wo(t,e)))?"valid-block":nm(e,o,n)&&nm(e,Vt(r),o)?"valid":"invalid-child")))(e,t,"span",Vt(t))){case"invalid-child":{c();const e=Bo(t);d(e),c();break}case"valid-block":c(),Dm(t,o,a,n,r,!0);break;case"valid":{const e=l.get().getOrThunk((()=>{const e=ei(i);return s.push(e),l.set(e),e}));yn(t,e);break}}};return Nm(e.dom,t,(e=>{c(),(e=>{const t=q(e,bo);d(t)})(e)})),s},Im= e=>{const t=(()=>{const e={};return{register:(t, o)=>{e[t]={name:t,settings:o}},lookup: t=>xe(e,t).map((e=>e.settings)),getNames:()=>ge(e)}})();((e, t)=>{const o=js(),n= e=>H.from(e.attr(o)).bind(t.lookup),r= e=>{var t,o;e.attr(Vs(),null),e.attr(js(),null),e.attr(Zs(),null);const n=H.from(e.attr(qs())).map((e=>e.split(","))).getOr([]),r=H.from(e.attr(Us())).map((e=>e.split(","))).getOr([]);W(n,(t=>e.attr(t,null)));const a=null!==(o=null===(t=e.attr("class"))||void 0===t?void 0:t.split(" "))&&void 0!==o?o:[],s=ae(a,[Fs()].concat(r));e.attr("class",s.length>0?s.join(" "):null),e.attr(Us(),null),e.attr(qs(),null)};e.serializer.addTempAttr(Zs()),e.serializer.addAttributeFilter(o,(e=>{for(const t of e)n(t).each((e=>{!1===e.persistent&&("span"===t.name?t.unwrap():r(t))}))}))})(e,t);const o=((e, t)=>{const o=As({}),n=()=>({listeners:[],previous:Is()}),r=(e, t)=>{a(e,(e=>(t(e),e)))},a=(e, t)=>{const r=o.get(),a=t(xe(r,e).getOrThunk(n));r[e]=a,o.set(r)},s=(t, o)=>{W(Ks(e,t),(e=>{o?Xt(e,Zs(),"true"):oo(e,Zs())}))},i=Ps((()=>{const o=ie(t.getNames());W(o,(t=>{a(t,(o=>{const n=o.previous.get();return $s(e,H.some(t)).fold((()=>{n.each((e=>{(e=>{r(e,(t=>{W(t.listeners,(t=>t(!1,e)))}))})(t),o.previous.clear(),s(e,!1)}))}),(({uid:e,name:t,elements:a})=>{Bt(n,e)||(n.each((e=>s(e,!1))),((e, t, o)=>{r(e,(n=>{W(n.listeners,(n=>n(!0,e,{uid:t,nodes:q(o,(e=>e.dom))})))}))})(t,e,a),o.previous.set(e),s(e,!0))})),{previous:o.previous,listeners:o.listeners}}))}))}),30);return e.on("remove",(()=>{i.cancel()})),e.on("NodeChange",(()=>{i.throttle()})),{addListener:(e, t)=>{a(e,(e=>({previous:e.previous,listeners:e.listeners.concat([t])})))}}})(e,t),n=Kt("span"),r= e=>{W(e,(e=>{n(e)?wn(e):(e=>{mo(e,Fs()),oo(e,`${Vs()}`),oo(e,`${js()}`),oo(e,`${Zs()}`);const t=eo(e,`${qs()}`).map((e=>e.split(","))).getOr([]),o=eo(e,`${Us()}`).map((e=>e.split(","))).getOr([]);var n;W(t,(t=>oo(e,t))),n=e,W(o,(e=>{mo(n,e)})),oo(e,`${Us()}`),oo(e,`${qs()}`)})(e)}))};return{register:(e, o)=>{t.register(e,o)},annotate:(o, n)=>{t.lookup(o).each((t=>{((e, t, o, n)=>{e.undoManager.transact((()=>{const r=e.selection,a=r.getRng(),s=ju(e).length>0,i=Js("mce-annotation");if(a.collapsed&&!s&&((e, t)=>{const o=Mm(e.dom,t,[{inline:"span"}]);t.setStart(o.startContainer,o.startOffset),t.setEnd(o.endContainer,o.endOffset),e.selection.setRng(t)})(e,a),r.getRng().collapsed&&!s){const a=Bm(e.getDoc(),i,n,t,o.decorate);Cn(a,ur),r.getRng().insertNode(a.dom),r.select(a.dom)}else Ku(r,!1,(()=>{Gu(e,(r=>{Lm(e,r,i,t,o.decorate,n)}))}))}))})(e,o,t,n)}))},annotationChanged:(e, t)=>{o.addListener(e,t)},remove: t=>{$s(e,H.some(t)).each((({elements:t})=>{const o=e.selection.getBookmark();r(t),e.selection.moveToBookmark(o)}))},removeAll: t=>{const o=e.selection.getBookmark();he(Ys(e,t),((e, t)=>{r(e)})),e.selection.moveToBookmark(o)},getAll: t=>{const o=Ys(e,t);return fe(o,(e=>q(e,(e=>e.dom))))}}},Hm= e=>({getBookmark:M(Su,e),moveToBookmark:M(zu,e)});Hm.isBookmarkNode=Ou;const Pm=(e, t, o)=>!o.collapsed&&U(o.getClientRects(),(o=>((e, t, o)=>t>=e.left&&t<=e.right&&o>=e.top&&o<=e.bottom)(o,e,t))),Fm=(e, t, o)=>{e.dispatch(t,o)},jm=(e, t, o, n)=>{e.dispatch("FormatApply",{format:t,node:o,vars:n})},Vm=(e, t, o, n)=>{e.dispatch("FormatRemove",{format:t,node:o,vars:n})},Zm=(e, t)=>e.dispatch("SetContent",t),Um=(e, t)=>e.dispatch("GetContent",t),qm=(e, t)=>e.dispatch("PastePlainTextToggle",{state:t}),Wm={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||Wm.metaKeyPressed(e),metaKeyPressed: e=>At.os.isMacOS()||At.os.isiOS()?e.metaKey:e.ctrlKey&&!e.altKey},$m="data-mce-selected",Gm=Math.abs,Km=Math.round,Ym={nw:[0,0,-1,-1],ne:[1,0,1,-1],se:[1,1,1,1],sw:[0,1,-1,1]},Xm=(e, t)=>{const o=t.dom,n=t.getDoc(),r=document,a=t.getBody();let s,i,l,c,d,u,m,g,p,h,f,y,b,v,k;const _= e=>w(e)&&(nr(e)||o.is(e,"figure.image")),x= e=>lr(e)||o.hasClass(e,"mce-preview-object"),C= e=>{const o=e.target;((e, t)=>{if((e=>"longpress"===e.type||0===e.type.indexOf("touch"))(e)){const o=e.touches[0];return _(e.target)&&!Pm(o.clientX,o.clientY,t)}return _(e.target)&&!Pm(e.clientX,e.clientY,t)})(e,t.selection.getRng())&&!e.isDefaultPrevented()&&t.selection.select(o)},S= e=>o.hasClass(e,"mce-preview-object")&&w(e.firstElementChild)?[e,e.firstElementChild]:o.is(e,"figure.image")?[e.querySelector("img")]:[e],z= e=>{const n=Xl(t);return!!n&&"false"!==e.getAttribute("data-mce-resize")&&e!==t.getBody()&&(o.hasClass(e,"mce-preview-object")&&w(e.firstElementChild)?wo(bo(e.firstElementChild),n):wo(bo(e),n))},O=(e, n, r)=>{if(w(r)){const a=S(e);W(a,(e=>{e.style[n]||!t.schema.isValid(e.nodeName.toLowerCase(),n)?o.setStyle(e,n,r):o.setAttrib(e,n,""+r)}))}},T=(e, t, o)=>{O(e,"width",t),O(e,"height",o)},E= e=>{let n,r,d,w,C;n=e.screenX-u,r=e.screenY-m,y=n*c[2]+g,b=r*c[3]+p,y=y<5?5:y,b=b<5?5:b,d=(_(s)||x(s))&&!1!==Jl(t)?!Wm.modifierPressed(e):Wm.modifierPressed(e),d&&(Gm(n)>Gm(r)?(b=Km(y*h),y=Km(b/h)):(y=Km(b/h),b=Km(y*h))),T(i,y,b),w=c.startPos.x+n,C=c.startPos.y+r,w=w>0?w:0,C=C>0?C:0,o.setStyles(l,{left:w,top:C,display:"block"}),l.innerHTML=y+" &times; "+b,c[2]<0&&i.clientWidth<=y&&o.setStyle(i,"left",void 0+(g-y)),c[3]<0&&i.clientHeight<=b&&o.setStyle(i,"top",void 0+(p-b)),n=a.scrollWidth-v,r=a.scrollHeight-k,n+r!==0&&o.setStyles(l,{left:w-n,top:C-r}),f||(((e, t, o, n, r)=>{e.dispatch("ObjectResizeStart",{target:t,width:o,height:n,origin:r})})(t,s,g,p,"corner-"+c.name),f=!0)},A=()=>{const e=f;f=!1,e&&(O(s,"width",y),O(s,"height",b)),o.unbind(n,"mousemove",E),o.unbind(n,"mouseup",A),r!==n&&(o.unbind(r,"mousemove",E),o.unbind(r,"mouseup",A)),o.remove(i),o.remove(l),o.remove(d),M(s),e&&(((e, t, o, n, r)=>{e.dispatch("ObjectResized",{target:t,width:o,height:n,origin:r})})(t,s,y,b,"corner-"+c.name),o.setAttrib(s,"style",o.getAttrib(s,"style"))),t.nodeChanged()},M= e=>{L();const f=o.getPos(e,a),w=f.x,_=f.y,C=e.getBoundingClientRect(),O=C.width||C.right-C.left,M=C.height||C.bottom-C.top;s!==e&&(R(),s=e,y=b=0);const N=t.dispatch("ObjectSelected",{target:e});z(e)&&!N.isDefaultPrevented()?he(Ym,((e, t)=>{let f=o.get("mceResizeHandle"+t);f&&o.remove(f),f=o.add(a,"div",{id:"mceResizeHandle"+t,"data-mce-bogus":"all",class:"mce-resizehandle",unselectable:!0,style:"cursor:"+t+"-resize; margin:0; padding:0"}),o.bind(f,"mousedown",(f=>{f.stopImmediatePropagation(),f.preventDefault(),(f=>{const y=S(s)[0];var b;u=f.screenX,m=f.screenY,g=y.clientWidth,p=y.clientHeight,h=p/g,c=e,c.name=t,c.startPos={x:O*e[0]+w,y:M*e[1]+_},v=a.scrollWidth,k=a.scrollHeight,d=o.add(a,"div",{class:"mce-resize-backdrop","data-mce-bogus":"all"}),o.setStyles(d,{position:"fixed",left:"0",top:"0",width:"100%",height:"100%"}),i=x(b=s)?o.create("img",{src:At.transparentSrc}):b.cloneNode(!0),o.addClass(i,"mce-clonedresizable"),o.setAttrib(i,"data-mce-bogus","all"),i.contentEditable="false",o.setStyles(i,{left:w,top:_,margin:0}),T(i,O,M),i.removeAttribute($m),a.appendChild(i),o.bind(n,"mousemove",E),o.bind(n,"mouseup",A),r!==n&&(o.bind(r,"mousemove",E),o.bind(r,"mouseup",A)),l=o.add(a,"div",{class:"mce-resize-helper","data-mce-bogus":"all"},g+" &times; "+p)})(f)})),e.elm=f,o.setStyles(f,{left:O*e[0]+w-f.offsetWidth/2,top:M*e[1]+_-f.offsetHeight/2})})):R(!1)},N=Hs(M,0),R=(e=!0)=>{N.cancel(),L(),s&&e&&s.removeAttribute($m),he(Ym,((e, t)=>{const n=o.get("mceResizeHandle"+t);n&&(o.unbind(n),o.remove(n))}))},D=(e, t)=>o.isChildOf(e,t),B= n=>{if(f||t.removed||t.composing)return;const r="mousedown"===n.type?n.target:e.getNode(),s=en(bo(r),"table,img,figure.image,hr,video,span.mce-preview-object").map((e=>e.dom)).filter((e=>o.isEditable(e.parentElement))).getOrUndefined(),i=w(s)?o.getAttrib(s,$m,"1"):"1";if(W(o.select(`img[${$m}],hr[${$m}]`),(e=>{e.removeAttribute($m)})),w(s)&&D(s,a)){I();const t=e.getStart(!0);if(D(t,s)&&D(e.getEnd(!0),s))return o.setAttrib(s,$m,i),void N.throttle(s)}R()},L=()=>{he(Ym,(e=>{e.elm&&(o.unbind(e.elm),delete e.elm)}))},I=()=>{try{t.getDoc().execCommand("enableObjectResizing",!1,"false")}catch(e){}};return t.on("init",(()=>{I(),t.on("NodeChange ResizeEditor ResizeWindow ResizeContent drop",B),t.on("keyup compositionend",(e=>{s&&"TABLE"===s.nodeName&&B(e)})),t.on("hide blur",R),t.on("contextmenu longpress",C,!0)})),t.on("remove",L),{isResizable:z,showResizeRect:M,hideResizeRect:R,updateResizeRect:B,destroy:()=>{N.cancel(),s=i=d=null}}},Jm=(e, t, o)=>{const n=e.document.createRange();var r;return r=n,t.fold((e=>{r.setStartBefore(e.dom)}),((e, t)=>{r.setStart(e.dom,t)}),(e=>{r.setStartAfter(e.dom)})),((e, t)=>{t.fold((t=>{e.setEndBefore(t.dom)}),((t, o)=>{e.setEnd(t.dom,o)}),(t=>{e.setEndAfter(t.dom)}))})(n,o),n},Qm=(e, t, o, n, r)=>{const a=e.document.createRange();return a.setStart(t.dom,o),a.setEnd(n.dom,r),a},eg=nl([{ltr:["start","soffset","finish","foffset"]},{rtl:["start","soffset","finish","foffset"]}]),tg=(e, t, o)=>t(bo(o.startContainer),o.startOffset,bo(o.endContainer),o.endOffset);eg.ltr,eg.rtl;const og=(e, t, o, n)=>({start:e,soffset:t,finish:o,foffset:n}),ng=document.caretPositionFromPoint?(e, t, o)=>{var n,r;return H.from(null===(r=(n=e.dom).caretPositionFromPoint)||void 0===r?void 0:r.call(n,t,o)).bind((t=>{if(null===t.offsetNode)return H.none();const o=e.dom.createRange();return o.setStart(t.offsetNode,t.offset),o.collapse(),H.some(o)}))}:document.caretRangeFromPoint?(e, t, o)=>{var n,r;return H.from(null===(r=(n=e.dom).caretRangeFromPoint)||void 0===r?void 0:r.call(n,t,o))}:H.none,rg=nl([{before:["element"]},{on:["element","offset"]},{after:["element"]}]),ag={before:rg.before,on:rg.on,after:rg.after,cata:(e, t, o, n)=>e.fold(t,o,n),getStart: e=>e.fold(E,E,E)},sg=nl([{domRange:["rng"]},{relative:["startSitu","finishSitu"]},{exact:["start","soffset","finish","foffset"]}]),ig={domRange:sg.domRange,relative:sg.relative,exact:sg.exact,exactFromRange: e=>sg.exact(e.start,e.soffset,e.finish,e.foffset),getWin: e=>{const t=(e=>e.match({domRange: e=>bo(e.startContainer),relative:(e, t)=>ag.getStart(e),exact:(e, t, o, n)=>e}))(e);return Oo(t)},range:og},lg=(e, t)=>{const o=Vt(e);return"input"===o?ag.after(e):Z(["br","img"],o)?0===t?ag.before(e):ag.after(e):ag.on(e,t)},cg=(e, t)=>{const o=e.fold(ag.before,lg,ag.after),n=t.fold(ag.before,lg,ag.after);return ig.relative(o,n)},dg=(e, t, o, n)=>{const r=lg(e,t),a=lg(o,n);return ig.relative(r,a)},ug=(e, t)=>{const o=(t||document).createDocumentFragment();return W(e,(e=>{o.appendChild(e.dom)})),bo(o)},mg= e=>{const t=ig.getWin(e).dom,o=(e, o, n, r)=>Qm(t,e,o,n,r),n=(e=>e.match({domRange: e=>{const t=bo(e.startContainer),o=bo(e.endContainer);return dg(t,e.startOffset,o,e.endOffset)},relative:cg,exact:dg}))(e);return((e, t)=>{const o=((e, t)=>t.match({domRange: e=>({ltr:T(e),rtl:H.none}),relative:(t, o)=>({ltr:Be((()=>Jm(e,t,o))),rtl:Be((()=>H.some(Jm(e,o,t))))}),exact:(t, o, n, r)=>({ltr:Be((()=>Qm(e,t,o,n,r))),rtl:Be((()=>H.some(Qm(e,n,r,t,o))))})}))(e,t);return((e, t)=>{const o=t.ltr();return o.collapsed?t.rtl().filter((e=>!1===e.collapsed)).map((e=>eg.rtl(bo(e.endContainer),e.endOffset,bo(e.startContainer),e.startOffset))).getOrThunk((()=>tg(0,eg.ltr,o))):tg(0,eg.ltr,o)})(0,o)})(t,n).match({ltr:o,rtl:o})},gg=(e, t, o)=>((e, t, o)=>((e, t, o)=>{const n=bo(e.document);return ng(n,t,o).map((e=>og(bo(e.startContainer),e.startOffset,bo(e.endContainer),e.endOffset)))})(e,t,o))(Oo(bo(o)).dom,e,t).map((e=>{const t=o.createRange();return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),t})).getOrUndefined(),pg=(e, t)=>w(e)&&w(t)&&e.startContainer===t.startContainer&&e.startOffset===t.startOffset&&e.endContainer===t.endContainer&&e.endOffset===t.endOffset,hg=(e, t, o)=>null!==((e, t, o)=>{let n=e;for(; n&&n!==t;){if(o(n))return n;n=n.parentNode}return null})(e,t,o),fg=(e, t, o)=>hg(e,t,(e=>e.nodeName===o)),yg=(e, t)=>Pr(e)&&!hg(e,t,pu),bg=(e, t, o)=>{const n=t.parentNode;if(n){const r=new Hn(t,e.getParent(n,e.isBlock)||e.getRoot());let a;for(; a=r[o?"prev":"next"]();)if(or(a))return!0}return!1},vg=(e, t, o, n, r)=>{const a=e.getRoot(),s=e.schema.getNonEmptyElements(),i=r.parentNode;let l,c;if(!i)return H.none();const d=e.getParent(i,e.isBlock)||a;if(n&&or(r)&&t&&e.isEmpty(d))return H.some(Ni(i,e.nodeIndex(r)));const u=new Hn(r,d);for(; c=u[n?"prev":"next"]();){if("false"===e.getContentEditableParent(c)||yg(c,a))return H.none();if(Yn(c)&&c.data.length>0)return fg(c,a,"A")?H.none():H.some(Ni(c,n?c.data.length:0));if(e.isBlock(c)||s[c.nodeName.toLowerCase()])return H.none();l=c}return Qn(l)?H.none():o&&l?H.some(Ni(l,0)):H.none()},kg=(e, t, o, n)=>{const r=e.getRoot();let a,s=!1,i=o?n.startContainer:n.endContainer,l=o?n.startOffset:n.endOffset;const c=jn(i)&&l===i.childNodes.length,d=e.schema.getNonEmptyElements();let u=o;if(Pr(i))return H.none();if(jn(i)&&l>i.childNodes.length-1&&(u=!1),er(i)&&(i=r,l=0),i===r){if(u&&(a=i.childNodes[l>0?l-1:0],a)){if(Pr(a))return H.none();if(d[a.nodeName]||$n(a))return H.none()}if(i.hasChildNodes()){if(l=Math.min(!u&&l>0?l-1:l,i.childNodes.length-1),i=i.childNodes[l],l=Yn(i)&&c?i.data.length:0,!t&&i===r.lastChild&&$n(i))return H.none();if(((e, t)=>{let o=t;for(; o&&o!==e;){if(ar(o))return!0;o=o.parentNode}return!1})(r,i)||Pr(i))return H.none();if(i.hasChildNodes()&&!$n(i)){a=i;const t=new Hn(i,r);do{if(ar(a)||Pr(a)){s=!1;break}if(Yn(a)&&a.data.length>0){l=u?0:a.data.length,i=a,s=!0;break}if(d[a.nodeName.toLowerCase()]&&!ir(a)){l=e.nodeIndex(a),i=a.parentNode,u||l++,s=!0;break}}while(a=u?t.next():t.prev())}}}return t&&(Yn(i)&&0===l&&vg(e,c,t,!0,i).each((e=>{i=e.container(),l=e.offset(),s=!0})),jn(i)&&(a=i.childNodes[l],a||(a=i.childNodes[l-1]),!a||!or(a)||((e, t)=>{var o;return"A"===(null===(o=e.previousSibling)||void 0===o?void 0:o.nodeName)})(a)||bg(e,a,!1)||bg(e,a,!0)||vg(e,c,t,!0,a).each((e=>{i=e.container(),l=e.offset(),s=!0})))),u&&!t&&Yn(i)&&l===i.data.length&&vg(e,c,t,!1,i).each((e=>{i=e.container(),l=e.offset(),s=!0})),s&&i?H.some(Ni(i,l)):H.none()},wg=(e, t)=>{const o=t.collapsed,n=t.cloneRange(),r=Ni.fromRangeStart(t);return kg(e,o,!0,n).each((e=>{o&&Ni.isAbove(r,e)||n.setStart(e.container(),e.offset())})),o||kg(e,o,!1,n).each((e=>{n.setEnd(e.container(),e.offset())})),o&&n.collapse(!0),pg(t,n)?H.none():H.some(n)},_g=(e, t)=>e.splitText(t),xg= e=>{let t=e.startContainer,o=e.startOffset,n=e.endContainer,r=e.endOffset;if(t===n&&Yn(t)){if(o>0&&o<t.data.length)if(n=_g(t,o),t=n.previousSibling,r>o){r-=o;const e=_g(n,r).previousSibling;t=n=e,r=e.data.length,o=0}else r=0}else if(Yn(t)&&o>0&&o<t.data.length&&(t=_g(t,o),o=0),Yn(n)&&r>0&&r<n.data.length){const e=_g(n,r).previousSibling;n=e,r=e.data.length}return{startContainer:t,startOffset:o,endContainer:n,endOffset:r}},Cg= e=>({walk:(t, o)=>Nm(e,t,o),split:xg,expand:(t, o={type:"word"})=>{if("word"===o.type){const o=Mm(e,t,[{inline:"span"}]),n=e.createRng();return n.setStart(o.startContainer,o.startOffset),n.setEnd(o.endContainer,o.endOffset),n}return t},normalize: t=>wg(e,t).fold(L,(e=>(t.setStart(e.startContainer,e.startOffset),t.setEnd(e.endContainer,e.endOffset),!0)))});Cg.compareRanges=pg,Cg.getCaretRangeFromPoint=gg,Cg.getSelectedNode=ui,Cg.getNode=mi;const Sg=((e, t)=>{const o= t=>{const o=(e=>{const t=e.dom;return Go(e)?t.getBoundingClientRect().height:t.offsetHeight})(t);if(o<=0||null===o){const o=ln(t,e);return parseFloat(o)||0}return o},n=(e, t)=>X(t,((t, o)=>{const n=ln(e,o),r=void 0===n?0:parseInt(n,10);return isNaN(r)?t:t+r}),0);return{set:(t, o)=>{if(!x(o)&&!o.match(/^[0-9]+$/))throw new Error(e+".set accepts only positive integer values. Value was "+o);const n=t.dom;nn(n)&&(n.style[e]=o+"px")},get:o,getOuter:o,aggregate:n,max:(e, t, o)=>{const r=n(e,o);return t>r?t-r:0}}})("height"),zg=()=>bo(document),Og=(e, t)=>e.view(t).fold(T([]),(t=>{const o=e.owner(t),n=Og(e,o);return[t].concat(n)}));var Tg=Object.freeze({__proto__:null,view: e=>{var t;return(e.dom===document?H.none():H.from(null===(t=e.dom.defaultView)||void 0===t?void 0:t.frameElement)).map(bo)},owner: e=>zo(e)});const Eg= e=>"textarea"===Vt(e),Ag=(e, t)=>{const o=(e=>{const t=e.dom.ownerDocument,o=t.body,n=t.defaultView,r=t.documentElement;if(o===e.dom)return Tn(o.offsetLeft,o.offsetTop);const a=En(null==n?void 0:n.pageYOffset,r.scrollTop),s=En(null==n?void 0:n.pageXOffset,r.scrollLeft),i=En(r.clientTop,o.clientTop),l=En(r.clientLeft,o.clientLeft);return An(e).translate(s-l,a-i)})(e),n=(e=>Sg.get(e))(e);return{element:e,bottom:o.top+n,height:n,pos:o,cleanup:t}},Mg=(e, t, o, n)=>{Bg(e,((r, a)=>Rg(e,t,o,n)),o)},Ng=(e, t, o, n, r)=>{const a={elm:n.element.dom,alignToTop:r};((e, t)=>e.dispatch("ScrollIntoView",t).isDefaultPrevented())(e,a)||(o(t,Mn(t).top,n,r),((e, t)=>{e.dispatch("AfterScrollIntoView",t)})(e,a))},Rg=(e, t, o, n)=>{const r=bo(e.getBody()),a=bo(e.getDoc());r.dom.offsetWidth;const s=((e, t)=>{const o=((e, t)=>{const o=Bo(e);if(0===o.length||Eg(e))return{element:e,offset:t};if(t<o.length&&!Eg(o[t]))return{element:o[t],offset:0};{const n=o[o.length-1];return Eg(n)?{element:e,offset:t}:"img"===Vt(n)?{element:n,offset:1}:Wt(n)?{element:n,offset:pr(n).length}:{element:n,offset:Bo(n).length}}})(e,t),n=ho('<span data-mce-bogus="all" style="display: inline-block;">\ufeff</span>');return gn(o.element,n),Ag(n,(()=>kn(n)))})(bo(o.startContainer),o.startOffset);Ng(e,a,t,s,n),s.cleanup()},Dg=(e, t, o, n)=>{const r=bo(e.getDoc());Ng(e,r,o,(e=>Ag(bo(e),S))(t),n)},Bg=(e, t, o)=>{const n=o.startContainer,r=o.startOffset,a=o.endContainer,s=o.endOffset;t(bo(n),bo(a));const i=e.dom.createRng();i.setStart(n,r),i.setEnd(a,s),e.selection.setRng(o)},Lg=(e, t)=>e.element.dom.scrollIntoView({block:t?"start":"end"}),Ig=(e, t, o, n)=>{const r=t+e,a=o.pos.top,s=o.bottom,i=s-a>=t;a<e?Lg(o,!1!==n):a>r?Lg(o,i?!1!==n:!0===n):s>r&&!i&&Lg(o,!0===n)},Hg=(e, t, o, n)=>{const r=Oo(e).dom.innerHeight;Ig(t,r,o,n)},Pg=(e, t, o, n)=>{const r=Oo(e).dom.innerHeight;Ig(t,r,o,n);const a=(e=>{const t=zg(),o=Mn(t),n=((e, t)=>{const o=t.owner(e);return Og(t,o)})(e,Tg),r=An(e),a=Y(n,((e, t)=>{const o=An(t);return{left:e.left+o.left,top:e.top+o.top}}),{left:0,top:0});return Tn(a.left+r.left+o.left,a.top+r.top+o.top)})(o.element),s=Dn(window);a.top<s.y?Nn(o.element,!1!==n):a.top>s.bottom&&Nn(o.element,!0===n)},Fg=(e, t, o)=>Mg(e,Hg,t,o),jg=(e, t, o)=>Dg(e,t,Hg,o),Vg=(e, t, o)=>Mg(e,Pg,t,o),Zg=(e, t, o)=>Dg(e,t,Pg,o),Ug=(e, t, o)=>{(e.inline?Fg:Vg)(e,t,o)},qg= e=>e.dom.focus(),Wg= e=>{const t=Zo(e).dom;return e.dom===t.activeElement},$g=(e=zg())=>H.from(e.dom.activeElement).map(bo),Gg=(e, t)=>{const o=Wt(t)?pr(t).length:Bo(t).length+1;return e>o?o:e<0?0:e},Kg= e=>ig.range(e.start,Gg(e.soffset,e.start),e.finish,Gg(e.foffset,e.finish)),Yg=(e, t)=>!Fn(t.dom)&&(Co(e,t)||xo(e,t)),Xg= e=> t=>Yg(e,t.start)&&Yg(e,t.finish),Jg= e=>ig.range(bo(e.startContainer),e.startOffset,bo(e.endContainer),e.endOffset),Qg= e=>{const t=document.createRange();try{return t.setStart(e.start.dom,e.soffset),t.setEnd(e.finish.dom,e.foffset),H.some(t)}catch(e){return H.none()}},ep= e=>{const t=(e=>e.inline||At.browser.isFirefox())(e)?(o=bo(e.getBody()),(e=>{const t=e.getSelection();return(t&&0!==t.rangeCount?H.from(t.getRangeAt(0)):H.none()).map(Jg)})(Oo(o).dom).filter(Xg(o))):H.none();var o;e.bookmark=t.isSome()?t:e.bookmark},tp= e=>(e.bookmark?e.bookmark:H.none()).bind((t=>{return o=bo(e.getBody()),n=t,H.from(n).filter(Xg(o)).map(Kg);var o,n})).bind(Qg),op={isEditorUIElement: e=>{const t=e.className.toString();return-1!==t.indexOf("tox-")||-1!==t.indexOf("mce-")}},np={setEditorTimeout:(e, t, o)=>((e, t)=>(x(t)||(t=0),setTimeout(e,t)))((()=>{e.removed||t()}),o),setEditorInterval:(e, t, o)=>{const n=((e, t)=>(x(t)||(t=0),setInterval(e,t)))((()=>{e.removed?clearInterval(n):t()}),o);return n}};let rp;const ap=Os.DOM,sp= e=>{const t=e.classList;return void 0!==t&&(t.contains("tox-edit-area")||t.contains("tox-edit-area__iframe")||t.contains("mce-content-body"))},ip=(e, t)=>{const o=uc(e),n=ap.getParent(t,(t=>(e=>jn(e)&&op.isEditorUIElement(e))(t)||!!o&&e.dom.is(t,o)));return null!==n},lp= e=>{try{const t=Zo(bo(e.getElement()));return $g(t).fold((()=>document.body),(e=>e.dom))}catch(e){return document.body}},cp=(e, t)=>{const o=t.editor;(e=>{const t=Hs((()=>{ep(e)}),0);e.on("init",(()=>{e.inline&&((e, t)=>{const o=()=>{t.throttle()};Os.DOM.bind(document,"mouseup",o),e.on("remove",(()=>{Os.DOM.unbind(document,"mouseup",o)}))})(e,t),((e, t)=>{((e, t)=>{e.on("mouseup touchend",(e=>{t.throttle()}))})(e,t),e.on("keyup NodeChange AfterSetSelectionRange",(t=>{(e=>"nodechange"===e.type&&e.selectionChange)(t)||ep(e)}))})(e,t)})),e.on("remove",(()=>{t.cancel()}))})(o);const n=(e, t)=>{Xc(e)&&!0!==e.inline&&t(bo(e.getContainer()),"tox-edit-focus")};o.on("focusin",(()=>{const t=e.focusedEditor;sp(lp(o))&&n(o,co),t!==o&&(t&&t.dispatch("blur",{focusedEditor:o}),e.setActive(o),e.focusedEditor=o,o.dispatch("focus",{blurredEditor:t}),o.focus(!0))})),o.on("focusout",(()=>{np.setEditorTimeout(o,(()=>{const t=e.focusedEditor;sp(lp(o))&&t===o||n(o,mo),ip(o,lp(o))||t!==o||(o.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null)}))})),rp||(rp= t=>{const o=e.activeEditor;o&&Wo(t).each((t=>{const n=t;n.ownerDocument===document&&(n===document.body||ip(o,n)||e.focusedEditor!==o||(o.dispatch("blur",{focusedEditor:null}),e.focusedEditor=null))}))},ap.bind(document,"focusin",rp))},dp=(e, t)=>{e.focusedEditor===t.editor&&(e.focusedEditor=null),!e.activeEditor&&rp&&(ap.unbind(document,"focusin",rp),rp=null)},up=(e, t)=>{((e, t)=>(e=>e.collapsed?H.from(mi(e.startContainer,e.startOffset)).map(bo):H.none())(t).bind((t=>Cr(t)?H.some(t):Co(e,t)?H.none():H.some(e))))(bo(e.getBody()),t).bind((e=>uu(e.dom))).fold((()=>{e.selection.normalize()}),(t=>e.selection.setRng(t.toRange())))},mp= e=>{if(e.setActive)try{e.setActive()}catch(t){e.focus()}else e.focus()},gp= e=>e.inline?(e=>{const t=e.getBody();return t&&(o=bo(t),Wg(o)||(n=o,$g(Zo(n)).filter((e=>n.dom.contains(e.dom)))).isSome());var o,n})(e):(e=>w(e.iframeElement)&&Wg(bo(e.iframeElement)))(e),pp= e=>e.editorManager.setActive(e),hp=(e, t, o, n, r)=>{const a=o?t.startContainer:t.endContainer,s=o?t.startOffset:t.endOffset;return H.from(a).map(bo).map((e=>n&&t.collapsed?e:Lo(e,r(e,s)).getOr(e))).bind((e=>qt(e)?H.some(e):To(e).filter(qt))).map((e=>e.dom)).getOr(e)},fp=(e, t, o=!1)=>hp(e,t,!0,o,((e, t)=>Math.min(Po(e),t))),yp=(e, t, o=!1)=>hp(e,t,!1,o,((e, t)=>t>0?t-1:t)),bp=(e, t)=>{const o=e;for(; e&&Yn(e)&&0===e.length;)e=t?e.nextSibling:e.previousSibling;return e||o},vp=(e, t)=>q(t,(t=>{const o=e.dispatch("GetSelectionRange",{range:t});return o.range!==t?o.range:t})),kp=["img","br"],wp= e=>{const t=hr(e).filter((e=>0!==e.trim().length||e.indexOf(ur)>-1)).isSome();return t||Z(kp,Vt(e))||(e=>{return qt(t=e)&&jt(t.dom)&&"false"===Qt(e,"contenteditable");var t})(e)},_p="[data-mce-autocompleter]",xp=(e, t)=>{if(Cp(bo(e.getBody())).isNone()){const n=ho('<span data-mce-autocompleter="1" data-mce-bogus="1"></span>',e.getDoc());fn(n,bo(t.extractContents())),t.insertNode(n.dom),To(n).each((e=>e.dom.normalize())),(o=n,((e, t)=>{const o= e=>{const n=Bo(e);for(let e=n.length-1; e>=0; e--){const r=n[e];if(t(r))return H.some(r);const a=o(r);if(a.isSome())return a}return H.none()};return o(e)})(o,wp)).map((t=>{e.selection.setCursorLocation(t.dom,(e=>"img"===Vt(e)?1:hr(e).fold((()=>Bo(e).length),(e=>e.length)))(t))}))}var o},Cp= e=>Qo(e,_p),Sp={"#text":3,"#comment":8,"#cdata":4,"#pi":7,"#doctype":10,"#document-fragment":11},zp=(e, t, o)=>{const n=o?"lastChild":"firstChild",r=o?"prev":"next";if(e[n])return e[n];if(e!==t){let o=e[r];if(o)return o;for(let n=e.parent; n&&n!==t; n=n.parent)if(o=n[r],o)return o}},Op= e=>{var t;const o=null!==(t=e.value)&&void 0!==t?t:"";if(!aa(o))return!1;const n=e.parent;return!n||"span"===n.name&&!n.attr("style")||!/^[ ]+$/.test(o)},Tp= e=>{const t="a"===e.name&&!e.attr("href")&&e.attr("id");return e.attr("name")||e.attr("id")&&!e.firstChild||e.attr("data-mce-bookmark")||t};class Ep{constructor(e, t){this.name=e,this.type=t,1===t&&(this.attributes=[],this.attributes.map={})}static create(e, t){const o=new Ep(e,Sp[e]||1);return t&&he(t,((e, t)=>{o.attr(t,e)})),o}replace(e){const t=this;return e.parent&&e.remove(),t.insert(e,t),t.remove(),t}attr(e, t){const o=this;if(!g(e))return w(e)&&he(e,((e, t)=>{o.attr(t,e)})),o;const n=o.attributes;if(n){if(void 0!==t){if(null===t){if(e in n.map){delete n.map[e];let t=n.length;for(; t--;)if(n[t].name===e)return n.splice(t,1),o}return o}if(e in n.map){let o=n.length;for(; o--;)if(n[o].name===e){n[o].value=t;break}}else n.push({name:e,value:t});return n.map[e]=t,o}return n.map[e]}}clone(){const e=this,t=new Ep(e.name,e.type),o=e.attributes;if(o){const e=[];e.map={};for(let t=0,n=o.length; t<n; t++){const n=o[t];"id"!==n.name&&(e[e.length]={name:n.name,value:n.value},e.map[n.name]=n.value)}t.attributes=e}return t.value=e.value,t}wrap(e){const t=this;return t.parent&&(t.parent.insert(e,t),e.append(t)),t}unwrap(){const e=this;for(let t=e.firstChild; t;){const o=t.next;e.insert(t,e,!0),t=o}e.remove()}remove(){const e=this,t=e.parent,o=e.next,n=e.prev;return t&&(t.firstChild===e?(t.firstChild=o,o&&(o.prev=null)):n&&(n.next=o),t.lastChild===e?(t.lastChild=n,n&&(n.next=null)):o&&(o.prev=n),e.parent=e.next=e.prev=null),e}append(e){const t=this;e.parent&&e.remove();const o=t.lastChild;return o?(o.next=e,e.prev=o,t.lastChild=e):t.lastChild=t.firstChild=e,e.parent=t,e}insert(e, t, o){e.parent&&e.remove();const n=t.parent||this;return o?(t===n.firstChild?n.firstChild=e:t.prev&&(t.prev.next=e),e.prev=t.prev,e.next=t,t.prev=e):(t===n.lastChild?n.lastChild=e:t.next&&(t.next.prev=e),e.next=t.next,e.prev=t,t.next=e),e.parent=n,e}getAll(e){const t=this,o=[];for(let n=t.firstChild; n; n=zp(n,t))n.name===e&&o.push(n);return o}children(){const e=[];for(let t=this.firstChild; t; t=t.next)e.push(t);return e}empty(){const e=this;if(e.firstChild){const t=[];for(let o=e.firstChild; o; o=zp(o,e))t.push(o);let o=t.length;for(; o--;){const e=t[o];e.parent=e.firstChild=e.lastChild=e.next=e.prev=null}}return e.firstChild=e.lastChild=null,e}isEmpty(e, t={}, o){var n;const r=this;let a=r.firstChild;if(Tp(r))return!1;if(a)do{if(1===a.type){if(a.attr("data-mce-bogus"))continue;if(e[a.name])return!1;if(Tp(a))return!1}if(8===a.type)return!1;if(3===a.type&&!Op(a))return!1;if(3===a.type&&a.parent&&t[a.parent.name]&&aa(null!==(n=a.value)&&void 0!==n?n:""))return!1;if(o&&o(a))return!1}while(a=zp(a,r));return!0}walk(e){return zp(this,null,e)}}const Ap=(e, t, o=0)=>{const n=e.toLowerCase();if(-1!==n.indexOf("[if ",o)&&((e, t)=>/^\s*\[if [\w\W]+\]>.*<!\[endif\](--!?)?>/.test(e.substr(t)))(n,o)){const e=n.indexOf("[endif]",o);return n.indexOf(">",e)}if(t){const e=n.indexOf(">",o);return-1!==e?e:n.length}{const t=/--!?>/g;t.lastIndex=o;const r=t.exec(e);return r?r.index+r[0].length:n.length}},Mp=(e, t, o)=>{const n=/<([!?\/])?([A-Za-z0-9\-_:.]+)/g,r=/(?:\s(?:[^'">]+(?:"[^"]*"|'[^']*'))*[^"'>]*(?:"[^">]*|'[^'>]*)?|\s*|\/)>/g,a=e.getVoidElements();let s=1,i=o;for(; 0!==s;)for(n.lastIndex=i;;){const e=n.exec(t);if(null===e)return i;if("!"===e[1]){i=Ze(e[2],"--")?Ap(t,!1,e.index+3):Ap(t,!0,e.index+1);break}{r.lastIndex=n.lastIndex;const o=r.exec(t);if(y(o)||o.index!==n.lastIndex)continue;"/"===e[1]?s-=1:Ce(a,e[2])||(s+=1),i=n.lastIndex+o[0].length;break}}return i},Np=(e, t)=>{const o=/<(\w+) [^>]*data-mce-bogus="all"[^>]*>/g,n=e.schema;let r=((e, t)=>{const o=new RegExp(["\\s?("+e.join("|")+')="[^"]+"'].join("|"),"gi");return t.replace(o,"")})(e.getTempAttrs(),t);const a=n.getVoidElements();let s;for(; s=o.exec(r);){const e=o.lastIndex,t=s[0].length;let i;i=a[s[1]]?e:Mp(n,r,e),r=r.substring(0,e-t)+r.substring(i),o.lastIndex=e-t}return Dr(r)},Rp=Np,Dp= e=>{const t=Ln(e,"[data-mce-bogus]");W(t,(e=>{"all"===Qt(e,"data-mce-bogus")?kn(e):kr(e)?(gn(e,yo(dr)),kn(e)):wn(e)}))},Bp= e=>{const t=Ln(e,"input");W(t,(e=>{oo(e,"name")}))},Lp=(e, t, o)=>{let n;return n="raw"===t.format?Dt.trim(Rp(e.serializer,o.innerHTML)):"text"===t.format?((e, t)=>{const o=e.getDoc(),n=Zo(bo(e.getBody())),r=fo("div",o);Xt(r,"data-mce-bogus","all"),sn(r,{position:"fixed",left:"-9999999px",top:"0"}),Cn(r,t.innerHTML),Dp(r),Bp(r);const a=(e=>Fo(e)?e:bo(zo(e).dom.body))(n);fn(a,r);const s=Dr(r.dom.innerText);return kn(r),s})(e,o):"tree"===t.format?e.serializer.serialize(o,t):((e, t)=>{const o=Cl(e),n=new RegExp(`^(<${o}[^>]*>(&nbsp;|&#160;|\\s| |<br \\/>|)<\\/${o}>[\r\n]*|<br \\/>[\r\n]*)$`);return t.replace(n,"")})(e,e.serializer.serialize(o,t)),"text"!==t.format&&!zr(bo(o))&&g(n)?Dt.trim(n):n},Ip=Dt.makeMap,Hp= e=>{const t=[],o=(e=e||{}).indent,n=Ip(e.indent_before||""),r=Ip(e.indent_after||""),a=Ga.getEncodeFunc(e.entity_encoding||"raw",e.entities),s="xhtml"!==e.element_format;return{start:(e, i, l)=>{if(o&&n[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}if(t.push("<",e),i)for(let e=0,o=i.length; e<o; e++){const o=i[e];t.push(" ",o.name,'="',a(o.value,!0),'"')}if(t[t.length]=!l||s?">":" />",l&&o&&r[e]&&t.length>0){const e=t[t.length-1];e.length>0&&"\n"!==e&&t.push("\n")}},end: e=>{let n;t.push("</",e,">"),o&&r[e]&&t.length>0&&(n=t[t.length-1],n.length>0&&"\n"!==n&&t.push("\n"))},text:(e, o)=>{e.length>0&&(t[t.length]=o?e:a(e))},cdata: e=>{t.push("<![CDATA[",e,"]]>")},comment: e=>{t.push("\x3c!--",e,"--\x3e")},pi:(e, n)=>{n?t.push("<?",e," ",a(n),"?>"):t.push("<?",e,"?>"),o&&t.push("\n")},doctype: e=>{t.push("<!DOCTYPE",e,">",o?"\n":"")},reset:()=>{t.length=0},getContent:()=>t.join("").replace(/\n$/,"")}},Pp=(e={}, t=is())=>{const o=Hp(e);return e.validate=!("validate"in e)||e.validate,{serialize: n=>{const r=e.validate,a={3: e=>{var t;o.text(null!==(t=e.value)&&void 0!==t?t:"",e.raw)},8: e=>{var t;o.comment(null!==(t=e.value)&&void 0!==t?t:"")},7: e=>{o.pi(e.name,e.value)},10: e=>{var t;o.doctype(null!==(t=e.value)&&void 0!==t?t:"")},4: e=>{var t;o.cdata(null!==(t=e.value)&&void 0!==t?t:"")},11: e=>{let t=e;if(t=t.firstChild)do{s(t)}while(t=t.next)}};o.reset();const s= e=>{var n;const i=a[e.type];if(i)i(e);else{const a=e.name,i=a in t.getVoidElements();let l=e.attributes;if(r&&l&&l.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 l.map){const e=l.map[t];o.map[t]=e,o.push({name:t,value:e})}}for(let e=0,t=l.length; e<t; e++){const t=l[e].name;if(!(t in o.map)){const e=l.map[t];o.map[t]=e,o.push({name:t,value:e})}}l=o}}if(o.start(a,l,i),!i){let t=e.firstChild;if(t){"pre"!==a&&"textarea"!==a||3!==t.type||"\n"!==(null===(n=t.value)||void 0===n?void 0:n[0])||o.text("\n",!0);do{s(t)}while(t=t.next)}o.end(a)}}};return 1!==n.type||e.inner?3===n.type?a[3](n):a[11](n):s(n),o.getContent()}}},Fp=new Set;W(["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"],(e=>{Fp.add(e)}));const jp=["font","text-decoration","text-emphasis"],Vp=(e, t)=>ge(e.parseStyle(e.getAttrib(t,"style"))),Zp=(e, t, o)=>{const n=Vp(e,t),r=Vp(e,o),a= n=>{var r,a;const s=null!==(r=e.getStyle(t,n))&&void 0!==r?r:"",i=null!==(a=e.getStyle(o,n))&&void 0!==a?a:"";return Ke(s)&&Ke(i)&&s!==i};return U(n,(e=>{const t= t=>U(t,(t=>t===e));if(!t(r)&&t(jp)){const e=K(r,(e=>U(jp,(t=>Ze(e,t)))));return U(e,a)}return a(e)}))},Up=(e, t, o)=>H.from(o.container()).filter(Yn).exists((n=>{const r=e?0:-1;return t(n.data.charAt(o.offset()+r))})),qp=M(Up,!0,Au),Wp=M(Up,!1,Au),$p= e=>{const t=e.container();return Yn(t)&&(0===t.data.length||Rr(t.data)&&Hm.isBookmarkNode(t.parentNode))},Gp=(e, t)=> o=>Nd(e?0:-1,o).filter(t).isSome(),Kp= e=>nr(e)&&"block"===ln(bo(e),"display"),Yp= e=>ar(e)&&!(e=>jn(e)&&"all"===e.getAttribute("data-mce-bogus"))(e),Xp=Gp(!0,Kp),Jp=Gp(!1,Kp),Qp=Gp(!0,lr),eh=Gp(!1,lr),th=Gp(!0,$n),oh=Gp(!1,$n),nh=Gp(!0,Yp),rh=Gp(!1,Yp),ah=(e, t)=>((e, t, o)=>Co(t,e)?Ao(e,(e=>o(e)||xo(e,t))).slice(0,-1):[])(e,t,L),sh=(e, t)=>[e].concat(ah(e,t)),ih=(e, t, o)=>iu(e,t,o,$p),lh=(e, t)=>Q(sh(bo(t.container()),e),br),ch=(e, t, o)=>ih(e,t.dom,o).forall((e=>lh(t,o).fold((()=>!Md(e,o,t.dom)),(n=>!Md(e,o,t.dom)&&Co(n,bo(e.container())))))),dh=(e, t, o)=>lh(t,o).fold((()=>ih(e,t.dom,o).forall((e=>!Md(e,o,t.dom)))),(t=>ih(e,t.dom,o).isNone())),uh=M(dh,!1),mh=M(dh,!0),gh=M(ch,!1),ph=M(ch,!0),hh= e=>jd(e).exists(kr),fh=(e, t, o)=>{const n=K(sh(bo(o.container()),t),br),r=ce(n).getOr(t);return au(e,r.dom,o).filter(hh)},yh=(e, t)=>jd(t).exists(kr)||fh(!0,e,t).isSome(),bh=(e, t)=>(e=>H.from(e.getNode(!0)).map(bo))(t).exists(kr)||fh(!1,e,t).isSome(),vh=M(fh,!1),kh=M(fh,!0),wh= e=>Ni.isTextPosition(e)&&!e.isAtStart()&&!e.isAtEnd(),_h=(e, t)=>{const o=K(sh(bo(t.container()),e),br);return ce(o).getOr(e)},xh=(e, t)=>wh(t)?Wp(t):Wp(t)||du(_h(e,t).dom,t).exists(Wp),Ch=(e, t)=>wh(t)?qp(t):qp(t)||cu(_h(e,t).dom,t).exists(qp),Sh= e=>jd(e).bind((e=>Xo(e,qt))).exists((e=>(e=>Z(["pre","pre-wrap"],e))(ln(e,"white-space")))),zh=(e, t)=> o=>{return n=new Hn(o,e)[t](),w(n)&&ar(n)&&kd(n);var n},Oh=(e, t)=>!Sh(t)&&(uh(e,t)||gh(e,t)||bh(e,t)||xh(e,t)||((e, t)=>{const o=du(e.dom,t).getOr(t),n=zh(e.dom,"prev");return t.isAtStart()&&(n(t.container())||n(o.container()))})(e,t)),Th=(e, t)=>!Sh(t)&&(mh(e,t)||ph(e,t)||yh(e,t)||Ch(e,t)||((e, t)=>{const o=cu(e.dom,t).getOr(t),n=zh(e.dom,"next");return t.isAtEnd()&&(n(t.container())||n(o.container()))})(e,t)),Eh=(e, t)=>Oh(e,t)||Th(e,(e=>{const t=e.container(),o=e.offset();return Yn(t)&&o<t.data.length?Ni(t,o+1):e})(t)),Ah=(e, t)=>Tu(e.charAt(t)),Mh=(e, t)=>Au(e.charAt(t)),Nh=(e, t, o)=>{const n=t.data,r=Ni(t,0);return o||!Ah(n,0)||Eh(e,r)?!!(o&&Mh(n,0)&&Oh(e,r))&&(t.data=ur+n.slice(1),!0):(t.data=" "+n.slice(1),!0)},Rh=(e, t, o)=>{const n=t.data,r=Ni(t,n.length-1);return o||!Ah(n,n.length-1)||Eh(e,r)?!!(o&&Mh(n,n.length-1)&&Th(e,r))&&(t.data=n.slice(0,-1)+ur,!0):(t.data=n.slice(0,-1)+" ",!0)},Dh=(e, t)=>{const o=t.container();if(!Yn(o))return H.none();if((e=>{const t=e.container();return Yn(t)&&Ve(t.data,ur)})(t)){const n=Nh(e,o,!1)||(e=>{const t=e.data,o=(e=>{const t=e.split("");return q(t,((e, o)=>Tu(e)&&o>0&&o<t.length-1&&Mu(t[o-1])&&Mu(t[o+1])?" ":e)).join("")})(t);return o!==t&&(e.data=o,!0)})(o)||Rh(e,o,!1);return It(n,t)}if(Eh(e,t)){const n=Nh(e,o,!0)||Rh(e,o,!0);return It(n,t)}return H.none()},Bh=(e, t, o)=>{if(0===o)return;const n=bo(e),r=Yo(n,br).getOr(n),a=e.data.slice(t,t+o),s=t+o>=e.data.length&&Th(r,Ni(e,e.data.length)),i=0===t&&Oh(r,Ni(e,0));e.replaceData(t,o,ia(a,4,i,s))},Lh=(e, t)=>{const o=e.data.slice(t),n=o.length-$e(o).length;Bh(e,t,n)},Ih=(e, t)=>{const o=e.data.slice(0,t),n=o.length-Ge(o).length;Bh(e,t-n,n)},Hh=(e, t, o, n=!0)=>{const r=Ge(e.data).length,a=n?e:t,s=n?t:e;return n?a.appendData(s.data):a.insertData(0,s.data),kn(bo(s)),o&&Lh(a,r),a},Ph=(e, t)=>((e, t)=>{const o=e.container(),n=e.offset();return!Ni.isTextPosition(e)&&o===t.parentNode&&n>Ni.before(t).offset()})(t,e)?Ni(t.container(),t.offset()-1):t,Fh= e=>{return ta(e.previousSibling)?H.some((t=e.previousSibling,Yn(t)?Ni(t,t.data.length):Ni.after(t))):e.previousSibling?mu(e.previousSibling):H.none();var t},jh= e=>{return ta(e.nextSibling)?H.some((t=e.nextSibling,Yn(t)?Ni(t,0):Ni.before(t))):e.nextSibling?uu(e.nextSibling):H.none();var t},Vh=(e, t, o)=>((e, t, o)=>e?((e, t)=>jh(t).orThunk((()=>Fh(t))).orThunk((()=>((e, t)=>cu(e,Ni.after(t)).orThunk((()=>du(e,Ni.before(t)))))(e,t))))(t,o):((e, t)=>Fh(t).orThunk((()=>jh(t))).orThunk((()=>((e, t)=>H.from(t.previousSibling?t.previousSibling:t.parentNode).bind((t=>du(e,Ni.before(t)))).orThunk((()=>cu(e,Ni.after(t)))))(e,t))))(t,o))(e,t,o).map(M(Ph,o)),Zh=(e, t, o)=>{o.fold((()=>{e.focus()}),(o=>{e.selection.setRng(o.toRange(),t)}))},Uh=(e, t)=>t&&Ce(e.schema.getBlockElements(),Vt(t)),qh= e=>{if(ma(e)){const t=ho('<br data-mce-bogus="1">');return vn(e),fn(e,t),H.some(Ni.before(t.dom))}return H.none()},Wh=(e, t, o, n=!0)=>{const r=Vh(t,e.getBody(),o.dom),a=Yo(o,M(Uh,e),(s=e.getBody(), e=>e.dom===s));var s;const i=((e, t, o)=>{const n=Mo(e).filter(Wt),r=No(e).filter(Wt);return kn(e),(a=n,s=r,i=t,l=(e, t, n)=>{const r=e.dom,a=t.dom,s=r.data.length;return Hh(r,a,o),n.container()===a?Ni(r,s):n},a.isSome()&&s.isSome()&&i.isSome()?H.some(l(a.getOrDie(),s.getOrDie(),i.getOrDie())):H.none()).orThunk((()=>(o&&(n.each((e=>Ih(e.dom,e.dom.length))),r.each((e=>Lh(e.dom,0)))),t)));var a,s,i,l})(o,r,((e, t)=>Ce(e.schema.getTextInlineElements(),Vt(t)))(e,o));e.dom.isEmpty(e.getBody())?(e.setContent(""),e.selection.setCursorLocation()):a.bind(qh).fold((()=>{n&&Zh(e,t,i)}),(o=>{n&&Zh(e,t,H.some(o))}))},$h=/[\u0591-\u07FF\uFB1D-\uFDFF\uFE70-\uFEFC]/,Gh=(e, t)=>wo(bo(t),Yl(e))&&!Ca(e.schema,t)&&e.dom.isEditable(t),Kh=(e, t, o)=>{const n=((e, t, o)=>K(Os.DOM.getParents(o.container(),"*",t),e))(e,t,o);return H.from(n[n.length-1])},Yh=(e, t)=>{const o=t.container(),n=t.offset();return e?Hr(o)?Yn(o.nextSibling)?Ni(o.nextSibling,0):Ni.after(o):jr(t)?Ni(o,n+1):t:Hr(o)?Yn(o.previousSibling)?Ni(o.previousSibling,o.previousSibling.data.length):Ni.before(o):Vr(t)?Ni(o,n-1):t},Xh=M(Yh,!0),Jh=M(Yh,!1),Qh=(e, t)=>{const o= e=>e.stopImmediatePropagation();e.on("beforeinput input",o,!0),e.getDoc().execCommand(t),e.off("beforeinput input",o)},ef= e=>Qh(e,"Delete"),tf= e=>wr(e)||xr(e),of=(e, t)=>Co(e,t)?Xo(t,tf,(e=> t=>Bt(To(t),e,xo))(e)):H.none(),nf=(e, t=!0)=>{e.dom.isEmpty(e.getBody())&&e.setContent("",{no_selection:!t})},rf= e=>{var t;return(8===Zt(t=e)||"#comment"===Vt(t)?Mo(e):Ho(e)).bind(rf).orThunk((()=>H.some(e)))},af=(e, t, o, n=!0)=>{var r;t.deleteContents();const a=rf(o).getOr(o),s=bo(null!==(r=e.dom.getParent(a.dom,e.dom.isBlock))&&void 0!==r?r:o.dom);if(s.dom===e.getBody()?nf(e,n):ma(s)&&(Ar(s),n&&e.selection.setCursorLocation(s.dom,0)),!xo(o,s)){const e=Bt(To(s),o)?[]:To(i=s).map(Bo).map((e=>K(e,(e=>!xo(i,e))))).getOr([]);W(e.concat(Bo(o)),(e=>{xo(e,s)||Co(e,s)||!ma(e)||kn(e)}))}var i},sf= e=>Ln(e,"td,th"),lf=(e, t)=>({start:e,end:t}),cf=nl([{singleCellTable:["rng","cell"]},{fullTable:["table"]},{partialTable:["cells","outsideDetails"]},{multiTable:["startTableCells","endTableCells","betweenRng"]}]),df=(e, t)=>en(bo(e),"td,th",t),uf= e=>!xo(e.start,e.end),mf=(e, t)=>Vu(e.start,t).bind((o=>Vu(e.end,t).bind((e=>It(xo(o,e),o))))),gf= e=> t=>mf(t,e).map((e=>((e, t, o)=>({rng:e,table:t,cells:o}))(t,e,sf(e)))),pf=(e, t, o, n)=>{if(o.collapsed||!e.forall(uf))return H.none();if(t.isSameTable){const t=e.bind(gf(n));return H.some({start:t,end:t})}{const e=df(o.startContainer,n),t=df(o.endContainer,n),r=e.bind((e=> t=>Vu(t,e).bind((e=>de(sf(e)).map((e=>lf(t,e))))))(n)).bind(gf(n)),a=t.bind((e=> t=>Vu(t,e).bind((e=>ce(sf(e)).map((e=>lf(e,t))))))(n)).bind(gf(n));return H.some({start:r,end:a})}},hf=(e, t)=>ee(e,(e=>xo(e,t))),ff= e=>Lt(hf(e.cells,e.rng.start),hf(e.cells,e.rng.end),((t, o)=>e.cells.slice(t,o+1))),yf=(e, t)=>{const{startTable:o,endTable:n}=t,r=e.cloneRange();return o.each((e=>r.setStartAfter(e.dom))),n.each((e=>r.setEndBefore(e.dom))),r},bf=(e, t)=>{const o=(e=> t=>xo(e,t))(e),n=((e, t)=>{const o=df(e.startContainer,t),n=df(e.endContainer,t);return Lt(o,n,lf)})(t,o),r=((e, t)=>{const o= e=>Vu(bo(e),t),n=o(e.startContainer),r=o(e.endContainer),a=n.isSome(),s=r.isSome(),i=Lt(n,r,xo).getOr(!1);return{startTable:n,endTable:r,isStartInTable:a,isEndInTable:s,isSameTable:i,isMultiTable:!i&&a&&s}})(t,o);return((e, t, o)=>e.exists((e=>((e, t)=>!uf(e)&&mf(e,t).exists((e=>{const t=e.dom.rows;return 1===t.length&&1===t[0].cells.length})))(e,o)&&qu(e.start,t))))(n,t,o)?n.map((e=>cf.singleCellTable(t,e.start))):r.isMultiTable?((e, t, o, n)=>pf(e,t,o,n).bind((({start:e,end:n})=>{const r=e.bind(ff).getOr([]),a=n.bind(ff).getOr([]);if(r.length>0&&a.length>0){const e=yf(o,t);return H.some(cf.multiTable(r,a,e))}return H.none()})))(n,r,t,o):((e, t, o, n)=>pf(e,t,o,n).bind((({start:e,end:t})=>e.or(t))).bind((e=>{const{isSameTable:n}=t,r=ff(e).getOr([]);if(n&&e.cells.length===r.length)return H.some(cf.fullTable(e.table));if(r.length>0){if(n)return H.some(cf.partialTable(r,H.none()));{const e=yf(o,t);return H.some(cf.partialTable(r,H.some({...t,rng:e})))}}return H.none()})))(n,r,t,o)},vf= e=>W(e,(e=>{oo(e,"contenteditable"),Ar(e)})),kf=(e, t, o, n)=>{const r=o.cloneRange();n?(r.setStart(o.startContainer,o.startOffset),r.setEndAfter(t.dom.lastChild)):(r.setStartBefore(t.dom.firstChild),r.setEnd(o.endContainer,o.endOffset)),Cf(e,r,t,!1).each((e=>e()))},wf= e=>{const t=ju(e),o=bo(e.selection.getNode());sr(o.dom)&&ma(o)?e.selection.setCursorLocation(o.dom,0):e.selection.collapse(!0),t.length>1&&U(t,(e=>xo(e,o)))&&Xt(o,"data-mce-selected","1")},_f=(e, t, o)=>H.some((()=>{const n=e.selection.getRng(),r=o.bind((({rng:o,isStartInTable:r})=>{const a=((e, t)=>H.from(e.dom.getParent(t,e.dom.isBlock)).map(bo))(e,r?o.endContainer:o.startContainer);o.deleteContents(),((e, t, o)=>{o.each((o=>{t?kn(o):(Ar(o),e.selection.setCursorLocation(o.dom,0))}))})(e,r,a.filter(ma));const s=r?t[0]:t[t.length-1];return kf(e,s,n,r),ma(s)?H.none():H.some(r?t.slice(1):t.slice(0,-1))})).getOr(t);vf(r),wf(e)})),xf=(e, t, o, n)=>H.some((()=>{const r=e.selection.getRng(),a=t[0],s=o[o.length-1];kf(e,a,r,!0),kf(e,s,r,!1);const i=ma(a)?t:t.slice(1),l=ma(s)?o:o.slice(0,-1);vf(i.concat(l)),n.deleteContents(),wf(e)})),Cf=(e, t, o, n=!0)=>H.some((()=>{af(e,t,o,n)})),Sf=(e, t)=>H.some((()=>Wh(e,!1,t))),zf=(e, t)=>Q(sh(t,e),Sr),Of=(e, t)=>Q(sh(t,e),Kt("caption")),Tf=(e, t)=>H.some((()=>{Ar(t),e.selection.setCursorLocation(t.dom,0)})),Ef=(e, t)=>e?th(t):oh(t),Af=(e, t, o)=>{const n=bo(e.getBody());return Of(n,o).fold((()=>((e, t, o, n)=>{const r=Ni.fromRangeStart(e.selection.getRng());return zf(o,n).bind((n=>ma(n)?Tf(e,n):((e, t, o, n, r)=>su(o,e.getBody(),r).bind((e=>zf(t,bo(e.getNode())).bind((e=>xo(e,n)?H.none():H.some(S))))))(e,o,t,n,r)))})(e,t,n,o).orThunk((()=>It(((e, t)=>{const o=Ni.fromRangeStart(e.selection.getRng());return Ef(t,o)||au(t,e.getBody(),o).exists((e=>Ef(t,e)))})(e,t),S)))),(o=>((e, t, o, n)=>{const r=Ni.fromRangeStart(e.selection.getRng());return ma(n)?Tf(e,n):((e, t, o, n, r)=>su(o,e.getBody(),r).fold((()=>H.some(S)),(a=>((e, t, o, n)=>uu(e.dom).bind((r=>mu(e.dom).map((e=>t?o.isEqual(r)&&n.isEqual(e):o.isEqual(e)&&n.isEqual(r))))).getOr(!0))(n,o,r,a)?((e, t)=>Tf(e,t))(e,n):((e, t, o)=>Of(e,bo(o.getNode())).fold((()=>H.some(S)),(e=>It(!xo(e,t),S))))(t,n,a))))(e,o,t,n,r)})(e,t,n,o)))},Mf=(e, t)=>{const o=bo(e.selection.getStart(!0)),n=ju(e);return e.selection.isCollapsed()&&0===n.length?Af(e,t,o):((e, t, o)=>{const n=bo(e.getBody()),r=e.selection.getRng();return 0!==o.length?_f(e,o,H.none()):((e, t, o, n)=>Of(t,n).fold((()=>((e, t, o)=>bf(t,o).bind((t=>t.fold(M(Cf,e),M(Sf,e),M(_f,e),M(xf,e)))))(e,t,o)),(t=>((e, t)=>Tf(e,t))(e,t))))(e,n,r,t)})(e,o,n)},Nf=(e, t)=>{let o=t;for(; o&&o!==e;){if(rr(o)||ar(o))return o;o=o.parentNode}return null},Rf=["data-ephox-","data-mce-","data-alloy-","data-snooker-","_"],Df=Dt.each,Bf= e=>{const t=e.dom,o=new Set(e.serializer.getTempAttrs()),n= e=>U(Rf,(t=>Ze(e,t)))||o.has(e);return{compare:(e, o)=>{if(e.nodeName!==o.nodeName||e.nodeType!==o.nodeType)return!1;const r= e=>{const o={};return Df(t.getAttribs(e),(r=>{const a=r.nodeName.toLowerCase();"style"===a||n(a)||(o[a]=t.getAttrib(e,a))})),o},a=(e, t)=>{for(const o in e)if(Ce(e,o)){const n=t[o];if(v(n))return!1;if(e[o]!==n)return!1;delete t[o]}for(const e in t)if(Ce(t,e))return!1;return!0};if(jn(e)&&jn(o)){if(!a(r(e),r(o)))return!1;if(!a(t.parseStyle(t.getAttrib(e,"style")),t.parseStyle(t.getAttrib(o,"style"))))return!1}return!Ou(e)&&!Ou(o)},isAttributeInternal:n}},Lf=(e, t, o, n)=>{const r=o.name;for(let t=0,a=e.length; t<a; t++){const a=e[t];if(a.name===r){const e=n.nodes[r];e?e.nodes.push(o):n.nodes[r]={filter:a,nodes:[o]}}}if(o.attributes)for(let e=0,r=t.length; e<r; e++){const r=t[e],a=r.name;if(a in o.attributes.map){const e=n.attributes[a];e?e.nodes.push(o):n.attributes[a]={filter:r,nodes:[o]}}}},If=(e, t)=>{const o=(e, o)=>{he(e,(e=>{const n=ue(e.nodes);W(e.filter.callbacks,(r=>{for(let t=n.length-1; t>=0; t--){const r=n[t];(o?void 0!==r.attr(e.filter.name):r.name===e.filter.name)&&!k(r.parent)||n.splice(t,1)}n.length>0&&r(n,e.filter.name,t)}))}))};o(e.nodes,!1),o(e.attributes,!0)},Hf=(e, t, o, n={})=>{const r=((e, t, o)=>{const n={nodes:{},attributes:{}};return o.firstChild&&((o, r)=>{let a=o;for(; a=a.walk();)Lf(e,t,a,n)})(o),n})(e,t,o);If(r,n)},Pf=(e, t, o)=>{if(e.insert&&t(o)){const e=new Ep("br",1);e.attr("data-mce-bogus","1"),o.empty().append(e)}else o.empty().append(new Ep("#text",3)).value=ur},Ff=(e, t)=>{const o=null==e?void 0:e.firstChild;return w(o)&&o===e.lastChild&&o.name===t},jf=(e, t, o, n)=>n.isEmpty(t,o,(t=>((e, t)=>{const o=e.getElementRule(t.name);return!0===(null==o?void 0:o.paddEmpty)})(e,t))),Vf= e=>{let t;for(let o=e; o; o=o.parent){const e=o.attr("contenteditable");if("false"===e)break;"true"===e&&(t=o)}return H.from(t)},Zf=(e, t, o=e.parent)=>{if(t.getSpecialElements()[e.name])e.empty().remove();else{const n=e.children();for(const e of n)o&&!t.isValidChild(o.name,e.name)&&Zf(e,t,o);e.unwrap()}},Uf=(e, t, o, n=S)=>{const r=t.getTextBlockElements(),a=t.getNonEmptyElements(),s=t.getWhitespaceElements(),i=Dt.makeMap("tr,td,th,tbody,thead,tfoot,table"),l=new Set,c= e=>e!==o&&!i[e.name];for(let o=0; o<e.length; o++){const i=e[o];let d,u,m;if(!i.parent||l.has(i))continue;if(r[i.name]&&"li"===i.parent.name){let e=i.next;for(; e&&r[e.name];)e.name="li",l.add(e),i.parent.insert(e,i.parent),e=e.next;i.unwrap();continue}const g=[i];for(d=i.parent; d&&!t.isValidChild(d.name,i.name)&&c(d); d=d.parent)g.push(d);if(d&&g.length>1)if(t.isValidChild(d.name,i.name)){g.reverse(),u=g[0].clone(),n(u);let e=u;for(let o=0; o<g.length-1; o++){t.isValidChild(e.name,g[o].name)&&o>0?(m=g[o].clone(),n(m),e.append(m)):m=e;for(let e=g[o].firstChild; e&&e!==g[o+1];){const t=e.next;m.append(e),e=t}e=m}jf(t,a,s,u)?d.insert(i,g[0],!0):(d.insert(u,g[0],!0),d.insert(i,u)),d=g[0],(jf(t,a,s,d)||Ff(d,"br"))&&d.empty().remove()}else Zf(i,t);else if(i.parent){if("li"===i.name){let e=i.prev;if(e&&("ul"===e.name||"ol"===e.name)){e.append(i);continue}if(e=i.next,e&&("ul"===e.name||"ol"===e.name)&&e.firstChild){e.insert(i,e.firstChild,!0);continue}const t=new Ep("ul",1);n(t),i.wrap(t);continue}if(t.isValidChild(i.parent.name,"div")&&t.isValidChild("div",i.name)){const e=new Ep("div",1);n(e),i.wrap(e)}else Zf(i,t)}}},qf=(e, t, o=t.parent)=>!(!o||!e.children[t.name]||e.isValidChild(o.name,t.name))||!(!o||"a"!==t.name||!((e, t)=>{let o=e;for(; o;){if("a"===o.name)return!0;o=o.parent}return!1})(o)),Wf= e=>e.collapsed?e:(e=>{const t=Ni.fromRangeStart(e),o=Ni.fromRangeEnd(e),n=e.commonAncestorContainer;return au(!1,n,o).map((r=>!Md(t,o,n)&&Md(t,r,n)?((e, t, o, n)=>{const r=document.createRange();return r.setStart(e,t),r.setEnd(o,n),r})(t.container(),t.offset(),r.container(),r.offset()):e)).getOr(e)})(e),$f=(e, t)=>{let o=t.firstChild,n=t.lastChild;return o&&"meta"===o.name&&(o=o.next),n&&"mce_marker"===n.attr("id")&&(n=n.prev),((e, t)=>{const o=e.getNonEmptyElements();return w(t)&&(t.isEmpty(o)||((e, t)=>e.getBlockElements()[t.name]&&(e=>w(e.firstChild)&&e.firstChild===e.lastChild)(t)&&(e=>"br"===e.name||e.value===ur)(t.firstChild))(e,t))})(e,n)&&(n=null==n?void 0:n.prev),!(!o||o!==n||"ul"!==o.name&&"ol"!==o.name)},Gf= e=>{return e.length>0&&(!(o=e[e.length-1]).firstChild||w(null==(t=o)?void 0:t.firstChild)&&t.firstChild===t.lastChild&&(e=>e.data===ur||or(e))(t.firstChild))?e.slice(0,-1):e;var t,o},Kf=(e, t)=>{const o=e.getParent(t,e.isBlock);return o&&"LI"===o.nodeName?o:null},Yf=(e, t)=>{const o=Ni.after(e),n=tu(t).prev(o);return n?n.toRange():null},Xf=(e, t, o, n)=>{const r=((e, t, o)=>{const n=t.serialize(o);return(e=>{var t,o;const n=e.firstChild,r=e.lastChild;return n&&"META"===n.nodeName&&(null===(t=n.parentNode)||void 0===t||t.removeChild(n)),r&&"mce_marker"===r.id&&(null===(o=r.parentNode)||void 0===o||o.removeChild(r)),e})(e.createFragment(n))})(t,e,n),a=Kf(t,o.startContainer),s=Gf((i=r.firstChild,K(null!==(l=null==i?void 0:i.childNodes)&&void 0!==l?l:[],(e=>"LI"===e.nodeName))));var i,l;const c=t.getRoot(),d= e=>{const n=Ni.fromRangeStart(o),r=tu(t.getRoot()),s=1===e?r.prev(n):r.next(n),i=null==s?void 0:s.getNode();return!i||Kf(t,i)!==a};return a?d(1)?((e, t, o)=>{const n=e.parentNode;return n&&Dt.each(t,(t=>{n.insertBefore(t,e)})),((e, t)=>{const o=Ni.before(e),n=tu(t).next(o);return n?n.toRange():null})(e,o)})(a,s,c):d(2)?((e, t, o, n)=>(n.insertAfter(t.reverse(),e),Yf(t[0],o)))(a,s,c,t):((e, t, o, n)=>{const r=((e, t)=>{const o=t.cloneRange(),n=t.cloneRange();return o.setStartBefore(e),n.setEndAfter(e),[o.cloneContents(),n.cloneContents()]})(e,n),a=e.parentNode;return a&&(a.insertBefore(r[0],e),Dt.each(t,(t=>{a.insertBefore(t,e)})),a.insertBefore(r[1],e),a.removeChild(e)),Yf(t[t.length-1],o)})(a,s,c,o):null},Jf=["pre"],Qf=sr,ey=(e, t, o)=>{var n,r;const a=e.selection,s=e.dom,i=e.parser,l=o.merge,c=Pp({validate:!0},e.schema),d='<span id="mce_marker" data-mce-type="bookmark">&#xFEFF;</span>';-1===t.indexOf("{$caret}")&&(t+="{$caret}"),t=t.replace(/\{\$caret\}/,d);let u=a.getRng();const m=u.startContainer,g=e.getBody();m===g&&a.isCollapsed()&&s.isBlock(g.firstChild)&&((e, t)=>w(t)&&!e.schema.getVoidElements()[t.nodeName])(e,g.firstChild)&&s.isEmpty(g.firstChild)&&(u=s.createRng(),u.setStart(g.firstChild,0),u.setEnd(g.firstChild,0),a.setRng(u)),a.isCollapsed()||(e=>{const t=e.dom,o=Wf(e.selection.getRng());e.selection.setRng(o);const n=t.getParent(o.startContainer,Qf);((e, t, o)=>!!w(o)&&o===e.getParent(t.endContainer,Qf)&&qu(bo(o),t))(t,o,n)?Cf(e,o,bo(n)):o.startContainer===o.endContainer&&o.endOffset-o.startOffset==1&&Yn(o.startContainer.childNodes[o.startOffset])?o.deleteContents():e.getDoc().execCommand("Delete",!1)})(e);const p=a.getNode(),h={context:p.nodeName.toLowerCase(),data:o.data,insert:!0},f=i.parse(t,h);if(!0===o.paste&&$f(e.schema,f)&&((e, t)=>!!Kf(e,t))(s,p))return u=Xf(c,s,a.getRng(),f),u&&a.setRng(u),t;!0===o.paste&&((e, t, o, n)=>{var r;const a=t.firstChild,s=t.lastChild,i=a===("bookmark"===s.attr("data-mce-type")?s.prev:s),l=Z(Jf,a.name);if(i&&l){const t="false"!==a.attr("contenteditable"),s=(null===(r=e.getParent(o,e.isBlock))||void 0===r?void 0:r.nodeName.toLowerCase())===a.name,i=H.from(Nf(n,o)).forall(rr);return t&&s&&i}return!1})(s,f,p,e.getBody())&&(null===(n=f.firstChild)||void 0===n||n.unwrap()),(e=>{let t=e;for(; t=t.walk();)1===t.type&&t.attr("data-mce-fragment","1")})(f);let y=f.lastChild;if(y&&"mce_marker"===y.attr("id")){const t=y;for(y=y.prev; y; y=y.walk(!0))if(3===y.type||!s.isBlock(y.name)){y.parent&&e.schema.isValidChild(y.parent.name,"span")&&y.parent.insert(t,y,"br"===y.name);break}}if(e._selectionOverrides.showBlockCaretContainer(p),h.invalid){e.selection.setContent(d);let o,n=a.getNode();const l=e.getBody();for(er(n)?n=o=l:o=n; o&&o!==l;)n=o,o=o.parentNode;t=n===l?l.innerHTML:s.getOuterHTML(n);const u=i.parse(t),m=(e=>{for(let t=e; t; t=t.walk())if("mce_marker"===t.attr("id"))return H.some(t);return H.none()})(u),g=m.bind(Vf).getOr(u);m.each((e=>e.replace(f)));const p=f.children(),h=null!==(r=f.parent)&&void 0!==r?r:u;f.unwrap();const y=K(p,(t=>qf(e.schema,t,h)));Uf(y,e.schema,g),Hf(i.getNodeFilters(),i.getAttributeFilters(),u),t=c.serialize(u),n===l?s.setHTML(l,t):s.setOuterHTML(n,t)}else t=c.serialize(f),((e, t, o)=>{var n;if("all"===o.getAttribute("data-mce-bogus"))null===(n=o.parentNode)||void 0===n||n.insertBefore(e.dom.createFragment(t),o);else{const n=o.firstChild,r=o.lastChild;!n||n===r&&"BR"===n.nodeName?e.dom.setHTML(o,t):e.selection.setContent(t,{no_events:!0})}})(e,t,p);var b;return((e, t)=>{const o=e.schema.getTextInlineElements(),n=e.dom;if(t){const t=e.getBody(),r=Bf(e);Dt.each(n.select("*[data-mce-fragment]"),(e=>{if(w(o[e.nodeName.toLowerCase()])&&((e, t)=>ne(Vp(e,t),(e=>!(e=>Fp.has(e))(e))))(n,e))for(let o=e.parentElement; w(o)&&o!==t&&!Zp(n,e,o); o=o.parentElement)if(r.compare(o,e)){n.remove(e,!0);break}}))}})(e,l),((e, t)=>{var o,n,r;let a;const s=e.dom,i=e.selection;if(!t)return;i.scrollIntoView(t);const l=Nf(e.getBody(),t);if(l&&"false"===s.getContentEditable(l))return s.remove(t),void i.select(l);let c=s.createRng();const d=t.previousSibling;if(Yn(d)){c.setStart(d,null!==(n=null===(o=d.nodeValue)||void 0===o?void 0:o.length)&&void 0!==n?n:0);const e=t.nextSibling;Yn(e)&&(d.appendData(e.data),null===(r=e.parentNode)||void 0===r||r.removeChild(e))}else c.setStartBefore(t),c.setEndBefore(t);const u=s.getParent(t,s.isBlock);s.remove(t),u&&s.isEmpty(u)&&(vn(bo(u)),c.setStart(u,0),c.setEnd(u,0),Qf(u)||(e=>!!e.getAttribute("data-mce-fragment"))(u)||!(a=(t=>{let o=Ni.fromRangeStart(t);return o=tu(e.getBody()).next(o),null==o?void 0:o.toRange()})(c))?s.add(u,s.create("br",{"data-mce-bogus":"1"})):(c=a,s.remove(u))),i.setRng(c)})(e,s.get("mce_marker")),b=e.getBody(),Dt.each(b.getElementsByTagName("*"),(e=>{e.removeAttribute("data-mce-fragment")})),((e, t)=>{H.from(e.getParent(t,"td,th")).map(bo).each(Mr)})(s,a.getStart()),((e, t, o)=>{const n=Ao(bo(o),(e=>xo(e,bo(t))));le(n,n.length-2).filter(qt).fold((()=>va(e,t)),(t=>va(e,t.dom)))})(e.schema,e.getBody(),a.getStart()),t},ty= e=>e instanceof Ep,oy=(e, t, o)=>{e.dom.setHTML(e.getBody(),t),!0!==o&&(e=>{gp(e)&&uu(e.getBody()).each((t=>{const o=t.getNode(),n=$n(o)?uu(o).getOr(t):t;e.selection.setRng(n.toRange())}))})(e)},ny=(e, t)=>((e, t)=>{const o=e.dom;return o.parentNode?((e, t)=>Q(e.dom.childNodes,(e=>t(bo(e)))).map(bo))(bo(o.parentNode),(o=>!xo(e,o)&&t(o))):H.none()})(e,t).isSome(),ry= e=>_(e)?e:L,ay=(e, t, o)=>{const n=t(e),r=ry(o);return n.orThunk((()=>r(e)?H.none():((e, t, o)=>{let n=e.dom;const r=ry(o);for(; n.parentNode;){n=n.parentNode;const e=bo(n),o=t(e);if(o.isSome())return o;if(r(e))break}return H.none()})(e,t,r)))},sy=im,iy=(e, t, o)=>{const n=e.formatter.get(o);if(n)for(let o=0; o<n.length; o++){const r=n[o];if(pm(r)&&!1===r.inherit&&e.dom.is(t,r.selector))return!0}return!1},ly=(e, t, o, n, r)=>{const a=e.dom.getRoot();if(t===a)return!1;const s=e.dom.getParent(t,(t=>!!iy(e,t,o)||t.parentNode===a||!!uy(e,t,o,n,!0)));return!!uy(e,s,o,n,r)},cy=(e, t, o)=>!(!hm(o)||!sy(t,o.inline))||!(!gm(o)||!sy(t,o.block))||!!pm(o)&&jn(t)&&e.is(t,o.selector),dy=(e, t, o, n, r, a)=>{const s=o[n],i="attributes"===n;if(_(o.onmatch))return o.onmatch(t,o,n);if(s)if(Oe(s)){for(let o=0; o<s.length; o++)if(i?e.getAttrib(t,s[o]):cm(e,t,s[o]))return!0}else for(const n in s)if(Ce(s,n)){const l=i?e.getAttrib(t,n):cm(e,t,n),c=sm(s[n],a),d=k(l)||Ye(l);if(d&&k(c))continue;if(r&&d&&!o.exact)return!1;if((!r||o.exact)&&!sy(l,lm(c,n)))return!1}return!0},uy=(e, t, o, n, r)=>{const a=e.formatter.get(o),s=e.dom;if(a&&jn(t))for(let o=0; o<a.length; o++){const i=a[o];if(cy(e.dom,t,i)&&dy(s,t,i,"attributes",r,n)&&dy(s,t,i,"styles",r,n)){const o=i.classes;if(o)for(let r=0; r<o.length; r++)if(!e.dom.hasClass(t,sm(o[r],n)))return;return i}}},my=(e, t, o, n, r)=>{if(n)return ly(e,n,t,o,r);if(n=e.selection.getNode(),ly(e,n,t,o,r))return!0;const a=e.selection.getStart();return!(a===n||!ly(e,a,t,o,r))},gy=Nr,py= e=>(e=>{const t=[];let o=e;for(; o;){if(Yn(o)&&o.data!==gy||o.childNodes.length>1)return[];jn(o)&&t.push(o),o=o.firstChild}return t})(e).length>0,hy= e=>{if(e){const t=new Hn(e,e);for(let e=t.current(); e; e=t.next())if(Yn(e))return e}return null},fy= e=>{const t=fo("span");return Jt(t,{id:gu,"data-mce-bogus":"1","data-mce-type":"format-caret"}),e&&fn(t,yo(gy)),t},yy=(e, t, o=!0)=>{const n=e.dom,r=e.selection;if(py(t))Wh(e,!1,bo(t),o);else{const e=r.getRng(),o=n.getParent(t,n.isBlock),a=e.startContainer,s=e.startOffset,i=e.endContainer,l=e.endOffset,c=(e=>{const t=hy(e);return t&&t.data.charAt(0)===gy&&t.deleteData(0,1),t})(t);n.remove(t,!0),a===c&&s>0&&e.setStart(c,s-1),i===c&&l>0&&e.setEnd(c,l-1),o&&n.isEmpty(o)&&Ar(bo(o)),r.setRng(e)}},by=(e, t, o=!0)=>{const n=e.dom,r=e.selection;if(t)yy(e,t,o);else if(!(t=hu(e.getBody(),r.getStart())))for(; t=n.get(gu);)yy(e,t,!1)},vy=(e, t)=>(e.appendChild(t),t),ky=(e, t)=>{var o;const n=Y(e,((e, t)=>vy(e,t.cloneNode(!1))),t),r=null!==(o=n.ownerDocument)&&void 0!==o?o:document;return vy(n,r.createTextNode(gy))},wy=(e, t, o, n)=>{const r=e.dom,i=e.selection;let l=!1;const c=e.formatter.get(t);if(!c)return;const d=i.getRng(),u=d.startContainer,m=d.startOffset;let g=u;Yn(u)&&(m!==u.data.length&&(l=!0),g=g.parentNode);const p=[];let h;for(; g;){if(uy(e,g,t,o,n)){h=g;break}g.nextSibling&&(l=!0),p.push(g),g=g.parentNode}if(h)if(l){const a=i.getBookmark();d.collapse(!0);let s=Mm(r,d,c,!0);s=xg(s),e.formatter.remove(t,o,s,n),i.moveToBookmark(a)}else{const l=hu(e.getBody(),h),c=fy(!1).dom;((e, t, o)=>{var n,r;const a=e.dom,s=a.getParent(o,M(om,e.schema));s&&a.isEmpty(s)?null===(n=o.parentNode)||void 0===n||n.replaceChild(t,o):((e=>{const t=Ln(e,"br"),o=K((e=>{const t=[];let o=e.dom;for(; o;)t.push(bo(o)),o=o.lastChild;return t})(e).slice(-1),kr);t.length===o.length&&W(o,kn)})(bo(o)),a.isEmpty(o)?null===(r=o.parentNode)||void 0===r||r.replaceChild(t,o):a.insertAfter(t,o))})(e,c,null!=l?l:h);const d=((e, t, o, n, r, i)=>{const l=e.formatter,c=e.dom,d=K(ge(l.get()),(e=>e!==n&&!Ve(e,"removeformat"))),u=((e, t, o)=>X(o,((o, n)=>{const r=((e, t)=>mm(e,t,(e=>{const t= e=>_(e)||e.length>1&&"%"===e.charAt(0);return U(["styles","attributes"],(o=>xe(e,o).exists((e=>{const o=f(e)?e:_e(e);return U(o,t)}))))})))(e,n);return e.formatter.matchNode(t,n,{},r)?o.concat([n]):o}),[]))(e,o,d);if(K(u,(t=>!((e, t, o)=>{const n=["inline","block","selector","attributes","styles","classes"],r= e=>ke(e,((e, t)=>U(n,(e=>e===t))));return mm(e,t,(t=>{const n=r(t);return mm(e,o,(e=>{const t=r(e);return((e, t, o=s)=>a(o).eq(e,t))(n,t)}))}))})(e,t,n))).length>0){const e=o.cloneNode(!1);return c.add(t,e),l.remove(n,r,e,i),c.remove(e),H.some(e)}return H.none()})(e,c,h,t,o,n),u=ky(p.concat(d.toArray()),c);l&&yy(e,l,!1),i.setCursorLocation(u,1),r.isEmpty(h)&&r.remove(h)}},_y= e=>{const t=fy(!1),o=ky(e,t.dom);return{caretContainer:t,caretPosition:Ni(o,0)}},xy=(e, t)=>{const{caretContainer:o,caretPosition:n}=_y(t);return gn(bo(e),o),kn(bo(e)),n},Cy=(e, t)=>{const o=e.schema.getTextInlineElements();return Ce(o,Vt(t))&&!pu(t.dom)&&!Wn(t.dom)},Sy= e=>pu(e.dom)&&py(e.dom),zy={},Oy=Zn(["pre"]);((e, t)=>{zy[e]||(zy[e]=[]),zy[e].push((e=>{if(!e.selection.getRng().collapsed){const t=e.selection.getSelectedBlocks(),o=K(K(t,Oy),(e=> t=>{const o=t.previousSibling;return Oy(o)&&Z(e,o)})(t));W(o,(e=>{((e, t)=>{const o=bo(t),n=zo(o).dom;kn(o),bn(bo(e),[fo("br",n),fo("br",n),...Bo(o)])})(e.previousSibling,e)}))}}))})("pre");const Ty=["fontWeight","fontStyle","color","fontSize","fontFamily"],Ey=(e, t)=>{const o=e.get(t);return f(o)?Q(o,(e=>hm(e)&&"span"===e.inline&&(e=>p(e.styles)&&U(ge(e.styles),(e=>Z(Ty,e))))(e))):H.none()},Ay=(e, t)=>du(t,Ni.fromRangeStart(e)).isNone(),My=(e, t)=>!1===cu(t,Ni.fromRangeEnd(e)).exists((e=>!or(e.getNode())||cu(t,e).isSome())),Ny= e=> t=>cr(t)&&e.isEditable(t),Ry= e=>K(e.getSelectedBlocks(),Ny(e.dom)),Dy=Dt.each,By= e=>jn(e)&&!Ou(e)&&!pu(e)&&!Wn(e),Ly=(e, t)=>{for(let o=e; o; o=o[t]){if(Yn(o)&&Ke(o.data))return e;if(jn(o)&&!Ou(o))return o}return e},Iy=(e, t, o)=>{const n=Bf(e),r=jn(t)&&Ju(t),a=jn(o)&&Ju(o);if(r&&a){const r=Ly(t,"previousSibling"),a=Ly(o,"nextSibling");if(n.compare(r,a)){for(let e=r.nextSibling; e&&e!==a;){const t=e;e=e.nextSibling,r.appendChild(t)}return e.dom.remove(a),Dt.each(Dt.grep(a.childNodes),(e=>{r.appendChild(e)})),r}}return o},Hy=(e, t, o, n)=>{var r;if(n&&!1!==t.merge_siblings){const t=null!==(r=Iy(e,tm(n),n))&&void 0!==r?r:n;Iy(e,t,tm(t,!0))}},Py=(e, t, o)=>{Dy(e.childNodes,(e=>{By(e)&&(t(e)&&o(e),e.hasChildNodes()&&Py(e,t,o))}))},Fy=(e, t)=> o=>!(!o||!cm(e,o,t)),jy=(e, t, o)=> n=>{e.setStyle(n,t,o),""===n.getAttribute("style")&&n.removeAttribute("style"),((e, t)=>{"SPAN"===t.nodeName&&0===e.getAttribs(t).length&&e.remove(t,!0)})(e,n)},Vy=nl([{keep:[]},{rename:["name"]},{removed:[]}]),Zy=/^(src|href|style)$/,Uy=Dt.each,qy=im,Wy=(e, t, o)=>e.isChildOf(t,o)&&t!==o&&!e.isBlock(o),$y=(e, t, o)=>{let n=t[o?"startContainer":"endContainer"],r=t[o?"startOffset":"endOffset"];if(jn(n)){const e=n.childNodes.length-1;!o&&r&&r--,n=n.childNodes[r>e?e:r]}return Yn(n)&&o&&r>=n.data.length&&(n=new Hn(n,e.getBody()).next()||n),Yn(n)&&!o&&0===r&&(n=new Hn(n,e.getBody()).prev()||n),n},Gy=(e, t)=>{const o=t?"firstChild":"lastChild",n=e[o];return(e=>/^(TR|TH|TD)$/.test(e.nodeName))(e)&&n?"TR"===e.nodeName&&n[o]||n:e},Ky=(e, t, o, n)=>{var r;const a=e.create(o,n);return null===(r=t.parentNode)||void 0===r||r.insertBefore(a,t),a.appendChild(t),a},Yy=(e, t, o, n, r)=>{const a=bo(t),s=bo(e.create(n,r)),i=o?Do(a):Ro(a);return bn(s,i),o?(gn(a,s),hn(s,a)):(pn(a,s),fn(s,a)),s.dom},Xy=(e, t, o)=>{const n=t.parentNode;let r;const a=e.dom,s=Cl(e);gm(o)&&n===a.getRoot()&&(o.list_block&&qy(t,o.list_block)||W(ue(t.childNodes),(t=>{nm(e,s,t.nodeName.toLowerCase())?r?r.appendChild(t):(r=Ky(a,t,s),a.setAttribs(r,Sl(e))):r=null}))),(e=>pm(e)&&hm(e)&&Bt(xe(e,"mixed"),!0))(o)&&!qy(o.inline,t)||a.remove(t,!0)},Jy=(e, t, o)=>x(e)?{name:t,value:null}:{name:e,value:sm(t,o)},Qy=(e, t)=>{""===e.getAttrib(t,"style")&&(t.removeAttribute("style"),t.removeAttribute("data-mce-style"))},eb=(e, t, o, n, r)=>{let a=!1;Uy(o.styles,((s, i)=>{const{name:l,value:c}=Jy(i,s,n),d=lm(c,l);(o.remove_similar||y(c)||!jn(r)||qy(cm(e,r,l),d))&&e.setStyle(t,l,""),a=!0})),a&&Qy(e,t)},tb=(e, t, o, n, r)=>{const a=e.dom,s=Bf(e),i=e.schema;if(hm(t)&&_a(i,t.inline)&&Ca(i,n)&&n.parentElement===e.getBody())return Xy(e,n,t),Vy.removed();if(!t.ceFalseOverride&&n&&"false"===a.getContentEditableParent(n))return Vy.keep();if(n&&!cy(a,n,t)&&!((e, t)=>t.links&&"A"===e.nodeName)(n,t))return Vy.keep();const l=n,c=t.preserve_attributes;if(hm(t)&&"all"===t.remove&&f(c)){const e=K(a.getAttribs(l),(e=>Z(c,e.name.toLowerCase())));if(a.removeAllAttribs(l),W(e,(e=>a.setAttrib(l,e.name,e.value))),e.length>0)return Vy.rename("span")}if("all"!==t.remove){eb(a,l,t,o,r),Uy(t.attributes,((e, n)=>{const{name:s,value:i}=Jy(n,e,o);if(t.remove_similar||y(i)||!jn(r)||qy(a.getAttrib(r,s),i)){if("class"===s){const e=a.getAttrib(l,s);if(e){let t="";if(W(e.split(/\s+/),(e=>{/mce\-\w+/.test(e)&&(t+=(t?" ":"")+e)})),t)return void a.setAttrib(l,s,t)}}if(Zy.test(s)&&l.removeAttribute("data-mce-"+s),"style"===s&&Zn(["li"])(l)&&"none"===a.getStyle(l,"list-style-type"))return l.removeAttribute(s),void a.setStyle(l,"list-style-type","none");"class"===s&&l.removeAttribute("className"),l.removeAttribute(s)}})),Uy(t.classes,(e=>{e=sm(e,o),jn(r)&&!a.hasClass(r,e)||a.removeClass(l,e)}));const e=a.getAttribs(l);for(let t=0; t<e.length; t++){const o=e[t].nodeName;if(!s.isAttributeInternal(o))return Vy.keep()}}return"none"!==t.remove?(Xy(e,l,t),Vy.removed()):Vy.keep()},ob=(e, t, o, n, r)=>tb(e,t,o,n,r).fold(L,(t=>(e.dom.rename(n,t),!0)),I),nb=(e, t, o, n)=>tb(e,t,o,n,n).fold(T(n),(t=>(e.dom.createFragment().appendChild(n),e.dom.rename(n,t))),T(null)),rb=(e, t, o, n, r)=>{const a=e.formatter.get(t),s=a[0],i=e.dom,l=e.selection,c= n=>{const i=((e, t, o, n, r)=>{let a;return t.parentNode&&W(um(e.dom,t.parentNode).reverse(),(t=>{if(!a&&jn(t)&&"_start"!==t.id&&"_end"!==t.id){const s=uy(e,t,o,n,r);s&&!1!==s.split&&(a=t)}})),a})(e,n,t,o,r);return((e, t, o, n, r, a, s, i)=>{var l,c;let d,u;const m=e.dom;if(o){const a=o.parentNode;for(let o=n.parentNode; o&&o!==a; o=o.parentNode){let n=m.clone(o,!1);for(let o=0; o<t.length&&(n=nb(e,t[o],i,n),null!==n); o++);n&&(d&&n.appendChild(d),u||(u=n),d=n)}s.mixed&&m.isBlock(o)||(n=null!==(l=m.split(o,n))&&void 0!==l?l:n),d&&u&&(null===(c=r.parentNode)||void 0===c||c.insertBefore(d,r),u.appendChild(r),hm(s)&&Hy(e,s,0,d))}return n})(e,a,i,n,n,0,s,o)},d= t=>U(a,(n=>ob(e,n,o,t,t))),u= t=>{const o=ue(t.childNodes),n=d(t)||U(a,(e=>cy(i,t,e))),r=t.parentNode;if(!n&&w(r)&&fm(s)&&d(r),s.deep&&o.length)for(let e=0; e<o.length; e++)u(o[e]);W(["underline","line-through","overline"],(o=>{jn(t)&&e.dom.getStyle(t,"text-decoration")===o&&t.parentNode&&dm(i,t.parentNode)===o&&ob(e,{deep:!1,exact:!0,inline:"span",styles:{textDecoration:o}},void 0,t)}))},m= e=>{const t=i.get(e?"_start":"_end");if(t){let o=t[e?"firstChild":"lastChild"];return(e=>Ou(e)&&jn(e)&&("_start"===e.id||"_end"===e.id))(o)&&(o=o[e?"firstChild":"lastChild"]),Yn(o)&&0===o.data.length&&(o=e?t.previousSibling||t.nextSibling:t.nextSibling||t.previousSibling),i.remove(t,!0),o}return null},g= t=>{let o,n,r=Mm(i,t,a,t.collapsed);if(s.split){if(r=xg(r),o=$y(e,r,!0),n=$y(e,r),o!==n){if(o=Gy(o,!0),n=Gy(n,!1),Wy(i,o,n)){const e=H.from(o.firstChild).getOr(o);return c(Yy(i,e,!0,"span",{id:"_start","data-mce-type":"bookmark"})),void m(!0)}if(Wy(i,n,o)){const e=H.from(n.lastChild).getOr(n);return c(Yy(i,e,!1,"span",{id:"_end","data-mce-type":"bookmark"})),void m(!1)}o=Ky(i,o,"span",{id:"_start","data-mce-type":"bookmark"}),n=Ky(i,n,"span",{id:"_end","data-mce-type":"bookmark"});const e=i.createRng();e.setStartAfter(o),e.setEndBefore(n),Nm(i,e,(e=>{W(e,(e=>{Ou(e)||Ou(e.parentNode)||c(e)}))})),c(o),c(n),o=m(!0),n=m()}else o=n=c(o);r.startContainer=o.parentNode?o.parentNode:o,r.startOffset=i.nodeIndex(o),r.endContainer=n.parentNode?n.parentNode:n,r.endOffset=i.nodeIndex(n)+1}Nm(i,r,(e=>{W(e,u)}))};if(n){if(Yu(n)){const e=i.createRng();e.setStartBefore(n),e.setEndAfter(n),g(e)}else g(n);Vm(e,t,n,o)}else l.isCollapsed()&&hm(s)&&!ju(e).length?wy(e,t,o,r):(Qu(e,(()=>Gu(e,g)),(n=>hm(s)&&my(e,t,o,n))),e.nodeChanged()),((e, t, o)=>{"removeformat"===t?W(Ry(e.selection),(t=>{W(Ty,(o=>e.dom.setStyle(t,o,""))),Qy(e.dom,t)})):Ey(e.formatter,t).each((t=>{W(Ry(e.selection),(n=>eb(e.dom,n,t,o,null)))}))})(e,t,o),Vm(e,t,n,o)},ab=Dt.each,sb=Dt.each,ib=(e, t, o, n)=>{if(sb(o.styles,((o, r)=>{e.setStyle(t,r,sm(o,n))})),o.styles){const o=e.getAttrib(t,"style");o&&e.setAttrib(t,"data-mce-style",o)}},lb=(e, t, o, n)=>{const r=e.formatter.get(t),a=r[0],s=!n&&e.selection.isCollapsed(),i=e.dom,l=e.selection,c=(e, t=a)=>{_(t.onformat)&&t.onformat(e,t,o,n),ib(i,e,t,o),sb(t.attributes,((t, n)=>{i.setAttrib(e,n,sm(t,o))})),sb(t.classes,(t=>{const n=sm(t,o);i.hasClass(e,n)||i.addClass(e,n)}))},d=(e, t)=>{let o=!1;return sb(e,(e=>!(!pm(e)||("false"!==i.getContentEditable(t)||e.ceFalseOverride)&&(!w(e.collapsed)||e.collapsed===s)&&i.is(t,e.selector)&&!pu(t)&&(c(t,e),o=!0,1)))),o},u= e=>{if(g(e)){const t=i.create(e);return c(t),t}return null},m=(n, s, i)=>{const l=[];let m=!0;const g=a.inline||a.block,p=u(g);Nm(n,s,(s=>{let u;const h= s=>{let f=!1,y=m,b=!1;const v=s.parentNode,k=v.nodeName.toLowerCase(),_=n.getContentEditable(s);w(_)&&(y=m,m="true"===_,f=!0,b=am(e,s));const x=m&&!f;if(or(s)&&!((e, t, o, n)=>{if(cc(e)&&hm(t)&&o.parentNode){const t=as(e.schema),r=ny(bo(o),(e=>pu(e.dom)));return Se(t,n)&&ma(bo(o.parentNode),!1)&&!r}return!1})(e,a,s,k))return u=null,void(gm(a)&&n.remove(s));if((n=>(e=>gm(e)&&!0===e.wrapper)(a)&&uy(e,n,t,o))(s))u=null;else{if(((t, o, n)=>{const r=(e=>gm(e)&&!0!==e.wrapper)(a)&&om(e.schema,t)&&nm(e,o,g);return n&&r})(s,k,x)){const e=n.rename(s,g);return c(e),l.push(e),void(u=null)}if(pm(a)){let e=d(r,s);if(!e&&w(v)&&fm(a)&&(e=d(r,v)),!hm(a)||e)return void(u=null)}w(p)&&((t, o, r, s)=>{const l=t.nodeName.toLowerCase(),c=nm(e,g,l)&&nm(e,o,g),d=!i&&Yn(t)&&Rr(t.data),u=pu(t),m=!hm(a)||!n.isBlock(t);return(r||s)&&c&&!d&&!u&&m})(s,k,x,b)?(u||(u=n.clone(p,!1),v.insertBefore(u,s),l.push(u)),b&&f&&(m=y),u.appendChild(s)):(u=null,W(ue(s.childNodes),h),f&&(m=y),u=null)}};W(s,h)})),!0===a.links&&W(l,(e=>{const t= e=>{"A"===e.nodeName&&c(e,a),W(ue(e.childNodes),t)};t(e)})),W(l,(s=>{const i=(e=>{let t=0;return W(e.childNodes,(e=>{(e=>w(e)&&Yn(e)&&0===e.length)(e)||Ou(e)||t++})),t})(s);!(l.length>1)&&n.isBlock(s)||0!==i?(hm(a)||gm(a)&&a.wrapper)&&(a.exact||1!==i||(s=(e=>{const t=Q(e.childNodes,Xu).filter((e=>"false"!==n.getContentEditable(e)&&cy(n,e,a)));return t.map((t=>{const o=n.clone(t,!1);return c(o),n.replace(o,e,!0),n.remove(t,!0),o})).getOr(e)})(s)),((e, t, o, n)=>{ab(t,(t=>{hm(t)&&ab(e.dom.select(t.inline,n),(n=>{By(n)&&ob(e,t,o,n,t.exact?n:null)})),((e, t, o)=>{if(t.clear_child_styles){const n=t.links?"*:not(a)":"*";Dy(e.select(n,o),(o=>{By(o)&&Ju(o)&&Dy(t.styles,((t, n)=>{e.setStyle(o,n,"")}))}))}})(e.dom,t,n)}))})(e,r,o,s),((e, t, o, n, r)=>{const a=r.parentNode;uy(e,a,o,n)&&ob(e,t,n,r)||t.merge_with_parents&&a&&e.dom.getParent(a,(a=>!!uy(e,a,o,n)&&(ob(e,t,n,r),!0)))})(e,a,t,o,s),((e, t, o, n)=>{if(t.styles&&t.styles.backgroundColor){const r=Fy(e,"fontSize");Py(n,(e=>r(e)&&Ju(e)),jy(e,"backgroundColor",sm(t.styles.backgroundColor,o)))}})(n,a,o,s),((e, t, o, n)=>{const r= t=>{if(jn(t)&&jn(t.parentNode)&&Ju(t)){const o=dm(e,t.parentNode);e.getStyle(t,"color")&&o?e.setStyle(t,"text-decoration",o):e.getStyle(t,"text-decoration")===o&&e.setStyle(t,"text-decoration",null)}};t.styles&&(t.styles.color||t.styles.textDecoration)&&(Dt.walk(n,r,"childNodes"),r(n))})(n,a,0,s),((e, t, o, n)=>{if(hm(t)&&("sub"===t.inline||"sup"===t.inline)){const o=Fy(e,"fontSize");Py(n,(e=>o(e)&&Ju(e)),jy(e,"fontSize",""));const r=K(e.select("sup"===t.inline?"sub":"sup",n),Ju);e.remove(r,!0)}})(n,a,0,s),Hy(e,a,0,s)):n.remove(s,!0)}))},p=Yu(n)?n:l.getNode();if("false"===i.getContentEditable(p)&&!am(e,p))return d(r,n=p),void jm(e,t,n,o);if(a){if(n)if(Yu(n)){if(!d(r,n)){const e=i.createRng();e.setStartBefore(n),e.setEndAfter(n),m(i,Mm(i,e,r),!0)}}else m(i,n,!0);else s&&hm(a)&&!ju(e).length?((e, t, o)=>{let n;const r=e.selection,a=e.formatter.get(t);if(!a)return;const s=r.getRng();let i=s.startOffset;const l=s.startContainer.nodeValue;n=hu(e.getBody(),r.getStart());const c=/[^\s\u00a0\u00ad\u200b\ufeff]/;if(l&&i>0&&i<l.length&&c.test(l.charAt(i))&&c.test(l.charAt(i-1))){const n=r.getBookmark();s.collapse(!0);let i=Mm(e.dom,s,a);i=xg(i),e.formatter.apply(t,o,i),r.moveToBookmark(n)}else{let a=n?hy(n):null;n&&(null==a?void 0:a.data)===gy||(d=e.getDoc(),u=fy(!0).dom,n=d.importNode(u,!0),a=n.firstChild,s.insertNode(n),i=1),e.formatter.apply(t,o,n),r.setCursorLocation(a,i)}var d,u})(e,t,o):(l.setRng(Wf(l.getRng())),Qu(e,(()=>{Gu(e,((e, t)=>{const o=t?e:Mm(i,e,r);m(i,o,!1)}))}),I),e.nodeChanged()),Ey(e.formatter,t).each((t=>{W((e=>K((e=>{const t=e.getSelectedBlocks(),o=e.getRng();if(e.isCollapsed())return[];if(1===t.length)return Ay(o,t[0])&&My(o,t[0])?t:[];{const e=ce(t).filter((e=>Ay(o,e))).toArray(),n=de(t).filter((e=>My(o,e))).toArray(),r=t.slice(1,-1);return e.concat(r).concat(n)}})(e),Ny(e.dom)))(e.selection),(e=>ib(i,e,t,o)))}));((e, t)=>{Ce(zy,e)&&W(zy[e],(e=>{e(t)}))})(t,e)}jm(e,t,n,o)},cb= e=>Ce(e,"vars"),db= e=>e.selection.getStart(),ub=(e, t, o, n, r)=>J(t,(t=>{const a=e.formatter.matchNode(t,o,null!=r?r:{},n);return!v(a)}),(t=>!!iy(e,t,o)||!n&&w(e.formatter.matchNode(t,o,r,!0)))),mb=(e, t)=>{const o=null!=t?t:db(e);return K(um(e.dom,o),(e=>jn(e)&&!Wn(e)))},gb=(e, t, o)=>{const n=mb(e,t);he(o,((o, r)=>{const a= o=>{const a=ub(e,n,r,o.similar,cb(o)?o.vars:void 0),s=a.isSome();if(o.state.get()!==s){o.state.set(s);const e=a.getOr(t);cb(o)?o.callback(s,{node:e,format:r,parents:n}):W(o.callbacks,(t=>t(s,{node:e,format:r,parents:n})))}};W([o.withSimilar,o.withoutSimilar],a),W(o.withVars,a)}))},pb=Dt.explode,hb=()=>{const e={};return{addFilter:(t, o)=>{W(pb(t),(t=>{Ce(e,t)||(e[t]={name:t,callbacks:[]}),e[t].callbacks.push(o)}))},getFilters:()=>_e(e),removeFilter:(t, o)=>{W(pb(t),(t=>{if(Ce(e,t))if(w(o)){const n=e[t],r=K(n.callbacks,(e=>e!==o));r.length>0?n.callbacks=r:delete e[t]}else delete e[t]}))}}},fb=(e, t, o)=>{var n;const r=ls();t.convert_fonts_to_spans&&((e, t, o)=>{e.addNodeFilter("font",(e=>{W(e,(e=>{const n=t.parse(e.attr("style")),r=e.attr("color"),a=e.attr("face"),s=e.attr("size");r&&(n.color=r),a&&(n["font-family"]=a),s&&Xe(s).each((e=>{n["font-size"]=o[e-1]})),e.name="span",e.attr("style",t.serialize(n)),((e, t)=>{W(["color","face","size"],(t=>{e.attr(t,null)}))})(e)}))}))})(e,r,Dt.explode(null!==(n=t.font_size_legacy_values)&&void 0!==n?n:"")),((e, t, o)=>{e.addNodeFilter("strike",(e=>{const n="html4"!==t.type;W(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))}}))}))})(e,o,r)},yb= e=>{const[t,...o]=e.split(","),n=o.join(","),r=/data:([^/]+\/[^;]+)(;.+)?/.exec(t);if(r){const e=";base64"===r[2],t=e?(e=>{const t=/([a-z0-9+\/=\s]+)/i.exec(e);return t?t[1]:""})(n):decodeURIComponent(n);return H.some({type:r[1],data:t,base64Encoded:e})}return H.none()},bb=(e, t, o=!0)=>{let n=t;if(o)try{n=atob(t)}catch(e){return H.none()}const r=new Uint8Array(n.length);for(let e=0; e<r.length; e++)r[e]=n.charCodeAt(e);return H.some(new Blob([r],{type:e}))},vb= e=>new Promise(((t, o)=>{const n=new FileReader;n.onloadend=()=>{t(n.result)},n.onerror=()=>{var e;o(null===(e=n.error)||void 0===e?void 0:e.message)},n.readAsDataURL(e)}));let kb=0;const wb=(e, t, o)=>yb(e).bind((({data:e,type:n,base64Encoded:r})=>{if(t&&!r)return H.none();{const t=r?e:btoa(e);return o(t,n)}})),_b=(e, t, o)=>{const n=e.create("blobid"+kb++,t,o);return e.add(n),n},xb=(e, t, o=!1)=>wb(t,o,((t, o)=>H.from(e.getByData(t,o)).orThunk((()=>bb(o,t).map((o=>_b(e,o,t)))))));function Cb(e){return Cb="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Cb(e)}function Sb(e, t){return Sb=Object.setPrototypeOf||function(e, t){return e.__proto__=t,e},Sb(e,t)}function zb(e, t, o){return zb=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e, t, o){var n=[null];n.push.apply(n,t);var r=new(Function.bind.apply(e,n));return o&&Sb(r,o.prototype),r},zb.apply(null,arguments)}function Ob(e){return function(e){if(Array.isArray(e))return Tb(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e, t){if(e){if("string"==typeof e)return Tb(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Tb(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Tb(e, t){(null==t||t>e.length)&&(t=e.length);for(var o=0,n=new Array(t); o<t; o++)n[o]=e[o];return n}var Eb=Object.hasOwnProperty,Ab=Object.setPrototypeOf,Mb=Object.isFrozen,Nb=Object.getPrototypeOf,Rb=Object.getOwnPropertyDescriptor,Db=Object.freeze,Bb=Object.seal,Lb=Object.create,Ib="undefined"!=typeof Reflect&&Reflect,Hb=Ib.apply,Pb=Ib.construct;Hb||(Hb=function(e, t, o){return e.apply(t,o)}),Db||(Db=function(e){return e}),Bb||(Bb=function(e){return e}),Pb||(Pb=function(e, t){return zb(e,Ob(t))});var Fb,jb=Xb(Array.prototype.forEach),Vb=Xb(Array.prototype.pop),Zb=Xb(Array.prototype.push),Ub=Xb(String.prototype.toLowerCase),qb=Xb(String.prototype.match),Wb=Xb(String.prototype.replace),$b=Xb(String.prototype.indexOf),Gb=Xb(String.prototype.trim),Kb=Xb(RegExp.prototype.test),Yb=(Fb=TypeError,function(){for(var e=arguments.length,t=new Array(e),o=0; o<e; o++)t[o]=arguments[o];return Pb(Fb,t)});function Xb(e){return function(t){for(var o=arguments.length,n=new Array(o>1?o-1:0),r=1; r<o; r++)n[r-1]=arguments[r];return Hb(e,t,n)}}function Jb(e, t){Ab&&Ab(e,null);for(var o=t.length; o--;){var n=t[o];if("string"==typeof n){var r=Ub(n);r!==n&&(Mb(t)||(t[o]=r),n=r)}e[n]=!0}return e}function Qb(e){var t,o=Lb(null);for(t in e)Hb(Eb,e,[t])&&(o[t]=e[t]);return o}function ev(e, t){for(; null!==e;){var o=Rb(e,t);if(o){if(o.get)return Xb(o.get);if("function"==typeof o.value)return Xb(o.value)}e=Nb(e)}return function(e){return console.warn("fallback value for",e),null}}var tv=Db(["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"]),ov=Db(["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"]),nv=Db(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),rv=Db(["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"]),av=Db(["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"]),sv=Db(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),iv=Db(["#text"]),lv=Db(["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"]),cv=Db(["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"]),dv=Db(["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"]),uv=Db(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),mv=Bb(/\{\{[\w\W]*|[\w\W]*\}\}/gm),gv=Bb(/<%[\w\W]*|[\w\W]*%>/gm),pv=Bb(/^data-[\-\w.\u00B7-\uFFFF]/),hv=Bb(/^aria-[\-\w]+$/),fv=Bb(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),yv=Bb(/^(?:\w+script|data):/i),bv=Bb(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),vv=Bb(/^html$/i),kv=function(){return"undefined"==typeof window?null:window},wv=function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:kv(),o=function(t){return e(t)};if(o.version="2.3.8",o.removed=[],!t||!t.document||9!==t.document.nodeType)return o.isSupported=!1,o;var n=t.document,r=t.document,a=t.DocumentFragment,s=t.HTMLTemplateElement,i=t.Node,l=t.Element,c=t.NodeFilter,d=t.NamedNodeMap,u=void 0===d?t.NamedNodeMap||t.MozNamedAttrMap:d,m=t.HTMLFormElement,g=t.DOMParser,p=t.trustedTypes,h=l.prototype,f=ev(h,"cloneNode"),y=ev(h,"nextSibling"),b=ev(h,"childNodes"),v=ev(h,"parentNode");if("function"==typeof s){var k=r.createElement("template");k.content&&k.content.ownerDocument&&(r=k.content.ownerDocument)}var w=function(e, t){if("object"!==Cb(e)||"function"!=typeof e.createPolicy)return null;var o=null,n="data-tt-policy-suffix";t.currentScript&&t.currentScript.hasAttribute(n)&&(o=t.currentScript.getAttribute(n));var r="dompurify"+(o?"#"+o:"");try{return e.createPolicy(r,{createHTML:function(e){return e}})}catch(e){return console.warn("TrustedTypes policy "+r+" could not be created."),null}}(p,n),_=w?w.createHTML(""):"",x=r,C=x.implementation,S=x.createNodeIterator,z=x.createDocumentFragment,O=x.getElementsByTagName,T=n.importNode,E={};try{E=Qb(r).documentMode?r.documentMode:{}}catch(e){}var A={};o.isSupported="function"==typeof v&&C&&void 0!==C.createHTMLDocument&&9!==E;var M,N,R=mv,D=gv,B=pv,L=hv,I=yv,H=bv,P=fv,F=null,j=Jb({},[].concat(Ob(tv),Ob(ov),Ob(nv),Ob(av),Ob(iv))),V=null,Z=Jb({},[].concat(Ob(lv),Ob(cv),Ob(dv),Ob(uv))),U=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),q=null,W=null,$=!0,G=!0,K=!1,Y=!1,X=!1,J=!1,Q=!1,ee=!1,te=!1,oe=!1,ne=!0,re=!0,ae=!1,se={},ie=null,le=Jb({},["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"]),ce=null,de=Jb({},["audio","video","img","source","image","track"]),ue=null,me=Jb({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),ge="http://www.w3.org/1998/Math/MathML",pe="http://www.w3.org/2000/svg",he="http://www.w3.org/1999/xhtml",fe=he,ye=!1,be=["application/xhtml+xml","text/html"],ve=null,ke=r.createElement("form"),we=function(e){return e instanceof RegExp||e instanceof Function},_e=function(e){ve&&ve===e||(e&&"object"===Cb(e)||(e={}),e=Qb(e),F="ALLOWED_TAGS"in e?Jb({},e.ALLOWED_TAGS):j,V="ALLOWED_ATTR"in e?Jb({},e.ALLOWED_ATTR):Z,ue="ADD_URI_SAFE_ATTR"in e?Jb(Qb(me),e.ADD_URI_SAFE_ATTR):me,ce="ADD_DATA_URI_TAGS"in e?Jb(Qb(de),e.ADD_DATA_URI_TAGS):de,ie="FORBID_CONTENTS"in e?Jb({},e.FORBID_CONTENTS):le,q="FORBID_TAGS"in e?Jb({},e.FORBID_TAGS):{},W="FORBID_ATTR"in e?Jb({},e.FORBID_ATTR):{},se="USE_PROFILES"in e&&e.USE_PROFILES,$=!1!==e.ALLOW_ARIA_ATTR,G=!1!==e.ALLOW_DATA_ATTR,K=e.ALLOW_UNKNOWN_PROTOCOLS||!1,Y=e.SAFE_FOR_TEMPLATES||!1,X=e.WHOLE_DOCUMENT||!1,ee=e.RETURN_DOM||!1,te=e.RETURN_DOM_FRAGMENT||!1,oe=e.RETURN_TRUSTED_TYPE||!1,Q=e.FORCE_BODY||!1,ne=!1!==e.SANITIZE_DOM,re=!1!==e.KEEP_CONTENT,ae=e.IN_PLACE||!1,P=e.ALLOWED_URI_REGEXP||P,fe=e.NAMESPACE||he,e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(U.tagNameCheck=e.CUSTOM_ELEMENT_HANDLING.tagNameCheck),e.CUSTOM_ELEMENT_HANDLING&&we(e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(U.attributeNameCheck=e.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),e.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(U.allowCustomizedBuiltInElements=e.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),M=M=-1===be.indexOf(e.PARSER_MEDIA_TYPE)?"text/html":e.PARSER_MEDIA_TYPE,N="application/xhtml+xml"===M?function(e){return e}:Ub,Y&&(G=!1),te&&(ee=!0),se&&(F=Jb({},Ob(iv)),V=[],!0===se.html&&(Jb(F,tv),Jb(V,lv)),!0===se.svg&&(Jb(F,ov),Jb(V,cv),Jb(V,uv)),!0===se.svgFilters&&(Jb(F,nv),Jb(V,cv),Jb(V,uv)),!0===se.mathMl&&(Jb(F,av),Jb(V,dv),Jb(V,uv))),e.ADD_TAGS&&(F===j&&(F=Qb(F)),Jb(F,e.ADD_TAGS)),e.ADD_ATTR&&(V===Z&&(V=Qb(V)),Jb(V,e.ADD_ATTR)),e.ADD_URI_SAFE_ATTR&&Jb(ue,e.ADD_URI_SAFE_ATTR),e.FORBID_CONTENTS&&(ie===le&&(ie=Qb(ie)),Jb(ie,e.FORBID_CONTENTS)),re&&(F["#text"]=!0),X&&Jb(F,["html","head","body"]),F.table&&(Jb(F,["tbody"]),delete q.tbody),Db&&Db(e),ve=e)},xe=Jb({},["mi","mo","mn","ms","mtext"]),Ce=Jb({},["foreignobject","desc","title","annotation-xml"]),Se=Jb({},["title","style","font","a","script"]),ze=Jb({},ov);Jb(ze,nv),Jb(ze,rv);var Oe=Jb({},av);Jb(Oe,sv);var Te=function(e){Zb(o.removed,{element:e});try{e.parentNode.removeChild(e)}catch(t){try{e.outerHTML=_}catch(t){e.remove()}}},Ee=function(e, t){try{Zb(o.removed,{attribute:t.getAttributeNode(e),from:t})}catch(e){Zb(o.removed,{attribute:null,from:t})}if(t.removeAttribute(e),"is"===e&&!V[e])if(ee||te)try{Te(t)}catch(e){}else try{t.setAttribute(e,"")}catch(e){}},Ae=function(e){var t,o;if(Q)e="<remove></remove>"+e;else{var n=qb(e,/^[\r\n\t ]+/);o=n&&n[0]}"application/xhtml+xml"===M&&(e='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+e+"</body></html>");var a=w?w.createHTML(e):e;if(fe===he)try{t=(new g).parseFromString(a,M)}catch(e){}if(!t||!t.documentElement){t=C.createDocument(fe,"template",null);try{t.documentElement.innerHTML=ye?"":a}catch(e){}}var s=t.body||t.documentElement;return e&&o&&s.insertBefore(r.createTextNode(o),s.childNodes[0]||null),fe===he?O.call(t,X?"html":"body")[0]:X?t.documentElement:s},Me=function(e){return S.call(e.ownerDocument||e,e,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT,null,!1)},Ne=function(e){return"object"===Cb(i)?e instanceof i:e&&"object"===Cb(e)&&"number"==typeof e.nodeType&&"string"==typeof e.nodeName},Re=function(e, t, n){A[e]&&jb(A[e],(function(e){e.call(o,t,n,ve)}))},De=function(e){var t,n;if(Re("beforeSanitizeElements",e,null),(n=e)instanceof m&&("string"!=typeof n.nodeName||"string"!=typeof n.textContent||"function"!=typeof n.removeChild||!(n.attributes instanceof u)||"function"!=typeof n.removeAttribute||"function"!=typeof n.setAttribute||"string"!=typeof n.namespaceURI||"function"!=typeof n.insertBefore))return Te(e),!0;if(Kb(/[\u0080-\uFFFF]/,e.nodeName))return Te(e),!0;var r=N(e.nodeName);if(Re("uponSanitizeElement",e,{tagName:r,allowedTags:F}),e.hasChildNodes()&&!Ne(e.firstElementChild)&&(!Ne(e.content)||!Ne(e.content.firstElementChild))&&Kb(/<[/\w]/g,e.innerHTML)&&Kb(/<[/\w]/g,e.textContent))return Te(e),!0;if("select"===r&&Kb(/<template/i,e.innerHTML))return Te(e),!0;if(!F[r]||q[r]){if(!q[r]&&Le(r)){if(U.tagNameCheck instanceof RegExp&&Kb(U.tagNameCheck,r))return!1;if(U.tagNameCheck instanceof Function&&U.tagNameCheck(r))return!1}if(re&&!ie[r]){var a=v(e)||e.parentNode,s=b(e)||e.childNodes;if(s&&a)for(var i=s.length-1; i>=0; --i)a.insertBefore(f(s[i],!0),y(e))}return Te(e),!0}return e instanceof l&&!function(e){var t=v(e);t&&t.tagName||(t={namespaceURI:he,tagName:"template"});var o=Ub(e.tagName),n=Ub(t.tagName);return e.namespaceURI===pe?t.namespaceURI===he?"svg"===o:t.namespaceURI===ge?"svg"===o&&("annotation-xml"===n||xe[n]):Boolean(ze[o]):e.namespaceURI===ge?t.namespaceURI===he?"math"===o:t.namespaceURI===pe?"math"===o&&Ce[n]:Boolean(Oe[o]):e.namespaceURI===he&&!(t.namespaceURI===pe&&!Ce[n])&&!(t.namespaceURI===ge&&!xe[n])&&!Oe[o]&&(Se[o]||!ze[o])}(e)?(Te(e),!0):"noscript"!==r&&"noembed"!==r||!Kb(/<\/no(script|embed)/i,e.innerHTML)?(Y&&3===e.nodeType&&(t=e.textContent,t=Wb(t,R," "),t=Wb(t,D," "),e.textContent!==t&&(Zb(o.removed,{element:e.cloneNode()}),e.textContent=t)),Re("afterSanitizeElements",e,null),!1):(Te(e),!0)},Be=function(e, t, o){if(ne&&("id"===t||"name"===t)&&(o in r||o in ke))return!1;if(G&&!W[t]&&Kb(B,t));else if($&&Kb(L,t));else if(!V[t]||W[t]){if(!(Le(e)&&(U.tagNameCheck instanceof RegExp&&Kb(U.tagNameCheck,e)||U.tagNameCheck instanceof Function&&U.tagNameCheck(e))&&(U.attributeNameCheck instanceof RegExp&&Kb(U.attributeNameCheck,t)||U.attributeNameCheck instanceof Function&&U.attributeNameCheck(t))||"is"===t&&U.allowCustomizedBuiltInElements&&(U.tagNameCheck instanceof RegExp&&Kb(U.tagNameCheck,o)||U.tagNameCheck instanceof Function&&U.tagNameCheck(o))))return!1}else if(ue[t]);else if(Kb(P,Wb(o,H,"")));else if("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==$b(o,"data:")||!ce[e])if(K&&!Kb(I,Wb(o,H,"")));else if(o)return!1;return!0},Le=function(e){return e.indexOf("-")>0},Ie=function(e){var t,o,n,r;Re("beforeSanitizeAttributes",e,null);var a=e.attributes;if(a){var s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:V};for(r=a.length; r--;){var i=t=a[r],l=i.name,c=i.namespaceURI;o="value"===l?t.value:Gb(t.value),n=N(l);var d=o;if(s.attrName=n,s.attrValue=o,s.keepAttr=!0,s.forceKeepAttr=void 0,Re("uponSanitizeAttribute",e,s),o=s.attrValue,!s.forceKeepAttr)if(s.keepAttr)if(Kb(/\/>/i,o))Ee(l,e);else{Y&&(o=Wb(o,R," "),o=Wb(o,D," "));var u=N(e.nodeName);if(Be(u,n,o)){if(o!==d)try{c?e.setAttributeNS(c,l,o):e.setAttribute(l,o)}catch(t){Ee(l,e)}}else Ee(l,e)}else Ee(l,e)}Re("afterSanitizeAttributes",e,null)}},He=function e(t){var o,n=Me(t);for(Re("beforeSanitizeShadowDOM",t,null); o=n.nextNode();)Re("uponSanitizeShadowNode",o,null),De(o)||(o.content instanceof a&&e(o.content),Ie(o));Re("afterSanitizeShadowDOM",t,null)};return o.sanitize=function(e, r){var s,l,c,d,u;if((ye=!e)&&(e="\x3c!--\x3e"),"string"!=typeof e&&!Ne(e)){if("function"!=typeof e.toString)throw Yb("toString is not a function");if("string"!=typeof(e=e.toString()))throw Yb("dirty is not a string, aborting")}if(!o.isSupported){if("object"===Cb(t.toStaticHTML)||"function"==typeof t.toStaticHTML){if("string"==typeof e)return t.toStaticHTML(e);if(Ne(e))return t.toStaticHTML(e.outerHTML)}return e}if(J||_e(r),o.removed=[],"string"==typeof e&&(ae=!1),ae){if(e.nodeName){var m=N(e.nodeName);if(!F[m]||q[m])throw Yb("root node is forbidden and cannot be sanitized in-place")}}else if(e instanceof i)1===(l=(s=Ae("\x3c!----\x3e")).ownerDocument.importNode(e,!0)).nodeType&&"BODY"===l.nodeName||"HTML"===l.nodeName?s=l:s.appendChild(l);else{if(!ee&&!Y&&!X&&-1===e.indexOf("<"))return w&&oe?w.createHTML(e):e;if(!(s=Ae(e)))return ee?null:oe?_:""}s&&Q&&Te(s.firstChild);for(var g=Me(ae?e:s); c=g.nextNode();)3===c.nodeType&&c===d||De(c)||(c.content instanceof a&&He(c.content),Ie(c),d=c);if(d=null,ae)return e;if(ee){if(te)for(u=z.call(s.ownerDocument); s.firstChild;)u.appendChild(s.firstChild);else u=s;return V.shadowroot&&(u=T.call(n,u,!0)),u}var p=X?s.outerHTML:s.innerHTML;return X&&F["!doctype"]&&s.ownerDocument&&s.ownerDocument.doctype&&s.ownerDocument.doctype.name&&Kb(vv,s.ownerDocument.doctype.name)&&(p="<!DOCTYPE "+s.ownerDocument.doctype.name+">\n"+p),Y&&(p=Wb(p,R," "),p=Wb(p,D," ")),w&&oe?w.createHTML(p):p},o.setConfig=function(e){_e(e),J=!0},o.clearConfig=function(){ve=null,J=!1},o.isValidAttribute=function(e, t, o){ve||_e({});var n=N(e),r=N(t);return Be(n,r,o)},o.addHook=function(e, t){"function"==typeof t&&(A[e]=A[e]||[],Zb(A[e],t))},o.removeHook=function(e){if(A[e])return Vb(A[e])},o.removeHooks=function(e){A[e]&&(A[e]=[])},o.removeAllHooks=function(){A={}},o}();const _v=Dt.each,xv=Dt.trim,Cv=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"],Sv={ftp:21,http:80,https:443,mailto:25},zv=["img","video"],Ov=(e, t, o)=>{const n=(e=>{try{return decodeURIComponent(e)}catch(t){return unescape(e)}})(t).replace(/\s/g,"");return!e.allow_script_urls&&(!!/((java|vb)script|mhtml):/i.test(n)||!e.allow_html_data_urls&&(/^data:image\//i.test(n)?((e, t)=>w(e)?!e:!w(t)||!Z(zv,t))(e.allow_svg_data_urls,o)&&/^data:image\/svg\+xml/i.test(n):/^data:/i.test(n)))};class Tv{constructor(e, t={}){this.path="",this.directory="",e=xv(e),this.settings=t;const o=t.base_uri,n=this;if(/^([\w\-]+):([^\/]{2})/i.test(e)||/^\s*#/.test(e))return void(n.source=e);const r=0===e.indexOf("//");if(0!==e.indexOf("/")||r||(e=(o&&o.protocol||"http")+"://mce_host"+e),!/^[\w\-]*:?\/\//.test(e)){const t=o?o.path:new Tv(document.location.href).directory;if(""===(null==o?void 0:o.protocol))e="//mce_host"+n.toAbsPath(t,e);else{const r=/([^#?]*)([#?]?.*)/.exec(e);r&&(e=(o&&o.protocol||"http")+"://mce_host"+n.toAbsPath(t,r[1])+r[2])}}e=e.replace(/@@/g,"(mce_at)");const a=/^(?:(?![^:@]+:[^:@\/]*@)([^:\/?#.]+):)?(?:\/\/)?((?:(([^:@\/]*):?([^:@\/]*))?@)?(\[[a-zA-Z0-9:.%]+\]|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/.exec(e);a&&_v(Cv,((e, t)=>{let o=a[t];o&&(o=o.replace(/\(mce_at\)/g,"@@")),n[e]=o})),o&&(n.protocol||(n.protocol=o.protocol),n.userInfo||(n.userInfo=o.userInfo),n.port||"mce_host"!==n.host||(n.port=o.port),n.host&&"mce_host"!==n.host||(n.host=o.host),n.source=""),r&&(n.protocol="")}static parseDataUri(e){let t;const o=decodeURIComponent(e).split(","),n=/data:([^;]+)/.exec(o[0]);return n&&(t=n[1]),{type:t,data:o[1]}}static isDomSafe(e, t, o={}){if(o.allow_script_urls)return!0;{const n=Ga.decode(e).replace(/[\s\u0000-\u001F]+/g,"");return!Ov(o,n,t)}}static getDocumentBaseUrl(e){var t;let o;return o=0!==e.protocol.indexOf("http")&&"file:"!==e.protocol?null!==(t=e.href)&&void 0!==t?t:"":e.protocol+"//"+e.host+e.pathname,/^[^:]+:\/\/\/?[^\/]+\//.test(o)&&(o=o.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(o)||(o+="/")),o}setPath(e){const t=/^(.*?)\/?(\w+)?$/.exec(e);t&&(this.path=t[0],this.directory=t[1],this.file=t[2]),this.source="",this.getURI()}toRelative(e){if("./"===e)return e;const t=new Tv(e,{base_uri:this});if("mce_host"!==t.host&&this.host!==t.host&&t.host||this.port!==t.port||this.protocol!==t.protocol&&""!==t.protocol)return t.getURI();const o=this.getURI(),n=t.getURI();if(o===n||"/"===o.charAt(o.length-1)&&o.substr(0,o.length-1)===n)return o;let r=this.toRelPath(this.path,t.path);return t.query&&(r+="?"+t.query),t.anchor&&(r+="#"+t.anchor),r}toAbsolute(e, t){const o=new Tv(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!0;const t=this.protocol?Sv[this.protocol]:null;if(t&&(this.port||t)==(e.port||t))return!0}return!1}toRelPath(e, t){let o,n,r=0,a="";const s=e.substring(0,e.lastIndexOf("/")).split("/"),i=t.split("/");if(s.length>=i.length)for(o=0,n=s.length; o<n; o++)if(o>=i.length||s[o]!==i[o]){r=o+1;break}if(s.length<i.length)for(o=0,n=i.length; o<n; o++)if(o>=s.length||s[o]!==i[o]){r=o+1;break}if(1===r)return t;for(o=0,n=s.length-(r-1); o<n; o++)a+="../";for(o=r-1,n=i.length; o<n; o++)a+=o!==r-1?"/"+i[o]:i[o];return a}toAbsPath(e, t){let o=0;const n=/\/$/.test(t)?"/":"",r=e.split("/"),a=t.split("/"),s=[];_v(r,(e=>{e&&s.push(e)}));const i=[];for(let e=a.length-1; e>=0; e--)0!==a[e].length&&"."!==a[e]&&(".."!==a[e]?o>0?o--:i.push(a[e]):o++);const l=s.length-o;let c;return c=l<=0?re(i).join("/"):s.slice(0,l).join("/")+"/"+re(i).join("/"),0!==c.indexOf("/")&&(c="/"+c),n&&c.lastIndexOf("/")!==c.length-1&&(c+=n),c}getURI(e=!1){let t;return this.source&&!e||(t="",e||(this.protocol?t+=this.protocol+"://":t+="//",this.userInfo&&(t+=this.userInfo+"@"),this.host&&(t+=this.host),this.port&&(t+=":"+this.port)),this.path&&(t+=this.path),this.query&&(t+="?"+this.query),this.anchor&&(t+="#"+this.anchor),this.source=t),this.source}}const Ev=Dt.makeMap("src,href,data,background,action,formaction,poster,xlink:href"),Av="data-mce-type";let Mv=0;const Nv=(e, t, o, n)=>{var r,a,s,i;const l=t.validate,c=o.getSpecialElements();8===e.nodeType&&!t.allow_conditional_comments&&/^\[if/i.test(null!==(r=e.nodeValue)&&void 0!==r?r:"")&&(e.nodeValue=" "+e.nodeValue);const d=null!==(a=null==n?void 0:n.tagName)&&void 0!==a?a:e.nodeName.toLowerCase();if(1!==e.nodeType||"body"===d)return;const u=bo(e),m=to(u,Av),p=Qt(u,"data-mce-bogus");if(!m&&g(p))return void("all"===p?kn(u):wn(u));const h=o.getElementRule(d);if(!l||h){if(w(n)&&(n.allowedTags[d]=!0),l&&h&&!m){if(W(null!==(s=h.attributesForced)&&void 0!==s?s:[],(e=>{Xt(u,e.name,"{$uid}"===e.value?"mce_"+Mv++:e.value)})),W(null!==(i=h.attributesDefault)&&void 0!==i?i:[],(e=>{to(u,e.name)||Xt(u,e.name,"{$uid}"===e.value?"mce_"+Mv++:e.value)})),h.attributesRequired&&!U(h.attributesRequired,(e=>to(u,e))))return void wn(u);if(h.removeEmptyAttrs&&(e=>{const t=e.dom.attributes;return null==t||0===t.length})(u))return void wn(u);h.outputName&&h.outputName!==d&&((e, t)=>{const o=((e, t)=>{const o=fo(t),n=no(e);return Jt(o,n),o})(e,t);pn(e,o);const n=Bo(e);bn(o,n),kn(e)})(u,h.outputName)}}else Ce(c,d)?kn(u):wn(u)},Rv=(e, t, o, n, r)=>!(n in Ev&&Ov(e,r,o))&&(!e.validate||t.isValid(o,n)||Ze(n,"data-")||Ze(n,"aria-")),Dv=(e, t)=>e.hasAttribute(Av)&&("id"===t||"class"===t||"style"===t),Bv=(e, t)=>e in t.getBoolAttrs(),Lv=(e, t, o)=>{const{attributes:n}=e;for(let r=n.length-1; r>=0; r--){const a=n[r],s=a.name,i=a.value;Rv(t,o,e.tagName.toLowerCase(),s,i)||Dv(e,s)?Bv(s,o)&&e.setAttribute(s,s):e.removeAttribute(s)}},Iv=(e, t)=>{const o=wv();return o.addHook("uponSanitizeElement",((o, n)=>{Nv(o,e,t,n)})),o.addHook("uponSanitizeAttribute",((o, n)=>{const r=o.tagName.toLowerCase(),{attrName:a,attrValue:s}=n;n.keepAttr=Rv(e,t,r,a,s),n.keepAttr?(n.allowedAttributes[a]=!0,Bv(a,t)&&(n.attrValue=a),e.allow_svg_data_urls&&Ze(s,"data:image/svg+xml")&&(n.forceKeepAttr=!0)):Dv(o,a)&&(n.forceKeepAttr=!0)})),o},Hv=Dt.makeMap,Pv=Dt.extend,Fv=(e, t, o)=>{const n=e.name,r=n in o&&"title"!==n&&"textarea"!==n,a=t.childNodes;for(let t=0,n=a.length; t<n; t++){const n=a[t],s=new Ep(n.nodeName.toLowerCase(),n.nodeType);if(jn(n)){const e=n.attributes;for(let t=0,o=e.length; t<o; t++){const o=e[t];s.attr(o.name,o.value)}}else Yn(n)?(s.value=n.data,r&&(s.raw=!0)):(Qn(n)||Xn(n)||Jn(n))&&(s.value=n.data);Fv(s,n,o),e.append(s)}},jv=(e={}, t=is())=>{const o=hb(),n=hb(),r={validate:!0,root_name:"body",sanitize:!0,...e},a=new DOMParser,s=((e, t)=>{if(e.sanitize){const o=Iv(e,t);return(t, n)=>{o.sanitize(t,((e, t)=>{const o={IN_PLACE:!0,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_TAGS:["#comment","#cdata-section","body"],ALLOWED_ATTR:[]};return o.PARSER_MEDIA_TYPE=t,e.allow_script_urls?o.ALLOWED_URI_REGEXP=/.*/:e.allow_html_data_urls&&(o.ALLOWED_URI_REGEXP=/^(?!(\w+script|mhtml):)/i),o})(e,n)),o.removed=[]}}return(o, n)=>{const r=document.createNodeIterator(o,NodeFilter.SHOW_ELEMENT|NodeFilter.SHOW_COMMENT|NodeFilter.SHOW_TEXT);let a;for(; a=r.nextNode();)Nv(a,e,t),jn(a)&&Lv(a,e,t)}})(r,t),i=o.addFilter,l=o.getFilters,c=o.removeFilter,d=n.addFilter,u=n.getFilters,m=n.removeFilter,p=(e, o)=>{const n=g(o.attr(Av)),r=1===o.type&&!Ce(e,o.name)&&!((e, t)=>1===t.type&&_a(e,t.name)&&g(t.attr(ga)))(t,o);return 3===o.type||r&&!n},h={schema:t,addAttributeFilter:d,getAttributeFilters:u,removeAttributeFilter:m,addNodeFilter:i,getNodeFilters:l,removeNodeFilter:c,parse:(e, o={})=>{var n;const i=r.validate,c=null!==(n=o.context)&&void 0!==n?n:r.root_name,d=((e, o, n="html")=>{const r="xhtml"===n?"application/xhtml+xml":"text/html",i=Ce(t.getSpecialElements(),o.toLowerCase()),l=i?`<${o}>${e}</${o}>`:e,c="xhtml"===n?`<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>${l}</body></html>`:`<body>${l}</body>`,d=a.parseFromString(c,r).body;return s(d,r),i?d.firstChild:d})(e,c,o.format);va(t,d);const m=new Ep(c,11);Fv(m,d,t.getSpecialElements()),d.innerHTML="";const[g,h]=((e, t, o, n)=>{const r=o.validate,a=t.getNonEmptyElements(),s=t.getWhitespaceElements(),i=Pv(Hv("script,style,head,html,body,title,meta,param"),t.getBlockElements()),l=as(t),c=/[ \t\r\n]+/g,d=/^[ \t\r\n]+/,u=/[ \t\r\n]+$/,m= e=>{let t=e.parent;for(; w(t);){if(t.name in s)return!0;t=t.parent}return!1},g= e=>e.name in i&&!za(t,e),p=(t, o)=>{const r=o?t.prev:t.next;return!w(r)&&!k(t.parent)&&g(t.parent)&&(t.parent!==e||!0===n.isRootContent)};return[e=>{var t;if(3===e.type&&!m(e)){let o=null!==(t=e.value)&&void 0!==t?t:"";o=o.replace(c," "),(((e, t)=>w(e)&&(t(e)||"br"===e.name))(e.prev,g)||p(e,!0))&&(o=o.replace(d,"")),0===o.length?e.remove():e.value=o}}, e=>{var o;if(1===e.type){const o=t.getElementRule(e.name);if(r&&o){const r=jf(t,a,s,e);o.paddInEmptyBlock&&r&&(e=>{let o=e;for(; w(o);){if(o.name in l)return jf(t,a,s,o);o=o.parent}return!1})(e)?Pf(n,g,e):o.removeEmpty&&r?g(e)?e.remove():e.unwrap():o.paddEmpty&&(r||(e=>{var t;return Ff(e,"#text")&&(null===(t=null==e?void 0:e.firstChild)||void 0===t?void 0:t.value)===ur})(e))&&Pf(n,g,e)}}else if(3===e.type&&!m(e)){let t=null!==(o=e.value)&&void 0!==o?o:"";(e.next&&g(e.next)||p(e,!1))&&(t=t.replace(u,"")),0===t.length?e.remove():e.value=t}}]})(m,t,r,o),f=[],y=i? e=>((e, o)=>{qf(t,e)&&o.push(e)})(e,f):S,b={nodes:{},attributes:{}},v= e=>Lf(l(),u(),e,b);if(((e, t, o)=>{const n=[];for(let o=e,r=o; o; r=o,o=o.walk()){const a=o;W(t,(e=>e(a))),k(a.parent)&&a!==e?o=r:n.push(a)}for(let e=n.length-1; e>=0; e--){const t=n[e];W(o,(e=>e(t)))}})(m,[g,v],[h,y]),f.reverse(),i&&f.length>0)if(o.context){const{pass:e,fail:n}=G(f,(e=>e.parent===m));Uf(n,t,m,v),o.invalid=e.length>0}else Uf(f,t,m,v);const _=((e, t)=>{var o;const n=null!==(o=t.forced_root_block)&&void 0!==o?o:e.forced_root_block;return!1===n?"":!0===n?"p":n})(r,o);return _&&("body"===m.name||o.isRootContent)&&((e, o)=>{const n=Pv(Hv("script,style,head,html,body,title,meta,param"),t.getBlockElements()),a=/^[ \t\r\n]+/,s=/[ \t\r\n]+$/;let i=e.firstChild,l=null;const c= e=>{var t,o;e&&(i=e.firstChild,i&&3===i.type&&(i.value=null===(t=i.value)||void 0===t?void 0:t.replace(a,"")),i=e.lastChild,i&&3===i.type&&(i.value=null===(o=i.value)||void 0===o?void 0:o.replace(s,"")))};if(t.isValidChild(e.name,o.toLowerCase())){for(; i;){const t=i.next;p(n,i)?(l||(l=new Ep(o,1),l.attr(r.forced_root_block_attrs),e.insert(l,i)),l.append(i)):(c(l),l=null),i=t}c(l)}})(m,_),o.invalid||If(b,o),m}};return((e, t)=>{const o=e.schema;t.remove_trailing_brs&&e.addNodeFilter("br",((e, t, n)=>{const r=Dt.extend({},o.getBlockElements()),a=o.getNonEmptyElements(),s=o.getWhitespaceElements();r.body=1;const i= e=>e.name in r&&za(o,e);for(let t=0,l=e.length; t<l; t++){let l=e[t],c=l.parent;if(c&&r[c.name]&&l===c.lastChild){let e=l.prev;for(; e;){const t=e.name;if("span"!==t||"bookmark"!==e.attr("data-mce-type")){"br"===t&&(l=null);break}e=e.prev}if(l&&(l.remove(),jf(o,a,s,c))){const e=o.getElementRule(c.name);e&&(e.removeEmpty?c.remove():e.paddEmpty&&Pf(n,i,c))}}else{let e=l;for(; c&&c.firstChild===e&&c.lastChild===e&&(e=c,!r[c.name]);)c=c.parent;if(e===c){const e=new Ep("#text",3);e.value=ur,l.replace(e)}}}})),e.addAttributeFilter("href",(e=>{let o=e.length;const n= e=>{const t=e?Dt.trim(e):"";return/\b(noopener)\b/g.test(t)?t:(e=>e.split(" ").filter((e=>e.length>0)).concat(["noopener"]).sort().join(" "))(t)};if(!t.allow_unsafe_link_target)for(; o--;){const t=e[o];"a"===t.name&&"_blank"===t.attr("target")&&t.attr("rel",n(t.attr("rel")))}})),t.allow_html_in_named_anchor||e.addAttributeFilter("id,name",(e=>{let t,o,n,r,a=e.length;for(; a--;)if(r=e[a],"a"===r.name&&r.firstChild&&!r.attr("href"))for(n=r.parent,t=r.lastChild; t&&n;)o=t.prev,n.insert(t,r),t=o})),t.fix_list_elements&&e.addNodeFilter("ul,ol",(e=>{let t,o,n=e.length;for(; n--;)if(t=e[n],o=t.parent,o&&("ul"===o.name||"ol"===o.name))if(t.prev&&"li"===t.prev.name)t.prev.append(t);else{const e=new Ep("li",1);e.attr("style","list-style-type: none"),t.wrap(e)}}));const n=o.getValidClasses();t.validate&&n&&e.addAttributeFilter("class",(e=>{var t;let o=e.length;for(; o--;){const r=e[o],a=null!==(t=r.attr("class"))&&void 0!==t?t:"",s=Dt.explode(a," ");let i="";for(let e=0; e<s.length; e++){const t=s[e];let o=!1,a=n["*"];a&&a[t]&&(o=!0),a=n[r.name],!o&&a&&a[t]&&(o=!0),o&&(i&&(i+=" "),i+=t)}i.length||(i=null),r.attr("class",i)}})),((e, t)=>{const{blob_cache:o}=t;if(o){const t= e=>{const t=e.attr("src");(e=>e.attr("src")===At.transparentSrc||w(e.attr("data-mce-placeholder")))(e)||(e=>w(e.attr("data-mce-bogus")))(e)||k(t)||xb(o,t,!0).each((t=>{e.attr("src",t.blobUri())}))};e.addAttributeFilter("src",(e=>W(e,t)))}})(e,t)})(h,r),((e, t, o)=>{t.inline_styles&&fb(e,t,o)})(h,r,t),h},Vv=(e, t, o)=>{const n=(e=>ty(e)?Pp({validate:!1}).serialize(e):e)(e),r=t(n);if(r.isDefaultPrevented())return r;if(ty(e)){if(r.content!==n){const t=jv({validate:!1,forced_root_block:!1,sanitize:o}).parse(r.content,{context:e.name});return{...r,content:t}}return{...r,content:e}}return r},Zv=(e, t)=>{if(t.no_events)return ol.value(t);{const o=((e, t)=>e.dispatch("BeforeGetContent",t))(e,t);return o.isDefaultPrevented()?ol.error(Um(e,{content:"",...o}).content):ol.value(o)}},Uv=(e, t, o)=>{if(o.no_events)return t;{const n=Vv(t,(t=>Um(e,{...o,content:t})),Jc(e));return n.content}},qv=(e, t)=>{if(t.no_events)return ol.value(t);{const o=Vv(t.content,(o=>((e, t)=>e.dispatch("BeforeSetContent",t))(e,{...t,content:o})),Jc(e));return o.isDefaultPrevented()?(Zm(e,o),ol.error(void 0)):ol.value(o)}},Wv=(e, t, o)=>{o.no_events||Zm(e,{...o,content:t})},$v=(e, t, o)=>({element:e,width:t,rows:o}),Gv=(e, t)=>({element:e,cells:t}),Kv=(e, t)=>({x:e,y:t}),Yv=(e, t)=>eo(e,t).bind(Xe).getOr(1),Xv=(e, t, o)=>{const n=e.rows;return!!(n[o]?n[o].cells:[])[t]},Jv= e=>X(e,((e, t)=>t.cells.length>e?t.cells.length:e),0),Qv=(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(xo(n[o],t))return H.some(Kv(o,e))}return H.none()},ek=(e, t, o, n, r)=>{const a=[],s=e.rows;for(let e=o; e<=r; e++){const o=s[e].cells,r=t<n?o.slice(t,n+1):o.slice(n,t+1);a.push(Gv(s[e].element,r))}return a},tk= e=>((e, t)=>{const o=ei(e.element),n=fo("tbody");return bn(n,t),fn(o,n),o})(e,(e=>q(e.rows,(e=>{const t=q(e.cells,(e=>{const t=ti(e);return oo(t,"colspan"),oo(t,"rowspan"),t})),o=ei(e.element);return bn(o,t),o})))(e)),ok=(e, t)=>{const o=bo(t.commonAncestorContainer),n=sh(o,e),r=K(n,Tr),a=((e, t)=>Q(e,(e=>"li"===Vt(e)&&qu(e,t))).fold(T([]),(t=>(e=>Q(e,(e=>"ul"===Vt(e)||"ol"===Vt(e))))(e).map((e=>{const t=fo(Vt(e)),o=ke(un(e),((e, t)=>Ze(t,"list-style")));return sn(t,o),[fo("li"),t]})).getOr([]))))(n,t),s=r.concat(a.length?a:(e=>xr(e)?To(e).filter(_r).fold(T([]),(t=>[e,t])):_r(e)?[e]:[])(o));return q(s,ei)},nk=()=>ug([]),rk=(e, t)=>((e, t)=>Jo(t,"table",M(xo,e)))(e,t[0]).bind((e=>{const o=t[0],n=t[t.length-1],r=(e=>{const t=$v(ei(e),0,[]);return W(Ln(e,"tr"),((e, o)=>{W(Ln(e,"td,th"),((n, r)=>{((e, t, o, n, r)=>{const a=Yv(r,"rowspan"),s=Yv(r,"colspan"),i=e.rows;for(let e=o; e<o+a; e++){i[e]||(i[e]=Gv(ti(n),[]));for(let n=t; n<t+s; n++)i[e].cells[n]=e===o&&n===t?r:ei(r)}})(t,((e, t, o)=>{for(; Xv(e,t,o);)t++;return t})(t,r,o),o,e,n)}))})),$v(t.element,Jv(t.rows),t.rows)})(e);return((e, t, o)=>Qv(e,t).bind((t=>Qv(e,o).map((o=>((e, t, o)=>{const n=t.x,r=t.y,a=o.x,s=o.y,i=r<s?ek(e,n,r,a,s):ek(e,n,s,a,r);return $v(e.element,Jv(i),i)})(e,t,o))))))(r,o,n).map((e=>ug([tk(e)])))})).getOrThunk(nk),ak=(e, t)=>{const o=Fu(t,e);return o.length>0?rk(e,o):((e, t)=>t.length>0&&t[0].collapsed?nk():((e, t)=>((e, t)=>{const o=X(t,((e, t)=>(fn(t,e),t)),e);return t.length>0?ug([o]):o})(bo(t.cloneContents()),ok(e,t)))(e,t[0]))(e,t)},sk=(e, t)=>t>=0&&t<e.length&&Au(e.charAt(t)),ik= e=>Dr(e.innerText),lk= e=>jn(e)?e.outerHTML:Yn(e)?Ga.encodeRaw(e.data,!1):Qn(e)?"\x3c!--"+e.data+"--\x3e":"",ck=(e, t)=>(((e, t)=>{let o=0;W(e,(e=>{0===e[0]?o++:1===e[0]?(((e, t, o)=>{const n=(e=>{let t;const o=document.createElement("div"),n=document.createDocumentFragment();for(e&&(o.innerHTML=e); t=o.firstChild;)n.appendChild(t);return n})(t);if(e.hasChildNodes()&&o<e.childNodes.length){const t=e.childNodes[o];e.insertBefore(n,t)}else e.appendChild(n)})(t,e[1],o),o++):2===e[0]&&((e, t)=>{if(e.hasChildNodes()&&t<e.childNodes.length){const o=e.childNodes[t];e.removeChild(o)}})(t,o)}))})(((e, t)=>{const o=e.length+t.length+2,n=new Array(o),r=new Array(o),a=(o, n, r, s, l)=>{const c=i(o,n,r,s);if(null===c||c.start===n&&c.diag===n-s||c.end===o&&c.diag===o-r){let a=o,i=r;for(; a<n||i<s;)a<n&&i<s&&e[a]===t[i]?(l.push([0,e[a]]),++a,++i):n-o>s-r?(l.push([2,e[a]]),++a):(l.push([1,t[i]]),++i)}else{a(o,c.start,r,c.start-c.diag,l);for(let t=c.start; t<c.end; ++t)l.push([0,e[t]]);a(c.end,n,c.end-c.diag,s,l)}},s=(o, n, r, a)=>{let s=o;for(; s-n<a&&s<r&&e[s]===t[s-n];)++s;return((e, t, o)=>({start:e,end:t,diag:o}))(o,s,n)},i=(o, a, i, l)=>{const c=a-o,d=l-i;if(0===c||0===d)return null;const u=c-d,m=d+c,g=(m%2==0?m:m+1)/2;let p,h,f,y,b;for(n[1+g]=o,r[1+g]=a+1,p=0; p<=g; ++p){for(h=-p; h<=p; h+=2){for(f=h+g,h===-p||h!==p&&n[f-1]<n[f+1]?n[f]=n[f+1]:n[f]=n[f-1]+1,y=n[f],b=y-o+i-h; y<a&&b<l&&e[y]===t[b];)n[f]=++y,++b;if(u%2!=0&&u-p<=h&&h<=u+p&&r[f-u]<=n[f])return s(r[f-u],h+o-i,a,l)}for(h=u-p; h<=u+p; h+=2){for(f=h+g-u,h===u-p||h!==u+p&&r[f+1]<=r[f-1]?r[f]=r[f+1]-1:r[f]=r[f-1],y=r[f]-1,b=y-o+i-h; y>=o&&b>=i&&e[y]===t[b];)r[f]=y--,b--;if(u%2==0&&-p<=h&&h<=p&&r[f]<=n[f+u])return s(r[f],h+o-i,a,l)}}return null},l=[];return a(0,e.length,0,t.length,l),l})(q(ue(t.childNodes),lk),e),t),t),dk=Be((()=>document.implementation.createHTMLDocument("undo"))),uk= e=>{const t=(o=e.getBody(),K(q(ue(o.childNodes),lk),(e=>e.length>0)));var o;const n=oe(t,(t=>{const o=Np(e.serializer,t);return o.length>0?[o]:[]})),r=n.join("");return(e=>-1!==e.indexOf("</iframe>"))(r)?(e=>({type:"fragmented",fragments:e,content:"",bookmark:null,beforeBookmark:null}))(n):(e=>({type:"complete",fragments:null,content:e,bookmark:null,beforeBookmark:null}))(r)},mk=(e, t, o)=>{const n=o?t.beforeBookmark:t.bookmark;"fragmented"===t.type?ck(t.fragments,e.getBody()):e.setContent(t.content,{format:"raw",no_selection:!w(n)||!yu(n)||!n.isFakeCaret}),n&&(e.selection.moveToBookmark(n),e.selection.scrollIntoView())},gk= e=>"fragmented"===e.type?e.fragments.join(""):e.content,pk= e=>{const t=fo("body",dk());return Cn(t,gk(e)),W(Ln(t,"*[data-mce-bogus]"),wn),xn(t)},hk=(e, t)=>!(!e||!t)&&(!!((e, t)=>gk(e)===gk(t))(e,t)||((e, t)=>pk(e)===pk(t))(e,t)),fk= e=>0===e.get(),yk=(e, t, o)=>{fk(o)&&(e.typing=t)},bk=(e, t)=>{e.typing&&(yk(e,!1,t),e.add())},vk= e=>({init:{bindEvents:S},undoManager:{beforeChange:(t, o)=>((e, t, o)=>{fk(t)&&o.set(Qi(e.selection))})(e,t,o),add:(t, o, n, r, a, s)=>((e, t, o, n, r, a, s)=>{const i=uk(e),l=Dt.extend(a||{},i);if(!fk(n)||e.removed)return null;const c=t.data[o.get()];if(e.dispatch("BeforeAddUndo",{level:l,lastLevel:c,originalEvent:s}).isDefaultPrevented())return null;if(c&&hk(c,l))return null;t.data[o.get()]&&r.get().each((e=>{t.data[o.get()].beforeBookmark=e}));const d=yc(e);if(d&&t.data.length>d){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)}l.bookmark=Qi(e.selection),o.get()<t.data.length-1&&(t.data.length=o.get()+1),t.data.push(l),o.set(t.data.length-1);const u={level:l,lastLevel:c,originalEvent:s};return o.get()>0?(e.setDirty(!0),e.dispatch("AddUndo",u),e.dispatch("change",u)):e.dispatch("AddUndo",u),l})(e,t,o,n,r,a,s),undo:(t, o, n)=>((e, t, o, n)=>{let r;return t.typing&&(t.add(),t.typing=!1,yk(t,!1,o)),n.get()>0&&(n.set(n.get()-1),r=t.data[n.get()],mk(e,r,!0),e.setDirty(!0),e.dispatch("Undo",{level:r})),r})(e,t,o,n),redo:(t, o)=>((e, t, o)=>{let n;return t.get()<o.length-1&&(t.set(t.get()+1),n=o[t.get()],mk(e,n,!1),e.setDirty(!0),e.dispatch("Redo",{level:n})),n})(e,t,o),clear:(t, o)=>((e, t, o)=>{t.data=[],o.set(0),t.typing=!1,e.dispatch("ClearUndos")})(e,t,o),reset: e=>(e=>{e.clear(),e.add()})(e),hasUndo:(t, o)=>((e, t, o)=>o.get()>0||t.typing&&t.data[0]&&!hk(uk(e),t.data[0]))(e,t,o),hasRedo:(e, t)=>((e, t)=>t.get()<e.data.length-1&&!e.typing)(e,t),transact:(e, t, o)=>((e, t, o)=>(bk(e,t),e.beforeChange(),e.ignore(o),e.add()))(e,t,o),ignore:(e, t)=>((e, t)=>{try{e.set(e.get()+1),t()}finally{e.set(e.get()-1)}})(e,t),extra:(t, o, n, r)=>((e, t, o, n, r)=>{if(t.transact(n)){const n=t.data[o.get()].bookmark,a=t.data[o.get()-1];mk(e,a,!0),t.transact(r)&&(t.data[o.get()-1].beforeBookmark=n)}})(e,t,o,n,r)},formatter:{match:(t, o, n, r)=>my(e,t,o,n,r),matchAll:(t, o)=>((e, t, o)=>{const n=[],r={},a=e.selection.getStart();return e.dom.getParent(a,(a=>{for(let s=0; s<t.length; s++){const i=t[s];!r[i]&&uy(e,a,i,o)&&(r[i]=!0,n.push(i))}}),e.dom.getRoot()),n})(e,t,o),matchNode:(t, o, n, r)=>uy(e,t,o,n,r),canApply: t=>((e, t)=>{const o=e.formatter.get(t),n=e.dom;if(o){const t=e.selection.getStart(),r=um(n,t);for(let e=o.length-1; e>=0; e--){const t=o[e];if(!pm(t))return!0;for(let e=r.length-1; e>=0; e--)if(n.is(r[e],t.selector))return!0}}return!1})(e,t),closest: t=>((e, t)=>{const o= t=>xo(t,bo(e.getBody()));return H.from(e.selection.getStart(!0)).bind((n=>ay(bo(n),(o=>me(t,(t=>((t, o)=>uy(e,t.dom,o)?H.some(o):H.none())(o,t)))),o))).getOrNull()})(e,t),apply:(t, o, n)=>lb(e,t,o,n),remove:(t, o, n, r)=>rb(e,t,o,n,r),toggle:(t, o, n)=>((e, t, o, n)=>{const r=e.formatter.get(t);r&&(!my(e,t,o,n)||"toggle"in r[0]&&!r[0].toggle?lb(e,t,o,n):rb(e,t,o,n))})(e,t,o,n),formatChanged:(t, o, n, r, a)=>((e, t, o, n, r, a)=>(((e, t, o, n, r, a)=>{const s=t.get();W(o.split(","),(t=>{const o=xe(s,t).getOrThunk((()=>{const e={withSimilar:{state:As(!1),similar:!0,callbacks:[]},withoutSimilar:{state:As(!1),similar:!1,callbacks:[]},withVars:[]};return s[t]=e,e})),i=()=>{const o=mb(e);return ub(e,o,t,r,a).isSome()};if(v(a)){const e=r?o.withSimilar:o.withoutSimilar;e.callbacks.push(n),1===e.callbacks.length&&e.state.set(i())}else o.withVars.push({state:As(i()),similar:r,vars:a,callback:n})})),t.set(s)})(e,t,o,n,r,a),{unbind:()=>((e, t, o)=>{const n=e.get();W(t.split(","),(e=>xe(n,e).each((t=>{n[e]={withSimilar:{...t.withSimilar,callbacks:K(t.withSimilar.callbacks,(e=>e!==o))},withoutSimilar:{...t.withoutSimilar,callbacks:K(t.withoutSimilar.callbacks,(e=>e!==o))},withVars:K(t.withVars,(e=>e.callback!==o))}})))),e.set(n)})(t,o,n)}))(e,t,o,n,r,a)},editor:{getContent: t=>((e, t)=>H.from(e.getBody()).fold(T("tree"===t.format?new Ep("body",11):""),(o=>Lp(e,t,o))))(e,t),setContent:(t, o)=>((e, t, o)=>H.from(e.getBody()).map((n=>ty(t)?((e, t, o, n)=>{Hf(e.parser.getNodeFilters(),e.parser.getAttributeFilters(),o);const r=Pp({validate:!1},e.schema).serialize(o),a=zr(bo(t))?r:Dt.trim(r);return oy(e,a,n.no_selection),{content:o,html:a}})(e,n,t,o):((e, t, o, n)=>{if(0===o.length||/^\s+$/.test(o)){const r='<br data-mce-bogus="1">';"TABLE"===t.nodeName?o="<tr><td>"+r+"</td></tr>":/^(UL|OL)$/.test(t.nodeName)&&(o="<li>"+r+"</li>");const a=Cl(e);return e.schema.isValidChild(t.nodeName.toLowerCase(),a.toLowerCase())?(o=r,o=e.dom.createHTML(a,Sl(e),o)):o||(o=r),oy(e,o,n.no_selection),{content:o,html:o}}{"raw"!==n.format&&(o=Pp({validate:!1},e.schema).serialize(e.parser.parse(o,{isRootContent:!0,insert:!0})));const r=zr(bo(t))?o:Dt.trim(o);return oy(e,r,n.no_selection),{content:r,html:r}}})(e,n,t,o))).getOr({content:t,html:ty(o.content)?"":o.content}))(e,t,o),insertContent:(t, o)=>ey(e,t,o),addVisual: t=>((e, t)=>{const o=e.dom,n=w(t)?t:e.getBody();W(o.select("table,a",n),(t=>{switch(t.nodeName){case"TABLE":const n=Sc(e),r=o.getAttrib(t,"border");r&&"0"!==r||!e.hasVisual?o.removeClass(t,n):o.addClass(t,n);break;case"A":if(!o.getAttrib(t,"href")){const n=o.getAttrib(t,"name")||t.id,r=zc(e);n&&e.hasVisual?o.addClass(t,r):o.removeClass(t,r)}}})),e.dispatch("VisualAid",{element:t,hasVisual:e.hasVisual})})(e,t)},selection:{getContent:(t, o)=>((e, t, o={})=>{const n=((e, t)=>({...e,format:t,get:!0,selection:!0,getInner:!0}))(o,t);return Zv(e,n).fold(E,(t=>{const o=((e, t)=>{if("text"===t.format)return(e=>H.from(e.selection.getRng()).map((t=>{var o;const n=H.from(e.dom.getParent(t.commonAncestorContainer,e.dom.isBlock)),r=e.getBody(),a=(e=>e.map((e=>e.nodeName)).getOr("div").toLowerCase())(n),s=bo(t.cloneContents());Dp(s),Bp(s);const i=e.dom.add(r,a,{"data-mce-bogus":"all",style:"overflow: hidden; opacity: 0;"},s.dom),l=ik(i),c=Dr(null!==(o=i.textContent)&&void 0!==o?o:"");if(e.dom.remove(i),sk(c,0)||sk(c,c.length-1)){const e=n.getOr(r),t=ik(e),o=t.indexOf(l);return-1===o?l:(sk(t,o-1)?" ":"")+l+(sk(t,o+l.length)?" ":"")}return l})).getOr(""))(e);{const o=((e, t)=>{const o=e.selection.getRng(),n=e.dom.create("body"),r=e.selection.getSel(),a=vp(e,Pu(r)),s=t.contextual?ak(bo(e.getBody()),a).dom:o.cloneContents();return s&&n.appendChild(s),e.selection.serializer.serialize(n,t)})(e,t);return"tree"===t.format?o:e.selection.isCollapsed()?"":o}})(e,t);return Uv(e,o,t)}))})(e,t,o)},autocompleter:{addDecoration: t=>xp(e,t),removeDecoration:()=>((e, t)=>Cp(t).each((t=>{const o=e.selection.getBookmark();wn(t),e.selection.moveToBookmark(o)})))(e,bo(e.getBody()))},raw:{getModel:()=>H.none()}}),kk= e=>Ce(e.plugins,"rtc"),wk= e=>e.rtcInstance?e.rtcInstance:vk(e),_k= e=>{const t=e.rtcInstance;if(t)return t;throw new Error("Failed to get RTC instance not yet initialized.")},xk= e=>_k(e).init.bindEvents(),Ck= e=>0===e.dom.length?(kn(e),H.none()):H.some(e),Sk=(e, t, o, n)=>{e.bind((e=>((n?Ih:Lh)(e.dom,n?e.dom.length:0),t.filter(Wt).map((t=>((e, t, o, n)=>{const r=e.dom,a=t.dom,s=n?r.length:a.length;n?(Hh(r,a,!1,!n),o.setStart(a,s)):(Hh(a,r,!1,!n),o.setEnd(a,s))})(e,t,o,n)))))).orThunk((()=>{const e=((e, t)=>e.filter((e=>Hm.isBookmarkNode(e.dom))).bind(t?No:Mo))(t,n).or(t).filter(Wt);return e.map((e=>((e, t)=>{To(e).each((o=>{const n=e.dom;t&&Oh(o,Ni(n,0))?Lh(n,0):!t&&Th(o,Ni(n,n.length))&&Ih(n,n.length)}))})(e,n)))}))},zk=(e, t, o)=>{if(Ce(e,t)){const n=K(e[t],(e=>e!==o));0===n.length?delete e[t]:e[t]=n}};const Ok= e=>!(!e||!e.ownerDocument)&&Co(bo(e.ownerDocument),bo(e)),Tk=(e, t, o, n)=>{let r,a;const{selectorChangedWithUnbind:s}=((e, t)=>{let o,n;const r=(t, o)=>Q(o,(o=>e.is(o,t))),a= t=>e.getParents(t,void 0,e.getRoot());return{selectorChangedWithUnbind:(e, s)=>(o||(o={},n={},t.on("NodeChange",(e=>{const t=e.element,s=a(t),i={};he(o,((e, t)=>{r(t,s).each((o=>{n[t]||(W(e,(e=>{e(!0,{node:o,selector:t,parents:s})})),n[t]=e),i[t]=e}))})),he(n,((e, o)=>{i[o]||(delete n[o],W(e,(e=>{e(!1,{node:t,selector:o,parents:s})})))}))}))),o[e]||(o[e]=[]),o[e].push(s),r(e,a(t.selection.getStart())).each((()=>{n[e]=o[e]})),{unbind:()=>{zk(o,e,s),zk(n,e,s)}})}})(e,n),i=(e, t)=>((e, t, o={})=>{const n=((e, t)=>({format:"html",...e,set:!0,selection:!0,content:t}))(o,t);qv(e,n).each((t=>{const o=((e, t)=>{if("raw"!==t.format){const o=e.selection.getRng(),n=e.dom.getParent(o.commonAncestorContainer,e.dom.isBlock),r=n?{context:n.nodeName.toLowerCase()}:{},a=e.parser.parse(t.content,{forced_root_block:!1,...r,...t});return Pp({validate:!1},e.schema).serialize(a)}return t.content})(e,t),n=e.selection.getRng();((e, t)=>{const o=H.from(t.firstChild).map(bo),n=H.from(t.lastChild).map(bo);e.deleteContents(),e.insertNode(t);const r=o.bind(Mo).filter(Wt).bind(Ck),a=n.bind(No).filter(Wt).bind(Ck);Sk(r,o,e,!0),Sk(a,n,e,!1),e.collapse(!1)})(n,n.createContextualFragment(o)),e.selection.setRng(n),Ug(e,n),Wv(e,o,t)}))})(n,e,t),l= e=>{const t=d();t.collapse(!!e),u(t)},c=()=>t.getSelection?t.getSelection():t.document.selection,d=()=>{let o;const s=(e, t, o)=>{try{return t.compareBoundaryPoints(e,o)}catch(e){return-1}},i=t.document;if(w(n.bookmark)&&!gp(n)){const e=tp(n);if(e.isSome())return e.map((e=>vp(n,[e])[0])).getOr(i.createRange())}try{const e=c();e&&!Fn(e.anchorNode)&&(o=e.rangeCount>0?e.getRangeAt(0):i.createRange(),o=vp(n,[o])[0])}catch(e){}if(o||(o=i.createRange()),er(o.startContainer)&&o.collapsed){const t=e.getRoot();o.setStart(t,0),o.setEnd(t,0)}return r&&a&&(0===s(o.START_TO_START,o,r)&&0===s(o.END_TO_END,o,r)?o=a:(r=null,a=null)),o},u=(e, t)=>{if(!(e=>!!e&&Ok(e.startContainer)&&Ok(e.endContainer))(e))return;const o=c();if(e=n.dispatch("SetSelectionRange",{range:e,forward:t}).range,o){a=e;try{o.removeAllRanges(),o.addRange(e)}catch(e){}!1===t&&o.extend&&(o.collapse(e.endContainer,e.endOffset),o.extend(e.startContainer,e.startOffset)),r=o.rangeCount>0?o.getRangeAt(0):null}if(!e.collapsed&&e.startContainer===e.endContainer&&(null==o?void 0:o.setBaseAndExtent)&&e.endOffset-e.startOffset<2&&e.startContainer.hasChildNodes()){const t=e.startContainer.childNodes[e.startOffset];t&&"IMG"===t.nodeName&&(o.setBaseAndExtent(e.startContainer,e.startOffset,e.endContainer,e.endOffset),o.anchorNode===e.startContainer&&o.focusNode===e.endContainer||o.setBaseAndExtent(t,0,t,1))}n.dispatch("AfterSetSelectionRange",{range:e,forward:t})},m=()=>{const t=c(),o=null==t?void 0:t.anchorNode,n=null==t?void 0:t.focusNode;if(!t||!o||!n||Fn(o)||Fn(n))return!0;const r=e.createRng(),a=e.createRng();try{r.setStart(o,t.anchorOffset),r.collapse(!0),a.setStart(n,t.focusOffset),a.collapse(!0)}catch(e){return!0}return r.compareBoundaryPoints(r.START_TO_START,a)<=0},g={dom:e,win:t,serializer:o,editor:n,expand:(t={type:"word"})=>u(Cg(e).expand(d(),t)),collapse:l,setCursorLocation:(t, o)=>{const r=e.createRng();w(t)&&w(o)?(r.setStart(t,o),r.setEnd(t,o),u(r),l(!1)):(Wu(e,r,n.getBody(),!0),u(r))},getContent: e=>((e, t={})=>((e, t, o)=>_k(e).selection.getContent(t,o))(e,t.format?t.format:"html",t))(n,e),setContent:i,getBookmark:(e, t)=>p.getBookmark(e,t),moveToBookmark: e=>p.moveToBookmark(e),select:(t, o)=>(((e, t, o)=>H.from(t).bind((t=>H.from(t.parentNode).map((n=>{const r=e.nodeIndex(t),a=e.createRng();return a.setStart(n,r),a.setEnd(n,r+1),o&&(Wu(e,a,t,!0),Wu(e,a,t,!1)),a})))))(e,t,o).each(u),t),isCollapsed:()=>{const e=d(),t=c();return!(!e||e.item)&&(e.compareEndPoints?0===e.compareEndPoints("StartToEnd",e):!t||e.collapsed)},isEditable:()=>{const t=d(),o=n.getBody().querySelectorAll('[data-mce-selected="1"]');return o.length>0?ne(o,(t=>e.isEditable(t.parentElement))):t.startContainer===t.endContainer?e.isEditable(t.startContainer):e.isEditable(t.startContainer)&&e.isEditable(t.endContainer)},isForward:m,setNode: t=>(i(e.getOuterHTML(t)),t),getNode:()=>((e, t)=>{if(!t)return e;let o=t.startContainer,n=t.endContainer;const r=t.startOffset,a=t.endOffset;let s=t.commonAncestorContainer;t.collapsed||(o===n&&a-r<2&&o.hasChildNodes()&&(s=o.childNodes[r]),Yn(o)&&Yn(n)&&(o=o.length===r?bp(o.nextSibling,!0):o.parentNode,n=0===a?bp(n.previousSibling,!1):n.parentNode,o&&o===n&&(s=o)));const i=Yn(s)?s.parentNode:s;return jn(i)?i:e})(n.getBody(),d()),getSel:c,setRng:u,getRng:d,getStart: e=>fp(n.getBody(),d(),e),getEnd: e=>yp(n.getBody(),d(),e),getSelectedBlocks:(t, o)=>((e, t, o, n)=>{const r=[],a=e.getRoot(),s=e.getParent(o||fp(a,t,t.collapsed),e.isBlock),i=e.getParent(n||yp(a,t,t.collapsed),e.isBlock);if(s&&s!==a&&r.push(s),s&&i&&s!==i){let t;const o=new Hn(s,a);for(; (t=o.next())&&t!==i;)e.isBlock(t)&&r.push(t)}return i&&s!==i&&i!==a&&r.push(i),r})(e,d(),t,o),normalize:()=>{const t=d(),o=c();if(!(Pu(o).length>1)&&$u(n)){const o=wg(e,t);return o.each((e=>{u(e,m())})),o.getOr(t)}return t},selectorChanged:(e, t)=>(s(e,t),g),selectorChangedWithUnbind:s,getScrollContainer:()=>{let t,o=e.getRoot();for(; o&&"BODY"!==o.nodeName;){if(o.scrollHeight>o.clientHeight){t=o;break}o=o.parentNode}return t},scrollIntoView:(e, t)=>{w(e)?((e, t, o)=>{(e.inline?jg:Zg)(e,t,o)})(n,e,t):Ug(n,d(),t)},placeCaretAt:(e, t)=>u(gg(e,t,n.getDoc())),getBoundingClientRect:()=>{const e=d();return e.collapsed?Ni.fromRangeStart(e).getClientRects()[0]:e.getBoundingClientRect()},destroy:()=>{t=r=a=null,h.destroy()}},p=Hm(g),h=Xm(g,n);return g.bookmarkManager=p,g.controlSelection=h,g},Ek=(e, t, o)=>{-1===Dt.inArray(t,o)&&(e.addAttributeFilter(o,((e, t)=>{let o=e.length;for(; o--;)e[o].attr(t,null)})),t.push(o))},Ak=(e, t)=>{const o=["data-mce-selected"],n=t&&t.dom?t.dom:Os.DOM,r=t&&t.schema?t.schema:is(e);e.entity_encoding=e.entity_encoding||"named",e.remove_trailing_brs=!("remove_trailing_brs"in e)||e.remove_trailing_brs;const a=jv(e,r);return((e, t, o)=>{e.addAttributeFilter("data-mce-tabindex",((e, t)=>{let o=e.length;for(; 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 r="data-mce-"+n,a=t.url_converter,s=t.url_converter_scope;let i=e.length;for(; i--;){const t=e[i];let l=t.attr(r);void 0!==l?(t.attr(n,l.length>0?l:null),t.attr(r,null)):(l=t.attr(n),"style"===n?l=o.serializeStyle(o.parseStyle(l),t.name):a&&(l=a.call(s,l,n,t.name)),t.attr(n,l.length>0?l:null))}})),e.addAttributeFilter("class",(e=>{let t=e.length;for(; t--;){const o=e[t];let n=o.attr("class");n&&(n=n.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;for(; n--;){const t=e[n];if("bookmark"===t.attr("data-mce-type")&&!o.cleanup){const e=H.from(t.firstChild).exists((e=>{var t;return!Rr(null!==(t=e.value)&&void 0!==t?t:"")}));e?t.unwrap():t.remove()}}})),e.addNodeFilter("noscript",(e=>{var t;let o=e.length;for(; o--;){const n=e[o].firstChild;n&&(n.value=Ga.decode(null!==(t=n.value)&&void 0!==t?t:""))}})),e.addNodeFilter("script,style",((e, o)=>{var n;const r= 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 a=e.length;for(; a--;){const s=e[a],i=s.firstChild,l=null!==(n=null==i?void 0:i.value)&&void 0!==n?n:"";if("script"===o){const e=s.attr("type");e&&s.attr("type","mce-no/type"===e?null:e.replace(/^mce\-/,"")),"xhtml"===t.element_format&&i&&l.length>0&&(i.value="// <![CDATA[\n"+r(l)+"\n// ]]>")}else"xhtml"===t.element_format&&i&&l.length>0&&(i.value="\x3c!--\n"+r(l)+"\n--\x3e")}})),e.addNodeFilter("#comment",(e=>{let n=e.length;for(; n--;){const r=e[n],a=r.value;t.preserve_cdata&&0===(null==a?void 0:a.indexOf("[CDATA["))?(r.name="#cdata",r.type=4,r.value=o.decode(a.replace(/^\[CDATA\[|\]\]$/g,""))):0===(null==a?void 0:a.indexOf("mce:protected "))&&(r.name="#text",r.type=3,r.raw=!0,r.value=unescape(a).substr(14))}})),e.addNodeFilter("xml:namespace,input",((e, t)=>{let o=e.length;for(; o--;){const n=e[o];7===n.type?n.remove():1===n.type&&("input"!==t||n.attr("type")||n.attr("type","text"))}})),e.addAttributeFilter("data-mce-type",(t=>{W(t,(t=>{"format-caret"===t.attr("data-mce-type")&&(t.isEmpty(e.schema.getNonEmptyElements())?t.remove():t.unwrap())}))})),e.addAttributeFilter("data-mce-src,data-mce-href,data-mce-style,data-mce-selected,data-mce-expando,data-mce-block,data-mce-type,data-mce-resize,data-mce-placeholder",((e, t)=>{let o=e.length;for(; o--;)e[o].attr(t,null)}))})(a,e,n),{schema:r,addNodeFilter:a.addNodeFilter,addAttributeFilter:a.addAttributeFilter,serialize:(o, s={})=>{const i={format:"html",...s},l=((e, t, o)=>((e, t)=>w(e)&&e.hasEventListeners("PreProcess")&&!t.no_events)(e,o)?((e, t, o)=>{let n;const r=e.dom;let a=t.cloneNode(!0);const s=document.implementation;if(s.createHTMLDocument){const e=s.createHTMLDocument("");Dt.each("BODY"===a.nodeName?a.childNodes:[a],(t=>{e.body.appendChild(e.importNode(t,!0))})),a="BODY"!==a.nodeName?e.body.firstChild:e.body,n=r.doc,r.doc=e}return((e, t)=>{e.dispatch("PreProcess",t)})(e,{...o,node:a}),n&&(r.doc=n),a})(e,t,o):t)(t,o,i),c=((e, t, o)=>{const n=Dr(o.getInner?t.innerHTML:e.getOuterHTML(t));return o.selection||zr(bo(t))?n:Dt.trim(n)})(n,l,i),d=((e, t, o)=>{const n=o.selection?{forced_root_block:!1,...o}:o,r=e.parse(t,n);return(e=>{const t= e=>"br"===(null==e?void 0:e.name),o=e.lastChild;if(t(o)){const e=o.prev;t(e)&&(o.remove(),e.remove())}})(r),r})(a,c,i);return"tree"===i.format?d:((e, t, o, n, r)=>{const a=((e, t, o)=>Pp(e,t).serialize(o))(t,o,n);return((e, t, o)=>{if(!t.no_events&&e){const n=((e, t)=>e.dispatch("PostProcess",t))(e,{...t,content:o});return n.content}return o})(e,r,a)})(t,e,r,d,i)},addRules:r.addValidElements,setRules:r.setValidElements,addTempAttr:M(Ek,a,o),getTempAttrs:T(o),getNodeFilters:a.getNodeFilters,getAttributeFilters:a.getAttributeFilters,removeNodeFilter:a.removeNodeFilter,removeAttributeFilter:a.removeAttributeFilter}},Mk=(e, t)=>{const o=Ak(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,removeNodeFilter:o.removeNodeFilter,removeAttributeFilter:o.removeAttributeFilter}},Nk=(e, t, o={})=>{const n=((e, t)=>({format:"html",...e,set:!0,content:t}))(o,t);return qv(e,n).map((t=>{const o=((e, t, o)=>wk(e).editor.setContent(t,o))(e,t.content,t);return Wv(e,o.html,t),o.content})).getOr(t)},Rk="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(","),Dk="template_cdate_classes,template_mdate_classes,template_selected_content_classes,template_preview_replace_values,template_replace_values,templates,template_cdate_format,template_mdate_format".split(","),Bk="bbcode,colorpicker,contextmenu,fullpage,legacyoutput,spellchecker,textcolor".split(","),Lk=[{name:"template",replacedWith:"Advanced Template"}],Ik=(e, t)=>{const o=K(t,(t=>Ce(e,t)));return ie(o)},Hk= e=>{const t=Ik(e,Rk),o=e.forced_root_block;return!1!==o&&""!==o||t.push("forced_root_block (false only)"),ie(t)},Pk= e=>Ik(e,Dk),Fk=(e, t)=>{const o=Dt.makeMap(e.plugins," "),n=K(t,(e=>Ce(o,e)));return ie(n)},jk= e=>Fk(e,Bk),Vk= e=>Fk(e,Lk.map((e=>e.name))),Zk= e=>Q(Lk,(t=>t.name===e)).fold((()=>e),(t=>`${e}, replaced by ${t.replacedWith}`)),Uk=Os.DOM,qk= e=>H.from(e).each((e=>e.destroy())),Wk=(()=>{const e={};return{add:(t, o)=>{e[t]=o},get: t=>e[t]?e[t]:{icons:{}},has: t=>Ce(e,t)}})(),$k=Bs.ModelManager,Gk=(e, t)=>t.dom[e],Kk=(e, t)=>parseInt(ln(t,e),10),Yk=M(Gk,"clientWidth"),Xk=M(Gk,"clientHeight"),Jk=M(Kk,"margin-top"),Qk=M(Kk,"margin-left"),ew= e=>{const t=[],o=()=>{const t=e.theme;return t&&t.getNotificationManagerImpl?t.getNotificationManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a NotificationManager implementation.")};return{open:e,close:e,getArgs:e}})()},n=()=>H.from(t[0]),r=()=>{W(t,(e=>{e.reposition()}))},a= e=>{ee(t,(t=>t===e)).each((e=>{t.splice(e,1)}))},s=(s, i=!0)=>e.removed||!(e=>{return(t=e.inline?e.getBody():e.getContentAreaContainer(),H.from(t).map(bo)).map(Go).getOr(!1);var t})(e)?{}:(i&&e.dispatch("BeforeOpenNotification",{notification:s}),Q(t,(e=>{return t=o().getArgs(e),n=s,!(t.type!==n.type||t.text!==n.text||t.progressBar||t.timeout||n.progressBar||n.timeout);var t,n})).getOrThunk((()=>{e.editorManager.setActive(e);const i=o().open(s,(()=>{a(i),r(),n().fold((()=>e.focus()),(e=>qg(bo(e.getEl()))))}));return(e=>{t.push(e)})(i),r(),e.dispatch("OpenNotification",{notification:{...i}}),i}))),i=T(t);return(e=>{e.on("SkinLoaded",(()=>{const t=tc(e);t&&s({text:t,type:"warning",timeout:0},!1),r()})),e.on("show ResizeEditor ResizeWindow NodeChange",(()=>{requestAnimationFrame(r)})),e.on("remove",(()=>{W(t.slice(),(e=>{o().close(e)}))}))})(e),{open:s,close:()=>{n().each((e=>{o().close(e),a(e),r()}))},getNotifications:i}},tw=Bs.PluginManager,ow=Bs.ThemeManager,nw= e=>{let t=[];const o=()=>{const t=e.theme;return t&&t.getWindowManagerImpl?t.getWindowManagerImpl():(()=>{const e=()=>{throw new Error("Theme did not provide a WindowManager implementation.")};return{open:e,openUrl:e,alert:e,confirm:e,close:e}})()},n=(e, t)=>(...o)=>t?t.apply(e,o):void 0,r= o=>{(t=>{e.dispatch("CloseWindow",{dialog:t})})(o),t=K(t,(e=>e!==o)),0===t.length&&e.focus()},a= o=>{e.editorManager.setActive(e),ep(e),e.ui.show();const n=o();return(o=>{t.push(o),(t=>{e.dispatch("OpenWindow",{dialog:t})})(o)})(n),n};return e.on("remove",(()=>{W(t,(e=>{o().close(e)}))})),{open:(e, t)=>a((()=>o().open(e,t,r))),openUrl: e=>a((()=>o().openUrl(e,r))),alert:(e, t, r)=>{const a=o();a.alert(e,n(r||a,t))},confirm:(e, t, r)=>{const a=o();a.confirm(e,n(r||a,t))},close:()=>{H.from(t[t.length-1]).each((e=>{o().close(e),r(e)}))}}},rw=(e, t)=>{e.notificationManager.open({type:"error",text:t})},aw=(e, t)=>{e._skinLoaded?rw(e,t):e.on("SkinLoaded",(()=>{rw(e,t)}))},sw=(e, t, o)=>{Fm(e,t,{message:o}),console.error(o)},iw=(e, t, o)=>o?`Failed to load ${e}: ${o} from url ${t}`:`Failed to load ${e} url: ${t}`,lw=(e, ...t)=>{const o=window.console;o&&(o.error?o.error(e,...t):o.log(e,...t))},cw=(e, t)=>{const o=e.editorManager.baseURL+"/skins/content",n=`content${e.editorManager.suffix}.css`;return q(t,(t=>(e=>/^[a-z0-9\-]+$/i.test(e))(t)&&!e.inline?`${o}/${t}/${n}`:e.documentBaseURI.toAbsolute(t)))},dw=(e, t)=>{const o={};return{findAll:(n, r=I)=>{const a=K((e=>e?ue(e.getElementsByTagName("img")):[])(n),(t=>{const o=t.src;return!t.hasAttribute("data-mce-bogus")&&!t.hasAttribute("data-mce-placeholder")&&!(!o||o===At.transparentSrc)&&(Ze(o,"blob:")?!e.isUploaded(o)&&r(t):!!Ze(o,"data:")&&r(t))})),s=q(a,(e=>{const n=e.src;if(Ce(o,n))return o[n].then((t=>g(t)?t:{image:e,blobInfo:t.blobInfo}));{const r=((e, t)=>{const o=()=>Promise.reject("Invalid data URI");if(Ze(t,"blob:")){const a=e.getByUri(t);return w(a)?Promise.resolve(a):(n=t,Ze(n,"blob:")?(e=>fetch(e).then((e=>e.ok?e.blob():Promise.reject())).catch((()=>Promise.reject({message:`Cannot convert ${e} to Blob. Resource might not exist or is inaccessible.`,uriType:"blob"}))))(n):Ze(n,"data:")?(r=n,new Promise(((e, t)=>{yb(r).bind((({type:e,data:t,base64Encoded:o})=>bb(e,t,o))).fold((()=>t("Invalid data URI")),e)}))):Promise.reject("Unknown URI format")).then((t=>vb(t).then((n=>wb(n,!1,(o=>H.some(_b(e,t,o)))).getOrThunk(o)))))}var n,r;return Ze(t,"data:")?xb(e,t).fold(o,(e=>Promise.resolve(e))):Promise.reject("Unknown image data format")})(t,n).then((t=>(delete o[n],{image:e,blobInfo:t}))).catch((e=>(delete o[n],e)));return o[n]=r,r}}));return Promise.all(s)}}},uw=()=>{let e={};const t=(e, t)=>({status:e,resultUri:t}),o= t=>t in e;return{hasBlobUri:o,getResultUri: t=>{const o=e[t];return o?o.resultUri:null},isPending: t=>!!o(t)&&1===e[t].status,isUploaded: t=>!!o(t)&&2===e[t].status,markPending: o=>{e[o]=t(1,null)},markUploaded:(o, n)=>{e[o]=t(2,n)},removeFailed: t=>{delete e[t]},destroy:()=>{e={}}}};let mw=0;const gw=(e, t)=>{const o={},n=(e, o)=>new Promise(((n, 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)return void r("HTTP Error: "+a.status);const e=JSON.parse(a.responseText);var o,s;e&&g(e.location)?n((o=t.basePath,s=e.location,o?o.replace(/\/$/,"")+"/"+s.replace(/^\//,""):s)):r("Invalid JSON: "+a.responseText)};const s=new FormData;s.append("file",e.blob(),e.filename()),a.send(s)})),r=_(t.handler)?t.handler:n,a=(e, t)=>({url:t,blobInfo:e,status:!0}),s=(e, t)=>({url:"",blobInfo:e,status:!1,error:t}),i=(e, t)=>{Dt.each(o[e],(e=>{e(t)})),delete o[e]};return{upload:(l, c)=>t.url||r!==n?((t, n)=>(t=Dt.grep(t,(t=>!e.isUploaded(t.blobUri()))),Promise.all(Dt.map(t,(t=>e.isPending(t.blobUri())?(e=>{const t=e.blobUri();return new Promise((e=>{o[t]=o[t]||[],o[t].push(e)}))})(t):((t, o, n)=>(e.markPending(t.blobUri()),new Promise((r=>{let l,c;try{const d=()=>{l&&(l.close(),c=S)},u= o=>{d(),e.markUploaded(t.blobUri(),o),i(t.blobUri(),a(t,o)),r(a(t,o))},m= o=>{d(),e.removeFailed(t.blobUri()),i(t.blobUri(),s(t,o)),r(s(t,o))};c= e=>{e<0||e>100||H.from(l).orThunk((()=>H.from(n).map(D))).each((t=>{l=t,t.progressBar.value(e)}))},o(t,c).then(u,(e=>{m(g(e)?{message:e}:e)}))}catch(e){r(s(t,e))}}))))(t,r,n))))))(l,c):new Promise((e=>{e([])}))}},pw= e=>()=>e.notificationManager.open({text:e.translate("Image uploading..."),type:"info",timeout:-1,progressBar:!0}),hw=(e, t)=>gw(t,{url:Ll(e),basePath:Il(e),credentials:Hl(e),handler:Pl(e)}),fw= e=>{const t=(()=>{let e=[];const t= e=>{if(!e.blob||!e.base64)throw new Error("blob and base64 representations of the image are required for BlobInfo to be created");const t=e.id||"blobid"+mw+++(()=>{const e=()=>Math.round(4294967295*Math.random()).toString(36);return"s"+(new Date).getTime().toString(36)+e()+e()+e()})(),o=e.name||t,n=e.blob;var r;return{id:T(t),name:T(o),filename:T(e.filename||o+"."+(r=n.type,{"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"}[r.toLowerCase()]||"dat")),blob:T(n),base64:T(e.base64),blobUri:T(e.blobUri||URL.createObjectURL(n)),uri:T(e.uri)}},o= t=>Q(e,t).getOrUndefined(),n= e=>o((t=>t.id()===e));return{create:(e, o, n, r, a)=>{if(g(e))return t({id:e,name:r,filename:a,blob:o,base64:n});if(p(e))return t(e);throw new Error("Unknown input type")},add: t=>{n(t.id())||e.push(t)},get:n,getByUri: e=>o((t=>t.blobUri()===e)),getByData:(e, t)=>o((o=>o.base64()===e&&o.blob().type===t)),findFirst:o,removeByUri: t=>{e=K(e,(e=>e.blobUri()!==t||(URL.revokeObjectURL(e.blobUri()),!1)))},destroy:()=>{W(e,(e=>{URL.revokeObjectURL(e.blobUri())})),e=[]}}})();let o,n;const r=uw(),a=[],s= t=> o=>e.selection?t(o):[],i=(e, t, o)=>{let n=0;do{n=e.indexOf(t,n),-1!==n&&(e=e.substring(0,n)+o+e.substr(n+t.length),n+=o.length-t.length+1)}while(-1!==n);return e},l=(e, t, o)=>{const n=`src="${o}"${o===At.transparentSrc?' data-mce-placeholder="1"':""}`;return e=i(e,`src="${t}"`,n),i(e,'data-mce-src="'+t+'"','data-mce-src="'+o+'"')},c=(t, o)=>{W(e.undoManager.data,(e=>{"fragmented"===e.type?e.fragments=q(e.fragments,(e=>l(e,t,o))):e.content=l(e.content,t,o)}))},d=()=>(o||(o=hw(e,r)),h().then(s((n=>{const r=q(n,(e=>e.blobInfo));return o.upload(r,pw(e)).then(s((o=>{const r=[];let a=!1;const s=q(o,((o, s)=>{const{blobInfo:i,image:l}=n[s];let d=!1;return o.status&&Rl(e)?(o.url&&!Ve(l.src,o.url)&&(a=!0),t.removeByUri(l.src),kk(e)||((t, o)=>{const n=e.convertURL(o,"src");var r;c(t.src,o),Jt(bo(t),{src:Nl(e)?(r=o,r+(-1===r.indexOf("?")?"?":"&")+(new Date).getTime()):o,"data-mce-src":n})})(l,o.url)):o.error&&(o.error.remove&&(c(l.src,At.transparentSrc),r.push(l),d=!0),((e, t)=>{aw(e,Ds.translate(["Failed to upload image: {0}",t]))})(e,o.error.message)),{element:l,status:o.status,uploadUri:o.url,blobInfo:i,removed:d}}));return r.length>0&&!kk(e)?e.undoManager.transact((()=>{W(r,(o=>{e.dom.remove(o),t.removeByUri(o.src)}))})):a&&e.undoManager.dispatchChange(),s})))})))),u=()=>Ml(e)?d():Promise.resolve([]),m= e=>ne(a,(t=>t(e))),h=()=>(n||(n=dw(r,t)),n.findAll(e.getBody(),m).then(s((t=>{const o=K(t,(t=>g(t)?(aw(e,t),!1):"blob"!==t.uriType));return kk(e)||W(o,(e=>{c(e.image.src,e.blobInfo.blobUri()),e.image.src=e.blobInfo.blobUri(),e.image.removeAttribute("data-mce-src")})),o})))),f= o=>o.replace(/src="(blob:[^"]+)"/g,((o, n)=>{const a=r.getResultUri(n);if(a)return'src="'+a+'"';let s=t.getByUri(n);return s||(s=X(e.editorManager.get(),((e, t)=>e||t.editorUpload&&t.editorUpload.blobCache.getByUri(n)),void 0)),s?'src="data:'+s.blob().type+";base64,"+s.base64()+'"':o}));return e.on("SetContent",(()=>{Ml(e)?u():h()})),e.on("RawSaveContent",(e=>{e.content=f(e.content)})),e.on("GetContent",(e=>{e.source_view||"raw"===e.format||"tree"===e.format||(e.content=f(e.content))})),e.on("PostRender",(()=>{e.parser.addNodeFilter("img",(e=>{W(e,(e=>{const o=e.attr("src");if(!o||t.getByUri(o))return;const n=r.getResultUri(o);n&&e.attr("src",n)}))}))})),{blobCache:t,addFilter: e=>{a.push(e)},uploadImages:d,uploadImagesAuto:u,scanForImages:h,destroy:()=>{t.destroy(),r.destroy(),n=o=null}}},yw={remove_similar:!0,inherit:!1},bw={selector:"td,th",...yw},vw={tablecellbackgroundcolor:{styles:{backgroundColor:"%value"},...bw},tablecellverticalalign:{styles:{"vertical-align":"%value"},...bw},tablecellbordercolor:{styles:{borderColor:"%value"},...bw},tablecellclass:{classes:["%value"],...bw},tableclass:{selector:"table",classes:["%value"],...yw},tablecellborderstyle:{styles:{borderStyle:"%value"},...bw},tablecellborderwidth:{styles:{borderWidth:"%value"},...bw}},kw=T(vw),ww=Dt.each,_w=Os.DOM,xw= e=>w(e)&&p(e),Cw=(e, t)=>{const o=t&&t.schema||is({}),n= e=>{const t=g(e)?{name:e,classes:[],attrs:{}}:e,o=_w.create(t.name);return((e, t)=>{t.classes.length>0&&_w.addClass(e,t.classes.join(" ")),_w.setAttribs(e,t.attrs)})(o,t),o},r=(e, t, a)=>{let s;const i=t[0],l=xw(i)?i.name:void 0,c=((e, t)=>{const n=o.getElementRule(e.nodeName.toLowerCase()),r=null==n?void 0:n.parentsRequired;return!(!r||!r.length)&&(t&&Z(r,t)?t:r[0])})(e,l);if(c)l===c?(s=i,t=t.slice(1)):s=c;else if(i)s=i,t=t.slice(1);else if(!a)return e;const d=s?n(s):_w.create("div");d.appendChild(e),a&&Dt.each(a,(t=>{const o=n(t);d.insertBefore(o,e)}));const u=xw(s)?s.siblings:void 0;return r(d,t,u)},a=_w.create("div");if(e.length>0){const t=e[0],o=n(t),s=xw(t)?t.siblings:void 0;a.appendChild(r(o,e.slice(1),s))}return a},Sw= e=>{let t="div";const o={name:t,classes:[],attrs:{},selector:e=Dt.trim(e)};return"*"!==e&&(t=e.replace(/(?:([#\.]|::?)([\w\-]+)|(\[)([^\]]+)\]?)/g,((e, t, n, r, a)=>{switch(t){case"#":o.attrs.id=n;break;case".":o.classes.push(n);break;case":":-1!==Dt.inArray("checked disabled enabled read-only required".split(" "),n)&&(o.attrs[n]=n)}if("["===r){const e=a.match(/([\w\-]+)(?:\=\"([^\"]+))?/);e&&(o.attrs[e[1]]=e[2])}return""}))),o.name=t||"div",o},zw=(e, t)=>{let o="",n=lc(e);if(""===n)return"";const r= e=>g(e)?e.replace(/%(\w+)/g,""):"",a=(t, o)=>_w.getStyle(null!=o?o:e.getBody(),t,!0);if(g(t)){const o=e.formatter.get(t);if(!o)return"";t=o[0]}if("preview"in t){const e=t.preview;if(!1===e)return"";n=e||n}let s,i=t.block||t.inline||"span";const l=(c=t.selector,g(c)?(c=(c=c.split(/\s*,\s*/)[0]).replace(/\s*(~\+|~|\+|>)\s*/g,"$1"),Dt.map(c.split(/(?:>|\s+(?![^\[\]]+\]))/),(e=>{const t=Dt.map(e.split(/(?:~\+|~|\+)/),Sw),o=t.pop();return t.length&&(o.siblings=t),o})).reverse()):[]);var c;l.length>0?(l[0].name||(l[0].name=i),i=t.selector,s=Cw(l,e)):s=Cw([i],e);const d=_w.select(i,s)[0]||s.firstChild;ww(t.styles,((e, t)=>{const o=r(e);o&&_w.setStyle(d,t,o)})),ww(t.attributes,((e, t)=>{const o=r(e);o&&_w.setAttrib(d,t,o)})),ww(t.classes,(e=>{const t=r(e);_w.hasClass(d,t)||_w.addClass(d,t)})),e.dispatch("PreviewFormats"),_w.setStyles(s,{position:"absolute",left:-65535}),e.getBody().appendChild(s);const u=a("fontSize"),m=/px$/.test(u)?parseInt(u,10):0;return ww(n.split(" "),(e=>{let t=a(e,d);if(!("background-color"===e&&/transparent|rgba\s*\([^)]+,\s*0\)/.test(t)&&(t=a(e),"#ffffff"===Hu(t).toLowerCase())||"color"===e&&"#000000"===Hu(t).toLowerCase())){if("font-size"===e&&/em|%$/.test(t)){if(0===m)return;t=parseFloat(t)/(/%$/.test(t)?100:1)*m+"px"}"border"===e&&t&&(o+="padding:0 2px;"),o+=e+":"+t+";"}})),e.dispatch("AfterPreviewFormats"),_w.remove(s),o},Ow= e=>{const t=(e=>{const t={},o=(e, n)=>{e&&(g(e)?(f(n)||(n=[n]),W(n,(e=>{v(e.deep)&&(e.deep=!pm(e)),v(e.split)&&(e.split=!pm(e)||hm(e)),v(e.remove)&&pm(e)&&!hm(e)&&(e.remove="none"),pm(e)&&hm(e)&&(e.mixed=!0,e.block_expand=!0),g(e.classes)&&(e.classes=e.classes.split(/\s+/))})),t[e]=n):he(e,((e, t)=>{o(t,e)})))};return o((e=>{const t=e.dom,o=e.schema.type,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:!1,classes:"align-left",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"left"},inherit:!1,preview:!1},{selector:"img,audio,video",collapsed:!1,styles:{float:"left"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginLeft:"0px",marginRight:"auto"},onformat: e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"left"}}],aligncenter:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"center"},inherit:!1,preview:"font-family font-size"},{selector:"figure.image",collapsed:!1,classes:"align-center",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{display:"block",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"table",collapsed:!1,styles:{marginLeft:"auto",marginRight:"auto"},preview:"font-family font-size"},{selector:".mce-preview-object",ceFalseOverride:!0,styles:{display:"table",marginLeft:"auto",marginRight:"auto"},preview:!1},{selector:"[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{marginLeft:"auto",marginRight:"auto"},preview:!1}],alignright:[{selector:"figure.image",collapsed:!1,classes:"align-right",ceFalseOverride:!0,preview:"font-family font-size"},{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"right"},inherit:!1,preview:"font-family font-size"},{selector:"img,audio,video",collapsed:!1,styles:{float:"right"},preview:"font-family font-size"},{selector:"table",collapsed:!1,styles:{marginRight:"0px",marginLeft:"auto"},onformat: e=>{t.setStyle(e,"float",null)},preview:"font-family font-size"},{selector:".mce-preview-object,[data-ephox-embed-iri]",ceFalseOverride:!0,styles:{float:"right"},preview:!1}],alignjustify:[{selector:"figure,p,h1,h2,h3,h4,h5,h6,td,th,tr,div,ul,ol,li,pre",styles:{textAlign:"justify"},inherit:!1,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:!0},{inline:"u",remove:"all",preserve_attributes:["class","style"]}],strikethrough:(()=>{const e={inline:"span",styles:{textDecoration:"line-through"},exact:!0},t={inline:"strike",remove:"all",preserve_attributes:["class","style"]},n={inline:"s",remove:"all",preserve_attributes:["class","style"]};return"html4"!==o?[n,e,t]:[e,n,t]})(),forecolor:{inline:"span",styles:{color:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},hilitecolor:{inline:"span",styles:{backgroundColor:"%value"},links:!0,remove_similar:!0,clear_child_styles:!0},fontname:{inline:"span",toggle:!1,styles:{fontFamily:"%value"},clear_child_styles:!0},fontsize:{inline:"span",toggle:!1,styles:{fontSize:"%value"},clear_child_styles:!0},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:!0,remove:"all"},subscript:{inline:"sub"},superscript:{inline:"sup"},code:{inline:"code"},link:{inline:"a",selector:"a",remove:"all",split:!0,deep:!0,onmatch:(e, t, o)=>jn(e)&&e.hasAttribute("href"),onformat:(e, o, n)=>{Dt.each(n,((o, n)=>{t.setAttrib(e,n,o)}))}},lang:{inline:"span",clear_child_styles:!0,remove_similar:!0,attributes:{lang:"%value","data-mce-lang": e=>{var t;return null!==(t=null==e?void 0:e.customValue)&&void 0!==t?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:!0,expand:!1,block_expand:!0,deep:!0},{selector:"span",attributes:["style","class"],remove:"empty",split:!0,expand:!1,deep:!0},{selector:"*",attributes:["style","class"],split:!1,expand:!1,deep:!0}]};return Dt.each("p h1 h2 h3 h4 h5 h6 div address pre dt dd samp".split(/\s/),(e=>{n[e]={block:e,remove:"all"}})),n})(e)),o(kw()),o(ic(e)),{get: e=>w(e)?t[e]:t,has: e=>Ce(t,e),register:o,unregister: e=>(e&&t[e]&&delete t[e],t)}})(e),o=As({});return(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",!1,"h"+t]);e.addShortcut("access+7","",["FormatBlock",!1,"p"]),e.addShortcut("access+8","",["FormatBlock",!1,"div"]),e.addShortcut("access+9","",["FormatBlock",!1,"address"])})(e),(e=>{e.on("mouseup keydown",(t=>{((e, t)=>{const o=e.selection,n=e.getBody();by(e,null,!1),8!==t&&46!==t||!o.isCollapsed()||o.getStart().innerHTML!==gy||by(e,hu(n,o.getStart())),37!==t&&39!==t||by(e,hu(n,o.getStart()))})(e,t.keyCode)}))})(e),kk(e)||((e, t)=>{e.set({}),t.on("NodeChange",(o=>{gb(t,o.element,e.get())})),t.on("FormatApply FormatRemove",(o=>{const n=H.from(o.node).map((e=>Yu(e)?e:e.startContainer)).bind((e=>jn(e)?H.some(e):H.from(e.parentElement))).getOrThunk((()=>db(t)));gb(t,n,e.get())}))})(o,e),{get:t.get,has:t.has,register:t.register,unregister:t.unregister,apply:(t, o, n)=>{((e, t, o, n)=>{_k(e).formatter.apply(t,o,n)})(e,t,o,n)},remove:(t, o, n, r)=>{((e, t, o, n, r)=>{_k(e).formatter.remove(t,o,n,r)})(e,t,o,n,r)},toggle:(t, o, n)=>{((e, t, o, n)=>{_k(e).formatter.toggle(t,o,n)})(e,t,o,n)},match:(t, o, n, r)=>((e, t, o, n, r)=>_k(e).formatter.match(t,o,n,r))(e,t,o,n,r),closest: t=>((e, t)=>_k(e).formatter.closest(t))(e,t),matchAll:(t, o)=>((e, t, o)=>_k(e).formatter.matchAll(t,o))(e,t,o),matchNode:(t, o, n, r)=>((e, t, o, n, r)=>_k(e).formatter.matchNode(t,o,n,r))(e,t,o,n,r),canApply: t=>((e, t)=>_k(e).formatter.canApply(t))(e,t),formatChanged:(t, n, r, a)=>((e, t, o, n, r, a)=>_k(e).formatter.formatChanged(t,o,n,r,a))(e,o,t,n,r,a),getCssText:M(zw,e)}},Tw= e=>{switch(e.toLowerCase()){case"undo":case"redo":case"mcefocus":return!0;default:return!1}},Ew= e=>{const t=Is(),o=As(0),n=As(0),r={data:[],typing:!1,beforeChange:()=>{((e, t, o)=>{_k(e).undoManager.beforeChange(t,o)})(e,o,t)},add:(a, s)=>((e, t, o, n, r, a, s)=>_k(e).undoManager.add(t,o,n,r,a,s))(e,r,n,o,t,a,s),dispatchChange:()=>{e.setDirty(!0);const t=uk(e);t.bookmark=Qi(e.selection),e.dispatch("change",{level:t,lastLevel:le(r.data,n.get()).getOrUndefined()})},undo:()=>((e, t, o, n)=>_k(e).undoManager.undo(t,o,n))(e,r,o,n),redo:()=>((e, t, o)=>_k(e).undoManager.redo(t,o))(e,n,r.data),clear:()=>{((e, t, o)=>{_k(e).undoManager.clear(t,o)})(e,r,n)},reset:()=>{((e, t)=>{_k(e).undoManager.reset(t)})(e,r)},hasUndo:()=>((e, t, o)=>_k(e).undoManager.hasUndo(t,o))(e,r,n),hasRedo:()=>((e, t, o)=>_k(e).undoManager.hasRedo(t,o))(e,r,n),transact: t=>((e, t, o, n)=>_k(e).undoManager.transact(t,o,n))(e,r,o,t),ignore: t=>{((e, t, o)=>{_k(e).undoManager.ignore(t,o)})(e,o,t)},extra:(t, o)=>{((e, t, o, n, r)=>{_k(e).undoManager.extra(t,o,n,r)})(e,r,n,t,o)}};return kk(e)||((e, t, o)=>{const n=As(!1),r= e=>{yk(t,!1,o),t.add({},e)};e.on("init",(()=>{t.add()})),e.on("BeforeExecCommand",(e=>{const n=e.command;Tw(n)||(bk(t,o),t.beforeChange())})),e.on("ExecCommand",(e=>{const t=e.command;Tw(t)||r(e)})),e.on("ObjectResizeStart cut",(()=>{t.beforeChange()})),e.on("SaveContent ObjectResized blur",r),e.on("dragend",r),e.on("keyup",(o=>{const a=o.keyCode;o.isDefaultPrevented()||((a>=33&&a<=36||a>=37&&a<=40||45===a||o.ctrlKey)&&(r(),e.nodeChanged()),46!==a&&8!==a||e.nodeChanged(),n.get()&&t.typing&&!hk(uk(e),t.data[0])&&(e.isDirty()||e.setDirty(!0),e.dispatch("TypingUndo"),n.set(!1),e.nodeChanged()))})),e.on("keydown",(e=>{const a=e.keyCode;if(e.isDefaultPrevented())return;if(a>=33&&a<=36||a>=37&&a<=40||45===a)return void(t.typing&&r(e));const s=e.ctrlKey&&!e.altKey||e.metaKey;!(a<16||a>20)||224===a||91===a||t.typing||s||(t.beforeChange(),yk(t,!0,o),t.add({},e),n.set(!0))})),e.on("mousedown",(e=>{t.typing&&r(e)})),e.on("input",(e=>{var t;e.inputType&&("insertReplacementText"===e.inputType||"insertText"===(t=e).inputType&&null===t.data||(e=>"insertFromPaste"===e.inputType||"insertFromDrop"===e.inputType)(e))&&r(e)})),e.on("AddUndo Undo Redo ClearUndos",(t=>{t.isDefaultPrevented()||e.nodeChanged()}))})(e,r,o),(e=>{e.addShortcut("meta+z","","Undo"),e.addShortcut("meta+y,meta+shift+z","","Redo")})(e),r},Aw=[9,27,Wm.HOME,Wm.END,19,20,44,144,145,33,34,45,16,17,18,91,92,93,Wm.DOWN,Wm.UP,Wm.LEFT,Wm.RIGHT].concat(At.browser.isFirefox()?[224]:[]),Mw="data-mce-placeholder",Nw= e=>"keydown"===e.type||"keyup"===e.type,Rw= e=>{const t=e.keyCode;return t===Wm.BACKSPACE||t===Wm.DELETE},Dw=(e, t)=>({from:e,to:t}),Bw=(e, t)=>{const o=bo(e),n=bo(t.container());return of(o,n).map((e=>((e, t)=>({block:e,position:t}))(e,t)))},Lw=(e, t)=>Xo(t,(e=>Sr(e)||rr(e.dom)),(t=>xo(t,e))).filter(qt).getOr(e),Iw= e=>{const t=(e=>{const t=Bo(e);return ee(t,br).fold(T(t),(e=>t.slice(0,e)))})(e);return W(t,kn),t},Hw=(e, t)=>{const o=sh(t,e);return Q(o.reverse(),(e=>ma(e))).each(kn)},Pw=(e, t, o, n)=>{if(ma(o))return Ar(o),uu(o.dom);0===K(Ro(n),(e=>!ma(e))).length&&ma(t)&&gn(n,fo("br"));const r=du(o.dom,Ni.before(n.dom));return W(Iw(t),(e=>{gn(n,e)})),Hw(e,t),r},Fw=(e, t, o)=>{if(ma(o)){if(ma(t)){const e= e=>{const t=(e, o)=>Io(e).fold((()=>o),(e=>vr(e)?t(e,o.concat(ei(e))):o));return t(e,[])},n=Y(e(o),((e, t)=>(yn(e,t),t)),Er());vn(t),fn(t,n)}return kn(o),uu(t.dom)}const n=mu(o.dom);return W(Iw(t),(e=>{fn(o,e)})),Hw(e,t),n},jw=(e, t)=>{lu(e,t.dom).bind((e=>H.from(e.getNode()))).map(bo).filter(kr).each(kn)},Vw=(e, t, o)=>(jw(!0,t),jw(!1,o),((e, t)=>Co(t,e)?((e, t)=>{const o=sh(t,e);return H.from(o[o.length-1])})(t,e):H.none())(t,o).fold(M(Fw,e,t,o),M(Pw,e,t,o))),Zw=(e, t, o, n)=>t?Vw(e,n,o):Vw(e,o,n),Uw=(e, t)=>{const o=bo(e.getBody()),n=((e, t, o)=>o.collapsed?((e, t, o)=>{const n=Bw(e,Ni.fromRangeStart(o)),r=n.bind((o=>au(t,e,o.position).bind((o=>Bw(e,o).map((o=>((e, t, o)=>or(o.position.getNode())&&!ma(o.block)?lu(!1,o.block.dom).bind((n=>n.isEqual(o.position)?au(t,e,n).bind((t=>Bw(e,t))):H.some(o))).getOr(o):o)(e,t,o)))))));return Lt(n,r,Dw).filter((t=>(e=>!xo(e.from.block,e.to.block))(t)&&((e, t)=>{const o=bo(e);return xo(Lw(o,t.from.block),Lw(o,t.to.block))})(e,t)&&(e=>!1===ar(e.from.block.dom)&&!1===ar(e.to.block.dom))(t)&&(e=>{const t= e=>wr(e)||wa(e.dom);return t(e.from.block)&&t(e.to.block)})(t)))})(e,t,o):H.none())(o.dom,t,e.selection.getRng()).map((n=>()=>{Zw(o,t,n.from.block,n.to.block).each((t=>{e.selection.setRng(t.toRange())}))}));return n},qw=(e, t)=>{const o=bo(t),n=M(xo,e);return Yo(o,Sr,n).isSome()},Ww= e=>{const t=bo(e.getBody());return((e, t)=>{const o=du(e.dom,Ni.fromRangeStart(t)).isNone(),n=cu(e.dom,Ni.fromRangeEnd(t)).isNone();return!((e, t)=>qw(e,t.startContainer)||qw(e,t.endContainer))(e,t)&&o&&n})(t,e.selection.getRng())?(e=>H.some((()=>{e.setContent(""),e.selection.setCursorLocation()})))(e):((e, t)=>{const o=t.getRng();return Lt(of(e,bo(o.startContainer)),of(e,bo(o.endContainer)),((n, r)=>xo(n,r)?H.none():H.some((()=>{o.deleteContents(),Zw(e,!0,n,r).each((e=>{t.setRng(e.toRange())}))})))).getOr(H.none())})(t,e.selection)},$w=(e, t)=>e.selection.isCollapsed()?H.none():Ww(e),Gw=(e, t, o, n, r)=>H.from(t._selectionOverrides.showCaret(e,o,n,r)),Kw=(e, t)=>e.dispatch("BeforeObjectSelected",{target:t}).isDefaultPrevented()?H.none():H.some((e=>{const t=e.ownerDocument.createRange();return t.selectNode(e),t})(t)),Yw=(e, t, o)=>t.collapsed?((e, t, o)=>{const n=Hd(1,e.getBody(),t),r=Ni.fromRangeStart(n),a=r.getNode();if(hd(a))return Gw(1,e,a,!r.isAtEnd(),!1);const s=r.getNode(!0);if(hd(s))return Gw(1,e,s,!1,!1);const i=Nf(e.dom.getRoot(),r.getNode());return hd(i)?Gw(1,e,i,!1,o):H.none()})(e,t,o).getOr(t):t,Xw= e=>nh(e)||Qp(e),Jw= e=>rh(e)||eh(e),Qw=(e, t, o, n, r, a)=>{Gw(n,e,a.getNode(!r),r,!0).each((o=>{if(t.collapsed){const e=t.cloneRange();r?e.setEnd(o.startContainer,o.startOffset):e.setStart(o.endContainer,o.endOffset),e.deleteContents()}else t.deleteContents();e.selection.setRng(o)})),((e, t)=>{Yn(t)&&0===t.data.length&&e.remove(t)})(e.dom,o)},e_=(e, t)=>((e, t)=>{const o=e.selection.getRng();if(!Yn(o.commonAncestorContainer))return H.none();const n=t?Ud.Forwards:Ud.Backwards,r=tu(e.getBody()),a=M(Vd,t?r.next:r.prev),s=t?Xw:Jw,i=Fd(n,e.getBody(),o),l=a(i),c=l?Yh(t,l):l;if(!c||!Zd(i,c))return H.none();if(s(c))return H.some((()=>Qw(e,o,i.getNode(),n,t,c)));const d=a(c);return d&&s(d)&&Zd(c,d)?H.some((()=>Qw(e,o,i.getNode(),n,t,d))):H.none()})(e,t),t_=(e, t)=>{const o=e.getBody();return t?uu(o).filter(nh):mu(o).filter(rh)},o_= e=>{const t=e.selection.getRng();return!t.collapsed&&(t_(e,!0).exists((e=>e.isEqual(Ni.fromRangeStart(t))))||t_(e,!1).exists((e=>e.isEqual(Ni.fromRangeEnd(t)))))},n_=nl([{remove:["element"]},{moveToElement:["element"]},{moveToPosition:["position"]}]),r_=(e, t, o)=>au(t,e,o).bind((n=>{return r=n.getNode(),w(r)&&(Sr(bo(r))||xr(bo(r)))||((e, t, o, n)=>{const r= t=>vr(bo(t))&&!Md(o,n,e);return Pd(!t,o).fold((()=>Pd(t,n).fold(L,r)),r)})(e,t,o,n)?H.none():t&&ar(n.getNode())||!t&&ar(n.getNode(!0))?((e, t, o, n)=>{const r=n.getNode(!t);return of(bo(e),bo(o.getNode())).map((e=>ma(e)?n_.remove(e.dom):n_.moveToElement(r))).orThunk((()=>H.some(n_.moveToElement(r))))})(e,t,o,n):t&&rh(o)||!t&&nh(o)?H.some(n_.moveToPosition(n)):H.none();var r})),a_=(e, t)=>H.from(Nf(e.getBody(),t)),s_=(e, t)=>{const o=e.selection.getNode();return a_(e,o).filter(ar).fold((()=>((e, t, o)=>{const n=Hd(t?1:-1,e,o),r=Ni.fromRangeStart(n),a=bo(e);return!t&&rh(r)?H.some(n_.remove(r.getNode(!0))):t&&nh(r)?H.some(n_.remove(r.getNode())):!t&&nh(r)&&bh(a,r)?vh(a,r).map((e=>n_.remove(e.getNode()))):t&&rh(r)&&yh(a,r)?kh(a,r).map((e=>n_.remove(e.getNode()))):((e, t, o)=>((e, t)=>{const o=t.getNode(!e),n=e?"after":"before";return jn(o)&&o.getAttribute("data-mce-caret")===n})(t,o)?((e, t)=>k(t)?H.none():e&&ar(t.nextSibling)?H.some(n_.moveToElement(t.nextSibling)):!e&&ar(t.previousSibling)?H.some(n_.moveToElement(t.previousSibling)):H.none())(t,o.getNode(!t)).orThunk((()=>r_(e,t,o))):r_(e,t,o).bind((t=>((e, t, o)=>o.fold((e=>H.some(n_.remove(e))),(e=>H.some(n_.moveToElement(e))),(o=>Md(t,o,e)?H.none():H.some(n_.moveToPosition(o)))))(e,o,t))))(e,t,r)})(e.getBody(),t,e.selection.getRng()).map((o=>()=>o.fold(((e, t)=> o=>(e._selectionOverrides.hideFakeCaret(),Wh(e,t,bo(o)),!0))(e,t),((e, t)=> o=>{const n=t?Ni.before(o):Ni.after(o);return e.selection.setRng(n.toRange()),!0})(e,t),(e=> t=>(e.selection.setRng(t.toRange()),!0))(e))))),(()=>H.some(S)))},i_= e=>{const t=e.dom,o=e.selection,n=Nf(e.getBody(),o.getNode());if(rr(n)&&t.isBlock(n)&&t.isEmpty(n)){const e=t.create("br",{"data-mce-bogus":"1"});t.setHTML(n,""),n.appendChild(e),o.setRng(Ni.before(e).toRange())}return!0},l_=(e, t)=>e.selection.isCollapsed()?s_(e,t):((e, t)=>{const o=e.selection.getNode();return ar(o)&&!sr(o)?a_(e,o.parentNode).filter(ar).fold((()=>H.some((()=>{var o;o=bo(e.getBody()),W(Ln(o,".mce-offscreen-selection"),kn),Wh(e,t,bo(e.selection.getNode())),nf(e)}))),(()=>H.some(S))):o_(e)?H.some((()=>{af(e,e.selection.getRng(),bo(e.getBody()))})):H.none()})(e,t),c_=(e, t)=>e.selection.isCollapsed()?((e, t)=>{const o=Ni.fromRangeStart(e.selection.getRng());return au(t,e.getBody(),o).filter((e=>t?Xp(e):Jp(e))).bind((e=>Nd(t?0:-1,e))).map((t=>()=>e.selection.select(t)))})(e,t):H.none(),d_=Yn,u_= e=>d_(e)&&e.data[0]===Nr,m_= e=>d_(e)&&e.data[e.data.length-1]===Nr,g_= e=>{var t;return(null!==(t=e.ownerDocument)&&void 0!==t?t:document).createTextNode(Nr)},p_=(e, t)=>e?(e=>{var t;if(d_(e.previousSibling))return m_(e.previousSibling)||e.previousSibling.appendData(Nr),e.previousSibling;if(d_(e))return u_(e)||e.insertData(0,Nr),e;{const o=g_(e);return null===(t=e.parentNode)||void 0===t||t.insertBefore(o,e),o}})(t):(e=>{var t,o;if(d_(e.nextSibling))return u_(e.nextSibling)||e.nextSibling.insertData(0,Nr),e.nextSibling;if(d_(e))return m_(e)||e.appendData(Nr),e;{const n=g_(e);return e.nextSibling?null===(t=e.parentNode)||void 0===t||t.insertBefore(n,e.nextSibling):null===(o=e.parentNode)||void 0===o||o.appendChild(n),n}})(t),h_=M(p_,!0),f_=M(p_,!1),y_=(e, t)=>Yn(e.container())?p_(t,e.container()):p_(t,e.getNode()),b_=(e, t)=>{const o=t.get();return o&&e.container()===o&&Hr(o)},v_=(e, t)=>t.fold((t=>{ld(e.get());const o=h_(t);return e.set(o),H.some(Ni(o,o.length-1))}),(t=>uu(t).map((t=>{if(b_(t,e)){const t=e.get();return Ni(t,1)}{ld(e.get());const o=y_(t,!0);return e.set(o),Ni(o,1)}}))),(t=>mu(t).map((t=>{if(b_(t,e)){const t=e.get();return Ni(t,t.length-1)}{ld(e.get());const o=y_(t,!1);return e.set(o),Ni(o,o.length-1)}}))),(t=>{ld(e.get());const o=f_(t);return e.set(o),H.some(Ni(o,1))})),k_=(e, t)=>{for(let o=0; o<e.length; o++){const n=e[o].apply(null,t);if(n.isSome())return n}return H.none()},w_=nl([{before:["element"]},{start:["element"]},{end:["element"]},{after:["element"]}]),__=(e, t)=>Ad(t,e)||e,x_=(e, t, o)=>{const n=Xh(o),r=__(t,n.container());return Kh(e,r,n).fold((()=>cu(r,n).bind(M(Kh,e,r)).map((e=>w_.before(e)))),H.none)},C_=(e, t)=>null===hu(e,t),S_=(e, t, o)=>Kh(e,t,o).filter(M(C_,t)),z_=(e, t, o)=>{const n=Jh(o);return S_(e,t,n).bind((e=>du(e,n).isNone()?H.some(w_.start(e)):H.none()))},O_=(e, t, o)=>{const n=Xh(o);return S_(e,t,n).bind((e=>cu(e,n).isNone()?H.some(w_.end(e)):H.none()))},T_=(e, t, o)=>{const n=Jh(o),r=__(t,n.container());return Kh(e,r,n).fold((()=>du(r,n).bind(M(Kh,e,r)).map((e=>w_.after(e)))),H.none)},E_= e=>{return t=M_(e),!("rtl"===Os.DOM.getStyle(t,"direction",!0)||(e=>$h.test(e))(null!==(o=t.textContent)&&void 0!==o?o:""));var t,o},A_=(e, t, o)=>k_([x_,z_,O_,T_],[e,t,o]).filter(E_),M_= e=>e.fold(E,E,E,E),N_= e=>e.fold(T("before"),T("start"),T("end"),T("after")),R_= e=>e.fold(w_.before,w_.before,w_.after,w_.after),D_= e=>e.fold(w_.start,w_.start,w_.end,w_.end),B_=(e, t, o, n, r, a)=>Lt(Kh(t,o,n),Kh(t,o,r),((t, n)=>t!==n&&((e, t, o)=>{const n=Ad(t,e),r=Ad(o,e);return w(n)&&n===r})(o,t,n)?w_.after(e?t:n):a)).getOr(a),L_=(e, t)=>e.fold(I,(e=>{return n=t,!(N_(o=e)===N_(n)&&M_(o)===M_(n));var o,n})),I_=(e, t)=>e?t.fold(z(H.some,w_.start),H.none,z(H.some,w_.after),H.none):t.fold(H.none,z(H.some,w_.before),H.none,z(H.some,w_.end)),H_=(e, t, o)=>{const n=e?1:-1;return t.setRng(Ni(o.container(),o.offset()+n).toRange()),t.getSel().modify("move",e?"forward":"backward","word"),!0};var P_;!function(e){e[e.Br=0]="Br",e[e.Block=1]="Block",e[e.Wrap=2]="Wrap",e[e.Eol=3]="Eol"}(P_||(P_={}));const F_=(e, t)=>e===Ud.Backwards?re(t):t,j_=(e, t, o)=>e===Ud.Forwards?t.next(o):t.prev(o),V_=(e, t, o, n)=>or(n.getNode(t===Ud.Forwards))?P_.Br:!1===Md(o,n)?P_.Block:P_.Wrap,Z_=(e, t, o, n)=>{const r=tu(o);let a=n;const s=[];for(; a;){const o=j_(t,r,a);if(!o)break;if(or(o.getNode(!1)))return t===Ud.Forwards?{positions:F_(t,s).concat([o]),breakType:P_.Br,breakAt:H.some(o)}:{positions:F_(t,s),breakType:P_.Br,breakAt:H.some(o)};if(o.isVisible()){if(e(a,o)){const e=V_(0,t,a,o);return{positions:F_(t,s),breakType:e,breakAt:H.some(o)}}s.push(o),a=o}else a=o}return{positions:F_(t,s),breakType:P_.Eol,breakAt:H.none()}},U_=(e, t, o, n)=>t(o,n).breakAt.map((n=>{const r=t(o,n).positions;return e===Ud.Backwards?r.concat(n):[n].concat(r)})).getOr([]),q_=(e, t)=>X(e,((e, o)=>e.fold((()=>H.some(o)),(n=>Lt(ce(n.getClientRects()),ce(o.getClientRects()),((e, r)=>{const a=Math.abs(t-e.left);return Math.abs(t-r.left)<=a?o:n})).or(e)))),H.none()),W_=(e, t)=>ce(t.getClientRects()).bind((t=>q_(e,t.left))),$_=M(Z_,Ni.isAbove,-1),G_=M(Z_,Ni.isBelow,1),K_=M(U_,-1,$_),Y_=M(U_,1,G_),X_=(e, t)=>W_(K_(e,t),t),J_=(e, t)=>W_(Y_(e,t),t),Q_=ar,ex=(e, t)=>Math.abs(e.left-t),tx=(e, t)=>Math.abs(e.right-t),ox=(e, t)=>Ne(e,((e, o)=>{const n=Math.min(ex(e,t),tx(e,t)),r=Math.min(ex(o,t),tx(o,t));return r===n&&Se(o,"node")&&Q_(o.node)||r<n?o:e})),nx= e=>{const t= t=>q(t,(t=>{const o=ai(t);return o.node=e,o}));if(jn(e))return t(e.getClientRects());if(Yn(e)){const o=e.ownerDocument.createRange();return o.setStart(e,0),o.setEnd(e,e.data.length),t(o.getClientRects())}return[]},rx= e=>oe(e,nx);var ax;!function(e){e[e.Up=-1]="Up",e[e.Down=1]="Down"}(ax||(ax={}));const sx=(e, t, o, n, r, a)=>{let s=0;const i=[],l= n=>{let a=rx([n]);-1===e&&(a=a.reverse());for(let e=0; e<a.length; e++){const n=a[e];if(!o(n,c)){if(i.length>0&&t(n,De(i))&&s++,n.line=s,r(n))return!0;i.push(n)}}return!1},c=De(a.getClientRects());if(!c)return i;const d=a.getNode();return d&&(l(d),((e, t, o, n)=>{let r=n;for(; r=Ed(r,e,na,t);)if(o(r))return})(e,n,l,d)),i},ix=M(sx,ax.Up,li,ci),lx=M(sx,ax.Down,ci,li),cx= e=>De(e.getClientRects()),dx= e=> t=>((e, t)=>t.line>e)(e,t),ux= e=> t=>((e, t)=>t.line===e)(e,t),mx=(e, t)=>{e.selection.setRng(t),Ug(e,e.selection.getRng())},gx=(e, t, o)=>H.some(Yw(e,t,o)),px=(e, t, o, n, r, a)=>{const s=t===Ud.Forwards,i=tu(e.getBody()),l=M(Vd,s?i.next:i.prev),c=s?n:r;if(!o.collapsed){const n=ui(o);if(a(n))return Gw(t,e,n,t===Ud.Backwards,!1);if(o_(e)){const e=o.cloneRange();return e.collapse(t===Ud.Backwards),H.from(e)}}const d=Fd(t,e.getBody(),o);if(c(d))return Kw(e,d.getNode(!s));let u=l(d);const m=Wr(o);if(!u)return m?H.some(o):H.none();if(u=Yh(s,u),c(u))return Gw(t,e,u.getNode(!s),s,!1);const g=l(u);return g&&c(g)&&Zd(u,g)?Gw(t,e,g.getNode(!s),s,!1):m?gx(e,u.toRange(),!1):H.none()},hx=(e, t, o, n, r, a)=>{const s=Fd(t,e.getBody(),o),i=De(s.getClientRects()),l=t===ax.Down,c=e.getBody();if(!i)return H.none();if(o_(e)){const e=l?Ni.fromRangeEnd(o):Ni.fromRangeStart(o);return(l?J_:X_)(c,e).orThunk((()=>H.from(e))).map((e=>e.toRange()))}const d=(l?lx:ix)(c,dx(1),s),u=K(d,ux(1)),m=i.left,g=ox(u,m);if(g&&a(g.node)){const o=Math.abs(m-g.left),n=Math.abs(m-g.right);return Gw(t,e,g.node,o<n,!1)}let p;if(p=n(s)?s.getNode():r(s)?s.getNode(!0):ui(o),p){const o=((e, t, o, n)=>{const r=tu(t);let a,s,i,l;const c=[];let d=0;1===e?(a=r.next,s=ci,i=li,l=Ni.after(n)):(a=r.prev,s=li,i=ci,l=Ni.before(n));const u=cx(l);do{if(!l.isVisible())continue;const e=cx(l);if(i(e,u))continue;c.length>0&&s(e,De(c))&&d++;const t=ai(e);if(t.position=l,t.line=d,o(t))return c;c.push(t)}while(l=a(l));return c})(t,c,dx(1),p);let n=ox(K(o,ux(1)),m);if(n)return gx(e,n.position.toRange(),!1);if(n=De(K(o,ux(0))),n)return gx(e,n.position.toRange(),!1)}return 0===u.length?fx(e,l).filter(l?r:n).map((t=>Yw(e,t.toRange(),!1))):H.none()},fx=(e, t)=>{const o=e.selection.getRng(),n=t?Ni.fromRangeEnd(o):Ni.fromRangeStart(o),r=(a=n.container(),s=e.getBody(),Yo(bo(a),(e=>yd(e.dom)),(e=>e.dom===s)).map((e=>e.dom)).getOr(s));var a,s;if(t){const e=G_(r,n);return de(e.positions)}{const e=$_(r,n);return ce(e.positions)}},yx=(e, t, o)=>fx(e,t).filter(o).exists((t=>(e.selection.setRng(t.toRange()),!0))),bx=(e, t)=>{const o=e.dom.createRng();o.setStart(t.container(),t.offset()),o.setEnd(t.container(),t.offset()),e.selection.setRng(o)},vx=(e, t)=>{e?t.setAttribute("data-mce-selected","inline-boundary"):t.removeAttribute("data-mce-selected")},kx=(e, t, o)=>v_(t,o).map((t=>(bx(e,t),o))),wx=(e, t, o)=>{const n=e.getBody(),r=((e, t, o)=>{const n=Ni.fromRangeStart(e);if(e.collapsed)return n;{const r=Ni.fromRangeEnd(e);return o?du(t,r).getOr(r):cu(t,n).getOr(n)}})(e.selection.getRng(),n,o);return((e, t, o, n)=>{const r=Yh(e,n),a=A_(t,o,r);return A_(t,o,r).bind(M(I_,e)).orThunk((()=>((e, t, o, n, r)=>{const a=Yh(e,r);return au(e,o,a).map(M(Yh,e)).fold((()=>n.map(R_)),(r=>A_(t,o,r).map(M(B_,e,t,o,a,r)).filter(M(L_,n)))).filter(E_)})(e,t,o,a,n)))})(o,M(Gh,e),n,r).bind((o=>kx(e,t,o)))},_x=(e, t, o)=>!!sc(e)&&wx(e,t,o).isSome(),xx=(e, t, o)=>!!sc(t)&&((e, t)=>{const o=t.selection.getRng(),n=e?Ni.fromRangeEnd(o):Ni.fromRangeStart(o);return!!(e=>_(e.selection.getSel().modify))(t)&&(e&&jr(n)?H_(!0,t.selection,n):!(e||!Vr(n))&&H_(!1,t.selection,n))})(e,t),Cx= e=>{const t=As(null),o=M(Gh,e);return e.on("NodeChange",(n=>{sc(e)&&(((e, t, o)=>{const n=q(Ln(bo(t.getRoot()),'*[data-mce-selected="inline-boundary"]'),(e=>e.dom)),r=K(n,e),a=K(o,e);W(ae(r,a),M(vx,!1)),W(ae(a,r),M(vx,!0))})(o,e.dom,n.parents),((e, t)=>{const o=t.get();if(e.selection.isCollapsed()&&!e.composing&&o){const n=Ni.fromRangeStart(e.selection.getRng());Ni.isTextPosition(n)&&!(e=>jr(e)||Vr(e))(n)&&(bx(e,id(o,n)),t.set(null))}})(e,t),((e, t, o, n)=>{if(t.selection.isCollapsed()){const r=K(n,e);W(r,(n=>{const r=Ni.fromRangeStart(t.selection.getRng());A_(e,t.getBody(),r).bind((e=>kx(t,o,e)))}))}})(o,e,t,n.parents))})),t},Sx=M(xx,!0),zx=M(xx,!1),Ox=(e, t, o)=>{if(sc(e)){const n=fx(e,t).getOrThunk((()=>{const o=e.selection.getRng();return t?Ni.fromRangeEnd(o):Ni.fromRangeStart(o)}));return A_(M(Gh,e),e.getBody(),n).exists((t=>{const n=R_(t);return v_(o,n).exists((t=>(bx(e,t),!0)))}))}return!1},Tx=(e, t)=> o=>v_(t,o).map((t=>()=>bx(e,t))),Ex=(e, t, o, n)=>{const r=e.getBody(),a=M(Gh,e);e.undoManager.ignore((()=>{e.selection.setRng(((e, t)=>{const o=document.createRange();return o.setStart(e.container(),e.offset()),o.setEnd(t.container(),t.offset()),o})(o,n)),ef(e),A_(a,r,Ni.fromRangeStart(e.selection.getRng())).map(D_).bind(Tx(e,t)).each(B)})),e.nodeChanged()},Ax=(e, t, o)=>{if(e.selection.isCollapsed()&&sc(e)){const n=Ni.fromRangeStart(e.selection.getRng());return((e, t, o, n)=>{const r=((e, t)=>Ad(t,e)||e)(e.getBody(),n.container()),a=M(Gh,e),s=A_(a,r,n);return s.bind((e=>o?e.fold(T(H.some(D_(e))),H.none,T(H.some(R_(e))),H.none):e.fold(H.none,T(H.some(R_(e))),H.none,T(H.some(D_(e)))))).map(Tx(e,t)).getOrThunk((()=>{const i=su(o,r,n),l=i.bind((e=>A_(a,r,e)));return Lt(s,l,(()=>Kh(a,r,n).bind((t=>(e=>Lt(uu(e),mu(e),((t, o)=>{const n=Yh(!0,t),r=Yh(!1,o);return cu(e,n).forall((e=>e.isEqual(r)))})).getOr(!0))(t)?H.some((()=>{Wh(e,o,bo(t))})):H.none())))).getOrThunk((()=>l.bind((()=>i.map((r=>()=>{o?Ex(e,t,n,r):Ex(e,t,r,n)}))))))}))})(e,t,o,n)}return H.none()},Mx=(e, t)=>{const o=bo(e.getBody()),n=bo(e.selection.getStart()),r=sh(n,o);return ee(r,t).fold(T(r),(e=>r.slice(0,e)))},Nx=(e, t)=>{const o=M(Cy,e);return oe(t,(e=>o(e)?[e.dom]:[]))},Rx= e=>{const t=(e=>Mx(e,br))(e);return Nx(e,t)},Dx=(e, t)=>{const o=(e=>Mx(e,(e=>br(e)||(e=>Po(e)>1)(e))))(e);return de(o).bind((n=>{const r=Ni.fromRangeStart(e.selection.getRng());return((e, t, o)=>Lt(uu(o),mu(o),((n, r)=>{const a=Yh(!0,n),s=Yh(!1,r),i=Yh(!1,t);return e?cu(o,i).exists((e=>e.isEqual(s)&&t.isEqual(a))):du(o,i).exists((e=>e.isEqual(a)&&t.isEqual(s)))})).getOr(!0))(t,r,n.dom)&&!Sy(n)?H.some((()=>((e, t, o, n)=>{const r=Nx(t,n);if(0===r.length)Wh(t,e,o);else{const e=xy(o.dom,r);t.selection.setRng(e.toRange())}})(t,e,n,o))):H.none()}))},Bx=(e, t)=>{const o=e.selection.getStart(),n=((e, t)=>{const o=t.parentElement;return or(t)&&!y(o)&&e.dom.isEmpty(o)})(e,o)||Sy(bo(o))?xy(o,t):((e, t)=>{const{caretContainer:o,caretPosition:n}=_y(t);return e.selection.getRng().insertNode(o.dom),n})(e,t);e.selection.setRng(n.toRange())},Lx= e=>Yn(e.startContainer),Ix= e=>{const t=e.selection.getRng();return(e=>0===e.startOffset&&Lx(e))(t)&&((e, t)=>{const o=t.startContainer.parentElement;return!y(o)&&Cy(e,bo(o))})(e,t)&&(e=>(e=>(e=>{const t=e.startContainer.parentNode,o=e.endContainer.parentNode;return!y(t)&&!y(o)&&t.isEqualNode(o)})(e)&&(e=>{const t=e.endContainer;return e.endOffset===(Yn(t)?t.length:t.childNodes.length)})(e))(e)||(e=>!e.endContainer.isEqualNode(e.commonAncestorContainer))(e))(t)},Hx=(e, t)=>e.selection.isCollapsed()?Dx(e,t):(e=>{if(Ix(e)){const t=Rx(e);return H.some((()=>{ef(e),((e, t)=>{const o=ae(t,Rx(e));o.length>0&&Bx(e,o)})(e,t)}))}return H.none()})(e),Px= e=>((e, t, o)=>Yo(e,(e=>pu(e.dom)),o).isSome())(e,0,br),Fx= e=>((e=>{const t=e.selection.getRng();return t.collapsed&&(Lx(t)||e.dom.isEmpty(t.startContainer))&&!(e=>Px(bo(e.selection.getStart())))(e)})(e)&&Bx(e,[]),!0),jx=(e, t, o)=>w(o)?H.some((()=>{e._selectionOverrides.hideFakeCaret(),Wh(e,t,bo(o))})):H.none(),Vx=(e, t)=>e.selection.isCollapsed()?((e, t)=>{const o=t?Qp:eh,n=t?Ud.Forwards:Ud.Backwards,r=Fd(n,e.getBody(),e.selection.getRng());return o(r)?jx(e,t,r.getNode(!t)):H.from(Yh(t,r)).filter((e=>o(e)&&Zd(r,e))).bind((o=>jx(e,t,o.getNode(!t))))})(e,t):((e, t)=>{const o=e.selection.getNode();return lr(o)?jx(e,t,o):H.none()})(e,t),Zx= e=>Xe(null!=e?e:"").getOr(0),Ux=(e, t)=>(e||"table"===Vt(t)?"margin":"padding")+("rtl"===ln(t,"direction")?"-right":"-left"),qx= e=>{const t=$x(e);return!e.mode.isReadOnly()&&(t.length>1||((e, t)=>ne(t,(t=>{const o=Ux(Ul(e),t),n=dn(t,o).map(Zx).getOr(0);return"false"!==e.dom.getContentEditable(t.dom)&&n>0})))(e,t))},Wx= e=>_r(e)||xr(e),$x= e=>K(_n(e.selection.getSelectedBlocks()),(e=>!Wx(e)&&!(e=>To(e).exists(Wx))(e)&&Xo(e,(e=>rr(e.dom)||ar(e.dom))).exists((e=>rr(e.dom))))),Gx=(e, t)=>{var o,n;const{dom:r}=e,a=ql(e),s=null!==(n=null===(o=/[a-z%]+$/i.exec(a))||void 0===o?void 0:o[0])&&void 0!==n?n:"px",i=Zx(a),l=Ul(e);W($x(e),(e=>{((e, t, o, n, r, a)=>{const s=Ux(o,bo(a)),i=Zx(e.getStyle(a,s));if("outdent"===t){const t=Math.max(0,i-n);e.setStyle(a,s,t?t+r:"")}else{const t=i+n+r;e.setStyle(a,s,t)}})(r,t,l,i,s,e.dom)}))},Kx= e=>Gx(e,"outdent"),Yx= e=>{if(e.selection.isCollapsed()&&qx(e)){const t=e.dom,o=e.selection.getRng(),n=Ni.fromRangeStart(o),r=t.getParent(o.startContainer,t.isBlock);if(null!==r&&uh(bo(r),n))return H.some((()=>Kx(e)))}return H.none()},Xx=(e, t, o)=>me([Yx,l_,e_,(e, o)=>Ax(e,t,o),Uw,Mf,c_,Vx,$w,Hx],(t=>t(e,o))).filter((t=>e.selection.isEditable())),Jx=(e, t)=>{e.addCommand("delete",(()=>{((e, t)=>{Xx(e,t,!1).fold((()=>{ef(e),nf(e)}),B)})(e,t)})),e.addCommand("forwardDelete",(()=>{((e, t)=>{Xx(e,t,!0).fold((()=>(e=>Qh(e,"ForwardDelete"))(e)),B)})(e,t)}))},Qx= e=>void 0===e.touches||1!==e.touches.length?H.none():H.some(e.touches[0]),eC=(e, t)=>Ce(e,t.nodeName),tC=(e, t)=>!!Yn(t)||!!jn(t)&&!eC(e.getBlockElements(),t)&&!Ou(t)&&!Ca(e,t),oC=(e, t)=>{if(Yn(t)){if(0===t.data.length)return!0;if(/^\s+$/.test(t.data)&&(!t.nextSibling||eC(e,t.nextSibling)))return!0}return!1},nC= e=>e.dom.create(Cl(e),Sl(e)),rC= e=>{const t=e.dom,o=e.selection,n=e.schema,r=n.getBlockElements(),a=o.getStart(),s=e.getBody();let i,l,c=!1;const d=Cl(e);if(!a||!jn(a))return;const u=s.nodeName.toLowerCase();if(!n.isValidChild(u,d.toLowerCase())||((e, t, o)=>U(ah(bo(o),bo(t)),(t=>eC(e,t.dom))))(r,s,a))return;const m=o.getRng(),{startContainer:g,startOffset:p,endContainer:h,endOffset:f}=m,y=gp(e);let b=s.firstChild;for(; b;)if(jn(b)&&ka(n,b),tC(n,b)){if(oC(r,b)){l=b,b=b.nextSibling,t.remove(l);continue}i||(i=nC(e),s.insertBefore(i,b),c=!0),l=b,b=b.nextSibling,i.appendChild(l)}else i=null,b=b.nextSibling;c&&y&&(m.setStart(g,p),m.setEnd(h,f),o.setRng(m),e.nodeChanged())},aC=(e, t, o)=>{const n=bo(nC(e)),r=Er();fn(n,r),o(t,n);const a=document.createRange();return a.setStartBefore(r.dom),a.setEndBefore(r.dom),a},sC= e=> t=>-1!==(" "+t.attr("class")+" ").indexOf(e),iC=(e, t, o)=>function(n){const r=arguments,a=r[r.length-2],s=a>0?t.charAt(a-1):"";if('"'===s)return n;if(">"===s){const e=t.lastIndexOf("<",a);if(-1!==e&&-1!==t.substring(e,a).indexOf('contenteditable="false"'))return n}return'<span class="'+o+'" data-mce-content="'+e.dom.encode(r[0])+'">'+e.dom.encode("string"==typeof r[1]?r[1]:r[0])+"</span>"},lC=(e, t)=>{t.hasAttribute("data-mce-caret")&&(qr(t),e.selection.setRng(e.selection.getRng()),e.selection.scrollIntoView(t))},cC=(e, t)=>{const o=(e=>Qo(bo(e.getBody()),"*[data-mce-caret]").map((e=>e.dom)).getOrNull())(e);if(o)return"compositionstart"===t.type?(t.preventDefault(),t.stopPropagation(),void lC(e,o)):void(Fr(o)&&(lC(e,o),e.undoManager.add()))},dC=ar,uC=(e, t, o)=>{const n=tu(e.getBody()),r=M(Vd,1===t?n.next:n.prev);if(o.collapsed){const n=e.dom.getParent(o.startContainer,"PRE");if(!n)return;if(!r(Ni.fromRangeStart(o))){const o=bo((e=>{const t=e.dom.create(Cl(e));return t.innerHTML='<br data-mce-bogus="1">',t})(e));1===t?pn(bo(n),o):gn(bo(n),o),e.selection.select(o.dom,!0),e.selection.collapse()}}},mC=(e, t)=>((e, t)=>{const o=t?Ud.Forwards:Ud.Backwards,n=e.selection.getRng();return((e, t, o)=>px(t,e,o,nh,rh,dC))(o,e,n).orThunk((()=>(uC(e,o,n),H.none())))})(e,t).exists((t=>(mx(e,t),!0))),gC=(e, t)=>((e, t)=>{const o=t?1:-1,n=e.selection.getRng();return((e, t, o)=>hx(t,e,o,(e=>nh(e)||th(e)),(e=>rh(e)||oh(e)),dC))(o,e,n).orThunk((()=>(uC(e,o,n),H.none())))})(e,t).exists((t=>(mx(e,t),!0))),pC=(e, t)=>yx(e,t,t?rh:nh),hC=(e, t)=>t_(e,!t).map((o=>{const n=o.toRange(),r=e.selection.getRng();return t?n.setStart(r.startContainer,r.startOffset):n.setEnd(r.endContainer,r.endOffset),n})).exists((t=>(mx(e,t),!0))),fC= e=>Z(["figcaption"],Vt(e)),yC=(e, t)=>{const o=bo(e.getBody()),n=Ni.fromRangeStart(e.selection.getRng());return((e, t)=>{const o=M(xo,t);return Xo(bo(e.container()),br,o).filter(fC)})(n,o).exists((()=>{if(((e, t, o)=>t?((e, t)=>G_(e,t).breakAt.isNone())(e.dom,o):((e, t)=>$_(e,t).breakAt.isNone())(e.dom,o))(o,t,n)){const n=aC(e,o,t?fn:hn);return e.selection.setRng(n),!0}return!1}))},bC=(e, t)=>!!e.selection.isCollapsed()&&yC(e,t),vC={shiftKey:!1,altKey:!1,ctrlKey:!1,metaKey:!1,keyCode:0},kC=(e, t)=>t.keyCode===e.keyCode&&t.shiftKey===e.shiftKey&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey,wC=(e, ...t)=>()=>e.apply(null,t),_C=(e, t)=>Q(((e, t)=>oe((e=>q(e,(e=>({...vC,...e}))))(e),(e=>kC(e,t)?[e]:[])))(e,t),(e=>e.action())),xC=(e, t)=>me(((e, t)=>oe((e=>q(e,(e=>({...vC,...e}))))(e),(e=>kC(e,t)?[e]:[])))(e,t),(e=>e.action())),CC=(e, t)=>{const o=t?Ud.Forwards:Ud.Backwards,n=e.selection.getRng();return px(e,o,n,Qp,eh,lr).exists((t=>(mx(e,t),!0)))},SC=(e, t)=>{const o=t?1:-1,n=e.selection.getRng();return hx(e,o,n,Qp,eh,lr).exists((t=>(mx(e,t),!0)))},zC=(e, t)=>yx(e,t,t?eh:Qp),OC=nl([{none:["current"]},{first:["current"]},{middle:["current","target"]},{last:["current"]}]),TC={...OC,none: e=>OC.none(e)},EC=(e, t, o)=>oe(Bo(e),(e=>wo(e,t)?o(e)?[e]:[]:EC(e,t,o))),AC=(e, t)=>en(e,"table",t),MC=(e, t, o, n, r=I)=>{const a=1===n;if(!a&&o<=0)return TC.first(e[0]);if(a&&o>=e.length-1)return TC.last(e[e.length-1]);{const a=o+n,s=e[a];return r(s)?TC.middle(t,s):MC(e,t,a,n,r)}},NC=(e, t)=>AC(e,t).bind((t=>{const o=EC(t,"th,td",I);return ee(o,(t=>xo(e,t))).map((e=>({index:e,all:o})))})),RC=(e, t, o, n, r)=>{const a=Ln(bo(o),"td,th,caption").map((e=>e.dom)),s=K(((e, t)=>oe(t,(t=>{const o=((e, t)=>({left:e.left-t,top:e.top-t,right:e.right+-2,bottom:e.bottom+-2,width:e.width+t,height:e.height+t}))(ai(t.getBoundingClientRect()),-1);return[{x:o.left,y:e(o),cell:t},{x:o.right,y:e(o),cell:t}]})))(e,a),(e=>t(e,r)));return((e, t, o)=>X(e,((e, n)=>e.fold((()=>H.some(n)),(e=>{const r=Math.sqrt(Math.abs(e.x-t)+Math.abs(e.y-o)),a=Math.sqrt(Math.abs(n.x-t)+Math.abs(n.y-o));return H.some(a<r?n:e)}))),H.none()))(s,n,r).map((e=>e.cell))},DC=M(RC,(e=>e.bottom),((e, t)=>e.y<t)),BC=M(RC,(e=>e.top),((e, t)=>e.y>t)),LC=(e, t, o)=>{const n=e(t,o);return(e=>e.breakType===P_.Wrap&&0===e.positions.length)(n)||!or(o.getNode())&&(e=>e.breakType===P_.Br&&1===e.positions.length)(n)?!((e, t, o)=>o.breakAt.exists((o=>e(t,o).breakAt.isSome())))(e,t,n):n.breakAt.isNone()},IC=M(LC,$_),HC=M(LC,G_),PC=(e, t, o, n)=>{const r=e.selection.getRng(),a=t?1:-1;return!(!pd()||!((e, t, o)=>{const n=Ni.fromRangeStart(t);return lu(!e,o).exists((e=>e.isEqual(n)))})(t,r,o)||(Gw(a,e,o,!t,!1).each((t=>{mx(e,t)})),0))},FC=(e, t, o)=>{const n=((e, t)=>{const o=t.getNode(e);return $n(o)?H.some(o):H.none()})(!!t,o),r=!1===t;n.fold((()=>mx(e,o.toRange())),(n=>lu(r,e.getBody()).filter((e=>e.isEqual(o))).fold((()=>mx(e,o.toRange())),(o=>((e, t, o)=>{t.undoManager.transact((()=>{const n=e?pn:gn,r=aC(t,bo(o),n);mx(t,r)}))})(t,e,n)))))},jC=(e, t, o, n)=>{const r=e.selection.getRng(),a=Ni.fromRangeStart(r),s=e.getBody();if(!t&&IC(n,a)){const n=((e, t, o)=>((e, t)=>ce(t.getClientRects()).bind((t=>DC(e,t.left,t.top))).bind((e=>{return W_(mu(o=e).map((e=>$_(o,e).positions.concat(e))).getOr([]),t);var o})))(t,o).orThunk((()=>ce(o.getClientRects()).bind((o=>q_(K_(e,Ni.before(t)),o.left))))).getOr(Ni.before(t)))(s,o,a);return FC(e,t,n),!0}if(t&&HC(n,a)){const n=((e, t, o)=>((e, t)=>de(t.getClientRects()).bind((t=>BC(e,t.left,t.top))).bind((e=>{return W_(uu(o=e).map((e=>[e].concat(G_(o,e).positions))).getOr([]),t);var o})))(t,o).orThunk((()=>ce(o.getClientRects()).bind((o=>q_(Y_(e,Ni.after(t)),o.left))))).getOr(Ni.after(t)))(s,o,a);return FC(e,t,n),!0}return!1},VC=(e, t, o)=>H.from(e.dom.getParent(e.selection.getNode(),"td,th")).bind((n=>H.from(e.dom.getParent(n,"table")).map((r=>o(e,t,r,n))))).getOr(!1),ZC=(e, t)=>VC(e,t,PC),UC=(e, t)=>VC(e,t,jC),qC=(e, t, o)=>o.fold(H.none,H.none,((e, t)=>{return(o=t,((e, t)=>{const o= e=>{for(let n=0; n<e.childNodes.length; n++){const r=bo(e.childNodes[n]);if(t(r))return H.some(r);const a=o(e.childNodes[n]);if(a.isSome())return a}return H.none()};return o(e.dom)})(o,wp)).map((e=>(e=>{const t=ig.exact(e,0,e,0);return mg(t)})(e)));var o}),(o=>(e.execCommand("mceTableInsertRowAfter"),WC(e,t,o)))),WC=(e, t, o)=>{return qC(e,t,(r=tn,NC(n=o,void 0).fold((()=>TC.none(n)),(e=>MC(e.all,n,e.index,1,r)))));var n,r},$C=(e, t, o)=>{return qC(e,t,(r=tn,NC(n=o,void 0).fold((()=>TC.none()),(e=>MC(e.all,n,e.index,-1,r)))));var n,r},GC=(e, t)=>{const o=["table","li","dl"],n=bo(e.getBody()),r= e=>{const t=Vt(e);return xo(e,n)||Z(o,t)},a=e.selection.getRng();return((e, t)=>((e, t, o=L)=>o(t)?H.none():Z(e,Vt(t))?H.some(t):Jo(t,e.join(","),(e=>wo(e,"table")||o(e))))(["td","th"],e,t))(bo(t?a.endContainer:a.startContainer),r).map((o=>(AC(o,r).each((t=>{e.model.table.clearSelectedCells(t.dom)})),e.selection.collapse(!t),(t?WC:$C)(e,r,o).each((t=>{e.selection.setRng(t)})),!0))).getOr(!1)},KC=(e, t)=>({container:e,offset:t}),YC=Os.DOM,XC= e=> t=>e===t?-1:0,JC=(e, t, o)=>{if(Yn(e)&&t>=0)return H.some(KC(e,t));{const n=ni(YC);return H.from(n.backwards(e,t,XC(e),o)).map((e=>KC(e.container,e.container.data.length)))}},QC=(e, t, o)=>{if(!Yn(e))return H.none();const n=e.data;if(t>=0&&t<=n.length)return H.some(KC(e,t));{const n=ni(YC);return H.from(n.backwards(e,t,XC(e),o)).bind((e=>{const n=e.container.data;return QC(e.container,t+n.length,o)}))}},eS=(e, t, o)=>{if(!Yn(e))return H.none();const n=e.data;if(t<=n.length)return H.some(KC(e,t));{const r=ni(YC);return H.from(r.forwards(e,t,XC(e),o)).bind((e=>eS(e.container,t-n.length,o)))}},tS=(e, t, o, n, r)=>{const a=ni(e,(e=> t=>e.isBlock(t)||Z(["BR","IMG","HR","INPUT"],t.nodeName)||"false"===e.getContentEditable(t))(e));return H.from(a.backwards(t,o,n,r))},oS= e=>Dr(e.toString().replace(/\u00A0/g," ")),nS= e=>""!==e&&-1!=="  \f\n\r\t\v".indexOf(e),rS=(e, t)=>e.substring(t.length),aS=(e, t, o, n=0)=>{return(r=bo(t.startContainer),en(r,_p)).fold((()=>((e, t, o, n=0)=>{if(!(r=t).collapsed||!Yn(r.startContainer))return H.none();var r;const a={text:"",offset:0},s=e.getParent(t.startContainer,e.isBlock)||e.getRoot();return tS(e,t.startContainer,t.startOffset,((e, t, n)=>(a.text=n+a.text,a.offset+=t,((e, t, o)=>{let n;const r=o.charAt(0);for(n=t-1; n>=0; n--){const a=e.charAt(n);if(nS(a))return H.none();if(r===a&&Ve(e,o,n,t))break}return H.some(n)})(a.text,a.offset,o).getOr(t))),s).bind((e=>{const r=t.cloneRange();if(r.setStart(e.container,e.offset),r.setEnd(t.endContainer,t.endOffset),r.collapsed)return H.none();const a=oS(r);return 0!==a.lastIndexOf(o)||rS(a,o).length<n?H.none():H.some({text:rS(a,o),range:r,trigger:o})}))})(e,t,o,n)),(t=>{const n=e.createRng();n.selectNode(t.dom);const r=oS(n);return H.some({range:n,text:rS(r,o),trigger:o})}));var r},sS= e=>{if((e=>3===e.nodeType)(e))return KC(e,e.data.length);{const t=e.childNodes;return t.length>0?sS(t[t.length-1]):KC(e,t.length)}},iS=(e, t)=>{const o=e.childNodes;return o.length>0&&t<o.length?iS(o[t],0):o.length>0&&(e=>1===e.nodeType)(e)&&o.length===t?sS(o[o.length-1]):KC(e,t)},lS=(e, t, o, n={})=>{var r;const a=t(),s=null!==(r=e.selection.getRng().startContainer.nodeValue)&&void 0!==r?r:"",i=K(a.lookupByTrigger(o.trigger),(t=>o.text.length>=t.minChars&&t.matches.getOrThunk((()=>(e=> t=>{const o=iS(t.startContainer,t.startOffset);return!((e, t)=>{var o;const n=null!==(o=e.getParent(t.container,e.isBlock))&&void 0!==o?o:e.getRoot();return tS(e,t.container,t.offset,((e, t)=>0===t?-1:t),n).filter((e=>{const t=e.container.data.charAt(e.offset-1);return!nS(t)})).isSome()})(e,o)})(e.dom)))(o.range,s,o.text)));if(0===i.length)return H.none();const l=Promise.all(q(i,(e=>e.fetch(o.text,e.maxResults,n).then((t=>({matchText:o.text,items:t,columns:e.columns,onAction:e.onAction,highlightOn:e.highlightOn}))))));return H.some({lookupData:l,context:o})};var cS;!function(e){e[e.Error=0]="Error",e[e.Value=1]="Value"}(cS||(cS={}));const dS=(e, t, o)=>e.stype===cS.Error?t(e.serror):o(e.svalue),uS= e=>({stype:cS.Value,svalue:e}),mS= e=>({stype:cS.Error,serror:e}),gS=dS,pS= e=>p(e)&&ge(e).length>100?" removed due to size":JSON.stringify(e,null,2),hS=(e, t)=>mS([{path:e,getErrorInfo:t}]),fS=(e, t)=>({extract:(o, n)=>xe(n,e).fold((()=>((e, t)=>hS(e,(()=>'Choice schema did not contain choice key: "'+t+'"')))(o,e)),(e=>((e, t, o, n)=>xe(o,n).fold((()=>((e, t, o)=>hS(e,(()=>'The chosen schema: "'+o+'" did not exist in branches: '+pS(t))))(e,o,n)),(o=>o.extract(e.concat(["branch: "+n]),t))))(o,n,t,e))),toString:()=>"chooseOn("+e+"). Possible values: "+ge(t)}),yS= e=>(...t)=>{if(0===t.length)throw new Error("Can't merge zero objects");const o={};for(let n=0; n<t.length; n++){const r=t[n];for(const t in r)Ce(r,t)&&(o[t]=e(o[t],r[t]))}return o},bS=yS(((e, t)=>h(e)&&h(t)?bS(e,t):t)),vS=(yS(((e, t)=>t)), e=>({tag:"defaultedThunk",process:T(e)})),kS= e=>{const t=(e=>{const t=[],o=[];return W(e,(e=>{dS(e,(e=>o.push(e)),(e=>t.push(e)))})),{values:t,errors:o}})(e);return t.errors.length>0?(o=t.errors,z(mS,te)(o)):uS(t.values);var o},wS=(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)}},_S= e=>({extract:(t, o)=>{return n=e(o),r= e=>((e, t)=>hS(e,T(t)))(t,e),n.stype===cS.Error?r(n.serror):n;var n,r},toString:T("val")}),xS=_S(uS),CS=(e, t, o, n)=>n(xe(e,t).getOrThunk((()=>o(e)))),SS=(e, t, o, n, r)=>{const a= e=>r.extract(t.concat([n]),e),s= e=>e.fold((()=>uS(H.none())),(e=>{const o=r.extract(t.concat([n]),e);return a=o,s=H.some,a.stype===cS.Value?{stype:cS.Value,svalue:s(a.svalue)}:a;var a,s}));switch(e.tag){case"required":return((e, t, o, n)=>xe(t,o).fold((()=>((e, t, o)=>hS(e,(()=>'Could not find valid *required* value for "'+t+'" in '+pS(o))))(e,o,t)),n))(t,o,n,a);case"defaultedThunk":return CS(o,n,e.process,a);case"option":return((e, t, o)=>o(xe(e,t)))(o,n,s);case"defaultedOptionThunk":return((e, t, o, n)=>n(xe(e,t).map((t=>!0===t?o(e):t))))(o,n,e.process,s);case"mergeWithThunk":return CS(o,n,T({}),(t=>{const n=bS(e.process(o),t);return a(n)}))}},zS= e=>({extract:(t, o)=>((e, t, o)=>{const n={},r=[];for(const a of o)wS(a,((o, a, s, i)=>{const l=SS(s,e,t,o,i);gS(l,(e=>{r.push(...e)}),(e=>{n[a]=e}))}),((e, o)=>{n[e]=o(t)}));return r.length>0?mS(r):uS(n)})(t,o,e),toString:()=>{const t=q(e,(e=>wS(e,((e, t, o, n)=>e+" -> "+n.toString()),((e, t)=>"state("+e+")"))));return"obj{\n"+t.join("\n")+"}"}}),OS= e=>({extract:(t, o)=>{const n=q(o,((o, n)=>e.extract(t.concat(["["+n+"]"]),o)));return kS(n)},toString:()=>"array("+e.toString()+")"}),TS=(e, t, o)=>{return n=((e, t, o)=>((e, t)=>e.stype===cS.Error?{stype:cS.Error,serror:t(e.serror)}:e)(t.extract([e],o),(e=>({input:o,errors:e}))))(e,t,o),dS(n,ol.error,ol.value);var n},ES=(e, t)=>fS(e,fe(t,zS)),AS=T(xS),MS=(e, t)=>_S((o=>{const n=typeof o;return e(o)?uS(o):mS(`Expected type: ${t} but got: ${n}`)})),NS=MS(x,"number"),RS=MS(g,"string"),DS=MS(b,"boolean"),BS=MS(_,"function"),LS=(e, t, o, n)=>({tag:"field",key:e,newKey:t,presence:o,prop:n}),IS=(e, t)=>({tag:"custom",newKey:e,instantiator:t}),HS=(e, t)=>LS(e,e,{tag:"required",process:{}},t),PS= e=>HS(e,RS),FS= e=>HS(e,BS),jS=(e, t)=>LS(e,e,{tag:"option",process:{}},t),VS= e=>jS(e,RS),ZS=(e, t, o)=>LS(e,e,vS(t),o),US=(e, t)=>ZS(e,t,NS),qS=(e, t, o)=>ZS(e,t,(e=>{return t= t=>Z(e,t)?ol.value(t):ol.error(`Unsupported value: "${t}", choose one of "${e.join(", ")}".`),_S((e=>t(e).fold(mS,uS)));var t})(o)),WS=(e, t)=>ZS(e,t,DS),$S=(e, t)=>ZS(e,t,BS),GS=PS("type"),KS=FS("fetch"),YS=FS("onAction"),XS=$S("onSetup",(()=>S)),JS=VS("text"),QS=VS("icon"),ez=VS("tooltip"),tz=VS("label"),oz=WS("active",!1),nz=WS("enabled",!0),rz=WS("primary",!1),az= e=>((e, t)=>ZS("type",t,RS))(0,e),sz=zS([GS,PS("trigger"),US("minChars",1),(1,((e, t)=>LS(e,e,vS(1),AS()))("columns")),US("maxResults",10),("matches",jS("matches",BS)),KS,YS,(iz=RS,ZS("highlightOn",[],OS(iz)))]);var iz;const lz=[nz,ez,QS,JS,XS],cz=[oz].concat(lz),dz=[$S("predicate",L),qS("scope","node",["node","editor"]),qS("position","selection",["node","selection","line"])],uz=lz.concat([az("contextformbutton"),rz,YS,IS("original",E)]),mz=cz.concat([az("contextformbutton"),rz,YS,IS("original",E)]),gz=lz.concat([az("contextformbutton")]),pz=cz.concat([az("contextformtogglebutton")]),hz=ES("type",{contextformbutton:uz,contextformtogglebutton:mz});zS([az("contextform"),$S("initValue",T("")),tz,((e, t)=>LS(e,e,{tag:"required",process:{}},OS(t)))("commands",hz),jS("launch",ES("type",{contextformbutton:gz,contextformtogglebutton:pz}))].concat(dz));const fz= e=>{const t=e.ui.registry.getAll().popups,o=fe(t,(e=>{return(t=e,TS("Autocompleter",sz,{trigger:t.ch,...t})).fold((e=>{throw new Error("Errors: \n"+(e=>{const t=e.length>10?e.slice(0,10).concat([{path:[],getErrorInfo:T("... (only showing first ten failures)")}]):e;return q(t,(e=>"Failed path: ("+e.path.join(" > ")+")\n"+e.getErrorInfo()))})((t=e).errors).join("\n")+"\n\nInput object: "+pS(t.input));var t}),E);var t})),n=ze(we(o,(e=>e.trigger))),r=_e(o);return{dataset:o,triggers:n,lookupByTrigger: e=>K(r,(t=>t.trigger===e))}},yz= e=>{const t=Is(),o=As(!1),n=t.isSet,r=()=>{n()&&((e=>{_k(e).autocompleter.removeDecoration()})(e),(e=>{e.dispatch("AutocompleterEnd")})(e),o.set(!1),t.clear())},a=Be((()=>fz(e))),s= s=>{(o=>t.get().map((t=>aS(e.dom,e.selection.getRng(),t.trigger).bind((t=>lS(e,a,t,o))))).getOrThunk((()=>((e, t)=>{const o=t(),n=e.selection.getRng();return((e, t, o)=>me(o.triggers,(o=>aS(e,t,o))))(e.dom,n,o).bind((o=>lS(e,t,o)))})(e,a))))(s).fold(r,(a=>{(o=>{n()||(((e, t)=>{_k(e).autocompleter.addDecoration(t)})(e,o.range),t.set({trigger:o.trigger,matchLength:o.text.length}))})(a.context),a.lookupData.then((n=>{t.get().map((s=>{const i=a.context;s.trigger===i.trigger&&(i.text.length-s.matchLength>=10?r():(t.set({...s,matchLength:i.text.length}),o.get()?((e, t)=>{e.dispatch("AutocompleterUpdate",t)})(e,{lookupData:n}):(o.set(!0),((e, t)=>{e.dispatch("AutocompleterStart",t)})(e,{lookupData:n}))))}))}))}))};e.addCommand("mceAutocompleterReload",((e, t)=>{const o=p(t)?t.fetchOptions:{};s(o)})),e.addCommand("mceAutocompleterClose",r),((e, t)=>{const o=Ps(t.load,50);e.on("keypress compositionend",(e=>{27!==e.which&&o.throttle()})),e.on("keydown",(e=>{const n=e.which;8===n?o.throttle():27===n&&t.cancelIfNecessary()})),e.on("remove",o.cancel)})(e,{cancelIfNecessary:r,load:s})},bz= e=>(t, o, n={})=>{const r=t.getBody(),a={bubbles:!0,composed:!0,data:null,isComposing:!1,detail:0,view:null,target:r,currentTarget:r,eventPhase:Event.AT_TARGET,originalTarget:r,explicitOriginalTarget:r,isTrusted:!1,srcElement:r,cancelable:!1,preventDefault:S,inputType:o},s=ds(new InputEvent(e));return t.dispatch(e,{...s,...a,...n})},vz=bz("input"),kz=bz("beforeinput"),wz=(e, t)=>{const o=e.dom,n=e.schema.getMoveCaretBeforeOnEnterElements();if(!t)return;if(/^(LI|DT|DD)$/.test(t.nodeName)){const e=(e=>{for(; e;){if(jn(e)||Yn(e)&&e.data&&/[\r\n\s]/.test(e.data))return e;e=e.nextSibling}return null})(t.firstChild);e&&/^(UL|OL|DL)$/.test(e.nodeName)&&t.insertBefore(o.doc.createTextNode(ur),t.firstChild)}const r=o.createRng();if(t.normalize(),t.hasChildNodes()){const e=new Hn(t,t);let o,a=t;for(; o=e.current();){if(Yn(o)){r.setStart(o,0),r.setEnd(o,0);break}if(n[o.nodeName.toLowerCase()]){r.setStartBefore(o),r.setEndBefore(o);break}a=o,o=e.next()}o||(r.setStart(a,0),r.setEnd(a,0))}else or(t)?t.nextSibling&&o.isBlock(t.nextSibling)?(r.setStartBefore(t),r.setEndBefore(t)):(r.setStartAfter(t),r.setEndAfter(t)):(r.setStart(t,0),r.setEnd(t,0));e.selection.setRng(r),Ug(e,r)},_z=(e, t)=>{const o=e.getRoot();let n,r=t;for(; r!==o&&r&&"false"!==e.getContentEditable(r);)"true"===e.getContentEditable(r)&&(n=r),r=r.parentNode;return r!==o?n:o},xz= e=>H.from(e.dom.getParent(e.selection.getStart(!0),e.dom.isBlock)),Cz=(e, t)=>{const o=null==e?void 0:e.parentNode;return w(o)&&o.nodeName===t},Sz= e=>w(e)&&/^(OL|UL|LI)$/.test(e.nodeName),zz= e=>{const t=e.parentNode;return w(o=t)&&/^(LI|DT|DD)$/.test(o.nodeName)?t:e;var o},Oz=(e, t, o)=>{let n=e[o?"firstChild":"lastChild"];for(; n&&!jn(n);)n=n[o?"nextSibling":"previousSibling"];return n===t},Tz=(e, t)=>t&&"A"===t.nodeName&&e.isEmpty(t),Ez= e=>{e.innerHTML='<br data-mce-bogus="1">'},Az=(e, t)=>e.nodeName===t||e.previousSibling&&e.previousSibling.nodeName===t,Mz=(e, t)=>w(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&!/^(fixed|absolute)/i.test(t.style.position)&&e.isEditable(t.parentNode)&&"false"!==e.getContentEditable(t),Nz=(e, t, o)=>Yn(t)?e?1===o&&t.data.charAt(o-1)===Nr?0:o:o===t.data.length-1&&t.data.charAt(o)===Nr?t.data.length:o:o,Rz=(e, t)=>{Cl(e).toLowerCase()===t.tagName.toLowerCase()&&((e, t, o)=>{const n=e.dom;H.from(o.style).map(n.parseStyle).each((e=>{const o={...un(bo(t)),...e};n.setStyles(t,o)}));const r=H.from(o.class).map((e=>e.split(/\s+/))),a=H.from(t.className).map((e=>K(e.split(/\s+/),(e=>""!==e))));Lt(r,a,((e, o)=>{const r=K(o,(t=>!Z(e,t))),a=[...e,...r];n.setAttrib(t,"class",a.join(" "))}));const s=["style","class"],i=ke(o,((e, t)=>!Z(s,t)));n.setAttribs(t,i)})(e,t,Sl(e))},Dz={insert:(e, t)=>{let o,n,r,a,s=!1;const i=e.dom,l=e.schema,c=l.getNonEmptyElements(),d=e.selection.getRng(),u=Cl(e),m= t=>{let n=o;const a=l.getTextInlineElements();let s;s=t||"TABLE"===r||"HR"===r?i.create(t||u):v.cloneNode(!1);let c=s;if(!1===El(e))i.setAttrib(s,"style",null),i.setAttrib(s,"class",null);else do{if(a[n.nodeName]){if(pu(n)||Ou(n))continue;const e=n.cloneNode(!1);i.setAttrib(e,"id",""),s.hasChildNodes()?(e.appendChild(s.firstChild),s.appendChild(e)):(c=e,s.appendChild(e))}}while((n=n.parentNode)&&n!==b);return Rz(e,s),Ez(c),s},p= e=>{const t=Nz(e,o,n);if(Yn(o)&&(e?t>0:t<o.data.length))return!1;if(o.parentNode===v&&s&&!e)return!0;if(e&&jn(o)&&o===v.firstChild)return!0;if(Az(o,"TABLE")||Az(o,"HR"))return s&&!e||!s&&e;const r=new Hn(o,v);let a;for(Yn(o)&&(e&&0===t?r.prev():e||t!==o.data.length||r.next()); a=r.current();){if(jn(a)){if(!a.getAttribute("data-mce-bogus")){const e=a.nodeName.toLowerCase();if(c[e]&&"br"!==e)return!1}}else if(Yn(a)&&!aa(a.data))return!1;e?r.prev():r.next()}return!0},h=()=>{let t;return t=/^(H[1-6]|PRE|FIGURE)$/.test(r)&&"HGROUP"!==_?m(u):m(),((e, t)=>{const o=Al(e);return!k(t)&&(g(o)?Z(Dt.explode(o),t.nodeName.toLowerCase()):o)})(e,a)&&Mz(i,a)&&i.isEmpty(v)?t=i.split(a,v):i.insertAfter(t,v),wz(e,t),t};wg(i,d).each((e=>{d.setStart(e.startContainer,e.startOffset),d.setEnd(e.endContainer,e.endOffset)})),o=d.startContainer,n=d.startOffset;const f=!(!t||!t.shiftKey),y=!(!t||!t.ctrlKey);jn(o)&&o.hasChildNodes()&&(s=n>o.childNodes.length-1,o=o.childNodes[Math.min(n,o.childNodes.length-1)]||o,n=s&&Yn(o)?o.data.length:0);const b=_z(i,o);if(!b||((e, t)=>{const o=e.dom.getParent(t,"ol,ul,dl");return null!==o&&"false"===e.dom.getContentEditableParent(o)})(e,o))return;f||(o=((e, t, o, n, r)=>{var a,s;const i=e.dom,l=null!==(a=_z(i,n))&&void 0!==a?a:i.getRoot();let c=i.getParent(n,i.isBlock);if(!c||!Mz(i,c)){if(c=c||l,!c.hasChildNodes()){const n=i.create(t);return Rz(e,n),c.appendChild(n),o.setStart(n,0),o.setEnd(n,0),n}let a,d=n;for(; d&&d.parentNode!==c;)d=d.parentNode;for(; d&&!i.isBlock(d);)a=d,d=d.previousSibling;const u=null===(s=null==a?void 0:a.parentElement)||void 0===s?void 0:s.nodeName;if(a&&u&&e.schema.isValidChild(u,t.toLowerCase())){const s=a.parentNode,l=i.create(t);for(Rz(e,l),s.insertBefore(l,a),d=a; d&&!i.isBlock(d);){const e=d.nextSibling;l.appendChild(d),d=e}o.setStart(n,r),o.setEnd(n,r)}}return n})(e,u,d,o,n));let v=i.getParent(o,i.isBlock)||i.getRoot();a=w(null==v?void 0:v.parentNode)?i.getParent(v.parentNode,i.isBlock):null,r=v?v.nodeName.toUpperCase():"";const _=a?a.nodeName.toUpperCase():"";if("LI"!==_||y||(v=a,a=a.parentNode,r=_),/^(LI|DT|DD)$/.test(r)&&jn(a)&&i.isEmpty(v))return void((e, t, o, n, r)=>{const a=e.dom,s=e.selection.getRng(),i=o.parentNode;if(o===e.getBody()||!i)return;var l;Sz(l=o)&&Sz(l.parentNode)&&(r="LI");let c=t(r);if(Oz(o,n,!0)&&Oz(o,n,!1))if(Cz(o,"LI")){const e=zz(o);a.insertAfter(c,e),(e=>{var t;return(null===(t=e.parentNode)||void 0===t?void 0:t.firstChild)===e})(o)?a.remove(e):a.remove(o)}else a.replace(c,o);else if(Oz(o,n,!0))Cz(o,"LI")?(a.insertAfter(c,zz(o)),c.appendChild(a.doc.createTextNode(" ")),c.appendChild(o)):i.insertBefore(c,o),a.remove(n);else if(Oz(o,n,!1))a.insertAfter(c,zz(o)),a.remove(n);else{o=zz(o);const e=s.cloneRange();e.setStartAfter(n),e.setEndAfter(o);const t=e.extractContents();"LI"===r&&((e, t)=>e.firstChild&&"LI"===e.firstChild.nodeName)(t)?(c=t.firstChild,a.insertAfter(t,o)):(a.insertAfter(t,o),a.insertAfter(c,o)),a.remove(n)}wz(e,c)})(e,m,a,v,u);if(v===e.getBody()||!Mz(i,v))return;const x=v.parentNode;let C;if(Ir(v))C=qr(v),i.isEmpty(v)&&Ez(v),Rz(e,C),wz(e,C);else if(p(!1))C=h();else if(p(!0)&&x)C=x.insertBefore(m(),v),wz(e,Az(v,"HR")?C:v);else{const t=(e=>{const t=e.cloneRange();return t.setStart(e.startContainer,Nz(!0,e.startContainer,e.startOffset)),t.setEnd(e.endContainer,Nz(!1,e.endContainer,e.endOffset)),t})(d).cloneRange();t.setEndAfter(v);const o=t.extractContents();(e=>{W(Bn(bo(e),Wt),(e=>{const t=e.dom;t.nodeValue=Dr(t.data)}))})(o),(e=>{let t=e;do{Yn(t)&&(t.data=t.data.replace(/^[\r\n]+/,"")),t=t.firstChild}while(t)})(o),C=o.firstChild,i.insertAfter(o,v),((e, t, o)=>{var n;const r=[];if(!o)return;let a=o;for(; a=a.firstChild;){if(e.isBlock(a))return;jn(a)&&!t[a.nodeName.toLowerCase()]&&r.push(a)}let s=r.length;for(; s--;)a=r[s],(!a.hasChildNodes()||a.firstChild===a.lastChild&&""===(null===(n=a.firstChild)||void 0===n?void 0:n.nodeValue)||Tz(e,a))&&e.remove(a)})(i,c,C),((e, t)=>{t.normalize();const o=t.lastChild;(!o||jn(o)&&/^(left|right)$/gi.test(e.getStyle(o,"float",!0)))&&e.add(t,"br")})(i,v),i.isEmpty(v)&&Ez(v),C.normalize(),i.isEmpty(C)?(i.remove(C),h()):(Rz(e,C),wz(e,C))}i.setAttrib(C,"id",""),e.dispatch("NewBlock",{newBlock:C})},fakeEventName:"insertParagraph"},Bz=(e, t, o)=>{const n=e.dom.createRng();o?(n.setStartBefore(t),n.setEndBefore(t)):(n.setStartAfter(t),n.setEndAfter(t)),e.selection.setRng(n),Ug(e,n)},Lz=(e, t)=>{const o=fo("br");gn(bo(t),o),e.undoManager.add()},Iz=(e, t)=>{Hz(e.getBody(),t)||pn(bo(t),fo("br"));const o=fo("br");pn(bo(t),o),Bz(e,o.dom,!1),e.undoManager.add()},Hz=(e, t)=>{return o=Ni.after(t),!!or(o.getNode())||cu(e,Ni.after(t)).map((e=>or(e.getNode()))).getOr(!1);var o},Pz= e=>e&&"A"===e.nodeName&&"href"in e,Fz= e=>e.fold(L,Pz,Pz,L),jz=(e, t)=>{t.fold(S,M(Lz,e),M(Iz,e),S)},Vz={insert:(e, t)=>{const o=(e=>{const t=M(Gh,e),o=Ni.fromRangeStart(e.selection.getRng());return A_(t,e.getBody(),o).filter(Fz)})(e);o.isSome()?o.each(M(jz,e)):((e, t)=>{const o=e.selection,n=e.dom,r=o.getRng();let a,s=!1;wg(n,r).each((e=>{r.setStart(e.startContainer,e.startOffset),r.setEnd(e.endContainer,e.endOffset)}));let i=r.startOffset,l=r.startContainer;if(jn(l)&&l.hasChildNodes()){const e=i>l.childNodes.length-1;l=l.childNodes[Math.min(i,l.childNodes.length-1)]||l,i=e&&Yn(l)?l.data.length:0}let c=n.getParent(l,n.isBlock);const d=c&&c.parentNode?n.getParent(c.parentNode,n.isBlock):null,u=d?d.nodeName.toUpperCase():"",m=!(!t||!t.ctrlKey);"LI"!==u||m||(c=d),Yn(l)&&i>=l.data.length&&(((e, t, o)=>{const n=new Hn(t,o);let r;const a=e.getNonEmptyElements();for(; r=n.next();)if(a[r.nodeName.toLowerCase()]||Yn(r)&&r.length>0)return!0;return!1})(e.schema,l,c||n.getRoot())||(a=n.create("br"),r.insertNode(a),r.setStartAfter(a),r.setEndAfter(a),s=!0)),a=n.create("br"),Di(n,r,a),Bz(e,a,s),e.undoManager.add()})(e,t)},fakeEventName:"insertLineBreak"},Zz=(e, t)=>xz(e).filter((e=>t.length>0&&wo(bo(e),t))).isSome(),Uz=nl([{br:[]},{block:[]},{none:[]}]),qz=(e, t)=>(e=>Zz(e,Tl(e)))(e),Wz= e=>(t, o)=>(e=>xz(e).filter((e=>xr(bo(e)))).isSome())(t)===e,$z=(e, t)=>(o, n)=>{const r=(e=>xz(e).fold(T(""),(e=>e.nodeName.toUpperCase())))(o)===e.toUpperCase();return r===t},Gz= e=>{const t=_z(e.dom,e.selection.getStart());return k(t)},Kz= e=>$z("pre",e),Yz= e=>(t, o)=>xl(t)===e,Xz=(e, t)=>(e=>Zz(e,Ol(e)))(e),Jz=(e, t)=>t,Qz= e=>{const t=Cl(e),o=_z(e.dom,e.selection.getStart());return w(o)&&e.schema.isValidChild(o.nodeName,t)},eO=(e, t)=>(o, n)=>X(e,((e, t)=>e&&t(o,n)),!0)?H.some(t):H.none(),tO=(e, t, o)=>{t.selection.isCollapsed()||(e=>{e.execCommand("delete")})(t),w(o)&&kz(t,e.fakeEventName).isDefaultPrevented()||(e.insert(t,o),w(o)&&vz(t,e.fakeEventName))},oO=(e, t)=>{const o=()=>tO(Vz,e,t),n=()=>tO(Dz,e,t),r=((e, t)=>k_([eO([qz],Uz.none()),eO([Kz(!0),Gz],Uz.none()),eO([$z("summary",!0)],Uz.br()),eO([Kz(!0),Yz(!1),Jz],Uz.br()),eO([Kz(!0),Yz(!1)],Uz.block()),eO([Kz(!0),Yz(!0),Jz],Uz.block()),eO([Kz(!0),Yz(!0)],Uz.br()),eO([Wz(!0),Jz],Uz.br()),eO([Wz(!0)],Uz.block()),eO([Xz],Uz.br()),eO([Jz],Uz.br()),eO([Qz],Uz.block())],[e,!(!t||!t.shiftKey)]).getOr(Uz.none()))(e,t);switch(zl(e)){case"linebreak":r.fold(o,o,S);break;case"block":r.fold(n,n,S);break;case"invert":r.fold(n,o,S);break;default:r.fold(o,n,S)}},nO=xt(),rO= e=>e.stopImmediatePropagation(),aO= e=>e.keyCode===Wm.PAGE_UP||e.keyCode===Wm.PAGE_DOWN,sO=(e, t, o)=>{o&&!e.get()?t.on("NodeChange",rO,!0):!o&&e.get()&&t.off("NodeChange",rO),e.set(o)},iO=(e, t)=>{const o=t.container(),n=t.offset();return Yn(o)?(o.insertData(n,e),H.some(Ni(o,n+e.length))):jd(t).map((o=>{const n=yo(e);return t.isAtEnd()?pn(o,n):gn(o,n),Ni(n.dom,e.length)}))},lO=M(iO,ur),cO=M(iO," "),dO=(e, t)=> o=>((e, t)=>!Sh(t)&&(((e, t)=>((e, t)=>du(e.dom,t).isNone())(e,t)||((e, t)=>cu(e.dom,t).isNone())(e,t)||uh(e,t)||mh(e,t)||bh(e,t)||yh(e,t))(e,t)||xh(e,t)||Ch(e,t)))(e,o)?lO(t):cO(t),uO= e=>{const t=Ni.fromRangeStart(e.selection.getRng()),o=bo(e.getBody());if(e.selection.isCollapsed()){const n=M(Gh,e),r=Ni.fromRangeStart(e.selection.getRng());return A_(n,e.getBody(),r).bind((e=> t=>t.fold((t=>du(e.dom,Ni.before(t))),(e=>uu(e)),(e=>mu(e)),(t=>cu(e.dom,Ni.after(t)))))(o)).map((n=>()=>dO(o,t)(n).each((e=> t=>(e.selection.setRng(t.toRange()),e.nodeChanged(),!0))(e))))}return H.none()},mO= e=>ed(e)?[{keyCode:Wm.TAB,action:wC(GC,e,!0)},{keyCode:Wm.TAB,shiftKey:!0,action:wC(GC,e,!1)}]:[],gO= e=>{if(e.addShortcut("Meta+P","","mcePrint"),yz(e),kk(e))return As(null);{const t=Cx(e);return(e=>{e.on("keyup compositionstart",M(cC,e))})(e),((e, t)=>{e.on("keydown",(o=>{o.isDefaultPrevented()||((e, t, o)=>{const n=At.os.isMacOS()||At.os.isiOS();_C([{keyCode:Wm.RIGHT,action:wC(mC,e,!0)},{keyCode:Wm.LEFT,action:wC(mC,e,!1)},{keyCode:Wm.UP,action:wC(gC,e,!1)},{keyCode:Wm.DOWN,action:wC(gC,e,!0)},...n?[{keyCode:Wm.UP,action:wC(hC,e,!1),metaKey:!0,shiftKey:!0},{keyCode:Wm.DOWN,action:wC(hC,e,!0),metaKey:!0,shiftKey:!0}]:[],{keyCode:Wm.RIGHT,action:wC(ZC,e,!0)},{keyCode:Wm.LEFT,action:wC(ZC,e,!1)},{keyCode:Wm.UP,action:wC(UC,e,!1)},{keyCode:Wm.DOWN,action:wC(UC,e,!0)},{keyCode:Wm.RIGHT,action:wC(CC,e,!0)},{keyCode:Wm.LEFT,action:wC(CC,e,!1)},{keyCode:Wm.UP,action:wC(SC,e,!1)},{keyCode:Wm.DOWN,action:wC(SC,e,!0)},{keyCode:Wm.RIGHT,action:wC(_x,e,t,!0)},{keyCode:Wm.LEFT,action:wC(_x,e,t,!1)},{keyCode:Wm.RIGHT,ctrlKey:!n,altKey:n,action:wC(Sx,e,t)},{keyCode:Wm.LEFT,ctrlKey:!n,altKey:n,action:wC(zx,e,t)},{keyCode:Wm.UP,action:wC(bC,e,!1)},{keyCode:Wm.DOWN,action:wC(bC,e,!0)}],o).each((e=>{o.preventDefault()}))})(e,t,o)}))})(e,t),((e, t)=>{let o=!1;e.on("keydown",(n=>{o=n.keyCode===Wm.BACKSPACE,n.isDefaultPrevented()||((e, t, o)=>{const n=o.keyCode===Wm.BACKSPACE?"deleteContentBackward":"deleteContentForward";xC([{keyCode:Wm.BACKSPACE,action:wC(Yx,e)},{keyCode:Wm.BACKSPACE,action:wC(l_,e,!1)},{keyCode:Wm.DELETE,action:wC(l_,e,!0)},{keyCode:Wm.BACKSPACE,action:wC(e_,e,!1)},{keyCode:Wm.DELETE,action:wC(e_,e,!0)},{keyCode:Wm.BACKSPACE,action:wC(Ax,e,t,!1)},{keyCode:Wm.DELETE,action:wC(Ax,e,t,!0)},{keyCode:Wm.BACKSPACE,action:wC(Mf,e,!1)},{keyCode:Wm.DELETE,action:wC(Mf,e,!0)},{keyCode:Wm.BACKSPACE,action:wC(c_,e,!1)},{keyCode:Wm.DELETE,action:wC(c_,e,!0)},{keyCode:Wm.BACKSPACE,action:wC(Vx,e,!1)},{keyCode:Wm.DELETE,action:wC(Vx,e,!0)},{keyCode:Wm.BACKSPACE,action:wC($w,e,!1)},{keyCode:Wm.DELETE,action:wC($w,e,!0)},{keyCode:Wm.BACKSPACE,action:wC(Uw,e,!1)},{keyCode:Wm.DELETE,action:wC(Uw,e,!0)},{keyCode:Wm.BACKSPACE,action:wC(Hx,e,!1)},{keyCode:Wm.DELETE,action:wC(Hx,e,!0)}],o).filter((t=>e.selection.isEditable())).each((t=>{o.preventDefault(),kz(e,n).isDefaultPrevented()||(t(),vz(e,n))}))})(e,t,n)})),e.on("keyup",(t=>{t.isDefaultPrevented()||((e, t, o)=>{const n=xt(),r=n.os,a=n.browser,s=r.isMacOS()?[{keyCode:Wm.BACKSPACE,altKey:!0,action:wC(Fx,e)},{keyCode:Wm.DELETE,altKey:!0,action:wC(Fx,e)}]:[{keyCode:Wm.BACKSPACE,ctrlKey:!0,action:wC(Fx,e)},{keyCode:Wm.DELETE,ctrlKey:!0,action:wC(Fx,e)}];r.isMacOS()&&o&&s.push({keyCode:a.isFirefox()?224:91,action:wC(Fx,e)}),_C([{keyCode:Wm.BACKSPACE,action:wC(i_,e)},{keyCode:Wm.DELETE,action:wC(i_,e)},...s],t)})(e,t,o),o=!1}))})(e,t),(e=>{e.on("keydown",(t=>{t.keyCode===Wm.ENTER&&((e, t)=>{var o;t.isDefaultPrevented()||(t.preventDefault(),(o=e.undoManager).typing&&(o.typing=!1,o.add()),e.undoManager.transact((()=>{oO(e,t)})))})(e,t)}))})(e),(e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e, t)=>{xC([{keyCode:Wm.SPACEBAR,action:wC(uO,e)}],t).each((o=>{t.preventDefault(),kz(e,"insertText",{data:" "}).isDefaultPrevented()||(o(),vz(e,"insertText",{data:" "}))}))})(e,t)}))})(e),(e=>{e.on("input",(t=>{t.isComposing||(e=>{const t=bo(e.getBody());e.selection.isCollapsed()&&Dh(t,Ni.fromRangeStart(e.selection.getRng())).each((t=>{e.selection.setRng(t.toRange())}))})(e)}))})(e),(e=>{e.on("keydown",(t=>{t.isDefaultPrevented()||((e, t)=>{_C([...mO(e)],t).each((e=>{t.preventDefault()}))})(e,t)}))})(e),((e, t)=>{e.on("keydown",(o=>{o.isDefaultPrevented()||((e, t, o)=>{const n=At.os.isMacOS()||At.os.isiOS();_C([{keyCode:Wm.END,action:wC(pC,e,!0)},{keyCode:Wm.HOME,action:wC(pC,e,!1)},...n?[]:[{keyCode:Wm.HOME,action:wC(hC,e,!1),ctrlKey:!0,shiftKey:!0},{keyCode:Wm.END,action:wC(hC,e,!0),ctrlKey:!0,shiftKey:!0}],{keyCode:Wm.END,action:wC(zC,e,!0)},{keyCode:Wm.HOME,action:wC(zC,e,!1)},{keyCode:Wm.END,action:wC(Ox,e,!0,t)},{keyCode:Wm.HOME,action:wC(Ox,e,!1,t)}],o).each((e=>{o.preventDefault()}))})(e,t,o)}))})(e,t),((e, t)=>{if(nO.os.isMacOS())return;const o=As(!1);e.on("keydown",(t=>{aO(t)&&sO(o,e,!0)})),e.on("keyup",(n=>{n.isDefaultPrevented()||((e, t, o)=>{_C([{keyCode:Wm.PAGE_UP,action:wC(Ox,e,!1,t)},{keyCode:Wm.PAGE_DOWN,action:wC(Ox,e,!0,t)}],o)})(e,t,n),aO(n)&&o.get()&&(sO(o,e,!1),e.nodeChanged())}))})(e,t),t}};class pO{constructor(e){let t;this.lastPath=[],this.editor=e;const o=this;"onselectionchange"in e.getDoc()||e.on("NodeChange click mouseup keyup focus",(o=>{const n=e.selection.getRng(),r={startContainer:n.startContainer,startOffset:n.startOffset,endContainer:n.endContainer,endOffset:n.endOffset};"nodechange"!==o.type&&pg(r,t)||e.dispatch("SelectionChange"),t=r})),e.on("contextmenu",(()=>{e.dispatch("SelectionChange")})),e.on("SelectionChange",(()=>{const t=e.selection.getStart(!0);t&&$u(e)&&!o.isSameElementPath(t)&&e.dom.isChildOf(t,e.getBody())&&e.nodeChanged({selectionChange:!0})})),e.on("mouseup",(t=>{!t.isDefaultPrevented()&&$u(e)&&("IMG"===e.selection.getNode().nodeName?np.setEditorTimeout(e,(()=>{e.nodeChanged()})):e.nodeChanged())}))}nodeChanged(e={}){const t=this.editor.selection;let o;if(this.editor.initialized&&t&&!bc(this.editor)&&!this.editor.mode.isReadOnly()){const n=this.editor.getBody();o=t.getStart(!0)||n,o.ownerDocument===this.editor.getDoc()&&this.editor.dom.isChildOf(o,n)||(o=n);const r=[];this.editor.dom.getParent(o,(e=>e===n||(r.push(e),!1))),this.editor.dispatch("NodeChange",{...e,element:o,parents:r})}}isSameElementPath(e){let t;const o=this.editor,n=re(o.dom.getParents(e,I,o.getBody()));if(n.length===this.lastPath.length){for(t=n.length; t>=0&&n[t]===this.lastPath[t]; t--);if(-1===t)return this.lastPath=n,!0}return this.lastPath=n,!1}}const hO="x-tinymce/html",fO=T(hO),yO="\x3c!-- "+hO+" --\x3e",bO= e=>yO+e,vO= e=>-1!==e.indexOf(yO),kO="%MCEPASTEBIN%",wO= e=>e.dom.get("mcepastebin"),_O= e=>w(e)&&"mcepastebin"===e.id,xO= e=>e===kO,CO=(e, t)=>(Dt.each(t,(t=>{e=m(t,RegExp)?e.replace(t,""):e.replace(t[0],t[1])})),e),SO= e=>CO(e,[/^[\s\S]*<body[^>]*>\s*|\s*<\/body[^>]*>[\s\S]*$/gi,/<!--StartFragment-->|<!--EndFragment-->/g,[/( ?)<span class="Apple-converted-space">\u00a0<\/span>( ?)/g,(e, t, o)=>t||o?ur:" "],/<br class="Apple-interchange-newline">/g,/<br>$/i]),zO=(e, t)=>({content:e,cancelled:t}),OO=(e, t)=>(e.insertContent(t,{merge:Fc(e),paste:!0}),!0),TO= e=>/^https?:\/\/[\w\-\/+=.,!;:&%@^~(){}?#]+$/i.test(e),EO=(e, t, o)=>!(e.selection.isCollapsed()||!TO(t))&&((e, t, o)=>(e.undoManager.extra((()=>{o(e,t)}),(()=>{e.execCommand("mceInsertLink",!1,t)})),!0))(e,t,o),AO=(e, t, o)=>!!((e, t)=>TO(t)&&U(Qc(e),(e=>Ue(t.toLowerCase(),`.${e.toLowerCase()}`))))(e,t)&&((e, t, o)=>(e.undoManager.extra((()=>{o(e,t)}),(()=>{e.insertContent('<img src="'+t+'">')})),!0))(e,t,o),MO=(e=>{let t=0;return()=>"mceclip"+t++})(),NO=(e, t, o, n)=>{const r=((e, t, o)=>((e, t, o)=>{const n=((e, t, o)=>e.dispatch("PastePreProcess",{content:t,internal:o}))(e,t,o),r=((e, t)=>{const o=jv({sanitize:Jc(e)},e.schema);o.addNodeFilter("meta",(e=>{Dt.each(e,(e=>{e.remove()}))}));const n=o.parse(t,{forced_root_block:!1,isRootContent:!0});return Pp({validate:!0},e.schema).serialize(n)})(e,n.content);return e.hasEventListeners("PastePostProcess")&&!n.isDefaultPrevented()?((e, t, o)=>{const n=e.dom.create("div",{style:"display:none"},t),r=((e, t, o)=>e.dispatch("PastePostProcess",{node:t,internal:o}))(e,n,o);return zO(r.node.innerHTML,r.isDefaultPrevented())})(e,r,o):zO(r,n.isDefaultPrevented())})(e,t,o))(e,t,o);r.cancelled||((e, t, o)=>{o||!jc(e)?OO(e,t):((e, t)=>{Dt.each([EO,AO,OO],(o=>!o(e,t,OO)))})(e,t)})(e,r.content,n)},RO=(e, t, o)=>{const n=o||vO(t);NO(e,(e=>e.replace(yO,""))(t),n,!1)},DO=(e, t)=>{const o=e.dom.encode(t).replace(/\r\n/g,"\n"),n=((e, t, o)=>{const n=e.split(/\n\n/),r=((e, t)=>{let o="<"+e;const n=we(t,((e, t)=>t+'="'+Ga.encodeAllRaw(e)+'"'));return n.length&&(o+=" "+n.join(" ")),o+">"})(t,o),a="</"+t+">",s=q(n,(e=>e.split(/\n/).join("<br />")));return 1===s.length?s[0]:q(s,(e=>r+e+a)).join("")})(ia(o,Zc(e)),Cl(e),Sl(e));NO(e,n,!1,!0)},BO= 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},LO=(e, t)=>t in e&&e[t].length>0,IO= e=>LO(e,"text/html")||LO(e,"text/plain"),HO=(e, t, o)=>{const n="paste"===t.type?t.clipboardData:t.dataTransfer;var r;if(Bc(e)&&n){const a=((e, t)=>{const o=t.items?oe(ue(t.items),(e=>"file"===e.kind?[e.getAsFile()]:[])):[],n=t.files?ue(t.files):[];return K(o.length>0?o:n,(e=>{const t=Qc(e);return e=>Ze(e.type,"image/")&&U(t,(t=>(e=>{const t=e.toLowerCase(),o={jpg:"jpeg",jpe:"jpeg",jfi:"jpeg",jif:"jpeg",jfif:"jpeg",pjpeg:"jpeg",pjp:"jpeg",svg:"svg+xml"};return Dt.hasOwn(o,t)?"image/"+o[t]:"image/"+t})(t)===e.type))})(e))})(e,n);if(a.length>0)return t.preventDefault(),(r=a,Promise.all(q(r,(e=>vb(e).then((t=>({file:e,uri:t}))))))).then((t=>{o&&e.selection.setRng(o),W(t,(t=>{((e, t)=>{yb(t.uri).each((({data:o,type:n,base64Encoded:r})=>{const a=r?o:btoa(o),s=t.file,i=e.editorUpload.blobCache,l=i.getByData(a,n),c=null!=l?l:((e, t, o, n)=>{const r=MO(),a=Nl(e)&&w(o.name),s=a?((e, t)=>{const o=t.match(/([\s\S]+?)(?:\.[a-z0-9.]+)$/i);return w(o)?e.dom.encode(o[1]):void 0})(e,o.name):r,i=a?o.name:void 0,l=t.create(r,o,n,s,i);return t.add(l),l})(e,i,s,a);RO(e,`<img src="${c.blobUri()}">`,!1)}))})(e,t)}))})),!0}return!1},PO=(e, t, o, n)=>{let r=SO(o);const a=LO(t,fO())||vO(o),s=!a&&(e=>!/<(?:\/?(?!(?:div|p|br|span)>)\w+|(?:(?!(?:span style="white-space:\s?pre;?">)|br\s?\/>))\w+\s[^>]+)>/i.test(e))(r),i=TO(r);(xO(r)||!r.length||s&&!i)&&(n=!0),(n||i)&&(r=LO(t,"text/plain")&&s?t["text/plain"]:(e=>{const t=is(),o=jv({},t);let n="";const r=t.getVoidElements(),a=Dt.makeMap("script noscript style textarea video audio iframe object"," "),s=t.getBlockElements(),i= e=>{const o=e.name,l=e;if("br"!==o){if("wbr"!==o)if(r[o]&&(n+=" "),a[o])n+=" ";else{if(3===e.type&&(n+=e.value),!(e.name in t.getVoidElements())){let t=e.firstChild;if(t)do{i(t)}while(t=t.next)}s[o]&&l.next&&(n+="\n","p"===o&&(n+="\n"))}}else n+="\n"};return e=CO(e,[/<!\[[^\]]+\]>/g]),i(o.parse(e)),n})(r)),xO(r)||(n?DO(e,r):RO(e,r,a))},FO=(e, t, o)=>{((e, t, o)=>{let n;e.on("keydown",(e=>{(e=>Wm.metaKeyPressed(e)&&86===e.keyCode||e.shiftKey&&45===e.keyCode)(e)&&!e.isDefaultPrevented()&&(n=e.shiftKey&&86===e.keyCode)})),e.on("paste",(r=>{if(r.isDefaultPrevented()||(e=>{var t,o;return At.os.isAndroid()&&0===(null===(o=null===(t=e.clipboardData)||void 0===t?void 0:t.items)||void 0===o?void 0:o.length)})(r))return;const a="text"===o.get()||n;n=!1;const s=BO(r.clipboardData);!IO(s)&&HO(e,r,t.getLastRng()||e.selection.getRng())||(LO(s,"text/html")?(r.preventDefault(),PO(e,s,s["text/html"],a)):LO(s,"text/plain")&&LO(s,"text/uri-list")?(r.preventDefault(),PO(e,s,s["text/plain"],a)):(t.create(),np.setEditorTimeout(e,(()=>{const o=t.getHtml();t.remove(),PO(e,s,o,a)}),0)))}))})(e,t,o),(e=>{const t= e=>Ze(e,"webkit-fake-url"),o= e=>Ze(e,"data:");e.parser.addNodeFilter("img",((n, r, a)=>{if(!Bc(e)&&(e=>{var t;return!0===(null===(t=e.data)||void 0===t?void 0:t.paste)})(a))for(const r of n){const n=r.attr("src");g(n)&&!r.attr("data-mce-object")&&n!==At.transparentSrc&&(t(n)||!Uc(e)&&o(n))&&r.remove()}}))})(e)},jO=(e, t, o, n)=>{((e, t, o)=>{if(!e)return!1;try{return e.clearData(),e.setData("text/html",t),e.setData("text/plain",o),e.setData(fO(),t),!0}catch(e){return!1}})(e.clipboardData,t.html,t.text)?(e.preventDefault(),n()):o(t.html,n)},VO= e=>(t, o)=>{const{dom:n,selection:r}=e,a=n.create("div",{contenteditable:"false","data-mce-bogus":"all"}),s=n.create("div",{contenteditable:"true"},t);n.setStyles(a,{position:"fixed",top:"0",left:"-3000px",width:"1000px",overflow:"hidden"}),a.appendChild(s),n.add(e.getBody(),a);const i=r.getRng();s.focus();const l=n.createRng();l.selectNodeContents(s),r.setRng(l),np.setEditorTimeout(e,(()=>{r.setRng(i),n.remove(a),o()}),0)},ZO= e=>({html:bO(e.selection.getContent({contextual:!0})),text:e.selection.getContent({format:"text"})}),UO= e=>!e.selection.isCollapsed()||(e=>!!e.dom.getParent(e.selection.getStart(),"td[data-mce-selected],th[data-mce-selected]",e.getBody()))(e),qO=(e, t)=>{var o,n;return Cg.getCaretRangeFromPoint(null!==(o=t.clientX)&&void 0!==o?o:0,null!==(n=t.clientY)&&void 0!==n?n:0,e.getDoc())},WO=(e, t)=>{e.focus(),t&&e.selection.setRng(t)},$O=/rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)/gi,GO= e=>Dt.trim(e).replace($O,Hu).toLowerCase(),KO=(e, t, o)=>{const n=Hc(e);if(o||"all"===n||!Pc(e))return t;const r=n?n.split(/[, ]/):[];if(r&&"none"!==n){const o=e.dom,n=e.selection.getNode();t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,((e, t, a, s)=>{const i=o.parseStyle(o.decode(a)),l={};for(let e=0; e<r.length; e++){const t=i[r[e]];let a=t,s=o.getStyle(n,r[e],!0);/color/.test(r[e])&&(a=GO(a),s=GO(s)),s!==a&&(l[r[e]]=t)}const c=o.serializeStyle(l,"span");return c?t+' style="'+c+'"'+s:t+s}))}else t=t.replace(/(<[^>]+) style="([^"]*)"([^>]*>)/gi,"$1$3");return t=t.replace(/(<[^>]+) data-mce-style="([^"]+)"([^>]*>)/gi,((e, t, o, n)=>t+' style="'+o+'"'+n)),t},YO= e=>{const t=As(!1),o=As(Vc(e)?"text":"html"),n=(e=>{const t=As(null);return{create:()=>((e, t)=>{const{dom:o,selection:n}=e,r=e.getBody();t.set(n.getRng());const a=o.add(e.getBody(),"div",{id:"mcepastebin",class:"mce-pastebin",contentEditable:!0,"data-mce-bogus":"all",style:"position: fixed; top: 50%; width: 10px; height: 10px; overflow: hidden; opacity: 0"},kO);At.browser.isFirefox()&&o.setStyle(a,"left","rtl"===o.getStyle(r,"direction",!0)?65535:-65535),o.bind(a,"beforedeactivate focusin focusout",(e=>{e.stopPropagation()})),a.focus(),n.select(a,!0)})(e,t),remove:()=>((e, t)=>{const o=e.dom;if(wO(e)){let n;const r=t.get();for(; n=wO(e);)o.remove(n),o.unbind(n);r&&e.selection.setRng(r)}t.set(null)})(e,t),getEl:()=>wO(e),getHtml:()=>(e=>{const t=e.dom,o=(e, o)=>{e.appendChild(o),t.remove(o,!0)},[n,...r]=K(e.getBody().childNodes,_O);W(r,(e=>{o(n,e)}));const a=t.select("div[id=mcepastebin]",n);for(let e=a.length-1; e>=0; e--){const r=t.create("div");n.insertBefore(r,a[e]),o(r,a[e])}return n?n.innerHTML:""})(e),getLastRng:t.get}})(e);(e=>{(At.browser.isChromium()||At.browser.isSafari())&&((e, t)=>{e.on("PastePreProcess",(o=>{o.content=t(e,o.content,o.internal)}))})(e,KO)})(e),((e, t)=>{e.addCommand("mceTogglePlainTextPaste",(()=>{((e, t)=>{"text"===t.get()?(t.set("html"),qm(e,!1)):(t.set("text"),qm(e,!0)),e.focus()})(e,t)})),e.addCommand("mceInsertClipboardContent",((t, o)=>{o.html&&RO(e,o.html,o.internal),o.text&&DO(e,o.text)}))})(e,o),(e=>{const t= t=> o=>{t(e,o)},o=Lc(e);_(o)&&e.on("PastePreProcess",t(o));const n=Ic(e);_(n)&&e.on("PastePostProcess",t(n))})(e),e.on("PreInit",(()=>{(e=>{e.on("cut",(e=> t=>{!t.isDefaultPrevented()&&UO(e)&&jO(t,ZO(e),VO(e),(()=>{if(At.browser.isChromium()||At.browser.isFirefox()){const t=e.selection.getRng();np.setEditorTimeout(e,(()=>{e.selection.setRng(t),e.execCommand("Delete")}),0)}else e.execCommand("Delete")}))})(e)),e.on("copy",(e=> t=>{!t.isDefaultPrevented()&&UO(e)&&jO(t,ZO(e),VO(e),S)})(e))})(e),((e, t)=>{Dc(e)&&e.on("dragend dragover draggesture dragdrop drop drag",(e=>{e.preventDefault(),e.stopPropagation()})),Bc(e)||e.on("drop",(e=>{const t=e.dataTransfer;t&&(e=>U(e.files,(e=>/^image\//.test(e.type))))(t)&&e.preventDefault()})),e.on("drop",(o=>{if(o.isDefaultPrevented())return;const n=qO(e,o);if(k(n))return;const r=BO(o.dataTransfer),a=LO(r,fO());if((!IO(r)||(e=>{const t=e["text/plain"];return!!t&&0===t.indexOf("file://")})(r))&&HO(e,o,n))return;const s=r[fO()],i=s||r["text/html"]||r["text/plain"],l=((e, t, o, n)=>{const r=e.getParent(o,(e=>Ca(t,e)));if(r&&Ce(n,"text/html")){const e=(new DOMParser).parseFromString(n["text/html"],"text/html").body;return!y(e.querySelector(r.nodeName.toLowerCase()))}return!1})(e.dom,e.schema,n.startContainer,r);t.get()&&!l||i&&(o.preventDefault(),np.setEditorTimeout(e,(()=>{e.undoManager.transact((()=>{s&&e.execCommand("Delete"),WO(e,n);const t=SO(i);r["text/html"]?RO(e,t,a):DO(e,t)}))})))})),e.on("dragstart",(e=>{t.set(!0)})),e.on("dragover dragend",(o=>{Bc(e)&&!t.get()&&(o.preventDefault(),WO(e,qO(e,o))),"dragend"===o.type&&t.set(!1)}))})(e,t),FO(e,n,o)}))},XO=or,JO=Yn,QO= e=>ar(e.dom),eT= e=> t=>xo(bo(e),t),tT=(e, t)=>Xo(bo(e),QO,eT(t)),oT=(e, t, o)=>{const n=new Hn(e,t),r=o?n.next.bind(n):n.prev.bind(n);let a=e;for(let t=o?e:r(); t&&!XO(t); t=r())ta(t)&&(a=t);return a},nT= e=>{const t=((e, t)=>{const o=Ni.fromRangeStart(e).getNode(),n=((e, t)=>Xo(bo(e),(e=>(e=>rr(e.dom))(e)||br(e)),eT(t)).getOr(bo(t)).dom)(o,t),r=oT(o,n,!1),a=oT(o,n,!0),s=document.createRange();return tT(r,n).fold((()=>{JO(r)?s.setStart(r,0):s.setStartBefore(r)}),(e=>s.setStartBefore(e.dom))),tT(a,n).fold((()=>{JO(a)?s.setEnd(a,a.data.length):s.setEndAfter(a)}),(e=>s.setEndAfter(e.dom))),s})(e.selection.getRng(),e.getBody());e.selection.setRng(Wf(t))};var rT;!function(e){e.Before="before",e.After="after"}(rT||(rT={}));const aT=(e, t)=>Math.abs(e.left-t),sT=(e, t)=>Math.abs(e.right-t),iT=(e, t)=>(e=>X(e,((e, t)=>e.fold((()=>H.some(t)),(e=>{const o=Math.min(t.left,e.left),n=Math.min(t.top,e.top),r=Math.max(t.right,e.right),a=Math.max(t.bottom,e.bottom);return H.some({top:n,right:r,bottom:a,left:o,width:r-o,height:a-n})}))),H.none()))(K(e,(e=>{return(o=t)>=(n=e).top&&o<=n.bottom;var o,n}))).fold((()=>[[],e]),(t=>{const{pass:o,fail:n}=G(e,(e=>((e, t)=>{const o=((e, t)=>Math.max(0,Math.min(e.bottom,t.bottom)-Math.max(e.top,t.top)))(e,t)/Math.min(e.height,t.height);return((e, t)=>e.top<t.bottom&&e.bottom>t.top)(e,t)&&o>.5})(e,t)));return[o,n]})),lT=(e, t, o)=>t>e.left&&t<e.right?0:Math.min(Math.abs(e.left-t),Math.abs(e.right-t)),cT=(e, t, o)=>{const n= e=>ta(e.node)?H.some(e):jn(e.node)?cT(ue(e.node.childNodes),t,o):H.none(),r=(e, r)=>{const a=ie(e,((e, n)=>r(e,t,o)-r(n,t,o)));return((e, r)=>{if(e.length>=2){const a=n(e[0]).getOr(e[0]),s=n(e[1]).getOr(e[1]);if(Math.abs(r(a,t,o)-r(s,t,o))<2){if(Yn(a.node))return H.some(a);if(Yn(s.node))return H.some(s)}}return H.none()})(a,r).orThunk((()=>me(a,n)))},[a,s]=iT(rx(e),o),{pass:i,fail:l}=G(s,(e=>e.top<o));return r(a,lT).orThunk((()=>r(l,di))).orThunk((()=>r(i,di)))},dT=(e, t, o)=>((e, t, o)=>{const n=bo(e),r=zo(n),a=vo(r,t,o).filter((e=>Co(n,e))).getOr(n);return((e, t, o, n)=>{const r=(t, a)=>{const s=K(t.dom.childNodes,N((e=>jn(e)&&e.classList.contains("mce-drag-container"))));return a.fold((()=>cT(s,o,n)),(e=>{const t=K(s,(t=>t!==e.dom));return cT(t,o,n)})).orThunk((()=>(xo(t,e)?H.none():Eo(t)).bind((e=>r(e,H.some(t))))))};return r(t,H.none())})(n,a,t,o)})(e,t,o).filter((e=>fd(e.node))).map((e=>((e, t)=>({node:e.node,position:aT(e,t)<sT(e,t)?rT.Before:rT.After}))(e,t))),uT= e=>{var t,o;const n=e.getBoundingClientRect(),r=e.ownerDocument,a=r.documentElement,s=r.defaultView;return{top:n.top+(null!==(t=null==s?void 0:s.scrollY)&&void 0!==t?t:0)-a.clientTop,left:n.left+(null!==(o=null==s?void 0:s.scrollX)&&void 0!==o?o:0)-a.clientLeft}},mT= e=>({target:e,srcElement:e}),gT= e=>(t, o)=>((e, t, o)=>({...t,dataTransfer:null,type:e,...o}))(e,t,mT(o)),pT=gT("dragstart"),hT=gT("drop"),fT= e=>((e, t)=>{const o=R("Function not supported on simulated event.");return{bubbles:!0,cancelBubble:!1,cancelable:!0,composed:!1,currentTarget:null,defaultPrevented:!1,eventPhase:0,isTrusted:!0,returnValue:!1,srcElement:null,target:null,timeStamp:0,type:"dragend",composedPath:o,initEvent:o,preventDefault:S,stopImmediatePropagation:S,stopPropagation:S,AT_TARGET:window.Event.AT_TARGET,BUBBLING_PHASE:window.Event.BUBBLING_PHASE,CAPTURING_PHASE:window.Event.CAPTURING_PHASE,NONE:window.Event.NONE,altKey:!1,button:0,buttons:0,clientX:0,clientY:0,ctrlKey:!1,metaKey:!1,movementX:0,movementY:0,offsetX:0,offsetY:0,pageX:0,pageY:0,relatedTarget:null,screenX:0,screenY:0,shiftKey:!1,x:0,y:0,detail:0,view:null,which:0,initUIEvent:o,initMouseEvent:o,getModifierState:o,dataTransfer:null,...t}})(0,mT(e)),yT=gT("dragend"),bT=ar,vT=((...e)=> t=>{for(let o=0; o<e.length; o++)if(e[o](t))return!0;return!1})(bT,rr),kT=(e, t, o, n)=>{const r=e.dom,a=t.cloneNode(!0);r.setStyles(a,{width:o,height:n}),r.setAttrib(a,"data-mce-selected",null);const s=r.create("div",{class:"mce-drag-container","data-mce-bogus":"all",unselectable:"on",contenteditable:"false"});return r.setStyles(s,{position:"absolute",opacity:.5,overflow:"hidden",border:0,padding:0,margin:0,width:o,height:n}),r.setStyles(a,{margin:0,boxSizing:"border-box"}),s.appendChild(a),s},wT=(e, t)=> o=>()=>{const n="left"===e?o.scrollX:o.scrollY;o.scroll({[e]:n+t,behavior:"smooth"})},_T=wT("left",-32),xT=wT("left",32),CT=wT("top",-32),ST=wT("top",32),zT= e=>{e&&e.parentNode&&e.parentNode.removeChild(e)},OT=(e, t)=>{const o=Hs(((e, o)=>((e, t, o)=>{e._selectionOverrides.hideFakeCaret(),dT(e.getBody(),t,o).fold((()=>e.selection.placeCaretAt(t,o)),(n=>{const r=e._selectionOverrides.showCaret(1,n.node,n.position===rT.Before,!1);r?e.selection.setRng(r):e.selection.placeCaretAt(t,o)}))})(t,e,o)),0);t.on("remove",o.cancel);const n=e;return r=>e.on((e=>{const a=Math.max(Math.abs(r.screenX-e.screenX),Math.abs(r.screenY-e.screenY));if(!e.dragging&&a>10){if(t.dispatch("dragstart",pT(r,e.element)).isDefaultPrevented())return;e.dragging=!0,t.focus()}if(e.dragging){const a=r.currentTarget===t.getDoc().documentElement,l=((e, t)=>({pageX:t.pageX-e.relX,pageY:t.pageY+5}))(e,((e, t)=>{return o=(e=>e.inline?uT(e.getBody()):{left:0,top:0})(e),n=(e=>{const t=e.getBody();return e.inline?{left:t.scrollLeft,top:t.scrollTop}:{left:0,top:0}})(e),r=((e, t)=>{if(t.target.ownerDocument!==e.getDoc()){const o=uT(e.getContentAreaContainer()),n=(e=>{const t=e.getBody(),o=e.getDoc().documentElement,n={left:t.scrollLeft,top:t.scrollTop},r={left:t.scrollLeft||o.scrollLeft,top:t.scrollTop||o.scrollTop};return e.inline?n:r})(e);return{left:t.pageX-o.left+n.left,top:t.pageY-o.top+n.top}}return{left:t.pageX,top:t.pageY}})(e,t),{pageX:r.left-o.left+n.left,pageY:r.top-o.top+n.top};var o,n,r})(t,r));s=e.ghost,i=t.getBody(),s.parentNode!==i&&i.appendChild(s),((e, t, o, n, r, a, s, i, l, c, d, u)=>{let m=0,g=0;e.style.left=t.pageX+"px",e.style.top=t.pageY+"px",t.pageX+o>r&&(m=t.pageX+o-r),t.pageY+n>a&&(g=t.pageY+n-a),e.style.width=o-m+"px",e.style.height=n-g+"px";const p=l.clientHeight,h=l.clientWidth,f=s+l.getBoundingClientRect().top,y=i+l.getBoundingClientRect().left;d.on((e=>{e.intervalId.clear(),e.dragging&&u&&(s+8>=p?e.intervalId.set(ST(c)):s-8<=0?e.intervalId.set(CT(c)):i+8>=h?e.intervalId.set(xT(c)):i-8<=0?e.intervalId.set(_T(c)):f+16>=window.innerHeight?e.intervalId.set(ST(window)):f-16<=0?e.intervalId.set(CT(window)):y+16>=window.innerWidth?e.intervalId.set(xT(window)):y-16<=0&&e.intervalId.set(_T(window)))}))})(e.ghost,l,e.width,e.height,e.maxX,e.maxY,r.clientY,r.clientX,t.getContentAreaContainer(),t.getWin(),n,a),o.throttle(r.clientX,r.clientY)}var s,i}))},TT=(e, t, o)=>{e.on((e=>{if(e.intervalId.clear(),e.dragging){const n=o.fold((()=>fT(e.element)),(t=>yT(t,e.element)));t.dispatch("dragend",n)}})),ET(e)},ET= e=>{e.on((e=>{e.intervalId.clear(),zT(e.ghost)})),e.clear()},AT= e=>{const t=Is(),o=Os.DOM,n=document,r=((e, t)=> o=>{if((e=>0===e.button)(o)){const n=Q(t.dom.getParents(o.target),vT).getOr(null);if(w(n)&&((e, t, o)=>bT(o)&&o!==t&&e.isEditable(o.parentElement))(t.dom,t.getBody(),n)){const r=t.dom.getPos(n),a=t.getBody(),s=t.getDoc().documentElement;e.set({element:n,dragging:!1,screenX:o.screenX,screenY:o.screenY,maxX:(t.inline?a.scrollWidth:s.offsetWidth)-2,maxY:(t.inline?a.scrollHeight:s.offsetHeight)-2,relX:o.pageX-r.x,relY:o.pageY-r.y,width:n.offsetWidth,height:n.offsetHeight,ghost:kT(t,n,n.offsetWidth,n.offsetHeight),intervalId:Ls(100)})}}})(t,e),a=OT(t,e),s=((e, t)=> o=>{e.on((e=>{var n;if(e.intervalId.clear(),e.dragging){if(((e, t, o)=>!k(t)&&t!==o&&!e.dom.isChildOf(t,o)&&e.dom.isEditable(t))(t,(e=>{const t=e.getSel();if(w(t)){const e=t.getRangeAt(0).startContainer;return Yn(e)?e.parentNode:e}return null})(t.selection),e.element)){const r=(e=>{const t=e.cloneNode(!0);return t.removeAttribute("data-mce-selected"),t})(e.element),a=null!==(n=t.getDoc().elementFromPoint(o.clientX,o.clientY))&&void 0!==n?n:t.getBody();t.dispatch("drop",hT(o,a)).isDefaultPrevented()||t.undoManager.transact((()=>{((e, t)=>{const o=e.getParent(t.parentNode,e.isBlock);zT(t),o&&o!==e.getRoot()&&e.isEmpty(o)&&Ar(bo(o))})(t.dom,e.element),t.insertContent(t.dom.getOuterHTML(r)),t._selectionOverrides.hideFakeCaret()}))}t.dispatch("dragend",yT(o,t.getBody()))}})),ET(e)})(t,e),i=((e, t)=> o=>TT(e,t,H.some(o)))(t,e);e.on("mousedown",r),e.on("mousemove",a),e.on("mouseup",s),o.bind(n,"mousemove",a),o.bind(n,"mouseup",i),e.on("remove",(()=>{o.unbind(n,"mousemove",a),o.unbind(n,"mouseup",i)})),e.on("keydown",(o=>{o.keyCode===Wm.ESC&&TT(t,e,H.none())}))},MT=ar,NT=(e, t)=>Nf(e.getBody(),t),RT= e=>{const t=e.selection,o=e.dom,n=e.getBody(),r=gd(e,n,o.isBlock,(()=>gp(e))),a="sel-"+o.uniqueId(),s="data-mce-selected";let i;const l= e=>e!==n&&(MT(e)||lr(e))&&o.isChildOf(e,n)&&o.isEditable(e.parentNode),c=(o, n, a, s=!0)=>e.dispatch("ShowCaret",{target:n,direction:o,before:a}).isDefaultPrevented()?null:(s&&t.scrollIntoView(n,-1===o),r.show(a,n)),d= e=>Pr(e)||Zr(e)||Ur(e),u= e=>d(e.startContainer)||d(e.endContainer),m= t=>{const n=e.schema.getVoidElements(),r=o.createRng(),a=t.startContainer,s=t.startOffset,i=t.endContainer,l=t.endOffset;return Ce(n,a.nodeName.toLowerCase())?0===s?r.setStartBefore(a):r.setStartAfter(a):r.setStart(a,s),Ce(n,i.nodeName.toLowerCase())?0===l?r.setEndBefore(i):r.setEndAfter(i):r.setEnd(i,l),r},g=(r, d)=>{if(!r)return null;if(r.collapsed){if(!u(r)){const e=d?1:-1,t=Fd(e,n,r),a=t.getNode(!d);if(w(a)){if(fd(a))return c(e,a,!!d&&!t.isAtEnd(),!1);if(Hr(a)&&ar(a.nextSibling)){const e=o.createRng();return e.setStart(a,0),e.setEnd(a,0),e}}const s=t.getNode(d);if(w(s)){if(fd(s))return c(e,s,!d&&!t.isAtEnd(),!1);if(Hr(s)&&ar(s.previousSibling)){const e=o.createRng();return e.setStart(s,1),e.setEnd(s,1),e}}}return null}let m=r.startContainer,g=r.startOffset;const p=r.endOffset;if(Yn(m)&&0===g&&MT(m.parentNode)&&(m=m.parentNode,g=o.nodeIndex(m),m=m.parentNode),!jn(m))return null;if(p===g+1&&m===r.endContainer){const n=m.childNodes[g];if(l(n))return(n=>{const r=n.cloneNode(!0),l=e.dispatch("ObjectSelected",{target:n,targetClone:r});if(l.isDefaultPrevented())return null;const c=((n, r)=>{const s=bo(e.getBody()),i=e.getDoc(),l=Qo(s,"#"+a).getOrThunk((()=>{const e=ho('<div data-mce-bogus="all" class="mce-offscreen-selection"></div>',i);return Xt(e,"id",a),fn(s,e),e})),c=o.createRng();vn(l),bn(l,[yo(ur,i),bo(r),yo(ur,i)]),c.setStart(l.dom.firstChild,1),c.setEnd(l.dom.lastChild,0),sn(l,{top:o.getPos(n,e.getBody()).y+"px"}),qg(l);const d=t.getSel();return d&&(d.removeAllRanges(),d.addRange(c)),c})(n,l.targetClone),d=bo(n);return W(Ln(bo(e.getBody()),`*[${s}]`),(e=>{xo(d,e)||oo(e,s)})),o.getAttrib(n,s)||n.setAttribute(s,"1"),i=n,h(),c})(n)}return null},p=()=>{i&&i.removeAttribute(s),Qo(bo(e.getBody()),"#"+a).each(kn),i=null},h=()=>{r.hide()};return kk(e)||(e.on("click",(t=>{o.isEditable(t.target)||(t.preventDefault(),e.focus())})),e.on("blur NewBlock",p),e.on("ResizeWindow FullscreenStateChanged",r.reposition),e.on("tap",(t=>{const o=t.target,n=NT(e,o);MT(n)?(t.preventDefault(),Kw(e,n).each(g)):l(o)&&Kw(e,o).each(g)}),!0),e.on("mousedown",(r=>{const a=r.target;if(a!==n&&"HTML"!==a.nodeName&&!o.isChildOf(a,n))return;if(!((e, t, o)=>{const n=bo(e.getBody()),r=e.inline?n:bo(zo(n).dom.documentElement),a=((e, t, o, n)=>{const r=(e=>e.dom.getBoundingClientRect())(t);return{x:o-(e?r.left+t.dom.clientLeft+Qk(t):0),y:n-(e?r.top+t.dom.clientTop+Jk(t):0)}})(e.inline,r,t,o);return((e, t, o)=>{const n=Yk(e),r=Xk(e);return t>=0&&o>=0&&t<=n&&o<=r})(r,a.x,a.y)})(e,r.clientX,r.clientY))return;p(),h();const s=NT(e,a);MT(s)?(r.preventDefault(),Kw(e,s).each(g)):dT(n,r.clientX,r.clientY).each((o=>{var n;r.preventDefault(),(n=c(1,o.node,o.position===rT.Before,!1))&&t.setRng(n),jn(s)?s.focus():e.getBody().focus()}))})),e.on("keypress",(e=>{Wm.modifierPressed(e)||MT(t.getNode())&&e.preventDefault()})),e.on("GetSelectionRange",(e=>{let t=e.range;if(i){if(!i.parentNode)return void(i=null);t=t.cloneRange(),t.selectNode(i),e.range=t}})),e.on("SetSelectionRange",(e=>{e.range=m(e.range);const t=g(e.range,e.forward);t&&(e.range=t)})),e.on("AfterSetSelectionRange",(e=>{const t=e.range,n=t.startContainer.parentElement;var r;u(t)||jn(r=n)&&"mcepastebin"===r.id||h(),(e=>w(e)&&o.hasClass(e,"mce-offscreen-selection"))(n)||p()})),(e=>{AT(e),xc(e)&&(e=>{const t= t=>{if(!t.isDefaultPrevented()){const o=t.dataTransfer;o&&(Z(o.types,"Files")||o.files.length>0)&&(t.preventDefault(),"drop"===t.type&&aw(e,"Dropped file type is not supported"))}},o= o=>{ip(e,o.target)&&t(o)},n=()=>{const n=Os.DOM,r=e.dom,a=document,s=e.inline?e.getBody():e.getDoc(),i=["drop","dragover"];W(i,(e=>{n.bind(a,e,o),r.bind(s,e,t)})),e.on("remove",(()=>{W(i,(e=>{n.unbind(a,e,o),r.unbind(s,e,t)}))}))};e.on("init",(()=>{np.setEditorTimeout(e,n,0)}))})(e)})(e),(e=>{const t=Hs((()=>{if(!e.removed&&e.getBody().contains(document.activeElement)){const t=e.selection.getRng();if(t.collapsed){const o=Yw(e,t,!1);e.selection.setRng(o)}}}),0);e.on("focus",(()=>{t.throttle()})),e.on("blur",(()=>{t.cancel()}))})(e),(e=>{e.on("init",(()=>{e.on("focusin",(t=>{const o=t.target;if(lr(o)){const t=Nf(e.getBody(),o),n=ar(t)?t:o;e.selection.getNode()!==n&&Kw(e,n).each((t=>e.selection.setRng(t)))}}))}))})(e)),{showCaret:c,showBlockCaretContainer: e=>{e.hasAttribute("data-mce-caret")&&(qr(e),t.scrollIntoView(e))},hideFakeCaret:h,destroy:()=>{r.destroy(),i=null}}},DT=(e, t)=>{let o=t;for(let t=e.previousSibling; Yn(t); t=t.previousSibling)o+=t.data.length;return o},BT=(e, t, o, n, r)=>{if(Yn(o)&&(n<0||n>o.data.length))return[];const a=r&&Yn(o)?[DT(o,n)]:[n];let s=o;for(; s!==t&&s.parentNode;)a.push(e.nodeIndex(s,r)),s=s.parentNode;return s===t?a.reverse():[]},LT=(e, t, o, n, r, a, s=!1)=>({start:BT(e,t,o,n,s),end:BT(e,t,r,a,s)}),IT=(e, t)=>{const o=t.slice(),n=o.pop();return x(n)?X(o,((e, t)=>e.bind((e=>H.from(e.childNodes[t])))),H.some(e)).bind((e=>Yn(e)&&(n<0||n>e.data.length)?H.none():H.some({node:e,offset:n}))):H.none()},HT=(e, t)=>IT(e,t.start).bind((({node:o,offset:n})=>IT(e,t.end).map((({node:e,offset:t})=>{const r=document.createRange();return r.setStart(o,n),r.setEnd(e,t),r})))),PT=(e, t, o)=>{if(t&&e.isEmpty(t)&&!o(t)){const n=t.parentNode;e.remove(t),PT(e,n,o)}},FT=(e, t, o, n=!0)=>{const r=t.startContainer.parentNode,a=t.endContainer.parentNode;t.deleteContents(),n&&!o(t.startContainer)&&(Yn(t.startContainer)&&0===t.startContainer.data.length&&e.remove(t.startContainer),Yn(t.endContainer)&&0===t.endContainer.data.length&&e.remove(t.endContainer),PT(e,r,o),r!==a&&PT(e,a,o))},jT=(e, t)=>H.from(e.dom.getParent(t.startContainer,e.dom.isBlock)),VT=(e, t, o)=>{const n=e.dynamicPatternsLookup({text:o,block:t});return{...e,blockPatterns:il(n).concat(e.blockPatterns),inlinePatterns:ll(n).concat(e.inlinePatterns)}},ZT=(e, t, o, n)=>{const r=e.createRng();return r.setStart(t,0),r.setEnd(o,n),r.toString()},UT=(e, t, o)=>{((e, t, o)=>{if(Yn(e)&&0>=e.length)return H.some(KC(e,0));{const t=ni(YC);return H.from(t.forwards(e,0,XC(e),o)).map((e=>KC(e.container,0)))}})(t,0,t).each((n=>{const r=n.container;eS(r,o.start.length,t).each((o=>{const n=e.createRng();n.setStart(r,0),n.setEnd(o.container,o.offset),FT(e,n,(e=>e===t))}));const a=bo(r),s=pr(a);/^\s[^\s]/.test(s)&&((e, t)=>{gr.set(e,t)})(a,s.slice(1))}))},qT=(e, t)=>e.create("span",{"data-mce-type":"bookmark",id:t}),WT=(e, t)=>{const o=e.createRng();return o.setStartAfter(t.start),o.setEndBefore(t.end),o},$T=(e, t, o)=>{const n=HT(e.getRoot(),o).getOrDie("Unable to resolve path range"),r=n.startContainer,a=n.endContainer,s=0===n.endOffset?a:a.splitText(n.endOffset),i=0===n.startOffset?r:r.splitText(n.startOffset),l=i.parentNode;return{prefix:t,end:s.parentNode.insertBefore(qT(e,t+"-end"),s),start:l.insertBefore(qT(e,t+"-start"),i)}},GT=(e, t, o)=>{PT(e,e.get(t.prefix+"-end"),o),PT(e,e.get(t.prefix+"-start"),o)},KT= e=>0===e.start.length,YT=(e, t, o, n)=>{const r=t.start;var a;return tS(e,n.container,n.offset,(a=r,(e, t)=>{const o=e.data.substring(0,t),n=o.lastIndexOf(a.charAt(a.length-1)),r=o.lastIndexOf(a);return-1!==r?r+a.length:-1!==n?n+1:-1}),o).bind((n=>{var a,s;const i=null!==(s=null===(a=o.textContent)||void 0===a?void 0:a.indexOf(r))&&void 0!==s?s:-1;if(-1!==i&&n.offset>=i+r.length){const t=e.createRng();return t.setStart(n.container,n.offset-r.length),t.setEnd(n.container,n.offset),H.some(t)}{const a=n.offset-r.length;return QC(n.container,a,o).map((t=>{const o=e.createRng();return o.setStart(t.container,t.offset),o.setEnd(n.container,n.offset),o})).filter((e=>e.toString()===r)).orThunk((()=>YT(e,t,o,KC(n.container,0))))}}))},XT=(e, t, o, n)=>{const r=e.dom,a=r.getRoot(),s=o.pattern,i=o.position.container,l=o.position.offset;return QC(i,l-o.pattern.end.length,t).bind((c=>{const d=LT(r,a,c.container,c.offset,i,l,n);if(KT(s))return H.some({matches:[{pattern:s,startRng:d,endRng:d}],position:c});{const i=JT(e,o.remainingPatterns,c.container,c.offset,t,n),l=i.getOr({matches:[],position:c}),u=l.position,m=((e, t, o, n, r, a=!1)=>{if(0===t.start.length&&!a){const t=e.createRng();return t.setStart(o,n),t.setEnd(o,n),H.some(t)}return JC(o,n,r).bind((o=>YT(e,t,r,o).bind((e=>{var t;if(a){if(e.endContainer===o.container&&e.endOffset===o.offset)return H.none();if(0===o.offset&&(null===(t=e.endContainer.textContent)||void 0===t?void 0:t.length)===e.endOffset)return H.none()}return H.some(e)}))))})(r,s,u.container,u.offset,t,i.isNone());return m.map((e=>{const t=((e, t, o, n=!1)=>LT(e,t,o.startContainer,o.startOffset,o.endContainer,o.endOffset,n))(r,a,e,n);return{matches:l.matches.concat([{pattern:s,startRng:t,endRng:d}]),position:KC(e.startContainer,e.startOffset)}}))}}))},JT=(e, t, o, n, r, a)=>{const s=e.dom;return JC(o,n,s.getRoot()).bind((i=>{const l=ZT(s,r,o,n);for(let s=0; s<t.length; s++){const c=t[s];if(!Ue(l,c.end))continue;const d=t.slice();d.splice(s,1);const u=XT(e,r,{pattern:c,remainingPatterns:d,position:i},a);if(u.isNone()&&n>0)return JT(e,t,o,n-1,r,a);if(u.isSome())return u}return H.none()}))},QT=(e, t, o)=>{e.selection.setRng(o),"inline-format"===t.type?W(t.format,(t=>{e.formatter.apply(t)})):e.execCommand(t.cmd,!1,t.value)},eE=(e, t, o, n, r, a)=>{var s;return((e, t)=>{const o=ne(e,(e=>U(t,(t=>e.pattern.start===t.pattern.start&&e.pattern.end===t.pattern.end))));return e.length===t.length?o?e:t:e.length>t.length?e:t})(JT(e,r.inlinePatterns,o,n,t,a).fold((()=>[]),(e=>e.matches)),JT(e,(s=r.inlinePatterns,ie(s,((e, t)=>t.end.length-e.end.length))),o,n,t,a).fold((()=>[]),(e=>e.matches)))},tE=(e, t)=>{if(0===t.length)return;const o=e.dom,n=e.selection.getBookmark(),r=((e, t)=>{const o=Js("mce_textpattern"),n=Y(t,((t, n)=>{const r=$T(e,o+`_end${t.length}`,n.endRng);return t.concat([{...n,endMarker:r}])}),[]);return Y(n,((t, r)=>{const a=n.length-t.length-1,s=KT(r.pattern)?r.endMarker:$T(e,o+`_start${a}`,r.startRng);return t.concat([{...r,startMarker:s}])}),[])})(o,t);W(r,(t=>{const n=o.getParent(t.startMarker.start,o.isBlock),r= e=>e===n;KT(t.pattern)?((e, t, o, n)=>{const r=WT(e.dom,o);FT(e.dom,r,n),QT(e,t,r)})(e,t.pattern,t.endMarker,r):((e, t, o, n, r)=>{const a=e.dom,s=WT(a,n),i=WT(a,o);FT(a,i,r),FT(a,s,r);const l={prefix:o.prefix,start:o.end,end:n.start},c=WT(a,l);QT(e,t,c)})(e,t.pattern,t.startMarker,t.endMarker,r),GT(o,t.endMarker,r),GT(o,t.startMarker,r)})),e.selection.moveToBookmark(n)},oE=(e, t)=>{const o=e.selection.getRng();return jT(e,o).map((n=>{var r;const a=Math.max(0,o.startOffset),s=VT(t,n,null!==(r=n.textContent)&&void 0!==r?r:""),i=eE(e,n,o.startContainer,a,s,!0),l=((e, t, o, n)=>{var r;const a=e.dom,s=Cl(e);if(!a.is(t,s))return[];const i=null!==(r=t.textContent)&&void 0!==r?r:"";return((e, t)=>{const o=(e=>ie(e,((e, t)=>t.start.length-e.start.length)))(e),n=t.replace(ur," ");return Q(o,(e=>0===t.indexOf(e.start)||0===n.indexOf(e.start)))})(o.blockPatterns,i).map((e=>Dt.trim(i).length===e.start.length?[]:[{pattern:e,range:LT(a,a.getRoot(),t,0,t,0,true)}])).getOr([])})(e,n,s);return(l.length>0||i.length>0)&&(e.undoManager.add(),e.undoManager.extra((()=>{e.execCommand("mceInsertNewLine")}),(()=>{e.insertContent(dr),tE(e,i),((e, t)=>{if(0===t.length)return;const o=e.selection.getBookmark();W(t,(t=>((e, t)=>{const o=e.dom,n=t.pattern,r=HT(o.getRoot(),t.range).getOrDie("Unable to resolve path range");return jT(e,r).each((t=>{"block-format"===n.type?((e, t)=>{const o=t.get(e);return f(o)&&ce(o).exists((e=>Ce(e,"block")))})(n.format,e.formatter)&&e.undoManager.transact((()=>{UT(e.dom,t,n),e.formatter.apply(n.format)})):"block-command"===n.type&&e.undoManager.transact((()=>{UT(e.dom,t,n),e.execCommand(n.cmd,!1,n.value)}))})),!0})(e,t))),e.selection.moveToBookmark(o)})(e,l);const t=e.selection.getRng(),o=JC(t.startContainer,t.startOffset,e.dom.getRoot());e.execCommand("mceInsertNewLine"),o.each((t=>{const o=t.container;o.data.charAt(t.offset-1)===dr&&(o.deleteData(t.offset-1,1),PT(e.dom,o.parentNode,(t=>t===e.dom.getRoot())))}))})),!0)})).getOr(!1)},nE=(e, t, o)=>{for(let n=0; n<e.length; n++)if(o(e[n],t))return!0;return!1},rE= e=>{const t=Dt.each,o=Wm.BACKSPACE,n=Wm.DELETE,r=e.dom,a=e.selection,s=e.parser,i=At.browser,l=i.isFirefox(),c=i.isChromium()||i.isSafari(),d=At.deviceType.isiPhone()||At.deviceType.isiPad(),u=At.os.isMacOS()||At.os.isiOS(),m=(t, o)=>{try{e.getDoc().execCommand(t,!1,String(o))}catch(e){}},g= e=>e.isDefaultPrevented(),p=()=>{e.shortcuts.add("meta+a",null,"SelectAll")},h=()=>{e.inline||r.bind(e.getDoc(),"mousedown mouseup",(t=>{let o;if(t.target===e.getDoc().documentElement)if(o=a.getRng(),e.getBody().focus(),"mousedown"===t.type){if(Pr(o.startContainer))return;a.placeCaretAt(t.clientX,t.clientY)}else a.setRng(o)}))},f=()=>{Range.prototype.getClientRects||e.on("mousedown",(t=>{if(!g(t)&&"HTML"===t.target.nodeName){const t=e.getBody();t.blur(),np.setEditorTimeout(e,(()=>{t.focus()}))}}))},y=()=>{const t=zc(e);e.on("click",(o=>{const n=o.target;/^(IMG|HR)$/.test(n.nodeName)&&r.isEditable(n.parentNode)&&(o.preventDefault(),e.selection.select(n),e.nodeChanged()),"A"===n.nodeName&&r.hasClass(n,t)&&0===n.childNodes.length&&r.isEditable(n.parentNode)&&(o.preventDefault(),a.select(n))}))},b=()=>{e.on("keydown",(e=>{if(!g(e)&&e.keyCode===o&&a.isCollapsed()&&0===a.getRng().startOffset){const t=a.getNode().previousSibling;if(t&&t.nodeName&&"table"===t.nodeName.toLowerCase())return e.preventDefault(),!1}return!0}))},v=()=>{vc(e)||e.on("BeforeExecCommand mousedown",(()=>{m("StyleWithCSS",!1),m("enableInlineTableEditing",!1),Xl(e)||m("enableObjectResizing",!1)}))},k=()=>{e.contentStyles.push("img:-moz-broken {-moz-force-broken-image-icon:1;min-width:24px;min-height:24px}")},w=()=>{e.inline||e.on("keydown",(()=>{document.activeElement===document.body&&e.getWin().focus()}))},_=()=>{e.inline||(e.contentStyles.push("body {min-height: 150px}"),e.on("click",(t=>{let o;"HTML"===t.target.nodeName&&(o=e.selection.getRng(),e.getBody().focus(),e.selection.setRng(o),e.selection.normalize(),e.nodeChanged())})))},x=()=>{u&&e.on("keydown",(t=>{!Wm.metaKeyPressed(t)||t.shiftKey||37!==t.keyCode&&39!==t.keyCode||(t.preventDefault(),e.selection.getSel().modify("move",37===t.keyCode?"backward":"forward","lineboundary"))}))},C=()=>{e.on("click",(e=>{let t=e.target;do{if("A"===t.tagName)return void e.preventDefault()}while(t=t.parentNode)})),e.contentStyles.push(".mce-content-body {-webkit-touch-callout: none}")},z=()=>{e.on("init",(()=>{e.dom.bind(e.getBody(),"submit",(e=>{e.preventDefault()}))}))},O=S;return kk(e)?(c&&(h(),y(),z(),p(),d&&(w(),_(),C())),l&&(f(),v(),k(),x())):(e.on("keydown",(t=>{if(g(t)||t.keyCode!==Wm.BACKSPACE)return;let o=a.getRng();const n=o.startContainer,s=o.startOffset,i=r.getRoot();let l=n;if(o.collapsed&&0===s){for(; l.parentNode&&l.parentNode.firstChild===l&&l.parentNode!==i;)l=l.parentNode;"BLOCKQUOTE"===l.nodeName&&(e.formatter.toggle("blockquote",void 0,l),o=r.createRng(),o.setStart(n,0),o.setEnd(n,0),a.setRng(o))}})),(()=>{const t= e=>{const t=r.create("body"),o=e.cloneContents();return t.appendChild(o),a.serializer.serialize(t,{format:"html"})};e.on("keydown",(a=>{const s=a.keyCode;if(!g(a)&&(s===n||s===o)&&e.selection.isEditable()){const o=e.selection.isCollapsed(),n=e.getBody();if(o&&!r.isEmpty(n))return;if(!o&&!(o=>{const n=t(o),a=r.createRng();return a.selectNode(e.getBody()),n===t(a)})(e.selection.getRng()))return;a.preventDefault(),e.setContent(""),n.firstChild&&r.isBlock(n.firstChild)?e.selection.setCursorLocation(n.firstChild,0):e.selection.setCursorLocation(n,0),e.nodeChanged()}}))})(),At.windowsPhone||e.on("keyup focusin mouseup",(t=>{Wm.modifierPressed(t)||(e=>{const t=e.getBody(),o=e.selection.getRng();return o.startContainer===o.endContainer&&o.startContainer===t&&0===o.startOffset&&o.endOffset===t.childNodes.length})(e)||a.normalize()}),!0),c&&(h(),y(),e.on("init",(()=>{m("DefaultParagraphSeparator",Cl(e))})),z(),b(),s.addNodeFilter("br",(e=>{let t=e.length;for(; t--;)"Apple-interchange-newline"===e[t].attr("class")&&e[t].remove()})),d?(w(),_(),C()):p()),l&&(e.on("keydown",(t=>{if(!g(t)&&t.keyCode===o){if(!e.getBody().getElementsByTagName("hr").length)return;if(a.isCollapsed()&&0===a.getRng().startOffset){const e=a.getNode(),o=e.previousSibling;if("HR"===e.nodeName)return r.remove(e),void t.preventDefault();o&&o.nodeName&&"hr"===o.nodeName.toLowerCase()&&(r.remove(o),t.preventDefault())}}})),f(),(()=>{const o=()=>{const o=r.getAttribs(a.getStart().cloneNode(!1));return()=>{const n=a.getStart();n!==e.getBody()&&(r.setAttrib(n,"style",null),t(o,(e=>{n.setAttributeNode(e.cloneNode(!0))})))}},n=()=>!a.isCollapsed()&&r.getParent(a.getStart(),r.isBlock)!==r.getParent(a.getEnd(),r.isBlock);e.on("keypress",(t=>{let r;return!(!(g(t)||8!==t.keyCode&&46!==t.keyCode)&&n()&&(r=o(),e.getDoc().execCommand("delete",!1),r(),t.preventDefault(),1))})),r.bind(e.getDoc(),"cut",(t=>{if(!g(t)&&n()){const t=o();np.setEditorTimeout(e,(()=>{t()}))}}))})(),v(),e.on("SetContent ExecCommand",(e=>{"setcontent"!==e.type&&"mceInsertLink"!==e.command||t(r.select("a:not([data-mce-block])"),(e=>{var t;let o=e.parentNode;const n=r.getRoot();if((null==o?void 0:o.lastChild)===e){for(; o&&!r.isBlock(o);){if((null===(t=o.parentNode)||void 0===t?void 0:t.lastChild)!==o||o===n)return;o=o.parentNode}r.add(o,"br",{"data-mce-bogus":1})}}))})),k(),x(),b())),{refreshContentEditable:O,isHidden:()=>{if(!l||e.removed)return!1;const t=e.selection.getSel();return!t||!t.rangeCount||0===t.rangeCount}}},aE=Os.DOM,sE= e=>e.inline?e.getElement().nodeName.toLowerCase():void 0,iE= e=>ke(e,(e=>!1===v(e))),lE= e=>{const t=e.options.get,o=e.editorUpload.blobCache;return iE({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:sE(e),sanitize:t("xss_sanitization"),validate:!0,blob_cache:o,document:e.getDoc()})},cE= e=>{const t=e.options.get;return iE({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"),padd_empty_block_inline_children:t("format_empty_lines")})},dE= e=>e.inline?e.ui.styleSheetLoader:e.dom.styleSheetLoader,uE= e=>{const t=dE(e),o=Gl(e),n=e.contentCSS,r=()=>{t.unloadAll(n),e.inline||e.ui.styleSheetLoader.unloadAll(o)},a=()=>{e.removed?r():e.on("remove",r)};if(e.contentStyles.length>0){let t="";Dt.each(e.contentStyles,(e=>{t+=e+"\r\n"})),e.dom.addStyle(t)}const s=Promise.all(((e, t, o)=>{const n=[dE(e).loadAll(t)];return e.inline?n:n.concat([e.ui.styleSheetLoader.loadAll(o)])})(e,n,o)).then(a).catch(a),i=$l(e);return i&&((e, t)=>{const o=bo(e.getBody()),n=Uo(Zo(o)),r=fo("style");Xt(r,"type","text/css"),fn(r,yo(t)),fn(n,r),e.on("remove",(()=>{kn(r)}))})(e,i),s},mE= e=>{!0!==e.removed&&((e=>{kk(e)||e.load({initial:!0,format:"html"}),e.startContent=e.getContent({format:"raw"})})(e),(e=>{e.bindPendingEventDelegates(),e.initialized=!0,(e=>{e.dispatch("Init")})(e),e.focus(!0),(e=>{const t=e.dom.getRoot();e.inline||$u(e)&&e.selection.getStart(!0)!==t||uu(t).each((t=>{const o=t.getNode(),n=$n(o)?uu(o).getOr(t):t;e.selection.setRng(n.toRange())}))})(e),e.nodeChanged({initial:!0});const t=Ec(e);_(t)&&t.call(e,e),(e=>{const t=Mc(e);t&&np.setEditorTimeout(e,(()=>{let o;o=!0===t?e:e.editorManager.get(t),o&&!o.destroyed&&(o.focus(),o.selection.scrollIntoView())}),100)})(e)})(e))},gE= e=>{const t=e.getElement();let o=e.getDoc();e.inline&&(aE.addClass(t,"mce-content-body"),e.contentDocument=o=document,e.contentWindow=window,e.bodyElement=t,e.contentAreaContainer=t);const n=e.getBody();n.disabled=!0,e.readonly=vc(e),e.readonly||(e.inline&&"static"===aE.getStyle(n,"position",!0)&&(n.style.position="relative"),n.contentEditable="true"),n.disabled=!1,e.editorUpload=fw(e),e.schema=is(cE(e)),e.dom=Os(o,{keep_values:!0,url_converter:e.convertURL,url_converter_scope:e,update_styles:!0,root_element:e.inline?e.getBody():null,collect:e.inline,schema:e.schema,contentCssCors:Fl(e),referrerPolicy:jl(e),onSetAttrib: t=>{e.dispatch("SetAttrib",t)}}),e.parser=(e=>{const t=jv(lE(e),e.schema);return t.addAttributeFilter("src,href,style,tabindex",((t, o)=>{const n=e.dom,r="data-mce-"+o;let a=t.length;for(; a--;){const s=t[a];let i=s.attr(o);if(i&&!s.attr(r)){if(0===i.indexOf("data:")||0===i.indexOf("blob:"))continue;"style"===o?(i=n.serializeStyle(n.parseStyle(i),s.name),i.length||(i=null),s.attr(r,i),s.attr(o,i)):"tabindex"===o?(s.attr(r,i),s.attr(o,null)):s.attr(r,e.convertURL(i,o,s.name))}}})),t.addNodeFilter("script",(e=>{let t=e.length;for(; t--;){const o=e[t],n=o.attr("type")||"no/type";0!==n.indexOf("mce-")&&o.attr("type","mce-"+n)}})),Yc(e)&&t.addNodeFilter("#cdata",(t=>{var o;let n=t.length;for(; n--;){const r=t[n];r.type=8,r.name="#comment",r.value="[CDATA["+e.dom.encode(null!==(o=r.value)&&void 0!==o?o:"")+"]]"}})),t.addNodeFilter("p,h1,h2,h3,h4,h5,h6,div",(t=>{let o=t.length;const n=e.schema.getNonEmptyElements();for(; o--;){const e=t[o];e.isEmpty(n)&&0===e.getAll("br").length&&e.append(new Ep("br",1))}})),t})(e),e.serializer=Mk((e=>{const t=e.options.get;return{...lE(e),...cE(e),...iE({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")})}})(e),e),e.selection=Tk(e.dom,e.getWin(),e.serializer,e),e.annotator=Im(e),e.formatter=Ow(e),e.undoManager=Ew(e),e._nodeChangeDispatcher=new pO(e),e._selectionOverrides=RT(e),(e=>{const t=Is(),o=As(!1),n=Ps((t=>{e.dispatch("longpress",{...t,type:"longpress"}),o.set(!0)}),400);e.on("touchstart",(e=>{Qx(e).each((r=>{n.cancel();const a={x:r.clientX,y:r.clientY,target:e.target};n.throttle(e),o.set(!1),t.set(a)}))}),!0),e.on("touchmove",(r=>{n.cancel(),Qx(r).each((n=>{t.on((r=>{((e, t)=>{const o=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y);return o>5||n>5})(n,r)&&(t.clear(),o.set(!1),e.dispatch("longpresscancel"))}))}))}),!0),e.on("touchend touchcancel",(r=>{n.cancel(),"touchcancel"!==r.type&&t.get().filter((e=>e.target.isEqualNode(r.target))).each((()=>{o.get()?r.preventDefault():e.dispatch("tap",{...r,type:"tap"})}))}),!0)})(e),(e=>{(e=>{e.on("click",(t=>{e.dom.getParent(t.target,"details")&&t.preventDefault()}))})(e),(e=>{e.parser.addNodeFilter("details",(e=>{W(e,(e=>{e.attr("data-mce-open",e.attr("open")),e.attr("open","open")}))})),e.serializer.addNodeFilter("details",(e=>{W(e,(e=>{const t=e.attr("data-mce-open");e.attr("open",g(t)?t:null),e.attr("data-mce-open",null)}))}))})(e)})(e),(e=>{const t="contenteditable",o=" "+Dt.trim(Gc(e))+" ",n=" "+Dt.trim($c(e))+" ",r=sC(o),a=sC(n),s=Kc(e);s.length>0&&e.on("BeforeSetContent",(t=>{((e, t, o)=>{let n=t.length,r=o.content;if("raw"!==o.format){for(; n--;)r=r.replace(t[n],iC(e,r,$c(e)));o.content=r}})(e,s,t)})),e.parser.addAttributeFilter("class",(e=>{let o=e.length;for(; o--;){const n=e[o];r(n)?n.attr(t,"true"):a(n)&&n.attr(t,"false")}})),e.serializer.addAttributeFilter(t,(e=>{let o=e.length;for(; o--;){const n=e[o];(r(n)||a(n))&&(s.length>0&&n.attr("data-mce-content")?(n.name="#text",n.type=3,n.raw=!0,n.value=n.attr("data-mce-content")):n.attr(t,null))}}))})(e),kk(e)||((e=>{e.on("mousedown",(t=>{t.detail>=3&&(t.preventDefault(),nT(e))}))})(e),(e=>{(e=>{const t=[",",".",";",":","!","?"],o=[32],n=()=>{return t=qc(e),o=Wc(e),{inlinePatterns:ll(t),blockPatterns:il(t),dynamicPatternsLookup:o};var t,o},r=()=>(e=>e.options.isSet("text_patterns_lookup"))(e);e.on("keydown",(t=>{if(13===t.keyCode&&!Wm.modifierPressed(t)&&e.selection.isCollapsed()){const o=n();(o.inlinePatterns.length>0||o.blockPatterns.length>0||r())&&oE(e,o)&&t.preventDefault()}}),!0);const a=()=>{if(e.selection.isCollapsed()){const t=n();(t.inlinePatterns.length>0||r())&&((e, t)=>{const o=e.selection.getRng();jT(e,o).map((n=>{const r=Math.max(0,o.startOffset-1),a=ZT(e.dom,n,o.startContainer,r),s=VT(t,n,a),i=eE(e,n,o.startContainer,r,s,!1);i.length>0&&e.undoManager.transact((()=>{tE(e,i)}))}))})(e,t)}};e.on("keyup",(e=>{nE(o,e,((e, t)=>e===t.keyCode&&!Wm.modifierPressed(t)))&&a()})),e.on("keypress",(o=>{nE(t,o,((e, t)=>e.charCodeAt(0)===t.charCode))&&np.setEditorTimeout(e,a)}))})(e)})(e));const r=gO(e);Jx(e,r),(e=>{e.on("NodeChange",M(rC,e))})(e),(e=>{var t;const o=e.dom,n=Cl(e),r=null!==(t=Ql(e))&&void 0!==t?t:"",a=(t, s)=>{if((e=>{if(Nw(e)){const t=e.keyCode;return!Rw(e)&&(Wm.metaKeyPressed(e)||e.altKey||t>=112&&t<=123||Z(Aw,t))}return!1})(t))return;const i=e.getBody(),l=!(e=>Nw(e)&&!(Rw(e)||"keyup"===e.type&&229===e.keyCode))(t)&&((e, t, o)=>{if(ma(bo(t),!1)){const n=t.firstElementChild;return!n||!e.getStyle(t.firstElementChild,"padding-left")&&!e.getStyle(t.firstElementChild,"padding-right")&&o===n.nodeName.toLowerCase()}return!1})(o,i,n);(""!==o.getAttrib(i,Mw)!==l||s)&&(o.setAttrib(i,Mw,l?r:null),o.setAttrib(i,"aria-placeholder",l?r:null),((e, t)=>{e.dispatch("PlaceholderToggle",{state:t})})(e,l),e.on(l?"keydown":"keyup",a),e.off(l?"keyup":"keydown",a))};Ke(r)&&e.on("init",(t=>{a(t,!0),e.on("change SetContent ExecCommand",a),e.on("paste",(t=>np.setEditorTimeout(e,(()=>a(t)))))}))})(e),YO(e);const a=(e=>{const t=e;return(e=>xe(e.plugins,"rtc").bind((e=>H.from(e.setup))))(e).fold((()=>(t.rtcInstance=vk(e),H.none())),(e=>(t.rtcInstance=(()=>{const e=T(null),t=T("");return{init:{bindEvents:S},undoManager:{beforeChange:S,add:e,undo:e,redo:e,clear:S,reset:S,hasUndo:L,hasRedo:L,transact:e,ignore:S,extra:S},formatter:{match:L,matchAll:T([]),matchNode:T(void 0),canApply:L,closest:t,apply:S,remove:S,toggle:S,formatChanged:T({unbind:S})},editor:{getContent:t,setContent:T({content:"",html:""}),insertContent:T(""),addVisual:S},selection:{getContent:t},autocompleter:{addDecoration:S,removeDecoration:S},raw:{getModel:T(H.none())}}})(),H.some((()=>e().then((e=>(t.rtcInstance=(e=>{const t= e=>p(e)?e:{},{init:o,undoManager:n,formatter:r,editor:a,selection:s,autocompleter:i,raw:l}=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, r)=>n.extra(o,r)},formatter:{match:(e, o, n, a)=>r.match(e,t(o),a),matchAll:r.matchAll,matchNode:r.matchNode,canApply: e=>r.canApply(e),closest: e=>r.closest(e),apply:(e, o, n)=>r.apply(e,t(o)),remove:(e, o, n, a)=>r.remove(e,t(o)),toggle:(e, o, n)=>r.toggle(e,t(o)),formatChanged:(e, t, o, n, a)=>r.formatChanged(t,o,n,a)},editor:{getContent: e=>a.getContent(e),setContent:(e, t)=>({content:a.setContent(e,t),html:""}),insertContent:(e, t)=>(a.insertContent(e),""),addVisual:a.addVisual},selection:{getContent:(e, t)=>s.getContent(t)},autocompleter:{addDecoration:i.addDecoration,removeDecoration:i.removeDecoration},raw:{getModel:()=>H.some(l.getRawModel())}}})(e),e.rtc.isRemote))))))))})(e);(e=>{const t=e.getDoc(),o=e.getBody();(e=>{e.dispatch("PreInit")})(e),Nc(e)||(t.body.spellcheck=!1,aE.setAttrib(o,"spellcheck","false")),e.quirks=rE(e),(e=>{e.dispatch("PostRender")})(e);const n=Kl(e);void 0!==n&&(o.dir=n);const r=Rc(e);r&&e.on("BeforeSetContent",(e=>{Dt.each(r,(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="compositionstart"===t.type}))})(e),a.fold((()=>{uE(e).then((()=>mE(e)))}),(t=>{e.setProgressState(!0),uE(e).then((()=>{t().then((t=>{e.setProgressState(!1),mE(e),xk(e)}),(t=>{e.notificationManager.open({type:"error",text:String(t)}),mE(e),xk(e)}))}))}))},pE=I,hE=Os.DOM,fE=Os.DOM,yE=(e, t)=>({editorContainer:e,iframeContainer:t,api:{}}),bE= e=>{const t=e.getElement();return e.inline?yE(null):(e=>{const t=fE.create("div");return fE.insertAfter(t,e),yE(t,t)})(t)},vE=async e=>{e.dispatch("ScriptsLoaded"),(e=>{const t=Dt.trim(Dl(e)),o=e.ui.registry.getAll().icons,n={...Wk.get("default").icons,...Wk.get(t).icons};he(n,((t, n)=>{Ce(o,n)||e.ui.registry.addIcon(n,t)}))})(e),(e=>{const t=oc(e);if(g(t)){const o=ow.get(t);e.theme=o(e,ow.urls[t])||{},_(e.theme.init)&&e.theme.init(e,ow.urls[t]||e.documentBaseUrl.replace(/\/$/,""))}else e.theme={}})(e),(e=>{const t=rc(e),o=$k.get(t);e.model=o(e,$k.urls[t])})(e),(e=>{const t=[];W(wc(e),(o=>{((e, t, o)=>{const n=tw.get(o),r=tw.urls[o]||e.documentBaseUrl.replace(/\/$/,"");if(o=Dt.trim(o),n&&-1===Dt.inArray(t,o)){if(e.plugins[o])return;try{const a=n(e,r)||{};e.plugins[o]=a,_(a.init)&&(a.init(e,r),t.push(o))}catch(t){((e, t, o)=>{const n=Ds.translate(["Failed to initialize plugin: {0}",t]);Fm(e,"PluginLoadError",{message:n}),lw(n,o),aw(e,n)})(e,o,t)}}})(e,t,(e=>e.replace(/^\-/,""))(o))}))})(e);const t=await(e=>{const t=e.getElement();return e.orgDisplay=t.style.display,g(oc(e))?(e=>{const t=e.theme.renderUI;return t?t():bE(e)})(e):_(oc(e))?(e=>{const t=e.getElement(),o=oc(e)(e,t);return o.editorContainer.nodeType&&(o.editorContainer.id=o.editorContainer.id||e.id+"_parent"),o.iframeContainer&&o.iframeContainer.nodeType&&(o.iframeContainer.id=o.iframeContainer.id||e.id+"_iframecontainer"),o.height=o.iframeHeight?o.iframeHeight:t.offsetHeight,o})(e):bE(e)})(e);((e, t)=>{const o={show:H.from(t.show).getOr(S),hide:H.from(t.hide).getOr(S),isEnabled:H.from(t.isEnabled).getOr(I),setEnabled: o=>{e.mode.isReadOnly()||H.from(t.setEnabled).each((e=>e(o)))}};e.ui={...e.ui,...o}})(e,H.from(t.api).getOr({})),e.editorContainer=t.editorContainer,(e=>{e.contentCSS=e.contentCSS.concat((e=>cw(e,Wl(e)))(e),(e=>cw(e,Gl(e)))(e))})(e),e.inline?gE(e):((e, t)=>{((e, t)=>{const o=e.translate("Rich Text Area"),n=eo(bo(e.getElement()),"tabindex").bind(Xe),r=((e, t, o, n)=>{const r=fo("iframe");return n.each((e=>Xt(r,"tabindex",e))),Jt(r,o),Jt(r,{id:e+"_ifr",frameBorder:"0",allowTransparency:"true",title:t}),co(r,"tox-edit-area__iframe"),r})(e.id,o,yl(e),n).dom;r.onload=()=>{r.onload=null,e.dispatch("load")},e.contentAreaContainer=t.iframeContainer,e.iframeElement=r,e.iframeHTML=(e=>{let t=bl(e)+"<html><head>";vl(e)!==e.documentBaseUrl&&(t+='<base href="'+e.documentBaseURI.getURI()+'" />'),t+='<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';const o=kl(e),n=wl(e),r=e.translate(Oc(e));return _l(e)&&(t+='<meta http-equiv="Content-Security-Policy" content="'+_l(e)+'" />'),t+=`</head><body id="${o}" class="mce-content-body ${n}" data-id="${e.id}" aria-label="${r}"><br></body></html>`,t})(e),hE.add(t.iframeContainer,r)})(e,t),t.editorContainer&&(t.editorContainer.style.display=e.orgDisplay,e.hidden=hE.isHidden(t.editorContainer)),e.getElement().style.display="none",hE.setAttrib(e.id,"aria-hidden","true"),e.getElement().style.visibility=e.orgVisibility,(e=>{const t=e.iframeElement,o=(n=bo(t),Sn(n,"load",pE,(()=>{o.unbind(),e.contentDocument=t.contentDocument,gE(e)})));var n;if(At.browser.isFirefox()){const t=e.getDoc();t.open(),t.write(e.iframeHTML),t.close()}else t.srcdoc=e.iframeHTML})(e)})(e,{editorContainer:t.editorContainer,iframeContainer:t.iframeContainer})},kE=Os.DOM,wE= e=>"-"===e.charAt(0),_E=(e, t, o)=>H.from(t).filter((e=>Ke(e)&&!Wk.has(e))).map((t=>({url:`${e.editorManager.baseURL}/icons/${t}/icons${o}.js`,name:H.some(t)}))),xE=(e, t)=>{const o=Es.ScriptLoader,n=()=>{!e.removed&&(e=>{const t=oc(e);return!g(t)||w(ow.get(t))})(e)&&(e=>{const t=rc(e);return w($k.get(t))})(e)&&vE(e)};((e, t)=>{const o=oc(e);if(g(o)&&!wE(o)&&!Ce(ow.urls,o)){const n=nc(e),r=n?e.documentBaseURI.toAbsolute(n):`themes/${o}/theme${t}.js`;ow.load(o,r).catch((()=>{((e, t, o)=>{sw(e,"ThemeLoadError",iw("theme",t,o))})(e,r,o)}))}})(e,t),((e, t)=>{const o=rc(e);if("plugin"!==o&&!Ce($k.urls,o)){const n=ac(e),r=g(n)?e.documentBaseURI.toAbsolute(n):`models/${o}/model${t}.js`;$k.load(o,r).catch((()=>{((e, t, o)=>{sw(e,"ModelLoadError",iw("model",t,o))})(e,r,o)}))}})(e,t),((e, t)=>{const o=Vl(t),n=Zl(t);if(!Ds.hasCode(o)&&"en"!==o){const r=Ke(n)?n:`${t.editorManager.baseURL}/langs/${o}.js`;e.add(r).catch((()=>{((e, t, o)=>{sw(e,"LanguageLoadError",iw("language",t,o))})(t,r,o)}))}})(o,e),((e, t, o)=>{const n=_E(t,"default",o),r=(e=>H.from(Bl(e)).filter(Ke).map((e=>({url:e,name:H.none()}))))(t).orThunk((()=>_E(t,Dl(t),"")));W((e=>{const t=[],o= e=>{t.push(e)};for(let t=0; t<e.length; t++)e[t].each(o);return t})([n,r]),(o=>{e.add(o.url).catch((()=>{((e, t, o)=>{sw(e,"IconsLoadError",iw("icons",t,o))})(t,o.url,o.name.getOrUndefined())}))}))})(o,e,t),((e, t)=>{const o=(t, o)=>{tw.load(t,o).catch((()=>{((e, t, o)=>{sw(e,"PluginLoadError",iw("plugin",t,o))})(e,o,t)}))};he(_c(e),((t, n)=>{o(n,t),e.options.set("plugins",wc(e).concat(n))})),W(wc(e),(e=>{!(e=Dt.trim(e))||tw.urls[e]||wE(e)||o(e,`plugins/${e}/plugin${t}.js`)}))})(e,t),o.loadQueue().then(n,n)},CE=xt().deviceType,SE=CE.isPhone(),zE=CE.isTablet(),OE= e=>{if(k(e))return[];{const t=f(e)?e:e.split(/[ ,]/),o=q(t,We);return K(o,Ke)}},TE=(e, t)=>{const o=((t, o)=>{const n={},r={};return ve(t,((t, o)=>Z(e,o)),be(n),be(r)),{t:n,f:r}})(t);return n=o.t,r=o.f,{sections:T(n),options:T(r)};var n,r},EE=(e, t)=>Ce(e.sections(),t),AE=(e, t)=>({table_grid:!1,object_resizing:!1,resize:!1,toolbar_mode:xe(e,"toolbar_mode").getOr("scrolling"),toolbar_sticky:!1,...t?{menubar:!1}:{}}),ME=(e, t)=>{var o;const n=null!==(o=t.external_plugins)&&void 0!==o?o:{};return e&&e.external_plugins?Dt.extend({},e.external_plugins,n):n},NE=(e, t, o, n, r)=>{var a;const s=e?{mobile:AE(null!==(a=r.mobile)&&void 0!==a?a:{},t)}:{},i=TE(["mobile"],bS(s,r)),l=Dt.extend(o,n,i.options(),((e, t)=>e&&EE(t,"mobile"))(e,i)?((e, t, o={})=>{const n=e.sections(),r=xe(n,t).getOr({});return Dt.extend({},o,r)})(i,"mobile"):{},{external_plugins:ME(n,i.options())});return((e, t, o, n)=>{const r=OE(o.forced_plugins),a=OE(n.plugins),s=((e, t)=>EE(e,t)?e.sections()[t]:{})(t,"mobile"),i=((e, t, o, n)=>e&&EE(t,"mobile")?n:o)(e,t,a,s.plugins?OE(s.plugins):a),l=((e, t)=>[...OE(e),...OE(t)])(r,i);return Dt.extend(n,{forced_plugins:r,plugins:l})})(e,i,n,l)},RE= e=>{(e=>{const t= t=>()=>{W("left,center,right,justify".split(","),(o=>{t!==o&&e.formatter.remove("align"+o)})),"none"!==t&&((t, o)=>{e.formatter.toggle(t,void 0),e.nodeChanged()})("align"+t)};e.editorCommands.addCommands({JustifyLeft:t("left"),JustifyCenter:t("center"),JustifyRight:t("right"),JustifyFull:t("justify"),JustifyNone:t("none")})})(e),(e=>{const t= t=>()=>{const o=e.selection,n=o.isCollapsed()?[e.dom.getParent(o.getNode(),e.dom.isBlock)]:o.getSelectedBlocks();return U(n,(o=>w(e.formatter.matchNode(o,t))))};e.editorCommands.addCommands({JustifyLeft:t("alignleft"),JustifyCenter:t("aligncenter"),JustifyRight:t("alignright"),JustifyFull:t("alignjustify")},"state")})(e)},DE=(e, t)=>{const o=e.selection,n=e.dom;return/^ | $/.test(t)?((e, t, o)=>{const n=bo(e.getRoot());return o=Oh(n,Ni.fromRangeStart(t))?o.replace(/^ /,"&nbsp;"):o.replace(/^&nbsp;/," "),Th(n,Ni.fromRangeEnd(t))?o.replace(/(&nbsp;| )(<br( \/)>)?$/,"&nbsp;"):o.replace(/&nbsp;(<br( \/)?>)?$/," ")})(n,o.getRng(),t):t},BE=(e, t)=>{if(e.selection.isEditable()){const{content:o,details:n}=(e=>{if("string"!=typeof e){const t=Dt.extend({paste:e.paste,data:{paste:e.paste}},e);return{content:e.content,details:t}}return{content:e,details:{}}})(t);qv(e,{...n,content:DE(e,o),format:"html",set:!1,selection:!0}).each((t=>{const o=((e, t, o)=>wk(e).editor.insertContent(t,o))(e,t.content,n);Wv(e,o,t),e.addVisual()}))}},LE={"font-size":"size","font-family":"face"},IE=Kt("font"),HE= e=>(t, o)=>H.from(o).map(bo).filter(qt).bind((o=>((e, t, o)=>ay(bo(o),(t=>(t=>dn(t,e).orThunk((()=>IE(t)?xe(LE,e).bind((e=>eo(t,e))):H.none())))(t)),(e=>xo(bo(t),e))))(e,t,o.dom).or(((e, t)=>H.from(Os.DOM.getStyle(t,e,!0)))(e,o.dom)))).getOr(""),PE=HE("font-size"),FE=z((e=>e.replace(/[\'\"\\]/g,"").replace(/,\s+/g,",")),HE("font-family")),jE= e=>uu(e.getBody()).bind((e=>{const t=e.container();return H.from(Yn(t)?t.parentNode:t)})),VE=(e, t)=>((e, t)=>(e=>H.from(e.selection.getRng()).bind((t=>{const o=e.getBody();return t.startContainer===o&&0===t.startOffset?H.none():H.from(e.selection.getStart(!0))})))(e).orThunk(M(jE,e)).map(bo).filter(qt).bind(t))(e,O(H.some,t)),ZE=(e, t)=>{if(/^[0-9.]+$/.test(t)){const o=parseInt(t,10);if(o>=1&&o<=7){const n=(e=>Dt.explode(e.options.get("font_size_style_values")))(e),r=(e=>Dt.explode(e.options.get("font_size_classes")))(e);return r.length>0?r[o-1]||t:n[o-1]||t}return t}return t},UE= e=>{const t=e.split(/\s*,\s*/);return q(t,(e=>-1===e.indexOf(" ")||Ze(e,'"')||Ze(e,"'")?e:`'${e}'`)).join(",")},qE= e=>{RE(e),(e=>{e.editorCommands.addCommands({"Cut,Copy,Paste": t=>{const o=e.getDoc();let n;try{o.execCommand(t)}catch(e){n=!0}if("paste"!==t||o.queryCommandEnabled(t)||(n=!0),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.");(At.os.isMacOS()||At.os.isiOS())&&(t=t.replace(/Ctrl\+/g,"⌘+")),e.notificationManager.open({text:t,type:"error"})}}})})(e),(e=>{e.editorCommands.addCommands({mceAddUndoLevel:()=>{e.undoManager.add()},mceEndUndoLevel:()=>{e.undoManager.add()},Undo:()=>{e.undoManager.undo()},Redo:()=>{e.undoManager.redo()}})})(e),(e=>{e.editorCommands.addCommands({mceSelectNodeDepth:(t, o, n)=>{let r=0;e.dom.getParent(e.selection.getNode(),(t=>!jn(t)||r++!==n||(e.selection.select(t),!1)),e.getBody())},mceSelectNode:(t, o, n)=>{e.selection.select(n)},selectAll:()=>{const t=e.dom.getParent(e.selection.getStart(),rr);if(t){const o=e.dom.createRng();o.selectNodeContents(t),e.selection.setRng(o)}}})})(e),(e=>{e.editorCommands.addCommands({mceCleanup:()=>{const t=e.selection.getBookmark();e.setContent(e.getContent()),e.selection.moveToBookmark(t)},insertImage:(t, o, n)=>{BE(e,e.dom.createHTML("img",{src:n}))},insertHorizontalRule:()=>{e.execCommand("mceInsertContent",!1,"<hr>")},insertText:(t, o, n)=>{BE(e,e.dom.encode(n))},insertHTML:(t, o, n)=>{BE(e,n)},mceInsertContent:(t, o, n)=>{BE(e,n)},mceSetContent:(t, o, n)=>{e.setContent(n)},mceReplaceContent:(t, o, n)=>{e.execCommand("mceInsertContent",!1,n.replace(/\{\$selection\}/g,e.selection.getContent({format:"text"})))},mceNewDocument:()=>{e.setContent("")}})})(e),(e=>{const t=(t, o, n)=>{const r=g(n)?{href:n}:n,a=e.dom.getParent(e.selection.getNode(),"a");p(r)&&g(r.href)&&(r.href=r.href.replace(/ /g,"%20"),a&&r.href||e.formatter.remove("link"),r.href&&e.formatter.apply("link",r,a))};e.editorCommands.addCommands({unlink:()=>{if(e.selection.isCollapsed()){const t=e.dom.getParent(e.selection.getStart(),"a");t&&e.dom.remove(t,!0)}else e.formatter.remove("link")},mceInsertLink:t,createLink:t})})(e),(e=>{e.editorCommands.addCommands({Indent:()=>{(e=>{Gx(e,"indent")})(e)},Outdent:()=>{Kx(e)}}),e.editorCommands.addCommands({Outdent:()=>qx(e)},"state")})(e),(e=>{e.editorCommands.addCommands({insertParagraph:()=>{tO(Dz,e)},mceInsertNewLine:(t, o, n)=>{oO(e,n)},InsertLineBreak:(t, o, n)=>{tO(Vz,e)}})})(e),(e=>{(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(t&&/^(H[1-6]|P|ADDRESS|PRE)$/.test(t.nodeName)){const n=e.selection.getBookmark();e.dom.split(t,o),e.selection.moveToBookmark(n)}}}})})(e),(e=>{e.editorCommands.addCommands({"InsertUnorderedList,InsertOrderedList": t=>{const o=e.dom.getParent(e.selection.getNode(),"ul,ol");return o&&("insertunorderedlist"===t&&"UL"===o.tagName||"insertorderedlist"===t&&"OL"===o.tagName)}},"state")})(e)})(e),(e=>{(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)=>{((e, t)=>{const o=ZE(e,t);e.formatter.toggle("fontname",{value:UE(o)}),e.nodeChanged()})(e,n)},FontSize:(t, o, n)=>{((e, t)=>{e.formatter.toggle("fontsize",{value:ZE(e,t)}),e.nodeChanged()})(e,n)},LineHeight:(t, o, n)=>{((e, t)=>{e.formatter.toggle("lineheight",{value:String(t)}),e.nodeChanged()})(e,n)},Lang:(e, o, n)=>{var r;t(e,{value:n.code,customValue:null!==(r=n.customCode)&&void 0!==r?r:null})},RemoveFormat: t=>{e.formatter.remove(t)},mceBlockQuote:()=>{t("blockquote")},FormatBlock:(e, o, n)=>{t(g(n)?n:"p")},mceToggleFormat:(e, o, n)=>{t(n)}})})(e),(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",(()=>(e=>VE(e,(t=>FE(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("FontSize",(()=>(e=>VE(e,(t=>PE(e.getBody(),t.dom))).getOr(""))(e))),e.editorCommands.addQueryValueHandler("LineHeight",(()=>(e=>VE(e,(t=>{const o=bo(e.getBody()),n=ay(t,(e=>dn(e,"line-height")),M(xo,o));return n.getOrThunk((()=>{const e=parseFloat(ln(t,"line-height")),o=parseFloat(ln(t,"font-size"));return String(e/o)}))})).getOr(""))(e)))})(e)})(e),(e=>{e.editorCommands.addCommands({mceRemoveNode:(t, o, n)=>{const r=null!=n?n:e.selection.getNode();if(r!==e.getBody()){const t=e.selection.getBookmark();e.dom.remove(r,!0),e.selection.moveToBookmark(t)}},mcePrint:()=>{e.getWin().print()},mceFocus:(t, o, n)=>{((e, t)=>{e.removed||(t?pp(e):(e=>{const t=e.selection,o=e.getBody();let n=t.getRng();e.quirks.refreshContentEditable(),w(e.bookmark)&&!gp(e)&&tp(e).each((t=>{e.selection.setRng(t),n=t}));const r=((e, t)=>e.dom.getParent(t,(t=>"true"===e.dom.getContentEditable(t))))(e,t.getNode());if(r&&e.dom.isChildOf(r,o))return mp(r),up(e,n),void pp(e);e.inline||(At.browser.isOpera()||mp(o),e.getWin().focus()),(At.browser.isFirefox()||e.inline)&&(mp(o),up(e,n)),pp(e)})(e))})(e,!0===n)},mceToggleVisualAid:()=>{e.hasVisual=!e.hasVisual,e.addVisual()}})})(e)},WE=["toggleview"],$E= e=>Z(WE,e.toLowerCase());class GE{constructor(e){this.commands={state:{},exec:{},value:{}},this.editor=e}execCommand(e, t=!1, o, n){const r=this.editor,a=e.toLowerCase(),s=null==n?void 0:n.skip_focus;if(r.removed)return!1;if("mcefocus"!==a&&(/^(mceAddUndoLevel|mceEndUndoLevel)$/i.test(a)||s?(e=>{tp(e).each((t=>e.selection.setRng(t)))})(r):r.focus()),r.dispatch("BeforeExecCommand",{command:e,ui:t,value:o}).isDefaultPrevented())return!1;const i=this.commands.exec[a];return!!_(i)&&(i(a,t,o),r.dispatch("ExecCommand",{command:e,ui:t,value:o}),!0)}queryCommandState(e){if(!$E(e)&&this.editor.quirks.isHidden()||this.editor.removed)return!1;const t=e.toLowerCase(),o=this.commands.state[t];return!!_(o)&&o(t)}queryCommandValue(e){if(!$E(e)&&this.editor.quirks.isHidden()||this.editor.removed)return"";const t=e.toLowerCase(),o=this.commands.value[t];return _(o)?o(t):""}addCommands(e, t="exec"){const o=this.commands;he(e,((e, n)=>{W(n.toLowerCase().split(","),(n=>{o[t][n]=e}))}))}addCommand(e, t, o){const n=e.toLowerCase();this.commands.exec[n]=(e, n, r)=>t.call(null!=o?o:this.editor,n,r)}queryCommandSupported(e){const t=e.toLowerCase();return!!this.commands.exec[t]}addQueryStateHandler(e, t, o){this.commands.state[e.toLowerCase()]=()=>t.call(null!=o?o:this.editor)}addQueryValueHandler(e, t, o){this.commands.value[e.toLowerCase()]=()=>t.call(null!=o?o:this.editor)}}const KE="data-mce-contenteditable",YE=(e, t, o)=>{try{e.getDoc().execCommand(t,!1,String(o))}catch(e){}},XE=(e, t)=>{e.dom.contentEditable=t?"true":"false"},JE=(e, t)=>{const o=bo(e.getBody());((e, t, o)=>{go(e,t)&&!o?mo(e,t):o&&co(e,t)})(o,"mce-content-readonly",t),t?(e.selection.controlSelection.hideResizeRect(),e._selectionOverrides.hideFakeCaret(),(e=>{H.from(e.selection.getNode()).each((e=>{e.removeAttribute("data-mce-selected")}))})(e),e.readonly=!0,XE(o,!1),W(Ln(o,'*[contenteditable="true"]'),(e=>{Xt(e,KE,"true"),XE(e,!1)}))):(e.readonly=!1,XE(o,!0),W(Ln(o,`*[${KE}="true"]`),(e=>{oo(e,KE),XE(e,!0)})),YE(e,"StyleWithCSS",!1),YE(e,"enableInlineTableEditing",!1),YE(e,"enableObjectResizing",!1),(e=>gp(e)||(e=>{const t=Zo(bo(e.getElement()));return $g(t).filter((t=>!sp(t.dom)&&ip(e,t.dom))).isSome()})(e))(e)&&e.focus(),(e=>{e.selection.setRng(e.selection.getRng())})(e),e.nodeChanged())},QE= e=>e.readonly,eA= e=>{e.parser.addAttributeFilter("contenteditable",(t=>{QE(e)&&W(t,(e=>{e.attr(KE,e.attr("contenteditable")),e.attr("contenteditable","false")}))})),e.serializer.addAttributeFilter(KE,(t=>{QE(e)&&W(t,(e=>{e.attr("contenteditable",e.attr(KE))}))})),e.serializer.addTempAttr(KE)},tA=["copy"],oA=Dt.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 nA{constructor(e){this.bindings={},this.settings=e||{},this.scope=this.settings.scope||this,this.toggleEvent=this.settings.toggleEvent||L}static isNative(e){return!!oA[e.toLowerCase()]}fire(e, t){return this.dispatch(e,t)}dispatch(e, t){const o=e.toLowerCase(),n=us(o,null!=t?t:{},this.scope);this.settings.beforeFire&&this.settings.beforeFire(n);const r=this.bindings[o];if(r)for(let e=0,t=r.length; e<t; e++){const t=r[e];if(!t.removed){if(t.once&&this.off(o,t.func),n.isImmediatePropagationStopped())return n;if(!1===t.func.call(this.scope,n))return n.preventDefault(),n}}return n}on(e, t, o, n){if(!1===t&&(t=L),t){const r={func:t,removed:!1};n&&Dt.extend(r,n);const a=e.toLowerCase().split(" ");let s=a.length;for(; s--;){const e=a[s];let t=this.bindings[e];t||(t=[],this.toggleEvent(e,!0)),t=o?[r,...t]:[...t,r],this.bindings[e]=t}}return this}off(e, t){if(e){const o=e.toLowerCase().split(" ");let n=o.length;for(; n--;){const r=o[n];let a=this.bindings[r];if(!r)return he(this.bindings,((e, t)=>{this.toggleEvent(t,!1),delete this.bindings[t]})),this;if(a){if(t){const e=G(a,(e=>e.func===t));a=e.fail,this.bindings[r]=a,W(e.pass,(e=>{e.removed=!0}))}else a.length=0;a.length||(this.toggleEvent(e,!1),delete this.bindings[r])}}}else he(this.bindings,((e, t)=>{this.toggleEvent(t,!1)})),this.bindings={};return this}once(e, t, o){return this.on(e,t,o,{once:!0})}has(e){e=e.toLowerCase();const t=this.bindings[e];return!(!t||0===t.length)}}const rA= e=>(e._eventDispatcher||(e._eventDispatcher=new nA({scope:e,toggleEvent:(t, o)=>{nA.isNative(t)&&e.toggleNativeEvent&&e.toggleNativeEvent(t,o)}})),e._eventDispatcher),aA={fire(e, t, o){return this.dispatch(e,t,o)},dispatch(e, t, o){const n=this;if(n.removed&&"remove"!==e&&"detach"!==e)return us(e.toLowerCase(),null!=t?t:{},n);const r=rA(n).dispatch(e,t);if(!1!==o&&n.parent){let t=n.parent();for(; t&&!r.isPropagationStopped();)t.dispatch(e,r,!1),t=t.parent?t.parent():void 0}return r},on(e, t, o){return rA(this).on(e,t,o)},off(e, t){return rA(this).off(e,t)},once(e, t){return rA(this).once(e,t)},hasEventListeners(e){return rA(this).has(e)}},sA=Os.DOM;let iA;const lA=(e, t)=>{if("selectionchange"===t)return e.getDoc();if(!e.inline&&/^(?:mouse|touch|click|contextmenu|drop|dragover|dragend)/.test(t))return e.getDoc().documentElement;const o=ec(e);return o?(e.eventRoot||(e.eventRoot=sA.select(o)[0]),e.eventRoot):e.getBody()},cA=(e, t, o)=>{(e=>!e.hidden&&!QE(e))(e)?e.dispatch(t,o):QE(e)&&((e, t)=>{if((e=>"click"===e.type)(t)&&!Wm.metaKeyPressed(t)){const o=bo(t.target);((e, t)=>en(t,"a",(t=>xo(t,bo(e.getBody())))).bind((e=>eo(e,"href"))))(e,o).each((o=>{if(t.preventDefault(),/^#/.test(o)){const t=e.dom.select(`${o},[name="${je(o,"#")}"]`);t.length&&e.selection.scrollIntoView(t[0],!0)}else window.open(o,"_blank","rel=noopener noreferrer,menubar=yes,toolbar=yes,location=yes,status=yes,resizable=yes,scrollbars=yes")}))}else(e=>Z(tA,e.type))(t)&&e.dispatch(t.type,t)})(e,o)},dA=(e, t)=>{if(e.delegates||(e.delegates={}),e.delegates[t]||e.removed)return;const o=lA(e,t);if(ec(e)){if(iA||(iA={},e.editorManager.on("removeEditor",(()=>{e.editorManager.activeEditor||iA&&(he(iA,((t, o)=>{e.dom.unbind(lA(e,o))})),iA=null)}))),iA[t])return;const n= o=>{const n=o.target,r=e.editorManager.get();let a=r.length;for(; a--;){const e=r[a].getBody();(e===n||sA.isChildOf(n,e))&&cA(r[a],t,o)}};iA[t]=n,sA.bind(o,t,n)}else{const n= o=>{cA(e,t,o)};sA.bind(o,t,n),e.delegates[t]=n}},uA={...aA,bindPendingEventDelegates(){const e=this;Dt.each(e._pendingNativeEvents,(t=>{dA(e,t)}))},toggleNativeEvent(e, t){const o=this;"focus"!==e&&"blur"!==e&&(o.removed||(t?o.initialized?dA(o,e):o._pendingNativeEvents?o._pendingNativeEvents.push(e):o._pendingNativeEvents=[e]:o.initialized&&o.delegates&&(o.dom.unbind(lA(o,e),e,o.delegates[e]),delete o.delegates[e])))},unbindAllNativeEvents(){const e=this,t=e.getBody(),o=e.dom;e.delegates&&(he(e.delegates,((t, o)=>{e.dom.unbind(lA(e,o),o,t)})),delete e.delegates),!e.inline&&t&&o&&(t.onload=null,o.unbind(e.getWin()),o.unbind(e.getDoc())),o&&(o.unbind(t),o.unbind(e.getContainer()))}},mA= e=>g(e)?{value:e.split(/[ ,]/),valid:!0}:C(e,g)?{value:e,valid:!0}:{valid:!1,message:"The value must be a string[] or a comma/space separated string."},gA=(e, t)=>e+(Ye(t.message)?"":`. ${t.message}`),pA= e=>e.valid,hA=(e, t, o="")=>{const n=t(e);return b(n)?n?{value:e,valid:!0}:{valid:!1,message:o}:n},fA=["design","readonly"],yA=(e, t, o, n)=>{const r=o[t.get()],a=o[n];try{a.activate()}catch(e){return void console.error(`problem while activating editor mode ${n}:`,e)}r.deactivate(),r.editorReadOnly!==a.editorReadOnly&&JE(e,a.editorReadOnly),t.set(n),((e, t)=>{e.dispatch("SwitchMode",{mode:t})})(e,n)},bA=Dt.each,vA=Dt.explode,kA={f1:112,f2:113,f3:114,f4:115,f5:116,f6:117,f7:118,f8:119,f9:120,f10:121,f11:122,f12:123},wA=Dt.makeMap("alt,ctrl,shift,meta,access"),_A= e=>{const t={},o=At.os.isMacOS()||At.os.isiOS();bA(vA(e.toLowerCase(),"+"),(e=>{(e=>e in wA)(e)?t[e]=!0:/^[0-9]{2,}$/.test(e)?t.keyCode=parseInt(e,10):(t.charCode=e.charCodeAt(0),t.keyCode=kA[e]||e.toUpperCase().charCodeAt(0))}));const n=[t.keyCode];let r;for(r in wA)t[r]?n.push(r):t[r]=!1;return t.id=n.join(","),t.access&&(t.alt=!0,o?t.ctrl=!0:t.shift=!0),t.meta&&(o?t.meta=!0:(t.ctrl=!0,t.meta=!1)),t};class xA{constructor(e){this.shortcuts={},this.pendingPatterns=[],this.editor=e;const t=this;e.on("keyup keypress keydown",(e=>{!t.hasModifier(e)&&!t.isFunctionKey(e)||e.isDefaultPrevented()||(bA(t.shortcuts,(o=>{t.matchShortcut(e,o)&&(t.pendingPatterns=o.subpatterns.slice(0),"keydown"===e.type&&t.executeShortcutAction(o))})),t.matchShortcut(e,t.pendingPatterns[0])&&(1===t.pendingPatterns.length&&"keydown"===e.type&&t.executeShortcutAction(t.pendingPatterns[0]),t.pendingPatterns.shift()))}))}add(e, t, o, n){const r=this,a=r.normalizeCommandFunc(o);return bA(vA(Dt.trim(e)),(e=>{const o=r.createShortcut(e,t,a,n);r.shortcuts[o.id]=o})),!0}remove(e){const t=this.createShortcut(e);return!!this.shortcuts[t.id]&&(delete this.shortcuts[t.id],!0)}normalizeCommandFunc(e){const t=this,o=e;return"string"==typeof o?()=>{t.editor.execCommand(o,!1,null)}:Dt.isArray(o)?()=>{t.editor.execCommand(o[0],o[1],o[2])}:o}createShortcut(e, t, o, n){const r=Dt.map(vA(e,">"),_A);return r[r.length-1]=Dt.extend(r[r.length-1],{func:o,scope:n||this.editor}),Dt.extend(r[0],{desc:this.editor.translate(t),subpatterns:r.slice(1)})}hasModifier(e){return e.altKey||e.ctrlKey||e.metaKey}isFunctionKey(e){return"keydown"===e.type&&e.keyCode>=112&&e.keyCode<=123}matchShortcut(e, t){return!!t&&t.ctrl===e.ctrlKey&&t.meta===e.metaKey&&t.alt===e.altKey&&t.shift===e.shiftKey&&!!(e.keyCode===t.keyCode||e.charCode&&e.charCode===t.charCode)&&(e.preventDefault(),!0)}executeShortcutAction(e){return e.func?e.func.call(e.scope):null}}const CA=()=>{const e=(()=>{const e={},t={},o={},n={},r={},a={},s={},i={},l=(e, t)=>(o, n)=>{e[o.toLowerCase()]={...n,type:t}};return{addButton:l(e,"button"),addGroupToolbarButton:l(e,"grouptoolbarbutton"),addToggleButton:l(e,"togglebutton"),addMenuButton:l(e,"menubutton"),addSplitButton:l(e,"splitbutton"),addMenuItem:l(t,"menuitem"),addNestedMenuItem:l(t,"nestedmenuitem"),addToggleMenuItem:l(t,"togglemenuitem"),addAutocompleter:l(o,"autocompleter"),addContextMenu:l(r,"contextmenu"),addContextToolbar:l(a,"contexttoolbar"),addContextForm:l(a,"contextform"),addSidebar:l(s,"sidebar"),addView:l(i,"views"),addIcon:(e, t)=>n[e.toLowerCase()]=t,getAll:()=>({buttons:e,menuItems:t,icons:n,popups:o,contextMenus:r,contextToolbars:a,sidebars:s,views:i})}})();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,addView:e.addView,getAll:e.getAll}},SA=Os.DOM,zA=Dt.extend,OA=Dt.each;class TA{constructor(e, t, o){this.plugins={},this.contentCSS=[],this.contentStyles=[],this.loadedCSS={},this.isNotDirty=!1,this.composing=!1,this.destroyed=!1,this.hasHiddenInput=!1,this.iframeElement=null,this.initialized=!1,this.readonly=!1,this.removed=!1,this.startContent="",this._pendingNativeEvents=[],this._skinLoaded=!1,this.editorManager=o,this.documentBaseUrl=o.documentBaseURL,zA(this,uA);const n=this;this.id=e,this.hidden=!1;const r=((e, t)=>NE(SE||zE,SE,t,e,t))(o.defaultOptions,t);this.options=((e, t)=>{const o={},n={},r=(e, t, o)=>{const r=hA(t,o);return pA(r)?(n[e]=r.value,!0):(console.warn(gA(`Invalid value passed for the ${e} option`,r)),!1)},a= e=>Ce(o,e);return{register:(e, a)=>{const s=(e=>g(e.processor))(a)?(e=>{const t=(()=>{switch(e){case"array":return f;case"boolean":return b;case"function":return _;case"number":return x;case"object":return p;case"string":return g;case"string[]":return mA;case"object[]":return e=>C(e,p);case"regexp":return e=>m(e,RegExp);default:return I}})();return o=>hA(o,t,`The value must be a ${e}.`)})(a.processor):a.processor,i=((e, t, o)=>{if(!v(t)){const n=hA(t,o);if(pA(n))return n.value;console.error(gA(`Invalid default value passed for the "${e}" option`,n))}})(e,a.default,s);o[e]={...a,default:i,processor:s},xe(n,e).orThunk((()=>xe(t,e))).each((t=>r(e,t,s)))},isRegistered:a,get: e=>xe(n,e).orThunk((()=>xe(o,e).map((e=>e.default)))).getOrUndefined(),set:(e, t)=>{if(a(e)){const n=o[e];return n.immutable?(console.error(`"${e}" is an immutable option and cannot be updated`),!1):r(e,t,n.processor)}return console.warn(`"${e}" is not a registered option. Ensure the option has been registered before setting a value.`),!1},unset: e=>{const t=a(e);return t&&delete n[e],t},isSet: e=>Ce(n,e)}})(0,r),(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",default:!0}),t("inline",{processor:"boolean",default:!1}),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:fl(e,"tinymce"),default:"tinymce"}),t("body_class",{processor:fl(e),default:""}),t("content_security_policy",{processor:"string",default:""}),t("br_in_pre",{processor:"boolean",default:!0}),t("forced_root_block",{processor: e=>{const t=g(e)&&Ke(e);return t?{value:e,valid:t}:{valid:!1,message:"Must be a non-empty string."}},default:"p"}),t("forced_root_block_attrs",{processor:"object",default:{}}),t("newline_behavior",{processor: e=>{const t=Z(["block","linebreak","invert","default"],e);return t?{value:e,valid:t}:{valid:!1,message:"Must be one of: block, linebreak, invert or default."}},default:"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:!0}),t("end_container_on_empty_block",{processor: e=>b(e)||g(e)?{valid:!0,value:e}:{valid:!1,message:"Must be boolean or a string"},default:"blockquote"}),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:!0}),t("images_reuse_filename",{processor:"boolean",default:!1}),t("images_replace_blob_uris",{processor:"boolean",default:!0}),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_credentials",{processor:"boolean",default:!1}),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:!0}),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:!1}),t("indentation",{processor:"string",default:"40px"}),t("content_css",{processor: e=>{const t=!1===e||g(e)||C(e,g);return t?g(e)?{value:q(e.split(","),We),valid:t}:f(e)?{value:e,valid:t}:!1===e?{value:[],valid:t}:{value:e,valid:t}:{valid:!1,message:"Must be false, a string or an array of strings."}},default:mc(e)?[]:["default"]}),t("content_style",{processor:"string"}),t("content_css_cors",{processor:"boolean",default:!1}),t("font_css",{processor: e=>{const t=g(e)||C(e,g);return t?{value:f(e)?e:q(e.split(","),We),valid:t}:{valid:!1,message:"Must be a string or an array of strings."}},default:[]}),t("inline_boundaries",{processor:"boolean",default:!0}),t("inline_boundaries_selector",{processor:"string",default:"a[href],code,span.mce-annotation"}),t("object_resizing",{processor: e=>{const t=b(e)||g(e);return t?!1===e||dl.isiPhone()||dl.isiPad()?{value:"",valid:t}:{value:!0===e?"table,img,figure.image,div,video,iframe":e,valid:t}:{valid:!1,message:"Must be boolean or a string"}},default:!ul}),t("resize_img_proportional",{processor:"boolean",default:!0}),t("event_root",{processor:"object"}),t("service_message",{processor:"string"}),t("theme",{processor: e=>!1===e||g(e)||_(e),default:"silver"}),t("theme_url",{processor:"string"}),t("formats",{processor:"object"}),t("format_empty_lines",{processor:"boolean",default:!1}),t("format_noneditable_selector",{processor:"string",default:""}),t("preview_styles",{processor: e=>{const t=!1===e||g(e);return t?{value:!1===e?"":e,valid:t}:{valid:!1,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:!0}),t("submit_patch",{processor:"boolean",default:!0}),t("encoding",{processor:"string"}),t("add_form_submit_trigger",{processor:"boolean",default:!0}),t("add_unload_trigger",{processor:"boolean",default:!0}),t("custom_undo_redo_levels",{processor:"number",default:0}),t("disable_nodechange",{processor:"boolean",default:!1}),t("readonly",{processor:"boolean",default:!1}),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:!0}),t("visual",{processor:"boolean",default:!0}),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:!1}),t("allow_html_data_urls",{processor:"boolean",default:!1}),t("allow_svg_data_urls",{processor:"boolean"}),t("allow_html_in_named_anchor",{processor:"boolean",default:!1}),t("allow_script_urls",{processor:"boolean",default:!1}),t("allow_unsafe_link_target",{processor:"boolean",default:!1}),t("convert_fonts_to_spans",{processor:"boolean",default:!0,deprecated:!0}),t("fix_list_elements",{processor:"boolean",default:!1}),t("preserve_cdata",{processor:"boolean",default:!1}),t("remove_trailing_brs",{processor:"boolean"}),t("inline_styles",{processor:"boolean",default:!0,deprecated:!0}),t("element_format",{processor:"string",default:"html"}),t("entities",{processor:"string"}),t("schema",{processor:"string",default:"html5"}),t("convert_urls",{processor:"boolean",default:!0}),t("relative_urls",{processor:"boolean",default:!0}),t("remove_script_host",{processor:"boolean",default:!0}),t("custom_elements",{processor:"string"}),t("extended_valid_elements",{processor:"string"}),t("invalid_elements",{processor:"string"}),t("invalid_styles",{processor:hl}),t("valid_children",{processor:"string"}),t("valid_classes",{processor:hl}),t("valid_elements",{processor:"string"}),t("valid_styles",{processor:hl}),t("verify_html",{processor:"boolean",default:!0}),t("auto_focus",{processor: e=>g(e)||!0===e}),t("browser_spellcheck",{processor:"boolean",default:!1}),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:!0}),t("a11y_advanced_options",{processor:"boolean",default:!1}),t("api_key",{processor:"string"}),t("paste_block_drop",{processor:"boolean",default:!1}),t("paste_data_images",{processor:"boolean",default:!0}),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:!0}),t("paste_merge_formats",{processor:"boolean",default:!0}),t("smart_paste",{processor:"boolean",default:!0}),t("paste_as_text",{processor:"boolean",default:!1}),t("paste_tab_spaces",{processor:"number",default:4}),t("text_patterns",{processor: e=>C(e,p)||!1===e?{value:cl(!1===e?[]:e),valid:!0}:{valid:!1,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("text_patterns_lookup",{processor: e=>{return _(e)?{value:(t=e, e=>{const o=t(e);return cl(o)}),valid:!0}:{valid:!1,message:"Must be a single function"};var t},default: e=>[]}),t("noneditable_class",{processor:"string",default:"mceNonEditable"}),t("editable_class",{processor:"string",default:"mceEditable"}),t("noneditable_regexp",{processor: e=>C(e,gl)?{value:e,valid:!0}:gl(e)?{value:[e],valid:!0}:{valid:!1,message:"Must be a RegExp or an array of RegExp."},default:[]}),t("table_tab_navigation",{processor:"boolean",default:!0}),t("highlight_on_focus",{processor:"boolean",default:!1}),t("xss_sanitization",{processor:"boolean",default:!0}),e.on("ScriptsLoaded",(()=>{t("directionality",{processor:"string",default:Ds.isRtl()?"rtl":void 0}),t("placeholder",{processor:"string",default:ml.getAttrib(e.getElement(),"placeholder")})}))})(n);const a=this.options.get;a("deprecation_warnings")&&((e, t)=>{((e, t)=>{const o=Hk(e),n=jk(t),r=n.length>0,a=o.length>0,s="mobile"===t.theme;if(r||a||s){const e="\n- ",t=s?`\n\nThemes:${e}mobile`:"",i=r?`\n\nPlugins:${e}${n.join(e)}`:"",l=a?`\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+i+l)}})(e,t),((e, t)=>{const o=Pk(e),n=Vk(t),r=n.length>0,a=o.length>0;if(r||a){const e="\n- ",t=r?`\n\nPlugins:${e}${n.map(Zk).join(e)}`:"",s=a?`\n\nOptions:${e}${o.join(e)}`:"";console.warn("The following deprecated features are currently enabled but will be removed soon."+t+s)}})(e,t)})(t,r);const s=a("suffix");s&&(o.suffix=s),this.suffix=o.suffix;const i=a("base_url");i&&o._setBaseUrl(i),this.baseUri=o.baseURI;const l=jl(n);l&&(Es.ScriptLoader._setReferrerPolicy(l),Os.DOM.styleSheetLoader._setReferrerPolicy(l));const c=kc(n);w(c)&&Os.DOM.styleSheetLoader._setContentCssCors(c),Bs.languageLoad=a("language_load"),Bs.baseURL=o.baseURL,this.setDirty(!1),this.documentBaseURI=new Tv(vl(n),{base_uri:this.baseUri}),this.baseURI=this.baseUri,this.inline=mc(n),this.hasVisual=Cc(n),this.shortcuts=new xA(this),this.editorCommands=new GE(this),qE(this);const d=a("cache_suffix");d&&(At.cacheSuffix=d.replace(/^[\?\&]+/,"")),this.ui={registry:CA(),styleSheetLoader:void 0,show:S,hide:S,setEnabled:S,isEnabled:I},this.mode=(e=>{const t=As("design"),o=As({design:{activate:S,deactivate:S,editorReadOnly:!1},readonly:{activate:S,deactivate:S,editorReadOnly:!0}});return(e=>{e.serializer?eA(e):e.on("PreInit",(()=>{eA(e)}))})(e),(e=>{e.on("ShowCaret",(t=>{QE(e)&&t.preventDefault()})),e.on("ObjectSelected",(t=>{QE(e)&&t.preventDefault()}))})(e),{isReadOnly:()=>QE(e),set: n=>((e, t, o, n)=>{if(n!==o.get()){if(!Ce(t,n))throw new Error(`Editor mode '${n}' is invalid`);e.initialized?yA(e,o,t,n):e.on("init",(()=>yA(e,o,t,n)))}})(e,o.get(),t,n),get:()=>t.get(),register:(e, t)=>{o.set(((e, t, o)=>{if(Z(fA,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)}}}}})(o.get(),e,t))}}})(n),o.dispatch("SetupEditor",{editor:this});const u=Tc(n);_(u)&&u.call(n,n)}render(){(e=>{const t=e.id;Ds.setCode(Vl(e));const o=()=>{kE.unbind(window,"ready",o),e.render()};if(!ys.Event.domLoaded)return void kE.bind(window,"ready",o);if(!e.getElement())return;const n=bo(e.getElement()),r=no(n);e.on("remove",(()=>{$(n.dom.attributes,(e=>oo(n,e.name))),Jt(n,r)})),e.ui.styleSheetLoader=((e, t)=>Ma.forElement(e,{contentCssCors:kc(t),referrerPolicy:jl(t)}))(n,e),mc(e)?e.inline=!0:(e.orgVisibility=e.getElement().style.visibility,e.getElement().style.visibility="hidden");const a=e.getElement().form||kE.getParent(t,"form");a&&(e.formElement=a,gc(e)&&!Kn(e.getElement())&&(kE.insertAfter(kE.create("input",{type:"hidden",name:t}),t),e.hasHiddenInput=!0),e.formEventDelegate= t=>{e.dispatch(t.type,t)},kE.bind(a,"submit reset",e.formEventDelegate),e.on("reset",(()=>{e.resetContent()})),!pc(e)||a.submit.nodeType||a.submit.length||a._mceOldSubmit||(a._mceOldSubmit=a.submit,a.submit=()=>(e.editorManager.triggerSave(),e.setDirty(!1),a._mceOldSubmit(a)))),e.windowManager=nw(e),e.notificationManager=ew(e),(e=>"xml"===e.options.get("encoding"))(e)&&e.on("GetContent",(e=>{e.save&&(e.content=kE.encode(e.content))})),hc(e)&&e.on("submit",(()=>{e.initialized&&e.save()})),fc(e)&&(e._beforeUnload=()=>{!e.initialized||e.destroyed||e.isHidden()||e.save({format:"raw",no_events:!0,set_dirty:!1})},e.editorManager.on("BeforeUnload",e._beforeUnload)),e.editorManager.add(e),xE(e,e.suffix)})(this)}focus(e){this.execCommand("mceFocus",!1,e)}hasFocus(){return gp(this)}translate(e){return Ds.translate(e)}getParam(e, t, o){const n=this.options;return n.isRegistered(e)||(w(o)?n.register(e,{processor:o,default:t}):n.register(e,{processor:I,default:t})),n.isSet(e)||v(t)?n.get(e):t}hasPlugin(e, t){return!(!Z(wc(this),e)||t&&void 0===tw.get(e))}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;e.hidden&&(e.hidden=!1,e.inline?e.getBody().contentEditable="true":(SA.show(e.getContainer()),SA.hide(e.id)),e.load(),e.dispatch("show"))}hide(){const e=this;e.hidden||(e.save(),e.inline?(e.getBody().contentEditable="false",e===e.editorManager.focusedEditor&&(e.editorManager.focusedEditor=null)):(SA.hide(e.getContainer()),SA.setStyle(e.id,"display",e.orgDisplay)),e.hidden=!0,e.dispatch("hide"))}isHidden(){return this.hidden}setProgressState(e, t){this.dispatch("ProgressState",{state:e,time:t})}load(e={}){const t=this,o=t.getElement();if(t.removed)return"";if(o){const n={...e,load:!0},r=Kn(o)?o.value:o.innerHTML,a=t.setContent(r,n);return n.no_events||t.dispatch("LoadContent",{...n,element:o}),a}return""}save(e={}){const t=this;let o=t.getElement();if(!o||!t.initialized||t.removed)return"";const n={...e,save:!0,element:o};let r=t.getContent(n);const a={...n,content:r};if(a.no_events||t.dispatch("SaveContent",a),"raw"===a.format&&t.dispatch("RawSaveContent",a),r=a.content,Kn(o))o.value=r;else{!e.is_removing&&t.inline||(o.innerHTML=r);const n=SA.getParent(t.id,"form");n&&OA(n.elements,(e=>e.name!==t.id||(e.value=r,!1)))}return a.element=n.element=o=null,!1!==a.set_dirty&&t.setDirty(!1),r}setContent(e, t){return Nk(this,e,t)}getContent(e){return((e, t={})=>{const o=((e, t)=>({...e,format:t,get:!0,getInner:!0}))(t,t.format?t.format:"html");return Zv(e,o).fold(E,(t=>{const o=((e, t)=>wk(e).editor.getContent(t))(e,t);return Uv(e,o,t)}))})(this,e)}insertContent(e, t){t&&(e=zA({content:e},t)),this.execCommand("mceInsertContent",!1,e)}resetContent(e){void 0===e?Nk(this,this.startContent,{format:"raw"}):Nk(this,e),this.undoManager.reset(),this.setDirty(!1),this.nodeChanged()}isDirty(){return!this.isNotDirty}setDirty(e){const t=!this.isNotDirty;this.isNotDirty=!e,e&&e!==t&&this.dispatch("dirty")}getContainer(){const e=this;return e.container||(e.container=e.editorContainer||SA.get(e.id+"_parent")),e.container}getContentAreaContainer(){return this.contentAreaContainer}getElement(){return this.targetElm||(this.targetElm=SA.get(this.id)),this.targetElm}getWin(){const e=this;if(!e.contentWindow){const t=e.iframeElement;t&&(e.contentWindow=t.contentWindow)}return e.contentWindow}getDoc(){const e=this;if(!e.contentDocument){const t=e.getWin();t&&(e.contentDocument=t.document)}return e.contentDocument}getBody(){var e,t;const o=this.getDoc();return null!==(t=null!==(e=this.bodyElement)&&void 0!==e?e:null==o?void 0:o.body)&&void 0!==t?t:null}convertURL(e, t, o){const n=this,r=n.options.get,a=Ac(n);return _(a)?a.call(n,e,o,!0,t):!r("convert_urls")||"link"===o||p(o)&&"LINK"===o.nodeName||0===e.indexOf("file:")||0===e.length?e:r("relative_urls")?n.documentBaseURI.toRelative(e):e=n.documentBaseURI.toAbsolute(e,r("remove_script_host"))}addVisual(e){((e, t)=>{((e, t)=>{_k(e).editor.addVisual(t)})(e,t)})(this,e)}remove(){(e=>{if(!e.removed){const{_selectionOverrides:t,editorUpload:o}=e,n=e.getBody(),r=e.getElement();n&&e.save({is_removing:!0}),e.removed=!0,e.unbindAllNativeEvents(),e.hasHiddenInput&&w(null==r?void 0:r.nextSibling)&&Uk.remove(r.nextSibling),(e=>{e.dispatch("remove")})(e),e.editorManager.remove(e),!e.inline&&n&&(e=>{Uk.setStyle(e.id,"display",e.orgDisplay)})(e),(e=>{e.dispatch("detach")})(e),Uk.remove(e.getContainer()),qk(t),qk(o),e.destroy()}})(this)}destroy(e){((e, t)=>{const{selection:o,dom:n}=e;e.destroyed||(t||e.removed?(t||(e.editorManager.off("beforeunload",e._beforeUnload),e.theme&&e.theme.destroy&&e.theme.destroy(),qk(o),qk(n)),(e=>{const t=e.formElement;t&&(t._mceOldSubmit&&(t.submit=t._mceOldSubmit,delete t._mceOldSubmit),Uk.unbind(t,"submit reset",e.formEventDelegate))})(e),(e=>{const t=e;t.contentAreaContainer=t.formElement=t.container=t.editorContainer=null,t.bodyElement=t.contentDocument=t.contentWindow=null,t.iframeElement=t.targetElm=null;const o=e.selection;if(o){const e=o.dom;t.selection=o.win=o.dom=e.doc=null}})(e),e.destroyed=!0):e.remove())})(this,e)}uploadImages(){return this.editorUpload.uploadImages()}_scanForImages(){return this.editorUpload.scanForImages()}}const EA=Os.DOM,AA=Dt.each;let MA,NA=!1,RA=[];const DA= e=>{const t=e.type;AA(HA.get(),(o=>{switch(t){case"scroll":o.dispatch("ScrollWindow",e);break;case"resize":o.dispatch("ResizeWindow",e)}}))},BA= e=>{if(e!==NA){const t=Os.DOM;e?(t.bind(window,"resize",DA),t.bind(window,"scroll",DA)):(t.unbind(window,"resize",DA),t.unbind(window,"scroll",DA)),NA=e}},LA= e=>{const t=RA;return RA=K(RA,(t=>e!==t)),HA.activeEditor===e&&(HA.activeEditor=RA.length>0?RA[0]:null),HA.focusedEditor===e&&(HA.focusedEditor=null),t.length!==RA.length},IA="CSS1Compat"!==document.compatMode,HA={...aA,baseURI:null,baseURL:null,defaultOptions:{},documentBaseURL:null,suffix:null,majorVersion:"6",minorVersion:"4.2",releaseDate:"2023-04-26",i18n:Ds,activeEditor:null,focusedEditor:null,setup(){const e=this;let t="",o="",n=Tv.getDocumentBaseUrl(document.location);/^[^:]+:\/\/\/?[^\/]+\//.test(n)&&(n=n.replace(/[\?#].*$/,"").replace(/[\/\\][^\/]+$/,""),/[\/\\]$/.test(n)||(n+="/"));const r=window.tinymce||window.tinyMCEPreInit;if(r)t=r.base||r.baseURL,o=r.suffix;else{const e=document.getElementsByTagName("script");for(let n=0; n<e.length; n++){const r=e[n].src||"";if(""===r)continue;const a=r.substring(r.lastIndexOf("/"));if(/tinymce(\.full|\.jquery|)(\.min|\.dev|)\.js/.test(r)){-1!==a.indexOf(".min")&&(o=".min"),t=r.substring(0,r.lastIndexOf("/"));break}}if(!t&&document.currentScript){const e=document.currentScript.src;-1!==e.indexOf(".min")&&(o=".min"),t=e.substring(0,e.lastIndexOf("/"))}}var a;e.baseURL=new Tv(n).toAbsolute(t),e.documentBaseURL=n,e.baseURI=new Tv(e.baseURL),e.suffix=o,(a=e).on("AddEditor",M(cp,a)),a.on("RemoveEditor",M(dp,a))},overrideDefaults(e){const t=e.base_url;t&&this._setBaseUrl(t);const o=e.suffix;o&&(this.suffix=o),this.defaultOptions=e;const n=e.plugin_base_urls;void 0!==n&&he(n,((e, t)=>{Bs.PluginManager.urls[t]=e}))},init(e){const t=this;let o;const n=Dt.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"," ");let r= e=>{o=e};const a=()=>{let o=0;const s=[];let i;EA.unbind(window,"ready",a),(o=>{const n=e.onpageload;n&&n.apply(t,[])})(),i=((e, t)=>{const o=[],n=_(t)? e=>U(o,(o=>t(o,e))): e=>Z(o,e);for(let t=0,r=e.length; t<r; t++){const r=e[t];n(r)||o.push(r)}return o})((e=>At.browser.isIE()||At.browser.isEdge()?(lw("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"),[]):IA?(lw("Failed to initialize the editor as the document is not in standards mode. TinyMCE requires standards mode."),[]):g(e.selector)?EA.select(e.selector):w(e.target)?[e.target]:[])(e)),Dt.each(i,(e=>{var o;(o=t.get(e.id))&&o.initialized&&!(o.getContainer()||o.getBody()).parentNode&&(LA(o),o.unbindAllNativeEvents(),o.destroy(!0),o.removed=!0)})),i=Dt.grep(i,(e=>!t.get(e.id))),0===i.length?r([]):AA(i,(a=>{((e, t)=>e.inline&&t.tagName.toLowerCase()in n)(e,a)?lw("Could not initialize inline editor on invalid inline target element",a):((e, n, a)=>{const l=new TA(e,n,t);s.push(l),l.on("init",(()=>{++o===i.length&&r(s)})),l.targetElm=l.targetElm||a,l.render()})((e=>{let t=e.id;return t||(t=xe(e,"name").filter((e=>!EA.get(e))).getOrThunk(EA.uniqueId),e.setAttribute("id",t)),t})(a),e,a)}))};return EA.bind(window,"ready",a),new Promise((e=>{o?e(o):r= t=>{e(t)}}))},get(e){return 0===arguments.length?RA.slice(0):g(e)?Q(RA,(t=>t.id===e)).getOr(null):x(e)&&RA[e]?RA[e]:null},add(e){const t=this,o=t.get(e.id);return o===e||(null===o&&RA.push(e),BA(!0),t.activeEditor=e,t.dispatch("AddEditor",{editor:e}),MA||(MA= e=>{const o=t.dispatch("BeforeUnload");if(o.returnValue)return e.preventDefault(),e.returnValue=o.returnValue,o.returnValue},window.addEventListener("beforeunload",MA))),e},createEditor(e, t){return this.add(new TA(e,t,this))},remove(e){const t=this;let o;if(e){if(!g(e))return o=e,y(t.get(o.id))?null:(LA(o)&&t.dispatch("RemoveEditor",{editor:o}),0===RA.length&&window.removeEventListener("beforeunload",MA),o.remove(),BA(RA.length>0),o);AA(EA.select(e),(e=>{o=t.get(e.id),o&&t.remove(o)}))}else for(let e=RA.length-1; e>=0; e--)t.remove(RA[e])},execCommand(e, t, o){var n;const r=this,a=p(o)?null!==(n=o.id)&&void 0!==n?n:o.index:o;switch(e){case"mceAddEditor":if(!r.get(a)){const e=o.options;new TA(a,e,r).render()}return!0;case"mceRemoveEditor":{const e=r.get(a);return e&&e.remove(),!0}case"mceToggleEditor":{const e=r.get(a);return e?(e.isHidden()?e.show():e.hide(),!0):(r.execCommand("mceAddEditor",!1,o),!0)}}return!!r.activeEditor&&r.activeEditor.execCommand(e,t,o)},triggerSave:()=>{AA(RA,(e=>{e.save()}))},addI18n:(e, t)=>{Ds.add(e,t)},translate: e=>Ds.translate(e),setActive(e){const t=this.activeEditor;this.activeEditor!==e&&(t&&t.dispatch("deactivate",{relatedTarget:e}),e.dispatch("activate",{relatedTarget:t})),this.activeEditor=e},_setBaseUrl(e){this.baseURL=new Tv(this.documentBaseURL).toAbsolute(e.replace(/\/+$/,"")),this.baseURI=new Tv(this.baseURL)}};HA.setup();const PA=(()=>{const e=Is();return{FakeClipboardItem: e=>({items:e,types:ge(e),getType: t=>xe(e,t).getOrUndefined()}),write: t=>{e.set(t)},read:()=>e.get().getOrUndefined(),clear:e.clear}})(),FA=Math.min,jA=Math.max,VA=Math.round,ZA=(e, t, o)=>{let n=t.x,r=t.y;const a=e.w,s=e.h,i=t.w,l=t.h,c=(o||"").split("");return"b"===c[0]&&(r+=l),"r"===c[1]&&(n+=i),"c"===c[0]&&(r+=VA(l/2)),"c"===c[1]&&(n+=VA(i/2)),"b"===c[3]&&(r-=s),"r"===c[4]&&(n-=a),"c"===c[3]&&(r-=VA(s/2)),"c"===c[4]&&(n-=VA(a/2)),UA(n,r,a,s)},UA=(e, t, o, n)=>({x:e,y:t,w:o,h:n}),qA={inflate:(e, t, o)=>UA(e.x-t,e.y-o,e.w+2*t,e.h+2*o),relativePosition:ZA,findBestRelativePosition:(e, t, o, n)=>{for(let r=0; r<n.length; r++){const a=ZA(e,t,n[r]);if(a.x>=o.x&&a.x+a.w<=o.w+o.x&&a.y>=o.y&&a.y+a.h<=o.h+o.y)return n[r]}return null},intersect:(e, t)=>{const o=jA(e.x,t.x),n=jA(e.y,t.y),r=FA(e.x+e.w,t.x+t.w),a=FA(e.y+e.h,t.y+t.h);return r-o<0||a-n<0?null:UA(o,n,r-o,a-n)},clamp:(e, t, o)=>{let n=e.x,r=e.y,a=e.x+e.w,s=e.y+e.h;const i=t.x+t.w,l=t.y+t.h,c=jA(0,t.x-n),d=jA(0,t.y-r),u=jA(0,a-i),m=jA(0,s-l);return n+=c,r+=d,o&&(a+=c,s+=d,n-=u,r-=m),a-=u,s-=m,UA(n,r,a-n,s-r)},create:UA,fromClientRect: e=>UA(e.left,e.top,e.width,e.height)},WA=(()=>{const e={},t={};return{load:(o, n)=>{const r=`Script at URL "${n}" failed to load`,a=`Script at URL "${n}" did not call \`tinymce.Resource.add('${o}', data)\` within 1 second`;if(void 0!==e[o])return e[o];{const s=new Promise(((e, s)=>{const i=((e, t, o=1e3)=>{let n=!1,r=null;const a= e=>(...t)=>{n||(n=!0,null!==r&&(clearTimeout(r),r=null),e.apply(null,t))},s=a(e),i=a(t);return{start:(...e)=>{n||null!==r||(r=setTimeout((()=>i.apply(null,e)),o))},resolve:s,reject:i}})(e,s);t[o]=i.resolve,Es.ScriptLoader.loadScript(n).then((()=>i.start(a)),(()=>i.reject(r)))}));return e[o]=s,s}},add:(o, n)=>{void 0!==t[o]&&(t[o](n),delete t[o]),e[o]=Promise.resolve(n)},unload: t=>{delete e[t]}}})();let $A;try{const e="__storage_test__";$A=window.localStorage,$A.setItem(e,e),$A.removeItem(e)}catch(e){$A=(()=>{let e={},t=[];const o={getItem: t=>e[t]||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};return Object.defineProperty(o,"length",{get:()=>t.length,configurable:!1,enumerable:!1}),o})()}const GA={geom:{Rect:qA},util:{Delay:np,Tools:Dt,VK:Wm,URI:Tv,EventDispatcher:nA,Observable:aA,I18n:Ds,LocalStorage:$A,ImageUploader: e=>{const t=uw(),o=hw(e,t);return{upload:(t, n=!0)=>o.upload(t,n?pw(e):void 0)}}},dom:{EventUtils:ys,TreeWalker:Hn,TextSeeker:ni,DOMUtils:Os,ScriptLoader:Es,RangeUtils:Cg,Serializer:Mk,StyleSheetLoader:Aa,ControlSelection:Xm,BookmarkManager:Hm,Selection:Tk,Event:ys.Event},html:{Styles:ls,Entities:Ga,Node:Ep,Schema:is,DomParser:jv,Writer:Hp,Serializer:Pp},Env:At,AddOnManager:Bs,Annotator:Im,Formatter:Ow,UndoManager:Ew,EditorCommands:GE,WindowManager:nw,NotificationManager:ew,EditorObservable:uA,Shortcuts:xA,Editor:TA,FocusManager:op,EditorManager:HA,DOM:Os.DOM,ScriptLoader:Es.ScriptLoader,PluginManager:tw,ThemeManager:ow,ModelManager:$k,IconManager:Wk,Resource:WA,FakeClipboard:PA,trim:Dt.trim,isArray:Dt.isArray,is:Dt.is,toArray:Dt.toArray,makeMap:Dt.makeMap,each:Dt.each,map:Dt.map,grep:Dt.grep,inArray:Dt.inArray,extend:Dt.extend,walk:Dt.walk,resolve:Dt.resolve,explode:Dt.explode,_addCacheSuffix:Dt._addCacheSuffix},KA=Dt.extend(HA,GA);(e=>{window.tinymce=e,window.tinyMCE=e})(KA),(t=>{try{e.exports=t}catch(e){}})(KA)}()}}]);