diff --git a/dist/editor.js b/dist/editor.js index e8f874660..147b16e3b 100644 --- a/dist/editor.js +++ b/dist/editor.js @@ -1,2 +1,2 @@ /*! For license information please see editor.js.LICENSE.txt */ -!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.EditorJS=t():e.EditorJS=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=186)}([function(e,t,n){var o=n(10),r=n(16),i=n(27),a=n(23),s=n(31),l=function(e,t,n){var c,u,f,d,p=e&l.F,h=e&l.G,v=e&l.S,y=e&l.P,g=e&l.B,b=h?o:v?o[t]||(o[t]={}):(o[t]||{}).prototype,m=h?r:r[t]||(r[t]={}),k=m.prototype||(m.prototype={});for(c in h&&(n=t),n)f=((u=!p&&b&&void 0!==b[c])?b:n)[c],d=g&&u?s(f,o):y&&"function"==typeof f?s(Function.call,f):f,b&&a(b,c,f,e&l.U),m[c]!=f&&i(m,c,d),y&&k[c]!=f&&(k[c]=f)};o.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"log",o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"color: inherit";if("console"in window&&window.console[n]){var i=["info","log","warn","error"].includes(n),a=[];switch(c.logLevel){case s.ERROR:if("error"!==n)return;break;case s.WARN:if(!["error","warn"].includes(n))return;break;case s.INFO:if(!i||e)return}o&&a.push(o);var l="Editor.js ".concat("2.26.2"),u="line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;";e&&(i?(a.unshift(u,r),t="%c".concat(l,"%c ").concat(t)):t="( ".concat(l," )").concat(t));try{if(i)if(o){var f;(f=console)[n].apply(f,["".concat(t," %o")].concat(a))}else{var d;(d=console)[n].apply(d,[t].concat(a))}else console[n](t)}catch(e){}}}Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevels=void 0,e.array=function(e){return Array.prototype.slice.call(e)},e.beautifyShortcut=function(e){var t=g();return e=e.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e=t.mac?e.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):e.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")},e.cacheable=function(e,t,n){var o=n.value?"value":"get",r=n[o],i="#".concat(t,"Cache");if(n[o]=function(){if(void 0===this[i]){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(e).concat(Math.floor(1e8*Math.random()).toString(16))},e.getFileExtension=function(e){return e.name.split(".").pop()},e.getUserOS=g,e.getValidUrl=function(e){try{return new URL(e).href}catch(e){}return"//"===e.substring(0,2)?window.location.protocol+e:window.location.origin+e},e.isBoolean=function(e){return"boolean"===d(e)},e.isClass=function(e){return p(e)&&/^\s*class\s+/.test(e.toString())},e.isEmpty=function(e){return!e||0===Object.keys(e).length&&e.constructor===Object},e.isFunction=p,e.isIosDevice=void 0,e.isMobileScreen=function(){return window.matchMedia("(max-width: ".concat(200,"px)")).matches},e.isNumber=function(e){return"number"===d(e)},e.isObject=h,e.isPrintableKey=function(e){return e>47&&e<58||32===e||13===e||229===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223},e.isPromise=function(e){return Promise.resolve(e)===e},e.isString=function(e){return"string"===d(e)},e.isTouchSupported=void 0,e.isUndefined=v,e.isValidMimeType=function(e){return/^[-\w]+\/([-+\w]+|\*)$/.test(e)},e.mouseButtons=e.mobileScreenBreakpoint=e.logLabeled=e.log=e.keyCodes=void 0,e.openTab=function(e){window.open(e,"_blank")},e.sequence=function(e){return y.apply(this,arguments)},e.setLogLevel=function(e){c.logLevel=e},e.throttle=function(e,t){var n,o,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=null,s=0;i||(i={});var l=function(){s=!1===i.leading?0:Date.now(),a=null,r=e.apply(n,o),a||(n=o=null)};return function(){var c=Date.now();s||!1!==i.leading||(s=c);var u=t-(c-s);return n=this,o=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,r=e.apply(n,o),a||(n=o=null)):a||!1===i.trailing||(a=setTimeout(l,u)),r}},e.typeOf=d,t=l(t),o=l(o),r=l(r),a=l(a),e.LogLevels=s,function(e){e.VERBOSE="VERBOSE",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(s||(e.LogLevels=s={})),e.keyCodes={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},e.mouseButtons={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4},c.logLevel=s.VERBOSE;var u=c.bind(window,!1);e.log=u;var f=c.bind(window,!0);function d(e){return Object.prototype.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function p(e){return"function"===d(e)||"asyncfunction"===d(e)}function h(e){return"object"===d(e)}function v(e){return"undefined"===d(e)}function y(){return(y=(0,r.default)(t.default.mark((function e(n){var o,i,a,s,l=arguments;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=function(){return(s=(0,r.default)(t.default.mark((function e(n,o,r){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.function(n.data);case 3:return e.next=5,o(v(n.data)?{}:n.data);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),r(v(n.data)?{}:n.data);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)},a=function(e,t,n){return s.apply(this,arguments)},o=l.length>1&&void 0!==l[1]?l[1]:function(){},i=l.length>2&&void 0!==l[2]?l[2]:function(){},e.abrupt("return",n.reduce(function(){var e=(0,r.default)(t.default.mark((function e(n,r){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n;case 2:return e.abrupt("return",a(r,o,i));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve()));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){var e={win:!1,mac:!1,x11:!1,linux:!1},t=Object.keys(e).find((function(e){return-1!==window.navigator.appVersion.toLowerCase().indexOf(e)}));return t?(e[t]=!0,e):e}e.logLabeled=f;var b="ontouchstart"in document.documentElement;e.isTouchSupported=b,e.mobileScreenBreakpoint=200;var m="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);e.isIosDevice=m})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(152)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n3&&void 0!==arguments[3]&&arguments[3];n.mutableListenerIds.push(n.listeners.on(e,t,o,r))},clearAll:function(){var e,t=l(n.mutableListenerIds);try{for(t.s();!(e=t.n()).done;){var o=e.value;n.listeners.offById(o)}}catch(e){t.e(e)}finally{t.f()}n.mutableListenerIds=[]}},this.mutableListenerIds=[],(this instanceof e?this.constructor:void 0)===e)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=o,this.eventsDispatcher=i}return(0,i.default)(e,[{key:"state",set:function(e){this.Editor=e}},{key:"removeAllNodes",value:function(){for(var e in this.nodes){var t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}},{key:"isRtl",get:function(){return"rtl"===this.config.i18n.direction}}]),e}();o.default=u,u.displayName="Module",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(13);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var o=n(69)("wks"),r=n(44),i=n(10).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){var o=n(33),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(12),r=n(115),i=n(41),a=Object.defineProperty;t.f=n(17)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(40),n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"isSingleTag",value:function(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}},{key:"isLineBreakTag",value:function(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}},{key:"make",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,(0,r.default)(n)):n&&i.classList.add(n),o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a]);return i}},{key:"text",value:function(e){return document.createTextNode(e)}},{key:"append",value:function(e,t){Array.isArray(t)?t.forEach((function(t){return e.appendChild(t)})):e.appendChild(t)}},{key:"prepend",value:function(e,t){Array.isArray(t)?(t=t.reverse()).forEach((function(t){return e.prepend(t)})):e.prepend(t)}},{key:"swap",value:function(e,t){var n=document.createElement("div"),o=e.parentNode;o.insertBefore(n,e),o.insertBefore(e,t),o.insertBefore(t,n),o.removeChild(n)}},{key:"find",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;return e.querySelector(t)}},{key:"get",value:function(e){return document.getElementById(e)}},{key:"findAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;return e.querySelectorAll(t)}},{key:"allInputsSelector",get:function(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map((function(e){return'input[type="'.concat(e,'"]')})).join(", ")}},{key:"findAllInputs",value:function(t){return l.array(t.querySelectorAll(e.allInputsSelector)).reduce((function(t,n){return e.isNativeInput(n)||e.containsOnlyInlineElements(n)?[].concat((0,r.default)(t),[n]):[].concat((0,r.default)(t),(0,r.default)(e.getDeepestBlockElements(n)))}),[])}},{key:"getDeepestNode",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?"lastChild":"firstChild",r=n?"previousSibling":"nextSibling";if(t&&t.nodeType===Node.ELEMENT_NODE&&t[o]){var i=t[o];if(e.isSingleTag(i)&&!e.isNativeInput(i)&&!e.isLineBreakTag(i))if(i[r])i=i[r];else{if(!i.parentNode[r])return i.parentNode;i=i.parentNode[r]}return this.getDeepestNode(i,n)}return t}},{key:"isElement",value:function(e){return!l.isNumber(e)&&e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(e){return!l.isNumber(e)&&e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(e){return"true"===e.contentEditable}},{key:"isNativeInput",value:function(e){return!(!e||!e.tagName)&&["INPUT","TEXTAREA"].includes(e.tagName)}},{key:"canSetCaret",value:function(t){var n=!0;if(e.isNativeInput(t))switch(t.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}else n=e.isContentEditable(t);return n}},{key:"isNodeEmpty",value:function(e){return!(this.isSingleTag(e)&&!this.isLineBreakTag(e))&&0===(this.isElement(e)&&this.isNativeInput(e)?e.value:e.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(e){return!!e&&0===e.childNodes.length}},{key:"isEmpty",value:function(e){e.normalize();for(var t=[e];t.length>0;)if(e=t.shift()){if(this.isLeaf(e)&&!this.isNodeEmpty(e))return!1;e.childNodes&&t.push.apply(t,(0,r.default)(Array.from(e.childNodes)))}return!0}},{key:"isHTMLString",value:function(t){var n=e.make("div");return n.innerHTML=t,n.childElementCount>0}},{key:"getContentLength",value:function(t){return e.isNativeInput(t)?t.value.length:t.nodeType===Node.TEXT_NODE?t.length:t.textContent.length}},{key:"blockElements",get:function(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}},{key:"containsOnlyInlineElements",value:function(t){var n;return l.isString(t)?(n=document.createElement("div")).innerHTML=t:n=t,Array.from(n.children).every((function t(n){return!e.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(t)}))}},{key:"getDeepestBlockElements",value:function(t){return e.containsOnlyInlineElements(t)?[t]:Array.from(t.children).reduce((function(t,n){return[].concat((0,r.default)(t),(0,r.default)(e.getDeepestBlockElements(n)))}),[])}},{key:"getHolder",value:function(e){return l.isString(e)?document.getElementById(e):e}},{key:"isExtensionNode",value:function(e){return e&&["GRAMMARLY-EXTENSION"].includes(e.nodeName)}},{key:"isAnchor",value:function(e){return"a"===e.tagName.toLowerCase()}},{key:"offset",value:function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,r=t.top+o,i=t.left+n;return{top:r,left:i,bottom:r+t.height,right:i+t.width}}}]),e}();o.default=f,f.displayName="Dom",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(367)();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t){function n(e,t,n,o,r,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,r)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise((function(r,i){var a=e.apply(t,o);function s(e){n(a,r,i,s,l,"next",e)}function l(e){n(a,r,i,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(38);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(10),r=n(27),i=n(26),a=n(44)("src"),s=n(191),l=(""+s).split("toString");n(16).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(c&&(i(n,a)||r(n,a,e[t]?""+e[t]:l.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(e,t,n){var o=n(0),r=n(11),i=n(38),a=/"/g,s=function(e,t,n,o){var r=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(a,""")+'"'),s+">"+r+""};e.exports=function(e,t){var n={};n[e]=t(s),o(o.P+o.F*r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8),n(19)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s),l=c(l);var f=function(){function e(){(0,r.default)(this,e),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,i.default)(e,[{key:"removeFakeBackground",value:function(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}},{key:"setFakeBackground",value:function(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}},{key:"save",value:function(){this.savedSelectionRange=e.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"collapseToEnd",value:function(){var e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}},{key:"findParentTag",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),r=null;if(!o||!o.anchorNode||!o.focusNode)return null;var i=[o.anchorNode,o.focusNode];return i.forEach((function(o){for(var i=n;i>0&&o.parentNode&&(o.tagName!==e||(r=o,t&&o.classList&&!o.classList.contains(t)&&(r=null),!r));)o=o.parentNode,i--})),r}},{key:"expandToTag",value:function(e){var t=window.getSelection();t.removeAllRanges();var n=document.createRange();n.selectNodeContents(e),t.addRange(n)}}],[{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var e=window.getSelection();return e?e.anchorNode:null}},{key:"anchorElement",get:function(){var e=window.getSelection();if(!e)return null;var t=e.anchorNode;return t?l.default.isElement(t)?t:t.parentElement:null}},{key:"anchorOffset",get:function(){var e=window.getSelection();return e?e.anchorOffset:null}},{key:"isCollapsed",get:function(){var e=window.getSelection();return e?e.isCollapsed:null}},{key:"isAtEditor",get:function(){return this.isSelectionAtEditor(e.get())}},{key:"isSelectionAtEditor",value:function(t){if(!t)return!1;var n=t.anchorNode||t.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&n instanceof Element&&(o=n.closest(".".concat(e.CSS.editorZone))),!!o&&o.nodeType===Node.ELEMENT_NODE}},{key:"isRangeAtEditor",value:function(t){if(t){var n=t.startContainer;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&n instanceof Element&&(o=n.closest(".".concat(e.CSS.editorZone))),!!o&&o.nodeType===Node.ELEMENT_NODE}}},{key:"isSelectionExists",get:function(){return!!e.get().anchorNode}},{key:"range",get:function(){return this.getRangeFromSelection(this.get())}},{key:"getRangeFromSelection",value:function(e){return e&&e.rangeCount?e.getRangeAt(0):null}},{key:"rect",get:function(){var e,t=document.selection,n={x:0,y:0,width:0,height:0};if(t&&"Control"!==t.type)return e=(t=t).createRange(),n.x=e.boundingLeft,n.y=e.boundingTop,n.width=e.boundingWidth,n.height=e.boundingHeight,n;if(!window.getSelection)return s.log("Method window.getSelection is not supported","warn"),n;if(null===(t=window.getSelection()).rangeCount||isNaN(t.rangeCount))return s.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if(0===t.rangeCount)return n;if((e=t.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=e.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement("span");if(o.getBoundingClientRect){o.appendChild(document.createTextNode("​")),e.insertNode(o),n=o.getBoundingClientRect();var r=o.parentNode;r.removeChild(o),r.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}},{key:"get",value:function(){return window.getSelection()}},{key:"setCursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),o=window.getSelection();if(l.default.isNativeInput(e)){if(!l.default.canSetCaret(e))return;return e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()}return n.setStart(e,t),n.setEnd(e,t),o.removeAllRanges(),o.addRange(n),n.getBoundingClientRect()}},{key:"addFakeCursor",value:function(t){var n=e.range,o=l.default.make("span","codex-editor__fake-cursor");o.dataset.mutationFree="true",!n||t&&!t.contains(n.startContainer)||(n.collapse(),n.insertNode(o))}},{key:"removeFakeCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=l.default.find(e,".codex-editor__fake-cursor");t&&t.remove()}}]),e}();o.default=f,f.displayName="SelectionUtils",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(18),r=n(43);e.exports=n(17)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(61),r=n(38);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var o=n(11);e.exports=function(e,t){return!!e&&o((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var o=n(361),r=n(362),i=n(146),a=n(363);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(32);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(62),r=n(43),i=n(28),a=n(41),s=n(26),l=n(115),c=Object.getOwnPropertyDescriptor;t.f=n(17)?c:function(e,t){if(e=i(e),t=a(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(0),r=n(16),i=n(11);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],a={};a[e]=t(n),o(o.S+o.F*i((function(){n(1)})),"Object",a)}},function(e,t,n){var o=n(31),r=n(61),i=n(22),a=n(15),s=n(131);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,f=6==e,d=5==e||f,p=t||s;return function(t,s,h){for(var v,y,g=i(t),b=r(g),m=o(s,h,3),k=a(b.length),x=0,w=n?p(t,k):l?p(t,0):void 0;k>x;x++)if((d||x in b)&&(y=m(v=b[x],x,g),e))if(n)w[x]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(u)return!1;return f?-1:c||u?u:w}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(17)){var o=n(45),r=n(10),i=n(11),a=n(0),s=n(80),l=n(109),c=n(31),u=n(58),f=n(43),d=n(27),p=n(59),h=n(33),v=n(15),y=n(142),g=n(47),b=n(41),m=n(26),k=n(63),x=n(13),w=n(22),S=n(101),C=n(48),T=n(50),E=n(49).f,_=n(103),B=n(44),O=n(14),M=n(36),I=n(70),P=n(64),L=n(105),R=n(56),A=n(73),j=n(57),N=n(104),D=n(133),F=n(18),H=n(34),W=F.f,U=H.f,z=r.RangeError,V=r.TypeError,Y=r.Uint8Array,X=Array.prototype,Z=l.ArrayBuffer,G=l.DataView,K=M(0),q=M(2),J=M(3),$=M(4),Q=M(5),ee=M(6),te=I(!0),ne=I(!1),oe=L.values,re=L.keys,ie=L.entries,ae=X.lastIndexOf,se=X.reduce,le=X.reduceRight,ce=X.join,ue=X.sort,fe=X.slice,de=X.toString,pe=X.toLocaleString,he=O("iterator"),ve=O("toStringTag"),ye=B("typed_constructor"),ge=B("def_constructor"),be=s.CONSTR,me=s.TYPED,ke=s.VIEW,xe=M(1,(function(e,t){return Ee(P(e,e[ge]),t)})),we=i((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),Se=!!Y&&!!Y.prototype.set&&i((function(){new Y(1).set({})})),Ce=function(e,t){var n=h(e);if(n<0||n%t)throw z("Wrong offset!");return n},Te=function(e){if(x(e)&&me in e)return e;throw V(e+" is not a typed array!")},Ee=function(e,t){if(!x(e)||!(ye in e))throw V("It is not a typed array constructor!");return new e(t)},_e=function(e,t){return Be(P(e,e[ge]),t)},Be=function(e,t){for(var n=0,o=t.length,r=Ee(e,o);o>n;)r[n]=t[n++];return r},Oe=function(e,t,n){W(e,t,{get:function(){return this._d[n]}})},Me=function(e){var t,n,o,r,i,a,s=w(e),l=arguments.length,u=l>1?arguments[1]:void 0,f=void 0!==u,d=_(s);if(null!=d&&!S(d)){for(a=d.call(s),o=[],t=0;!(i=a.next()).done;t++)o.push(i.value);s=o}for(f&&l>2&&(u=c(u,arguments[2],2)),t=0,n=v(s.length),r=Ee(this,n);n>t;t++)r[t]=f?u(s[t],t):s[t];return r},Ie=function(){for(var e=0,t=arguments.length,n=Ee(this,t);t>e;)n[e]=arguments[e++];return n},Pe=!!Y&&i((function(){pe.call(new Y(1))})),Le=function(){return pe.apply(Pe?fe.call(Te(this)):Te(this),arguments)},Re={copyWithin:function(e,t){return D.call(Te(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Te(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(Te(this),arguments)},filter:function(e){return _e(this,q(Te(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Te(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Te(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(Te(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Te(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Te(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Te(this),arguments)},lastIndexOf:function(e){return ae.apply(Te(this),arguments)},map:function(e){return xe(Te(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Te(this),arguments)},reduceRight:function(e){return le.apply(Te(this),arguments)},reverse:function(){for(var e,t=Te(this).length,n=Math.floor(t/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return ue.call(Te(this),e)},subarray:function(e,t){var n=Te(this),o=n.length,r=g(e,o);return new(P(n,n[ge]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,v((void 0===t?o:g(t,o))-r))}},Ae=function(e,t){return _e(this,fe.call(Te(this),e,t))},je=function(e){Te(this);var t=Ce(arguments[1],1),n=this.length,o=w(e),r=v(o.length),i=0;if(r+t>n)throw z("Wrong length!");for(;i255?255:255&o),r.v[p](n*t+r.o,o,we)}(this,n,e)},enumerable:!0})};m?(h=n((function(e,n,o,r){u(e,h,c,"_d");var i,a,s,l,f=0,p=0;if(x(n)){if(!(n instanceof Z||"ArrayBuffer"==(l=k(n))||"SharedArrayBuffer"==l))return me in n?Be(h,n):Me.call(h,n);i=n,p=Ce(o,t);var g=n.byteLength;if(void 0===r){if(g%t)throw z("Wrong length!");if((a=g-p)<0)throw z("Wrong length!")}else if((a=v(r)*t)+p>g)throw z("Wrong length!");s=a/t}else s=y(n),i=new Z(a=s*t);for(d(e,"_d",{b:i,o:p,l:a,e:s,v:new G(i)});fdocument.F=Object<\/script>"),e.close(),l=e.F;o--;)delete l.prototype[i[o]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(117),r=n(88).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){var o=n(26),r=n(22),i=n(87)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var o=n(14)("unscopables"),r=Array.prototype;null==r[o]&&n(27)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){var o=n(13);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(148)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,null,[{key:"ui",value:function(t,n){return e._t(t,n)}},{key:"t",value:function(t,n){return e._t(t,n)}},{key:"setDictionary",value:function(t){e.currentDictionary=t}},{key:"_t",value:function(t,n){var o=e.getNamespace(t);return o&&o[n]?o[n]:n}},{key:"getNamespace",value:function(t){return t.split(".").reduce((function(e,t){return e&&Object.keys(e).length?e[t]:{}}),e.currentDictionary)}}]),e}();o.default=l,l.displayName="I18n",l.currentDictionary=a.default,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(18).f,r=n(26),i=n(14)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(0),r=n(38),i=n(11),a=n(91),s="["+a+"]",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),u=function(e,t,n){var r={},s=i((function(){return!!a[e]()||"​…"!="​…"[e]()})),l=r[e]=s?t(f):a[e];n&&(r[n]=l),o(o.P+o.F*s,"String",r)},f=u.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=u},function(e,t){e.exports={}},function(e,t,n){"use strict";var o=n(10),r=n(18),i=n(17),a=n(14)("species");e.exports=function(e){var t=o[e];i&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var o=n(23);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(40),n(2),n(3),n(150),n(112),n(5),n(6),n(4),n(19),n(8),n(111),n(25),n(81)],void 0===(i="function"==typeof(o=function(e,t,o,r,i,s,l,c,u,f,d,p,h,v,y,g,b){"use strict";var m,k=n(1);function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockToolAPI=void 0,t=k(t),o=k(o),r=k(r),i=k(i),s=k(s),l=k(l),c=k(c),u=k(u),f=k(f),d=k(d),p=k(p),h=k(h),v=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(v),y=k(y),g=k(g),b=k(b),e.BlockToolAPI=m,function(e){e.APPEND_CALLBACK="appendCallback",e.RENDERED="rendered",e.MOVED="moved",e.UPDATED="updated",e.REMOVED="removed",e.ON_PASTE="onPaste"}(m||(e.BlockToolAPI=m={}));var S=function(e){(0,f.default)(x,e);var n,a,d,b,k=w(x);function x(e){var t,n=e.id,o=void 0===n?v.generateBlockId():n,r=e.data,a=e.tool,l=e.api,u=e.readOnly,f=e.tunesData;return(0,s.default)(this,x),(t=k.call(this)).cachedInputs=[],t.tunesInstances=new Map,t.defaultTunesInstances=new Map,t.unavailableTunesData={},t.inputIndex=0,t.modificationDebounceTimer=450,t.didMutated=v.debounce((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=e instanceof InputEvent||!e.some((function(e){var t=e.addedNodes,n=void 0===t?[]:t,o=e.removedNodes;return[].concat((0,i.default)(Array.from(n)),(0,i.default)(Array.from(o))).some((function(e){return h.default.isElement(e)&&"true"===e.dataset.mutationFree}))}));n&&(t.cachedInputs=[],t.updateCurrentInput(),t.call(m.UPDATED),t.emit("didMutated",(0,c.default)(t)))}),t.modificationDebounceTimer),t.handleFocus=function(){t.cachedInputs=[],t.updateCurrentInput()},t.name=a.name,t.id=o,t.settings=a.settings,t.config=a.settings.config||{},t.api=l,t.blockAPI=new y.default((0,c.default)(t)),t.mutationObserver=new MutationObserver(t.didMutated),t.tool=a,t.toolInstance=a.create(r,t.blockAPI,u),t.tunes=a.tunes,t.composeTunes(f),t.holder=t.compose(),t}return(0,l.default)(x,[{key:"inputs",get:function(){if(0!==this.cachedInputs.length)return this.cachedInputs;var e=h.default.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(e){var t=this.inputs.findIndex((function(t){return t===e||t.contains(e)}));-1!==t&&(this.inputIndex=t)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var e=this.inputs;return e[e.length-1]}},{key:"nextInput",get:function(){return this.inputs[this.inputIndex+1]}},{key:"previousInput",get:function(){return this.inputs[this.inputIndex-1]}},{key:"data",get:function(){return this.save().then((function(e){return e&&!v.isEmpty(e.data)?e.data:{}}))}},{key:"sanitize",get:function(){return this.tool.sanitizeConfig}},{key:"mergeable",get:function(){return v.isFunction(this.toolInstance.merge)}},{key:"isEmpty",get:function(){var e=h.default.isEmpty(this.pluginsContent),t=!this.hasMedia;return e&&t}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",get:function(){return this.holder.classList.contains(x.CSS.focused)},set:function(e){this.holder.classList.toggle(x.CSS.focused,e)}},{key:"selected",get:function(){return this.holder.classList.contains(x.CSS.selected)},set:function(e){e?(this.holder.classList.add(x.CSS.selected),g.default.addFakeCursor(this.holder)):(this.holder.classList.remove(x.CSS.selected),g.default.removeFakeCursor(this.holder))}},{key:"stretched",get:function(){return this.holder.classList.contains(x.CSS.wrapperStretched)},set:function(e){this.holder.classList.toggle(x.CSS.wrapperStretched,e)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(x.CSS.dropTarget,e)}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(x.CSS.content));if(e&&e.childNodes.length)for(var t=e.childNodes.length-1;t>=0;t--){var n=e.childNodes[t];if(!h.default.isExtensionNode(n))return n}return null}},{key:"call",value:function(e,t){if(v.isFunction(this.toolInstance[e])){e===m.APPEND_CALLBACK&&v.log("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(t){v.log("Error during '".concat(e,"' call: ").concat(t.message),"error")}}}},{key:"mergeWith",value:(b=(0,r.default)(t.default.mark((function e(n){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.toolInstance.merge(n);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"save",value:(d=(0,r.default)(t.default.mark((function e(){var n,r,a,s,l=this;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.toolInstance.save(this.pluginsContent);case 2:return n=e.sent,r=this.unavailableTunesData,[].concat((0,i.default)(this.tunesInstances.entries()),(0,i.default)(this.defaultTunesInstances.entries())).forEach((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];if(v.isFunction(i.save))try{r[n]=i.save()}catch(e){v.log("Tune ".concat(i.constructor.name," save method throws an Error %o"),"warn",e)}})),a=window.performance.now(),e.abrupt("return",Promise.resolve(n).then((function(e){return s=window.performance.now(),{id:l.id,tool:l.name,data:e,tunes:r,time:s-a}})).catch((function(e){v.log("Saving process for ".concat(l.name," tool failed due to the ").concat(e),"log","red")})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"validate",value:(a=(0,r.default)(t.default.mark((function e(n){var o;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=!0,!(this.toolInstance.validate instanceof Function)){e.next=5;break}return e.next=4,this.toolInstance.validate(n);case 4:o=e.sent;case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getTunes",value:function(){var e=document.createElement("div"),t=[];return["function"==typeof this.toolInstance.renderSettings?this.toolInstance.renderSettings():[],[].concat((0,i.default)(this.tunesInstances.values()),(0,i.default)(this.defaultTunesInstances.values())).map((function(e){return e.render()}))].flat().forEach((function(n){h.default.isElement(n)?e.appendChild(n):Array.isArray(n)?t.push.apply(t,(0,i.default)(n)):t.push(n)})),[t,e]}},{key:"updateCurrentInput",value:function(){this.currentInput=h.default.isNativeInput(document.activeElement)||!g.default.anchorNode?document.activeElement:g.default.anchorNode}},{key:"willSelect",value:function(){this.mutationObserver.observe(this.holder.firstElementChild,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.addInputEvents()}},{key:"willUnselect",value:function(){this.mutationObserver.disconnect(),this.removeInputEvents()}},{key:"dispatchChange",value:function(){this.didMutated()}},{key:"destroy",value:function(){(0,u.default)((0,p.default)(x.prototype),"destroy",this).call(this),v.isFunction(this.toolInstance.destroy)&&this.toolInstance.destroy()}},{key:"getActiveToolboxEntry",value:(n=(0,r.default)(t.default.mark((function e(){var n,r,i;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==(n=this.tool.toolbox).length){e.next=3;break}return e.abrupt("return",Promise.resolve(this.tool.toolbox[0]));case 3:return e.next=5,this.data;case 5:return r=e.sent,i=n,e.abrupt("return",i.find((function(e){return Object.entries(e.data).some((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];return r[n]&&v.equals(r[n],i)}))})));case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"compose",value:function(){var e=h.default.make("div",x.CSS.wrapper),t=h.default.make("div",x.CSS.content),n=this.toolInstance.render();t.appendChild(n);var o=t;return[].concat((0,i.default)(this.tunesInstances.values()),(0,i.default)(this.defaultTunesInstances.values())).forEach((function(e){if(v.isFunction(e.wrap))try{o=e.wrap(o)}catch(t){v.log("Tune ".concat(e.constructor.name," wrap method throws an Error %o"),"warn",t)}})),e.appendChild(o),e}},{key:"composeTunes",value:function(e){var t=this;Array.from(this.tunes.values()).forEach((function(n){(n.isInternal?t.defaultTunesInstances:t.tunesInstances).set(n.name,n.create(e[n.name],t.blockAPI))})),Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),r=n[0],i=n[1];t.tunesInstances.has(r)||(t.unavailableTunesData[r]=i)}))}},{key:"addInputEvents",value:function(){var e=this;this.inputs.forEach((function(t){t.addEventListener("focus",e.handleFocus),h.default.isNativeInput(t)&&t.addEventListener("input",e.didMutated)}))}},{key:"removeInputEvents",value:function(){var e=this;this.inputs.forEach((function(t){t.removeEventListener("focus",e.handleFocus),h.default.isNativeInput(t)&&t.removeEventListener("input",e.didMutated)}))}}],[{key:"CSS",get:function(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",focused:"ce-block--focused",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}}]),x}(b.default);e.default=S,S.displayName="Block"})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(37);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var o=n(37),r=n(14)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:i?o(t):"Object"==(a=o(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var o=n(12),r=n(32),i=n(14)("species");e.exports=function(e,t){var n,a=o(e).constructor;return void 0===a||null==(n=o(a)[i])?t:r(n)}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(8),n(379)],void 0===(i="function"==typeof(o=function(e,t,o){"use strict";var r=n(1);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={tags:t},r=new o.default(n);return r.clean(e)}function l(e,n){return Array.isArray(e)?(i=n,e.map((function(e){return l(e,i)}))):t.isObject(e)?function(e,n){var o,r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=e[i],s=(o=n[i],t.isObject(o)||t.isBoolean(o)||t.isFunction(o)?n[i]:n);r[i]=l(a,s)}return r}(e,n):t.isString(e)?(o=e,r=n,t.isObject(r)?s(o,r):!1===r?s(o,{}):o):e;var o,r,i}Object.defineProperty(e,"__esModule",{value:!0}),e.clean=s,e.sanitizeBlocks=function(e,n){return e.map((function(e){var o=t.isFunction(n)?n(e.tool):n;return t.isEmpty(o)||(e.data=l(e.data,o)),e}))},t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=r?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o}(t),o=r(o)})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(381),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f=function(){function e(t){var n=this;(0,r.default)(this,e),this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=function(t){if(n.isEventReadyForHandling(t))switch(e.usedKeys.includes(t.keyCode)&&t.preventDefault(),t.keyCode){case l.keyCodes.TAB:n.handleTabPress(t);break;case l.keyCodes.LEFT:case l.keyCodes.UP:n.flipLeft();break;case l.keyCodes.RIGHT:case l.keyCodes.DOWN:n.flipRight();break;case l.keyCodes.ENTER:n.handleEnterPress(t)}},this.iterator=new s.default(t.items,t.focusedItemClass),this.activateCallback=t.activateCallback,this.allowedKeys=t.allowedKeys||e.usedKeys}return(0,i.default)(e,[{key:"isActivated",get:function(){return this.activated}},{key:"activate",value:function(e,t){this.activated=!0,e&&this.iterator.setItems(e),void 0!==t&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}},{key:"deactivate",value:function(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}},{key:"focusFirst",value:function(){this.dropCursor(),this.flipRight()}},{key:"flipLeft",value:function(){this.iterator.previous(),this.flipCallback()}},{key:"flipRight",value:function(){this.iterator.next(),this.flipCallback()}},{key:"hasFocus",value:function(){return!!this.iterator.currentItem}},{key:"onFlip",value:function(e){this.flipCallbacks.push(e)}},{key:"removeOnFlip",value:function(e){this.flipCallbacks=this.flipCallbacks.filter((function(t){return t!==e}))}},{key:"dropCursor",value:function(){this.iterator.dropCursor()}},{key:"isEventReadyForHandling",value:function(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}},{key:"handleTabPress",value:function(e){switch(e.shiftKey?s.default.directions.LEFT:s.default.directions.RIGHT){case s.default.directions.RIGHT:this.flipRight();break;case s.default.directions.LEFT:this.flipLeft()}}},{key:"handleEnterPress",value:function(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),l.isFunction(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}},{key:"flipCallback",value:function(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach((function(e){return e()}))}}],[{key:"usedKeys",get:function(){return[l.keyCodes.TAB,l.keyCodes.LEFT,l.keyCodes.RIGHT,l.keyCodes.ENTER,l.keyCodes.UP,l.keyCodes.DOWN]}}]),e}();o.default=f,f.displayName="Flipper",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(30),n(148),n(8)],void 0===(i="function"==typeof(o=function(e,t,o,r){"use strict";var i=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.I18nInternalNS=void 0,t=i(t);var a=function e(n,o){var i={};return Object.entries(n).forEach((function(n){var a=(0,t.default)(n,2),s=a[0],l=a[1];if((0,r.isObject)(l)){var c=o?"".concat(o,".").concat(s):s,u=Object.values(l).every((function(e){return(0,r.isString)(e)}));i[s]=u?c:e(l,c)}else i[s]=l})),i}((o=i(o)).default);e.I18nInternalNS=a})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(e,t,o,r){"use strict";var i,s,l,c,u,f,d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.UserSettings=e.ToolType=e.InternalTuneSettings=e.InternalInlineToolSettings=e.InternalBlockToolSettings=e.CommonInternalSettings=void 0,t=d(t),o=d(o),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(r),e.ToolType=i,function(e){e[e.Block=0]="Block",e[e.Inline=1]="Inline",e[e.Tune=2]="Tune"}(i||(e.ToolType=i={})),e.UserSettings=s,function(e){e.Shortcut="shortcut",e.Toolbox="toolbox",e.EnabledInlineTools="inlineToolbar",e.EnabledBlockTunes="tunes",e.Config="config"}(s||(e.UserSettings=s={})),e.CommonInternalSettings=l,function(e){e.Shortcut="shortcut",e.SanitizeConfig="sanitize"}(l||(e.CommonInternalSettings=l={})),e.InternalBlockToolSettings=c,function(e){e.IsEnabledLineBreaks="enableLineBreaks",e.Toolbox="toolbox",e.ConversionConfig="conversionConfig",e.IsReadOnlySupported="isReadOnlySupported",e.PasteConfig="pasteConfig"}(c||(e.InternalBlockToolSettings=c={})),e.InternalInlineToolSettings=u,function(e){e.IsInline="isInline",e.Title="title"}(u||(e.InternalInlineToolSettings=u={})),e.InternalTuneSettings=f,function(e){e.IsTune="isTune"}(f||(e.InternalTuneSettings=f={}));var h=function(){function e(n){var o=n.name,r=n.constructable,i=n.config,a=n.api,s=n.isDefault,l=n.isInternal,c=void 0!==l&&l,u=n.defaultPlaceholder;(0,t.default)(this,e),this.api=a,this.name=o,this.constructable=r,this.config=i,this.isDefault=s,this.isInternal=c,this.defaultPlaceholder=u}return(0,o.default)(e,[{key:"settings",get:function(){var e=this.config[s.Config]||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}},{key:"reset",value:function(){if(r.isFunction(this.constructable.reset))return this.constructable.reset()}},{key:"prepare",value:function(){if(r.isFunction(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}},{key:"shortcut",get:function(){var e=this.constructable[l.Shortcut];return this.config[s.Shortcut]||e}},{key:"sanitizeConfig",get:function(){return this.constructable[l.SanitizeConfig]||{}}},{key:"isInline",value:function(){return this.type===i.Inline}},{key:"isBlock",value:function(){return this.type===i.Block}},{key:"isTune",value:function(){return this.type===i.Tune}}]),e}();e.default=h,h.displayName="BaseTool"})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(16),r=n(10),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:n(45)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var o=n(28),r=n(15),i=n(47);e.exports=function(e){return function(t,n,a){var s,l=o(t),c=r(l.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(37);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){var o=n(14)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],a=i[o]();a.next=function(){return{done:n=!0}},i[o]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var o=n(12);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o=n(63),r=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==o(e))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";n(135);var o=n(23),r=n(27),i=n(11),a=n(38),s=n(14),l=n(106),c=s("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),p=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[d](""),!t})):void 0;if(!p||!h||"replace"===e&&!u||"split"===e&&!f){var v=/./[d],y=n(a,d,""[e],(function(e,t,n,o,r){return t.exec===l?p&&!r?{done:!0,value:v.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}})),g=y[0],b=y[1];o(String.prototype,e,g),r(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},function(e,t,n){var o=n(31),r=n(130),i=n(101),a=n(12),s=n(15),l=n(103),c={},u={};(t=e.exports=function(e,t,n,f,d){var p,h,v,y,g=d?function(){return e}:l(e),b=o(n,f,t?2:1),m=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(p=s(e.length);p>m;m++)if((y=t?b(a(h=e[m])[0],h[1]):b(e[m]))===c||y===u)return y}else for(v=g.call(e);!(h=v.next()).done;)if((y=r(v,b,h.value,t))===c||y===u)return y}).BREAK=c,t.RETURN=u},function(e,t,n){var o=n(10).navigator;e.exports=o&&o.userAgent||""},function(e,t,n){"use strict";var o=n(10),r=n(0),i=n(23),a=n(59),s=n(42),l=n(77),c=n(58),u=n(13),f=n(11),d=n(73),p=n(54),h=n(92);e.exports=function(e,t,n,v,y,g){var b=o[e],m=b,k=y?"set":"add",x=m&&m.prototype,w={},S=function(e){var t=x[e];i(x,e,"delete"==e||"has"==e?function(e){return!(g&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof m&&(g||x.forEach&&!f((function(){(new m).entries().next()})))){var C=new m,T=C[k](g?{}:-0,1)!=C,E=f((function(){C.has(1)})),_=d((function(e){new m(e)})),B=!g&&f((function(){for(var e=new m,t=5;t--;)e[k](t,t);return!e.has(-0)}));_||((m=t((function(t,n){c(t,m,e);var o=h(new b,t,m);return null!=n&&l(n,y,o[k],o),o}))).prototype=x,x.constructor=m),(E||B)&&(S("delete"),S("has"),y&&S("get")),(B||T)&&S(k),g&&x.clear&&delete x.clear}else m=v.getConstructor(t,e,y,k),a(m.prototype,n),s.NEED=!0;return p(m,e),w[e]=m,r(r.G+r.W+r.F*(m!=b),w),g||v.setStrong(m,e,y),m}},function(e,t,n){for(var o,r=n(10),i=n(27),a=n(44),s=a("typed_array"),l=a("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,f=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(o=r[d[f++]])?(i(o.prototype,s,!0),i(o.prototype,l,!0)):u=!1;e.exports={ABV:c,CONSTR:u,TYPED:s,VIEW:l}},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e),this.subscribers={}}return(0,i.default)(e,[{key:"on",value:function(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}},{key:"once",value:function(e,t){var n=this;e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push((function o(r){var i=t(r),a=n.subscribers[e].indexOf(o);return-1!==a&&n.subscribers[e].splice(a,1),i}))}},{key:"emit",value:function(e,t){!(0,a.isEmpty)(this.subscribers)&&this.subscribers[e]&&this.subscribers[e].reduce((function(e,t){return t(e)||e}),t)}},{key:"off",value:function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.Editor.BlockManager.currentBlock;if(this.toolboxInstance.close(),this.Editor.BlockSettings.close(),e){this.hoveredBlock=e;var t,n=e.holder,o=this.Editor.UI.isMobile,r=e.pluginsContent,i=window.getComputedStyle(r),a=parseInt(i.paddingTop,10),s=n.offsetHeight;t=o?n.offsetTop+s:n.offsetTop+a,this.nodes.wrapper.style.top="".concat(Math.floor(t),"px"),1===this.Editor.BlockManager.blocks.length&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}}},{key:"close",value:function(){this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),this.toolboxInstance.close(),this.Editor.BlockSettings.close())}},{key:"open",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];d.delay((function(){e.nodes.wrapper.classList.add(e.CSS.toolbarOpened),t?e.blockActions.show():e.blockActions.hide()}),50)()}},{key:"make",value:function(){var e=this;this.nodes.wrapper=f.default.make("div",this.CSS.toolbar),["content","actions"].forEach((function(t){e.nodes[t]=f.default.make("div",e.CSS[t])})),f.default.append(this.nodes.wrapper,this.nodes.content),f.default.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=f.default.make("div",this.CSS.plusButton,{innerHTML:''}),f.default.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",(function(){e.tooltip.hide(!0),e.plusButtonClicked()}),!1);var t=f.default.make("div");t.appendChild(document.createTextNode(p.default.ui(h.I18nInternalNS.ui.toolbar.toolbox,"Add"))),t.appendChild(f.default.make("div",this.CSS.plusButtonShortcut,{textContent:"⇥ Tab"})),this.tooltip.onHover(this.nodes.plusButton,t,{hidingDelay:400}),this.nodes.settingsToggler=f.default.make("span",this.CSS.settingsToggler,{innerHTML:''}),f.default.append(this.nodes.actions,this.nodes.settingsToggler),this.tooltip.onHover(this.nodes.settingsToggler,p.default.ui(h.I18nInternalNS.ui.blockTunes.toggler,"Click to tune"),{hidingDelay:400}),f.default.append(this.nodes.actions,this.makeToolbox()),f.default.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}},{key:"makeToolbox",value:function(){var e=this;return this.toolboxInstance=new y.default({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:p.default.ui(h.I18nInternalNS.ui.popover,"Filter"),nothingFound:p.default.ui(h.I18nInternalNS.ui.popover,"Nothing found")}}),this.toolboxInstance.on(y.ToolboxEvent.Opened,(function(){e.Editor.UI.nodes.wrapper.classList.add(e.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(y.ToolboxEvent.Closed,(function(){e.Editor.UI.nodes.wrapper.classList.remove(e.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(y.ToolboxEvent.BlockAdded,(function(t){var n=t.block,o=e.Editor,r=o.BlockManager,i=o.Caret,a=r.getBlockById(n.id);0===a.inputs.length&&(a===r.lastBlock?(r.insertAtEnd(),i.setToBlock(r.lastBlock)):i.setToBlock(r.nextBlock))})),this.toolboxInstance.make()}},{key:"plusButtonClicked",value:function(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.toggle()}},{key:"enableModuleBindings",value:function(){var e=this;this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",(function(t){t.stopPropagation(),e.settingsTogglerClicked(),e.toolboxInstance.close(),e.tooltip.hide(!0)}),!0),d.isMobileScreen()||this.eventsDispatcher.on(this.Editor.UI.events.blockHovered,(function(t){e.Editor.BlockSettings.opened||e.toolboxInstance.opened||e.moveAndOpen(t.block)}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}},{key:"drawUI",value:function(){this.Editor.BlockSettings.make(),this.make()}},{key:"destroy",value:function(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy(),this.tooltip.destroy()}}]),n}(u.default);o.default=x,x.displayName="Toolbar",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(40),n(2),n(3),n(5),n(6),n(4),n(7),n(19),n(152),n(66),n(81),n(8),n(386)],void 0===(i="function"==typeof(o=function(e,t,o,r,i,a,s,l,c,u,f,d,p,h){"use strict";var v=n(1);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,s.default)(e);if(t){var r=(0,s.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,a.default)(this,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.PopoverEvent=void 0,t=v(t),o=v(o),r=v(r),i=v(i),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),f=v(f),d=v(d),h=v(h);var g,b=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===("undefined"==typeof Reflect?"undefined":(0,l.default)(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=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.PopoverEvent=g,function(e){e.OverlayClicked="overlay-clicked",e.Close="close"}(g||(e.PopoverEvent=g={}));var m=function(e){(0,i.default)(a,e);var n=y(a);function a(e){var t,r=e.items,i=e.className,s=e.searchable,l=e.filterLabel,c=e.nothingFoundLabel,f=e.customContent,d=e.customContentFlippableItems,p=e.scopeElement;return(0,o.default)(this,a),(t=n.call(this)).customContentFlippableItems=[],t.isShown=!1,t.nodes={wrapper:null,popover:null,items:null,nothingFound:null,overlay:null},t.scrollLocker=new h.default,t.itemsRequiringConfirmation={},t.removeSpecialHoverBehavior=function(){var e=t.nodes.items.querySelector(".".concat(a.CSS.itemNoHover));e&&e.classList.remove(a.CSS.itemNoHover)},t.onFlip=function(){t.disableSpecialHoverAndFocusBehavior()},t.items=r,t.customContent=f,t.customContentFlippableItems=d,t.className=i||"",t.searchable=s,t.listeners=new u.default,t.scopeElement=p,t.filterLabel=l,t.nothingFoundLabel=c,t.render(),t.enableFlipper(),t}return(0,r.default)(a,[{key:"getElement",value:function(){return this.nodes.wrapper}},{key:"show",value:function(){this.shouldOpenPopoverBottom||(this.nodes.wrapper.style.setProperty("--popover-height",this.calculateHeight()+"px"),this.nodes.wrapper.classList.add(this.className+"--opened-top")),this.nodes.items.scrollTop=0,this.nodes.popover.classList.add(a.CSS.popoverOpened),this.nodes.overlay.classList.remove(a.CSS.popoverOverlayHidden),this.flipper.activate(this.flippableElements),(0,p.isMobileScreen)()&&this.scrollLocker.lock(),this.isShown=!0}},{key:"hide",value:function(){var e=this;this.isShown&&(this.nodes.popover.classList.remove(a.CSS.popoverOpened),this.nodes.overlay.classList.add(a.CSS.popoverOverlayHidden),this.flipper.deactivate(),(0,p.isMobileScreen)()&&this.scrollLocker.unlock(),this.isShown=!1,this.nodes.wrapper.classList.remove(this.className+"--opened-top"),Array.from(this.nodes.items.querySelectorAll(".".concat(a.CSS.itemConfirmation))).forEach((function(t){return e.cleanUpConfirmationStateForItem(t)})),this.disableSpecialHoverAndFocusBehavior(),this.emit(g.Close))}},{key:"destroy",value:function(){this.flipper.deactivate(),this.listeners.removeAll(),this.disableSpecialHoverAndFocusBehavior(),(0,p.isMobileScreen)()&&this.scrollLocker.unlock()}},{key:"hasFocus",value:function(){return this.flipper.hasFocus()}},{key:"calculateHeight",value:function(){var e,t=this.nodes.popover.cloneNode(!0);return t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.classList.add(a.CSS.popoverOpened),document.body.appendChild(t),e=t.offsetHeight,t.remove(),e}},{key:"render",value:function(){var e=this;this.nodes.wrapper=c.default.make("div",this.className),this.nodes.popover=c.default.make("div",a.CSS.popover),this.nodes.wrapper.appendChild(this.nodes.popover),this.nodes.overlay=c.default.make("div",[a.CSS.popoverOverlay,a.CSS.popoverOverlayHidden]),this.nodes.wrapper.appendChild(this.nodes.overlay),this.customContent&&(this.customContent.classList.add(a.CSS.customContent),this.nodes.popover.appendChild(this.customContent)),this.nodes.items=c.default.make("div",a.CSS.itemsWrapper),this.items.forEach((function(t){e.nodes.items.appendChild(e.createItem(t))})),this.nodes.popover.appendChild(this.nodes.items),this.nodes.nothingFound=c.default.make("div",[a.CSS.noFoundMessage],{textContent:this.nothingFoundLabel}),this.nodes.popover.appendChild(this.nodes.nothingFound),this.listeners.on(this.nodes.popover,"click",(function(t){var n=t.target.closest(".".concat(a.CSS.item));n&&e.itemClicked(n,t)})),this.listeners.on(this.nodes.overlay,"click",(function(){e.emit(g.OverlayClicked)}))}},{key:"createItem",value:function(e){var t=c.default.make("div",a.CSS.item);e.name&&(t.dataset.itemName=e.name);var n=c.default.make("div",a.CSS.itemLabel,{innerHTML:e.label});return t.appendChild(c.default.make("div",a.CSS.itemIcon,{innerHTML:e.icon||e.name.substring(0,1).toUpperCase()})),t.appendChild(n),e.secondaryLabel&&t.appendChild(c.default.make("div",a.CSS.itemSecondaryLabel,{textContent:e.secondaryLabel})),e.isActive&&t.classList.add(a.CSS.itemActive),e.isDisabled&&t.classList.add(a.CSS.itemDisabled),t}},{key:"itemClicked",value:function(e,t){var n=this,o=Array.from(this.nodes.items.children),r=o.indexOf(e),i=this.items[r];i.isDisabled||(o.filter((function(t){return t!==e})).forEach((function(e){n.cleanUpConfirmationStateForItem(e)})),i.confirmation?this.enableConfirmationStateForItem(i,e,r):(i.onActivate(i,t),this.toggleIfNeeded(r,o),i.closeOnActivate&&this.hide()))}},{key:"toggleIfNeeded",value:function(e,t){var n=this,o=this.items[e];if(!0===o.toggle)return o.isActive=!o.isActive,void t[e].classList.toggle(a.CSS.itemActive);if("string"==typeof o.toggle){var r=this.items.filter((function(e){return e.toggle===o.toggle}));if(1===r.length)return o.isActive=!o.isActive,void t[e].classList.toggle(a.CSS.itemActive);r.forEach((function(e){var r=n.items.indexOf(e),i=e===o;e.isActive=i,t[r].classList.toggle(a.CSS.itemActive,i)}))}}},{key:"enableConfirmationStateForItem",value:function(e,n,o){var r;void 0===this.itemsRequiringConfirmation[o]&&(this.itemsRequiringConfirmation[o]=e);var i=Object.assign(Object.assign(Object.assign({},e),e.confirmation),{confirmation:e.confirmation.confirmation});this.items[o]=i;var s=this.createItem(i);(r=s.classList).add.apply(r,[a.CSS.itemConfirmation].concat((0,t.default)(Array.from(n.classList)))),n.parentElement.replaceChild(s,n),this.enableSpecialHoverAndFocusBehavior(s),this.reactivateFlipper(this.flippableElements,this.flippableElements.indexOf(s))}},{key:"cleanUpConfirmationStateForItem",value:function(e){var t=Array.from(this.nodes.items.children).indexOf(e),n=this.itemsRequiringConfirmation[t];if(void 0!==n){var o=this.createItem(n);e.parentElement.replaceChild(o,e),this.items[t]=n,delete this.itemsRequiringConfirmation[t],e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior),this.disableSpecialHoverAndFocusBehavior(),this.reactivateFlipper(this.flippableElements,this.flippableElements.indexOf(o))}}},{key:"enableSpecialHoverAndFocusBehavior",value:function(e){e.classList.add(a.CSS.itemNoHover),e.classList.add(a.CSS.itemNoFocus),e.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0}),this.flipper.onFlip(this.onFlip)}},{key:"disableSpecialHoverAndFocusBehavior",value:function(){this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),this.flipper.removeOnFlip(this.onFlip)}},{key:"removeSpecialFocusBehavior",value:function(){var e=this.nodes.items.querySelector(".".concat(a.CSS.itemNoFocus));e&&e.classList.remove(a.CSS.itemNoFocus)}},{key:"reactivateFlipper",value:function(e,t){this.flipper.deactivate(),this.flipper.activate(e,t)}},{key:"enableFlipper",value:function(){this.flipper=new f.default({items:this.flippableElements,focusedItemClass:a.CSS.itemFocused,allowedKeys:[p.keyCodes.TAB,p.keyCodes.UP,p.keyCodes.DOWN,p.keyCodes.ENTER]})}},{key:"flippableElements",get:function(){var e=Array.from(this.nodes.wrapper.querySelectorAll(".".concat(a.CSS.item)));return(this.customContentFlippableItems||[]).concat(e)}},{key:"shouldOpenPopoverBottom",get:function(){var e=this.nodes.wrapper.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),n=this.calculateHeight(),o=e.top+n,r=e.top-n,i=Math.min(window.innerHeight,t.bottom);return r0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var o=n(33),r=n(38);e.exports=function(e){return function(t,n){var i,a,s=String(r(t)),l=o(n),c=s.length;return l<0||l>=c?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var o=n(45),r=n(0),i=n(23),a=n(27),s=n(56),l=n(129),c=n(54),u=n(50),f=n(14)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,v,y,g){l(n,t,h);var b,m,k,x=function(e){if(!d&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",S="values"==v,C=!1,T=e.prototype,E=T[f]||T["@@iterator"]||v&&T[v],_=E||x(v),B=v?S?x("entries"):_:void 0,O="Array"==t&&T.entries||E;if(O&&(k=u(O.call(new e)))!==Object.prototype&&k.next&&(c(k,w,!0),o||"function"==typeof k[f]||a(k,f,p)),S&&E&&"values"!==E.name&&(C=!0,_=function(){return E.call(this)}),o&&!g||!d&&!C&&T[f]||a(T,f,_),s[t]=_,s[w]=p,v)if(b={values:S?_:x("values"),keys:y?_:x("keys"),entries:B},g)for(m in b)m in T||i(T,m,b[m]);else r(r.P+r.F*(d||C),t,b);return b}},function(e,t,n){var o=n(99),r=n(38);e.exports=function(e,t,n){if(o(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},function(e,t,n){var o=n(13),r=n(37),i=n(14)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},function(e,t,n){var o=n(14)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var o=n(56),r=n(14)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){"use strict";var o=n(18),r=n(43);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){var o=n(63),r=n(14)("iterator"),i=n(56);e.exports=n(16).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},function(e,t,n){"use strict";var o=n(22),r=n(47),i=n(15);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var o=n(51),r=n(134),i=n(56),a=n(28);e.exports=n(97)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var o,r,i=n(74),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(o=/a/,r=/b*/g,a.call(o,"a"),a.call(r,"a"),0!==o.lastIndex||0!==r.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(e){var t,n,o,r,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",i.call(l))),c&&(t=l.lastIndex),o=a.call(l,e),c&&o&&(l.lastIndex=l.global?o.index+o[0].length:t),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(r=1;rn;)t.push(arguments[n++]);return g[++y]=function(){s("function"==typeof e?e:Function(e),t)},o(y),y},p=function(e){delete g[e]},"process"==n(37)(f)?o=function(e){f.nextTick(a(b,e,1))}:v&&v.now?o=function(e){v.now(a(b,e,1))}:h?(i=(r=new h).port2,r.port1.onmessage=m,o=a(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(o=function(e){u.postMessage(e+"","*")},u.addEventListener("message",m,!1)):o="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:d,clear:p}},function(e,t,n){"use strict";var o=n(10),r=n(17),i=n(45),a=n(80),s=n(27),l=n(59),c=n(11),u=n(58),f=n(33),d=n(15),p=n(142),h=n(49).f,v=n(18).f,y=n(104),g=n(54),b=o.ArrayBuffer,m=o.DataView,k=o.Math,x=o.RangeError,w=o.Infinity,S=b,C=k.abs,T=k.pow,E=k.floor,_=k.log,B=k.LN2,O=r?"_b":"buffer",M=r?"_l":"byteLength",I=r?"_o":"byteOffset";function P(e,t,n){var o,r,i,a=new Array(n),s=8*n-t-1,l=(1<>1,u=23===t?T(2,-24)-T(2,-77):0,f=0,d=e<0||0===e&&1/e<0?1:0;for((e=C(e))!=e||e===w?(r=e!=e?1:0,o=l):(o=E(_(e)/B),e*(i=T(2,-o))<1&&(o--,i*=2),(e+=o+c>=1?u/i:u*T(2,1-c))*i>=2&&(o++,i/=2),o+c>=l?(r=0,o=l):o+c>=1?(r=(e*i-1)*T(2,t),o+=c):(r=e*T(2,c-1)*T(2,t),o=0));t>=8;a[f++]=255&r,r/=256,t-=8);for(o=o<0;a[f++]=255&o,o/=256,s-=8);return a[--f]|=128*d,a}function L(e,t,n){var o,r=8*n-t-1,i=(1<>1,s=r-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;s>0;u=256*u+e[l],l--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=t;s>0;o=256*o+e[l],l--,s-=8);if(0===u)u=1-a;else{if(u===i)return o?NaN:c?-w:w;o+=T(2,t),u-=a}return(c?-1:1)*o*T(2,u-t)}function R(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function A(e){return[255&e]}function j(e){return[255&e,e>>8&255]}function N(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function D(e){return P(e,52,8)}function F(e){return P(e,23,4)}function H(e,t,n){v(e.prototype,t,{get:function(){return this[n]}})}function W(e,t,n,o){var r=p(+n);if(r+t>e[M])throw x("Wrong index!");var i=e[O]._b,a=r+e[I],s=i.slice(a,a+t);return o?s:s.reverse()}function U(e,t,n,o,r,i){var a=p(+n);if(a+t>e[M])throw x("Wrong index!");for(var s=e[O]._b,l=a+e[I],c=o(+r),u=0;uX;)(z=Y[X++])in b||s(b,z,S[z]);i||(V.constructor=b)}var Z=new m(new b(2)),G=m.prototype.setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||l(m.prototype,{setInt8:function(e,t){G.call(this,e,t<<24>>24)},setUint8:function(e,t){G.call(this,e,t<<24>>24)}},!0)}else b=function(e){u(this,b,"ArrayBuffer");var t=p(e);this._b=y.call(new Array(t),0),this[M]=t},m=function(e,t,n){u(this,m,"DataView"),u(e,b,"DataView");var o=e[M],r=f(t);if(r<0||r>o)throw x("Wrong offset!");if(r+(n=void 0===n?o-r:d(n))>o)throw x("Wrong length!");this[O]=e,this[I]=r,this[M]=n},r&&(H(b,"byteLength","_l"),H(m,"buffer","_b"),H(m,"byteLength","_l"),H(m,"byteOffset","_o")),l(m.prototype,{getInt8:function(e){return W(this,1,e)[0]<<24>>24},getUint8:function(e){return W(this,1,e)[0]},getInt16:function(e){var t=W(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=W(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return R(W(this,4,e,arguments[1]))},getUint32:function(e){return R(W(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(W(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(W(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){U(this,1,e,A,t)},setUint8:function(e,t){U(this,1,e,A,t)},setInt16:function(e,t){U(this,2,e,j,t,arguments[2])},setUint16:function(e,t){U(this,2,e,j,t,arguments[2])},setInt32:function(e,t){U(this,4,e,N,t,arguments[2])},setUint32:function(e,t){U(this,4,e,N,t,arguments[2])},setFloat32:function(e,t){U(this,4,e,F,t,arguments[2])},setFloat64:function(e,t){U(this,8,e,D,t,arguments[2])}});g(b,"ArrayBuffer"),g(m,"DataView"),s(m.prototype,a.VIEW,!0),t.ArrayBuffer=b,t.DataView=m},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t],void 0===(i="function"==typeof(o=function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(e){var t={get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(t){e.stretched=t},get stretched(){return e.stretched},call:function(t,n){return e.call(t,n)},save:function(){return e.save()},validate:function(t){return e.validate(t)},dispatchChange:function(){e.dispatchChange()}};Object.setPrototypeOf(this,t)};n.default=o,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(376);function r(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=r=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=r=function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(380)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e),this.lib=new a.default}return(0,i.default)(e,[{key:"destroy",value:function(){this.lib.destroy()}},{key:"show",value:function(e,t,n){this.lib.show(e,t,n)}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.lib.hide(e)}},{key:"onHover",value:function(e,t,n){this.lib.onHover(e,t,n)}}]),e}();o.default=l,l.displayName="Tooltip",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(40),n(2),n(3),n(384)],void 0===(i="function"==typeof(o=function(o,r,i,a,s){"use strict";var l=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=l(r),i=l(i),a=l(a),s=l(s);var c=function(){function e(){(0,i.default)(this,e),this.registeredShortcuts=new Map}return(0,a.default)(e,[{key:"add",value:function(e){if(this.findShortcut(e.on,e.name))throw Error("Shortcut ".concat(e.name," is already registered for ").concat(e.on,". Please remove it before add a new handler."));var t=new s.default({name:e.name,on:e.on,callback:e.handler}),n=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[].concat((0,r.default)(n),[t]))}},{key:"remove",value:function(e,t){var n=this.findShortcut(e,t);if(n){n.remove();var o=this.registeredShortcuts.get(e);this.registeredShortcuts.set(e,o.filter((function(e){return e!==n})))}}},{key:"findShortcut",value:function(e,t){return(this.registeredShortcuts.get(e)||[]).find((function(e){return e.name===t}))}}]),e}();c.displayName="Shortcuts";var u=new c;o.default=u,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){e.exports=!n(17)&&!n(11)((function(){return 7!=Object.defineProperty(n(85)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(10),r=n(16),i=n(45),a=n(86),s=n(18).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var o=n(26),r=n(28),i=n(70)(!1),a=n(87)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=a&&o(s,n)&&c.push(n);for(;t.length>l;)o(s,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var o=n(18),r=n(12),i=n(46);e.exports=n(17)?Object.defineProperties:function(e,t){r(e);for(var n,a=i(t),s=a.length,l=0;s>l;)o.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var o=n(28),r=n(49).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(17),r=n(46),i=n(71),a=n(62),s=n(22),l=n(61),c=Object.assign;e.exports=!c||n(11)((function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=o}))?function(e,t){for(var n=s(e),c=arguments.length,u=1,f=i.f,d=a.f;c>u;)for(var p,h=l(arguments[u++]),v=f?r(h).concat(f(h)):r(h),y=v.length,g=0;y>g;)p=v[g++],o&&!d.call(h,p)||(n[p]=h[p]);return n}:c},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(32),r=n(13),i=n(123),a=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var o=[],r=0;r>>0||(a.test(n)?16:10))}:o},function(e,t,n){var o=n(10).parseFloat,r=n(55).trim;e.exports=1/o(n(91)+"-0")!=-1/0?function(e){var t=r(String(e),3),n=o(t);return 0===n&&"-"==t.charAt(0)?-0:n}:o},function(e,t,n){var o=n(37);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=o(e))throw TypeError(t);return+e}},function(e,t,n){var o=n(13),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var o=n(48),r=n(43),i=n(54),a={};n(27)(a,n(14)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=o(a,{next:r(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var o=n(12);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(281);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){var o=n(32),r=n(22),i=n(61),a=n(15);e.exports=function(e,t,n,s,l){o(t);var c=r(e),u=i(c),f=a(c.length),d=l?f-1:0,p=l?-1:1;if(n<2)for(;;){if(d in u){s=u[d],d+=p;break}if(d+=p,l?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;l?d>=0:f>d;d+=p)d in u&&(s=t(s,u[d],d,c));return s}},function(e,t,n){"use strict";var o=n(22),r=n(47),i=n(15);e.exports=[].copyWithin||function(e,t){var n=o(this),a=i(n.length),s=r(e,a),l=r(t,a),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?a:r(c,a))-l,a-s),f=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=f,l+=f;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var o=n(106);n(0)({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},function(e,t,n){n(17)&&"g"!=/./g.flags&&n(18).f(RegExp.prototype,"flags",{configurable:!0,get:n(74)})},function(e,t,n){"use strict";var o,r,i,a,s=n(45),l=n(10),c=n(31),u=n(63),f=n(0),d=n(13),p=n(32),h=n(58),v=n(77),y=n(64),g=n(108).set,b=n(301)(),m=n(138),k=n(302),x=n(78),w=n(139),S=l.TypeError,C=l.process,T=C&&C.versions,E=T&&T.v8||"",_=l.Promise,B="process"==u(C),O=function(){},M=r=m.f,I=!!function(){try{var e=_.resolve(1),t=(e.constructor={})[n(14)("species")]=function(e){e(O,O)};return(B||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t&&0!==E.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;b((function(){for(var o=e._v,r=1==e._s,i=0,a=function(t){var n,i,a,s=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(r||(2==e._h&&j(e),e._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),a=!0)),n===t.promise?c(S("Promise-chain cycle")):(i=P(n))?i.call(n,l,c):l(n)):c(o)}catch(e){u&&!a&&u.exit(),c(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){g.call(l,(function(){var t,n,o,r=e._v,i=A(e);if(i&&(t=k((function(){B?C.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",r)})),e._h=B||A(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},A=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(l,(function(){var t;B?C.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=P(e))?b((function(){var o={_w:n,_d:!1};try{t.call(e,c(D,o,1),c(N,o,1))}catch(e){N.call(o,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};I||(_=function(e){h(this,_,"Promise","_h"),p(e),o.call(this);try{e(c(D,this,1),c(N,this,1))}catch(e){N.call(this,e)}},(o=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(59)(_.prototype,{then:function(e,t){var n=M(y(this,_));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=B?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new o;this.promise=e,this.resolve=c(D,e,1),this.reject=c(N,e,1)},m.f=M=function(e){return e===_||e===a?new i(e):r(e)}),f(f.G+f.W+f.F*!I,{Promise:_}),n(54)(_,"Promise"),n(57)("Promise"),a=n(16).Promise,f(f.S+f.F*!I,"Promise",{reject:function(e){var t=M(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!I),"Promise",{resolve:function(e){return w(s&&this===a?_:this,e)}}),f(f.S+f.F*!(I&&n(73)((function(e){_.all(e).catch(O)}))),"Promise",{all:function(e){var t=this,n=M(t),o=n.resolve,r=n.reject,i=k((function(){var n=[],i=0,a=1;v(e,!1,(function(e){var s=i++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||o(n))}),r)})),--a||o(n)}));return i.e&&r(i.v),n.promise},race:function(e){var t=this,n=M(t),o=n.reject,r=k((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,o)}))}));return r.e&&o(r.v),n.promise}})},function(e,t,n){"use strict";var o=n(32);function r(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){var o=n(12),r=n(13),i=n(138);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(18).f,r=n(48),i=n(59),a=n(31),s=n(58),l=n(77),c=n(97),u=n(134),f=n(57),d=n(17),p=n(42).fastKey,h=n(52),v=d?"_s":"size",y=function(e,t){var n,o=p(t);if("F"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,o){s(e,u,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[v]=0,null!=o&&l(o,n,e[c],e)}));return i(u.prototype,{clear:function(){for(var e=h(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=h(this,t),o=y(n,e);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[v]--}return!!o},forEach:function(e){h(this,t);for(var n,o=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(h(this,t),e)}}),d&&o(u.prototype,"size",{get:function(){return h(this,t)[v]}}),u},def:function(e,t,n){var o,r,i=y(e,t);return i?i.v=n:(e._l=i={i:r=p(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[v]++,"F"!==r&&(e._i[r]=i)),e},getEntry:y,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?u(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var o=n(59),r=n(42).getWeak,i=n(12),a=n(13),s=n(58),l=n(77),c=n(36),u=n(26),f=n(52),d=c(5),p=c(6),h=0,v=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return d(e.a,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var c=e((function(e,o){s(e,c,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=o&&l(o,n,e[i],e)}));return o(c.prototype,{delete:function(e){if(!a(e))return!1;var n=r(e);return!0===n?v(f(this,t)).delete(e):n&&u(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=r(e);return!0===n?v(f(this,t)).has(e):n&&u(n,this._i)}}),c},def:function(e,t,n){var o=r(i(t),!0);return!0===o?v(e).set(t,n):o[e._i]=n,e},ufstore:v}},function(e,t,n){var o=n(33),r=n(15);e.exports=function(e){if(void 0===e)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var o=n(49),r=n(71),i=n(12),a=n(10).Reflect;e.exports=a&&a.ownKeys||function(e){var t=o.f(i(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t,n){var o=n(15),r=n(93),i=n(38);e.exports=function(e,t,n,a){var s=String(i(e)),l=s.length,c=void 0===n?" ":String(n),u=o(t);if(u<=l||""==c)return s;var f=u-l,d=r.call(c,Math.ceil(f/c.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(e,t,n){var o=n(17),r=n(46),i=n(28),a=n(62).f;e.exports=function(e){return function(t){for(var n,s=i(t),l=r(s),c=l.length,u=0,f=[];c>u;)n=l[u++],o&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}}},function(e,t,n){var o=n(147);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n3&&void 0!==arguments[3]&&arguments[3],r=s.generateId("l"),i={id:r,element:e,eventType:t,handler:n,options:o},a=this.findOne(e,t,n);if(!a)return this.allListeners.push(i),e.addEventListener(t,n,o),r}},{key:"off",value:function(e,t,n,o){var r=this,i=this.findAll(e,t,n);i.forEach((function(e,t){var n=r.allListeners.indexOf(i[t]);n>-1&&(r.allListeners.splice(n,1),e.element.removeEventListener(e.eventType,e.handler,e.options))}))}},{key:"offById",value:function(e){var t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}},{key:"findOne",value:function(e,t,n){var o=this.findAll(e,t,n);return o.length>0?o[0]:null}},{key:"findAll",value:function(e,t,n){var o=e?this.findByEventTarget(e):[];return e&&t&&n?o.filter((function(e){return e.eventType===t&&e.handler===n})):e&&t?o.filter((function(e){return e.eventType===t})):o}},{key:"removeAll",value:function(){this.allListeners.map((function(e){e.element.removeEventListener(e.eventType,e.handler,e.options)})),this.allListeners=[]}},{key:"destroy",value:function(){this.removeAll()}},{key:"findByEventTarget",value:function(e){return this.allListeners.filter((function(t){if(t.element===e)return t}))}},{key:"findByType",value:function(e){return this.allListeners.filter((function(t){if(t.eventType===e)return t}))}},{key:"findByHandler",value:function(e){return this.allListeners.filter((function(t){if(t.handler===e)return t}))}},{key:"findById",value:function(e){return this.allListeners.find((function(t){return t.id===e}))}}]),e}();o.default=u,u.displayName="Listeners",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(8),n(111),n(9),n(60)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v){"use strict";var y=n(1);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=y(r),i=y(i),s=y(s),l=y(l),c=y(c),u=y(u),f=y(f),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(d),p=y(p),h=y(h),v=y(v);var m=function(e){(0,c.default)(n,e);var t=b(n);function n(){var e;return(0,s.default)(this,n),(e=t.apply(this,arguments)).insert=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.config.defaultBlock,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=e.Editor.BlockManager.insert({id:a,tool:t,data:n,index:o,needToFocus:r,replace:i});return new p.default(s)},e.composeBlockData=function(){var t=(0,i.default)(r.default.mark((function t(n){var o,i;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.Editor.Tools.blockTools.get(n),i=new v.default({tool:o,api:e.Editor.API,readOnly:!0,data:{},tunesData:{}}),t.abrupt("return",i.data);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.update=function(t,n){var o=e.Editor.BlockManager,r=o.getBlockById(t);if(r){var i=o.getBlockIndex(r);o.insert({id:r.id,tool:r.name,data:n,index:i,replace:!0,tunes:r.tunes})}else d.log("blocks.update(): Block with passed id was not found","warn")},e}return(0,l.default)(n,[{key:"methods",get:function(){var e=this;return{clear:function(){return e.clear()},render:function(t){return e.render(t)},renderFromHTML:function(t){return e.renderFromHTML(t)},delete:function(t){return e.delete(t)},swap:function(t,n){return e.swap(t,n)},move:function(t,n){return e.move(t,n)},getBlockByIndex:function(t){return e.getBlockByIndex(t)},getById:function(t){return e.getById(t)},getCurrentBlockIndex:function(){return e.getCurrentBlockIndex()},getBlockIndex:function(t){return e.getBlockIndex(t)},getBlocksCount:function(){return e.getBlocksCount()},stretchBlock:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.stretchBlock(t,n)},insertNewBlock:function(){return e.insertNewBlock()},insert:this.insert,update:this.update,composeBlockData:this.composeBlockData}}},{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockIndex",value:function(e){var t=this.Editor.BlockManager.getBlockById(e);if(t)return this.Editor.BlockManager.getBlockIndex(t);d.logLabeled("There is no block with id `"+e+"`","warn")}},{key:"getBlockByIndex",value:function(e){var t=this.Editor.BlockManager.getBlockByIndex(e);if(void 0!==t)return new p.default(t);d.logLabeled("There is no block at index `"+e+"`","warn")}},{key:"getById",value:function(e){var t=this.Editor.BlockManager.getBlockById(e);return void 0===t?(d.logLabeled("There is no block with id `"+e+"`","warn"),null):new p.default(t)}},{key:"swap",value:function(e,t){d.log("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}},{key:"move",value:function(e,t){this.Editor.BlockManager.move(e,t)}},{key:"delete",value:function(e){try{this.Editor.BlockManager.removeBlock(e)}catch(e){return void d.logLabeled(e,"warn")}0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}},{key:"clear",value:function(){this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}},{key:"render",value:function(e){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(e.blocks)}},{key:"renderFromHTML",value:function(e){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}},{key:"stretchBlock",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.deprecationAssert(!0,"blocks.stretchBlock()","BlockAPI");var n=this.Editor.BlockManager.getBlockByIndex(e);n&&(n.stretched=t)}},{key:"insertNewBlock",value:function(){d.log("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}}]),n}(h.default);o.default=m,m.displayName="BlocksAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).setToFirstBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.firstBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.firstBlock,t,n),!0)},e.setToLastBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.lastBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.lastBlock,t,n),!0)},e.setToPreviousBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.previousBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.previousBlock,t,n),!0)},e.setToNextBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.nextBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.nextBlock,t,n),!0)},e.setToBlock=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.Editor.Caret.positions.DEFAULT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!e.Editor.BlockManager.blocks[t]&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.blocks[t],n,o),!0)},e.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?e.setToLastBlock(e.Editor.Caret.positions.END):e.setToFirstBlock(e.Editor.Caret.positions.START)},e}return(0,i.default)(n,[{key:"methods",get:function(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}]),n}((c=u(c)).default);o.default=d,d.displayName="CaretAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{emit:function(t,n){return e.emit(t,n)},off:function(t,n){return e.off(t,n)},on:function(t,n){return e.on(t,n)}}}},{key:"on",value:function(e,t){this.eventsDispatcher.on(e,t)}},{key:"emit",value:function(e,t){this.eventsDispatcher.emit(e,t)}},{key:"off",value:function(e,t){this.eventsDispatcher.off(e,t)}}]),n}((c=u(c)).default);o.default=d,d.displayName="EventsAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(53),n(8),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u,f){"use strict";var d=n(1);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),l=d(l),c=d(c);var h=function(e){(0,a.default)(n,e);var t=p(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){return{t:function(){(0,u.logLabeled)("I18n.t() method can be accessed only from Tools","warn")}}}},{key:"getMethodsForTool",value:function(e){return Object.assign(this.methods,{t:function(t){return c.default.t(n.getNamespace(e),t)}})}}],[{key:"getNamespace",value:function(e){return e.isTune()?"blockTunes.".concat(e.name):"tools.".concat(e.name)}}]),n}((f=d(f)).default);o.default=h,h.displayName="I18nAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{close:function(){return e.close()},open:function(){return e.open()}}}},{key:"open",value:function(){this.Editor.InlineToolbar.tryToShow()}},{key:"close",value:function(){this.Editor.InlineToolbar.close()}}]),n}((c=u(c)).default);o.default=d,d.displayName="InlineToolbarAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{on:function(t,n,o,r){return e.on(t,n,o,r)},off:function(t,n,o,r){return e.off(t,n,o,r)},offById:function(t){return e.offById(t)}}}},{key:"on",value:function(e,t,n,o){return this.listeners.on(e,t,n,o)}},{key:"off",value:function(e,t,n,o){this.listeners.off(e,t,n,o)}},{key:"offById",value:function(e){this.listeners.offById(e)}}]),n}((c=u(c)).default);o.default=d,d.displayName="ListenersAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(377),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(e){var o,i=e.config,a=e.eventsDispatcher;return(0,r.default)(this,n),(o=t.call(this,{config:i,eventsDispatcher:a})).notifier=new c.default,o}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{show:function(t){return e.show(t)}}}},{key:"show",value:function(e){return this.notifier.show(e)}}]),n}((u=f(u)).default);o.default=p,p.displayName="NotifierAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{toggle:function(t){return e.toggle(t)},get isEnabled(){return e.isEnabled}}}},{key:"toggle",value:function(e){return this.Editor.ReadOnly.toggle(e)}},{key:"isEnabled",get:function(){return this.Editor.ReadOnly.isEnabled}}]),n}((c=u(c)).default);o.default=d,d.displayName="ReadOnlyAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{clean:function(t,n){return e.clean(t,n)}}}},{key:"clean",value:function(e,t){return(0,u.clean)(e,t)}}]),n}((c=f(c)).default);o.default=p,p.displayName="SanitizerAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(8),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(u);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{save:function(){return e.save()}}}},{key:"save",value:function(){var e="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(u.logLabeled(e,"warn"),Promise.reject(new Error(e))):this.Editor.Saver.save()}}]),n}((f=d(f)).default);o.default=v,v.displayName="SaverAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(25),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{findParentTag:function(t,n){return e.findParentTag(t,n)},expandToTag:function(t){return e.expandToTag(t)}}}},{key:"findParentTag",value:function(e,t){return(new c.default).findParentTag(e,t)}},{key:"expandToTag",value:function(e){(new c.default).expandToTag(e)}}]),n}((u=f(u)).default);o.default=p,p.displayName="SelectionAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"classes",get:function(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}]),n}((c=u(c)).default);o.default=d,d.displayName="StylesAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{close:function(){return e.close()},open:function(){return e.open()},toggleBlockSettings:function(t){return e.toggleBlockSettings(t)}}}},{key:"open",value:function(){this.Editor.Toolbar.moveAndOpen()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"toggleBlockSettings",value:function(e){-1!==this.Editor.BlockManager.currentBlockIndex?(null!=e?e:!this.Editor.BlockSettings.opened)?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close():f.logLabeled("Could't toggle the Toolbar because there is no block selected ","warn")}}]),n}(u.default);o.default=v,v.displayName="ToolbarAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(113)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c),u=f(u);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(e){var o,i=e.config,a=e.eventsDispatcher;return(0,r.default)(this,n),(o=t.call(this,{config:i,eventsDispatcher:a})).tooltip=new u.default,o}return(0,i.default)(n,[{key:"destroy",value:function(){this.tooltip.destroy()}},{key:"methods",get:function(){var e=this;return{show:function(t,n,o){return e.show(t,n,o)},hide:function(){return e.hide()},onHover:function(t,n,o){return e.onHover(t,n,o)}}}},{key:"show",value:function(e,t,n){this.tooltip.show(e,t,n)}},{key:"hide",value:function(){this.tooltip.hide()}},{key:"onHover",value:function(e,t,n){this.tooltip.onHover(e,t,n)}}]),n}(c.default);o.default=p,p.displayName="TooltipAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){return{nodes:this.editorNodes}}},{key:"editorNodes",get:function(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}}]),n}((c=u(c)).default);o.default=d,d.displayName="UiAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8),n(25),n(66)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=h(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f),d=h(d),p=h(p);var g=function(e){(0,s.default)(n,e);var t=y(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"keydown",value:function(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case f.keyCodes.BACKSPACE:this.backspace(e);break;case f.keyCodes.ENTER:this.enter(e);break;case f.keyCodes.DOWN:case f.keyCodes.RIGHT:this.arrowRightAndDown(e);break;case f.keyCodes.UP:case f.keyCodes.LEFT:this.arrowLeftAndUp(e);break;case f.keyCodes.TAB:this.tabPressed(e)}}},{key:"beforeKeydownProcessing",value:function(e){this.needToolbarClosing(e)&&f.isPrintableKey(e.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(e)))}},{key:"keyup",value:function(e){e.shiftKey||this.Editor.UI.checkEmptiness()}},{key:"tabPressed",value:function(e){this.Editor.BlockSelection.clearSelection(e);var t=this.Editor,n=t.BlockManager,o=t.InlineToolbar,r=t.ConversionToolbar,i=n.currentBlock;if(i){var a=i.isEmpty,s=i.tool.isDefault&&a,l=!a&&r.opened,c=!a&&!d.default.isCollapsed&&o.opened,u=!l&&!c;s?this.activateToolbox():u&&this.activateBlockSettings()}}},{key:"dragOver",value:function(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!0}},{key:"dragLeave",value:function(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!1}},{key:"handleCommandC",value:function(e){var t=this.Editor.BlockSelection;t.anyBlockSelected&&t.copySelectedBlocks(e)}},{key:"handleCommandX",value:function(e){var t=this.Editor,n=t.BlockSelection,o=t.BlockManager,r=t.Caret;n.anyBlockSelected&&n.copySelectedBlocks(e).then((function(){var t=o.removeSelectedBlocks(),i=o.insertDefaultBlockAtIndex(t,!0);r.setToBlock(i,r.positions.START),n.clearSelection(e)}))}},{key:"enter",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.UI;if(!n.currentBlock.tool.isLineBreaksEnabled&&!(o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey)){var r=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):r=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(r),this.Editor.Toolbar.moveAndOpen(r),e.preventDefault()}}},{key:"backspace",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.BlockSelection,r=t.Caret,i=n.currentBlock,a=i.tool;if(i.selected||i.isEmpty&&i.currentInput===i.firstInput){e.preventDefault();var s=n.currentBlockIndex;return n.previousBlock&&0===n.previousBlock.inputs.length?n.removeBlock(s-1):n.removeBlock(),r.setToBlock(n.currentBlock,s?r.positions.END:r.positions.START),this.Editor.Toolbar.close(),void o.clearSelection(e)}if(!a.isLineBreaksEnabled||r.isAtStart){var l=0===n.currentBlockIndex;r.isAtStart&&d.default.isCollapsed&&i.currentInput===i.firstInput&&!l&&(e.preventDefault(),this.mergeBlocks())}}},{key:"mergeBlocks",value:function(){var e=this.Editor,t=e.BlockManager,n=e.Caret,o=e.Toolbar,r=t.previousBlock,i=t.currentBlock;if(i.name!==r.name||!r.mergeable)return 0===r.inputs.length||r.isEmpty?(t.removeBlock(t.currentBlockIndex-1),n.setToBlock(t.currentBlock),void o.close()):void(n.navigatePrevious()&&o.close());n.createShadow(r.pluginsContent),t.mergeBlocks(r,i).then((function(){n.restoreCaret(r.pluginsContent),r.pluginsContent.normalize(),o.close()}))}},{key:"arrowRightAndDown",value:function(e){var t=this,n=p.default.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===f.keyCodes.TAB);if(!this.Editor.UI.someToolbarOpened||!n){this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();var o=this.Editor.Caret.isAtEnd||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===f.keyCodes.DOWN&&o?this.Editor.CrossBlockSelection.toggleBlockSelectedState():((e.keyCode===f.keyCodes.DOWN||e.keyCode===f.keyCodes.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?e.preventDefault():f.delay((function(){t.Editor.BlockManager.currentBlock&&t.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}}},{key:"arrowLeftAndUp",value:function(e){var t=this;if(this.Editor.UI.someToolbarOpened){if(p.default.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===f.keyCodes.TAB))return;this.Editor.UI.closeAllToolbars()}this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();var n=this.Editor.Caret.isAtStart||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===f.keyCodes.UP&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):((e.keyCode===f.keyCodes.UP||e.keyCode===f.keyCodes.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?e.preventDefault():f.delay((function(){t.Editor.BlockManager.currentBlock&&t.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}},{key:"needToolbarClosing",value:function(e){var t=e.keyCode===f.keyCodes.ENTER&&this.Editor.Toolbar.toolbox.opened,n=e.keyCode===f.keyCodes.ENTER&&this.Editor.BlockSettings.opened,o=e.keyCode===f.keyCodes.ENTER&&this.Editor.InlineToolbar.opened,r=e.keyCode===f.keyCodes.ENTER&&this.Editor.ConversionToolbar.opened,i=e.keyCode===f.keyCodes.TAB;return!(e.shiftKey||i||t||n||o||r)}},{key:"activateToolbox",value:function(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}},{key:"activateBlockSettings",value:function(){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.moveAndOpen()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}]),n}(u.default);o.default=g,g.displayName="BlockEvents",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(60),n(9),n(19),n(8),n(382),n(111),n(383)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b){"use strict";var m=n(1);function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function x(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=m(r),i=m(i),s=m(s),l=m(l),c=m(c),u=m(u),f=m(f),d=x(d),p=m(p),h=m(h),v=x(v),y=m(y),g=m(g);var S=function(e){(0,c.default)(a,e);var t,n,o=w(a);function a(){var e;return(0,s.default)(this,a),(e=o.apply(this,arguments))._currentBlockIndex=-1,e._blocks=null,e}return(0,l.default)(a,[{key:"currentBlockIndex",get:function(){return this._currentBlockIndex},set:function(e){this._blocks[this._currentBlockIndex]&&this._blocks[this._currentBlockIndex].willUnselect(),this._blocks[e]&&this._blocks[e].willSelect(),this._currentBlockIndex=e}},{key:"firstBlock",get:function(){return this._blocks[0]}},{key:"lastBlock",get:function(){return this._blocks[this._blocks.length-1]}},{key:"currentBlock",get:function(){return this._blocks[this.currentBlockIndex]},set:function(e){this.currentBlockIndex=this.getBlockIndex(e)}},{key:"nextBlock",get:function(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}},{key:"nextContentfulBlock",get:function(){return this.blocks.slice(this.currentBlockIndex+1).find((function(e){return!!e.inputs.length}))}},{key:"previousContentfulBlock",get:function(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((function(e){return!!e.inputs.length}))}},{key:"previousBlock",get:function(){return 0===this.currentBlockIndex?null:this._blocks[this.currentBlockIndex-1]}},{key:"blocks",get:function(){return this._blocks.array}},{key:"isEditorEmpty",get:function(){return this.blocks.every((function(e){return e.isEmpty}))}},{key:"prepare",value:function(){var e=this,t=new y.default(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(t,{set:y.default.set,get:y.default.get}),this.listeners.on(document,"copy",(function(t){return e.Editor.BlockEvents.handleCommandC(t)}))}},{key:"toggleReadOnly",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:"composeBlock",value:function(e){var t=e.tool,n=e.data,o=void 0===n?{}:n,r=e.id,i=void 0===r?void 0:r,a=e.tunes,s=void 0===a?{}:a,l=this.Editor.ReadOnly.isEnabled,c=this.Editor.Tools.blockTools.get(t),u=new d.default({id:i,data:o,tool:c,api:this.Editor.API,readOnly:l,tunesData:s});return l||this.bindBlockEvents(u),u}},{key:"insert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?void 0:t,o=e.tool,r=void 0===o?this.config.defaultBlock:o,i=e.data,a=void 0===i?{}:i,s=e.index,l=e.needToFocus,c=void 0===l||l,u=e.replace,f=void 0!==u&&u,d=e.tunes,p=void 0===d?{}:d,h=s;void 0===h&&(h=this.currentBlockIndex+(f?0:1));var v=this.composeBlock({id:n,tool:r,data:a,tunes:p});return f&&this.blockDidMutated(b.BlockMutationType.Removed,this.getBlockByIndex(h),{index:h}),this._blocks.insert(h,v,f),this.blockDidMutated(b.BlockMutationType.Added,v,{index:h}),c?this.currentBlockIndex=h:h<=this.currentBlockIndex&&this.currentBlockIndex++,v}},{key:"replace",value:function(e){var t=e.tool,n=void 0===t?this.config.defaultBlock:t,o=e.data,r=void 0===o?{}:o;return this.insert({tool:n,data:r,index:this.currentBlockIndex,replace:!0})}},{key:"paste",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.insert({tool:e,replace:n});try{o.call(d.BlockToolAPI.ON_PASTE,t)}catch(t){v.log("".concat(e,": onPaste callback call is failed"),"error",t)}return o}},{key:"insertDefaultBlockAtIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=n,this.blockDidMutated(b.BlockMutationType.Added,n,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:(n=(0,i.default)(r.default.mark((function e(t,n){var o,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this._blocks.indexOf(n),!n.isEmpty){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,n.data;case 5:if(i=e.sent,v.isEmpty(i)){e.next=9;break}return e.next=9,t.mergeWith(i);case 9:this.removeBlock(o),this.currentBlockIndex=this._blocks.indexOf(t);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"removeBlock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentBlockIndex;if(!this.validateIndex(e))throw new Error("Can't find a Block to remove");var t=this._blocks[e];t.destroy(),this._blocks.remove(e),this.blockDidMutated(b.BlockMutationType.Removed,t,{index:e}),this.currentBlockIndex>=e&&this.currentBlockIndex--,this.blocks.length?0===e&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,this.insert())}},{key:"removeSelectedBlocks",value:function(){for(var e,t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(t),e=t);return e}},{key:"removeAllBlocks",value:function(){for(var e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=h.default.make("div");e&&t.appendChild(e);var n={text:h.default.isEmpty(t)?"":t.innerHTML};return this.insert({data:n})}},{key:"getBlockByIndex",value:function(e){return-1===e&&(e=this._blocks.length-1),this._blocks[e]}},{key:"getBlockIndex",value:function(e){return this._blocks.indexOf(e)}},{key:"getBlockById",value:function(e){return this._blocks.array.find((function(t){return t.id===e}))}},{key:"getBlock",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=this._blocks.nodes,n=e.closest(".".concat(d.default.CSS.wrapper)),o=t.indexOf(n);if(o>=0)return this._blocks[o]}},{key:"highlightCurrentNode",value:function(){this.clearFocused(),this.currentBlock.focused=!0}},{key:"clearFocused",value:function(){this.blocks.forEach((function(e){e.focused=!1}))}},{key:"setCurrentBlockByChildNode",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=e.closest(".".concat(d.default.CSS.wrapper));if(t){var n=t.closest(".".concat(this.Editor.UI.CSS.editorWrapper));if(null==n?void 0:n.isEqualNode(this.Editor.UI.nodes.wrapper))return this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock}}},{key:"getBlockByChildNode",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=e.closest(".".concat(d.default.CSS.wrapper));return this.blocks.find((function(e){return e.holder===t}))}},{key:"swap",value:function(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}},{key:"move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.currentBlockIndex;isNaN(e)||isNaN(t)?v.log("Warning during 'move' call: incorrect indices provided.","warn"):this.validateIndex(e)&&this.validateIndex(t)?(this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated(b.BlockMutationType.Moved,this.currentBlock,{fromIndex:t,toIndex:e})):v.log("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn")}},{key:"dropPointer",value:function(){this.currentBlockIndex=-1,this.clearFocused()}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),e&&this.insert(),this.Editor.UI.checkEmptiness()}},{key:"destroy",value:(t=(0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.blocks.map((function(e){return e.destroy()})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"bindBlockEvents",value:function(e){var t=this,n=this.Editor.BlockEvents;this.readOnlyMutableListeners.on(e.holder,"keydown",(function(e){n.keydown(e)})),this.readOnlyMutableListeners.on(e.holder,"keyup",(function(e){n.keyup(e)})),this.readOnlyMutableListeners.on(e.holder,"dragover",(function(e){n.dragOver(e)})),this.readOnlyMutableListeners.on(e.holder,"dragleave",(function(e){n.dragLeave(e)})),e.on("didMutated",(function(e){return t.blockDidMutated(b.BlockMutationType.Changed,e,{index:t.getBlockIndex(e)})}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"enableModuleBindings",value:function(){var e=this;this.readOnlyMutableListeners.on(document,"cut",(function(t){return e.Editor.BlockEvents.handleCommandX(t)})),this.blocks.forEach((function(t){e.bindBlockEvents(t)}))}},{key:"validateIndex",value:function(e){return!(e<0||e>=this._blocks.length)}},{key:"blockDidMutated",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=new CustomEvent(e,{detail:Object.assign({target:new g.default(t)},n)});return this.Editor.ModificationsObserver.onChange(o),t}}]),a}(p.default);o.default=S,S.displayName="BlockManager",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8),n(19),n(114),n(25),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v){"use strict";var y=n(1);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=y(r),i=y(i),s=y(s),l=y(l),c=y(c),u=y(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f),d=y(d),p=y(p),h=y(h);var m=function(e){(0,s.default)(n,e);var t=b(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).anyBlockSelectedCache=null,e.needToSelectAll=!1,e.nativeInputSelected=!1,e.readyToBlockSelection=!1,e}return(0,i.default)(n,[{key:"sanitizerConfig",get:function(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}},{key:"allBlocksSelected",get:function(){return this.Editor.BlockManager.blocks.every((function(e){return!0===e.selected}))},set:function(e){this.Editor.BlockManager.blocks.forEach((function(t){t.selected=e})),this.clearCache()}},{key:"anyBlockSelected",get:function(){var e=this.Editor.BlockManager;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=e.blocks.some((function(e){return!0===e.selected}))),this.anyBlockSelectedCache}},{key:"selectedBlocks",get:function(){return this.Editor.BlockManager.blocks.filter((function(e){return e.selected}))}},{key:"prepare",value:function(){var e=this;this.selection=new h.default,p.default.add({name:"CMD+A",handler:function(t){var n=e.Editor,o=n.BlockManager;if(n.ReadOnly.isEnabled)return t.preventDefault(),void e.selectAllBlocks();o.currentBlock&&e.handleCommandA(t)},on:this.Editor.UI.nodes.redactor})}},{key:"toggleReadOnly",value:function(){h.default.get().removeAllRanges(),this.allBlocksSelected=!1}},{key:"unSelectBlockByIndex",value:function(e){var t=this.Editor.BlockManager;(isNaN(e)?t.currentBlock:t.getBlockByIndex(e)).selected=!1,this.clearCache()}},{key:"clearSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.Editor,o=n.BlockManager,r=n.Caret,i=n.RectangleSelection;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;var a=e&&e instanceof KeyboardEvent,s=a&&f.isPrintableKey(e.keyCode);if(this.anyBlockSelected&&a&&s&&!h.default.isSelectionExists){var l=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(l,!0),r.setToBlock(o.currentBlock),f.delay((function(){var t=e.key;r.insertContentAtCaretPosition(t.length>1?"":t)}),20)()}this.Editor.CrossBlockSelection.clear(e),this.anyBlockSelected&&!i.isRectActivated()?(t&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}},{key:"copySelectedBlocks",value:function(e){var t=this;e.preventDefault();var n=d.default.make("div");this.selectedBlocks.forEach((function(e){var o=(0,v.clean)(e.holder.innerHTML,t.sanitizerConfig),r=d.default.make("p");r.innerHTML=o,n.appendChild(r)}));var o=Array.from(n.childNodes).map((function(e){return e.textContent})).join("\n\n"),r=n.innerHTML;return e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",r),Promise.all(this.selectedBlocks.map((function(e){return e.save()}))).then((function(n){try{e.clipboardData.setData(t.Editor.Paste.MIME_TYPE,JSON.stringify(n))}catch(e){}}))}},{key:"selectBlockByIndex",value:function(e){var t,n=this.Editor.BlockManager;n.clearFocused(),t=isNaN(e)?n.currentBlock:n.getBlockByIndex(e),this.selection.save(),h.default.get().removeAllRanges(),t.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}},{key:"clearCache",value:function(){this.anyBlockSelectedCache=null}},{key:"destroy",value:function(){p.default.remove(this.Editor.UI.nodes.redactor,"CMD+A")}},{key:"handleCommandA",value:function(e){if(this.Editor.RectangleSelection.clearSelection(),!d.default.isNativeInput(e.target)||this.readyToBlockSelection){var t=this.Editor.BlockManager.getBlock(e.target).inputs;t.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==t.length||this.needToSelectAll?this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlockByIndex(),this.needToSelectAll=!0):this.needToSelectAll=!0}else this.readyToBlockSelection=!0}},{key:"selectAllBlocks",value:function(){this.selection.save(),h.default.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}}]),n}(u.default);o.default=m,m.displayName="BlockSelection",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(25),n(9),n(19),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=h(u),f=h(f),d=h(d),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(p);var g=function(e){(0,s.default)(n,e);var t=y(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"isAtStart",get:function(){var e=u.default.get(),t=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput),n=e.focusNode;if(d.default.isNativeInput(t))return 0===t.selectionEnd;if(!e.anchorNode)return!1;var o=n.textContent.search(/\S/);-1===o&&(o=0);var r=e.focusOffset;return n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[r]?(n=n.childNodes[r],r=0):r=(n=n.childNodes[r-1]).textContent.length),!(!d.default.isLineBreakTag(t)&&!d.default.isEmpty(t)||!this.getHigherLevelSiblings(n,"left").every((function(e){var t=d.default.isLineBreakTag(e),n=1===e.children.length&&d.default.isLineBreakTag(e.children[0]),o=t||n;return d.default.isEmpty(e)&&!o}))||r!==o)||(null===t||n===t&&r<=o)}},{key:"isAtEnd",get:function(){var e=u.default.get(),t=e.focusNode,n=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(d.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(!e.focusNode)return!1;var o=e.focusOffset;if(t.nodeType!==Node.TEXT_NODE&&t.childNodes.length&&(t.childNodes[o-1]?o=(t=t.childNodes[o-1]).textContent.length:(t=t.childNodes[0],o=0)),d.default.isLineBreakTag(n)||d.default.isEmpty(n)){var r=this.getHigherLevelSiblings(t,"right");if(r.every((function(e,t){return t===r.length-1&&d.default.isLineBreakTag(e)||d.default.isEmpty(e)&&!d.default.isLineBreakTag(e)}))&&o===t.textContent.length)return!0}var i=n.textContent.replace(/\s+$/,"");return t===n&&o>=i.length}},{key:"setToBlock",value:function(e){var t,n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.Editor.BlockManager;switch(o){case this.positions.START:t=e.firstInput;break;case this.positions.END:t=e.lastInput;break;default:t=e.currentInput}if(t){var a=d.default.getDeepestNode(t,o===this.positions.END),s=d.default.getContentLength(a);switch(!0){case o===this.positions.START:r=0;break;case o===this.positions.END:case r>s:r=s}p.delay((function(){n.set(a,r)}),20)(),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=t}}},{key:"setToInput",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.Editor.BlockManager.currentBlock,r=d.default.getDeepestNode(e);switch(t){case this.positions.START:this.set(r,0);break;case this.positions.END:this.set(r,d.default.getContentLength(r));break;default:n&&this.set(r,n)}o.currentInput=e}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=u.default.setCursor(e,t),o=n.top,r=n.bottom,i=window,a=i.innerHeight;o<0&&window.scrollBy(0,o),r>a&&window.scrollBy(0,r-a)}},{key:"setToTheLastBlock",value:function(){var e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{var t=this.Editor.BlockManager.insertAtEnd();this.setToBlock(t)}}},{key:"extractFragmentFromCaretPosition",value:function(){var e=u.default.get();if(e.rangeCount){var t=e.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),n){if(d.default.isNativeInput(n)){var o=n,r=document.createDocumentFragment(),i=o.value.substring(0,o.selectionStart),a=o.value.substring(o.selectionStart);return r.textContent=a,o.value=i,r}var s=t.cloneRange();return s.selectNodeContents(n),s.setStart(t.endContainer,t.endOffset),s.extractContents()}}}},{key:"navigateNext",value:function(){var e=this.Editor.BlockManager,t=e.currentBlock,n=e.nextContentfulBlock,o=t.nextInput,r=this.isAtEnd,i=n;if(!i&&!o){if(t.tool.isDefault||!r)return!1;i=e.insertAtEnd()}return!!r&&(o?this.setToInput(o,this.positions.START):this.setToBlock(i,this.positions.START),!0)}},{key:"navigatePrevious",value:function(){var e=this.Editor.BlockManager,t=e.currentBlock,n=e.previousContentfulBlock;if(!t)return!1;var o=t.previousInput;return!(!n&&!o||!this.isAtStart||(o?this.setToInput(o,this.positions.END):this.setToBlock(n,this.positions.END),0))}},{key:"createShadow",value:function(e){var t=document.createElement("span");t.classList.add(n.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}},{key:"restoreCaret",value:function(e){var t=e.querySelector(".".concat(n.CSS.shadowCaret));t&&((new u.default).expandToTag(t),setTimeout((function(){var e=document.createRange();e.selectNode(t),e.extractContents()}),50))}},{key:"insertContentAtCaretPosition",value:function(e){var t=document.createDocumentFragment(),n=document.createElement("div"),o=u.default.get(),r=u.default.range;n.innerHTML=e,Array.from(n.childNodes).forEach((function(e){return t.appendChild(e)})),0===t.childNodes.length&&t.appendChild(new Text);var i=t.lastChild;r.deleteContents(),r.insertNode(t);var a=document.createRange();a.setStart(i,i.textContent.length),o.removeAllRanges(),o.addRange(a)}},{key:"getHigherLevelSiblings",value:function(e,t){for(var n=e,o=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var r="left"===t?"previousSibling":"nextSibling";n[r];)n=n[r],o.push(n);return o}}],[{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),n}(f.default);o.default=g,g.displayName="Caret",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(25),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h){"use strict";var v=n(1);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=v(r),i=v(i),s=v(s),l=v(l),c=v(c),u=v(u),f=v(f),d=v(d),p=v(p),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(h);var b=function(e){(0,c.default)(o,e);var t,n=g(o);function o(){var e;return(0,s.default)(this,o),(e=n.apply(this,arguments)).onMouseUp=function(){e.listeners.off(document,"mouseover",e.onMouseOver),e.listeners.off(document,"mouseup",e.onMouseUp)},e.onMouseOver=function(t){var n=e.Editor,o=n.BlockManager,r=n.BlockSelection,i=o.getBlockByChildNode(t.relatedTarget)||e.lastSelectedBlock,a=o.getBlockByChildNode(t.target);if(i&&a&&a!==i){if(i===e.firstSelectedBlock)return p.default.get().removeAllRanges(),i.selected=!0,a.selected=!0,void r.clearCache();if(a===e.firstSelectedBlock)return i.selected=!1,a.selected=!1,void r.clearCache();e.Editor.InlineToolbar.close(),e.toggleBlocksSelectedState(i,a),e.lastSelectedBlock=a}},e}return(0,l.default)(o,[{key:"prepare",value:(t=(0,i.default)(r.default.mark((function e(){var t=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.listeners.on(document,"mousedown",(function(e){t.enableCrossBlockSelection(e)}));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"watchSelection",value:function(e){if(e.button===h.mouseButtons.LEFT){var t=this.Editor.BlockManager;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}}},{key:"isCrossBlockSelectionStarted",get:function(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}},{key:"toggleBlockSelectedState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.Editor,n=t.BlockManager,o=t.BlockSelection;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=n.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),p.default.get().removeAllRanges());var r=n.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),i=n.blocks[r];i&&(this.lastSelectedBlock.selected!==i.selected?(i.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=i,this.Editor.InlineToolbar.close(),i.holder.scrollIntoView({block:"nearest"}))}},{key:"clear",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.BlockSelection,r=t.Caret,i=n.blocks.indexOf(this.firstSelectedBlock),a=n.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&i>-1&&a>-1)if(e&&e instanceof KeyboardEvent)switch(e.keyCode){case h.keyCodes.DOWN:case h.keyCodes.RIGHT:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);break;case h.keyCodes.UP:case h.keyCodes.LEFT:r.setToBlock(n.blocks[Math.min(i,a)],r.positions.START);break;default:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END)}else r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}},{key:"enableCrossBlockSelection",value:function(e){var t=this.Editor.UI;p.default.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}},{key:"toggleBlocksSelectedState",value:function(e,t){for(var n=this.Editor,o=n.BlockManager,r=n.BlockSelection,i=o.blocks.indexOf(e),a=o.blocks.indexOf(t),s=e.selected!==t.selected,l=Math.min(i,a);l<=Math.max(i,a);l++){var c=o.blocks[l];c!==this.firstSelectedBlock&&c!==(s?e:t)&&(o.blocks[l].selected=!o.blocks[l].selected,r.clearCache())}}}]),o}(d.default);o.default=b,b.displayName="CrossBlockSelection",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(25),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u,f,d){"use strict";var p=n(1);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,u.default)(e);if(t){var r=(0,u.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,c.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),f=p(f);var v=function(e){(0,l.default)(o,e);var t,n=h(o);function o(){var e;return(0,a.default)(this,o),(e=n.apply(this,arguments)).isStartedAtEditor=!1,e}return(0,s.default)(o,[{key:"toggleReadOnly",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:"enableModuleBindings",value:function(){var e=this,t=this.Editor.UI;this.readOnlyMutableListeners.on(t.nodes.holder,"drop",function(){var t=(0,i.default)(r.default.mark((function t(n){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.processDrop(n);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),!0),this.readOnlyMutableListeners.on(t.nodes.holder,"dragstart",(function(){e.processDragStart()})),this.readOnlyMutableListeners.on(t.nodes.holder,"dragover",(function(t){e.processDragOver(t)}),!0)}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"processDrop",value:(t=(0,i.default)(r.default.mark((function e(t){var n,o,i,a,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.Editor,o=n.BlockManager,i=n.Caret,a=n.Paste,t.preventDefault(),o.blocks.forEach((function(e){e.dropTarget=!1})),f.default.isAtEditor&&!f.default.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1,(s=o.setCurrentBlockByChildNode(t.target))?this.Editor.Caret.setToBlock(s,i.positions.END):(l=o.setCurrentBlockByChildNode(o.lastBlock.holder),this.Editor.Caret.setToBlock(l,i.positions.END)),e.next=9,a.processDataTransfer(t.dataTransfer,!0);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"processDragStart",value:function(){f.default.isAtEditor&&!f.default.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}},{key:"processDragOver",value:function(e){e.preventDefault()}}]),o}((d=p(d)).default);o.default=v,v.displayName="DragNDrop",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).disabled=!1,e}return(0,i.default)(n,[{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"onChange",value:function(e){!this.disabled&&f.isFunction(this.config.onChange)&&this.config.onChange(this.Editor.API.methods,e)}}]),n}(u.default);o.default=v,v.displayName="ModificationsObserver",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(40),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g){"use strict";var b=n(1);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=b(r),i=b(i),s=b(s),l=b(l),c=b(c),u=b(u),f=b(f),d=b(d),p=b(p),h=b(h),v=b(v),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y);var x=function(e){(0,f.default)(x,e);var t,n,o,a,d,p,h,b,m=k(x);function x(){var e;return(0,c.default)(this,x),(e=m.apply(this,arguments)).MIME_TYPE="application/x-editor-js",e.toolsTags={},e.tagsByTool={},e.toolsPatterns=[],e.toolsFiles={},e.exceptionList=[],e.processTool=function(t){try{var n=t.create({},{},!1);if(!1===t.pasteConfig)return void e.exceptionList.push(t.name);if(!y.isFunction(n.onPaste))return;e.getTagsConfig(t),e.getFilesConfig(t),e.getPatternsConfig(t)}catch(e){y.log("Paste handling for «".concat(t.name,"» Tool hasn't been set up because of the error"),"warn",e)}},e.handlePasteEvent=function(){var t=(0,l.default)(r.default.mark((function t(n){var o,i,a;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.Editor,i=o.BlockManager,a=o.Toolbar,i.currentBlock&&(!e.isNativeBehaviour(n.target)||n.clipboardData.types.includes("Files"))){t.next=3;break}return t.abrupt("return");case 3:if(!i.currentBlock||!e.exceptionList.includes(i.currentBlock.name)){t.next=5;break}return t.abrupt("return");case 5:n.preventDefault(),e.processDataTransfer(n.clipboardData),i.clearFocused(),a.close();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,u.default)(x,[{key:"prepare",value:(b=(0,l.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.processTools();case 1:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"toggleReadOnly",value:function(e){e?this.unsetCallback():this.setCallback()}},{key:"processDataTransfer",value:(h=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,l,c,u,f,d=this,p=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=p.length>1&&void 0!==p[1]&&p[1],o=this.Editor.Tools,!((i=t.types).includes?i.includes("Files"):i.contains("Files"))||y.isEmpty(this.toolsFiles)){e.next=8;break}return e.next=7,this.processFiles(t.files);case 7:return e.abrupt("return");case 8:if(a=t.getData(this.MIME_TYPE),s=t.getData("text/plain"),l=t.getData("text/html"),!a){e.next=19;break}return e.prev=12,this.insertEditorJSData(JSON.parse(a)),e.abrupt("return");case 17:e.prev=17,e.t0=e.catch(12);case 19:if(n&&s.trim()&&l.trim()&&(l="

"+(l.trim()?l:s)+"

"),c=Object.keys(this.toolsTags).reduce((function(e,t){var n;return e[t.toLowerCase()]=null!==(n=d.toolsTags[t].sanitizationConfig)&&void 0!==n?n:{},e}),{}),u=Object.assign({},c,o.getAllInlineToolsSanitizeConfig(),{br:{}}),(f=(0,g.clean)(l,u)).trim()&&f.trim()!==s&&v.default.isHTMLString(f)){e.next=28;break}return e.next=26,this.processText(s);case 26:e.next=30;break;case 28:return e.next=30,this.processText(f,!0);case 30:case"end":return e.stop()}}),e,this,[[12,17]])}))),function(e){return h.apply(this,arguments)})},{key:"processText",value:(p=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,c,u,f=this,d=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=d.length>1&&void 0!==d[1]&&d[1],o=this.Editor,i=o.Caret,a=o.BlockManager,(s=n?this.processHTML(t):this.processPlain(t)).length){e.next=5;break}return e.abrupt("return");case 5:if(1!==s.length){e.next=8;break}return s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop()),e.abrupt("return");case 8:c=a.currentBlock&&a.currentBlock.tool.isDefault,u=c&&a.currentBlock.isEmpty,s.map(function(){var e=(0,l.default)(r.default.mark((function e(t,n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",f.insertBlock(t,0===n&&u));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),a.currentBlock&&i.setToBlock(a.currentBlock,i.positions.END);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"setCallback",value:function(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"unsetCallback",value:function(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}},{key:"collectTagNames",value:function(e){return y.isString(e)?[e]:y.isObject(e)?Object.keys(e):[]}},{key:"getTagsConfig",value:function(e){var t=this,n=e.pasteConfig.tags||[],o=[];n.forEach((function(n){var r=t.collectTagNames(n);o.push.apply(o,(0,s.default)(r)),r.forEach((function(o){if(Object.prototype.hasOwnProperty.call(t.toolsTags,o))y.log("Paste handler for «".concat(e.name,"» Tool on «").concat(o,"» tag is skipped ")+"because it is already used by «".concat(t.toolsTags[o].tool.name,"» Tool."),"warn");else{var r=y.isObject(n)?n[o]:null;t.toolsTags[o.toUpperCase()]={tool:e,sanitizationConfig:r}}}))})),this.tagsByTool[e.name]=o.map((function(e){return e.toUpperCase()}))}},{key:"getFilesConfig",value:function(e){var t=e.pasteConfig.files,n=void 0===t?{}:t,o=n.extensions,r=n.mimeTypes;(o||r)&&(o&&!Array.isArray(o)&&(y.log("«extensions» property of the onDrop config for «".concat(e.name,"» Tool should be an array")),o=[]),r&&!Array.isArray(r)&&(y.log("«mimeTypes» property of the onDrop config for «".concat(e.name,"» Tool should be an array")),r=[]),r&&(r=r.filter((function(t){return!!y.isValidMimeType(t)||(y.log("MIME type value «".concat(t,"» for the «").concat(e.name,"» Tool is not a valid MIME type"),"warn"),!1)}))),this.toolsFiles[e.name]={extensions:o||[],mimeTypes:r||[]})}},{key:"getPatternsConfig",value:function(e){var t=this;e.pasteConfig.patterns&&!y.isEmpty(e.pasteConfig.patterns)&&Object.entries(e.pasteConfig.patterns).forEach((function(n){var o=(0,i.default)(n,2),r=o[0],a=o[1];a instanceof RegExp||y.log("Pattern ".concat(a," for «").concat(e.name,"» Tool is skipped because it should be a Regexp instance."),"warn"),t.toolsPatterns.push({key:r,pattern:a,tool:e})}))}},{key:"isNativeBehaviour",value:function(e){return v.default.isNativeInput(e)}},{key:"processFiles",value:(d=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.Editor.BlockManager,e.next=3,Promise.all(Array.from(t).map((function(e){return s.processFile(e)})));case 3:o=(o=e.sent).filter((function(e){return!!e})),i=n.currentBlock.tool.isDefault,a=i&&n.currentBlock.isEmpty,o.forEach((function(e,t){n.paste(e.type,e.event,0===t&&a)}));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"processFile",value:(a=(0,l.default)(r.default.mark((function e(t){var n,o,a,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=y.getFileExtension(t),o=Object.entries(this.toolsFiles).find((function(e){var o=(0,i.default)(e,2),r=(o[0],o[1]),a=r.mimeTypes,s=r.extensions,l=t.type.split("/"),c=(0,i.default)(l,2),u=c[0],f=c[1],d=s.find((function(e){return e.toLowerCase()===n.toLowerCase()})),p=a.find((function(e){var t=e.split("/"),n=(0,i.default)(t,2),o=n[0],r=n[1];return o===u&&(r===f||"*"===r)}));return!!d||!!p}))){e.next=4;break}return e.abrupt("return");case 4:return a=(0,i.default)(o,1),s=a[0],l=this.composePasteEvent("file",{file:t}),e.abrupt("return",{event:l,type:s});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"processHTML",value:function(e){var t=this,n=this.Editor.Tools,o=v.default.make("DIV");return o.innerHTML=e,this.getNodes(o).map((function(e){var o,r=n.defaultTool,i=!1;switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(o=v.default.make("div")).appendChild(e);break;case Node.ELEMENT_NODE:o=e,i=!0,t.toolsTags[o.tagName]&&(r=t.toolsTags[o.tagName].tool)}var a=r.pasteConfig.tags.reduce((function(e,n){return t.collectTagNames(n).forEach((function(t){var o=y.isObject(n)?n[t]:null;e[t]=o||{}})),e}),{}),s=Object.assign({},a,r.baseSanitizeConfig);if("table"===o.tagName.toLowerCase()){var l=(0,g.clean)(o.outerHTML,s);o=v.default.make("div",void 0,{innerHTML:l}).firstChild}else o.innerHTML=(0,g.clean)(o.innerHTML,s);var c=t.composePasteEvent("tag",{data:o});return{content:o,isBlock:i,tool:r.name,event:c}})).filter((function(e){var t=v.default.isEmpty(e.content),n=v.default.isSingleTag(e.content);return!t||n}))}},{key:"processPlain",value:function(e){var t=this,n=this.config.defaultBlock;if(!e)return[];var o=n;return e.split(/\r?\n/).filter((function(e){return e.trim()})).map((function(e){var n=v.default.make("div");n.textContent=e;var r=t.composePasteEvent("tag",{data:n});return{content:n,tool:o,isBlock:!1,event:r}}))}},{key:"processSingleBlock",value:(o=(0,l.default)(r.default.mark((function e(t){var n,o,i,a;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.Editor,o=n.Caret,i=n.BlockManager,(a=i.currentBlock)&&t.tool===a.name&&v.default.containsOnlyInlineElements(t.content.innerHTML)){e.next=5;break}return this.insertBlock(t,(null==a?void 0:a.tool.isDefault)&&a.isEmpty),e.abrupt("return");case 5:o.insertContentAtCaretPosition(t.content.innerHTML);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"processInlinePaste",value:(n=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,l,c,u;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.Editor,o=n.BlockManager,i=n.Caret,a=t.content,!(o.currentBlock&&o.currentBlock.tool.isDefault&&a.textContent.length1&&void 0!==arguments[1]&&arguments[1],o=this.Editor,r=o.BlockManager,i=o.Caret,a=r.currentBlock;if(n&&a&&a.isEmpty)return t=r.paste(e.tool,e.event,!0),void i.setToBlock(t,i.positions.END);t=r.paste(e.tool,e.event),i.setToBlock(t,i.positions.END)}},{key:"insertEditorJSData",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.Caret,r=t.Tools;(0,g.sanitizeBlocks)(e,(function(e){return r.blockTools.get(e).sanitizeConfig})).forEach((function(e,t){var r=e.tool,i=e.data,a=!1;0===t&&(a=n.currentBlock&&n.currentBlock.tool.isDefault&&n.currentBlock.isEmpty);var s=n.insert({tool:r,data:i,replace:a});o.setToBlock(s,o.positions.END)}))}},{key:"processElementNode",value:function(e,t,n){var o=Object.keys(this.toolsTags),r=e,i=(this.toolsTags[r.tagName]||{}).tool,a=this.tagsByTool[null==i?void 0:i.name]||[],l=o.includes(r.tagName),c=v.default.blockElements.includes(r.tagName.toLowerCase()),u=Array.from(r.children).some((function(e){var t=e.tagName;return o.includes(t)&&!a.includes(t)})),f=Array.from(r.children).some((function(e){var t=e.tagName;return v.default.blockElements.includes(t.toLowerCase())}));return c||l||u?l&&!u||c&&!f&&!u?[].concat((0,s.default)(t),[n,r]):void 0:(n.appendChild(r),[].concat((0,s.default)(t),[n]))}},{key:"getNodes",value:function(e){var t,n=this;return Array.from(e.childNodes).reduce((function e(o,r){if(v.default.isEmpty(r)&&!v.default.isSingleTag(r))return o;var i=o[o.length-1],a=new DocumentFragment;switch(i&&v.default.isFragment(i)&&(a=o.pop()),r.nodeType){case Node.ELEMENT_NODE:if(t=n.processElementNode(r,o,a))return t;break;case Node.TEXT_NODE:return a.appendChild(r),[].concat((0,s.default)(o),[a]);default:return[].concat((0,s.default)(o),[a])}return[].concat((0,s.default)(o),(0,s.default)(Array.from(r.childNodes).reduce(e,[])))}),[])}},{key:"composePasteEvent",value:function(e,t){return new CustomEvent(e,{detail:t})}}]),x}(h.default);o.default=x,x.displayName="Paste",x.PATTERN_PROCESSING_MAX_LENGTH=450,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(149)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),f=h(f);var y=function(e){(0,c.default)(u,e);var t,n,o=v(u);function u(){var e;return(0,s.default)(this,u),(e=o.apply(this,arguments)).toolsDontSupportReadOnly=[],e.readOnlyEnabled=!1,e}return(0,l.default)(u,[{key:"isEnabled",get:function(){return this.readOnlyEnabled}},{key:"prepare",value:(n=(0,a.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.Editor.Tools,n=t.blockTools,o=[],Array.from(n.entries()).forEach((function(e){var t=(0,i.default)(e,2),n=t[0];t[1].isReadOnlySupported||o.push(n)})),this.toolsDontSupportReadOnly=o,this.config.readOnly&&o.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly);case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"toggle",value:(t=(0,a.default)(r.default.mark((function e(){var t,n,o,i,a=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.length>0&&void 0!==a[0]?a[0]:!this.readOnlyEnabled)&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError(),n=this.readOnlyEnabled,this.readOnlyEnabled=t,e.t0=r.default.keys(this.Editor);case 5:if((e.t1=e.t0()).done){e.next=12;break}if(o=e.t1.value,this.Editor[o].toggleReadOnly){e.next=9;break}return e.abrupt("continue",5);case 9:this.Editor[o].toggleReadOnly(t),e.next=5;break;case 12:if(n!==t){e.next=14;break}return e.abrupt("return",this.readOnlyEnabled);case 14:return e.next=16,this.Editor.Saver.save();case 16:return i=e.sent,e.next=19,this.Editor.BlockManager.clear();case 19:return e.next=21,this.Editor.Renderer.render(i.blocks);case 21:return e.abrupt("return",this.readOnlyEnabled);case 22:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"throwCriticalError",value:function(){throw new p.CriticalError("To enable read-only mode all connected tools should support it. Tools ".concat(this.toolsDontSupportReadOnly.join(", ")," don't support read-only mode."))}}]),u}((d=h(d)).default);o.default=y,y.displayName="ReadOnly",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(25),n(60),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h){"use strict";var v=n(1);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn&&this.mouseX>n,a=this.startX=this.startY?(this.overlayRectangle.style.top="".concat(this.startY-window.pageYOffset,"px"),this.overlayRectangle.style.bottom="calc(100% - ".concat(this.mouseY-window.pageYOffset,"px")):(this.overlayRectangle.style.bottom="calc(100% - ".concat(this.startY-window.pageYOffset,"px"),this.overlayRectangle.style.top="".concat(this.mouseY-window.pageYOffset,"px")),this.mouseX>=this.startX?(this.overlayRectangle.style.left="".concat(this.startX-window.pageXOffset,"px"),this.overlayRectangle.style.right="calc(100% - ".concat(this.mouseX-window.pageXOffset,"px")):(this.overlayRectangle.style.right="calc(100% - ".concat(this.startX-window.pageXOffset,"px"),this.overlayRectangle.style.left="".concat(this.mouseX-window.pageXOffset,"px"))}},{key:"genInfoForMouseSelection",value:function(){var e,t=document.body.offsetWidth/2,n=this.mouseY-window.pageYOffset,o=document.elementFromPoint(t,n),r=this.Editor.BlockManager.getBlockByChildNode(o);void 0!==r&&(e=this.Editor.BlockManager.blocks.findIndex((function(e){return e.holder===r.holder})));var i=this.Editor.BlockManager.lastBlock.holder.querySelector("."+p.default.CSS.content),a=Number.parseInt(window.getComputedStyle(i).width,10)/2;return{index:e,leftPos:t-a,rightPos:t+a}}},{key:"addBlockInSelection",value:function(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}},{key:"trySelectNextBlock",value:function(e){var t=this,n=this.stackOfSelected[this.stackOfSelected.length-1]===e,o=this.stackOfSelected.length;if(!n){var r=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0,i=0;o>1&&(i=r?1:-1);var a=e>this.stackOfSelected[o-1]&&1===i,s=ethis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){if(!l&&e=e;c--)this.addBlockInSelection(c);else if(l){var u,f=o-1;for(u=e>this.stackOfSelected[o-1]?function(){return e>t.stackOfSelected[f]}:function(){return e0&&void 0!==arguments[0]?arguments[0]:this.Editor.BlockManager.currentBlock;this.opened=!0,this.selection.save(),t.selected=!0,this.Editor.BlockSelection.clearCache();var n=t.getTunes(),o=(0,r.default)(n,2),i=o[0],a=o[1];this.eventsDispatcher.emit(this.events.opened),this.popover=new h.default({className:this.CSS.settings,searchable:!0,filterLabel:v.default.ui(y.I18nInternalNS.ui.popover,"Filter"),nothingFoundLabel:v.default.ui(y.I18nInternalNS.ui.popover,"Nothing found"),items:i,customContent:a,customContentFlippableItems:this.getControls(a),scopeElement:this.Editor.API.methods.ui.nodes.redactor}),this.popover.on(h.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.popover.on(h.PopoverEvent.Close,(function(){return e.close()})),this.nodes.wrapper.append(this.popover.getElement()),this.popover.show()}},{key:"getElement",value:function(){return this.nodes.wrapper}},{key:"close",value:function(){this.opened=!1,p.default.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&(this.Editor.BlockManager.currentBlock.selected=!1),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(h.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null)}},{key:"getControls",value:function(e){var t=this.Editor.StylesAPI,n=e.querySelectorAll(".".concat(t.classes.settingsButton,", ").concat(d.default.allInputsSelector));return Array.from(n)}}]),n}(f.default);o.default=k,k.displayName="BlockSettings",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(40),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(66),n(53),n(67),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m,k){"use strict";var x=n(1);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=x(r),i=x(i),s=x(s),l=x(l),c=x(c),u=x(u),f=x(f),d=x(d),p=x(p),h=x(h),v=x(v),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y),g=x(g),b=x(b);var C=function(e){(0,f.default)(a,e);var t,n,o=S(a);function a(){var e;return(0,c.default)(this,a),(e=o.apply(this,arguments)).opened=!1,e.tools=[],e.flipper=null,e.togglingCallback=null,e}return(0,u.default)(a,[{key:"make",value:function(){this.nodes.wrapper=v.default.make("div",[a.CSS.conversionToolbarWrapper].concat((0,l.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.tools=v.default.make("div",a.CSS.conversionToolbarTools);var e=v.default.make("div",a.CSS.conversionToolbarLabel,{textContent:b.default.ui(m.I18nInternalNS.ui.inlineToolbar.converter,"Convert to")});return this.addTools(),this.enableFlipper(),v.default.append(this.nodes.wrapper,e),v.default.append(this.nodes.wrapper,this.nodes.tools),this.nodes.wrapper}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:"toggle",value:function(e){this.opened?this.close():this.open(),y.isFunction(e)&&(this.togglingCallback=e)}},{key:"open",value:function(){var e=this;this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(a.CSS.conversionToolbarShowed),window.requestAnimationFrame((function(){e.flipper.activate(e.tools.map((function(e){return e.button})).filter((function(e){return!e.classList.contains(a.CSS.conversionToolHidden)}))),e.flipper.focusFirst(),y.isFunction(e.togglingCallback)&&e.togglingCallback(!0)}))}},{key:"close",value:function(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(a.CSS.conversionToolbarShowed),y.isFunction(this.togglingCallback)&&this.togglingCallback(!1)}},{key:"hasTools",value:function(){return 1!==this.tools.length||this.tools[0].name!==this.config.defaultBlock}},{key:"replaceWithBlock",value:(n=(0,s.default)(r.default.mark((function e(t,n){var o,i,a,s,l,c,u,f,d,p=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.Editor.BlockManager.currentBlock.tool,e.next=3,this.Editor.BlockManager.currentBlock.save();case 3:if(i=e.sent,a=i.data,s=this.Editor.Tools.blockTools.get(t),l="",c=o.conversionConfig.export,!y.isFunction(c)){e.next=12;break}l=c(a),e.next=18;break;case 12:if(!y.isString(c)){e.next=16;break}l=a[c],e.next=18;break;case 16:return y.log("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),e.abrupt("return");case 18:if(u=(0,k.clean)(l,s.sanitizeConfig),f={},d=s.conversionConfig.import,!y.isFunction(d)){e.next=25;break}f=d(u),e.next=31;break;case 25:if(!y.isString(d)){e.next=29;break}f[d]=u,e.next=31;break;case 29:return y.log("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),e.abrupt("return");case 31:n&&(f=Object.assign(f,n)),this.Editor.BlockManager.replace({tool:t,data:f}),this.Editor.BlockSelection.clearSelection(),this.close(),this.Editor.InlineToolbar.close(),y.delay((function(){p.Editor.Caret.setToBlock(p.Editor.BlockManager.currentBlock)}),10)();case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"addTools",value:function(){var e=this,t=this.Editor.Tools.blockTools;Array.from(t.entries()).forEach((function(t){var n=(0,i.default)(t,2),o=n[0],r=n[1],a=r.conversionConfig;a&&a.import&&r.toolbox.forEach((function(t){return e.addToolIfValid(o,t)}))}))}},{key:"addToolIfValid",value:function(e,t){!y.isEmpty(t)&&t.icon&&this.addTool(e,t)}},{key:"addTool",value:function(e,t){var n=this,o=v.default.make("div",[a.CSS.conversionTool]),i=v.default.make("div",[a.CSS.conversionToolIcon]),l=v.default.make("div",[a.CSS.conversionToolCheckIcon]);switch(o.dataset.tool=e,e){case"paragraph":i.innerHTML='\n \n ';break;case"header1":i.innerHTML='';break;case"header2":i.innerHTML='';break;case"header3":i.innerHTML='';break;case"unorderedList":i.innerHTML='';break;case"orderedList":i.innerHTML='';break;case"blockChecklist":i.innerHTML='';break;default:i.innerHTML=t.icon}l.innerHTML='',v.default.append(o,i),v.default.append(o,v.default.text(b.default.t(m.I18nInternalNS.toolNames,t.title||y.capitalize(e)))),v.default.append(o,l),v.default.append(this.nodes.tools,o),this.tools.push({name:e,button:o,toolboxItem:t}),this.listeners.on(o,"click",(0,s.default)(r.default.mark((function o(){return r.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,n.replaceWithBlock(e,t.data);case 2:case"end":return o.stop()}}),o)}))))}},{key:"filterTools",value:(t=(0,s.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=function(e,t){return e.icon===t.icon&&e.title===t.title},t=this.Editor.BlockManager.currentBlock,e.next=4,t.getActiveToolboxEntry();case 4:n=e.sent,this.tools.forEach((function(e){var r=!1;if(n){var i=o(n,e.toolboxItem);r=e.button.dataset.tool===t.name&&i}e.button.classList.toggle(a.CSS.conversionToolCurrent,r)}));case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"enableFlipper",value:function(){this.flipper=new g.default({focusedItemClass:a.CSS.conversionToolFocused})}}],[{key:"CSS",get:function(){return{conversionToolbarWrapper:"ce-conversion-toolbar",conversionToolbarShowed:"ce-conversion-toolbar--showed",conversionToolbarTools:"ce-conversion-toolbar__tools",conversionToolbarLabel:"ce-conversion-toolbar__label",conversionTool:"ce-conversion-tool",conversionToolCurrent:"ce-conversion-tool--current",conversionToolIcon:"ce-conversion-tool__icon",conversionToolCheckIcon:"ce-conversion-tool__check-icon",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}}]),a}(h.default);o.default=C,C.displayName="ConversionToolbar",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(40),n(30),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(25),n(8),n(66),n(53),n(67),n(114),n(113),n(68)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m,k,x,w,S){"use strict";var C=n(1);function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=C(r),i=C(i),s=C(s),l=C(l),c=C(c),u=C(u),f=C(f),d=C(d),p=C(p),h=C(h),v=C(v),y=C(y),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g),b=C(b),m=C(m),x=C(x),w=C(w);var _=function(e){(0,f.default)(o,e);var t,n=E(o);function o(e){var t,r=e.config,i=e.eventsDispatcher;return(0,c.default)(this,o),(t=n.call(this,{config:r,eventsDispatcher:i})).CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",inlineToolbarLeftOriented:"ce-inline-toolbar--left-oriented",inlineToolbarRightOriented:"ce-inline-toolbar--right-oriented",inlineToolbarShortcut:"ce-inline-toolbar__shortcut",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inputField:"cdx-input",focusedButton:"ce-inline-tool--focused",conversionToggler:"ce-inline-toolbar__dropdown",conversionTogglerArrow:"ce-inline-toolbar__dropdown-arrow",conversionTogglerHidden:"ce-inline-toolbar__dropdown--hidden",conversionTogglerContent:"ce-inline-toolbar__dropdown-content",togglerAndButtonsWrapper:"ce-inline-toolbar__toggler-and-button-wrapper"},t.opened=!1,t.toolbarVerticalMargin=g.isMobileScreen()?20:6,t.buttonsList=null,t.width=0,t.flipper=null,t.tooltip=new w.default,t}return(0,u.default)(o,[{key:"toggleReadOnly",value:function(e){e?(this.destroy(),this.Editor.ConversionToolbar.destroy()):this.make()}},{key:"tryToShow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.allowedToShow()?(this.move(),this.open(t),this.Editor.Toolbar.close()):e&&this.close()}},{key:"move",value:function(){var e=y.default.rect,t=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:e.x-t.left+145,y:e.y-t.top-40},o=document.getElementsByClassName("ce-inline-toolbar")[0].clientWidth,r=document.getElementsByClassName("ce-block__content")[0].getBoundingClientRect();r.width<650&&t.right-e.x=650&&r.right-e.x0&&void 0!==arguments[0])||arguments[0];if(!this.opened){this.addToolsFiltered(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.buttonsList=this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)),this.opened=!0,e&&this.Editor.ConversionToolbar.hasTools()?this.setConversionTogglerContent():this.nodes.conversionToggler.hidden=!0;var t=Array.from(this.buttonsList);t.unshift(this.nodes.conversionToggler),t=t.filter((function(e){return!e.hidden})),this.flipper.activate(t)}}},{key:"containsNode",value:function(e){return this.nodes.wrapper.contains(e)}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes(),this.tooltip.destroy()}},{key:"make",value:function(){var e=this;this.nodes.wrapper=v.default.make("div",[this.CSS.inlineToolbar].concat((0,s.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.togglerAndButtonsWrapper=v.default.make("div",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=v.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=v.default.make("div",this.CSS.actionsWrapper),this.listeners.on(this.nodes.wrapper,"mousedown",(function(t){t.target.closest(".".concat(e.CSS.actionsWrapper))||t.preventDefault()})),v.default.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),v.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),v.default.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),this.recalculateWidth(),this.enableFlipper()}},{key:"allowedToShow",value:function(){var e=y.default.get(),t=y.default.text;if(!e||!e.anchorNode)return!1;if(e.isCollapsed||t.length<1)return!1;var n=v.default.isElement(e.anchorNode)?e.anchorNode:e.anchorNode.parentElement;if(e&&["IMG","INPUT"].includes(n.tagName))return!1;if(null===n.closest('[contenteditable="true"]'))return!1;var o=this.Editor.BlockManager.getBlock(e.anchorNode);return!!o&&0!==o.tool.inlineTools.size}},{key:"recalculateWidth",value:function(){this.width=this.nodes.wrapper.offsetWidth}},{key:"addConversionToggler",value:function(){var e=this;this.nodes.conversionToggler=v.default.make("div",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=v.default.make("div",this.CSS.conversionTogglerContent);var t=v.default.make("div",this.CSS.conversionTogglerArrow,{innerHTML:'\n\n'});this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(t),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.listeners.on(this.nodes.conversionToggler,"click",(function(){e.Editor.ConversionToolbar.toggle((function(t){!t&&e.opened?e.flipper.activate():e.opened&&e.flipper.deactivate()}))})),!1===g.isMobileScreen()&&this.tooltip.onHover(this.nodes.conversionToggler,m.default.ui(k.I18nInternalNS.ui.inlineToolbar.converter,"Convert to"),{placement:"top",hidingDelay:100})}},{key:"setConversionTogglerContent",value:(t=(0,i.default)(r.default.mark((function e(){var t,n,o,i,a,s;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Editor.BlockManager,n=t.currentBlock,o=n.name,i=n.tool.conversionConfig,a=i&&i.export,this.nodes.conversionToggler.hidden=!a,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!a),e.next=9,n.getActiveToolboxEntry();case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0={};case 12:s=e.t0,this.nodes.conversionTogglerContent.innerHTML=s.icon||s.title||g.capitalize(o);case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"prepareConversionToolbar",value:function(){var e=this.Editor.ConversionToolbar.make();v.default.append(this.nodes.wrapper,e)}},{key:"addToolsFiltered",value:function(){var e=this,t=y.default.get(),n=this.Editor.BlockManager.getBlock(t.anchorNode);this.nodes.buttons.innerHTML="",this.nodes.actions.innerHTML="",this.toolsInstances=new Map,Array.from(n.tool.inlineTools.values()).forEach((function(t){e.addTool(t)})),this.recalculateWidth()}},{key:"addTool",value:function(e){var t=this,n=e.create(),o=n.render();if(o){if(o.dataset.tool=e.name,this.nodes.buttons.appendChild(o),this.toolsInstances.set(e.name,n),g.isFunction(n.renderActions)){var r=n.renderActions();this.nodes.actions.appendChild(r)}this.listeners.on(o,"click",(function(e){t.toolClicked(n),e.preventDefault()}));var i=this.getToolShortcut(e.name);if(i)try{this.enableShortcuts(n,i)}catch(e){}var a=v.default.make("div"),s=m.default.t(k.I18nInternalNS.toolNames,e.title||g.capitalize(e.name));a.appendChild(v.default.text(s)),i&&a.appendChild(v.default.make("div",this.CSS.inlineToolbarShortcut,{textContent:g.beautifyShortcut(i)})),!1===g.isMobileScreen()&&this.tooltip.onHover(o,a,{placement:"top",hidingDelay:100}),n.checkState(y.default.get())}else g.log("Render method must return an instance of Node","warn",e.name)}},{key:"getToolShortcut",value:function(e){var t=this.Editor.Tools,n=t.inlineTools.get(e),o=t.internal.inlineTools;return Array.from(o.keys()).includes(e)?this.inlineTools[e][S.CommonInternalSettings.Shortcut]:n.shortcut}},{key:"enableShortcuts",value:function(e,t){var n=this;x.default.add({name:t,handler:function(t){var o=n.Editor.BlockManager.currentBlock;o&&o.tool.enabledInlineTools&&(t.preventDefault(),n.toolClicked(e))},on:this.Editor.UI.nodes.redactor})}},{key:"toolClicked",value:function(e){var t=y.default.range;e.surround(t),this.checkToolsState(),void 0!==e.renderActions&&this.flipper.deactivate()}},{key:"checkToolsState",value:function(){this.toolsInstances.forEach((function(e){e.checkState(y.default.get())}))}},{key:"inlineTools",get:function(){var e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach((function(t){var n=(0,l.default)(t,2),o=n[0],r=n[1];e[o]=r.create()})),e}},{key:"enableFlipper",value:function(){this.flipper=new b.default({focusedItemClass:this.CSS.focusedButton,allowedKeys:[g.keyCodes.ENTER,g.keyCodes.TAB]})}}]),o}(h.default);o.default=_,_.displayName="InlineToolbar",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(40),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(7),n(387),n(9),n(8),n(388),n(389),n(390),n(391),n(392),n(396),n(397),n(398),n(184)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m,k,x,w,S,C,T,E){"use strict";var _=n(1);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(B=function(e){return e?n:t})(e)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=_(r),i=_(i),s=_(s),l=_(l),c=_(c),u=_(u),f=_(f),d=_(d),p=_(p),h=_(h),v=_(v),y=_(y),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=B(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g),b=_(b),m=_(m),k=_(k),x=_(x),w=_(w),S=_(S),C=_(C),T=_(T),E=_(E);var M=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===("undefined"==typeof Reflect?"undefined":(0,h.default)(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=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},I=function(e){(0,f.default)(o,e);var t,n=O(o);function o(){var e;return(0,c.default)(this,o),(e=n.apply(this,arguments)).stubTool="stub",e.toolsAvailable=new E.default,e.toolsUnavailable=new E.default,e}return(0,u.default)(o,[{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inlineTools",get:function(){return this.available.inlineTools}},{key:"blockTools",get:function(){return this.available.blockTools}},{key:"blockTunes",get:function(){return this.available.blockTunes}},{key:"defaultTool",get:function(){return this.blockTools.get(this.config.defaultBlock)}},{key:"internal",get:function(){return this.available.internalTools}},{key:"prepare",value:(t=(0,l.default)(r.default.mark((function e(){var t,n,o=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateTools(),this.config.tools=g.deepMerge({},this.internalTools,this.config.tools),Object.prototype.hasOwnProperty.call(this.config,"tools")&&0!==Object.keys(this.config.tools).length){e.next=4;break}throw Error("Can't start without tools");case 4:if(t=this.prepareConfig(),this.factory=new w.default(t,this.config,this.Editor.API),0!==(n=this.getListOfPrepareFunctions(t)).length){e.next=9;break}return e.abrupt("return",Promise.resolve());case 9:return e.next=11,g.sequence(n,(function(e){o.toolPrepareMethodSuccess(e)}),(function(e){o.toolPrepareMethodFallback(e)}));case 11:this.prepareBlockTools();case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getAllInlineToolsSanitizeConfig",value:function(){var e={};return Array.from(this.inlineTools.values()).forEach((function(t){Object.assign(e,t.sanitizeConfig)})),e}},{key:"destroy",value:function(){Object.values(this.available).forEach(function(){var e=(0,l.default)(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!g.isFunction(t.reset)){e.next=3;break}return e.next=3,t.reset();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"internalTools",get:function(){return{bold:{class:b.default,isInternal:!0},italic:{class:m.default,isInternal:!0},link:{class:k.default,isInternal:!0},paragraph:{class:v.default,inlineToolbar:!0,isInternal:!0},stub:{class:x.default,isInternal:!0},moveUp:{class:T.default,isInternal:!0},moveDown:{class:S.default,isInternal:!0},delete:{class:C.default,isInternal:!0}}}},{key:"toolPrepareMethodSuccess",value:function(e){var t=this.factory.get(e.toolName);if(t.isInline()){var n=["render","surround","checkState"].filter((function(e){return!t.create()[e]}));if(n.length)return g.log("Incorrect Inline Tool: ".concat(t.name,". Some of required methods is not implemented %o"),"warn",n),void this.toolsUnavailable.set(t.name,t)}this.toolsAvailable.set(t.name,t)}},{key:"toolPrepareMethodFallback",value:function(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}},{key:"getListOfPrepareFunctions",value:function(e){var t=[];return Object.entries(e).forEach((function(e){var n=(0,s.default)(e,2),o=n[0],r=n[1];t.push({function:g.isFunction(r.class.prepare)?r.class.prepare:function(){},data:{toolName:o,config:r.config}})})),t}},{key:"prepareBlockTools",value:function(){var e=this;Array.from(this.blockTools.values()).forEach((function(t){e.assignInlineToolsToBlockTool(t),e.assignBlockTunesToBlockTool(t)}))}},{key:"assignInlineToolsToBlockTool",value:function(e){var t=this;!1!==this.config.inlineToolbar&&(!0!==e.enabledInlineTools?Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new E.default(e.enabledInlineTools.map((function(e){return[e,t.inlineTools.get(e)]})))):e.inlineTools=new E.default(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map((function(e){return[e,t.inlineTools.get(e)]})):Array.from(this.inlineTools.entries())))}},{key:"assignBlockTunesToBlockTool",value:function(e){var t=this;if(!1!==e.enabledBlockTunes)if(Array.isArray(e.enabledBlockTunes)){var n=new E.default(e.enabledBlockTunes.map((function(e){return[e,t.blockTunes.get(e)]})));e.tunes=new E.default([].concat((0,i.default)(n),(0,i.default)(this.blockTunes.internalTools)))}else if(Array.isArray(this.config.tunes)){var o=new E.default(this.config.tunes.map((function(e){return[e,t.blockTunes.get(e)]})));e.tunes=new E.default([].concat((0,i.default)(o),(0,i.default)(this.blockTunes.internalTools)))}else e.tunes=this.blockTunes.internalTools}},{key:"validateTools",value:function(){for(var e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;var t=this.config.tools[e];if(!g.isFunction(t)&&!g.isFunction(t.class))throw Error("Tool «".concat(e,"» must be a constructor function or an object with function in the «class» property"))}}},{key:"prepareConfig",value:function(){var e={};for(var t in this.config.tools)g.isObject(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}}]),o}(y.default);o.default=I,I.displayName="Tools",M([g.cacheable],I.prototype,"getAllInlineToolsSanitizeConfig",null),e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(30),n(2),n(3),n(5),n(6),n(4),n(151)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,s.default)(n,e);var t=d(n);function n(){return(0,i.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"blockTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isBlock()})))}},{key:"inlineTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isInline()})))}},{key:"blockTunes",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isTune()})))}},{key:"internalTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isInternal})))}},{key:"externalTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return!(0,r.default)(e,2)[1].isInternal})))}}]),n}((0,(u=f(u)).default)(Map));o.default=p,p.displayName="ToolsCollection",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(40),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(25),n(60),n(66)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m){"use strict";var k=n(1);function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=k(r),i=k(i),s=k(s),l=k(l),c=k(c),u=k(u),f=k(f),d=k(d),p=k(p),h=k(h),v=k(v),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y),g=k(g),b=k(b),m=k(m);var S=function(e){(0,f.default)(a,e);var t,o=w(a);function a(){var e;return(0,c.default)(this,a),(e=o.apply(this,arguments)).isMobile=!1,e.contentRectCache=void 0,e.resizeDebouncer=y.debounce((function(){e.windowResize()}),200),e}return(0,u.default)(a,[{key:"events",get:function(){return{blockHovered:"block-hovered"}}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorLoader:"codex-editor__loader",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}},{key:"contentRect",get:function(){if(this.contentRectCache)return this.contentRectCache;var e=this.nodes.wrapper.querySelector(".".concat(b.default.CSS.content));return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}},{key:"addLoader",value:function(){this.nodes.loader=v.default.make("div",this.CSS.editorLoader),this.nodes.wrapper.prepend(this.nodes.loader),this.nodes.redactor.classList.add(this.CSS.editorZoneHidden)}},{key:"removeLoader",value:function(){this.nodes.loader.remove(),this.nodes.redactor.classList.remove(this.CSS.editorZoneHidden)}},{key:"prepare",value:(t=(0,l.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.checkIsMobile(),this.make(),this.addLoader(),this.loadStyles();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"toggleReadOnly",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:"checkEmptiness",value:function(){var e=this.Editor.BlockManager;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}},{key:"someToolbarOpened",get:function(){var e=this.Editor,t=e.Toolbar,n=e.BlockSettings,o=e.InlineToolbar,r=e.ConversionToolbar;return n.opened||o.opened||r.opened||t.toolbox.opened}},{key:"someFlipperButtonFocused",get:function(){return!!this.Editor.Toolbar.toolbox.hasFocus()||Object.entries(this.Editor).filter((function(e){var t=(0,s.default)(e,2);return t[0],t[1].flipper instanceof m.default})).some((function(e){var t=(0,s.default)(e,2);return t[0],t[1].flipper.hasFocus()}))}},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"closeAllToolbars",value:function(){var e=this.Editor,t=e.Toolbar,n=e.BlockSettings,o=e.InlineToolbar,r=e.ConversionToolbar;n.close(),o.close(),r.close(),t.toolbox.close()}},{key:"checkIsMobile",value:function(){this.isMobile=window.innerWidth=0;if(o.anyBlockSelected&&!g.default.isSelectionExists)return o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),void e.stopPropagation();if(!this.someToolbarOpened&&r&&"BODY"===e.target.tagName){var i=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(i),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.moveAndOpen(i)}this.Editor.BlockSelection.clearSelection(e)}},{key:"documentClicked",value:function(e){if(e.isTrusted){var t=e.target;this.nodes.holder.contains(t)||g.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close());var n=this.Editor.BlockSettings.nodes.wrapper.contains(t),o=this.Editor.Toolbar.nodes.settingsToggler.contains(t),r=n||o;if(this.Editor.BlockSettings.opened&&!r){this.Editor.BlockSettings.close();var i=this.Editor.BlockManager.getBlockByChildNode(t);this.Editor.Toolbar.moveAndOpen(i)}this.Editor.BlockSelection.clearSelection(e)}}},{key:"documentTouched",value:function(e){var t=e.target;if(t===this.nodes.redactor){var n=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,o=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(n,o)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t),this.Editor.BlockManager.highlightCurrentNode()}catch(e){this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.moveAndOpen()}},{key:"redactorClicked",value:function(e){var t=this.Editor.BlockSelection;if(g.default.isCollapsed){var n=function(){e.stopImmediatePropagation(),e.stopPropagation()},o=e.target,r=e.metaKey||e.ctrlKey;if(v.default.isAnchor(o)&&r){n();var i=o.getAttribute("href"),a=y.getValidUrl(i);y.openTab(a)}else{var s=this.Editor.BlockManager.getBlockByIndex(-1),l=v.default.offset(s.holder).bottom,c=e.pageY;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!t.anyBlockSelected&&lr;)K(e,n=o[r++],t[n]);return e},J=function(e){var t=D.call(this,e=w(e,!0));return!(this===U&&r(H,e)&&!r(W,e))&&(!(t||!r(this,e)||!r(H,e)||r(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=w(t,!0),e!==U||!r(H,t)||r(W,t)){var n=M(e,t);return!n||!r(H,t)||r(e,j)&&e[j][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=P(x(e)),o=[],i=0;n.length>i;)r(H,t=n[i++])||t==j||t==l||o.push(t);return o},ee=function(e){for(var t,n=e===U,o=P(n?W:x(e)),i=[],a=0;o.length>a;)!r(H,t=o[a++])||n&&!r(U,t)||i.push(H[t]);return i};z||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call(W,n),r(this,j)&&r(this[j],e)&&(this[j][e]=!1),X(this,e,S(1,n))};return i&&Y&&X(U,e,{configurable:!0,set:t}),Z(e)}).prototype,"toString",(function(){return this._k})),E.f=$,B.f=K,n(49).f=T.f=Q,n(62).f=J,_.f=ee,i&&!n(45)&&s(U,"propertyIsEnumerable",J,!0),h.f=function(e){return Z(p(e))}),a(a.G+a.W+a.F*!z,{Symbol:L});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var oe=O(p.store),re=0;oe.length>re;)v(oe[re++]);a(a.S+a.F*!z,"Symbol",{for:function(e){return r(F,e+="")?F[e]:F[e]=L(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!z,"Object",{create:function(e,t){return void 0===t?C(e):q(C(e),t)},defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ie=c((function(){_.f(1)}));a(a.S+a.F*ie,"Object",{getOwnPropertySymbols:function(e){return _.f(k(e))}}),R&&a(a.S+a.F*(!z||c((function(){var e=L();return"[null]"!=A([e])||"{}"!=A({a:e})||"{}"!=A(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(m(t)||void 0!==e)&&!G(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),o[1]=t,A.apply(R,o)}}),L.prototype[N]||n(27)(L.prototype,N,L.prototype.valueOf),f(L,"Symbol"),f(Math,"Math",!0),f(o.JSON,"JSON",!0)},function(e,t,n){e.exports=n(69)("native-function-to-string",Function.toString)},function(e,t,n){var o=n(46),r=n(71),i=n(62);e.exports=function(e){var t=o(e),n=r.f;if(n)for(var a,s=n(e),l=i.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var o=n(0);o(o.S,"Object",{create:n(48)})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(17),"Object",{defineProperty:n(18).f})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(17),"Object",{defineProperties:n(118)})},function(e,t,n){var o=n(28),r=n(34).f;n(35)("getOwnPropertyDescriptor",(function(){return function(e,t){return r(o(e),t)}}))},function(e,t,n){var o=n(22),r=n(50);n(35)("getPrototypeOf",(function(){return function(e){return r(o(e))}}))},function(e,t,n){var o=n(22),r=n(46);n(35)("keys",(function(){return function(e){return r(o(e))}}))},function(e,t,n){n(35)("getOwnPropertyNames",(function(){return n(119).f}))},function(e,t,n){var o=n(13),r=n(42).onFreeze;n(35)("freeze",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13),r=n(42).onFreeze;n(35)("seal",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13),r=n(42).onFreeze;n(35)("preventExtensions",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13);n(35)("isFrozen",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(13);n(35)("isSealed",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(13);n(35)("isExtensible",(function(e){return function(t){return!!o(t)&&(!e||e(t))}}))},function(e,t,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(120)})},function(e,t,n){var o=n(0);o(o.S,"Object",{is:n(121)})},function(e,t,n){var o=n(0);o(o.S,"Object",{setPrototypeOf:n(90).set})},function(e,t,n){"use strict";var o=n(63),r={};r[n(14)("toStringTag")]="z",r+""!="[object z]"&&n(23)(Object.prototype,"toString",(function(){return"[object "+o(this)+"]"}),!0)},function(e,t,n){var o=n(0);o(o.P,"Function",{bind:n(122)})},function(e,t,n){var o=n(18).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(17)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(13),r=n(50),i=n(14)("hasInstance"),a=Function.prototype;i in a||n(18).f(a,i,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=r(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var o=n(0),r=n(124);o(o.G+o.F*(parseInt!=r),{parseInt:r})},function(e,t,n){var o=n(0),r=n(125);o(o.G+o.F*(parseFloat!=r),{parseFloat:r})},function(e,t,n){"use strict";var o=n(10),r=n(26),i=n(37),a=n(92),s=n(41),l=n(11),c=n(49).f,u=n(34).f,f=n(18).f,d=n(55).trim,p=o.Number,h=p,v=p.prototype,y="Number"==i(n(48)(v)),g="trim"in String.prototype,b=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,o,r,i=(t=g?t.trim():d(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+t}for(var a,l=t.slice(2),c=0,u=l.length;cr)return NaN;return parseInt(l,o)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(y?l((function(){v.valueOf.call(n)})):"Number"!=i(n))?a(new h(b(t)),n,p):b(t)};for(var m,k=n(17)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;k.length>x;x++)r(h,m=k[x])&&!r(p,m)&&f(p,m,u(h,m));p.prototype=v,v.constructor=p,n(23)(o,"Number",p)}},function(e,t,n){"use strict";var o=n(0),r=n(33),i=n(126),a=n(93),s=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",f=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*c[n],c[n]=o%1e7,o=l(o/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=l(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};o(o.P+o.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(11)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,o,s,l=i(this,u),c=r(e),v="",y="0";if(c<0||c>20)throw RangeError(u);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),o=c;o>=7;)f(1e7,0),o-=7;for(f(h(10,o,1),0),o=t-1;o>=23;)d(1<<23),o-=23;d(1<0?v+((s=y.length)<=c?"0."+a.call("0",c-s)+y:y.slice(0,s-c)+"."+y.slice(s-c)):v+y}})},function(e,t,n){"use strict";var o=n(0),r=n(11),i=n(126),a=1..toPrecision;o(o.P+o.F*(r((function(){return"1"!==a.call(1,void 0)}))||!r((function(){a.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var o=n(0);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(0),r=n(10).isFinite;o(o.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){var o=n(0);o(o.S,"Number",{isInteger:n(127)})},function(e,t,n){var o=n(0);o(o.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(0),r=n(127),i=Math.abs;o(o.S,"Number",{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){var o=n(0);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var o=n(0);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(0),r=n(125);o(o.S+o.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(e,t,n){var o=n(0),r=n(124);o(o.S+o.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(e,t,n){var o=n(0),r=n(128),i=Math.sqrt,a=Math.acosh;o(o.S+o.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:r(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var o=n(0),r=Math.asinh;o(o.S+o.F*!(r&&1/r(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var o=n(0),r=Math.atanh;o(o.S+o.F*!(r&&1/r(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var o=n(0),r=n(94);o(o.S,"Math",{cbrt:function(e){return r(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var o=n(0),r=Math.exp;o(o.S,"Math",{cosh:function(e){return(r(e=+e)+r(-e))/2}})},function(e,t,n){var o=n(0),r=n(95);o(o.S+o.F*(r!=Math.expm1),"Math",{expm1:r})},function(e,t,n){var o=n(0);o(o.S,"Math",{fround:n(235)})},function(e,t,n){var o=n(94),r=Math.pow,i=r(2,-52),a=r(2,-23),s=r(2,127)*(2-a),l=r(2,-126);e.exports=Math.fround||function(e){var t,n,r=Math.abs(e),c=o(e);return rs||n!=n?c*(1/0):c*n}},function(e,t,n){var o=n(0),r=Math.abs;o(o.S,"Math",{hypot:function(e,t){for(var n,o,i=0,a=0,s=arguments.length,l=0;a0?(o=n/l)*o:n;return l===1/0?1/0:l*Math.sqrt(i)}})},function(e,t,n){var o=n(0),r=Math.imul;o(o.S+o.F*n(11)((function(){return-5!=r(4294967295,5)||2!=r.length})),"Math",{imul:function(e,t){var n=+e,o=+t,r=65535&n,i=65535&o;return 0|r*i+((65535&n>>>16)*i+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var o=n(0);o(o.S,"Math",{log1p:n(128)})},function(e,t,n){var o=n(0);o(o.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var o=n(0);o(o.S,"Math",{sign:n(94)})},function(e,t,n){var o=n(0),r=n(95),i=Math.exp;o(o.S+o.F*n(11)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(r(e)-r(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var o=n(0),r=n(95),i=Math.exp;o(o.S,"Math",{tanh:function(e){var t=r(e=+e),n=r(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var o=n(0);o(o.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var o=n(0),r=n(47),i=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var o=n(0),r=n(28),i=n(15);o(o.S,"String",{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(0),r=n(96)(!1);o(o.P,"String",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o=n(0),r=n(15),i=n(98),a="".endsWith;o(o.P+o.F*n(100)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),s=void 0===n?o:Math.min(r(n),o),l=String(e);return a?a.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var o=n(0),r=n(98);o(o.P+o.F*n(100)("includes"),"String",{includes:function(e){return!!~r(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var o=n(0);o(o.P,"String",{repeat:n(93)})},function(e,t,n){"use strict";var o=n(0),r=n(15),i=n(98),a="".startsWith;o(o.P+o.F*n(100)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return a?a.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";n(24)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(24)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(24)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(24)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(24)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(24)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(24)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(24)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(24)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(24)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(24)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(24)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(24)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var o=n(0);o(o.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var o=n(0),r=n(22),i=n(41);o(o.P+o.F*n(11)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=r(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var o=n(0),r=n(270);o(o.P+o.F*(Date.prototype.toISOString!==r),"Date",{toISOString:r})},function(e,t,n){"use strict";var o=n(11),r=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=o((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!o((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),o=t<0?"-":t>9999?"+":"";return o+("00000"+Math.abs(t)).slice(o?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(e,t,n){var o=Date.prototype,r=o.toString,i=o.getTime;new Date(NaN)+""!="Invalid Date"&&n(23)(o,"toString",(function(){var e=i.call(this);return e==e?r.call(this):"Invalid Date"}))},function(e,t,n){var o=n(14)("toPrimitive"),r=Date.prototype;o in r||n(27)(r,o,n(273))},function(e,t,n){"use strict";var o=n(12),r=n(41);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!=e)}},function(e,t,n){var o=n(0);o(o.S,"Array",{isArray:n(72)})},function(e,t,n){"use strict";var o=n(31),r=n(0),i=n(22),a=n(130),s=n(101),l=n(15),c=n(102),u=n(103);r(r.S+r.F*!n(73)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,f,d=i(e),p="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=0,b=u(d);if(y&&(v=o(v,h>2?arguments[2]:void 0,2)),null==b||p==Array&&s(b))for(n=new p(t=l(d.length));t>g;g++)c(n,g,y?v(d[g],g):d[g]);else for(f=b.call(d),n=new p;!(r=f.next()).done;g++)c(n,g,y?a(f,v,[r.value,g],!0):r.value);return n.length=g,n}})},function(e,t,n){"use strict";var o=n(0),r=n(102);o(o.S+o.F*n(11)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(0),r=n(28),i=[].join;o(o.P+o.F*(n(61)!=Object||!n(29)(i)),"Array",{join:function(e){return i.call(r(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var o=n(0),r=n(89),i=n(37),a=n(47),s=n(15),l=[].slice;o(o.P+o.F*n(11)((function(){r&&l.call(r)})),"Array",{slice:function(e,t){var n=s(this.length),o=i(this);if(t=void 0===t?n:t,"Array"==o)return l.call(this,e,t);for(var r=a(e,n),c=a(t,n),u=s(c-r),f=new Array(u),d=0;d1&&(o=Math.min(o,i(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}})},function(e,t,n){var o=n(0);o(o.P,"Array",{copyWithin:n(133)}),n(51)("copyWithin")},function(e,t,n){var o=n(0);o(o.P,"Array",{fill:n(104)}),n(51)("fill")},function(e,t,n){"use strict";var o=n(0),r=n(36)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),o(o.P+o.F*i,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(51)("find")},function(e,t,n){"use strict";var o=n(0),r=n(36)(6),i="findIndex",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),o(o.P+o.F*a,"Array",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(51)(i)},function(e,t,n){n(57)("Array")},function(e,t,n){var o=n(10),r=n(92),i=n(18).f,a=n(49).f,s=n(99),l=n(74),c=o.RegExp,u=c,f=c.prototype,d=/a/g,p=/a/g,h=new c(d)!==d;if(n(17)&&(!h||n(11)((function(){return p[n(14)("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")})))){c=function(e,t){var n=this instanceof c,o=s(e),i=void 0===t;return!n&&o&&e.constructor===c&&i?e:r(h?new u(o&&!i?e.source:e,t):u((o=e instanceof c)?e.source:e,o&&i?l.call(e):t),n?this:f,c)};for(var v=function(e){e in c||i(c,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},y=a(u),g=0;y.length>g;)v(y[g++]);f.constructor=c,c.prototype=f,n(23)(o,"RegExp",c)}n(57)("RegExp")},function(e,t,n){"use strict";n(136);var o=n(12),r=n(74),i=n(17),a=/./.toString,s=function(e){n(23)(RegExp.prototype,"toString",e,!0)};n(11)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var e=o(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(e,t,n){"use strict";var o=n(12),r=n(15),i=n(107),a=n(75);n(76)("match",1,(function(e,t,n,s){return[function(n){var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=o(e),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var f,d=[],p=0;null!==(f=a(l,c));){var h=String(f[0]);d[p]=h,""===h&&(l.lastIndex=i(c,r(l.lastIndex),u)),p++}return 0===p?null:d}]}))},function(e,t,n){"use strict";var o=n(12),r=n(22),i=n(15),a=n(33),s=n(107),l=n(75),c=Math.max,u=Math.min,f=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(76)("replace",2,(function(e,t,n,h){return[function(o,r){var i=e(this),a=null==o?void 0:o[t];return void 0!==a?a.call(o,i,r):n.call(String(i),o,r)},function(e,t){var r=h(n,e,this,t);if(r.done)return r.value;var f=o(e),d=String(this),p="function"==typeof t;p||(t=String(t));var y=f.global;if(y){var g=f.unicode;f.lastIndex=0}for(var b=[];;){var m=l(f,d);if(null===m)break;if(b.push(m),!y)break;""===String(m[0])&&(f.lastIndex=s(d,i(f.lastIndex),g))}for(var k,x="",w=0,S=0;S=w&&(x+=d.slice(w,T)+M,w=T+C.length)}return x+d.slice(w)}];function v(e,t,o,i,a,s){var l=o+e.length,c=i.length,u=p;return void 0!==a&&(a=r(a),u=d),n.call(s,u,(function(n,r){var s;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,o);case"'":return t.slice(l);case"<":s=a[r.slice(1,-1)];break;default:var u=+r;if(0===u)return n;if(u>c){var d=f(u/10);return 0===d?n:d<=c?void 0===i[d-1]?r.charAt(1):i[d-1]+r.charAt(1):n}s=i[u-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var o=n(12),r=n(121),i=n(75);n(76)("search",1,(function(e,t,n,a){return[function(n){var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=o(e),l=String(this),c=s.lastIndex;r(c,0)||(s.lastIndex=0);var u=i(s,l);return r(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},function(e,t,n){"use strict";var o=n(99),r=n(12),i=n(64),a=n(107),s=n(15),l=n(75),c=n(106),u=n(11),f=Math.min,d=[].push,p="length",h=!u((function(){RegExp(4294967295,"y")}));n(76)("split",2,(function(e,t,n,u){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(e,t){var r=String(this);if(void 0===e&&0===t)return[];if(!o(e))return n.call(r,e,t);for(var i,a,s,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,h=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,u+"g");(i=c.call(v,r))&&!((a=v.lastIndex)>f&&(l.push(r.slice(f,i.index)),i[p]>1&&i.index=h));)v.lastIndex===i.index&&v.lastIndex++;return f===r[p]?!s&&v.test("")||l.push(""):l.push(r.slice(f)),l[p]>h?l.slice(0,h):l}:"0".split(void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,o){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r,o):v.call(String(r),n,o)},function(e,t){var o=u(v,e,this,t,v!==n);if(o.done)return o.value;var c=r(e),d=String(this),p=i(c,RegExp),y=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(h?"y":"g"),b=new p(h?c:"^(?:"+c.source+")",g),m=void 0===t?4294967295:t>>>0;if(0===m)return[];if(0===d.length)return null===l(b,d)?[d]:[];for(var k=0,x=0,w=[];x0?arguments[0]:void 0)}}),{get:function(e){var t=o.getEntry(r(this,"Map"),e);return t&&t.v},set:function(e,t){return o.def(r(this,"Map"),0===e?0:e,t)}},o,!0)},function(e,t,n){"use strict";var o=n(140),r=n(52);e.exports=n(79)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"Set"),e=0===e?0:e,e)}},o)},function(e,t,n){"use strict";var o,r=n(10),i=n(36)(0),a=n(23),s=n(42),l=n(120),c=n(141),u=n(13),f=n(52),d=n(52),p=!r.ActiveXObject&&"ActiveXObject"in r,h=s.getWeak,v=Object.isExtensible,y=c.ufstore,g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(e){if(u(e)){var t=h(e);return!0===t?y(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(f(this,"WeakMap"),e,t)}},m=e.exports=n(79)("WeakMap",g,b,c,!0,!0);d&&p&&(l((o=c.getConstructor(g,"WeakMap")).prototype,b),s.NEED=!0,i(["delete","has","get","set"],(function(e){var t=m.prototype,n=t[e];a(t,e,(function(t,r){if(u(t)&&!v(t)){this._f||(this._f=new o);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)}))})))},function(e,t,n){"use strict";var o=n(141),r=n(52);n(79)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"WeakSet"),e,!0)}},o,!1,!0)},function(e,t,n){"use strict";var o=n(0),r=n(80),i=n(109),a=n(12),s=n(47),l=n(15),c=n(13),u=n(10).ArrayBuffer,f=n(64),d=i.ArrayBuffer,p=i.DataView,h=r.ABV&&u.isView,v=d.prototype.slice,y=r.VIEW;o(o.G+o.W+o.F*(u!==d),{ArrayBuffer:d}),o(o.S+o.F*!r.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||c(e)&&y in e}}),o(o.P+o.U+o.F*n(11)((function(){return!new d(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,o=s(e,n),r=s(void 0===t?n:t,n),i=new(f(this,d))(l(r-o)),c=new p(this),u=new p(i),h=0;o=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),o(o.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var o=n(34),r=n(50),i=n(26),a=n(0),s=n(13),l=n(12);a(a.S,"Reflect",{get:function e(t,n){var a,c,u=arguments.length<3?t:arguments[2];return l(t)===u?t[n]:(a=o.f(t,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(u):void 0:s(c=r(t))?e(c,n,u):void 0}})},function(e,t,n){var o=n(34),r=n(0),i=n(12);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return o.f(i(e),t)}})},function(e,t,n){var o=n(0),r=n(50),i=n(12);o(o.S,"Reflect",{getPrototypeOf:function(e){return r(i(e))}})},function(e,t,n){var o=n(0);o(o.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var o=n(0),r=n(12),i=Object.isExtensible;o(o.S,"Reflect",{isExtensible:function(e){return r(e),!i||i(e)}})},function(e,t,n){var o=n(0);o(o.S,"Reflect",{ownKeys:n(143)})},function(e,t,n){var o=n(0),r=n(12),i=Object.preventExtensions;o(o.S,"Reflect",{preventExtensions:function(e){r(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var o=n(18),r=n(34),i=n(50),a=n(26),s=n(0),l=n(43),c=n(12),u=n(13);s(s.S,"Reflect",{set:function e(t,n,s){var f,d,p=arguments.length<4?t:arguments[3],h=r.f(c(t),n);if(!h){if(u(d=i(t)))return e(d,n,s,p);h=l(0)}if(a(h,"value")){if(!1===h.writable||!u(p))return!1;if(f=r.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,o.f(p,n,f)}else o.f(p,n,l(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(e,t,n){var o=n(0),r=n(90);r&&o(o.S,"Reflect",{setPrototypeOf:function(e,t){r.check(e,t);try{return r.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(333),e.exports=n(16).Array.includes},function(e,t,n){"use strict";var o=n(0),r=n(70)(!0);o(o.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(51)("includes")},function(e,t,n){n(335),e.exports=n(16).Array.flatMap},function(e,t,n){"use strict";var o=n(0),r=n(336),i=n(22),a=n(15),s=n(32),l=n(131);o(o.P,"Array",{flatMap:function(e){var t,n,o=i(this);return s(e),t=a(o.length),n=l(o,0),r(n,o,o,t,0,1,e,arguments[1]),n}}),n(51)("flatMap")},function(e,t,n){"use strict";var o=n(72),r=n(13),i=n(15),a=n(31),s=n(14)("isConcatSpreadable");e.exports=function e(t,n,l,c,u,f,d,p){for(var h,v,y=u,g=0,b=!!d&&a(d,p,3);g0)y=e(t,n,h,i(h.length),y,f-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=h}y++}g++}return y}},function(e,t,n){n(338),e.exports=n(16).String.padStart},function(e,t,n){"use strict";var o=n(0),r=n(144),i=n(78),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);o(o.P+o.F*a,"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(340),e.exports=n(16).String.padEnd},function(e,t,n){"use strict";var o=n(0),r=n(144),i=n(78),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);o(o.P+o.F*a,"String",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(342),e.exports=n(16).String.trimLeft},function(e,t,n){"use strict";n(55)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){n(344),e.exports=n(16).String.trimRight},function(e,t,n){"use strict";n(55)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){n(346),e.exports=n(86).f("asyncIterator")},function(e,t,n){n(116)("asyncIterator")},function(e,t,n){n(348),e.exports=n(16).Object.getOwnPropertyDescriptors},function(e,t,n){var o=n(0),r=n(143),i=n(28),a=n(34),s=n(102);o(o.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),l=a.f,c=r(o),u={},f=0;c.length>f;)void 0!==(n=l(o,t=c[f++]))&&s(u,t,n);return u}})},function(e,t,n){n(350),e.exports=n(16).Object.values},function(e,t,n){var o=n(0),r=n(145)(!1);o(o.S,"Object",{values:function(e){return r(e)}})},function(e,t,n){n(352),e.exports=n(16).Object.entries},function(e,t,n){var o=n(0),r=n(145)(!0);o(o.S,"Object",{entries:function(e){return r(e)}})},function(e,t,n){"use strict";n(137),n(354),e.exports=n(16).Promise.finally},function(e,t,n){"use strict";var o=n(0),r=n(16),i=n(10),a=n(64),s=n(139);o(o.P+o.R,"Promise",{finally:function(e){var t=a(this,r.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){n(356),n(357),n(358),e.exports=n(16)},function(e,t,n){var o=n(10),r=n(0),i=n(78),a=[].slice,s=/MSIE .\./.test(i),l=function(e){return function(t,n){var o=arguments.length>2,r=!!o&&a.call(arguments,2);return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};r(r.G+r.B+r.F*s,{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(e,t,n){var o=n(0),r=n(108);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(105),r=n(46),i=n(23),a=n(10),s=n(27),l=n(56),c=n(14),u=c("iterator"),f=c("toStringTag"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=r(p),v=0;v=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(30),n(2),n(3),n(364),n(365),n(366),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var h=function(){function e(t){var n=this;(0,i.default)(this,e);var o=function(){};f.isObject(t)&&f.isFunction(t.onReady)&&(o=t.onReady);var r=new u.default(t);this.isReady=r.isReady.then((function(){n.exportAPI(r),o()}))}return(0,s.default)(e,[{key:"exportAPI",value:function(e){var t=this;["configuration"].forEach((function(n){t[n]=e[n]})),this.destroy=function(){for(var n in Object.values(e.moduleInstances).forEach((function(e){f.isFunction(e.destroy)&&e.destroy(),e.listeners.removeAll()})),e=null,t)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];Object.setPrototypeOf(t,null)},Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach((function(n){var o=(0,r.default)(n,2),i=o[0],a=o[1];Object.entries(a).forEach((function(n){var o=(0,r.default)(n,2),a=o[0],s=o[1];t[s]=e.moduleInstances.API.methods[i][a]}))}))}}],[{key:"version",get:function(){return"2.26.2"}}]),e}();o.default=h,h.displayName="EditorJS",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(){}e.exports=Object.assign(n,{default:n,register:n,revert:function(){},__esModule:!0})},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[],void 0===(i="function"==typeof(o=function(){"use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(e){var t=document.createDocumentFragment();Array.isArray(e)||(e=[e]),e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(e))})),this.insertBefore(t,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){e=0===arguments.length||!!e;var t=this.parentNode,n=window.getComputedStyle(t,null),o=parseInt(n.getPropertyValue("border-top-width")),r=parseInt(n.getPropertyValue("border-left-width")),i=this.offsetTop-t.offsetTopt.scrollTop+t.clientHeight,s=this.offsetLeft-t.offsetLeftt.scrollLeft+t.clientWidth,c=i&&!a;(i||a)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(s||l)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-r+this.clientWidth/2),(i||a||s||l)&&!e&&this.scrollIntoView(c)})})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(19),n(8),n(53),n(149),n(81)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(u),f=h(f),p=h(p);var y=n(375),g=[];y.keys().forEach((function(e){e.match(/^\.\/[^_][\w/]*\.([tj])s$/)&&g.push(y(e))}));var b=function(){function e(t){var n,o,a=this;(0,s.default)(this,e),this.moduleInstances={},this.eventsDispatcher=new p.default,this.isReady=new Promise((function(e,t){n=e,o=t})),Promise.resolve().then((0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.configuration=t,e.next=3,a.validate();case 3:return e.next=5,a.init();case 5:return e.next=7,a.start();case 7:u.logLabeled("I'm ready! (ノ◕ヮ◕)ノ*:・゚✧","log","","color: #E24A75"),setTimeout((0,i.default)(r.default.mark((function e(){var t,o,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.render();case 2:a.configuration.autofocus&&(t=a.moduleInstances,o=t.BlockManager,(i=t.Caret).setToBlock(o.blocks[0],i.positions.START),o.highlightCurrentNode()),a.moduleInstances.UI.removeLoader(),n();case 5:case"end":return e.stop()}}),e)}))),500);case 9:case"end":return e.stop()}}),e)})))).catch((function(e){u.log("Editor.js is not ready because of ".concat(e),"error"),o(e)}))}var t,n;return(0,l.default)(e,[{key:"configuration",get:function(){return this.config},set:function(e){var t,n;u.isObject(e)?this.config=Object.assign({},e):this.config={holder:e},u.deprecationAssert(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),null==this.config.holder&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=u.LogLevels.VERBOSE),u.setLogLevel(this.config.logLevel),u.deprecationAssert(Boolean(this.config.initialBlock),"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=void 0!==this.config.minHeight?this.config.minHeight:300;var o={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||function(){},this.config.onChange=this.config.onChange||function(){},this.config.inlineToolbar=void 0===this.config.inlineToolbar||this.config.inlineToolbar,!u.isEmpty(this.config.data)&&this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data={blocks:[o]}),this.config.readOnly=this.config.readOnly||!1,(null===(t=this.config.i18n)||void 0===t?void 0:t.messages)&&f.default.setDictionary(this.config.i18n.messages),this.config.i18n.direction=(null===(n=this.config.i18n)||void 0===n?void 0:n.direction)||"ltr"}},{key:"validate",value:(n=(0,i.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,n=t.holderId,o=t.holder,!n||!o){e.next=3;break}throw Error("«holderId» and «holder» param can't assign at the same time.");case 3:if(!u.isString(o)||c.default.get(o)){e.next=5;break}throw Error("element with ID «".concat(o,"» is missing. Pass correct holder's ID."));case 5:if(!o||!u.isObject(o)||c.default.isElement(o)){e.next=7;break}throw Error("«holder» value must be an Element node");case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"init",value:function(){this.constructModules(),this.configureModules()}},{key:"start",value:(t=(0,i.default)(r.default.mark((function e(){var t,n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"],e.next=3,t.reduce((function(e,t){return e.then((0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.moduleInstances[t].prepare();case 3:e.next=10;break;case 5:if(e.prev=5,e.t0=e.catch(0),!(e.t0 instanceof d.CriticalError)){e.next=9;break}throw new Error(e.t0.message);case 9:u.log("Module ".concat(t," was skipped because of %o"),"warn",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,5]])}))))}),Promise.resolve());case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}},{key:"constructModules",value:function(){var e=this;g.forEach((function(t){var n=u.isFunction(t)?t:t.default;try{e.moduleInstances[n.displayName]=new n({config:e.configuration,eventsDispatcher:e.eventsDispatcher})}catch(e){u.log("Module ".concat(n.displayName," skipped because"),"error",e)}}))}},{key:"configureModules",value:function(){for(var e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}},{key:"getModulesDiff",value:function(e){var t={};for(var n in this.moduleInstances)n!==e&&(t[n]=this.moduleInstances[n]);return t}}]),e}();o.default=b,b.displayName="Core",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(7).default;function r(){"use strict";e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,o){var r=t&&t.prototype instanceof v?t:v,i=Object.create(r.prototype),s=new B(o||[]);return a(i,"_invoke",{value:C(e,n,s)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h={};function v(){}function y(){}function g(){}var b={};f(b,l,(function(){return this}));var m=Object.getPrototypeOf,k=m&&m(m(O([])));k&&k!==n&&i.call(k,l)&&(b=k);var x=g.prototype=v.prototype=Object.create(b);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){var n;a(this,"_invoke",{value:function(r,a){function s(){return new t((function(n,s){!function n(r,a,s,l){var c=p(e[r],e,a);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(f).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,l)}))}l(c.arg)}(r,a,n,s)}))}return n=n?n.then(s,s):s()}})}function C(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return M()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=p(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}function T(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;_(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(147);e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(110),r=n(374);function i(t,n,a){return r()?(e.exports=i=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(null,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o={"./api":82,"./api/":82,"./api/blocks":153,"./api/blocks.ts":153,"./api/caret":154,"./api/caret.ts":154,"./api/events":155,"./api/events.ts":155,"./api/i18n":156,"./api/i18n.ts":156,"./api/index":82,"./api/index.ts":82,"./api/inlineToolbar":157,"./api/inlineToolbar.ts":157,"./api/listeners":158,"./api/listeners.ts":158,"./api/notifier":159,"./api/notifier.ts":159,"./api/readonly":160,"./api/readonly.ts":160,"./api/sanitizer":161,"./api/sanitizer.ts":161,"./api/saver":162,"./api/saver.ts":162,"./api/selection":163,"./api/selection.ts":163,"./api/styles":164,"./api/styles.ts":164,"./api/toolbar":165,"./api/toolbar.ts":165,"./api/tooltip":166,"./api/tooltip.ts":166,"./api/ui":167,"./api/ui.ts":167,"./blockEvents":168,"./blockEvents.ts":168,"./blockManager":169,"./blockManager.ts":169,"./blockSelection":170,"./blockSelection.ts":170,"./caret":171,"./caret.ts":171,"./crossBlockSelection":172,"./crossBlockSelection.ts":172,"./dragNDrop":173,"./dragNDrop.ts":173,"./modificationsObserver":174,"./modificationsObserver.ts":174,"./paste":175,"./paste.ts":175,"./readonly":176,"./readonly.ts":176,"./rectangleSelection":177,"./rectangleSelection.ts":177,"./renderer":178,"./renderer.ts":178,"./saver":179,"./saver.ts":179,"./toolbar":83,"./toolbar/":83,"./toolbar/blockSettings":180,"./toolbar/blockSettings.ts":180,"./toolbar/conversion":181,"./toolbar/conversion.ts":181,"./toolbar/index":83,"./toolbar/index.ts":83,"./toolbar/inline":182,"./toolbar/inline.ts":182,"./tools":183,"./tools.ts":183,"./ui":185,"./ui.ts":185};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=375},function(e,t,n){var o=n(4);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(378)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,[{key:"show",value:function(e){a.default.show(e)}}]),e}();o.default=l,l.displayName="Notifier",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){"use strict";n(1),e.exports=function(){var e=n(6),t=null;return{show:function(n){if(n.message){!function(){if(t)return!0;t=e.getWrapper(),document.body.appendChild(t)}();var o=null,r=n.time||8e3;switch(n.type){case"confirm":o=e.confirm(n);break;case"prompt":o=e.prompt(n);break;default:o=e.alert(n),window.setTimeout((function(){o.remove()}),r)}t.appendChild(o),o.classList.add("cdx-notify--bounce-in")}}}}()},function(e,t,n){var o=n(2);"string"==typeof o&&(o=[[e.i,o,""]]),n(4)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\'\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\'\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o=e[1]||"",r=e[3];if(!r)return o;if(t&&"function"==typeof btoa){var i=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[o].concat(a).concat([i]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r=0&&u.splice(t,1)}function y(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),h(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=y(t)),o=x.bind(null,n,a,!1),r=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){v(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return d(n,t),function(e){for(var o=[],r=0;r0;)t.insertBefore(l.childNodes[0],l);t.removeChild(l),this._sanitize(e,t);break}for(var v=0;v{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(e,t,n){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const o=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},n);if(o.hidingDelay&&(this.hidingDelay=o.hidingDelay),this.nodes.content.innerHTML="","string"==typeof t)this.nodes.content.appendChild(document.createTextNode(t));else{if(!(t instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof t+" given.");this.nodes.content.appendChild(t)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),o.placement){case"top":this.placeTop(e,o);break;case"left":this.placeLeft(e,o);break;case"right":this.placeRight(e,o);break;case"bottom":default:this.placeBottom(e,o)}o&&o.delay?this.showingTimeout=setTimeout(()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0},o.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(e=!1){if(this.hidingDelay&&!e)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(e,t,n){e.addEventListener("mouseenter",()=>{this.show(e,t,n)}),e.addEventListener("mouseleave",()=>{this.hide()})}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const e="codex-tooltips-style";if(document.getElementById(e))return;const t=n(2),o=this.make("style",null,{textContent:t.toString(),id:e});this.prepend(document.head,o)}placeBottom(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.bottom+window.pageYOffset+this.offsetTop+t.marginTop;this.applyPlacement("bottom",o,r)}placeTop(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",o,r)}placeLeft(e,t){const n=e.getBoundingClientRect(),o=n.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-t.marginLeft,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",o,r)}placeRight(e,t){const n=e.getBoundingClientRect(),o=n.right+this.offsetRight+t.marginRight,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",o,r)}applyPlacement(e,t,n){this.nodes.wrapper.classList.add(this.CSS.placement[e]),this.nodes.wrapper.style.left=t+"px",this.nodes.wrapper.style.top=n+"px"}make(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o}append(e,t){Array.isArray(t)?t.forEach(t=>e.appendChild(t)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach(t=>e.prepend(t)):e.prepend(t)}}},function(e,t){e.exports='.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url(\'data:image/svg+xml;charset=utf-8,\') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}'}]).default},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(19),n(8),n(25)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c){"use strict";var u=n(1);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l),c=u(c);var d=function(){function e(t,n){(0,r.default)(this,e),this.cursor=-1,this.items=[],this.items=t||[],this.focusedCssClass=n}return(0,i.default)(e,[{key:"currentItem",get:function(){return-1===this.cursor?null:this.items[this.cursor]}},{key:"setCursor",value:function(e){e=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}},{key:"setItems",value:function(e){this.items=e}},{key:"next",value:function(){this.cursor=this.leafNodesAndReturnIndex(e.directions.RIGHT)}},{key:"previous",value:function(){this.cursor=this.leafNodesAndReturnIndex(e.directions.LEFT)}},{key:"dropCursor",value:function(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}},{key:"leafNodesAndReturnIndex",value:function(t){var n=this;if(0===this.items.length)return this.cursor;var o=this.cursor;return-1===o?o=t===e.directions.RIGHT?-1:0:this.items[o].classList.remove(this.focusedCssClass),o=t===e.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length,s.default.canSetCaret(this.items[o])&&l.delay((function(){return c.default.setCursor(n.items[o])}),50)(),this.items[o].classList.add(this.focusedCssClass),o}}]),e}();o.default=d,d.displayName="DomIterator",d.directions={RIGHT:"right",LEFT:"left"},e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8),n(19),n(60)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c){"use strict";var u=n(1);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s),l=u(l);var d=function(){function e(t){(0,r.default)(this,e),this.blocks=[],this.workingArea=t}return(0,i.default)(e,[{key:"length",get:function(){return this.blocks.length}},{key:"array",get:function(){return this.blocks}},{key:"nodes",get:function(){return s.array(this.workingArea.children)}},{key:"push",value:function(e){this.blocks.push(e),this.insertToDOM(e)}},{key:"swap",value:function(e,t){var n=this.blocks[t];l.default.swap(this.blocks[e].holder,n.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=n}},{key:"move",value:function(e,t){var n=this.blocks.splice(t,1)[0],o=e-1,r=Math.max(0,o),i=this.blocks[r];e>0?this.insertToDOM(n,"afterend",i):this.insertToDOM(n,"beforebegin",i),this.blocks.splice(e,0,n);var a=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});n.call(c.BlockToolAPI.MOVED,a)}},{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.length){e>this.length&&(e=this.length),n&&(this.blocks[e].holder.remove(),this.blocks[e].call(c.BlockToolAPI.REMOVED));var o=n?1:0;if(this.blocks.splice(e,o,t),e>0){var r=this.blocks[e-1];this.insertToDOM(t,"afterend",r)}else{var i=this.blocks[e+1];i?this.insertToDOM(t,"beforebegin",i):this.insertToDOM(t)}}else this.push(t)}},{key:"remove",value:function(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(c.BlockToolAPI.REMOVED),this.blocks.splice(e,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.forEach((function(e){return e.call(c.BlockToolAPI.REMOVED)})),this.blocks.length=0}},{key:"insertAfter",value:function(e,t){var n=this.blocks.indexOf(e);this.insert(n+1,t)}},{key:"get",value:function(e){return this.blocks[e]}},{key:"indexOf",value:function(e){return this.blocks.indexOf(e)}},{key:"insertToDOM",value:function(e,t,n){t?n.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(c.BlockToolAPI.RENDERED)}},{key:"composeBlockEvent",value:function(e,t){return new CustomEvent(e,{detail:t})}}],[{key:"set",value:function(e,t,n){return isNaN(Number(t))?(Reflect.set(e,t,n),!0):(e.insert(+t,n),!0)}},{key:"get",value:function(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}}]),e}();o.default=d,d.displayName="Blocks",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.BlockMutationType=void 0,e.BlockMutationType=t,function(e){e.Added="block-added",e.Removed="block-removed",e.Moved="block-moved",e.Changed="block-changed"}(t||(e.BlockMutationType=t={}))})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function o(e,t){for(var n=0;n=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.ToolboxEvent=S,function(e){e.Opened="toolbox-opened",e.Closed="toolbox-closed",e.BlockAdded="toolbox-block-added"}(S||(e.ToolboxEvent=S={}));var T=function(e){(0,l.default)(c,e);var n,a=w(c);function c(e){var t,n=e.api,o=e.tools,i=e.i18nLabels;return(0,r.default)(this,c),(t=a.call(this)).opened=!1,t.nodes={toolbox:null},t.onOverlayClicked=function(){t.close()},t.api=n,t.tools=o,t.i18nLabels=i,t}return(0,i.default)(c,[{key:"isEmpty",get:function(){return 0===this.toolsToBeDisplayed.length}},{key:"make",value:function(){return this.popover=new y.default({scopeElement:this.api.ui.nodes.redactor,className:c.CSS.toolbox,searchable:!0,filterLabel:this.i18nLabels.filter,nothingFoundLabel:this.i18nLabels.nothingFound,items:this.toolboxItemsToBeDisplayed}),this.popover.on(y.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.enableShortcuts(),this.nodes.toolbox=this.popover.getElement(),this.nodes.toolbox}},{key:"hasFocus",value:function(){var e;return null===(e=this.popover)||void 0===e?void 0:e.hasFocus()}},{key:"destroy",value:function(){var e;(0,s.default)((0,u.default)(c.prototype),"destroy",this).call(this),this.nodes&&this.nodes.toolbox&&(this.nodes.toolbox.remove(),this.nodes.toolbox=null),this.removeAllShortcuts(),null===(e=this.popover)||void 0===e||e.off(y.PopoverEvent.OverlayClicked,this.onOverlayClicked)}},{key:"toolButtonActivated",value:function(e,t){this.insertNewBlock(e,t)}},{key:"open",value:function(){var e;this.isEmpty||(null===(e=this.popover)||void 0===e||e.show(),this.opened=!0,this.emit(S.Opened))}},{key:"close",value:function(){var e;null===(e=this.popover)||void 0===e||e.hide(),this.opened=!1,this.emit(S.Closed)}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"toolsToBeDisplayed",get:function(){var e=[];return this.tools.forEach((function(t){t.toolbox&&e.push(t)})),e}},{key:"toolboxItemsToBeDisplayed",get:function(){var e=this,t=function(t,n){return{icon:t.icon,label:g.default.t(b.I18nInternalNS.toolNames,t.title||d.capitalize(n.name)),name:n.name,onActivate:function(){e.toolButtonActivated(n.name,t.data)},secondaryLabel:n.shortcut?d.beautifyShortcut(n.shortcut):""}};return this.toolsToBeDisplayed.reduce((function(e,n){return Array.isArray(n.toolbox)?n.toolbox.forEach((function(o){e.push(t(o,n))})):void 0!==n.toolbox&&e.push(t(n.toolbox,n)),e}),[])}},{key:"enableShortcuts",value:function(){var e=this;this.toolsToBeDisplayed.forEach((function(t){var n=t.shortcut;n&&e.enableShortcutForTool(t.name,n)}))}},{key:"enableShortcutForTool",value:function(e,t){var n=this;h.default.add({name:t,on:this.api.ui.nodes.redactor,handler:function(t){t.preventDefault(),n.insertNewBlock(e)}})}},{key:"removeAllShortcuts",value:function(){var e=this;this.toolsToBeDisplayed.forEach((function(t){var n=t.shortcut;n&&h.default.remove(e.api.ui.nodes.redactor,n)}))}},{key:"insertNewBlock",value:(n=(0,o.default)(t.default.mark((function e(n,o){var r,i,a,s,l,c;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(r)){e.next=4;break}return e.abrupt("return");case 4:if(a=i.isEmpty?r:r+1,!o){e.next=10;break}return e.next=8,this.api.blocks.composeBlockData(n);case 8:l=e.sent,s=Object.assign(l,o);case 10:(c=this.api.blocks.insert(n,s,void 0,a,void 0,i.isEmpty)).call(p.BlockToolAPI.APPEND_CALLBACK),this.api.caret.setToBlock(a),this.emit(S.BlockAdded,{block:c}),this.api.toolbar.close();case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})}],[{key:"CSS",get:function(){return{toolbox:"ce-toolbox"}}}]),c}(v.default);e.default=T,T.displayName="Toolbox",C([d.cacheable],T.prototype,"toolsToBeDisplayed",null),C([d.cacheable],T.prototype,"toolboxItemsToBeDisplayed",null)})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,[{key:"lock",value:function(){a.isIosDevice?this.lockHard():document.body.classList.add(e.CSS.scrollLocked)}},{key:"unlock",value:function(){a.isIosDevice?this.unlockHard():document.body.classList.remove(e.CSS.scrollLocked)}},{key:"lockHard",value:function(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset","".concat(this.scrollPosition,"px")),document.body.classList.add(e.CSS.scrollLockedHard)}},{key:"unlockHard",value:function(){document.body.classList.remove(e.CSS.scrollLockedHard),null!==this.scrollPosition&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}}]),e}();o.default=l,l.displayName="ScrollLocker",l.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"},e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}([function(e,t,n){var o=n(1),r=n(2);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]),o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},function(e,t,n){"use strict";var o,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n',title:"Text"}}}]),e}()}]).default},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3)],void 0===(i="function"==typeof(o=function(o,r,i){"use strict";var a=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=a(r),i=a(i);var s=function(){function e(){(0,r.default)(this,e),this.commandName="bold",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--bold"},this.nodes={button:void 0}}return(0,i.default)(e,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='\n\n',this.nodes.button}},{key:"surround",value:function(){document.execCommand(this.commandName)}},{key:"checkState",value:function(){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+B"}}],[{key:"sanitize",get:function(){return{b:{}}}}]),e}();o.default=s,s.displayName="BoldInlineTool",s.isInline=!0,s.title="Bold",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3)],void 0===(i="function"==typeof(o=function(o,r,i){"use strict";var a=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=a(r),i=a(i);var s=function(){function e(){(0,r.default)(this,e),this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}return(0,i.default)(e,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='\n\n',this.nodes.button}},{key:"surround",value:function(){document.execCommand(this.commandName)}},{key:"checkState",value:function(){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+I"}}],[{key:"sanitize",get:function(){return{i:{}}}}]),e}();o.default=s,s.displayName="ItalicInlineTool",s.isInline=!0,s.title="Italic",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(25),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f='\n\n',d=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=n.toolbar,this.inlineToolbar=n.inlineToolbar,this.notifier=n.notifier,this.i18n=n.i18n,this.selection=new s.default}return(0,i.default)(e,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=f,this.nodes.button}},{key:"renderActions",value:function(){var e=this;return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",(function(t){t.keyCode===e.ENTER_KEY&&e.enterPressed(t)})),this.nodes.input}},{key:"surround",value:function(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());var t=this.selection.findParentTag("A");if(t){var n=document.getElementsByClassName("unlink-button")[0];return this.selection.expandToTag(t),this.unlink(),this.nodes.input.value="",this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive),n.remove(),void this.inlineToolbar.close()}}this.toggleActions()}},{key:"checkState",value:function(){var e=this,t=this.selection.findParentTag("A"),n=document.createElement("button");if(t){this.nodes.button.innerHTML='\n\n',this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions(),n.classList.add("unlink-button"),n.textContent=this.i18n.t("Remove"),n.addEventListener("click",(function(){e.selection.expandToTag(t),e.unlink(),e.nodes.input.value="",e.nodes.button.classList.remove(e.CSS.buttonUnlink),e.nodes.button.classList.remove(e.CSS.buttonActive),n.remove(),e.inlineToolbar.close()}));var o=t.getAttribute("href");this.nodes.input.value="null"!==o?o:"",""===this.nodes.input.value||document.querySelector(".unlink-button")||document.querySelector(".ce-inline-toolbar__actions").appendChild(n),this.selection.save()}else this.nodes.button.innerHTML=f,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!t}},{key:"clear",value:function(){this.closeActions()}},{key:"shortcut",get:function(){return"CMD+K"}},{key:"toggleActions",value:function(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}},{key:"openActions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.getElementsByClassName("ce-inline-toolbar")[0];this.nodes.input.classList.add(this.CSS.inputShowed),t.style.transform="translate(-50%, -33px)",e&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.getElementsByClassName("ce-inline-toolbar")[0];if(this.selection.isFakeBackgroundEnabled){var n=new s.default;n.save(),this.selection.restore(),this.selection.removeFakeBackground(),n.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),t.style.transform="",this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(e){var t=this.nodes.input.value||"";return t.trim()?this.validateURL(t)?(t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),void this.inlineToolbar.close()):(this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void l.log("Incorrect Link pasted","warn",t)):(this.selection.restore(),this.unlink(),e.preventDefault(),void this.closeActions())}},{key:"validateURL",value:function(e){return!/\s/.test(e)}},{key:"prepareLink",value:function(e){return e=e.trim(),e=this.addProtocol(e)}},{key:"addProtocol",value:function(e){if(/^(\w+):(\/\/)?/.test(e))return e;var t=/^\/[^/\s]/.test(e),n="#"===e.substring(0,1),o=/^\/\/[^/\s]/.test(e);return t||n||o||(e="http://"+e),e}},{key:"insertLink",value:function(e){var t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e),this.selection.findParentTag("A").setAttribute("target","_blank")}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),e}();o.default=d,d.displayName="LinkInlineTool",d.isInline=!0,d.title="Link",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(19)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.data,o=t.api;(0,r.default)(this,e),this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=o,this.title=n.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=n.savedData,this.wrapper=this.make()}return(0,i.default)(e,[{key:"render",value:function(){return this.wrapper}},{key:"save",value:function(){return this.savedData}},{key:"make",value:function(){var e=a.default.make("div",this.CSS.wrapper),t=a.default.make("div",this.CSS.info),n=a.default.make("div",this.CSS.title,{textContent:this.title}),o=a.default.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML='',t.appendChild(n),t.appendChild(o),e.appendChild(t),e}}]),e}();o.default=l,l.displayName="Stub",l.isReadOnlySupported=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(68),n(393),n(394),n(395)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=u(l),c=u(c);var f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},k=function(e){(0,l.default)(n,e);var t=b(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).type=d.ToolType.Block,e.inlineTools=new h.default,e.tunes=new h.default,e}return(0,i.default)(n,[{key:"create",value:function(e,t,n){return new this.constructable({data:e,block:t,readOnly:n,api:this.api.getMethodsForTool(this),config:this.settings})}},{key:"isReadOnlySupported",get:function(){return!0===this.constructable[d.InternalBlockToolSettings.IsReadOnlySupported]}},{key:"isLineBreaksEnabled",get:function(){return this.constructable[d.InternalBlockToolSettings.IsEnabledLineBreaks]}},{key:"toolbox",get:function(){var e=this.constructable[d.InternalBlockToolSettings.Toolbox],t=this.config[d.UserSettings.Toolbox];if(!p.isEmpty(e)&&!1!==t)return t?Array.isArray(e)?Array.isArray(t)?t.map((function(t,n){var o=e[n];return o?Object.assign(Object.assign({},o),t):t})):[t]:Array.isArray(t)?t:[Object.assign(Object.assign({},e),t)]:Array.isArray(e)?e:[e]}},{key:"conversionConfig",get:function(){return this.constructable[d.InternalBlockToolSettings.ConversionConfig]}},{key:"enabledInlineTools",get:function(){return this.config[d.UserSettings.EnabledInlineTools]||!1}},{key:"enabledBlockTunes",get:function(){return this.config[d.UserSettings.EnabledBlockTunes]}},{key:"pasteConfig",get:function(){return this.constructable[d.InternalBlockToolSettings.PasteConfig]||{}}},{key:"sanitizeConfig",get:function(){var e=(0,s.default)((0,u.default)(n.prototype),"sanitizeConfig",this),t=this.baseSanitizeConfig;if(p.isEmpty(e))return t;var o={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];p.isObject(i)?o[r]=Object.assign({},t,i):o[r]=i}return o}},{key:"baseSanitizeConfig",get:function(){var e={};return Array.from(this.inlineTools.values()).forEach((function(t){return Object.assign(e,t.sanitizeConfig)})),Array.from(this.tunes.values()).forEach((function(t){return Object.assign(e,t.sanitizeConfig)})),e}}]),n}(d.default);o.default=k,k.displayName="BlockTool",m([p.cacheable],k.prototype,"sanitizeConfig",null),m([p.cacheable],k.prototype,"baseSanitizeConfig",null),e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(84)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.CSS={animation:"wobble"},this.api=n}return(0,i.default)(e,[{key:"render",value:function(){var e=this;return{icon:'\n\n',label:this.api.i18n.t("Move down"),onActivate:function(t,n){return e.handleClick(n)},name:"move-down"}}},{key:"handleClick",value:function(e){var t=this,n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n+1);if(!o){var r=e.target.closest("."+a.default.CSS.item).querySelector("."+a.default.CSS.itemIcon);return r.classList.add(this.CSS.animation),void window.setTimeout((function(){r.classList.remove(t.CSS.animation)}),500)}var i=o.holder,s=i.getBoundingClientRect(),l=Math.abs(window.innerHeight-i.offsetHeight);s.top\n\n',label:this.api.i18n.t("Delete"),name:"delete",onActivate:function(){return e.handleClick()}}}},{key:"handleClick",value:function(){this.api.blocks.delete()}}]),e}();o.default=s,s.displayName="DeleteTune",s.isTune=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(84)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.CSS={animation:"wobble"},this.api=n}return(0,i.default)(e,[{key:"render",value:function(){var e=this;return{icon:'\n\n',label:this.api.i18n.t("Move up"),onActivate:function(t,n){return e.handleClick(n)},name:"move-up"}}},{key:"handleClick",value:function(e){var t=this,n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n),r=this.api.blocks.getBlockByIndex(n-1);if(0===n||!o||!r){var i=e.target.closest("."+a.default.CSS.item).querySelector("."+a.default.CSS.itemIcon);return i.classList.add(this.CSS.animation),void window.setTimeout((function(){i.classList.remove(t.CSS.animation)}),500)}var s,l=o.holder,c=r.holder,u=l.getBoundingClientRect(),f=c.getBoundingClientRect();s=f.top>0?Math.abs(u.top)-Math.abs(f.top):window.innerHeight-Math.abs(u.top)+Math.abs(f.top),window.scrollBy(0,-1*s),this.api.blocks.move(n-1),this.api.toolbar.toggleBlockSettings(!0)}}]),e}();o.default=l,l.displayName="MoveUpTune",l.isTune=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports='.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide,.codex-editor__redactor--hidden{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff "}@media (min-width:201px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:201px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width:201px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor__loader{position:relative;height:30vh}.codex-editor__loader:before{content:"";position:absolute;left:50%;top:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:2px solid rgba(201,201,204,.48);border-top-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:editor-loader-spin .8s linear infinite;animation:editor-loader-spin .8s linear infinite;will-change:transform}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:rgba(46,170,220,.2);border:1px solid transparent}.codex-editor svg{max-height:100%;fill:currentColor}::-moz-selection{background-color:#d4ecff}::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}@-webkit-keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(var(--window-scroll-offset)*-1);position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}@media (max-width:200px){.ce-toolbar--opened{display:-webkit-box;display:-ms-flexbox;display:flex}}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}@media (max-width:200px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:100%}}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (max-width:200px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover:hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus{-ms-flex-negative:0;flex-shrink:0;height:100%}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}.ce-toolbar__plus--hidden{visibility:hidden}@media (max-width:200px){.ce-toolbar__plus{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);border-radius:8px;z-index:2}}@media (max-width:200px) and (max-width:200px){.ce-toolbar__plus{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}@media (max-width:200px){.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;height:26px}@media (max-width:200px){.ce-toolbar__actions{position:absolute;right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.ce-toolbar__actions--opened{opacity:1}@media (max-width:200px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media (max-width:200px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover:hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__settings-btn{width:18px;height:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width:201px){.ce-toolbar__settings-btn{width:18px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width:200px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);border-radius:8px;z-index:2}}@media (max-width:200px) and (max-width:200px){.ce-toolbar__settings-btn{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}@media (max-width:200px){.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-toolbar__settings-btn{position:static}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:16px;height:16px}@media (min-width:201px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{--gap:8px}@media (max-width:200px){.ce-toolbox{position:static;-webkit-transform:none!important;transform:none!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow-x:auto}}@media (min-width:201px){.ce-toolbox{position:absolute;top:calc(26px + var(--gap));left:44px}.ce-toolbox--opened-top{top:calc(var(--gap)*-1 + var(--popover-height)*-1)}}.ce-toolbox__block-button{list-style:none;margin:0;padding:8px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer}.ce-toolbox__block-button:hover{background-color:#e9ecef}.ce-toolbox__block-button:active{background-color:#f1f3f5}.ce-toolbox__block-button-icon{width:20px;height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-toolbox__block-button-icon svg{fill:#868e96}.ce-toolbox__block-button-text{margin-left:4px;font-size:13px!important;line-height:18px;color:var(--gary8)}@media (min-width:201px){.codex-editor--narrow .ce-toolbox{left:auto;right:0}.codex-editor--narrow .ce-toolbox .ce-popover{right:0}}.ce-inline-toolbar{--y-offset:8px;position:absolute;background-color:#fff;border-radius:8px;z-index:2}@media (max-width:200px){.ce-inline-toolbar{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar{border-radius:4px!important;border:none;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);-webkit-transform:translateX(-50%) translateY(8px) scale(.9);transform:translateX(-50%) translateY(8px) scale(.9);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity;top:0;left:0;z-index:3}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.94);transform:translateX(-23px) translateY(8px) scale(.94)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translateX(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.94);transform:translateX(-100%) translateY(8px) scale(.94);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{width:100%}.ce-inline-toolbar__actions,.ce-inline-toolbar__buttons,.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__actions .unlink-button{background:inherit;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-tap-highlight-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;outline-style:none}.ce-inline-toolbar__actions .unlink-button:focus{outline:0}.ce-inline-toolbar__actions .unlink-button{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end;font-weight:400;font-size:11px!important;line-height:16px;color:#868e96;padding:8px 10px 8px 0;cursor:pointer;white-space:nowrap;min-width:60px}.ce-inline-toolbar__actions .unlink-button,.ce-inline-toolbar__actions input{border-top:1px solid #dee2e6}.ce-inline-toolbar__dropdown{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;padding:0 10px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid #dee2e6;border-radius:4px 0 0 4px}@media (hover:hover){.ce-inline-toolbar__dropdown:hover{background:#e9ecef}}.ce-inline-toolbar__dropdown:active{background:#f1f3f5}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content{display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:500;font-size:14px!important}.ce-inline-toolbar__dropdown-arrow,.ce-inline-toolbar__dropdown-content{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:4px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:32px;height:32px;line-height:32px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.ce-inline-tool svg{width:12px;height:12px}@media (max-width:200px){.ce-inline-tool svg{width:12px;height:12px}}@media (hover:hover){.ce-inline-tool:hover{background-color:#eff2f5}}.ce-inline-tool--active{color:#4593fc}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool{border-radius:0;line-height:normal;width:auto;padding:0 10px!important;min-width:24px}.ce-inline-tool .icon{height:12px}.ce-inline-tool:last-child{border-radius:0 4px 4px 0}.ce-inline-tool:hover{background:#e9ecef}.ce-inline-tool:active{background:#f1f3f5}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{outline:none;border:0;border-radius:0 0 4px 4px;margin:0;font-size:11px!important;line-height:16px;padding:8px 5px 8px 10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;color:#212529}.ce-inline-tool-input::-webkit-input-placeholder{color:#adb5bd}.ce-inline-tool-input::-moz-placeholder{color:#adb5bd}.ce-inline-tool-input:-ms-input-placeholder{color:#adb5bd}.ce-inline-tool-input::-ms-input-placeholder{color:#adb5bd}.ce-inline-tool-input::placeholder{color:#adb5bd}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border-radius:8px;z-index:2}@media (max-width:200px){.ce-conversion-toolbar{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar{opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;-webkit-transform:translateY(-8px);transform:translateY(-8px);left:-1px;width:160px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box;padding-bottom:8px;border-radius:4px;border:none;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-toolbar__label{color:#868e96;font-size:11px;line-height:16px;padding:12px 12px 4px}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:4px 14.5px 4px 12px;font-size:13px;line-height:18px;color:#343a40;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#e9ecef}.ce-conversion-tool:active{background:#f1f3f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:20px;height:20px;border:.5px solid #dee2e6;border-radius:2px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:4px;background:#fff}.ce-conversion-tool__icon svg{fill:#343a40}.ce-conversion-tool__check-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;opacity:0;width:12px;height:8px}.ce-conversion-tool--current .ce-conversion-tool__check-icon{opacity:1}.ce-conversion-tool--current .ce-conversion-tool__check-icon svg{fill:#343a40}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#4593fc!important;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{border:none;top:34px;left:51px;width:220px;-webkit-box-sizing:content-box;box-sizing:content-box}@media (max-width:200px){.ce-settings{bottom:40px;right:auto;top:auto}}.ce-settings{position:absolute;z-index:2;--gap:8px}@media (min-width:201px){.ce-settings{position:absolute;top:calc(26px + var(--gap));left:44px}.ce-settings--opened-top{top:calc(var(--gap)*-1 + var(--popover-height)*-1)}}.ce-settings__button{padding:8px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer}.ce-settings__button:hover{background-color:#e9ecef}.ce-settings__button:active{background-color:#f1f3f5}.ce-settings__button-icon-container{width:20px;height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-settings__button-icon-container svg{fill:#868e96}.ce-settings__button-text{font-size:13px!important;line-height:18px;color:#343a40;margin-left:4px;white-space:nowrap}.ce-settings__button-shortcut-text{font-size:11px!important;line-height:16px;color:#adb5bd;margin-left:auto}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#4593fc}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:none}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content .ce-stub,.ce-block--selected .ce-block__content img{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #4593fc;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#4593fc;background:repeating-linear-gradient(90deg,#4593fc,#4593fc 1px,#fff 0,#fff 6px)}.ce-block a{cursor:pointer;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width:201px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important;display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:32px;height:32px;line-height:32px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.cdx-settings-button svg{width:12px;height:12px}@media (max-width:200px){.cdx-settings-button svg{width:12px;height:12px}}@media (hover:hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-settings-button--active{color:#4593fc}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button:not(:nth-child(3n+3)){margin-right:3px}.cdx-settings-button:nth-child(n+4){margin-top:3px}.cdx-settings-button--active svg{fill:#4593fc}.cdx-settings-button svg{width:auto;height:auto}@media (max-width:200px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#4593fc;border-radius:50%;-webkit-animation:cdxRotation 1.2s linear infinite;animation:cdxRotation 1.2s linear infinite}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px 0 rgba(18,30,57,.04);color:#707684;text-align:center;cursor:pointer}@media (hover:hover){.cdx-button:hover{background:#fbfcfe;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px 0 rgba(18,30,57,.08)}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:3.5em 0;margin:17px 0;border-radius:3px;background:#fcf7f7;color:#b46262}.ce-stub__info{margin-left:20px}.ce-stub__title{margin-bottom:3px;font-weight:600;font-size:18px;text-transform:capitalize}.ce-stub__subtitle{font-size:16px}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width:200px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0 solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width:201px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width:201px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.ce-popover{opacity:0;will-change:opacity,transform;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:8px 0;min-width:220px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;pointer-events:none;position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);border-radius:8px;z-index:2}@media (max-width:200px){.ce-popover{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}.ce-popover--left-oriented:before{left:15px;margin-left:0}.ce-popover--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-popover{z-index:4;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ce-popover--opened{opacity:1;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease}@media (max-width:200px){.ce-popover--opened{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}@media (max-width:200px){.ce-popover{--offset:5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset)*2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__item{padding:8px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer}.ce-popover__item:hover{background-color:#e9ecef}.ce-popover__item:active{background-color:#f1f3f5}@media (hover:hover){.ce-popover__item:hover:not(.ce-popover__item--no-visible-hover){background-color:#eff2f5}.ce-popover__item:hover .ce-popover__item-icon{-webkit-box-shadow:none;box-shadow:none}}.ce-popover__item--disabled{color:#707684;cursor:default;pointer-events:none}.ce-popover__item--disabled .ce-popover__item-icon{-webkit-box-shadow:0 0 0 1px #eff0f1;box-shadow:0 0 0 1px #eff0f1}.ce-popover__item--focused:not(.ce-popover__item--no-visible-focus){-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-popover__item--hidden{display:none}.ce-popover__item--active{background:rgba(56,138,229,.1);color:#388ae5}.ce-popover__item--confirmation{background:#e24a4a}.ce-popover__item--confirmation .ce-popover__item-icon{color:#e24a4a}.ce-popover__item--confirmation .ce-popover__item-label{color:#fff}@media (hover:hover){.ce-popover__item--confirmation:not(.ce-popover__item--no-visible-hover):hover{background:#ce4343}}.ce-popover__item--confirmation:not(.ce-popover__item--no-visible-focus).ce-popover__item--focused{background:#ce4343!important}.ce-popover__item-icon{width:20px;height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover__item-icon svg{fill:#868e96}.ce-popover__item-label{margin-left:4px;font-size:13px!important;line-height:18px;color:var(--gary8);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-popover__item-label:after{content:"";width:25px;display:inline-block}.ce-popover__item-secondary-label{color:#707684;font-size:12px!important;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width:200px){.ce-popover__item-secondary-label{display:none}}.ce-popover__item--active .ce-popover__item-icon,.ce-popover__item--confirmation .ce-popover__item-icon,.ce-popover__item--focused .ce-popover__item-icon{-webkit-box-shadow:none;box-shadow:none}.ce-popover__no-found{display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;white-space:nowrap;padding:3px;font-size:14px!important;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:6px}.ce-popover__no-found:not(:last-of-type){margin-bottom:1px}@media (max-width:200px){.ce-popover__no-found{font-size:16px!important;padding:4px}}.ce-popover__no-found{color:#707684;display:none;cursor:default}.ce-popover__no-found--shown{display:block}@media (max-width:200px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1d202b;opacity:.5;z-index:3;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}.ce-popover .cdx-search-field{display:none}}.ce-popover__overlay--hidden{z-index:0;opacity:0;visibility:hidden}.ce-popover__custom-content:not(:empty){padding:4px}@media (min-width:201px){.ce-popover__custom-content:not(:empty){margin-top:5px;padding:0}}.ce-popover__custom-content--hidden{display:none}.cdx-search-field{--icon-margin-right:10px;background:rgba(232,232,235,.49);border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:12px;height:12px;color:#707684}.cdx-search-field__input{font-size:14px!important;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}'},function(e,t,n){"use strict";n.r(t),n.d(t,"nanoid",(function(){return s})),n.d(t,"customAlphabet",(function(){return a})),n.d(t,"customRandom",(function(){return i})),n.d(t,"urlAlphabet",(function(){return o})),n.d(t,"random",(function(){return r}));let o="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let r=e=>crypto.getRandomValues(new Uint8Array(e)),i=(e,t,n)=>{let o=(2<{let i="";for(;;){let a=n(r),s=r;for(;s--;)if(i+=e[a[s]&o]||"",i.length===t)return i}}},a=(e,t)=>i(e,t,r),s=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=63&n[e];t+=o<36?o.toString(36):o<62?(o-26).toString(36).toUpperCase():o<63?"_":"-"}return t}}])})); \ No newline at end of file +!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.EditorJS=t():e.EditorJS=t()}(window,(function(){return function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=186)}([function(e,t,n){var o=n(10),r=n(16),i=n(27),a=n(23),s=n(31),l=function(e,t,n){var c,u,f,d,p=e&l.F,h=e&l.G,v=e&l.S,y=e&l.P,g=e&l.B,b=h?o:v?o[t]||(o[t]={}):(o[t]||{}).prototype,m=h?r:r[t]||(r[t]={}),k=m.prototype||(m.prototype={});for(c in h&&(n=t),n)f=((u=!p&&b&&void 0!==b[c])?b:n)[c],d=g&&u?s(f,o):y&&"function"==typeof f?s(Function.call,f):f,b&&a(b,c,f,e&l.U),m[c]!=f&&i(m,c,d),y&&k[c]!=f&&(k[c]=f)};o.core=r,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,e.exports=l},function(e,t){e.exports=function(e){return e&&e.__esModule?e:{default:e}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:"log",o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"color: inherit";if("console"in window&&window.console[n]){var i=["info","log","warn","error"].includes(n),a=[];switch(c.logLevel){case s.ERROR:if("error"!==n)return;break;case s.WARN:if(!["error","warn"].includes(n))return;break;case s.INFO:if(!i||e)return}o&&a.push(o);var l="Editor.js ".concat("2.26.2"),u="line-height: 1em;\n color: #006FEA;\n display: inline-block;\n font-size: 11px;\n line-height: 1em;\n background-color: #fff;\n padding: 4px 9px;\n border-radius: 30px;\n border: 1px solid rgba(56, 138, 229, 0.16);\n margin: 4px 5px 4px 0;";e&&(i?(a.unshift(u,r),t="%c".concat(l,"%c ").concat(t)):t="( ".concat(l," )").concat(t));try{if(i)if(o){var f;(f=console)[n].apply(f,["".concat(t," %o")].concat(a))}else{var d;(d=console)[n].apply(d,[t].concat(a))}else console[n](t)}catch(e){}}}Object.defineProperty(e,"__esModule",{value:!0}),e.LogLevels=void 0,e.array=function(e){return Array.prototype.slice.call(e)},e.beautifyShortcut=function(e){var t=g();return e=e.replace(/shift/gi,"⇧").replace(/backspace/gi,"⌫").replace(/enter/gi,"⏎").replace(/up/gi,"↑").replace(/left/gi,"→").replace(/down/gi,"↓").replace(/right/gi,"←").replace(/escape/gi,"⎋").replace(/insert/gi,"Ins").replace(/delete/gi,"␡").replace(/\+/gi," + "),e=t.mac?e.replace(/ctrl|cmd/gi,"⌘").replace(/alt/gi,"⌥"):e.replace(/cmd/gi,"Ctrl").replace(/windows/gi,"WIN")},e.cacheable=function(e,t,n){var o=n.value?"value":"get",r=n[o],i="#".concat(t,"Cache");if(n[o]=function(){if(void 0===this[i]){for(var e=arguments.length,t=new Array(e),n=0;n1?n-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(e).concat(Math.floor(1e8*Math.random()).toString(16))},e.getFileExtension=function(e){return e.name.split(".").pop()},e.getUserOS=g,e.getValidUrl=function(e){try{return new URL(e).href}catch(e){}return"//"===e.substring(0,2)?window.location.protocol+e:window.location.origin+e},e.isBoolean=function(e){return"boolean"===d(e)},e.isClass=function(e){return p(e)&&/^\s*class\s+/.test(e.toString())},e.isEmpty=function(e){return!e||0===Object.keys(e).length&&e.constructor===Object},e.isFunction=p,e.isIosDevice=void 0,e.isMobileScreen=function(){return window.matchMedia("(max-width: ".concat(200,"px)")).matches},e.isNumber=function(e){return"number"===d(e)},e.isObject=h,e.isPrintableKey=function(e){return e>47&&e<58||32===e||13===e||229===e||e>64&&e<91||e>95&&e<112||e>185&&e<193||e>218&&e<223},e.isPromise=function(e){return Promise.resolve(e)===e},e.isString=function(e){return"string"===d(e)},e.isTouchSupported=void 0,e.isUndefined=v,e.isValidMimeType=function(e){return/^[-\w]+\/([-+\w]+|\*)$/.test(e)},e.mouseButtons=e.mobileScreenBreakpoint=e.logLabeled=e.log=e.keyCodes=void 0,e.openTab=function(e){window.open(e,"_blank")},e.sequence=function(e){return y.apply(this,arguments)},e.setLogLevel=function(e){c.logLevel=e},e.throttle=function(e,t){var n,o,r,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,a=null,s=0;i||(i={});var l=function(){s=!1===i.leading?0:Date.now(),a=null,r=e.apply(n,o),a||(n=o=null)};return function(){var c=Date.now();s||!1!==i.leading||(s=c);var u=t-(c-s);return n=this,o=arguments,u<=0||u>t?(a&&(clearTimeout(a),a=null),s=c,r=e.apply(n,o),a||(n=o=null)):a||!1===i.trailing||(a=setTimeout(l,u)),r}},e.typeOf=d,t=l(t),o=l(o),r=l(r),a=l(a),e.LogLevels=s,function(e){e.VERBOSE="VERBOSE",e.INFO="INFO",e.WARN="WARN",e.ERROR="ERROR"}(s||(e.LogLevels=s={})),e.keyCodes={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,LEFT:37,UP:38,DOWN:40,RIGHT:39,DELETE:46,META:91},e.mouseButtons={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4},c.logLevel=s.VERBOSE;var u=c.bind(window,!1);e.log=u;var f=c.bind(window,!0);function d(e){return Object.prototype.toString.call(e).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}function p(e){return"function"===d(e)||"asyncfunction"===d(e)}function h(e){return"object"===d(e)}function v(e){return"undefined"===d(e)}function y(){return(y=(0,r.default)(t.default.mark((function e(n){var o,i,a,s,l=arguments;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return s=function(){return(s=(0,r.default)(t.default.mark((function e(n,o,r){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.function(n.data);case 3:return e.next=5,o(v(n.data)?{}:n.data);case 5:e.next=10;break;case 7:e.prev=7,e.t0=e.catch(0),r(v(n.data)?{}:n.data);case 10:case"end":return e.stop()}}),e,null,[[0,7]])})))).apply(this,arguments)},a=function(e,t,n){return s.apply(this,arguments)},o=l.length>1&&void 0!==l[1]?l[1]:function(){},i=l.length>2&&void 0!==l[2]?l[2]:function(){},e.abrupt("return",n.reduce(function(){var e=(0,r.default)(t.default.mark((function e(n,r){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,n;case 2:return e.abrupt("return",a(r,o,i));case 3:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}(),Promise.resolve()));case 5:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function g(){var e={win:!1,mac:!1,x11:!1,linux:!1},t=Object.keys(e).find((function(e){return-1!==window.navigator.appVersion.toLowerCase().indexOf(e)}));return t?(e[t]=!0,e):e}e.logLabeled=f;var b="ontouchstart"in document.documentElement;e.isTouchSupported=b,e.mobileScreenBreakpoint=200;var m="undefined"!=typeof window&&window.navigator&&window.navigator.platform&&(/iP(ad|hone|od)/.test(window.navigator.platform)||"MacIntel"===window.navigator.platform&&window.navigator.maxTouchPoints>1);e.isIosDevice=m})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(152)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);function l(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n3&&void 0!==arguments[3]&&arguments[3];n.mutableListenerIds.push(n.listeners.on(e,t,o,r))},clearAll:function(){var e,t=l(n.mutableListenerIds);try{for(t.s();!(e=t.n()).done;){var o=e.value;n.listeners.offById(o)}}catch(e){t.e(e)}finally{t.f()}n.mutableListenerIds=[]}},this.mutableListenerIds=[],(this instanceof e?this.constructor:void 0)===e)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=o,this.eventsDispatcher=i}return(0,i.default)(e,[{key:"state",set:function(e){this.Editor=e}},{key:"removeAllNodes",value:function(){for(var e in this.nodes){var t=this.nodes[e];t instanceof HTMLElement&&t.remove()}}},{key:"isRtl",get:function(){return"rtl"===this.config.i18n.direction}}]),e}();o.default=u,u.displayName="Module",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var o=n(13);e.exports=function(e){if(!o(e))throw TypeError(e+" is not an object!");return e}},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t,n){var o=n(69)("wks"),r=n(44),i=n(10).Symbol,a="function"==typeof i;(e.exports=function(e){return o[e]||(o[e]=a&&i[e]||(a?i:r)("Symbol."+e))}).store=o},function(e,t,n){var o=n(33),r=Math.min;e.exports=function(e){return e>0?r(o(e),9007199254740991):0}},function(e,t){var n=e.exports={version:"2.6.12"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(11)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(12),r=n(115),i=n(41),a=Object.defineProperty;t.f=n(17)?Object.defineProperty:function(e,t,n){if(o(e),t=i(t,!0),o(n),r)try{return a(e,t,n)}catch(e){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(e[t]=n.value),e}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(40),n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f=function(){function e(){(0,i.default)(this,e)}return(0,s.default)(e,null,[{key:"isSingleTag",value:function(e){return e.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(e.tagName)}},{key:"isLineBreakTag",value:function(e){return e&&e.tagName&&["BR","WBR"].includes(e.tagName)}},{key:"make",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(e);for(var a in Array.isArray(n)?(t=i.classList).add.apply(t,(0,r.default)(n)):n&&i.classList.add(n),o)Object.prototype.hasOwnProperty.call(o,a)&&(i[a]=o[a]);return i}},{key:"text",value:function(e){return document.createTextNode(e)}},{key:"append",value:function(e,t){Array.isArray(t)?t.forEach((function(t){return e.appendChild(t)})):e.appendChild(t)}},{key:"prepend",value:function(e,t){Array.isArray(t)?(t=t.reverse()).forEach((function(t){return e.prepend(t)})):e.prepend(t)}},{key:"swap",value:function(e,t){var n=document.createElement("div"),o=e.parentNode;o.insertBefore(n,e),o.insertBefore(e,t),o.insertBefore(t,n),o.removeChild(n)}},{key:"find",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;return e.querySelector(t)}},{key:"get",value:function(e){return document.getElementById(e)}},{key:"findAll",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,t=arguments.length>1?arguments[1]:void 0;return e.querySelectorAll(t)}},{key:"allInputsSelector",get:function(){return"[contenteditable=true], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map((function(e){return'input[type="'.concat(e,'"]')})).join(", ")}},{key:"findAllInputs",value:function(t){return l.array(t.querySelectorAll(e.allInputsSelector)).reduce((function(t,n){return e.isNativeInput(n)||e.containsOnlyInlineElements(n)?[].concat((0,r.default)(t),[n]):[].concat((0,r.default)(t),(0,r.default)(e.getDeepestBlockElements(n)))}),[])}},{key:"getDeepestNode",value:function(t){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?"lastChild":"firstChild",r=n?"previousSibling":"nextSibling";if(t&&t.nodeType===Node.ELEMENT_NODE&&t[o]){var i=t[o];if(e.isSingleTag(i)&&!e.isNativeInput(i)&&!e.isLineBreakTag(i))if(i[r])i=i[r];else{if(!i.parentNode[r])return i.parentNode;i=i.parentNode[r]}return this.getDeepestNode(i,n)}return t}},{key:"isElement",value:function(e){return!l.isNumber(e)&&e&&e.nodeType&&e.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(e){return!l.isNumber(e)&&e&&e.nodeType&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(e){return"true"===e.contentEditable}},{key:"isNativeInput",value:function(e){return!(!e||!e.tagName)&&["INPUT","TEXTAREA"].includes(e.tagName)}},{key:"canSetCaret",value:function(t){var n=!0;if(e.isNativeInput(t))switch(t.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}else n=e.isContentEditable(t);return n}},{key:"isNodeEmpty",value:function(e){return!(this.isSingleTag(e)&&!this.isLineBreakTag(e))&&0===(this.isElement(e)&&this.isNativeInput(e)?e.value:e.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(e){return!!e&&0===e.childNodes.length}},{key:"isEmpty",value:function(e){e.normalize();for(var t=[e];t.length>0;)if(e=t.shift()){if(this.isLeaf(e)&&!this.isNodeEmpty(e))return!1;e.childNodes&&t.push.apply(t,(0,r.default)(Array.from(e.childNodes)))}return!0}},{key:"isHTMLString",value:function(t){var n=e.make("div");return n.innerHTML=t,n.childElementCount>0}},{key:"getContentLength",value:function(t){return e.isNativeInput(t)?t.value.length:t.nodeType===Node.TEXT_NODE?t.length:t.textContent.length}},{key:"blockElements",get:function(){return["address","article","aside","blockquote","canvas","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","ruby","section","table","tbody","thead","tr","tfoot","ul","video"]}},{key:"containsOnlyInlineElements",value:function(t){var n;return l.isString(t)?(n=document.createElement("div")).innerHTML=t:n=t,Array.from(n.children).every((function t(n){return!e.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(t)}))}},{key:"getDeepestBlockElements",value:function(t){return e.containsOnlyInlineElements(t)?[t]:Array.from(t.children).reduce((function(t,n){return[].concat((0,r.default)(t),(0,r.default)(e.getDeepestBlockElements(n)))}),[])}},{key:"getHolder",value:function(e){return l.isString(e)?document.getElementById(e):e}},{key:"isExtensionNode",value:function(e){return e&&["GRAMMARLY-EXTENSION"].includes(e.nodeName)}},{key:"isAnchor",value:function(e){return"a"===e.tagName.toLowerCase()}},{key:"offset",value:function(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,o=window.pageYOffset||document.documentElement.scrollTop,r=t.top+o,i=t.left+n;return{top:r,left:i,bottom:r+t.height,right:i+t.width}}}]),e}();o.default=f,f.displayName="Dom",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(367)();e.exports=o;try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t){function n(e,t,n,o,r,i,a){try{var s=e[i](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(o,r)}e.exports=function(e){return function(){var t=this,o=arguments;return new Promise((function(r,i){var a=e.apply(t,o);function s(e){n(a,r,i,s,l,"next",e)}function l(e){n(a,r,i,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(38);e.exports=function(e){return Object(o(e))}},function(e,t,n){var o=n(10),r=n(27),i=n(26),a=n(44)("src"),s=n(191),l=(""+s).split("toString");n(16).inspectSource=function(e){return s.call(e)},(e.exports=function(e,t,n,s){var c="function"==typeof n;c&&(i(n,"name")||r(n,"name",t)),e[t]!==n&&(c&&(i(n,a)||r(n,a,e[t]?""+e[t]:l.join(String(t)))),e===o?e[t]=n:s?e[t]?e[t]=n:r(e,t,n):(delete e[t],r(e,t,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(e,t,n){var o=n(0),r=n(11),i=n(38),a=/"/g,s=function(e,t,n,o){var r=String(i(e)),s="<"+t;return""!==n&&(s+=" "+n+'="'+String(o).replace(a,""")+'"'),s+">"+r+""};e.exports=function(e,t){var n={};n[e]=t(s),o(o.P+o.F*r((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3})),"String",n)}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8),n(19)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s),l=c(l);var f=function(){function e(){(0,r.default)(this,e),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,i.default)(e,[{key:"removeFakeBackground",value:function(){this.isFakeBackgroundEnabled&&(this.isFakeBackgroundEnabled=!1,document.execCommand(this.commandRemoveFormat))}},{key:"setFakeBackground",value:function(){document.execCommand(this.commandBackground,!1,"#a8d6ff"),this.isFakeBackgroundEnabled=!0}},{key:"save",value:function(){this.savedSelectionRange=e.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var e=window.getSelection();e.removeAllRanges(),e.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"collapseToEnd",value:function(){var e=window.getSelection(),t=document.createRange();t.selectNodeContents(e.focusNode),t.collapse(!1),e.removeAllRanges(),e.addRange(t)}},{key:"findParentTag",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),r=null;if(!o||!o.anchorNode||!o.focusNode)return null;var i=[o.anchorNode,o.focusNode];return i.forEach((function(o){for(var i=n;i>0&&o.parentNode&&(o.tagName!==e||(r=o,t&&o.classList&&!o.classList.contains(t)&&(r=null),!r));)o=o.parentNode,i--})),r}},{key:"expandToTag",value:function(e){var t=window.getSelection();t.removeAllRanges();var n=document.createRange();n.selectNodeContents(e),t.addRange(n)}}],[{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var e=window.getSelection();return e?e.anchorNode:null}},{key:"anchorElement",get:function(){var e=window.getSelection();if(!e)return null;var t=e.anchorNode;return t?l.default.isElement(t)?t:t.parentElement:null}},{key:"anchorOffset",get:function(){var e=window.getSelection();return e?e.anchorOffset:null}},{key:"isCollapsed",get:function(){var e=window.getSelection();return e?e.isCollapsed:null}},{key:"isAtEditor",get:function(){return this.isSelectionAtEditor(e.get())}},{key:"isSelectionAtEditor",value:function(t){if(!t)return!1;var n=t.anchorNode||t.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&n instanceof Element&&(o=n.closest(".".concat(e.CSS.editorZone))),!!o&&o.nodeType===Node.ELEMENT_NODE}},{key:"isRangeAtEditor",value:function(t){if(t){var n=t.startContainer;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&n instanceof Element&&(o=n.closest(".".concat(e.CSS.editorZone))),!!o&&o.nodeType===Node.ELEMENT_NODE}}},{key:"isSelectionExists",get:function(){return!!e.get().anchorNode}},{key:"range",get:function(){return this.getRangeFromSelection(this.get())}},{key:"getRangeFromSelection",value:function(e){return e&&e.rangeCount?e.getRangeAt(0):null}},{key:"rect",get:function(){var e,t=document.selection,n={x:0,y:0,width:0,height:0};if(t&&"Control"!==t.type)return e=(t=t).createRange(),n.x=e.boundingLeft,n.y=e.boundingTop,n.width=e.boundingWidth,n.height=e.boundingHeight,n;if(!window.getSelection)return s.log("Method window.getSelection is not supported","warn"),n;if(null===(t=window.getSelection()).rangeCount||isNaN(t.rangeCount))return s.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if(0===t.rangeCount)return n;if((e=t.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=e.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement("span");if(o.getBoundingClientRect){o.appendChild(document.createTextNode("​")),e.insertNode(o),n=o.getBoundingClientRect();var r=o.parentNode;r.removeChild(o),r.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}},{key:"get",value:function(){return window.getSelection()}},{key:"setCursor",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),o=window.getSelection();if(l.default.isNativeInput(e)){if(!l.default.canSetCaret(e))return;return e.focus(),e.selectionStart=e.selectionEnd=t,e.getBoundingClientRect()}return n.setStart(e,t),n.setEnd(e,t),o.removeAllRanges(),o.addRange(n),n.getBoundingClientRect()}},{key:"addFakeCursor",value:function(t){var n=e.range,o=l.default.make("span","codex-editor__fake-cursor");o.dataset.mutationFree="true",!n||t&&!t.contains(n.startContainer)||(n.collapse(),n.insertNode(o))}},{key:"removeFakeCursor",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document.body,t=l.default.find(e,".codex-editor__fake-cursor");t&&t.remove()}}]),e}();o.default=f,f.displayName="SelectionUtils",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){var n={}.hasOwnProperty;e.exports=function(e,t){return n.call(e,t)}},function(e,t,n){var o=n(18),r=n(43);e.exports=n(17)?function(e,t,n){return o.f(e,t,r(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){var o=n(61),r=n(38);e.exports=function(e){return o(r(e))}},function(e,t,n){"use strict";var o=n(11);e.exports=function(e,t){return!!e&&o((function(){t?e.call(null,(function(){}),1):e.call(null)}))}},function(e,t,n){var o=n(361),r=n(362),i=n(146),a=n(363);e.exports=function(e,t){return o(e)||r(e,t)||i(e,t)||a()},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(32);e.exports=function(e,t,n){if(o(e),void 0===t)return e;switch(n){case 1:return function(n){return e.call(t,n)};case 2:return function(n,o){return e.call(t,n,o)};case 3:return function(n,o,r){return e.call(t,n,o,r)}}return function(){return e.apply(t,arguments)}}},function(e,t){e.exports=function(e){if("function"!=typeof e)throw TypeError(e+" is not a function!");return e}},function(e,t){var n=Math.ceil,o=Math.floor;e.exports=function(e){return isNaN(e=+e)?0:(e>0?o:n)(e)}},function(e,t,n){var o=n(62),r=n(43),i=n(28),a=n(41),s=n(26),l=n(115),c=Object.getOwnPropertyDescriptor;t.f=n(17)?c:function(e,t){if(e=i(e),t=a(t,!0),l)try{return c(e,t)}catch(e){}if(s(e,t))return r(!o.f.call(e,t),e[t])}},function(e,t,n){var o=n(0),r=n(16),i=n(11);e.exports=function(e,t){var n=(r.Object||{})[e]||Object[e],a={};a[e]=t(n),o(o.S+o.F*i((function(){n(1)})),"Object",a)}},function(e,t,n){var o=n(31),r=n(61),i=n(22),a=n(15),s=n(131);e.exports=function(e,t){var n=1==e,l=2==e,c=3==e,u=4==e,f=6==e,d=5==e||f,p=t||s;return function(t,s,h){for(var v,y,g=i(t),b=r(g),m=o(s,h,3),k=a(b.length),x=0,w=n?p(t,k):l?p(t,0):void 0;k>x;x++)if((d||x in b)&&(y=m(v=b[x],x,g),e))if(n)w[x]=y;else if(y)switch(e){case 3:return!0;case 5:return v;case 6:return x;case 2:w.push(v)}else if(u)return!1;return f?-1:c||u?u:w}}},function(e,t){var n={}.toString;e.exports=function(e){return n.call(e).slice(8,-1)}},function(e,t){e.exports=function(e){if(null==e)throw TypeError("Can't call method on "+e);return e}},function(e,t,n){"use strict";if(n(17)){var o=n(45),r=n(10),i=n(11),a=n(0),s=n(80),l=n(109),c=n(31),u=n(58),f=n(43),d=n(27),p=n(59),h=n(33),v=n(15),y=n(142),g=n(47),b=n(41),m=n(26),k=n(63),x=n(13),w=n(22),S=n(101),C=n(48),T=n(50),E=n(49).f,_=n(103),B=n(44),O=n(14),M=n(36),I=n(70),P=n(64),L=n(105),R=n(56),A=n(73),j=n(57),N=n(104),D=n(133),F=n(18),H=n(34),W=F.f,U=H.f,z=r.RangeError,V=r.TypeError,Y=r.Uint8Array,X=Array.prototype,Z=l.ArrayBuffer,G=l.DataView,K=M(0),q=M(2),J=M(3),$=M(4),Q=M(5),ee=M(6),te=I(!0),ne=I(!1),oe=L.values,re=L.keys,ie=L.entries,ae=X.lastIndexOf,se=X.reduce,le=X.reduceRight,ce=X.join,ue=X.sort,fe=X.slice,de=X.toString,pe=X.toLocaleString,he=O("iterator"),ve=O("toStringTag"),ye=B("typed_constructor"),ge=B("def_constructor"),be=s.CONSTR,me=s.TYPED,ke=s.VIEW,xe=M(1,(function(e,t){return Ee(P(e,e[ge]),t)})),we=i((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),Se=!!Y&&!!Y.prototype.set&&i((function(){new Y(1).set({})})),Ce=function(e,t){var n=h(e);if(n<0||n%t)throw z("Wrong offset!");return n},Te=function(e){if(x(e)&&me in e)return e;throw V(e+" is not a typed array!")},Ee=function(e,t){if(!x(e)||!(ye in e))throw V("It is not a typed array constructor!");return new e(t)},_e=function(e,t){return Be(P(e,e[ge]),t)},Be=function(e,t){for(var n=0,o=t.length,r=Ee(e,o);o>n;)r[n]=t[n++];return r},Oe=function(e,t,n){W(e,t,{get:function(){return this._d[n]}})},Me=function(e){var t,n,o,r,i,a,s=w(e),l=arguments.length,u=l>1?arguments[1]:void 0,f=void 0!==u,d=_(s);if(null!=d&&!S(d)){for(a=d.call(s),o=[],t=0;!(i=a.next()).done;t++)o.push(i.value);s=o}for(f&&l>2&&(u=c(u,arguments[2],2)),t=0,n=v(s.length),r=Ee(this,n);n>t;t++)r[t]=f?u(s[t],t):s[t];return r},Ie=function(){for(var e=0,t=arguments.length,n=Ee(this,t);t>e;)n[e]=arguments[e++];return n},Pe=!!Y&&i((function(){pe.call(new Y(1))})),Le=function(){return pe.apply(Pe?fe.call(Te(this)):Te(this),arguments)},Re={copyWithin:function(e,t){return D.call(Te(this),e,t,arguments.length>2?arguments[2]:void 0)},every:function(e){return $(Te(this),e,arguments.length>1?arguments[1]:void 0)},fill:function(e){return N.apply(Te(this),arguments)},filter:function(e){return _e(this,q(Te(this),e,arguments.length>1?arguments[1]:void 0))},find:function(e){return Q(Te(this),e,arguments.length>1?arguments[1]:void 0)},findIndex:function(e){return ee(Te(this),e,arguments.length>1?arguments[1]:void 0)},forEach:function(e){K(Te(this),e,arguments.length>1?arguments[1]:void 0)},indexOf:function(e){return ne(Te(this),e,arguments.length>1?arguments[1]:void 0)},includes:function(e){return te(Te(this),e,arguments.length>1?arguments[1]:void 0)},join:function(e){return ce.apply(Te(this),arguments)},lastIndexOf:function(e){return ae.apply(Te(this),arguments)},map:function(e){return xe(Te(this),e,arguments.length>1?arguments[1]:void 0)},reduce:function(e){return se.apply(Te(this),arguments)},reduceRight:function(e){return le.apply(Te(this),arguments)},reverse:function(){for(var e,t=Te(this).length,n=Math.floor(t/2),o=0;o1?arguments[1]:void 0)},sort:function(e){return ue.call(Te(this),e)},subarray:function(e,t){var n=Te(this),o=n.length,r=g(e,o);return new(P(n,n[ge]))(n.buffer,n.byteOffset+r*n.BYTES_PER_ELEMENT,v((void 0===t?o:g(t,o))-r))}},Ae=function(e,t){return _e(this,fe.call(Te(this),e,t))},je=function(e){Te(this);var t=Ce(arguments[1],1),n=this.length,o=w(e),r=v(o.length),i=0;if(r+t>n)throw z("Wrong length!");for(;i255?255:255&o),r.v[p](n*t+r.o,o,we)}(this,n,e)},enumerable:!0})};m?(h=n((function(e,n,o,r){u(e,h,c,"_d");var i,a,s,l,f=0,p=0;if(x(n)){if(!(n instanceof Z||"ArrayBuffer"==(l=k(n))||"SharedArrayBuffer"==l))return me in n?Be(h,n):Me.call(h,n);i=n,p=Ce(o,t);var g=n.byteLength;if(void 0===r){if(g%t)throw z("Wrong length!");if((a=g-p)<0)throw z("Wrong length!")}else if((a=v(r)*t)+p>g)throw z("Wrong length!");s=a/t}else s=y(n),i=new Z(a=s*t);for(d(e,"_d",{b:i,o:p,l:a,e:s,v:new G(i)});fdocument.F=Object<\/script>"),e.close(),l=e.F;o--;)delete l.prototype[i[o]];return l()};e.exports=Object.create||function(e,t){var n;return null!==e?(s.prototype=o(e),n=new s,s.prototype=null,n[a]=e):n=l(),void 0===t?n:r(n,t)}},function(e,t,n){var o=n(117),r=n(88).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return o(e,r)}},function(e,t,n){var o=n(26),r=n(22),i=n(87)("IE_PROTO"),a=Object.prototype;e.exports=Object.getPrototypeOf||function(e){return e=r(e),o(e,i)?e[i]:"function"==typeof e.constructor&&e instanceof e.constructor?e.constructor.prototype:e instanceof Object?a:null}},function(e,t,n){var o=n(14)("unscopables"),r=Array.prototype;null==r[o]&&n(27)(r,o,{}),e.exports=function(e){r[o][e]=!0}},function(e,t,n){var o=n(13);e.exports=function(e,t){if(!o(e)||e._t!==t)throw TypeError("Incompatible receiver, "+t+" required!");return e}},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(148)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,null,[{key:"ui",value:function(t,n){return e._t(t,n)}},{key:"t",value:function(t,n){return e._t(t,n)}},{key:"setDictionary",value:function(t){e.currentDictionary=t}},{key:"_t",value:function(t,n){var o=e.getNamespace(t);return o&&o[n]?o[n]:n}},{key:"getNamespace",value:function(t){return t.split(".").reduce((function(e,t){return e&&Object.keys(e).length?e[t]:{}}),e.currentDictionary)}}]),e}();o.default=l,l.displayName="I18n",l.currentDictionary=a.default,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(18).f,r=n(26),i=n(14)("toStringTag");e.exports=function(e,t,n){e&&!r(e=n?e:e.prototype,i)&&o(e,i,{configurable:!0,value:t})}},function(e,t,n){var o=n(0),r=n(38),i=n(11),a=n(91),s="["+a+"]",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),u=function(e,t,n){var r={},s=i((function(){return!!a[e]()||"​…"!="​…"[e]()})),l=r[e]=s?t(f):a[e];n&&(r[n]=l),o(o.P+o.F*s,"String",r)},f=u.trim=function(e,t){return e=String(r(e)),1&t&&(e=e.replace(l,"")),2&t&&(e=e.replace(c,"")),e};e.exports=u},function(e,t){e.exports={}},function(e,t,n){"use strict";var o=n(10),r=n(18),i=n(17),a=n(14)("species");e.exports=function(e){var t=o[e];i&&t&&!t[a]&&r.f(t,a,{configurable:!0,get:function(){return this}})}},function(e,t){e.exports=function(e,t,n,o){if(!(e instanceof t)||void 0!==o&&o in e)throw TypeError(n+": incorrect invocation!");return e}},function(e,t,n){var o=n(23);e.exports=function(e,t,n){for(var r in t)o(e,r,t[r],n);return e}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(40),n(2),n(3),n(150),n(112),n(5),n(6),n(4),n(19),n(8),n(111),n(25),n(81)],void 0===(i="function"==typeof(o=function(e,t,o,r,i,s,l,c,u,f,d,p,h,v,y,g,b){"use strict";var m,k=n(1);function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.BlockToolAPI=void 0,t=k(t),o=k(o),r=k(r),i=k(i),s=k(s),l=k(l),c=k(c),u=k(u),f=k(f),d=k(d),p=k(p),h=k(h),v=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(v),y=k(y),g=k(g),b=k(b),e.BlockToolAPI=m,function(e){e.APPEND_CALLBACK="appendCallback",e.RENDERED="rendered",e.MOVED="moved",e.UPDATED="updated",e.REMOVED="removed",e.ON_PASTE="onPaste"}(m||(e.BlockToolAPI=m={}));var S=function(e){(0,f.default)(x,e);var n,a,d,b,k=w(x);function x(e){var t,n=e.id,o=void 0===n?v.generateBlockId():n,r=e.data,a=e.tool,l=e.api,u=e.readOnly,f=e.tunesData;return(0,s.default)(this,x),(t=k.call(this)).cachedInputs=[],t.tunesInstances=new Map,t.defaultTunesInstances=new Map,t.unavailableTunesData={},t.inputIndex=0,t.modificationDebounceTimer=450,t.didMutated=v.debounce((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=e instanceof InputEvent||!e.some((function(e){var t=e.addedNodes,n=void 0===t?[]:t,o=e.removedNodes;return[].concat((0,i.default)(Array.from(n)),(0,i.default)(Array.from(o))).some((function(e){return h.default.isElement(e)&&"true"===e.dataset.mutationFree}))}));n&&(t.cachedInputs=[],t.updateCurrentInput(),t.call(m.UPDATED),t.emit("didMutated",(0,c.default)(t)))}),t.modificationDebounceTimer),t.handleFocus=function(){t.cachedInputs=[],t.updateCurrentInput()},t.name=a.name,t.id=o,t.settings=a.settings,t.config=a.settings.config||{},t.api=l,t.blockAPI=new y.default((0,c.default)(t)),t.mutationObserver=new MutationObserver(t.didMutated),t.tool=a,t.toolInstance=a.create(r,t.blockAPI,u),t.tunes=a.tunes,t.composeTunes(f),t.holder=t.compose(),t}return(0,l.default)(x,[{key:"inputs",get:function(){if(0!==this.cachedInputs.length)return this.cachedInputs;var e=h.default.findAllInputs(this.holder);return this.inputIndex>e.length-1&&(this.inputIndex=e.length-1),this.cachedInputs=e,e}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(e){var t=this.inputs.findIndex((function(t){return t===e||t.contains(e)}));-1!==t&&(this.inputIndex=t)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var e=this.inputs;return e[e.length-1]}},{key:"nextInput",get:function(){return this.inputs[this.inputIndex+1]}},{key:"previousInput",get:function(){return this.inputs[this.inputIndex-1]}},{key:"data",get:function(){return this.save().then((function(e){return e&&!v.isEmpty(e.data)?e.data:{}}))}},{key:"sanitize",get:function(){return this.tool.sanitizeConfig}},{key:"mergeable",get:function(){return v.isFunction(this.toolInstance.merge)}},{key:"isEmpty",get:function(){var e=h.default.isEmpty(this.pluginsContent),t=!this.hasMedia;return e&&t}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",get:function(){return this.holder.classList.contains(x.CSS.focused)},set:function(e){this.holder.classList.toggle(x.CSS.focused,e)}},{key:"selected",get:function(){return this.holder.classList.contains(x.CSS.selected)},set:function(e){e?(this.holder.classList.add(x.CSS.selected),g.default.addFakeCursor(this.holder)):(this.holder.classList.remove(x.CSS.selected),g.default.removeFakeCursor(this.holder))}},{key:"stretched",get:function(){return this.holder.classList.contains(x.CSS.wrapperStretched)},set:function(e){this.holder.classList.toggle(x.CSS.wrapperStretched,e)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(x.CSS.dropTarget,e)}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(x.CSS.content));if(e&&e.childNodes.length)for(var t=e.childNodes.length-1;t>=0;t--){var n=e.childNodes[t];if(!h.default.isExtensionNode(n))return n}return null}},{key:"call",value:function(e,t){if(v.isFunction(this.toolInstance[e])){e===m.APPEND_CALLBACK&&v.log("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.toolInstance[e].call(this.toolInstance,t)}catch(t){v.log("Error during '".concat(e,"' call: ").concat(t.message),"error")}}}},{key:"mergeWith",value:(b=(0,r.default)(t.default.mark((function e(n){return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.toolInstance.merge(n);case 2:case"end":return e.stop()}}),e,this)}))),function(e){return b.apply(this,arguments)})},{key:"save",value:(d=(0,r.default)(t.default.mark((function e(){var n,r,a,s,l=this;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.toolInstance.save(this.pluginsContent);case 2:return n=e.sent,r=this.unavailableTunesData,[].concat((0,i.default)(this.tunesInstances.entries()),(0,i.default)(this.defaultTunesInstances.entries())).forEach((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];if(v.isFunction(i.save))try{r[n]=i.save()}catch(e){v.log("Tune ".concat(i.constructor.name," save method throws an Error %o"),"warn",e)}})),a=window.performance.now(),e.abrupt("return",Promise.resolve(n).then((function(e){return s=window.performance.now(),{id:l.id,tool:l.name,data:e,tunes:r,time:s-a}})).catch((function(e){v.log("Saving process for ".concat(l.name," tool failed due to the ").concat(e),"log","red")})));case 7:case"end":return e.stop()}}),e,this)}))),function(){return d.apply(this,arguments)})},{key:"validate",value:(a=(0,r.default)(t.default.mark((function e(n){var o;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=!0,!(this.toolInstance.validate instanceof Function)){e.next=5;break}return e.next=4,this.toolInstance.validate(n);case 4:o=e.sent;case 5:return e.abrupt("return",o);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"getTunes",value:function(){var e=document.createElement("div"),t=[];return["function"==typeof this.toolInstance.renderSettings?this.toolInstance.renderSettings():[],[].concat((0,i.default)(this.tunesInstances.values()),(0,i.default)(this.defaultTunesInstances.values())).map((function(e){return e.render()}))].flat().forEach((function(n){h.default.isElement(n)?e.appendChild(n):Array.isArray(n)?t.push.apply(t,(0,i.default)(n)):t.push(n)})),[t,e]}},{key:"updateCurrentInput",value:function(){this.currentInput=h.default.isNativeInput(document.activeElement)||!g.default.anchorNode?document.activeElement:g.default.anchorNode}},{key:"willSelect",value:function(){this.mutationObserver.observe(this.holder.firstElementChild,{childList:!0,subtree:!0,characterData:!0,attributes:!0}),this.addInputEvents()}},{key:"willUnselect",value:function(){this.mutationObserver.disconnect(),this.removeInputEvents()}},{key:"dispatchChange",value:function(){this.didMutated()}},{key:"destroy",value:function(){(0,u.default)((0,p.default)(x.prototype),"destroy",this).call(this),v.isFunction(this.toolInstance.destroy)&&this.toolInstance.destroy()}},{key:"getActiveToolboxEntry",value:(n=(0,r.default)(t.default.mark((function e(){var n,r,i;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(1!==(n=this.tool.toolbox).length){e.next=3;break}return e.abrupt("return",Promise.resolve(this.tool.toolbox[0]));case 3:return e.next=5,this.data;case 5:return r=e.sent,i=n,e.abrupt("return",i.find((function(e){return Object.entries(e.data).some((function(e){var t=(0,o.default)(e,2),n=t[0],i=t[1];return r[n]&&v.equals(r[n],i)}))})));case 8:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"compose",value:function(){var e=h.default.make("div",x.CSS.wrapper),t=h.default.make("div",x.CSS.content),n=this.toolInstance.render();t.appendChild(n);var o=t;return[].concat((0,i.default)(this.tunesInstances.values()),(0,i.default)(this.defaultTunesInstances.values())).forEach((function(e){if(v.isFunction(e.wrap))try{o=e.wrap(o)}catch(t){v.log("Tune ".concat(e.constructor.name," wrap method throws an Error %o"),"warn",t)}})),e.appendChild(o),e}},{key:"composeTunes",value:function(e){var t=this;Array.from(this.tunes.values()).forEach((function(n){(n.isInternal?t.defaultTunesInstances:t.tunesInstances).set(n.name,n.create(e[n.name],t.blockAPI))})),Object.entries(e).forEach((function(e){var n=(0,o.default)(e,2),r=n[0],i=n[1];t.tunesInstances.has(r)||(t.unavailableTunesData[r]=i)}))}},{key:"addInputEvents",value:function(){var e=this;this.inputs.forEach((function(t){t.addEventListener("focus",e.handleFocus),h.default.isNativeInput(t)&&t.addEventListener("input",e.didMutated)}))}},{key:"removeInputEvents",value:function(){var e=this;this.inputs.forEach((function(t){t.removeEventListener("focus",e.handleFocus),h.default.isNativeInput(t)&&t.removeEventListener("input",e.didMutated)}))}}],[{key:"CSS",get:function(){return{wrapper:"ce-block",wrapperStretched:"ce-block--stretched",content:"ce-block__content",focused:"ce-block--focused",selected:"ce-block--selected",dropTarget:"ce-block--drop-target"}}}]),x}(b.default);e.default=S,S.displayName="Block"})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(37);e.exports=Object("z").propertyIsEnumerable(0)?Object:function(e){return"String"==o(e)?e.split(""):Object(e)}},function(e,t){t.f={}.propertyIsEnumerable},function(e,t,n){var o=n(37),r=n(14)("toStringTag"),i="Arguments"==o(function(){return arguments}());e.exports=function(e){var t,n,a;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(n=function(e,t){try{return e[t]}catch(e){}}(t=Object(e),r))?n:i?o(t):"Object"==(a=o(t))&&"function"==typeof t.callee?"Arguments":a}},function(e,t,n){var o=n(12),r=n(32),i=n(14)("species");e.exports=function(e,t){var n,a=o(e).constructor;return void 0===a||null==(n=o(a)[i])?t:r(n)}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(8),n(379)],void 0===(i="function"==typeof(o=function(e,t,o){"use strict";var r=n(1);function i(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(i=function(e){return e?n:t})(e)}function s(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={tags:t},r=new o.default(n);return r.clean(e)}function l(e,n){return Array.isArray(e)?(i=n,e.map((function(e){return l(e,i)}))):t.isObject(e)?function(e,n){var o,r={};for(var i in e)if(Object.prototype.hasOwnProperty.call(e,i)){var a=e[i],s=(o=n[i],t.isObject(o)||t.isBoolean(o)||t.isFunction(o)?n[i]:n);r[i]=l(a,s)}return r}(e,n):t.isString(e)?(o=e,r=n,t.isObject(r)?s(o,r):!1===r?s(o,{}):o):e;var o,r,i}Object.defineProperty(e,"__esModule",{value:!0}),e.clean=s,e.sanitizeBlocks=function(e,n){return e.map((function(e){var o=t.isFunction(n)?n(e.tool):n;return t.isEmpty(o)||(e.data=l(e.data,o)),e}))},t=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=i(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in e)if("default"!==s&&Object.prototype.hasOwnProperty.call(e,s)){var l=r?Object.getOwnPropertyDescriptor(e,s):null;l&&(l.get||l.set)?Object.defineProperty(o,s,l):o[s]=e[s]}return o.default=e,n&&n.set(e,o),o}(t),o=r(o)})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(381),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f=function(){function e(t){var n=this;(0,r.default)(this,e),this.iterator=null,this.activated=!1,this.flipCallbacks=[],this.onKeyDown=function(t){if(n.isEventReadyForHandling(t))switch(e.usedKeys.includes(t.keyCode)&&t.preventDefault(),t.keyCode){case l.keyCodes.TAB:n.handleTabPress(t);break;case l.keyCodes.LEFT:case l.keyCodes.UP:n.flipLeft();break;case l.keyCodes.RIGHT:case l.keyCodes.DOWN:n.flipRight();break;case l.keyCodes.ENTER:n.handleEnterPress(t)}},this.iterator=new s.default(t.items,t.focusedItemClass),this.activateCallback=t.activateCallback,this.allowedKeys=t.allowedKeys||e.usedKeys}return(0,i.default)(e,[{key:"isActivated",get:function(){return this.activated}},{key:"activate",value:function(e,t){this.activated=!0,e&&this.iterator.setItems(e),void 0!==t&&this.iterator.setCursor(t),document.addEventListener("keydown",this.onKeyDown,!0)}},{key:"deactivate",value:function(){this.activated=!1,this.dropCursor(),document.removeEventListener("keydown",this.onKeyDown)}},{key:"focusFirst",value:function(){this.dropCursor(),this.flipRight()}},{key:"flipLeft",value:function(){this.iterator.previous(),this.flipCallback()}},{key:"flipRight",value:function(){this.iterator.next(),this.flipCallback()}},{key:"hasFocus",value:function(){return!!this.iterator.currentItem}},{key:"onFlip",value:function(e){this.flipCallbacks.push(e)}},{key:"removeOnFlip",value:function(e){this.flipCallbacks=this.flipCallbacks.filter((function(t){return t!==e}))}},{key:"dropCursor",value:function(){this.iterator.dropCursor()}},{key:"isEventReadyForHandling",value:function(e){return this.activated&&this.allowedKeys.includes(e.keyCode)}},{key:"handleTabPress",value:function(e){switch(e.shiftKey?s.default.directions.LEFT:s.default.directions.RIGHT){case s.default.directions.RIGHT:this.flipRight();break;case s.default.directions.LEFT:this.flipLeft()}}},{key:"handleEnterPress",value:function(e){this.activated&&(this.iterator.currentItem&&(e.stopPropagation(),e.preventDefault(),this.iterator.currentItem.click()),l.isFunction(this.activateCallback)&&this.activateCallback(this.iterator.currentItem))}},{key:"flipCallback",value:function(){this.iterator.currentItem&&this.iterator.currentItem.scrollIntoViewIfNeeded(),this.flipCallbacks.forEach((function(e){return e()}))}}],[{key:"usedKeys",get:function(){return[l.keyCodes.TAB,l.keyCodes.LEFT,l.keyCodes.RIGHT,l.keyCodes.ENTER,l.keyCodes.UP,l.keyCodes.DOWN]}}]),e}();o.default=f,f.displayName="Flipper",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(30),n(148),n(8)],void 0===(i="function"==typeof(o=function(e,t,o,r){"use strict";var i=n(1);Object.defineProperty(e,"__esModule",{value:!0}),e.I18nInternalNS=void 0,t=i(t);var a=function e(n,o){var i={};return Object.entries(n).forEach((function(n){var a=(0,t.default)(n,2),s=a[0],l=a[1];if((0,r.isObject)(l)){var c=o?"".concat(o,".").concat(s):s,u=Object.values(l).every((function(e){return(0,r.isString)(e)}));i[s]=u?c:e(l,c)}else i[s]=l})),i}((o=i(o)).default);e.I18nInternalNS=a})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(e,t,o,r){"use strict";var i,s,l,c,u,f,d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.UserSettings=e.ToolType=e.InternalTuneSettings=e.InternalInlineToolSettings=e.InternalBlockToolSettings=e.CommonInternalSettings=void 0,t=d(t),o=d(o),r=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(r),e.ToolType=i,function(e){e[e.Block=0]="Block",e[e.Inline=1]="Inline",e[e.Tune=2]="Tune"}(i||(e.ToolType=i={})),e.UserSettings=s,function(e){e.Shortcut="shortcut",e.Toolbox="toolbox",e.EnabledInlineTools="inlineToolbar",e.EnabledBlockTunes="tunes",e.Config="config"}(s||(e.UserSettings=s={})),e.CommonInternalSettings=l,function(e){e.Shortcut="shortcut",e.SanitizeConfig="sanitize"}(l||(e.CommonInternalSettings=l={})),e.InternalBlockToolSettings=c,function(e){e.IsEnabledLineBreaks="enableLineBreaks",e.Toolbox="toolbox",e.ConversionConfig="conversionConfig",e.IsReadOnlySupported="isReadOnlySupported",e.PasteConfig="pasteConfig"}(c||(e.InternalBlockToolSettings=c={})),e.InternalInlineToolSettings=u,function(e){e.IsInline="isInline",e.Title="title"}(u||(e.InternalInlineToolSettings=u={})),e.InternalTuneSettings=f,function(e){e.IsTune="isTune"}(f||(e.InternalTuneSettings=f={}));var h=function(){function e(n){var o=n.name,r=n.constructable,i=n.config,a=n.api,s=n.isDefault,l=n.isInternal,c=void 0!==l&&l,u=n.defaultPlaceholder;(0,t.default)(this,e),this.api=a,this.name=o,this.constructable=r,this.config=i,this.isDefault=s,this.isInternal=c,this.defaultPlaceholder=u}return(0,o.default)(e,[{key:"settings",get:function(){var e=this.config[s.Config]||{};return this.isDefault&&!("placeholder"in e)&&this.defaultPlaceholder&&(e.placeholder=this.defaultPlaceholder),e}},{key:"reset",value:function(){if(r.isFunction(this.constructable.reset))return this.constructable.reset()}},{key:"prepare",value:function(){if(r.isFunction(this.constructable.prepare))return this.constructable.prepare({toolName:this.name,config:this.settings})}},{key:"shortcut",get:function(){var e=this.constructable[l.Shortcut];return this.config[s.Shortcut]||e}},{key:"sanitizeConfig",get:function(){return this.constructable[l.SanitizeConfig]||{}}},{key:"isInline",value:function(){return this.type===i.Inline}},{key:"isBlock",value:function(){return this.type===i.Block}},{key:"isTune",value:function(){return this.type===i.Tune}}]),e}();e.default=h,h.displayName="BaseTool"})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(16),r=n(10),i=r["__core-js_shared__"]||(r["__core-js_shared__"]={});(e.exports=function(e,t){return i[e]||(i[e]=void 0!==t?t:{})})("versions",[]).push({version:o.version,mode:n(45)?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(e,t,n){var o=n(28),r=n(15),i=n(47);e.exports=function(e){return function(t,n,a){var s,l=o(t),c=r(l.length),u=i(a,c);if(e&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((e||u in l)&&l[u]===n)return e||u||0;return!e&&-1}}},function(e,t){t.f=Object.getOwnPropertySymbols},function(e,t,n){var o=n(37);e.exports=Array.isArray||function(e){return"Array"==o(e)}},function(e,t,n){var o=n(14)("iterator"),r=!1;try{var i=[7][o]();i.return=function(){r=!0},Array.from(i,(function(){throw 2}))}catch(e){}e.exports=function(e,t){if(!t&&!r)return!1;var n=!1;try{var i=[7],a=i[o]();a.next=function(){return{done:n=!0}},i[o]=function(){return a},e(i)}catch(e){}return n}},function(e,t,n){"use strict";var o=n(12);e.exports=function(){var e=o(this),t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.unicode&&(t+="u"),e.sticky&&(t+="y"),t}},function(e,t,n){"use strict";var o=n(63),r=RegExp.prototype.exec;e.exports=function(e,t){var n=e.exec;if("function"==typeof n){var i=n.call(e,t);if("object"!=typeof i)throw new TypeError("RegExp exec method returned something other than an Object or null");return i}if("RegExp"!==o(e))throw new TypeError("RegExp#exec called on incompatible receiver");return r.call(e,t)}},function(e,t,n){"use strict";n(135);var o=n(23),r=n(27),i=n(11),a=n(38),s=n(14),l=n(106),c=s("species"),u=!i((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$
")})),f=function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var n="ab".split(e);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();e.exports=function(e,t,n){var d=s(e),p=!i((function(){var t={};return t[d]=function(){return 7},7!=""[e](t)})),h=p?!i((function(){var t=!1,n=/a/;return n.exec=function(){return t=!0,null},"split"===e&&(n.constructor={},n.constructor[c]=function(){return n}),n[d](""),!t})):void 0;if(!p||!h||"replace"===e&&!u||"split"===e&&!f){var v=/./[d],y=n(a,d,""[e],(function(e,t,n,o,r){return t.exec===l?p&&!r?{done:!0,value:v.call(t,n,o)}:{done:!0,value:e.call(n,t,o)}:{done:!1}})),g=y[0],b=y[1];o(String.prototype,e,g),r(RegExp.prototype,d,2==t?function(e,t){return b.call(e,this,t)}:function(e){return b.call(e,this)})}}},function(e,t,n){var o=n(31),r=n(130),i=n(101),a=n(12),s=n(15),l=n(103),c={},u={};(t=e.exports=function(e,t,n,f,d){var p,h,v,y,g=d?function(){return e}:l(e),b=o(n,f,t?2:1),m=0;if("function"!=typeof g)throw TypeError(e+" is not iterable!");if(i(g)){for(p=s(e.length);p>m;m++)if((y=t?b(a(h=e[m])[0],h[1]):b(e[m]))===c||y===u)return y}else for(v=g.call(e);!(h=v.next()).done;)if((y=r(v,b,h.value,t))===c||y===u)return y}).BREAK=c,t.RETURN=u},function(e,t,n){var o=n(10).navigator;e.exports=o&&o.userAgent||""},function(e,t,n){"use strict";var o=n(10),r=n(0),i=n(23),a=n(59),s=n(42),l=n(77),c=n(58),u=n(13),f=n(11),d=n(73),p=n(54),h=n(92);e.exports=function(e,t,n,v,y,g){var b=o[e],m=b,k=y?"set":"add",x=m&&m.prototype,w={},S=function(e){var t=x[e];i(x,e,"delete"==e||"has"==e?function(e){return!(g&&!u(e))&&t.call(this,0===e?0:e)}:"get"==e?function(e){return g&&!u(e)?void 0:t.call(this,0===e?0:e)}:"add"==e?function(e){return t.call(this,0===e?0:e),this}:function(e,n){return t.call(this,0===e?0:e,n),this})};if("function"==typeof m&&(g||x.forEach&&!f((function(){(new m).entries().next()})))){var C=new m,T=C[k](g?{}:-0,1)!=C,E=f((function(){C.has(1)})),_=d((function(e){new m(e)})),B=!g&&f((function(){for(var e=new m,t=5;t--;)e[k](t,t);return!e.has(-0)}));_||((m=t((function(t,n){c(t,m,e);var o=h(new b,t,m);return null!=n&&l(n,y,o[k],o),o}))).prototype=x,x.constructor=m),(E||B)&&(S("delete"),S("has"),y&&S("get")),(B||T)&&S(k),g&&x.clear&&delete x.clear}else m=v.getConstructor(t,e,y,k),a(m.prototype,n),s.NEED=!0;return p(m,e),w[e]=m,r(r.G+r.W+r.F*(m!=b),w),g||v.setStrong(m,e,y),m}},function(e,t,n){for(var o,r=n(10),i=n(27),a=n(44),s=a("typed_array"),l=a("view"),c=!(!r.ArrayBuffer||!r.DataView),u=c,f=0,d="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");f<9;)(o=r[d[f++]])?(i(o.prototype,s,!0),i(o.prototype,l,!0)):u=!1;e.exports={ABV:c,CONSTR:u,TYPED:s,VIEW:l}},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e),this.subscribers={}}return(0,i.default)(e,[{key:"on",value:function(e,t){e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push(t)}},{key:"once",value:function(e,t){var n=this;e in this.subscribers||(this.subscribers[e]=[]),this.subscribers[e].push((function o(r){var i=t(r),a=n.subscribers[e].indexOf(o);return-1!==a&&n.subscribers[e].splice(a,1),i}))}},{key:"emit",value:function(e,t){!(0,a.isEmpty)(this.subscribers)&&this.subscribers[e]&&this.subscribers[e].reduce((function(e,t){return t(e)||e}),t)}},{key:"off",value:function(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:this.Editor.BlockManager.currentBlock;if(this.toolboxInstance.close(),this.Editor.BlockSettings.close(),e){this.hoveredBlock=e;var t,n=e.holder,o=this.Editor.UI.isMobile,r=e.pluginsContent,i=window.getComputedStyle(r),a=parseInt(i.paddingTop,10),s=n.offsetHeight;t=o?n.offsetTop+s:n.offsetTop+a,this.nodes.wrapper.style.top="".concat(Math.floor(t),"px"),1===this.Editor.BlockManager.blocks.length&&e.isEmpty?this.blockTunesToggler.hide():this.blockTunesToggler.show(),this.open()}}},{key:"close",value:function(){this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),this.toolboxInstance.close(),this.Editor.BlockSettings.close())}},{key:"open",value:function(){var e=this,t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];d.delay((function(){e.nodes.wrapper.classList.add(e.CSS.toolbarOpened),t?e.blockActions.show():e.blockActions.hide()}),50)()}},{key:"make",value:function(){var e=this;this.nodes.wrapper=f.default.make("div",this.CSS.toolbar),["content","actions"].forEach((function(t){e.nodes[t]=f.default.make("div",e.CSS[t])})),f.default.append(this.nodes.wrapper,this.nodes.content),f.default.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=f.default.make("div",this.CSS.plusButton,{innerHTML:''}),f.default.append(this.nodes.actions,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",(function(){e.tooltip.hide(!0),e.plusButtonClicked()}),!1);var t=f.default.make("div");t.appendChild(document.createTextNode(p.default.ui(h.I18nInternalNS.ui.toolbar.toolbox,"Add"))),t.appendChild(f.default.make("div",this.CSS.plusButtonShortcut,{textContent:"⇥ Tab"})),this.tooltip.onHover(this.nodes.plusButton,t,{hidingDelay:400}),this.nodes.settingsToggler=f.default.make("span",this.CSS.settingsToggler,{innerHTML:''}),f.default.append(this.nodes.actions,this.nodes.settingsToggler),this.tooltip.onHover(this.nodes.settingsToggler,p.default.ui(h.I18nInternalNS.ui.blockTunes.toggler,"Click to tune"),{hidingDelay:400}),f.default.append(this.nodes.actions,this.makeToolbox()),f.default.append(this.nodes.actions,this.Editor.BlockSettings.getElement()),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}},{key:"makeToolbox",value:function(){var e=this;return this.toolboxInstance=new y.default({api:this.Editor.API.methods,tools:this.Editor.Tools.blockTools,i18nLabels:{filter:p.default.ui(h.I18nInternalNS.ui.popover,"Filter"),nothingFound:p.default.ui(h.I18nInternalNS.ui.popover,"Nothing found")}}),this.toolboxInstance.on(y.ToolboxEvent.Opened,(function(){e.Editor.UI.nodes.wrapper.classList.add(e.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(y.ToolboxEvent.Closed,(function(){e.Editor.UI.nodes.wrapper.classList.remove(e.CSS.openedToolboxHolderModifier)})),this.toolboxInstance.on(y.ToolboxEvent.BlockAdded,(function(t){var n=t.block,o=e.Editor,r=o.BlockManager,i=o.Caret,a=r.getBlockById(n.id);0===a.inputs.length&&(a===r.lastBlock?(r.insertAtEnd(),i.setToBlock(r.lastBlock)):i.setToBlock(r.nextBlock))})),this.toolboxInstance.make()}},{key:"plusButtonClicked",value:function(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.toolboxInstance.toggle()}},{key:"enableModuleBindings",value:function(){var e=this;this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"mousedown",(function(t){t.stopPropagation(),e.settingsTogglerClicked(),e.toolboxInstance.close(),e.tooltip.hide(!0)}),!0),d.isMobileScreen()||this.eventsDispatcher.on(this.Editor.UI.events.blockHovered,(function(t){e.Editor.BlockSettings.opened||e.toolboxInstance.opened||e.moveAndOpen(t.block)}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockManager.currentBlock=this.hoveredBlock,this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open(this.hoveredBlock)}},{key:"drawUI",value:function(){this.Editor.BlockSettings.make(),this.make()}},{key:"destroy",value:function(){this.removeAllNodes(),this.toolboxInstance&&this.toolboxInstance.destroy(),this.tooltip.destroy()}}]),n}(u.default);o.default=x,x.displayName="Toolbar",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(40),n(2),n(3),n(5),n(6),n(4),n(7),n(19),n(152),n(66),n(81),n(8),n(386)],void 0===(i="function"==typeof(o=function(e,t,o,r,i,a,s,l,c,u,f,d,p,h){"use strict";var v=n(1);function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,s.default)(e);if(t){var r=(0,s.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,a.default)(this,n)}}Object.defineProperty(e,"__esModule",{value:!0}),e.default=e.PopoverEvent=void 0,t=v(t),o=v(o),r=v(r),i=v(i),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),f=v(f),d=v(d),h=v(h);var g,b=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===("undefined"==typeof Reflect?"undefined":(0,l.default)(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=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.PopoverEvent=g,function(e){e.OverlayClicked="overlay-clicked",e.Close="close"}(g||(e.PopoverEvent=g={}));var m=function(e){(0,i.default)(a,e);var n=y(a);function a(e){var t,r=e.items,i=e.className,s=e.searchable,l=e.filterLabel,c=e.nothingFoundLabel,f=e.customContent,d=e.customContentFlippableItems,p=e.scopeElement;return(0,o.default)(this,a),(t=n.call(this)).customContentFlippableItems=[],t.isShown=!1,t.nodes={wrapper:null,popover:null,items:null,nothingFound:null,overlay:null},t.scrollLocker=new h.default,t.itemsRequiringConfirmation={},t.removeSpecialHoverBehavior=function(){var e=t.nodes.items.querySelector(".".concat(a.CSS.itemNoHover));e&&e.classList.remove(a.CSS.itemNoHover)},t.onFlip=function(){t.disableSpecialHoverAndFocusBehavior()},t.items=r,t.customContent=f,t.customContentFlippableItems=d,t.className=i||"",t.searchable=s,t.listeners=new u.default,t.scopeElement=p,t.filterLabel=l,t.nothingFoundLabel=c,t.render(),t.enableFlipper(),t}return(0,r.default)(a,[{key:"getElement",value:function(){return this.nodes.wrapper}},{key:"show",value:function(){this.shouldOpenPopoverBottom||(this.nodes.wrapper.style.setProperty("--popover-height",this.calculateHeight()+"px"),this.nodes.wrapper.classList.add(this.className+"--opened-top")),this.nodes.items.scrollTop=0,this.nodes.popover.classList.add(a.CSS.popoverOpened),this.nodes.overlay.classList.remove(a.CSS.popoverOverlayHidden),this.flipper.activate(this.flippableElements),(0,p.isMobileScreen)()&&this.scrollLocker.lock(),this.isShown=!0}},{key:"hide",value:function(){var e=this;this.isShown&&(this.nodes.popover.classList.remove(a.CSS.popoverOpened),this.nodes.overlay.classList.add(a.CSS.popoverOverlayHidden),this.flipper.deactivate(),(0,p.isMobileScreen)()&&this.scrollLocker.unlock(),this.isShown=!1,this.nodes.wrapper.classList.remove(this.className+"--opened-top"),Array.from(this.nodes.items.querySelectorAll(".".concat(a.CSS.itemConfirmation))).forEach((function(t){return e.cleanUpConfirmationStateForItem(t)})),this.disableSpecialHoverAndFocusBehavior(),this.emit(g.Close))}},{key:"destroy",value:function(){this.flipper.deactivate(),this.listeners.removeAll(),this.disableSpecialHoverAndFocusBehavior(),(0,p.isMobileScreen)()&&this.scrollLocker.unlock()}},{key:"hasFocus",value:function(){return this.flipper.hasFocus()}},{key:"calculateHeight",value:function(){var e,t=this.nodes.popover.cloneNode(!0);return t.style.visibility="hidden",t.style.position="absolute",t.style.top="-1000px",t.classList.add(a.CSS.popoverOpened),document.body.appendChild(t),e=t.offsetHeight,t.remove(),e}},{key:"render",value:function(){var e=this;this.nodes.wrapper=c.default.make("div",this.className),this.nodes.popover=c.default.make("div",a.CSS.popover),this.nodes.wrapper.appendChild(this.nodes.popover),this.nodes.overlay=c.default.make("div",[a.CSS.popoverOverlay,a.CSS.popoverOverlayHidden]),this.nodes.wrapper.appendChild(this.nodes.overlay),this.customContent&&(this.customContent.classList.add(a.CSS.customContent),this.nodes.popover.appendChild(this.customContent)),this.nodes.items=c.default.make("div",a.CSS.itemsWrapper),this.items.forEach((function(t){e.nodes.items.appendChild(e.createItem(t))})),this.nodes.popover.appendChild(this.nodes.items),this.nodes.nothingFound=c.default.make("div",[a.CSS.noFoundMessage],{textContent:this.nothingFoundLabel}),this.nodes.popover.appendChild(this.nodes.nothingFound),this.listeners.on(this.nodes.popover,"click",(function(t){var n=t.target.closest(".".concat(a.CSS.item));n&&e.itemClicked(n,t)})),this.listeners.on(this.nodes.overlay,"click",(function(){e.emit(g.OverlayClicked)}))}},{key:"createItem",value:function(e){var t=c.default.make("div",a.CSS.item);e.name&&(t.dataset.itemName=e.name);var n=c.default.make("div",a.CSS.itemLabel,{innerHTML:e.label});return t.appendChild(c.default.make("div",a.CSS.itemIcon,{innerHTML:e.icon||e.name.substring(0,1).toUpperCase()})),t.appendChild(n),e.secondaryLabel&&t.appendChild(c.default.make("div",a.CSS.itemSecondaryLabel,{textContent:e.secondaryLabel})),e.isActive&&t.classList.add(a.CSS.itemActive),e.isDisabled&&t.classList.add(a.CSS.itemDisabled),t}},{key:"itemClicked",value:function(e,t){var n=this,o=Array.from(this.nodes.items.children),r=o.indexOf(e),i=this.items[r];i.isDisabled||(o.filter((function(t){return t!==e})).forEach((function(e){n.cleanUpConfirmationStateForItem(e)})),i.confirmation?this.enableConfirmationStateForItem(i,e,r):(i.onActivate(i,t),this.toggleIfNeeded(r,o),i.closeOnActivate&&this.hide()))}},{key:"toggleIfNeeded",value:function(e,t){var n=this,o=this.items[e];if(!0===o.toggle)return o.isActive=!o.isActive,void t[e].classList.toggle(a.CSS.itemActive);if("string"==typeof o.toggle){var r=this.items.filter((function(e){return e.toggle===o.toggle}));if(1===r.length)return o.isActive=!o.isActive,void t[e].classList.toggle(a.CSS.itemActive);r.forEach((function(e){var r=n.items.indexOf(e),i=e===o;e.isActive=i,t[r].classList.toggle(a.CSS.itemActive,i)}))}}},{key:"enableConfirmationStateForItem",value:function(e,n,o){var r;void 0===this.itemsRequiringConfirmation[o]&&(this.itemsRequiringConfirmation[o]=e);var i=Object.assign(Object.assign(Object.assign({},e),e.confirmation),{confirmation:e.confirmation.confirmation});this.items[o]=i;var s=this.createItem(i);(r=s.classList).add.apply(r,[a.CSS.itemConfirmation].concat((0,t.default)(Array.from(n.classList)))),n.parentElement.replaceChild(s,n),this.enableSpecialHoverAndFocusBehavior(s),this.reactivateFlipper(this.flippableElements,this.flippableElements.indexOf(s))}},{key:"cleanUpConfirmationStateForItem",value:function(e){var t=Array.from(this.nodes.items.children).indexOf(e),n=this.itemsRequiringConfirmation[t];if(void 0!==n){var o=this.createItem(n);e.parentElement.replaceChild(o,e),this.items[t]=n,delete this.itemsRequiringConfirmation[t],e.removeEventListener("mouseleave",this.removeSpecialHoverBehavior),this.disableSpecialHoverAndFocusBehavior(),this.reactivateFlipper(this.flippableElements,this.flippableElements.indexOf(o))}}},{key:"enableSpecialHoverAndFocusBehavior",value:function(e){e.classList.add(a.CSS.itemNoHover),e.classList.add(a.CSS.itemNoFocus),e.addEventListener("mouseleave",this.removeSpecialHoverBehavior,{once:!0}),this.flipper.onFlip(this.onFlip)}},{key:"disableSpecialHoverAndFocusBehavior",value:function(){this.removeSpecialFocusBehavior(),this.removeSpecialHoverBehavior(),this.flipper.removeOnFlip(this.onFlip)}},{key:"removeSpecialFocusBehavior",value:function(){var e=this.nodes.items.querySelector(".".concat(a.CSS.itemNoFocus));e&&e.classList.remove(a.CSS.itemNoFocus)}},{key:"reactivateFlipper",value:function(e,t){this.flipper.deactivate(),this.flipper.activate(e,t)}},{key:"enableFlipper",value:function(){this.flipper=new f.default({items:this.flippableElements,focusedItemClass:a.CSS.itemFocused,allowedKeys:[p.keyCodes.TAB,p.keyCodes.UP,p.keyCodes.DOWN,p.keyCodes.ENTER]})}},{key:"flippableElements",get:function(){var e=Array.from(this.nodes.wrapper.querySelectorAll(".".concat(a.CSS.item)));return(this.customContentFlippableItems||[]).concat(e)}},{key:"shouldOpenPopoverBottom",get:function(){var e=this.nodes.wrapper.getBoundingClientRect(),t=this.scopeElement.getBoundingClientRect(),n=this.calculateHeight(),o=e.top+n,r=e.top-n,i=Math.min(window.innerHeight,t.bottom);return r0;(i>>>=1)&&(t+=t))1&i&&(n+=t);return n}},function(e,t){e.exports=Math.sign||function(e){return 0==(e=+e)||e!=e?e:e<0?-1:1}},function(e,t){var n=Math.expm1;e.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(e){return 0==(e=+e)?e:e>-1e-6&&e<1e-6?e+e*e/2:Math.exp(e)-1}:n},function(e,t,n){var o=n(33),r=n(38);e.exports=function(e){return function(t,n){var i,a,s=String(r(t)),l=o(n),c=s.length;return l<0||l>=c?e?"":void 0:(i=s.charCodeAt(l))<55296||i>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?e?s.charAt(l):i:e?s.slice(l,l+2):a-56320+(i-55296<<10)+65536}}},function(e,t,n){"use strict";var o=n(45),r=n(0),i=n(23),a=n(27),s=n(56),l=n(129),c=n(54),u=n(50),f=n(14)("iterator"),d=!([].keys&&"next"in[].keys()),p=function(){return this};e.exports=function(e,t,n,h,v,y,g){l(n,t,h);var b,m,k,x=function(e){if(!d&&e in T)return T[e];switch(e){case"keys":case"values":return function(){return new n(this,e)}}return function(){return new n(this,e)}},w=t+" Iterator",S="values"==v,C=!1,T=e.prototype,E=T[f]||T["@@iterator"]||v&&T[v],_=E||x(v),B=v?S?x("entries"):_:void 0,O="Array"==t&&T.entries||E;if(O&&(k=u(O.call(new e)))!==Object.prototype&&k.next&&(c(k,w,!0),o||"function"==typeof k[f]||a(k,f,p)),S&&E&&"values"!==E.name&&(C=!0,_=function(){return E.call(this)}),o&&!g||!d&&!C&&T[f]||a(T,f,_),s[t]=_,s[w]=p,v)if(b={values:S?_:x("values"),keys:y?_:x("keys"),entries:B},g)for(m in b)m in T||i(T,m,b[m]);else r(r.P+r.F*(d||C),t,b);return b}},function(e,t,n){var o=n(99),r=n(38);e.exports=function(e,t,n){if(o(t))throw TypeError("String#"+n+" doesn't accept regex!");return String(r(e))}},function(e,t,n){var o=n(13),r=n(37),i=n(14)("match");e.exports=function(e){var t;return o(e)&&(void 0!==(t=e[i])?!!t:"RegExp"==r(e))}},function(e,t,n){var o=n(14)("match");e.exports=function(e){var t=/./;try{"/./"[e](t)}catch(n){try{return t[o]=!1,!"/./"[e](t)}catch(e){}}return!0}},function(e,t,n){var o=n(56),r=n(14)("iterator"),i=Array.prototype;e.exports=function(e){return void 0!==e&&(o.Array===e||i[r]===e)}},function(e,t,n){"use strict";var o=n(18),r=n(43);e.exports=function(e,t,n){t in e?o.f(e,t,r(0,n)):e[t]=n}},function(e,t,n){var o=n(63),r=n(14)("iterator"),i=n(56);e.exports=n(16).getIteratorMethod=function(e){if(null!=e)return e[r]||e["@@iterator"]||i[o(e)]}},function(e,t,n){"use strict";var o=n(22),r=n(47),i=n(15);e.exports=function(e){for(var t=o(this),n=i(t.length),a=arguments.length,s=r(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:r(l,n);c>s;)t[s++]=e;return t}},function(e,t,n){"use strict";var o=n(51),r=n(134),i=n(56),a=n(28);e.exports=n(97)(Array,"Array",(function(e,t){this._t=a(e),this._i=0,this._k=t}),(function(){var e=this._t,t=this._k,n=this._i++;return!e||n>=e.length?(this._t=void 0,r(1)):r(0,"keys"==t?n:"values"==t?e[n]:[n,e[n]])}),"values"),i.Arguments=i.Array,o("keys"),o("values"),o("entries")},function(e,t,n){"use strict";var o,r,i=n(74),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(o=/a/,r=/b*/g,a.call(o,"a"),a.call(r,"a"),0!==o.lastIndex||0!==r.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(e){var t,n,o,r,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",i.call(l))),c&&(t=l.lastIndex),o=a.call(l,e),c&&o&&(l.lastIndex=l.global?o.index+o[0].length:t),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(r=1;rn;)t.push(arguments[n++]);return g[++y]=function(){s("function"==typeof e?e:Function(e),t)},o(y),y},p=function(e){delete g[e]},"process"==n(37)(f)?o=function(e){f.nextTick(a(b,e,1))}:v&&v.now?o=function(e){v.now(a(b,e,1))}:h?(i=(r=new h).port2,r.port1.onmessage=m,o=a(i.postMessage,i,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(o=function(e){u.postMessage(e+"","*")},u.addEventListener("message",m,!1)):o="onreadystatechange"in c("script")?function(e){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),b.call(e)}}:function(e){setTimeout(a(b,e,1),0)}),e.exports={set:d,clear:p}},function(e,t,n){"use strict";var o=n(10),r=n(17),i=n(45),a=n(80),s=n(27),l=n(59),c=n(11),u=n(58),f=n(33),d=n(15),p=n(142),h=n(49).f,v=n(18).f,y=n(104),g=n(54),b=o.ArrayBuffer,m=o.DataView,k=o.Math,x=o.RangeError,w=o.Infinity,S=b,C=k.abs,T=k.pow,E=k.floor,_=k.log,B=k.LN2,O=r?"_b":"buffer",M=r?"_l":"byteLength",I=r?"_o":"byteOffset";function P(e,t,n){var o,r,i,a=new Array(n),s=8*n-t-1,l=(1<>1,u=23===t?T(2,-24)-T(2,-77):0,f=0,d=e<0||0===e&&1/e<0?1:0;for((e=C(e))!=e||e===w?(r=e!=e?1:0,o=l):(o=E(_(e)/B),e*(i=T(2,-o))<1&&(o--,i*=2),(e+=o+c>=1?u/i:u*T(2,1-c))*i>=2&&(o++,i/=2),o+c>=l?(r=0,o=l):o+c>=1?(r=(e*i-1)*T(2,t),o+=c):(r=e*T(2,c-1)*T(2,t),o=0));t>=8;a[f++]=255&r,r/=256,t-=8);for(o=o<0;a[f++]=255&o,o/=256,s-=8);return a[--f]|=128*d,a}function L(e,t,n){var o,r=8*n-t-1,i=(1<>1,s=r-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;s>0;u=256*u+e[l],l--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=t;s>0;o=256*o+e[l],l--,s-=8);if(0===u)u=1-a;else{if(u===i)return o?NaN:c?-w:w;o+=T(2,t),u-=a}return(c?-1:1)*o*T(2,u-t)}function R(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]}function A(e){return[255&e]}function j(e){return[255&e,e>>8&255]}function N(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]}function D(e){return P(e,52,8)}function F(e){return P(e,23,4)}function H(e,t,n){v(e.prototype,t,{get:function(){return this[n]}})}function W(e,t,n,o){var r=p(+n);if(r+t>e[M])throw x("Wrong index!");var i=e[O]._b,a=r+e[I],s=i.slice(a,a+t);return o?s:s.reverse()}function U(e,t,n,o,r,i){var a=p(+n);if(a+t>e[M])throw x("Wrong index!");for(var s=e[O]._b,l=a+e[I],c=o(+r),u=0;uX;)(z=Y[X++])in b||s(b,z,S[z]);i||(V.constructor=b)}var Z=new m(new b(2)),G=m.prototype.setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||l(m.prototype,{setInt8:function(e,t){G.call(this,e,t<<24>>24)},setUint8:function(e,t){G.call(this,e,t<<24>>24)}},!0)}else b=function(e){u(this,b,"ArrayBuffer");var t=p(e);this._b=y.call(new Array(t),0),this[M]=t},m=function(e,t,n){u(this,m,"DataView"),u(e,b,"DataView");var o=e[M],r=f(t);if(r<0||r>o)throw x("Wrong offset!");if(r+(n=void 0===n?o-r:d(n))>o)throw x("Wrong length!");this[O]=e,this[I]=r,this[M]=n},r&&(H(b,"byteLength","_l"),H(m,"buffer","_b"),H(m,"byteLength","_l"),H(m,"byteOffset","_o")),l(m.prototype,{getInt8:function(e){return W(this,1,e)[0]<<24>>24},getUint8:function(e){return W(this,1,e)[0]},getInt16:function(e){var t=W(this,2,e,arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=W(this,2,e,arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return R(W(this,4,e,arguments[1]))},getUint32:function(e){return R(W(this,4,e,arguments[1]))>>>0},getFloat32:function(e){return L(W(this,4,e,arguments[1]),23,4)},getFloat64:function(e){return L(W(this,8,e,arguments[1]),52,8)},setInt8:function(e,t){U(this,1,e,A,t)},setUint8:function(e,t){U(this,1,e,A,t)},setInt16:function(e,t){U(this,2,e,j,t,arguments[2])},setUint16:function(e,t){U(this,2,e,j,t,arguments[2])},setInt32:function(e,t){U(this,4,e,N,t,arguments[2])},setUint32:function(e,t){U(this,4,e,N,t,arguments[2])},setFloat32:function(e,t){U(this,4,e,F,t,arguments[2])},setFloat64:function(e,t){U(this,8,e,D,t,arguments[2])}});g(b,"ArrayBuffer"),g(m,"DataView"),s(m.prototype,a.VIEW,!0),t.ArrayBuffer=b,t.DataView=m},function(e,t){function n(t,o){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports.default=e.exports,n(t,o)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t],void 0===(i="function"==typeof(o=function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(e){var t={get id(){return e.id},get name(){return e.name},get config(){return e.config},get holder(){return e.holder},get isEmpty(){return e.isEmpty},get selected(){return e.selected},set stretched(t){e.stretched=t},get stretched(){return e.stretched},call:function(t,n){return e.call(t,n)},save:function(){return e.save()},validate:function(t){return e.validate(t)},dispatchChange:function(){e.dispatchChange()}};Object.setPrototypeOf(this,t)};n.default=o,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(376);function r(){return"undefined"!=typeof Reflect&&Reflect.get?(e.exports=r=Reflect.get.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=r=function(e,t,n){var r=o(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},e.exports.__esModule=!0,e.exports.default=e.exports),r.apply(this,arguments)}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(380)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e),this.lib=new a.default}return(0,i.default)(e,[{key:"destroy",value:function(){this.lib.destroy()}},{key:"show",value:function(e,t,n){this.lib.show(e,t,n)}},{key:"hide",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.lib.hide(e)}},{key:"onHover",value:function(e,t,n){this.lib.onHover(e,t,n)}}]),e}();o.default=l,l.displayName="Tooltip",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(40),n(2),n(3),n(384)],void 0===(i="function"==typeof(o=function(o,r,i,a,s){"use strict";var l=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=l(r),i=l(i),a=l(a),s=l(s);var c=function(){function e(){(0,i.default)(this,e),this.registeredShortcuts=new Map}return(0,a.default)(e,[{key:"add",value:function(e){if(this.findShortcut(e.on,e.name))throw Error("Shortcut ".concat(e.name," is already registered for ").concat(e.on,". Please remove it before add a new handler."));var t=new s.default({name:e.name,on:e.on,callback:e.handler}),n=this.registeredShortcuts.get(e.on)||[];this.registeredShortcuts.set(e.on,[].concat((0,r.default)(n),[t]))}},{key:"remove",value:function(e,t){var n=this.findShortcut(e,t);if(n){n.remove();var o=this.registeredShortcuts.get(e);this.registeredShortcuts.set(e,o.filter((function(e){return e!==n})))}}},{key:"findShortcut",value:function(e,t){return(this.registeredShortcuts.get(e)||[]).find((function(e){return e.name===t}))}}]),e}();c.displayName="Shortcuts";var u=new c;o.default=u,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){e.exports=!n(17)&&!n(11)((function(){return 7!=Object.defineProperty(n(85)("div"),"a",{get:function(){return 7}}).a}))},function(e,t,n){var o=n(10),r=n(16),i=n(45),a=n(86),s=n(18).f;e.exports=function(e){var t=r.Symbol||(r.Symbol=i?{}:o.Symbol||{});"_"==e.charAt(0)||e in t||s(t,e,{value:a.f(e)})}},function(e,t,n){var o=n(26),r=n(28),i=n(70)(!1),a=n(87)("IE_PROTO");e.exports=function(e,t){var n,s=r(e),l=0,c=[];for(n in s)n!=a&&o(s,n)&&c.push(n);for(;t.length>l;)o(s,n=t[l++])&&(~i(c,n)||c.push(n));return c}},function(e,t,n){var o=n(18),r=n(12),i=n(46);e.exports=n(17)?Object.defineProperties:function(e,t){r(e);for(var n,a=i(t),s=a.length,l=0;s>l;)o.f(e,n=a[l++],t[n]);return e}},function(e,t,n){var o=n(28),r=n(49).f,i={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return a&&"[object Window]"==i.call(e)?function(e){try{return r(e)}catch(e){return a.slice()}}(e):r(o(e))}},function(e,t,n){"use strict";var o=n(17),r=n(46),i=n(71),a=n(62),s=n(22),l=n(61),c=Object.assign;e.exports=!c||n(11)((function(){var e={},t={},n=Symbol(),o="abcdefghijklmnopqrst";return e[n]=7,o.split("").forEach((function(e){t[e]=e})),7!=c({},e)[n]||Object.keys(c({},t)).join("")!=o}))?function(e,t){for(var n=s(e),c=arguments.length,u=1,f=i.f,d=a.f;c>u;)for(var p,h=l(arguments[u++]),v=f?r(h).concat(f(h)):r(h),y=v.length,g=0;y>g;)p=v[g++],o&&!d.call(h,p)||(n[p]=h[p]);return n}:c},function(e,t){e.exports=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t}},function(e,t,n){"use strict";var o=n(32),r=n(13),i=n(123),a=[].slice,s={},l=function(e,t,n){if(!(t in s)){for(var o=[],r=0;r>>0||(a.test(n)?16:10))}:o},function(e,t,n){var o=n(10).parseFloat,r=n(55).trim;e.exports=1/o(n(91)+"-0")!=-1/0?function(e){var t=r(String(e),3),n=o(t);return 0===n&&"-"==t.charAt(0)?-0:n}:o},function(e,t,n){var o=n(37);e.exports=function(e,t){if("number"!=typeof e&&"Number"!=o(e))throw TypeError(t);return+e}},function(e,t,n){var o=n(13),r=Math.floor;e.exports=function(e){return!o(e)&&isFinite(e)&&r(e)===e}},function(e,t){e.exports=Math.log1p||function(e){return(e=+e)>-1e-8&&e<1e-8?e-e*e/2:Math.log(1+e)}},function(e,t,n){"use strict";var o=n(48),r=n(43),i=n(54),a={};n(27)(a,n(14)("iterator"),(function(){return this})),e.exports=function(e,t,n){e.prototype=o(a,{next:r(1,n)}),i(e,t+" Iterator")}},function(e,t,n){var o=n(12);e.exports=function(e,t,n,r){try{return r?t(o(n)[0],n[1]):t(n)}catch(t){var i=e.return;throw void 0!==i&&o(i.call(e)),t}}},function(e,t,n){var o=n(281);e.exports=function(e,t){return new(o(e))(t)}},function(e,t,n){var o=n(32),r=n(22),i=n(61),a=n(15);e.exports=function(e,t,n,s,l){o(t);var c=r(e),u=i(c),f=a(c.length),d=l?f-1:0,p=l?-1:1;if(n<2)for(;;){if(d in u){s=u[d],d+=p;break}if(d+=p,l?d<0:f<=d)throw TypeError("Reduce of empty array with no initial value")}for(;l?d>=0:f>d;d+=p)d in u&&(s=t(s,u[d],d,c));return s}},function(e,t,n){"use strict";var o=n(22),r=n(47),i=n(15);e.exports=[].copyWithin||function(e,t){var n=o(this),a=i(n.length),s=r(e,a),l=r(t,a),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?a:r(c,a))-l,a-s),f=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=f,l+=f;return n}},function(e,t){e.exports=function(e,t){return{value:t,done:!!e}}},function(e,t,n){"use strict";var o=n(106);n(0)({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},function(e,t,n){n(17)&&"g"!=/./g.flags&&n(18).f(RegExp.prototype,"flags",{configurable:!0,get:n(74)})},function(e,t,n){"use strict";var o,r,i,a,s=n(45),l=n(10),c=n(31),u=n(63),f=n(0),d=n(13),p=n(32),h=n(58),v=n(77),y=n(64),g=n(108).set,b=n(301)(),m=n(138),k=n(302),x=n(78),w=n(139),S=l.TypeError,C=l.process,T=C&&C.versions,E=T&&T.v8||"",_=l.Promise,B="process"==u(C),O=function(){},M=r=m.f,I=!!function(){try{var e=_.resolve(1),t=(e.constructor={})[n(14)("species")]=function(e){e(O,O)};return(B||"function"==typeof PromiseRejectionEvent)&&e.then(O)instanceof t&&0!==E.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(e){}}(),P=function(e){var t;return!(!d(e)||"function"!=typeof(t=e.then))&&t},L=function(e,t){if(!e._n){e._n=!0;var n=e._c;b((function(){for(var o=e._v,r=1==e._s,i=0,a=function(t){var n,i,a,s=r?t.ok:t.fail,l=t.resolve,c=t.reject,u=t.domain;try{s?(r||(2==e._h&&j(e),e._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),a=!0)),n===t.promise?c(S("Promise-chain cycle")):(i=P(n))?i.call(n,l,c):l(n)):c(o)}catch(e){u&&!a&&u.exit(),c(e)}};n.length>i;)a(n[i++]);e._c=[],e._n=!1,t&&!e._h&&R(e)}))}},R=function(e){g.call(l,(function(){var t,n,o,r=e._v,i=A(e);if(i&&(t=k((function(){B?C.emit("unhandledRejection",r,e):(n=l.onunhandledrejection)?n({promise:e,reason:r}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",r)})),e._h=B||A(e)?2:1),e._a=void 0,i&&t.e)throw t.v}))},A=function(e){return 1!==e._h&&0===(e._a||e._c).length},j=function(e){g.call(l,(function(){var t;B?C.emit("rejectionHandled",e):(t=l.onrejectionhandled)&&t({promise:e,reason:e._v})}))},N=function(e){var t=this;t._d||(t._d=!0,(t=t._w||t)._v=e,t._s=2,t._a||(t._a=t._c.slice()),L(t,!0))},D=function(e){var t,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===e)throw S("Promise can't be resolved itself");(t=P(e))?b((function(){var o={_w:n,_d:!1};try{t.call(e,c(D,o,1),c(N,o,1))}catch(e){N.call(o,e)}})):(n._v=e,n._s=1,L(n,!1))}catch(e){N.call({_w:n,_d:!1},e)}}};I||(_=function(e){h(this,_,"Promise","_h"),p(e),o.call(this);try{e(c(D,this,1),c(N,this,1))}catch(e){N.call(this,e)}},(o=function(e){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(59)(_.prototype,{then:function(e,t){var n=M(y(this,_));return n.ok="function"!=typeof e||e,n.fail="function"==typeof t&&t,n.domain=B?C.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(e){return this.then(void 0,e)}}),i=function(){var e=new o;this.promise=e,this.resolve=c(D,e,1),this.reject=c(N,e,1)},m.f=M=function(e){return e===_||e===a?new i(e):r(e)}),f(f.G+f.W+f.F*!I,{Promise:_}),n(54)(_,"Promise"),n(57)("Promise"),a=n(16).Promise,f(f.S+f.F*!I,"Promise",{reject:function(e){var t=M(this);return(0,t.reject)(e),t.promise}}),f(f.S+f.F*(s||!I),"Promise",{resolve:function(e){return w(s&&this===a?_:this,e)}}),f(f.S+f.F*!(I&&n(73)((function(e){_.all(e).catch(O)}))),"Promise",{all:function(e){var t=this,n=M(t),o=n.resolve,r=n.reject,i=k((function(){var n=[],i=0,a=1;v(e,!1,(function(e){var s=i++,l=!1;n.push(void 0),a++,t.resolve(e).then((function(e){l||(l=!0,n[s]=e,--a||o(n))}),r)})),--a||o(n)}));return i.e&&r(i.v),n.promise},race:function(e){var t=this,n=M(t),o=n.reject,r=k((function(){v(e,!1,(function(e){t.resolve(e).then(n.resolve,o)}))}));return r.e&&o(r.v),n.promise}})},function(e,t,n){"use strict";var o=n(32);function r(e){var t,n;this.promise=new e((function(e,o){if(void 0!==t||void 0!==n)throw TypeError("Bad Promise constructor");t=e,n=o})),this.resolve=o(t),this.reject=o(n)}e.exports.f=function(e){return new r(e)}},function(e,t,n){var o=n(12),r=n(13),i=n(138);e.exports=function(e,t){if(o(e),r(t)&&t.constructor===e)return t;var n=i.f(e);return(0,n.resolve)(t),n.promise}},function(e,t,n){"use strict";var o=n(18).f,r=n(48),i=n(59),a=n(31),s=n(58),l=n(77),c=n(97),u=n(134),f=n(57),d=n(17),p=n(42).fastKey,h=n(52),v=d?"_s":"size",y=function(e,t){var n,o=p(t);if("F"!==o)return e._i[o];for(n=e._f;n;n=n.n)if(n.k==t)return n};e.exports={getConstructor:function(e,t,n,c){var u=e((function(e,o){s(e,u,t,"_i"),e._t=t,e._i=r(null),e._f=void 0,e._l=void 0,e[v]=0,null!=o&&l(o,n,e[c],e)}));return i(u.prototype,{clear:function(){for(var e=h(this,t),n=e._i,o=e._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];e._f=e._l=void 0,e[v]=0},delete:function(e){var n=h(this,t),o=y(n,e);if(o){var r=o.n,i=o.p;delete n._i[o.i],o.r=!0,i&&(i.n=r),r&&(r.p=i),n._f==o&&(n._f=r),n._l==o&&(n._l=i),n[v]--}return!!o},forEach:function(e){h(this,t);for(var n,o=a(e,arguments.length>1?arguments[1]:void 0,3);n=n?n.n:this._f;)for(o(n.v,n.k,this);n&&n.r;)n=n.p},has:function(e){return!!y(h(this,t),e)}}),d&&o(u.prototype,"size",{get:function(){return h(this,t)[v]}}),u},def:function(e,t,n){var o,r,i=y(e,t);return i?i.v=n:(e._l=i={i:r=p(t,!0),k:t,v:n,p:o=e._l,n:void 0,r:!1},e._f||(e._f=i),o&&(o.n=i),e[v]++,"F"!==r&&(e._i[r]=i)),e},getEntry:y,setStrong:function(e,t,n){c(e,t,(function(e,n){this._t=h(e,t),this._k=n,this._l=void 0}),(function(){for(var e=this._k,t=this._l;t&&t.r;)t=t.p;return this._t&&(this._l=t=t?t.n:this._t._f)?u(0,"keys"==e?t.k:"values"==e?t.v:[t.k,t.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),f(t)}}},function(e,t,n){"use strict";var o=n(59),r=n(42).getWeak,i=n(12),a=n(13),s=n(58),l=n(77),c=n(36),u=n(26),f=n(52),d=c(5),p=c(6),h=0,v=function(e){return e._l||(e._l=new y)},y=function(){this.a=[]},g=function(e,t){return d(e.a,(function(e){return e[0]===t}))};y.prototype={get:function(e){var t=g(this,e);if(t)return t[1]},has:function(e){return!!g(this,e)},set:function(e,t){var n=g(this,e);n?n[1]=t:this.a.push([e,t])},delete:function(e){var t=p(this.a,(function(t){return t[0]===e}));return~t&&this.a.splice(t,1),!!~t}},e.exports={getConstructor:function(e,t,n,i){var c=e((function(e,o){s(e,c,t,"_i"),e._t=t,e._i=h++,e._l=void 0,null!=o&&l(o,n,e[i],e)}));return o(c.prototype,{delete:function(e){if(!a(e))return!1;var n=r(e);return!0===n?v(f(this,t)).delete(e):n&&u(n,this._i)&&delete n[this._i]},has:function(e){if(!a(e))return!1;var n=r(e);return!0===n?v(f(this,t)).has(e):n&&u(n,this._i)}}),c},def:function(e,t,n){var o=r(i(t),!0);return!0===o?v(e).set(t,n):o[e._i]=n,e},ufstore:v}},function(e,t,n){var o=n(33),r=n(15);e.exports=function(e){if(void 0===e)return 0;var t=o(e),n=r(t);if(t!==n)throw RangeError("Wrong length!");return n}},function(e,t,n){var o=n(49),r=n(71),i=n(12),a=n(10).Reflect;e.exports=a&&a.ownKeys||function(e){var t=o.f(i(e)),n=r.f;return n?t.concat(n(e)):t}},function(e,t,n){var o=n(15),r=n(93),i=n(38);e.exports=function(e,t,n,a){var s=String(i(e)),l=s.length,c=void 0===n?" ":String(n),u=o(t);if(u<=l||""==c)return s;var f=u-l,d=r.call(c,Math.ceil(f/c.length));return d.length>f&&(d=d.slice(0,f)),a?d+s:s+d}},function(e,t,n){var o=n(17),r=n(46),i=n(28),a=n(62).f;e.exports=function(e){return function(t){for(var n,s=i(t),l=r(s),c=l.length,u=0,f=[];c>u;)n=l[u++],o&&!a.call(s,n)||f.push(e?[n,s[n]]:s[n]);return f}}},function(e,t,n){var o=n(147);e.exports=function(e,t){if(e){if("string"==typeof e)return o(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?o(e,t):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n3&&void 0!==arguments[3]&&arguments[3],r=s.generateId("l"),i={id:r,element:e,eventType:t,handler:n,options:o},a=this.findOne(e,t,n);if(!a)return this.allListeners.push(i),e.addEventListener(t,n,o),r}},{key:"off",value:function(e,t,n,o){var r=this,i=this.findAll(e,t,n);i.forEach((function(e,t){var n=r.allListeners.indexOf(i[t]);n>-1&&(r.allListeners.splice(n,1),e.element.removeEventListener(e.eventType,e.handler,e.options))}))}},{key:"offById",value:function(e){var t=this.findById(e);t&&t.element.removeEventListener(t.eventType,t.handler,t.options)}},{key:"findOne",value:function(e,t,n){var o=this.findAll(e,t,n);return o.length>0?o[0]:null}},{key:"findAll",value:function(e,t,n){var o=e?this.findByEventTarget(e):[];return e&&t&&n?o.filter((function(e){return e.eventType===t&&e.handler===n})):e&&t?o.filter((function(e){return e.eventType===t})):o}},{key:"removeAll",value:function(){this.allListeners.map((function(e){e.element.removeEventListener(e.eventType,e.handler,e.options)})),this.allListeners=[]}},{key:"destroy",value:function(){this.removeAll()}},{key:"findByEventTarget",value:function(e){return this.allListeners.filter((function(t){if(t.element===e)return t}))}},{key:"findByType",value:function(e){return this.allListeners.filter((function(t){if(t.eventType===e)return t}))}},{key:"findByHandler",value:function(e){return this.allListeners.filter((function(t){if(t.handler===e)return t}))}},{key:"findById",value:function(e){return this.allListeners.find((function(t){return t.id===e}))}}]),e}();o.default=u,u.displayName="Listeners",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(8),n(111),n(9),n(60)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v){"use strict";var y=n(1);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=y(r),i=y(i),s=y(s),l=y(l),c=y(c),u=y(u),f=y(f),d=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(d),p=y(p),h=y(h),v=y(v);var m=function(e){(0,c.default)(n,e);var t=b(n);function n(){var e;return(0,s.default)(this,n),(e=t.apply(this,arguments)).insert=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.config.defaultBlock,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=arguments.length>3?arguments[3]:void 0,r=arguments.length>4?arguments[4]:void 0,i=arguments.length>5?arguments[5]:void 0,a=arguments.length>6?arguments[6]:void 0,s=e.Editor.BlockManager.insert({id:a,tool:t,data:n,index:o,needToFocus:r,replace:i});return new p.default(s)},e.composeBlockData=function(){var t=(0,i.default)(r.default.mark((function t(n){var o,i;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return o=e.Editor.Tools.blockTools.get(n),i=new v.default({tool:o,api:e.Editor.API,readOnly:!0,data:{},tunesData:{}}),t.abrupt("return",i.data);case 3:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e.update=function(t,n){var o=e.Editor.BlockManager,r=o.getBlockById(t);if(r){var i=o.getBlockIndex(r);o.insert({id:r.id,tool:r.name,data:n,index:i,replace:!0,tunes:r.tunes})}else d.log("blocks.update(): Block with passed id was not found","warn")},e}return(0,l.default)(n,[{key:"methods",get:function(){var e=this;return{clear:function(){return e.clear()},render:function(t){return e.render(t)},renderFromHTML:function(t){return e.renderFromHTML(t)},delete:function(t){return e.delete(t)},swap:function(t,n){return e.swap(t,n)},move:function(t,n){return e.move(t,n)},getBlockByIndex:function(t){return e.getBlockByIndex(t)},getById:function(t){return e.getById(t)},getCurrentBlockIndex:function(){return e.getCurrentBlockIndex()},getBlockIndex:function(t){return e.getBlockIndex(t)},getBlocksCount:function(){return e.getBlocksCount()},stretchBlock:function(t){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return e.stretchBlock(t,n)},insertNewBlock:function(){return e.insertNewBlock()},insert:this.insert,update:this.update,composeBlockData:this.composeBlockData}}},{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockIndex",value:function(e){var t=this.Editor.BlockManager.getBlockById(e);if(t)return this.Editor.BlockManager.getBlockIndex(t);d.logLabeled("There is no block with id `"+e+"`","warn")}},{key:"getBlockByIndex",value:function(e){var t=this.Editor.BlockManager.getBlockByIndex(e);if(void 0!==t)return new p.default(t);d.logLabeled("There is no block at index `"+e+"`","warn")}},{key:"getById",value:function(e){var t=this.Editor.BlockManager.getBlockById(e);return void 0===t?(d.logLabeled("There is no block with id `"+e+"`","warn"),null):new p.default(t)}},{key:"swap",value:function(e,t){d.log("`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead","info"),this.Editor.BlockManager.swap(e,t)}},{key:"move",value:function(e,t){this.Editor.BlockManager.move(e,t)}},{key:"delete",value:function(e){try{this.Editor.BlockManager.removeBlock(e)}catch(e){return void d.logLabeled(e,"warn")}0===this.Editor.BlockManager.blocks.length&&this.Editor.BlockManager.insert(),this.Editor.BlockManager.currentBlock&&this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock,this.Editor.Caret.positions.END),this.Editor.Toolbar.close()}},{key:"clear",value:function(){this.Editor.BlockManager.clear(!0),this.Editor.InlineToolbar.close()}},{key:"render",value:function(e){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(e.blocks)}},{key:"renderFromHTML",value:function(e){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(e,!0)}},{key:"stretchBlock",value:function(e){var t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.deprecationAssert(!0,"blocks.stretchBlock()","BlockAPI");var n=this.Editor.BlockManager.getBlockByIndex(e);n&&(n.stretched=t)}},{key:"insertNewBlock",value:function(){d.log("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}}]),n}(h.default);o.default=m,m.displayName="BlocksAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).setToFirstBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.firstBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.firstBlock,t,n),!0)},e.setToLastBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.lastBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.lastBlock,t,n),!0)},e.setToPreviousBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.previousBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.previousBlock,t,n),!0)},e.setToNextBlock=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:e.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!e.Editor.BlockManager.nextBlock&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.nextBlock,t,n),!0)},e.setToBlock=function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e.Editor.Caret.positions.DEFAULT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!e.Editor.BlockManager.blocks[t]&&(e.Editor.Caret.setToBlock(e.Editor.BlockManager.blocks[t],n,o),!0)},e.focus=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return t?e.setToLastBlock(e.Editor.Caret.positions.END):e.setToFirstBlock(e.Editor.Caret.positions.START)},e}return(0,i.default)(n,[{key:"methods",get:function(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}]),n}((c=u(c)).default);o.default=d,d.displayName="CaretAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{emit:function(t,n){return e.emit(t,n)},off:function(t,n){return e.off(t,n)},on:function(t,n){return e.on(t,n)}}}},{key:"on",value:function(e,t){this.eventsDispatcher.on(e,t)}},{key:"emit",value:function(e,t){this.eventsDispatcher.emit(e,t)}},{key:"off",value:function(e,t){this.eventsDispatcher.off(e,t)}}]),n}((c=u(c)).default);o.default=d,d.displayName="EventsAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(53),n(8),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u,f){"use strict";var d=n(1);function p(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),a=d(a),s=d(s),l=d(l),c=d(c);var h=function(e){(0,a.default)(n,e);var t=p(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){return{t:function(){(0,u.logLabeled)("I18n.t() method can be accessed only from Tools","warn")}}}},{key:"getMethodsForTool",value:function(e){return Object.assign(this.methods,{t:function(t){return c.default.t(n.getNamespace(e),t)}})}}],[{key:"getNamespace",value:function(e){return e.isTune()?"blockTunes.".concat(e.name):"tools.".concat(e.name)}}]),n}((f=d(f)).default);o.default=h,h.displayName="I18nAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{close:function(){return e.close()},open:function(){return e.open()}}}},{key:"open",value:function(){this.Editor.InlineToolbar.tryToShow()}},{key:"close",value:function(){this.Editor.InlineToolbar.close()}}]),n}((c=u(c)).default);o.default=d,d.displayName="InlineToolbarAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{on:function(t,n,o,r){return e.on(t,n,o,r)},off:function(t,n,o,r){return e.off(t,n,o,r)},offById:function(t){return e.offById(t)}}}},{key:"on",value:function(e,t,n,o){return this.listeners.on(e,t,n,o)}},{key:"off",value:function(e,t,n,o){this.listeners.off(e,t,n,o)}},{key:"offById",value:function(e){this.listeners.offById(e)}}]),n}((c=u(c)).default);o.default=d,d.displayName="ListenersAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(377),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(e){var o,i=e.config,a=e.eventsDispatcher;return(0,r.default)(this,n),(o=t.call(this,{config:i,eventsDispatcher:a})).notifier=new c.default,o}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{show:function(t){return e.show(t)}}}},{key:"show",value:function(e){return this.notifier.show(e)}}]),n}((u=f(u)).default);o.default=p,p.displayName="NotifierAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{toggle:function(t){return e.toggle(t)},get isEnabled(){return e.isEnabled}}}},{key:"toggle",value:function(e){return this.Editor.ReadOnly.toggle(e)}},{key:"isEnabled",get:function(){return this.Editor.ReadOnly.isEnabled}}]),n}((c=u(c)).default);o.default=d,d.displayName="ReadOnlyAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{clean:function(t,n){return e.clean(t,n)}}}},{key:"clean",value:function(e,t){return(0,u.clean)(e,t)}}]),n}((c=f(c)).default);o.default=p,p.displayName="SanitizerAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(8),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(u);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{save:function(){return e.save()}}}},{key:"save",value:function(){var e="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(u.logLabeled(e,"warn"),Promise.reject(new Error(e))):this.Editor.Saver.save()}}]),n}((f=d(f)).default);o.default=v,v.displayName="SaverAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(25),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{findParentTag:function(t,n){return e.findParentTag(t,n)},expandToTag:function(t){return e.expandToTag(t)}}}},{key:"findParentTag",value:function(e,t){return(new c.default).findParentTag(e,t)}},{key:"expandToTag",value:function(e){(new c.default).expandToTag(e)}}]),n}((u=f(u)).default);o.default=p,p.displayName="SelectionAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"classes",get:function(){return{block:"cdx-block",inlineToolButton:"ce-inline-tool",inlineToolButtonActive:"ce-inline-tool--active",input:"cdx-input",loader:"cdx-loader",button:"cdx-button",settingsButton:"cdx-settings-button",settingsButtonActive:"cdx-settings-button--active"}}}]),n}((c=u(c)).default);o.default=d,d.displayName="StylesAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){var e=this;return{close:function(){return e.close()},open:function(){return e.open()},toggleBlockSettings:function(t){return e.toggleBlockSettings(t)}}}},{key:"open",value:function(){this.Editor.Toolbar.moveAndOpen()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"toggleBlockSettings",value:function(e){-1!==this.Editor.BlockManager.currentBlockIndex?(null!=e?e:!this.Editor.BlockSettings.opened)?(this.Editor.Toolbar.moveAndOpen(),this.Editor.BlockSettings.open()):this.Editor.BlockSettings.close():f.logLabeled("Could't toggle the Toolbar because there is no block selected ","warn")}}]),n}(u.default);o.default=v,v.displayName="ToolbarAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(113)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c),u=f(u);var p=function(e){(0,a.default)(n,e);var t=d(n);function n(e){var o,i=e.config,a=e.eventsDispatcher;return(0,r.default)(this,n),(o=t.call(this,{config:i,eventsDispatcher:a})).tooltip=new u.default,o}return(0,i.default)(n,[{key:"destroy",value:function(){this.tooltip.destroy()}},{key:"methods",get:function(){var e=this;return{show:function(t,n,o){return e.show(t,n,o)},hide:function(){return e.hide()},onHover:function(t,n,o){return e.onHover(t,n,o)}}}},{key:"show",value:function(e,t,n){this.tooltip.show(e,t,n)}},{key:"hide",value:function(){this.tooltip.hide()}},{key:"onHover",value:function(e,t,n){this.tooltip.onHover(e,t,n)}}]),n}(c.default);o.default=p,p.displayName="TooltipAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);function f(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,l.default)(e);if(t){var r=(0,l.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,s.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),a=u(a),s=u(s),l=u(l);var d=function(e){(0,a.default)(n,e);var t=f(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"methods",get:function(){return{nodes:this.editorNodes}}},{key:"editorNodes",get:function(){return{wrapper:this.Editor.UI.nodes.wrapper,redactor:this.Editor.UI.nodes.redactor}}}]),n}((c=u(c)).default);o.default=d,d.displayName="UiAPI",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8),n(25),n(66)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=h(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f),d=h(d),p=h(p);var g=function(e){(0,s.default)(n,e);var t=y(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"keydown",value:function(e){switch(this.beforeKeydownProcessing(e),e.keyCode){case f.keyCodes.BACKSPACE:this.backspace(e);break;case f.keyCodes.ENTER:this.enter(e);break;case f.keyCodes.DOWN:case f.keyCodes.RIGHT:this.arrowRightAndDown(e);break;case f.keyCodes.UP:case f.keyCodes.LEFT:this.arrowLeftAndUp(e);break;case f.keyCodes.TAB:this.tabPressed(e)}}},{key:"beforeKeydownProcessing",value:function(e){this.needToolbarClosing(e)&&f.isPrintableKey(e.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),e.ctrlKey||e.metaKey||e.altKey||e.shiftKey||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(e)))}},{key:"keyup",value:function(e){e.shiftKey||this.Editor.UI.checkEmptiness()}},{key:"tabPressed",value:function(e){this.Editor.BlockSelection.clearSelection(e);var t=this.Editor,n=t.BlockManager,o=t.InlineToolbar,r=t.ConversionToolbar,i=n.currentBlock;if(i){var a=i.isEmpty,s=i.tool.isDefault&&a,l=!a&&r.opened,c=!a&&!d.default.isCollapsed&&o.opened,u=!l&&!c;s?this.activateToolbox():u&&this.activateBlockSettings()}}},{key:"dragOver",value:function(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!0}},{key:"dragLeave",value:function(e){this.Editor.BlockManager.getBlockByChildNode(e.target).dropTarget=!1}},{key:"handleCommandC",value:function(e){var t=this.Editor.BlockSelection;t.anyBlockSelected&&t.copySelectedBlocks(e)}},{key:"handleCommandX",value:function(e){var t=this.Editor,n=t.BlockSelection,o=t.BlockManager,r=t.Caret;n.anyBlockSelected&&n.copySelectedBlocks(e).then((function(){var t=o.removeSelectedBlocks(),i=o.insertDefaultBlockAtIndex(t,!0);r.setToBlock(i,r.positions.START),n.clearSelection(e)}))}},{key:"enter",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.UI;if(!n.currentBlock.tool.isLineBreaksEnabled&&!(o.someToolbarOpened&&o.someFlipperButtonFocused||e.shiftKey)){var r=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):r=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(r),this.Editor.Toolbar.moveAndOpen(r),e.preventDefault()}}},{key:"backspace",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.BlockSelection,r=t.Caret,i=n.currentBlock,a=i.tool;if(i.selected||i.isEmpty&&i.currentInput===i.firstInput){e.preventDefault();var s=n.currentBlockIndex;return n.previousBlock&&0===n.previousBlock.inputs.length?n.removeBlock(s-1):n.removeBlock(),r.setToBlock(n.currentBlock,s?r.positions.END:r.positions.START),this.Editor.Toolbar.close(),void o.clearSelection(e)}if(!a.isLineBreaksEnabled||r.isAtStart){var l=0===n.currentBlockIndex;r.isAtStart&&d.default.isCollapsed&&i.currentInput===i.firstInput&&!l&&(e.preventDefault(),this.mergeBlocks())}}},{key:"mergeBlocks",value:function(){var e=this.Editor,t=e.BlockManager,n=e.Caret,o=e.Toolbar,r=t.previousBlock,i=t.currentBlock;if(i.name!==r.name||!r.mergeable)return 0===r.inputs.length||r.isEmpty?(t.removeBlock(t.currentBlockIndex-1),n.setToBlock(t.currentBlock),void o.close()):void(n.navigatePrevious()&&o.close());n.createShadow(r.pluginsContent),t.mergeBlocks(r,i).then((function(){n.restoreCaret(r.pluginsContent),r.pluginsContent.normalize(),o.close()}))}},{key:"arrowRightAndDown",value:function(e){var t=this,n=p.default.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===f.keyCodes.TAB);if(!this.Editor.UI.someToolbarOpened||!n){this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();var o=this.Editor.Caret.isAtEnd||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===f.keyCodes.DOWN&&o?this.Editor.CrossBlockSelection.toggleBlockSelectedState():((e.keyCode===f.keyCodes.DOWN||e.keyCode===f.keyCodes.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?e.preventDefault():f.delay((function(){t.Editor.BlockManager.currentBlock&&t.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}}},{key:"arrowLeftAndUp",value:function(e){var t=this;if(this.Editor.UI.someToolbarOpened){if(p.default.usedKeys.includes(e.keyCode)&&(!e.shiftKey||e.keyCode===f.keyCodes.TAB))return;this.Editor.UI.closeAllToolbars()}this.Editor.BlockManager.clearFocused(),this.Editor.Toolbar.close();var n=this.Editor.Caret.isAtStart||this.Editor.BlockSelection.anyBlockSelected;e.shiftKey&&e.keyCode===f.keyCodes.UP&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):((e.keyCode===f.keyCodes.UP||e.keyCode===f.keyCodes.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?e.preventDefault():f.delay((function(){t.Editor.BlockManager.currentBlock&&t.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(e))}},{key:"needToolbarClosing",value:function(e){var t=e.keyCode===f.keyCodes.ENTER&&this.Editor.Toolbar.toolbox.opened,n=e.keyCode===f.keyCodes.ENTER&&this.Editor.BlockSettings.opened,o=e.keyCode===f.keyCodes.ENTER&&this.Editor.InlineToolbar.opened,r=e.keyCode===f.keyCodes.ENTER&&this.Editor.ConversionToolbar.opened,i=e.keyCode===f.keyCodes.TAB;return!(e.shiftKey||i||t||n||o||r)}},{key:"activateToolbox",value:function(){this.Editor.Toolbar.opened||this.Editor.Toolbar.moveAndOpen(),this.Editor.Toolbar.toolbox.open()}},{key:"activateBlockSettings",value:function(){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.moveAndOpen()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}]),n}(u.default);o.default=g,g.displayName="BlockEvents",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(60),n(9),n(19),n(8),n(382),n(111),n(383)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b){"use strict";var m=n(1);function k(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(k=function(e){return e?n:t})(e)}function x(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=k(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=m(r),i=m(i),s=m(s),l=m(l),c=m(c),u=m(u),f=m(f),d=x(d),p=m(p),h=m(h),v=x(v),y=m(y),g=m(g);var S=function(e){(0,c.default)(a,e);var t,n,o=w(a);function a(){var e;return(0,s.default)(this,a),(e=o.apply(this,arguments))._currentBlockIndex=-1,e._blocks=null,e}return(0,l.default)(a,[{key:"currentBlockIndex",get:function(){return this._currentBlockIndex},set:function(e){this._blocks[this._currentBlockIndex]&&this._blocks[this._currentBlockIndex].willUnselect(),this._blocks[e]&&this._blocks[e].willSelect(),this._currentBlockIndex=e}},{key:"firstBlock",get:function(){return this._blocks[0]}},{key:"lastBlock",get:function(){return this._blocks[this._blocks.length-1]}},{key:"currentBlock",get:function(){return this._blocks[this.currentBlockIndex]},set:function(e){this.currentBlockIndex=this.getBlockIndex(e)}},{key:"nextBlock",get:function(){return this.currentBlockIndex===this._blocks.length-1?null:this._blocks[this.currentBlockIndex+1]}},{key:"nextContentfulBlock",get:function(){return this.blocks.slice(this.currentBlockIndex+1).find((function(e){return!!e.inputs.length}))}},{key:"previousContentfulBlock",get:function(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((function(e){return!!e.inputs.length}))}},{key:"previousBlock",get:function(){return 0===this.currentBlockIndex?null:this._blocks[this.currentBlockIndex-1]}},{key:"blocks",get:function(){return this._blocks.array}},{key:"isEditorEmpty",get:function(){return this.blocks.every((function(e){return e.isEmpty}))}},{key:"prepare",value:function(){var e=this,t=new y.default(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(t,{set:y.default.set,get:y.default.get}),this.listeners.on(document,"copy",(function(t){return e.Editor.BlockEvents.handleCommandC(t)}))}},{key:"toggleReadOnly",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:"composeBlock",value:function(e){var t=e.tool,n=e.data,o=void 0===n?{}:n,r=e.id,i=void 0===r?void 0:r,a=e.tunes,s=void 0===a?{}:a,l=this.Editor.ReadOnly.isEnabled,c=this.Editor.Tools.blockTools.get(t),u=new d.default({id:i,data:o,tool:c,api:this.Editor.API,readOnly:l,tunesData:s});return l||this.bindBlockEvents(u),u}},{key:"insert",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=void 0===t?void 0:t,o=e.tool,r=void 0===o?this.config.defaultBlock:o,i=e.data,a=void 0===i?{}:i,s=e.index,l=e.needToFocus,c=void 0===l||l,u=e.replace,f=void 0!==u&&u,d=e.tunes,p=void 0===d?{}:d,h=s;void 0===h&&(h=this.currentBlockIndex+(f?0:1));var v=this.composeBlock({id:n,tool:r,data:a,tunes:p});return f&&this.blockDidMutated(b.BlockMutationType.Removed,this.getBlockByIndex(h),{index:h}),this._blocks.insert(h,v,f),this.blockDidMutated(b.BlockMutationType.Added,v,{index:h}),c?this.currentBlockIndex=h:h<=this.currentBlockIndex&&this.currentBlockIndex++,v}},{key:"replace",value:function(e){var t=e.tool,n=void 0===t?this.config.defaultBlock:t,o=e.data,r=void 0===o?{}:o;return this.insert({tool:n,data:r,index:this.currentBlockIndex,replace:!0})}},{key:"paste",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.insert({tool:e,replace:n});try{o.call(d.BlockToolAPI.ON_PASTE,t)}catch(t){v.log("".concat(e,": onPaste callback call is failed"),"error",t)}return o}},{key:"insertDefaultBlockAtIndex",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[e]=n,this.blockDidMutated(b.BlockMutationType.Added,n,{index:e}),t?this.currentBlockIndex=e:e<=this.currentBlockIndex&&this.currentBlockIndex++,n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:(n=(0,i.default)(r.default.mark((function e(t,n){var o,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(o=this._blocks.indexOf(n),!n.isEmpty){e.next=3;break}return e.abrupt("return");case 3:return e.next=5,n.data;case 5:if(i=e.sent,v.isEmpty(i)){e.next=9;break}return e.next=9,t.mergeWith(i);case 9:this.removeBlock(o),this.currentBlockIndex=this._blocks.indexOf(t);case 11:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"removeBlock",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentBlockIndex;if(!this.validateIndex(e))throw new Error("Can't find a Block to remove");var t=this._blocks[e];t.destroy(),this._blocks.remove(e),this.blockDidMutated(b.BlockMutationType.Removed,t,{index:e}),this.currentBlockIndex>=e&&this.currentBlockIndex--,this.blocks.length?0===e&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,this.insert())}},{key:"removeSelectedBlocks",value:function(){for(var e,t=this.blocks.length-1;t>=0;t--)this.blocks[t].selected&&(this.removeBlock(t),e=t);return e}},{key:"removeAllBlocks",value:function(){for(var e=this.blocks.length-1;e>=0;e--)this._blocks.remove(e);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var e=this.Editor.Caret.extractFragmentFromCaretPosition(),t=h.default.make("div");e&&t.appendChild(e);var n={text:h.default.isEmpty(t)?"":t.innerHTML};return this.insert({data:n})}},{key:"getBlockByIndex",value:function(e){return-1===e&&(e=this._blocks.length-1),this._blocks[e]}},{key:"getBlockIndex",value:function(e){return this._blocks.indexOf(e)}},{key:"getBlockById",value:function(e){return this._blocks.array.find((function(t){return t.id===e}))}},{key:"getBlock",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=this._blocks.nodes,n=e.closest(".".concat(d.default.CSS.wrapper)),o=t.indexOf(n);if(o>=0)return this._blocks[o]}},{key:"highlightCurrentNode",value:function(){this.clearFocused(),this.currentBlock.focused=!0}},{key:"clearFocused",value:function(){this.blocks.forEach((function(e){e.focused=!1}))}},{key:"setCurrentBlockByChildNode",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=e.closest(".".concat(d.default.CSS.wrapper));if(t){var n=t.closest(".".concat(this.Editor.UI.CSS.editorWrapper));if(null==n?void 0:n.isEqualNode(this.Editor.UI.nodes.wrapper))return this.currentBlockIndex=this._blocks.nodes.indexOf(t),this.currentBlock.updateCurrentInput(),this.currentBlock}}},{key:"getBlockByChildNode",value:function(e){h.default.isElement(e)||(e=e.parentNode);var t=e.closest(".".concat(d.default.CSS.wrapper));return this.blocks.find((function(e){return e.holder===t}))}},{key:"swap",value:function(e,t){this._blocks.swap(e,t),this.currentBlockIndex=t}},{key:"move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.currentBlockIndex;isNaN(e)||isNaN(t)?v.log("Warning during 'move' call: incorrect indices provided.","warn"):this.validateIndex(e)&&this.validateIndex(t)?(this._blocks.move(e,t),this.currentBlockIndex=e,this.blockDidMutated(b.BlockMutationType.Moved,this.currentBlock,{fromIndex:t,toIndex:e})):v.log("Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.","warn")}},{key:"dropPointer",value:function(){this.currentBlockIndex=-1,this.clearFocused()}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),e&&this.insert(),this.Editor.UI.checkEmptiness()}},{key:"destroy",value:(t=(0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Promise.all(this.blocks.map((function(e){return e.destroy()})));case 2:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"bindBlockEvents",value:function(e){var t=this,n=this.Editor.BlockEvents;this.readOnlyMutableListeners.on(e.holder,"keydown",(function(e){n.keydown(e)})),this.readOnlyMutableListeners.on(e.holder,"keyup",(function(e){n.keyup(e)})),this.readOnlyMutableListeners.on(e.holder,"dragover",(function(e){n.dragOver(e)})),this.readOnlyMutableListeners.on(e.holder,"dragleave",(function(e){n.dragLeave(e)})),e.on("didMutated",(function(e){return t.blockDidMutated(b.BlockMutationType.Changed,e,{index:t.getBlockIndex(e)})}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"enableModuleBindings",value:function(){var e=this;this.readOnlyMutableListeners.on(document,"cut",(function(t){return e.Editor.BlockEvents.handleCommandX(t)})),this.blocks.forEach((function(t){e.bindBlockEvents(t)}))}},{key:"validateIndex",value:function(e){return!(e<0||e>=this._blocks.length)}},{key:"blockDidMutated",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=new CustomEvent(e,{detail:Object.assign({target:new g.default(t)},n)});return this.Editor.ModificationsObserver.onChange(o),t}}]),a}(p.default);o.default=S,S.displayName="BlockManager",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8),n(19),n(114),n(25),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v){"use strict";var y=n(1);function g(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(g=function(e){return e?n:t})(e)}function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=y(r),i=y(i),s=y(s),l=y(l),c=y(c),u=y(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=g(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f),d=y(d),p=y(p),h=y(h);var m=function(e){(0,s.default)(n,e);var t=b(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).anyBlockSelectedCache=null,e.needToSelectAll=!1,e.nativeInputSelected=!1,e.readyToBlockSelection=!1,e}return(0,i.default)(n,[{key:"sanitizerConfig",get:function(){return{p:{},h1:{},h2:{},h3:{},h4:{},h5:{},h6:{},ol:{},ul:{},li:{},br:!0,img:{src:!0,width:!0,height:!0},a:{href:!0},b:{},i:{},u:{}}}},{key:"allBlocksSelected",get:function(){return this.Editor.BlockManager.blocks.every((function(e){return!0===e.selected}))},set:function(e){this.Editor.BlockManager.blocks.forEach((function(t){t.selected=e})),this.clearCache()}},{key:"anyBlockSelected",get:function(){var e=this.Editor.BlockManager;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=e.blocks.some((function(e){return!0===e.selected}))),this.anyBlockSelectedCache}},{key:"selectedBlocks",get:function(){return this.Editor.BlockManager.blocks.filter((function(e){return e.selected}))}},{key:"prepare",value:function(){var e=this;this.selection=new h.default,p.default.add({name:"CMD+A",handler:function(t){var n=e.Editor,o=n.BlockManager;if(n.ReadOnly.isEnabled)return t.preventDefault(),void e.selectAllBlocks();o.currentBlock&&e.handleCommandA(t)},on:this.Editor.UI.nodes.redactor})}},{key:"toggleReadOnly",value:function(){h.default.get().removeAllRanges(),this.allBlocksSelected=!1}},{key:"unSelectBlockByIndex",value:function(e){var t=this.Editor.BlockManager;(isNaN(e)?t.currentBlock:t.getBlockByIndex(e)).selected=!1,this.clearCache()}},{key:"clearSelection",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.Editor,o=n.BlockManager,r=n.Caret,i=n.RectangleSelection;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;var a=e&&e instanceof KeyboardEvent,s=a&&f.isPrintableKey(e.keyCode);if(this.anyBlockSelected&&a&&s&&!h.default.isSelectionExists){var l=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(l,!0),r.setToBlock(o.currentBlock),f.delay((function(){var t=e.key;r.insertContentAtCaretPosition(t.length>1?"":t)}),20)()}this.Editor.CrossBlockSelection.clear(e),this.anyBlockSelected&&!i.isRectActivated()?(t&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}},{key:"copySelectedBlocks",value:function(e){var t=this;e.preventDefault();var n=d.default.make("div");this.selectedBlocks.forEach((function(e){var o=(0,v.clean)(e.holder.innerHTML,t.sanitizerConfig),r=d.default.make("p");r.innerHTML=o,n.appendChild(r)}));var o=Array.from(n.childNodes).map((function(e){return e.textContent})).join("\n\n"),r=n.innerHTML;return e.clipboardData.setData("text/plain",o),e.clipboardData.setData("text/html",r),Promise.all(this.selectedBlocks.map((function(e){return e.save()}))).then((function(n){try{e.clipboardData.setData(t.Editor.Paste.MIME_TYPE,JSON.stringify(n))}catch(e){}}))}},{key:"selectBlockByIndex",value:function(e){var t,n=this.Editor.BlockManager;n.clearFocused(),t=isNaN(e)?n.currentBlock:n.getBlockByIndex(e),this.selection.save(),h.default.get().removeAllRanges(),t.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}},{key:"clearCache",value:function(){this.anyBlockSelectedCache=null}},{key:"destroy",value:function(){p.default.remove(this.Editor.UI.nodes.redactor,"CMD+A")}},{key:"handleCommandA",value:function(e){if(this.Editor.RectangleSelection.clearSelection(),!d.default.isNativeInput(e.target)||this.readyToBlockSelection){var t=this.Editor.BlockManager.getBlock(e.target).inputs;t.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==t.length||this.needToSelectAll?this.needToSelectAll?(e.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(e.preventDefault(),this.selectBlockByIndex(),this.needToSelectAll=!0):this.needToSelectAll=!0}else this.readyToBlockSelection=!0}},{key:"selectAllBlocks",value:function(){this.selection.save(),h.default.get().removeAllRanges(),this.allBlocksSelected=!0,this.Editor.InlineToolbar.close()}}]),n}(u.default);o.default=m,m.displayName="BlockSelection",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(25),n(9),n(19),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}function y(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=h(u),f=h(f),d=h(d),p=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(p);var g=function(e){(0,s.default)(n,e);var t=y(n);function n(){return(0,r.default)(this,n),t.apply(this,arguments)}return(0,i.default)(n,[{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"isAtStart",get:function(){var e=u.default.get(),t=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput),n=e.focusNode;if(d.default.isNativeInput(t))return 0===t.selectionEnd;if(!e.anchorNode)return!1;var o=n.textContent.search(/\S/);-1===o&&(o=0);var r=e.focusOffset;return n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[r]?(n=n.childNodes[r],r=0):r=(n=n.childNodes[r-1]).textContent.length),!(!d.default.isLineBreakTag(t)&&!d.default.isEmpty(t)||!this.getHigherLevelSiblings(n,"left").every((function(e){var t=d.default.isLineBreakTag(e),n=1===e.children.length&&d.default.isLineBreakTag(e.children[0]),o=t||n;return d.default.isEmpty(e)&&!o}))||r!==o)||(null===t||n===t&&r<=o)}},{key:"isAtEnd",get:function(){var e=u.default.get(),t=e.focusNode,n=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(d.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(!e.focusNode)return!1;var o=e.focusOffset;if(t.nodeType!==Node.TEXT_NODE&&t.childNodes.length&&(t.childNodes[o-1]?o=(t=t.childNodes[o-1]).textContent.length:(t=t.childNodes[0],o=0)),d.default.isLineBreakTag(n)||d.default.isEmpty(n)){var r=this.getHigherLevelSiblings(t,"right");if(r.every((function(e,t){return t===r.length-1&&d.default.isLineBreakTag(e)||d.default.isEmpty(e)&&!d.default.isLineBreakTag(e)}))&&o===t.textContent.length)return!0}var i=n.textContent.replace(/\s+$/,"");return t===n&&o>=i.length}},{key:"setToBlock",value:function(e){var t,n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,i=this.Editor.BlockManager;switch(o){case this.positions.START:t=e.firstInput;break;case this.positions.END:t=e.lastInput;break;default:t=e.currentInput}if(t){var a=d.default.getDeepestNode(t,o===this.positions.END),s=d.default.getContentLength(a);switch(!0){case o===this.positions.START:r=0;break;case o===this.positions.END:case r>s:r=s}p.delay((function(){n.set(a,r)}),20)(),i.setCurrentBlockByChildNode(e.holder),i.currentBlock.currentInput=t}}},{key:"setToInput",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,o=this.Editor.BlockManager.currentBlock,r=d.default.getDeepestNode(e);switch(t){case this.positions.START:this.set(r,0);break;case this.positions.END:this.set(r,d.default.getContentLength(r));break;default:n&&this.set(r,n)}o.currentInput=e}},{key:"set",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=u.default.setCursor(e,t),o=n.top,r=n.bottom,i=window,a=i.innerHeight;o<0&&window.scrollBy(0,o),r>a&&window.scrollBy(0,r-a)}},{key:"setToTheLastBlock",value:function(){var e=this.Editor.BlockManager.lastBlock;if(e)if(e.tool.isDefault&&e.isEmpty)this.setToBlock(e);else{var t=this.Editor.BlockManager.insertAtEnd();this.setToBlock(t)}}},{key:"extractFragmentFromCaretPosition",value:function(){var e=u.default.get();if(e.rangeCount){var t=e.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(t.deleteContents(),n){if(d.default.isNativeInput(n)){var o=n,r=document.createDocumentFragment(),i=o.value.substring(0,o.selectionStart),a=o.value.substring(o.selectionStart);return r.textContent=a,o.value=i,r}var s=t.cloneRange();return s.selectNodeContents(n),s.setStart(t.endContainer,t.endOffset),s.extractContents()}}}},{key:"navigateNext",value:function(){var e=this.Editor.BlockManager,t=e.currentBlock,n=e.nextContentfulBlock,o=t.nextInput,r=this.isAtEnd,i=n;if(!i&&!o){if(t.tool.isDefault||!r)return!1;i=e.insertAtEnd()}return!!r&&(o?this.setToInput(o,this.positions.START):this.setToBlock(i,this.positions.START),!0)}},{key:"navigatePrevious",value:function(){var e=this.Editor.BlockManager,t=e.currentBlock,n=e.previousContentfulBlock;if(!t)return!1;var o=t.previousInput;return!(!n&&!o||!this.isAtStart||(o?this.setToInput(o,this.positions.END):this.setToBlock(n,this.positions.END),0))}},{key:"createShadow",value:function(e){var t=document.createElement("span");t.classList.add(n.CSS.shadowCaret),e.insertAdjacentElement("beforeend",t)}},{key:"restoreCaret",value:function(e){var t=e.querySelector(".".concat(n.CSS.shadowCaret));t&&((new u.default).expandToTag(t),setTimeout((function(){var e=document.createRange();e.selectNode(t),e.extractContents()}),50))}},{key:"insertContentAtCaretPosition",value:function(e){var t=document.createDocumentFragment(),n=document.createElement("div"),o=u.default.get(),r=u.default.range;n.innerHTML=e,Array.from(n.childNodes).forEach((function(e){return t.appendChild(e)})),0===t.childNodes.length&&t.appendChild(new Text);var i=t.lastChild;r.deleteContents(),r.insertNode(t);var a=document.createRange();a.setStart(i,i.textContent.length),o.removeAllRanges(),o.addRange(a)}},{key:"getHigherLevelSiblings",value:function(e,t){for(var n=e,o=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var r="left"===t?"previousSibling":"nextSibling";n[r];)n=n[r],o.push(n);return o}}],[{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),n}(f.default);o.default=g,g.displayName="Caret",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(25),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h){"use strict";var v=n(1);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=v(r),i=v(i),s=v(s),l=v(l),c=v(c),u=v(u),f=v(f),d=v(d),p=v(p),h=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=y(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(h);var b=function(e){(0,c.default)(o,e);var t,n=g(o);function o(){var e;return(0,s.default)(this,o),(e=n.apply(this,arguments)).onMouseUp=function(){e.listeners.off(document,"mouseover",e.onMouseOver),e.listeners.off(document,"mouseup",e.onMouseUp)},e.onMouseOver=function(t){var n=e.Editor,o=n.BlockManager,r=n.BlockSelection,i=o.getBlockByChildNode(t.relatedTarget)||e.lastSelectedBlock,a=o.getBlockByChildNode(t.target);if(i&&a&&a!==i){if(i===e.firstSelectedBlock)return p.default.get().removeAllRanges(),i.selected=!0,a.selected=!0,void r.clearCache();if(a===e.firstSelectedBlock)return i.selected=!1,a.selected=!1,void r.clearCache();e.Editor.InlineToolbar.close(),e.toggleBlocksSelectedState(i,a),e.lastSelectedBlock=a}},e}return(0,l.default)(o,[{key:"prepare",value:(t=(0,i.default)(r.default.mark((function e(){var t=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.listeners.on(document,"mousedown",(function(e){t.enableCrossBlockSelection(e)}));case 1:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"watchSelection",value:function(e){if(e.button===h.mouseButtons.LEFT){var t=this.Editor.BlockManager;this.firstSelectedBlock=t.getBlock(e.target),this.lastSelectedBlock=this.firstSelectedBlock,this.listeners.on(document,"mouseover",this.onMouseOver),this.listeners.on(document,"mouseup",this.onMouseUp)}}},{key:"isCrossBlockSelectionStarted",get:function(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}},{key:"toggleBlockSelectedState",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=this.Editor,n=t.BlockManager,o=t.BlockSelection;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=n.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),p.default.get().removeAllRanges());var r=n.blocks.indexOf(this.lastSelectedBlock)+(e?1:-1),i=n.blocks[r];i&&(this.lastSelectedBlock.selected!==i.selected?(i.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=i,this.Editor.InlineToolbar.close(),i.holder.scrollIntoView({block:"nearest"}))}},{key:"clear",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.BlockSelection,r=t.Caret,i=n.blocks.indexOf(this.firstSelectedBlock),a=n.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&i>-1&&a>-1)if(e&&e instanceof KeyboardEvent)switch(e.keyCode){case h.keyCodes.DOWN:case h.keyCodes.RIGHT:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);break;case h.keyCodes.UP:case h.keyCodes.LEFT:r.setToBlock(n.blocks[Math.min(i,a)],r.positions.START);break;default:r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END)}else r.setToBlock(n.blocks[Math.max(i,a)],r.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}},{key:"enableCrossBlockSelection",value:function(e){var t=this.Editor.UI;p.default.isCollapsed||this.Editor.BlockSelection.clearSelection(e),t.nodes.redactor.contains(e.target)?this.watchSelection(e):this.Editor.BlockSelection.clearSelection(e)}},{key:"toggleBlocksSelectedState",value:function(e,t){for(var n=this.Editor,o=n.BlockManager,r=n.BlockSelection,i=o.blocks.indexOf(e),a=o.blocks.indexOf(t),s=e.selected!==t.selected,l=Math.min(i,a);l<=Math.max(i,a);l++){var c=o.blocks[l];c!==this.firstSelectedBlock&&c!==(s?e:t)&&(o.blocks[l].selected=!o.blocks[l].selected,r.clearCache())}}}]),o}(d.default);o.default=b,b.displayName="CrossBlockSelection",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(5),n(6),n(4),n(25),n(9)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u,f,d){"use strict";var p=n(1);function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,u.default)(e);if(t){var r=(0,u.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,c.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=p(r),i=p(i),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),f=p(f);var v=function(e){(0,l.default)(o,e);var t,n=h(o);function o(){var e;return(0,a.default)(this,o),(e=n.apply(this,arguments)).isStartedAtEditor=!1,e}return(0,s.default)(o,[{key:"toggleReadOnly",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:"enableModuleBindings",value:function(){var e=this,t=this.Editor.UI;this.readOnlyMutableListeners.on(t.nodes.holder,"drop",function(){var t=(0,i.default)(r.default.mark((function t(n){return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e.processDrop(n);case 2:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),!0),this.readOnlyMutableListeners.on(t.nodes.holder,"dragstart",(function(){e.processDragStart()})),this.readOnlyMutableListeners.on(t.nodes.holder,"dragover",(function(t){e.processDragOver(t)}),!0)}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"processDrop",value:(t=(0,i.default)(r.default.mark((function e(t){var n,o,i,a,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.Editor,o=n.BlockManager,i=n.Caret,a=n.Paste,t.preventDefault(),o.blocks.forEach((function(e){e.dropTarget=!1})),f.default.isAtEditor&&!f.default.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1,(s=o.setCurrentBlockByChildNode(t.target))?this.Editor.Caret.setToBlock(s,i.positions.END):(l=o.setCurrentBlockByChildNode(o.lastBlock.holder),this.Editor.Caret.setToBlock(l,i.positions.END)),e.next=9,a.processDataTransfer(t.dataTransfer,!0);case 9:case"end":return e.stop()}}),e,this)}))),function(e){return t.apply(this,arguments)})},{key:"processDragStart",value:function(){f.default.isAtEditor&&!f.default.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}},{key:"processDragOver",value:function(e){e.preventDefault()}}]),o}((d=p(d)).default);o.default=v,v.displayName="DragNDrop",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}function h(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),l=d(l),c=d(c),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var v=function(e){(0,s.default)(n,e);var t=h(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).disabled=!1,e}return(0,i.default)(n,[{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"onChange",value:function(e){!this.disabled&&f.isFunction(this.config.onChange)&&this.config.onChange(this.Editor.API.methods,e)}}]),n}(u.default);o.default=v,v.displayName="ModificationsObserver",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(40),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g){"use strict";var b=n(1);function m(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(m=function(e){return e?n:t})(e)}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=b(r),i=b(i),s=b(s),l=b(l),c=b(c),u=b(u),f=b(f),d=b(d),p=b(p),h=b(h),v=b(v),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=m(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y);var x=function(e){(0,f.default)(x,e);var t,n,o,a,d,p,h,b,m=k(x);function x(){var e;return(0,c.default)(this,x),(e=m.apply(this,arguments)).MIME_TYPE="application/x-editor-js",e.toolsTags={},e.tagsByTool={},e.toolsPatterns=[],e.toolsFiles={},e.exceptionList=[],e.processTool=function(t){try{var n=t.create({},{},!1);if(!1===t.pasteConfig)return void e.exceptionList.push(t.name);if(!y.isFunction(n.onPaste))return;e.getTagsConfig(t),e.getFilesConfig(t),e.getPatternsConfig(t)}catch(e){y.log("Paste handling for «".concat(t.name,"» Tool hasn't been set up because of the error"),"warn",e)}},e.handlePasteEvent=function(){var t=(0,l.default)(r.default.mark((function t(n){var o,i,a;return r.default.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(o=e.Editor,i=o.BlockManager,a=o.Toolbar,i.currentBlock&&(!e.isNativeBehaviour(n.target)||n.clipboardData.types.includes("Files"))){t.next=3;break}return t.abrupt("return");case 3:if(!i.currentBlock||!e.exceptionList.includes(i.currentBlock.name)){t.next=5;break}return t.abrupt("return");case 5:n.preventDefault(),e.processDataTransfer(n.clipboardData),i.clearFocused(),a.close();case 9:case"end":return t.stop()}}),t)})));return function(e){return t.apply(this,arguments)}}(),e}return(0,u.default)(x,[{key:"prepare",value:(b=(0,l.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.processTools();case 1:case"end":return e.stop()}}),e,this)}))),function(){return b.apply(this,arguments)})},{key:"toggleReadOnly",value:function(e){e?this.unsetCallback():this.setCallback()}},{key:"processDataTransfer",value:(h=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,l,c,u,f,d,p,h=this,b=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=b.length>1&&void 0!==b[1]&&b[1],o=this.Editor.Tools,!((i=t.types).includes?i.includes("Files"):i.contains("Files"))||y.isEmpty(this.toolsFiles)){e.next=8;break}return e.next=7,this.processFiles(t.files);case 7:return e.abrupt("return");case 8:if(a=t.getData(this.MIME_TYPE),s=t.getData("text/plain"),l=t.getData("text/html"),(c=document.createElement("div")).innerHTML=l,c.querySelectorAll("*").forEach((function(e){e instanceof HTMLElement&&(e.style.color="inherit",e.style.fontFamily="inherit",e.style.fontSize="inherit",e.style.backgroundColor="initial")})),u=c.innerHTML,l=u,!a){e.next=24;break}return e.prev=17,this.insertEditorJSData(JSON.parse(a)),e.abrupt("return");case 22:e.prev=22,e.t0=e.catch(17);case 24:if(n&&s.trim()&&l.trim()&&(l="

"+(l.trim()?l:s)+"

"),f=Object.keys(this.toolsTags).reduce((function(e,t){var n;return e[t.toLowerCase()]=null!==(n=h.toolsTags[t].sanitizationConfig)&&void 0!==n?n:{},e}),{}),d=Object.assign({},f,o.getAllInlineToolsSanitizeConfig(),{br:{}}),(p=(0,g.clean)(l,d)).trim()&&p.trim()!==s&&v.default.isHTMLString(p)){e.next=33;break}return e.next=31,this.processText(s);case 31:e.next=35;break;case 33:return e.next=35,this.processText(p,!0);case 35:case"end":return e.stop()}}),e,this,[[17,22]])}))),function(e){return h.apply(this,arguments)})},{key:"processText",value:(p=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,c,u,f=this,d=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=d.length>1&&void 0!==d[1]&&d[1],o=this.Editor,i=o.Caret,a=o.BlockManager,(s=n?this.processHTML(t):this.processPlain(t)).length){e.next=5;break}return e.abrupt("return");case 5:if(1!==s.length){e.next=8;break}return s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop()),e.abrupt("return");case 8:c=a.currentBlock&&a.currentBlock.tool.isDefault,u=c&&a.currentBlock.isEmpty,s.map(function(){var e=(0,l.default)(r.default.mark((function e(t,n){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.abrupt("return",f.insertBlock(t,0===n&&u));case 1:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}()),a.currentBlock&&i.setToBlock(a.currentBlock,i.positions.END);case 12:case"end":return e.stop()}}),e,this)}))),function(e){return p.apply(this,arguments)})},{key:"setCallback",value:function(){this.listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"unsetCallback",value:function(){this.listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var e=this.Editor.Tools.blockTools;Array.from(e.values()).forEach(this.processTool)}},{key:"collectTagNames",value:function(e){return y.isString(e)?[e]:y.isObject(e)?Object.keys(e):[]}},{key:"getTagsConfig",value:function(e){var t=this,n=e.pasteConfig.tags||[],o=[];n.forEach((function(n){var r=t.collectTagNames(n);o.push.apply(o,(0,s.default)(r)),r.forEach((function(o){if(Object.prototype.hasOwnProperty.call(t.toolsTags,o))y.log("Paste handler for «".concat(e.name,"» Tool on «").concat(o,"» tag is skipped ")+"because it is already used by «".concat(t.toolsTags[o].tool.name,"» Tool."),"warn");else{var r=y.isObject(n)?n[o]:null;t.toolsTags[o.toUpperCase()]={tool:e,sanitizationConfig:r}}}))})),this.tagsByTool[e.name]=o.map((function(e){return e.toUpperCase()}))}},{key:"getFilesConfig",value:function(e){var t=e.pasteConfig.files,n=void 0===t?{}:t,o=n.extensions,r=n.mimeTypes;(o||r)&&(o&&!Array.isArray(o)&&(y.log("«extensions» property of the onDrop config for «".concat(e.name,"» Tool should be an array")),o=[]),r&&!Array.isArray(r)&&(y.log("«mimeTypes» property of the onDrop config for «".concat(e.name,"» Tool should be an array")),r=[]),r&&(r=r.filter((function(t){return!!y.isValidMimeType(t)||(y.log("MIME type value «".concat(t,"» for the «").concat(e.name,"» Tool is not a valid MIME type"),"warn"),!1)}))),this.toolsFiles[e.name]={extensions:o||[],mimeTypes:r||[]})}},{key:"getPatternsConfig",value:function(e){var t=this;e.pasteConfig.patterns&&!y.isEmpty(e.pasteConfig.patterns)&&Object.entries(e.pasteConfig.patterns).forEach((function(n){var o=(0,i.default)(n,2),r=o[0],a=o[1];a instanceof RegExp||y.log("Pattern ".concat(a," for «").concat(e.name,"» Tool is skipped because it should be a Regexp instance."),"warn"),t.toolsPatterns.push({key:r,pattern:a,tool:e})}))}},{key:"isNativeBehaviour",value:function(e){return v.default.isNativeInput(e)}},{key:"processFiles",value:(d=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.Editor.BlockManager,e.next=3,Promise.all(Array.from(t).map((function(e){return s.processFile(e)})));case 3:o=(o=e.sent).filter((function(e){return!!e})),i=n.currentBlock.tool.isDefault,a=i&&n.currentBlock.isEmpty,o.forEach((function(e,t){n.paste(e.type,e.event,0===t&&a)}));case 8:case"end":return e.stop()}}),e,this)}))),function(e){return d.apply(this,arguments)})},{key:"processFile",value:(a=(0,l.default)(r.default.mark((function e(t){var n,o,a,s,l;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=y.getFileExtension(t),o=Object.entries(this.toolsFiles).find((function(e){var o=(0,i.default)(e,2),r=(o[0],o[1]),a=r.mimeTypes,s=r.extensions,l=t.type.split("/"),c=(0,i.default)(l,2),u=c[0],f=c[1],d=s.find((function(e){return e.toLowerCase()===n.toLowerCase()})),p=a.find((function(e){var t=e.split("/"),n=(0,i.default)(t,2),o=n[0],r=n[1];return o===u&&(r===f||"*"===r)}));return!!d||!!p}))){e.next=4;break}return e.abrupt("return");case 4:return a=(0,i.default)(o,1),s=a[0],l=this.composePasteEvent("file",{file:t}),e.abrupt("return",{event:l,type:s});case 7:case"end":return e.stop()}}),e,this)}))),function(e){return a.apply(this,arguments)})},{key:"processHTML",value:function(e){var t=this,n=this.Editor.Tools,o=v.default.make("DIV");return o.innerHTML=e,this.getNodes(o).map((function(e){var o,r=n.defaultTool,i=!1;switch(e.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(o=v.default.make("div")).appendChild(e);break;case Node.ELEMENT_NODE:o=e,i=!0,t.toolsTags[o.tagName]&&(r=t.toolsTags[o.tagName].tool)}var a=r.pasteConfig.tags.reduce((function(e,n){return t.collectTagNames(n).forEach((function(t){var o=y.isObject(n)?n[t]:null;e[t]=o||{}})),e}),{}),s=Object.assign({},a,r.baseSanitizeConfig);if("table"===o.tagName.toLowerCase()){var l=(0,g.clean)(o.outerHTML,s);o=v.default.make("div",void 0,{innerHTML:l}).firstChild}else o.innerHTML=(0,g.clean)(o.innerHTML,s);var c=t.composePasteEvent("tag",{data:o});return{content:o,isBlock:i,tool:r.name,event:c}})).filter((function(e){var t=v.default.isEmpty(e.content),n=v.default.isSingleTag(e.content);return!t||n}))}},{key:"processPlain",value:function(e){var t=this,n=this.config.defaultBlock;if(!e)return[];var o=n;return e.split(/\r?\n/).filter((function(e){return e.trim()})).map((function(e){var n=v.default.make("div");n.textContent=e;var r=t.composePasteEvent("tag",{data:n});return{content:n,tool:o,isBlock:!1,event:r}}))}},{key:"processSingleBlock",value:(o=(0,l.default)(r.default.mark((function e(t){var n,o,i,a;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.Editor,o=n.Caret,i=n.BlockManager,(a=i.currentBlock)&&t.tool===a.name&&v.default.containsOnlyInlineElements(t.content.innerHTML)){e.next=5;break}return this.insertBlock(t,(null==a?void 0:a.tool.isDefault)&&a.isEmpty),e.abrupt("return");case 5:o.insertContentAtCaretPosition(t.content.innerHTML);case 6:case"end":return e.stop()}}),e,this)}))),function(e){return o.apply(this,arguments)})},{key:"processInlinePaste",value:(n=(0,l.default)(r.default.mark((function e(t){var n,o,i,a,s,l,c,u;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.Editor,o=n.BlockManager,i=n.Caret,a=t.content,!(o.currentBlock&&o.currentBlock.tool.isDefault&&a.textContent.length1&&void 0!==arguments[1]&&arguments[1],o=this.Editor,r=o.BlockManager,i=o.Caret,a=r.currentBlock;if(n&&a&&a.isEmpty)return t=r.paste(e.tool,e.event,!0),void i.setToBlock(t,i.positions.END);t=r.paste(e.tool,e.event),i.setToBlock(t,i.positions.END)}},{key:"insertEditorJSData",value:function(e){var t=this.Editor,n=t.BlockManager,o=t.Caret,r=t.Tools;(0,g.sanitizeBlocks)(e,(function(e){return r.blockTools.get(e).sanitizeConfig})).forEach((function(e,t){var r=e.tool,i=e.data,a=!1;0===t&&(a=n.currentBlock&&n.currentBlock.tool.isDefault&&n.currentBlock.isEmpty);var s=n.insert({tool:r,data:i,replace:a});o.setToBlock(s,o.positions.END)}))}},{key:"processElementNode",value:function(e,t,n){var o=Object.keys(this.toolsTags),r=e,i=(this.toolsTags[r.tagName]||{}).tool,a=this.tagsByTool[null==i?void 0:i.name]||[],l=o.includes(r.tagName),c=v.default.blockElements.includes(r.tagName.toLowerCase()),u=Array.from(r.children).some((function(e){var t=e.tagName;return o.includes(t)&&!a.includes(t)})),f=Array.from(r.children).some((function(e){var t=e.tagName;return v.default.blockElements.includes(t.toLowerCase())}));return c||l||u?l&&!u||c&&!f&&!u?[].concat((0,s.default)(t),[n,r]):void 0:(n.appendChild(r),[].concat((0,s.default)(t),[n]))}},{key:"getNodes",value:function(e){var t,n=this;return Array.from(e.childNodes).reduce((function e(o,r){if(v.default.isEmpty(r)&&!v.default.isSingleTag(r))return o;var i=o[o.length-1],a=new DocumentFragment;switch(i&&v.default.isFragment(i)&&(a=o.pop()),r.nodeType){case Node.ELEMENT_NODE:if(t=n.processElementNode(r,o,a))return t;break;case Node.TEXT_NODE:return a.appendChild(r),[].concat((0,s.default)(o),[a]);default:return[].concat((0,s.default)(o),[a])}return[].concat((0,s.default)(o),(0,s.default)(Array.from(r.childNodes).reduce(e,[])))}),[])}},{key:"composePasteEvent",value:function(e,t){return new CustomEvent(e,{detail:t})}}]),x}(h.default);o.default=x,x.displayName="Paste",x.PATTERN_PROCESSING_MAX_LENGTH=450,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(149)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,f.default)(e);if(t){var r=(0,f.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,u.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),f=h(f);var y=function(e){(0,c.default)(u,e);var t,n,o=v(u);function u(){var e;return(0,s.default)(this,u),(e=o.apply(this,arguments)).toolsDontSupportReadOnly=[],e.readOnlyEnabled=!1,e}return(0,l.default)(u,[{key:"isEnabled",get:function(){return this.readOnlyEnabled}},{key:"prepare",value:(n=(0,a.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:t=this.Editor.Tools,n=t.blockTools,o=[],Array.from(n.entries()).forEach((function(e){var t=(0,i.default)(e,2),n=t[0];t[1].isReadOnlySupported||o.push(n)})),this.toolsDontSupportReadOnly=o,this.config.readOnly&&o.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly);case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"toggle",value:(t=(0,a.default)(r.default.mark((function e(){var t,n,o,i,a=arguments;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:(t=a.length>0&&void 0!==a[0]?a[0]:!this.readOnlyEnabled)&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError(),n=this.readOnlyEnabled,this.readOnlyEnabled=t,e.t0=r.default.keys(this.Editor);case 5:if((e.t1=e.t0()).done){e.next=12;break}if(o=e.t1.value,this.Editor[o].toggleReadOnly){e.next=9;break}return e.abrupt("continue",5);case 9:this.Editor[o].toggleReadOnly(t),e.next=5;break;case 12:if(n!==t){e.next=14;break}return e.abrupt("return",this.readOnlyEnabled);case 14:return e.next=16,this.Editor.Saver.save();case 16:return i=e.sent,e.next=19,this.Editor.BlockManager.clear();case 19:return e.next=21,this.Editor.Renderer.render(i.blocks);case 21:return e.abrupt("return",this.readOnlyEnabled);case 22:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"throwCriticalError",value:function(){throw new p.CriticalError("To enable read-only mode all connected tools should support it. Tools ".concat(this.toolsDontSupportReadOnly.join(", ")," don't support read-only mode."))}}]),u}((d=h(d)).default);o.default=y,y.displayName="ReadOnly",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(25),n(60),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h){"use strict";var v=n(1);function y(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(y=function(e){return e?n:t})(e)}function g(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(e){if("string"==typeof e)return b(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?b(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var o=0,r=function(){};return{s:r,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:r}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,i=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw i}}}}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);nn&&this.mouseX>n,a=this.startX=this.startY?(this.overlayRectangle.style.top="".concat(this.startY-window.pageYOffset,"px"),this.overlayRectangle.style.bottom="calc(100% - ".concat(this.mouseY-window.pageYOffset,"px")):(this.overlayRectangle.style.bottom="calc(100% - ".concat(this.startY-window.pageYOffset,"px"),this.overlayRectangle.style.top="".concat(this.mouseY-window.pageYOffset,"px")),this.mouseX>=this.startX?(this.overlayRectangle.style.left="".concat(this.startX-window.pageXOffset,"px"),this.overlayRectangle.style.right="calc(100% - ".concat(this.mouseX-window.pageXOffset,"px")):(this.overlayRectangle.style.right="calc(100% - ".concat(this.startX-window.pageXOffset,"px"),this.overlayRectangle.style.left="".concat(this.mouseX-window.pageXOffset,"px"))}},{key:"genInfoForMouseSelection",value:function(){var e,t=document.body.offsetWidth/2,n=this.mouseY-window.pageYOffset,o=document.elementFromPoint(t,n),r=this.Editor.BlockManager.getBlockByChildNode(o);void 0!==r&&(e=this.Editor.BlockManager.blocks.findIndex((function(e){return e.holder===r.holder})));var i=this.Editor.BlockManager.lastBlock.holder.querySelector("."+p.default.CSS.content),a=Number.parseInt(window.getComputedStyle(i).width,10)/2;return{index:e,leftPos:t-a,rightPos:t+a}}},{key:"addBlockInSelection",value:function(e){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(e),this.stackOfSelected.push(e)}},{key:"trySelectNextBlock",value:function(e){var t=this,n=this.stackOfSelected[this.stackOfSelected.length-1]===e,o=this.stackOfSelected.length;if(!n){var r=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0,i=0;o>1&&(i=r?1:-1);var a=e>this.stackOfSelected[o-1]&&1===i,s=ethis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){if(!l&&e=e;c--)this.addBlockInSelection(c);else if(l){var u,f=o-1;for(u=e>this.stackOfSelected[o-1]?function(){return e>t.stackOfSelected[f]}:function(){return e0&&void 0!==arguments[0]?arguments[0]:this.Editor.BlockManager.currentBlock;this.opened=!0,this.selection.save(),t.selected=!0,this.Editor.BlockSelection.clearCache();var n=t.getTunes(),o=(0,r.default)(n,2),i=o[0],a=o[1];this.eventsDispatcher.emit(this.events.opened),this.popover=new h.default({className:this.CSS.settings,searchable:!0,filterLabel:v.default.ui(y.I18nInternalNS.ui.popover,"Filter"),nothingFoundLabel:v.default.ui(y.I18nInternalNS.ui.popover,"Nothing found"),items:i,customContent:a,customContentFlippableItems:this.getControls(a),scopeElement:this.Editor.API.methods.ui.nodes.redactor}),this.popover.on(h.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.popover.on(h.PopoverEvent.Close,(function(){return e.close()})),this.nodes.wrapper.append(this.popover.getElement()),this.popover.show()}},{key:"getElement",value:function(){return this.nodes.wrapper}},{key:"close",value:function(){this.opened=!1,p.default.isAtEditor||this.selection.restore(),this.selection.clearSaved(),!this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted&&this.Editor.BlockManager.currentBlock&&(this.Editor.BlockManager.currentBlock.selected=!1),this.eventsDispatcher.emit(this.events.closed),this.popover&&(this.popover.off(h.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.popover.destroy(),this.popover.getElement().remove(),this.popover=null)}},{key:"getControls",value:function(e){var t=this.Editor.StylesAPI,n=e.querySelectorAll(".".concat(t.classes.settingsButton,", ").concat(d.default.allInputsSelector));return Array.from(n)}}]),n}(f.default);o.default=k,k.displayName="BlockSettings",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(30),n(21),n(40),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(66),n(53),n(67),n(65)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m,k){"use strict";var x=n(1);function w(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(w=function(e){return e?n:t})(e)}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=x(r),i=x(i),s=x(s),l=x(l),c=x(c),u=x(u),f=x(f),d=x(d),p=x(p),h=x(h),v=x(v),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=w(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y),g=x(g),b=x(b);var C=function(e){(0,f.default)(a,e);var t,n,o=S(a);function a(){var e;return(0,c.default)(this,a),(e=o.apply(this,arguments)).opened=!1,e.tools=[],e.flipper=null,e.togglingCallback=null,e}return(0,u.default)(a,[{key:"make",value:function(){this.nodes.wrapper=v.default.make("div",[a.CSS.conversionToolbarWrapper].concat((0,l.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.tools=v.default.make("div",a.CSS.conversionToolbarTools);var e=v.default.make("div",a.CSS.conversionToolbarLabel,{textContent:b.default.ui(m.I18nInternalNS.ui.inlineToolbar.converter,"Convert to")});return this.addTools(),this.enableFlipper(),v.default.append(this.nodes.wrapper,e),v.default.append(this.nodes.wrapper,this.nodes.tools),this.nodes.wrapper}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:"toggle",value:function(e){this.opened?this.close():this.open(),y.isFunction(e)&&(this.togglingCallback=e)}},{key:"open",value:function(){var e=this;this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(a.CSS.conversionToolbarShowed),window.requestAnimationFrame((function(){e.flipper.activate(e.tools.map((function(e){return e.button})).filter((function(e){return!e.classList.contains(a.CSS.conversionToolHidden)}))),e.flipper.focusFirst(),y.isFunction(e.togglingCallback)&&e.togglingCallback(!0)}))}},{key:"close",value:function(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(a.CSS.conversionToolbarShowed),y.isFunction(this.togglingCallback)&&this.togglingCallback(!1)}},{key:"hasTools",value:function(){return 1!==this.tools.length||this.tools[0].name!==this.config.defaultBlock}},{key:"replaceWithBlock",value:(n=(0,s.default)(r.default.mark((function e(t,n){var o,i,a,s,l,c,u,f,d,p=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=this.Editor.BlockManager.currentBlock.tool,e.next=3,this.Editor.BlockManager.currentBlock.save();case 3:if(i=e.sent,a=i.data,s=this.Editor.Tools.blockTools.get(t),l="",c=o.conversionConfig.export,!y.isFunction(c)){e.next=12;break}l=c(a),e.next=18;break;case 12:if(!y.isString(c)){e.next=16;break}l=a[c],e.next=18;break;case 16:return y.log("Conversion «export» property must be a string or function. String means key of saved data object to export. Function should export processed string to export."),e.abrupt("return");case 18:if(u=(0,k.clean)(l,s.sanitizeConfig),f={},d=s.conversionConfig.import,!y.isFunction(d)){e.next=25;break}f=d(u),e.next=31;break;case 25:if(!y.isString(d)){e.next=29;break}f[d]=u,e.next=31;break;case 29:return y.log("Conversion «import» property must be a string or function. String means key of tool data to import. Function accepts a imported string and return composed tool data."),e.abrupt("return");case 31:n&&(f=Object.assign(f,n)),this.Editor.BlockManager.replace({tool:t,data:f}),this.Editor.BlockSelection.clearSelection(),this.close(),this.Editor.InlineToolbar.close(),y.delay((function(){p.Editor.Caret.setToBlock(p.Editor.BlockManager.currentBlock)}),10)();case 37:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})},{key:"addTools",value:function(){var e=this,t=this.Editor.Tools.blockTools;Array.from(t.entries()).forEach((function(t){var n=(0,i.default)(t,2),o=n[0],r=n[1],a=r.conversionConfig;a&&a.import&&r.toolbox.forEach((function(t){return e.addToolIfValid(o,t)}))}))}},{key:"addToolIfValid",value:function(e,t){!y.isEmpty(t)&&t.icon&&this.addTool(e,t)}},{key:"addTool",value:function(e,t){var n=this,o=v.default.make("div",[a.CSS.conversionTool]),i=v.default.make("div",[a.CSS.conversionToolIcon]),l=v.default.make("div",[a.CSS.conversionToolCheckIcon]);switch(o.dataset.tool=e,e){case"paragraph":i.innerHTML='\n \n ';break;case"header1":i.innerHTML='';break;case"header2":i.innerHTML='';break;case"header3":i.innerHTML='';break;case"unorderedList":i.innerHTML='';break;case"orderedList":i.innerHTML='';break;case"blockChecklist":i.innerHTML='';break;default:i.innerHTML=t.icon}l.innerHTML='',v.default.append(o,i),v.default.append(o,v.default.text(b.default.t(m.I18nInternalNS.toolNames,t.title||y.capitalize(e)))),v.default.append(o,l),v.default.append(this.nodes.tools,o),this.tools.push({name:e,button:o,toolboxItem:t}),this.listeners.on(o,"click",(0,s.default)(r.default.mark((function o(){return r.default.wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,n.replaceWithBlock(e,t.data);case 2:case"end":return o.stop()}}),o)}))))}},{key:"filterTools",value:(t=(0,s.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return o=function(e,t){return e.icon===t.icon&&e.title===t.title},t=this.Editor.BlockManager.currentBlock,e.next=4,t.getActiveToolboxEntry();case 4:n=e.sent,this.tools.forEach((function(e){var r=!1;if(n){var i=o(n,e.toolboxItem);r=e.button.dataset.tool===t.name&&i}e.button.classList.toggle(a.CSS.conversionToolCurrent,r)}));case 6:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"enableFlipper",value:function(){this.flipper=new g.default({focusedItemClass:a.CSS.conversionToolFocused})}}],[{key:"CSS",get:function(){return{conversionToolbarWrapper:"ce-conversion-toolbar",conversionToolbarShowed:"ce-conversion-toolbar--showed",conversionToolbarTools:"ce-conversion-toolbar__tools",conversionToolbarLabel:"ce-conversion-toolbar__label",conversionTool:"ce-conversion-tool",conversionToolCurrent:"ce-conversion-tool--current",conversionToolIcon:"ce-conversion-tool__icon",conversionToolCheckIcon:"ce-conversion-tool__check-icon",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}}]),a}(h.default);o.default=C,C.displayName="ConversionToolbar",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(40),n(30),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(25),n(8),n(66),n(53),n(67),n(114),n(113),n(68)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m,k,x,w,S){"use strict";var C=n(1);function T(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(T=function(e){return e?n:t})(e)}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=C(r),i=C(i),s=C(s),l=C(l),c=C(c),u=C(u),f=C(f),d=C(d),p=C(p),h=C(h),v=C(v),y=C(y),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=T(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g),b=C(b),m=C(m),x=C(x),w=C(w);var _=function(e){(0,f.default)(o,e);var t,n=E(o);function o(e){var t,r=e.config,i=e.eventsDispatcher;return(0,c.default)(this,o),(t=n.call(this,{config:r,eventsDispatcher:i})).CSS={inlineToolbar:"ce-inline-toolbar",inlineToolbarShowed:"ce-inline-toolbar--showed",inlineToolbarLeftOriented:"ce-inline-toolbar--left-oriented",inlineToolbarRightOriented:"ce-inline-toolbar--right-oriented",inlineToolbarShortcut:"ce-inline-toolbar__shortcut",buttonsWrapper:"ce-inline-toolbar__buttons",actionsWrapper:"ce-inline-toolbar__actions",inlineToolButton:"ce-inline-tool",inputField:"cdx-input",focusedButton:"ce-inline-tool--focused",conversionToggler:"ce-inline-toolbar__dropdown",conversionTogglerArrow:"ce-inline-toolbar__dropdown-arrow",conversionTogglerHidden:"ce-inline-toolbar__dropdown--hidden",conversionTogglerContent:"ce-inline-toolbar__dropdown-content",togglerAndButtonsWrapper:"ce-inline-toolbar__toggler-and-button-wrapper"},t.opened=!1,t.toolbarVerticalMargin=g.isMobileScreen()?20:6,t.buttonsList=null,t.width=0,t.flipper=null,t.tooltip=new w.default,t}return(0,u.default)(o,[{key:"toggleReadOnly",value:function(e){e?(this.destroy(),this.Editor.ConversionToolbar.destroy()):this.make()}},{key:"tryToShow",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.allowedToShow()?(this.move(),this.open(t),this.Editor.Toolbar.close()):e&&this.close()}},{key:"move",value:function(){var e=y.default.rect,t=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:e.x-t.left+145,y:e.y-t.top-40},o=document.getElementsByClassName("ce-inline-toolbar")[0].clientWidth,r=document.getElementsByClassName("ce-block__content")[0].getBoundingClientRect();r.width<650&&t.right-e.x=650&&r.right-e.x0&&void 0!==arguments[0])||arguments[0];if(!this.opened){this.addToolsFiltered(),this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed),this.buttonsList=this.nodes.buttons.querySelectorAll(".".concat(this.CSS.inlineToolButton)),this.opened=!0,e&&this.Editor.ConversionToolbar.hasTools()?this.setConversionTogglerContent():this.nodes.conversionToggler.hidden=!0;var t=Array.from(this.buttonsList);t.unshift(this.nodes.conversionToggler),t=t.filter((function(e){return!e.hidden})),this.flipper.activate(t)}}},{key:"containsNode",value:function(e){return this.nodes.wrapper.contains(e)}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes(),this.tooltip.destroy()}},{key:"make",value:function(){var e=this;this.nodes.wrapper=v.default.make("div",[this.CSS.inlineToolbar].concat((0,s.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.togglerAndButtonsWrapper=v.default.make("div",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=v.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=v.default.make("div",this.CSS.actionsWrapper),this.listeners.on(this.nodes.wrapper,"mousedown",(function(t){t.target.closest(".".concat(e.CSS.actionsWrapper))||t.preventDefault()})),v.default.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),v.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),v.default.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),this.recalculateWidth(),this.enableFlipper()}},{key:"allowedToShow",value:function(){var e=y.default.get(),t=y.default.text;if(!e||!e.anchorNode)return!1;if(e.isCollapsed||t.length<1)return!1;var n=v.default.isElement(e.anchorNode)?e.anchorNode:e.anchorNode.parentElement;if(e&&["IMG","INPUT"].includes(n.tagName))return!1;if(null===n.closest('[contenteditable="true"]'))return!1;var o=this.Editor.BlockManager.getBlock(e.anchorNode);return!!o&&0!==o.tool.inlineTools.size}},{key:"recalculateWidth",value:function(){this.width=this.nodes.wrapper.offsetWidth}},{key:"addConversionToggler",value:function(){var e=this;this.nodes.conversionToggler=v.default.make("div",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=v.default.make("div",this.CSS.conversionTogglerContent);var t=v.default.make("div",this.CSS.conversionTogglerArrow,{innerHTML:'\n\n'});this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(t),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.listeners.on(this.nodes.conversionToggler,"click",(function(){e.Editor.ConversionToolbar.toggle((function(t){!t&&e.opened?e.flipper.activate():e.opened&&e.flipper.deactivate()}))})),!1===g.isMobileScreen()&&this.tooltip.onHover(this.nodes.conversionToggler,m.default.ui(k.I18nInternalNS.ui.inlineToolbar.converter,"Convert to"),{placement:"top",hidingDelay:100})}},{key:"setConversionTogglerContent",value:(t=(0,i.default)(r.default.mark((function e(){var t,n,o,i,a,s;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=this.Editor.BlockManager,n=t.currentBlock,o=n.name,i=n.tool.conversionConfig,a=i&&i.export,this.nodes.conversionToggler.hidden=!a,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!a),e.next=9,n.getActiveToolboxEntry();case 9:if(e.t0=e.sent,e.t0){e.next=12;break}e.t0={};case 12:s=e.t0,this.nodes.conversionTogglerContent.innerHTML=s.icon||s.title||g.capitalize(o);case 14:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"prepareConversionToolbar",value:function(){var e=this.Editor.ConversionToolbar.make();v.default.append(this.nodes.wrapper,e)}},{key:"addToolsFiltered",value:function(){var e=this,t=y.default.get(),n=this.Editor.BlockManager.getBlock(t.anchorNode);this.nodes.buttons.innerHTML="",this.nodes.actions.innerHTML="",this.toolsInstances=new Map,Array.from(n.tool.inlineTools.values()).forEach((function(t){e.addTool(t)})),this.recalculateWidth()}},{key:"addTool",value:function(e){var t=this,n=e.create(),o=n.render();if(o){if(o.dataset.tool=e.name,this.nodes.buttons.appendChild(o),this.toolsInstances.set(e.name,n),g.isFunction(n.renderActions)){var r=n.renderActions();this.nodes.actions.appendChild(r)}this.listeners.on(o,"click",(function(e){t.toolClicked(n),e.preventDefault()}));var i=this.getToolShortcut(e.name);if(i)try{this.enableShortcuts(n,i)}catch(e){}var a=v.default.make("div"),s=m.default.t(k.I18nInternalNS.toolNames,e.title||g.capitalize(e.name));a.appendChild(v.default.text(s)),i&&a.appendChild(v.default.make("div",this.CSS.inlineToolbarShortcut,{textContent:g.beautifyShortcut(i)})),!1===g.isMobileScreen()&&this.tooltip.onHover(o,a,{placement:"top",hidingDelay:100}),n.checkState(y.default.get())}else g.log("Render method must return an instance of Node","warn",e.name)}},{key:"getToolShortcut",value:function(e){var t=this.Editor.Tools,n=t.inlineTools.get(e),o=t.internal.inlineTools;return Array.from(o.keys()).includes(e)?this.inlineTools[e][S.CommonInternalSettings.Shortcut]:n.shortcut}},{key:"enableShortcuts",value:function(e,t){var n=this;x.default.add({name:t,handler:function(t){var o=n.Editor.BlockManager.currentBlock;o&&o.tool.enabledInlineTools&&(t.preventDefault(),n.toolClicked(e))},on:this.Editor.UI.nodes.redactor})}},{key:"toolClicked",value:function(e){var t=y.default.range;e.surround(t),this.checkToolsState(),void 0!==e.renderActions&&this.flipper.deactivate()}},{key:"checkToolsState",value:function(){this.toolsInstances.forEach((function(e){e.checkState(y.default.get())}))}},{key:"inlineTools",get:function(){var e={};return Array.from(this.Editor.Tools.inlineTools.entries()).forEach((function(t){var n=(0,l.default)(t,2),o=n[0],r=n[1];e[o]=r.create()})),e}},{key:"enableFlipper",value:function(){this.flipper=new b.default({focusedItemClass:this.CSS.focusedButton,allowedKeys:[g.keyCodes.ENTER,g.keyCodes.TAB]})}}]),o}(h.default);o.default=_,_.displayName="InlineToolbar",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(40),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(7),n(387),n(9),n(8),n(388),n(389),n(390),n(391),n(392),n(396),n(397),n(398),n(184)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m,k,x,w,S,C,T,E){"use strict";var _=n(1);function B(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(B=function(e){return e?n:t})(e)}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=_(r),i=_(i),s=_(s),l=_(l),c=_(c),u=_(u),f=_(f),d=_(d),p=_(p),h=_(h),v=_(v),y=_(y),g=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=B(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(g),b=_(b),m=_(m),k=_(k),x=_(x),w=_(w),S=_(S),C=_(C),T=_(T),E=_(E);var M=function(e,t,n,o){var r,i=arguments.length,a=i<3?t:null===o?o=Object.getOwnPropertyDescriptor(t,n):o;if("object"===("undefined"==typeof Reflect?"undefined":(0,h.default)(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=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},I=function(e){(0,f.default)(o,e);var t,n=O(o);function o(){var e;return(0,c.default)(this,o),(e=n.apply(this,arguments)).stubTool="stub",e.toolsAvailable=new E.default,e.toolsUnavailable=new E.default,e}return(0,u.default)(o,[{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inlineTools",get:function(){return this.available.inlineTools}},{key:"blockTools",get:function(){return this.available.blockTools}},{key:"blockTunes",get:function(){return this.available.blockTunes}},{key:"defaultTool",get:function(){return this.blockTools.get(this.config.defaultBlock)}},{key:"internal",get:function(){return this.available.internalTools}},{key:"prepare",value:(t=(0,l.default)(r.default.mark((function e(){var t,n,o=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(this.validateTools(),this.config.tools=g.deepMerge({},this.internalTools,this.config.tools),Object.prototype.hasOwnProperty.call(this.config,"tools")&&0!==Object.keys(this.config.tools).length){e.next=4;break}throw Error("Can't start without tools");case 4:if(t=this.prepareConfig(),this.factory=new w.default(t,this.config,this.Editor.API),0!==(n=this.getListOfPrepareFunctions(t)).length){e.next=9;break}return e.abrupt("return",Promise.resolve());case 9:return e.next=11,g.sequence(n,(function(e){o.toolPrepareMethodSuccess(e)}),(function(e){o.toolPrepareMethodFallback(e)}));case 11:this.prepareBlockTools();case 12:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"getAllInlineToolsSanitizeConfig",value:function(){var e={};return Array.from(this.inlineTools.values()).forEach((function(t){Object.assign(e,t.sanitizeConfig)})),e}},{key:"destroy",value:function(){Object.values(this.available).forEach(function(){var e=(0,l.default)(r.default.mark((function e(t){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(!g.isFunction(t.reset)){e.next=3;break}return e.next=3,t.reset();case 3:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}())}},{key:"internalTools",get:function(){return{bold:{class:b.default,isInternal:!0},italic:{class:m.default,isInternal:!0},link:{class:k.default,isInternal:!0},paragraph:{class:v.default,inlineToolbar:!0,isInternal:!0},stub:{class:x.default,isInternal:!0},moveUp:{class:T.default,isInternal:!0},moveDown:{class:S.default,isInternal:!0},delete:{class:C.default,isInternal:!0}}}},{key:"toolPrepareMethodSuccess",value:function(e){var t=this.factory.get(e.toolName);if(t.isInline()){var n=["render","surround","checkState"].filter((function(e){return!t.create()[e]}));if(n.length)return g.log("Incorrect Inline Tool: ".concat(t.name,". Some of required methods is not implemented %o"),"warn",n),void this.toolsUnavailable.set(t.name,t)}this.toolsAvailable.set(t.name,t)}},{key:"toolPrepareMethodFallback",value:function(e){this.toolsUnavailable.set(e.toolName,this.factory.get(e.toolName))}},{key:"getListOfPrepareFunctions",value:function(e){var t=[];return Object.entries(e).forEach((function(e){var n=(0,s.default)(e,2),o=n[0],r=n[1];t.push({function:g.isFunction(r.class.prepare)?r.class.prepare:function(){},data:{toolName:o,config:r.config}})})),t}},{key:"prepareBlockTools",value:function(){var e=this;Array.from(this.blockTools.values()).forEach((function(t){e.assignInlineToolsToBlockTool(t),e.assignBlockTunesToBlockTool(t)}))}},{key:"assignInlineToolsToBlockTool",value:function(e){var t=this;!1!==this.config.inlineToolbar&&(!0!==e.enabledInlineTools?Array.isArray(e.enabledInlineTools)&&(e.inlineTools=new E.default(e.enabledInlineTools.map((function(e){return[e,t.inlineTools.get(e)]})))):e.inlineTools=new E.default(Array.isArray(this.config.inlineToolbar)?this.config.inlineToolbar.map((function(e){return[e,t.inlineTools.get(e)]})):Array.from(this.inlineTools.entries())))}},{key:"assignBlockTunesToBlockTool",value:function(e){var t=this;if(!1!==e.enabledBlockTunes)if(Array.isArray(e.enabledBlockTunes)){var n=new E.default(e.enabledBlockTunes.map((function(e){return[e,t.blockTunes.get(e)]})));e.tunes=new E.default([].concat((0,i.default)(n),(0,i.default)(this.blockTunes.internalTools)))}else if(Array.isArray(this.config.tunes)){var o=new E.default(this.config.tunes.map((function(e){return[e,t.blockTunes.get(e)]})));e.tunes=new E.default([].concat((0,i.default)(o),(0,i.default)(this.blockTunes.internalTools)))}else e.tunes=this.blockTunes.internalTools}},{key:"validateTools",value:function(){for(var e in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,e)){if(e in this.internalTools)return;var t=this.config.tools[e];if(!g.isFunction(t)&&!g.isFunction(t.class))throw Error("Tool «".concat(e,"» must be a constructor function or an object with function in the «class» property"))}}},{key:"prepareConfig",value:function(){var e={};for(var t in this.config.tools)g.isObject(this.config.tools[t])?e[t]=this.config.tools[t]:e[t]={class:this.config.tools[t]};return e}}]),o}(y.default);o.default=I,I.displayName="Tools",M([g.cacheable],I.prototype,"getAllInlineToolsSanitizeConfig",null),e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(30),n(2),n(3),n(5),n(6),n(4),n(151)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c,u){"use strict";var f=n(1);function d(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,c.default)(e);if(t){var r=(0,c.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,l.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=f(r),i=f(i),a=f(a),s=f(s),l=f(l),c=f(c);var p=function(e){(0,s.default)(n,e);var t=d(n);function n(){return(0,i.default)(this,n),t.apply(this,arguments)}return(0,a.default)(n,[{key:"blockTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isBlock()})))}},{key:"inlineTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isInline()})))}},{key:"blockTunes",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isTune()})))}},{key:"internalTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return(0,r.default)(e,2)[1].isInternal})))}},{key:"externalTools",get:function(){return new n(Array.from(this.entries()).filter((function(e){return!(0,r.default)(e,2)[1].isInternal})))}}]),n}((0,(u=f(u)).default)(Map));o.default=p,p.displayName="ToolsCollection",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(40),n(30),n(21),n(2),n(3),n(5),n(6),n(4),n(9),n(19),n(8),n(25),n(60),n(66)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p,h,v,y,g,b,m){"use strict";var k=n(1);function x(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(x=function(e){return e?n:t})(e)}function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,o=(0,p.default)(e);if(t){var r=(0,p.default)(this).constructor;n=Reflect.construct(o,arguments,r)}else n=o.apply(this,arguments);return(0,d.default)(this,n)}}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=k(r),i=k(i),s=k(s),l=k(l),c=k(c),u=k(u),f=k(f),d=k(d),p=k(p),h=k(h),v=k(v),y=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=x(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(y),g=k(g),b=k(b),m=k(m);var S=function(e){(0,f.default)(a,e);var t,o=w(a);function a(){var e;return(0,c.default)(this,a),(e=o.apply(this,arguments)).isMobile=!1,e.contentRectCache=void 0,e.resizeDebouncer=y.debounce((function(){e.windowResize()}),200),e}return(0,u.default)(a,[{key:"events",get:function(){return{blockHovered:"block-hovered"}}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorWrapperNarrow:"codex-editor--narrow",editorZone:"codex-editor__redactor",editorZoneHidden:"codex-editor__redactor--hidden",editorLoader:"codex-editor__loader",editorEmpty:"codex-editor--empty",editorRtlFix:"codex-editor--rtl"}}},{key:"contentRect",get:function(){if(this.contentRectCache)return this.contentRectCache;var e=this.nodes.wrapper.querySelector(".".concat(b.default.CSS.content));return e?(this.contentRectCache=e.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}},{key:"addLoader",value:function(){this.nodes.loader=v.default.make("div",this.CSS.editorLoader),this.nodes.wrapper.prepend(this.nodes.loader),this.nodes.redactor.classList.add(this.CSS.editorZoneHidden)}},{key:"removeLoader",value:function(){this.nodes.loader.remove(),this.nodes.redactor.classList.remove(this.CSS.editorZoneHidden)}},{key:"prepare",value:(t=(0,l.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:this.checkIsMobile(),this.make(),this.addLoader(),this.loadStyles();case 4:case"end":return e.stop()}}),e,this)}))),function(){return t.apply(this,arguments)})},{key:"toggleReadOnly",value:function(e){e?this.disableModuleBindings():this.enableModuleBindings()}},{key:"checkEmptiness",value:function(){var e=this.Editor.BlockManager;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,e.isEditorEmpty)}},{key:"someToolbarOpened",get:function(){var e=this.Editor,t=e.Toolbar,n=e.BlockSettings,o=e.InlineToolbar,r=e.ConversionToolbar;return n.opened||o.opened||r.opened||t.toolbox.opened}},{key:"someFlipperButtonFocused",get:function(){return!!this.Editor.Toolbar.toolbox.hasFocus()||Object.entries(this.Editor).filter((function(e){var t=(0,s.default)(e,2);return t[0],t[1].flipper instanceof m.default})).some((function(e){var t=(0,s.default)(e,2);return t[0],t[1].flipper.hasFocus()}))}},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"closeAllToolbars",value:function(){var e=this.Editor,t=e.Toolbar,n=e.BlockSettings,o=e.InlineToolbar,r=e.ConversionToolbar;n.close(),o.close(),r.close(),t.toolbox.close()}},{key:"checkIsMobile",value:function(){this.isMobile=window.innerWidth=0;if(o.anyBlockSelected&&!g.default.isSelectionExists)return o.clearSelection(e),e.preventDefault(),e.stopImmediatePropagation(),void e.stopPropagation();if(!this.someToolbarOpened&&r&&"BODY"===e.target.tagName){var i=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(i),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.moveAndOpen(i)}this.Editor.BlockSelection.clearSelection(e)}},{key:"documentClicked",value:function(e){if(e.isTrusted){var t=e.target;this.nodes.holder.contains(t)||g.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.Toolbar.close());var n=this.Editor.BlockSettings.nodes.wrapper.contains(t),o=this.Editor.Toolbar.nodes.settingsToggler.contains(t),r=n||o;if(this.Editor.BlockSettings.opened&&!r){this.Editor.BlockSettings.close();var i=this.Editor.BlockManager.getBlockByChildNode(t);this.Editor.Toolbar.moveAndOpen(i)}this.Editor.BlockSelection.clearSelection(e)}}},{key:"documentTouched",value:function(e){var t=e.target;if(t===this.nodes.redactor){var n=e instanceof MouseEvent?e.clientX:e.touches[0].clientX,o=e instanceof MouseEvent?e.clientY:e.touches[0].clientY;t=document.elementFromPoint(n,o)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(t),this.Editor.BlockManager.highlightCurrentNode()}catch(e){this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.moveAndOpen()}},{key:"redactorClicked",value:function(e){var t=this.Editor.BlockSelection;if(g.default.isCollapsed){var n=function(){e.stopImmediatePropagation(),e.stopPropagation()},o=e.target,r=e.metaKey||e.ctrlKey;if(v.default.isAnchor(o)&&r){n();var i=o.getAttribute("href"),a=y.getValidUrl(i);y.openTab(a)}else{var s=this.Editor.BlockManager.getBlockByIndex(-1),l=v.default.offset(s.holder).bottom,c=e.pageY;if(e.target instanceof Element&&e.target.isEqualNode(this.nodes.redactor)&&!t.anyBlockSelected&&lr;)K(e,n=o[r++],t[n]);return e},J=function(e){var t=D.call(this,e=w(e,!0));return!(this===U&&r(H,e)&&!r(W,e))&&(!(t||!r(this,e)||!r(H,e)||r(this,j)&&this[j][e])||t)},$=function(e,t){if(e=x(e),t=w(t,!0),e!==U||!r(H,t)||r(W,t)){var n=M(e,t);return!n||!r(H,t)||r(e,j)&&e[j][t]||(n.enumerable=!0),n}},Q=function(e){for(var t,n=P(x(e)),o=[],i=0;n.length>i;)r(H,t=n[i++])||t==j||t==l||o.push(t);return o},ee=function(e){for(var t,n=e===U,o=P(n?W:x(e)),i=[],a=0;o.length>a;)!r(H,t=o[a++])||n&&!r(U,t)||i.push(H[t]);return i};z||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var e=d(arguments.length>0?arguments[0]:void 0),t=function(n){this===U&&t.call(W,n),r(this,j)&&r(this[j],e)&&(this[j][e]=!1),X(this,e,S(1,n))};return i&&Y&&X(U,e,{configurable:!0,set:t}),Z(e)}).prototype,"toString",(function(){return this._k})),E.f=$,B.f=K,n(49).f=T.f=Q,n(62).f=J,_.f=ee,i&&!n(45)&&s(U,"propertyIsEnumerable",J,!0),h.f=function(e){return Z(p(e))}),a(a.G+a.W+a.F*!z,{Symbol:L});for(var te="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),ne=0;te.length>ne;)p(te[ne++]);for(var oe=O(p.store),re=0;oe.length>re;)v(oe[re++]);a(a.S+a.F*!z,"Symbol",{for:function(e){return r(F,e+="")?F[e]:F[e]=L(e)},keyFor:function(e){if(!G(e))throw TypeError(e+" is not a symbol!");for(var t in F)if(F[t]===e)return t},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!z,"Object",{create:function(e,t){return void 0===t?C(e):q(C(e),t)},defineProperty:K,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:ee});var ie=c((function(){_.f(1)}));a(a.S+a.F*ie,"Object",{getOwnPropertySymbols:function(e){return _.f(k(e))}}),R&&a(a.S+a.F*(!z||c((function(){var e=L();return"[null]"!=A([e])||"{}"!=A({a:e})||"{}"!=A(Object(e))}))),"JSON",{stringify:function(e){for(var t,n,o=[e],r=1;arguments.length>r;)o.push(arguments[r++]);if(n=t=o[1],(m(t)||void 0!==e)&&!G(e))return g(t)||(t=function(e,t){if("function"==typeof n&&(t=n.call(this,e,t)),!G(t))return t}),o[1]=t,A.apply(R,o)}}),L.prototype[N]||n(27)(L.prototype,N,L.prototype.valueOf),f(L,"Symbol"),f(Math,"Math",!0),f(o.JSON,"JSON",!0)},function(e,t,n){e.exports=n(69)("native-function-to-string",Function.toString)},function(e,t,n){var o=n(46),r=n(71),i=n(62);e.exports=function(e){var t=o(e),n=r.f;if(n)for(var a,s=n(e),l=i.f,c=0;s.length>c;)l.call(e,a=s[c++])&&t.push(a);return t}},function(e,t,n){var o=n(0);o(o.S,"Object",{create:n(48)})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(17),"Object",{defineProperty:n(18).f})},function(e,t,n){var o=n(0);o(o.S+o.F*!n(17),"Object",{defineProperties:n(118)})},function(e,t,n){var o=n(28),r=n(34).f;n(35)("getOwnPropertyDescriptor",(function(){return function(e,t){return r(o(e),t)}}))},function(e,t,n){var o=n(22),r=n(50);n(35)("getPrototypeOf",(function(){return function(e){return r(o(e))}}))},function(e,t,n){var o=n(22),r=n(46);n(35)("keys",(function(){return function(e){return r(o(e))}}))},function(e,t,n){n(35)("getOwnPropertyNames",(function(){return n(119).f}))},function(e,t,n){var o=n(13),r=n(42).onFreeze;n(35)("freeze",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13),r=n(42).onFreeze;n(35)("seal",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13),r=n(42).onFreeze;n(35)("preventExtensions",(function(e){return function(t){return e&&o(t)?e(r(t)):t}}))},function(e,t,n){var o=n(13);n(35)("isFrozen",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(13);n(35)("isSealed",(function(e){return function(t){return!o(t)||!!e&&e(t)}}))},function(e,t,n){var o=n(13);n(35)("isExtensible",(function(e){return function(t){return!!o(t)&&(!e||e(t))}}))},function(e,t,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(120)})},function(e,t,n){var o=n(0);o(o.S,"Object",{is:n(121)})},function(e,t,n){var o=n(0);o(o.S,"Object",{setPrototypeOf:n(90).set})},function(e,t,n){"use strict";var o=n(63),r={};r[n(14)("toStringTag")]="z",r+""!="[object z]"&&n(23)(Object.prototype,"toString",(function(){return"[object "+o(this)+"]"}),!0)},function(e,t,n){var o=n(0);o(o.P,"Function",{bind:n(122)})},function(e,t,n){var o=n(18).f,r=Function.prototype,i=/^\s*function ([^ (]*)/;"name"in r||n(17)&&o(r,"name",{configurable:!0,get:function(){try{return(""+this).match(i)[1]}catch(e){return""}}})},function(e,t,n){"use strict";var o=n(13),r=n(50),i=n(14)("hasInstance"),a=Function.prototype;i in a||n(18).f(a,i,{value:function(e){if("function"!=typeof this||!o(e))return!1;if(!o(this.prototype))return e instanceof this;for(;e=r(e);)if(this.prototype===e)return!0;return!1}})},function(e,t,n){var o=n(0),r=n(124);o(o.G+o.F*(parseInt!=r),{parseInt:r})},function(e,t,n){var o=n(0),r=n(125);o(o.G+o.F*(parseFloat!=r),{parseFloat:r})},function(e,t,n){"use strict";var o=n(10),r=n(26),i=n(37),a=n(92),s=n(41),l=n(11),c=n(49).f,u=n(34).f,f=n(18).f,d=n(55).trim,p=o.Number,h=p,v=p.prototype,y="Number"==i(n(48)(v)),g="trim"in String.prototype,b=function(e){var t=s(e,!1);if("string"==typeof t&&t.length>2){var n,o,r,i=(t=g?t.trim():d(t,3)).charCodeAt(0);if(43===i||45===i){if(88===(n=t.charCodeAt(2))||120===n)return NaN}else if(48===i){switch(t.charCodeAt(1)){case 66:case 98:o=2,r=49;break;case 79:case 111:o=8,r=55;break;default:return+t}for(var a,l=t.slice(2),c=0,u=l.length;cr)return NaN;return parseInt(l,o)}}return+t};if(!p(" 0o1")||!p("0b1")||p("+0x1")){p=function(e){var t=arguments.length<1?0:e,n=this;return n instanceof p&&(y?l((function(){v.valueOf.call(n)})):"Number"!=i(n))?a(new h(b(t)),n,p):b(t)};for(var m,k=n(17)?c(h):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),x=0;k.length>x;x++)r(h,m=k[x])&&!r(p,m)&&f(p,m,u(h,m));p.prototype=v,v.constructor=p,n(23)(o,"Number",p)}},function(e,t,n){"use strict";var o=n(0),r=n(33),i=n(126),a=n(93),s=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",f=function(e,t){for(var n=-1,o=t;++n<6;)o+=e*c[n],c[n]=o%1e7,o=l(o/1e7)},d=function(e){for(var t=6,n=0;--t>=0;)n+=c[t],c[t]=l(n/e),n=n%e*1e7},p=function(){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==c[e]){var n=String(c[e]);t=""===t?n:t+a.call("0",7-n.length)+n}return t},h=function(e,t,n){return 0===t?n:t%2==1?h(e,t-1,n*e):h(e*e,t/2,n)};o(o.P+o.F*(!!s&&("0.000"!==8e-5.toFixed(3)||"1"!==.9.toFixed(0)||"1.25"!==1.255.toFixed(2)||"1000000000000000128"!==(0xde0b6b3a7640080).toFixed(0))||!n(11)((function(){s.call({})}))),"Number",{toFixed:function(e){var t,n,o,s,l=i(this,u),c=r(e),v="",y="0";if(c<0||c>20)throw RangeError(u);if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(v="-",l=-l),l>1e-21)if(n=(t=function(e){for(var t=0,n=e;n>=4096;)t+=12,n/=4096;for(;n>=2;)t+=1,n/=2;return t}(l*h(2,69,1))-69)<0?l*h(2,-t,1):l/h(2,t,1),n*=4503599627370496,(t=52-t)>0){for(f(0,n),o=c;o>=7;)f(1e7,0),o-=7;for(f(h(10,o,1),0),o=t-1;o>=23;)d(1<<23),o-=23;d(1<0?v+((s=y.length)<=c?"0."+a.call("0",c-s)+y:y.slice(0,s-c)+"."+y.slice(s-c)):v+y}})},function(e,t,n){"use strict";var o=n(0),r=n(11),i=n(126),a=1..toPrecision;o(o.P+o.F*(r((function(){return"1"!==a.call(1,void 0)}))||!r((function(){a.call({})}))),"Number",{toPrecision:function(e){var t=i(this,"Number#toPrecision: incorrect invocation!");return void 0===e?a.call(t):a.call(t,e)}})},function(e,t,n){var o=n(0);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(e,t,n){var o=n(0),r=n(10).isFinite;o(o.S,"Number",{isFinite:function(e){return"number"==typeof e&&r(e)}})},function(e,t,n){var o=n(0);o(o.S,"Number",{isInteger:n(127)})},function(e,t,n){var o=n(0);o(o.S,"Number",{isNaN:function(e){return e!=e}})},function(e,t,n){var o=n(0),r=n(127),i=Math.abs;o(o.S,"Number",{isSafeInteger:function(e){return r(e)&&i(e)<=9007199254740991}})},function(e,t,n){var o=n(0);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(e,t,n){var o=n(0);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(e,t,n){var o=n(0),r=n(125);o(o.S+o.F*(Number.parseFloat!=r),"Number",{parseFloat:r})},function(e,t,n){var o=n(0),r=n(124);o(o.S+o.F*(Number.parseInt!=r),"Number",{parseInt:r})},function(e,t,n){var o=n(0),r=n(128),i=Math.sqrt,a=Math.acosh;o(o.S+o.F*!(a&&710==Math.floor(a(Number.MAX_VALUE))&&a(1/0)==1/0),"Math",{acosh:function(e){return(e=+e)<1?NaN:e>94906265.62425156?Math.log(e)+Math.LN2:r(e-1+i(e-1)*i(e+1))}})},function(e,t,n){var o=n(0),r=Math.asinh;o(o.S+o.F*!(r&&1/r(0)>0),"Math",{asinh:function e(t){return isFinite(t=+t)&&0!=t?t<0?-e(-t):Math.log(t+Math.sqrt(t*t+1)):t}})},function(e,t,n){var o=n(0),r=Math.atanh;o(o.S+o.F*!(r&&1/r(-0)<0),"Math",{atanh:function(e){return 0==(e=+e)?e:Math.log((1+e)/(1-e))/2}})},function(e,t,n){var o=n(0),r=n(94);o(o.S,"Math",{cbrt:function(e){return r(e=+e)*Math.pow(Math.abs(e),1/3)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{clz32:function(e){return(e>>>=0)?31-Math.floor(Math.log(e+.5)*Math.LOG2E):32}})},function(e,t,n){var o=n(0),r=Math.exp;o(o.S,"Math",{cosh:function(e){return(r(e=+e)+r(-e))/2}})},function(e,t,n){var o=n(0),r=n(95);o(o.S+o.F*(r!=Math.expm1),"Math",{expm1:r})},function(e,t,n){var o=n(0);o(o.S,"Math",{fround:n(235)})},function(e,t,n){var o=n(94),r=Math.pow,i=r(2,-52),a=r(2,-23),s=r(2,127)*(2-a),l=r(2,-126);e.exports=Math.fround||function(e){var t,n,r=Math.abs(e),c=o(e);return rs||n!=n?c*(1/0):c*n}},function(e,t,n){var o=n(0),r=Math.abs;o(o.S,"Math",{hypot:function(e,t){for(var n,o,i=0,a=0,s=arguments.length,l=0;a0?(o=n/l)*o:n;return l===1/0?1/0:l*Math.sqrt(i)}})},function(e,t,n){var o=n(0),r=Math.imul;o(o.S+o.F*n(11)((function(){return-5!=r(4294967295,5)||2!=r.length})),"Math",{imul:function(e,t){var n=+e,o=+t,r=65535&n,i=65535&o;return 0|r*i+((65535&n>>>16)*i+r*(65535&o>>>16)<<16>>>0)}})},function(e,t,n){var o=n(0);o(o.S,"Math",{log10:function(e){return Math.log(e)*Math.LOG10E}})},function(e,t,n){var o=n(0);o(o.S,"Math",{log1p:n(128)})},function(e,t,n){var o=n(0);o(o.S,"Math",{log2:function(e){return Math.log(e)/Math.LN2}})},function(e,t,n){var o=n(0);o(o.S,"Math",{sign:n(94)})},function(e,t,n){var o=n(0),r=n(95),i=Math.exp;o(o.S+o.F*n(11)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(e){return Math.abs(e=+e)<1?(r(e)-r(-e))/2:(i(e-1)-i(-e-1))*(Math.E/2)}})},function(e,t,n){var o=n(0),r=n(95),i=Math.exp;o(o.S,"Math",{tanh:function(e){var t=r(e=+e),n=r(-e);return t==1/0?1:n==1/0?-1:(t-n)/(i(e)+i(-e))}})},function(e,t,n){var o=n(0);o(o.S,"Math",{trunc:function(e){return(e>0?Math.floor:Math.ceil)(e)}})},function(e,t,n){var o=n(0),r=n(47),i=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(e){for(var t,n=[],o=arguments.length,a=0;o>a;){if(t=+arguments[a++],r(t,1114111)!==t)throw RangeError(t+" is not a valid code point");n.push(t<65536?i(t):i(55296+((t-=65536)>>10),t%1024+56320))}return n.join("")}})},function(e,t,n){var o=n(0),r=n(28),i=n(15);o(o.S,"String",{raw:function(e){for(var t=r(e.raw),n=i(t.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(t[s++])),s=t.length?{value:void 0,done:!0}:(e=o(t,n),this._i+=e.length,{value:e,done:!1})}))},function(e,t,n){"use strict";var o=n(0),r=n(96)(!1);o(o.P,"String",{codePointAt:function(e){return r(this,e)}})},function(e,t,n){"use strict";var o=n(0),r=n(15),i=n(98),a="".endsWith;o(o.P+o.F*n(100)("endsWith"),"String",{endsWith:function(e){var t=i(this,e,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=r(t.length),s=void 0===n?o:Math.min(r(n),o),l=String(e);return a?a.call(t,l,s):t.slice(s-l.length,s)===l}})},function(e,t,n){"use strict";var o=n(0),r=n(98);o(o.P+o.F*n(100)("includes"),"String",{includes:function(e){return!!~r(this,e,"includes").indexOf(e,arguments.length>1?arguments[1]:void 0)}})},function(e,t,n){var o=n(0);o(o.P,"String",{repeat:n(93)})},function(e,t,n){"use strict";var o=n(0),r=n(15),i=n(98),a="".startsWith;o(o.P+o.F*n(100)("startsWith"),"String",{startsWith:function(e){var t=i(this,e,"startsWith"),n=r(Math.min(arguments.length>1?arguments[1]:void 0,t.length)),o=String(e);return a?a.call(t,o,n):t.slice(n,n+o.length)===o}})},function(e,t,n){"use strict";n(24)("anchor",(function(e){return function(t){return e(this,"a","name",t)}}))},function(e,t,n){"use strict";n(24)("big",(function(e){return function(){return e(this,"big","","")}}))},function(e,t,n){"use strict";n(24)("blink",(function(e){return function(){return e(this,"blink","","")}}))},function(e,t,n){"use strict";n(24)("bold",(function(e){return function(){return e(this,"b","","")}}))},function(e,t,n){"use strict";n(24)("fixed",(function(e){return function(){return e(this,"tt","","")}}))},function(e,t,n){"use strict";n(24)("fontcolor",(function(e){return function(t){return e(this,"font","color",t)}}))},function(e,t,n){"use strict";n(24)("fontsize",(function(e){return function(t){return e(this,"font","size",t)}}))},function(e,t,n){"use strict";n(24)("italics",(function(e){return function(){return e(this,"i","","")}}))},function(e,t,n){"use strict";n(24)("link",(function(e){return function(t){return e(this,"a","href",t)}}))},function(e,t,n){"use strict";n(24)("small",(function(e){return function(){return e(this,"small","","")}}))},function(e,t,n){"use strict";n(24)("strike",(function(e){return function(){return e(this,"strike","","")}}))},function(e,t,n){"use strict";n(24)("sub",(function(e){return function(){return e(this,"sub","","")}}))},function(e,t,n){"use strict";n(24)("sup",(function(e){return function(){return e(this,"sup","","")}}))},function(e,t,n){var o=n(0);o(o.S,"Date",{now:function(){return(new Date).getTime()}})},function(e,t,n){"use strict";var o=n(0),r=n(22),i=n(41);o(o.P+o.F*n(11)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(e){var t=r(this),n=i(t);return"number"!=typeof n||isFinite(n)?t.toISOString():null}})},function(e,t,n){var o=n(0),r=n(270);o(o.P+o.F*(Date.prototype.toISOString!==r),"Date",{toISOString:r})},function(e,t,n){"use strict";var o=n(11),r=Date.prototype.getTime,i=Date.prototype.toISOString,a=function(e){return e>9?e:"0"+e};e.exports=o((function(){return"0385-07-25T07:06:39.999Z"!=i.call(new Date(-50000000000001))}))||!o((function(){i.call(new Date(NaN))}))?function(){if(!isFinite(r.call(this)))throw RangeError("Invalid time value");var e=this,t=e.getUTCFullYear(),n=e.getUTCMilliseconds(),o=t<0?"-":t>9999?"+":"";return o+("00000"+Math.abs(t)).slice(o?-6:-4)+"-"+a(e.getUTCMonth()+1)+"-"+a(e.getUTCDate())+"T"+a(e.getUTCHours())+":"+a(e.getUTCMinutes())+":"+a(e.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:i},function(e,t,n){var o=Date.prototype,r=o.toString,i=o.getTime;new Date(NaN)+""!="Invalid Date"&&n(23)(o,"toString",(function(){var e=i.call(this);return e==e?r.call(this):"Invalid Date"}))},function(e,t,n){var o=n(14)("toPrimitive"),r=Date.prototype;o in r||n(27)(r,o,n(273))},function(e,t,n){"use strict";var o=n(12),r=n(41);e.exports=function(e){if("string"!==e&&"number"!==e&&"default"!==e)throw TypeError("Incorrect hint");return r(o(this),"number"!=e)}},function(e,t,n){var o=n(0);o(o.S,"Array",{isArray:n(72)})},function(e,t,n){"use strict";var o=n(31),r=n(0),i=n(22),a=n(130),s=n(101),l=n(15),c=n(102),u=n(103);r(r.S+r.F*!n(73)((function(e){Array.from(e)})),"Array",{from:function(e){var t,n,r,f,d=i(e),p="function"==typeof this?this:Array,h=arguments.length,v=h>1?arguments[1]:void 0,y=void 0!==v,g=0,b=u(d);if(y&&(v=o(v,h>2?arguments[2]:void 0,2)),null==b||p==Array&&s(b))for(n=new p(t=l(d.length));t>g;g++)c(n,g,y?v(d[g],g):d[g]);else for(f=b.call(d),n=new p;!(r=f.next()).done;g++)c(n,g,y?a(f,v,[r.value,g],!0):r.value);return n.length=g,n}})},function(e,t,n){"use strict";var o=n(0),r=n(102);o(o.S+o.F*n(11)((function(){function e(){}return!(Array.of.call(e)instanceof e)})),"Array",{of:function(){for(var e=0,t=arguments.length,n=new("function"==typeof this?this:Array)(t);t>e;)r(n,e,arguments[e++]);return n.length=t,n}})},function(e,t,n){"use strict";var o=n(0),r=n(28),i=[].join;o(o.P+o.F*(n(61)!=Object||!n(29)(i)),"Array",{join:function(e){return i.call(r(this),void 0===e?",":e)}})},function(e,t,n){"use strict";var o=n(0),r=n(89),i=n(37),a=n(47),s=n(15),l=[].slice;o(o.P+o.F*n(11)((function(){r&&l.call(r)})),"Array",{slice:function(e,t){var n=s(this.length),o=i(this);if(t=void 0===t?n:t,"Array"==o)return l.call(this,e,t);for(var r=a(e,n),c=a(t,n),u=s(c-r),f=new Array(u),d=0;d1&&(o=Math.min(o,i(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in t&&t[o]===e)return o||0;return-1}})},function(e,t,n){var o=n(0);o(o.P,"Array",{copyWithin:n(133)}),n(51)("copyWithin")},function(e,t,n){var o=n(0);o(o.P,"Array",{fill:n(104)}),n(51)("fill")},function(e,t,n){"use strict";var o=n(0),r=n(36)(5),i=!0;"find"in[]&&Array(1).find((function(){i=!1})),o(o.P+o.F*i,"Array",{find:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(51)("find")},function(e,t,n){"use strict";var o=n(0),r=n(36)(6),i="findIndex",a=!0;i in[]&&Array(1)[i]((function(){a=!1})),o(o.P+o.F*a,"Array",{findIndex:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(51)(i)},function(e,t,n){n(57)("Array")},function(e,t,n){var o=n(10),r=n(92),i=n(18).f,a=n(49).f,s=n(99),l=n(74),c=o.RegExp,u=c,f=c.prototype,d=/a/g,p=/a/g,h=new c(d)!==d;if(n(17)&&(!h||n(11)((function(){return p[n(14)("match")]=!1,c(d)!=d||c(p)==p||"/a/i"!=c(d,"i")})))){c=function(e,t){var n=this instanceof c,o=s(e),i=void 0===t;return!n&&o&&e.constructor===c&&i?e:r(h?new u(o&&!i?e.source:e,t):u((o=e instanceof c)?e.source:e,o&&i?l.call(e):t),n?this:f,c)};for(var v=function(e){e in c||i(c,e,{configurable:!0,get:function(){return u[e]},set:function(t){u[e]=t}})},y=a(u),g=0;y.length>g;)v(y[g++]);f.constructor=c,c.prototype=f,n(23)(o,"RegExp",c)}n(57)("RegExp")},function(e,t,n){"use strict";n(136);var o=n(12),r=n(74),i=n(17),a=/./.toString,s=function(e){n(23)(RegExp.prototype,"toString",e,!0)};n(11)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var e=o(this);return"/".concat(e.source,"/","flags"in e?e.flags:!i&&e instanceof RegExp?r.call(e):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(e,t,n){"use strict";var o=n(12),r=n(15),i=n(107),a=n(75);n(76)("match",1,(function(e,t,n,s){return[function(n){var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},function(e){var t=s(n,e,this);if(t.done)return t.value;var l=o(e),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var f,d=[],p=0;null!==(f=a(l,c));){var h=String(f[0]);d[p]=h,""===h&&(l.lastIndex=i(c,r(l.lastIndex),u)),p++}return 0===p?null:d}]}))},function(e,t,n){"use strict";var o=n(12),r=n(22),i=n(15),a=n(33),s=n(107),l=n(75),c=Math.max,u=Math.min,f=Math.floor,d=/\$([$&`']|\d\d?|<[^>]*>)/g,p=/\$([$&`']|\d\d?)/g;n(76)("replace",2,(function(e,t,n,h){return[function(o,r){var i=e(this),a=null==o?void 0:o[t];return void 0!==a?a.call(o,i,r):n.call(String(i),o,r)},function(e,t){var r=h(n,e,this,t);if(r.done)return r.value;var f=o(e),d=String(this),p="function"==typeof t;p||(t=String(t));var y=f.global;if(y){var g=f.unicode;f.lastIndex=0}for(var b=[];;){var m=l(f,d);if(null===m)break;if(b.push(m),!y)break;""===String(m[0])&&(f.lastIndex=s(d,i(f.lastIndex),g))}for(var k,x="",w=0,S=0;S=w&&(x+=d.slice(w,T)+M,w=T+C.length)}return x+d.slice(w)}];function v(e,t,o,i,a,s){var l=o+e.length,c=i.length,u=p;return void 0!==a&&(a=r(a),u=d),n.call(s,u,(function(n,r){var s;switch(r.charAt(0)){case"$":return"$";case"&":return e;case"`":return t.slice(0,o);case"'":return t.slice(l);case"<":s=a[r.slice(1,-1)];break;default:var u=+r;if(0===u)return n;if(u>c){var d=f(u/10);return 0===d?n:d<=c?void 0===i[d-1]?r.charAt(1):i[d-1]+r.charAt(1):n}s=i[u-1]}return void 0===s?"":s}))}}))},function(e,t,n){"use strict";var o=n(12),r=n(121),i=n(75);n(76)("search",1,(function(e,t,n,a){return[function(n){var o=e(this),r=null==n?void 0:n[t];return void 0!==r?r.call(n,o):new RegExp(n)[t](String(o))},function(e){var t=a(n,e,this);if(t.done)return t.value;var s=o(e),l=String(this),c=s.lastIndex;r(c,0)||(s.lastIndex=0);var u=i(s,l);return r(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},function(e,t,n){"use strict";var o=n(99),r=n(12),i=n(64),a=n(107),s=n(15),l=n(75),c=n(106),u=n(11),f=Math.min,d=[].push,p="length",h=!u((function(){RegExp(4294967295,"y")}));n(76)("split",2,(function(e,t,n,u){var v;return v="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1)[p]||2!="ab".split(/(?:ab)*/)[p]||4!=".".split(/(.?)(.?)/)[p]||".".split(/()()/)[p]>1||"".split(/.?/)[p]?function(e,t){var r=String(this);if(void 0===e&&0===t)return[];if(!o(e))return n.call(r,e,t);for(var i,a,s,l=[],u=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),f=0,h=void 0===t?4294967295:t>>>0,v=new RegExp(e.source,u+"g");(i=c.call(v,r))&&!((a=v.lastIndex)>f&&(l.push(r.slice(f,i.index)),i[p]>1&&i.index=h));)v.lastIndex===i.index&&v.lastIndex++;return f===r[p]?!s&&v.test("")||l.push(""):l.push(r.slice(f)),l[p]>h?l.slice(0,h):l}:"0".split(void 0,0)[p]?function(e,t){return void 0===e&&0===t?[]:n.call(this,e,t)}:n,[function(n,o){var r=e(this),i=null==n?void 0:n[t];return void 0!==i?i.call(n,r,o):v.call(String(r),n,o)},function(e,t){var o=u(v,e,this,t,v!==n);if(o.done)return o.value;var c=r(e),d=String(this),p=i(c,RegExp),y=c.unicode,g=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(h?"y":"g"),b=new p(h?c:"^(?:"+c.source+")",g),m=void 0===t?4294967295:t>>>0;if(0===m)return[];if(0===d.length)return null===l(b,d)?[d]:[];for(var k=0,x=0,w=[];x0?arguments[0]:void 0)}}),{get:function(e){var t=o.getEntry(r(this,"Map"),e);return t&&t.v},set:function(e,t){return o.def(r(this,"Map"),0===e?0:e,t)}},o,!0)},function(e,t,n){"use strict";var o=n(140),r=n(52);e.exports=n(79)("Set",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"Set"),e=0===e?0:e,e)}},o)},function(e,t,n){"use strict";var o,r=n(10),i=n(36)(0),a=n(23),s=n(42),l=n(120),c=n(141),u=n(13),f=n(52),d=n(52),p=!r.ActiveXObject&&"ActiveXObject"in r,h=s.getWeak,v=Object.isExtensible,y=c.ufstore,g=function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(e){if(u(e)){var t=h(e);return!0===t?y(f(this,"WeakMap")).get(e):t?t[this._i]:void 0}},set:function(e,t){return c.def(f(this,"WeakMap"),e,t)}},m=e.exports=n(79)("WeakMap",g,b,c,!0,!0);d&&p&&(l((o=c.getConstructor(g,"WeakMap")).prototype,b),s.NEED=!0,i(["delete","has","get","set"],(function(e){var t=m.prototype,n=t[e];a(t,e,(function(t,r){if(u(t)&&!v(t)){this._f||(this._f=new o);var i=this._f[e](t,r);return"set"==e?this:i}return n.call(this,t,r)}))})))},function(e,t,n){"use strict";var o=n(141),r=n(52);n(79)("WeakSet",(function(e){return function(){return e(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(e){return o.def(r(this,"WeakSet"),e,!0)}},o,!1,!0)},function(e,t,n){"use strict";var o=n(0),r=n(80),i=n(109),a=n(12),s=n(47),l=n(15),c=n(13),u=n(10).ArrayBuffer,f=n(64),d=i.ArrayBuffer,p=i.DataView,h=r.ABV&&u.isView,v=d.prototype.slice,y=r.VIEW;o(o.G+o.W+o.F*(u!==d),{ArrayBuffer:d}),o(o.S+o.F*!r.CONSTR,"ArrayBuffer",{isView:function(e){return h&&h(e)||c(e)&&y in e}}),o(o.P+o.U+o.F*n(11)((function(){return!new d(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(e,t){if(void 0!==v&&void 0===t)return v.call(a(this),e);for(var n=a(this).byteLength,o=s(e,n),r=s(void 0===t?n:t,n),i=new(f(this,d))(l(r-o)),c=new p(this),u=new p(i),h=0;o=t.length)return{value:void 0,done:!0}}while(!((e=t[this._i++])in this._t));return{value:e,done:!1}})),o(o.S,"Reflect",{enumerate:function(e){return new i(e)}})},function(e,t,n){var o=n(34),r=n(50),i=n(26),a=n(0),s=n(13),l=n(12);a(a.S,"Reflect",{get:function e(t,n){var a,c,u=arguments.length<3?t:arguments[2];return l(t)===u?t[n]:(a=o.f(t,n))?i(a,"value")?a.value:void 0!==a.get?a.get.call(u):void 0:s(c=r(t))?e(c,n,u):void 0}})},function(e,t,n){var o=n(34),r=n(0),i=n(12);r(r.S,"Reflect",{getOwnPropertyDescriptor:function(e,t){return o.f(i(e),t)}})},function(e,t,n){var o=n(0),r=n(50),i=n(12);o(o.S,"Reflect",{getPrototypeOf:function(e){return r(i(e))}})},function(e,t,n){var o=n(0);o(o.S,"Reflect",{has:function(e,t){return t in e}})},function(e,t,n){var o=n(0),r=n(12),i=Object.isExtensible;o(o.S,"Reflect",{isExtensible:function(e){return r(e),!i||i(e)}})},function(e,t,n){var o=n(0);o(o.S,"Reflect",{ownKeys:n(143)})},function(e,t,n){var o=n(0),r=n(12),i=Object.preventExtensions;o(o.S,"Reflect",{preventExtensions:function(e){r(e);try{return i&&i(e),!0}catch(e){return!1}}})},function(e,t,n){var o=n(18),r=n(34),i=n(50),a=n(26),s=n(0),l=n(43),c=n(12),u=n(13);s(s.S,"Reflect",{set:function e(t,n,s){var f,d,p=arguments.length<4?t:arguments[3],h=r.f(c(t),n);if(!h){if(u(d=i(t)))return e(d,n,s,p);h=l(0)}if(a(h,"value")){if(!1===h.writable||!u(p))return!1;if(f=r.f(p,n)){if(f.get||f.set||!1===f.writable)return!1;f.value=s,o.f(p,n,f)}else o.f(p,n,l(0,s));return!0}return void 0!==h.set&&(h.set.call(p,s),!0)}})},function(e,t,n){var o=n(0),r=n(90);r&&o(o.S,"Reflect",{setPrototypeOf:function(e,t){r.check(e,t);try{return r.set(e,t),!0}catch(e){return!1}}})},function(e,t,n){n(333),e.exports=n(16).Array.includes},function(e,t,n){"use strict";var o=n(0),r=n(70)(!0);o(o.P,"Array",{includes:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0)}}),n(51)("includes")},function(e,t,n){n(335),e.exports=n(16).Array.flatMap},function(e,t,n){"use strict";var o=n(0),r=n(336),i=n(22),a=n(15),s=n(32),l=n(131);o(o.P,"Array",{flatMap:function(e){var t,n,o=i(this);return s(e),t=a(o.length),n=l(o,0),r(n,o,o,t,0,1,e,arguments[1]),n}}),n(51)("flatMap")},function(e,t,n){"use strict";var o=n(72),r=n(13),i=n(15),a=n(31),s=n(14)("isConcatSpreadable");e.exports=function e(t,n,l,c,u,f,d,p){for(var h,v,y=u,g=0,b=!!d&&a(d,p,3);g0)y=e(t,n,h,i(h.length),y,f-1)-1;else{if(y>=9007199254740991)throw TypeError();t[y]=h}y++}g++}return y}},function(e,t,n){n(338),e.exports=n(16).String.padStart},function(e,t,n){"use strict";var o=n(0),r=n(144),i=n(78),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);o(o.P+o.F*a,"String",{padStart:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!0)}})},function(e,t,n){n(340),e.exports=n(16).String.padEnd},function(e,t,n){"use strict";var o=n(0),r=n(144),i=n(78),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(i);o(o.P+o.F*a,"String",{padEnd:function(e){return r(this,e,arguments.length>1?arguments[1]:void 0,!1)}})},function(e,t,n){n(342),e.exports=n(16).String.trimLeft},function(e,t,n){"use strict";n(55)("trimLeft",(function(e){return function(){return e(this,1)}}),"trimStart")},function(e,t,n){n(344),e.exports=n(16).String.trimRight},function(e,t,n){"use strict";n(55)("trimRight",(function(e){return function(){return e(this,2)}}),"trimEnd")},function(e,t,n){n(346),e.exports=n(86).f("asyncIterator")},function(e,t,n){n(116)("asyncIterator")},function(e,t,n){n(348),e.exports=n(16).Object.getOwnPropertyDescriptors},function(e,t,n){var o=n(0),r=n(143),i=n(28),a=n(34),s=n(102);o(o.S,"Object",{getOwnPropertyDescriptors:function(e){for(var t,n,o=i(e),l=a.f,c=r(o),u={},f=0;c.length>f;)void 0!==(n=l(o,t=c[f++]))&&s(u,t,n);return u}})},function(e,t,n){n(350),e.exports=n(16).Object.values},function(e,t,n){var o=n(0),r=n(145)(!1);o(o.S,"Object",{values:function(e){return r(e)}})},function(e,t,n){n(352),e.exports=n(16).Object.entries},function(e,t,n){var o=n(0),r=n(145)(!0);o(o.S,"Object",{entries:function(e){return r(e)}})},function(e,t,n){"use strict";n(137),n(354),e.exports=n(16).Promise.finally},function(e,t,n){"use strict";var o=n(0),r=n(16),i=n(10),a=n(64),s=n(139);o(o.P+o.R,"Promise",{finally:function(e){var t=a(this,r.Promise||i.Promise),n="function"==typeof e;return this.then(n?function(n){return s(t,e()).then((function(){return n}))}:e,n?function(n){return s(t,e()).then((function(){throw n}))}:e)}})},function(e,t,n){n(356),n(357),n(358),e.exports=n(16)},function(e,t,n){var o=n(10),r=n(0),i=n(78),a=[].slice,s=/MSIE .\./.test(i),l=function(e){return function(t,n){var o=arguments.length>2,r=!!o&&a.call(arguments,2);return e(o?function(){("function"==typeof t?t:Function(t)).apply(this,r)}:t,n)}};r(r.G+r.B+r.F*s,{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(e,t,n){var o=n(0),r=n(108);o(o.G+o.B,{setImmediate:r.set,clearImmediate:r.clear})},function(e,t,n){for(var o=n(105),r=n(46),i=n(23),a=n(10),s=n(27),l=n(56),c=n(14),u=c("iterator"),f=c("toStringTag"),d=l.Array,p={CSSRuleList:!0,CSSStyleDeclaration:!1,CSSValueList:!1,ClientRectList:!1,DOMRectList:!1,DOMStringList:!1,DOMTokenList:!0,DataTransferItemList:!1,FileList:!1,HTMLAllCollection:!1,HTMLCollection:!1,HTMLFormElement:!1,HTMLSelectElement:!1,MediaList:!0,MimeTypeArray:!1,NamedNodeMap:!1,NodeList:!0,PaintRequestList:!1,Plugin:!1,PluginArray:!1,SVGLengthList:!1,SVGNumberList:!1,SVGPathSegList:!1,SVGPointList:!1,SVGStringList:!1,SVGTransformList:!1,SourceBufferList:!1,StyleSheetList:!0,TextTrackCueList:!1,TextTrackList:!1,TouchList:!1},h=r(p),v=0;v=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return o("end");if(i.tryLoc<=this.prev){var s=n.call(i,"catchLoc"),l=n.call(i,"finallyLoc");if(s&&l){if(this.prev=0;--o){var r=this.tryEntries[o];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),f}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;C(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),f}},e}(e.exports);try{regeneratorRuntime=o}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(30),n(2),n(3),n(364),n(365),n(366),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f){"use strict";var d=n(1);function p(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(p=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=d(r),i=d(i),s=d(s),u=d(u),f=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=p(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(f);var h=function(){function e(t){var n=this;(0,i.default)(this,e);var o=function(){};f.isObject(t)&&f.isFunction(t.onReady)&&(o=t.onReady);var r=new u.default(t);this.isReady=r.isReady.then((function(){n.exportAPI(r),o()}))}return(0,s.default)(e,[{key:"exportAPI",value:function(e){var t=this;["configuration"].forEach((function(n){t[n]=e[n]})),this.destroy=function(){for(var n in Object.values(e.moduleInstances).forEach((function(e){f.isFunction(e.destroy)&&e.destroy(),e.listeners.removeAll()})),e=null,t)Object.prototype.hasOwnProperty.call(t,n)&&delete t[n];Object.setPrototypeOf(t,null)},Object.setPrototypeOf(this,e.moduleInstances.API.methods),delete this.exportAPI,Object.entries({blocks:{clear:"clear",render:"render"},caret:{focus:"focus"},events:{on:"on",off:"off",emit:"emit"},saver:{save:"save"}}).forEach((function(n){var o=(0,r.default)(n,2),i=o[0],a=o[1];Object.entries(a).forEach((function(n){var o=(0,r.default)(n,2),a=o[0],s=o[1];t[s]=e.moduleInstances.API.methods[i][a]}))}))}}],[{key:"version",get:function(){return"2.26.2"}}]),e}();o.default=h,h.displayName="EditorJS",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var o,r,i=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(o=n.next()).done)&&(i.push(o.value),!t||i.length!==t);a=!0);}catch(e){s=!0,r=e}finally{try{a||null==n.return||n.return()}finally{if(s)throw r}}return i}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){function n(){}e.exports=Object.assign(n,{default:n,register:n,revert:function(){},__esModule:!0})},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[],void 0===(i="function"==typeof(o=function(){"use strict";Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;--n>=0&&t.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(e){var t=document.createDocumentFragment();Array.isArray(e)||(e=[e]),e.forEach((function(e){var n=e instanceof Node;t.appendChild(n?e:document.createTextNode(e))})),this.insertBefore(t,this.firstChild)}),Element.prototype.scrollIntoViewIfNeeded||(Element.prototype.scrollIntoViewIfNeeded=function(e){e=0===arguments.length||!!e;var t=this.parentNode,n=window.getComputedStyle(t,null),o=parseInt(n.getPropertyValue("border-top-width")),r=parseInt(n.getPropertyValue("border-left-width")),i=this.offsetTop-t.offsetTopt.scrollTop+t.clientHeight,s=this.offsetLeft-t.offsetLeftt.scrollLeft+t.clientWidth,c=i&&!a;(i||a)&&e&&(t.scrollTop=this.offsetTop-t.offsetTop-t.clientHeight/2-o+this.clientHeight/2),(s||l)&&e&&(t.scrollLeft=this.offsetLeft-t.offsetLeft-t.clientWidth/2-r+this.clientWidth/2),(i||a||s||l)&&!e&&this.scrollIntoView(c)})})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(20),n(21),n(2),n(3),n(19),n(8),n(53),n(149),n(81)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c,u,f,d,p){"use strict";var h=n(1);function v(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(v=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=h(r),i=h(i),s=h(s),l=h(l),c=h(c),u=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=v(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(u),f=h(f),p=h(p);var y=n(375),g=[];y.keys().forEach((function(e){e.match(/^\.\/[^_][\w/]*\.([tj])s$/)&&g.push(y(e))}));var b=function(){function e(t){var n,o,a=this;(0,s.default)(this,e),this.moduleInstances={},this.eventsDispatcher=new p.default,this.isReady=new Promise((function(e,t){n=e,o=t})),Promise.resolve().then((0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a.configuration=t,e.next=3,a.validate();case 3:return e.next=5,a.init();case 5:return e.next=7,a.start();case 7:u.logLabeled("I'm ready! (ノ◕ヮ◕)ノ*:・゚✧","log","","color: #E24A75"),setTimeout((0,i.default)(r.default.mark((function e(){var t,o,i;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,a.render();case 2:a.configuration.autofocus&&(t=a.moduleInstances,o=t.BlockManager,(i=t.Caret).setToBlock(o.blocks[0],i.positions.START),o.highlightCurrentNode()),a.moduleInstances.UI.removeLoader(),n();case 5:case"end":return e.stop()}}),e)}))),500);case 9:case"end":return e.stop()}}),e)})))).catch((function(e){u.log("Editor.js is not ready because of ".concat(e),"error"),o(e)}))}var t,n;return(0,l.default)(e,[{key:"configuration",get:function(){return this.config},set:function(e){var t,n;u.isObject(e)?this.config=Object.assign({},e):this.config={holder:e},u.deprecationAssert(!!this.config.holderId,"config.holderId","config.holder"),this.config.holderId&&!this.config.holder&&(this.config.holder=this.config.holderId,this.config.holderId=null),null==this.config.holder&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=u.LogLevels.VERBOSE),u.setLogLevel(this.config.logLevel),u.deprecationAssert(Boolean(this.config.initialBlock),"config.initialBlock","config.defaultBlock"),this.config.defaultBlock=this.config.defaultBlock||this.config.initialBlock||"paragraph",this.config.minHeight=void 0!==this.config.minHeight?this.config.minHeight:300;var o={type:this.config.defaultBlock,data:{}};this.config.placeholder=this.config.placeholder||!1,this.config.sanitizer=this.config.sanitizer||{p:!0,b:!0,a:!0},this.config.hideToolbar=!!this.config.hideToolbar&&this.config.hideToolbar,this.config.tools=this.config.tools||{},this.config.i18n=this.config.i18n||{},this.config.data=this.config.data||{blocks:[]},this.config.onReady=this.config.onReady||function(){},this.config.onChange=this.config.onChange||function(){},this.config.inlineToolbar=void 0===this.config.inlineToolbar||this.config.inlineToolbar,!u.isEmpty(this.config.data)&&this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data={blocks:[o]}),this.config.readOnly=this.config.readOnly||!1,(null===(t=this.config.i18n)||void 0===t?void 0:t.messages)&&f.default.setDictionary(this.config.i18n.messages),this.config.i18n.direction=(null===(n=this.config.i18n)||void 0===n?void 0:n.direction)||"ltr"}},{key:"validate",value:(n=(0,i.default)(r.default.mark((function e(){var t,n,o;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(t=this.config,n=t.holderId,o=t.holder,!n||!o){e.next=3;break}throw Error("«holderId» and «holder» param can't assign at the same time.");case 3:if(!u.isString(o)||c.default.get(o)){e.next=5;break}throw Error("element with ID «".concat(o,"» is missing. Pass correct holder's ID."));case 5:if(!o||!u.isObject(o)||c.default.isElement(o)){e.next=7;break}throw Error("«holder» value must be an Element node");case 7:case"end":return e.stop()}}),e,this)}))),function(){return n.apply(this,arguments)})},{key:"init",value:function(){this.constructModules(),this.configureModules()}},{key:"start",value:(t=(0,i.default)(r.default.mark((function e(){var t,n=this;return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"],e.next=3,t.reduce((function(e,t){return e.then((0,i.default)(r.default.mark((function e(){return r.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,n.moduleInstances[t].prepare();case 3:e.next=10;break;case 5:if(e.prev=5,e.t0=e.catch(0),!(e.t0 instanceof d.CriticalError)){e.next=9;break}throw new Error(e.t0.message);case 9:u.log("Module ".concat(t," was skipped because of %o"),"warn",e.t0);case 10:case"end":return e.stop()}}),e,null,[[0,5]])}))))}),Promise.resolve());case 3:case"end":return e.stop()}}),e)}))),function(){return t.apply(this,arguments)})},{key:"render",value:function(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}},{key:"constructModules",value:function(){var e=this;g.forEach((function(t){var n=u.isFunction(t)?t:t.default;try{e.moduleInstances[n.displayName]=new n({config:e.configuration,eventsDispatcher:e.eventsDispatcher})}catch(e){u.log("Module ".concat(n.displayName," skipped because"),"error",e)}}))}},{key:"configureModules",value:function(){for(var e in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,e)&&(this.moduleInstances[e].state=this.getModulesDiff(e))}},{key:"getModulesDiff",value:function(e){var t={};for(var n in this.moduleInstances)n!==e&&(t[n]=this.moduleInstances[n]);return t}}]),e}();o.default=b,b.displayName="Core",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o=n(7).default;function r(){"use strict";e.exports=r=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,i=n.hasOwnProperty,a=Object.defineProperty||function(e,t,n){e[t]=n.value},s="function"==typeof Symbol?Symbol:{},l=s.iterator||"@@iterator",c=s.asyncIterator||"@@asyncIterator",u=s.toStringTag||"@@toStringTag";function f(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{f({},"")}catch(e){f=function(e,t,n){return e[t]=n}}function d(e,t,n,o){var r=t&&t.prototype instanceof v?t:v,i=Object.create(r.prototype),s=new B(o||[]);return a(i,"_invoke",{value:C(e,n,s)}),i}function p(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var h={};function v(){}function y(){}function g(){}var b={};f(b,l,(function(){return this}));var m=Object.getPrototypeOf,k=m&&m(m(O([])));k&&k!==n&&i.call(k,l)&&(b=k);var x=g.prototype=v.prototype=Object.create(b);function w(e){["next","throw","return"].forEach((function(t){f(e,t,(function(e){return this._invoke(t,e)}))}))}function S(e,t){var n;a(this,"_invoke",{value:function(r,a){function s(){return new t((function(n,s){!function n(r,a,s,l){var c=p(e[r],e,a);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==o(f)&&i.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(f).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,l)}))}l(c.arg)}(r,a,n,s)}))}return n=n?n.then(s,s):s()}})}function C(e,t,n){var o="suspendedStart";return function(r,i){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===r)throw i;return M()}for(n.method=r,n.arg=i;;){var a=n.delegate;if(a){var s=T(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===o)throw o="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o="executing";var l=p(e,t,n);if("normal"===l.type){if(o=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o="completed",n.method="throw",n.arg=l.arg)}}}function T(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=void 0,T(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=p(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var r=o.arg;return r?r.done?(t[e.resultName]=r.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function E(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function _(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function B(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(E,this),this.reset(!0)}function O(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,o=function t(){for(;++n=0;--o){var r=this.tryEntries[o],a=r.completion;if("root"===r.tryLoc)return n("end");if(r.tryLoc<=this.prev){var s=i.call(r,"catchLoc"),l=i.call(r,"finallyLoc");if(s&&l){if(this.prev=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),_(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var o=n.completion;if("throw"===o.type){var r=o.arg;_(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:O(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(147);e.exports=function(e){if(Array.isArray(e))return o(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(e){return-1!==Function.toString.call(e).indexOf("[native code]")},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o=n(110),r=n(374);function i(t,n,a){return r()?(e.exports=i=Reflect.construct.bind(),e.exports.__esModule=!0,e.exports.default=e.exports):(e.exports=i=function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i},e.exports.__esModule=!0,e.exports.default=e.exports),i.apply(null,arguments)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t){e.exports=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o={"./api":82,"./api/":82,"./api/blocks":153,"./api/blocks.ts":153,"./api/caret":154,"./api/caret.ts":154,"./api/events":155,"./api/events.ts":155,"./api/i18n":156,"./api/i18n.ts":156,"./api/index":82,"./api/index.ts":82,"./api/inlineToolbar":157,"./api/inlineToolbar.ts":157,"./api/listeners":158,"./api/listeners.ts":158,"./api/notifier":159,"./api/notifier.ts":159,"./api/readonly":160,"./api/readonly.ts":160,"./api/sanitizer":161,"./api/sanitizer.ts":161,"./api/saver":162,"./api/saver.ts":162,"./api/selection":163,"./api/selection.ts":163,"./api/styles":164,"./api/styles.ts":164,"./api/toolbar":165,"./api/toolbar.ts":165,"./api/tooltip":166,"./api/tooltip.ts":166,"./api/ui":167,"./api/ui.ts":167,"./blockEvents":168,"./blockEvents.ts":168,"./blockManager":169,"./blockManager.ts":169,"./blockSelection":170,"./blockSelection.ts":170,"./caret":171,"./caret.ts":171,"./crossBlockSelection":172,"./crossBlockSelection.ts":172,"./dragNDrop":173,"./dragNDrop.ts":173,"./modificationsObserver":174,"./modificationsObserver.ts":174,"./paste":175,"./paste.ts":175,"./readonly":176,"./readonly.ts":176,"./rectangleSelection":177,"./rectangleSelection.ts":177,"./renderer":178,"./renderer.ts":178,"./saver":179,"./saver.ts":179,"./toolbar":83,"./toolbar/":83,"./toolbar/blockSettings":180,"./toolbar/blockSettings.ts":180,"./toolbar/conversion":181,"./toolbar/conversion.ts":181,"./toolbar/index":83,"./toolbar/index.ts":83,"./toolbar/inline":182,"./toolbar/inline.ts":182,"./tools":183,"./tools.ts":183,"./ui":185,"./ui.ts":185};function r(e){var t=i(e);return n(t)}function i(e){if(!n.o(o,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return o[e]}r.keys=function(){return Object.keys(o)},r.resolve=i,e.exports=r,r.id=375},function(e,t,n){var o=n(4);e.exports=function(e,t){for(;!Object.prototype.hasOwnProperty.call(e,t)&&null!==(e=o(e)););return e},e.exports.__esModule=!0,e.exports.default=e.exports},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(378)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,[{key:"show",value:function(e){a.default.show(e)}}]),e}();o.default=l,l.displayName="Notifier",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=0)}([function(e,t,n){"use strict";n(1),e.exports=function(){var e=n(6),t=null;return{show:function(n){if(n.message){!function(){if(t)return!0;t=e.getWrapper(),document.body.appendChild(t)}();var o=null,r=n.time||8e3;switch(n.type){case"confirm":o=e.confirm(n);break;case"prompt":o=e.prompt(n);break;default:o=e.alert(n),window.setTimeout((function(){o.remove()}),r)}t.appendChild(o),o.classList.add("cdx-notify--bounce-in")}}}}()},function(e,t,n){var o=n(2);"string"==typeof o&&(o=[[e.i,o,""]]),n(4)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(e.exports=o.locals)},function(e,t,n){(e.exports=n(3)(!1)).push([e.i,'.cdx-notify--error{background:#fffbfb!important}.cdx-notify--error::before{background:#fb5d5d!important}.cdx-notify__input{max-width:130px;padding:5px 10px;background:#f7f7f7;border:0;border-radius:3px;font-size:13px;color:#656b7c;outline:0}.cdx-notify__input:-ms-input-placeholder{color:#656b7c}.cdx-notify__input::placeholder{color:#656b7c}.cdx-notify__input:focus:-ms-input-placeholder{color:rgba(101,107,124,.3)}.cdx-notify__input:focus::placeholder{color:rgba(101,107,124,.3)}.cdx-notify__button{border:none;border-radius:3px;font-size:13px;padding:5px 10px;cursor:pointer}.cdx-notify__button:last-child{margin-left:10px}.cdx-notify__button--cancel{background:#f2f5f7;box-shadow:0 2px 1px 0 rgba(16,19,29,0);color:#656b7c}.cdx-notify__button--cancel:hover{background:#eee}.cdx-notify__button--confirm{background:#34c992;box-shadow:0 1px 1px 0 rgba(18,49,35,.05);color:#fff}.cdx-notify__button--confirm:hover{background:#33b082}.cdx-notify__btns-wrapper{display:-ms-flexbox;display:flex;-ms-flex-flow:row nowrap;flex-flow:row nowrap;margin-top:5px}.cdx-notify__cross{position:absolute;top:5px;right:5px;width:10px;height:10px;padding:5px;opacity:.54;cursor:pointer}.cdx-notify__cross::after,.cdx-notify__cross::before{content:\'\';position:absolute;left:9px;top:5px;height:12px;width:2px;background:#575d67}.cdx-notify__cross::before{transform:rotate(-45deg)}.cdx-notify__cross::after{transform:rotate(45deg)}.cdx-notify__cross:hover{opacity:1}.cdx-notifies{position:fixed;z-index:2;bottom:20px;left:20px;font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Oxygen,Ubuntu,Cantarell,"Fira Sans","Droid Sans","Helvetica Neue",sans-serif}.cdx-notify{position:relative;width:220px;margin-top:15px;padding:13px 16px;background:#fff;box-shadow:0 11px 17px 0 rgba(23,32,61,.13);border-radius:5px;font-size:14px;line-height:1.4em;word-wrap:break-word}.cdx-notify::before{content:\'\';position:absolute;display:block;top:0;left:0;width:3px;height:calc(100% - 6px);margin:3px;border-radius:5px;background:0 0}@keyframes bounceIn{0%{opacity:0;transform:scale(.3)}50%{opacity:1;transform:scale(1.05)}70%{transform:scale(.9)}100%{transform:scale(1)}}.cdx-notify--bounce-in{animation-name:bounceIn;animation-duration:.6s;animation-iteration-count:1}.cdx-notify--success{background:#fafffe!important}.cdx-notify--success::before{background:#41ffb1!important}',""])},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n=function(e,t){var n,o=e[1]||"",r=e[3];if(!r)return o;if(t&&"function"==typeof btoa){var i=(n=r,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=r.sources.map((function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"}));return[o].concat(a).concat([i]).join("\n")}return[o].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n})).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var o={},r=0;r=0&&u.splice(t,1)}function y(e){var t=document.createElement("style");return void 0===e.attrs.type&&(e.attrs.type="text/css"),g(t,e.attrs),h(e,t),t}function g(e,t){Object.keys(t).forEach((function(n){e.setAttribute(n,t[n])}))}function b(e,t){var n,o,r,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=c++;n=l||(l=y(t)),o=x.bind(null,n,a,!1),r=x.bind(null,n,a,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return void 0===e.attrs.type&&(e.attrs.type="text/css"),e.attrs.rel="stylesheet",g(t,e.attrs),h(e,t),t}(t),o=function(e,t,n){var o=n.css,r=n.sourceMap,i=void 0===t.convertToAbsoluteUrls&&r;(t.convertToAbsoluteUrls||i)&&(o=f(o)),r&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(r))))+" */");var a=new Blob([o],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),r=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=y(t),o=function(e,t){var n=t.css,o=t.media;if(o&&e.setAttribute("media",o),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),r=function(){v(n)});return o(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;o(e=t)}else r()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=p(e,t);return d(n,t),function(e){for(var o=[],r=0;r0;)t.insertBefore(l.childNodes[0],l);t.removeChild(l),this._sanitize(e,t);break}for(var v=0;v{this.showed&&this.hide(!0)},this.loadStyles(),this.prepare(),window.addEventListener("scroll",this.handleWindowScroll,{passive:!0})}get CSS(){return{tooltip:"ct",tooltipContent:"ct__content",tooltipShown:"ct--shown",placement:{left:"ct--left",bottom:"ct--bottom",right:"ct--right",top:"ct--top"}}}show(e,t,n){this.nodes.wrapper||this.prepare(),this.hidingTimeout&&clearTimeout(this.hidingTimeout);const o=Object.assign({placement:"bottom",marginTop:0,marginLeft:0,marginRight:0,marginBottom:0,delay:70,hidingDelay:0},n);if(o.hidingDelay&&(this.hidingDelay=o.hidingDelay),this.nodes.content.innerHTML="","string"==typeof t)this.nodes.content.appendChild(document.createTextNode(t));else{if(!(t instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof t+" given.");this.nodes.content.appendChild(t)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),o.placement){case"top":this.placeTop(e,o);break;case"left":this.placeLeft(e,o);break;case"right":this.placeRight(e,o);break;case"bottom":default:this.placeBottom(e,o)}o&&o.delay?this.showingTimeout=setTimeout(()=>{this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0},o.delay):(this.nodes.wrapper.classList.add(this.CSS.tooltipShown),this.showed=!0)}hide(e=!1){if(this.hidingDelay&&!e)return this.hidingTimeout&&clearTimeout(this.hidingTimeout),void(this.hidingTimeout=setTimeout(()=>{this.hide(!0)},this.hidingDelay));this.nodes.wrapper.classList.remove(this.CSS.tooltipShown),this.showed=!1,this.showingTimeout&&clearTimeout(this.showingTimeout)}onHover(e,t,n){e.addEventListener("mouseenter",()=>{this.show(e,t,n)}),e.addEventListener("mouseleave",()=>{this.hide()})}destroy(){this.nodes.wrapper.remove(),window.removeEventListener("scroll",this.handleWindowScroll)}prepare(){this.nodes.wrapper=this.make("div",this.CSS.tooltip),this.nodes.content=this.make("div",this.CSS.tooltipContent),this.append(this.nodes.wrapper,this.nodes.content),this.append(document.body,this.nodes.wrapper)}loadStyles(){const e="codex-tooltips-style";if(document.getElementById(e))return;const t=n(2),o=this.make("style",null,{textContent:t.toString(),id:e});this.prepend(document.head,o)}placeBottom(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.bottom+window.pageYOffset+this.offsetTop+t.marginTop;this.applyPlacement("bottom",o,r)}placeTop(e,t){const n=e.getBoundingClientRect(),o=n.left+e.clientWidth/2-this.nodes.wrapper.offsetWidth/2,r=n.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",o,r)}placeLeft(e,t){const n=e.getBoundingClientRect(),o=n.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-t.marginLeft,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",o,r)}placeRight(e,t){const n=e.getBoundingClientRect(),o=n.right+this.offsetRight+t.marginRight,r=n.top+window.pageYOffset+e.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",o,r)}applyPlacement(e,t,n){this.nodes.wrapper.classList.add(this.CSS.placement[e]),this.nodes.wrapper.style.left=t+"px",this.nodes.wrapper.style.top=n+"px"}make(e,t=null,n={}){const o=document.createElement(e);Array.isArray(t)?o.classList.add(...t):t&&o.classList.add(t);for(const e in n)n.hasOwnProperty(e)&&(o[e]=n[e]);return o}append(e,t){Array.isArray(t)?t.forEach(t=>e.appendChild(t)):e.appendChild(t)}prepend(e,t){Array.isArray(t)?(t=t.reverse()).forEach(t=>e.prepend(t)):e.prepend(t)}}},function(e,t){e.exports='.ct{z-index:999;opacity:0;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;pointer-events:none;-webkit-transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1);transition:opacity 50ms ease-in,transform 70ms cubic-bezier(.215,.61,.355,1),-webkit-transform 70ms cubic-bezier(.215,.61,.355,1);will-change:opacity,top,left;-webkit-box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);box-shadow:0 8px 12px 0 rgba(29,32,43,.17),0 4px 5px -3px rgba(5,6,12,.49);border-radius:9px}.ct,.ct:before{position:absolute;top:0;left:0}.ct:before{content:"";bottom:0;right:0;background-color:#1d202b;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url("")){.ct:before{border-radius:0;-webkit-mask-box-image:url(\'data:image/svg+xml;charset=utf-8,\') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:"";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}'}]).default},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(19),n(8),n(25)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c){"use strict";var u=n(1);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l),c=u(c);var d=function(){function e(t,n){(0,r.default)(this,e),this.cursor=-1,this.items=[],this.items=t||[],this.focusedCssClass=n}return(0,i.default)(e,[{key:"currentItem",get:function(){return-1===this.cursor?null:this.items[this.cursor]}},{key:"setCursor",value:function(e){e=-1&&(this.dropCursor(),this.cursor=e,this.items[this.cursor].classList.add(this.focusedCssClass))}},{key:"setItems",value:function(e){this.items=e}},{key:"next",value:function(){this.cursor=this.leafNodesAndReturnIndex(e.directions.RIGHT)}},{key:"previous",value:function(){this.cursor=this.leafNodesAndReturnIndex(e.directions.LEFT)}},{key:"dropCursor",value:function(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}},{key:"leafNodesAndReturnIndex",value:function(t){var n=this;if(0===this.items.length)return this.cursor;var o=this.cursor;return-1===o?o=t===e.directions.RIGHT?-1:0:this.items[o].classList.remove(this.focusedCssClass),o=t===e.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length,s.default.canSetCaret(this.items[o])&&l.delay((function(){return c.default.setCursor(n.items[o])}),50)(),this.items[o].classList.add(this.focusedCssClass),o}}]),e}();o.default=d,d.displayName="DomIterator",d.directions={RIGHT:"right",LEFT:"left"},e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8),n(19),n(60)],void 0===(i="function"==typeof(o=function(o,r,i,s,l,c){"use strict";var u=n(1);function f(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(f=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=f(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(s),l=u(l);var d=function(){function e(t){(0,r.default)(this,e),this.blocks=[],this.workingArea=t}return(0,i.default)(e,[{key:"length",get:function(){return this.blocks.length}},{key:"array",get:function(){return this.blocks}},{key:"nodes",get:function(){return s.array(this.workingArea.children)}},{key:"push",value:function(e){this.blocks.push(e),this.insertToDOM(e)}},{key:"swap",value:function(e,t){var n=this.blocks[t];l.default.swap(this.blocks[e].holder,n.holder),this.blocks[t]=this.blocks[e],this.blocks[e]=n}},{key:"move",value:function(e,t){var n=this.blocks.splice(t,1)[0],o=e-1,r=Math.max(0,o),i=this.blocks[r];e>0?this.insertToDOM(n,"afterend",i):this.insertToDOM(n,"beforebegin",i),this.blocks.splice(e,0,n);var a=this.composeBlockEvent("move",{fromIndex:t,toIndex:e});n.call(c.BlockToolAPI.MOVED,a)}},{key:"insert",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.length){e>this.length&&(e=this.length),n&&(this.blocks[e].holder.remove(),this.blocks[e].call(c.BlockToolAPI.REMOVED));var o=n?1:0;if(this.blocks.splice(e,o,t),e>0){var r=this.blocks[e-1];this.insertToDOM(t,"afterend",r)}else{var i=this.blocks[e+1];i?this.insertToDOM(t,"beforebegin",i):this.insertToDOM(t)}}else this.push(t)}},{key:"remove",value:function(e){isNaN(e)&&(e=this.length-1),this.blocks[e].holder.remove(),this.blocks[e].call(c.BlockToolAPI.REMOVED),this.blocks.splice(e,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.forEach((function(e){return e.call(c.BlockToolAPI.REMOVED)})),this.blocks.length=0}},{key:"insertAfter",value:function(e,t){var n=this.blocks.indexOf(e);this.insert(n+1,t)}},{key:"get",value:function(e){return this.blocks[e]}},{key:"indexOf",value:function(e){return this.blocks.indexOf(e)}},{key:"insertToDOM",value:function(e,t,n){t?n.holder.insertAdjacentElement(t,e.holder):this.workingArea.appendChild(e.holder),e.call(c.BlockToolAPI.RENDERED)}},{key:"composeBlockEvent",value:function(e,t){return new CustomEvent(e,{detail:t})}}],[{key:"set",value:function(e,t,n){return isNaN(Number(t))?(Reflect.set(e,t,n),!0):(e.insert(+t,n),!0)}},{key:"get",value:function(e,t){return isNaN(Number(t))?Reflect.get(e,t):e.get(+t)}}]),e}();o.default=d,d.displayName="Blocks",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t],void 0===(i="function"==typeof(o=function(e){"use strict";var t;Object.defineProperty(e,"__esModule",{value:!0}),e.BlockMutationType=void 0,e.BlockMutationType=t,function(e){e.Added="block-added",e.Removed="block-removed",e.Moved="block-moved",e.Changed="block-changed"}(t||(e.BlockMutationType=t={}))})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){"use strict";function o(e,t){for(var n=0;n=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a};e.ToolboxEvent=S,function(e){e.Opened="toolbox-opened",e.Closed="toolbox-closed",e.BlockAdded="toolbox-block-added"}(S||(e.ToolboxEvent=S={}));var T=function(e){(0,l.default)(c,e);var n,a=w(c);function c(e){var t,n=e.api,o=e.tools,i=e.i18nLabels;return(0,r.default)(this,c),(t=a.call(this)).opened=!1,t.nodes={toolbox:null},t.onOverlayClicked=function(){t.close()},t.api=n,t.tools=o,t.i18nLabels=i,t}return(0,i.default)(c,[{key:"isEmpty",get:function(){return 0===this.toolsToBeDisplayed.length}},{key:"make",value:function(){return this.popover=new y.default({scopeElement:this.api.ui.nodes.redactor,className:c.CSS.toolbox,searchable:!0,filterLabel:this.i18nLabels.filter,nothingFoundLabel:this.i18nLabels.nothingFound,items:this.toolboxItemsToBeDisplayed}),this.popover.on(y.PopoverEvent.OverlayClicked,this.onOverlayClicked),this.enableShortcuts(),this.nodes.toolbox=this.popover.getElement(),this.nodes.toolbox}},{key:"hasFocus",value:function(){var e;return null===(e=this.popover)||void 0===e?void 0:e.hasFocus()}},{key:"destroy",value:function(){var e;(0,s.default)((0,u.default)(c.prototype),"destroy",this).call(this),this.nodes&&this.nodes.toolbox&&(this.nodes.toolbox.remove(),this.nodes.toolbox=null),this.removeAllShortcuts(),null===(e=this.popover)||void 0===e||e.off(y.PopoverEvent.OverlayClicked,this.onOverlayClicked)}},{key:"toolButtonActivated",value:function(e,t){this.insertNewBlock(e,t)}},{key:"open",value:function(){var e;this.isEmpty||(null===(e=this.popover)||void 0===e||e.show(),this.opened=!0,this.emit(S.Opened))}},{key:"close",value:function(){var e;null===(e=this.popover)||void 0===e||e.hide(),this.opened=!1,this.emit(S.Closed)}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"toolsToBeDisplayed",get:function(){var e=[];return this.tools.forEach((function(t){t.toolbox&&e.push(t)})),e}},{key:"toolboxItemsToBeDisplayed",get:function(){var e=this,t=function(t,n){return{icon:t.icon,label:g.default.t(b.I18nInternalNS.toolNames,t.title||d.capitalize(n.name)),name:n.name,onActivate:function(){e.toolButtonActivated(n.name,t.data)},secondaryLabel:n.shortcut?d.beautifyShortcut(n.shortcut):""}};return this.toolsToBeDisplayed.reduce((function(e,n){return Array.isArray(n.toolbox)?n.toolbox.forEach((function(o){e.push(t(o,n))})):void 0!==n.toolbox&&e.push(t(n.toolbox,n)),e}),[])}},{key:"enableShortcuts",value:function(){var e=this;this.toolsToBeDisplayed.forEach((function(t){var n=t.shortcut;n&&e.enableShortcutForTool(t.name,n)}))}},{key:"enableShortcutForTool",value:function(e,t){var n=this;h.default.add({name:t,on:this.api.ui.nodes.redactor,handler:function(t){t.preventDefault(),n.insertNewBlock(e)}})}},{key:"removeAllShortcuts",value:function(){var e=this;this.toolsToBeDisplayed.forEach((function(t){var n=t.shortcut;n&&h.default.remove(e.api.ui.nodes.redactor,n)}))}},{key:"insertNewBlock",value:(n=(0,o.default)(t.default.mark((function e(n,o){var r,i,a,s,l,c;return t.default.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(r=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(r)){e.next=4;break}return e.abrupt("return");case 4:if(a=i.isEmpty?r:r+1,!o){e.next=10;break}return e.next=8,this.api.blocks.composeBlockData(n);case 8:l=e.sent,s=Object.assign(l,o);case 10:(c=this.api.blocks.insert(n,s,void 0,a,void 0,i.isEmpty)).call(p.BlockToolAPI.APPEND_CALLBACK),this.api.caret.setToBlock(a),this.emit(S.BlockAdded,{block:c}),this.api.toolbar.close();case 15:case"end":return e.stop()}}),e,this)}))),function(e,t){return n.apply(this,arguments)})}],[{key:"CSS",get:function(){return{toolbox:"ce-toolbox"}}}]),c}(v.default);e.default=T,T.displayName="Toolbox",C([d.cacheable],T.prototype,"toolsToBeDisplayed",null),C([d.cacheable],T.prototype,"toolboxItemsToBeDisplayed",null)})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i);var l=function(){function e(){(0,r.default)(this,e)}return(0,i.default)(e,[{key:"lock",value:function(){a.isIosDevice?this.lockHard():document.body.classList.add(e.CSS.scrollLocked)}},{key:"unlock",value:function(){a.isIosDevice?this.unlockHard():document.body.classList.remove(e.CSS.scrollLocked)}},{key:"lockHard",value:function(){this.scrollPosition=window.pageYOffset,document.documentElement.style.setProperty("--window-scroll-offset","".concat(this.scrollPosition,"px")),document.body.classList.add(e.CSS.scrollLockedHard)}},{key:"unlockHard",value:function(){document.body.classList.remove(e.CSS.scrollLockedHard),null!==this.scrollPosition&&window.scrollTo(0,this.scrollPosition),this.scrollPosition=null}}]),e}();o.default=l,l.displayName="ScrollLocker",l.CSS={scrollLocked:"ce-scroll-locked",scrollLockedHard:"ce-scroll-locked--hard"},e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){window,e.exports=function(e){var t={};function n(o){if(t[o])return t[o].exports;var r=t[o]={i:o,l:!1,exports:{}};return e[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=e,n.c=t,n.d=function(e,t,o){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:o})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var r in e)n.d(o,r,function(t){return e[t]}.bind(null,r));return o},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="/",n(n.s=4)}([function(e,t,n){var o=n(1),r=n(2);"string"==typeof(r=r.__esModule?r.default:r)&&(r=[[e.i,r,""]]),o(r,{insert:"head",singleton:!1}),e.exports=r.locals||{}},function(e,t,n){"use strict";var o,r=function(){var e={};return function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(e){n=null}e[t]=n}return e[t]}}(),i=[];function a(e){for(var t=-1,n=0;n',title:"Text"}}}]),e}()}]).default},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3)],void 0===(i="function"==typeof(o=function(o,r,i){"use strict";var a=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=a(r),i=a(i);var s=function(){function e(){(0,r.default)(this,e),this.commandName="bold",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--bold"},this.nodes={button:void 0}}return(0,i.default)(e,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='\n\n',this.nodes.button}},{key:"surround",value:function(){document.execCommand(this.commandName)}},{key:"checkState",value:function(){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+B"}}],[{key:"sanitize",get:function(){return{b:{}}}}]),e}();o.default=s,s.displayName="BoldInlineTool",s.isInline=!0,s.title="Bold",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3)],void 0===(i="function"==typeof(o=function(o,r,i){"use strict";var a=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=a(r),i=a(i);var s=function(){function e(){(0,r.default)(this,e),this.commandName="italic",this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--italic"},this.nodes={button:null}}return(0,i.default)(e,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML='\n\n',this.nodes.button}},{key:"surround",value:function(){document.execCommand(this.commandName)}},{key:"checkState",value:function(){var e=document.queryCommandState(this.commandName);return this.nodes.button.classList.toggle(this.CSS.buttonActive,e),e}},{key:"shortcut",get:function(){return"CMD+I"}}],[{key:"sanitize",get:function(){return{i:{}}}}]),e}();o.default=s,s.displayName="ItalicInlineTool",s.isInline=!0,s.title="Italic",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i,a=n(7);"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(25),n(8)],void 0===(i="function"==typeof(o=function(o,r,i,s,l){"use strict";var c=n(1);function u(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,n=new WeakMap;return(u=function(e){return e?n:t})(e)}Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=c(r),i=c(i),s=c(s),l=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!==a(e)&&"function"!=typeof e)return{default:e};var n=u(t);if(n&&n.has(e))return n.get(e);var o={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var s=r?Object.getOwnPropertyDescriptor(e,i):null;s&&(s.get||s.set)?Object.defineProperty(o,i,s):o[i]=e[i]}return o.default=e,n&&n.set(e,o),o}(l);var f='\n\n',d=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.commandLink="createLink",this.commandUnlink="unlink",this.ENTER_KEY=13,this.CSS={button:"ce-inline-tool",buttonActive:"ce-inline-tool--active",buttonModifier:"ce-inline-tool--link",buttonUnlink:"ce-inline-tool--unlink",input:"ce-inline-tool-input",inputShowed:"ce-inline-tool-input--showed"},this.nodes={button:null,input:null},this.inputOpened=!1,this.toolbar=n.toolbar,this.inlineToolbar=n.inlineToolbar,this.notifier=n.notifier,this.i18n=n.i18n,this.selection=new s.default}return(0,i.default)(e,[{key:"render",value:function(){return this.nodes.button=document.createElement("button"),this.nodes.button.type="button",this.nodes.button.classList.add(this.CSS.button,this.CSS.buttonModifier),this.nodes.button.innerHTML=f,this.nodes.button}},{key:"renderActions",value:function(){var e=this;return this.nodes.input=document.createElement("input"),this.nodes.input.placeholder=this.i18n.t("Add a link"),this.nodes.input.classList.add(this.CSS.input),this.nodes.input.addEventListener("keydown",(function(t){t.keyCode===e.ENTER_KEY&&e.enterPressed(t)})),this.nodes.input}},{key:"surround",value:function(e){if(e){this.inputOpened?(this.selection.restore(),this.selection.removeFakeBackground()):(this.selection.setFakeBackground(),this.selection.save());var t=this.selection.findParentTag("A");if(t){var n=document.getElementsByClassName("unlink-button")[0];return this.selection.expandToTag(t),this.unlink(),this.nodes.input.value="",this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive),n.remove(),void this.inlineToolbar.close()}}this.toggleActions()}},{key:"checkState",value:function(){var e=this,t=this.selection.findParentTag("A"),n=document.createElement("button");if(t){this.nodes.button.innerHTML='\n\n',this.nodes.button.classList.add(this.CSS.buttonUnlink),this.nodes.button.classList.add(this.CSS.buttonActive),this.openActions(),n.classList.add("unlink-button"),n.textContent=this.i18n.t("Remove"),n.addEventListener("click",(function(){e.selection.expandToTag(t),e.unlink(),e.nodes.input.value="",e.nodes.button.classList.remove(e.CSS.buttonUnlink),e.nodes.button.classList.remove(e.CSS.buttonActive),n.remove(),e.inlineToolbar.close()}));var o=t.getAttribute("href");this.nodes.input.value="null"!==o?o:"",""===this.nodes.input.value||document.querySelector(".unlink-button")||document.querySelector(".ce-inline-toolbar__actions").appendChild(n),this.selection.save()}else this.nodes.button.innerHTML=f,this.nodes.button.classList.remove(this.CSS.buttonUnlink),this.nodes.button.classList.remove(this.CSS.buttonActive);return!!t}},{key:"clear",value:function(){this.closeActions()}},{key:"shortcut",get:function(){return"CMD+K"}},{key:"toggleActions",value:function(){this.inputOpened?this.closeActions(!1):this.openActions(!0)}},{key:"openActions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=document.getElementsByClassName("ce-inline-toolbar")[0];this.nodes.input.classList.add(this.CSS.inputShowed),t.style.transform="translate(-50%, -33px)",e&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],t=document.getElementsByClassName("ce-inline-toolbar")[0];if(this.selection.isFakeBackgroundEnabled){var n=new s.default;n.save(),this.selection.restore(),this.selection.removeFakeBackground(),n.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),t.style.transform="",this.nodes.input.value="",e&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(e){var t=this.nodes.input.value||"";return t.trim()?this.validateURL(t)?(t=this.prepareLink(t),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(t),e.preventDefault(),e.stopPropagation(),e.stopImmediatePropagation(),this.selection.collapseToEnd(),void this.inlineToolbar.close()):(this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void l.log("Incorrect Link pasted","warn",t)):(this.selection.restore(),this.unlink(),e.preventDefault(),void this.closeActions())}},{key:"validateURL",value:function(e){return!/\s/.test(e)}},{key:"prepareLink",value:function(e){return e=e.trim(),e=this.addProtocol(e)}},{key:"addProtocol",value:function(e){if(/^(\w+):(\/\/)?/.test(e))return e;var t=/^\/[^/\s]/.test(e),n="#"===e.substring(0,1),o=/^\/\/[^/\s]/.test(e);return t||n||o||(e="http://"+e),e}},{key:"insertLink",value:function(e){var t=this.selection.findParentTag("A");t&&this.selection.expandToTag(t),document.execCommand(this.commandLink,!1,e),this.selection.findParentTag("A").setAttribute("target","_blank")}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),e}();o.default=d,d.displayName="LinkInlineTool",d.isInline=!0,d.title="Link",e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(19)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.data,o=t.api;(0,r.default)(this,e),this.CSS={wrapper:"ce-stub",info:"ce-stub__info",title:"ce-stub__title",subtitle:"ce-stub__subtitle"},this.api=o,this.title=n.title||this.api.i18n.t("Error"),this.subtitle=this.api.i18n.t("The block can not be displayed correctly."),this.savedData=n.savedData,this.wrapper=this.make()}return(0,i.default)(e,[{key:"render",value:function(){return this.wrapper}},{key:"save",value:function(){return this.savedData}},{key:"make",value:function(){var e=a.default.make("div",this.CSS.wrapper),t=a.default.make("div",this.CSS.info),n=a.default.make("div",this.CSS.title,{textContent:this.title}),o=a.default.make("div",this.CSS.subtitle,{textContent:this.subtitle});return e.innerHTML='',t.appendChild(n),t.appendChild(o),e.appendChild(t),e}}]),e}();o.default=l,l.displayName="Stub",l.isReadOnlySupported=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(68),n(393),n(394),n(395)],void 0===(i="function"==typeof(o=function(o,r,i,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=u(r),i=u(i),s=u(s),l=u(l),c=u(c);var f=function(e,t){var n={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(n[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(o=Object.getOwnPropertySymbols(e);r=0;s--)(r=e[s])&&(a=(i<3?r(a):i>3?r(t,n,a):r(t,n))||a);return i>3&&a&&Object.defineProperty(t,n,a),a},k=function(e){(0,l.default)(n,e);var t=b(n);function n(){var e;return(0,r.default)(this,n),(e=t.apply(this,arguments)).type=d.ToolType.Block,e.inlineTools=new h.default,e.tunes=new h.default,e}return(0,i.default)(n,[{key:"create",value:function(e,t,n){return new this.constructable({data:e,block:t,readOnly:n,api:this.api.getMethodsForTool(this),config:this.settings})}},{key:"isReadOnlySupported",get:function(){return!0===this.constructable[d.InternalBlockToolSettings.IsReadOnlySupported]}},{key:"isLineBreaksEnabled",get:function(){return this.constructable[d.InternalBlockToolSettings.IsEnabledLineBreaks]}},{key:"toolbox",get:function(){var e=this.constructable[d.InternalBlockToolSettings.Toolbox],t=this.config[d.UserSettings.Toolbox];if(!p.isEmpty(e)&&!1!==t)return t?Array.isArray(e)?Array.isArray(t)?t.map((function(t,n){var o=e[n];return o?Object.assign(Object.assign({},o),t):t})):[t]:Array.isArray(t)?t:[Object.assign(Object.assign({},e),t)]:Array.isArray(e)?e:[e]}},{key:"conversionConfig",get:function(){return this.constructable[d.InternalBlockToolSettings.ConversionConfig]}},{key:"enabledInlineTools",get:function(){return this.config[d.UserSettings.EnabledInlineTools]||!1}},{key:"enabledBlockTunes",get:function(){return this.config[d.UserSettings.EnabledBlockTunes]}},{key:"pasteConfig",get:function(){return this.constructable[d.InternalBlockToolSettings.PasteConfig]||{}}},{key:"sanitizeConfig",get:function(){var e=(0,s.default)((0,u.default)(n.prototype),"sanitizeConfig",this),t=this.baseSanitizeConfig;if(p.isEmpty(e))return t;var o={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){var i=e[r];p.isObject(i)?o[r]=Object.assign({},t,i):o[r]=i}return o}},{key:"baseSanitizeConfig",get:function(){var e={};return Array.from(this.inlineTools.values()).forEach((function(t){return Object.assign(e,t.sanitizeConfig)})),Array.from(this.tunes.values()).forEach((function(t){return Object.assign(e,t.sanitizeConfig)})),e}}]),n}(d.default);o.default=k,k.displayName="BlockTool",m([p.cacheable],k.prototype,"sanitizeConfig",null),m([p.cacheable],k.prototype,"baseSanitizeConfig",null),e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(84)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.CSS={animation:"wobble"},this.api=n}return(0,i.default)(e,[{key:"render",value:function(){var e=this;return{icon:'\n\n',label:this.api.i18n.t("Move down"),onActivate:function(t,n){return e.handleClick(n)},name:"move-down"}}},{key:"handleClick",value:function(e){var t=this,n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n+1);if(!o){var r=e.target.closest("."+a.default.CSS.item).querySelector("."+a.default.CSS.itemIcon);return r.classList.add(this.CSS.animation),void window.setTimeout((function(){r.classList.remove(t.CSS.animation)}),500)}var i=o.holder,s=i.getBoundingClientRect(),l=Math.abs(window.innerHeight-i.offsetHeight);s.top\n\n',label:this.api.i18n.t("Delete"),name:"delete",onActivate:function(){return e.handleClick()}}}},{key:"handleClick",value:function(){this.api.blocks.delete()}}]),e}();o.default=s,s.displayName="DeleteTune",s.isTune=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t,n){var o,r,i;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,r=[t,n(2),n(3),n(84)],void 0===(i="function"==typeof(o=function(o,r,i,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,r=s(r),i=s(i),a=s(a);var l=function(){function e(t){var n=t.api;(0,r.default)(this,e),this.CSS={animation:"wobble"},this.api=n}return(0,i.default)(e,[{key:"render",value:function(){var e=this;return{icon:'\n\n',label:this.api.i18n.t("Move up"),onActivate:function(t,n){return e.handleClick(n)},name:"move-up"}}},{key:"handleClick",value:function(e){var t=this,n=this.api.blocks.getCurrentBlockIndex(),o=this.api.blocks.getBlockByIndex(n),r=this.api.blocks.getBlockByIndex(n-1);if(0===n||!o||!r){var i=e.target.closest("."+a.default.CSS.item).querySelector("."+a.default.CSS.itemIcon);return i.classList.add(this.CSS.animation),void window.setTimeout((function(){i.classList.remove(t.CSS.animation)}),500)}var s,l=o.holder,c=r.holder,u=l.getBoundingClientRect(),f=c.getBoundingClientRect();s=f.top>0?Math.abs(u.top)-Math.abs(f.top):window.innerHeight-Math.abs(u.top)+Math.abs(f.top),window.scrollBy(0,-1*s),this.api.blocks.move(n-1),this.api.toolbar.toggleBlockSettings(!0)}}]),e}();o.default=l,l.displayName="MoveUpTune",l.isTune=!0,e.exports=t.default})?o.apply(t,r):o)||(e.exports=i)},function(e,t){e.exports='.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide,.codex-editor__redactor--hidden{display:none}.codex-editor__redactor [contenteditable]:empty:after{content:"\\feff "}@media (min-width:201px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:201px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width:201px){.codex-editor--narrow .ce-toolbar__actions{right:-5px}}.codex-editor__loader{position:relative;height:30vh}.codex-editor__loader:before{content:"";position:absolute;left:50%;top:50%;width:30px;height:30px;margin-top:-15px;margin-left:-15px;border-radius:50%;border:2px solid rgba(201,201,204,.48);border-top-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-animation:editor-loader-spin .8s linear infinite;animation:editor-loader-spin .8s linear infinite;will-change:transform}.codex-editor-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0;left:0;right:0;bottom:0;z-index:999;pointer-events:none;overflow:hidden}.codex-editor-overlay__container{position:relative;pointer-events:auto;z-index:0}.codex-editor-overlay__rectangle{position:absolute;pointer-events:none;background-color:rgba(46,170,220,.2);border:1px solid transparent}.codex-editor svg{max-height:100%;fill:currentColor}::-moz-selection{background-color:#d4ecff}::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}@-webkit-keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes editor-loader-spin{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(var(--window-scroll-offset)*-1);position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}@media (max-width:200px){.ce-toolbar--opened{display:-webkit-box;display:-ms-flexbox;display:flex}}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}@media (max-width:200px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:100%}}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (max-width:200px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover:hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__plus{-ms-flex-negative:0;flex-shrink:0;height:100%}.ce-toolbar__plus-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}.ce-toolbar__plus--hidden{visibility:hidden}@media (max-width:200px){.ce-toolbar__plus{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);border-radius:8px;z-index:2}}@media (max-width:200px) and (max-width:200px){.ce-toolbar__plus{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}@media (max-width:200px){.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;height:26px}@media (max-width:200px){.ce-toolbar__actions{position:absolute;right:auto;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center}}.ce-toolbar__actions--opened{opacity:1}@media (max-width:200px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}@media (max-width:200px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover:hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbar__settings-btn{width:18px;height:100%;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (min-width:201px){.ce-toolbar__settings-btn{width:18px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width:200px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);border-radius:8px;z-index:2}}@media (max-width:200px) and (max-width:200px){.ce-toolbar__settings-btn{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}@media (max-width:200px){.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-toolbar__settings-btn{position:static}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:16px;height:16px}@media (min-width:201px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{--gap:8px}@media (max-width:200px){.ce-toolbox{position:static;-webkit-transform:none!important;transform:none!important;-webkit-box-align:center;-ms-flex-align:center;align-items:center;overflow-x:auto}}@media (min-width:201px){.ce-toolbox{position:absolute;top:calc(26px + var(--gap));left:44px}.ce-toolbox--opened-top{top:calc(var(--gap)*-1 + var(--popover-height)*-1)}}.ce-toolbox__block-button{list-style:none;margin:0;padding:8px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer}.ce-toolbox__block-button:hover{background-color:#e9ecef}.ce-toolbox__block-button:active{background-color:#f1f3f5}.ce-toolbox__block-button-icon{width:20px;height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-toolbox__block-button-icon svg{fill:#868e96}.ce-toolbox__block-button-text{margin-left:4px;font-size:13px!important;line-height:18px;color:var(--gary8)}@media (min-width:201px){.codex-editor--narrow .ce-toolbox{left:auto;right:0}.codex-editor--narrow .ce-toolbox .ce-popover{right:0}}.ce-inline-toolbar{--y-offset:8px;position:absolute;background-color:#fff;border-radius:8px;z-index:2}@media (max-width:200px){.ce-inline-toolbar{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}.ce-inline-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-inline-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-inline-toolbar{border-radius:4px!important;border:none;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);-webkit-transform:translateX(-50%) translateY(8px) scale(.9);transform:translateX(-50%) translateY(8px) scale(.9);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity;top:0;left:0;z-index:3}.ce-inline-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.94);transform:translateX(-23px) translateY(8px) scale(.94)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translateX(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.94);transform:translateX(-100%) translateY(8px) scale(.94);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{width:100%}.ce-inline-toolbar__actions,.ce-inline-toolbar__buttons,.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__actions .unlink-button{background:inherit;border:none;-webkit-box-shadow:none;box-shadow:none;-webkit-tap-highlight-color:transparent;-webkit-box-sizing:border-box;box-sizing:border-box;outline-style:none}.ce-inline-toolbar__actions .unlink-button:focus{outline:0}.ce-inline-toolbar__actions .unlink-button{-webkit-box-pack:end;-ms-flex-pack:end;justify-content:end;font-weight:400;font-size:11px!important;line-height:16px;color:#868e96;padding:8px 10px 8px 0;cursor:pointer;white-space:nowrap;min-width:60px}.ce-inline-toolbar__actions .unlink-button,.ce-inline-toolbar__actions input{border-top:1px solid #dee2e6}.ce-inline-toolbar__dropdown{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;padding:0 10px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid #dee2e6;border-radius:4px 0 0 4px}@media (hover:hover){.ce-inline-toolbar__dropdown:hover{background:#e9ecef}}.ce-inline-toolbar__dropdown:active{background:#f1f3f5}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content{display:-webkit-box;display:-ms-flexbox;display:flex;font-weight:500;font-size:14px!important}.ce-inline-toolbar__dropdown-arrow,.ce-inline-toolbar__dropdown-content{display:-webkit-box;display:-ms-flexbox;display:flex;margin-left:4px}.ce-inline-toolbar__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}.ce-inline-tool{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:32px;height:32px;line-height:32px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.ce-inline-tool svg{width:12px;height:12px}@media (max-width:200px){.ce-inline-tool svg{width:12px;height:12px}}@media (hover:hover){.ce-inline-tool:hover{background-color:#eff2f5}}.ce-inline-tool--active{color:#4593fc}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-inline-tool{border-radius:0;line-height:normal;width:auto;padding:0 10px!important;min-width:24px}.ce-inline-tool .icon{height:12px}.ce-inline-tool:last-child{border-radius:0 4px 4px 0}.ce-inline-tool:hover{background:#e9ecef}.ce-inline-tool:active{background:#f1f3f5}.ce-inline-tool--link .icon--unlink,.ce-inline-tool--unlink .icon--link{display:none}.ce-inline-tool--unlink .icon--unlink{display:inline-block;margin-bottom:-1px}.ce-inline-tool-input{outline:none;border:0;border-radius:0 0 4px 4px;margin:0;font-size:11px!important;line-height:16px;padding:8px 5px 8px 10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;color:#212529}.ce-inline-tool-input::-webkit-input-placeholder{color:#adb5bd}.ce-inline-tool-input::-moz-placeholder{color:#adb5bd}.ce-inline-tool-input:-ms-input-placeholder{color:#adb5bd}.ce-inline-tool-input::-ms-input-placeholder{color:#adb5bd}.ce-inline-tool-input::placeholder{color:#adb5bd}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border-radius:8px;z-index:2}@media (max-width:200px){.ce-conversion-toolbar{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}.ce-conversion-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-conversion-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-conversion-toolbar{opacity:0;visibility:hidden;will-change:transform,opacity;-webkit-transition:opacity .1s ease,-webkit-transform .1s ease;transition:opacity .1s ease,-webkit-transform .1s ease;transition:transform .1s ease,opacity .1s ease;transition:transform .1s ease,opacity .1s ease,-webkit-transform .1s ease;-webkit-transform:translateY(-8px);transform:translateY(-8px);left:-1px;width:160px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box;padding-bottom:8px;border-radius:4px;border:none;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}.ce-conversion-toolbar--showed{opacity:1;visibility:visible;-webkit-transform:none;transform:none}.ce-conversion-toolbar [hidden]{display:none!important}.ce-conversion-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-conversion-toolbar__label{color:#868e96;font-size:11px;line-height:16px;padding:12px 12px 4px}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:4px 14.5px 4px 12px;font-size:13px;line-height:18px;color:#343a40;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#e9ecef}.ce-conversion-tool:active{background:#f1f3f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:20px;height:20px;border:.5px solid #dee2e6;border-radius:2px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:4px;background:#fff}.ce-conversion-tool__icon svg{fill:#343a40}.ce-conversion-tool__check-icon{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-left:auto;opacity:0;width:12px;height:8px}.ce-conversion-tool--current .ce-conversion-tool__check-icon{opacity:1}.ce-conversion-tool--current .ce-conversion-tool__check-icon svg{fill:#343a40}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#4593fc!important;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{border:none;top:34px;left:51px;width:220px;-webkit-box-sizing:content-box;box-sizing:content-box}@media (max-width:200px){.ce-settings{bottom:40px;right:auto;top:auto}}.ce-settings{position:absolute;z-index:2;--gap:8px}@media (min-width:201px){.ce-settings{position:absolute;top:calc(26px + var(--gap));left:44px}.ce-settings--opened-top{top:calc(var(--gap)*-1 + var(--popover-height)*-1)}}.ce-settings__button{padding:8px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer}.ce-settings__button:hover{background-color:#e9ecef}.ce-settings__button:active{background-color:#f1f3f5}.ce-settings__button-icon-container{width:20px;height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-settings__button-icon-container svg{fill:#868e96}.ce-settings__button-text{font-size:13px!important;line-height:18px;color:#343a40;margin-left:4px;white-space:nowrap}.ce-settings__button-shortcut-text{font-size:11px!important;line-height:16px;color:#adb5bd;margin-left:auto}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#4593fc}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:none}.ce-block:first-of-type{margin-top:0}.ce-block--selected .ce-block__content{background:#e1f2ff}.ce-block--selected .ce-block__content [contenteditable]{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-block--selected .ce-block__content .ce-stub,.ce-block--selected .ce-block__content img{opacity:.55}.ce-block--stretched .ce-block__content{max-width:none}.ce-block__content{position:relative;max-width:650px;margin:0 auto;-webkit-transition:background-color .15s ease;transition:background-color .15s ease}.ce-block--drop-target .ce-block__content:before{content:"";position:absolute;top:100%;left:-20px;margin-top:-1px;height:8px;width:8px;border:solid #4593fc;border-width:1px 1px 0 0;-webkit-transform-origin:right;transform-origin:right;-webkit-transform:rotate(45deg);transform:rotate(45deg)}.ce-block--drop-target .ce-block__content:after{content:"";position:absolute;top:100%;height:1px;width:100%;color:#4593fc;background:repeating-linear-gradient(90deg,#4593fc,#4593fc 1px,#fff 0,#fff 6px)}.ce-block a{cursor:pointer;text-decoration:underline}.ce-block b{font-weight:700}.ce-block i{font-style:italic}@media (min-width:201px){.codex-editor--narrow .ce-block--focused{margin-right:-50px;padding-right:50px}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translateZ(0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-5%,0,0) rotate(-5deg);transform:translate3d(-5%,0,0) rotate(-5deg)}30%{-webkit-transform:translate3d(2%,0,0) rotate(3deg);transform:translate3d(2%,0,0) rotate(3deg)}45%{-webkit-transform:translate3d(-3%,0,0) rotate(-3deg);transform:translate3d(-3%,0,0) rotate(-3deg)}60%{-webkit-transform:translate3d(2%,0,0) rotate(2deg);transform:translate3d(2%,0,0) rotate(2deg)}75%{-webkit-transform:translate3d(-1%,0,0) rotate(-1deg);transform:translate3d(-1%,0,0) rotate(-1deg)}to{-webkit-transform:translateZ(0);transform:translateZ(0)}}@-webkit-keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes bounceIn{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.9,.9,.9);transform:scale3d(.9,.9,.9)}20%{-webkit-transform:scale3d(1.03,1.03,1.03);transform:scale3d(1.03,1.03,1.03)}60%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes selectionBounce{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}50%{-webkit-transform:scale3d(1.01,1.01,1.01);transform:scale3d(1.01,1.01,1.01)}70%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@keyframes buttonClicked{0%,20%,40%,60%,80%,to{-webkit-animation-timing-function:cubic-bezier(.215,.61,.355,1);animation-timing-function:cubic-bezier(.215,.61,.355,1)}0%{-webkit-transform:scale3d(.95,.95,.95);transform:scale3d(.95,.95,.95)}60%{-webkit-transform:scale3d(1.02,1.02,1.02);transform:scale3d(1.02,1.02,1.02)}80%{-webkit-transform:scaleX(1);transform:scaleX(1)}}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);border-radius:3px;padding:10px 12px;outline:none;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box}.cdx-input[data-placeholder]:before{position:static!important;display:inline-block;width:0;white-space:nowrap;pointer-events:none}.cdx-settings-button{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:32px;height:32px;line-height:32px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0}.cdx-settings-button svg{width:12px;height:12px}@media (max-width:200px){.cdx-settings-button svg{width:12px;height:12px}}@media (hover:hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-settings-button--active{color:#4593fc}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button:not(:nth-child(3n+3)){margin-right:3px}.cdx-settings-button:nth-child(n+4){margin-top:3px}.cdx-settings-button--active svg{fill:#4593fc}.cdx-settings-button svg{width:auto;height:auto}@media (max-width:200px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:"";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#4593fc;border-radius:50%;-webkit-animation:cdxRotation 1.2s linear infinite;animation:cdxRotation 1.2s linear infinite}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0deg)}to{-webkit-transform:rotate(1turn);transform:rotate(1turn)}}.cdx-button{padding:13px;border-radius:3px;border:1px solid rgba(201,201,204,.48);font-size:14.9px;background:#fff;-webkit-box-shadow:0 2px 2px 0 rgba(18,30,57,.04);box-shadow:0 2px 2px 0 rgba(18,30,57,.04);color:#707684;text-align:center;cursor:pointer}@media (hover:hover){.cdx-button:hover{background:#fbfcfe;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px 0 rgba(18,30,57,.08)}}.cdx-button svg{height:20px;margin-right:.2em;margin-top:-2px}.ce-stub{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;width:100%;padding:3.5em 0;margin:17px 0;border-radius:3px;background:#fcf7f7;color:#b46262}.ce-stub__info{margin-left:20px}.ce-stub__title{margin-bottom:3px;font-weight:600;font-size:18px;text-transform:capitalize}.ce-stub__subtitle{font-size:16px}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width:200px){.codex-editor.codex-editor--rtl .ce-toolbar__actions{margin-left:0;margin-right:auto;padding-right:0;padding-left:10px}}.codex-editor.codex-editor--rtl .ce-settings{left:5px;right:auto}.codex-editor.codex-editor--rtl .ce-settings:before{right:auto;left:25px}.codex-editor.codex-editor--rtl .ce-settings__button:not(:nth-child(3n+3)){margin-left:3px;margin-right:0}.codex-editor.codex-editor--rtl .ce-conversion-tool__icon{margin-right:0;margin-left:10px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown{border-right:0 solid transparent;border-left:1px solid rgba(201,201,204,.48);margin:0 -6px 0 6px}.codex-editor.codex-editor--rtl .ce-inline-toolbar__dropdown .icon--toggler-down{margin-left:0;margin-right:4px}@media (min-width:201px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width:201px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.ce-popover{opacity:0;will-change:opacity,transform;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;padding:8px 0;min-width:220px;-webkit-box-sizing:border-box;box-sizing:border-box;-ms-flex-negative:0;flex-shrink:0;pointer-events:none;position:absolute;background-color:#fff;-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1);border-radius:8px;z-index:2}@media (max-width:200px){.ce-popover{-webkit-box-shadow:0 8px 24px rgba(0,0,0,.1);box-shadow:0 8px 24px rgba(0,0,0,.1)}}.ce-popover--left-oriented:before{left:15px;margin-left:0}.ce-popover--right-oriented:before{left:auto;right:15px;margin-left:0}.ce-popover{z-index:4;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.ce-popover--opened{opacity:1;height:-webkit-fit-content;height:-moz-fit-content;height:fit-content;pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease}@media (max-width:200px){.ce-popover--opened{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}@media (max-width:200px){.ce-popover{--offset:5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset)*2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}}.ce-popover__item{padding:8px 16px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:flex-start;cursor:pointer}.ce-popover__item:hover{background-color:#e9ecef}.ce-popover__item:active{background-color:#f1f3f5}@media (hover:hover){.ce-popover__item:hover:not(.ce-popover__item--no-visible-hover){background-color:#eff2f5}.ce-popover__item:hover .ce-popover__item-icon{-webkit-box-shadow:none;box-shadow:none}}.ce-popover__item--disabled{color:#707684;cursor:default;pointer-events:none}.ce-popover__item--disabled .ce-popover__item-icon{-webkit-box-shadow:0 0 0 1px #eff0f1;box-shadow:0 0 0 1px #eff0f1}.ce-popover__item--focused:not(.ce-popover__item--no-visible-focus){-webkit-box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px rgba(7,161,227,.08);background:rgba(34,186,255,.08)!important}.ce-popover__item--hidden{display:none}.ce-popover__item--active{background:rgba(56,138,229,.1);color:#388ae5}.ce-popover__item--confirmation{background:#e24a4a}.ce-popover__item--confirmation .ce-popover__item-icon{color:#e24a4a}.ce-popover__item--confirmation .ce-popover__item-label{color:#fff}@media (hover:hover){.ce-popover__item--confirmation:not(.ce-popover__item--no-visible-hover):hover{background:#ce4343}}.ce-popover__item--confirmation:not(.ce-popover__item--no-visible-focus).ce-popover__item--focused{background:#ce4343!important}.ce-popover__item-icon{width:20px;height:20px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.ce-popover__item-icon svg{fill:#868e96}.ce-popover__item-label{margin-left:4px;font-size:13px!important;line-height:18px;color:var(--gary8);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.ce-popover__item-label:after{content:"";width:25px;display:inline-block}.ce-popover__item-secondary-label{color:#707684;font-size:12px!important;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width:200px){.ce-popover__item-secondary-label{display:none}}.ce-popover__item--active .ce-popover__item-icon,.ce-popover__item--confirmation .ce-popover__item-icon,.ce-popover__item--focused .ce-popover__item-icon{-webkit-box-shadow:none;box-shadow:none}.ce-popover__no-found{display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto;-webkit-box-pack:start;-ms-flex-pack:start;justify-content:start;white-space:nowrap;padding:3px;font-size:14px!important;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center;border-radius:6px}.ce-popover__no-found:not(:last-of-type){margin-bottom:1px}@media (max-width:200px){.ce-popover__no-found{font-size:16px!important;padding:4px}}.ce-popover__no-found{color:#707684;display:none;cursor:default}.ce-popover__no-found--shown{display:block}@media (max-width:200px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1d202b;opacity:.5;z-index:3;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}.ce-popover .cdx-search-field{display:none}}.ce-popover__overlay--hidden{z-index:0;opacity:0;visibility:hidden}.ce-popover__custom-content:not(:empty){padding:4px}@media (min-width:201px){.ce-popover__custom-content:not(:empty){margin-top:5px;padding:0}}.ce-popover__custom-content--hidden{display:none}.cdx-search-field{--icon-margin-right:10px;background:rgba(232,232,235,.49);border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:12px;height:12px;color:#707684}.cdx-search-field__input{font-size:14px!important;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}'},function(e,t,n){"use strict";n.r(t),n.d(t,"nanoid",(function(){return s})),n.d(t,"customAlphabet",(function(){return a})),n.d(t,"customRandom",(function(){return i})),n.d(t,"urlAlphabet",(function(){return o})),n.d(t,"random",(function(){return r}));let o="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";let r=e=>crypto.getRandomValues(new Uint8Array(e)),i=(e,t,n)=>{let o=(2<{let i="";for(;;){let a=n(r),s=r;for(;s--;)if(i+=e[a[s]&o]||"",i.length===t)return i}}},a=(e,t)=>i(e,t,r),s=(e=21)=>{let t="",n=crypto.getRandomValues(new Uint8Array(e));for(;e--;){let o=63&n[e];t+=o<36?o.toString(36):o<62?(o-26).toString(36).toUpperCase():o<63?"_":"-"}return t}}])})); \ No newline at end of file diff --git a/src/components/modules/paste.ts b/src/components/modules/paste.ts index bc568169a..bc8ffcd5f 100644 --- a/src/components/modules/paste.ts +++ b/src/components/modules/paste.ts @@ -184,6 +184,24 @@ export default class Paste extends Module { const plainData = dataTransfer.getData('text/plain'); let htmlData = dataTransfer.getData('text/html'); + // @SLID - onPaste hanlder for preventing pasting styled text + const tempDiv = document.createElement('div'); + + tempDiv.innerHTML = htmlData ; + + tempDiv.querySelectorAll('*').forEach((node ) => { + if (node instanceof HTMLElement) { + node.style.color = 'inherit'; + node.style.fontFamily = 'inherit'; + node.style.fontSize = 'inherit'; + node.style.backgroundColor = 'initial'; + } + }); + + const modifiedHtmlContent = tempDiv.innerHTML; + + htmlData = modifiedHtmlContent; + /** * If EditorJS json is passed, insert it */ diff --git a/src/version.json b/src/version.json index 37b0559f4..a510e8069 100644 --- a/src/version.json +++ b/src/version.json @@ -1,3 +1,3 @@ { - "version": "1.2.2" + "version": "1.2.3" }