UNPKG

jodit

Version:

Jodit is an awesome and useful wysiwyg editor with filebrowser

8 lines 713 kB
/*! * jodit - Jodit is an awesome and useful wysiwyg editor with filebrowser * Author: Chupurnov <chupurnov@gmail.com> (https://xdsoft.net/jodit/) * Version: v4.12.2 * Url: https://xdsoft.net/jodit/ * License(s): MIT */ !function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var i=t();for(var n in i)("object"==typeof exports?exports:e)[n]=i[n]}}(self,function(){return function(){var e,t,i,n,o={5266:function(e,t,i){"use strict";i.d(t,{Config:function(){return s}});var n=i(25045),o=i(81937);let r={};class s{static get defaultOptions(){return s.__defaultOptions||(s.__defaultOptions=new s),s.__defaultOptions}constructor(){(0,n._)(this,"cache",!0),(0,n._)(this,"defaultTimeout",100),(0,n._)(this,"namespace",""),(0,n._)(this,"safeMode",!1),(0,n._)(this,"width","auto"),(0,n._)(this,"height","auto"),(0,n._)(this,"safePluginsList",["about","enter","backspace","size","bold","hotkeys"]),(0,n._)(this,"commandToHotkeys",void 0),(0,n._)(this,"license",""),(0,n._)(this,"preset","custom"),(0,n._)(this,"presets",{inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}}),(0,n._)(this,"ownerDocument",o.globalDocument),(0,n._)(this,"ownerWindow",o.globalWindow),(0,n._)(this,"shadowRoot",null),(0,n._)(this,"zIndex",0),(0,n._)(this,"readonly",!1),(0,n._)(this,"disabled",!1),(0,n._)(this,"activeButtonsInReadOnly",["source","fullsize","print","about","dots","selectall"]),(0,n._)(this,"allowCommandsInReadOnly",["selectall","preview","print"]),(0,n._)(this,"toolbarButtonSize","middle"),(0,n._)(this,"allowTabNavigation",!1),(0,n._)(this,"inline",!1),(0,n._)(this,"theme","default"),(0,n._)(this,"saveModeInStorage",!1),(0,n._)(this,"editorClassName",!1),(0,n._)(this,"className",!1),(0,n._)(this,"style",!1),(0,n._)(this,"containerStyle",!1),(0,n._)(this,"styleValues",{}),(0,n._)(this,"triggerChangeEvent",!0),(0,n._)(this,"direction",""),(0,n._)(this,"language","auto"),(0,n._)(this,"debugLanguage",!1),(0,n._)(this,"i18n",!1),(0,n._)(this,"tabIndex",-1),(0,n._)(this,"toolbar",!0),(0,n._)(this,"statusbar",!0),(0,n._)(this,"showTooltip",!0),(0,n._)(this,"showTooltipDelay",200),(0,n._)(this,"useNativeTooltip",!1),(0,n._)(this,"defaultActionOnPaste",o.INSERT_AS_HTML),(0,n._)(this,"enter",o.PARAGRAPH),(0,n._)(this,"iframe",!1),(0,n._)(this,"editHTMLDocumentMode",!1),(0,n._)(this,"enterBlock","br"!==this.enter?this.enter:o.PARAGRAPH),(0,n._)(this,"defaultMode",o.MODE_WYSIWYG),(0,n._)(this,"useSplitMode",!1),(0,n._)(this,"colors",{greyscale:["#000000","#434343","#666666","#999999","#B7B7B7","#CCCCCC","#D9D9D9","#EFEFEF","#F3F3F3","#FFFFFF"],palette:["#980000","#FF0000","#FF9900","#FFFF00","#00F0F0","#00FFFF","#4A86E8","#0000FF","#9900FF","#FF00FF"],full:["#E6B8AF","#F4CCCC","#FCE5CD","#FFF2CC","#D9EAD3","#D0E0E3","#C9DAF8","#CFE2F3","#D9D2E9","#EAD1DC","#DD7E6B","#EA9999","#F9CB9C","#FFE599","#B6D7A8","#A2C4C9","#A4C2F4","#9FC5E8","#B4A7D6","#D5A6BD","#CC4125","#E06666","#F6B26B","#FFD966","#93C47D","#76A5AF","#6D9EEB","#6FA8DC","#8E7CC3","#C27BA0","#A61C00","#CC0000","#E69138","#F1C232","#6AA84F","#45818E","#3C78D8","#3D85C6","#674EA7","#A64D79","#85200C","#990000","#B45F06","#BF9000","#38761D","#134F5C","#1155CC","#0B5394","#351C75","#733554","#5B0F00","#660000","#783F04","#7F6000","#274E13","#0C343D","#1C4587","#073763","#20124D","#4C1130"]}),(0,n._)(this,"colorPickerDefaultTab","background"),(0,n._)(this,"imageDefaultWidth",300),(0,n._)(this,"removeButtons",[]),(0,n._)(this,"disablePlugins",[]),(0,n._)(this,"extraPlugins",[]),(0,n._)(this,"basePath",void 0),(0,n._)(this,"extraButtons",[]),(0,n._)(this,"extraIcons",{}),(0,n._)(this,"createAttributes",{table:{style:"border-collapse:collapse;width: 100%;"}}),(0,n._)(this,"sizeLG",900),(0,n._)(this,"sizeMD",700),(0,n._)(this,"sizeSM",400),(0,n._)(this,"buttons",[{group:"font-style",buttons:[]},{group:"list",buttons:[]},{group:"font",buttons:[]},"---",{group:"script",buttons:[]},{group:"media",buttons:[]},"\n",{group:"state",buttons:[]},{group:"clipboard",buttons:[]},{group:"insert",buttons:[]},{group:"indent",buttons:[]},{group:"color",buttons:[]},{group:"form",buttons:[]},"---",{group:"history",buttons:[]},{group:"search",buttons:[]},{group:"source",buttons:[]},{group:"other",buttons:[]},{group:"info",buttons:[]}]),(0,n._)(this,"controls",void 0),(0,n._)(this,"events",{}),(0,n._)(this,"textIcons",!1),(0,n._)(this,"popupRoot",null),(0,n._)(this,"showBrowserColorPicker",!0),Object.assign(this,r)}}(0,n._)(s,"__defaultOptions",void 0),r=s.prototype,s.prototype.controls={}},24735:function(e,t,i){"use strict";i.d(t,{Async:function(){return m}});var n=i(25045),o=i(81937),r=i(61077),s=i(72068),a=i(91565),l=i(72412),u=i(62101),c=i(52100),d=i(85932),h=i(18303),p=i(28712),f=i(14228);class m{delay(e){return this.promise(t=>this.setTimeout(t,e))}setTimeout(e,t,...i){if(this.isDestructed)return 0;let n={};(0,h.isVoid)(t)&&(t=0),(0,l.isNumber)(t)||(t=(n=t).timeout||0),n.label&&this.clearLabel(n.label);let o=(0,r.setTimeout)(e,t,...i),s=n.label||o;return this.timers.set(s,o),this.__callbacks.set(s,e),o}updateTimeout(e,t){if((0,p.assert)(e&&this.timers.has(e),"Label does not exist"),!e||!this.timers.has(e))return null;let i=this.__callbacks.get(e);return(0,p.assert)((0,a.isFunction)(i),"Callback is not a function"),this.setTimeout(i,{label:e,timeout:t})}clearLabel(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e),this.__callbacks.delete(e))}clearTimeout(e){if((0,d.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e),this.__callbacks.delete(e)}debounce(e,t,i=!1){let n=0,o=!1,l=[],d=(...t)=>{if(!o){n=0;let i=e(...t);if(o=!0,l.length){let e=()=>{l.forEach(e=>e()),l.length=0};(0,c.isPromise)(i)?i.finally(e):e()}}},h=(...s)=>{o=!1,t?(!n&&i&&d(...s),(0,r.clearTimeout)(n),n=this.setTimeout(()=>d(...s),(0,a.isFunction)(t)?t():t),this.timers.set(e,n)):d(...s)};return(0,u.isPlainObject)(t)&&t.promisify?(...e)=>{let t=this.promise(e=>{l.push(e)}).catch(e=>{if((0,s.isAbortError)(e))return null;throw e});return h(...e),t}:h}microDebounce(e,t=!1){let i,n=!1,o=!0;return(...r)=>{if(i=r,n){o=!0;return}o=!0,t&&(o=!1,e(...i)),n=!0,this.__queueMicrotaskNative(()=>{n=!1,!this.isDestructed&&o&&e(...i)})}}throttle(e,t,i=!1){let n=null,o,r,s;return(...i)=>{(o=!0,s=i,t)?n||(r=()=>{o?(e(...s),o=!1,n=this.setTimeout(r,(0,a.isFunction)(t)?t():t),this.timers.set(r,n)):n=null})():e(...s)}}promise(e){let t=()=>{},i=new Promise((i,n)=>{t=()=>n((0,f.abort)("Abort async")),this.promisesRejections.add(t),e(i,n)});return!i.finally&&"u">typeof process&&!o.IS_ES_NEXT&&(i.finally=e=>(i.then(e).catch(e),i)),i.finally(()=>{this.promisesRejections.delete(t)}).catch(()=>null),i.rejectCallback=t,i}promiseState(e){if(e.status)return e.status;if(!Promise.race)return new Promise(t=>{e.then(e=>(t("fulfilled"),e),e=>{throw t("rejected"),e}),this.setTimeout(()=>{t("pending")},100)});let t={};return Promise.race([e,t]).then(e=>e===t?"pending":"fulfilled",()=>"rejected")}requestIdleCallback(e,t={timeout:100}){let i=this.__requestIdleCallbackNative(e,t);return this.__requestsIdle.add(i),i}requestIdlePromise(e){return this.promise(t=>{let i=this.requestIdleCallback(()=>t(i),e)})}schedulerPostTask(e,t={delay:0,priority:"user-visible"}){let i=new AbortController;if(t.signal&&t.signal.addEventListener("abort",()=>i.abort()),this.__controllers.add(i),void 0!==globalThis.scheduler){let n=globalThis.scheduler.postTask(e,{...t,signal:i.signal});return n.finally(()=>{this.__controllers.delete(i)}).catch(()=>null),n}return this.promise((n,o)=>{let r=this.setTimeout(()=>{try{n(e())}catch(e){o(e)}this.__controllers.delete(i)},t.delay||1);i.signal.addEventListener("abort",()=>{this.clearTimeout(r),this.__controllers.delete(i),o((0,f.abort)())})})}schedulerYield(){return this.schedulerPostTask(()=>{},{priority:"user-visible"})}cancelIdleCallback(e){return this.__requestsIdle.delete(e),this.__cancelIdleCallbackNative(e)}requestAnimationFrame(e){let t=requestAnimationFrame(e);return this.__requestsRaf.add(t),t}cancelAnimationFrame(e){this.__requestsRaf.delete(e),cancelAnimationFrame(e)}clear(){this.__requestsIdle.forEach(e=>this.cancelIdleCallback(e)),this.__requestsRaf.forEach(e=>this.cancelAnimationFrame(e)),this.__controllers.forEach(e=>e.abort()),this.timers.forEach(e=>(0,r.clearTimeout)(this.timers.get(e))),this.timers.clear(),this.promisesRejections.forEach(e=>e()),this.promisesRejections.clear()}destruct(){this.clear(),this.isDestructed=!0}constructor(){var e,t,i,o,r,s;(0,n._)(this,"timers",new Map),(0,n._)(this,"__callbacks",new Map),(0,n._)(this,"__queueMicrotaskNative",null!=(e=null==(o=queueMicrotask)?void 0:o.bind(window))?e:Promise.resolve().then.bind(Promise.resolve())),(0,n._)(this,"promisesRejections",new Set),(0,n._)(this,"__requestsIdle",new Set),(0,n._)(this,"__controllers",new Set),(0,n._)(this,"__requestsRaf",new Set),(0,n._)(this,"__requestIdleCallbackNative",null!=(t=null==(r=window.requestIdleCallback)?void 0:r.bind(window))?t:(e,t)=>{var i;let n=Date.now();return this.setTimeout(()=>{e({didTimeout:!1,timeRemaining:()=>Math.max(0,50-(Date.now()-n))})},null!=(i=null==t?void 0:t.timeout)?i:1)}),(0,n._)(this,"__cancelIdleCallbackNative",null!=(i=null==(s=window.cancelIdleCallback)?void 0:s.bind(window))?i:e=>{this.clearTimeout(e)}),(0,n._)(this,"isDestructed",!1)}}},91231:function(e,t,i){"use strict";i.d(t,{Async:function(){return n.Async}});var n=i(24735)},80251:function(e,t,i){"use strict";i.d(t,{Component:function(){return u}});var n=i(25045),o=i(91231),r=i(69364),s=i(28077),a=i(65946);let l=new Map;class u{get componentName(){return this.__componentName||(this.__componentName="jodit-"+(0,a.kebabCase)(((0,a.isFunction)(this.className)?this.className():"")||(0,a.getClassName)(this))),this.__componentName}getFullElName(e,t,i){let n=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),n.push(`__${e}`)),t&&(n.push("_",t),n.push("_",(0,a.isVoid)(i)?"true":i.toString())),n.join("")}get ownerDocument(){return this.ow.document}get od(){return this.ownerDocument}get ow(){return this.ownerWindow}get(e,t){return(0,a.get)(e,t||this)}get isReady(){return this.componentStatus===r.STATUSES.ready}get isDestructed(){return this.componentStatus===r.STATUSES.destructed}get isInDestruct(){return r.STATUSES.beforeDestruct===this.componentStatus||r.STATUSES.destructed===this.componentStatus}bindDestruct(e){return e.hookStatus(r.STATUSES.beforeDestruct,()=>!this.isInDestruct&&this.destruct()),this}destruct(){this.setStatus(r.STATUSES.destructed),this.async&&(this.async.destruct(),this.async=void 0),l.get(this)&&l.delete(this),this.ownerWindow=void 0}get componentStatus(){return this.__componentStatus}set componentStatus(e){this.setStatus(e)}setStatus(e){return this.setStatusComponent(e,this)}setStatusComponent(e,t){if(e===this.__componentStatus)return;t===this&&(this.__componentStatus=e);let i=Object.getPrototypeOf(this);i&&(0,a.isFunction)(i.setStatusComponent)&&i.setStatusComponent(e,t);let n=l.get(this),o=null==n?void 0:n[e];o&&o.length&&o.forEach(e=>e(t))}hookStatus(e,t){let i=l.get(this);i||(i={},l.set(this,i)),i[e]||(i[e]=[]),i[e].push(t)}static isInstanceOf(e,t){return e instanceof t}constructor(){(0,n._)(this,"__componentName",void 0),(0,n._)(this,"async",new o.Async),(0,n._)(this,"uid",void 0),(0,n._)(this,"ownerWindow",window),(0,n._)(this,"__componentStatus",r.STATUSES.beforeInit),this.uid="jodit-uid-"+(0,s.uniqueUid)()}}(0,n._)(u,"STATUSES",r.STATUSES)},16964:function(e,t,i){"use strict";i.d(t,{Component:function(){return n.Component},STATUSES:function(){return o.STATUSES},ViewComponent:function(){return r.ViewComponent}});var n=i(80251),o=i(69364),r=i(59609)},69364:function(e,t,i){"use strict";i.d(t,{STATUSES:function(){return n}});let n={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},59609:function(e,t,i){"use strict";i.d(t,{ViewComponent:function(){return r}});var n=i(25045),o=i(80251);class r extends o.Component{get j(){return this.jodit}get defaultTimeout(){return this.j.defaultTimeout}i18n(e,...t){return this.j.i18n(e,...t)}setParentView(e){return this.jodit=e,e.components.add(this),this}destruct(){return this.j.components.delete(this),super.destruct()}constructor(e){super(),(0,n._)(this,"jodit",void 0),this.setParentView(e)}}},81937:function(e,t,i){"use strict";i.r(t),i.d(t,{ACCURACY:function(){return V},APP_VERSION:function(){return n},BASE_PATH:function(){return eh},BASE_PATH_IS_MIN:function(){return ep},BR:function(){return W},CLIPBOARD_ID:function(){return eg},COMMAND_KEYS:function(){return U},EMULATE_DBLCLICK_TIMEOUT:function(){return et},ES:function(){return o},FAT_MODE:function(){return u},HOMEPAGE:function(){return c},INSEPARABLE_TAGS:function(){return T},INSERT_AS_HTML:function(){return ei},INSERT_AS_TEXT:function(){return eo},INSERT_CLEAR_HTML:function(){return en},INSERT_ONLY_TEXT:function(){return er},INVISIBLE_SPACE:function(){return p},INVISIBLE_SPACE_REG_EXP:function(){return m},INVISIBLE_SPACE_REG_EXP_END:function(){return g},INVISIBLE_SPACE_REG_EXP_START:function(){return v},IS_BLOCK:function(){return C},IS_ES_MODERN:function(){return r},IS_ES_NEXT:function(){return s},IS_IE:function(){return X},IS_INLINE:function(){return k},IS_MAC:function(){return ea},IS_PROD:function(){return a},IS_TEST:function(){return l},KEY_ALIASES:function(){return el},KEY_ALT:function(){return P},KEY_BACKSPACE:function(){return j},KEY_DELETE:function(){return F},KEY_DOWN:function(){return B},KEY_ENTER:function(){return L},KEY_ESC:function(){return A},KEY_F3:function(){return q},KEY_LEFT:function(){return M},KEY_META:function(){return D},KEY_RIGHT:function(){return R},KEY_SPACE:function(){return O},KEY_TAB:function(){return z},KEY_UP:function(){return N},LIST_TAGS:function(){return E},MARKER_CLASS:function(){return ee},MODE_SOURCE:function(){return K},MODE_SPLIT:function(){return G},MODE_WYSIWYG:function(){return Y},NBSP_SPACE:function(){return f},NEARBY:function(){return H},NO_EMPTY_TAGS:function(){return x},PARAGRAPH:function(){return $},PASSIVE_EVENTS:function(){return e_},SAFE_COUNT_CHANGE_CALL:function(){return es},SET_TEST:function(){return d},SOURCE_CONSUMER:function(){return ev},SPACE_REG_EXP:function(){return _},SPACE_REG_EXP_END:function(){return y},SPACE_REG_EXP_START:function(){return b},TEMP_ATTR:function(){return ef},TEXT_HTML:function(){return Z},TEXT_PLAIN:function(){return J},TEXT_RTF:function(){return Q},TOKENS:function(){return h},globalDocument:function(){return w},globalWindow:function(){return S},lang:function(){return em}});let n="4.12.2",o="es2018",r=!0,s=!1,a=!0,l=!1,u=!1,c="https://xdsoft.net/jodit/",d=()=>l=!0,h={},p="\uFEFF",f="\xa0",m=()=>/[\uFEFF]/g,g=()=>/[\uFEFF]+$/g,v=()=>/^[\uFEFF]+/g,_=()=>/[\s\n\t\r\uFEFF\u200b]+/g,b=()=>/^[\s\n\t\r\uFEFF\u200b]+/g,y=()=>/[\s\n\t\r\uFEFF\u200b]+$/g,S="u">typeof window?window:void 0,w="u">typeof document?document:void 0,C=/^(ADDRESS|ARTICLE|ASIDE|BLOCKQUOTE|CANVAS|DD|DFN|DIV|DL|DT|FIELDSET|FIGCAPTION|FIGURE|FOOTER|FORM|H[1-6]|HEADER|HGROUP|HR|LI|MAIN|NAV|NOSCRIPT|OUTPUT|P|PRE|RUBY|SCRIPT|STYLE|OBJECT|OL|SECTION|IFRAME|JODIT|JODIT-MEDIA|UL|TR|TD|TH|TBODY|THEAD|TFOOT|TABLE|BODY|HTML|VIDEO)$/i,k=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,E=new Set(["ul","ol"]),I=["img","video","svg","iframe","script","input","textarea","link","jodit","jodit-media"],T=new Set([...I,"br","hr"]),x=new Set(I),D="Meta",j="Backspace",z="Tab",L="Enter",A="Escape",P="Alt",M="ArrowLeft",N="ArrowUp",R="ArrowRight",B="ArrowDown",O="Space",F="Delete",q="F3",H=5,V=10,U=[D,j,F,N,B,R,M,L,A,q,z],W="br",$="p",Y=1,K=2,G=3,X="u">typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),J=X?"text":"text/plain",Z=X?"html":"text/html",Q=X?"rtf":"text/rtf",ee="jodit-selection_marker",et=300,ei="insert_as_html",en="insert_clear_html",eo="insert_as_text",er="insert_only_text",es=10,ea=void 0!==S&&/Mac|iPod|iPhone|iPad/.test(S.navigator.platform),el={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:ea?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:"space",spacebar:"space",up:"arrowup",win:"meta",windows:"meta"},eu=e=>{let t=e.split("/");return/\.js/.test(t[t.length-1])?{basePath:t.slice(0,t.length-1).join("/")+"/",isMin:!0}:{basePath:e,isMin:!0}},{basePath:ec,isMin:ed}=(()=>{if("u"<typeof document)return{basePath:"",isMin:!0};let e=w.currentScript;if(e)return eu(e.src);let t=w.querySelectorAll("script[src]");return t&&t.length?eu(t[t.length-1].src):eu(S.location.href)})(),eh=ec,ep=ed,ef="data-jodit-temp",em={},eg="clipboard",ev="source-consumer",e_=new Set(["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"])},76517:function(e,t,i){"use strict";i.d(t,{Create:function(){return l}});var n=i(25045),o=i(81937),r=i(23211),s=i(65946),a=i(28712);class l{get doc(){return(0,s.isFunction)(this.document)?this.document():this.document}element(e,t,i){let n=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(n),t&&((0,s.isPlainObject)(t)?(0,s.attr)(n,t):i=t),i&&(0,s.asArray)(i).forEach(e=>n.appendChild((0,s.isString)(e)?this.fromHTML(e):e)),n}div(e,t,i){let n=this.element("div",t,i);return e&&(n.className=e),n}sandbox(){var e;let t=this.element("iframe",{sandbox:"allow-same-origin"});this.doc.body.appendChild(t);let i=null==(e=t.contentWindow)?void 0:e.document;if((0,a.assert)(i,"iframe.contentWindow.document"),!i)throw Error("Iframe error");return i.open(),i.write("<!DOCTYPE html><html><head></head><body></body></html>"),i.close(),[i.body,t]}span(e,t,i){let n=this.element("span",t,i);return e&&(n.className=e),n}a(e,t,i){let n=this.element("a",t,i);return e&&(n.className=e),n}text(e){return this.doc.createTextNode(e)}fake(){return this.text(o.INVISIBLE_SPACE)}fragment(){return this.doc.createDocumentFragment()}fromHTML(e,t){let i=this.div();i.innerHTML=e.toString();let n=i.firstChild===i.lastChild&&i.firstChild?i.firstChild:i;if(r.Dom.safeRemove(n),t){let e=(0,s.refs)(n);Object.keys(t).forEach(i=>{let n=e[i];n&&!1===t[i]&&r.Dom.hide(n)})}return n}applyCreateAttributes(e){if(this.createAttributes){let t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){let i=t[e.tagName.toLowerCase()];(0,s.isFunction)(i)?i(e):(0,s.isPlainObject)(i)&&(0,s.attr)(e,i)}}}constructor(e,t){(0,n._)(this,"document",void 0),(0,n._)(this,"createAttributes",void 0),this.document=e,this.createAttributes=t}}},79821:function(e,t,i){"use strict";i.d(t,{Create:function(){return n.Create}});var n=i(76517)},49574:function(e,t,i){"use strict";i.d(t,{autobind:function(){return o}});var n=i(91565);function o(e,t,i){if(!(0,n.isFunction)(i.value))throw TypeError(`@autobind can only be applied to methods, but "${t}" is not a function`);let o=i.value;return{configurable:!0,get(){let e=o.bind(this);return Object.defineProperty(this,t,{value:e,configurable:!0,writable:!0}),e}}}},51676:function(e,t,i){"use strict";i.d(t,{cache:function(){return l},cacheHTML:function(){return u},cached:function(){return a}});var n=i(69364),o=i(23211),r=i(28686),s=i(38027);function a(e,t){let i=Object.getOwnPropertyDescriptor(e,t);return!i||(0,r.isFunction)(i.get)?null:i.value}function l(e,t,i){let n=i.get;if(!n)throw(0,s.error)("Getter property descriptor expected");i.get=function(){let e=n.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:i.configurable,enumerable:i.enumerable,writable:!1,value:e}),e}}function u(e,t,i){let a=i.value;if(!(0,r.isFunction)(a))throw(0,s.error)("Handler must be a Function");let l=!0,u=new WeakMap;i.value=function(...e){if(l&&u.has(this.constructor)){var t;return null==(t=u.get(this.constructor))?void 0:t.cloneNode(!0)}let i=a.apply(this,e);return l&&o.Dom.isElement(i)&&u.set(this.constructor,i),l?i.cloneNode(!0):i},e.hookStatus(n.STATUSES.ready,e=>{l=!!((0,r.isViewObject)(e)?e:e.jodit).options.cache})}},91672:function(e,t,i){"use strict";i.d(t,{component:function(){return s},getComponentClass:function(){return a}});var n=i(81937),o=i(421);let r=new Map;function s(e){class t extends e{constructor(...e){super(...e),this.constructor===t&&(this instanceof t||Object.setPrototypeOf(this,t.prototype),this.setStatus("ready"))}}let i=(0,o.getClassName)(e.prototype);if(r.has(i)&&!n.IS_PROD)throw Error(`Component with name "${i}" is already registered`);return r.set(i,t),t}function a(e){return r.get(e)}},55184:function(e,t,i){"use strict";i.d(t,{debounce:function(){return a},throttle:function(){return l}});var n=i(16964),o=i(28686),r=i(28712),s=i(33201);function a(e,t=!1,i="debounce"){return(a,l)=>{let u=a[l];if(!(0,o.isFunction)(u))throw(0,s.error)("Handler must be a Function");return a.hookStatus(n.STATUSES.ready,n=>{let{async:s}=n;(0,r.assert)(null!=s,`Component ${n.componentName||n.constructor.name} should have "async:IAsync" field`);let a=(0,o.isFunction)(e)?e(n):e,u=(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:n.defaultTimeout;Object.defineProperty(n,l,{configurable:!0,value:s[i](n[l].bind(n),u,t)})}),{configurable:!0,get(){return u.bind(this)}}}}function l(e,t=!1){return a(e,t,"throttle")}},24968:function(e,t,i){"use strict";i.d(t,{derive:function(){return o}});var n=i(91565);function o(...e){return t=>{let i=t.prototype;for(let t=0;t<e.length;t++){let o=e[t],r=Object.getOwnPropertyNames(o.prototype);for(let e=0;e<r.length;e++){let t=r[e],s=Object.getOwnPropertyDescriptor(o.prototype,t);null!=s&&(0,n.isFunction)(s.value)&&!(0,n.isFunction)(i[t])&&Object.defineProperty(i,t,{enumerable:!0,configurable:!0,writable:!0,value:function(...e){return s.value.call(this,...e)}})}}}}},29200:function(e,t,i){"use strict";i.d(t,{hook:function(){return r}});var n=i(91565),o=i(33201);function r(e){return(t,i)=>{if(!(0,n.isFunction)(t[i]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,e=>{e[i].call(e)})}}},35718:function(e,t,i){"use strict";i.d(t,{idle:function(){return s}});var n=i(16964),o=i(91565),r=i(33201);function s(){return(e,t)=>{if(!(0,o.isFunction)(e[t]))throw(0,r.error)("Handler must be a Function");e.hookStatus(n.STATUSES.ready,e=>{let{async:i}=e,n=e[t];e[t]=(...t)=>i.requestIdleCallback(n.bind(e,...t))})}}},84839:function(e,t,i){"use strict";i.r(t),i.d(t,{autobind:function(){return n.autobind},cache:function(){return o.cache},cacheHTML:function(){return o.cacheHTML},cached:function(){return o.cached},component:function(){return r.component},debounce:function(){return s.debounce},derive:function(){return a.derive},getComponentClass:function(){return r.getComponentClass},hook:function(){return l.hook},idle:function(){return u.idle},nonenumerable:function(){return c.nonenumerable},persistent:function(){return d.persistent},throttle:function(){return s.throttle},wait:function(){return h.wait},watch:function(){return p.watch}});var n=i(49574),o=i(51676),r=i(91672),s=i(55184),a=i(24968),l=i(29200),u=i(35718),c=i(41360),d=i(77036),h=i(80840),p=i(68616)},41360:function(e,t,i){"use strict";i.d(t,{nonenumerable:function(){return n}});let n=(e,t)=>{!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}},77036:function(e,t,i){"use strict";i.d(t,{persistent:function(){return r}});var n=i(69364),o=i(31534);function r(e,t){e.hookStatus(n.STATUSES.ready,e=>{let i=(0,o.isViewObject)(e)?e:e.jodit,n=`${i.options.namespace}${e.componentName}_prop_${t}`,r=e[t];Object.defineProperty(e,t,{get(){var e;return null!=(e=i.storage.get(n))?e:r},set(e){i.storage.set(n,e)}})})}},80840:function(e,t,i){"use strict";i.d(t,{wait:function(){return s}});var n=i(69364),o=i(91565),r=i(33201);function s(e){return(t,i)=>{let s=t[i];if(!(0,o.isFunction)(s))throw(0,r.error)("Handler must be a Function");t.hookStatus(n.STATUSES.ready,t=>{let{async:n}=t,o=t[i],r=0;Object.defineProperty(t,i,{configurable:!0,value:function i(...s){n.clearTimeout(r),e(t)?o.apply(t,s):r=n.setTimeout(()=>i(...s),10)}})})}}},68616:function(e,t,i){"use strict";i.d(t,{watch:function(){return d}});var n=i(69364),o=i(70535),r=i(32328),s=i(91565),a=i(62101),l=i(31534),u=i(33201),c=i(71125);function d(e,t){return(i,d)=>{var h;if(!(0,s.isFunction)(i[d]))throw(0,u.error)("Handler must be a Function");let p=null==(h=null==t?void 0:t.immediately)||h,f=null==t?void 0:t.context,m=t=>{let n=(0,l.isViewObject)(t)?t:t.jodit,u=(e,...i)=>{if(!t.isInDestruct)return t[d](e,...i)};p||(u=t.async.microDebounce(u,!0)),(0,r.splitArray)(e).forEach(e=>{if(/:/.test(e)){let[i,o]=e.split(":"),r=f;i.length&&(r=t.get(i)),(0,s.isFunction)(r)&&(r=r(t)),n.events.on(r||t,o,u),r||n.events.on(o,u),t.hookStatus("beforeDestruct",()=>{n.events.off(r||t,o,u).off(o,u)});return}let r=e.split("."),[l]=r,d=r.slice(1),h=t[l];(0,a.isPlainObject)(h)&&(0,o.observable)(h).on(`change.${d.join(".")}`,u);let p=(0,c.getPropertyDescriptor)(i,l);Object.defineProperty(t,l,{configurable:!0,set(e){let i=h;i!==e&&(h=e,p&&p.set&&p.set.call(t,e),(0,a.isPlainObject)(h)&&(h=(0,o.observable)(h)).on(`change.${d.join(".")}`,u),u(l,i,h))},get(){return p&&p.get?p.get.call(t):h}})})};(0,s.isFunction)(i.hookStatus)?i.hookStatus(n.STATUSES.ready,m):m(i)}}},23211:function(e,t,i){"use strict";i.d(t,{Dom:function(){return _}});var n=i(81937),o=i(88475),r=i(17312),s=i(91565),a=i(46248),l=i(3213),u=i(85932),c=i(18303),d=i(4040),h=i(28712),p=i(7909),f=i(80991),m=i(36400),g=i(33201),v=i(71125);class _{static detach(e){for(;e&&e.firstChild;)e.removeChild(e.firstChild)}static wrapNextInline(e,t,i){let n,o=e;i.s.save();let r=!1;do r=!1,(n=o.nextSibling)&&!_.isBlock(n)&&!_.isTag(n,"br")&&(r=!0,o=n);while(r);return _.__wrapElements(t,i,e,o)}static __wrapElements(e,t,i,n){let o=(0,u.isString)(e)?t.createInside.element(e):e;i.parentNode&&i.parentNode.insertBefore(o,i);let r=i;for(;r&&(r=i.nextSibling,o.appendChild(i),i!==n&&r);)i=r;return t.s.restore(),o}static wrapInline(e,t,i){let n,o=e,r=e;i.s.save();let s=!1;do s=!1,(n=o.previousSibling)&&!_.isBlock(n)&&(s=!0,o=n);while(s);do s=!1,(n=r.nextSibling)&&!_.isBlock(n)&&(s=!0,r=n);while(s);return _.__wrapElements(t,i,o,r)}static wrap(e,t,i){let n=(0,u.isString)(t)?i.element(t):t;if(_.isNode(e)){if(!e.parentNode)throw(0,g.error)("Element should be in DOM");e.parentNode.insertBefore(n,e),n.appendChild(e)}else{let t=e.extractContents();e.insertNode(n),n.appendChild(t)}return n}static unwrap(e){let t=e.parentNode;if(t){for(;e.firstChild;)t.insertBefore(e.firstChild,e);_.safeRemove(e)}}static between(e,t,i){let n=e;for(;n&&n!==t&&!(e!==n&&i(n));){let e=n.firstChild||n.nextSibling;if(!e){for(;n&&!n.nextSibling;)n=n.parentNode;e=null==n?void 0:n.nextSibling}n=e}}static replace(e,t,i,n=!1,r=!1){let s;if((0,a.isHTML)(t)&&((0,h.assert)(i,"Need create instance for new tag"),t=i.fromHTML(t)),(0,u.isString)(t)?((0,h.assert)(i,"Need create instance for new tag"),s=i.element(t)):s=t,!r)for(;e.firstChild;)s.appendChild(e.firstChild);return n&&_.isElement(e)&&_.isElement(s)&&(0,o.toArray)(e.attributes).forEach(e=>{s.setAttribute(e.name,e.value)}),e.parentNode&&e.parentNode.replaceChild(s,e),s}static isEmptyTextNode(e){return _.isText(e)&&(!e.nodeValue||0===e.nodeValue.replace(n.INVISIBLE_SPACE_REG_EXP(),"").trim().length)}static isEmptyContent(e){return _.each(e,e=>_.isEmptyTextNode(e))}static isContentEditable(e,t){return _.isNode(e)&&!_.closest(e,e=>_.isElement(e)&&"false"===e.getAttribute("contenteditable"),t)}static isEmpty(e,t=n.NO_EMPTY_TAGS){let i;if(!e)return!0;i=(0,s.isFunction)(t)?t:e=>t.has(e.nodeName.toLowerCase());let o=e=>null==e.nodeValue||0===(0,d.trim)(e.nodeValue).length;return _.isText(e)?o(e):!(_.isElement(e)&&i(e))&&_.each(e,e=>{if(_.isText(e)&&!o(e)||_.isElement(e)&&i(e))return!1})}static isNode(e){return!!(e&&(0,u.isString)(e.nodeName)&&"number"==typeof e.nodeType&&e.childNodes&&(0,s.isFunction)(e.appendChild))}static isCell(e){return _.isNode(e)&&("TD"===e.nodeName||"TH"===e.nodeName)}static isList(e){return _.isTag(e,n.LIST_TAGS)}static isLeaf(e){return _.isTag(e,"li")}static isImage(e){return _.isNode(e)&&/^(img|svg|picture|canvas)$/i.test(e.nodeName)}static isBlock(e){return!(0,c.isVoid)(e)&&"object"==typeof e&&_.isNode(e)&&n.IS_BLOCK.test(e.nodeName)}static isText(e){return!!(e&&e.nodeType===Node.TEXT_NODE)}static isComment(e){return!!(e&&e.nodeType===Node.COMMENT_NODE)}static isElement(e){var t;return!!_.isNode(e)&&!!((null==(t=e.ownerDocument)?void 0:t.defaultView)&&e.nodeType===Node.ELEMENT_NODE)}static isFragment(e){var t;return!!_.isNode(e)&&!!((null==(t=e.ownerDocument)?void 0:t.defaultView)&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)}static isHTMLElement(e){var t;if(!_.isNode(e))return!1;let i=null==(t=e.ownerDocument)?void 0:t.defaultView;return!!(i&&e instanceof i.HTMLElement)}static isInlineBlock(e){return _.isElement(e)&&!/^(BR|HR)$/i.test(e.tagName)&&-1!==["inline","inline-block"].indexOf((0,f.css)(e,"display").toString())}static canSplitBlock(e){return!(0,c.isVoid)(e)&&_.isHTMLElement(e)&&_.isBlock(e)&&!/^(TD|TH|CAPTION|FORM)$/.test(e.nodeName)&&void 0!==e.style&&!/^(fixed|absolute)/i.test(e.style.position)}static first(e,t){let i=null==e?void 0:e.firstChild;if(!i)return null;do{if(t(i))return i;let n=i.firstChild;if(n||(n=i.nextSibling),!n&&i.parentNode!==e){do i=i.parentNode;while(i&&!(null==i?void 0:i.nextSibling)&&i.parentNode!==e);n=null==i?void 0:i.nextSibling}i=n}while(i);return null}static last(e,t){let i=null==e?void 0:e.lastChild;if(!i)return null;do{if(t(i))return i;let n=i.lastChild;if(n||(n=i.previousSibling),!n&&i.parentNode!==e){do i=i.parentNode;while(i&&!(null==i?void 0:i.previousSibling)&&i.parentNode!==e);n=null==i?void 0:i.previousSibling}i=n}while(i);return null}static prev(e,t,i,n=!0){return _.find(e,t,i,!1,n)}static next(e,t,i,n=!0){return _.find(e,t,i,!0,n)}static prevWithClass(e,t){return _.prev(e,e=>_.isElement(e)&&e.classList.contains(t),e.parentNode)}static nextWithClass(e,t){return _.next(e,e=>_.isElement(e)&&e.classList.contains(t),e.parentNode)}static find(e,t,i,n=!0,o=!0){let r=this.nextGen(e,i,n,o),s=r.next();for(;!s.done;){if(t(s.value))return s.value;s=r.next()}return null}static*nextGen(e,t,i=!0,n=!0){let o=[],r=e;do{let t=i?r.nextSibling:r.previousSibling;for(;t;)o.unshift(t),t=i?t.nextSibling:t.previousSibling;yield*this.runInStack(e,o,i,n),r=r.parentNode}while(r&&r!==t);return null}static each(e,t,i=!0){let n=this.eachGen(e,i),o=n.next();for(;!o.done;){if(!1===t(o.value))return!1;o=n.next()}return!0}static eachGen(e,t=!0){return this.runInStack(e,[e],t)}static*runInStack(e,t,i,n=!0){for(;t.length;){let o=t.pop();if(n){let e=i?o.lastChild:o.firstChild;for(;e;)t.push(e),e=i?e.previousSibling:e.nextSibling}e!==o&&(yield o)}}static findWithCurrent(e,t,i,n="nextSibling",o="firstChild"){let r=e;do{if(t(r))return r||null;if(o&&r&&r[o]){let e=_.findWithCurrent(r[o],t,r,n,o);if(e)return e}for(;r&&!r[n]&&r!==i;)r=r.parentNode;r&&r[n]&&r!==i&&(r=r[n])}while(r&&r!==i);return null}static findSibling(e,t=!0,i=e=>!_.isEmptyTextNode(e)){let n=_.sibling(e,t);for(;n&&!i(n);)n=_.sibling(n,t);return n&&i(n)?n:null}static findNotEmptySibling(e,t){return _.findSibling(e,t,e=>{var t;return!_.isEmptyTextNode(e)&&!!(!_.isText(e)||(null==(t=e.nodeValue)?void 0:t.length)&&(0,d.trim)(e.nodeValue))})}static findNotEmptyNeighbor(e,t,i){return(0,v.call)(t?_.prev:_.next,e,e=>!!(e&&(!(_.isText(e)||_.isComment(e))||(0,d.trim)((null==e?void 0:e.nodeValue)||"").length)),i)}static sibling(e,t){return t?e.previousSibling:e.nextSibling}static up(e,t,i,n=!1){let o=e;if(!o)return null;do{if(t(o))return o;if(o===i||!o.parentNode)break;o=o.parentNode}while(o&&o!==i);return o===i&&n&&t(o)?o:null}static closest(e,t,i){let n,o=e=>e.toLowerCase();if((0,s.isFunction)(t))n=t;else if((0,r.isArray)(t)||(0,l.isSet)(t)){let e=(0,l.isSet)(t)?t:new Set(t.map(o));n=t=>!!(t&&e.has(o(t.nodeName)))}else n=e=>!!(e&&o(t)===o(e.nodeName));return _.up(e,n,i)}static furthest(e,t,i){let n=null,o=null==e?void 0:e.parentElement;for(;o&&o!==i;)t(o)&&(n=o),o=null==o?void 0:o.parentElement;return n}static appendChildFirst(e,t){let i=e.firstChild;i?i!==t&&e.insertBefore(t,i):e.appendChild(t)}static after(e,t){let{parentNode:i}=e;i&&(i.lastChild===e?i.appendChild(t):i.insertBefore(t,e.nextSibling))}static before(e,t){let{parentNode:i}=e;i&&i.insertBefore(t,e)}static prepend(e,t){e.insertBefore(t,e.firstChild)}static append(e,t){(0,r.isArray)(t)?t.forEach(t=>{this.append(e,t)}):e.appendChild(t)}static moveContent(e,t,i=!1,r=()=>!0){let s=(e.ownerDocument||n.globalDocument).createDocumentFragment();(0,o.toArray)(e.childNodes).filter(e=>!!r(e)||(_.safeRemove(e),!1)).forEach(e=>{s.appendChild(e)}),i&&t.firstChild?t.insertBefore(s,t.firstChild):t.appendChild(s)}static isOrContains(e,t,i=!1){return e===t?!i:!!(t&&e&&this.up(t,t=>t===e,e,!0))}static safeRemove(...e){e.forEach(e=>_.isNode(e)&&e.parentNode&&e.parentNode.removeChild(e))}static safeInsertNode(e,t){e.collapsed||e.deleteContents();let i=_.isFragment(t)?t.lastChild:t;e.startContainer===e.endContainer&&e.collapsed&&_.isTag(e.startContainer,n.INSEPARABLE_TAGS)?_.after(e.startContainer,t):(e.insertNode(t),i&&e.setStartBefore(i)),e.collapse(!0),[t.nextSibling,t.previousSibling].forEach(e=>_.isText(e)&&!e.nodeValue&&_.safeRemove(e))}static hide(e){e&&((0,m.dataBind)(e,"__old_display",e.style.display),e.style.display="none")}static show(e){if(!e)return;let t=(0,m.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}static isTag(e,t){if(!this.isElement(e))return!1;let i=e.tagName.toLowerCase(),n=e.tagName.toUpperCase();if(t instanceof Set)return t.has(i)||t.has(n);if(Array.isArray(t))throw TypeError("Dom.isTag does not support array");return i===t||n===t}static markTemporary(e,t){return t&&(0,p.attr)(e,t),(0,p.attr)(e,n.TEMP_ATTR,!0),e}static isTemporary(e){return!!_.isElement(e)&&(_.isMarker(e)||"true"===(0,p.attr)(e,n.TEMP_ATTR))}static isMarker(e){return _.isNode(e)&&_.isTag(e,"span")&&e.hasAttribute("data-"+n.MARKER_CLASS)}static replaceTemporaryFromString(e){return e.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")}static temporaryList(e){return(0,o.toArray)(e.querySelectorAll(`[${n.TEMP_ATTR}]`))}constructor(){throw Error("Dom is static module")}}},27795:function(e,t,i){"use strict";i.d(t,{Dom:function(){return n.Dom},LazyWalker:function(){return o.LazyWalker}});var n=i(23211),o=i(1080)},1080:function(e,t,i){"use strict";i.d(t,{LazyWalker:function(){return l}});var n=i(25045),o=i(31635),r=i(49574),s=i(23211),a=i(60216);class l extends a.Eventify{setWork(e){return this.isWorked&&this.break(),this.workNodes=s.Dom.eachGen(e,!this.options.reverse),this.isFinished=!1,this._requestStarting(),this}_requestStarting(){this.__schedulerController=new AbortController,this.async.schedulerPostTask(this.__workPerform,{delay:this.options.timeout,signal:this.__schedulerController.signal}).catch(()=>null)}break(e){this.isWorked&&(this.stop(),this.emit("break",e))}end(){this.isWorked&&(this.stop(),this.emit("end",this.hadAffect),this.hadAffect=!1)}stop(){this.isWorked=!1,this.isFinished=!0,this.workNodes=null,this.async.cancelIdleCallback(this.idleId)}destruct(){super.destruct(),this.stop()}__workPerform(){if(this.workNodes){var e;this.isWorked=!0;let t=0,i=null!=(e=this.options.timeoutChunkSize)?e:50;for(;!this.isFinished&&t<=i;){let e=this.workNodes.next();if(t+=1,this.visitNode(e.value)&&(this.hadAffect=!0),e.done)return void this.end()}}else this.end();this.isFinished||this._requestStarting()}visitNode(e){var t;return!!e&&(void 0===this.options.whatToShow||e.nodeType===this.options.whatToShow)&&null!=(t=this.emit("visit",e))&&t}constructor(e,t={}){super(),(0,n._)(this,"async",void 0),(0,n._)(this,"options",void 0),(0,n._)(this,"workNodes",void 0),(0,n._)(this,"hadAffect",void 0),(0,n._)(this,"isWorked",void 0),(0,n._)(this,"isFinished",void 0),(0,n._)(this,"idleId",void 0),(0,n._)(this,"__schedulerController",void 0),this.async=e,this.options=t,this.workNodes=null,this.hadAffect=!1,this.isWorked=!1,this.isFinished=!1,this.idleId=0,this.__schedulerController=null}}(0,o.__decorate)([r.autobind],l.prototype,"__workPerform",null)},93747:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return d}});var n=i(25045),o=i(81937),r=i(32328),s=i(17312),a=i(91565),l=i(85932),u=i(33201),c=i(18869);class d{mute(e){return this.__mutedEvents.add(null!=e?e:"*"),this}isMuted(e){return!!(e&&this.__mutedEvents.has(e))||this.__mutedEvents.has("*")}unmute(e){return this.__mutedEvents.delete(null!=e?e:"*"),this}__eachEvent(e,t){(0,r.splitArray)(e).map(e=>e.trim()).forEach(e=>{let i=e.split("."),n=i[1]||c.defaultNameSpace;t.call(this,i[0],n)})}__getStore(e){if(!e)throw(0,u.error)("Need subject");if(void 0===e[this.__key]){let t=new c.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:t})}return e[this.__key]}__removeStoreFromSubject(e){void 0!==e[this.__key]&&Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,writable:!0,value:void 0})}__triggerNativeEvent(e,t){let i=this.__doc.createEvent("HTMLEvents");(0,l.isString)(t)?i.initEvent(t,!0,!0):(i.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach(e=>{Object.defineProperty(i,e,{value:t[e],enumerable:!0})}),Object.defineProperty(i,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(i)}get current(){return this.currents[this.currents.length-1]}on(e,t,i,n){let r,c,d,p;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(r=this,c=e,d=t,p=i):(r=e,c=t,d=i,p=n),!((0,l.isString)(c)||(0,l.isStringArray)(c))||0===c.length)throw(0,u.error)("Need events names");if(!(0,a.isFunction)(d))throw(0,u.error)("Need event handler");if((0,s.isArray)(r))return r.forEach(e=>{this.on(e,c,d,p)}),this;let f=r,m=this.__getStore(f),g=this,v=function(e,...t){if(!g.isMuted(e))return d&&d.call(this,...t)};return h(f)&&(v=function(e){if(!g.isMuted(e.type)&&(g.__prepareEvent(e),d&&!1===d.call(this,e)))return e.preventDefault(),e.stopImmediatePropagation(),!1}),this.__eachEvent(c,(e,t)=>{if(0===e.length)throw(0,u.error)("Need event name");if(!1===m.indexOf(e,t,d)){let r={event:e,originalCallback:d,syntheticCallback:v};if(m.set(e,t,r,null==p?void 0:p.top),h(f)){var i,n;let t=o.PASSIVE_EVENTS.has(e)?{passive:!0,capture:null!=(i=null==p?void 0:p.capture)&&i}:null!=(n=null==p?void 0:p.capture)&&n;v.options=t,f.addEventListener(e,v,t),this.__memoryDOMSubjectToHandler(f,v)}}}),this}__memoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap.get(e)||new Set;i.add(t),this.__domEventsMap.set(e,i)}__unmemoryDOMSubjectToHandler(e,t){let i=this.__domEventsMap,n=i.get(e)||new Set;n.delete(t),n.size?i.set(e,n):i.delete(e)}one(e,t,i,n){let o,r,s,a;(0,l.isString)(e)||(0,l.isStringArray)(e)?(o=this,r=e,s=t,a=i):(o=e,r=t,s=i,a=n);let u=(...e)=>(this.off(o,r,u),s(...e));return this.on(o,r,u,a),this}off(e,t,i){let n,o,r;if((0,l.isString)(e)||(0,l.isStringArray)(e)?(n=this,o=e,r=t):(n=e,o=t,r=i),(0,s.isArray)(n))return n.forEach(e=>{this.off(e,o,r)}),this;let u=n,d=this.__getStore(u);if(!((0,l.isString)(o)||(0,l.isStringArray)(o))||0===o.length)return d.namespaces().forEach(e=>{this.off(u,"."+e)}),this.__removeStoreFromSubject(u),this;let p=e=>{if(h(u)){var t;u.removeEventListener(e.event,e.syntheticCallback,null!=(t=e.syntheticCallback.options)&&t),this.__unmemoryDOMSubjectToHandler(u,e.syntheticCallback)}},f=(e,t)=>{if(""===e)return void d.events(t).forEach(e=>{""!==e&&f(e,t)});let i=d.get(e,t);if(i&&i.length)if((0,a.isFunction)(r)){let n=d.indexOf(e,t,r);!1!==n&&(p(i[n]),i.splice(n,1),i.length||d.clearEvents(t,e))}else i.forEach(p),i.length=0,d.clearEvents(t,e)};return this.__eachEvent(o,(e,t)=>{t===c.defaultNameSpace?d.namespaces().forEach(t=>{f(e,t)}):f(e,t)}),d.isEmpty()&&this.__removeStoreFromSubject(u),this}stopPropagation(e,t){let i=(0,l.isString)(e)?this:e,n=(0,l.isString)(e)?e:t;if("string"!=typeof n)throw(0,u.error)("Need event names");let o=this.__getStore(i);this.__eachEvent(n,(e,t)=>{let n=o.get(e,t);n&&this.__stopped.push(n),t===c.defaultNameSpace&&o.namespaces(!0).forEach(t=>this.stopPropagation(i,e+"."+t))})}__removeStop(e){if(e){let t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}}__isStopped(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)}fire(e,t,...i){let n,o,r=(0,l.isString)(e)?this:e,s=(0,l.isString)(e)?e:t,a=(0,l.isString)(e)?[t,...i]:i;if(!h(r)&&!(0,l.isString)(s))throw(0,u.error)("Need events names");let d=this.__getStore(r);return!(0,l.isString)(s)&&h(r)?this.__triggerNativeEvent(r,t):this.__eachEvent(s,(e,t)=>{if(h(r))this.__triggerNativeEvent(r,e);else{let i=d.get(e,t);if(i)try{[...i].every(t=>!this.__isStopped(i)&&(this.currents.push(e),o=t.syntheticCallback.call(r,e,...a),this.currents.pop(),void 0!==o&&(n=o),!0))}finally{this.__removeStop(i)}t!==c.defaultNameSpace||h(r)||d.namespaces().filter(e=>e!==t).forEach(t=>{let i=this.fire.apply(this,[r,e+"."+t,...a]);void 0!==i&&(n=i)})}}),n}destruct(){this.__isDestructed||(this.__isDestructed=!0,this.__domEventsMap.forEach((e,t)=>{this.off(t)}),this.__domEventsMap.clear(),this.__mutedEvents.clear(),this.currents.length=0,this.__stopped.length=0,this.off(this),this.__getStore(this).clear(),this.__removeStoreFromSubject(this))}constructor(e){(0,n._)(this,"__domEventsMap",new Map),(0,n._)(this,"__mutedEvents",new Set),(0,n._)(this,"__key","__JoditEventEmitterNamespaces"),(0,n._)(this,"__doc",o.globalDocument),(0,n._)(this,"__prepareEvent",e=>{!e.cancelBubble&&(e.composed&&(0,a.isFunction)(e.composedPath)&&e.composedPath()[0]&&Object.defineProperty(e,"target",{value:e.composedPath()[0],configurable:!0,enumerable:!0}),e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach(t=>{Object.defineProperty(e,t,{value:e.changedTouches[0][t],configurable:!0,enumerable:!0})}),e.originalEvent||(e.originalEvent=e),"paste"===e.type&&void 0===e.clipboardData&&this.__doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:()=>this.__doc.defaultView.clipboardData,configurable:!0,enumerable:!0}))}),(0,n._)(this,"currents",[]),(0,n._)(this,"__stopped",[]),(0,n._)(this,"__isDestructed",!1),e&&(this.__doc=e),this.__key+=new Date().getTime()}}function h(e){return e&&(0,a.isFunction)(e.addEventListener)}},60216:function(e,t,i){"use strict";i.d(t,{Eventify:function(){return o}});var n=i(25045);class o{on(e,t){var i;return this.__map.has(e)||this.__map.set(e,new Set),null==(i=this.__map.get(e))||i.add(t),this}off(e,t){if(this.__map.has(e)){var i;null==(i=this.__map.get(e))||i.delete(t)}return this}destruct(){this.__map.clear()}emit(e,...t){let i;if(this.__map.has(e)){var n;null==(n=this.__map.get(e))||n.forEach(e=>{i=e(...t)})}return i}constructor(){(0,n._)(this,"__map",new Map)}}},42689:function(e,t,i){"use strict";i.d(t,{eventEmitter:function(){return n}});let n=new(i(93747)).EventEmitter},1496:function(e,t,i){"use strict";i.d(t,{EventEmitter:function(){return n.EventEmitter},EventHandlersStore:function(){return s.EventHandlersStore},Eventify:function(){return o.Eventify},defaultNameSpace:function(){return s.defaultNameSpace},observable:function(){return r.observable}});var n=i(93747),o=i(60216),r=i(70535),s=i(18869)},70535:function(e,t,i){"use strict";i.d(t,{observable:function(){return u}});var n=i(17312),o=i(94013),r=i(62101),s=i(71125);let a=Symbol("observable-object");function l(e){return void 0!==e[a]}function u(e){if(l(e))return e;let t={},i={},u=(t,o)=>((0,n.isArray)(t)?t.map(e=>u(e,o)):(i[t]||(i[t]=[]),i[t].push(o)),e),c=(o,...r)=>{if((0,n.isArray)(o))return void o.map(e=>c(e,...r));try{!t[o]&&i[o]&&(t[o]=!0,i[o].forEach(t=>t.call(e,...r)))}finally{t[o]=!1}},d=(t,i=[])=>{let n={};l(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach(a=>{let l=i.concat(a).filter(e=>e.length);n[a]=t[a];let u=(0,s.getPropertyDescriptor)(t,a);Object.defineProperty(t,a,{set:t=>{let i=n[a];if(!(0,o.isFastEqual)(n[a],t)){c(["beforeChange",`beforeChange.${l.join(".")}`],a,t),(0,r.isPlainObject)(t)&&d(t,l),u&&u.set?u.set.call(e,t):n[a]=t;let o=[];c(["change",...l.reduce((e,t)=>(o.push(t),e.push(`change.${o.join(".")}`),e),[])],l.join("."),i,(null==t?void 0:t.valueOf)?t.valueOf():t)}},get:()=>u&&u.get?u.get.call(e):n[a],enumerable:!0,configurable:!0}),(0,r.isPlainObject)(n[a])&&d(n[a],l)}),Object.defineProperty(e,"on",{value:u}))};return d(e),e}},18869:function(e,t,i){"use strict";i.d(t,{EventHandlersStore:function(){return a},defaultNameSpace:function(){return s}});var n=i(25045),o=i(88475),r=i(28712);let s="JoditEventDefaultNamespace";class a{get(e,t){if(this.__store.has(t)){let i=this.__store.get(t);return(0,r.assert)(i,"-"),i[e]}}indexOf(e,t,i){let n=this.get(e,t);if(n){for(let e=0;e<n.length;e+=1)if(n[e].originalCallback===i)return e}return!1}namespaces(e=!1){let t=(0,o.toArray)(this.__store.keys());return e?t.filter(e=>e!==s):t}events(e){let t=this.__store.get(e);return t?Object.keys(t):[]}set(e,t,i,n=!1){let o=this.__store.get(t);o||(o={},this.__store.set(t,o)),void 0===o[e]&&(o[e]=[]),n?o[e].unshift(i):o[e].push(i)}clear(){this.__store.clear()}clearEvents(e,t){let i=this.__store.get(e);i&&i[t]&&(delete i[t],Object.keys(i).length||this.__store.delete(e))}isEmpty(){return 0===this.__store.size}constructor(){(0,n._)(this,"__store",new Map)}}},28077:function(e,t,i){"use strict";i.d(t,{eventEmitter:function(){return C},extendLang:function(){return b},getContainer:function(){return S},getPopupViewRoot:function(){return w},instances:function(){return p},modules:function(){return _},pluginSystem:function(){return v},uniqueUid:function(){return g}});var n=i(24497),o=i(85932),r=i(31534),s=i(74264),a=i(80991),l=i(421),u=i(85305),c=i(42689),d=i(81937),h=i(27795);let p={},f=1,m=new Set;function g(){function e(){return Math.round(f+=10*(Math.random()+1)).toString(16)}let t=e();for(;m.has(t);)t=e();return m.add(t),t}let v=new u.PluginSystem({getContainer:S}),_={},b=e=>{Object.keys(e).forEach(t=>{d.lang[t]?Object.assign(d.lang[t],e[t]):d.lang[t]=e[t]})},y=new WeakMap;function S(e,t,i="div",a=!1){let u=(0,o.isString)(t)?t:t?(0,l.getClassName)(t.prototype):"jodit-utils",c=y.get(e)||{},d=u+i,p=(0,r.isViewObject)(e)?e:e.j,f=null;if(!c[d]){let t=p.c;if(f=w(p.o,p.container,e.od.body),a&&(0,n.isJoditObject)(e)&&e.od!==e.ed){t=e.createInside;let o="style"===i?e.ed.head:e.ed.body;f=(0,n.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:o}let o=t.element(i,{className:`jodit jodit-${(0,s.kebabCase)(u)}-container jodit-box`});o.classList.add(`jodit_theme_${p.o.theme||"default"}`),f.appendChild(o),c[d]=o,e.hookStatus("beforeDestruct",()=>{p.events.off(o),h.Dom.safeRemove(o),delete c[d],Object.keys(c).length&&y.delete(e)}),y.set(e,c),p.events.fire("getContainer",o)}return c[d].classList.remove("jodit_theme_default","jodit_theme_dark"),c[d].classList.add(`jodit_theme_${p.o.theme||"default"}`),c[d]}function w(e,t,i){var n,o,r;return null!=(n=null!=(o=null!=(r=e.popupRoot)?r:e.shadowRoot)?o:h.Dom.closest(t,e=>h.Dom.isHTMLElement(e)&&(h.Dom.isTag(e,"dialog")||["fixed","absolute"].includes((0,a.css)(e,"position"))),i))?n:i}let C=c.eventEmitter},78982:function(e,t,i){"use strict";i.d(t,{asArray:function(){return o}});var n=i(17312);let o=e=>(0,n.isArray)(e)?e:[e]},45664:function(e,t,i){"use strict";i.d(t,{asArray:function(){return n.asArray},splitArray:function(){return o.splitArray},toArray:function(){return r.toArray}});var n=i(78982),o=i(32328),r=i(88475)},32328:function(e,t,i){"use strict";function n(e){return Array.isArray(e)?e:e.split(/[,\s]+/)}i.d(t,{splitArray:function(){return n}})},88475:function(e,t,i){"use strict";i.d(t,{toArray:function(){return r}});var n=i(23283),o=i(43379);let r=function(...e){var t;return((0,n.isNativeFunction)(Array.from)?Array.from:null!=(t=(0,o.reset)("Array.from"))?t:Array.from).apply(Array,e)}},61077:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return n.clearTimeout},setTimeout:function(){return n.setTimeout}});var n=i(79947)},79947:function(e,t,i){"use strict";i.d(t,{clearTimeout:function(){return r},setTimeout:function(){return o}});var n=i(81937);function o(e,t,...i){return t?n.globalWindow.setTimeout(e,t,...i):(e.call(null,...i),0)}function r(e){n.globalWindow.clearTimeout(e)}},98740:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return o}});var n=i(81937);function o(){let e=!0;try{let t=n.globalDocument.createElement("input");t.type="color",t.value="!",e="color"===t.type&&"!"!==t.value}catch(t){e=!1}return e}},28686:function(e,t,i){"use strict";i.d(t,{hasBrowserColorPicker:function(){return n.hasBrowserColorPicker},hasContainer:function(){return d.hasContainer},isAbortError:function(){return o.isAbortError},isArray:function(){return r.isArray},isBoolean:function(){return s.isBoolean},isDestructable:function(){return d.isDestructable},isEqual:function(){return a.isEqual},isFastEqual:function(){return a.isFastEqual},isFunction:function(){return l.isFunction},isHTML:function(){return u.isHTML},isHtmlFromWord:function(){return c.isHtmlFromWord},isInitable:function(){return d.isInitable},isInt:function(){return h.isInt},isJoditObject:function(){return p.isJoditObject},isLicense:function(){return f.isLicense},isMarker:function(){return m.isMarker},isNativeFunction:function(){return g.isNativeFunction},isNumber:function(){return v.isNumber},isNumeric:function(){return _.isNumeric},isPlainObject:function(){return b.isPlainObject},isPromise:function(){return y.isPromise},isSet:function(){return S.isSet},isString:function(){return w.isString},isStringArray:function(){return w.isStringArray},isURL:function(){return C.isURL},isValidName:function(){return k.isValidName},isViewObject:function(){return E.isViewObject},isVoid:function(){return I.isVoid},isWindow:function(){return T.isWindow}});var n=i(98740),o=i(72068),r=i(17312),s=i(22289),a=i(94013),l=i(91565),u=i(46248),c=i(82166),d=i(52433),h=i(99732),p=i(