jodit 3.14.2 → 3.14.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/workspace.xml +21 -28
- package/build/jodit.css +3 -3
- package/build/jodit.es2018.css +2 -2
- package/build/jodit.es2018.en.css +2 -2
- package/build/jodit.es2018.en.js +4737 -4737
- package/build/jodit.es2018.en.min.css +1 -1
- package/build/jodit.es2018.en.min.js +1 -1
- package/build/jodit.es2018.js +4737 -4737
- package/build/jodit.es2018.min.css +1 -1
- package/build/jodit.es2018.min.js +1 -1
- package/build/jodit.js +13949 -13949
- package/build/jodit.min.css +2 -2
- package/build/jodit.min.js +1 -1
- package/build/vdom.css +1 -1736
- package/build/vdom.es2018.css +1 -1736
- package/build/vdom.es2018.en.css +1 -1736
- package/build/vdom.es2018.en.js +5618 -11557
- package/build/vdom.es2018.en.min.css +1 -1
- package/build/vdom.es2018.en.min.js +1 -1
- package/build/vdom.es2018.js +5618 -11557
- package/build/vdom.es2018.min.css +1 -1
- package/build/vdom.es2018.min.js +1 -1
- package/build/vdom.js +6779 -13461
- package/build/vdom.min.css +1 -1
- package/build/vdom.min.js +1 -1
- package/package.json +1 -1
- package/src/core/vdom/README.md +2 -0
- package/src/core/vdom/helpers/index.ts +2 -2
- package/src/core/vdom/render/index.ts +1 -1
- package/src/styles/jodit.less +1 -1
package/build/vdom.min.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var o in n)("object"==typeof exports?exports:e)[o]=n[o]}}(self,(function(){return function(){"use strict";var e=[function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(2),t),(0,o.__exportStar)(n(3),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.__classPrivateFieldSet=t.__classPrivateFieldGet=t.__importDefault=t.__importStar=t.__makeTemplateObject=t.__asyncValues=t.__asyncDelegator=t.__asyncGenerator=t.__await=t.__spreadArray=t.__spreadArrays=t.__spread=t.__read=t.__values=t.__exportStar=t.__createBinding=t.__generator=t.__awaiter=t.__metadata=t.__param=t.__decorate=t.__rest=t.__assign=t.__extends=void 0;var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};function o(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],o=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function r(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var o,r,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(o=i.next()).done;)a.push(o.value)}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return a}function i(e){return this instanceof i?(this.v=e,this):new i(e)}t.__extends=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function o(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)},t.__assign=function(){return t.__assign=Object.assign||function(e){for(var t,n=1,o=arguments.length;o>n;n++)for(var r in t=arguments[n])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e},t.__assign.apply(this,arguments)},t.__rest=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&0>t.indexOf(o)&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);o.length>r;r++)0>t.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(e,o[r])&&(n[o[r]]=e[o[r]])}return n},t.__decorate=function(e,t,n,o){var r,i=arguments.length,a=3>i?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,o);else for(var s=e.length-1;s>=0;s--)(r=e[s])&&(a=(3>i?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},t.__param=function(e,t){return function(n,o){t(n,o,e)}},t.__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},t.__awaiter=function(e,t,n,o){return new(n||(n=Promise))((function(r,i){function a(e){try{l(o.next(e))}catch(e){i(e)}}function s(e){try{l(o.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?r(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}l((o=o.apply(e,t||[])).next())}))},t.__generator=function(e,t){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,o&&(r=2&i[0]?o.return:i[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,i[1])).done)return r;switch(o=0,r&&(i=[2&i[0],r.value]),i[0]){case 0:case 1:r=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,o=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((r=(r=a.trys).length>0&&r[r.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!r||i[1]>r[0]&&r[3]>i[1])){a.label=i[1];break}if(6===i[0]&&r[1]>a.label){a.label=r[1],r=i;break}if(r&&r[2]>a.label){a.label=r[2],a.ops.push(i);break}r[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],o=0}finally{n=r=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},t.__createBinding=Object.create?function(e,t,n,o){void 0===o&&(o=n),Object.defineProperty(e,o,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,o){void 0===o&&(o=n),e[o]=t[n]},t.__exportStar=function(e,n){for(var o in e)"default"===o||Object.prototype.hasOwnProperty.call(n,o)||(0,t.__createBinding)(n,e,o)},t.__values=o,t.__read=r,t.__spread=function(){for(var e=[],t=0;arguments.length>t;t++)e=e.concat(r(arguments[t]));return e},t.__spreadArrays=function(){for(var e=0,t=0,n=arguments.length;n>t;t++)e+=arguments[t].length;var o=Array(e),r=0;for(t=0;n>t;t++)for(var i=arguments[t],a=0,s=i.length;s>a;a++,r++)o[r]=i[a];return o},t.__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var o,r=0,i=t.length;i>r;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))},t.__await=i,t.__asyncGenerator=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o,r=n.apply(e,t||[]),a=[];return o={},s("next"),s("throw"),s("return"),o[Symbol.asyncIterator]=function(){return this},o;function s(e){r[e]&&(o[e]=function(t){return new Promise((function(n,o){a.push([e,t,n,o])>1||l(e,t)}))})}function l(e,t){try{(n=r[e](t)).value instanceof i?Promise.resolve(n.value.v).then(u,c):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function u(e){l("next",e)}function c(e){l("throw",e)}function d(e,t){e(t),a.shift(),a.length&&l(a[0][0],a[0][1])}},t.__asyncDelegator=function(e){var t,n;return t={},o("next"),o("throw",(function(e){throw e})),o("return"),t[Symbol.iterator]=function(){return this},t;function o(o,r){t[o]=e[o]?function(t){return(n=!n)?{value:i(e[o](t)),done:"return"===o}:r?r(t):t}:r}},t.__asyncValues=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=o(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(n){t[n]=e[n]&&function(t){return new Promise((function(o,r){!function(e,t,n,o){Promise.resolve(o).then((function(t){e({value:t,done:n})}),t)}(o,r,(t=e[n](t)).done,t.value)}))}}},t.__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};t.__importStar=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var o in e)"default"!==o&&Object.prototype.hasOwnProperty.call(e,o)&&(0,t.__createBinding)(n,e,o);return a(n,e),n},t.__importDefault=function(e){return e&&e.__esModule?e:{default:e}},t.__classPrivateFieldGet=function(e,t,n,o){if("a"===n&&!o)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?o:"a"===n?o.call(e):o?o.value:t.get(e)},t.__classPrivateFieldSet=function(e,t,n,o,r){if("m"===o)throw new TypeError("Private method is not writable");if("a"===o&&!r)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===o?r.call(e,n):r?r.value=n:t.set(e,n),n}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VDomRender=void 0;var o=n(1),r=n(4),i=n(32),a=n(181),s=function(e){return"children"!==e},l=function(e,t,n){var o;Object.keys(t).filter(s).filter((o=n,function(e){return!(e in o)})).forEach((function(t){e[t]=""})),Object.keys(n).filter(s).filter(function(e,t){return function(n){return e[n]!==t[n]}}(t,n)).forEach((function(t){e[t]=n[t]}))},u=function(){function e(){this.async=new a.Async,this.nextUnitOfWork=void 0,this.currentRoot=void 0,this.wipRoot=void 0,this.deletions=[],this.async.requestIdleCallback(this.workLoop)}return e.prototype.commitRoot=function(){var e;this.deletions.forEach(this.commitWork),this.deletions.length=0,this.commitWork(null===(e=this.wipRoot)||void 0===e?void 0:e.child),this.currentRoot=this.wipRoot,this.wipRoot=void 0},e.prototype.commitWork=function(e){var t,n;if(e){for(var o=e.parent;!(null==o?void 0:o.dom);)o=null==o?void 0:o.parent;var r=o.dom;"PLACEMENT"===e.effectTag&&null!=e.dom?r.appendChild(e.dom):"UPDATE"===e.effectTag&&null!=e.dom?l(e.dom,null!==(n=null===(t=e.alternate)||void 0===t?void 0:t.props)&&void 0!==n?n:{},e.props):"DELETION"===e.effectTag&&this.commitDeletion(e,r),this.commitWork(null==e?void 0:e.child),this.commitWork(null==e?void 0:e.sibling)}},e.prototype.commitDeletion=function(e,t){(null==e?void 0:e.dom)?t.removeChild(e.dom):this.commitDeletion(null==e?void 0:e.child,t)},e.prototype.render=function(e,t){var n;this.wipRoot={type:"div",dom:t,props:{children:[e]},alternate:null!==(n=this.currentRoot)&&void 0!==n?n:void 0},this.deletions=[],this.nextUnitOfWork=this.wipRoot},e.prototype.workLoop=function(e){for(var t=!1;this.nextUnitOfWork&&!t;)this.nextUnitOfWork=this.performUnitOfWork(this.nextUnitOfWork),t=1>e.timeRemaining();!this.nextUnitOfWork&&this.wipRoot&&this.commitRoot(),this.async.requestIdleCallback(this.workLoop)},e.prototype.performUnitOfWork=function(e){if(this.__updateHostComponent(e),e.child)return e.child;for(var t=e;t;){if(t.sibling)return t.sibling;t=t.parent}},e.prototype.__updateHostComponent=function(e){e.dom||(e.dom=function(e){var t="TEXT_ELEMENT"===e.type?document.createTextNode(""):document.createElement(e.type);return l(t,{},e.props),t}(e)),this.__reconcileChildren(e,e.props.children)},e.prototype.__reconcileChildren=function(e,t){for(var n=0,o=e.alternate&&e.alternate.child,r=void 0;t.length>n||o;){var i=t[n],a=void 0,s=o&&i&&i.type===o.type;s&&o&&(a={type:o.type,props:i.props,dom:o.dom,parent:e,alternate:o,effectTag:"UPDATE"}),i&&!s&&(a={type:i.type,props:i.props,dom:null,parent:e,alternate:void 0,effectTag:"PLACEMENT"}),o&&!s&&(o.effectTag="DELETION",this.deletions.push(o)),o&&(o=o.sibling),0===n&&e?e.child=a:i&&r&&(r.sibling=a),r=a,n++}},e.prototype.htmlToVDom=function(e){var t=document.createElement("div");return t.innerHTML=e,(0,r.domToVDom)(t.children.length>1||!t.firstChild?t:t.firstChild)},(0,o.__decorate)([i.autobind],e)}();t.VDomRender=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.domToVDom=t.attrsToDict=void 0;var o=n(1),r=n(5),i=n(180);function a(e){var t,n,o={};if("SCRIPT"===e.nodeName&&(o.textContent=null!==(t=e.textContent)&&void 0!==t?t:""),e.nodeType===Node.TEXT_NODE&&(o.nodeValue=null!==(n=e.nodeValue)&&void 0!==n?n:""),i.Dom.isElement(e))for(var r=0;e.attributes.length>r;r+=1){var a=e.attributes.item(r);a&&(o[a.name]=a.value)}return o}t.attrsToDict=a,t.domToVDom=function e(t,n){var i;return void 0===n&&(n=!0),t.nodeType===Node.TEXT_NODE?{type:"TEXT_ELEMENT",props:{children:[],nodeValue:null!==(i=t.nodeValue)&&void 0!==i?i:""}}:{type:t.nodeName.toLowerCase(),props:(0,o.__assign)({children:(0,r.toArray)(t.childNodes).map((function(t){return e(t,n)}))},a(t))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(6),t),(0,o.__exportStar)(n(117),t),(0,o.__exportStar)(n(165),t),(0,o.__exportStar)(n(36),t),(0,o.__exportStar)(n(99),t),(0,o.__exportStar)(n(167),t),(0,o.__exportStar)(n(90),t),(0,o.__exportStar)(n(173),t),(0,o.__exportStar)(n(81),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(7),t),(0,o.__exportStar)(n(8),t),(0,o.__exportStar)(n(9),t),(0,o.__exportStar)(n(12),t),(0,o.__exportStar)(n(102),t),(0,o.__exportStar)(n(80),t),(0,o.__exportStar)(n(103),t),(0,o.__exportStar)(n(104),t),(0,o.__exportStar)(n(106),t),(0,o.__exportStar)(n(107),t),(0,o.__exportStar)(n(105),t),(0,o.__exportStar)(n(108),t),(0,o.__exportStar)(n(110),t),(0,o.__exportStar)(n(89),t),(0,o.__exportStar)(n(112),t),(0,o.__exportStar)(n(15),t),(0,o.__exportStar)(n(113),t),(0,o.__exportStar)(n(109),t),(0,o.__exportStar)(n(114),t),(0,o.__exportStar)(n(111),t),(0,o.__exportStar)(n(115),t),(0,o.__exportStar)(n(116),t),(0,o.__exportStar)(n(55),t),(0,o.__exportStar)(n(164),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=void 0;var o=n(1),r=function(e){function t(t){var n=e.call(this,t)||this;return n.name="AssertionError",n}return(0,o.__extends)(t,e),t}(Error);t.assert=function(e,t){if(!e)throw new r("Assertion failed: ".concat(t))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.markDeprecated=t.cns=void 0;var o=n(1);t.cns=console,t.markDeprecated=function(e,n,r){return void 0===n&&(n=[""]),void 0===r&&(r=null),function(){for(var i=[],a=0;arguments.length>a;a++)i[a]=arguments[a];return t.cns.warn('Method "'.concat(n[0],'" deprecated.')+(n[1]?' Use "'.concat(n[1],'" instead'):"")),e.call.apply(e,(0,o.__spreadArray)([r],(0,o.__read)(i),!1))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.memorizeExec=t.keys=t.loadImage=t.reset=t.callPromise=t.markOwner=t.attr=t.call=void 0;var o=n(1),r=n(10),i=n(11),a=n(12),s=n(15),l=n(14),u=n(36),c=n(89),d=n(81);function f(e,t,n){if(!e||!(0,r.isFunction)(e.getAttribute))return null;if(!(0,u.isString)(t))return Object.keys(t).forEach((function(n){var o=t[n];(0,u.isPlainObject)(o)&&"style"===n?(0,c.css)(e,o):("className"===n&&(n="class"),f(e,n,o))})),null;var o=(0,d.CamelCaseToKebabCase)(t);if(/^-/.test(o)){var i=f(e,"data".concat(o));if(i)return i;o=o.substr(1)}if(void 0!==n){if(null!=n)return e.setAttribute(o,n.toString()),n.toString();e.hasAttribute(o)&&e.removeAttribute(o)}return e.getAttribute(o)}t.call=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];return e.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(t),!1))},t.attr=f,t.markOwner=function(e,t){f(t,"data-editor_id",e.id),!t.component&&Object.defineProperty(t,"jodit",{value:e})},t.callPromise=function(e,t){return(0,i.isPromise)(e)?e.finally(t):t()};var p={};t.reset=function(e){var t,n;if(!(e in p)){var o=document.createElement("iframe");try{if(o.src="about:blank",document.body.appendChild(o),!o.contentWindow)return null;var i=(0,a.get)(e,o.contentWindow),s=(0,a.get)(e.split(".").slice(0,-1).join("."),o.contentWindow);(0,r.isFunction)(i)&&(p[e]=i.bind(s))}catch(e){}finally{null===(t=o.parentNode)||void 0===t||t.removeChild(o)}}return null!==(n=p[e])&&void 0!==n?n:null},t.loadImage=function(e,t){return t.async.promise((function(n,o){var r=new Image,i=function(){t.e.off(r),null==o||o()},a=function(){t.e.off(r),n(r)};t.e.one(r,"load",a).one(r,"error",i).one(r,"abort",i),r.src=e,r.complete&&a()}))},t.keys=function(e,t){if(void 0===t&&(t=!0),t)return Object.keys(e);var n=[];for(var o in e)n.push(o);return n},t.memorizeExec=function(e,t,n,o){var r=n.control,i="button".concat(r.command),a=r.args&&r.args[0]||(0,s.dataBind)(e,i);if((0,l.isVoid)(a))return!1;(0,s.dataBind)(e,i,a),o&&(a=o(a)),e.execCommand(r.command,!1,a||void 0)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0,t.isPromise=function(e){return e&&"function"==typeof e.then}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0;var o=n(1),r=n(13),i=n(14);t.get=function(e,t){var n,a;if(!(0,r.isString)(e)||!e.length)return null;var s=e.split("."),l=t;try{try{for(var u=(0,o.__values)(s),c=u.next();!c.done;c=u.next()){var d=c.value;if((0,i.isVoid)(l[d]))return null;l=l[d]}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=u.return)&&a.call(u)}finally{if(n)throw n.error}}}catch(e){return null}return(0,i.isVoid)(l)?null:l}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isVoid=void 0,t.isVoid=function(e){return null==e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.dataBind=void 0;var o=n(16),r=n(36),i=new WeakMap;t.dataBind=function(e,t,n){var a=i.get(e);if(!a){i.set(e,a={});var s=null;e instanceof o.ViewComponent&&(s=e.j.e),(0,r.isViewObject)(e)&&(s=e.e),s&&s.on("beforeDestruct",(function(){i.delete(e)}))}return void 0===n?a[t]:(a[t]=n,n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(17),t),(0,o.__exportStar)(n(18),t),(0,o.__exportStar)(n(88),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.STATUSES=void 0,t.STATUSES={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var o=n(5),r=n(19),i=n(17),a=new Map,s=function(){function e(){this.ownerWindow=window,this.__componentStatus=i.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,r.uniqueUid)()}return Object.defineProperty(e.prototype,"componentName",{get:function(){return this.__componentName||(this.__componentName="jodit-"+(0,o.kebabCase)(((0,o.isFunction)(this.className)?this.className():"")||(0,o.getClassName)(this))),this.__componentName},enumerable:!1,configurable:!0}),e.prototype.getFullElName=function(e,t,n){var r=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),r.push("__".concat(e))),t&&(r.push("_",t),r.push("_",(0,o.isVoid)(n)?"true":n.toString())),r.join("")},Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.ow.document},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"od",{get:function(){return this.ownerDocument},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ow",{get:function(){return this.ownerWindow},enumerable:!1,configurable:!0}),e.prototype.get=function(e,t){return(0,o.get)(e,t||this)},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.componentStatus===i.STATUSES.ready},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDestructed",{get:function(){return this.componentStatus===i.STATUSES.destructed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInDestruct",{get:function(){return i.STATUSES.beforeDestruct===this.componentStatus||i.STATUSES.destructed===this.componentStatus},enumerable:!1,configurable:!0}),e.prototype.bindDestruct=function(e){var t=this;return e.hookStatus(i.STATUSES.beforeDestruct,(function(){return!t.isInDestruct&&t.destruct()})),this},e.prototype.destruct=function(){this.setStatus(i.STATUSES.destructed),a.get(this)&&a.delete(this)},Object.defineProperty(e.prototype,"componentStatus",{get:function(){return this.__componentStatus},set:function(e){this.setStatus(e)},enumerable:!1,configurable:!0}),e.prototype.setStatus=function(e){return this.setStatusComponent(e,this)},e.prototype.setStatusComponent=function(e,t){if(e!==this.__componentStatus){var n=Object.getPrototypeOf(this);n&&(0,o.isFunction)(n.setStatusComponent)&&n.setStatusComponent(e,t);var r=a.get(this),i=null==r?void 0:r[e];i&&i.length&&i.forEach((function(e){return e(t)})),t===this&&(this.__componentStatus=e)}},e.prototype.hookStatus=function(e,t){var n=a.get(this);n||a.set(this,n={}),n[e]||(n[e]=[]),n[e].push(t)},e.STATUSES=i.STATUSES,e}();t.Component=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.eventEmitter=t.getContainer=t.extendLang=t.lang=t.modules=t.pluginSystem=t.uniqueUid=t.instances=void 0;var o=n(20),r=n(21),i=n(62),a=n(36),s=n(80),l=n(81);t.instances={};var u=1,c=new Set;t.uniqueUid=function(){function e(){return u+=10*(Math.random()+1),Math.round(u).toString(16)}for(var t=e();c.has(t);)t=e();return c.add(t),t},t.pluginSystem=new o.PluginSystem,t.modules={},t.lang={},t.extendLang=function(e){Object.keys(e).forEach((function(n){t.lang[n]?Object.assign(t.lang[n],e[n]):t.lang[n]=e[n]}))};var d=new WeakMap;t.getContainer=function(e,t,n,o){void 0===n&&(n="div"),void 0===o&&(o=!1);var i=t?(0,s.getClassName)(t.prototype):"jodit-utils",u=d.get(e)||{},c=i+n,f=(0,a.isViewObject)(e)?e:e.j;if(!u[c]){var p=f.c,h=(0,a.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:e.od.body;if(o&&(0,a.isJoditObject)(e)&&e.od!==e.ed){p=e.createInside;var v="style"===n?e.ed.head:e.ed.body;h=(0,a.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:v}var m=p.element(n,{className:"jodit jodit-".concat((0,l.kebabCase)(i),"-container jodit-box")});m.classList.add("jodit_theme_".concat(f.o.theme||"default")),h.appendChild(m),u[c]=m,e.hookStatus("beforeDestruct",(function(){r.Dom.safeRemove(m),delete u[c],Object.keys(u).length&&d.delete(e)})),d.set(e,u)}return u[c].classList.remove("jodit_theme_default","jodit_theme_dark"),u[c].classList.add("jodit_theme_".concat(f.o.theme||"default")),u[c]},t.eventEmitter=new i.EventEmitter},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PluginSystem=void 0;var o=n(1),r=n(5),i=function(){function e(){this._items=new Map}return e.prototype.normalizeName=function(e){return(0,r.kebabCase)(e).toLowerCase()},e.prototype.items=function(e){var t=[];return this._items.forEach((function(e,n){t.push([n,e])})),t.filter((function(t){var n=(0,o.__read)(t,1);return!e||e.includes(n[0])}))},e.prototype.add=function(e,t){this._items.set(this.normalizeName(e),t)},e.prototype.get=function(e){return this._items.get(this.normalizeName(e))},e.prototype.remove=function(e){this._items.delete(this.normalizeName(e))},e.prototype.init=function(t){var n=this,i=t.o.extraPlugins.map((function(e){return(0,r.isString)(e)?{name:e}:e})),a=(0,r.splitArray)(t.o.disablePlugins).map((function(e){return n.normalizeName(e)})),s=[],l={},u=[],c={},d=function(i){var d,f=(0,o.__read)(i,2),p=f[0],h=f[1];if(!(a.includes(p)||s.includes(p)||l[p])){var v=null===(d=h)||void 0===d?void 0:d.requires;if(!(v&&(0,r.isArray)(v)&&n.hasDisabledRequires(a,v))){var m=e.makePluginInstance(t,h);m&&(n.initOrWait(t,p,m,s,l),u.push(m),c[p]=m)}}},f=this.loadExtras(t,i);return(0,r.callPromise)(f,(function(){t.isInDestruct||(n.items(t.o.safeMode?t.o.safePluginsList.concat(i.map((function(e){return e.name}))):null).forEach(d),n.addListenerOnBeforeDestruct(t,u),t.__plugins=c)}))},e.prototype.hasDisabledRequires=function(e,t){return Boolean((null==t?void 0:t.length)&&e.some((function(e){return t.includes(e)})))},e.makePluginInstance=function(e,t){try{return(0,r.isFunction)(t)?new t(e):t}catch(e){}return null},e.prototype.initOrWait=function(t,n,o,i,a){var s=function(n,o){if((0,r.isInitable)(o)){var s=o.requires;if((null==s?void 0:s.length)&&!s.every((function(e){return i.includes(e)})))return a[n]=o,!1;try{o.init(t)}catch(e){}i.push(n)}else i.push(n);return o.hasStyle&&e.loadStyle(t,n),!0};s(n,o),Object.keys(a).forEach((function(e){var t=a[e];t&&s(e,t)&&(a[e]=void 0,delete a[e])}))},e.prototype.addListenerOnBeforeDestruct=function(e,t){e.e.on("beforeDestruct",(function(){t.forEach((function(t){(0,r.isDestructable)(t)&&t.destruct(e)})),t.length=0,delete e.__plugins}))},e.prototype.load=function(t,n){return Promise.all(n.map((function(n){var o=n.url||e.getFullUrl(t,n.name,!0);return(0,r.appendScriptAsync)(t,o).then((function(e){return{v:e,status:"fulfilled"}}),(function(e){return{e:e,status:"rejected"}}))})))},e.loadStyle=function(t,n){return(0,o.__awaiter)(this,void 0,Promise,(function(){var i;return(0,o.__generator)(this,(function(o){return i=e.getFullUrl(t,n,!1),this.styles.has(i)?[2]:(this.styles.add(i),[2,(0,r.appendStyleAsync)(t,i)])}))}))},e.getFullUrl=function(e,t,n){return t=(0,r.kebabCase)(t),e.basePath+"plugins/"+t+"/"+t+"."+(n?"js":"css")},e.prototype.loadExtras=function(e,t){var n=this;if(t&&t.length)try{var o=t.filter((function(e){return!n._items.has(n.normalizeName(e.name))}));if(o.length)return this.load(e,o)}catch(e){}},e.styles=new Set,e}();t.PluginSystem=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(22),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Dom=void 0;var o=n(1),r=n(23),i=n(5),a=n(24),s=n(23),l=function(){function e(){}return e.detach=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},e.wrapInline=function(t,n,o){var r,a=t,s=t;o.s.save();var l=!1;do{l=!1,(r=a.previousSibling)&&!e.isBlock(r)&&(l=!0,a=r)}while(l);do{l=!1,(r=s.nextSibling)&&!e.isBlock(r)&&(l=!0,s=r)}while(l);var u=(0,i.isString)(n)?o.createInside.element(n):n;a.parentNode&&a.parentNode.insertBefore(u,a);for(var c=a;c&&(c=a.nextSibling,u.appendChild(a),a!==s&&c);)a=c;return o.s.restore(),u},e.wrap=function(e,t,n){var o=(0,i.isString)(t)?n.element(t):t;if(!e.parentNode)throw(0,i.error)("Element should be in DOM");return e.parentNode.insertBefore(o,e),o.appendChild(e),o},e.unwrap=function(t){var n=t.parentNode;if(n){for(;t.firstChild;)n.insertBefore(t.firstChild,t);e.safeRemove(t)}},e.between=function(e,t,n){for(var o=e;o&&o!==t&&(e===o||!n(o));){var r=o.firstChild||o.nextSibling;if(!r){for(;o&&!o.nextSibling;)o=o.parentNode;r=null==o?void 0:o.nextSibling}o=r}},e.replace=function(e,t,n,o,r){void 0===o&&(o=!1),void 0===r&&(r=!1),(0,i.isHTML)(t)&&(t=n.fromHTML(t));var a=(0,i.isString)(t)?n.element(t):t;if(!r)for(;e.firstChild;)a.appendChild(e.firstChild);return o&&(0,i.toArray)(e.attributes).forEach((function(e){a.setAttribute(e.name,e.value)})),e.parentNode&&e.parentNode.replaceChild(a,e),a},e.isEmptyTextNode=function(t){return e.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(r.INVISIBLE_SPACE_REG_EXP(),"").trim().length)},e.isEmptyContent=function(t){return e.each(t,(function(t){return e.isEmptyTextNode(t)}))},e.isContentEditable=function(t,n){return e.isNode(t)&&!e.closest(t,(function(t){return e.isElement(t)&&"false"===t.getAttribute("contenteditable")}),n)},e.isEmpty=function(t,n){return void 0===n&&(n=/^(img|svg|canvas|input|textarea|form)$/),!t||(e.isText(t)?null==t.nodeValue||0===(0,i.trim)(t.nodeValue).length:!n.test(t.nodeName.toLowerCase())&&e.each(t,(function(t){if(e.isText(t)&&null!=t.nodeValue&&0!==(0,i.trim)(t.nodeValue).length||e.isElement(t)&&n.test(t.nodeName.toLowerCase()))return!1})))},e.isNode=function(e){if(!e)return!1;var t=(0,i.get)("ownerDocument.defaultView",e);return!("object"!=typeof t||!t||"function"!=typeof t.Node&&"object"!=typeof t.Node)&&e instanceof t.Node},e.isCell=function(t){return e.isNode(t)&&/^(td|th)$/i.test(t.nodeName)},e.isImage=function(t){return e.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)},e.isBlock=function(t){return!(0,i.isVoid)(t)&&"object"==typeof t&&e.isNode(t)&&r.IS_BLOCK.test(t.nodeName)},e.isText=function(e){return Boolean(e&&e.nodeType===Node.TEXT_NODE)},e.isElement=function(t){var n;if(!e.isNode(t))return!1;var o=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return Boolean(o&&t.nodeType===Node.ELEMENT_NODE)},e.isHTMLElement=function(t){var n;if(!e.isNode(t))return!1;var o=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return Boolean(o&&t instanceof o.HTMLElement)},e.isInlineBlock=function(t){return e.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf((0,i.css)(t,"display").toString())},e.canSplitBlock=function(t){return!(0,i.isVoid)(t)&&e.isHTMLElement(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)},e.last=function(e,t){var n=null==e?void 0:e.lastChild;if(!n)return null;do{if(t(n))return n;var o=n.lastChild;if(o||(o=n.previousSibling),!o&&n.parentNode!==e){do{n=n.parentNode}while(n&&!(null==n?void 0:n.previousSibling)&&n.parentNode!==e);o=null==n?void 0:n.previousSibling}n=o}while(n);return null},e.prev=function(t,n,o,r){return void 0===r&&(r=!0),e.find(t,n,o,!1,r)},e.next=function(t,n,o,r){return void 0===r&&(r=!0),e.find(t,n,o,!0,r)},e.prevWithClass=function(t,n){return e.prev(t,(function(t){return e.isElement(t)&&t.classList.contains(n)}),t.parentNode)},e.nextWithClass=function(t,n){return e.next(t,(function(t){return e.isElement(t)&&t.classList.contains(n)}),t.parentNode)},e.find=function(e,t,n,o,r){void 0===o&&(o=!0),void 0===r&&(r=!0);for(var i=this.nextGen(e,n,o,r),a=i.next();!a.done;){if(t(a.value))return a.value;a=i.next()}return null},e.nextGen=function(e,t,n,r){var i,a,s;return void 0===n&&(n=!0),void 0===r&&(r=!0),(0,o.__generator)(this,(function(l){switch(l.label){case 0:i=[],a=e,l.label=1;case 1:for(s=n?a.nextSibling:a.previousSibling;s;)i.unshift(s),s=n?s.nextSibling:s.previousSibling;return[5,(0,o.__values)(this.runInStack(e,i,n,r))];case 2:l.sent(),a=a.parentNode,l.label=3;case 3:if(a!==t)return[3,1];l.label=4;case 4:return[2,null]}}))},e.each=function(e,t,n){void 0===n&&(n=!0);for(var o=this.eachGen(e,n),r=o.next();!r.done;){if(!1===t(r.value))return!1;r=o.next()}return!0},e.eachGen=function(e,t){return void 0===t&&(t=!0),this.runInStack(e,[e],t)},e.runInStack=function(e,t,n,r){var i,a;return void 0===r&&(r=!0),(0,o.__generator)(this,(function(o){switch(o.label){case 0:return t.length?(i=t.pop(),e===i?[3,2]:[4,i]):[3,3];case 1:o.sent(),o.label=2;case 2:if(r)for(a=n?i.lastChild:i.firstChild;a;)t.push(a),a=n?a.previousSibling:a.nextSibling;return[3,0];case 3:return[2]}}))},e.findWithCurrent=function(t,n,o,r,i){void 0===r&&(r="nextSibling"),void 0===i&&(i="firstChild");var a=t;do{if(n(a))return a||null;if(i&&a&&a[i]){var s=e.findWithCurrent(a[i],n,a,r,i);if(s)return s}for(;a&&!a[r]&&a!==o;)a=a.parentNode;a&&a[r]&&a!==o&&(a=a[r])}while(a&&a!==o);return null},e.findSibling=function(t,n,o){void 0===n&&(n=!0),void 0===o&&(o=function(t){return!e.isEmptyTextNode(t)});for(var r=function(e){return n?e.previousSibling:e.nextSibling},i=r(t);i&&!o(i);)i=r(i);return i&&o(i)?i:null},e.up=function(e,t,n,o){void 0===o&&(o=!1);var r=e;if(!r)return null;do{if(t(r))return r;if(r===n||!r.parentNode)break;r=r.parentNode}while(r&&r!==n);return r===n&&o&&t(r)?r:null},e.closest=function(t,n,o){var r;return r=(0,i.isFunction)(n)?n:(0,i.isArray)(n)?function(e){return e&&n.includes(e.nodeName.toLowerCase())}:function(e){return e&&n===e.nodeName.toLowerCase()},e.up(t,r,o)},e.furthest=function(e,t,n){for(var o=null,r=null==e?void 0:e.parentElement;r&&r!==n&&t(r);)o=r,r=null==r?void 0:r.parentElement;return o},e.appendChildFirst=function(e,t){var n=e.firstChild;n?n!==t&&e.insertBefore(t,n):e.appendChild(t)},e.after=function(e,t){var n=e.parentNode;n&&(n.lastChild===e?n.appendChild(t):n.insertBefore(t,e.nextSibling))},e.before=function(e,t){var n=e.parentNode;n&&n.insertBefore(t,e)},e.prepend=function(e,t){e.insertBefore(t,e.firstChild)},e.append=function(e,t){var n=this;(0,i.isArray)(t)?t.forEach((function(t){n.append(e,t)})):e.appendChild(t)},e.moveContent=function(e,t,n){void 0===n&&(n=!1);var o=(e.ownerDocument||document).createDocumentFragment();(0,i.toArray)(e.childNodes).forEach((function(e){o.appendChild(e)})),n&&t.firstChild?t.insertBefore(o,t.firstChild):t.appendChild(o)},e.all=function(t,n,o){void 0===o&&(o=!1);var r=t.childNodes?(0,i.toArray)(t.childNodes):[];return n(t)?t:(o&&(r=r.reverse()),r.forEach((function(t){e.all(t,n,o)})),null)},e.isOrContains=function(e,t,n){return void 0===n&&(n=!1),e===t?!n:Boolean(t&&e&&this.up(t,(function(t){return t===e}),e,!0))},e.safeRemove=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.hide=function(e){e&&((0,i.dataBind)(e,"__old_display",e.style.display),e.style.display="none")},e.show=function(e){if(e){var t=(0,i.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}},e.isTag=function(e,t){for(var n=(0,i.asArray)(t).map(String),o=0;n.length>o;o+=1)if(this.isElement(e)&&e.tagName.toLowerCase()===n[o].toLowerCase())return!0;return!1},e.markTemporary=function(e,t){return t&&(0,i.attr)(e,t),(0,i.attr)(e,s.TEMP_ATTR,!0),e},e.isTemporary=function(t){return!!e.isElement(t)&&(a.Select.isMarker(t)||"true"===(0,i.attr)(t,s.TEMP_ATTR))},e.replaceTemporaryFromString=function(e){return e.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")},e.temporaryList=function(e){return(0,i.$$)("[".concat(s.TEMP_ATTR,"]"),e)},e}();t.Dom=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TEMP_ATTR=t.BASE_PATH=t.KEY_ALIASES=t.IS_MAC=t.SAFE_COUNT_CHANGE_CALL=t.INSERT_ONLY_TEXT=t.INSERT_AS_TEXT=t.INSERT_CLEAR_HTML=t.INSERT_AS_HTML=t.EMULATE_DBLCLICK_TIMEOUT=t.MARKER_CLASS=t.TEXT_HTML=t.TEXT_PLAIN=t.IS_IE=t.MODE_SPLIT=t.MODE_SOURCE=t.MODE_WYSIWYG=t.PARAGRAPH=t.BR=t.COMMAND_KEYS=t.ACCURACY=t.NEARBY=t.KEY_F3=t.KEY_DELETE=t.KEY_SPACE=t.KEY_DOWN=t.KEY_RIGHT=t.KEY_UP=t.KEY_LEFT=t.KEY_ESC=t.KEY_ENTER=t.KEY_TAB=t.KEY_BACKSPACE=t.MAY_BE_REMOVED_WITH_KEY=t.INSEPARABLE_TAGS=t.IS_INLINE=t.IS_BLOCK=t.SPACE_REG_EXP_END=t.SPACE_REG_EXP_START=t.SPACE_REG_EXP=t.INVISIBLE_SPACE_REG_EXP_START=t.INVISIBLE_SPACE_REG_EXP_END=t.INVISIBLE_SPACE_REG_EXP=t.NBSP_SPACE=t.INVISIBLE_SPACE=void 0,t.INVISIBLE_SPACE="\ufeff",t.NBSP_SPACE=" ",t.INVISIBLE_SPACE_REG_EXP=function(){return/[\uFEFF]/g},t.INVISIBLE_SPACE_REG_EXP_END=function(){return/[\uFEFF]+$/g},t.INVISIBLE_SPACE_REG_EXP_START=function(){return/^[\uFEFF]+/g},t.SPACE_REG_EXP=function(){return/[\s\n\t\r\uFEFF\u200b]+/g},t.SPACE_REG_EXP_START=function(){return/^[\s\n\t\r\uFEFF\u200b]+/g},t.SPACE_REG_EXP_END=function(){return/[\s\n\t\r\uFEFF\u200b]+$/g},t.IS_BLOCK=/^(ARTICLE|SCRIPT|STYLE|OBJECT|FOOTER|HEADER|NAV|SECTION|IFRAME|JODIT|JODIT-MEDIA|PRE|DIV|P|LI|UL|OL|H[1-6]|BLOCKQUOTE|TR|TD|TH|TBODY|THEAD|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD|DL|DFN|FORM)$/i,t.IS_INLINE=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,t.INSEPARABLE_TAGS=["img","br","video","iframe","script","input","textarea","hr","link","jodit","jodit-media"],t.MAY_BE_REMOVED_WITH_KEY=RegExp("^".concat(t.INSEPARABLE_TAGS.join("|"),"$"),"i"),t.KEY_BACKSPACE="Backspace",t.KEY_TAB="Tab",t.KEY_ENTER="Enter",t.KEY_ESC="Escape",t.KEY_LEFT="ArrowLeft",t.KEY_UP="ArrowUp",t.KEY_RIGHT="ArrowRight",t.KEY_DOWN="ArrowDown",t.KEY_SPACE="Space",t.KEY_DELETE="Delete",t.KEY_F3="F3",t.NEARBY=5,t.ACCURACY=10,t.COMMAND_KEYS=[t.KEY_BACKSPACE,t.KEY_DELETE,t.KEY_UP,t.KEY_DOWN,t.KEY_RIGHT,t.KEY_LEFT,t.KEY_ENTER,t.KEY_ESC,t.KEY_F3,t.KEY_TAB],t.BR="br",t.PARAGRAPH="p",t.MODE_WYSIWYG=1,t.MODE_SOURCE=2,t.MODE_SPLIT=3,t.IS_IE="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),t.TEXT_PLAIN=t.IS_IE?"text":"text/plain",t.TEXT_HTML=t.IS_IE?"html":"text/html",t.MARKER_CLASS="jodit-selection_marker",t.EMULATE_DBLCLICK_TIMEOUT=300,t.INSERT_AS_HTML="insert_as_html",t.INSERT_CLEAR_HTML="insert_clear_html",t.INSERT_AS_TEXT="insert_as_text",t.INSERT_ONLY_TEXT="insert_only_text",t.SAFE_COUNT_CHANGE_CALL=10,t.IS_MAC="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t.KEY_ALIASES={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:t.IS_MAC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},t.BASE_PATH=function(){if("undefined"==typeof document)return"";var e=document.currentScript,t=function(e){return e.replace(/\/[^/]+.js$/,"/")};if(e)return t(e.src);var n=document.querySelectorAll("script[src]");return n&&n.length?t(n[n.length-1].src):window.location.href}(),t.TEMP_ATTR="data-jodit-temp"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(25),t),(0,o.__exportStar)(n(31),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CommitStyle=t.REPLACE=t.INITIAL=t.UNSET=t.CHANGE=t.UNWRAP=t.WRAP=void 0;var o=n(23),r=n(26);t.WRAP="wrap",t.UNWRAP="unwrap",t.CHANGE="change",t.UNSET="unset",t.INITIAL="initial",t.REPLACE="replace";var i=function(){function e(e){this.options=e}return Object.defineProperty(e.prototype,"elementIsList",{get:function(){return Boolean(this.options.element&&["ul","ol"].includes(this.options.element))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.options.element||this.defaultTag},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementIsBlock",{get:function(){return Boolean(this.options.element&&o.IS_BLOCK.test(this.options.element))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isElementCommit",{get:function(){return Boolean(this.options.element&&this.options.element!==this.options.defaultTag)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTag",{get:function(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementIsDefault",{get:function(){return this.element===this.defaultTag},enumerable:!1,configurable:!0}),e.prototype.apply=function(e){(0,r.ApplyStyle)(e,this)},e}();t.CommitStyle=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyStyle=void 0;var o=n(5),r=n(27),i=n(25),a=n(21),s=n(27);t.ApplyStyle=function(e,t){var n=e.s,l=e.editor,u=new s.FiniteStateMachine("start",{start:{start:function(){n.save(),(0,o.normalizeNode)(l.firstChild),this.setState("generator")}},generator:{initGenerator:function(){return e.s.wrapInTagGen()},nextFont:function(e){var t=e.next();if(t.done)this.setState("end");else if(!(0,r.isInsideInvisibleElement)(t.value,l)&&!a.Dom.isEmptyContent(t.value))return this.setState("check"),t.value}},check:{work:function(n){var o=(0,r.getSuitParent)(t,n,e.editor)||(0,r.getSuitChild)(t,n);return o?(this.setState("wholeElement"),o):((o=a.Dom.closest(n,(function(e){return(0,s.isSuitElement)(t,e,!0)}),e.editor))&&(t.elementIsBlock||(0,s.extractSelectedPart)(o,n,e)),t.elementIsList&&a.Dom.isTag(o,["ul","ol"])?(this.setState("orderList"),n):o?(this.setState("wholeElement"),o):(0,r.unwrapChildren)(t,n)?(this.setState("endProcess"),null):(this.setState("wrap"),n))}},wholeElement:{toggleStyles:function(n){var o=i.INITIAL;o=(0,r.toggleCommitStyles)(t,n)?i.UNWRAP:(0,s.toggleCSS)(t,n,e,o),this.setState("generator",o)}},orderList:{toggleStyles:function(n){var o=i.INITIAL,r=a.Dom.closest(n,"li",e.editor);r&&a.Dom.closest(n,["ul","ol"],e.editor)?(o=(0,s.toggleOrderedList)(t,r,e,o),this.setState(o!==i.REPLACE&&o!==i.UNWRAP&&o!==i.CHANGE?"generator":"endWhile")):this.setState("generator")}},wrap:{toggleStyles:function(n){if("unwrap"!==this.getSubState()){var o=(0,s.wrapAndCommitStyle)(t,n,e);(0,s.toggleCSS)(t,o,e,i.WRAP)}this.setState("generator")}},endWhile:{nextFont:function(e){e.next().done&&this.setState("end")}},endProcess:{toggleStyles:function(){this.setState("generator")}},end:{finalize:function(){n.restore()}}});u.dispatch("start");for(var c=u.dispatch("initGenerator");"end"!==u.getState();){var d=u.dispatch("nextFont",c);if(d){var f=u.dispatch("work",d);u.dispatch("toggleStyles",f)}}u.dispatch("finalize",c)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(28),t),(0,o.__exportStar)(n(29),t),(0,o.__exportStar)(n(68),t),(0,o.__exportStar)(n(30),t),(0,o.__exportStar)(n(69),t),(0,o.__exportStar)(n(70),t),(0,o.__exportStar)(n(73),t),(0,o.__exportStar)(n(74),t),(0,o.__exportStar)(n(71),t),(0,o.__exportStar)(n(72),t),(0,o.__exportStar)(n(75),t),(0,o.__exportStar)(n(76),t),(0,o.__exportStar)(n(77),t),(0,o.__exportStar)(n(79),t),(0,o.__exportStar)(n(78),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleCSS=void 0;var o=n(5),r=n(21),i=n(25),a=n(19);t.toggleCSS=function(e,t,n,s,l){void 0===l&&(l=!1);var u=e.options,c=u.style,d=u.className;return c&&(0,o.size)(c)>0&&Object.keys(c).forEach((function(u){if(""!==t.style.getPropertyValue((0,o.kebabCase)(u))||null!=c[u]){if(function(e,t,n){var i=e.create.element(t.tagName.toLowerCase());i.style.cssText=t.style.cssText,function(e){var t;if(void 0!==(0,o.dataBind)(e,"shadowRoot"))return(0,o.dataBind)(e,"shadowRoot");var n=(0,a.getContainer)(e),r=document.createElement("iframe");(0,o.css)(r,{width:0,height:0,position:"absolute",border:0}),r.src="about:blank",n.appendChild(r);var i=null===(t=r.contentWindow)||void 0===t?void 0:t.document,s=i?i.body:e.od.body;return(0,o.dataBind)(e,"shadowRoot",s),s}(e).appendChild(i);var s=(0,o.css)(i,n);return r.Dom.safeRemove(i),s}(n,t,u)===(0,o.normalizeCssValue)(u,c[u]))return!l&&(0,o.css)(t,u,null),void(s=function(e,t,n){return(0,o.attr)(t,"style")||((0,o.attr)(t,"style",null),t.tagName.toLowerCase()===e.defaultTag&&(r.Dom.unwrap(t),n=i.UNWRAP)),n}(e,t,s=i.UNSET));s=i.CHANGE,!l&&(0,o.css)(t,u,c[u])}})),d&&(t.classList.contains(d)?(t.classList.remove(d),s=i.UNSET):(t.classList.add(d),s=i.CHANGE)),s}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleOrderedList=void 0;var o=n(21),r=n(30),i=n(25),a=n(28);t.toggleOrderedList=function(e,t,n,s){if(!t)return s;var l=t.parentElement;if(!l)return s;if(l.tagName.toLowerCase()!==e.element){var u=o.Dom.replace(l,e.element,n.createInside);return(0,a.toggleCSS)(e,u,n,s),i.REPLACE}return(0,a.toggleCSS)(e,t.parentElement,n,i.INITIAL,!0)===i.CHANGE?(0,a.toggleCSS)(e,t.parentElement,n,s):((0,r.extractSelectedPart)(l,t,n),o.Dom.unwrap(t.parentElement),o.Dom.replace(t,n.o.enter,n.createInside),s)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.extractSelectedPart=void 0;var o=n(31),r=n(5),i=n(21);function a(e,t,n){var o=t.extractContents();o.textContent&&(0,r.trim)(o.textContent).length||!o.firstChild||i.Dom.unwrap(o.firstChild),e.parentNode&&(0,r.call)(n?i.Dom.before:i.Dom.after,e,o)}t.extractSelectedPart=function(e,t,n){var r=n.s.createRange(),i=o.Select.isMarker(t.previousSibling)?t.previousSibling:t;r.setStartBefore(e),r.setEndBefore(i),a(e,r,!0);var s=o.Select.isMarker(t.nextSibling)?t.nextSibling:t;r.setStartAfter(s),r.setEndAfter(e),a(e,r,!1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;var o=n(1),r=n(23),i=n(23),a=n(21),s=n(5),l=n(25),u=n(32),c=function(){function e(e){var t=this;this.jodit=e,e.e.on("removeMarkers",(function(){t.removeMarkers()}))}return Object.defineProperty(e.prototype,"j",{get:function(){return this.jodit},enumerable:!1,configurable:!0}),e.prototype.errorNode=function(e){if(!a.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")},Object.defineProperty(e.prototype,"area",{get:function(){return this.j.editor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"win",{get:function(){return this.j.ew},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return this.j.ed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sel",{get:function(){return this.j.o.shadowRoot&&(0,s.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){var e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()},enumerable:!1,configurable:!0}),e.prototype.createRange=function(e){void 0===e&&(e=!1);var t=this.doc.createRange();return e&&this.selectRange(t),t},e.prototype.remove=function(){var e=this.sel,t=this.current();if(e&&t)for(var n=0;e.rangeCount>n;n+=1)e.getRangeAt(n).deleteContents(),e.getRangeAt(n).collapse(!0)},e.prototype.clear=function(){var e,t;(null===(e=this.sel)||void 0===e?void 0:e.rangeCount)&&(null===(t=this.sel)||void 0===t||t.removeAllRanges())},e.prototype.removeNode=function(e){if(!a.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)},e.prototype.insertCursorAtPoint=function(e,t){var n=this;this.removeMarkers();try{var o=this.createRange();return function(){if(n.doc.caretPositionFromPoint&&(r=n.doc.caretPositionFromPoint(e,t)))o.setStart(r.offsetNode,r.offset);else if(n.doc.caretRangeFromPoint){var r=n.doc.caretRangeFromPoint(e,t);o.setStart(r.startContainer,r.startOffset)}}(),o.collapse(!0),this.selectRange(o),!0}catch(e){}return!1},e.isMarker=function(e){return a.Dom.isNode(e)&&a.Dom.isTag(e,"span")&&e.hasAttribute("data-"+r.MARKER_CLASS)},Object.defineProperty(e.prototype,"hasMarkers",{get:function(){return Boolean(this.markers.length)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return(0,s.$$)("span[data-"+r.MARKER_CLASS+"]",this.area)},enumerable:!1,configurable:!0}),e.prototype.removeMarkers=function(){this.markers.forEach(a.Dom.safeRemove)},e.prototype.marker=function(e,t){void 0===e&&(e=!1);var n=null;t&&(n=t.cloneRange()).collapse(e);var o=this.j.createInside.span();return o.id=r.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),o.style.lineHeight="0",o.style.display="none",o.setAttribute("data-"+r.MARKER_CLASS,e?"start":"end"),o.appendChild(this.j.createInside.text(r.INVISIBLE_SPACE)),n&&a.Dom.isOrContains(this.area,e?n.startContainer:n.endContainer)&&n.insertNode(o),o},e.prototype.restore=function(){var e=!1,t=function(e){return"span[data-".concat(r.MARKER_CLASS,"=").concat(e?"start":"end","]")},n=this.area.querySelector(t(!0)),o=this.area.querySelector(t(!1));if(n){if(e=this.createRange(),o)e.setStartAfter(n),a.Dom.safeRemove(n),e.setEndBefore(o),a.Dom.safeRemove(o);else{var i=n.previousSibling;a.Dom.isText(i)?e.setStart(i,i.nodeValue?i.nodeValue.length:0):e.setStartBefore(n),a.Dom.safeRemove(n),e.collapse(!0)}e&&this.selectRange(e)}},e.prototype.save=function(e){if(void 0===e&&(e=!1),this.hasMarkers)return[];var t=this.sel;if(!t||!t.rangeCount)return[];for(var n=[],o=t.rangeCount,r=[],i=0;o>i;i+=1)if(r[i]=t.getRangeAt(i),r[i].collapsed){var a=this.marker(!0,r[i]);n[i]={startId:a.id,collapsed:!0,startMarker:a.outerHTML}}else{a=this.marker(!0,r[i]);var s=this.marker(!1,r[i]);n[i]={startId:a.id,endId:s.id,collapsed:!1,startMarker:a.outerHTML,endMarker:s.outerHTML}}if(!e)for(t.removeAllRanges(),i=o-1;i>=0;--i){var l=this.doc.getElementById(n[i].startId);if(l)if(n[i].collapsed)r[i].setStartAfter(l),r[i].collapse(!0);else if(r[i].setStartBefore(l),n[i].endId){var u=this.doc.getElementById(n[i].endId);u&&r[i].setEndAfter(u)}try{t.addRange(r[i].cloneRange())}catch(e){}}return n},e.prototype.focus=function(e){var t,n;if(void 0===e&&(e={preventScroll:!0}),!this.isFocused()){var o=(0,s.getScrollParent)(this.j.container),r=null==o?void 0:o.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),r&&(null==o?void 0:o.scrollTo)&&o.scrollTo(0,r);var i=this.sel,l=(null==i?void 0:i.rangeCount)?null==i?void 0:i.getRangeAt(0):null;if(!l||!a.Dom.isOrContains(this.area,l.startContainer)){var u=this.createRange();u.setStart(this.area,0),u.collapse(!0),this.selectRange(u,!1)}return this.j.editorIsActive||null===(n=null===(t=this.j)||void 0===t?void 0:t.events)||void 0===n||n.fire("focus"),!0}return!1},e.prototype.isCollapsed=function(){for(var e=this.sel,t=0;e&&e.rangeCount>t;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0},e.prototype.isFocused=function(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement},e.prototype.current=function(e){if(void 0===e&&(e=!0),this.j.getRealMode()===r.MODE_WYSIWYG){var t=this.sel;if(!t||0===t.rangeCount)return null;var n=t.getRangeAt(0),o=n.startContainer,i=!1,s=function(e){return i?e.lastChild:e.firstChild};if(a.Dom.isTag(o,"br")&&t.isCollapsed)return o;if(!a.Dom.isText(o)){if((o=n.startContainer.childNodes[n.startOffset])||(o=n.startContainer.childNodes[n.startOffset-1],i=!0),o&&t.isCollapsed&&!a.Dom.isText(o))if(!i&&a.Dom.isText(o.previousSibling))o=o.previousSibling;else if(e)for(var l=s(o);l;){if(l&&a.Dom.isText(l)){o=l;break}l=s(l)}if(o&&!t.isCollapsed&&!a.Dom.isText(o)){var u=o,c=o;do{u=u.firstChild,c=c.lastChild}while(u&&c&&!a.Dom.isText(u));u===c&&u&&a.Dom.isText(u)&&(o=u)}}if(o&&a.Dom.isOrContains(this.area,o))return o}return null},e.prototype.insertNode=function(e,t,n){var o;void 0===t&&(t=!0),void 0===n&&(n=!0),this.errorNode(e),this.j.e.fire("safeHTML",e),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());var r=this.sel;if(this.isCollapsed()||this.j.execCommand("Delete"),r&&r.rangeCount){var s=r.getRangeAt(0);a.Dom.isOrContains(this.area,s.commonAncestorContainer)?a.Dom.isTag(s.startContainer,i.INSEPARABLE_TAGS)&&s.collapsed?null===(o=s.startContainer.parentNode)||void 0===o||o.insertBefore(e,s.startContainer):(s.deleteContents(),s.insertNode(e)):this.area.appendChild(e)}else this.area.appendChild(e);t&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.lastChild&&this.setCursorAfter(e.lastChild):this.setCursorAfter(e)),n&&this.j.events&&this.j.e.fire("synchro"),this.j.events&&this.j.e.fire("afterInsertNode",e)},e.prototype.insertHTML=function(e){if(""!==e){var t,n=this.j.createInside.div(),o=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?n.appendChild(e):n.innerHTML=e.toString(),(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",n.innerHTML))&&(t=n.lastChild)){for(;n.firstChild;)t=n.firstChild,o.appendChild(n.firstChild);this.insertNode(o,!1,!1),t?this.setCursorAfter(t):this.setCursorIn(o),this.j.e&&this.j.e.fire("synchro")}}},e.prototype.insertImage=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var o=(0,s.isString)(e)?this.j.createInside.element("img"):e;if((0,s.isString)(e)&&o.setAttribute("src",e),null!=n){var r=n.toString();r&&"auto"!==r&&0>String(r).indexOf("px")&&0>String(r).indexOf("%")&&(r+="px"),(0,s.call)(this.j.o.resizer.forImageChangeAttributes?s.attr:s.css,o,"width",r)}t&&"object"==typeof t&&(0,s.css)(o,t);var i=function(){(o.offsetHeight>o.naturalHeight||o.offsetWidth>o.naturalWidth)&&(o.style.width="",o.style.height=""),o.removeEventListener("load",i)};this.j.e.on(o,"load",i),o.complete&&i(),this.insertNode(o),this.j.e.fire("afterInsertImage",o)},e.prototype.eachSelection=function(t){var n,o=this,r=this.sel;if(r&&r.rangeCount){var l=r.getRangeAt(0),u=l.commonAncestorContainer;a.Dom.isHTMLElement(u)||(u=u.parentElement);var c=[],d=l.startOffset,f=u.childNodes.length,p=l.startContainer===this.area?u.childNodes[f>d?d:f-1]:l.startContainer,h=l.endContainer===this.area?u.childNodes[l.endOffset-1]:l.endContainer;a.Dom.isText(p)&&p===l.startContainer&&l.startOffset===(null===(n=p.nodeValue)||void 0===n?void 0:n.length)&&p.nextSibling&&(p=p.nextSibling),a.Dom.isText(h)&&h===l.endContainer&&0===l.endOffset&&h.previousSibling&&(h=h.previousSibling);var v=function(t){!t||t===u||a.Dom.isEmptyTextNode(t)||e.isMarker(t)||c.push(t)};v(p),p!==h&&a.Dom.find(p,(function(e){return v(e),e===h||e&&e.contains&&e.contains(h)}),u,!0,!1);var m=function(e){if(a.Dom.isOrContains(o.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(m);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{var n=o.j.createInside.text(i.INVISIBLE_SPACE);e.appendChild(n),e=n}t(e)}};0===c.length&&a.Dom.isEmptyTextNode(p)&&c.push(p),0===c.length&&p.firstChild&&c.push(p.firstChild),c.forEach(m)}},e.prototype.cursorInTheEdge=function(e,t){var n,o,r=!e,l=null===(n=this.sel)||void 0===n?void 0:n.getRangeAt(0),u=this.current(!1);if(!l||!u||!a.Dom.isOrContains(t,u,!0))return null;var c=e?l.startContainer:l.endContainer,d=e?l.startOffset:l.endOffset,f=function(e){return e&&!a.Dom.isTag(e,"br")&&!a.Dom.isEmptyTextNode(e)};if(a.Dom.isText(c)){var p=(null===(o=c.nodeValue)||void 0===o?void 0:o.length)?c.nodeValue:"";if(r&&p.replace((0,i.INVISIBLE_SPACE_REG_EXP_END)(),"").length>d)return!1;var h=(0,i.INVISIBLE_SPACE_REG_EXP_START)().exec(p);if(e&&(h&&d>h[0].length||!h&&d>0))return!1}else{var v=(0,s.toArray)(c.childNodes);if(r){if(v.slice(d).some(f))return!1}else if(v.slice(0,d).some(f))return!1}return!(0,s.call)(e?a.Dom.prev:a.Dom.next,u,f,t)},e.prototype.cursorOnTheLeft=function(e){return this.cursorInTheEdge(!0,e)},e.prototype.cursorOnTheRight=function(e){return this.cursorInTheEdge(!1,e)},e.prototype.setCursorAfter=function(e){return this.setCursorNearWith(e,!1)},e.prototype.setCursorBefore=function(e){return this.setCursorNearWith(e,!0)},e.prototype.setCursorNearWith=function(e,t){var n,o,i=this;if(this.errorNode(e),!a.Dom.up(e,(function(e){return e===i.area||e&&e.parentNode===i.area}),this.area))throw(0,s.error)("Node element must be in editor");var l=this.createRange(),u=null;return a.Dom.isText(e)?t?l.setStart(e,0):l.setEnd(e,null!==(o=null===(n=e.nodeValue)||void 0===n?void 0:n.length)&&void 0!==o?o:0):(u=this.j.createInside.text(r.INVISIBLE_SPACE),t?l.setStartBefore(e):l.setEndAfter(e),l.collapse(t),l.insertNode(u),l.selectNode(u)),l.collapse(t),this.selectRange(l),u},e.prototype.setCursorIn=function(e,t){var n=this;if(void 0===t&&(t=!1),this.errorNode(e),!a.Dom.up(e,(function(e){return e===n.area||e&&e.parentNode===n.area}),this.area))throw(0,s.error)("Node element must be in editor");var o=this.createRange(),i=e,l=e;do{if(a.Dom.isText(i))break;l=i,i=t?i.firstChild:i.lastChild}while(i);if(!i){var u=this.j.createInside.text(r.INVISIBLE_SPACE);/^(img|br|input)$/i.test(l.nodeName)?i=l:(l.appendChild(u),l=u)}return o.selectNodeContents(i||l),o.collapse(t),this.selectRange(o),l},e.prototype.selectRange=function(e,t){void 0===t&&(t=!0);var n=this.sel;t&&!this.isFocused()&&this.focus(),n&&(n.removeAllRanges(),n.addRange(e)),this.j.e.fire("changeSelection")},e.prototype.select=function(e,t){var n=this;if(void 0===t&&(t=!1),this.errorNode(e),!a.Dom.up(e,(function(e){return e===n.area||e&&e.parentNode===n.area}),this.area))throw(0,s.error)("Node element must be in editor");var o=this.createRange();o[t?"selectNodeContents":"selectNode"](e),this.selectRange(o)},Object.defineProperty(e.prototype,"html",{get:function(){var e=this.sel;if(e&&e.rangeCount>0){var t=e.getRangeAt(0).cloneContents(),n=this.j.createInside.div();return n.appendChild(t),n.innerHTML}return""},enumerable:!1,configurable:!0}),e.prototype.wrapInTagGen=function(){var t,n,r,l,u,c,d,f,p,h,v;return(0,o.__generator)(this,(function(m){switch(m.label){case 0:return this.isCollapsed()?(c=this.jodit.createInside.element("font",i.INVISIBLE_SPACE),this.insertNode(c,!1,!1),t=(0,o.__read)(this.markers,1),(n=t[0])?c.appendChild(n):(this.setCursorIn(c),this.save()),[4,c]):[3,2];case 1:return m.sent(),a.Dom.unwrap(c),[2];case 2:(0,s.$$)("*[style*=font-size]",this.area).forEach((function(e){return(0,s.attr)(e,"data-font-size",e.style.fontSize.toString())})),this.isCollapsed()?(c=this.j.createInside.element("font"),(0,s.attr)(c,"size",7),this.insertNode(c,!1,!1)):this.j.nativeExecCommand("fontsize",!1,"7"),(0,s.$$)("*[data-font-size]",this.area).forEach((function(e){var t=(0,s.attr)(e,"data-font-size");t&&(e.style.fontSize=t,(0,s.attr)(e,"data-font-size",null))})),r=(0,s.$$)('font[size="7"]',this.area),m.label=3;case 3:m.trys.push([3,8,9,10]),l=(0,o.__values)(r),u=l.next(),m.label=4;case 4:return u.done?[3,7]:(f=(c=u.value).lastChild,(d=c.firstChild)&&d===f&&e.isMarker(d)?(a.Dom.unwrap(c),[3,6]):(d&&e.isMarker(d)&&a.Dom.before(c,d),f&&e.isMarker(f)&&a.Dom.after(c,f),[4,c]));case 5:m.sent(),a.Dom.unwrap(c),m.label=6;case 6:return u=l.next(),[3,4];case 7:return[3,10];case 8:return p=m.sent(),h={error:p},[3,10];case 9:try{u&&!u.done&&(v=l.return)&&v.call(l)}finally{if(h)throw h.error}return[7];case 10:return[2]}}))},e.prototype.wrapInTag=function(t){var n,r,i=[];try{for(var l=(0,o.__values)(this.wrapInTagGen()),u=l.next();!u.done;u=l.next()){var c=u.value;try{if(c.firstChild&&c.firstChild===c.lastChild&&e.isMarker(c.firstChild))continue;(0,s.isFunction)(t)?t(c):i.push(a.Dom.replace(c,t,this.j.createInside))}finally{var d=c.parentNode;d&&(a.Dom.unwrap(c),a.Dom.isEmpty(d)&&a.Dom.unwrap(d))}}}catch(e){n={error:e}}finally{try{u&&!u.done&&(r=l.return)&&r.call(l)}finally{if(n)throw n.error}}return i},e.prototype.applyStyle=function(e,t){void 0===t&&(t={}),new l.CommitStyle({style:e,element:t.element,className:t.className,defaultTag:t.defaultTag}).apply(this.j)},e.prototype.splitSelection=function(e){if(!this.isCollapsed())return null;var t=this.createRange(),n=this.range;t.setStartBefore(e);var o=this.cursorOnTheRight(e),r=this.cursorOnTheLeft(e),s=this.j.createInside.element("br"),l=this.j.createInside.text(i.INVISIBLE_SPACE),u=l.cloneNode();try{if(o||r){n.insertNode(s);var c=function(e,t){for(var n=t(e);n;){var o=t(n);if(!n||!a.Dom.isTag(n,"br")&&!a.Dom.isEmptyTextNode(n))break;a.Dom.safeRemove(n),n=o}};c(s,(function(e){return e.nextSibling})),c(s,(function(e){return e.previousSibling})),a.Dom.after(s,u),a.Dom.before(s,l),o?(t.setEndBefore(s),n.setEndBefore(s)):(t.setEndAfter(s),n.setEndAfter(s))}else t.setEnd(n.startContainer,n.startOffset);var d=t.extractContents();if(e.parentNode)try{if(e.parentNode.insertBefore(d,e),o&&(null==s?void 0:s.parentNode)){var f=this.createRange();f.setStartBefore(s),this.selectRange(f)}}catch(e){}var p=function(e){var t,n,o;(null===(t=null==e?void 0:e.parentNode)||void 0===t?void 0:t.firstChild)===(null===(n=null==e?void 0:e.parentNode)||void 0===n?void 0:n.lastChild)&&(null===(o=null==e?void 0:e.parentNode)||void 0===o||o.appendChild(s.cloneNode()))};p(l),p(u)}finally{a.Dom.safeRemove(l),a.Dom.safeRemove(u)}return e.previousElementSibling},(0,o.__decorate)([u.autobind],e.prototype,"createRange",null),(0,o.__decorate)([u.autobind],e.prototype,"focus",null),(0,o.__decorate)([u.autobind],e.prototype,"setCursorAfter",null),(0,o.__decorate)([u.autobind],e.prototype,"setCursorBefore",null),(0,o.__decorate)([u.autobind],e.prototype,"setCursorIn",null),e}();t.Select=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.autobind=void 0;var o=n(1);(0,o.__exportStar)(n(33),t),(0,o.__exportStar)(n(34),t),(0,o.__exportStar)(n(35),t),(0,o.__exportStar)(n(56),t),(0,o.__exportStar)(n(57),t),(0,o.__exportStar)(n(58),t),(0,o.__exportStar)(n(59),t),(0,o.__exportStar)(n(60),t),(0,o.__exportStar)(n(61),t);var r=n(67);Object.defineProperty(t,"autobind",{enumerable:!0,get:function(){return r.default}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.cache=void 0;var o=n(5);t.cache=function(e,t,n){var r=n.get;if(!r)throw(0,o.error)("Getter property descriptor expected");n.get=function(){var e=r.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:!1,value:e}),e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.component=void 0;var o=n(1),r=n(5),i=function(e){return(0,r.isFunction)(e.className)?e.className():NaN};t.component=function(e){var t=function(e){function t(){for(var n=[],r=0;arguments.length>r;r++)n[r]=arguments[r];var a=e.apply(this,(0,o.__spreadArray)([],(0,o.__read)(n),!1))||this,s=Object.getPrototypeOf(a)===t.prototype,l=i(a)===i(t.prototype);return(s||l)&&a.setStatus("ready"),a}return(0,o.__extends)(t,e),t}(e);return t.prototype.constructor=e,t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.debounce=void 0;var o=n(36),r=n(16),i=n(55);function a(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n="debounce"),function(a,s){if(!(0,o.isFunction)(a[s]))throw(0,i.error)("Handler must be a Function");a.hookStatus(r.STATUSES.ready,(function(r){var i=(0,o.isViewObject)(r)?r:r.jodit,a=(0,o.isFunction)(e)?e(r):e;r[s]=i.async[n](r[s].bind(r),(0,o.isNumber)(a)||(0,o.isPlainObject)(a)?a:i.defaultTimeout,t)}))}}t.debounce=a,t.throttle=function(e,t){return void 0===t&&(t=!1),a(e,t,"throttle")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(37),t),(0,o.__exportStar)(n(38),t),(0,o.__exportStar)(n(39),t),(0,o.__exportStar)(n(40),t),(0,o.__exportStar)(n(10),t),(0,o.__exportStar)(n(42),t),(0,o.__exportStar)(n(43),t),(0,o.__exportStar)(n(44),t),(0,o.__exportStar)(n(45),t),(0,o.__exportStar)(n(47),t),(0,o.__exportStar)(n(48),t),(0,o.__exportStar)(n(49),t),(0,o.__exportStar)(n(50),t),(0,o.__exportStar)(n(46),t),(0,o.__exportStar)(n(51),t),(0,o.__exportStar)(n(11),t),(0,o.__exportStar)(n(13),t),(0,o.__exportStar)(n(53),t),(0,o.__exportStar)(n(54),t),(0,o.__exportStar)(n(14),t),(0,o.__exportStar)(n(52),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasBrowserColorPicker=void 0,t.hasBrowserColorPicker=function(){var e=!0;try{var t=document.createElement("input");t.type="color",e="color"===t.type&&"number"!=typeof t.selectionStart}catch(t){e=!1}return e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=function(e){return Array.isArray(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=void 0,t.isBoolean=function(e){return"boolean"==typeof e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isFastEqual=t.isEqual=void 0;var o=n(41);t.isEqual=function(e,t){return e===t||(0,o.stringify)(e)===(0,o.stringify)(t)},t.isFastEqual=function(e,t){return e===t}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0,t.stringify=function(e,t){if(void 0===t&&(t={}),"object"!=typeof e)return String(e);var n=new Set(t.excludeKeys),o=new WeakMap;return JSON.stringify(e,(function(e,t){if(!n.has(e)){if("object"==typeof t&&null!=t){if(o.get(t))return"[refObject]";o.set(t,!0)}return t}}),t.prettify)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isHTML=void 0;var o=n(13);t.isHTML=function(e){return(0,o.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isHtmlFromWord=void 0,t.isHtmlFromWord=function(e){return-1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasContainer=t.isDestructable=t.isInitable=void 0;var o=n(10),r=n(21),i=n(14);t.isInitable=function(e){return!(0,i.isVoid)(e)&&(0,o.isFunction)(e.init)},t.isDestructable=function(e){return!(0,i.isVoid)(e)&&(0,o.isFunction)(e.destruct)},t.hasContainer=function(e){return!(0,i.isVoid)(e)&&r.Dom.isElement(e.container)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isInt=void 0;var o=n(46),r=n(13);t.isInt=function(e){return(0,r.isString)(e)&&(0,o.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isNumeric=void 0;var o=n(13);t.isNumeric=function(e){if((0,o.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isViewObject=t.isJoditObject=void 0;var o=n(10),r=n(19);t.isJoditObject=function(e){return Boolean(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&("undefined"!=typeof Jodit&&e instanceof Jodit||e.isJodit))},t.isViewObject=function(e){return Boolean(e&&e instanceof Object&&(0,o.isFunction)(e.constructor)&&(e instanceof r.modules.View||e.isView))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isLicense=void 0;var o=n(13);t.isLicense=function(e){return(0,o.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNativeFunction=void 0,t.isNativeFunction=function(e){return Boolean(e)&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(e)))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=void 0,t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=void 0;var o=n(52);t.isPlainObject=function(e){return!(!e||"object"!=typeof e||e.nodeType||(0,o.isWindow)(e)||e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isWindow=void 0,t.isWindow=function(e){return null!=e&&e===e.window}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isURL=void 0,t.isURL=function(e){if(e.includes(" "))return!1;if("undefined"!=typeof URL)try{var t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}var n=document.createElement("a");return n.href=e,Boolean(n.hostname)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isValidName=void 0,t.isValidName=function(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_.]/.test(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.error=void 0,t.error=function(e){return new TypeError(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.idle=void 0;var o=n(1),r=n(16),i=n(5);t.idle=function(){return function(e,t){if(!(0,i.isFunction)(e[t]))throw(0,i.error)("Handler must be a Function");e.hookStatus(r.STATUSES.ready,(function(e){var n=(0,i.isViewObject)(e)?e:e.jodit,r=e[t];e[t]=function(){for(var t=[],i=0;arguments.length>i;i++)t[i]=arguments[i];return n.async.requestIdleCallback(r.bind.apply(r,(0,o.__spreadArray)([e],(0,o.__read)(t),!1)))}}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hook=void 0;var o=n(36),r=n(55);t.hook=function(e){return function(t,n){if(!(0,o.isFunction)(t[n]))throw(0,r.error)("Handler must be a Function");t.hookStatus(e,(function(e){t[n].call(e)}))}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nonenumerable=void 0,t.nonenumerable=function(e,t){!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set:function(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.persistent=void 0;var o=n(16),r=n(5);t.persistent=function(e,t){e.hookStatus(o.STATUSES.ready,(function(e){var n=(0,r.isViewObject)(e)?e:e.jodit,o="".concat(n.options.namespace).concat(e.componentName,"_prop_").concat(t),i=e[t];Object.defineProperty(e,t,{get:function(){var e;return null!==(e=n.storage.get(o))&&void 0!==e?e:i},set:function(e){n.storage.set(o,e)}})}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0;var o=n(1),r=n(5),i=n(16);t.wait=function(e){return function(t,n){if(!(0,r.isFunction)(t[n]))throw(0,r.error)("Handler must be a Function");t.hookStatus(i.STATUSES.ready,(function(t){var i=(0,r.isViewObject)(t)?t.async:t.j.async,a=t[n],s=0;t[n]=function n(){for(var r=[],l=0;arguments.length>l;l++)r[l]=arguments[l];i.clearTimeout(s),e(t)?a.apply(t,r):s=i.setTimeout((function(){return n.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(r),!1))}),10)}}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.watch=t.getPropertyDescriptor=void 0;var o=n(1),r=n(36),i=n(62),a=n(16),s=n(66),l=n(55);function u(e,t){var n;do{n=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e)}while(!n&&e);return n}function c(e,t){return function(n,c){if(!(0,r.isFunction)(n[c]))throw(0,l.error)("Handler must be a Function");var d=function(a){var l=function(e){for(var t,n=[],r=1;arguments.length>r;r++)n[r-1]=arguments[r];if(!a.isInDestruct)return(t=a)[c].apply(t,(0,o.__spreadArray)([e],(0,o.__read)(n),!1))};(0,s.splitArray)(e).forEach((function(e){if(/:/.test(e)){var s=(0,o.__read)(e.split(":"),2),c=s[0],d=s[1],f=(0,r.isViewObject)(a)?a:a.jodit;return c.length&&(t=a.get(c)),(0,r.isFunction)(t)&&(t=t(a)),f.events.on(t||a,d,l),t||f.events.on(d,l),void f.hookStatus("beforeDestruct",(function(){f.events.off(t||a,d,l).off(d,l)}))}var p=e.split("."),h=(0,o.__read)(p,1)[0],v=p.slice(1),m=a[h];(0,r.isPlainObject)(m)&&(0,i.observable)(m).on("change.".concat(v.join(".")),l);var g=u(n,h);Object.defineProperty(a,h,{configurable:!0,set:function(e){var t=m;t!==e&&(m=e,g&&g.set&&g.set.call(a,e),(0,r.isPlainObject)(m)&&(m=(0,i.observable)(m)).on("change.".concat(v.join(".")),l),l(h,t,m))},get:function(){return g&&g.get?g.get.call(a):m}})}))};(0,r.isFunction)(n.hookStatus)?n.hookStatus(a.STATUSES.ready,d):d(n)}}t.getPropertyDescriptor=u,t.watch=c,t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(63),t),(0,o.__exportStar)(n(65),t),(0,o.__exportStar)(n(64),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;var o=n(1),r=n(64),i=n(13),a=n(10),s=n(38),l=n(55),u=function(){function e(e){var t=this;this.mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.doc=document,this.prepareEvent=function(e){e.cancelBubble||(e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach((function(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&&t.doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:function(){return t.doc.defaultView.clipboardData},configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.isDestructed=!1,e&&(this.doc=e),this.__key+=(new Date).getTime()}return e.prototype.mute=function(e){return this.mutedEvents.add(null!=e?e:"*"),this},e.prototype.isMuted=function(e){return!(!e||!this.mutedEvents.has(e))||this.mutedEvents.has("*")},e.prototype.unmute=function(e){return this.mutedEvents.delete(null!=e?e:"*"),this},e.prototype.eachEvent=function(e,t){var n=this;e.split(/[\s,]+/).forEach((function(e){var o=e.split(".");t.call(n,o[0],o[1]||r.defaultNameSpace)}))},e.prototype.getStore=function(e){if(!e)throw(0,l.error)("Need subject");if(void 0===e[this.__key]){var t=new r.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,value:t})}return e[this.__key]},e.prototype.clearStore=function(e){void 0!==e[this.__key]&&delete e[this.__key]},e.prototype.triggerNativeEvent=function(e,t){var n=this.doc.createEvent("HTMLEvents");"string"==typeof t?n.initEvent(t,!0,!0):(n.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach((function(e){Object.defineProperty(n,e,{value:t[e],enumerable:!0})})),Object.defineProperty(n,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(n)},Object.defineProperty(e.prototype,"current",{get:function(){return this.currents[this.currents.length-1]},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t,n,r){var u=this;void 0===r&&(r=!1);var c=(0,i.isString)(e)?this:e,d=(0,i.isString)(t)?t:e,f=n;void 0===f&&(0,a.isFunction)(t)&&(f=t);var p=this.getStore(c);if(!(0,i.isString)(d)||""===d)throw(0,l.error)("Need events names");if(!(0,a.isFunction)(f))throw(0,l.error)("Need event handler");if((0,s.isArray)(c))return c.forEach((function(e){u.on(e,d,f,r)})),this;var h=(0,a.isFunction)(c.addEventListener),v=this,m=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];if(!v.isMuted(e))return f&&f.call.apply(f,(0,o.__spreadArray)([this],(0,o.__read)(t),!1))};return h&&(m=function(e){if(!v.isMuted(e.type))return v.prepareEvent(e),f&&!1===f.call(this,e)?(e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}),this.eachEvent(d,(function(e,t){if(""===e)throw(0,l.error)("Need event name");if(!1===p.indexOf(e,t,f)&&(p.set(e,t,{event:e,originalCallback:f,syntheticCallback:m},r),h)){var n=!!["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"].includes(e)&&{passive:!0};c.addEventListener(e,m,n)}})),this},e.prototype.one=function(e,t,n,r){var s=this;void 0===r&&(r=!1);var l=(0,i.isString)(e)?this:e,u=(0,i.isString)(t)?t:e,c=n;void 0===c&&(0,a.isFunction)(t)&&(c=t);var d=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return s.off(l,u,d),c.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(e),!1))};return this.on(l,u,d,r),this},e.prototype.off=function(e,t,n){var o=this,s=(0,i.isString)(e)?this:e,l=(0,i.isString)(t)?t:e,u=this.getStore(s),c=n;if(!(0,i.isString)(l)||!l)return u.namespaces().forEach((function(e){o.off(s,"."+e)})),this.clearStore(s),this;void 0===c&&(0,a.isFunction)(t)&&(c=t);var d=(0,a.isFunction)(s.removeEventListener),f=function(e){d&&s.removeEventListener(e.event,e.syntheticCallback,!1)},p=function(e,t){if(""!==e){var n=u.get(e,t);if(n&&n.length)if((0,a.isFunction)(c)){var o=u.indexOf(e,t,c);!1!==o&&(f(n[o]),n.splice(o,1))}else n.forEach(f),n.length=0}else u.events(t).forEach((function(e){""!==e&&p(e,t)}))};return this.eachEvent(l,(function(e,t){t===r.defaultNameSpace?u.namespaces().forEach((function(t){p(e,t)})):p(e,t)})),this},e.prototype.stopPropagation=function(e,t){var n=this,o=(0,i.isString)(e)?this:e,a=(0,i.isString)(e)?e:t;if("string"!=typeof a)throw(0,l.error)("Need event names");var s=this.getStore(o);this.eachEvent(a,(function(e,t){var i=s.get(e,t);i&&n.__stopped.push(i),t===r.defaultNameSpace&&s.namespaces(!0).forEach((function(t){return n.stopPropagation(o,e+"."+t)}))}))},e.prototype.removeStop=function(e){if(e){var t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}},e.prototype.isStopped=function(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)},e.prototype.fire=function(e,t){for(var n,s,u=this,c=[],d=2;arguments.length>d;d++)c[d-2]=arguments[d];var f=(0,i.isString)(e)?this:e,p=(0,i.isString)(e)?e:t,h=(0,i.isString)(e)?(0,o.__spreadArray)([t],(0,o.__read)(c),!1):c,v=(0,a.isFunction)(f.dispatchEvent);if(!v&&!(0,i.isString)(p))throw(0,l.error)("Need events names");var m=this.getStore(f);return!(0,i.isString)(p)&&v?this.triggerNativeEvent(f,t):this.eachEvent(p,(function(e,t){if(v)u.triggerNativeEvent(f,e);else{var i=m.get(e,t);if(i)try{(0,o.__spreadArray)([],(0,o.__read)(i),!1).every((function(t){var r;return!u.isStopped(i)&&(u.currents.push(e),s=(r=t.syntheticCallback).call.apply(r,(0,o.__spreadArray)([f,e],(0,o.__read)(h),!1)),u.currents.pop(),void 0!==s&&(n=s),!0)}))}finally{u.removeStop(i)}t!==r.defaultNameSpace||v||m.namespaces().filter((function(e){return e!==t})).forEach((function(t){var r=u.fire.apply(u,(0,o.__spreadArray)([f,e+"."+t],(0,o.__read)(h),!1));void 0!==r&&(n=r)}))}})),n},e.prototype.destruct=function(){this.isDestructed&&(this.isDestructed=!0,this.off(this),this.getStore(this).clear(),delete this[this.__key])},e}();t.EventEmitter=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandlersStore=t.defaultNameSpace=void 0,t.defaultNameSpace="JoditEventDefaultNamespace";var n=function(){function e(){this.__store={}}return e.prototype.get=function(e,t){if(void 0!==this.__store[t])return this.__store[t][e]},e.prototype.indexOf=function(e,t,n){var o=this.get(e,t);if(o)for(var r=0;o.length>r;r+=1)if(o[r].originalCallback===n)return r;return!1},e.prototype.namespaces=function(e){void 0===e&&(e=!1);var n=Object.keys(this.__store);return e?n.filter((function(e){return e!==t.defaultNameSpace})):n},e.prototype.events=function(e){return this.__store[e]?Object.keys(this.__store[e]):[]},e.prototype.set=function(e,t,n,o){void 0===o&&(o=!1),void 0===this.__store[t]&&(this.__store[t]={}),void 0===this.__store[t][e]&&(this.__store[t][e]=[]),o?this.__store[t][e].unshift(n):this.__store[t][e].push(n)},e.prototype.clear=function(){this.__store={}},e}();t.EventHandlersStore=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0;var o=n(1),r=n(5),i=n(32),a=Symbol("observable-object");function s(e){return void 0!==e[a]}t.observable=function(e){if(s(e))return e;var t={},n={},l=function(t,o){return(0,r.isArray)(t)?(t.map((function(e){return l(e,o)})),e):(n[t]||(n[t]=[]),n[t].push(o),e)},u=function(i){for(var a=[],s=1;arguments.length>s;s++)a[s-1]=arguments[s];if((0,r.isArray)(i))i.map((function(e){return u.apply(void 0,(0,o.__spreadArray)([e],(0,o.__read)(a),!1))}));else try{!t[i]&&n[i]&&(t[i]=!0,n[i].forEach((function(t){return t.call.apply(t,(0,o.__spreadArray)([e],(0,o.__read)(a),!1))})))}finally{t[i]=!1}},c=function(t,n){void 0===n&&(n=[]);var d={};s(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach((function(a){var s=a,l=n.concat(s).filter((function(e){return e.length}));d[s]=t[s];var f=(0,i.getPropertyDescriptor)(t,s);Object.defineProperty(t,s,{set:function(t){var n,i=d[s];if(!(0,r.isFastEqual)(d[s],t)){u(["beforeChange","beforeChange.".concat(l.join("."))],s,t),(0,r.isPlainObject)(t)&&c(t,l),f&&f.set?f.set.call(e,t):d[s]=t;var a=[];u((0,o.__spreadArray)(["change"],(0,o.__read)(l.reduce((function(e,t){return a.push(t),e.push("change.".concat(a.join("."))),e}),[])),!1),l.join("."),i,(null===(n=t)||void 0===n?void 0:n.valueOf)?t.valueOf():t)}},get:function(){return f&&f.get?f.get.call(e):d[s]},enumerable:!0,configurable:!0}),(0,r.isPlainObject)(d[s])&&c(d[s],l)})),Object.defineProperty(e,"on",{value:l}))};return c(e),e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.splitArray=void 0;var o=n(13);t.splitArray=function(e){return(0,o.isString)(e)?e.split(/[,\s]+/):e}},function(e,t){function n(e){return n="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},n(e)}function o(e,t,o){var r=o.value;if("function"!=typeof r)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(r)));var i=!1;return{configurable:!0,get:function(){if(i||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof r)return r;var n=r.bind(this);return i=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return n},set:function(e){r=e,delete this[t]}}),i=!1,n},set:function(e){r=e}}}function r(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,o(e,t,n))}})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.boundClass=t.boundMethod=void 0,t.boundMethod=o,t.boundClass=r,t.default=function(){return 1===arguments.length?r.apply(void 0,arguments):o.apply(void 0,arguments)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.elementHasSameStyleKeys=t.elementHasSameStyle=void 0;var o=n(5),r=n(21);t.elementHasSameStyle=function(e,t){return Boolean(!r.Dom.isTag(e,"font")&&r.Dom.isHTMLElement(e)&&Object.keys(t).every((function(n){var r=(0,o.css)(e,n,!0);return!(0,o.isVoid)(r)&&""!==r&&!(0,o.isVoid)(t[n])&&(0,o.normalizeCssValue)(n,t[n]).toString().toLowerCase()===r.toString().toLowerCase()})))},t.elementHasSameStyleKeys=function(e,t){return Boolean(!r.Dom.isTag(e,"font")&&r.Dom.isHTMLElement(e)&&Object.keys(t).every((function(t){return!(0,o.isVoid)((0,o.css)(e,t,!0))})))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FiniteStateMachine=void 0;var o=n(1),r=function(){function e(e,t){this.state=e,this.transitions=t,this.subState="",this.silent=!0}return e.prototype.setState=function(e,t){this.state=e,null!=t&&(this.subState=t)},e.prototype.getState=function(){return this.state},e.prototype.getSubState=function(){return this.subState},e.prototype.disableSilent=function(){this.silent=!1},e.prototype.dispatch=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];var r=this.transitions[this.state][e];if(r){var i=r.call.apply(r,(0,o.__spreadArray)([this],(0,o.__read)(t),!1));return i}if(!this.silent)throw new Error("invalid action: "+this.state+"."+e)},e}();t.FiniteStateMachine=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSuitChild=void 0;var o=n(21),r=n(71),i=n(72);t.getSuitChild=function(e,t){for(var n=t.firstChild;n&&!(0,r.isNormalNode)(n);)if(!(n=n.nextSibling))return null;return n&&!o.Dom.next(n,r.isNormalNode,t)&&(0,i.isSuitElement)(e,n,!1)?n:null}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isNormalNode=void 0;var o=n(21);t.isNormalNode=function(e){return Boolean(e&&!o.Dom.isEmptyTextNode(e)&&!o.Dom.isTemporary(e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSameStyleChild=t.isSuitElement=void 0;var o=n(71),r=n(68),i=n(21);t.isSuitElement=function(e,t,n){if(!t)return!1;var a=e.element,s=e.elementIsDefault,l=e.options,u=Boolean(l.style&&(0,r.elementHasSameStyle)(t,l.style)),c=t.nodeName.toLowerCase()===a||i.Dom.isTag(t,["ul","ol"])&&e.elementIsList;return!!((!s||!n)&&c||u&&(0,o.isNormalNode)(t))||Boolean(!c&&!n&&s&&i.Dom.isInlineBlock(t))},t.isSameStyleChild=function(e,t){var n=e.element,i=e.options;if(!t||!(0,o.isNormalNode)(t))return!1;var a=t.nodeName.toLowerCase()===n,s=Boolean(i.style&&(0,r.elementHasSameStyleKeys)(t,i.style));return a&&s}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSuitParent=void 0;var o=n(21),r=n(71),i=n(72);t.getSuitParent=function e(t,n,a){var s=n.parentNode;return s===a||!o.Dom.isHTMLElement(s)||o.Dom.next(n,r.isNormalNode,s)||o.Dom.prev(n,r.isNormalNode,s)?null:t.isElementCommit&&t.elementIsBlock&&!o.Dom.isBlock(s)?e(t,s,a):!(0,i.isSuitElement)(t,s,!1)||o.Dom.isBlock(s)&&!t.elementIsBlock?null:s}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isInsideInvisibleElement=void 0;var o=n(21);t.isInsideInvisibleElement=function(e,t){return Boolean(o.Dom.closest(e,["style","script"],t))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleCommitStyles=void 0;var o=n(21);t.toggleCommitStyles=function(e,t){return!!(e.elementIsBlock||o.Dom.isTag(t,e.element)&&!e.elementIsDefault)&&(o.Dom.unwrap(t),!0)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.unwrapChildren=void 0;var o=n(21),r=n(72),i=n(5);t.unwrapChildren=function(e,t){var n,a=[],s=[],l=e.options.style;if(t.firstChild)for(var u=o.Dom.eachGen(t),c=u.next(),d=function(){var t=c.value;(0,r.isSuitElement)(e,t,!0)?(void 0===n&&(n=!0),a.push(t)):l&&(0,r.isSameStyleChild)(e,t)?(void 0===n&&(n=!1),s.push((function(){(0,i.css)(t,Object.keys(l).reduce((function(e,t){return e[t]=null,e}),{})),(0,i.attr)(t,"style")||(0,i.attr)(t,"style",null),t.nodeName.toLowerCase()===e.element&&a.push(t)}))):o.Dom.isEmptyTextNode(t)||void 0===n&&(n=!1),c=u.next()};!c.done;)d();return s.forEach((function(e){return e()})),a.forEach(o.Dom.unwrap),Boolean(n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapAndCommitStyle=void 0;var o=n(21),r=n(78),i=n(5),a=n(79);t.wrapAndCommitStyle=function(e,t,n){var s=function(e,t,n){if(e.elementIsBlock){var a=o.Dom.up(t,(function(e){return o.Dom.isBlock(e)&&!o.Dom.isTag(e,["td","th","tr","tbody","table","li","ul","ol"])}),n.editor);if(a)return a}return e.elementIsBlock?(0,r.wrapUnwrappedText)(e,t,n,n.s.createRange):((0,i.attr)(t,"size",null),t)}(e,t,n);return e.elementIsList?(0,a.wrapOrderedList)(e,s,n):o.Dom.replace(s,e.element,n.createInside,!0)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapUnwrappedText=void 0;var o=n(21);t.wrapUnwrappedText=function(e,t,n,r){var i=n.editor,a=n.createInside,s=function(e,t){void 0===t&&(t="previousSibling");for(var r=e,a=e;a&&!o.Dom.isTag(a,n.o.enter)&&(r=a,a=a[t]?a[t]:a.parentNode&&!o.Dom.isBlock(a.parentNode)&&a.parentNode!==i?a.parentNode:null,!o.Dom.isBlock(a)););return r},l=s(t),u=s(t,"nextSibling"),c=r();c.setStartBefore(l),c.setEndAfter(u);var d=c.extractContents(),f=a.element(e.element);return f.appendChild(d),c.insertNode(f),e.elementIsBlock&&o.Dom.isEmpty(f)&&!o.Dom.isTag(f.firstElementChild,"br")&&f.appendChild(a.element("br")),f}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapOrderedList=void 0;var o=n(21);t.wrapOrderedList=function(e,t,n){var r=o.Dom.replace(t,"li",n.createInside),i=r.previousElementSibling||r.nextElementSibling;return o.Dom.isTag(i,["ul","ol"])||(i=n.createInside.element(e.element),o.Dom.before(r,i)),r.previousElementSibling===i?o.Dom.append(i,r):o.Dom.prepend(i,r),i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getClassName=t.keepNames=void 0;var o=n(10);t.keepNames=new Map,t.getClassName=function(e){var n;if((0,o.isFunction)(e.className))return e.className();var r=(null===(n=e.constructor)||void 0===n?void 0:n.originalConstructor)||e.constructor;if(t.keepNames.has(r))return t.keepNames.get(r);if(r.name)return r.name;var i=new RegExp(/^\s*function\s*(\S*)\s*\(/),a=r.toString().match(i);return a?a[1]:""}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(82),t),(0,o.__exportStar)(n(41),t),(0,o.__exportStar)(n(83),t),(0,o.__exportStar)(n(84),t),(0,o.__exportStar)(n(85),t),(0,o.__exportStar)(n(86),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0,t.camelCase=function(e){return e.replace(/([-_])(.)/g,(function(e,t,n){return n.toUpperCase()}))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CamelCaseToKebabCase=t.kebabCase=void 0,t.kebabCase=function(e){return e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()},t.CamelCaseToKebabCase=function(e){return e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.trimInv=t.trim=void 0;var o=n(23);t.trim=function(e){return e.replace((0,o.SPACE_REG_EXP_END)(),"").replace((0,o.SPACE_REG_EXP_START)(),"")},t.trimInv=function(e){return e.replace((0,o.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,o.INVISIBLE_SPACE_REG_EXP_START)(),"")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ucfirst=void 0,t.ucfirst=function(e){return e.length?e[0].toUpperCase()+e.substr(1):""}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.i18n=t.sprintf=void 0;var o=n(87),r=n(6),i=n(36),a=n(81),s=n(19);t.sprintf=function(e,t){if(!t||!t.length)return e;for(var n=/%([sd])/g,o=n.exec(e),r=e,i=0;o&&void 0!==t[i];)r=r.replace(o[0],t[i].toString()),i+=1,o=n.exec(e);return r},t.i18n=function(e,n,l){if(!(0,i.isString)(e))throw(0,r.error)("i18n: Need string in first argument");if(!e.length)return e;var u,c=Boolean(void 0!==l&&l.debugLanguage),d=function(e){return n&&n.length?(0,t.sprintf)(e,n):e},f=(0,r.defaultLanguage)(o.Config.defaultOptions.language,o.Config.defaultOptions.language),p=(0,r.defaultLanguage)(null==l?void 0:l.language,f),h=function(t){if(t){if((0,i.isString)(t[e]))return d(t[e]);var n=e.toLowerCase();if((0,i.isString)(t[n]))return d(t[n]);var o=(0,a.ucfirst)(e);return(0,i.isString)(t[o])?d(t[o]):void 0}};u=void 0!==s.lang[p]?s.lang[p]:void 0!==s.lang[f]?s.lang[f]:s.lang.en;var v=null==l?void 0:l.i18n;if(v&&v[p]){var m=h(v[p]);if(m)return m}return h(u)||(s.lang.en&&(0,i.isString)(s.lang.en[e])&&s.lang.en[e]?d(s.lang.en[e]):c?"{"+e+"}":d(e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var o=n(23),r=function(){function e(){this.namespace="",this.safeMode=!1,this.safePluginsList=["about","enter","backspace"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument="undefined"!=typeof document?document:null,this.ownerWindow="undefined"!=typeof window?window:null,this.shadowRoot=null,this.styleValues={},this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.spellcheck=!0,this.editorCssClass=!1,this.style=!1,this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=1e3,this.useNativeTooltip=!1,this.enter=o.PARAGRAPH,this.enterBlock="br"!==this.enter?this.enter:o.PARAGRAPH,this.defaultMode=o.MODE_WYSIWYG,this.useSplitMode=!1,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"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,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:[]}],this.buttonsMD=["bold","italic","|","ul","ol","eraser","|","font","fontsize","---","image","table","|","link","\n","brush","paragraph","align","|","hr","copyformat","fullsize","---","undo","redo","|","dots"],this.buttonsSM=["bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","---","image","table","\n","link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"],this.buttonsXS=["bold","brush","paragraph","eraser","|","fontsize","---","image","\n","align","undo","redo","|","link","table","---","dots"],this.events={},this.textIcons=!1,this.showBrowserColorPicker=!0}return Object.defineProperty(e,"defaultOptions",{get:function(){return e.__defaultOptions||(e.__defaultOptions=new e),e.__defaultOptions},enumerable:!1,configurable:!0}),e}();t.Config=r,r.prototype.controls={}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewComponent=void 0;var o=n(1),r=function(e){function t(t){var n=e.call(this)||this;return n.setParentView(t),n}return(0,o.__extends)(t,e),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this.j.defaultTimeout},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"j",{get:function(){return this.jodit},enumerable:!1,configurable:!0}),t.prototype.i18n=function(e){for(var t,n=[],r=1;arguments.length>r;r++)n[r-1]=arguments[r];return(t=this.j).i18n.apply(t,(0,o.__spreadArray)([e],(0,o.__read)(n),!1))},t.prototype.setParentView=function(e){return this.jodit=e,e.components.add(this),this},t.prototype.destruct=function(){return this.j.components.delete(this),e.prototype.destruct.call(this)},t}(n(18).Component);t.ViewComponent=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.clearCenterAlign=t.css=void 0;var o=n(36),r=n(90),i=n(81);function a(e,t,n,s){void 0===s&&(s=!1);var l=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;if((0,o.isBoolean)(n)&&(s=n,n=void 0),(0,o.isPlainObject)(t)||void 0!==n){var u=function(e,t,n){!(0,o.isVoid)(n)&&l.test(t)&&(0,o.isNumeric)(n.toString())&&(n=parseInt(n.toString(),10)+"px"),void 0===n||null!=n&&a(e,t,!0)===(0,r.normalizeCssValue)(t,n)||(e.style[t]=n)};if((0,o.isPlainObject)(t))for(var c=Object.keys(t),d=0;c.length>d;d+=1)u(e,(0,i.camelCase)(c[d]),t[c[d]]);else u(e,(0,i.camelCase)(t),n);return""}var f=(0,i.kebabCase)(t),p=e.ownerDocument||document,h=!!p&&(p.defaultView||p.parentWindow),v=e.style[t],m="";return void 0!==v&&""!==v?m=v:h&&!s&&(m=h.getComputedStyle(e).getPropertyValue(f)),l.test(t)&&/^[-+]?[0-9.]+px$/.test(m.toString())&&(m=parseInt(m.toString(),10)),(0,r.normalizeCssValue)(t,m)}t.css=a,t.clearCenterAlign=function(e){"block"===a(e,"display")&&a(e,"display","");var t=e.style;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(91),t),(0,o.__exportStar)(n(92),t),(0,o.__exportStar)(n(93),t),(0,o.__exportStar)(n(94),t),(0,o.__exportStar)(n(95),t),(0,o.__exportStar)(n(96),t),(0,o.__exportStar)(n(97),t),(0,o.__exportStar)(n(98),t),(0,o.__exportStar)(n(101),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeKeyAliases=void 0;var o=n(81),r=n(23);t.normalizeKeyAliases=function(e){var t={};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map((function(e){return(0,o.trim)(e.toLowerCase())})).map((function(e){return r.KEY_ALIASES[e]||e})).sort().filter((function(e){return!t[e]&&""!==e&&(t[e]=!0)})).join("+")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLicense=void 0,t.normalizeLicense=function(e,t){void 0===t&&(t=8);for(var n=[];e.length;)n.push(e.substr(0,t)),e=e.substr(t);return n[1]=n[1].replace(/./g,"*"),n[2]=n[2].replace(/./g,"*"),n.join("-")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeNode=void 0;var o=n(23),r=n(21);t.normalizeNode=function(e){if(e){if(r.Dom.isText(e)&&null!=e.nodeValue&&e.parentNode)for(;r.Dom.isText(e.nextSibling);)null!=e.nextSibling.nodeValue&&(e.nodeValue+=e.nextSibling.nodeValue),e.nodeValue=e.nodeValue.replace((0,o.INVISIBLE_SPACE_REG_EXP)(),""),r.Dom.safeRemove(e.nextSibling);else(0,t.normalizeNode)(e.firstChild);(0,t.normalizeNode)(e.nextSibling)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePath=void 0;var o=n(81);t.normalizePath=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return e.filter((function(e){return(0,o.trim)(e).length})).map((function(t,n){return t=t.replace(/([^:])[\\/]+/g,"$1/"),n&&(t=t.replace(/^\//,"")),n!==e.length-1&&(t=t.replace(/\/$/,"")),t})).join("/")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeRelativePath=void 0,t.normalizeRelativePath=function(e){return e.split("/").reduce((function(e,t){switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e}),[]).join("/")+(e.endsWith("/")?"/":"")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSize=void 0,t.normalizeSize=function(e){return/^[0-9]+$/.test(e.toString())?e+"px":e.toString()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeUrl=void 0,t.normalizeUrl=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return e.filter((function(e){return e.length})).map((function(e){return e.replace(/\/$/,"")})).join("/").replace(/([^:])[\\/]+/g,"$1/")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeCssValue=void 0;var o=n(36),r=n(81),i=n(99);t.normalizeCssValue=function(e,t){if("font-weight"===(0,r.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,o.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,i.colorToHex)(t.toString())||t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(100),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.colorToHex=void 0,t.colorToHex=function(e){if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;var t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";for(var n=parseInt(t[2],10),o=parseInt(t[3],10),r=(parseInt(t[4],10)|o<<8|n<<16).toString(16).toUpperCase();6>r.length;)r="0"+r;return t[1]+"#"+r}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeColor=void 0;var o=n(99),r=n(81);t.normalizeColor=function(e){var t=["#"],n=(0,o.colorToHex)(e);if(!n)return!1;if(3===(n=(n=(0,r.trim)(n.toUpperCase())).substr(1)).length){for(var i=0;3>i;i+=1)t.push(n[i]),t.push(n[i]);return t.join("")}return n.length>6&&(n=n.substr(0,6)),"#"+n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0;var o=n(13),r=n(46),i=n(38),a=n(36);t.set=function(e,t,n){if((0,o.isString)(e)&&e.length){for(var s=e.split("."),l=n,u=s[0],c=0;s.length-1>c;c+=1)(0,i.isArray)(l[u=s[c]])||(0,a.isPlainObject)(l[u])||(l[u]=(0,r.isNumeric)(s[c+1])?[]:{}),l=l[u];l&&(l[s[s.length-1]]=t)}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LimitedStack=void 0;var n=function(){function e(e){this.limit=e,this.stack=[]}return e.prototype.push=function(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this},e.prototype.pop=function(){return this.stack.pop()},e.prototype.find=function(e){return this.stack.find(e)},e}();t.LimitedStack=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadNextStyle=t.loadNext=t.appendStyleAsync=t.appendScriptAsync=t.appendScript=void 0;var o=n(1),r=n(105),i=n(36),a=new Map,s=function(e){return function(t,n){return(0,o.__awaiter)(void 0,void 0,Promise,(function(){var r;return(0,o.__generator)(this,(function(o){return a.has(n)?[2,a.get(n)]:(r=e(t,n),a.set(n,r),[2,r])}))}))}};t.appendScript=function(e,t,n){var o=e.c.element("script");return o.type="text/javascript",o.async=!0,(0,i.isFunction)(n)&&!e.isInDestruct&&e.e.on(o,"load",n),o.src||(o.src=(0,r.completeUrl)(t)),e.od.body.appendChild(o),{callback:n,element:o}},t.appendScriptAsync=s((function(e,n){return new Promise((function(o,r){var i=(0,t.appendScript)(e,n,o).element;!e.isInDestruct&&e.e.on(i,"error",r)}))})),t.appendStyleAsync=s((function(e,t){return new Promise((function(n,o){var i=e.c.element("link");i.rel="stylesheet",i.media="all",i.crossOrigin="anonymous",!e.isInDestruct&&e.e.on(i,"load",(function(){return n(i)})).on(i,"error",o),i.href=(0,r.completeUrl)(t),e.o.shadowRoot?e.o.shadowRoot.appendChild(i):e.od.body.appendChild(i)}))})),t.loadNext=function(e,n,o){return void 0===o&&(o=0),(0,i.isString)(n[o])?(0,t.appendScriptAsync)(e,n[o]).then((function(){return(0,t.loadNext)(e,n,o+1)})):Promise.resolve()},t.loadNextStyle=function(e,n,o){return void 0===o&&(o=0),(0,i.isString)(n[o])?(0,t.appendStyleAsync)(e,n[o]).then((function(){return(0,t.loadNextStyle)(e,n,o+1)})):Promise.resolve()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.completeUrl=void 0,t.completeUrl=function(e){return"file:"===window.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.browser=void 0,t.browser=function(e){var t=navigator.userAgent.toLowerCase(),n=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?n[2]:"webkit"===e?"chrome"===n[1]||"webkit"===n[1]:"ff"===e?"firefox"===n[1]:"msie"===e?"trident"===n[1]||"msie"===n[1]:n[1]===e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=void 0;var o=n(36);t.buildQuery=function(e,n){var r=[],i=encodeURIComponent;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=n?n+"["+a+"]":a,l=e[a];r.push((0,o.isPlainObject)(l)?(0,t.buildQuery)(l,s):i(s)+"="+i(l))}return r.join("&")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigFlatten=t.ConfigProto=void 0;var o=n(1),r=n(109),i=n(36),a=n(87),s=n(9);t.ConfigProto=function e(t,n,s){if(void 0===s&&(s=0),Object.getPrototypeOf(t)!==Object.prototype)return t;var l=a.Config.defaultOptions;if((0,i.isString)(t.preset)){if(void 0!==l.presets[t.preset]){var u=l.presets[t.preset];Object.keys(u).forEach((function(e){(0,i.isVoid)(t[e])&&(t[e]=u[e])}))}delete t.preset}var c={};return Object.keys(t).forEach((function(a){var l=t[a],u=n?n[a]:null;c[a]=(0,i.isPlainObject)(l)&&(0,i.isPlainObject)(u)&&!(0,r.isAtom)(l)?e(l,u,s+1):0!==s&&(0,i.isArray)(l)&&!(0,r.isAtom)(l)&&(0,i.isArray)(u)?(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(l),!1),(0,o.__read)(u.slice(l.length)),!1):l})),Object.setPrototypeOf(c,n),c},t.ConfigFlatten=function(e){return(0,s.keys)(e,!1).reduce((function(t,n){return t[n]=e[n],t}),{})}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fastClone=t.markAsAtomic=t.isAtom=void 0;var o=n(41);t.isAtom=function(e){return e&&e.isAtom},t.markAsAtomic=function(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e},t.fastClone=function(e){return JSON.parse((0,o.stringify)(e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.convertMediaUrlToVideoEmbed=void 0;var o=n(36),r=n(111);t.convertMediaUrlToVideoEmbed=function(e,t,n){if(void 0===t&&(t=400),void 0===n&&(n=345),!(0,o.isURL)(e))return e;var i=document.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;i.href=e,t||(t=400),n||(n=345);var s=i.protocol||"";switch(i.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(e)?e.replace(a,'<iframe width="'+t+'" height="'+n+'" src="'+s+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":var l=i.search?(0,r.parseQuery)(i.search):{v:i.pathname.substr(1)};return l.v?'<iframe width="'+t+'" height="'+n+'" src="'+s+"//www.youtube.com/embed/"+l.v+'" frameborder="0" allowfullscreen></iframe>':e}return e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuery=void 0,t.parseQuery=function(e){for(var t={},n=e.substr(1).split("&"),o=0;n.length>o;o+=1){var r=n[o].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1]||"")}return t}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ctrlKey=void 0,t.ctrlKey=function(e){if("undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultLanguage=void 0;var o=n(36);t.defaultLanguage=function(e,t){return void 0===t&&(t="en"),"auto"!==e&&(0,o.isString)(e)?e:document.documentElement&&document.documentElement.lang?document.documentElement.lang:navigator.language?navigator.language.substr(0,2):t}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.humanSizeToBytes=void 0,t.humanSizeToBytes=function(e){if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);var t=e.substr(-2,2).toUpperCase(),n=["KB","MB","GB","TB"],o=parseFloat(e.substr(0,e.length-2));return-1!==n.indexOf(t)?o*Math.pow(1024,n.indexOf(t)+1):parseInt(e,10)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.scrollIntoViewIfNeeded=t.inView=void 0,t.inView=function(e,t,n){var o=e.getBoundingClientRect(),r=e,i=o.top,a=o.height;do{if(r&&r.parentNode){if((o=(r=r.parentNode).getBoundingClientRect()).bottom<i)return!1;if(o.top>=i+a)return!1}}while(r&&r!==t&&r.parentNode);return(n.documentElement&&n.documentElement.clientHeight||0)>=i},t.scrollIntoViewIfNeeded=function(e,n,o){(0,t.inView)(e,n,o)||(n.clientHeight!==n.scrollHeight&&(n.scrollTop=e.offsetTop),(0,t.inView)(e,n,o)||e.scrollIntoView())}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveElement=t.cssPath=t.refs=t.getXPathByElement=t.$$=void 0;var o=n(23),r=n(36),i=n(6),a=n(21),s=n(81),l=n(117),u=n(120),c=1;function d(e,t){var n;if(!/:scope/.test(e)||!o.IS_IE||t&&t.nodeType===Node.DOCUMENT_NODE)n=t.querySelectorAll(e);else{var r=t.id,i=r||"_selector_id_"+String(Math.random()).slice(2)+ ++c;e=e.replace(/:scope/g,"#"+i),!r&&t.setAttribute("id",i),n=t.parentNode.querySelectorAll(e),r||t.removeAttribute("id")}return[].slice.call(n)}t.$$=d,t.getXPathByElement=function(e,n){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(!e.parentNode||n===e)return"";if(e.id)return"//*[@id='"+e.id+"']";var o=[].filter.call(e.parentNode.childNodes,(function(t){return t.nodeName===e.nodeName}));return(0,t.getXPathByElement)(e.parentNode,n)+"/"+e.nodeName.toLowerCase()+(o.length>1?"["+((0,l.toArray)(o).indexOf(e)+1)+"]":"")},t.refs=function(e){return e instanceof u.UIElement&&(e=e.container),d("[ref],[data-ref]",e).reduce((function(e,t){var n=(0,i.attr)(t,"-ref");return n&&(0,r.isString)(n)&&(e[(0,s.camelCase)(n)]=t,e[n]=t),e}),{})},t.cssPath=function(e){if(!a.Dom.isElement(e))return null;for(var t=[],n=e;n&&n.nodeType===Node.ELEMENT_NODE;){var o=n.nodeName.toLowerCase();if(n.id){t.unshift(o+="#"+n.id);break}var r=n,i=1;do{(r=r.previousElementSibling)&&r.nodeName.toLowerCase()===o&&i++}while(r);t.unshift(o+=":nth-of-type("+i+")"),n=n.parentNode}return t.join(" > ")},t.resolveElement=function(e,t){var n=e;if((0,r.isString)(e))try{n=t.querySelector(e)}catch(t){throw(0,i.error)('String "'+e+'" should be valid HTML selector')}if(!n||"object"!=typeof n||!a.Dom.isElement(n)||!n.cloneNode)throw(0,i.error)('Element "'+e+'" should be string or HTMLElement instance');return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=t.splitArray=t.asArray=void 0;var o=n(118);Object.defineProperty(t,"asArray",{enumerable:!0,get:function(){return o.asArray}});var r=n(66);Object.defineProperty(t,"splitArray",{enumerable:!0,get:function(){return r.splitArray}});var i=n(119);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return i.toArray}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.asArray=void 0;var o=n(38);t.asArray=function(e){return(0,o.isArray)(e)?e:[e]}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var o=n(9),r=n(49);t.toArray=function(){for(var e,t=[],n=0;arguments.length>n;n++)t[n]=arguments[n];var i=(0,r.isNativeFunction)(Array.from)?Array.from:null!==(e=(0,o.reset)("Array.from"))&&void 0!==e?e:Array.from;return i.apply(Array,t)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(121),t),(0,o.__exportStar)(n(126),t),(0,o.__exportStar)(n(141),t),(0,o.__exportStar)(n(131),t),(0,o.__exportStar)(n(144),t),(0,o.__exportStar)(n(125),t),(0,o.__exportStar)(n(162),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIElement=void 0;var o=n(1),r=n(16),i=n(21),a=n(122),s=n(5),l=n(125),u=function(e){function t(t,n){var o=e.call(this,t)||this;return o.name="",o.__parentElement=null,o.mods={},o.container=o.createContainer(n),Object.defineProperty(o.container,"component",{value:o,configurable:!0}),o}return(0,o.__extends)(t,e),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this.__parentElement},set:function(e){var t=this;this.__parentElement=e,e&&e.hookStatus("beforeDestruct",(function(){return t.destruct()})),this.updateParentElement(this)},enumerable:!1,configurable:!0}),t.prototype.bubble=function(e){for(var t=this.parentElement;t;)e(t),t=t.parentElement;return this},t.prototype.updateParentElement=function(e){var t;return null===(t=this.__parentElement)||void 0===t||t.updateParentElement(e),this},t.prototype.get=function(t,n){return e.prototype.get.call(this,t,n)||this.getElm(t)},t.prototype.closest=function(e){for(var n="object"==typeof e?function(t){return t===e}:function(t){return t instanceof e},o=this.__parentElement;o;){if(n(o))return o;o=!o.parentElement&&o.container.parentElement?t.closestElement(o.container.parentElement,t):o.parentElement}return null},t.closestElement=function(e,t){var n=i.Dom.up(e,(function(e){if(e){var n=e.component;return n&&n instanceof t}return!1}));return n?null==n?void 0:n.component:null},t.prototype.setMod=function(e,t,n){return void 0===n&&(n=this.container),a.Mods.setMod.call(this,e,t,n),this},t.prototype.getMod=function(e){return a.Mods.getMod.call(this,e)},t.prototype.getElm=function(e){return a.Elms.getElm.call(this,e)},t.prototype.getElms=function(e){return a.Elms.getElms.call(this,e)},t.prototype.update=function(){},t.prototype.appendTo=function(e){return e.appendChild(this.container),this},t.prototype.clearName=function(e){return e.replace(/[^a-zA-Z0-9]/g,"_")},t.prototype.render=function(e){return this.j.c.div(this.componentName)},t.prototype.createContainer=function(e){var t=this,n=this.render(e);if((0,s.isString)(n)){var o=this.j.c.fromHTML(n.replace(/\*([^*]+?)\*/g,(function(e,t){return l.Icon.get(t)||""})).replace(/&__/g,this.componentName+"__").replace(/~([^~]+?)~/g,(function(e,n){return t.i18n(n)})));return o.classList.add(this.componentName),o}return n},t.prototype.destruct=function(){return i.Dom.safeRemove(this.container),this.parentElement=null,e.prototype.destruct.call(this)},t}(r.ViewComponent);t.UIElement=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(123),t),(0,o.__exportStar)(n(124),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Elms=void 0;var o=n(119),r=function(){function e(){}return e.getElm=function(e){return this.container.querySelector(".".concat(this.getFullElName(e)))},e.getElms=function(e){return(0,o.toArray)(this.container.querySelectorAll(".".concat(this.getFullElName(e))))},e}();t.Elms=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Mods=void 0;var o=n(119),r=n(14),i=function(){function e(){}return e.setMod=function(e,t,n){if(e=e.toLowerCase(),this.mods[e]!==t){var i="".concat(this.componentName,"_").concat(e),a=(n||this.container).classList;(0,o.toArray)(a).forEach((function(e){0===e.indexOf(i)&&a.remove(e)})),!(0,r.isVoid)(t)&&""!==t&&a.add("".concat(i,"_").concat(t.toString().toLowerCase())),this.mods[e]=t}},e.getMod=function(e){var t;return null!==(t=this.mods[e])&&void 0!==t?t:null},e}();t.Mods=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var o=n(5),r=function(){function e(){}return e.getIcon=function(t){return/<svg/i.test(t)?t:e.icons[t]||e.icons[t.replace(/-/g,"_")]||e.icons[t.replace(/_/g,"-")]||e.icons[t.toLowerCase()]},e.exists=function(e){return void 0!==this.getIcon(e)},e.get=function(e,t){return void 0===t&&(t="<span></span>"),this.getIcon(e)||t},e.set=function(e,t){return this.icons[e.replace("_","-")]=t,this},e.makeIcon=function(t,n){var r,i;if(n){var a=n.name.replace(/[^a-zA-Z0-9]/g,"_");if(n.iconURL)i=t.c.span(),(0,o.css)(i,"backgroundImage","url("+n.iconURL.replace("{basePath}",(null==t?void 0:t.basePath)||"")+")");else{var s=t.e.fire("getIcon",n.name,n,a)||e.get(n.name,"")||(null===(r=t.o.extraIcons)||void 0===r?void 0:r[n.name]);s&&(i=t.c.fromHTML(s.trim()),/^<svg/i.test(n.name)||i.classList.add("jodit-icon_"+a))}}return i&&(i.classList.add("jodit-icon"),i.style.fill=n.fill),i},e.icons={},e}();t.Icon=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(127),t),(0,o.__exportStar)(n(129),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.UIButton=t.UIButtonState=void 0;var o=n(1);n(128);var r=n(120),i=n(21),a=n(5),s=n(120),l=n(120),u=n(32),c=n(16);t.UIButtonState=function(){return{size:"middle",type:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:""},tooltip:"",text:"",tabIndex:void 0}};var d=function(e){function n(n,o){var r=e.call(this,n)||this;return r.isButton=!0,r.state=(0,t.UIButtonState)(),r.actionHandlers=[],r.updateSize(),r.onChangeSize(),r.onChangeStatus(),o&&r.hookStatus(c.STATUSES.ready,(function(){r.setState(o)})),r}return(0,o.__extends)(n,e),n.prototype.className=function(){return"UIButton"},n.prototype.setState=function(e){return Object.assign(this.state,e),this},n.prototype.onChangeSize=function(){this.setMod("size",this.state.size)},n.prototype.onChangeType=function(){(0,a.attr)(this.container,"type",this.state.type)},n.prototype.updateSize=function(){var e=this.closest(l.UIList);e&&(this.state.size=e.buttonSize)},n.prototype.onChangeStatus=function(){this.setMod("variant",this.state.variant)},n.prototype.onChangeText=function(){this.text.textContent=this.jodit.i18n(this.state.text)},n.prototype.onChangeTextSetMode=function(){this.setMod("text-icons",Boolean(this.state.text.trim().length))},n.prototype.onChangeDisabled=function(){(0,a.attr)(this.container,"disabled",this.state.disabled||null)},n.prototype.onChangeActivated=function(){(0,a.attr)(this.container,"aria-pressed",this.state.activated)},n.prototype.onChangeName=function(){this.container.classList.add("".concat(this.componentName,"_").concat(this.clearName(this.state.name))),this.name=this.state.name,(0,a.attr)(this.container,"data-ref",this.state.name),(0,a.attr)(this.container,"ref",this.state.name)},n.prototype.onChangeTooltip=function(){this.get("j.o.useNativeTooltip")&&(0,a.attr)(this.container,"title",this.state.tooltip),(0,a.attr)(this.container,"aria-label",this.state.tooltip)},n.prototype.onChangeTabIndex=function(){(0,a.attr)(this.container,"tabindex",this.state.tabIndex)},n.prototype.onChangeIcon=function(){var e=this.get("j.o.textIcons");if(!(!0===e||(0,a.isFunction)(e)&&e(this.state.name))){i.Dom.detach(this.icon);var t=s.Icon.makeIcon(this.j,this.state.icon);t&&this.icon.appendChild(t)}},n.prototype.focus=function(){this.container.focus()},n.prototype.isFocused=function(){var e=this.od.activeElement;return Boolean(e&&i.Dom.isOrContains(this.container,e))},n.prototype.createContainer=function(){var e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1});return this.icon=this.j.c.span(e+"__icon"),this.text=this.j.c.span(e+"__text"),t.appendChild(this.icon),t.appendChild(this.text),this.j.e.on(t,"click",this.onActionFire),t},n.prototype.destruct=function(){return this.j.e.off(this.container),e.prototype.destruct.call(this)},n.prototype.onAction=function(e){return this.actionHandlers.push(e),this},n.prototype.onActionFire=function(e){var t=this;e.buffer={actionTrigger:this},this.actionHandlers.forEach((function(n){return n.call(t,e)}))},(0,o.__decorate)([(0,u.watch)("state.size")],n.prototype,"onChangeSize",null),(0,o.__decorate)([(0,u.watch)("state.type")],n.prototype,"onChangeType",null),(0,o.__decorate)([(0,u.watch)("parentElement")],n.prototype,"updateSize",null),(0,o.__decorate)([(0,u.watch)("state.variant")],n.prototype,"onChangeStatus",null),(0,o.__decorate)([(0,u.watch)("state.text")],n.prototype,"onChangeText",null),(0,o.__decorate)([(0,u.watch)("state.text")],n.prototype,"onChangeTextSetMode",null),(0,o.__decorate)([(0,u.watch)("state.disabled")],n.prototype,"onChangeDisabled",null),(0,o.__decorate)([(0,u.watch)("state.activated")],n.prototype,"onChangeActivated",null),(0,o.__decorate)([(0,u.watch)("state.name")],n.prototype,"onChangeName",null),(0,o.__decorate)([(0,u.watch)("state.tooltip")],n.prototype,"onChangeTooltip",null),(0,o.__decorate)([(0,u.watch)("state.tabIndex")],n.prototype,"onChangeTabIndex",null),(0,o.__decorate)([(0,u.watch)("state.icon")],n.prototype,"onChangeIcon",null),(0,o.__decorate)([u.autobind],n.prototype,"onActionFire",null),(0,o.__decorate)([u.component],n)}(r.UIElement);t.UIButton=d,t.Button=function(e,t,n,o){var r=new d(e);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,a.isString)(t)?(r.state.icon.name=t,r.state.name=t,o&&(r.state.variant=o),n&&(r.state.text=n)):r.setState(t),r}},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIButtonGroup=void 0;var o=n(1);n(130);var r=n(131),i=n(32),a=n(127),s=n(5),l=function(e){function t(t,n){var o,r;void 0===n&&(n={radio:!0});var i=e.call(this,t,null===(o=n.options)||void 0===o?void 0:o.map((function(e){var n=new a.UIButton(t,{text:e.text,value:e.value,variant:"primary"});return n.onAction((function(){i.select(e.value)})),n})),n)||this;return i.options=n,i.select(null!==(r=n.value)&&void 0!==r?r:0),i}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UIButtonGroup"},t.prototype.render=function(e){return'<div>\n\t\t\t<div class="&__label">~'.concat(e.label,'~</div>\n\t\t\t<div class="&__options"></div>\n\t\t</div>')},t.prototype.appendChildToContainer=function(e){var t=this.getElm("options");(0,s.assert)(null!=t,"Options does not exist"),t.appendChild(e)},t.prototype.select=function(e){var t,n,o=this;this.elements.forEach((function(t,n){n===e||t.state.value===e?t.state.activated=!0:o.options.radio&&(t.state.activated=!1)}));var r=this.elements.filter((function(e){return e.state.activated})).map((function(e){return{text:e.state.text,value:e.state.value}}));this.jodit.e.fire(this,"select",r),null===(n=(t=this.options).onChange)||void 0===n||n.call(t,r)},(0,o.__decorate)([i.component],t)}(r.UIGroup);t.UIButtonGroup=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(132),t),(0,o.__exportStar)(n(134),t),(0,o.__exportStar)(n(138),t),(0,o.__exportStar)(n(139),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIGroup=void 0;var o=n(1);n(133);var r=n(121),i=n(32),a=n(5),s=n(21),l=function(e){function t(t,n,o){var r=e.call(this,t,o)||this;return r.options=o,r.syncMod=!1,r.elements=[],r.buttonSize="middle",null==n||n.forEach((function(e){return e&&r.append(e)})),(null==o?void 0:o.name)&&(r.name=o.name),r}var n;return(0,o.__extends)(t,e),n=t,t.prototype.className=function(){return"UIGroup"},Object.defineProperty(t.prototype,"allChildren",{get:function(){for(var e=[],t=(0,o.__spreadArray)([],(0,o.__read)(this.elements),!1);t.length;){var r=t.shift();(0,a.isArray)(r)?t.push.apply(t,(0,o.__spreadArray)([],(0,o.__read)(r),!1)):r instanceof n?t.push.apply(t,(0,o.__spreadArray)([],(0,o.__read)(r.elements),!1)):r&&e.push(r)}return e},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.elements.forEach((function(e){return e.update()})),this.setMod("size",this.buttonSize)},t.prototype.append=function(e,t){var n=this;if((0,a.isArray)(e))return e.forEach((function(e){return n.append(e,t)})),this;if(this.elements.push(e),e.name&&e.container.classList.add(this.getFullElName(e.name)),t){var o=this.getElm(t);(0,a.assert)(null!=o,"Element does not exist"),o.appendChild(e.container)}else this.appendChildToContainer(e.container);return e.parentElement=this,e.update(),this},t.prototype.setMod=function(t,n){return this.syncMod&&this.elements.forEach((function(e){return e.setMod(t,n)})),e.prototype.setMod.call(this,t,n)},t.prototype.appendChildToContainer=function(e){this.container.appendChild(e)},t.prototype.remove=function(e){var t=this.elements.indexOf(e);return-1!==t&&(this.elements.splice(t,1),s.Dom.safeRemove(e.container),e.parentElement=null),this},t.prototype.clear=function(){return this.elements.forEach((function(e){return e.destruct()})),this.elements.length=0,this},t.prototype.destruct=function(){return this.clear(),e.prototype.destruct.call(this)},(0,o.__decorate)([(0,i.watch)("buttonSize")],t.prototype,"update",null),n=(0,o.__decorate)([i.component],t)}(r.UIElement);t.UIGroup=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIList=void 0;var o=n(1);n(135);var r=n(136),i=n(32),a=n(132),s=n(138),l=n(139),u=n(127),c=n(140),d=n(137),f=n(117),p=function(e){function t(t){var n=e.call(this,t)||this;return n.mode="horizontal",n.removeButtons=[],n.onChangeMode(),n}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UIList"},t.prototype.onChangeMode=function(){this.setMod("mode",this.mode)},t.prototype.makeGroup=function(){return new a.UIGroup(this.jodit)},Object.defineProperty(t.prototype,"buttons",{get:function(){return this.allChildren.filter((function(e){return e instanceof u.UIButton}))},enumerable:!1,configurable:!0}),t.prototype.getButtonsNames=function(){return this.buttons.map((function(e){return e instanceof u.UIButton&&e.state.name||""})).filter((function(e){return""!==e}))},t.prototype.setRemoveButtons=function(e){return this.removeButtons=e||[],this},t.prototype.build=function(e,t){var n=this;void 0===t&&(t=null),e=(0,f.splitArray)(e),this.clear();var o,i=!1,a=this.makeGroup();this.append(a),a.setMod("line",!0);var u=function(e){var r=null;switch(e.name){case"\n":(a=n.makeGroup()).setMod("line",!0),o=n.makeGroup(),a.append(o),n.append(a);break;case"|":i||(i=!0,r=new s.UISeparator(n.j));break;case"---":o.setMod("before-spacer",!0);var u=new l.UISpacer(n.j);a.append(u),o=n.makeGroup(),a.append(o),i=!1;break;default:i=!1,r=n.makeButton(e,t)}r&&(o||(o=n.makeGroup(),a.append(o)),o.append(r))},p=function(e){return!n.removeButtons.includes(e.name)};return e.forEach((function(e){if((0,c.isButtonGroup)(e)){var t=e.buttons.filter((function(e){return e}));t.length&&((o=n.makeGroup()).setMod("separated",!0).setMod("group",e.group),a.append(o),(0,r.getStrongControlTypes)(t,n.j.o.controls).filter(p).forEach(u))}else{o||(o=n.makeGroup(),a.append(o));var i=(0,d.getControlType)(e,n.j.o.controls);p(i)&&u(i)}})),this.update(),this},t.prototype.makeButton=function(e,t){return new u.UIButton(this.j)},(0,o.__decorate)([(0,i.watch)("mode")],t.prototype,"onChangeMode",null),(0,o.__decorate)([i.component],t)}(a.UIGroup);t.UIList=p},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getStrongControlTypes=void 0;var o=n(137),r=n(87),i=n(36),a=n(5);t.getStrongControlTypes=function(e,t){return((0,i.isArray)(e)?e:(0,a.keys)(e,!1).map((function(t){return(0,a.ConfigProto)({name:t},e[t]||{})}))).map((function(e){return(0,o.getControlType)(e,t||r.Config.defaultOptions.controls)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findControlType=t.getControlType=void 0;var o=n(1),r=n(5),i=n(87);function a(e,t){var n=(0,o.__read)(e.split(/\./),2),i=n[0],a=n[1],s=t;return null!=a?void 0!==t[i]&&(s=t[i]):a=i,s[a]?(0,o.__assign)({name:a},(0,r.ConfigFlatten)(s[a])):void 0}t.getControlType=function(e,t){var n;return t||(t=i.Config.defaultOptions.controls),(0,r.isString)(e)?n=a(e,t)||{name:e,command:e,tooltip:e}:void 0!==t[(n=(0,o.__assign)({name:"empty"},(0,r.ConfigFlatten)(e))).name]&&(n=(0,o.__assign)((0,o.__assign)({},(0,r.ConfigFlatten)(t[n.name])),(0,r.ConfigFlatten)(n))),n},t.findControlType=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UISeparator=void 0;var o=n(1),r=n(121),i=n(32),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UISeparator"},(0,o.__decorate)([i.component],t)}(r.UIElement);t.UISeparator=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UISpacer=void 0;var o=n(1),r=n(120),i=n(32),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UISpacer"},(0,o.__decorate)([i.component],t)}(r.UIElement);t.UISpacer=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.flatButtonsSet=t.isButtonGroup=void 0;var o=n(1),r=n(36);t.isButtonGroup=function(e){return(0,r.isArray)(e.buttons)},t.flatButtonsSet=function(e,n){var r=n.getRegisteredButtonGroups();return new Set(e.reduce((function(e,n){var i;return(0,t.isButtonGroup)(n)?e=e.concat((0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(n.buttons),!1),(0,o.__read)(null!==(i=r[n.group])&&void 0!==i?i:[]),!1)):e.push(n),e}),[]))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(142),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;var o=n(1);n(143);var r=n(21),i=n(5),a=n(19),s=n(120),l=n(32),u=function(e){function t(t,n){void 0===n&&(n=!0);var o=e.call(this,t)||this;return o.smart=n,o.isOpened=!1,o.strategy="leftBottom",o.viewBound=function(){return{left:0,top:0,width:o.ow.innerWidth,height:o.ow.innerHeight}},o.childrenPopups=new Set,(0,i.attr)(o.container,"role","popup"),o}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Popup"},t.prototype.updateParentElement=function(n){var o=this;return n!==this&&n instanceof t&&(this.childrenPopups.forEach((function(e){!n.closest(e)&&e.isOpened&&e.close()})),this.childrenPopups.has(n)||this.j.e.on(n,"beforeClose",(function(){o.childrenPopups.delete(n)})),this.childrenPopups.add(n)),e.prototype.updateParentElement.call(this,n)},t.prototype.setContent=function(e){r.Dom.detach(this.container);var t,n=this.j.c.div("".concat(this.componentName,"__content"));return e instanceof s.UIElement?(t=e.container,e.parentElement=this):t=(0,i.isString)(e)?this.j.c.fromHTML(e):e,n.appendChild(t),this.container.appendChild(n),this.updatePosition(),this},t.prototype.open=function(e,n){void 0===n&&(n=!1),(0,i.markOwner)(this.jodit,this.container),this.calculateZIndex(),this.isOpened=!0,this.addGlobalListeners(),this.targetBound=n?this.getKeepBound(e):e;var o=(0,a.getContainer)(this.jodit,t);return o!==this.container.parentElement&&o.appendChild(this.container),this.updatePosition(),this.j.e.fire(this,"afterOpen"),this},t.prototype.calculateZIndex=function(){var e=this;if(!this.container.style.zIndex){var t=function(t){var n=t.container.style.zIndex||t.o.zIndex;return!!n&&(e.setZIndex(1+parseInt(n.toString(),10)),!0)};if(!t(this.j))for(var n=this.parentElement;n;){if(t(n.j))return;if(n.container.style.zIndex)return void this.setZIndex(1+parseInt(n.container.style.zIndex.toString(),10));if(!n.parentElement&&n.container.parentElement){var o=s.UIElement.closestElement(n.container.parentElement,s.UIElement);if(o){n=o;continue}}n=n.parentElement}}},t.prototype.getKeepBound=function(e){var t=this,n=e(),a=this.od.elementFromPoint(n.left,n.top);if(!a)return e;var s=r.Dom.isHTMLElement(a)?a:a.parentElement,l=(0,i.position)(s,this.j);return function(){var n=e(),r=(0,i.position)(s,t.j);return(0,o.__assign)((0,o.__assign)({},n),{top:n.top+(r.top-l.top),left:n.left+(r.left-l.left)})}},t.prototype.updatePosition=function(){if(!this.isOpened)return this;var e=(0,o.__read)(this.calculatePosition(this.targetBound(),this.viewBound(),(0,i.position)(this.container,this.j)),2),t=e[0];return this.setMod("strategy",e[1]),(0,i.css)(this.container,{left:t.left,top:t.top}),this.childrenPopups.forEach((function(e){return e.updatePosition()})),this},t.prototype.throttleUpdatePosition=function(){this.updatePosition()},t.prototype.calculatePosition=function(e,n,r,a){void 0===a&&(a=this.strategy);var s={left:e.left,right:e.left-(r.width-e.width)},l={bottom:e.top+e.height,top:e.top-r.height},u=Object.keys(s).reduce((function(e,t){return e.concat(Object.keys(l).map((function(e){return"".concat(t).concat((0,i.ucfirst)(e))})))}),[]),c=function(e){var t=(0,o.__read)((0,i.kebabCase)(e).split("-"),2);return{left:s[t[0]],top:l[t[1]],width:r.width,height:r.height}},d=function(e){return t.boxInView(c(a),e)?a:u.find((function(n){if(t.boxInView(c(n),e))return n}))||null},f=d((0,i.position)(this.j.container,this.j));return f&&t.boxInView(c(f),n)||(f=d(n)||f||a),[c(f),f]},t.boxInView=function(e,t){return!(-2>e.top-t.top||-2>e.left-t.left||-2>t.top+t.height-(e.top+e.height)||-2>t.left+t.width-(e.left+e.width))},t.prototype.close=function(){return this.isOpened?(this.isOpened=!1,this.childrenPopups.forEach((function(e){return e.close()})),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.removeGlobalListeners(),r.Dom.safeRemove(this.container),this):this},t.prototype.closeOnOutsideClick=function(e){if(this.isOpened){var n=(0,i.isFunction)(e.composedPath)&&e.composedPath()[0]||e.target;if(n){var o=s.UIElement.closestElement(n,t);o&&(this===o||o.closest(this))||this.close()}else this.close()}},t.prototype.addGlobalListeners=function(){var e=this,t=this.throttleUpdatePosition,n=this.ow;a.eventEmitter.on("closeAllPopups",this.close),this.smart&&this.j.e.on("escape",this.close).on("mousedown touchstart",this.closeOnOutsideClick).on(n,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",t).on(this.container,"scroll mousewheel",t).on(n,"scroll",t).on(n,"resize",t),r.Dom.up(this.j.container,(function(n){n&&e.j.e.on(n,"scroll mousewheel",t)}))},t.prototype.removeGlobalListeners=function(){var e=this,t=this.throttleUpdatePosition,n=this.ow;a.eventEmitter.off("closeAllPopups",this.close),this.smart&&this.j.e.off("escape",this.close).off("mousedown touchstart",this.closeOnOutsideClick).off(n,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",t).off(this.container,"scroll mousewheel",t).off(n,"scroll",t).off(n,"resize",t),r.Dom.up(this.j.container,(function(n){n&&e.j.e.off(n,"scroll mousewheel",t)}))},t.prototype.setZIndex=function(e){this.container.style.zIndex=e.toString()},t.prototype.destruct=function(){return this.close(),e.prototype.destruct.call(this)},(0,o.__decorate)([l.autobind],t.prototype,"updatePosition",null),(0,o.__decorate)([(0,l.throttle)(10),l.autobind],t.prototype,"throttleUpdatePosition",null),(0,o.__decorate)([l.autobind],t.prototype,"close",null),(0,o.__decorate)([l.autobind],t.prototype,"closeOnOutsideClick",null),t}(s.UIElement);t.Popup=u},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(145),t),(0,o.__exportStar)(n(146),t),(0,o.__exportStar)(n(160),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIForm=void 0;var o=n(1),r=n(120),i=n(6),a=n(32),s=function(e){function t(){for(var t,n,r=[],i=0;arguments.length>i;i++)r[i]=arguments[i];var a=e.apply(this,(0,o.__spreadArray)([],(0,o.__read)(r),!1))||this;return(null===(t=a.options)||void 0===t?void 0:t.className)&&a.container.classList.add(null===(n=a.options)||void 0===n?void 0:n.className),a}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UIForm"},t.prototype.submit=function(){this.j.e.fire(this.container,"submit")},t.prototype.validate=function(){var e,t,n,i,a=this.allChildren.filter((function(e){return e instanceof r.UIInput}));try{for(var s=(0,o.__values)(a),l=s.next();!l.done;l=s.next())if(!l.value.validate())return!1}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var u=this.allChildren.filter((function(e){return e instanceof r.UISelect}));try{for(var c=(0,o.__values)(u),d=c.next();!d.done;d=c.next())if(!d.value.validate())return!1}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return!0},t.prototype.onSubmit=function(e){var t=this;this.j.e.on(this.container,"submit",(function(){var n=t.allChildren.filter((function(e){return e instanceof r.UIInput}));return!!t.validate()&&(e(n.reduce((function(e,t){return e[t.state.name]=t.value,e}),{})),!1)}))},t.prototype.createContainer=function(){var e=this.j.c.element("form");return e.classList.add(this.componentName),(0,i.attr)(e,"dir",this.j.o.direction||"auto"),e},(0,o.__decorate)([a.component],t)}(r.UIGroup);t.UIForm=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(147),t),(0,o.__exportStar)(n(152),t),(0,o.__exportStar)(n(154),t),(0,o.__exportStar)(n(156),t),(0,o.__exportStar)(n(158),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIInput=void 0;var o=n(1);n(148);var r=n(121),i=n(5),a=n(21),s=n(32),l=n(125),u=n(149),c=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.label=i.j.c.span(i.getFullElName("label")),i.icon=i.j.c.span(i.getFullElName("icon")),i.clearButton=i.j.c.span(i.getFullElName("clear"),l.Icon.get("cancel")),i.state=(0,o.__assign)({},n.defaultState),i.__errorBox=i.j.c.span(i.getFullElName("error")),i.validators=new Set([]),void 0!==(null==r?void 0:r.value)&&(r.value=r.value.toString()),Object.assign(i.state,r),void 0!==i.state.clearButton&&(i.j.e.on(i.clearButton,"click",(function(e){e.preventDefault(),i.nativeInput.value="",i.j.e.fire(i.nativeInput,"input"),i.focus()})).on(i.nativeInput,"input",(function(){i.state.clearButton=Boolean(i.value.length)})),i.state.clearButton=Boolean(i.value.length)),i.j.e.on(i.nativeInput,"focus blur",(function(){i.onChangeFocus()})).on(i.nativeInput,"input change",i.onChangeValue),i.onChangeState(),i.onChangeClassName(),i.onChangeStateValue(),i}var n;return(0,o.__extends)(t,e),n=t,t.prototype.className=function(){return"UIInput"},t.prototype.onChangeClear=function(){this.state.clearButton?a.Dom.after(this.nativeInput,this.clearButton):a.Dom.safeRemove(this.clearButton)},t.prototype.onChangeClassName=function(e,t){t&&this.container.classList.remove(t),this.state.className&&this.container.classList.add(this.state.className)},t.prototype.onChangeState=function(){this.name=this.state.name;var e=this.nativeInput,t=this.state,n=t.name,o=t.icon,r=t.type,s=t.ref,u=t.required,c=t.placeholder,d=t.autocomplete,f=t.label;(0,i.attr)(e,"name",n),(0,i.attr)(e,"type",r),(0,i.attr)(e,"data-ref",s||n),(0,i.attr)(e,"ref",s||n),(0,i.attr)(e,"required",u||null),(0,i.attr)(e,"autocomplete",d?null:"off"),(0,i.attr)(e,"placeholder",c?this.j.i18n(c):""),o&&l.Icon.exists(o)?(a.Dom.before(e,this.icon),this.icon.innerHTML=l.Icon.get(o)):a.Dom.safeRemove(this.icon),f?(a.Dom.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(f)):a.Dom.safeRemove(this.label),this.updateValidators()},t.prototype.updateValidators=function(){var e,t=this;this.validators.clear(),this.state.required&&this.validators.add(u.inputValidators.required),null===(e=this.state.validators)||void 0===e||e.forEach((function(e){var n=u.inputValidators[e];n&&t.validators.add(n)}))},Object.defineProperty(t.prototype,"error",{set:function(e){this.setMod("has-error",Boolean(e)),e?(this.__errorBox.innerText=this.j.i18n(e,this.j.i18n(this.state.label||"")),this.container.appendChild(this.__errorBox)):a.Dom.safeRemove(this.__errorBox)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.nativeInput.value},set:function(e){this.value!==e&&(this.nativeInput.value=e,this.onChangeValue())},enumerable:!1,configurable:!0}),t.prototype.onChangeStateValue=function(){var e=this.state.value.toString();e!==this.value&&(this.value=e)},t.prototype.onChangeValue=function(){var e,t,n=this.value;this.state.value!==n&&(this.state.value=n,this.j.e.fire(this,"change",n),null===(t=(e=this.state).onChange)||void 0===t||t.call(e,n))},t.prototype.validate=function(){var e=this;return this.error="",(0,i.toArray)(this.validators).every((function(t){return t(e)}))},t.prototype.createContainer=function(t){var n=e.prototype.createContainer.call(this);this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());var o=this.nativeInput;return o.classList.add(this.getFullElName("input")),this.wrapper.appendChild(o),n.appendChild(this.wrapper),(0,i.attr)(o,"dir",this.j.o.direction||"auto"),n},t.prototype.createNativeInput=function(e){return this.j.create.element("input")},t.prototype.focus=function(){this.nativeInput.focus()},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this.nativeInput===this.j.od.activeElement},enumerable:!1,configurable:!0}),t.prototype.onChangeFocus=function(){this.setMod("focused",this.isFocused)},t.defaultState={className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]},(0,o.__decorate)([(0,s.watch)("state.clearButton")],t.prototype,"onChangeClear",null),(0,o.__decorate)([(0,s.watch)("state.className")],t.prototype,"onChangeClassName",null),(0,o.__decorate)([(0,s.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"]),(0,s.debounce)()],t.prototype,"onChangeState",null),(0,o.__decorate)([(0,s.watch)("state.value")],t.prototype,"onChangeStateValue",null),(0,o.__decorate)([s.autobind],t.prototype,"onChangeValue",null),n=(0,o.__decorate)([s.component],t)}(r.UIElement);t.UIInput=c},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.selectValidators=t.inputValidators=void 0,t.inputValidators=n(150),t.selectValidators=n(151)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.url=t.required=void 0;var o=n(5);t.required=function(e){return!!(0,o.trim)(e.value).length||(e.error="Please fill out this field",!1)},t.url=function(e){return!!(0,o.isURL)((0,o.trim)(e.value))||(e.error="Please enter a web address",!1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.required=void 0;var o=n(5);t.required=function(e){return!!(0,o.trim)(e.value).length||(e.error="Please fill out this field",!1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UITextArea=void 0;var o=n(1);n(153);var r=n(147),i=n(32),a=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.state=(0,o.__assign)({},n.defaultState),Object.assign(i.state,r),!1===i.state.resizable&&(i.nativeInput.style.resize="none"),i}var n;return(0,o.__extends)(t,e),n=t,t.prototype.className=function(){return"UITextArea"},t.prototype.createContainer=function(t){return this.nativeInput=this.j.create.element("textarea"),e.prototype.createContainer.call(this,t)},t.defaultState=(0,o.__assign)((0,o.__assign)({},r.UIInput.defaultState),{size:5,resizable:!0}),n=(0,o.__decorate)([i.component],t)}(r.UIInput);t.UITextArea=a},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UICheckbox=void 0;var o=n(1);n(155);var r=n(147),i=n(32),a=n(21),s=function(e){function t(t,r){var i=e.call(this,t,(0,o.__assign)((0,o.__assign)({},r),{type:"checkbox"}))||this;return i.state=(0,o.__assign)({},n.defaultState),Object.assign(i.state,r),i}var n;return(0,o.__extends)(t,e),n=t,t.prototype.className=function(){return"UICheckbox"},t.prototype.render=function(){return this.j.c.element("label",{className:this.componentName})},t.prototype.onChangeChecked=function(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)},t.prototype.onChangeNativeCheckBox=function(){this.state.checked=this.nativeInput.checked},t.prototype.onChangeSwitch=function(){this.setMod("switch",this.state.switch);var e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),a.Dom.after(this.nativeInput,e)):a.Dom.safeRemove(e)},t.defaultState=(0,o.__assign)((0,o.__assign)({},r.UIInput.defaultState),{checked:!1,switch:!1}),(0,o.__decorate)([(0,i.watch)("state.checked"),(0,i.hook)("ready")],t.prototype,"onChangeChecked",null),(0,o.__decorate)([(0,i.watch)("nativeInput:change")],t.prototype,"onChangeNativeCheckBox",null),(0,o.__decorate)([(0,i.watch)("state.switch"),(0,i.hook)("ready")],t.prototype,"onChangeSwitch",null),n=(0,o.__decorate)([i.component],t)}(r.UIInput);t.UICheckbox=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UISelect=void 0;var o=n(1);n(157);var r=n(5),i=n(32),a=n(147),s=n(149),l=function(e){function t(t,r){var i=e.call(this,t,r)||this;return i.state=(0,o.__assign)({},n.defaultState),Object.assign(i.state,r),i}var n;return(0,o.__extends)(t,e),n=t,t.prototype.className=function(){return"UISelect"},t.prototype.createContainer=function(t){var n,o=e.prototype.createContainer.call(this,t),i=this.j,a=this.nativeInput,s=function(){return i.create.element("option")};if(void 0!==t.placeholder){var l=s();l.value="",l.text=i.i18n(t.placeholder),a.add(l)}return null===(n=t.options)||void 0===n||n.forEach((function(e){var t=s();t.value=e.value.toString(),t.text=i.i18n(e.text),a.add(t)})),t.size&&t.size>0&&(0,r.attr)(a,"size",t.size),t.multiple&&(0,r.attr)(a,"multiple",""),o},t.prototype.createNativeInput=function(){return this.j.create.element("select")},t.prototype.updateValidators=function(){e.prototype.updateValidators.call(this),this.state.required&&(this.validators.delete(s.inputValidators.required),this.validators.add(s.selectValidators.required))},t.defaultState=(0,o.__assign)((0,o.__assign)({},a.UIInput.defaultState),{options:[],size:1,multiple:!1}),n=(0,o.__decorate)([i.component],t)}(a.UIInput);t.UISelect=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIFileInput=void 0;var o=n(1);n(159);var r=n(147),i=n(32),a=n(126),s=function(e){function t(t,n){var i=e.call(this,t,(0,o.__assign)({type:"file"},n))||this;return i.state=(0,o.__assign)((0,o.__assign)({},r.UIInput.defaultState),{type:"file",onlyImages:!0}),i}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UIFileInput"},t.prototype.createContainer=function(e){this.button=new a.UIButton(this.j,{icon:{name:"plus"}});var t=this.button.container;this.nativeInput||(this.nativeInput=this.createNativeInput(e));var n=this.nativeInput;return n.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),t.appendChild(n),t},t.prototype.createNativeInput=function(e){return this.j.create.fromHTML('<input\n\t\t\ttype="file"\n\t\t\taccept="'.concat(e.onlyImages?"image/*":"*",'"\n\t\t\ttabindex="-1"\n\t\t\tdir="auto"\n\t\t\tmultiple=""\n\t\t/>'))},(0,o.__decorate)([i.component],t)}(r.UIInput);t.UIFileInput=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIBlock=void 0;var o=n(1);n(161);var r=n(131),i=n(6),a=n(32),s=function(e){function t(t,n,o){void 0===o&&(o={align:"left"});var r=e.call(this,t,n)||this;return r.options=o,r.setMod("align",r.options.align||"left"),r.setMod("width",r.options.width||""),r.options.mod&&r.setMod(r.options.mod,!0),r.options.className&&r.container.classList.add(r.options.className),(0,i.attr)(r.container,"data-ref",o.ref),(0,i.attr)(r.container,"ref",o.ref),r}return(0,o.__extends)(t,e),t.prototype.className=function(){return"UIBlock"},(0,o.__decorate)([a.component],t)}(r.UIGroup);t.UIBlock=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressBar=void 0;var o=n(1);n(163);var r=n(21),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t.prototype.className=function(){return"ProgressBar"},t.prototype.render=function(){return"<div><div></div></div>"},t.prototype.show=function(){return(this.j.workplace||this.j.container).appendChild(this.container),this},t.prototype.hide=function(){return r.Dom.safeRemove(this.container),this},t.prototype.progress=function(e){return this.container.style.width=e.toFixed(2)+"%",this},t.prototype.destruct=function(){return this.hide(),e.prototype.destruct.call(this)},t}(n(121).UIElement);t.ProgressBar=i},function(e,t,n){n.r(t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.val=void 0,t.val=function(e,t,n){var o=e.querySelector(t);return o?(n&&(o.value=n),o.value):""}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(166),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.clearTimeout=t.setTimeout=void 0;var o=n(1);t.setTimeout=function(e,t){for(var n=[],r=2;arguments.length>r;r++)n[r-2]=arguments[r];return t?window.setTimeout.apply(window,(0,o.__spreadArray)([e,t],(0,o.__read)(n),!1)):(e.call.apply(e,(0,o.__spreadArray)([null],(0,o.__read)(n),!1)),0)},t.clearTimeout=function(e){window.clearTimeout(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(168),t),(0,o.__exportStar)(n(169),t),(0,o.__exportStar)(n(170),t),(0,o.__exportStar)(n(171),t),(0,o.__exportStar)(n(172),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.applyStyles=void 0;var o=n(21),r=n(6),i=n(81);function a(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";]+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(function(e,t,n){switch(n.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e}))}t.applyStyles=function(e){if(-1===e.indexOf("<html "))return e;e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+"</html>".length);var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t);var n="",s=[];try{var l=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(l){l.open(),l.write(e),l.close(),l.styleSheets.length&&(s=l.styleSheets[l.styleSheets.length-1].cssRules);for(var u=function(e){if(""===s[e].selectorText)return"continue";(0,r.$$)(s[e].selectorText,l.body).forEach((function(t){t.style.cssText=a(s[e].style.cssText+";"+t.style.cssText)}))},c=0;s.length>c;c+=1)u(c);o.Dom.each(l.body,(function(e){if(o.Dom.isElement(e)){var t=e,n=t.style.cssText;n&&(t.style.cssText=a(n)),t.hasAttribute("lang")&&t.removeAttribute("lang")}})),n=l.firstChild?(0,i.trim)(l.body.innerHTML):""}}catch(e){}finally{o.Dom.safeRemove(t)}return n&&(e=n),(0,i.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.cleanFromWord=void 0;var o=n(21),r=n(84),i=n(119);t.cleanFromWord=function(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+"</html>".length));var t="";try{var n=document.createElement("div");n.innerHTML=e;var a=[];n.firstChild&&o.Dom.all(n,(function(e){if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":a.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":o.Dom.unwrap(e);break;default:(0,i.toArray)(e.attributes).forEach((function(t){-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&e.removeAttribute(t.name)}))}break;case Node.TEXT_NODE:break;default:a.push(e)}})),a.forEach(o.Dom.safeRemove),t=n.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(r.trim).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.htmlspecialchars=void 0,t.htmlspecialchars=function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.safeHTML=t.stripTags=void 0;var o=n(13),r=n(6),i=n(84),a=n(21),s=n(6);t.stripTags=function(e,t){void 0===t&&(t=document);var n=t.createElement("div");return(0,o.isString)(e)?n.innerHTML=e:n.appendChild(e),(0,r.$$)("DIV, P, BR, H1, H2, H3, H4, H5, H6, HR",n).forEach((function(e){var n=e.parentNode;if(n){var o=e.nextSibling;a.Dom.isText(o)&&/^\s/.test(o.nodeValue||"")||o&&n.insertBefore(t.createTextNode(" "),o)}})),(0,i.trim)(n.innerText)||""},t.safeHTML=function(e,t){if(a.Dom.isElement(e)){var n=function(e){return(0,s.attr)(e,"onerror",null)},o=function(e){var t=e.getAttribute("href");t&&0===t.trim().indexOf("javascript")&&(0,s.attr)(e,"href",location.protocol+"//"+t)};t.removeOnError&&(n(e),(0,r.$$)("[onerror]",e).forEach(n)),t.safeJavaScriptLink&&(o(e),(0,r.$$)('a[href^="javascript"]',e).forEach(o))}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nl2br=void 0,t.nl2br=function(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(174),t),(0,o.__exportStar)(n(175),t),(0,o.__exportStar)(n(176),t),(0,o.__exportStar)(n(177),t),(0,o.__exportStar)(n(178),t),(0,o.__exportStar)(n(179),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getContentWidth=void 0,t.getContentWidth=function(e,t){var n=function(e){return parseInt(e,10)},o=t.getComputedStyle(e);return e.offsetWidth-n(o.getPropertyValue("padding-left")||"0")-n(o.getPropertyValue("padding-right")||"0")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getScrollParent=void 0;var o=n(6),r=n(21);t.getScrollParent=function e(t){if(!t)return null;var n=r.Dom.isHTMLElement(t),i=n&&(0,o.css)(t,"overflowY");return n&&"visible"!==i&&"hidden"!==i&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||document.scrollingElement||document.body}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.innerWidth=void 0,t.innerWidth=function(e,t){var n=t.getComputedStyle(e);return e.clientWidth-(parseFloat(n.paddingLeft||"0")+parseFloat(n.paddingRight||"0"))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.offset=void 0,t.offset=function(e,n,o,r){var i;void 0===r&&(r=!1);try{i=e.getBoundingClientRect()}catch(e){i={top:0,bottom:0,left:0,right:0,width:0,height:0}}var a,s,l=o.body,u=o.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=o.defaultView||o.parentWindow,d=c.pageYOffset||u.scrollTop||l.scrollTop,f=c.pageXOffset||u.scrollLeft||l.scrollLeft,p=u.clientTop||l.clientTop||0,h=u.clientLeft||l.clientLeft||0,v=n.iframe;if(!r&&n&&n.options&&n.o.iframe&&v){var m=(0,t.offset)(v,n,n.od,!0);a=i.top+m.top,s=i.left+m.left}else a=i.top+d-p,s=i.left+f-h;return{top:Math.round(a),left:Math.round(s),width:i.width,height:i.height}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.position=void 0;var o=n(36);t.position=function e(t,n,r){void 0===r&&(r=!1);var i=t.getBoundingClientRect(),a=i.left,s=i.top;if((0,o.isJoditObject)(n)&&n.iframe&&!r){var l=e(n.iframe,n,!0);a+=l.left,s+=l.top}return{left:Math.round(a),top:Math.round(s),width:Math.round(t.offsetWidth),height:Math.round(t.offsetHeight)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.size=void 0;var o=n(36);t.size=function(e){return(0,o.isString)(e)||(0,o.isArray)(e)?e.length:(0,o.isPlainObject)(e)?Object.keys(e).length:0}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PluginSystem=t.Uploader=t.ToolbarCollection=t.ToolbarEditorCollection=t.Table=t.StatusBar=t.Snapshot=t.CommitStyle=t.Select=t.Observer=t.ImageEditor=t.Helpers=t.ViewWithToolbar=t.View=t.Icon=t.ProgressBar=t.UIBlock=t.UICheckbox=t.UITextArea=t.UIInput=t.UIForm=t.UIList=t.UIGroup=t.UISeparator=t.Popup=t.UIButton=t.UIElement=t.Create=t.Plugin=t.Dom=t.ContextMenu=t.STATUSES=t.ViewComponent=t.Component=t.Async=void 0;var o=n(1);(0,o.__exportStar)(n(62),t);var r=n(181);Object.defineProperty(t,"Async",{enumerable:!0,get:function(){return r.Async}}),(0,o.__exportStar)(n(183),t);var i=n(16);Object.defineProperty(t,"Component",{enumerable:!0,get:function(){return i.Component}}),Object.defineProperty(t,"ViewComponent",{enumerable:!0,get:function(){return i.ViewComponent}}),Object.defineProperty(t,"STATUSES",{enumerable:!0,get:function(){return i.STATUSES}});var a=n(187);Object.defineProperty(t,"ContextMenu",{enumerable:!0,get:function(){return a.ContextMenu}}),(0,o.__exportStar)(n(189),t);var s=n(21);Object.defineProperty(t,"Dom",{enumerable:!0,get:function(){return s.Dom}});var l=n(210);Object.defineProperty(t,"Plugin",{enumerable:!0,get:function(){return l.Plugin}});var u=n(212);Object.defineProperty(t,"Create",{enumerable:!0,get:function(){return u.Create}});var c=n(120);Object.defineProperty(t,"UIElement",{enumerable:!0,get:function(){return c.UIElement}}),Object.defineProperty(t,"UIButton",{enumerable:!0,get:function(){return c.UIButton}}),Object.defineProperty(t,"Popup",{enumerable:!0,get:function(){return c.Popup}}),Object.defineProperty(t,"UISeparator",{enumerable:!0,get:function(){return c.UISeparator}}),Object.defineProperty(t,"UIGroup",{enumerable:!0,get:function(){return c.UIGroup}}),Object.defineProperty(t,"UIList",{enumerable:!0,get:function(){return c.UIList}}),Object.defineProperty(t,"UIForm",{enumerable:!0,get:function(){return c.UIForm}}),Object.defineProperty(t,"UIInput",{enumerable:!0,get:function(){return c.UIInput}}),Object.defineProperty(t,"UITextArea",{enumerable:!0,get:function(){return c.UITextArea}}),Object.defineProperty(t,"UICheckbox",{enumerable:!0,get:function(){return c.UICheckbox}}),Object.defineProperty(t,"UIBlock",{enumerable:!0,get:function(){return c.UIBlock}}),Object.defineProperty(t,"ProgressBar",{enumerable:!0,get:function(){return c.ProgressBar}}),Object.defineProperty(t,"Icon",{enumerable:!0,get:function(){return c.Icon}});var d=n(194);Object.defineProperty(t,"View",{enumerable:!0,get:function(){return d.View}});var f=n(192);Object.defineProperty(t,"ViewWithToolbar",{enumerable:!0,get:function(){return f.ViewWithToolbar}}),(0,o.__exportStar)(n(214),t);var p=n(5);t.Helpers=p;var h=n(227);Object.defineProperty(t,"ImageEditor",{enumerable:!0,get:function(){return h.ImageEditor}});var v=n(238);Object.defineProperty(t,"Observer",{enumerable:!0,get:function(){return v.Observer}});var m=n(24);Object.defineProperty(t,"Select",{enumerable:!0,get:function(){return m.Select}}),Object.defineProperty(t,"CommitStyle",{enumerable:!0,get:function(){return m.CommitStyle}});var g=n(239);Object.defineProperty(t,"Snapshot",{enumerable:!0,get:function(){return g.Snapshot}});var _=n(242);Object.defineProperty(t,"StatusBar",{enumerable:!0,get:function(){return _.StatusBar}});var y=n(244);Object.defineProperty(t,"Table",{enumerable:!0,get:function(){return y.Table}});var b=n(202);Object.defineProperty(t,"ToolbarEditorCollection",{enumerable:!0,get:function(){return b.ToolbarEditorCollection}});var S=n(200);Object.defineProperty(t,"ToolbarCollection",{enumerable:!0,get:function(){return S.ToolbarCollection}}),(0,o.__exportStar)(n(245),t);var w=n(246);Object.defineProperty(t,"Uploader",{enumerable:!0,get:function(){return w.Uploader}});var C=n(20);Object.defineProperty(t,"PluginSystem",{enumerable:!0,get:function(){return C.PluginSystem}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(182),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Async=void 0;var o=n(1),r=n(5),i=function(){function e(){var e,t,n,o,r=this;this.timers=new Map,this.promisesRejections=new Set,this.requestsIdle=new Set,this.requestIdleCallbackNative=null!==(t=null===(e=window.requestIdleCallback)||void 0===e?void 0:e.bind(window))&&void 0!==t?t:function(e){var t=Date.now();return r.setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},this.cancelIdleCallbackNative=null!==(o=null===(n=window.cancelIdleCallback)||void 0===n?void 0:n.bind(window))&&void 0!==o?o:function(e){r.clearTimeout(e)},this.isDestructed=!1}return e.prototype.delay=function(e){var t=this;return this.promise((function(n){return t.setTimeout(n,e)}))},e.prototype.setTimeout=function(e,t){for(var n=[],i=2;arguments.length>i;i++)n[i-2]=arguments[i];if(this.isDestructed)return 0;var a={};(0,r.isNumber)(t)||(t=(a=t).timeout||0),a.label&&this.clearLabel(a.label);var s=r.setTimeout.apply(void 0,(0,o.__spreadArray)([e,t],(0,o.__read)(n),!1)),l=a.label||s;return this.timers.set(l,s),s},e.prototype.clearLabel=function(e){e&&this.timers.has(e)&&((0,r.clearTimeout)(this.timers.get(e)),this.timers.delete(e))},e.prototype.clearTimeout=function(e){if((0,r.isString)(e))return this.clearLabel(e);(0,r.clearTimeout)(e),this.timers.delete(e)},e.prototype.debounce=function(e,t,n){var i=this;void 0===n&&(n=!1);var a=0,s=!1,l=[],u=function(){for(var t=[],n=0;arguments.length>n;n++)t[n]=arguments[n];if(!s){a=0;var i=e.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(t),!1));if(s=!0,l.length){var u=function(){l.forEach((function(e){return e()})),l.length=0};(0,r.isPromise)(i)?i.finally(u):u()}}},c=function(){for(var l=[],c=0;arguments.length>c;c++)l[c]=arguments[c];s=!1,t?(!a&&n&&u.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(l),!1)),(0,r.clearTimeout)(a),a=i.setTimeout((function(){return u.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(l),!1))}),(0,r.isFunction)(t)?t():t),i.timers.set(e,a)):u.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(l),!1))};return(0,r.isPlainObject)(t)&&t.promisify?function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];var n=i.promise((function(e){l.push(e)}));return c.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(e),!1)),n}:c},e.prototype.throttle=function(e,t,n){var i=this;void 0===n&&(n=!1);var a,s,l,u=null;return function(){for(var n=[],c=0;arguments.length>c;c++)n[c]=arguments[c];a=!0,l=n,t?u||(s=function(){a?(e.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(l),!1)),a=!1,u=i.setTimeout(s,(0,r.isFunction)(t)?t():t),i.timers.set(s,u)):u=null})():e.apply(void 0,(0,o.__spreadArray)([],(0,o.__read)(l),!1))}},e.prototype.promise=function(e){var t=this,n=function(){},o=new Promise((function(o,r){return t.promisesRejections.add(r),n=r,e(o,r)}));return o.finally||(o.finally=function(e){return o.then(e).catch(e),o}),o.finally((function(){t.promisesRejections.delete(n)})),o.rejectCallback=n,o},e.prototype.promiseState=function(e){var t=this;if(e.status)return e.status;if(!Promise.race)return new Promise((function(n){e.then((function(e){return n("fulfilled"),e}),(function(e){throw n("rejected"),e})),t.setTimeout((function(){n("pending")}),100)}));var n={};return Promise.race([e,n]).then((function(e){return e===n?"pending":"fulfilled"}),(function(){return"rejected"}))},e.prototype.requestIdleCallback=function(e){var t=this.requestIdleCallbackNative(e);return this.requestsIdle.add(t),t},e.prototype.requestIdlePromise=function(){var e=this;return this.promise((function(t){var n=e.requestIdleCallback((function(){return t(n)}))}))},e.prototype.cancelIdleCallback=function(e){return this.requestsIdle.delete(e),this.cancelIdleCallbackNative(e)},e.prototype.clear=function(){var e=this;this.requestsIdle.forEach((function(t){e.cancelIdleCallback(t)})),this.timers.forEach((function(t){(0,r.clearTimeout)(e.timers.get(t))})),this.timers.clear(),this.promisesRejections.forEach((function(e){e()})),this.promisesRejections.clear()},e.prototype.destruct=function(){this.clear(),this.isDestructed=!0},e}();t.Async=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(184),t),(0,o.__exportStar)(n(185),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Ajax=void 0;var o=n(1),r=n(87),i=n(5),a=n(185);n(186);var s=function(){function e(e,t){var n=this;this.jodit=e,this.resolved=!1,this.activated=!1,this.options=(0,i.ConfigProto)(t||{},r.Config.prototype.defaultAjaxOptions),this.xhr=this.o.xhr?this.o.xhr():new XMLHttpRequest,e&&e.e&&e.e.on("beforeDestruct",(function(){return n.destruct()}))}return e.prototype.__buildParams=function(e,t){return(0,i.isFunction)(this.o.queryBuild)?this.o.queryBuild.call(this,e,t):(0,i.isString)(e)||this.j.ow.FormData&&e instanceof this.j.ow.FormData?e:(0,i.buildQuery)(e)},Object.defineProperty(e.prototype,"o",{get:function(){return this.options},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"j",{get:function(){return this.jodit},enumerable:!1,configurable:!0}),e.prototype.abort=function(){try{this.xhr.abort()}catch(e){}return this},e.prototype.send=function(){var e=this;this.activated=!0;var t=this.xhr,n=this.o,o=this.prepareRequest();return this.j.async.promise((function(r,s){var l,u=function(){s((0,i.error)("Connection error"))},c=function(){e.resolved=!0,r(new a.Response(o,t.status,t.statusText,t.responseType?t.response:t.responseText))};t.onload=c,t.onabort=u,t.onerror=u,t.ontimeout=u,n.responseType&&(t.responseType=n.responseType),t.onprogress=function(t){var n,o,r=0;t.lengthComputable&&(r=t.loaded/t.total*100),null===(o=(n=e.options).onProgress)||void 0===o||o.call(n,r)},t.onreadystatechange=function(){var o,r;null===(r=(o=e.options).onProgress)||void 0===r||r.call(o,10),t.readyState===XMLHttpRequest.DONE&&(n.successStatuses.includes(t.status)?c():s((0,i.error)(t.statusText||"Connection error")))},t.withCredentials=null!==(l=n.withCredentials)&&void 0!==l&&l;var d=o.data;t.open(o.method,o.url,!0),n.contentType&&t.setRequestHeader&&t.setRequestHeader("Content-type",n.contentType);var f=n.headers;f&&t.setRequestHeader&&Object.keys(f).forEach((function(e){t.setRequestHeader(e,f[e])})),e.j.async.setTimeout((function(){t.send(d?e.__buildParams(d):void 0)}),0)}))},e.prototype.prepareRequest=function(){if(!this.o.url)throw(0,i.error)("Need URL for AJAX request");var t=this.o.url,n=this.o.data,r=(this.o.method||"get").toLowerCase();if("get"===r&&n&&(0,i.isPlainObject)(n)){var a=t.indexOf("?");if(-1!==a){var s=(0,i.parseQuery)(t);t=t.substr(0,a)+"?"+(0,i.buildQuery)((0,o.__assign)((0,o.__assign)({},s),n))}else t+="?"+(0,i.buildQuery)(this.o.data)}var l={url:t,method:r,data:n};return e.log.splice(100),e.log.push(l),l},e.prototype.destruct=function(){this.activated&&!this.resolved&&(this.abort(),this.resolved=!0)},e.log=[],e}();t.Ajax=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Response=void 0;var o=n(1),r=function(){function e(e,t,n,o){this.request=e,this.status=t,this.statusText=n,this.body=o}return Object.defineProperty(e.prototype,"url",{get:function(){return this.request.url},enumerable:!1,configurable:!0}),e.prototype.json=function(){return(0,o.__awaiter)(this,void 0,Promise,(function(){return(0,o.__generator)(this,(function(e){return[2,JSON.parse(this.body)]}))}))},e.prototype.text=function(){return Promise.resolve(this.body)},e.prototype.blob=function(){return(0,o.__awaiter)(this,void 0,Promise,(function(){return(0,o.__generator)(this,(function(e){return[2,this.body]}))}))},e}();t.Response=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(87).Config.prototype.defaultAjaxOptions={successStatuses:[200,201,202],dataType:"json",method:"GET",url:"",data:null,contentType:"application/x-www-form-urlencoded; charset=UTF-8",headers:{"X-REQUESTED-WITH":"XMLHttpRequest"},withCredentials:!1,xhr:function(){return new XMLHttpRequest}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ContextMenu=void 0;var o=n(1);n(188);var r=n(141),i=n(126),a=n(36),s=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t.prototype.className=function(){return"ContextMenu"},t.prototype.show=function(t,n,o){var r=this,s=this,l=this.j.c.div(this.getFullElName("actions"));(0,a.isArray)(o)&&(o.forEach((function(e){if(e){var t=(0,i.Button)(r.jodit,e.icon||"empty",e.title);r.jodit&&t.setParentView(r.jodit),t.setMod("context","menu"),t.onAction((function(t){var n;return null===(n=e.exec)||void 0===n||n.call(s,t),s.close(),!1})),l.appendChild(t.container)}})),e.prototype.setContent.call(this,l).open((function(){return{left:t,top:n,width:0,height:0}}),!0))},t}(r.Popup);t.ContextMenu=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Confirm=t.Prompt=t.Alert=t.Dialog=void 0;var o=n(190);Object.defineProperty(t,"Dialog",{enumerable:!0,get:function(){return o.Dialog}});var r=n(207);Object.defineProperty(t,"Alert",{enumerable:!0,get:function(){return r.Alert}});var i=n(208);Object.defineProperty(t,"Prompt",{enumerable:!0,get:function(){return i.Prompt}});var a=n(209);Object.defineProperty(t,"Confirm",{enumerable:!0,get:function(){return a.Confirm}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Dialog=void 0;var o=n(1);n(191);var r=n(87),i=n(23),a=n(5),s=n(192),l=n(21),u=n(16),c=n(19),d=n(32),f=n(194),p=n(120);r.Config.prototype.dialog={namespace:"",extraButtons:[],resizable:!0,draggable:!0,buttons:["dialog.close"],removeButtons:[]},r.Config.prototype.controls.dialog={close:{icon:"cancel",exec:function(e){e.close(),e.toggleFullSizeBox(!1)}}};var h=function(e){function t(t){var n=e.call(this,t)||this;n.destroyAfterClose=!1,n.moved=!1,n.iSetMaximization=!1,n.resizable=!1,n.draggable=!1,n.startX=0,n.startY=0,n.startPoint={x:0,y:0,w:0,h:0},n.lockSelect=function(){n.setMod("moved",!0)},n.unlockSelect=function(){n.setMod("moved",!1)},n.onResize=function(){n.options&&n.o.resizable&&!n.moved&&n.isOpened&&!n.offsetX&&!n.offsetY&&n.setPosition()},n.isModal=!1,n.isOpened=!1;var o=n;o.options=(0,a.ConfigProto)(null!=t?t:{},(0,a.ConfigProto)({toolbarButtonSize:"middle"},(0,a.ConfigProto)(r.Config.prototype.dialog,f.View.defaultOptions))),l.Dom.safeRemove(o.container);var i=n.getFullElName.bind(n);o.container=n.c.fromHTML('<div style="z-index:'.concat(o.o.zIndex,'" class="jodit jodit-dialog ').concat(n.componentName,'">\n\t\t\t\t<div class="').concat(i("overlay"),'"></div>\n\t\t\t\t<div class="').concat(n.getFullElName("panel"),'">\n\t\t\t\t\t<div class="').concat(i("header"),'">\n\t\t\t\t\t\t<div class="').concat(i("header-title"),'"></div>\n\t\t\t\t\t\t<div class="').concat(i("header-toolbar"),'"></div>\n\t\t\t\t\t</div>\n\t\t\t\t\t<div class="').concat(i("content"),'"></div>\n\t\t\t\t\t<div class="').concat(i("footer"),'"></div>\n\t\t\t\t\t<div class="').concat(i("resizer"),'">').concat(p.Icon.get("resize_handler"),"</div>\n\t\t\t\t</div>\n\t\t\t</div>")),(0,a.attr)(o.container,"role","dialog"),Object.defineProperty(o.container,"component",{value:n}),o.setMod("theme",o.o.theme||"default").setMod("resizable",Boolean(o.o.resizable));var s=o.getElm("panel");(0,a.assert)(null!=s,"Panel element does not exist");var u=o.getElm("resizer");(0,a.assert)(null!=u,"Resizer element does not exist");var d=o.getElm("header-title");(0,a.assert)(null!=d,"header-title element does not exist");var h=o.getElm("content");(0,a.assert)(null!=h,"Content element does not exist");var v=o.getElm("footer");(0,a.assert)(null!=v,"Footer element does not exist");var m=o.getElm("header-toolbar");(0,a.assert)(null!=m,"header-toolbar element does not exist"),o.dialog=s,o.resizer=u,o.dialogbox_header=d,o.dialogbox_content=h,o.dialogbox_footer=v,o.dialogbox_toolbar=m,(0,a.css)(o.dialog,{maxWidth:o.options.maxWidth,minHeight:o.options.minHeight,minWidth:o.options.minWidth});var g=o.getElm("header");g&&o.e.on(g,"pointerdown touchstart",o.onHeaderMouseDown),o.e.on(o.resizer,"mousedown touchstart",o.onResizerMouseDown);var _=c.pluginSystem.get("fullsize");return(0,a.isFunction)(_)&&_(o),n.e.on(o.container,"close_dialog",o.close).on(n.ow,"keydown",n.onEsc).on(n.ow,"resize",n.onResize),n}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Dialog"},Object.defineProperty(t.prototype,"destination",{get:function(){return this.od.body},enumerable:!1,configurable:!0}),t.prototype.setElements=function(e,t){var n=this,o=[];(0,a.asArray)(t).forEach((function(t){if((0,a.isArray)(t)){var r=n.c.div(n.getFullElName("column"));return o.push(r),e.appendChild(r),n.setElements(r,t)}var i;i=(0,a.isString)(t)?n.c.fromHTML(t):(0,a.hasContainer)(t)?t.container:t,o.push(i),i.parentNode!==e&&e.appendChild(i)})),(0,a.toArray)(e.childNodes).forEach((function(t){-1===o.indexOf(t)&&e.removeChild(t)}))},t.prototype.onMouseUp=function(){(this.draggable||this.resizable)&&(this.removeGlobalResizeListeners(),this.draggable=!1,this.resizable=!1,this.unlockSelect(),this.e&&(this.removeGlobalResizeListeners(),this.e.fire(this,"endResize endMove")))},t.prototype.onHeaderMouseDown=function(e){var t=e.target;!this.o.draggable||t&&t.nodeName.match(/^(INPUT|SELECT)$/)||(this.draggable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.x=(0,a.css)(this.dialog,"left"),this.startPoint.y=(0,a.css)(this.dialog,"top"),this.setMaxZIndex(),e.cancelable&&e.preventDefault(),this.lockSelect(),this.addGlobalResizeListeners(),this.e&&this.e.fire(this,"startMove"))},t.prototype.onMouseMove=function(e){this.draggable&&this.o.draggable&&(this.setPosition(this.startPoint.x+e.clientX-this.startX,this.startPoint.y+e.clientY-this.startY),this.e&&this.e.fire(this,"move",e.clientX-this.startX,e.clientY-this.startY),e.stopImmediatePropagation()),this.resizable&&this.o.resizable&&(this.setSize(this.startPoint.w+e.clientX-this.startX,this.startPoint.h+e.clientY-this.startY),this.e&&this.e.fire(this,"resizeDialog",e.clientX-this.startX,e.clientY-this.startY))},t.prototype.onEsc=function(e){if(this.isOpened&&e.key===i.KEY_ESC&&!0!==this.getMod("static")){var t=this.getMaxZIndexDialog();t?t.close():this.close(),e.stopImmediatePropagation()}},t.prototype.onResizerMouseDown=function(e){this.resizable=!0,this.startX=e.clientX,this.startY=e.clientY,this.startPoint.w=this.dialog.offsetWidth,this.startPoint.h=this.dialog.offsetHeight,this.lockSelect(),this.addGlobalResizeListeners(),this.e&&this.e.fire(this,"startResize")},t.prototype.addGlobalResizeListeners=function(){var e=this;e.e.on(e.ow,"pointermove touchmove",e.onMouseMove).on(e.ow,"pointerup touchend",e.onMouseUp)},t.prototype.removeGlobalResizeListeners=function(){var e=this;e.e.off(e.ow,"mousemove pointermove",e.onMouseMove).off(e.ow,"mouseup pointerup",e.onMouseUp)},t.prototype.setSize=function(e,t){return null==e&&(e=this.dialog.offsetWidth),null==t&&(t=this.dialog.offsetHeight),(0,a.css)(this.dialog,{width:e,height:t}),this},t.prototype.calcAutoSize=function(){return this.setSize("auto","auto"),this.setSize(),this},t.prototype.setPosition=function(e,t){var n=this.ow.innerWidth/2-this.dialog.offsetWidth/2,o=this.ow.innerHeight/2-this.dialog.offsetHeight/2;return 0>n&&(n=0),0>o&&(o=0),void 0!==e&&void 0!==t&&(this.offsetX=e,this.offsetY=t,this.moved=Math.abs(e-n)>100||Math.abs(t-o)>100),this.dialog.style.left=(e||n)+"px",this.dialog.style.top=(t||o)+"px",this},t.prototype.setHeader=function(e){return this.setElements(this.dialogbox_header,e),this},t.prototype.setContent=function(e){return this.setElements(this.dialogbox_content,e),this},t.prototype.setFooter=function(e){return this.setElements(this.dialogbox_footer,e),this.setMod("footer",Boolean(e)),this},t.prototype.getZIndex=function(){return parseInt((0,a.css)(this.container,"zIndex"),10)||0},t.prototype.getMaxZIndexDialog=function(){var e,t,n=0,o=this;return(0,a.$$)(".jodit-dialog",this.destination).forEach((function(r){e=r.component,t=parseInt((0,a.css)(r,"zIndex"),10),e.isOpened&&!isNaN(t)&&t>n&&(o=e,n=t)})),o},t.prototype.setMaxZIndex=function(){var e=20000004,t=0;(0,a.$$)(".jodit-dialog",this.destination).forEach((function(n){t=parseInt((0,a.css)(n,"zIndex"),10),e=Math.max(isNaN(t)?0:t,e)})),this.container.style.zIndex=(e+1).toString()},t.prototype.maximization=function(e){return(0,a.isVoid)(e)&&(e=!this.getMod("fullsize")),this.setMod("fullsize",e),this.toggleFullSizeBox(e),this.iSetMaximization=e,e},t.prototype.toggleFullSizeBox=function(e){[this.destination,this.destination.parentNode].forEach((function(t){t&&t.classList&&t.classList.toggle("jodit_fullsize-box_true",e)}))},t.prototype.open=function(e,t,n,o){if(c.eventEmitter.fire("closeAllPopups hideHelpers"),!1===this.e.fire(this,"beforeOpen"))return this;(0,a.isBoolean)(e)&&(n=e),(0,a.isBoolean)(t)&&(o=t),this.destroyAfterClose=!0===n;var r=(0,a.isBoolean)(e)?void 0:e,i=(0,a.isBoolean)(t)?void 0:t;return void 0!==i&&this.setHeader(i),r&&this.setContent(r),this.setMod("active",!0),this.isOpened=!0,this.setModal(o),this.destination.appendChild(this.container),this.setPosition(this.offsetX,this.offsetY),this.setMaxZIndex(),this.o.fullsize&&this.maximization(!0),this.e.fire("afterOpen",this),this},t.prototype.setModal=function(e){return this.isModal=Boolean(e),this.setMod("modal",this.isModal),this},t.prototype.close=function(e){var t,n;return this.isDestructed||!this.isOpened||!0===this.getMod("static")||(e&&(e.stopImmediatePropagation(),e.preventDefault()),this.e&&!1===this.e.fire("beforeClose",this)||(this.setMod("active",!1),this.isOpened=!1,this.e.fire("toggleFullSize",!1),this.iSetMaximization&&this.maximization(!1),l.Dom.safeRemove(this.container),this.removeGlobalResizeListeners(),this.destroyAfterClose&&this.destruct(),null===(t=this.e)||void 0===t||t.fire(this,"afterClose"),null===(n=this.e)||void 0===n||n.fire(this.ow,"joditCloseDialog"))),this},t.prototype.buildToolbar=function(){this.o.buttons&&this.toolbar.build((0,a.splitArray)(this.o.buttons)).setMod("mode","header").appendTo(this.dialogbox_toolbar)},t.prototype.destruct=function(){this.isInDestruct||(this.setStatus(u.STATUSES.beforeDestruct),this.isOpened&&this.close(),this.events&&(this.removeGlobalResizeListeners(),this.events.off(this.container,"close_dialog",self.close).off(this.ow,"keydown",this.onEsc).off(this.ow,"resize",this.onResize)),e.prototype.destruct.call(this))},(0,o.__decorate)([d.autobind],t.prototype,"onMouseUp",null),(0,o.__decorate)([d.autobind],t.prototype,"onHeaderMouseDown",null),(0,o.__decorate)([d.autobind],t.prototype,"onMouseMove",null),(0,o.__decorate)([d.autobind],t.prototype,"onEsc",null),(0,o.__decorate)([d.autobind],t.prototype,"onResizerMouseDown",null),(0,o.__decorate)([d.autobind],t.prototype,"close",null),(0,o.__decorate)([(0,d.hook)("ready")],t.prototype,"buildToolbar",null),(0,o.__decorate)([d.component],t)}(s.ViewWithToolbar);t.Dialog=h},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewWithToolbar=void 0;var o=n(1);n(193);var r=n(194),i=n(5),a=n(21),s=n(199),l=n(16),u=n(140),c=n(32),d=function(e){function t(t,n){void 0===n&&(n=!1);var o=e.call(this,t,n)||this;return o.toolbar=(0,s.makeCollection)(o),o.defaultToolbarContainer=o.c.div("jodit-toolbar__box"),o.registeredButtons=new Set,o.groupToButtons={},o.isJodit=!1,o.isJodit=n,o.e.on("beforeToolbarBuild",o.beforeToolbarBuild),o}return(0,o.__extends)(t,e),Object.defineProperty(t.prototype,"toolbarContainer",{get:function(){return this.o.fullsize||!(0,i.isString)(this.o.toolbar)&&!a.Dom.isHTMLElement(this.o.toolbar)?(this.o.toolbar&&a.Dom.appendChildFirst(this.container,this.defaultToolbarContainer),this.defaultToolbarContainer):(0,i.resolveElement)(this.o.toolbar,this.o.shadowRoot||this.od)},enumerable:!1,configurable:!0}),t.prototype.setPanel=function(e){this.o.toolbar=e,this.buildToolbar()},t.prototype.buildToolbar=function(){if(this.o.toolbar){var e=this.o.buttons?(0,i.splitArray)(this.o.buttons):[];this.toolbar.setRemoveButtons(this.o.removeButtons).build(e.concat(this.o.extraButtons||[])).appendTo(this.toolbarContainer)}},t.prototype.getRegisteredButtonGroups=function(){return this.groupToButtons},t.prototype.registerButton=function(e){var t;this.registeredButtons.add(e);var n=null!==(t=e.group)&&void 0!==t?t:"other";return this.groupToButtons[n]||(this.groupToButtons[n]=[]),null!=e.position?this.groupToButtons[n][e.position]=e.name:this.groupToButtons[n].push(e.name),this},t.prototype.unregisterButton=function(e){var t;this.registeredButtons.delete(e);var n=null!==(t=e.group)&&void 0!==t?t:"other",o=this.groupToButtons[n];if(o){var r=o.indexOf(e.name);-1!==r&&o.splice(r,1),0===o.length&&delete this.groupToButtons[n]}return this},t.prototype.beforeToolbarBuild=function(e){var t=this;if(Object.keys(this.groupToButtons).length)return e.map((function(e){return(0,u.isButtonGroup)(e)&&e.group&&t.groupToButtons[e.group]?{group:e.group,buttons:(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(e.buttons),!1),(0,o.__read)(t.groupToButtons[e.group]),!1)}:e}))},t.prototype.destruct=function(){this.isDestructed||(this.setStatus(l.STATUSES.beforeDestruct),this.e.off("beforeToolbarBuild",this.beforeToolbarBuild),this.toolbar.destruct(),e.prototype.destruct.call(this))},(0,o.__decorate)([c.autobind],t.prototype,"beforeToolbarBuild",null),t}(r.View);t.ViewWithToolbar=d},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.View=void 0;var o=n(1),r=n(195),i=n(5),a=n(23),s=n(180),l=n(181),u=n(19),c=n(32),d=n(122),f=n(62),p=function(e){function t(n,o){void 0===o&&(o=!1);var i=e.call(this)||this;return i.isJodit=o,i.isView=!0,i.mods={},i.components=new Set,i.version="3.14.2",i.async=new l.Async,i.buffer=r.Storage.makeStorage(),i.storage=r.Storage.makeStorage(!0,i.componentName),i.OPTIONS=t.defaultOptions,i.__isFullSize=!1,i.__whoLocked="",i.isLockedNotBy=function(e){return i.isLocked&&i.__whoLocked!==e},i.__modulesInstances=new Map,i.id=(new Date).getTime().toString(),i.buffer=r.Storage.makeStorage(),i.initOptions(n),i.initOwners(),i.events=new f.EventEmitter(i.od),i.create=new s.Create(i.od),i.container=i.c.div(),i.container.classList.add("jodit"),i.progressbar=new s.ProgressBar(i),i}return(0,o.__extends)(t,e),t.prototype.setMod=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];var n=(0,o.__read)(e,2),r=n[0],i=n[1];return d.Mods.setMod.call(this,r,i),this},t.prototype.getMod=function(e){return d.Mods.getMod.call(this,e)},t.prototype.getElm=function(e){return d.Elms.getElm.call(this,e)},t.prototype.getElms=function(e){return d.Elms.getElms.call(this,e)},Object.defineProperty(t.prototype,"basePath",{get:function(){return this.o.basePath?this.o.basePath:a.BASE_PATH},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return(0,i.isVoid)(this.o.defaultTimeout)?100:this.o.defaultTimeout},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"c",{get:function(){return this.create},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"container",{get:function(){return this.__container},set:function(e){this.__container=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"e",{get:function(){return this.events},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"options",{get:function(){return this.__options},set:function(e){this.__options=e},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"o",{get:function(){return this.options},enumerable:!1,configurable:!0}),t.prototype.i18n=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];return(0,i.i18n)(e,t,this.options)},t.prototype.toggleFullSize=function(e){void 0===e&&(e=!this.__isFullSize),e!==this.__isFullSize&&(this.__isFullSize=e,this.events&&this.e.fire("toggleFullSize",e))},Object.defineProperty(t.prototype,"isLocked",{get:function(){return""!==this.__whoLocked},enumerable:!1,configurable:!0}),t.prototype.lock=function(e){return void 0===e&&(e="any"),!this.isLocked&&(this.__whoLocked=e,!0)},t.prototype.unlock=function(){return!!this.isLocked&&(this.__whoLocked="",!0)},Object.defineProperty(t.prototype,"isFullSize",{get:function(){return this.__isFullSize},enumerable:!1,configurable:!0}),t.prototype.getVersion=function(){return"3.14.2"},t.getVersion=function(){return"3.14.2"},t.prototype.initOptions=function(e){this.options=(0,i.ConfigProto)(e||{},(0,i.ConfigProto)(this.options||{},t.defaultOptions))},t.prototype.initOwners=function(){var e;this.ownerWindow=null!==(e=this.o.ownerWindow)&&void 0!==e?e:window},t.prototype.attachEvents=function(e){var t=this;if(e){var n=null==e?void 0:e.events;n&&Object.keys(n).forEach((function(e){return t.e.on(e,n[e])}))}},t.prototype.getInstance=function(e,t){var n=this.e.fire((0,i.camelCase)("getInstance_"+e),t);if(n)return n;var o=u.modules[e],r=this.__modulesInstances;if(!(0,i.isFunction)(o))throw(0,i.error)("Need real module name");if(!r.has(e)){var a=o.prototype instanceof s.ViewComponent?new o(this,t):new o(t);this.components.add(a),r.set(e,a)}return r.get(e)},t.prototype.addDisclaimer=function(e){this.container.appendChild(e)},t.prototype.beforeDestruct=function(){this.e.fire(s.STATUSES.beforeDestruct,this),this.components.forEach((function(e){(0,i.isDestructable)(e)&&!e.isInDestruct&&e.destruct()})),this.components.clear()},t.prototype.destruct=function(){this.isDestructed||(this.async&&this.async.destruct(),this.events&&this.e.destruct(),this.buffer&&this.buffer.clear(),s.Dom.safeRemove(this.container),e.prototype.destruct.call(this))},(0,o.__decorate)([(0,c.hook)(s.STATUSES.beforeDestruct)],t.prototype,"beforeDestruct",null),t}(s.Component);t.View=p,p.defaultOptions={extraButtons:[],textIcons:!1,namespace:"",removeButtons:[],zIndex:100002,defaultTimeout:100,fullsize:!1,showTooltip:!0,useNativeTooltip:!1,buttons:[],globalFullSize:!0}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(196),t),(0,o.__exportStar)(n(197),t),(0,o.__exportStar)(n(198),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MemoryStorageProvider=void 0;var n=function(){function e(){this.data=new Map}return e.prototype.set=function(e,t){return this.data.set(e,t),this},e.prototype.delete=function(e){return this.data.delete(e),this},e.prototype.get=function(e){return this.data.get(e)},e.prototype.exists=function(e){return this.data.has(e)},e.prototype.clear=function(){return this.data.clear(),this},e}();t.MemoryStorageProvider=n},function(e,t){var n;Object.defineProperty(t,"__esModule",{value:!0}),t.LocalStorageProvider=t.canUsePersistentStorage=void 0,t.canUsePersistentStorage=function(){return void 0===n&&(n=function(){var e="___Jodit___"+Math.random().toString();try{localStorage.setItem(e,"1");var t="1"===localStorage.getItem(e);return localStorage.removeItem(e),t}catch(e){}return!1}()),n};var o=function(){function e(e){this.rootKey=e}return e.prototype.set=function(e,t){try{var n=localStorage.getItem(this.rootKey),o=n?JSON.parse(n):{};o[e]=t,localStorage.setItem(this.rootKey,JSON.stringify(o))}catch(e){}return this},e.prototype.delete=function(e){try{localStorage.removeItem(this.rootKey)}catch(e){}return this},e.prototype.get=function(e){try{var t=localStorage.getItem(this.rootKey),n=t?JSON.parse(t):{};return void 0!==n[e]?n[e]:null}catch(e){}},e.prototype.exists=function(e){return null!=this.get(e)},e.prototype.clear=function(){try{localStorage.removeItem(this.rootKey)}catch(e){}return this},e}();t.LocalStorageProvider=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Storage=t.StorageKey=void 0;var o=n(5),r=n(197),i=n(196);t.StorageKey="Jodit_";var a=function(){function e(e,n){this.provider=e,this.prefix=t.StorageKey,n&&(this.prefix+=n)}return e.prototype.set=function(e,t){return this.provider.set((0,o.camelCase)(this.prefix+e),t),this},e.prototype.delete=function(e){return this.provider.delete((0,o.camelCase)(this.prefix+e)),this},e.prototype.get=function(e){return this.provider.get((0,o.camelCase)(this.prefix+e))},e.prototype.exists=function(e){return this.provider.exists((0,o.camelCase)(this.prefix+e))},e.prototype.clear=function(){return this.provider.clear(),this},e.makeStorage=function(n,o){var a;return void 0===n&&(n=!1),n&&(0,r.canUsePersistentStorage)()&&(a=new r.LocalStorageProvider(t.StorageKey+o)),a||(a=new i.MemoryStorageProvider),new e(a,o)},e}();t.Storage=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.makeButton=t.makeCollection=void 0;var o=n(5),r=n(200),i=n(202),a=n(203),s=n(205);t.makeCollection=function(e,t){var n=(0,o.isJoditObject)(e)?new i.ToolbarEditorCollection(e):new r.ToolbarCollection(e);return e.o.textIcons&&n.container.classList.add("jodit_text_icons"),t&&(n.parentElement=t),e.o.toolbarButtonSize&&(n.buttonSize=e.o.toolbarButtonSize),n},t.makeButton=function(e,t,n){if(void 0===n&&(n=null),(0,o.isFunction)(t.getContent))return new s.ToolbarContent(e,t,n);var r=new a.ToolbarButton(e,t,n);return r.state.tabIndex=e.o.allowTabNavigation?0:-1,r}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarCollection=void 0;var o=n(1);n(201);var r=n(5),i=n(120),a=n(199),s=n(32),l=function(e){function t(t){var n=e.call(this,t)||this;return n.listenEvents="updateToolbar changeStack mousedown mouseup keydown change afterInit readonly afterResize selectionchange changeSelection focus afterSetMode touchstart focus blur",n.update=n.j.async.debounce(n.immediateUpdate,(function(){return n.j.defaultTimeout})),n.initEvents(),n}return(0,o.__extends)(t,e),t.prototype.className=function(){return"ToolbarCollection"},Object.defineProperty(t.prototype,"firstButton",{get:function(){return(0,o.__read)(this.buttons,1)[0]||null},enumerable:!1,configurable:!0}),t.prototype.makeButton=function(e,t){return void 0===t&&(t=null),(0,a.makeButton)(this.j,e,t)},t.prototype.shouldBeActive=function(e){},t.prototype.shouldBeDisabled=function(e){},t.prototype.getTarget=function(e){return e.target||null},t.prototype.immediateUpdate=function(){this.isDestructed||this.j.isLocked||(e.prototype.update.call(this),this.j.e.fire("afterUpdateToolbar"))},t.prototype.setDirection=function(e){this.container.style.direction=e,this.container.setAttribute("dir",e)},t.prototype.initEvents=function(){this.j.e.on(this.listenEvents,this.update).on("afterSetMode focus",this.immediateUpdate)},t.prototype.hide=function(){this.container.remove()},t.prototype.show=function(){this.appendTo(this.j.toolbarContainer)},t.prototype.showInline=function(e){throw(0,r.error)("The method is not implemented for this class.")},t.prototype.build=function(t,n){void 0===n&&(n=null);var o=this.j.e.fire("beforeToolbarBuild",t);return o&&(t=o),e.prototype.build.call(this,t,n),this},t.prototype.destruct=function(){this.isDestructed||(this.j.e.off(this.listenEvents,this.update).off("afterSetMode focus",this.immediateUpdate),e.prototype.destruct.call(this))},(0,o.__decorate)([s.autobind],t.prototype,"immediateUpdate",null),(0,o.__decorate)([s.component],t)}(i.UIList);t.ToolbarCollection=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarEditorCollection=void 0;var o=n(1),r=n(200),i=n(23),a=n(21),s=n(5),l=n(32),u=function(e){function t(t){var n=e.call(this,t)||this;return n.checkActiveStatus=function(e,t){var o=0,r=0;return Object.keys(e).forEach((function(i){var a=e[i];(0,s.isFunction)(a)?a(n.j,(0,s.css)(t,i).toString())&&(o+=1):-1!==a.indexOf((0,s.css)(t,i).toString())&&(o+=1),r+=1})),r===o},n.prependInvisibleInput(n.container),n}return(0,o.__extends)(t,e),t.prototype.className=function(){return"ToolbarEditorCollection"},t.prototype.shouldBeDisabled=function(t){var n=e.prototype.shouldBeDisabled.call(this,t);if(void 0!==n)return n;var o=void 0===t.control.mode?i.MODE_WYSIWYG:t.control.mode;return!(o===i.MODE_SPLIT||o===this.j.getRealMode())},t.prototype.shouldBeActive=function(t){var n=this,o=e.prototype.shouldBeActive.call(this,t);if(void 0!==o)return o;var r=this.j.selection?this.j.s.current():null;if(!r)return!1;if(t.control.tags){var i=t.control.tags;if(a.Dom.up(r,(function(e){if(e&&-1!==i.indexOf(e.nodeName.toLowerCase()))return!0}),this.j.editor))return!0}if(t.control.css){var s=t.control.css;if(a.Dom.up(r,(function(e){if(e&&!a.Dom.isText(e))return n.checkActiveStatus(s,e)}),this.j.editor))return!0}return!1},t.prototype.getTarget=function(e){return e.target||this.j.s.current()||null},t.prototype.prependInvisibleInput=function(e){var t=this.j.create.element("input",{tabIndex:-1,disabled:!0,style:"width: 0; height:0; position: absolute; visibility: hidden;"});a.Dom.appendChildFirst(e,t)},t.prototype.showInline=function(e){this.jodit.e.fire("showInlineToolbar",e)},t.prototype.hide=function(){this.jodit.e.fire("hidePopup"),e.prototype.hide.call(this),this.jodit.e.fire("toggleToolbar")},t.prototype.show=function(){e.prototype.show.call(this),this.jodit.e.fire("toggleToolbar")},(0,o.__decorate)([l.component],t)}(r.ToolbarCollection);t.ToolbarEditorCollection=u},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarButton=void 0;var o=n(1);n(204);var r=n(126),i=n(32),a=n(21),s=n(141),l=n(199),u=n(5),c=n(120),d=n(200),f=n(16),p=n(137),h=function(e){function t(t,n,i){void 0===i&&(i=null);var a=e.call(this,t)||this;return a.control=n,a.target=i,a.state=(0,o.__assign)((0,o.__assign)({},(0,r.UIButtonState)()),{theme:"toolbar",currentValue:"",hasTrigger:!1}),t.e.on([a.button,a.trigger],"mousedown",(function(e){return e.preventDefault()})),a.onAction(a.onClick),a.hookStatus(f.STATUSES.ready,(function(){a.initFromControl(),a.initTooltip(),a.update()})),a}return(0,o.__extends)(t,e),t.prototype.className=function(){return"ToolbarButton"},Object.defineProperty(t.prototype,"toolbar",{get:function(){return this.closest(d.ToolbarCollection)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"button",{get:function(){return this.container.querySelector("button.".concat(this.componentName,"__button"))},enumerable:!1,configurable:!0}),t.prototype.update=function(){var t=this.control,n=this.state,o=this.closest(d.ToolbarCollection);n.disabled=this.calculateDisabledStatus(o),n.activated=this.calculateActivatedStatus(o),(0,u.isFunction)(t.update)&&t.update(this),e.prototype.update.call(this)},t.prototype.calculateActivatedStatus=function(e){return!((0,u.isJoditObject)(this.j)&&!this.j.editorIsActive)&&(!(!(0,u.isFunction)(this.control.isActive)||!this.control.isActive(this.j,this.control,this))||Boolean(e&&e.shouldBeActive(this)))},t.prototype.calculateDisabledStatus=function(e){return!!this.j.o.disabled||!(!this.j.o.readonly||this.j.o.activeButtonsInReadOnly&&this.j.o.activeButtonsInReadOnly.includes(this.control.name))||!(!(0,u.isFunction)(this.control.isDisabled)||!this.control.isDisabled(this.j,this.control,this))||Boolean(e&&e.shouldBeDisabled(this))},t.prototype.onChangeActivated=function(){(0,u.attr)(this.button,"aria-pressed",this.state.activated),e.prototype.onChangeActivated.call(this)},t.prototype.onChangeText=function(){(0,u.isFunction)(this.control.template)?this.text.innerHTML=this.control.template(this.j,this.control.name,this.j.i18n(this.state.text)):e.prototype.onChangeText.call(this),this.setMod("text-icons",Boolean(this.text.innerText.trim().length))},t.prototype.onChangeTabIndex=function(){(0,u.attr)(this.button,"tabindex",this.state.tabIndex)},t.prototype.onChangeTooltip=function(){(0,u.attr)(this.button,"aria-label",this.state.tooltip),e.prototype.onChangeTooltip.call(this)},t.prototype.createContainer=function(){var t=this.componentName,n=this.j.c.span(t),o=e.prototype.createContainer.call(this);return(0,u.attr)(n,"role","listitem"),o.classList.remove(t),o.classList.add(t+"__button"),Object.defineProperty(o,"component",{value:this}),n.appendChild(o),this.trigger=this.j.c.fromHTML('<span role="trigger" class="'.concat(t,'__trigger">').concat(c.Icon.get("chevron"),"</span>")),this.j.e.on(this.trigger,"click",this.onTriggerClick.bind(this)),n},t.prototype.focus=function(){var e;null===(e=this.container.querySelector("button"))||void 0===e||e.focus()},t.prototype.onChangeHasTrigger=function(){this.state.hasTrigger?this.container.appendChild(this.trigger):a.Dom.safeRemove(this.trigger),this.setMod("with-trigger",this.state.hasTrigger||null)},t.prototype.onChangeDisabled=function(){var e=this.state.disabled?"disabled":null;(0,u.attr)(this.trigger,"disabled",e),(0,u.attr)(this.button,"disabled",e),(0,u.attr)(this.container,"disabled",e)},t.prototype.initTooltip=function(){var e=this;this.j.o.textIcons||!this.j.o.showTooltip||this.j.o.useNativeTooltip||this.j.e.off(this.container,"mouseenter mouseleave").on(this.container,"mousemove",(function(t){e.state.tooltip&&!e.state.disabled&&e.j.e.fire("delayShowTooltip",(function(){return{x:t.clientX+10,y:t.clientY+10}}),e.state.tooltip)})).on(this.container,"mouseleave",(function(){e.j.e.fire("hideTooltip")}))},t.prototype.initFromControl=function(){var e,t=this.control,n=this.state;this.updateSize(),n.name=t.name;var o=this.j.o.textIcons;if(!0===o||(0,u.isFunction)(o)&&o(t.name)||t.template)n.icon=(0,r.UIButtonState)().icon,n.text=t.text||t.name;else{if(t.iconURL)n.icon.iconURL=t.iconURL;else{var i=t.icon||t.name;n.icon.name=c.Icon.exists(i)||(null===(e=this.j.o.extraIcons)||void 0===e?void 0:e[i])?i:""}t.iconURL||n.icon.name||(n.text=t.text||t.name)}t.tooltip&&(n.tooltip=this.j.i18n((0,u.isFunction)(t.tooltip)?t.tooltip(this.j,t,this):t.tooltip)),n.hasTrigger=Boolean(t.list||t.popup&&t.exec)},t.prototype.onTriggerClick=function(e){var t,n,o,r=this,i=this.control;if(e.buffer={actionTrigger:this},i.list)return this.openControlList(i);if((0,u.isFunction)(i.popup)){var a=new s.Popup(this.j);if(a.parentElement=this,!1!==this.j.e.fire((0,u.camelCase)("before-".concat(i.name,"-open-popup")),this.target,i,a)){var l=null!==(o=null!==(n=null===(t=this.toolbar)||void 0===t?void 0:t.getTarget(this))&&void 0!==n?n:this.target)&&void 0!==o?o:null,c=i.popup(this.j,l,i,a.close,this);c&&a.setContent((0,u.isString)(c)?this.j.c.fromHTML(c):c).open((function(){return(0,u.position)(r.container)}))}this.j.e.fire((0,u.camelCase)("after-".concat(i.name,"-open-popup")),a.container)}},t.prototype.openControlList=function(e){var t,n=this,r=null!==(t=this.jodit.options.controls)&&void 0!==t?t:{},i=function(e){return(0,p.findControlType)(e,r)},a=e.list,c=new s.Popup(this.j),d=(0,l.makeCollection)(this.j);c.parentElement=this,d.parentElement=c,d.mode="vertical";var f=function(t,n){if((0,u.isString)(n)&&i(n))return(0,o.__assign)({name:n.toString()},i(n));if((0,u.isString)(t)&&i(t))return(0,o.__assign)((0,o.__assign)({name:t.toString()},i(t)),"object"==typeof n?n:{});var r={name:t.toString(),template:e.childTemplate,exec:e.exec,data:e.data,command:e.command,isActive:e.isChildActive,isDisabled:e.isChildDisabled,mode:e.mode,args:(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(e.args?e.args:[]),!1),[t,n],!1)};return(0,u.isString)(n)&&(r.text=n),r};d.build((0,u.isArray)(a)?a.map(f):(0,u.keys)(a,!1).map((function(e){return f(e,a[e])})),this.target),c.setContent(d.container).open((function(){return(0,u.position)(n.container)})),this.state.activated=!0,this.j.e.on(c,"afterClose",(function(){n.state.activated=!1}))},t.prototype.onClick=function(e){var t,n,o,r,i,a,s,l=this.control;if((0,u.isFunction)(l.exec)){var c=null!==(o=null!==(n=null===(t=this.toolbar)||void 0===t?void 0:t.getTarget(this))&&void 0!==n?n:this.target)&&void 0!==o?o:null,d=l.exec(this.j,c,{control:l,originalEvent:e,button:this});if(!1!==d&&!0!==d&&(null===(i=null===(r=this.j)||void 0===r?void 0:r.e)||void 0===i||i.fire("synchro"),this.parentElement&&this.parentElement.update(),null===(s=null===(a=this.j)||void 0===a?void 0:a.e)||void 0===s||s.fire("closeAllPopups afterExec")),!1!==d)return}return l.list?this.openControlList(l):(0,u.isFunction)(l.popup)?this.onTriggerClick(e):void((l.command||l.name)&&((0,u.call)((0,u.isJoditObject)(this.j)?this.j.execCommand.bind(this.j):this.j.od.execCommand.bind(this.j.od),l.command||l.name,!1,l.args&&l.args[0]),this.j.e.fire("closeAllPopups")))},(0,o.__decorate)([(0,i.watch)("state.tooltip")],t.prototype,"onChangeTooltip",null),(0,o.__decorate)([(0,i.watch)("state.hasTrigger")],t.prototype,"onChangeHasTrigger",null),(0,o.__decorate)([i.component],t)}(r.UIButton);t.ToolbarButton=h},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ToolbarContent=void 0;var o=n(1);n(206);var r=n(126),i=n(21),a=n(5),s=n(32),l=function(e){function t(t,n,o){void 0===o&&(o=null);var r=e.call(this,t)||this;return r.control=n,r.target=o,r.container.classList.add("".concat(r.componentName,"_").concat(r.clearName(n.name))),(0,a.attr)(r.container,"role","content"),r}return(0,o.__extends)(t,e),t.prototype.className=function(){return"ToolbarContent"},t.prototype.update=function(){var t=this.control.getContent(this.j,this.control,this);((0,a.isString)(t)||t.parentNode!==this.container)&&(i.Dom.detach(this.container),this.container.appendChild((0,a.isString)(t)?this.j.create.fromHTML(t):t)),e.prototype.update.call(this)},t.prototype.createContainer=function(){return this.j.c.span(this.componentName)},(0,o.__decorate)([s.component],t)}(r.UIButton);t.ToolbarContent=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Alert=void 0;var o=n(190),r=n(5),i=n(21),a=n(120);t.Alert=function(e,t,n,s){void 0===s&&(s="jodit-dialog_alert"),(0,r.isFunction)(t)&&(n=t,t=void 0);var l=new o.Dialog,u=l.c.div(s),c=(0,a.Button)(l,"ok","Ok");return(0,r.asArray)(e).forEach((function(e){u.appendChild(i.Dom.isNode(e)?e:l.c.fromHTML(e))})),c.onAction((function(){n&&(0,r.isFunction)(n)&&!1===n(l)||l.close()})),l.setFooter([c]),l.open(u,t||" ",!0,!0),c.focus(),l}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Prompt=void 0;var o=n(189),r=n(120),i=n(5);t.Prompt=function(e,t,n,a,s){var l=new o.Dialog,u=(0,r.Button)(l,"cancel","Cancel"),c=(0,r.Button)(l,"ok","Ok"),d=l.c.element("form",{class:"jodit-dialog_prompt"}),f=l.c.element("input",{autofocus:!0,class:"jodit-input"}),p=l.c.element("label");(0,i.isFunction)(t)&&(n=t,t=void 0),a&&(0,i.attr)(f,"placeholder",a),p.appendChild(l.c.text(e)),d.appendChild(p),d.appendChild(f),u.onAction(l.close);var h=function(){n&&(0,i.isFunction)(n)&&!1===n(f.value)||l.close()};return c.onAction(h),l.e.on(d,"submit",(function(){return h(),!1})),l.setFooter([c,u]),l.open(d,t||" ",!0,!0),f.focus(),void 0!==s&&s.length&&(f.value=s,f.select()),l}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Confirm=void 0;var o=n(189),r=n(5),i=n(120);t.Confirm=function(e,t,n){var a=new o.Dialog,s=a.c.fromHTML('<form class="jodit-dialog_prompt"></form>'),l=a.c.element("label");(0,r.isFunction)(t)&&(n=t,t=void 0),l.appendChild(a.c.fromHTML(e)),s.appendChild(l);var u=function(e){return function(){n&&!1===n(e)||a.close()}},c=(0,i.Button)(a,"cancel","Cancel"),d=(0,i.Button)(a,"ok","Yes");return c.onAction(u(!1)),d.onAction(u(!0)),a.e.on(s,"submit",(function(){return u(!0)(),!1})),a.setFooter([d,c]),a.open(s,t||" ",!0,!0),d.focus(),a}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(20),t),(0,o.__exportStar)(n(211),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Plugin=void 0;var o=n(1),r=n(16),i=n(32),a=n(5),s=function(e){function t(t){var n=e.call(this,t)||this;return n.requires=[],n.buttons=[],n.hasStyle=!1,t.e.on("afterPluginSystemInit",(function(){var e;(0,a.isJoditObject)(t)&&(null===(e=n.buttons)||void 0===e||e.forEach((function(e){t.registerButton(e)})))})).on("afterInit",(function(){n.setStatus(r.STATUSES.ready),n.afterInit(t)})).on("beforeDestruct",n.destruct),n}return(0,o.__extends)(t,e),t.prototype.className=function(){return""},t.prototype.init=function(e){},t.prototype.destruct=function(){var t,n,o;if(!this.isInDestruct){this.setStatus(r.STATUSES.beforeDestruct);var i=this.j;(0,a.isJoditObject)(i)&&(null===(t=this.buttons)||void 0===t||t.forEach((function(e){null==i||i.unregisterButton(e)}))),null===(o=null===(n=this.j)||void 0===n?void 0:n.events)||void 0===o||o.off("beforeDestruct",this.destruct),this.beforeDestruct(this.j),e.prototype.destruct.call(this)}},(0,o.__decorate)([i.autobind],t.prototype,"destruct",null),t}(r.ViewComponent);t.Plugin=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(213),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Create=void 0;var o=n(5),r=n(21),i=n(23),a=function(){function e(e,t){this.document=e,this.createAttributes=t}return Object.defineProperty(e.prototype,"doc",{get:function(){return(0,o.isFunction)(this.document)?this.document():this.document},enumerable:!1,configurable:!0}),e.prototype.element=function(e,t,n){var r=this,i=this.doc.createElement(e.toLowerCase());return this.applyCreateAttributes(i),t&&((0,o.isPlainObject)(t)?(0,o.attr)(i,t):n=t),n&&(0,o.asArray)(n).forEach((function(e){return i.appendChild((0,o.isString)(e)?r.fromHTML(e):e)})),i},e.prototype.div=function(e,t,n){var o=this.element("div",t,n);return e&&(o.className=e),o},e.prototype.span=function(e,t,n){var o=this.element("span",t,n);return e&&(o.className=e),o},e.prototype.a=function(e,t,n){var o=this.element("a",t,n);return e&&(o.className=e),o},e.prototype.text=function(e){return this.doc.createTextNode(e)},e.prototype.fake=function(){return this.text(i.INVISIBLE_SPACE)},e.prototype.fragment=function(){return this.doc.createDocumentFragment()},e.prototype.fromHTML=function(e,t){var n=this.div();n.innerHTML=e.toString();var i=n.firstChild===n.lastChild&&n.firstChild?n.firstChild:n;if(r.Dom.safeRemove(i),t){var a=(0,o.refs)(i);Object.keys(t).forEach((function(e){var n=a[e];n&&!1===t[e]&&r.Dom.hide(n)}))}return i},e.prototype.applyCreateAttributes=function(e){if(this.createAttributes){var t=this.createAttributes;if(t&&t[e.tagName.toLowerCase()]){var n=t[e.tagName.toLowerCase()];(0,o.isFunction)(n)?n(e):(0,o.isPlainObject)(n)&&(0,o.attr)(e,n)}}},e}();t.Create=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(215),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isFileBrowserFilesItem=t.FileBrowser=void 0;var o=n(1);n(216);var r=n(87),i=n(23),a=n(189),s=n(195),l=n(5),u=n(192);n(217);var c=n(21),d=n(218),f=n(221),p=n(225),h=n(232),v=n(219),m=n(32),g=n(233),_=n(62),y=n(223),b=n(224),S=n(16),w=function(e){function t(t){var n,o=e.call(this,t)||this;o.browser=o.c.div(o.componentName),o.status_line=o.c.div(o.getFullElName("status")),o.tree=new g.FileBrowserTree(o),o.files=new g.FileBrowserFiles(o),o.state=(0,_.observable)({currentPath:"",currentSource:v.DEFAULT_SOURCE_NAME,currentBaseUrl:"",activeElements:[],elements:[],messages:[],sources:[],view:"tiles",sortBy:"changed-desc",filterWord:"",onlyImages:!1}),o.errorHandler=function(e){e instanceof Error?o.status(o.i18n(e.message)):o.status(o.dataProvider.getMessage(e))},o.close=function(){o.dialog.close()},o.attachEvents(t);var i=o;i.options=(0,l.ConfigProto)(t||{},r.Config.defaultOptions.filebrowser),i.storage=s.Storage.makeStorage(Boolean(o.o.saveStateInStorage),o.componentName),i.dataProvider=(0,d.makeDataProvider)(i,i.options),i.dialog=new a.Dialog({fullsize:i.o.fullsize,ownerWindow:i.ownerWindow,theme:i.o.theme,globalFullSize:i.o.globalFullSize,language:o.o.language,minWidth:Math.min(700,screen.width),minHeight:300,buttons:null!==(n=o.o.headerButtons)&&void 0!==n?n:["fullsize","dialog.close"]}),o.proxyDialogEvents(i),i.browser.component=o,i.container=i.browser,i.o.showFoldersPanel&&i.browser.appendChild(i.tree.container),i.browser.appendChild(i.files.container),i.browser.appendChild(i.status_line),h.selfListeners.call(i),p.nativeListeners.call(i),f.stateListeners.call(i),i.dialog.setSize(i.o.width,i.o.height),["getLocalFileByUrl","crop","resize","create","fileMove","folderMove","fileRename","folderRename","fileRemove","folderRemove","folder","items","permissions"].forEach((function(e){null!=o.options[e]&&(o.options[e]=(0,l.ConfigProto)(o.options[e],o.o.ajax))}));var u=o.o.saveStateInStorage||{storeLastOpenedFolder:!1,storeView:!1,storeSortBy:!1},c=u.storeSortBy,m=u.storeLastOpenedFolder,y=u.storeView&&o.storage.get("view");i.state.view=y&&null==o.o.view?"list"===y?"list":"tiles":"list"===i.o.view?"list":"tiles",i.files.setMod("view",i.state.view);var b=c&&i.storage.get("sortBy");if(b){var w=b.split("-");i.state.sortBy=["changed","name","size"].includes(w[0])?b:"changed-desc"}else i.state.sortBy=i.o.sortBy||"changed-desc";if(m){var C=i.storage.get("currentPath"),j=i.storage.get("currentSource");i.state.currentPath=null!=C?C:"",i.state.currentSource=null!=j?j:""}return i.initUploader(i),i.setStatus(S.STATUSES.ready),o}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Filebrowser"},t.prototype.onSelect=function(e){var t=this;return function(){if(t.state.activeElements.length){var n=[],o=[];t.state.activeElements.forEach((function(e){var t=e.fileURL;t&&(n.push(t),o.push(e.isImage||!1))})),t.close();var r={baseurl:"",files:n,isImages:o};(0,l.isFunction)(e)&&e(r),t.close()}return!1}},Object.defineProperty(t.prototype,"isOpened",{get:function(){return this.dialog.isOpened&&"none"!==this.browser.style.display},enumerable:!1,configurable:!0}),t.prototype.status=function(e,t){var n=this;if((0,l.isString)(e)||(e=e.message),(0,l.isString)(e)&&(0,l.trim)(e).length){var o=this.getFullElName("status","success",!0),r=this.getFullElName("status","active",!0);this.status_line.classList.remove(o),this.status_line.classList.add(r);var i=this.c.div();i.textContent=e,this.status_line.appendChild(i),t&&this.status_line.classList.add(o),this.async.setTimeout((function(){n.status_line.classList.remove(r),c.Dom.detach(n.status_line)}),{timeout:this.o.howLongShowMsg,label:"fileBrowser.status"})}},t.prototype.open=function(e,t){var n=this;return void 0===e&&(e=this.o.defaultCallback),void 0===t&&(t=!1),this.state.onlyImages=t,this.async.promise((function(t,o){var r;if(!n.o.items||!n.o.items.url)throw(0,l.error)("Need set options.filebrowser.ajax.url");var a=0;n.e.off(n.files.container,"dblclick").on(n.files.container,"dblclick",n.onSelect(e)).on(n.files.container,"touchstart",(function(){var t=(new Date).getTime();i.EMULATE_DBLCLICK_TIMEOUT>t-a&&n.onSelect(e)(),a=t})).off("select.filebrowser").on("select.filebrowser",n.onSelect(e));var s=n.c.div();n.toolbar.build(null!==(r=n.o.buttons)&&void 0!==r?r:[]).appendTo(s),n.dialog.open(n.browser,s),n.e.fire("sort.filebrowser",n.state.sortBy),(0,y.loadTree)(n).then(t,o)}))},t.prototype.initUploader=function(e){var t,n=this,o=this,i=null===(t=null==e?void 0:e.options)||void 0===t?void 0:t.uploader,a=(0,l.ConfigProto)(i||{},r.Config.defaultOptions.uploader),s=function(){return(0,b.loadItems)(n)};o.uploader=o.getInstance("Uploader",a),o.uploader.setPath(o.state.currentPath).setSource(o.state.currentSource).bind(o.browser,s,o.errorHandler),this.state.on(["change.currentPath","change.currentSource"],(function(){n.uploader.setPath(n.state.currentPath).setSource(n.state.currentSource)})),o.e.on("bindUploader.filebrowser",(function(e){o.uploader.bind(e,s,o.errorHandler)}))},t.prototype.proxyDialogEvents=function(e){var t=this;["afterClose","beforeOpen"].forEach((function(n){e.dialog.events.on(e.dialog,n,(function(){t.e.fire(n)}))}))},t.prototype.destruct=function(){this.isInDestruct||(this.dialog.destruct(),this.events&&this.e.off(".filebrowser"),this.uploader&&this.uploader.destruct(),e.prototype.destruct.call(this))},(0,o.__decorate)([m.autobind],t.prototype,"status",null),(0,o.__decorate)([m.autobind],t.prototype,"open",null),t}(u.ViewWithToolbar);t.FileBrowser=w,t.isFileBrowserFilesItem=function(e){return c.Dom.isElement(e)&&e.classList.contains(g.FileBrowserFiles.prototype.getFullElName("item"))}},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=n(87),i=n(5),a=n(120);r.Config.prototype.filebrowser={namespace:"",extraButtons:[],filter:function(e,t){return t=t.toLowerCase(),(0,i.isString)(e)?-1!==e.toLowerCase().indexOf(t):(0,i.isString)(e.name)?-1!==e.name.toLowerCase().indexOf(t):!(0,i.isString)(e.file)||-1!==e.file.toLowerCase().indexOf(t)},sortBy:"changed-desc",sort:function(e,t,n){var r=(0,o.__read)(n.toLowerCase().split("-"),2),a=r[0],s="asc"===r[1],l=function(e,t){return t>e?s?-1:1:e>t?s?1:-1:0};if((0,i.isString)(e))return l(e.toLowerCase(),t.toLowerCase());if(void 0===e[a]||"name"===a)return(0,i.isString)(e.name)?l(e.name.toLowerCase(),t.name.toLowerCase()):(0,i.isString)(e.file)?l(e.file.toLowerCase(),t.file.toLowerCase()):0;switch(a){case"changed":var u=new Date(e.changed).getTime(),c=new Date(t.changed).getTime();return s?u-c:c-u;case"size":return u=(0,i.humanSizeToBytes)(e.size),c=(0,i.humanSizeToBytes)(t.size),s?u-c:c-u}return 0},editImage:!0,preview:!0,showPreviewNavigation:!0,showSelectButtonInPreview:!0,contextMenu:!0,howLongShowMsg:3e3,createNewFolder:!0,deleteFolder:!0,renameFolder:!0,moveFolder:!0,moveFile:!0,showFoldersPanel:!0,storeLastOpenedFolder:!0,width:859,height:400,buttons:["filebrowser.upload","filebrowser.remove","filebrowser.update","filebrowser.select","filebrowser.edit","|","filebrowser.tiles","filebrowser.list","|","filebrowser.filter","|","filebrowser.sort"],removeButtons:[],fullsize:!1,showTooltip:!0,view:null,isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&(0,i.isArray)(e.data.messages)?e.data.messages.join(" "):""},showFileName:!0,showFileSize:!0,showFileChangeTime:!0,saveStateInStorage:{storeLastOpenedFolder:!0,storeView:!0,storeSortBy:!0},pixelOffsetLoadNewChunk:200,getThumbTemplate:function(e,t,n){var o=this.options,r=this.files.getFullElName("item"),i=o.showFileName,a=o.showFileSize&&e.size,s=o.showFileChangeTime&&e.time,l="";void 0!==e.file&&(l=e.file);var u='<div class="'.concat(r,'-info">').concat(i?'<span class="'.concat(r,'-info-filename">').concat(l,"</span>"):"").concat(a?'<span class="'.concat(r,'-info-filesize">').concat(e.size,"</span>"):"").concat(s?'<span class="'.concat(r,'-info-filechanged">').concat(s,"</span>"):"","</div>");return'<a\n\t\t\tdata-jodit-filebrowser-item="true"\n\t\t\tdata-is-file="'.concat(e.isImage?0:1,'"\n\t\t\tdraggable="true"\n\t\t\tclass="').concat(r,'"\n\t\t\thref="').concat(e.fileURL,'"\n\t\t\tdata-source="').concat(n,'"\n\t\t\tdata-path="').concat(e.path,'"\n\t\t\tdata-name="').concat(l,'"\n\t\t\ttitle="').concat(l,'"\n\t\t\tdata-url="').concat(e.fileURL,'">\n\t\t\t\t<img\n\t\t\t\t\tdata-is-file="').concat(e.isImage?0:1,'"\n\t\t\t\t\tdata-src="').concat(e.fileURL,'"\n\t\t\t\t\tsrc="').concat(e.imageURL,'"\n\t\t\t\t\talt="').concat(l,'"\n\t\t\t\t\tloading="lazy"\n\t\t\t\t/>\n\t\t\t\t').concat(i||a||s?u:"","\n\t\t\t</a>")},ajax:(0,o.__assign)((0,o.__assign)({},r.Config.prototype.defaultAjaxOptions),{url:"",async:!0,data:{},cache:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",method:"POST",processData:!0,dataType:"json",headers:{},prepareData:function(e){return e},process:function(e){return e}}),create:{data:{action:"folderCreate"}},getLocalFileByUrl:{data:{action:"getLocalFileByUrl"}},resize:{data:{action:"imageResize"}},crop:{data:{action:"imageCrop"}},fileMove:{data:{action:"fileMove"}},folderMove:{data:{action:"folderMove"}},fileRename:{data:{action:"fileRename"}},folderRename:{data:{action:"folderRename"}},fileRemove:{data:{action:"fileRemove"}},folderRemove:{data:{action:"folderRemove"}},items:{data:{action:"files"}},folder:{data:{action:"folders"}},permissions:{data:{action:"permissions"}}},r.Config.prototype.controls.filebrowser={upload:{icon:"plus",isInput:!0,isDisabled:function(e){return!e.dataProvider.canI("FileUpload")},getContent:function(e){var t=new a.UIFileInput(e,{onlyImages:e.state.onlyImages});return e.e.fire("bindUploader.filebrowser",t.container),t.container}},remove:{icon:"bin",isDisabled:function(e){return!e.state.activeElements.length||!e.dataProvider.canI("FileRemove")},exec:function(e){e.e.fire("fileRemove.filebrowser")}},update:{exec:function(e){e.e.fire("update.filebrowser")}},select:{icon:"check",isDisabled:function(e){return!e.state.activeElements.length},exec:function(e){e.e.fire("select.filebrowser")}},edit:{icon:"pencil",isDisabled:function(e){var t=e.state.activeElements;return 1!==t.length||!t[0].isImage||!(e.dataProvider.canI("ImageCrop")||e.dataProvider.canI("ImageResize"))},exec:function(e){e.e.fire("edit.filebrowser")}},tiles:{icon:"th",isActive:function(e){return"tiles"===e.state.view},exec:function(e){e.e.fire("view.filebrowser","tiles")}},list:{icon:"th-list",isActive:function(e){return"list"===e.state.view},exec:function(e){e.e.fire("view.filebrowser","list")}},filter:{isInput:!0,getContent:function(e,t,n){var o=n.container.querySelector(".jodit-input");if(o)return o;var r=e.c.element("input",{class:"jodit-input",placeholder:e.i18n("Filter")});return r.value=e.state.filterWord,e.e.on(r,"keydown mousedown",e.async.debounce((function(){e.e.fire("filter.filebrowser",r.value)}),e.defaultTimeout)),r}},sort:{isInput:!0,getContent:function(e){var t=e.c.fromHTML('<select class="jodit-input jodit-select">'+'<option value="changed-asc">'.concat(e.i18n("Sort by changed")," (⬆)</option>")+'<option value="changed-desc">'.concat(e.i18n("Sort by changed")," (⬇)</option>")+'<option value="name-asc">'.concat(e.i18n("Sort by name")," (⬆)</option>")+'<option value="name-desc">'.concat(e.i18n("Sort by name")," (⬇)</option>")+'<option value="size-asc">'.concat(e.i18n("Sort by size")," (⬆)</option>")+'<option value="size-desc">'.concat(e.i18n("Sort by size")," (⬇)</option>")+"</select>");return t.value=e.state.sortBy,e.e.on("sort.filebrowser",(function(e){t.value!==e&&(t.value=e)})).on(t,"change",(function(){e.e.fire("sort.filebrowser",t.value)})),t}}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.makeContextMenu=t.makeDataProvider=void 0;var o=n(219),r=n(187);t.makeDataProvider=function(e,t){return new o.default(e,t)},t.makeContextMenu=function(e){return new r.ContextMenu(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_SOURCE_NAME=void 0;var o=n(1),r=n(5),i=n(183),a=n(32),s=n(220);t.DEFAULT_SOURCE_NAME="default";var l=function(){function e(e,t){this.parent=e,this.options=t,this.__currentPermissions=null,this.ajaxInstances=new Map,this.progressHandler=function(e){}}return Object.defineProperty(e.prototype,"o",{get:function(){return this.options},enumerable:!1,configurable:!0}),e.prototype.get=function(e){var t=this,n=this.ajaxInstances;if(n.has(e)){var o=n.get(e);null==o||o.abort(),n.delete(e)}var a=(0,r.ConfigProto)(void 0!==this.options[e]?this.options[e]:{},(0,r.ConfigProto)({onProgress:this.progressHandler},this.o.ajax));a.prepareData&&(a.data=a.prepareData.call(this,a.data));var s=new i.Ajax(this.parent,a);n.set(e,s);var l=s.send();return l.finally((function(){s.destruct(),n.delete(e),t.progressHandler(100)})),l.then((function(e){return e.json()})).then((function(e){if(e&&!t.isSuccess(e))throw new Error(t.getMessage(e));return e}))},e.prototype.onProgress=function(e){this.progressHandler=e},e.prototype.permissions=function(e,t){return(0,o.__awaiter)(this,void 0,Promise,(function(){var n=this;return(0,o.__generator)(this,(function(o){return this.o.permissions?(this.o.permissions.data.path=e,this.o.permissions.data.source=t,this.o.permissions.url?[2,this.get("permissions").then((function(e){var t=n.o.permissions.process;if(t||(t=n.o.ajax.process),t){var o=t.call(self,e);o.data.permissions&&(n.__currentPermissions=o.data.permissions)}return n.__currentPermissions}))]:[2,null]):[2,null]}))}))},e.prototype.canI=function(e){var t="allow"+e;return null==this.__currentPermissions||void 0===this.__currentPermissions[t]||this.__currentPermissions[t]},e.prototype.items=function(e,t,n){return void 0===n&&(n={}),(0,o.__awaiter)(this,void 0,Promise,(function(){var r,i=this;return(0,o.__generator)(this,(function(o){return(r=this.options).items?(r.items.data.path=e,r.items.data.source=t,r.items.data.mods=n,[2,this.get("items").then((function(e){var t=i.o.items.process;return t||(t=i.o.ajax.process),t&&(e=t.call(self,e)),i.generateItemsList(e.data.sources,n)}))]):[2,Promise.reject("Set Items api options")]}))}))},e.prototype.generateItemsList=function(e,t){var n=this;void 0===t&&(t={});var i=[];return e.forEach((function(e){if(e.files&&e.files.length){var a=n.o.sort;(0,r.isFunction)(a)&&t.sortBy&&e.files.sort((function(e,n){return a(e,n,t.sortBy)})),e.files.forEach((function(r){(function(e){var o;return!(null===(o=t.filterWord)||void 0===o?void 0:o.length)||void 0===n.o.filter||n.o.filter(e,t.filterWord)})(r)&&function(e){return!t.onlyImages||void 0===e.isImage||e.isImage}(r)&&i.push(s.FileBrowserItem.create((0,o.__assign)((0,o.__assign)({},r),{sourceName:e.name,source:e})))}))}})),i},e.prototype.tree=function(e,t){return(0,o.__awaiter)(this,void 0,Promise,(function(){var n=this;return(0,o.__generator)(this,(function(o){switch(o.label){case 0:return e=(0,r.normalizeRelativePath)(e),[4,this.permissions(e,t)];case 1:return o.sent(),this.o.folder?(this.o.folder.data.path=e,this.o.folder.data.source=t,[2,this.get("folder").then((function(e){var t=n.o.folder.process;return t||(t=n.o.ajax.process),t&&(e=t.call(self,e)),e.data.sources}))]):[2,Promise.reject("Set Folder Api options")]}}))}))},e.prototype.getPathByUrl=function(e){var t=this;return(0,r.set)("options.getLocalFileByUrl.data.url",e,this),this.get("getLocalFileByUrl").then((function(e){if(t.isSuccess(e))return e.data;throw(0,r.error)(t.getMessage(e))}))},e.prototype.createFolder=function(e,t,n){var o=this,i=this.o.create;if(!i)throw(0,r.error)("Set Create api options");return i.data.source=n,i.data.path=t,i.data.name=e,this.get("create").then((function(e){if(o.isSuccess(e))return!0;throw(0,r.error)(o.getMessage(e))}))},e.prototype.move=function(e,t,n,o){var i=this,a=o?"fileMove":"folderMove",s=this.options[a];if(!s)throw(0,r.error)("Set Move api options");return s.data.from=e,s.data.path=t,s.data.source=n,this.get(a).then((function(e){if(i.isSuccess(e))return!0;throw(0,r.error)(i.getMessage(e))}))},e.prototype.remove=function(e,t,n,o){var i=this,a=this.o[e];if(!a)throw(0,r.error)('Set "'.concat(e,'" api options'));return a.data.path=t,a.data.name=n,a.data.source=o,this.get(e).then((function(e){return a.process&&(e=a.process.call(i,e)),i.getMessage(e)}))},e.prototype.fileRemove=function(e,t,n){return this.remove("fileRemove",e,t,n)},e.prototype.folderRemove=function(e,t,n){return this.remove("folderRemove",e,t,n)},e.prototype.rename=function(e,t,n,o,i){var a=this,s=this.o[e];if(!s)throw(0,r.error)('Set "'.concat(e,'" api options'));return s.data.path=t,s.data.name=n,s.data.newname=o,s.data.source=i,this.get(e).then((function(e){return s.process&&(e=s.process.call(self,e)),a.getMessage(e)}))},e.prototype.folderRename=function(e,t,n,o){return this.rename("folderRename",e,t,n,o)},e.prototype.fileRename=function(e,t,n,o){return this.rename("fileRename",e,t,n,o)},e.prototype.changeImage=function(e,t,n,o,r,i){this.o[e]||(this.o[e]={data:{}});var a=this.o[e];return void 0===a.data&&(a.data={action:e}),a.data.newname=r||o,i&&(a.data.box=i),a.data.path=t,a.data.name=o,a.data.source=n,this.get(e).then((function(){return!0}))},e.prototype.crop=function(e,t,n,o,r){return this.changeImage("crop",e,t,n,o,r)},e.prototype.resize=function(e,t,n,o,r){return this.changeImage("resize",e,t,n,o,r)},e.prototype.getMessage=function(e){return this.options.getMessage(e)},e.prototype.isSuccess=function(e){return this.options.isSuccess(e)},e.prototype.destruct=function(){this.ajaxInstances.forEach((function(e){return e.destruct()})),this.ajaxInstances.clear()},(0,o.__decorate)([a.autobind],e)}();t.default=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserItem=void 0;var o=n(5),r=function(){function e(e){var t=this;this.data=e,Object.keys(e).forEach((function(n){t[n]=e[n]}))}return e.create=function(t){return t instanceof e?t:new e(t)},Object.defineProperty(e.prototype,"path",{get:function(){return(0,o.normalizePath)(this.data.source.path?this.data.source.path+"/":"/")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"imageURL",{get:function(){var e=(new Date).getTime().toString(),t=this.data,n=t.source,r=t.thumb||t.file;return t.thumbIsAbsolute&&r?r:(0,o.normalizeUrl)(n.baseurl,n.path,r||"")+"?_tmst="+e},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"fileURL",{get:function(){var e=this.data.name,t=this.data,n=t.file,r=t.source;return void 0!==n&&(e=n),t.fileIsAbsolute&&e?e:(0,o.normalizeUrl)(r.baseurl,r.path,e||"")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"time",{get:function(){var e=this.data.changed;return e&&("number"==typeof e?new Date(e).toLocaleString():e)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"uniqueHashKey",{get:function(){var e=this.data;return[e.sourceName,e.name,e.file,this.time,e.thumb].join("_").toLowerCase().replace(/[^0-9a-z\-.]/g,"-")},enumerable:!1,configurable:!0}),e.prototype.toJSON=function(){return this.data},e}();t.FileBrowserItem=r},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.stateListeners=void 0;var o=n(21),r=n(90),i=n(120),a=n(222),s=n(223);t.stateListeners=function(){var e=this,t=(0,a.elementsMap)(this),n=this,l=n.state,u=n.files,c=n.create,d=n.options;l.on(["change.currentPath","change.currentSource"],this.async.debounce((function(){e.o.saveStateInStorage&&e.o.saveStateInStorage.storeLastOpenedFolder&&e.storage.set("currentPath",e.state.currentPath).set("currentSource",e.state.currentSource),(0,s.loadTree)(e).catch(e.status)}),this.defaultTimeout)).on("beforeChange.activeElements",(function(){l.activeElements.forEach((function(e){var n=t[e.uniqueHashKey].elm;n&&n.classList.remove(u.getFullElName("item","active",!0))}))})).on("change.activeElements",(function(){e.e.fire("changeSelection"),l.activeElements.forEach((function(e){var n=t[e.uniqueHashKey].elm;n&&n.classList.add(u.getFullElName("item","active",!0))}))})).on("change.view",(function(){u.setMod("view",l.view),e.o.saveStateInStorage&&e.o.saveStateInStorage.storeView&&e.storage.set("view",l.view)})).on("change.sortBy",(function(){e.o.saveStateInStorage&&e.o.saveStateInStorage.storeSortBy&&e.storage.set("sortBy",l.sortBy)})).on("change.elements",this.async.debounce((function(){o.Dom.detach(u.container),l.elements.length?l.elements.forEach((function(n){e.files.container.appendChild(function(n){var o=n.uniqueHashKey;if(t[o])return t[o].elm;var r=c.fromHTML(d.getThumbTemplate.call(e,n,n.source,n.sourceName.toString()));return r.dataset.key=o,t[o]={item:n,elm:r},t[o].elm}(n))})):u.container.appendChild(c.div(e.componentName+"_no-files_true",e.i18n("There are no files")))}),this.defaultTimeout)).on("change.sources",this.async.debounce((function(){o.Dom.detach(e.tree.container),l.sources.forEach((function(t){var n=t.name;if(n&&"default"!==n&&e.tree.container.appendChild(c.div(e.tree.getFullElName("source-title"),n)),t.folders.forEach((function(o){var a,s=c.a(e.tree.getFullElName("item"),{draggable:"draggable",href:"#","data-path":(0,r.normalizePath)(t.path,o+"/"),"data-name":o,"data-source":n,"data-source-path":t.path},c.span(e.tree.getFullElName("item-title"),o)),l=function(i){return function(a){e.e.fire("".concat(i,".filebrowser"),{name:o,path:(0,r.normalizePath)(t.path+"/"),source:n}),a.stopPropagation(),a.preventDefault()}};e.e.on(s,"click",l("openFolder")),e.tree.container.appendChild(s),".."!==o&&"."!==o&&(d.renameFolder&&e.dataProvider.canI("FolderRename")&&((a=(0,i.Button)(e,{icon:{name:"pencil"},name:"rename",tooltip:"Rename",size:"tiny"})).onAction(l("renameFolder")),s.appendChild(a.container)),d.deleteFolder&&e.dataProvider.canI("FolderRemove")&&((a=(0,i.Button)(e,{icon:{name:"cancel"},name:"remove",tooltip:"Delete",size:"tiny"})).onAction(l("removeFolder")),s.appendChild(a.container)))})),d.createNewFolder&&e.dataProvider.canI("FolderCreate")){var o=(0,i.Button)(e,"plus","Add folder","secondary");o.onAction((function(){e.e.fire("addFolder",{path:(0,r.normalizePath)(t.path+"/"),source:n})})),e.tree.append(o)}}))}),this.defaultTimeout))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.elementsMap=void 0;var n=new WeakMap;t.elementsMap=function(e){var t=n.get(e);return t||n.set(e,t={}),t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadTree=void 0;var o=n(1),r=n(55),i=n(21),a=n(224);t.loadTree=function(e){return(0,o.__awaiter)(this,void 0,Promise,(function(){var t,n,s;return(0,o.__generator)(this,(function(o){return t=function(e){throw e instanceof Error?e:(0,r.error)(e)},e.tree.setMod("active",!0),i.Dom.detach(e.tree.container),n=(0,a.loadItems)(e),e.o.showFoldersPanel?(e.tree.setMod("loading",!0),s=e.dataProvider.tree(e.state.currentPath,e.state.currentSource).then((function(t){e.state.sources=t})).catch((function(e){t(e)})).finally((function(){return e.tree.setMod("loading",!1)})),[2,Promise.all([s,n]).catch(r.error)]):(e.tree.setMod("active",!1),[2,n.catch(r.error)])}))}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadItems=void 0;var o=n(1);t.loadItems=function(e){return(0,o.__awaiter)(this,void 0,Promise,(function(){return(0,o.__generator)(this,(function(t){return e.files.setMod("active",!0),e.files.setMod("loading",!0),[2,e.dataProvider.items(e.state.currentPath,e.state.currentSource,{sortBy:e.state.sortBy,onlyImages:e.state.onlyImages,filterWord:e.state.filterWord}).then((function(t){e.state.elements=t,e.state.activeElements=[]})).catch(e.status).finally((function(){return e.files.setMod("loading",!1)}))]}))}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.nativeListeners=t.elementToItem=t.getItem=void 0;var o=n(1),r=n(5),i=n(226),a=n(21),s=n(222),l=n(223);t.getItem=function(e,t,n){return void 0===n&&(n="a"),a.Dom.closest(e,(function(e){return a.Dom.isTag(e,n)}),t)},t.elementToItem=function(e,t){return t[e.dataset.key||""].item},t.nativeListeners=function(){var e=this,n=!1,a=(0,s.elementsMap)(this),u=this;u.e.on(u.tree.container,"dragstart",(function(e){var o=(0,t.getItem)(e.target,u.container);o&&u.o.moveFolder&&(n=o)})).on(u.tree.container,"drop",(function(o){if((u.o.moveFile||u.o.moveFolder)&&n){var i=(0,r.attr)(n,"-path")||"";if(!u.o.moveFolder&&n.classList.contains(e.tree.getFullElName("item")))return!1;if(n.classList.contains(e.files.getFullElName("item"))&&(i+=(0,r.attr)(n,"-name"),!u.o.moveFile))return!1;var a=(0,t.getItem)(o.target,u.container);if(!a)return;u.dataProvider.move(i,(0,r.attr)(a,"-path")||"",(0,r.attr)(a,"-source")||"",n.classList.contains(e.files.getFullElName("item"))).then((function(){return(0,l.loadTree)(e)})).catch(u.status),n=!1}})).on(u.files.container,"contextmenu",(0,i.default)(u)).on(u.files.container,"click",(function(t){(0,r.ctrlKey)(t)||(e.state.activeElements=[])})).on(u.files.container,"click",(function(e){var n=(0,t.getItem)(e.target,u.container);if(n){var i=(0,t.elementToItem)(n,a);if(i)return u.state.activeElements=(0,r.ctrlKey)(e)?(0,o.__spreadArray)((0,o.__spreadArray)([],(0,o.__read)(u.state.activeElements),!1),[i],!1):[i],e.stopPropagation(),!1}})).on(u.files.container,"dragstart",(function(e){if(u.o.moveFile){var o=(0,t.getItem)(e.target,u.container);if(!o)return;n=o}})).on(u.container,"drop",(function(e){return e.preventDefault()}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=n(189),i=n(21),a=n(5),s=n(218),l=n(120),u=n(225),c=n(227),d=n(222),f=n(223),p=n(231),h="jodit-filebrowser-preview",v=function(e,t){return void 0===e&&(e="next"),void 0===t&&(t="right"),'<div class="'.concat(h,"__navigation ").concat(h,"__navigation_arrow_").concat(e,'">')+""+l.Icon.get("angle-"+t)+"</a>"};t.default=function(e){if(!e.o.contextMenu)return function(){};var t=(0,s.makeContextMenu)(e);return function(n){var s=(0,u.getItem)(n.target,e.container);if(s){var l=s,m=e.options,g=function(e){return(0,a.attr)(l,e)||""};return e.async.setTimeout((function(){var _=(0,u.elementToItem)(s,(0,d.elementsMap)(e));_&&(e.state.activeElements=[_],t.show(n.clientX,n.clientY,[!("1"===g("data-is-file")||!m.editImage||!e.dataProvider.canI("ImageResize")&&!e.dataProvider.canI("ImageCrop"))&&{icon:"pencil",title:"Edit",exec:function(){return c.openImageEditor.call(e,g("href"),g("data-name"),g("data-path"),g("data-source"))}},!!e.dataProvider.canI("FileRename")&&{icon:"italic",title:"Rename",exec:function(){return(0,o.__awaiter)(void 0,void 0,void 0,(function(){return(0,o.__generator)(this,(function(t){return e.e.fire("fileRename.filebrowser",g("data-name"),g("data-path"),g("data-source")),[2]}))}))}},!!e.dataProvider.canI("FileRemove")&&{icon:"bin",title:"Delete",exec:function(){return(0,o.__awaiter)(void 0,void 0,void 0,(function(){var t;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,(0,p.deleteFile)(e,g("data-name"),g("data-source"))];case 1:return n.sent(),[3,3];case 2:return t=n.sent(),[2,e.status(t)];case 3:return e.state.activeElements=[],[2,(0,f.loadTree)(e).catch(e.status)]}}))}))}},!!m.preview&&{icon:"eye",title:"Preview",exec:function(){var t=new r.Dialog({fullsize:e.o.fullsize,language:e.o.language,buttons:["fullsize","dialog.close"]}),n=e.c.div(h,'<div class="jodit-icon_loader"></div>'),o=e.c.div(h+"__box"),s=e.c.fromHTML(v()),u=e.c.fromHTML(v("prev","left")),c=function(r){var a=e.c.element("img");a.setAttribute("src",r);var c=function(){var r;e.isInDestruct||(e.e.off(a,"load"),i.Dom.detach(n),m.showPreviewNavigation&&(i.Dom.prevWithClass(l,e.files.getFullElName("item"))&&n.appendChild(u),i.Dom.nextWithClass(l,e.files.getFullElName("item"))&&n.appendChild(s)),n.appendChild(o),o.appendChild(a),t.setPosition(),null===(r=null==e?void 0:e.events)||void 0===r||r.fire("previewOpenedAndLoaded"))};e.e.on(a,"load",c),a.complete&&c()};e.e.on([s,u],"click",(function(){if(!(l=this===s?i.Dom.nextWithClass(l,e.files.getFullElName("item")):i.Dom.prevWithClass(l,e.files.getFullElName("item"))))throw(0,a.error)("Need element");i.Dom.detach(n),i.Dom.detach(o),n.innerHTML='<div class="jodit-icon_loader"></div>',c(g("href"))})),e.e.on("beforeDestruct",(function(){t.destruct()})),t.container.classList.add(h+"__dialog"),t.setContent(n),t.setPosition(),t.open(),c(g("href")),e.events.on("beforeDestruct",(function(){t.destruct()})).fire("previewOpened")}},{icon:"upload",title:"Download",exec:function(){var t=g("href");t&&e.ow.open(t)}}]))}),e.defaultTimeout),e.e.on("beforeClose",(function(){return t.close()})).on("beforeDestruct",(function(){return t.destruct()})),n.stopPropagation(),n.preventDefault(),!1}}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.openImageEditor=t.ImageEditor=void 0;var o=n(1);n(228);var r=n(87),i=n(16),a=n(189),s=n(5),l=n(21),u=n(126),c=n(229),d=n(32);n(230);var f="jodit-image-editor",p="resize",h="crop",v=function(e){function t(t){var o=e.call(this,t)||this;o.resizeUseRatio=!0,o.cropUseRatio=!0,o.clicked=!1,o.start_x=0,o.start_y=0,o.top_x=0,o.top_y=0,o.width=0,o.height=0,o.activeTab=p,o.naturalWidth=0,o.naturalHeight=0,o.ratio=0,o.new_h=0,o.new_w=0,o.diff_x=0,o.diff_y=0,o.cropBox={x:0,y:0,w:0,h:0},o.resizeBox={w:0,h:0},o.calcCropBox=function(){var e=o.crop_box.parentNode,t=.8*e.offsetWidth,n=.8*e.offsetHeight,r=t,i=n,a=o.naturalWidth,l=o.naturalHeight;t>a&&n>l?(r=a,i=l):o.ratio>t/n?(r=t,i=l*(t/a)):(r=a*(n/l),i=n),(0,s.css)(o.crop_box,{width:r,height:i})},o.showCrop=function(){if(o.cropImage){o.calcCropBox();var e=o.cropImage.offsetWidth||o.image.offsetWidth||o.image.naturalWidth;o.new_w=n.calcValueByPercent(e,o.o.cropDefaultWidth);var t=o.cropImage.offsetHeight||o.image.offsetHeight||o.image.naturalHeight;o.new_h=o.cropUseRatio?o.new_w/o.ratio:n.calcValueByPercent(t,o.o.cropDefaultHeight),(0,s.css)(o.cropHandler,{backgroundImage:"url("+(0,s.attr)(o.cropImage,"src")+")",width:o.new_w,height:o.new_h,left:e/2-o.new_w/2,top:t/2-o.new_h/2}),o.j.e.fire(o.cropHandler,"updatesize")}},o.updateCropBox=function(){if(o.cropImage){var e=o.cropImage.offsetWidth/o.naturalWidth,t=o.cropImage.offsetHeight/o.naturalHeight;o.cropBox.x=(0,s.css)(o.cropHandler,"left")/e,o.cropBox.y=(0,s.css)(o.cropHandler,"top")/t,o.cropBox.w=o.cropHandler.offsetWidth/e,o.cropBox.h=o.cropHandler.offsetHeight/t,o.sizes.textContent=o.cropBox.w.toFixed(0)+"x"+o.cropBox.h.toFixed(0)}},o.updateResizeBox=function(){o.resizeBox.w=o.image.offsetWidth||o.naturalWidth,o.resizeBox.h=o.image.offsetHeight||o.naturalHeight},o.setHandlers=function(){var e=o,t=(0,s.refs)(o.editor),n=t.widthInput,r=t.heightInput;e.j.e.on([e.editor.querySelector(".jodit_bottomright"),e.cropHandler],"mousedown.".concat(f),o.onResizeHandleMouseDown).on(o.j.ow,"resize.".concat(f),(function(){o.j.e.fire(e.resizeHandler,"updatesize"),e.showCrop(),o.j.e.fire(e.cropHandler,"updatesize")})),e.j.e.on((0,s.toArray)(o.editor.querySelectorAll(".".concat(f,"__slider-title"))),"click",o.onTitleModeClick).on([n,r],"input",o.onChangeSizeInput);var i=(0,s.refs)(o.editor),l=i.keepAspectRatioResize,u=i.keepAspectRatioCrop;l&&l.addEventListener("change",(function(){o.resizeUseRatio=l.checked})),u&&u.addEventListener("change",(function(){o.cropUseRatio=u.checked})),e.j.e.on(e.resizeHandler,"updatesize",(function(){(0,s.css)(e.resizeHandler,{top:0,left:0,width:e.image.offsetWidth||e.naturalWidth,height:e.image.offsetHeight||e.naturalHeight}),o.updateResizeBox()})).on(e.cropHandler,"updatesize",(function(){if(e.cropImage){var t=(0,s.css)(e.cropHandler,"left"),n=(0,s.css)(e.cropHandler,"top"),o=e.cropHandler.offsetWidth,r=e.cropHandler.offsetHeight;0>t&&(t=0),0>n&&(n=0),t+o>e.cropImage.offsetWidth&&(o=e.cropImage.offsetWidth-t,e.cropUseRatio&&(r=o/e.ratio)),n+r>e.cropImage.offsetHeight&&(r=e.cropImage.offsetHeight-n,e.cropUseRatio&&(o=r*e.ratio)),(0,s.css)(e.cropHandler,{width:o,height:r,left:t,top:n,backgroundPosition:-t-1+"px "+(-n-1)+"px",backgroundSize:e.cropImage.offsetWidth+"px "+e.cropImage.offsetHeight+"px"}),e.updateCropBox()}})),Object.values(e.buttons).forEach((function(t){t.onAction((function(){var i={action:e.activeTab,box:e.activeTab===p?e.resizeBox:e.cropBox};switch(t){case e.buttons.saveas:(0,a.Prompt)(e.j.i18n("Enter new name"),e.j.i18n("Save in new file"),(function(t){if(!(0,s.trim)(t))return(0,a.Alert)(e.j.i18n("The name should not be empty")).bindDestruct(o.j),!1;e.onSave(t,i,e.hide,(function(t){(0,a.Alert)(t.message).bindDestruct(e.j)}))})).bindDestruct(o.j);break;case e.buttons.save:e.onSave(void 0,i,e.hide,(function(t){(0,a.Alert)(t.message).bindDestruct(e.j)}));break;case e.buttons.reset:e.activeTab===p?((0,s.css)(e.image,{width:null,height:null}),n.value=e.naturalWidth.toString(),r.value=e.naturalHeight.toString(),e.j.e.fire(e.resizeHandler,"updatesize")):e.showCrop()}}))}))},o.options=t&&t.o&&t.o.imageeditor?t.o.imageeditor:r.Config.defaultOptions.imageeditor;var i=o.options;o.resizeUseRatio=i.resizeUseRatio,o.cropUseRatio=i.cropUseRatio,o.buttons={reset:(0,u.Button)(o.j,"update","Reset"),save:(0,u.Button)(o.j,"save","Save"),saveas:(0,u.Button)(o.j,"save","Save as ...")},o.activeTab=i.resize?p:h,o.editor=(0,c.form)(o.j,o.options);var l=(0,s.refs)(o.editor),d=l.cropBox;return o.resize_box=l.resizeBox,o.crop_box=d,o.sizes=o.editor.querySelector(".".concat(f,"__area.").concat(f,"__area_crop .jodit-image-editor__sizes")),o.resizeHandler=o.editor.querySelector(".".concat(f,"__resizer")),o.cropHandler=o.editor.querySelector(".".concat(f,"__croper")),o.dialog=new a.Dialog({fullsize:o.j.o.fullsize,globalFullSize:o.j.o.globalFullSize,language:o.j.o.language,buttons:["fullsize","dialog.close"]}),o.dialog.setContent(o.editor),o.dialog.setSize(o.o.width,o.o.height),o.dialog.setHeader([o.buttons.reset,o.buttons.save,o.buttons.saveas]),o.setHandlers(),o}var n;return(0,o.__extends)(t,e),n=t,t.prototype.className=function(){return"ImageEditor"},t.prototype.onTitleModeClick=function(e){var t=this,n=e.target,o=null==n?void 0:n.parentElement;if(o){(0,s.$$)(".".concat(f,"__slider,.").concat(f,"__area"),t.editor).forEach((function(e){return e.classList.remove("".concat(f,"_active"))})),o.classList.add("".concat(f,"_active")),this.activeTab=(0,s.attr)(o,"-area")||p;var r=t.editor.querySelector(".".concat(f,"__area.").concat(f,"__area_")+t.activeTab);r&&r.classList.add("".concat(f,"_active")),t.activeTab===h&&t.showCrop()}},t.prototype.onChangeSizeInput=function(e){var t,n=this,o=e.target,r=(0,s.refs)(this.editor),i=r.widthInput,a=r.heightInput,l="widthInput"===(0,s.attr)(o,"data-ref"),u=parseInt(o.value,10),c=l?n.o.min_height:n.o.min_width;u>(l?n.o.min_width:n.o.min_height)&&((0,s.css)(n.image,l?"width":"height",u),n.resizeUseRatio&&(t=l?Math.round(u/n.ratio):Math.round(u*n.ratio))>c&&((0,s.css)(n.image,l?"height":"width",t),l?a.value=t.toString():i.value=t.toString())),this.j.e.fire(n.resizeHandler,"updatesize")},t.prototype.onResizeHandleMouseDown=function(e){var t=this;t.target=e.target,e.preventDefault(),e.stopImmediatePropagation(),t.clicked=!0,t.start_x=e.clientX,t.start_y=e.clientY,t.activeTab===h?(t.top_x=(0,s.css)(t.cropHandler,"left"),t.top_y=(0,s.css)(t.cropHandler,"top"),t.width=t.cropHandler.offsetWidth,t.height=t.cropHandler.offsetHeight):(t.width=t.image.offsetWidth,t.height=t.image.offsetHeight),t.j.e.on(this.j.ow,"mousemove",this.onGlobalMouseMove).one(this.j.ow,"mouseup",this.onGlobalMouseUp)},t.prototype.onGlobalMouseUp=function(e){this.clicked&&(this.clicked=!1,e.stopImmediatePropagation(),this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove))},t.prototype.onGlobalMouseMove=function(e){var t=this;if(t.clicked){var n=(0,s.refs)(this.editor),o=n.widthInput,r=n.heightInput;t.diff_x=e.clientX-t.start_x,t.diff_y=e.clientY-t.start_y,t.activeTab===p&&t.resizeUseRatio||t.activeTab===h&&t.cropUseRatio?t.diff_x?(t.new_w=t.width+t.diff_x,t.new_h=Math.round(t.new_w/t.ratio)):(t.new_h=t.height+t.diff_y,t.new_w=Math.round(t.new_h*t.ratio)):(t.new_w=t.width+t.diff_x,t.new_h=t.height+t.diff_y),t.activeTab===p?(t.new_w>t.o.resizeMinWidth&&((0,s.css)(t.image,"width",t.new_w+"px"),o.value=t.new_w.toString()),t.new_h>t.o.resizeMinHeight&&((0,s.css)(t.image,"height",t.new_h+"px"),r.value=t.new_h.toString()),this.j.e.fire(t.resizeHandler,"updatesize")):(t.target!==t.cropHandler?(t.top_x+t.new_w>t.cropImage.offsetWidth&&(t.new_w=t.cropImage.offsetWidth-t.top_x),t.top_y+t.new_h>t.cropImage.offsetHeight&&(t.new_h=t.cropImage.offsetHeight-t.top_y),(0,s.css)(t.cropHandler,{width:t.new_w,height:t.new_h})):(t.top_x+t.diff_x+t.cropHandler.offsetWidth>t.cropImage.offsetWidth&&(t.diff_x=t.cropImage.offsetWidth-t.top_x-t.cropHandler.offsetWidth),(0,s.css)(t.cropHandler,"left",t.top_x+t.diff_x),t.top_y+t.diff_y+t.cropHandler.offsetHeight>t.cropImage.offsetHeight&&(t.diff_y=t.cropImage.offsetHeight-t.top_y-t.cropHandler.offsetHeight),(0,s.css)(t.cropHandler,"top",t.top_y+t.diff_y)),this.j.e.fire(t.cropHandler,"updatesize"))}},Object.defineProperty(t.prototype,"o",{get:function(){return this.options},enumerable:!1,configurable:!0}),t.prototype.hide=function(){this.dialog.close()},t.prototype.open=function(e,t){var n=this;return this.j.async.promise((function(o){var r=(new Date).getTime();n.image=n.j.c.element("img"),(0,s.$$)("img,.jodit-icon_loader",n.resize_box).forEach(l.Dom.safeRemove),(0,s.$$)("img,.jodit-icon_loader",n.crop_box).forEach(l.Dom.safeRemove),(0,s.css)(n.cropHandler,"background","transparent"),n.onSave=t,n.resize_box.appendChild(n.j.c.element("i",{class:"jodit-icon_loader"})),n.crop_box.appendChild(n.j.c.element("i",{class:"jodit-icon_loader"})),/\?/.test(e)?e+="&_tst="+r:e+="?_tst="+r,n.image.setAttribute("src",e),n.dialog.open();var i=(0,s.refs)(n.editor),a=i.widthInput,u=i.heightInput,c=function(){n.isDestructed||(n.image.removeEventListener("load",c),n.naturalWidth=n.image.naturalWidth,n.naturalHeight=n.image.naturalHeight,a.value=n.naturalWidth.toString(),u.value=n.naturalHeight.toString(),n.ratio=n.naturalWidth/n.naturalHeight,n.resize_box.appendChild(n.image),n.cropImage=n.image.cloneNode(!0),n.crop_box.appendChild(n.cropImage),(0,s.$$)(".jodit-icon_loader",n.editor).forEach(l.Dom.safeRemove),n.activeTab===h&&n.showCrop(),n.j.e.fire(n.resizeHandler,"updatesize"),n.j.e.fire(n.cropHandler,"updatesize"),n.dialog.setPosition(),n.j.e.fire("afterImageEditor"),o(n.dialog))};n.image.addEventListener("load",c),n.image.complete&&c()}))},t.prototype.destruct=function(){this.isDestructed||(this.dialog&&!this.dialog.isInDestruct&&this.dialog.destruct(),l.Dom.safeRemove(this.editor),this.j.e&&this.j.e.off(this.j.ow,"mousemove",this.onGlobalMouseMove).off(this.j.ow,"mouseup",this.onGlobalMouseUp).off(this.ow,".".concat(f)).off(".".concat(f)),e.prototype.destruct.call(this))},t.calcValueByPercent=function(e,t){var n,o=t.toString(),r=parseFloat(e.toString());return(n=/^[-+]?[0-9]+(px)?$/.exec(o))?parseInt(o,10):(n=/^([-+]?[0-9.]+)%$/.exec(o))?Math.round(r*(parseFloat(n[1])/100)):r||0},(0,o.__decorate)([d.autobind],t.prototype,"onTitleModeClick",null),(0,o.__decorate)([(0,d.debounce)(),d.autobind],t.prototype,"onChangeSizeInput",null),(0,o.__decorate)([d.autobind],t.prototype,"onResizeHandleMouseDown",null),(0,o.__decorate)([d.autobind],t.prototype,"onGlobalMouseUp",null),(0,o.__decorate)([(0,d.throttle)(10)],t.prototype,"onGlobalMouseMove",null),(0,o.__decorate)([d.autobind],t.prototype,"hide",null),(0,o.__decorate)([d.autobind],t.prototype,"open",null),n=(0,o.__decorate)([d.component],t)}(i.ViewComponent);t.ImageEditor=v,t.openImageEditor=function(e,t,n,o,r,i){var a=this;return this.getInstance("ImageEditor",this.o).open(e,(function(e,l,u,c){return(0,s.call)("resize"===l.action?a.dataProvider.resize:a.dataProvider.crop,n,o,t,e,l.box).then((function(e){e&&(u(),r&&r())})).catch((function(e){c(e),i&&i(e)}))}))}},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.form=void 0;var o=n(120),r="jodit-image-editor",i=o.Icon.get.bind(o.Icon),a=function(e,t){return void 0===t&&(t="jodti-image-editor_active"),e?t:""};t.form=function(e,t){var n=e.i18n.bind(e),o=function(e,t,o){return void 0===o&&(o=!0),'<div class="jodit-form__group">\n\t\t\t<label>'.concat(n(e),"</label>\n\n\t\t\t<label class='jodit-switcher'>\n\t\t\t\t<input ").concat(a(o,"checked"),' data-ref="').concat(t,'" type="checkbox"/>\n\t\t\t\t<span class="jodit-switcher__slider"></span>\n\t\t\t</label>\n\t</div>')};return e.create.fromHTML('<form class="'.concat(r,' jodit-properties">\n\t\t<div class="jodit-grid jodit-grid_xs-column">\n\t\t\t<div class="jodit_col-lg-3-4 jodit_col-sm-5-5">\n\t\t\t').concat(t.resize?'<div class="'.concat(r,"__area ").concat(r,"__area_resize ").concat(r,'_active">\n\t\t\t\t\t\t\t<div data-ref="resizeBox" class="').concat(r,'__box"></div>\n\t\t\t\t\t\t\t<div class="').concat(r,'__resizer">\n\t\t\t\t\t\t\t\t<i class="jodit_bottomright"></i>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>'):"","\n\t\t\t").concat(t.crop?'<div class="'.concat(r,"__area ").concat(r,"__area_crop ").concat(a(!t.resize),'">\n\t\t\t\t\t\t\t<div data-ref="cropBox" class="').concat(r,'__box">\n\t\t\t\t\t\t\t\t<div class="').concat(r,'__croper">\n\t\t\t\t\t\t\t\t\t<i class="jodit_bottomright"></i>\n\t\t\t\t\t\t\t\t\t<i class="').concat(r,'__sizes"></i>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>'):"",'\n\t\t\t</div>\n\t\t\t<div class="jodit_col-lg-1-4 jodit_col-sm-5-5">\n\t\t\t').concat(t.resize?'<div data-area="resize" class="'.concat(r,"__slider ").concat(r,'_active">\n\t\t\t\t\t\t\t<div class="').concat(r,'__slider-title">\n\t\t\t\t\t\t\t\t').concat(i("resize"),"\n\t\t\t\t\t\t\t\t").concat(n("Resize"),'\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="').concat(r,'__slider-content">\n\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t').concat(n("Width"),'\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<input type="number" data-ref="widthInput" class="jodit-input"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t<div class="jodit-form__group">\n\t\t\t\t\t\t\t\t\t<label>\n\t\t\t\t\t\t\t\t\t\t').concat(n("Height"),'\n\t\t\t\t\t\t\t\t\t</label>\n\t\t\t\t\t\t\t\t\t<input type="number" data-ref="heightInput" class="jodit-input"/>\n\t\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t\t').concat(o("Keep Aspect Ratio","keepAspectRatioResize"),"\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>"):"","\n\t\t\t").concat(t.crop?'<div data-area="crop" class="'.concat(r,"__slider ").concat(a(!t.resize),'\'">\n\t\t\t\t\t\t\t<div class="').concat(r,'__slider-title">\n\t\t\t\t\t\t\t\t').concat(i("crop"),"\n\t\t\t\t\t\t\t\t").concat(n("Crop"),'\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="').concat(r,'__slider-content">\n\t\t\t\t\t\t\t\t').concat(o("Keep Aspect Ratio","keepAspectRatioCrop"),"\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>"):"","\n\t\t\t</div>\n\t\t</div>\n\t</form>"))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),n(87).Config.prototype.imageeditor={min_width:20,min_height:20,closeAfterSave:!1,width:"85%",height:"85%",crop:!0,resize:!0,resizeUseRatio:!0,resizeMinWidth:20,resizeMinHeight:20,cropUseRatio:!0,cropDefaultWidth:"70%",cropDefaultHeight:"70%"}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.deleteFile=void 0,t.deleteFile=function(e,t,n){return e.dataProvider.fileRemove(e.state.currentPath,t,n).then((function(n){e.status(n||e.i18n('File "%s" was deleted',t),!0)})).catch(e.status)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.selfListeners=void 0;var o=n(1),r=n(189),i=n(36),a=n(5),s=n(219),l=n(227),u=n(223),c=n(224),d=n(231);t.selfListeners=function(){var e=this,t=this.state,n=this.dataProvider,f=this;f.e.on("view.filebrowser",(function(e){e!==t.view&&(t.view=e)})).on("sort.filebrowser",(function(e){e!==t.sortBy&&(t.sortBy=e,(0,c.loadItems)(f).catch(f.status))})).on("filter.filebrowser",(function(e){e!==t.filterWord&&(t.filterWord=e,(0,c.loadItems)(f).catch(f.status))})).on("openFolder.filebrowser",(function(e){var t;t=".."===e.name?e.path.split("/").filter((function(e){return e.length})).slice(0,-1).join("/"):(0,a.normalizePath)(e.path,e.name),f.state.currentPath=t,f.state.currentSource="."===e.name?s.DEFAULT_SOURCE_NAME:e.source})).on("removeFolder.filebrowser",(function(e){(0,r.Confirm)(f.i18n("Are you sure?"),f.i18n("Delete"),(function(t){t&&n.folderRemove(e.path,e.name,e.source).then((function(e){return f.status(e,!0),(0,u.loadTree)(f)})).catch(f.status)})).bindDestruct(f)})).on("renameFolder.filebrowser",(function(e){(0,r.Prompt)(f.i18n("Enter new name"),f.i18n("Rename"),(function(t){if(!(0,i.isValidName)(t))return f.status(f.i18n("Enter new name")),!1;n.folderRename(e.path,e.name,t,e.source).then((function(e){return f.state.activeElements=[],f.status(e,!0),(0,u.loadTree)(f)})).catch(f.status)}),f.i18n("type name"),e.name).bindDestruct(f)})).on("addFolder.filebrowser",(function(e){(0,r.Prompt)(f.i18n("Enter Directory name"),f.i18n("Create directory"),(function(t){n.createFolder(t,e.path,e.source).then((function(){return(0,u.loadTree)(f)})).catch(f.status)}),f.i18n("type name")).bindDestruct(f)})).on("fileRemove.filebrowser",(function(){f.state.activeElements.length&&(0,r.Confirm)(f.i18n("Are you sure?"),"",(function(e){if(e){var t=[];f.state.activeElements.forEach((function(e){t.push((0,d.deleteFile)(f,e.file||e.name||"",e.sourceName))})),f.state.activeElements=[],Promise.all(t).then((function(){return(0,u.loadTree)(f).catch(f.status)}),f.status)}})).bindDestruct(f)})).on("edit.filebrowser",(function(){if(1===f.state.activeElements.length){var t=(0,o.__read)(e.state.activeElements,1)[0];l.openImageEditor.call(f,t.fileURL,t.file||"",t.path,t.sourceName)}})).on("fileRename.filebrowser",(function(t,o,a){1===f.state.activeElements.length&&(0,r.Prompt)(f.i18n("Enter new name"),f.i18n("Rename"),(function(e){if(!(0,i.isValidName)(e))return f.status(f.i18n("Enter new name")),!1;n.fileRename(o,t,e,a).then((function(e){f.state.activeElements=[],f.status(e,!0),(0,c.loadItems)(f).catch(f.status)})).catch(f.status)}),f.i18n("type name"),t).bindDestruct(e)})).on("update.filebrowser",(function(){(0,u.loadTree)(e).then(e.status)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(234),t),(0,o.__exportStar)(n(236),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserFiles=void 0;var o=n(1);n(235);var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t.prototype.className=function(){return"FilebrowserFiles"},t}(n(120).UIGroup);t.FileBrowserFiles=r},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FileBrowserTree=void 0;var o=n(1);n(237);var r=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,o.__extends)(t,e),t.prototype.className=function(){return"FilebrowserTree"},t}(n(120).UIGroup);t.FileBrowserTree=r},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Observer=void 0;var o=n(1),r=n(87),i=n(16),a=n(239),s=n(240),l=n(241),u=n(32);r.Config.prototype.observer={maxHistoryLength:1/0,timeout:100};var c=function(e){function t(t){var n=e.call(this,t)||this;return n.stack=new s.Stack(n.j.o.observer.maxHistoryLength),n.snapshot=new a.Snapshot(n.j),n.updateTick=0,t.e.on("afterAddPlace.observer",(function(){n.isInDestruct||(n.startValue=n.snapshot.make(),t.events.on("internalChange",(function(){n.startValue=n.snapshot.make()})).on(t.editor,["changeSelection","selectionstart","selectionchange","mousedown","mouseup","keydown","keyup"].map((function(e){return e+".observer"})).join(" "),(function(){n.startValue.html===n.j.getNativeEditorValue()&&(n.startValue=n.snapshot.make())})).on(n,"change.observer",n.onChange))})),n}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Observer"},Object.defineProperty(t.prototype,"startValue",{get:function(){return this.__startValue},set:function(e){this.__startValue=e},enumerable:!1,configurable:!0}),t.prototype.upTick=function(){this.updateTick+=1},t.prototype.onChange=function(){this.snapshot.isBlocked||this.updateStack()},t.prototype.updateStack=function(e){void 0===e&&(e=!1);var t=this.snapshot.make();if(!a.Snapshot.equal(t,this.startValue)){var n=new l.Command(this.startValue,t,this,this.updateTick);if(e){var o=this.stack.current();o&&this.updateTick===o.tick&&this.stack.replace(n)}else this.stack.push(n);this.startValue=t,this.fireChangeStack()}},t.prototype.redo=function(){this.stack.redo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())},t.prototype.undo=function(){this.stack.undo()&&(this.startValue=this.snapshot.make(),this.fireChangeStack())},t.prototype.clear=function(){this.startValue=this.snapshot.make(),this.stack.clear(),this.fireChangeStack()},t.prototype.replaceSnapshot=function(){this.updateStack(!0)},t.prototype.fireChangeStack=function(){var e;this.j&&!this.j.isInDestruct&&(null===(e=this.j.events)||void 0===e||e.fire("changeStack"))},t.prototype.destruct=function(){this.j.events&&this.j.e.off(".observer"),this.snapshot.destruct(),e.prototype.destruct.call(this)},(0,o.__decorate)([(0,u.debounce)()],t.prototype,"onChange",null),t}(i.ViewComponent);t.Observer=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Snapshot=void 0;var o=n(1),r=n(16),i=n(21),a=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.isBlocked=!1,t}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Snapshot"},t.equal=function(e,t){return e.html===t.html&&JSON.stringify(e.range)===JSON.stringify(t.range)},t.countNodesBeforeInParent=function(e){if(!e.parentNode)return 0;var t,n=e.parentNode.childNodes,o=0,r=null;for(t=0;n.length>t;t+=1){if(!r||i.Dom.isText(n[t])&&""===n[t].textContent||i.Dom.isText(r)&&i.Dom.isText(n[t])||(o+=1),n[t]===e)return o;r=n[t]}return 0},t.strokeOffset=function(e,t){for(;i.Dom.isText(e);)i.Dom.isText(e=e.previousSibling)&&null!=e.textContent&&(t+=e.textContent.length);return t},t.prototype.calcHierarchyLadder=function(e){var n=[];if(!e||!e.parentNode||!i.Dom.isOrContains(this.j.editor,e))return[];for(;e&&e!==this.j.editor;)e&&n.push(t.countNodesBeforeInParent(e)),e=e.parentNode;return n.reverse()},t.prototype.getElementByLadder=function(e){var t,n=this.j.editor;for(t=0;n&&e.length>t;t+=1)n=n.childNodes[e[t]];return n},t.prototype.make=function(){var e={html:"",range:{startContainer:[],startOffset:0,endContainer:[],endOffset:0}};e.html=this.j.getNativeEditorValue();var n=this.j.s.sel;if(n&&n.rangeCount){var o=n.getRangeAt(0),r=this.calcHierarchyLadder(o.startContainer),i=this.calcHierarchyLadder(o.endContainer),a=t.strokeOffset(o.startContainer,o.startOffset),s=t.strokeOffset(o.endContainer,o.endOffset);r.length||o.startContainer===this.j.editor||(a=0),i.length||o.endContainer===this.j.editor||(s=0),e.range={startContainer:r,startOffset:a,endContainer:i,endOffset:s}}return e},t.prototype.restore=function(e){this.isBlocked=!0;var t=this.storeScrollState();this.j.getNativeEditorValue()!==e.html&&this.j.setEditorValue(e.html),this.restoreOnlySelection(e),this.restoreScrollState(t),this.isBlocked=!1},t.prototype.storeScrollState=function(){return[this.j.ow.scrollY,this.j.editor.scrollTop]},t.prototype.restoreScrollState=function(e){var t=this.j,n=t.ow;n.scrollTo(n.scrollX,e[0]),t.editor.scrollTop=e[1]},t.prototype.restoreOnlySelection=function(e){try{if(e.range){var t=this.j.ed.createRange();t.setStart(this.getElementByLadder(e.range.startContainer),e.range.startOffset),t.setEnd(this.getElementByLadder(e.range.endContainer),e.range.endOffset),this.j.s.selectRange(t)}}catch(e){this.j.editor.lastChild&&this.j.s.setCursorAfter(this.j.editor.lastChild)}},t.prototype.destruct=function(){this.isBlocked=!1,e.prototype.destruct.call(this)},t}(r.ViewComponent);t.Snapshot=a},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Stack=void 0;var n=function(){function e(e){this.size=e,this.commands=[],this.stackPosition=-1}return Object.defineProperty(e.prototype,"length",{get:function(){return this.commands.length},enumerable:!1,configurable:!0}),e.prototype.clearRedo=function(){this.commands.length=this.stackPosition+1},e.prototype.clear=function(){this.commands.length=0,this.stackPosition=-1},e.prototype.push=function(e){this.clearRedo(),this.commands.push(e),this.stackPosition+=1,this.commands.length>this.size&&(this.commands.shift(),this.stackPosition-=1)},e.prototype.replace=function(e){this.commands[this.stackPosition]=e},e.prototype.current=function(){return this.commands[this.stackPosition]},e.prototype.undo=function(){return!!this.canUndo()&&(this.commands[this.stackPosition]&&this.commands[this.stackPosition].undo(),this.stackPosition-=1,!0)},e.prototype.redo=function(){return!!this.canRedo()&&(this.stackPosition+=1,this.commands[this.stackPosition]&&this.commands[this.stackPosition].redo(),!0)},e.prototype.canUndo=function(){return this.stackPosition>=0},e.prototype.canRedo=function(){return this.commands.length-1>this.stackPosition},e}();t.Stack=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.Command=void 0;var n=function(){function e(e,t,n,o){this.oldValue=e,this.newValue=t,this.observer=n,this.tick=o}return e.prototype.undo=function(){this.observer.snapshot.restore(this.oldValue)},e.prototype.redo=function(){this.observer.snapshot.restore(this.newValue)},e}();t.Command=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.StatusBar=void 0;var o=n(1);n(243);var r=n(16),i=n(21),a=n(122),s=n(32),l=function(e){function t(t,n){var o=e.call(this,t)||this;return o.target=n,o.mods={},o.container=t.c.div("jodit-status-bar"),n.appendChild(o.container),o.hide(),o}return(0,o.__extends)(t,e),t.prototype.className=function(){return"StatusBar"},t.prototype.hide=function(){this.container.classList.add("jodit_hidden")},t.prototype.show=function(){this.container.classList.remove("jodit_hidden")},Object.defineProperty(t.prototype,"isShown",{get:function(){return!this.container.classList.contains("jodit_hidden")},enumerable:!1,configurable:!0}),t.prototype.setMod=function(e,t){return a.Mods.setMod.call(this,e,t),this},t.prototype.getMod=function(e){return a.Mods.getMod.call(this,e)},t.prototype.getHeight=function(){var e,t;return null!==(t=null===(e=this.container)||void 0===e?void 0:e.offsetHeight)&&void 0!==t?t:0},t.prototype.findEmpty=function(e){void 0===e&&(e=!1);for(var t=a.Elms.getElms.call(this,e?"item-right":"item"),n=0;t.length>n;n+=1)if(!t[n].innerHTML.trim().length)return t[n]},t.prototype.append=function(e,t){var n;void 0===t&&(t=!1);var o=this.findEmpty(t)||this.j.c.div(this.getFullElName("item"));t&&o.classList.add(this.getFullElName("item-right")),o.appendChild(e),null===(n=this.container)||void 0===n||n.appendChild(o),this.j.o.statusbar&&this.show(),this.j.e.fire("resize")},t.prototype.destruct=function(){this.setStatus(r.STATUSES.beforeDestruct),i.Dom.safeRemove(this.container),e.prototype.destruct.call(this)},(0,o.__decorate)([s.component],t)}(r.ViewComponent);t.StatusBar=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Table=void 0;var o=n(1),r=n(23),i=n(21),a=n(5),s=n(16),l=n(19),u=n(32),c=new WeakMap,d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.selected=new Set,t}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Table"},t.prototype.recalculateStyles=function(){var e=(0,l.getContainer)(this.j,t,"style",!0),n=[];this.selected.forEach((function(e){var t=(0,a.cssPath)(e);t&&n.push(t)})),e.innerHTML=n.length?n.join(",")+"{".concat(this.jodit.options.table.selectionCellStyle,"}"):""},t.prototype.addSelection=function(e){this.selected.add(e),this.recalculateStyles();var n=i.Dom.closest(e,"table",this.j.editor);if(n){var o=t.selectedByTable.get(n)||new Set;o.add(e),t.selectedByTable.set(n,o)}},t.prototype.removeSelection=function(e){this.selected.delete(e),this.recalculateStyles();var n=i.Dom.closest(e,"table",this.j.editor);if(n){var o=t.selectedByTable.get(n);o&&(o.delete(e),o.size||t.selectedByTable.delete(n))}},t.prototype.getAllSelectedCells=function(){return(0,a.toArray)(this.selected)},t.getSelectedCellsByTable=function(e){var n=t.selectedByTable.get(e);return n?(0,a.toArray)(n):[]},t.prototype.destruct=function(){return this.selected.clear(),e.prototype.destruct.call(this)},t.getRowsCount=function(e){return e.rows.length},t.getColumnsCount=function(e){return t.formalMatrix(e).reduce((function(e,t){return Math.max(e,t.length)}),0)},t.formalMatrix=function(e,t){for(var n=[[]],o=(0,a.toArray)(e.rows),r=function(e,o){void 0===n[o]&&(n[o]=[]);for(var r,i,a=e.colSpan,s=e.rowSpan,l=0;n[o][l];)l+=1;for(i=0;s>i;i+=1)for(r=0;a>r;r+=1){if(void 0===n[o+i]&&(n[o+i]=[]),t&&!1===t(e,o+i,l+r,a,s))return!1;n[o+i][l+r]=e}},i=0;o.length>i;i+=1)for(var s=(0,a.toArray)(o[i].cells),l=0;s.length>l;l+=1)if(!1===r(s[l],i))return n;return n},t.formalCoordinate=function(e,n,o){void 0===o&&(o=!1);var r=0,i=0,a=1,s=1;return t.formalMatrix(e,(function(e,t,l,u,c){if(n===e)return r=t,i=l,a=u||1,s=c||1,o&&(i+=(u||1)-1,r+=(c||1)-1),!1})),[r,i,a,s]},t.appendRow=function(e,n,o,r){var i,s;if(n)s=n.cloneNode(!0),(0,a.$$)("td,th",n).forEach((function(e){var t=(0,a.attr)(e,"rowspan");if(t&&parseInt(t,10)>1){var n=parseInt(t,10)-1;(0,a.attr)(e,"rowspan",n>1?n:null)}})),(0,a.$$)("td,th",s).forEach((function(e){e.innerHTML=""}));else{var l=t.getColumnsCount(e);s=r.element("tr");for(var u=0;l>u;u+=1)s.appendChild(r.element("td"))}o&&n&&n.nextSibling?n.parentNode&&n.parentNode.insertBefore(s,n.nextSibling):!o&&n?n.parentNode&&n.parentNode.insertBefore(s,n):((null===(i=e.getElementsByTagName("tbody"))||void 0===i?void 0:i[0])||e).appendChild(s)},t.removeRow=function(e,n){var o,r=t.formalMatrix(e),s=e.rows[n];r[n].forEach((function(t,l){if(o=!1,0>n-1||r[n-1][l]!==t)if(r[n+1]&&r[n+1][l]===t){if(t.parentNode===s&&t.parentNode.nextSibling){o=!0;for(var u=l+1;r[n+1][u]===t;)u+=1;var c=i.Dom.next(t.parentNode,(function(e){return i.Dom.isTag(e,"tr")}),e);c&&(r[n+1][u]?c.insertBefore(t,r[n+1][u]):c.appendChild(t))}}else i.Dom.safeRemove(t);else o=!0;if(o&&(t.parentNode===s||t!==r[n][l-1])){var d=t.rowSpan;(0,a.attr)(t,"rowspan",d-1>1?d-1:null)}})),i.Dom.safeRemove(s)},t.appendColumn=function(e,n,o,r){var s,l=t.formalMatrix(e);for((void 0===n||0>n)&&(n=t.getColumnsCount(e)-1),s=0;l.length>s;s+=1){var u=r.element("td"),c=l[s][n],d=!1;o?(l[s]&&c&&n+1>=l[s].length||c!==l[s][n+1])&&(c.nextSibling?i.Dom.before(c.nextSibling,u):c.parentNode&&c.parentNode.appendChild(u),d=!0):(0>n-1||l[s][n]!==l[s][n-1]&&l[s][n].parentNode)&&(i.Dom.before(l[s][n],u),d=!0),d||(0,a.attr)(l[s][n],"colspan",parseInt((0,a.attr)(l[s][n],"colspan")||"1",10)+1)}},t.removeColumn=function(e,n){var o,r=t.formalMatrix(e);r.forEach((function(e,t){var s=e[n];if(o=!1,0>n-1||r[t][n-1]!==s?e.length>n+1&&r[t][n+1]===s?o=!0:i.Dom.safeRemove(s):o=!0,o&&(0>t-1||s!==r[t-1][n])){var l=s.colSpan;(0,a.attr)(s,"colspan",l-1>1?(l-1).toString():null)}}))},t.getSelectedBound=function(e,n){var o,r,i,a=[[1/0,1/0],[0,0]],s=t.formalMatrix(e);for(o=0;s.length>o;o+=1)for(r=0;s[o]&&s[o].length>r;r+=1)n.includes(s[o][r])&&(a[0][0]=Math.min(o,a[0][0]),a[0][1]=Math.min(r,a[0][1]),a[1][0]=Math.max(o,a[1][0]),a[1][1]=Math.max(r,a[1][1]));for(o=a[0][0];a[1][0]>=o;o+=1)for(i=1,r=a[0][1];a[1][1]>=r;r+=1){for(;s[o]&&s[o][r-i]&&s[o][r]===s[o][r-i];)a[0][1]=Math.min(r-i,a[0][1]),a[1][1]=Math.max(r-i,a[1][1]),i+=1;for(i=1;s[o]&&s[o][r+i]&&s[o][r]===s[o][r+i];)a[0][1]=Math.min(r+i,a[0][1]),a[1][1]=Math.max(r+i,a[1][1]),i+=1;for(i=1;s[o-i]&&s[o][r]===s[o-i][r];)a[0][0]=Math.min(o-i,a[0][0]),a[1][0]=Math.max(o-i,a[1][0]),i+=1;for(i=1;s[o+i]&&s[o][r]===s[o+i][r];)a[0][0]=Math.min(o+i,a[0][0]),a[1][0]=Math.max(o+i,a[1][0]),i+=1}return a},t.normalizeTable=function(e){var n,o,r,i,s=[],l=t.formalMatrix(e);for(o=0;l[0].length>o;o+=1){for(r=1e6,i=!1,n=0;l.length>n;n+=1)if(void 0!==l[n][o]){if(2>l[n][o].colSpan){i=!0;break}r=Math.min(r,l[n][o].colSpan)}if(!i)for(n=0;l.length>n;n+=1)void 0!==l[n][o]&&t.mark(l[n][o],"colspan",l[n][o].colSpan-r+1,s)}for(n=0;l.length>n;n+=1){for(r=1e6,i=!1,o=0;l[n].length>o;o+=1)if(void 0!==l[n][o]){if(2>l[n][o].rowSpan){i=!0;break}r=Math.min(r,l[n][o].rowSpan)}if(!i)for(o=0;l[n].length>o;o+=1)void 0!==l[n][o]&&t.mark(l[n][o],"rowspan",l[n][o].rowSpan-r+1,s)}for(n=0;l.length>n;n+=1)for(o=0;l[n].length>o;o+=1)void 0!==l[n][o]&&(l[n][o].hasAttribute("rowspan")&&1===l[n][o].rowSpan&&(0,a.attr)(l[n][o],"rowspan",null),l[n][o].hasAttribute("colspan")&&1===l[n][o].colSpan&&(0,a.attr)(l[n][o],"colspan",null),l[n][o].hasAttribute("class")&&!(0,a.attr)(l[n][o],"class")&&(0,a.attr)(l[n][o],"class",null));t.unmark(s)},t.mergeSelected=function(e,n){var o,s=[],l=t.getSelectedBound(e,t.getSelectedCellsByTable(e)),u=0,c=null,d=0,p=0,h=0,v=new Set,m=[];l&&(l[0][0]-l[1][0]||l[0][1]-l[1][1])&&(t.formalMatrix(e,(function(e,r,i,g,_){if(!(l[0][0]>r||r>l[1][0]||l[0][1]>i||i>l[1][1])){if(v.has(o=e))return;v.add(o),r===l[0][0]&&o.style.width&&(u+=o.offsetWidth),""!==(0,a.trim)(e.innerHTML.replace(/<br(\/)?>/g,""))&&s.push(e.innerHTML),g>1&&(p+=g-1),_>1&&(h+=_-1),c?(t.mark(o,"remove",1,m),f(n).removeSelection(o)):(c=e,d=i)}})),p=l[1][1]-l[0][1]+1,h=l[1][0]-l[0][0]+1,c&&(p>1&&t.mark(c,"colspan",p,m),h>1&&t.mark(c,"rowspan",h,m),u&&(t.mark(c,"width",(u/e.offsetWidth*100).toFixed(r.ACCURACY)+"%",m),d&&t.setColumnWidthByDelta(e,d,0,!0,m)),c.innerHTML=s.join("<br/>"),f(n).addSelection(c),v.delete(c),t.unmark(m),t.normalizeTable(e),(0,a.toArray)(e.rows).forEach((function(e,t){e.cells.length||i.Dom.safeRemove(e)}))))},t.splitHorizontal=function(e,n){var o,r,a,s,l,u=[];t.getSelectedCellsByTable(e).forEach((function(c){(r=n.createInside.element("td")).appendChild(n.createInside.element("br")),a=n.createInside.element("tr"),o=t.formalCoordinate(e,c),2>c.rowSpan?(t.formalMatrix(e,(function(e,n,r){o[0]===n&&o[1]!==r&&e!==c&&t.mark(e,"rowspan",e.rowSpan+1,u)})),i.Dom.after(i.Dom.closest(c,"tr",e),a),a.appendChild(r)):(t.mark(c,"rowspan",c.rowSpan-1,u),t.formalMatrix(e,(function(t,n,r){n>o[0]&&o[0]+c.rowSpan>n&&o[1]>r&&t.parentNode.rowIndex===n&&(l=t),n>o[0]&&t===c&&(s=e.rows[n])})),l?i.Dom.after(l,r):s.insertBefore(r,s.firstChild)),c.colSpan>1&&t.mark(r,"colspan",c.colSpan,u),t.unmark(u),f(n).removeSelection(c)})),this.normalizeTable(e)},t.splitVertical=function(e,n){var o,a,s,l=[];t.getSelectedCellsByTable(e).forEach((function(u){o=t.formalCoordinate(e,u),2>u.colSpan?t.formalMatrix(e,(function(e,n,r){o[1]===r&&o[0]!==n&&e!==u&&t.mark(e,"colspan",e.colSpan+1,l)})):t.mark(u,"colspan",u.colSpan-1,l),(a=n.createInside.element("td")).appendChild(n.createInside.element("br")),u.rowSpan>1&&t.mark(a,"rowspan",u.rowSpan,l);var c=u.offsetWidth;i.Dom.after(u,a),t.mark(u,"width",(100*(s=c/e.offsetWidth/2)).toFixed(r.ACCURACY)+"%",l),t.mark(a,"width",(100*s).toFixed(r.ACCURACY)+"%",l),t.unmark(l),f(n).removeSelection(u)})),t.normalizeTable(e)},t.setColumnWidthByDelta=function(e,n,o,i,a){for(var s=t.formalMatrix(e),l=0,u=0;s.length>u;u+=1)if(1>=(c=s[u][n]).colSpan||1>=s.length){t.mark(c,"width",((c.offsetWidth+o)/e.offsetWidth*100).toFixed(r.ACCURACY)+"%",a),l=u;break}for(u=l+1;s.length>u;u+=1){var c;t.mark(c=s[u][n],"width",null,a)}i||t.unmark(a)},t.mark=function(e,t,n,o){var r;o.push(e);var i=null!==(r=c.get(e))&&void 0!==r?r:{};i[t]=void 0===n?1:n,c.set(e,i)},t.unmark=function(e){e.forEach((function(e){var t=c.get(e);t&&(Object.keys(t).forEach((function(n){var o=t[n];switch(n){case"remove":i.Dom.safeRemove(e);break;case"rowspan":(0,a.attr)(e,"rowspan",(0,a.isNumber)(o)&&o>1?o:null);break;case"colspan":(0,a.attr)(e,"colspan",(0,a.isNumber)(o)&&o>1?o:null);break;case"width":null==o?(e.style.removeProperty("width"),(0,a.attr)(e,"style")||(0,a.attr)(e,"style",null)):e.style.width=o.toString()}delete t[n]})),c.delete(e))}))},t.selectedByTable=new WeakMap,(0,o.__decorate)([(0,u.debounce)()],t.prototype,"recalculateStyles",null),t}(s.ViewComponent);t.Table=d;var f=function(e){return e.getInstance("Table",e.o)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1);(0,o.__exportStar)(n(203),t),(0,o.__exportStar)(n(205),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Uploader=void 0;var o=n(1);n(247);var r=n(87),i=n(23),a=n(5),s=n(16),l=n(248);n(254);var u=function(e){function t(t,n){var o=e.call(this,t)||this;return o.path="",o.source="default",o.options=(0,a.ConfigProto)(n||{},(0,a.ConfigProto)(r.Config.defaultOptions.uploader,(0,a.isJoditObject)(t)?t.o.uploader:{})),o}return(0,o.__extends)(t,e),t.prototype.className=function(){return"Uploader"},Object.defineProperty(t.prototype,"o",{get:function(){return this.options},enumerable:!1,configurable:!0}),t.prototype.setPath=function(e){return this.path=e,this},t.prototype.setSource=function(e){return this.source=e,this},t.prototype.bind=function(e,t,n){var o=function(){e.classList.remove("jodit_drag_hover")},r=this,a=function(e){var a,s,u,c=e.clipboardData,d=function(e){s&&(e.append("extension",u),e.append("mimetype",s.type))};if(!i.IS_IE&&(0,l.hasFiles)(c))return(0,l.sendFiles)(r,c.files,t,n).finally(o),!1;if(i.IS_IE)return(0,l.processOldBrowserDrag)(r,c,t,n,o);if((0,l.hasItems)(c)){var f=c.items;for(a=0;f.length>a;a+=1)if("file"===f[a].kind&&"image/png"===f[a].type){if(s=f[a].getAsFile()){var p=s.type.match(/\/([a-z0-9]+)/i);u=p[1]?p[1].toLowerCase():"",(0,l.sendFiles)(r,[s],t,n,d).finally(o)}e.preventDefault();break}}};r.j&&r.j.editor!==e?r.j.e.on(e,"paste",a):r.j.e.on("beforePaste",a),this.attachEvents(e,t,n,o)},t.prototype.attachEvents=function(e,t,n,o){var r=this;r.j.e.on(e,"dragend dragover dragenter dragleave drop",(function(e){e.preventDefault()})).on(e,"dragover",(function(t){((0,l.hasFiles)(t.dataTransfer)||(0,l.hasItems)(t.dataTransfer))&&(e.classList.add("jodit_drag_hover"),t.preventDefault())})).on(e,"dragend dragleave",(function(t){e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(t.dataTransfer)&&t.preventDefault()})).on(e,"drop",(function(i){e.classList.remove("jodit_drag_hover"),(0,l.hasFiles)(i.dataTransfer)&&(i.preventDefault(),i.stopImmediatePropagation(),(0,l.sendFiles)(r,i.dataTransfer.files,t,n).finally(o))}));var i=e.querySelector("input[type=file]");i&&r.j.e.on(i,"change",(function(){(0,l.sendFiles)(r,i.files,t,n).then((function(){i.value="",/safari/i.test(navigator.userAgent)||(i.type="",i.type="file")})).finally(o)}))},t.prototype.uploadRemoteImage=function(e,t,n){var o=this,r=o.o,i=(0,a.isFunction)(n)?n:r.defaultHandlerError;(0,l.send)(o,{action:"fileUploadRemote",url:e}).then((function(e){r.isSuccess.call(o,e)?((0,a.isFunction)(t)?t:r.defaultHandlerSuccess).call(o,r.process.call(o,e)):i.call(o,(0,a.error)(r.getMessage.call(o,e)))})).catch((function(e){return i.call(o,e)}))},t.prototype.destruct=function(){this.setStatus(s.STATUSES.beforeDestruct);var t=l.ajaxInstances.get(this);t&&(t.forEach((function(e){try{e.destruct()}catch(e){}})),t.clear()),e.prototype.destruct.call(this)},t}(s.ViewComponent);t.Uploader=u},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasItems=t.hasFiles=void 0;var o=n(1);(0,o.__exportStar)(n(249),t),(0,o.__exportStar)(n(250),t),(0,o.__exportStar)(n(251),t),(0,o.__exportStar)(n(252),t),(0,o.__exportStar)(n(253),t),t.hasFiles=function(e){return Boolean(e&&e.files&&e.files.length>0)},t.hasItems=function(e){return Boolean(e&&e.items&&e.items.length>0)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.processOldBrowserDrag=void 0;var o=n(23),r=n(19),i=n(5),a=n(21),s=n(248);t.processOldBrowserDrag=function(e,t,n,l,u){if(t&&(!t.types.length||t.types[0]!==o.TEXT_PLAIN)){var c=e.j.c.div("",{tabindex:-1,style:"left: -9999px; top: 0; width: 0; height: 100%;line-height: 140%; overflow: hidden; position: fixed; z-index: 2147483647; word-break: break-all;",contenteditable:!0});(0,r.getContainer)(e.j,e.constructor).appendChild(c);var d=(0,i.isJoditObject)(e.j)?e.j.s.save():null;c.focus(),e.j.async.setTimeout((function(){var t=c.firstChild;if(a.Dom.safeRemove(c),t&&t.hasAttribute("src")){var o=(0,i.attr)(t,"src")||"";d&&(0,i.isJoditObject)(e.j)&&e.j.s.restore(),(0,s.sendFiles)(e,[(0,s.dataURItoBlob)(o)],n,l).finally(u)}}),e.j.defaultTimeout)}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.dataURItoBlob=void 0,t.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),n=e.split(",")[0].split(":")[1].split(";")[0],o=new ArrayBuffer(t.length),r=new Uint8Array(o),i=0;t.length>i;i+=1)r[i]=t.charCodeAt(i);return new Blob([r],{type:n})}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.buildData=void 0;var o=n(5);t.buildData=function(e,t){if((0,o.isFunction)(e.o.buildData))return e.o.buildData.call(e,t);var n=e.j.ow.FormData;if(void 0!==n){if(t instanceof n)return t;if((0,o.isString)(t))return t;var r=new n;return Object.keys(t).forEach((function(e){r.append(e,t[e])})),r}return t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.send=t.ajaxInstances=void 0;var o=n(183),r=n(5),i=n(251);t.ajaxInstances=new WeakMap,t.send=function(e,n){var a=(0,i.buildData)(e,n),s=function(n){var i=new o.Ajax(e.j,{xhr:function(){var t=new XMLHttpRequest;return void 0!==e.j.ow.FormData&&t.upload?(e.j.progressbar.show().progress(10),t.upload.addEventListener("progress",(function(t){if(t.lengthComputable){var n=t.loaded/t.total;n*=100,e.j.progressbar.show().progress(n),100>n||e.j.progressbar.hide()}}),!1)):e.j.progressbar.hide(),t},method:e.o.method||"POST",data:n,url:(0,r.isFunction)(e.o.url)?e.o.url(n):e.o.url,headers:e.o.headers,queryBuild:e.o.queryBuild,contentType:e.o.contentType.call(e,n),dataType:e.o.format||"json",withCredentials:e.o.withCredentials||!1}),a=t.ajaxInstances.get(e);return a||(a=new Set,t.ajaxInstances.set(e,a)),a.add(i),i.send().then((function(e){return e.json()})).catch((function(t){e.o.error.call(e,t)})).finally((function(){null==a||a.delete(i)}))};return(0,r.isPromise)(a)?a.then(s).catch((function(t){e.o.error.call(e,t)})):s(a)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.sendFiles=void 0;var o=n(5),r=n(252);t.sendFiles=function(e,t,n,i,a){if(!t)return Promise.reject((0,o.error)("Need files"));var s=e.o,l=(0,o.toArray)(t);if(!l.length)return Promise.reject((0,o.error)("Need files"));var u=[];if(s.insertImageAsBase64URI){var c,d=void 0,f=function(){if((c=l[d])&&c.type){var t=c.type.match(/\/([a-z0-9]+)/i),r=t[1]?t[1].toLowerCase():"";if(s.imagesExtensions.includes(r)){var i=new FileReader;u.push(e.j.async.promise((function(t,r){i.onerror=r,i.onloadend=function(){var r={baseurl:"",files:[i.result],isImages:[!0]};((0,o.isFunction)(n)?n:s.defaultHandlerSuccess).call(e,r),t(r)},i.readAsDataURL(c)}))),l[d]=null}}};for(d=0;l.length>d;d+=1)f()}if((l=l.filter((function(e){return e}))).length){var p=new FormData;p.append(s.pathVariableName,e.path),p.append("source",e.source);var h=void 0;for(d=0;l.length>d;d+=1)if(h=l[d]){var v=h.type.match(/\/([a-z0-9]+)/i),m=v&&v[1]?v[1].toLowerCase():"",g=l[d].name||Math.random().toString().replace(".","");if(m){var _=m;["jpeg","jpg"].includes(_)&&(_="jpeg|jpg"),new RegExp(".("+_+")$","i").test(g)||(g+="."+m)}p.append(s.filesVariableName(d),l[d],g)}a&&a(p),s.data&&(0,o.isPlainObject)(s.data)&&Object.keys(s.data).forEach((function(e){p.append(e,s.data[e])})),s.prepareData.call(e,p),u.push((0,r.send)(e,p).then((function(t){return s.isSuccess.call(e,t)?(((0,o.isFunction)(n)?n:s.defaultHandlerSuccess).call(e,s.process.call(e,t)),t):(((0,o.isFunction)(i)?i:s.defaultHandlerError).call(e,(0,o.error)(s.getMessage.call(e,t))),t)})).then((function(){e.j.events&&e.j.e.fire("filesWereUploaded")})))}return Promise.all(u)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var o=n(1),r=n(87),i=n(5);r.Config.prototype.enableDragAndDropFileToEditor=!0,r.Config.prototype.uploader={url:"",insertImageAsBase64URI:!1,imagesExtensions:["jpg","png","jpeg","gif"],headers:null,data:null,filesVariableName:function(e){return"files[".concat(e,"]")},withCredentials:!1,pathVariableName:"path",format:"json",method:"POST",prepareData:function(e){return e},isSuccess:function(e){return e.success},getMessage:function(e){return void 0!==e.data.messages&&(0,i.isArray)(e.data.messages)?e.data.messages.join(" "):""},process:function(e){return e.data},error:function(e){this.j.e.fire("errorMessage",e.message,"error",4e3)},defaultHandlerSuccess:function(e){var t=this.j||this;(0,i.isJoditObject)(t)&&e.files&&e.files.length&&e.files.forEach((function(n,r){var i=(0,o.__read)(e.isImages&&e.isImages[r]?["img","src"]:["a","href"],2),a=i[0],s=i[1],l=t.createInside.element(a);l.setAttribute(s,e.baseurl+n),"a"===a&&(l.textContent=e.baseurl+n),"img"===a?t.s.insertImage(l,null,t.o.imageDefaultWidth):t.s.insertNode(l)}))},defaultHandlerError:function(e){this.j.e.fire("errorMessage",e.message)},contentType:function(e){return(void 0===this.j.ow.FormData||"string"==typeof e)&&"application/x-www-form-urlencoded; charset=UTF-8"}}}],t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}return n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(0)}()}));
|
|
1
|
+
!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var n=t();for(var r in n)("object"==typeof exports?exports:e)[r]=n[r]}}(self,(function(){return function(){"use strict";var e=[function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(2),t),(0,r.__exportStar)(n(3),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.__classPrivateFieldSet=t.__classPrivateFieldGet=t.__importDefault=t.__importStar=t.__makeTemplateObject=t.__asyncValues=t.__asyncDelegator=t.__asyncGenerator=t.__await=t.__spreadArray=t.__spreadArrays=t.__spread=t.__read=t.__values=t.__exportStar=t.__createBinding=t.__generator=t.__awaiter=t.__metadata=t.__param=t.__decorate=t.__rest=t.__assign=t.__extends=void 0;var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n])},n(e,t)};function r(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],r=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&r>=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function o(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,o,i=n.call(e),a=[];try{for(;(void 0===t||t-- >0)&&!(r=i.next()).done;)a.push(r.value)}catch(e){o={error:e}}finally{try{r&&!r.done&&(n=i.return)&&n.call(i)}finally{if(o)throw o.error}}return a}function i(e){return this instanceof i?(this.v=e,this):new i(e)}t.__extends=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)},t.__assign=function(){return t.__assign=Object.assign||function(e){for(var t,n=1,r=arguments.length;r>n;n++)for(var o in t=arguments[n])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e},t.__assign.apply(this,arguments)},t.__rest=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&0>t.indexOf(r)&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(r=Object.getOwnPropertySymbols(e);r.length>o;o++)0>t.indexOf(r[o])&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]])}return n},t.__decorate=function(e,t,n,r){var o,i=arguments.length,a=3>i?t:null===r?r=Object.getOwnPropertyDescriptor(t,n):r;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)a=Reflect.decorate(e,t,n,r);else for(var s=e.length-1;s>=0;s--)(o=e[s])&&(a=(3>i?o(a):i>3?o(t,n,a):o(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},t.__param=function(e,t){return function(n,r){t(n,r,e)}},t.__metadata=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},t.__awaiter=function(e,t,n,r){return new(n||(n=Promise))((function(o,i){function a(e){try{u(r.next(e))}catch(e){i(e)}}function s(e){try{u(r.throw(e))}catch(e){i(e)}}function u(e){var t;e.done?o(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(a,s)}u((r=r.apply(e,t||[])).next())}))},t.__generator=function(e,t){var n,r,o,i,a={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(i){return function(s){return function(i){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(o=2&i[0]?r.return:i[0]?r.throw||((o=r.return)&&o.call(r),0):r.next)&&!(o=o.call(r,i[1])).done)return o;switch(r=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return a.label++,{value:i[1],done:!1};case 5:a.label++,r=i[1],i=[0];continue;case 7:i=a.ops.pop(),a.trys.pop();continue;default:if(!((o=(o=a.trys).length>0&&o[o.length-1])||6!==i[0]&&2!==i[0])){a=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&o[3]>i[1])){a.label=i[1];break}if(6===i[0]&&o[1]>a.label){a.label=o[1],o=i;break}if(o&&o[2]>a.label){a.label=o[2],a.ops.push(i);break}o[2]&&a.ops.pop(),a.trys.pop();continue}i=t.call(e,a)}catch(e){i=[6,e],r=0}finally{n=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,s])}}},t.__createBinding=Object.create?function(e,t,n,r){void 0===r&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){void 0===r&&(r=n),e[r]=t[n]},t.__exportStar=function(e,n){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(n,r)||(0,t.__createBinding)(n,e,r)},t.__values=r,t.__read=o,t.__spread=function(){for(var e=[],t=0;arguments.length>t;t++)e=e.concat(o(arguments[t]));return e},t.__spreadArrays=function(){for(var e=0,t=0,n=arguments.length;n>t;t++)e+=arguments[t].length;var r=Array(e),o=0;for(t=0;n>t;t++)for(var i=arguments[t],a=0,s=i.length;s>a;a++,o++)r[o]=i[a];return r},t.__spreadArray=function(e,t,n){if(n||2===arguments.length)for(var r,o=0,i=t.length;i>o;o++)!r&&o in t||(r||(r=Array.prototype.slice.call(t,0,o)),r[o]=t[o]);return e.concat(r||Array.prototype.slice.call(t))},t.__await=i,t.__asyncGenerator=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var r,o=n.apply(e,t||[]),a=[];return r={},s("next"),s("throw"),s("return"),r[Symbol.asyncIterator]=function(){return this},r;function s(e){o[e]&&(r[e]=function(t){return new Promise((function(n,r){a.push([e,t,n,r])>1||u(e,t)}))})}function u(e,t){try{(n=o[e](t)).value instanceof i?Promise.resolve(n.value.v).then(l,c):d(a[0][2],n)}catch(e){d(a[0][3],e)}var n}function l(e){u("next",e)}function c(e){u("throw",e)}function d(e,t){e(t),a.shift(),a.length&&u(a[0][0],a[0][1])}},t.__asyncDelegator=function(e){var t,n;return t={},r("next"),r("throw",(function(e){throw e})),r("return"),t[Symbol.iterator]=function(){return this},t;function r(r,o){t[r]=e[r]?function(t){return(n=!n)?{value:i(e[r](t)),done:"return"===r}:o?o(t):t}:o}},t.__asyncValues=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=r(e),t={},o("next"),o("throw"),o("return"),t[Symbol.asyncIterator]=function(){return this},t);function o(n){t[n]=e[n]&&function(t){return new Promise((function(r,o){!function(e,t,n,r){Promise.resolve(r).then((function(t){e({value:t,done:n})}),t)}(r,o,(t=e[n](t)).done,t.value)}))}}},t.__makeTemplateObject=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e};var a=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};t.__importStar=function(e){if(e&&e.__esModule)return e;var n={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&(0,t.__createBinding)(n,e,r);return a(n,e),n},t.__importDefault=function(e){return e&&e.__esModule?e:{default:e}},t.__classPrivateFieldGet=function(e,t,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!r:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(e):r?r.value:t.get(e)},t.__classPrivateFieldSet=function(e,t,n,r,o){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!o)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!o:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?o.call(e,n):o?o.value=n:t.set(e,n),n}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.VDomRender=void 0;var r=n(1),o=n(4),i=n(180),a=n(57),s=function(e){return"children"!==e},u=function(e,t,n){var r;Object.keys(t).filter(s).filter((r=n,function(e){return!(e in r)})).forEach((function(t){e[t]=""})),Object.keys(n).filter(s).filter(function(e,t){return function(n){return e[n]!==t[n]}}(t,n)).forEach((function(t){e[t]=n[t]}))},l=function(){function e(){this.async=new i.Async,this.nextUnitOfWork=void 0,this.currentRoot=void 0,this.wipRoot=void 0,this.deletions=[],this.async.requestIdleCallback(this.workLoop)}return e.prototype.commitRoot=function(){var e;this.deletions.forEach(this.commitWork),this.deletions.length=0,this.commitWork(null===(e=this.wipRoot)||void 0===e?void 0:e.child),this.currentRoot=this.wipRoot,this.wipRoot=void 0},e.prototype.commitWork=function(e){var t,n;if(e){for(var r=e.parent;!(null==r?void 0:r.dom);)r=null==r?void 0:r.parent;var o=r.dom;"PLACEMENT"===e.effectTag&&null!=e.dom?o.appendChild(e.dom):"UPDATE"===e.effectTag&&null!=e.dom?u(e.dom,null!==(n=null===(t=e.alternate)||void 0===t?void 0:t.props)&&void 0!==n?n:{},e.props):"DELETION"===e.effectTag&&this.commitDeletion(e,o),this.commitWork(null==e?void 0:e.child),this.commitWork(null==e?void 0:e.sibling)}},e.prototype.commitDeletion=function(e,t){(null==e?void 0:e.dom)?t.removeChild(e.dom):this.commitDeletion(null==e?void 0:e.child,t)},e.prototype.render=function(e,t){var n;this.wipRoot={type:"div",dom:t,props:{children:[e]},alternate:null!==(n=this.currentRoot)&&void 0!==n?n:void 0},this.deletions=[],this.nextUnitOfWork=this.wipRoot},e.prototype.workLoop=function(e){for(var t=!1;this.nextUnitOfWork&&!t;)this.nextUnitOfWork=this.performUnitOfWork(this.nextUnitOfWork),t=1>e.timeRemaining();!this.nextUnitOfWork&&this.wipRoot&&this.commitRoot(),this.async.requestIdleCallback(this.workLoop)},e.prototype.performUnitOfWork=function(e){if(this.__updateHostComponent(e),e.child)return e.child;for(var t=e;t;){if(t.sibling)return t.sibling;t=t.parent}},e.prototype.__updateHostComponent=function(e){e.dom||(e.dom=function(e){var t="TEXT_ELEMENT"===e.type?document.createTextNode(""):document.createElement(e.type);return u(t,{},e.props),t}(e)),this.__reconcileChildren(e,e.props.children)},e.prototype.__reconcileChildren=function(e,t){for(var n=0,r=e.alternate&&e.alternate.child,o=void 0;t.length>n||r;){var i=t[n],a=void 0,s=r&&i&&i.type===r.type;s&&r&&(a={type:r.type,props:i.props,dom:r.dom,parent:e,alternate:r,effectTag:"UPDATE"}),i&&!s&&(a={type:i.type,props:i.props,dom:null,parent:e,alternate:void 0,effectTag:"PLACEMENT"}),r&&!s&&(r.effectTag="DELETION",this.deletions.push(r)),r&&(r=r.sibling),0===n&&e?e.child=a:i&&o&&(o.sibling=a),o=a,n++}},e.prototype.htmlToVDom=function(e){var t=document.createElement("div");return t.innerHTML=e,(0,o.domToVDom)(t.children.length>1||!t.firstChild?t:t.firstChild)},(0,r.__decorate)([a.default],e)}();t.VDomRender=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.domToVDom=t.attrsToDict=void 0;var r=n(1),o=n(5),i=n(32);function a(e){var t,n,r={};if("SCRIPT"===e.nodeName&&(r.textContent=null!==(t=e.textContent)&&void 0!==t?t:""),e.nodeType===Node.TEXT_NODE&&(r.nodeValue=null!==(n=e.nodeValue)&&void 0!==n?n:""),i.Dom.isElement(e))for(var o=0;e.attributes.length>o;o+=1){var a=e.attributes.item(o);a&&(r[a.name]=a.value)}return r}t.attrsToDict=a,t.domToVDom=function e(t,n){var i;return void 0===n&&(n=!0),t.nodeType===Node.TEXT_NODE?{type:"TEXT_ELEMENT",props:{children:[],nodeValue:null!==(i=t.nodeValue)&&void 0!==i?i:""}}:{type:t.nodeName.toLowerCase(),props:(0,r.__assign)({children:(0,o.toArray)(t.childNodes).map((function(t){return e(t,n)}))},a(t))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var r=n(6),o=n(84);t.toArray=function(){for(var e,t=[],n=0;arguments.length>n;n++)t[n]=arguments[n];var i=(0,o.isNativeFunction)(Array.from)?Array.from:null!==(e=(0,r.reset)("Array.from"))&&void 0!==e?e:Array.from;return i.apply(Array,t)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.memorizeExec=t.keys=t.loadImage=t.reset=t.callPromise=t.markOwner=t.attr=t.call=void 0;var r=n(1),o=n(7),i=n(8),a=n(9),s=n(12),u=n(11),l=n(23),c=n(99),d=n(59);function f(e,t,n){if(!e||!(0,o.isFunction)(e.getAttribute))return null;if(!(0,l.isString)(t))return Object.keys(t).forEach((function(n){var r=t[n];(0,l.isPlainObject)(r)&&"style"===n?(0,c.css)(e,r):("className"===n&&(n="class"),f(e,n,r))})),null;var r=(0,d.CamelCaseToKebabCase)(t);if(/^-/.test(r)){var i=f(e,"data".concat(r));if(i)return i;r=r.substr(1)}if(void 0!==n){if(null!=n)return e.setAttribute(r,n.toString()),n.toString();e.hasAttribute(r)&&e.removeAttribute(r)}return e.getAttribute(r)}t.call=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];return e.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(t),!1))},t.attr=f,t.markOwner=function(e,t){f(t,"data-editor_id",e.id),!t.component&&Object.defineProperty(t,"jodit",{value:e})},t.callPromise=function(e,t){return(0,i.isPromise)(e)?e.finally(t):t()};var p={};t.reset=function(e){var t,n;if(!(e in p)){var r=document.createElement("iframe");try{if(r.src="about:blank",document.body.appendChild(r),!r.contentWindow)return null;var i=(0,a.get)(e,r.contentWindow),s=(0,a.get)(e.split(".").slice(0,-1).join("."),r.contentWindow);(0,o.isFunction)(i)&&(p[e]=i.bind(s))}catch(e){}finally{null===(t=r.parentNode)||void 0===t||t.removeChild(r)}}return null!==(n=p[e])&&void 0!==n?n:null},t.loadImage=function(e,t){return t.async.promise((function(n,r){var o=new Image,i=function(){t.e.off(o),null==r||r()},a=function(){t.e.off(o),n(o)};t.e.one(o,"load",a).one(o,"error",i).one(o,"abort",i),o.src=e,o.complete&&a()}))},t.keys=function(e,t){if(void 0===t&&(t=!0),t)return Object.keys(e);var n=[];for(var r in e)n.push(r);return n},t.memorizeExec=function(e,t,n,r){var o=n.control,i="button".concat(o.command),a=o.args&&o.args[0]||(0,s.dataBind)(e,i);if((0,u.isVoid)(a))return!1;(0,s.dataBind)(e,i,a),r&&(a=r(a)),e.execCommand(o.command,!1,a||void 0)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0,t.isPromise=function(e){return e&&"function"==typeof e.then}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.get=void 0;var r=n(1),o=n(10),i=n(11);t.get=function(e,t){var n,a;if(!(0,o.isString)(e)||!e.length)return null;var s=e.split("."),u=t;try{try{for(var l=(0,r.__values)(s),c=l.next();!c.done;c=l.next()){var d=c.value;if((0,i.isVoid)(u[d]))return null;u=u[d]}}catch(e){n={error:e}}finally{try{c&&!c.done&&(a=l.return)&&a.call(l)}finally{if(n)throw n.error}}}catch(e){return null}return(0,i.isVoid)(u)?null:u}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isString=void 0,t.isString=function(e){return"string"==typeof e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isVoid=void 0,t.isVoid=function(e){return null==e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.dataBind=void 0;var r=n(13),o=n(23),i=new WeakMap;t.dataBind=function(e,t,n){var a=i.get(e);if(!a){i.set(e,a={});var s=null;e instanceof r.ViewComponent&&(s=e.j.e),(0,o.isViewObject)(e)&&(s=e.e),s&&s.on("beforeDestruct",(function(){i.delete(e)}))}return void 0===n?a[t]:(a[t]=n,n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(14),t),(0,r.__exportStar)(n(15),t),(0,r.__exportStar)(n(179),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.STATUSES=void 0,t.STATUSES={beforeInit:"beforeInit",ready:"ready",beforeDestruct:"beforeDestruct",destructed:"destructed"}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Component=void 0;var r=n(16),o=n(39),i=n(14),a=new Map,s=function(){function e(){this.ownerWindow=window,this.__componentStatus=i.STATUSES.beforeInit,this.uid="jodit-uid-"+(0,o.uniqueUid)()}return Object.defineProperty(e.prototype,"componentName",{get:function(){return this.__componentName||(this.__componentName="jodit-"+(0,r.kebabCase)(((0,r.isFunction)(this.className)?this.className():"")||(0,r.getClassName)(this))),this.__componentName},enumerable:!1,configurable:!0}),e.prototype.getFullElName=function(e,t,n){var o=[this.componentName];return e&&(e=e.replace(/[^a-z0-9-]/gi,"-"),o.push("__".concat(e))),t&&(o.push("_",t),o.push("_",(0,r.isVoid)(n)?"true":n.toString())),o.join("")},Object.defineProperty(e.prototype,"ownerDocument",{get:function(){return this.ow.document},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"od",{get:function(){return this.ownerDocument},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ow",{get:function(){return this.ownerWindow},enumerable:!1,configurable:!0}),e.prototype.get=function(e,t){return(0,r.get)(e,t||this)},Object.defineProperty(e.prototype,"isReady",{get:function(){return this.componentStatus===i.STATUSES.ready},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isDestructed",{get:function(){return this.componentStatus===i.STATUSES.destructed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isInDestruct",{get:function(){return i.STATUSES.beforeDestruct===this.componentStatus||i.STATUSES.destructed===this.componentStatus},enumerable:!1,configurable:!0}),e.prototype.bindDestruct=function(e){var t=this;return e.hookStatus(i.STATUSES.beforeDestruct,(function(){return!t.isInDestruct&&t.destruct()})),this},e.prototype.destruct=function(){this.setStatus(i.STATUSES.destructed),a.get(this)&&a.delete(this)},Object.defineProperty(e.prototype,"componentStatus",{get:function(){return this.__componentStatus},set:function(e){this.setStatus(e)},enumerable:!1,configurable:!0}),e.prototype.setStatus=function(e){return this.setStatusComponent(e,this)},e.prototype.setStatusComponent=function(e,t){if(e!==this.__componentStatus){var n=Object.getPrototypeOf(this);n&&(0,r.isFunction)(n.setStatusComponent)&&n.setStatusComponent(e,t);var o=a.get(this),i=null==o?void 0:o[e];i&&i.length&&i.forEach((function(e){return e(t)})),t===this&&(this.__componentStatus=e)}},e.prototype.hookStatus=function(e,t){var n=a.get(this);n||a.set(this,n={}),n[e]||(n[e]=[]),n[e].push(t)},e.STATUSES=i.STATUSES,e}();t.Component=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(17),t),(0,r.__exportStar)(n(117),t),(0,r.__exportStar)(n(164),t),(0,r.__exportStar)(n(23),t),(0,r.__exportStar)(n(109),t),(0,r.__exportStar)(n(166),t),(0,r.__exportStar)(n(100),t),(0,r.__exportStar)(n(172),t),(0,r.__exportStar)(n(59),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(18),t),(0,r.__exportStar)(n(19),t),(0,r.__exportStar)(n(6),t),(0,r.__exportStar)(n(9),t),(0,r.__exportStar)(n(20),t),(0,r.__exportStar)(n(58),t),(0,r.__exportStar)(n(90),t),(0,r.__exportStar)(n(91),t),(0,r.__exportStar)(n(93),t),(0,r.__exportStar)(n(94),t),(0,r.__exportStar)(n(92),t),(0,r.__exportStar)(n(95),t),(0,r.__exportStar)(n(97),t),(0,r.__exportStar)(n(99),t),(0,r.__exportStar)(n(112),t),(0,r.__exportStar)(n(12),t),(0,r.__exportStar)(n(113),t),(0,r.__exportStar)(n(96),t),(0,r.__exportStar)(n(114),t),(0,r.__exportStar)(n(98),t),(0,r.__exportStar)(n(115),t),(0,r.__exportStar)(n(116),t),(0,r.__exportStar)(n(44),t),(0,r.__exportStar)(n(163),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.assert=void 0;var r=n(1),o=function(e){function t(t){var n=e.call(this,t)||this;return n.name="AssertionError",n}return(0,r.__extends)(t,e),t}(Error);t.assert=function(e,t){if(!e)throw new o("Assertion failed: ".concat(t))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.markDeprecated=t.cns=void 0;var r=n(1);t.cns=console,t.markDeprecated=function(e,n,o){return void 0===n&&(n=[""]),void 0===o&&(o=null),function(){for(var i=[],a=0;arguments.length>a;a++)i[a]=arguments[a];return t.cns.warn('Method "'.concat(n[0],'" deprecated.')+(n[1]?' Use "'.concat(n[1],'" instead'):"")),e.call.apply(e,(0,r.__spreadArray)([o],(0,r.__read)(i),!1))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.set=void 0;var r=n(10),o=n(21),i=n(22),a=n(23);t.set=function(e,t,n){if((0,r.isString)(e)&&e.length){for(var s=e.split("."),u=n,l=s[0],c=0;s.length-1>c;c+=1)(0,i.isArray)(u[l=s[c]])||(0,a.isPlainObject)(u[l])||(u[l]=(0,o.isNumeric)(s[c+1])?[]:{}),u=u[l];u&&(u[s[s.length-1]]=t)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isNumeric=void 0;var r=n(10);t.isNumeric=function(e){if((0,r.isString)(e)){if(!e.match(/^([+-])?[0-9]+(\.?)([0-9]+)?(e[0-9]+)?$/))return!1;e=parseFloat(e)}return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isArray=void 0,t.isArray=function(e){return Array.isArray(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(24),t),(0,r.__exportStar)(n(22),t),(0,r.__exportStar)(n(25),t),(0,r.__exportStar)(n(26),t),(0,r.__exportStar)(n(7),t),(0,r.__exportStar)(n(28),t),(0,r.__exportStar)(n(29),t),(0,r.__exportStar)(n(30),t),(0,r.__exportStar)(n(81),t),(0,r.__exportStar)(n(82),t),(0,r.__exportStar)(n(83),t),(0,r.__exportStar)(n(84),t),(0,r.__exportStar)(n(85),t),(0,r.__exportStar)(n(21),t),(0,r.__exportStar)(n(86),t),(0,r.__exportStar)(n(8),t),(0,r.__exportStar)(n(10),t),(0,r.__exportStar)(n(88),t),(0,r.__exportStar)(n(89),t),(0,r.__exportStar)(n(11),t),(0,r.__exportStar)(n(87),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.hasBrowserColorPicker=void 0,t.hasBrowserColorPicker=function(){var e=!0;try{var t=document.createElement("input");t.type="color",e="color"===t.type&&"number"!=typeof t.selectionStart}catch(t){e=!1}return e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isBoolean=void 0,t.isBoolean=function(e){return"boolean"==typeof e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isFastEqual=t.isEqual=void 0;var r=n(27);t.isEqual=function(e,t){return e===t||(0,r.stringify)(e)===(0,r.stringify)(t)},t.isFastEqual=function(e,t){return e===t}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.stringify=void 0,t.stringify=function(e,t){if(void 0===t&&(t={}),"object"!=typeof e)return String(e);var n=new Set(t.excludeKeys),r=new WeakMap;return JSON.stringify(e,(function(e,t){if(!n.has(e)){if("object"==typeof t&&null!=t){if(r.get(t))return"[refObject]";r.set(t,!0)}return t}}),t.prettify)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isHTML=void 0;var r=n(10);t.isHTML=function(e){return(0,r.isString)(e)&&/<([A-Za-z][A-Za-z0-9]*)\b[^>]*>(.*?)<\/\1>/m.test(e.replace(/[\r\n]/g,""))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isHtmlFromWord=void 0,t.isHtmlFromWord=function(e){return-1!==e.search(/<meta.*?Microsoft Excel\s[\d].*?>/)||-1!==e.search(/<meta.*?Microsoft Word\s[\d].*?>/)||-1!==e.search(/style="[^"]*mso-/)&&-1!==e.search(/<font/)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hasContainer=t.isDestructable=t.isInitable=void 0;var r=n(7),o=n(31),i=n(11);t.isInitable=function(e){return!(0,i.isVoid)(e)&&(0,r.isFunction)(e.init)},t.isDestructable=function(e){return!(0,i.isVoid)(e)&&(0,r.isFunction)(e.destruct)},t.hasContainer=function(e){return!(0,i.isVoid)(e)&&o.Dom.isElement(e.container)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(32),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Dom=void 0;var r=n(1),o=n(33),i=n(16),a=n(34),s=n(33),u=function(){function e(){}return e.detach=function(e){for(;e.firstChild;)e.removeChild(e.firstChild)},e.wrapInline=function(t,n,r){var o,a=t,s=t;r.s.save();var u=!1;do{u=!1,(o=a.previousSibling)&&!e.isBlock(o)&&(u=!0,a=o)}while(u);do{u=!1,(o=s.nextSibling)&&!e.isBlock(o)&&(u=!0,s=o)}while(u);var l=(0,i.isString)(n)?r.createInside.element(n):n;a.parentNode&&a.parentNode.insertBefore(l,a);for(var c=a;c&&(c=a.nextSibling,l.appendChild(a),a!==s&&c);)a=c;return r.s.restore(),l},e.wrap=function(e,t,n){var r=(0,i.isString)(t)?n.element(t):t;if(!e.parentNode)throw(0,i.error)("Element should be in DOM");return e.parentNode.insertBefore(r,e),r.appendChild(e),r},e.unwrap=function(t){var n=t.parentNode;if(n){for(;t.firstChild;)n.insertBefore(t.firstChild,t);e.safeRemove(t)}},e.between=function(e,t,n){for(var r=e;r&&r!==t&&(e===r||!n(r));){var o=r.firstChild||r.nextSibling;if(!o){for(;r&&!r.nextSibling;)r=r.parentNode;o=null==r?void 0:r.nextSibling}r=o}},e.replace=function(e,t,n,r,o){void 0===r&&(r=!1),void 0===o&&(o=!1),(0,i.isHTML)(t)&&(t=n.fromHTML(t));var a=(0,i.isString)(t)?n.element(t):t;if(!o)for(;e.firstChild;)a.appendChild(e.firstChild);return r&&(0,i.toArray)(e.attributes).forEach((function(e){a.setAttribute(e.name,e.value)})),e.parentNode&&e.parentNode.replaceChild(a,e),a},e.isEmptyTextNode=function(t){return e.isText(t)&&(!t.nodeValue||0===t.nodeValue.replace(o.INVISIBLE_SPACE_REG_EXP(),"").trim().length)},e.isEmptyContent=function(t){return e.each(t,(function(t){return e.isEmptyTextNode(t)}))},e.isContentEditable=function(t,n){return e.isNode(t)&&!e.closest(t,(function(t){return e.isElement(t)&&"false"===t.getAttribute("contenteditable")}),n)},e.isEmpty=function(t,n){return void 0===n&&(n=/^(img|svg|canvas|input|textarea|form)$/),!t||(e.isText(t)?null==t.nodeValue||0===(0,i.trim)(t.nodeValue).length:!n.test(t.nodeName.toLowerCase())&&e.each(t,(function(t){if(e.isText(t)&&null!=t.nodeValue&&0!==(0,i.trim)(t.nodeValue).length||e.isElement(t)&&n.test(t.nodeName.toLowerCase()))return!1})))},e.isNode=function(e){if(!e)return!1;var t=(0,i.get)("ownerDocument.defaultView",e);return!("object"!=typeof t||!t||"function"!=typeof t.Node&&"object"!=typeof t.Node)&&e instanceof t.Node},e.isCell=function(t){return e.isNode(t)&&/^(td|th)$/i.test(t.nodeName)},e.isImage=function(t){return e.isNode(t)&&/^(img|svg|picture|canvas)$/i.test(t.nodeName)},e.isBlock=function(t){return!(0,i.isVoid)(t)&&"object"==typeof t&&e.isNode(t)&&o.IS_BLOCK.test(t.nodeName)},e.isText=function(e){return Boolean(e&&e.nodeType===Node.TEXT_NODE)},e.isElement=function(t){var n;if(!e.isNode(t))return!1;var r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return Boolean(r&&t.nodeType===Node.ELEMENT_NODE)},e.isHTMLElement=function(t){var n;if(!e.isNode(t))return!1;var r=null===(n=t.ownerDocument)||void 0===n?void 0:n.defaultView;return Boolean(r&&t instanceof r.HTMLElement)},e.isInlineBlock=function(t){return e.isElement(t)&&!/^(BR|HR)$/i.test(t.tagName)&&-1!==["inline","inline-block"].indexOf((0,i.css)(t,"display").toString())},e.canSplitBlock=function(t){return!(0,i.isVoid)(t)&&e.isHTMLElement(t)&&e.isBlock(t)&&!/^(TD|TH|CAPTION|FORM)$/.test(t.nodeName)&&void 0!==t.style&&!/^(fixed|absolute)/i.test(t.style.position)},e.last=function(e,t){var n=null==e?void 0:e.lastChild;if(!n)return null;do{if(t(n))return n;var r=n.lastChild;if(r||(r=n.previousSibling),!r&&n.parentNode!==e){do{n=n.parentNode}while(n&&!(null==n?void 0:n.previousSibling)&&n.parentNode!==e);r=null==n?void 0:n.previousSibling}n=r}while(n);return null},e.prev=function(t,n,r,o){return void 0===o&&(o=!0),e.find(t,n,r,!1,o)},e.next=function(t,n,r,o){return void 0===o&&(o=!0),e.find(t,n,r,!0,o)},e.prevWithClass=function(t,n){return e.prev(t,(function(t){return e.isElement(t)&&t.classList.contains(n)}),t.parentNode)},e.nextWithClass=function(t,n){return e.next(t,(function(t){return e.isElement(t)&&t.classList.contains(n)}),t.parentNode)},e.find=function(e,t,n,r,o){void 0===r&&(r=!0),void 0===o&&(o=!0);for(var i=this.nextGen(e,n,r,o),a=i.next();!a.done;){if(t(a.value))return a.value;a=i.next()}return null},e.nextGen=function(e,t,n,o){var i,a,s;return void 0===n&&(n=!0),void 0===o&&(o=!0),(0,r.__generator)(this,(function(u){switch(u.label){case 0:i=[],a=e,u.label=1;case 1:for(s=n?a.nextSibling:a.previousSibling;s;)i.unshift(s),s=n?s.nextSibling:s.previousSibling;return[5,(0,r.__values)(this.runInStack(e,i,n,o))];case 2:u.sent(),a=a.parentNode,u.label=3;case 3:if(a!==t)return[3,1];u.label=4;case 4:return[2,null]}}))},e.each=function(e,t,n){void 0===n&&(n=!0);for(var r=this.eachGen(e,n),o=r.next();!o.done;){if(!1===t(o.value))return!1;o=r.next()}return!0},e.eachGen=function(e,t){return void 0===t&&(t=!0),this.runInStack(e,[e],t)},e.runInStack=function(e,t,n,o){var i,a;return void 0===o&&(o=!0),(0,r.__generator)(this,(function(r){switch(r.label){case 0:return t.length?(i=t.pop(),e===i?[3,2]:[4,i]):[3,3];case 1:r.sent(),r.label=2;case 2:if(o)for(a=n?i.lastChild:i.firstChild;a;)t.push(a),a=n?a.previousSibling:a.nextSibling;return[3,0];case 3:return[2]}}))},e.findWithCurrent=function(t,n,r,o,i){void 0===o&&(o="nextSibling"),void 0===i&&(i="firstChild");var a=t;do{if(n(a))return a||null;if(i&&a&&a[i]){var s=e.findWithCurrent(a[i],n,a,o,i);if(s)return s}for(;a&&!a[o]&&a!==r;)a=a.parentNode;a&&a[o]&&a!==r&&(a=a[o])}while(a&&a!==r);return null},e.findSibling=function(t,n,r){void 0===n&&(n=!0),void 0===r&&(r=function(t){return!e.isEmptyTextNode(t)});for(var o=function(e){return n?e.previousSibling:e.nextSibling},i=o(t);i&&!r(i);)i=o(i);return i&&r(i)?i:null},e.up=function(e,t,n,r){void 0===r&&(r=!1);var o=e;if(!o)return null;do{if(t(o))return o;if(o===n||!o.parentNode)break;o=o.parentNode}while(o&&o!==n);return o===n&&r&&t(o)?o:null},e.closest=function(t,n,r){var o;return o=(0,i.isFunction)(n)?n:(0,i.isArray)(n)?function(e){return e&&n.includes(e.nodeName.toLowerCase())}:function(e){return e&&n===e.nodeName.toLowerCase()},e.up(t,o,r)},e.furthest=function(e,t,n){for(var r=null,o=null==e?void 0:e.parentElement;o&&o!==n&&t(o);)r=o,o=null==o?void 0:o.parentElement;return r},e.appendChildFirst=function(e,t){var n=e.firstChild;n?n!==t&&e.insertBefore(t,n):e.appendChild(t)},e.after=function(e,t){var n=e.parentNode;n&&(n.lastChild===e?n.appendChild(t):n.insertBefore(t,e.nextSibling))},e.before=function(e,t){var n=e.parentNode;n&&n.insertBefore(t,e)},e.prepend=function(e,t){e.insertBefore(t,e.firstChild)},e.append=function(e,t){var n=this;(0,i.isArray)(t)?t.forEach((function(t){n.append(e,t)})):e.appendChild(t)},e.moveContent=function(e,t,n){void 0===n&&(n=!1);var r=(e.ownerDocument||document).createDocumentFragment();(0,i.toArray)(e.childNodes).forEach((function(e){r.appendChild(e)})),n&&t.firstChild?t.insertBefore(r,t.firstChild):t.appendChild(r)},e.all=function(t,n,r){void 0===r&&(r=!1);var o=t.childNodes?(0,i.toArray)(t.childNodes):[];return n(t)?t:(r&&(o=o.reverse()),o.forEach((function(t){e.all(t,n,r)})),null)},e.isOrContains=function(e,t,n){return void 0===n&&(n=!1),e===t?!n:Boolean(t&&e&&this.up(t,(function(t){return t===e}),e,!0))},e.safeRemove=function(e){e&&e.parentNode&&e.parentNode.removeChild(e)},e.hide=function(e){e&&((0,i.dataBind)(e,"__old_display",e.style.display),e.style.display="none")},e.show=function(e){if(e){var t=(0,i.dataBind)(e,"__old_display");"none"===e.style.display&&(e.style.display=t||"")}},e.isTag=function(e,t){for(var n=(0,i.asArray)(t).map(String),r=0;n.length>r;r+=1)if(this.isElement(e)&&e.tagName.toLowerCase()===n[r].toLowerCase())return!0;return!1},e.markTemporary=function(e,t){return t&&(0,i.attr)(e,t),(0,i.attr)(e,s.TEMP_ATTR,!0),e},e.isTemporary=function(t){return!!e.isElement(t)&&(a.Select.isMarker(t)||"true"===(0,i.attr)(t,s.TEMP_ATTR))},e.replaceTemporaryFromString=function(e){return e.replace(/<([a-z]+)[^>]+data-jodit-temp[^>]+>(.+?)<\/\1>/gi,"$2")},e.temporaryList=function(e){return(0,i.$$)("[".concat(s.TEMP_ATTR,"]"),e)},e}();t.Dom=u},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.TEMP_ATTR=t.BASE_PATH=t.KEY_ALIASES=t.IS_MAC=t.SAFE_COUNT_CHANGE_CALL=t.INSERT_ONLY_TEXT=t.INSERT_AS_TEXT=t.INSERT_CLEAR_HTML=t.INSERT_AS_HTML=t.EMULATE_DBLCLICK_TIMEOUT=t.MARKER_CLASS=t.TEXT_HTML=t.TEXT_PLAIN=t.IS_IE=t.MODE_SPLIT=t.MODE_SOURCE=t.MODE_WYSIWYG=t.PARAGRAPH=t.BR=t.COMMAND_KEYS=t.ACCURACY=t.NEARBY=t.KEY_F3=t.KEY_DELETE=t.KEY_SPACE=t.KEY_DOWN=t.KEY_RIGHT=t.KEY_UP=t.KEY_LEFT=t.KEY_ESC=t.KEY_ENTER=t.KEY_TAB=t.KEY_BACKSPACE=t.MAY_BE_REMOVED_WITH_KEY=t.INSEPARABLE_TAGS=t.IS_INLINE=t.IS_BLOCK=t.SPACE_REG_EXP_END=t.SPACE_REG_EXP_START=t.SPACE_REG_EXP=t.INVISIBLE_SPACE_REG_EXP_START=t.INVISIBLE_SPACE_REG_EXP_END=t.INVISIBLE_SPACE_REG_EXP=t.NBSP_SPACE=t.INVISIBLE_SPACE=void 0,t.INVISIBLE_SPACE="\ufeff",t.NBSP_SPACE=" ",t.INVISIBLE_SPACE_REG_EXP=function(){return/[\uFEFF]/g},t.INVISIBLE_SPACE_REG_EXP_END=function(){return/[\uFEFF]+$/g},t.INVISIBLE_SPACE_REG_EXP_START=function(){return/^[\uFEFF]+/g},t.SPACE_REG_EXP=function(){return/[\s\n\t\r\uFEFF\u200b]+/g},t.SPACE_REG_EXP_START=function(){return/^[\s\n\t\r\uFEFF\u200b]+/g},t.SPACE_REG_EXP_END=function(){return/[\s\n\t\r\uFEFF\u200b]+$/g},t.IS_BLOCK=/^(ARTICLE|SCRIPT|STYLE|OBJECT|FOOTER|HEADER|NAV|SECTION|IFRAME|JODIT|JODIT-MEDIA|PRE|DIV|P|LI|UL|OL|H[1-6]|BLOCKQUOTE|TR|TD|TH|TBODY|THEAD|TABLE|BODY|HTML|FIGCAPTION|FIGURE|DT|DD|DL|DFN|FORM)$/i,t.IS_INLINE=/^(STRONG|SPAN|I|EM|B|SUP|SUB|A|U)$/i,t.INSEPARABLE_TAGS=["img","br","video","iframe","script","input","textarea","hr","link","jodit","jodit-media"],t.MAY_BE_REMOVED_WITH_KEY=RegExp("^".concat(t.INSEPARABLE_TAGS.join("|"),"$"),"i"),t.KEY_BACKSPACE="Backspace",t.KEY_TAB="Tab",t.KEY_ENTER="Enter",t.KEY_ESC="Escape",t.KEY_LEFT="ArrowLeft",t.KEY_UP="ArrowUp",t.KEY_RIGHT="ArrowRight",t.KEY_DOWN="ArrowDown",t.KEY_SPACE="Space",t.KEY_DELETE="Delete",t.KEY_F3="F3",t.NEARBY=5,t.ACCURACY=10,t.COMMAND_KEYS=[t.KEY_BACKSPACE,t.KEY_DELETE,t.KEY_UP,t.KEY_DOWN,t.KEY_RIGHT,t.KEY_LEFT,t.KEY_ENTER,t.KEY_ESC,t.KEY_F3,t.KEY_TAB],t.BR="br",t.PARAGRAPH="p",t.MODE_WYSIWYG=1,t.MODE_SOURCE=2,t.MODE_SPLIT=3,t.IS_IE="undefined"!=typeof navigator&&(-1!==navigator.userAgent.indexOf("MSIE")||/rv:11.0/i.test(navigator.userAgent)),t.TEXT_PLAIN=t.IS_IE?"text":"text/plain",t.TEXT_HTML=t.IS_IE?"html":"text/html",t.MARKER_CLASS="jodit-selection_marker",t.EMULATE_DBLCLICK_TIMEOUT=300,t.INSERT_AS_HTML="insert_as_html",t.INSERT_CLEAR_HTML="insert_clear_html",t.INSERT_AS_TEXT="insert_as_text",t.INSERT_ONLY_TEXT="insert_only_text",t.SAFE_COUNT_CHANGE_CALL=10,t.IS_MAC="undefined"!=typeof window&&/Mac|iPod|iPhone|iPad/.test(window.navigator.platform),t.KEY_ALIASES={add:"+",break:"pause",cmd:"meta",command:"meta",ctl:"control",ctrl:"control",del:"delete",down:"arrowdown",esc:"escape",ins:"insert",left:"arrowleft",mod:t.IS_MAC?"meta":"control",opt:"alt",option:"alt",return:"enter",right:"arrowright",space:" ",spacebar:" ",up:"arrowup",win:"meta",windows:"meta"},t.BASE_PATH=function(){if("undefined"==typeof document)return"";var e=document.currentScript,t=function(e){return e.replace(/\/[^/]+.js$/,"/")};if(e)return t(e.src);var n=document.querySelectorAll("script[src]");return n&&n.length?t(n[n.length-1].src):window.location.href}(),t.TEMP_ATTR="data-jodit-temp"},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(35),t),(0,r.__exportStar)(n(68),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.CommitStyle=t.REPLACE=t.INITIAL=t.UNSET=t.CHANGE=t.UNWRAP=t.WRAP=void 0;var r=n(33),o=n(36);t.WRAP="wrap",t.UNWRAP="unwrap",t.CHANGE="change",t.UNSET="unset",t.INITIAL="initial",t.REPLACE="replace";var i=function(){function e(e){this.options=e}return Object.defineProperty(e.prototype,"elementIsList",{get:function(){return Boolean(this.options.element&&["ul","ol"].includes(this.options.element))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){return this.options.element||this.defaultTag},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementIsBlock",{get:function(){return Boolean(this.options.element&&r.IS_BLOCK.test(this.options.element))},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isElementCommit",{get:function(){return Boolean(this.options.element&&this.options.element!==this.options.defaultTag)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultTag",{get:function(){return this.options.defaultTag?this.options.defaultTag:this.elementIsBlock?"p":"span"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"elementIsDefault",{get:function(){return this.element===this.defaultTag},enumerable:!1,configurable:!0}),e.prototype.apply=function(e){(0,o.ApplyStyle)(e,this)},e}();t.CommitStyle=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ApplyStyle=void 0;var r=n(16),o=n(37),i=n(35),a=n(31),s=n(37);t.ApplyStyle=function(e,t){var n=e.s,u=e.editor,l=new s.FiniteStateMachine("start",{start:{start:function(){n.save(),(0,r.normalizeNode)(u.firstChild),this.setState("generator")}},generator:{initGenerator:function(){return e.s.wrapInTagGen()},nextFont:function(e){var t=e.next();if(t.done)this.setState("end");else if(!(0,o.isInsideInvisibleElement)(t.value,u)&&!a.Dom.isEmptyContent(t.value))return this.setState("check"),t.value}},check:{work:function(n){var r=(0,o.getSuitParent)(t,n,e.editor)||(0,o.getSuitChild)(t,n);return r?(this.setState("wholeElement"),r):((r=a.Dom.closest(n,(function(e){return(0,s.isSuitElement)(t,e,!0)}),e.editor))&&(t.elementIsBlock||(0,s.extractSelectedPart)(r,n,e)),t.elementIsList&&a.Dom.isTag(r,["ul","ol"])?(this.setState("orderList"),n):r?(this.setState("wholeElement"),r):(0,o.unwrapChildren)(t,n)?(this.setState("endProcess"),null):(this.setState("wrap"),n))}},wholeElement:{toggleStyles:function(n){var r=i.INITIAL;r=(0,o.toggleCommitStyles)(t,n)?i.UNWRAP:(0,s.toggleCSS)(t,n,e,r),this.setState("generator",r)}},orderList:{toggleStyles:function(n){var r=i.INITIAL,o=a.Dom.closest(n,"li",e.editor);o&&a.Dom.closest(n,["ul","ol"],e.editor)?(r=(0,s.toggleOrderedList)(t,o,e,r),this.setState(r!==i.REPLACE&&r!==i.UNWRAP&&r!==i.CHANGE?"generator":"endWhile")):this.setState("generator")}},wrap:{toggleStyles:function(n){if("unwrap"!==this.getSubState()){var r=(0,s.wrapAndCommitStyle)(t,n,e);(0,s.toggleCSS)(t,r,e,i.WRAP)}this.setState("generator")}},endWhile:{nextFont:function(e){e.next().done&&this.setState("end")}},endProcess:{toggleStyles:function(){this.setState("generator")}},end:{finalize:function(){n.restore()}}});l.dispatch("start");for(var c=l.dispatch("initGenerator");"end"!==l.getState();){var d=l.dispatch("nextFont",c);if(d){var f=l.dispatch("work",d);l.dispatch("toggleStyles",f)}}l.dispatch("finalize",c)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(38),t),(0,r.__exportStar)(n(66),t),(0,r.__exportStar)(n(69),t),(0,r.__exportStar)(n(67),t),(0,r.__exportStar)(n(70),t),(0,r.__exportStar)(n(71),t),(0,r.__exportStar)(n(74),t),(0,r.__exportStar)(n(75),t),(0,r.__exportStar)(n(72),t),(0,r.__exportStar)(n(73),t),(0,r.__exportStar)(n(76),t),(0,r.__exportStar)(n(77),t),(0,r.__exportStar)(n(78),t),(0,r.__exportStar)(n(80),t),(0,r.__exportStar)(n(79),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleCSS=void 0;var r=n(16),o=n(31),i=n(35),a=n(39);t.toggleCSS=function(e,t,n,s,u){void 0===u&&(u=!1);var l=e.options,c=l.style,d=l.className;return c&&(0,r.size)(c)>0&&Object.keys(c).forEach((function(l){if(""!==t.style.getPropertyValue((0,r.kebabCase)(l))||null!=c[l]){if(function(e,t,n){var i=e.create.element(t.tagName.toLowerCase());i.style.cssText=t.style.cssText,function(e){var t;if(void 0!==(0,r.dataBind)(e,"shadowRoot"))return(0,r.dataBind)(e,"shadowRoot");var n=(0,a.getContainer)(e),o=document.createElement("iframe");(0,r.css)(o,{width:0,height:0,position:"absolute",border:0}),o.src="about:blank",n.appendChild(o);var i=null===(t=o.contentWindow)||void 0===t?void 0:t.document,s=i?i.body:e.od.body;return(0,r.dataBind)(e,"shadowRoot",s),s}(e).appendChild(i);var s=(0,r.css)(i,n);return o.Dom.safeRemove(i),s}(n,t,l)===(0,r.normalizeCssValue)(l,c[l]))return!u&&(0,r.css)(t,l,null),void(s=function(e,t,n){return(0,r.attr)(t,"style")||((0,r.attr)(t,"style",null),t.tagName.toLowerCase()===e.defaultTag&&(o.Dom.unwrap(t),n=i.UNWRAP)),n}(e,t,s=i.UNSET));s=i.CHANGE,!u&&(0,r.css)(t,l,c[l])}})),d&&(t.classList.contains(d)?(t.classList.remove(d),s=i.UNSET):(t.classList.add(d),s=i.CHANGE)),s}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.eventEmitter=t.getContainer=t.extendLang=t.lang=t.modules=t.pluginSystem=t.uniqueUid=t.instances=void 0;var r=n(40),o=n(31),i=n(41),a=n(23),s=n(58),u=n(59);t.instances={};var l=1,c=new Set;t.uniqueUid=function(){function e(){return l+=10*(Math.random()+1),Math.round(l).toString(16)}for(var t=e();c.has(t);)t=e();return c.add(t),t},t.pluginSystem=new r.PluginSystem,t.modules={},t.lang={},t.extendLang=function(e){Object.keys(e).forEach((function(n){t.lang[n]?Object.assign(t.lang[n],e[n]):t.lang[n]=e[n]}))};var d=new WeakMap;t.getContainer=function(e,t,n,r){void 0===n&&(n="div"),void 0===r&&(r=!1);var i=t?(0,s.getClassName)(t.prototype):"jodit-utils",l=d.get(e)||{},c=i+n,f=(0,a.isViewObject)(e)?e:e.j;if(!l[c]){var p=f.c,h=(0,a.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:e.od.body;if(r&&(0,a.isJoditObject)(e)&&e.od!==e.ed){p=e.createInside;var v="style"===n?e.ed.head:e.ed.body;h=(0,a.isJoditObject)(e)&&e.o.shadowRoot?e.o.shadowRoot:v}var _=p.element(n,{className:"jodit jodit-".concat((0,u.kebabCase)(i),"-container jodit-box")});_.classList.add("jodit_theme_".concat(f.o.theme||"default")),h.appendChild(_),l[c]=_,e.hookStatus("beforeDestruct",(function(){o.Dom.safeRemove(_),delete l[c],Object.keys(l).length&&d.delete(e)})),d.set(e,l)}return l[c].classList.remove("jodit_theme_default","jodit_theme_dark"),l[c].classList.add("jodit_theme_".concat(f.o.theme||"default")),l[c]},t.eventEmitter=new i.EventEmitter},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.PluginSystem=void 0;var r=n(1),o=n(16),i=function(){function e(){this._items=new Map}return e.prototype.normalizeName=function(e){return(0,o.kebabCase)(e).toLowerCase()},e.prototype.items=function(e){var t=[];return this._items.forEach((function(e,n){t.push([n,e])})),t.filter((function(t){var n=(0,r.__read)(t,1);return!e||e.includes(n[0])}))},e.prototype.add=function(e,t){this._items.set(this.normalizeName(e),t)},e.prototype.get=function(e){return this._items.get(this.normalizeName(e))},e.prototype.remove=function(e){this._items.delete(this.normalizeName(e))},e.prototype.init=function(t){var n=this,i=t.o.extraPlugins.map((function(e){return(0,o.isString)(e)?{name:e}:e})),a=(0,o.splitArray)(t.o.disablePlugins).map((function(e){return n.normalizeName(e)})),s=[],u={},l=[],c={},d=function(i){var d,f=(0,r.__read)(i,2),p=f[0],h=f[1];if(!(a.includes(p)||s.includes(p)||u[p])){var v=null===(d=h)||void 0===d?void 0:d.requires;if(!(v&&(0,o.isArray)(v)&&n.hasDisabledRequires(a,v))){var _=e.makePluginInstance(t,h);_&&(n.initOrWait(t,p,_,s,u),l.push(_),c[p]=_)}}},f=this.loadExtras(t,i);return(0,o.callPromise)(f,(function(){t.isInDestruct||(n.items(t.o.safeMode?t.o.safePluginsList.concat(i.map((function(e){return e.name}))):null).forEach(d),n.addListenerOnBeforeDestruct(t,l),t.__plugins=c)}))},e.prototype.hasDisabledRequires=function(e,t){return Boolean((null==t?void 0:t.length)&&e.some((function(e){return t.includes(e)})))},e.makePluginInstance=function(e,t){try{return(0,o.isFunction)(t)?new t(e):t}catch(e){}return null},e.prototype.initOrWait=function(t,n,r,i,a){var s=function(n,r){if((0,o.isInitable)(r)){var s=r.requires;if((null==s?void 0:s.length)&&!s.every((function(e){return i.includes(e)})))return a[n]=r,!1;try{r.init(t)}catch(e){}i.push(n)}else i.push(n);return r.hasStyle&&e.loadStyle(t,n),!0};s(n,r),Object.keys(a).forEach((function(e){var t=a[e];t&&s(e,t)&&(a[e]=void 0,delete a[e])}))},e.prototype.addListenerOnBeforeDestruct=function(e,t){e.e.on("beforeDestruct",(function(){t.forEach((function(t){(0,o.isDestructable)(t)&&t.destruct(e)})),t.length=0,delete e.__plugins}))},e.prototype.load=function(t,n){return Promise.all(n.map((function(n){var r=n.url||e.getFullUrl(t,n.name,!0);return(0,o.appendScriptAsync)(t,r).then((function(e){return{v:e,status:"fulfilled"}}),(function(e){return{e:e,status:"rejected"}}))})))},e.loadStyle=function(t,n){return(0,r.__awaiter)(this,void 0,Promise,(function(){var i;return(0,r.__generator)(this,(function(r){return i=e.getFullUrl(t,n,!1),this.styles.has(i)?[2]:(this.styles.add(i),[2,(0,o.appendStyleAsync)(t,i)])}))}))},e.getFullUrl=function(e,t,n){return t=(0,o.kebabCase)(t),e.basePath+"plugins/"+t+"/"+t+"."+(n?"js":"css")},e.prototype.loadExtras=function(e,t){var n=this;if(t&&t.length)try{var r=t.filter((function(e){return!n._items.has(n.normalizeName(e.name))}));if(r.length)return this.load(e,r)}catch(e){}},e.styles=new Set,e}();t.PluginSystem=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(42),t),(0,r.__exportStar)(n(45),t),(0,r.__exportStar)(n(43),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;var r=n(1),o=n(43),i=n(10),a=n(7),s=n(22),u=n(44),l=function(){function e(e){var t=this;this.mutedEvents=new Set,this.__key="__JoditEventEmitterNamespaces",this.doc=document,this.prepareEvent=function(e){e.cancelBubble||(e.type.match(/^touch/)&&e.changedTouches&&e.changedTouches.length&&["clientX","clientY","pageX","pageY"].forEach((function(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&&t.doc.defaultView.clipboardData&&Object.defineProperty(e,"clipboardData",{get:function(){return t.doc.defaultView.clipboardData},configurable:!0,enumerable:!0}))},this.currents=[],this.__stopped=[],this.isDestructed=!1,e&&(this.doc=e),this.__key+=(new Date).getTime()}return e.prototype.mute=function(e){return this.mutedEvents.add(null!=e?e:"*"),this},e.prototype.isMuted=function(e){return!(!e||!this.mutedEvents.has(e))||this.mutedEvents.has("*")},e.prototype.unmute=function(e){return this.mutedEvents.delete(null!=e?e:"*"),this},e.prototype.eachEvent=function(e,t){var n=this;e.split(/[\s,]+/).forEach((function(e){var r=e.split(".");t.call(n,r[0],r[1]||o.defaultNameSpace)}))},e.prototype.getStore=function(e){if(!e)throw(0,u.error)("Need subject");if(void 0===e[this.__key]){var t=new o.EventHandlersStore;Object.defineProperty(e,this.__key,{enumerable:!1,configurable:!0,value:t})}return e[this.__key]},e.prototype.clearStore=function(e){void 0!==e[this.__key]&&delete e[this.__key]},e.prototype.triggerNativeEvent=function(e,t){var n=this.doc.createEvent("HTMLEvents");"string"==typeof t?n.initEvent(t,!0,!0):(n.initEvent(t.type,t.bubbles,t.cancelable),["screenX","screenY","clientX","clientY","target","srcElement","currentTarget","timeStamp","which","keyCode"].forEach((function(e){Object.defineProperty(n,e,{value:t[e],enumerable:!0})})),Object.defineProperty(n,"originalEvent",{value:t,enumerable:!0})),e.dispatchEvent(n)},Object.defineProperty(e.prototype,"current",{get:function(){return this.currents[this.currents.length-1]},enumerable:!1,configurable:!0}),e.prototype.on=function(e,t,n,o){var l=this;void 0===o&&(o=!1);var c=(0,i.isString)(e)?this:e,d=(0,i.isString)(t)?t:e,f=n;void 0===f&&(0,a.isFunction)(t)&&(f=t);var p=this.getStore(c);if(!(0,i.isString)(d)||""===d)throw(0,u.error)("Need events names");if(!(0,a.isFunction)(f))throw(0,u.error)("Need event handler");if((0,s.isArray)(c))return c.forEach((function(e){l.on(e,d,f,o)})),this;var h=(0,a.isFunction)(c.addEventListener),v=this,_=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];if(!v.isMuted(e))return f&&f.call.apply(f,(0,r.__spreadArray)([this],(0,r.__read)(t),!1))};return h&&(_=function(e){if(!v.isMuted(e.type))return v.prepareEvent(e),f&&!1===f.call(this,e)?(e.preventDefault(),e.stopImmediatePropagation(),!1):void 0}),this.eachEvent(d,(function(e,t){if(""===e)throw(0,u.error)("Need event name");if(!1===p.indexOf(e,t,f)&&(p.set(e,t,{event:e,originalCallback:f,syntheticCallback:_},o),h)){var n=!!["touchstart","touchend","scroll","mousewheel","mousemove","touchmove"].includes(e)&&{passive:!0};c.addEventListener(e,_,n)}})),this},e.prototype.one=function(e,t,n,o){var s=this;void 0===o&&(o=!1);var u=(0,i.isString)(e)?this:e,l=(0,i.isString)(t)?t:e,c=n;void 0===c&&(0,a.isFunction)(t)&&(c=t);var d=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return s.off(u,l,d),c.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(e),!1))};return this.on(u,l,d,o),this},e.prototype.off=function(e,t,n){var r=this,s=(0,i.isString)(e)?this:e,u=(0,i.isString)(t)?t:e,l=this.getStore(s),c=n;if(!(0,i.isString)(u)||!u)return l.namespaces().forEach((function(e){r.off(s,"."+e)})),this.clearStore(s),this;void 0===c&&(0,a.isFunction)(t)&&(c=t);var d=(0,a.isFunction)(s.removeEventListener),f=function(e){d&&s.removeEventListener(e.event,e.syntheticCallback,!1)},p=function(e,t){if(""!==e){var n=l.get(e,t);if(n&&n.length)if((0,a.isFunction)(c)){var r=l.indexOf(e,t,c);!1!==r&&(f(n[r]),n.splice(r,1))}else n.forEach(f),n.length=0}else l.events(t).forEach((function(e){""!==e&&p(e,t)}))};return this.eachEvent(u,(function(e,t){t===o.defaultNameSpace?l.namespaces().forEach((function(t){p(e,t)})):p(e,t)})),this},e.prototype.stopPropagation=function(e,t){var n=this,r=(0,i.isString)(e)?this:e,a=(0,i.isString)(e)?e:t;if("string"!=typeof a)throw(0,u.error)("Need event names");var s=this.getStore(r);this.eachEvent(a,(function(e,t){var i=s.get(e,t);i&&n.__stopped.push(i),t===o.defaultNameSpace&&s.namespaces(!0).forEach((function(t){return n.stopPropagation(r,e+"."+t)}))}))},e.prototype.removeStop=function(e){if(e){var t=this.__stopped.indexOf(e);-1!==t&&this.__stopped.splice(0,t+1)}},e.prototype.isStopped=function(e){return void 0!==e&&-1!==this.__stopped.indexOf(e)},e.prototype.fire=function(e,t){for(var n,s,l=this,c=[],d=2;arguments.length>d;d++)c[d-2]=arguments[d];var f=(0,i.isString)(e)?this:e,p=(0,i.isString)(e)?e:t,h=(0,i.isString)(e)?(0,r.__spreadArray)([t],(0,r.__read)(c),!1):c,v=(0,a.isFunction)(f.dispatchEvent);if(!v&&!(0,i.isString)(p))throw(0,u.error)("Need events names");var _=this.getStore(f);return!(0,i.isString)(p)&&v?this.triggerNativeEvent(f,t):this.eachEvent(p,(function(e,t){if(v)l.triggerNativeEvent(f,e);else{var i=_.get(e,t);if(i)try{(0,r.__spreadArray)([],(0,r.__read)(i),!1).every((function(t){var o;return!l.isStopped(i)&&(l.currents.push(e),s=(o=t.syntheticCallback).call.apply(o,(0,r.__spreadArray)([f,e],(0,r.__read)(h),!1)),l.currents.pop(),void 0!==s&&(n=s),!0)}))}finally{l.removeStop(i)}t!==o.defaultNameSpace||v||_.namespaces().filter((function(e){return e!==t})).forEach((function(t){var o=l.fire.apply(l,(0,r.__spreadArray)([f,e+"."+t],(0,r.__read)(h),!1));void 0!==o&&(n=o)}))}})),n},e.prototype.destruct=function(){this.isDestructed&&(this.isDestructed=!0,this.off(this),this.getStore(this).clear(),delete this[this.__key])},e}();t.EventEmitter=l},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.EventHandlersStore=t.defaultNameSpace=void 0,t.defaultNameSpace="JoditEventDefaultNamespace";var n=function(){function e(){this.__store={}}return e.prototype.get=function(e,t){if(void 0!==this.__store[t])return this.__store[t][e]},e.prototype.indexOf=function(e,t,n){var r=this.get(e,t);if(r)for(var o=0;r.length>o;o+=1)if(r[o].originalCallback===n)return o;return!1},e.prototype.namespaces=function(e){void 0===e&&(e=!1);var n=Object.keys(this.__store);return e?n.filter((function(e){return e!==t.defaultNameSpace})):n},e.prototype.events=function(e){return this.__store[e]?Object.keys(this.__store[e]):[]},e.prototype.set=function(e,t,n,r){void 0===r&&(r=!1),void 0===this.__store[t]&&(this.__store[t]={}),void 0===this.__store[t][e]&&(this.__store[t][e]=[]),r?this.__store[t][e].unshift(n):this.__store[t][e].push(n)},e.prototype.clear=function(){this.__store={}},e}();t.EventHandlersStore=n},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.error=void 0,t.error=function(e){return new TypeError(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0;var r=n(1),o=n(16),i=n(46),a=Symbol("observable-object");function s(e){return void 0!==e[a]}t.observable=function(e){if(s(e))return e;var t={},n={},u=function(t,r){return(0,o.isArray)(t)?(t.map((function(e){return u(e,r)})),e):(n[t]||(n[t]=[]),n[t].push(r),e)},l=function(i){for(var a=[],s=1;arguments.length>s;s++)a[s-1]=arguments[s];if((0,o.isArray)(i))i.map((function(e){return l.apply(void 0,(0,r.__spreadArray)([e],(0,r.__read)(a),!1))}));else try{!t[i]&&n[i]&&(t[i]=!0,n[i].forEach((function(t){return t.call.apply(t,(0,r.__spreadArray)([e],(0,r.__read)(a),!1))})))}finally{t[i]=!1}},c=function(t,n){void 0===n&&(n=[]);var d={};s(t)||(Object.defineProperty(t,a,{enumerable:!1,value:!0}),Object.keys(t).forEach((function(a){var s=a,u=n.concat(s).filter((function(e){return e.length}));d[s]=t[s];var f=(0,i.getPropertyDescriptor)(t,s);Object.defineProperty(t,s,{set:function(t){var n,i=d[s];if(!(0,o.isFastEqual)(d[s],t)){l(["beforeChange","beforeChange.".concat(u.join("."))],s,t),(0,o.isPlainObject)(t)&&c(t,u),f&&f.set?f.set.call(e,t):d[s]=t;var a=[];l((0,r.__spreadArray)(["change"],(0,r.__read)(u.reduce((function(e,t){return a.push(t),e.push("change.".concat(a.join("."))),e}),[])),!1),u.join("."),i,(null===(n=t)||void 0===n?void 0:n.valueOf)?t.valueOf():t)}},get:function(){return f&&f.get?f.get.call(e):d[s]},enumerable:!0,configurable:!0}),(0,o.isPlainObject)(d[s])&&c(d[s],u)})),Object.defineProperty(e,"on",{value:u}))};return c(e),e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.autobind=void 0;var r=n(1);(0,r.__exportStar)(n(47),t),(0,r.__exportStar)(n(48),t),(0,r.__exportStar)(n(49),t),(0,r.__exportStar)(n(50),t),(0,r.__exportStar)(n(51),t),(0,r.__exportStar)(n(52),t),(0,r.__exportStar)(n(53),t),(0,r.__exportStar)(n(54),t),(0,r.__exportStar)(n(55),t);var o=n(57);Object.defineProperty(t,"autobind",{enumerable:!0,get:function(){return o.default}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.cache=void 0;var r=n(16);t.cache=function(e,t,n){var o=n.get;if(!o)throw(0,r.error)("Getter property descriptor expected");n.get=function(){var e=o.call(this);return e&&!0===e.noCache||Object.defineProperty(this,t,{configurable:n.configurable,enumerable:n.enumerable,writable:!1,value:e}),e}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.component=void 0;var r=n(1),o=n(16),i=function(e){return(0,o.isFunction)(e.className)?e.className():NaN};t.component=function(e){var t=function(e){function t(){for(var n=[],o=0;arguments.length>o;o++)n[o]=arguments[o];var a=e.apply(this,(0,r.__spreadArray)([],(0,r.__read)(n),!1))||this,s=Object.getPrototypeOf(a)===t.prototype,u=i(a)===i(t.prototype);return(s||u)&&a.setStatus("ready"),a}return(0,r.__extends)(t,e),t}(e);return t.prototype.constructor=e,t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=t.debounce=void 0;var r=n(23),o=n(13),i=n(44);function a(e,t,n){return void 0===t&&(t=!1),void 0===n&&(n="debounce"),function(a,s){if(!(0,r.isFunction)(a[s]))throw(0,i.error)("Handler must be a Function");a.hookStatus(o.STATUSES.ready,(function(o){var i=(0,r.isViewObject)(o)?o:o.jodit,a=(0,r.isFunction)(e)?e(o):e;o[s]=i.async[n](o[s].bind(o),(0,r.isNumber)(a)||(0,r.isPlainObject)(a)?a:i.defaultTimeout,t)}))}}t.debounce=a,t.throttle=function(e,t){return void 0===t&&(t=!1),a(e,t,"throttle")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.idle=void 0;var r=n(1),o=n(13),i=n(16);t.idle=function(){return function(e,t){if(!(0,i.isFunction)(e[t]))throw(0,i.error)("Handler must be a Function");e.hookStatus(o.STATUSES.ready,(function(e){var n=(0,i.isViewObject)(e)?e:e.jodit,o=e[t];e[t]=function(){for(var t=[],i=0;arguments.length>i;i++)t[i]=arguments[i];return n.async.requestIdleCallback(o.bind.apply(o,(0,r.__spreadArray)([e],(0,r.__read)(t),!1)))}}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.hook=void 0;var r=n(23),o=n(44);t.hook=function(e){return function(t,n){if(!(0,r.isFunction)(t[n]))throw(0,o.error)("Handler must be a Function");t.hookStatus(e,(function(e){t[n].call(e)}))}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nonenumerable=void 0,t.nonenumerable=function(e,t){!1!==(Object.getOwnPropertyDescriptor(e,t)||{}).enumerable&&Object.defineProperty(e,t,{enumerable:!1,set:function(e){Object.defineProperty(this,t,{enumerable:!1,writable:!0,value:e})}})}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.persistent=void 0;var r=n(13),o=n(16);t.persistent=function(e,t){e.hookStatus(r.STATUSES.ready,(function(e){var n=(0,o.isViewObject)(e)?e:e.jodit,r="".concat(n.options.namespace).concat(e.componentName,"_prop_").concat(t),i=e[t];Object.defineProperty(e,t,{get:function(){var e;return null!==(e=n.storage.get(r))&&void 0!==e?e:i},set:function(e){n.storage.set(r,e)}})}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wait=void 0;var r=n(1),o=n(16),i=n(13);t.wait=function(e){return function(t,n){if(!(0,o.isFunction)(t[n]))throw(0,o.error)("Handler must be a Function");t.hookStatus(i.STATUSES.ready,(function(t){var i=(0,o.isViewObject)(t)?t.async:t.j.async,a=t[n],s=0;t[n]=function n(){for(var o=[],u=0;arguments.length>u;u++)o[u]=arguments[u];i.clearTimeout(s),e(t)?a.apply(t,o):s=i.setTimeout((function(){return n.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(o),!1))}),10)}}))}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.watch=t.getPropertyDescriptor=void 0;var r=n(1),o=n(23),i=n(41),a=n(13),s=n(56),u=n(44);function l(e,t){var n;do{n=Object.getOwnPropertyDescriptor(e,t),e=Object.getPrototypeOf(e)}while(!n&&e);return n}function c(e,t){return function(n,c){if(!(0,o.isFunction)(n[c]))throw(0,u.error)("Handler must be a Function");var d=function(a){var u=function(e){for(var t,n=[],o=1;arguments.length>o;o++)n[o-1]=arguments[o];if(!a.isInDestruct)return(t=a)[c].apply(t,(0,r.__spreadArray)([e],(0,r.__read)(n),!1))};(0,s.splitArray)(e).forEach((function(e){if(/:/.test(e)){var s=(0,r.__read)(e.split(":"),2),c=s[0],d=s[1],f=(0,o.isViewObject)(a)?a:a.jodit;return c.length&&(t=a.get(c)),(0,o.isFunction)(t)&&(t=t(a)),f.events.on(t||a,d,u),t||f.events.on(d,u),void f.hookStatus("beforeDestruct",(function(){f.events.off(t||a,d,u).off(d,u)}))}var p=e.split("."),h=(0,r.__read)(p,1)[0],v=p.slice(1),_=a[h];(0,o.isPlainObject)(_)&&(0,i.observable)(_).on("change.".concat(v.join(".")),u);var m=l(n,h);Object.defineProperty(a,h,{configurable:!0,set:function(e){var t=_;t!==e&&(_=e,m&&m.set&&m.set.call(a,e),(0,o.isPlainObject)(_)&&(_=(0,i.observable)(_)).on("change.".concat(v.join(".")),u),u(h,t,_))},get:function(){return m&&m.get?m.get.call(a):_}})}))};(0,o.isFunction)(n.hookStatus)?n.hookStatus(a.STATUSES.ready,d):d(n)}}t.getPropertyDescriptor=l,t.watch=c,t.default=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.splitArray=void 0;var r=n(10);t.splitArray=function(e){return(0,r.isString)(e)?e.split(/[,\s]+/):e}},function(e,t){function n(e){return n="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},n(e)}function r(e,t,r){var o=r.value;if("function"!=typeof o)throw new TypeError("@boundMethod decorator can only be applied to methods not: ".concat(n(o)));var i=!1;return{configurable:!0,get:function(){if(i||this===e.prototype||this.hasOwnProperty(t)||"function"!=typeof o)return o;var n=o.bind(this);return i=!0,Object.defineProperty(this,t,{configurable:!0,get:function(){return n},set:function(e){o=e,delete this[t]}}),i=!1,n},set:function(e){o=e}}}function o(e){var t;return"undefined"!=typeof Reflect&&"function"==typeof Reflect.ownKeys?t=Reflect.ownKeys(e.prototype):(t=Object.getOwnPropertyNames(e.prototype),"function"==typeof Object.getOwnPropertySymbols&&(t=t.concat(Object.getOwnPropertySymbols(e.prototype)))),t.forEach((function(t){if("constructor"!==t){var n=Object.getOwnPropertyDescriptor(e.prototype,t);"function"==typeof n.value&&Object.defineProperty(e.prototype,t,r(e,t,n))}})),e}Object.defineProperty(t,"__esModule",{value:!0}),t.boundClass=t.boundMethod=void 0,t.boundMethod=r,t.boundClass=o,t.default=function(){return 1===arguments.length?o.apply(void 0,arguments):r.apply(void 0,arguments)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getClassName=t.keepNames=void 0;var r=n(7);t.keepNames=new Map,t.getClassName=function(e){var n;if((0,r.isFunction)(e.className))return e.className();var o=(null===(n=e.constructor)||void 0===n?void 0:n.originalConstructor)||e.constructor;if(t.keepNames.has(o))return t.keepNames.get(o);if(o.name)return o.name;var i=new RegExp(/^\s*function\s*(\S*)\s*\(/),a=o.toString().match(i);return a?a[1]:""}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(60),t),(0,r.__exportStar)(n(27),t),(0,r.__exportStar)(n(61),t),(0,r.__exportStar)(n(62),t),(0,r.__exportStar)(n(63),t),(0,r.__exportStar)(n(64),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.camelCase=void 0,t.camelCase=function(e){return e.replace(/([-_])(.)/g,(function(e,t,n){return n.toUpperCase()}))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.CamelCaseToKebabCase=t.kebabCase=void 0,t.kebabCase=function(e){return e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase()},t.CamelCaseToKebabCase=function(e){return e.replace(/([A-Z])([A-Z])([a-z])/g,"$1-$2$3").replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.trimInv=t.trim=void 0;var r=n(33);t.trim=function(e){return e.replace((0,r.SPACE_REG_EXP_END)(),"").replace((0,r.SPACE_REG_EXP_START)(),"")},t.trimInv=function(e){return e.replace((0,r.INVISIBLE_SPACE_REG_EXP_END)(),"").replace((0,r.INVISIBLE_SPACE_REG_EXP_START)(),"")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ucfirst=void 0,t.ucfirst=function(e){return e.length?e[0].toUpperCase()+e.substr(1):""}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.i18n=t.sprintf=void 0;var r=n(65),o=n(17),i=n(23),a=n(59),s=n(39);t.sprintf=function(e,t){if(!t||!t.length)return e;for(var n=/%([sd])/g,r=n.exec(e),o=e,i=0;r&&void 0!==t[i];)o=o.replace(r[0],t[i].toString()),i+=1,r=n.exec(e);return o},t.i18n=function(e,n,u){if(!(0,i.isString)(e))throw(0,o.error)("i18n: Need string in first argument");if(!e.length)return e;var l,c=Boolean(void 0!==u&&u.debugLanguage),d=function(e){return n&&n.length?(0,t.sprintf)(e,n):e},f=(0,o.defaultLanguage)(r.Config.defaultOptions.language,r.Config.defaultOptions.language),p=(0,o.defaultLanguage)(null==u?void 0:u.language,f),h=function(t){if(t){if((0,i.isString)(t[e]))return d(t[e]);var n=e.toLowerCase();if((0,i.isString)(t[n]))return d(t[n]);var r=(0,a.ucfirst)(e);return(0,i.isString)(t[r])?d(t[r]):void 0}};l=void 0!==s.lang[p]?s.lang[p]:void 0!==s.lang[f]?s.lang[f]:s.lang.en;var v=null==u?void 0:u.i18n;if(v&&v[p]){var _=h(v[p]);if(_)return _}return h(l)||(s.lang.en&&(0,i.isString)(s.lang.en[e])&&s.lang.en[e]?d(s.lang.en[e]):c?"{"+e+"}":d(e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Config=void 0;var r=n(33),o=function(){function e(){this.namespace="",this.safeMode=!1,this.safePluginsList=["about","enter","backspace"],this.license="",this.preset="custom",this.presets={inline:{inline:!0,toolbar:!1,toolbarInline:!0,toolbarInlineForSelection:!0,showXPathInStatusbar:!1,showCharsCounter:!1,showWordsCounter:!1,showPlaceholder:!1}},this.ownerDocument="undefined"!=typeof document?document:null,this.ownerWindow="undefined"!=typeof window?window:null,this.shadowRoot=null,this.styleValues={},this.zIndex=0,this.readonly=!1,this.disabled=!1,this.activeButtonsInReadOnly=["source","fullsize","print","about","dots","selectall"],this.toolbarButtonSize="middle",this.allowTabNavigation=!1,this.inline=!1,this.theme="default",this.saveModeInStorage=!1,this.spellcheck=!0,this.editorCssClass=!1,this.style=!1,this.triggerChangeEvent=!0,this.direction="",this.language="auto",this.debugLanguage=!1,this.i18n=!1,this.tabIndex=-1,this.toolbar=!0,this.statusbar=!0,this.showTooltip=!0,this.showTooltipDelay=1e3,this.useNativeTooltip=!1,this.enter=r.PARAGRAPH,this.enterBlock="br"!==this.enter?this.enter:r.PARAGRAPH,this.defaultMode=r.MODE_WYSIWYG,this.useSplitMode=!1,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"]},this.colorPickerDefaultTab="background",this.imageDefaultWidth=300,this.removeButtons=[],this.disablePlugins=[],this.extraPlugins=[],this.extraButtons=[],this.extraIcons={},this.createAttributes={},this.sizeLG=900,this.sizeMD=700,this.sizeSM=400,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:[]}],this.buttonsMD=["bold","italic","|","ul","ol","eraser","|","font","fontsize","---","image","table","|","link","\n","brush","paragraph","align","|","hr","copyformat","fullsize","---","undo","redo","|","dots"],this.buttonsSM=["bold","italic","|","ul","ol","eraser","|","fontsize","brush","paragraph","---","image","table","\n","link","|","align","|","undo","redo","|","copyformat","fullsize","---","dots"],this.buttonsXS=["bold","brush","paragraph","eraser","|","fontsize","---","image","\n","align","undo","redo","|","link","table","---","dots"],this.events={},this.textIcons=!1,this.showBrowserColorPicker=!0}return Object.defineProperty(e,"defaultOptions",{get:function(){return e.__defaultOptions||(e.__defaultOptions=new e),e.__defaultOptions},enumerable:!1,configurable:!0}),e}();t.Config=o,o.prototype.controls={}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleOrderedList=void 0;var r=n(31),o=n(67),i=n(35),a=n(38);t.toggleOrderedList=function(e,t,n,s){if(!t)return s;var u=t.parentElement;if(!u)return s;if(u.tagName.toLowerCase()!==e.element){var l=r.Dom.replace(u,e.element,n.createInside);return(0,a.toggleCSS)(e,l,n,s),i.REPLACE}return(0,a.toggleCSS)(e,t.parentElement,n,i.INITIAL,!0)===i.CHANGE?(0,a.toggleCSS)(e,t.parentElement,n,s):((0,o.extractSelectedPart)(u,t,n),r.Dom.unwrap(t.parentElement),r.Dom.replace(t,n.o.enter,n.createInside),s)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.extractSelectedPart=void 0;var r=n(68),o=n(16),i=n(31);function a(e,t,n){var r=t.extractContents();r.textContent&&(0,o.trim)(r.textContent).length||!r.firstChild||i.Dom.unwrap(r.firstChild),e.parentNode&&(0,o.call)(n?i.Dom.before:i.Dom.after,e,r)}t.extractSelectedPart=function(e,t,n){var o=n.s.createRange(),i=r.Select.isMarker(t.previousSibling)?t.previousSibling:t;o.setStartBefore(e),o.setEndBefore(i),a(e,o,!0);var s=r.Select.isMarker(t.nextSibling)?t.nextSibling:t;o.setStartAfter(s),o.setEndAfter(e),a(e,o,!1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Select=void 0;var r=n(1),o=n(33),i=n(33),a=n(31),s=n(16),u=n(35),l=n(46),c=function(){function e(e){var t=this;this.jodit=e,e.e.on("removeMarkers",(function(){t.removeMarkers()}))}return Object.defineProperty(e.prototype,"j",{get:function(){return this.jodit},enumerable:!1,configurable:!0}),e.prototype.errorNode=function(e){if(!a.Dom.isNode(e))throw(0,s.error)("Parameter node must be instance of Node")},Object.defineProperty(e.prototype,"area",{get:function(){return this.j.editor},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"win",{get:function(){return this.j.ew},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doc",{get:function(){return this.j.ed},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"sel",{get:function(){return this.j.o.shadowRoot&&(0,s.isFunction)(this.j.o.shadowRoot.getSelection)?this.j.o.shadowRoot.getSelection():this.win.getSelection()},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"range",{get:function(){var e=this.sel;return e&&e.rangeCount?e.getRangeAt(0):this.createRange()},enumerable:!1,configurable:!0}),e.prototype.createRange=function(e){void 0===e&&(e=!1);var t=this.doc.createRange();return e&&this.selectRange(t),t},e.prototype.remove=function(){var e=this.sel,t=this.current();if(e&&t)for(var n=0;e.rangeCount>n;n+=1)e.getRangeAt(n).deleteContents(),e.getRangeAt(n).collapse(!0)},e.prototype.clear=function(){var e,t;(null===(e=this.sel)||void 0===e?void 0:e.rangeCount)&&(null===(t=this.sel)||void 0===t||t.removeAllRanges())},e.prototype.removeNode=function(e){if(!a.Dom.isOrContains(this.j.editor,e,!0))throw(0,s.error)("Selection.removeNode can remove only editor's children");a.Dom.safeRemove(e),this.j.e.fire("afterRemoveNode",e)},e.prototype.insertCursorAtPoint=function(e,t){var n=this;this.removeMarkers();try{var r=this.createRange();return function(){if(n.doc.caretPositionFromPoint&&(o=n.doc.caretPositionFromPoint(e,t)))r.setStart(o.offsetNode,o.offset);else if(n.doc.caretRangeFromPoint){var o=n.doc.caretRangeFromPoint(e,t);r.setStart(o.startContainer,o.startOffset)}}(),r.collapse(!0),this.selectRange(r),!0}catch(e){}return!1},e.isMarker=function(e){return a.Dom.isNode(e)&&a.Dom.isTag(e,"span")&&e.hasAttribute("data-"+o.MARKER_CLASS)},Object.defineProperty(e.prototype,"hasMarkers",{get:function(){return Boolean(this.markers.length)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"markers",{get:function(){return(0,s.$$)("span[data-"+o.MARKER_CLASS+"]",this.area)},enumerable:!1,configurable:!0}),e.prototype.removeMarkers=function(){this.markers.forEach(a.Dom.safeRemove)},e.prototype.marker=function(e,t){void 0===e&&(e=!1);var n=null;t&&(n=t.cloneRange()).collapse(e);var r=this.j.createInside.span();return r.id=o.MARKER_CLASS+"_"+Number(new Date)+"_"+String(Math.random()).slice(2),r.style.lineHeight="0",r.style.display="none",r.setAttribute("data-"+o.MARKER_CLASS,e?"start":"end"),r.appendChild(this.j.createInside.text(o.INVISIBLE_SPACE)),n&&a.Dom.isOrContains(this.area,e?n.startContainer:n.endContainer)&&n.insertNode(r),r},e.prototype.restore=function(){var e=!1,t=function(e){return"span[data-".concat(o.MARKER_CLASS,"=").concat(e?"start":"end","]")},n=this.area.querySelector(t(!0)),r=this.area.querySelector(t(!1));if(n){if(e=this.createRange(),r)e.setStartAfter(n),a.Dom.safeRemove(n),e.setEndBefore(r),a.Dom.safeRemove(r);else{var i=n.previousSibling;a.Dom.isText(i)?e.setStart(i,i.nodeValue?i.nodeValue.length:0):e.setStartBefore(n),a.Dom.safeRemove(n),e.collapse(!0)}e&&this.selectRange(e)}},e.prototype.save=function(e){if(void 0===e&&(e=!1),this.hasMarkers)return[];var t=this.sel;if(!t||!t.rangeCount)return[];for(var n=[],r=t.rangeCount,o=[],i=0;r>i;i+=1)if(o[i]=t.getRangeAt(i),o[i].collapsed){var a=this.marker(!0,o[i]);n[i]={startId:a.id,collapsed:!0,startMarker:a.outerHTML}}else{a=this.marker(!0,o[i]);var s=this.marker(!1,o[i]);n[i]={startId:a.id,endId:s.id,collapsed:!1,startMarker:a.outerHTML,endMarker:s.outerHTML}}if(!e)for(t.removeAllRanges(),i=r-1;i>=0;--i){var u=this.doc.getElementById(n[i].startId);if(u)if(n[i].collapsed)o[i].setStartAfter(u),o[i].collapse(!0);else if(o[i].setStartBefore(u),n[i].endId){var l=this.doc.getElementById(n[i].endId);l&&o[i].setEndAfter(l)}try{t.addRange(o[i].cloneRange())}catch(e){}}return n},e.prototype.focus=function(e){var t,n;if(void 0===e&&(e={preventScroll:!0}),!this.isFocused()){var r=(0,s.getScrollParent)(this.j.container),o=null==r?void 0:r.scrollTop;this.j.iframe&&"complete"===this.doc.readyState&&this.j.iframe.focus(e),this.win.focus(),this.area.focus(e),o&&(null==r?void 0:r.scrollTo)&&r.scrollTo(0,o);var i=this.sel,u=(null==i?void 0:i.rangeCount)?null==i?void 0:i.getRangeAt(0):null;if(!u||!a.Dom.isOrContains(this.area,u.startContainer)){var l=this.createRange();l.setStart(this.area,0),l.collapse(!0),this.selectRange(l,!1)}return this.j.editorIsActive||null===(n=null===(t=this.j)||void 0===t?void 0:t.events)||void 0===n||n.fire("focus"),!0}return!1},e.prototype.isCollapsed=function(){for(var e=this.sel,t=0;e&&e.rangeCount>t;t+=1)if(!e.getRangeAt(t).collapsed)return!1;return!0},e.prototype.isFocused=function(){return this.doc.hasFocus&&this.doc.hasFocus()&&this.area===this.doc.activeElement},e.prototype.current=function(e){if(void 0===e&&(e=!0),this.j.getRealMode()===o.MODE_WYSIWYG){var t=this.sel;if(!t||0===t.rangeCount)return null;var n=t.getRangeAt(0),r=n.startContainer,i=!1,s=function(e){return i?e.lastChild:e.firstChild};if(a.Dom.isTag(r,"br")&&t.isCollapsed)return r;if(!a.Dom.isText(r)){if((r=n.startContainer.childNodes[n.startOffset])||(r=n.startContainer.childNodes[n.startOffset-1],i=!0),r&&t.isCollapsed&&!a.Dom.isText(r))if(!i&&a.Dom.isText(r.previousSibling))r=r.previousSibling;else if(e)for(var u=s(r);u;){if(u&&a.Dom.isText(u)){r=u;break}u=s(u)}if(r&&!t.isCollapsed&&!a.Dom.isText(r)){var l=r,c=r;do{l=l.firstChild,c=c.lastChild}while(l&&c&&!a.Dom.isText(l));l===c&&l&&a.Dom.isText(l)&&(r=l)}}if(r&&a.Dom.isOrContains(this.area,r))return r}return null},e.prototype.insertNode=function(e,t,n){var r;void 0===t&&(t=!0),void 0===n&&(n=!0),this.errorNode(e),this.j.e.fire("safeHTML",e),!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore());var o=this.sel;if(this.isCollapsed()||this.j.execCommand("Delete"),o&&o.rangeCount){var s=o.getRangeAt(0);a.Dom.isOrContains(this.area,s.commonAncestorContainer)?a.Dom.isTag(s.startContainer,i.INSEPARABLE_TAGS)&&s.collapsed?null===(r=s.startContainer.parentNode)||void 0===r||r.insertBefore(e,s.startContainer):(s.deleteContents(),s.insertNode(e)):this.area.appendChild(e)}else this.area.appendChild(e);t&&(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.lastChild&&this.setCursorAfter(e.lastChild):this.setCursorAfter(e)),n&&this.j.events&&this.j.e.fire("synchro"),this.j.events&&this.j.e.fire("afterInsertNode",e)},e.prototype.insertHTML=function(e){if(""!==e){var t,n=this.j.createInside.div(),r=this.j.createInside.fragment();if(!this.isFocused()&&this.j.isEditorMode()&&(this.focus(),this.restore()),a.Dom.isNode(e)?n.appendChild(e):n.innerHTML=e.toString(),(this.j.isEditorMode()||!1!==this.j.e.fire("insertHTML",n.innerHTML))&&(t=n.lastChild)){for(;n.firstChild;)t=n.firstChild,r.appendChild(n.firstChild);this.insertNode(r,!1,!1),t?this.setCursorAfter(t):this.setCursorIn(r),this.j.e&&this.j.e.fire("synchro")}}},e.prototype.insertImage=function(e,t,n){void 0===t&&(t=null),void 0===n&&(n=null);var r=(0,s.isString)(e)?this.j.createInside.element("img"):e;if((0,s.isString)(e)&&r.setAttribute("src",e),null!=n){var o=n.toString();o&&"auto"!==o&&0>String(o).indexOf("px")&&0>String(o).indexOf("%")&&(o+="px"),(0,s.call)(this.j.o.resizer.forImageChangeAttributes?s.attr:s.css,r,"width",o)}t&&"object"==typeof t&&(0,s.css)(r,t);var i=function(){(r.offsetHeight>r.naturalHeight||r.offsetWidth>r.naturalWidth)&&(r.style.width="",r.style.height=""),r.removeEventListener("load",i)};this.j.e.on(r,"load",i),r.complete&&i(),this.insertNode(r),this.j.e.fire("afterInsertImage",r)},e.prototype.eachSelection=function(t){var n,r=this,o=this.sel;if(o&&o.rangeCount){var u=o.getRangeAt(0),l=u.commonAncestorContainer;a.Dom.isHTMLElement(l)||(l=l.parentElement);var c=[],d=u.startOffset,f=l.childNodes.length,p=u.startContainer===this.area?l.childNodes[f>d?d:f-1]:u.startContainer,h=u.endContainer===this.area?l.childNodes[u.endOffset-1]:u.endContainer;a.Dom.isText(p)&&p===u.startContainer&&u.startOffset===(null===(n=p.nodeValue)||void 0===n?void 0:n.length)&&p.nextSibling&&(p=p.nextSibling),a.Dom.isText(h)&&h===u.endContainer&&0===u.endOffset&&h.previousSibling&&(h=h.previousSibling);var v=function(t){!t||t===l||a.Dom.isEmptyTextNode(t)||e.isMarker(t)||c.push(t)};v(p),p!==h&&a.Dom.find(p,(function(e){return v(e),e===h||e&&e.contains&&e.contains(h)}),l,!0,!1);var _=function(e){if(a.Dom.isOrContains(r.j.editor,e,!0)){if(e.nodeName.match(/^(UL|OL)$/))return(0,s.toArray)(e.childNodes).forEach(_);if(a.Dom.isTag(e,"li"))if(e.firstChild)e=e.firstChild;else{var n=r.j.createInside.text(i.INVISIBLE_SPACE);e.appendChild(n),e=n}t(e)}};0===c.length&&a.Dom.isEmptyTextNode(p)&&c.push(p),0===c.length&&p.firstChild&&c.push(p.firstChild),c.forEach(_)}},e.prototype.cursorInTheEdge=function(e,t){var n,r,o=!e,u=null===(n=this.sel)||void 0===n?void 0:n.getRangeAt(0),l=this.current(!1);if(!u||!l||!a.Dom.isOrContains(t,l,!0))return null;var c=e?u.startContainer:u.endContainer,d=e?u.startOffset:u.endOffset,f=function(e){return e&&!a.Dom.isTag(e,"br")&&!a.Dom.isEmptyTextNode(e)};if(a.Dom.isText(c)){var p=(null===(r=c.nodeValue)||void 0===r?void 0:r.length)?c.nodeValue:"";if(o&&p.replace((0,i.INVISIBLE_SPACE_REG_EXP_END)(),"").length>d)return!1;var h=(0,i.INVISIBLE_SPACE_REG_EXP_START)().exec(p);if(e&&(h&&d>h[0].length||!h&&d>0))return!1}else{var v=(0,s.toArray)(c.childNodes);if(o){if(v.slice(d).some(f))return!1}else if(v.slice(0,d).some(f))return!1}return!(0,s.call)(e?a.Dom.prev:a.Dom.next,l,f,t)},e.prototype.cursorOnTheLeft=function(e){return this.cursorInTheEdge(!0,e)},e.prototype.cursorOnTheRight=function(e){return this.cursorInTheEdge(!1,e)},e.prototype.setCursorAfter=function(e){return this.setCursorNearWith(e,!1)},e.prototype.setCursorBefore=function(e){return this.setCursorNearWith(e,!0)},e.prototype.setCursorNearWith=function(e,t){var n,r,i=this;if(this.errorNode(e),!a.Dom.up(e,(function(e){return e===i.area||e&&e.parentNode===i.area}),this.area))throw(0,s.error)("Node element must be in editor");var u=this.createRange(),l=null;return a.Dom.isText(e)?t?u.setStart(e,0):u.setEnd(e,null!==(r=null===(n=e.nodeValue)||void 0===n?void 0:n.length)&&void 0!==r?r:0):(l=this.j.createInside.text(o.INVISIBLE_SPACE),t?u.setStartBefore(e):u.setEndAfter(e),u.collapse(t),u.insertNode(l),u.selectNode(l)),u.collapse(t),this.selectRange(u),l},e.prototype.setCursorIn=function(e,t){var n=this;if(void 0===t&&(t=!1),this.errorNode(e),!a.Dom.up(e,(function(e){return e===n.area||e&&e.parentNode===n.area}),this.area))throw(0,s.error)("Node element must be in editor");var r=this.createRange(),i=e,u=e;do{if(a.Dom.isText(i))break;u=i,i=t?i.firstChild:i.lastChild}while(i);if(!i){var l=this.j.createInside.text(o.INVISIBLE_SPACE);/^(img|br|input)$/i.test(u.nodeName)?i=u:(u.appendChild(l),u=l)}return r.selectNodeContents(i||u),r.collapse(t),this.selectRange(r),u},e.prototype.selectRange=function(e,t){void 0===t&&(t=!0);var n=this.sel;t&&!this.isFocused()&&this.focus(),n&&(n.removeAllRanges(),n.addRange(e)),this.j.e.fire("changeSelection")},e.prototype.select=function(e,t){var n=this;if(void 0===t&&(t=!1),this.errorNode(e),!a.Dom.up(e,(function(e){return e===n.area||e&&e.parentNode===n.area}),this.area))throw(0,s.error)("Node element must be in editor");var r=this.createRange();r[t?"selectNodeContents":"selectNode"](e),this.selectRange(r)},Object.defineProperty(e.prototype,"html",{get:function(){var e=this.sel;if(e&&e.rangeCount>0){var t=e.getRangeAt(0).cloneContents(),n=this.j.createInside.div();return n.appendChild(t),n.innerHTML}return""},enumerable:!1,configurable:!0}),e.prototype.wrapInTagGen=function(){var t,n,o,u,l,c,d,f,p,h,v;return(0,r.__generator)(this,(function(_){switch(_.label){case 0:return this.isCollapsed()?(c=this.jodit.createInside.element("font",i.INVISIBLE_SPACE),this.insertNode(c,!1,!1),t=(0,r.__read)(this.markers,1),(n=t[0])?c.appendChild(n):(this.setCursorIn(c),this.save()),[4,c]):[3,2];case 1:return _.sent(),a.Dom.unwrap(c),[2];case 2:(0,s.$$)("*[style*=font-size]",this.area).forEach((function(e){return(0,s.attr)(e,"data-font-size",e.style.fontSize.toString())})),this.isCollapsed()?(c=this.j.createInside.element("font"),(0,s.attr)(c,"size",7),this.insertNode(c,!1,!1)):this.j.nativeExecCommand("fontsize",!1,"7"),(0,s.$$)("*[data-font-size]",this.area).forEach((function(e){var t=(0,s.attr)(e,"data-font-size");t&&(e.style.fontSize=t,(0,s.attr)(e,"data-font-size",null))})),o=(0,s.$$)('font[size="7"]',this.area),_.label=3;case 3:_.trys.push([3,8,9,10]),u=(0,r.__values)(o),l=u.next(),_.label=4;case 4:return l.done?[3,7]:(f=(c=l.value).lastChild,(d=c.firstChild)&&d===f&&e.isMarker(d)?(a.Dom.unwrap(c),[3,6]):(d&&e.isMarker(d)&&a.Dom.before(c,d),f&&e.isMarker(f)&&a.Dom.after(c,f),[4,c]));case 5:_.sent(),a.Dom.unwrap(c),_.label=6;case 6:return l=u.next(),[3,4];case 7:return[3,10];case 8:return p=_.sent(),h={error:p},[3,10];case 9:try{l&&!l.done&&(v=u.return)&&v.call(u)}finally{if(h)throw h.error}return[7];case 10:return[2]}}))},e.prototype.wrapInTag=function(t){var n,o,i=[];try{for(var u=(0,r.__values)(this.wrapInTagGen()),l=u.next();!l.done;l=u.next()){var c=l.value;try{if(c.firstChild&&c.firstChild===c.lastChild&&e.isMarker(c.firstChild))continue;(0,s.isFunction)(t)?t(c):i.push(a.Dom.replace(c,t,this.j.createInside))}finally{var d=c.parentNode;d&&(a.Dom.unwrap(c),a.Dom.isEmpty(d)&&a.Dom.unwrap(d))}}}catch(e){n={error:e}}finally{try{l&&!l.done&&(o=u.return)&&o.call(u)}finally{if(n)throw n.error}}return i},e.prototype.applyStyle=function(e,t){void 0===t&&(t={}),new u.CommitStyle({style:e,element:t.element,className:t.className,defaultTag:t.defaultTag}).apply(this.j)},e.prototype.splitSelection=function(e){if(!this.isCollapsed())return null;var t=this.createRange(),n=this.range;t.setStartBefore(e);var r=this.cursorOnTheRight(e),o=this.cursorOnTheLeft(e),s=this.j.createInside.element("br"),u=this.j.createInside.text(i.INVISIBLE_SPACE),l=u.cloneNode();try{if(r||o){n.insertNode(s);var c=function(e,t){for(var n=t(e);n;){var r=t(n);if(!n||!a.Dom.isTag(n,"br")&&!a.Dom.isEmptyTextNode(n))break;a.Dom.safeRemove(n),n=r}};c(s,(function(e){return e.nextSibling})),c(s,(function(e){return e.previousSibling})),a.Dom.after(s,l),a.Dom.before(s,u),r?(t.setEndBefore(s),n.setEndBefore(s)):(t.setEndAfter(s),n.setEndAfter(s))}else t.setEnd(n.startContainer,n.startOffset);var d=t.extractContents();if(e.parentNode)try{if(e.parentNode.insertBefore(d,e),r&&(null==s?void 0:s.parentNode)){var f=this.createRange();f.setStartBefore(s),this.selectRange(f)}}catch(e){}var p=function(e){var t,n,r;(null===(t=null==e?void 0:e.parentNode)||void 0===t?void 0:t.firstChild)===(null===(n=null==e?void 0:e.parentNode)||void 0===n?void 0:n.lastChild)&&(null===(r=null==e?void 0:e.parentNode)||void 0===r||r.appendChild(s.cloneNode()))};p(u),p(l)}finally{a.Dom.safeRemove(u),a.Dom.safeRemove(l)}return e.previousElementSibling},(0,r.__decorate)([l.autobind],e.prototype,"createRange",null),(0,r.__decorate)([l.autobind],e.prototype,"focus",null),(0,r.__decorate)([l.autobind],e.prototype,"setCursorAfter",null),(0,r.__decorate)([l.autobind],e.prototype,"setCursorBefore",null),(0,r.__decorate)([l.autobind],e.prototype,"setCursorIn",null),e}();t.Select=c},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.elementHasSameStyleKeys=t.elementHasSameStyle=void 0;var r=n(16),o=n(31);t.elementHasSameStyle=function(e,t){return Boolean(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every((function(n){var o=(0,r.css)(e,n,!0);return!(0,r.isVoid)(o)&&""!==o&&!(0,r.isVoid)(t[n])&&(0,r.normalizeCssValue)(n,t[n]).toString().toLowerCase()===o.toString().toLowerCase()})))},t.elementHasSameStyleKeys=function(e,t){return Boolean(!o.Dom.isTag(e,"font")&&o.Dom.isHTMLElement(e)&&Object.keys(t).every((function(t){return!(0,r.isVoid)((0,r.css)(e,t,!0))})))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.FiniteStateMachine=void 0;var r=n(1),o=function(){function e(e,t){this.state=e,this.transitions=t,this.subState="",this.silent=!0}return e.prototype.setState=function(e,t){this.state=e,null!=t&&(this.subState=t)},e.prototype.getState=function(){return this.state},e.prototype.getSubState=function(){return this.subState},e.prototype.disableSilent=function(){this.silent=!1},e.prototype.dispatch=function(e){for(var t=[],n=1;arguments.length>n;n++)t[n-1]=arguments[n];var o=this.transitions[this.state][e];if(o){var i=o.call.apply(o,(0,r.__spreadArray)([this],(0,r.__read)(t),!1));return i}if(!this.silent)throw new Error("invalid action: "+this.state+"."+e)},e}();t.FiniteStateMachine=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSuitChild=void 0;var r=n(31),o=n(72),i=n(73);t.getSuitChild=function(e,t){for(var n=t.firstChild;n&&!(0,o.isNormalNode)(n);)if(!(n=n.nextSibling))return null;return n&&!r.Dom.next(n,o.isNormalNode,t)&&(0,i.isSuitElement)(e,n,!1)?n:null}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isNormalNode=void 0;var r=n(31);t.isNormalNode=function(e){return Boolean(e&&!r.Dom.isEmptyTextNode(e)&&!r.Dom.isTemporary(e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isSameStyleChild=t.isSuitElement=void 0;var r=n(72),o=n(69),i=n(31);t.isSuitElement=function(e,t,n){if(!t)return!1;var a=e.element,s=e.elementIsDefault,u=e.options,l=Boolean(u.style&&(0,o.elementHasSameStyle)(t,u.style)),c=t.nodeName.toLowerCase()===a||i.Dom.isTag(t,["ul","ol"])&&e.elementIsList;return!!((!s||!n)&&c||l&&(0,r.isNormalNode)(t))||Boolean(!c&&!n&&s&&i.Dom.isInlineBlock(t))},t.isSameStyleChild=function(e,t){var n=e.element,i=e.options;if(!t||!(0,r.isNormalNode)(t))return!1;var a=t.nodeName.toLowerCase()===n,s=Boolean(i.style&&(0,o.elementHasSameStyleKeys)(t,i.style));return a&&s}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getSuitParent=void 0;var r=n(31),o=n(72),i=n(73);t.getSuitParent=function e(t,n,a){var s=n.parentNode;return s===a||!r.Dom.isHTMLElement(s)||r.Dom.next(n,o.isNormalNode,s)||r.Dom.prev(n,o.isNormalNode,s)?null:t.isElementCommit&&t.elementIsBlock&&!r.Dom.isBlock(s)?e(t,s,a):!(0,i.isSuitElement)(t,s,!1)||r.Dom.isBlock(s)&&!t.elementIsBlock?null:s}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isInsideInvisibleElement=void 0;var r=n(31);t.isInsideInvisibleElement=function(e,t){return Boolean(r.Dom.closest(e,["style","script"],t))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toggleCommitStyles=void 0;var r=n(31);t.toggleCommitStyles=function(e,t){return!!(e.elementIsBlock||r.Dom.isTag(t,e.element)&&!e.elementIsDefault)&&(r.Dom.unwrap(t),!0)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.unwrapChildren=void 0;var r=n(31),o=n(73),i=n(16);t.unwrapChildren=function(e,t){var n,a=[],s=[],u=e.options.style;if(t.firstChild)for(var l=r.Dom.eachGen(t),c=l.next(),d=function(){var t=c.value;(0,o.isSuitElement)(e,t,!0)?(void 0===n&&(n=!0),a.push(t)):u&&(0,o.isSameStyleChild)(e,t)?(void 0===n&&(n=!1),s.push((function(){(0,i.css)(t,Object.keys(u).reduce((function(e,t){return e[t]=null,e}),{})),(0,i.attr)(t,"style")||(0,i.attr)(t,"style",null),t.nodeName.toLowerCase()===e.element&&a.push(t)}))):r.Dom.isEmptyTextNode(t)||void 0===n&&(n=!1),c=l.next()};!c.done;)d();return s.forEach((function(e){return e()})),a.forEach(r.Dom.unwrap),Boolean(n)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapAndCommitStyle=void 0;var r=n(31),o=n(79),i=n(16),a=n(80);t.wrapAndCommitStyle=function(e,t,n){var s=function(e,t,n){if(e.elementIsBlock){var a=r.Dom.up(t,(function(e){return r.Dom.isBlock(e)&&!r.Dom.isTag(e,["td","th","tr","tbody","table","li","ul","ol"])}),n.editor);if(a)return a}return e.elementIsBlock?(0,o.wrapUnwrappedText)(e,t,n,n.s.createRange):((0,i.attr)(t,"size",null),t)}(e,t,n);return e.elementIsList?(0,a.wrapOrderedList)(e,s,n):r.Dom.replace(s,e.element,n.createInside,!0)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapUnwrappedText=void 0;var r=n(31);t.wrapUnwrappedText=function(e,t,n,o){var i=n.editor,a=n.createInside,s=function(e,t){void 0===t&&(t="previousSibling");for(var o=e,a=e;a&&!r.Dom.isTag(a,n.o.enter)&&(o=a,a=a[t]?a[t]:a.parentNode&&!r.Dom.isBlock(a.parentNode)&&a.parentNode!==i?a.parentNode:null,!r.Dom.isBlock(a)););return o},u=s(t),l=s(t,"nextSibling"),c=o();c.setStartBefore(u),c.setEndAfter(l);var d=c.extractContents(),f=a.element(e.element);return f.appendChild(d),c.insertNode(f),e.elementIsBlock&&r.Dom.isEmpty(f)&&!r.Dom.isTag(f.firstElementChild,"br")&&f.appendChild(a.element("br")),f}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.wrapOrderedList=void 0;var r=n(31);t.wrapOrderedList=function(e,t,n){var o=r.Dom.replace(t,"li",n.createInside),i=o.previousElementSibling||o.nextElementSibling;return r.Dom.isTag(i,["ul","ol"])||(i=n.createInside.element(e.element),r.Dom.before(o,i)),o.previousElementSibling===i?r.Dom.append(i,o):r.Dom.prepend(i,o),i}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isInt=void 0;var r=n(21),o=n(10);t.isInt=function(e){return(0,o.isString)(e)&&(0,r.isNumeric)(e)&&(e=parseFloat(e)),"number"==typeof e&&Number.isFinite(e)&&!(e%1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isViewObject=t.isJoditObject=void 0;var r=n(7),o=n(39);t.isJoditObject=function(e){return Boolean(e&&e instanceof Object&&(0,r.isFunction)(e.constructor)&&("undefined"!=typeof Jodit&&e instanceof Jodit||e.isJodit))},t.isViewObject=function(e){return Boolean(e&&e instanceof Object&&(0,r.isFunction)(e.constructor)&&(e instanceof o.modules.View||e.isView))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isLicense=void 0;var r=n(10);t.isLicense=function(e){return(0,r.isString)(e)&&23===e.length&&/^[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}-[a-z0-9]{5}$/i.test(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNativeFunction=void 0,t.isNativeFunction=function(e){return Boolean(e)&&"function"===(typeof e).toLowerCase()&&(e===Function.prototype||/^\s*function\s*(\b[a-z$_][a-z0-9$_]*\b)*\s*\((|([a-z$_][a-z0-9$_]*)(\s*,[a-z$_][a-z0-9$_]*)*)\)\s*{\s*\[native code]\s*}\s*$/i.test(String(e)))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isNumber=void 0,t.isNumber=function(e){return"number"==typeof e&&!isNaN(e)&&isFinite(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.isPlainObject=void 0;var r=n(87);t.isPlainObject=function(e){return!(!e||"object"!=typeof e||e.nodeType||(0,r.isWindow)(e)||e.constructor&&!{}.hasOwnProperty.call(e.constructor.prototype,"isPrototypeOf"))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isWindow=void 0,t.isWindow=function(e){return null!=e&&e===e.window}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isURL=void 0,t.isURL=function(e){if(e.includes(" "))return!1;if("undefined"!=typeof URL)try{var t=new URL(e);return["https:","http:","ftp:","file:","rtmp:"].includes(t.protocol)}catch(e){return!1}var n=document.createElement("a");return n.href=e,Boolean(n.hostname)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.isValidName=void 0,t.isValidName=function(e){return!!e.length&&!/[^0-9A-Za-zа-яА-ЯЁё\w\-_.]/.test(e)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.LimitedStack=void 0;var n=function(){function e(e){this.limit=e,this.stack=[]}return e.prototype.push=function(e){return this.stack.push(e),this.stack.length>this.limit&&this.stack.shift(),this},e.prototype.pop=function(){return this.stack.pop()},e.prototype.find=function(e){return this.stack.find(e)},e}();t.LimitedStack=n},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.loadNextStyle=t.loadNext=t.appendStyleAsync=t.appendScriptAsync=t.appendScript=void 0;var r=n(1),o=n(92),i=n(23),a=new Map,s=function(e){return function(t,n){return(0,r.__awaiter)(void 0,void 0,Promise,(function(){var o;return(0,r.__generator)(this,(function(r){return a.has(n)?[2,a.get(n)]:(o=e(t,n),a.set(n,o),[2,o])}))}))}};t.appendScript=function(e,t,n){var r=e.c.element("script");return r.type="text/javascript",r.async=!0,(0,i.isFunction)(n)&&!e.isInDestruct&&e.e.on(r,"load",n),r.src||(r.src=(0,o.completeUrl)(t)),e.od.body.appendChild(r),{callback:n,element:r}},t.appendScriptAsync=s((function(e,n){return new Promise((function(r,o){var i=(0,t.appendScript)(e,n,r).element;!e.isInDestruct&&e.e.on(i,"error",o)}))})),t.appendStyleAsync=s((function(e,t){return new Promise((function(n,r){var i=e.c.element("link");i.rel="stylesheet",i.media="all",i.crossOrigin="anonymous",!e.isInDestruct&&e.e.on(i,"load",(function(){return n(i)})).on(i,"error",r),i.href=(0,o.completeUrl)(t),e.o.shadowRoot?e.o.shadowRoot.appendChild(i):e.od.body.appendChild(i)}))})),t.loadNext=function(e,n,r){return void 0===r&&(r=0),(0,i.isString)(n[r])?(0,t.appendScriptAsync)(e,n[r]).then((function(){return(0,t.loadNext)(e,n,r+1)})):Promise.resolve()},t.loadNextStyle=function(e,n,r){return void 0===r&&(r=0),(0,i.isString)(n[r])?(0,t.appendStyleAsync)(e,n[r]).then((function(){return(0,t.loadNextStyle)(e,n,r+1)})):Promise.resolve()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.completeUrl=void 0,t.completeUrl=function(e){return"file:"===window.location.protocol&&/^\/\//.test(e)&&(e="https:"+e),e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.browser=void 0,t.browser=function(e){var t=navigator.userAgent.toLowerCase(),n=/(firefox)[\s/]([\w.]+)/.exec(t)||/(chrome)[\s/]([\w.]+)/.exec(t)||/(webkit)[\s/]([\w.]+)/.exec(t)||/(opera)(?:.*version)[\s/]([\w.]+)/.exec(t)||/(msie)[\s]([\w.]+)/.exec(t)||/(trident)\/([\w.]+)/.exec(t)||0>t.indexOf("compatible")||[];return"version"===e?n[2]:"webkit"===e?"chrome"===n[1]||"webkit"===n[1]:"ff"===e?"firefox"===n[1]:"msie"===e?"trident"===n[1]||"msie"===n[1]:n[1]===e}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.buildQuery=void 0;var r=n(23);t.buildQuery=function(e,n){var o=[],i=encodeURIComponent;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var s=n?n+"["+a+"]":a,u=e[a];o.push((0,r.isPlainObject)(u)?(0,t.buildQuery)(u,s):i(s)+"="+i(u))}return o.join("&")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ConfigFlatten=t.ConfigProto=void 0;var r=n(1),o=n(96),i=n(23),a=n(65),s=n(6);t.ConfigProto=function e(t,n,s){if(void 0===s&&(s=0),Object.getPrototypeOf(t)!==Object.prototype)return t;var u=a.Config.defaultOptions;if((0,i.isString)(t.preset)){if(void 0!==u.presets[t.preset]){var l=u.presets[t.preset];Object.keys(l).forEach((function(e){(0,i.isVoid)(t[e])&&(t[e]=l[e])}))}delete t.preset}var c={};return Object.keys(t).forEach((function(a){var u=t[a],l=n?n[a]:null;c[a]=(0,i.isPlainObject)(u)&&(0,i.isPlainObject)(l)&&!(0,o.isAtom)(u)?e(u,l,s+1):0!==s&&(0,i.isArray)(u)&&!(0,o.isAtom)(u)&&(0,i.isArray)(l)?(0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(u),!1),(0,r.__read)(l.slice(u.length)),!1):u})),Object.setPrototypeOf(c,n),c},t.ConfigFlatten=function(e){return(0,s.keys)(e,!1).reduce((function(t,n){return t[n]=e[n],t}),{})}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.fastClone=t.markAsAtomic=t.isAtom=void 0;var r=n(27);t.isAtom=function(e){return e&&e.isAtom},t.markAsAtomic=function(e){return Object.defineProperty(e,"isAtom",{enumerable:!1,value:!0,configurable:!1}),e},t.fastClone=function(e){return JSON.parse((0,r.stringify)(e))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.convertMediaUrlToVideoEmbed=void 0;var r=n(23),o=n(98);t.convertMediaUrlToVideoEmbed=function(e,t,n){if(void 0===t&&(t=400),void 0===n&&(n=345),!(0,r.isURL)(e))return e;var i=document.createElement("a"),a=/(?:http?s?:\/\/)?(?:www\.)?(?:vimeo\.com)\/?(.+)/g;i.href=e,t||(t=400),n||(n=345);var s=i.protocol||"";switch(i.hostname){case"www.vimeo.com":case"vimeo.com":return a.test(e)?e.replace(a,'<iframe width="'+t+'" height="'+n+'" src="'+s+'//player.vimeo.com/video/$1" frameborder="0" allowfullscreen></iframe>'):e;case"youtube.com":case"www.youtube.com":case"youtu.be":case"www.youtu.be":var u=i.search?(0,o.parseQuery)(i.search):{v:i.pathname.substr(1)};return u.v?'<iframe width="'+t+'" height="'+n+'" src="'+s+"//www.youtube.com/embed/"+u.v+'" frameborder="0" allowfullscreen></iframe>':e}return e}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.parseQuery=void 0,t.parseQuery=function(e){for(var t={},n=e.substr(1).split("&"),r=0;n.length>r;r+=1){var o=n[r].split("=");t[decodeURIComponent(o[0])]=decodeURIComponent(o[1]||"")}return t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.clearCenterAlign=t.css=void 0;var r=n(23),o=n(100),i=n(59);function a(e,t,n,s){void 0===s&&(s=!1);var u=/^(left|top|bottom|right|width|min|max|height|margin|padding|fontsize|font-size)/i;if((0,r.isBoolean)(n)&&(s=n,n=void 0),(0,r.isPlainObject)(t)||void 0!==n){var l=function(e,t,n){!(0,r.isVoid)(n)&&u.test(t)&&(0,r.isNumeric)(n.toString())&&(n=parseInt(n.toString(),10)+"px"),void 0===n||null!=n&&a(e,t,!0)===(0,o.normalizeCssValue)(t,n)||(e.style[t]=n)};if((0,r.isPlainObject)(t))for(var c=Object.keys(t),d=0;c.length>d;d+=1)l(e,(0,i.camelCase)(c[d]),t[c[d]]);else l(e,(0,i.camelCase)(t),n);return""}var f=(0,i.kebabCase)(t),p=e.ownerDocument||document,h=!!p&&(p.defaultView||p.parentWindow),v=e.style[t],_="";return void 0!==v&&""!==v?_=v:h&&!s&&(_=h.getComputedStyle(e).getPropertyValue(f)),u.test(t)&&/^[-+]?[0-9.]+px$/.test(_.toString())&&(_=parseInt(_.toString(),10)),(0,o.normalizeCssValue)(t,_)}t.css=a,t.clearCenterAlign=function(e){"block"===a(e,"display")&&a(e,"display","");var t=e.style;"auto"===t.marginLeft&&"auto"===t.marginRight&&(t.marginLeft="",t.marginRight="")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(101),t),(0,r.__exportStar)(n(102),t),(0,r.__exportStar)(n(103),t),(0,r.__exportStar)(n(104),t),(0,r.__exportStar)(n(105),t),(0,r.__exportStar)(n(106),t),(0,r.__exportStar)(n(107),t),(0,r.__exportStar)(n(108),t),(0,r.__exportStar)(n(111),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeKeyAliases=void 0;var r=n(59),o=n(33);t.normalizeKeyAliases=function(e){var t={};return e.replace(/\+\+/g,"+add").split(/[\s]*\+[\s]*/).map((function(e){return(0,r.trim)(e.toLowerCase())})).map((function(e){return o.KEY_ALIASES[e]||e})).sort().filter((function(e){return!t[e]&&""!==e&&(t[e]=!0)})).join("+")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeLicense=void 0,t.normalizeLicense=function(e,t){void 0===t&&(t=8);for(var n=[];e.length;)n.push(e.substr(0,t)),e=e.substr(t);return n[1]=n[1].replace(/./g,"*"),n[2]=n[2].replace(/./g,"*"),n.join("-")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeNode=void 0;var r=n(33),o=n(31);t.normalizeNode=function(e){if(e){if(o.Dom.isText(e)&&null!=e.nodeValue&&e.parentNode)for(;o.Dom.isText(e.nextSibling);)null!=e.nextSibling.nodeValue&&(e.nodeValue+=e.nextSibling.nodeValue),e.nodeValue=e.nodeValue.replace((0,r.INVISIBLE_SPACE_REG_EXP)(),""),o.Dom.safeRemove(e.nextSibling);else(0,t.normalizeNode)(e.firstChild);(0,t.normalizeNode)(e.nextSibling)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizePath=void 0;var r=n(59);t.normalizePath=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return e.filter((function(e){return(0,r.trim)(e).length})).map((function(t,n){return t=t.replace(/([^:])[\\/]+/g,"$1/"),n&&(t=t.replace(/^\//,"")),n!==e.length-1&&(t=t.replace(/\/$/,"")),t})).join("/")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeRelativePath=void 0,t.normalizeRelativePath=function(e){return e.split("/").reduce((function(e,t){switch(t){case"":case".":break;case"..":e.pop();break;default:e.push(t)}return e}),[]).join("/")+(e.endsWith("/")?"/":"")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeSize=void 0,t.normalizeSize=function(e){return/^[0-9]+$/.test(e.toString())?e+"px":e.toString()}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeUrl=void 0,t.normalizeUrl=function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];return e.filter((function(e){return e.length})).map((function(e){return e.replace(/\/$/,"")})).join("/").replace(/([^:])[\\/]+/g,"$1/")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeCssValue=void 0;var r=n(23),o=n(59),i=n(109);t.normalizeCssValue=function(e,t){if("font-weight"===(0,o.kebabCase)(e)){switch(t.toString().toLowerCase()){case"700":case"bold":return 700;case"400":case"normal":return 400;case"900":case"heavy":return 900}return(0,r.isNumeric)(t)?Number(t):t}return/color/i.test(e)&&/^rgb/i.test(t.toString())&&(0,i.colorToHex)(t.toString())||t}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(110),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.colorToHex=void 0,t.colorToHex=function(e){if("rgba(0, 0, 0, 0)"===e||""===e)return!1;if(!e)return"#000000";if("#"===e.substr(0,1))return e;var t=/([\s\n\t\r]*?)rgb\((\d+), (\d+), (\d+)\)/.exec(e)||/([\s\n\t\r]*?)rgba\((\d+), (\d+), (\d+), ([\d.]+)\)/.exec(e);if(!t)return"#000000";for(var n=parseInt(t[2],10),r=parseInt(t[3],10),o=(parseInt(t[4],10)|r<<8|n<<16).toString(16).toUpperCase();6>o.length;)o="0"+o;return t[1]+"#"+o}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.normalizeColor=void 0;var r=n(109),o=n(59);t.normalizeColor=function(e){var t=["#"],n=(0,r.colorToHex)(e);if(!n)return!1;if(3===(n=(n=(0,o.trim)(n.toUpperCase())).substr(1)).length){for(var i=0;3>i;i+=1)t.push(n[i]),t.push(n[i]);return t.join("")}return n.length>6&&(n=n.substr(0,6)),"#"+n}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ctrlKey=void 0,t.ctrlKey=function(e){if("undefined"!=typeof navigator&&-1!==navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.defaultLanguage=void 0;var r=n(23);t.defaultLanguage=function(e,t){return void 0===t&&(t="en"),"auto"!==e&&(0,r.isString)(e)?e:document.documentElement&&document.documentElement.lang?document.documentElement.lang:navigator.language?navigator.language.substr(0,2):t}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.humanSizeToBytes=void 0,t.humanSizeToBytes=function(e){if(/^[0-9.]+$/.test(e.toString()))return parseFloat(e);var t=e.substr(-2,2).toUpperCase(),n=["KB","MB","GB","TB"],r=parseFloat(e.substr(0,e.length-2));return-1!==n.indexOf(t)?r*Math.pow(1024,n.indexOf(t)+1):parseInt(e,10)}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.scrollIntoViewIfNeeded=t.inView=void 0,t.inView=function(e,t,n){var r=e.getBoundingClientRect(),o=e,i=r.top,a=r.height;do{if(o&&o.parentNode){if((r=(o=o.parentNode).getBoundingClientRect()).bottom<i)return!1;if(r.top>=i+a)return!1}}while(o&&o!==t&&o.parentNode);return(n.documentElement&&n.documentElement.clientHeight||0)>=i},t.scrollIntoViewIfNeeded=function(e,n,r){(0,t.inView)(e,n,r)||(n.clientHeight!==n.scrollHeight&&(n.scrollTop=e.offsetTop),(0,t.inView)(e,n,r)||e.scrollIntoView())}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.resolveElement=t.cssPath=t.refs=t.getXPathByElement=t.$$=void 0;var r=n(33),o=n(23),i=n(17),a=n(31),s=n(59),u=n(117),l=n(119),c=1;function d(e,t){var n;if(!/:scope/.test(e)||!r.IS_IE||t&&t.nodeType===Node.DOCUMENT_NODE)n=t.querySelectorAll(e);else{var o=t.id,i=o||"_selector_id_"+String(Math.random()).slice(2)+ ++c;e=e.replace(/:scope/g,"#"+i),!o&&t.setAttribute("id",i),n=t.parentNode.querySelectorAll(e),o||t.removeAttribute("id")}return[].slice.call(n)}t.$$=d,t.getXPathByElement=function(e,n){if(!e||e.nodeType!==Node.ELEMENT_NODE)return"";if(!e.parentNode||n===e)return"";if(e.id)return"//*[@id='"+e.id+"']";var r=[].filter.call(e.parentNode.childNodes,(function(t){return t.nodeName===e.nodeName}));return(0,t.getXPathByElement)(e.parentNode,n)+"/"+e.nodeName.toLowerCase()+(r.length>1?"["+((0,u.toArray)(r).indexOf(e)+1)+"]":"")},t.refs=function(e){return e instanceof l.UIElement&&(e=e.container),d("[ref],[data-ref]",e).reduce((function(e,t){var n=(0,i.attr)(t,"-ref");return n&&(0,o.isString)(n)&&(e[(0,s.camelCase)(n)]=t,e[n]=t),e}),{})},t.cssPath=function(e){if(!a.Dom.isElement(e))return null;for(var t=[],n=e;n&&n.nodeType===Node.ELEMENT_NODE;){var r=n.nodeName.toLowerCase();if(n.id){t.unshift(r+="#"+n.id);break}var o=n,i=1;do{(o=o.previousElementSibling)&&o.nodeName.toLowerCase()===r&&i++}while(o);t.unshift(r+=":nth-of-type("+i+")"),n=n.parentNode}return t.join(" > ")},t.resolveElement=function(e,t){var n=e;if((0,o.isString)(e))try{n=t.querySelector(e)}catch(t){throw(0,i.error)('String "'+e+'" should be valid HTML selector')}if(!n||"object"!=typeof n||!a.Dom.isElement(n)||!n.cloneNode)throw(0,i.error)('Element "'+e+'" should be string or HTMLElement instance');return n}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=t.splitArray=t.asArray=void 0;var r=n(118);Object.defineProperty(t,"asArray",{enumerable:!0,get:function(){return r.asArray}});var o=n(56);Object.defineProperty(t,"splitArray",{enumerable:!0,get:function(){return o.splitArray}});var i=n(5);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return i.toArray}})},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.asArray=void 0;var r=n(22);t.asArray=function(e){return(0,r.isArray)(e)?e:[e]}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(120),t),(0,r.__exportStar)(n(125),t),(0,r.__exportStar)(n(140),t),(0,r.__exportStar)(n(130),t),(0,r.__exportStar)(n(143),t),(0,r.__exportStar)(n(124),t),(0,r.__exportStar)(n(161),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIElement=void 0;var r=n(1),o=n(13),i=n(31),a=n(121),s=n(16),u=n(124),l=function(e){function t(t,n){var r=e.call(this,t)||this;return r.name="",r.__parentElement=null,r.mods={},r.container=r.createContainer(n),Object.defineProperty(r.container,"component",{value:r,configurable:!0}),r}return(0,r.__extends)(t,e),Object.defineProperty(t.prototype,"parentElement",{get:function(){return this.__parentElement},set:function(e){var t=this;this.__parentElement=e,e&&e.hookStatus("beforeDestruct",(function(){return t.destruct()})),this.updateParentElement(this)},enumerable:!1,configurable:!0}),t.prototype.bubble=function(e){for(var t=this.parentElement;t;)e(t),t=t.parentElement;return this},t.prototype.updateParentElement=function(e){var t;return null===(t=this.__parentElement)||void 0===t||t.updateParentElement(e),this},t.prototype.get=function(t,n){return e.prototype.get.call(this,t,n)||this.getElm(t)},t.prototype.closest=function(e){for(var n="object"==typeof e?function(t){return t===e}:function(t){return t instanceof e},r=this.__parentElement;r;){if(n(r))return r;r=!r.parentElement&&r.container.parentElement?t.closestElement(r.container.parentElement,t):r.parentElement}return null},t.closestElement=function(e,t){var n=i.Dom.up(e,(function(e){if(e){var n=e.component;return n&&n instanceof t}return!1}));return n?null==n?void 0:n.component:null},t.prototype.setMod=function(e,t,n){return void 0===n&&(n=this.container),a.Mods.setMod.call(this,e,t,n),this},t.prototype.getMod=function(e){return a.Mods.getMod.call(this,e)},t.prototype.getElm=function(e){return a.Elms.getElm.call(this,e)},t.prototype.getElms=function(e){return a.Elms.getElms.call(this,e)},t.prototype.update=function(){},t.prototype.appendTo=function(e){return e.appendChild(this.container),this},t.prototype.clearName=function(e){return e.replace(/[^a-zA-Z0-9]/g,"_")},t.prototype.render=function(e){return this.j.c.div(this.componentName)},t.prototype.createContainer=function(e){var t=this,n=this.render(e);if((0,s.isString)(n)){var r=this.j.c.fromHTML(n.replace(/\*([^*]+?)\*/g,(function(e,t){return u.Icon.get(t)||""})).replace(/&__/g,this.componentName+"__").replace(/~([^~]+?)~/g,(function(e,n){return t.i18n(n)})));return r.classList.add(this.componentName),r}return n},t.prototype.destruct=function(){return i.Dom.safeRemove(this.container),this.parentElement=null,e.prototype.destruct.call(this)},t}(o.ViewComponent);t.UIElement=l},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(122),t),(0,r.__exportStar)(n(123),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Elms=void 0;var r=n(5),o=function(){function e(){}return e.getElm=function(e){return this.container.querySelector(".".concat(this.getFullElName(e)))},e.getElms=function(e){return(0,r.toArray)(this.container.querySelectorAll(".".concat(this.getFullElName(e))))},e}();t.Elms=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Mods=void 0;var r=n(5),o=n(11),i=function(){function e(){}return e.setMod=function(e,t,n){if(e=e.toLowerCase(),this.mods[e]!==t){var i="".concat(this.componentName,"_").concat(e),a=(n||this.container).classList;(0,r.toArray)(a).forEach((function(e){0===e.indexOf(i)&&a.remove(e)})),!(0,o.isVoid)(t)&&""!==t&&a.add("".concat(i,"_").concat(t.toString().toLowerCase())),this.mods[e]=t}},e.getMod=function(e){var t;return null!==(t=this.mods[e])&&void 0!==t?t:null},e}();t.Mods=i},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Icon=void 0;var r=n(16),o=function(){function e(){}return e.getIcon=function(t){return/<svg/i.test(t)?t:e.icons[t]||e.icons[t.replace(/-/g,"_")]||e.icons[t.replace(/_/g,"-")]||e.icons[t.toLowerCase()]},e.exists=function(e){return void 0!==this.getIcon(e)},e.get=function(e,t){return void 0===t&&(t="<span></span>"),this.getIcon(e)||t},e.set=function(e,t){return this.icons[e.replace("_","-")]=t,this},e.makeIcon=function(t,n){var o,i;if(n){var a=n.name.replace(/[^a-zA-Z0-9]/g,"_");if(n.iconURL)i=t.c.span(),(0,r.css)(i,"backgroundImage","url("+n.iconURL.replace("{basePath}",(null==t?void 0:t.basePath)||"")+")");else{var s=t.e.fire("getIcon",n.name,n,a)||e.get(n.name,"")||(null===(o=t.o.extraIcons)||void 0===o?void 0:o[n.name]);s&&(i=t.c.fromHTML(s.trim()),/^<svg/i.test(n.name)||i.classList.add("jodit-icon_"+a))}}return i&&(i.classList.add("jodit-icon"),i.style.fill=n.fill),i},e.icons={},e}();t.Icon=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(126),t),(0,r.__exportStar)(n(128),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Button=t.UIButton=t.UIButtonState=void 0;var r=n(1);n(127);var o=n(119),i=n(31),a=n(16),s=n(119),u=n(119),l=n(46),c=n(13);t.UIButtonState=function(){return{size:"middle",type:"button",name:"",value:"",variant:"initial",disabled:!1,activated:!1,icon:{name:"empty",fill:"",iconURL:""},tooltip:"",text:"",tabIndex:void 0}};var d=function(e){function n(n,r){var o=e.call(this,n)||this;return o.isButton=!0,o.state=(0,t.UIButtonState)(),o.actionHandlers=[],o.updateSize(),o.onChangeSize(),o.onChangeStatus(),r&&o.hookStatus(c.STATUSES.ready,(function(){o.setState(r)})),o}return(0,r.__extends)(n,e),n.prototype.className=function(){return"UIButton"},n.prototype.setState=function(e){return Object.assign(this.state,e),this},n.prototype.onChangeSize=function(){this.setMod("size",this.state.size)},n.prototype.onChangeType=function(){(0,a.attr)(this.container,"type",this.state.type)},n.prototype.updateSize=function(){var e=this.closest(u.UIList);e&&(this.state.size=e.buttonSize)},n.prototype.onChangeStatus=function(){this.setMod("variant",this.state.variant)},n.prototype.onChangeText=function(){this.text.textContent=this.jodit.i18n(this.state.text)},n.prototype.onChangeTextSetMode=function(){this.setMod("text-icons",Boolean(this.state.text.trim().length))},n.prototype.onChangeDisabled=function(){(0,a.attr)(this.container,"disabled",this.state.disabled||null)},n.prototype.onChangeActivated=function(){(0,a.attr)(this.container,"aria-pressed",this.state.activated)},n.prototype.onChangeName=function(){this.container.classList.add("".concat(this.componentName,"_").concat(this.clearName(this.state.name))),this.name=this.state.name,(0,a.attr)(this.container,"data-ref",this.state.name),(0,a.attr)(this.container,"ref",this.state.name)},n.prototype.onChangeTooltip=function(){this.get("j.o.useNativeTooltip")&&(0,a.attr)(this.container,"title",this.state.tooltip),(0,a.attr)(this.container,"aria-label",this.state.tooltip)},n.prototype.onChangeTabIndex=function(){(0,a.attr)(this.container,"tabindex",this.state.tabIndex)},n.prototype.onChangeIcon=function(){var e=this.get("j.o.textIcons");if(!(!0===e||(0,a.isFunction)(e)&&e(this.state.name))){i.Dom.detach(this.icon);var t=s.Icon.makeIcon(this.j,this.state.icon);t&&this.icon.appendChild(t)}},n.prototype.focus=function(){this.container.focus()},n.prototype.isFocused=function(){var e=this.od.activeElement;return Boolean(e&&i.Dom.isOrContains(this.container,e))},n.prototype.createContainer=function(){var e=this.componentName,t=this.j.c.element("button",{class:e,type:"button",role:"button",ariaPressed:!1});return this.icon=this.j.c.span(e+"__icon"),this.text=this.j.c.span(e+"__text"),t.appendChild(this.icon),t.appendChild(this.text),this.j.e.on(t,"click",this.onActionFire),t},n.prototype.destruct=function(){return this.j.e.off(this.container),e.prototype.destruct.call(this)},n.prototype.onAction=function(e){return this.actionHandlers.push(e),this},n.prototype.onActionFire=function(e){var t=this;e.buffer={actionTrigger:this},this.actionHandlers.forEach((function(n){return n.call(t,e)}))},(0,r.__decorate)([(0,l.watch)("state.size")],n.prototype,"onChangeSize",null),(0,r.__decorate)([(0,l.watch)("state.type")],n.prototype,"onChangeType",null),(0,r.__decorate)([(0,l.watch)("parentElement")],n.prototype,"updateSize",null),(0,r.__decorate)([(0,l.watch)("state.variant")],n.prototype,"onChangeStatus",null),(0,r.__decorate)([(0,l.watch)("state.text")],n.prototype,"onChangeText",null),(0,r.__decorate)([(0,l.watch)("state.text")],n.prototype,"onChangeTextSetMode",null),(0,r.__decorate)([(0,l.watch)("state.disabled")],n.prototype,"onChangeDisabled",null),(0,r.__decorate)([(0,l.watch)("state.activated")],n.prototype,"onChangeActivated",null),(0,r.__decorate)([(0,l.watch)("state.name")],n.prototype,"onChangeName",null),(0,r.__decorate)([(0,l.watch)("state.tooltip")],n.prototype,"onChangeTooltip",null),(0,r.__decorate)([(0,l.watch)("state.tabIndex")],n.prototype,"onChangeTabIndex",null),(0,r.__decorate)([(0,l.watch)("state.icon")],n.prototype,"onChangeIcon",null),(0,r.__decorate)([l.autobind],n.prototype,"onActionFire",null),(0,r.__decorate)([l.component],n)}(o.UIElement);t.UIButton=d,t.Button=function(e,t,n,r){var o=new d(e);return o.state.tabIndex=e.o.allowTabNavigation?0:-1,(0,a.isString)(t)?(o.state.icon.name=t,o.state.name=t,r&&(o.state.variant=r),n&&(o.state.text=n)):o.setState(t),o}},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIButtonGroup=void 0;var r=n(1);n(129);var o=n(130),i=n(46),a=n(126),s=n(16),u=function(e){function t(t,n){var r,o;void 0===n&&(n={radio:!0});var i=e.call(this,t,null===(r=n.options)||void 0===r?void 0:r.map((function(e){var n=new a.UIButton(t,{text:e.text,value:e.value,variant:"primary"});return n.onAction((function(){i.select(e.value)})),n})),n)||this;return i.options=n,i.select(null!==(o=n.value)&&void 0!==o?o:0),i}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UIButtonGroup"},t.prototype.render=function(e){return'<div>\n\t\t\t<div class="&__label">~'.concat(e.label,'~</div>\n\t\t\t<div class="&__options"></div>\n\t\t</div>')},t.prototype.appendChildToContainer=function(e){var t=this.getElm("options");(0,s.assert)(null!=t,"Options does not exist"),t.appendChild(e)},t.prototype.select=function(e){var t,n,r=this;this.elements.forEach((function(t,n){n===e||t.state.value===e?t.state.activated=!0:r.options.radio&&(t.state.activated=!1)}));var o=this.elements.filter((function(e){return e.state.activated})).map((function(e){return{text:e.state.text,value:e.state.value}}));this.jodit.e.fire(this,"select",o),null===(n=(t=this.options).onChange)||void 0===n||n.call(t,o)},(0,r.__decorate)([i.component],t)}(o.UIGroup);t.UIButtonGroup=u},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(131),t),(0,r.__exportStar)(n(133),t),(0,r.__exportStar)(n(137),t),(0,r.__exportStar)(n(138),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIGroup=void 0;var r=n(1);n(132);var o=n(120),i=n(46),a=n(16),s=n(31),u=function(e){function t(t,n,r){var o=e.call(this,t,r)||this;return o.options=r,o.syncMod=!1,o.elements=[],o.buttonSize="middle",null==n||n.forEach((function(e){return e&&o.append(e)})),(null==r?void 0:r.name)&&(o.name=r.name),o}var n;return(0,r.__extends)(t,e),n=t,t.prototype.className=function(){return"UIGroup"},Object.defineProperty(t.prototype,"allChildren",{get:function(){for(var e=[],t=(0,r.__spreadArray)([],(0,r.__read)(this.elements),!1);t.length;){var o=t.shift();(0,a.isArray)(o)?t.push.apply(t,(0,r.__spreadArray)([],(0,r.__read)(o),!1)):o instanceof n?t.push.apply(t,(0,r.__spreadArray)([],(0,r.__read)(o.elements),!1)):o&&e.push(o)}return e},enumerable:!1,configurable:!0}),t.prototype.update=function(){this.elements.forEach((function(e){return e.update()})),this.setMod("size",this.buttonSize)},t.prototype.append=function(e,t){var n=this;if((0,a.isArray)(e))return e.forEach((function(e){return n.append(e,t)})),this;if(this.elements.push(e),e.name&&e.container.classList.add(this.getFullElName(e.name)),t){var r=this.getElm(t);(0,a.assert)(null!=r,"Element does not exist"),r.appendChild(e.container)}else this.appendChildToContainer(e.container);return e.parentElement=this,e.update(),this},t.prototype.setMod=function(t,n){return this.syncMod&&this.elements.forEach((function(e){return e.setMod(t,n)})),e.prototype.setMod.call(this,t,n)},t.prototype.appendChildToContainer=function(e){this.container.appendChild(e)},t.prototype.remove=function(e){var t=this.elements.indexOf(e);return-1!==t&&(this.elements.splice(t,1),s.Dom.safeRemove(e.container),e.parentElement=null),this},t.prototype.clear=function(){return this.elements.forEach((function(e){return e.destruct()})),this.elements.length=0,this},t.prototype.destruct=function(){return this.clear(),e.prototype.destruct.call(this)},(0,r.__decorate)([(0,i.watch)("buttonSize")],t.prototype,"update",null),n=(0,r.__decorate)([i.component],t)}(o.UIElement);t.UIGroup=u},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIList=void 0;var r=n(1);n(134);var o=n(135),i=n(46),a=n(131),s=n(137),u=n(138),l=n(126),c=n(139),d=n(136),f=n(117),p=function(e){function t(t){var n=e.call(this,t)||this;return n.mode="horizontal",n.removeButtons=[],n.onChangeMode(),n}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UIList"},t.prototype.onChangeMode=function(){this.setMod("mode",this.mode)},t.prototype.makeGroup=function(){return new a.UIGroup(this.jodit)},Object.defineProperty(t.prototype,"buttons",{get:function(){return this.allChildren.filter((function(e){return e instanceof l.UIButton}))},enumerable:!1,configurable:!0}),t.prototype.getButtonsNames=function(){return this.buttons.map((function(e){return e instanceof l.UIButton&&e.state.name||""})).filter((function(e){return""!==e}))},t.prototype.setRemoveButtons=function(e){return this.removeButtons=e||[],this},t.prototype.build=function(e,t){var n=this;void 0===t&&(t=null),e=(0,f.splitArray)(e),this.clear();var r,i=!1,a=this.makeGroup();this.append(a),a.setMod("line",!0);var l=function(e){var o=null;switch(e.name){case"\n":(a=n.makeGroup()).setMod("line",!0),r=n.makeGroup(),a.append(r),n.append(a);break;case"|":i||(i=!0,o=new s.UISeparator(n.j));break;case"---":r.setMod("before-spacer",!0);var l=new u.UISpacer(n.j);a.append(l),r=n.makeGroup(),a.append(r),i=!1;break;default:i=!1,o=n.makeButton(e,t)}o&&(r||(r=n.makeGroup(),a.append(r)),r.append(o))},p=function(e){return!n.removeButtons.includes(e.name)};return e.forEach((function(e){if((0,c.isButtonGroup)(e)){var t=e.buttons.filter((function(e){return e}));t.length&&((r=n.makeGroup()).setMod("separated",!0).setMod("group",e.group),a.append(r),(0,o.getStrongControlTypes)(t,n.j.o.controls).filter(p).forEach(l))}else{r||(r=n.makeGroup(),a.append(r));var i=(0,d.getControlType)(e,n.j.o.controls);p(i)&&l(i)}})),this.update(),this},t.prototype.makeButton=function(e,t){return new l.UIButton(this.j)},(0,r.__decorate)([(0,i.watch)("mode")],t.prototype,"onChangeMode",null),(0,r.__decorate)([i.component],t)}(a.UIGroup);t.UIList=p},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getStrongControlTypes=void 0;var r=n(136),o=n(65),i=n(23),a=n(16);t.getStrongControlTypes=function(e,t){return((0,i.isArray)(e)?e:(0,a.keys)(e,!1).map((function(t){return(0,a.ConfigProto)({name:t},e[t]||{})}))).map((function(e){return(0,r.getControlType)(e,t||o.Config.defaultOptions.controls)}))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.findControlType=t.getControlType=void 0;var r=n(1),o=n(16),i=n(65);function a(e,t){var n=(0,r.__read)(e.split(/\./),2),i=n[0],a=n[1],s=t;return null!=a?void 0!==t[i]&&(s=t[i]):a=i,s[a]?(0,r.__assign)({name:a},(0,o.ConfigFlatten)(s[a])):void 0}t.getControlType=function(e,t){var n;return t||(t=i.Config.defaultOptions.controls),(0,o.isString)(e)?n=a(e,t)||{name:e,command:e,tooltip:e}:void 0!==t[(n=(0,r.__assign)({name:"empty"},(0,o.ConfigFlatten)(e))).name]&&(n=(0,r.__assign)((0,r.__assign)({},(0,o.ConfigFlatten)(t[n.name])),(0,o.ConfigFlatten)(n))),n},t.findControlType=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UISeparator=void 0;var r=n(1),o=n(120),i=n(46),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UISeparator"},(0,r.__decorate)([i.component],t)}(o.UIElement);t.UISeparator=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UISpacer=void 0;var r=n(1),o=n(119),i=n(46),a=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UISpacer"},(0,r.__decorate)([i.component],t)}(o.UIElement);t.UISpacer=a},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.flatButtonsSet=t.isButtonGroup=void 0;var r=n(1),o=n(23);t.isButtonGroup=function(e){return(0,o.isArray)(e.buttons)},t.flatButtonsSet=function(e,n){var o=n.getRegisteredButtonGroups();return new Set(e.reduce((function(e,n){var i;return(0,t.isButtonGroup)(n)?e=e.concat((0,r.__spreadArray)((0,r.__spreadArray)([],(0,r.__read)(n.buttons),!1),(0,r.__read)(null!==(i=o[n.group])&&void 0!==i?i:[]),!1)):e.push(n),e}),[]))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(141),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Popup=void 0;var r=n(1);n(142);var o=n(31),i=n(16),a=n(39),s=n(119),u=n(46),l=function(e){function t(t,n){void 0===n&&(n=!0);var r=e.call(this,t)||this;return r.smart=n,r.isOpened=!1,r.strategy="leftBottom",r.viewBound=function(){return{left:0,top:0,width:r.ow.innerWidth,height:r.ow.innerHeight}},r.childrenPopups=new Set,(0,i.attr)(r.container,"role","popup"),r}return(0,r.__extends)(t,e),t.prototype.className=function(){return"Popup"},t.prototype.updateParentElement=function(n){var r=this;return n!==this&&n instanceof t&&(this.childrenPopups.forEach((function(e){!n.closest(e)&&e.isOpened&&e.close()})),this.childrenPopups.has(n)||this.j.e.on(n,"beforeClose",(function(){r.childrenPopups.delete(n)})),this.childrenPopups.add(n)),e.prototype.updateParentElement.call(this,n)},t.prototype.setContent=function(e){o.Dom.detach(this.container);var t,n=this.j.c.div("".concat(this.componentName,"__content"));return e instanceof s.UIElement?(t=e.container,e.parentElement=this):t=(0,i.isString)(e)?this.j.c.fromHTML(e):e,n.appendChild(t),this.container.appendChild(n),this.updatePosition(),this},t.prototype.open=function(e,n){void 0===n&&(n=!1),(0,i.markOwner)(this.jodit,this.container),this.calculateZIndex(),this.isOpened=!0,this.addGlobalListeners(),this.targetBound=n?this.getKeepBound(e):e;var r=(0,a.getContainer)(this.jodit,t);return r!==this.container.parentElement&&r.appendChild(this.container),this.updatePosition(),this.j.e.fire(this,"afterOpen"),this},t.prototype.calculateZIndex=function(){var e=this;if(!this.container.style.zIndex){var t=function(t){var n=t.container.style.zIndex||t.o.zIndex;return!!n&&(e.setZIndex(1+parseInt(n.toString(),10)),!0)};if(!t(this.j))for(var n=this.parentElement;n;){if(t(n.j))return;if(n.container.style.zIndex)return void this.setZIndex(1+parseInt(n.container.style.zIndex.toString(),10));if(!n.parentElement&&n.container.parentElement){var r=s.UIElement.closestElement(n.container.parentElement,s.UIElement);if(r){n=r;continue}}n=n.parentElement}}},t.prototype.getKeepBound=function(e){var t=this,n=e(),a=this.od.elementFromPoint(n.left,n.top);if(!a)return e;var s=o.Dom.isHTMLElement(a)?a:a.parentElement,u=(0,i.position)(s,this.j);return function(){var n=e(),o=(0,i.position)(s,t.j);return(0,r.__assign)((0,r.__assign)({},n),{top:n.top+(o.top-u.top),left:n.left+(o.left-u.left)})}},t.prototype.updatePosition=function(){if(!this.isOpened)return this;var e=(0,r.__read)(this.calculatePosition(this.targetBound(),this.viewBound(),(0,i.position)(this.container,this.j)),2),t=e[0];return this.setMod("strategy",e[1]),(0,i.css)(this.container,{left:t.left,top:t.top}),this.childrenPopups.forEach((function(e){return e.updatePosition()})),this},t.prototype.throttleUpdatePosition=function(){this.updatePosition()},t.prototype.calculatePosition=function(e,n,o,a){void 0===a&&(a=this.strategy);var s={left:e.left,right:e.left-(o.width-e.width)},u={bottom:e.top+e.height,top:e.top-o.height},l=Object.keys(s).reduce((function(e,t){return e.concat(Object.keys(u).map((function(e){return"".concat(t).concat((0,i.ucfirst)(e))})))}),[]),c=function(e){var t=(0,r.__read)((0,i.kebabCase)(e).split("-"),2);return{left:s[t[0]],top:u[t[1]],width:o.width,height:o.height}},d=function(e){return t.boxInView(c(a),e)?a:l.find((function(n){if(t.boxInView(c(n),e))return n}))||null},f=d((0,i.position)(this.j.container,this.j));return f&&t.boxInView(c(f),n)||(f=d(n)||f||a),[c(f),f]},t.boxInView=function(e,t){return!(-2>e.top-t.top||-2>e.left-t.left||-2>t.top+t.height-(e.top+e.height)||-2>t.left+t.width-(e.left+e.width))},t.prototype.close=function(){return this.isOpened?(this.isOpened=!1,this.childrenPopups.forEach((function(e){return e.close()})),this.j.e.fire(this,"beforeClose"),this.j.e.fire("beforePopupClose",this),this.removeGlobalListeners(),o.Dom.safeRemove(this.container),this):this},t.prototype.closeOnOutsideClick=function(e){if(this.isOpened){var n=(0,i.isFunction)(e.composedPath)&&e.composedPath()[0]||e.target;if(n){var r=s.UIElement.closestElement(n,t);r&&(this===r||r.closest(this))||this.close()}else this.close()}},t.prototype.addGlobalListeners=function(){var e=this,t=this.throttleUpdatePosition,n=this.ow;a.eventEmitter.on("closeAllPopups",this.close),this.smart&&this.j.e.on("escape",this.close).on("mousedown touchstart",this.closeOnOutsideClick).on(n,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.on("closeAllPopups",this.close).on("resize",t).on(this.container,"scroll mousewheel",t).on(n,"scroll",t).on(n,"resize",t),o.Dom.up(this.j.container,(function(n){n&&e.j.e.on(n,"scroll mousewheel",t)}))},t.prototype.removeGlobalListeners=function(){var e=this,t=this.throttleUpdatePosition,n=this.ow;a.eventEmitter.off("closeAllPopups",this.close),this.smart&&this.j.e.off("escape",this.close).off("mousedown touchstart",this.closeOnOutsideClick).off(n,"mousedown touchstart",this.closeOnOutsideClick),this.j.e.off("closeAllPopups",this.close).off("resize",t).off(this.container,"scroll mousewheel",t).off(n,"scroll",t).off(n,"resize",t),o.Dom.up(this.j.container,(function(n){n&&e.j.e.off(n,"scroll mousewheel",t)}))},t.prototype.setZIndex=function(e){this.container.style.zIndex=e.toString()},t.prototype.destruct=function(){return this.close(),e.prototype.destruct.call(this)},(0,r.__decorate)([u.autobind],t.prototype,"updatePosition",null),(0,r.__decorate)([(0,u.throttle)(10),u.autobind],t.prototype,"throttleUpdatePosition",null),(0,r.__decorate)([u.autobind],t.prototype,"close",null),(0,r.__decorate)([u.autobind],t.prototype,"closeOnOutsideClick",null),t}(s.UIElement);t.Popup=l},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(144),t),(0,r.__exportStar)(n(145),t),(0,r.__exportStar)(n(159),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIForm=void 0;var r=n(1),o=n(119),i=n(17),a=n(46),s=function(e){function t(){for(var t,n,o=[],i=0;arguments.length>i;i++)o[i]=arguments[i];var a=e.apply(this,(0,r.__spreadArray)([],(0,r.__read)(o),!1))||this;return(null===(t=a.options)||void 0===t?void 0:t.className)&&a.container.classList.add(null===(n=a.options)||void 0===n?void 0:n.className),a}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UIForm"},t.prototype.submit=function(){this.j.e.fire(this.container,"submit")},t.prototype.validate=function(){var e,t,n,i,a=this.allChildren.filter((function(e){return e instanceof o.UIInput}));try{for(var s=(0,r.__values)(a),u=s.next();!u.done;u=s.next())if(!u.value.validate())return!1}catch(t){e={error:t}}finally{try{u&&!u.done&&(t=s.return)&&t.call(s)}finally{if(e)throw e.error}}var l=this.allChildren.filter((function(e){return e instanceof o.UISelect}));try{for(var c=(0,r.__values)(l),d=c.next();!d.done;d=c.next())if(!d.value.validate())return!1}catch(e){n={error:e}}finally{try{d&&!d.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}return!0},t.prototype.onSubmit=function(e){var t=this;this.j.e.on(this.container,"submit",(function(){var n=t.allChildren.filter((function(e){return e instanceof o.UIInput}));return!!t.validate()&&(e(n.reduce((function(e,t){return e[t.state.name]=t.value,e}),{})),!1)}))},t.prototype.createContainer=function(){var e=this.j.c.element("form");return e.classList.add(this.componentName),(0,i.attr)(e,"dir",this.j.o.direction||"auto"),e},(0,r.__decorate)([a.component],t)}(o.UIGroup);t.UIForm=s},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(146),t),(0,r.__exportStar)(n(151),t),(0,r.__exportStar)(n(153),t),(0,r.__exportStar)(n(155),t),(0,r.__exportStar)(n(157),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIInput=void 0;var r=n(1);n(147);var o=n(120),i=n(16),a=n(31),s=n(46),u=n(124),l=n(148),c=function(e){function t(t,o){var i=e.call(this,t,o)||this;return i.label=i.j.c.span(i.getFullElName("label")),i.icon=i.j.c.span(i.getFullElName("icon")),i.clearButton=i.j.c.span(i.getFullElName("clear"),u.Icon.get("cancel")),i.state=(0,r.__assign)({},n.defaultState),i.__errorBox=i.j.c.span(i.getFullElName("error")),i.validators=new Set([]),void 0!==(null==o?void 0:o.value)&&(o.value=o.value.toString()),Object.assign(i.state,o),void 0!==i.state.clearButton&&(i.j.e.on(i.clearButton,"click",(function(e){e.preventDefault(),i.nativeInput.value="",i.j.e.fire(i.nativeInput,"input"),i.focus()})).on(i.nativeInput,"input",(function(){i.state.clearButton=Boolean(i.value.length)})),i.state.clearButton=Boolean(i.value.length)),i.j.e.on(i.nativeInput,"focus blur",(function(){i.onChangeFocus()})).on(i.nativeInput,"input change",i.onChangeValue),i.onChangeState(),i.onChangeClassName(),i.onChangeStateValue(),i}var n;return(0,r.__extends)(t,e),n=t,t.prototype.className=function(){return"UIInput"},t.prototype.onChangeClear=function(){this.state.clearButton?a.Dom.after(this.nativeInput,this.clearButton):a.Dom.safeRemove(this.clearButton)},t.prototype.onChangeClassName=function(e,t){t&&this.container.classList.remove(t),this.state.className&&this.container.classList.add(this.state.className)},t.prototype.onChangeState=function(){this.name=this.state.name;var e=this.nativeInput,t=this.state,n=t.name,r=t.icon,o=t.type,s=t.ref,l=t.required,c=t.placeholder,d=t.autocomplete,f=t.label;(0,i.attr)(e,"name",n),(0,i.attr)(e,"type",o),(0,i.attr)(e,"data-ref",s||n),(0,i.attr)(e,"ref",s||n),(0,i.attr)(e,"required",l||null),(0,i.attr)(e,"autocomplete",d?null:"off"),(0,i.attr)(e,"placeholder",c?this.j.i18n(c):""),r&&u.Icon.exists(r)?(a.Dom.before(e,this.icon),this.icon.innerHTML=u.Icon.get(r)):a.Dom.safeRemove(this.icon),f?(a.Dom.before(this.wrapper,this.label),this.label.innerText=this.j.i18n(f)):a.Dom.safeRemove(this.label),this.updateValidators()},t.prototype.updateValidators=function(){var e,t=this;this.validators.clear(),this.state.required&&this.validators.add(l.inputValidators.required),null===(e=this.state.validators)||void 0===e||e.forEach((function(e){var n=l.inputValidators[e];n&&t.validators.add(n)}))},Object.defineProperty(t.prototype,"error",{set:function(e){this.setMod("has-error",Boolean(e)),e?(this.__errorBox.innerText=this.j.i18n(e,this.j.i18n(this.state.label||"")),this.container.appendChild(this.__errorBox)):a.Dom.safeRemove(this.__errorBox)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"value",{get:function(){return this.nativeInput.value},set:function(e){this.value!==e&&(this.nativeInput.value=e,this.onChangeValue())},enumerable:!1,configurable:!0}),t.prototype.onChangeStateValue=function(){var e=this.state.value.toString();e!==this.value&&(this.value=e)},t.prototype.onChangeValue=function(){var e,t,n=this.value;this.state.value!==n&&(this.state.value=n,this.j.e.fire(this,"change",n),null===(t=(e=this.state).onChange)||void 0===t||t.call(e,n))},t.prototype.validate=function(){var e=this;return this.error="",(0,i.toArray)(this.validators).every((function(t){return t(e)}))},t.prototype.createContainer=function(t){var n=e.prototype.createContainer.call(this);this.wrapper=this.j.c.div(this.getFullElName("wrapper")),this.nativeInput||(this.nativeInput=this.createNativeInput());var r=this.nativeInput;return r.classList.add(this.getFullElName("input")),this.wrapper.appendChild(r),n.appendChild(this.wrapper),(0,i.attr)(r,"dir",this.j.o.direction||"auto"),n},t.prototype.createNativeInput=function(e){return this.j.create.element("input")},t.prototype.focus=function(){this.nativeInput.focus()},Object.defineProperty(t.prototype,"isFocused",{get:function(){return this.nativeInput===this.j.od.activeElement},enumerable:!1,configurable:!0}),t.prototype.onChangeFocus=function(){this.setMod("focused",this.isFocused)},t.defaultState={className:"",autocomplete:!0,name:"",value:"",icon:"",label:"",ref:"",type:"text",placeholder:"",required:!1,validators:[]},(0,r.__decorate)([(0,s.watch)("state.clearButton")],t.prototype,"onChangeClear",null),(0,r.__decorate)([(0,s.watch)("state.className")],t.prototype,"onChangeClassName",null),(0,r.__decorate)([(0,s.watch)(["state.name","state.type","state.label","state.placeholder","state.autocomplete","state.icon"]),(0,s.debounce)()],t.prototype,"onChangeState",null),(0,r.__decorate)([(0,s.watch)("state.value")],t.prototype,"onChangeStateValue",null),(0,r.__decorate)([s.autobind],t.prototype,"onChangeValue",null),n=(0,r.__decorate)([s.component],t)}(o.UIElement);t.UIInput=c},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.selectValidators=t.inputValidators=void 0,t.inputValidators=n(149),t.selectValidators=n(150)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.url=t.required=void 0;var r=n(16);t.required=function(e){return!!(0,r.trim)(e.value).length||(e.error="Please fill out this field",!1)},t.url=function(e){return!!(0,r.isURL)((0,r.trim)(e.value))||(e.error="Please enter a web address",!1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.required=void 0;var r=n(16);t.required=function(e){return!!(0,r.trim)(e.value).length||(e.error="Please fill out this field",!1)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UITextArea=void 0;var r=n(1);n(152);var o=n(146),i=n(46),a=function(e){function t(t,o){var i=e.call(this,t,o)||this;return i.state=(0,r.__assign)({},n.defaultState),Object.assign(i.state,o),!1===i.state.resizable&&(i.nativeInput.style.resize="none"),i}var n;return(0,r.__extends)(t,e),n=t,t.prototype.className=function(){return"UITextArea"},t.prototype.createContainer=function(t){return this.nativeInput=this.j.create.element("textarea"),e.prototype.createContainer.call(this,t)},t.defaultState=(0,r.__assign)((0,r.__assign)({},o.UIInput.defaultState),{size:5,resizable:!0}),n=(0,r.__decorate)([i.component],t)}(o.UIInput);t.UITextArea=a},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UICheckbox=void 0;var r=n(1);n(154);var o=n(146),i=n(46),a=n(31),s=function(e){function t(t,o){var i=e.call(this,t,(0,r.__assign)((0,r.__assign)({},o),{type:"checkbox"}))||this;return i.state=(0,r.__assign)({},n.defaultState),Object.assign(i.state,o),i}var n;return(0,r.__extends)(t,e),n=t,t.prototype.className=function(){return"UICheckbox"},t.prototype.render=function(){return this.j.c.element("label",{className:this.componentName})},t.prototype.onChangeChecked=function(){this.value=this.state.checked.toString(),this.nativeInput.checked=this.state.checked,this.setMod("checked",this.state.checked)},t.prototype.onChangeNativeCheckBox=function(){this.state.checked=this.nativeInput.checked},t.prototype.onChangeSwitch=function(){this.setMod("switch",this.state.switch);var e=this.getElm("switch-slider");this.state.switch?(e||(e=this.j.c.div(this.getFullElName("switch-slider"))),a.Dom.after(this.nativeInput,e)):a.Dom.safeRemove(e)},t.defaultState=(0,r.__assign)((0,r.__assign)({},o.UIInput.defaultState),{checked:!1,switch:!1}),(0,r.__decorate)([(0,i.watch)("state.checked"),(0,i.hook)("ready")],t.prototype,"onChangeChecked",null),(0,r.__decorate)([(0,i.watch)("nativeInput:change")],t.prototype,"onChangeNativeCheckBox",null),(0,r.__decorate)([(0,i.watch)("state.switch"),(0,i.hook)("ready")],t.prototype,"onChangeSwitch",null),n=(0,r.__decorate)([i.component],t)}(o.UIInput);t.UICheckbox=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UISelect=void 0;var r=n(1);n(156);var o=n(16),i=n(46),a=n(146),s=n(148),u=function(e){function t(t,o){var i=e.call(this,t,o)||this;return i.state=(0,r.__assign)({},n.defaultState),Object.assign(i.state,o),i}var n;return(0,r.__extends)(t,e),n=t,t.prototype.className=function(){return"UISelect"},t.prototype.createContainer=function(t){var n,r=e.prototype.createContainer.call(this,t),i=this.j,a=this.nativeInput,s=function(){return i.create.element("option")};if(void 0!==t.placeholder){var u=s();u.value="",u.text=i.i18n(t.placeholder),a.add(u)}return null===(n=t.options)||void 0===n||n.forEach((function(e){var t=s();t.value=e.value.toString(),t.text=i.i18n(e.text),a.add(t)})),t.size&&t.size>0&&(0,o.attr)(a,"size",t.size),t.multiple&&(0,o.attr)(a,"multiple",""),r},t.prototype.createNativeInput=function(){return this.j.create.element("select")},t.prototype.updateValidators=function(){e.prototype.updateValidators.call(this),this.state.required&&(this.validators.delete(s.inputValidators.required),this.validators.add(s.selectValidators.required))},t.defaultState=(0,r.__assign)((0,r.__assign)({},a.UIInput.defaultState),{options:[],size:1,multiple:!1}),n=(0,r.__decorate)([i.component],t)}(a.UIInput);t.UISelect=u},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIFileInput=void 0;var r=n(1);n(158);var o=n(146),i=n(46),a=n(125),s=function(e){function t(t,n){var i=e.call(this,t,(0,r.__assign)({type:"file"},n))||this;return i.state=(0,r.__assign)((0,r.__assign)({},o.UIInput.defaultState),{type:"file",onlyImages:!0}),i}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UIFileInput"},t.prototype.createContainer=function(e){this.button=new a.UIButton(this.j,{icon:{name:"plus"}});var t=this.button.container;this.nativeInput||(this.nativeInput=this.createNativeInput(e));var n=this.nativeInput;return n.classList.add(this.getFullElName("input")),t.classList.add(this.componentName),t.appendChild(n),t},t.prototype.createNativeInput=function(e){return this.j.create.fromHTML('<input\n\t\t\ttype="file"\n\t\t\taccept="'.concat(e.onlyImages?"image/*":"*",'"\n\t\t\ttabindex="-1"\n\t\t\tdir="auto"\n\t\t\tmultiple=""\n\t\t/>'))},(0,r.__decorate)([i.component],t)}(o.UIInput);t.UIFileInput=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.UIBlock=void 0;var r=n(1);n(160);var o=n(130),i=n(17),a=n(46),s=function(e){function t(t,n,r){void 0===r&&(r={align:"left"});var o=e.call(this,t,n)||this;return o.options=r,o.setMod("align",o.options.align||"left"),o.setMod("width",o.options.width||""),o.options.mod&&o.setMod(o.options.mod,!0),o.options.className&&o.container.classList.add(o.options.className),(0,i.attr)(o.container,"data-ref",r.ref),(0,i.attr)(o.container,"ref",r.ref),o}return(0,r.__extends)(t,e),t.prototype.className=function(){return"UIBlock"},(0,r.__decorate)([a.component],t)}(o.UIGroup);t.UIBlock=s},function(e,t,n){n.r(t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressBar=void 0;var r=n(1);n(162);var o=n(31),i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,r.__extends)(t,e),t.prototype.className=function(){return"ProgressBar"},t.prototype.render=function(){return"<div><div></div></div>"},t.prototype.show=function(){return(this.j.workplace||this.j.container).appendChild(this.container),this},t.prototype.hide=function(){return o.Dom.safeRemove(this.container),this},t.prototype.progress=function(e){return this.container.style.width=e.toFixed(2)+"%",this},t.prototype.destruct=function(){return this.hide(),e.prototype.destruct.call(this)},t}(n(120).UIElement);t.ProgressBar=i},function(e,t,n){n.r(t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.val=void 0,t.val=function(e,t,n){var r=e.querySelector(t);return r?(n&&(r.value=n),r.value):""}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(165),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.clearTimeout=t.setTimeout=void 0;var r=n(1);t.setTimeout=function(e,t){for(var n=[],o=2;arguments.length>o;o++)n[o-2]=arguments[o];return t?window.setTimeout.apply(window,(0,r.__spreadArray)([e,t],(0,r.__read)(n),!1)):(e.call.apply(e,(0,r.__spreadArray)([null],(0,r.__read)(n),!1)),0)},t.clearTimeout=function(e){window.clearTimeout(e)}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(167),t),(0,r.__exportStar)(n(168),t),(0,r.__exportStar)(n(169),t),(0,r.__exportStar)(n(170),t),(0,r.__exportStar)(n(171),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.applyStyles=void 0;var r=n(31),o=n(17),i=n(59);function a(e){return e.replace(/mso-[a-z-]+:[\s]*[^;]+;/gi,"").replace(/mso-[a-z-]+:[\s]*[^";]+$/gi,"").replace(/border[a-z-]*:[\s]*[^;]+;/gi,"").replace(/([0-9.]+)(pt|cm)/gi,(function(e,t,n){switch(n.toLowerCase()){case"pt":return(1.328*parseFloat(t)).toFixed(0)+"px";case"cm":return(.02645833*parseFloat(t)).toFixed(0)+"px"}return e}))}t.applyStyles=function(e){if(-1===e.indexOf("<html "))return e;e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+"</html>".length);var t=document.createElement("iframe");t.style.display="none",document.body.appendChild(t);var n="",s=[];try{var u=t.contentDocument||(t.contentWindow?t.contentWindow.document:null);if(u){u.open(),u.write(e),u.close(),u.styleSheets.length&&(s=u.styleSheets[u.styleSheets.length-1].cssRules);for(var l=function(e){if(""===s[e].selectorText)return"continue";(0,o.$$)(s[e].selectorText,u.body).forEach((function(t){t.style.cssText=a(s[e].style.cssText+";"+t.style.cssText)}))},c=0;s.length>c;c+=1)l(c);r.Dom.each(u.body,(function(e){if(r.Dom.isElement(e)){var t=e,n=t.style.cssText;n&&(t.style.cssText=a(n)),t.hasAttribute("lang")&&t.removeAttribute("lang")}})),n=u.firstChild?(0,i.trim)(u.body.innerHTML):""}}catch(e){}finally{r.Dom.safeRemove(t)}return n&&(e=n),(0,i.trim)(e.replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,""))}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.cleanFromWord=void 0;var r=n(31),o=n(62),i=n(5);t.cleanFromWord=function(e){-1!==e.indexOf("<html ")&&(e=(e=e.substring(e.indexOf("<html "),e.length)).substring(0,e.lastIndexOf("</html>")+"</html>".length));var t="";try{var n=document.createElement("div");n.innerHTML=e;var a=[];n.firstChild&&r.Dom.all(n,(function(e){if(e)switch(e.nodeType){case Node.ELEMENT_NODE:switch(e.nodeName){case"STYLE":case"LINK":case"META":a.push(e);break;case"W:SDT":case"W:SDTPR":case"FONT":r.Dom.unwrap(e);break;default:(0,i.toArray)(e.attributes).forEach((function(t){-1===["src","href","rel","content"].indexOf(t.name.toLowerCase())&&e.removeAttribute(t.name)}))}break;case Node.TEXT_NODE:break;default:a.push(e)}})),a.forEach(r.Dom.safeRemove),t=n.innerHTML}catch(e){}return t&&(e=t),(e=e.split(/(\n)/).filter(o.trim).join("\n")).replace(/<(\/)?(html|colgroup|col|o:p)[^>]*>/g,"").replace(/<!--[^>]*>/g,"")}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.htmlspecialchars=void 0,t.htmlspecialchars=function(e){var t=document.createElement("div");return t.textContent=e,t.innerHTML}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.safeHTML=t.stripTags=void 0;var r=n(10),o=n(17),i=n(62),a=n(31),s=n(17);t.stripTags=function(e,t){void 0===t&&(t=document);var n=t.createElement("div");return(0,r.isString)(e)?n.innerHTML=e:n.appendChild(e),(0,o.$$)("DIV, P, BR, H1, H2, H3, H4, H5, H6, HR",n).forEach((function(e){var n=e.parentNode;if(n){var r=e.nextSibling;a.Dom.isText(r)&&/^\s/.test(r.nodeValue||"")||r&&n.insertBefore(t.createTextNode(" "),r)}})),(0,i.trim)(n.innerText)||""},t.safeHTML=function(e,t){if(a.Dom.isElement(e)){var n=function(e){return(0,s.attr)(e,"onerror",null)},r=function(e){var t=e.getAttribute("href");t&&0===t.trim().indexOf("javascript")&&(0,s.attr)(e,"href",location.protocol+"//"+t)};t.removeOnError&&(n(e),(0,o.$$)("[onerror]",e).forEach(n)),t.safeJavaScriptLink&&(r(e),(0,o.$$)('a[href^="javascript"]',e).forEach(r))}}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.nl2br=void 0,t.nl2br=function(e){return e.replace(/\r\n|\r|\n/g,"<br/>")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);(0,r.__exportStar)(n(173),t),(0,r.__exportStar)(n(174),t),(0,r.__exportStar)(n(175),t),(0,r.__exportStar)(n(176),t),(0,r.__exportStar)(n(177),t),(0,r.__exportStar)(n(178),t)},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.getContentWidth=void 0,t.getContentWidth=function(e,t){var n=function(e){return parseInt(e,10)},r=t.getComputedStyle(e);return e.offsetWidth-n(r.getPropertyValue("padding-left")||"0")-n(r.getPropertyValue("padding-right")||"0")}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.getScrollParent=void 0;var r=n(17),o=n(31);t.getScrollParent=function e(t){if(!t)return null;var n=o.Dom.isHTMLElement(t),i=n&&(0,r.css)(t,"overflowY");return n&&"visible"!==i&&"hidden"!==i&&t.scrollHeight>=t.clientHeight?t:e(t.parentNode)||document.scrollingElement||document.body}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.innerWidth=void 0,t.innerWidth=function(e,t){var n=t.getComputedStyle(e);return e.clientWidth-(parseFloat(n.paddingLeft||"0")+parseFloat(n.paddingRight||"0"))}},function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.offset=void 0,t.offset=function(e,n,r,o){var i;void 0===o&&(o=!1);try{i=e.getBoundingClientRect()}catch(e){i={top:0,bottom:0,left:0,right:0,width:0,height:0}}var a,s,u=r.body,l=r.documentElement||{clientTop:0,clientLeft:0,scrollTop:0,scrollLeft:0},c=r.defaultView||r.parentWindow,d=c.pageYOffset||l.scrollTop||u.scrollTop,f=c.pageXOffset||l.scrollLeft||u.scrollLeft,p=l.clientTop||u.clientTop||0,h=l.clientLeft||u.clientLeft||0,v=n.iframe;if(!o&&n&&n.options&&n.o.iframe&&v){var _=(0,t.offset)(v,n,n.od,!0);a=i.top+_.top,s=i.left+_.left}else a=i.top+d-p,s=i.left+f-h;return{top:Math.round(a),left:Math.round(s),width:i.width,height:i.height}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.position=void 0;var r=n(23);t.position=function e(t,n,o){void 0===o&&(o=!1);var i=t.getBoundingClientRect(),a=i.left,s=i.top;if((0,r.isJoditObject)(n)&&n.iframe&&!o){var u=e(n.iframe,n,!0);a+=u.left,s+=u.top}return{left:Math.round(a),top:Math.round(s),width:Math.round(t.offsetWidth),height:Math.round(t.offsetHeight)}}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.size=void 0;var r=n(23);t.size=function(e){return(0,r.isString)(e)||(0,r.isArray)(e)?e.length:(0,r.isPlainObject)(e)?Object.keys(e).length:0}},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.ViewComponent=void 0;var r=n(1),o=function(e){function t(t){var n=e.call(this)||this;return n.setParentView(t),n}return(0,r.__extends)(t,e),Object.defineProperty(t.prototype,"defaultTimeout",{get:function(){return this.j.defaultTimeout},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"j",{get:function(){return this.jodit},enumerable:!1,configurable:!0}),t.prototype.i18n=function(e){for(var t,n=[],o=1;arguments.length>o;o++)n[o-1]=arguments[o];return(t=this.j).i18n.apply(t,(0,r.__spreadArray)([e],(0,r.__read)(n),!1))},t.prototype.setParentView=function(e){return this.jodit=e,e.components.add(this),this},t.prototype.destruct=function(){return this.j.components.delete(this),e.prototype.destruct.call(this)},t}(n(15).Component);t.ViewComponent=o},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),(0,n(1).__exportStar)(n(181),t)},function(e,t,n){Object.defineProperty(t,"__esModule",{value:!0}),t.Async=void 0;var r=n(1),o=n(16),i=function(){function e(){var e,t,n,r,o=this;this.timers=new Map,this.promisesRejections=new Set,this.requestsIdle=new Set,this.requestIdleCallbackNative=null!==(t=null===(e=window.requestIdleCallback)||void 0===e?void 0:e.bind(window))&&void 0!==t?t:function(e){var t=Date.now();return o.setTimeout((function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},this.cancelIdleCallbackNative=null!==(r=null===(n=window.cancelIdleCallback)||void 0===n?void 0:n.bind(window))&&void 0!==r?r:function(e){o.clearTimeout(e)},this.isDestructed=!1}return e.prototype.delay=function(e){var t=this;return this.promise((function(n){return t.setTimeout(n,e)}))},e.prototype.setTimeout=function(e,t){for(var n=[],i=2;arguments.length>i;i++)n[i-2]=arguments[i];if(this.isDestructed)return 0;var a={};(0,o.isNumber)(t)||(t=(a=t).timeout||0),a.label&&this.clearLabel(a.label);var s=o.setTimeout.apply(void 0,(0,r.__spreadArray)([e,t],(0,r.__read)(n),!1)),u=a.label||s;return this.timers.set(u,s),s},e.prototype.clearLabel=function(e){e&&this.timers.has(e)&&((0,o.clearTimeout)(this.timers.get(e)),this.timers.delete(e))},e.prototype.clearTimeout=function(e){if((0,o.isString)(e))return this.clearLabel(e);(0,o.clearTimeout)(e),this.timers.delete(e)},e.prototype.debounce=function(e,t,n){var i=this;void 0===n&&(n=!1);var a=0,s=!1,u=[],l=function(){for(var t=[],n=0;arguments.length>n;n++)t[n]=arguments[n];if(!s){a=0;var i=e.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(t),!1));if(s=!0,u.length){var l=function(){u.forEach((function(e){return e()})),u.length=0};(0,o.isPromise)(i)?i.finally(l):l()}}},c=function(){for(var u=[],c=0;arguments.length>c;c++)u[c]=arguments[c];s=!1,t?(!a&&n&&l.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(u),!1)),(0,o.clearTimeout)(a),a=i.setTimeout((function(){return l.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(u),!1))}),(0,o.isFunction)(t)?t():t),i.timers.set(e,a)):l.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(u),!1))};return(0,o.isPlainObject)(t)&&t.promisify?function(){for(var e=[],t=0;arguments.length>t;t++)e[t]=arguments[t];var n=i.promise((function(e){u.push(e)}));return c.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(e),!1)),n}:c},e.prototype.throttle=function(e,t,n){var i=this;void 0===n&&(n=!1);var a,s,u,l=null;return function(){for(var n=[],c=0;arguments.length>c;c++)n[c]=arguments[c];a=!0,u=n,t?l||(s=function(){a?(e.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(u),!1)),a=!1,l=i.setTimeout(s,(0,o.isFunction)(t)?t():t),i.timers.set(s,l)):l=null})():e.apply(void 0,(0,r.__spreadArray)([],(0,r.__read)(u),!1))}},e.prototype.promise=function(e){var t=this,n=function(){},r=new Promise((function(r,o){return t.promisesRejections.add(o),n=o,e(r,o)}));return r.finally||(r.finally=function(e){return r.then(e).catch(e),r}),r.finally((function(){t.promisesRejections.delete(n)})),r.rejectCallback=n,r},e.prototype.promiseState=function(e){var t=this;if(e.status)return e.status;if(!Promise.race)return new Promise((function(n){e.then((function(e){return n("fulfilled"),e}),(function(e){throw n("rejected"),e})),t.setTimeout((function(){n("pending")}),100)}));var n={};return Promise.race([e,n]).then((function(e){return e===n?"pending":"fulfilled"}),(function(){return"rejected"}))},e.prototype.requestIdleCallback=function(e){var t=this.requestIdleCallbackNative(e);return this.requestsIdle.add(t),t},e.prototype.requestIdlePromise=function(){var e=this;return this.promise((function(t){var n=e.requestIdleCallback((function(){return t(n)}))}))},e.prototype.cancelIdleCallback=function(e){return this.requestsIdle.delete(e),this.cancelIdleCallbackNative(e)},e.prototype.clear=function(){var e=this;this.requestsIdle.forEach((function(t){e.cancelIdleCallback(t)})),this.timers.forEach((function(t){(0,o.clearTimeout)(e.timers.get(t))})),this.timers.clear(),this.promisesRejections.forEach((function(e){e()})),this.promisesRejections.clear()},e.prototype.destruct=function(){this.clear(),this.isDestructed=!0},e}();t.Async=i}],t={};function n(r){var o=t[r];if(void 0!==o)return o.exports;var i=t[r]={exports:{}};return e[r](i,i.exports,n),i.exports}return n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n(0)}()}));
|