diff --git a/dist/editor.js b/dist/editor.js index 2234e3db2..8d5c0bdcd 100644 --- a/dist/editor.js +++ b/dist/editor.js @@ -1,2 +1,2 @@ /*! For license information please see editor.js.LICENSE */ -!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.EditorJS=e():t.EditorJS=e()}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=180)}([function(t,e,n){var o=n(9),i=n(17),r=n(26),a=n(22),s=n(29),l=function(t,e,n){var c,u,d,f,h=t&l.F,p=t&l.G,v=t&l.S,g=t&l.P,y=t&l.B,b=p?o:v?o[e]||(o[e]={}):(o[e]||{}).prototype,k=p?i:i[e]||(i[e]={}),m=k.prototype||(k.prototype={});for(c in p&&(n=e),n)d=((u=!h&&b&&void 0!==b[c])?b:n)[c],f=y&&u?s(d,o):g&&"function"==typeof d?s(Function.call,d):d,b&&a(b,c,d,t&l.U),k[c]!=d&&r(k,c,f),g&&m[c]!=d&&(m[c]=d)};o.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],r=n.Editor.Listeners;n.mutableListenerIds.push(r.on(t,e,o,i))},clearAll:function(){var t=n.Editor.Listeners,e=!0,o=!1,i=void 0;try{for(var r,a=n.mutableListenerIds[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){var s=r.value;t.offById(s)}}catch(t){o=!0,i=t}finally{try{e||null==a.return||a.return()}finally{if(o)throw i}}n.mutableListenerIds=[]}},this.mutableListenerIds=[],(this instanceof t?this.constructor:void 0)===t)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=o}return(0,r.default)(t,[{key:"removeAllNodes",value:function(){for(var t in this.nodes){var e=this.nodes[t];e instanceof HTMLElement&&e.remove()}}},{key:"state",set:function(t){this.Editor=t}},{key:"isRtl",get:function(){return"rtl"===this.config.i18n.direction}}]),t}();o.default=s,s.displayName="Module",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(364),n(21),n(15)],void 0===(r="function"==typeof(o=function(t,e,o,i){"use strict";var r,a=n(1);function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"log",o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"color: inherit";if("console"in window&&window.console[n]){var a=["info","log","warn","error"].includes(n),l=[];switch(s.logLevel){case r.ERROR:if("error"!==n)return;break;case r.WARN:if(!["error","warn"].includes(n))return;break;case r.INFO:if(!a||t)return}o&&l.push(o);var c="Editor.js ".concat("2.19.0");t&&(a?(l.unshift("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;",i),e="%c".concat(c,"%c ").concat(e)):e="( ".concat(c," )").concat(e));try{if(a)if(o){var u;(u=console)[n].apply(u,["".concat(e," %o")].concat(l))}else{var d;(d=console)[n].apply(d,[e].concat(l))}else console[n](e)}catch(t){}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogLevel=function(t){s.logLevel=t},t.isPrintableKey=function(t){return t>47&&t<58||32===t||13===t||229===t||t>64&&t<91||t>95&&t<112||t>185&&t<193||t>218&&t<223},t.sequence=function(t){var e,n,i,r=arguments;return o.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return i=function(t,e,n){return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,o.default.awrap(t.function(t.data));case 3:return i.next=5,o.default.awrap(e(void 0!==t.data?t.data:{}));case 5:i.next=10;break;case 7:i.prev=7,i.t0=i.catch(0),n(void 0!==t.data?t.data:{});case 10:case"end":return i.stop()}}),null,null,[[0,7]])},e=r.length>1&&void 0!==r[1]?r[1]:function(){},n=r.length>2&&void 0!==r[2]?r[2]:function(){},a.abrupt("return",t.reduce((function(t,r){return o.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,o.default.awrap(t);case 2:return a.abrupt("return",i(r,e,n));case 3:case"end":return a.stop()}}))}),Promise.resolve()));case 4:case"end":return a.stop()}}))},t.array=function(t){return Array.prototype.slice.call(t)},t.isFunction=u,t.isClass=function(t){return u(t)&&/^\s*class\s+/.test(t.toString())},t.isEmpty=function(t){return!t||0===Object.keys(t).length&&t.constructor===Object},t.isPromise=function(t){return Promise.resolve(t)===t},t.delay=function(t,e){return function(){var n=this,o=arguments;window.setTimeout((function(){return t.apply(n,o)}),e)}},t.getFileExtension=function(t){return t.name.split(".").pop()},t.isValidMimeType=function(t){return/^[-\w]+\/([-+\w]+|\*)$/.test(t)},t.debounce=function(t,e,n){var o,i=arguments,r=this;return function(){var a=r,s=i,l=n&&!o;window.clearTimeout(o),o=window.setTimeout((function(){o=null,n||t.apply(a,s)}),e),l&&t.apply(a,s)}},t.copyTextToClipboard=function(t){var e=i.default.make("div","codex-editor-clipboard",{innerHTML:t});document.body.appendChild(e);var n=window.getSelection(),o=document.createRange();o.selectNode(e),window.getSelection().removeAllRanges(),n.addRange(o),document.execCommand("copy"),document.body.removeChild(e)},t.getUserOS=d,t.capitalize=function(t){return t[0].toUpperCase()+t.slice(1)},t.typeOf=f,t.deepMerge=function t(n){for(var o=function(t){return t&&"object"===f(t)},i=arguments.length,r=new Array(i>1?i-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(Math.floor(1e8*Math.random()).toString(16))},t.deprecationAssert=function(t,e,n){var o="«".concat(e,"» is deprecated and will be removed in the next major release. Please use the «").concat(n,"» instead.");t&&c(o,"warn")},t.isTouchSupported=t.logLabeled=t.log=t.mouseButtons=t.keyCodes=t.LogLevels=void 0,e=a(e),o=a(o),i=a(i),t.LogLevels=r,function(t){t.VERBOSE="VERBOSE",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(r||(t.LogLevels=r={})),t.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},t.mouseButtons={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4},s.logLevel=r.VERBOSE;var l=s.bind(window,!1);t.log=l;var c=s.bind(window,!0);function u(t){return"function"==typeof t}function d(){var t={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(t).find((function(t){return-1!==navigator.appVersion.toLowerCase().indexOf(t)}));return e?(t[e]=!0,t):t}function f(t){return Object.prototype.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}t.logLabeled=c;var h="ontouchstart"in document.documentElement;t.isTouchSupported=h})?o.apply(e,i):o)||(t.exports=r)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var o=n(12);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var o=n(51);function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var s=r?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=t[a]}return n.default=t,e&&e.set(t,n),n}},function(t,e,n){var o=n(67)("wks"),i=n(42),r=n(9).Symbol,a="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=a&&r[t]||(a?r:i)("Symbol."+t))}).store=o},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(51),n(65),n(2),n(3),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l){"use strict";var c=n(13),u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=c(l);var d=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,null,[{key:"isSingleTag",value:function(t){return t.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(t.tagName)}},{key:"isLineBreakTag",value:function(t){return t&&t.tagName&&["BR","WBR"].includes(t.tagName)}},{key:"make",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(t);for(var a in Array.isArray(n)?(e=i.classList).add.apply(e,(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(t){return document.createTextNode(t)}},{key:"svg",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,o=document.createElementNS("http://www.w3.org/2000/svg","svg");return o.classList.add("icon","icon--"+t),o.setAttribute("width",e+"px"),o.setAttribute("height",n+"px"),o.innerHTML=''),o}},{key:"append",value:function(t,e){Array.isArray(e)?e.forEach((function(e){return t.appendChild(e)})):t.appendChild(e)}},{key:"prepend",value:function(t,e){Array.isArray(e)?(e=e.reverse()).forEach((function(e){return t.prepend(e)})):t.prepend(e)}},{key:"swap",value:function(t,e){var n=document.createElement("div"),o=t.parentNode;o.insertBefore(n,t),o.insertBefore(t,e),o.insertBefore(e,n),o.removeChild(n)}},{key:"find",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelector(e)}},{key:"get",value:function(t){return document.getElementById(t)}},{key:"findAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelectorAll(e)}},{key:"findAllInputs",value:function(e){return l.array(e.querySelectorAll(t.allInputsSelector)).reduce((function(e,n){return t.isNativeInput(n)||t.containsOnlyInlineElements(n)?[].concat((0,r.default)(e),[n]):[].concat((0,r.default)(e),(0,r.default)(t.getDeepestBlockElements(n)))}),[])}},{key:"getDeepestNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?"lastChild":"firstChild",i=n?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[o]){var r=e[o];if(t.isSingleTag(r)&&!t.isNativeInput(r)&&!t.isLineBreakTag(r))if(r[i])r=r[i];else{if(!r.parentNode[i])return r.parentNode;r=r.parentNode[i]}return this.getDeepestNode(r,n)}return e}},{key:"isElement",value:function(t){return t&&"object"===(0,i.default)(t)&&t.nodeType&&t.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(t){return t&&"object"===(0,i.default)(t)&&t.nodeType&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(t){return"true"===t.contentEditable}},{key:"isNativeInput",value:function(t){return!(!t||!t.tagName)&&["INPUT","TEXTAREA"].includes(t.tagName)}},{key:"canSetCaret",value:function(e){var n=!0;if(t.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}else n=t.isContentEditable(e);return n}},{key:"isNodeEmpty",value:function(t){return!(this.isSingleTag(t)&&!this.isLineBreakTag(t))&&0===(this.isElement(t)&&this.isNativeInput(t)?t.value:t.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(t){return!!t&&0===t.childNodes.length}},{key:"isEmpty",value:function(t){t.normalize();for(var e=[t];e.length>0;)if(t=e.shift()){if(this.isLeaf(t)&&!this.isNodeEmpty(t))return!1;t.childNodes&&e.push.apply(e,(0,r.default)(Array.from(t.childNodes)))}return!0}},{key:"isHTMLString",value:function(e){var n=t.make("div");return n.innerHTML=e,n.childElementCount>0}},{key:"getContentLength",value:function(e){return t.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}},{key:"containsOnlyInlineElements",value:function(e){var n;return"string"==typeof e?(n=document.createElement("div")).innerHTML=e:n=e,Array.from(n.children).every((function e(n){return!t.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(e)}))}},{key:"getDeepestBlockElements",value:function(e){return t.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((function(e,n){return[].concat((0,r.default)(e),(0,r.default)(t.getDeepestBlockElements(n)))}),[])}},{key:"getHolder",value:function(t){return"string"==typeof t?document.getElementById(t):t}},{key:"isExtensionNode",value:function(t){return t&&["GRAMMARLY-EXTENSION"].includes(t.nodeName)}},{key:"isAnchor",value:function(t){return"a"===t.tagName.toLowerCase()}},{key:"allInputsSelector",get:function(){return"[contenteditable], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map((function(t){return'input[type="'.concat(t,'"]')})).join(", ")}},{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","tr","tfoot","ul","video"]}}]),t}();o.default=d,d.displayName="Dom",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(31),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(10)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var o=n(11),i=n(108),r=n(39),a=Object.defineProperty;e.f=n(18)?Object.defineProperty:function(t,e,n){if(o(t),e=r(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(36);t.exports=function(t){return Object(o(t))}},function(t,e,n){t.exports=n(139)},function(t,e,n){var o=n(9),i=n(26),r=n(25),a=n(42)("src"),s=n(185),l=(""+s).split("toString");n(17).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(r(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(r(n,a)||i(n,a,t[e]?""+t[e]:l.join(String(e)))),t===o?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e,n){var o=n(0),i=n(10),r=n(36),a=/"/g,s=function(t,e,n,o){var i=String(r(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(o).replace(a,""")+'"'),s+">"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),o(o.P+o.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(8),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a,s){"use strict";var l=n(13),c=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=c(i),r=c(r),a=l(a),s=c(s);var u=function(){function t(){(0,i.default)(this,t),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,r.default)(t,[{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=t.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"collapseToEnd",value:function(){var t=window.getSelection(),e=document.createRange();e.selectNodeContents(t.focusNode),e.collapse(!1),t.removeAllRanges(),t.addRange(e)}},{key:"findParentTag",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),i=null;if(!o||!o.anchorNode||!o.focusNode)return null;var r=[o.anchorNode,o.focusNode];return r.forEach((function(o){for(var r=n;r>0&&o.parentNode&&(o.tagName!==t||(i=o,e&&o.classList&&!o.classList.contains(e)&&(i=null),!i));)o=o.parentNode,r--})),i}},{key:"expandToTag",value:function(t){var e=window.getSelection();e.removeAllRanges();var n=document.createRange();n.selectNodeContents(t),e.addRange(n)}}],[{key:"get",value:function(){return window.getSelection()}},{key:"setCursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),o=window.getSelection();if(s.default.isNativeInput(t)){if(!s.default.canSetCaret(t))return;return t.focus(),t.selectionStart=t.selectionEnd=e,t.getBoundingClientRect()}return n.setStart(t,e),n.setEnd(t,e),o.removeAllRanges(),o.addRange(n),n.getBoundingClientRect()}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var t=window.getSelection();return t?t.anchorNode:null}},{key:"anchorElement",get:function(){var t=window.getSelection();if(!t)return null;var e=t.anchorNode;return e?s.default.isElement(e)?e:e.parentElement:null}},{key:"anchorOffset",get:function(){var t=window.getSelection();return t?t.anchorOffset:null}},{key:"isCollapsed",get:function(){var t=window.getSelection();return t?t.isCollapsed:null}},{key:"isAtEditor",get:function(){var e=t.get(),n=e.anchorNode||e.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&(o=n.closest(".".concat(t.CSS.editorZone))),o&&o.nodeType===Node.ELEMENT_NODE}},{key:"isSelectionExists",get:function(){return!!t.get().anchorNode}},{key:"range",get:function(){var t=window.getSelection();return t&&t.rangeCount?t.getRangeAt(0):null}},{key:"rect",get:function(){var t,e=document.selection,n={x:0,y:0,width:0,height:0};if(e&&"Control"!==e.type)return t=(e=e).createRange(),n.x=t.boundingLeft,n.y=t.boundingTop,n.width=t.boundingWidth,n.height=t.boundingHeight,n;if(!window.getSelection)return a.log("Method window.getSelection is not supported","warn"),n;if(null===(e=window.getSelection()).rangeCount||isNaN(e.rangeCount))return a.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if(0===e.rangeCount)return n;if((t=e.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=t.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement("span");if(o.getBoundingClientRect){o.appendChild(document.createTextNode("​")),t.insertNode(o),n=o.getBoundingClientRect();var i=o.parentNode;i.removeChild(o),i.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}}]),t}();o.default=u,u.displayName="SelectionUtils",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(19),i=n(41);t.exports=n(18)?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(61),i=n(36);t.exports=function(t){return o(i(t))}},function(t,e,n){"use strict";var o=n(10);t.exports=function(t,e){return!!t&&o((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var o=n(30);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,i){return t.call(e,n,o,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){var o=n(62),i=n(41),r=n(27),a=n(39),s=n(25),l=n(108),c=Object.getOwnPropertyDescriptor;e.f=n(18)?c:function(t,e){if(t=r(t),e=a(e,!0),l)try{return c(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var o=n(0),i=n(17),r=n(10);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),o(o.S+o.F*r((function(){n(1)})),"Object",a)}},function(t,e,n){var o=n(29),i=n(61),r=n(20),a=n(16),s=n(124);t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,d=6==t,f=5==t||d,h=e||s;return function(e,s,p){for(var v,g,y=r(e),b=i(y),k=o(s,p,3),m=a(b.length),x=0,S=n?h(e,m):l?h(e,0):void 0;m>x;x++)if((f||x in b)&&(g=k(v=b[x],x,y),t))if(n)S[x]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:S.push(v)}else if(u)return!1;return d?-1:c||u?u:S}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";if(n(18)){var o=n(43),i=n(9),r=n(10),a=n(0),s=n(78),l=n(106),c=n(29),u=n(56),d=n(41),f=n(26),h=n(57),p=n(31),v=n(16),g=n(135),y=n(45),b=n(39),k=n(25),m=n(63),x=n(12),S=n(20),w=n(98),E=n(46),T=n(48),B=n(47).f,C=n(100),_=n(42),O=n(14),I=n(34),N=n(68),M=n(64),L=n(102),A=n(54),P=n(71),R=n(55),j=n(101),D=n(126),F=n(19),H=n(32),U=F.f,z=H.f,G=i.RangeError,W=i.TypeError,Y=i.Uint8Array,X=Array.prototype,V=l.ArrayBuffer,K=l.DataView,Z=I(0),q=I(2),J=I(3),$=I(4),Q=I(5),tt=I(6),et=N(!0),nt=N(!1),ot=L.values,it=L.keys,rt=L.entries,at=X.lastIndexOf,st=X.reduce,lt=X.reduceRight,ct=X.join,ut=X.sort,dt=X.slice,ft=X.toString,ht=X.toLocaleString,pt=O("iterator"),vt=O("toStringTag"),gt=_("typed_constructor"),yt=_("def_constructor"),bt=s.CONSTR,kt=s.TYPED,mt=s.VIEW,xt=I(1,(function(t,e){return Bt(M(t,t[yt]),e)})),St=r((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),wt=!!Y&&!!Y.prototype.set&&r((function(){new Y(1).set({})})),Et=function(t,e){var n=p(t);if(n<0||n%e)throw G("Wrong offset!");return n},Tt=function(t){if(x(t)&&kt in t)return t;throw W(t+" is not a typed array!")},Bt=function(t,e){if(!(x(t)&> in t))throw W("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return _t(M(t,t[yt]),e)},_t=function(t,e){for(var n=0,o=e.length,i=Bt(t,o);o>n;)i[n]=e[n++];return i},Ot=function(t,e,n){U(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,o,i,r,a,s=S(t),l=arguments.length,u=l>1?arguments[1]:void 0,d=void 0!==u,f=C(s);if(null!=f&&!w(f)){for(a=f.call(s),o=[],e=0;!(r=a.next()).done;e++)o.push(r.value);s=o}for(d&&l>2&&(u=c(u,arguments[2],2)),e=0,n=v(s.length),i=Bt(this,n);n>e;e++)i[e]=d?u(s[e],e):s[e];return i},Nt=function(){for(var t=0,e=arguments.length,n=Bt(this,e);e>t;)n[t]=arguments[t++];return n},Mt=!!Y&&r((function(){ht.call(new Y(1))})),Lt=function(){return ht.apply(Mt?dt.call(Tt(this)):Tt(this),arguments)},At={copyWithin:function(t,e){return D.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return j.apply(Tt(this),arguments)},filter:function(t){return Ct(this,q(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return xt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return lt.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return ut.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),o=n.length,i=y(t,o);return new(M(n,n[yt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?o:y(e,o))-i))}},Pt=function(t,e){return Ct(this,dt.call(Tt(this),t,e))},Rt=function(t){Tt(this);var e=Et(arguments[1],1),n=this.length,o=S(t),i=v(o.length),r=0;if(i+e>n)throw G("Wrong length!");for(;r255?255:255&o),i.v[h](n*e+i.o,o,St)}(this,n,t)},enumerable:!0})};k?(p=n((function(t,n,o,i){u(t,p,c,"_d");var r,a,s,l,d=0,h=0;if(x(n)){if(!(n instanceof V||"ArrayBuffer"==(l=m(n))||"SharedArrayBuffer"==l))return kt in n?_t(p,n):It.call(p,n);r=n,h=Et(o,e);var y=n.byteLength;if(void 0===i){if(y%e)throw G("Wrong length!");if((a=y-h)<0)throw G("Wrong length!")}else if((a=v(i)*e)+h>y)throw G("Wrong length!");s=a/e}else s=g(n),r=new V(a=s*e);for(f(t,"_d",{b:r,o:h,l:a,e:s,v:new K(r)});ddocument.F=Object<\/script>"),t.close(),l=t.F;o--;)delete l.prototype[r[o]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=o(t),n=new s,s.prototype=null,n[a]=t):n=l(),void 0===e?n:i(n,e)}},function(t,e,n){var o=n(110),i=n(85).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,i)}},function(t,e,n){var o=n(25),i=n(20),r=n(84)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),o(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var o=n(14)("unscopables"),i=Array.prototype;null==i[o]&&n(26)(i,o,{}),t.exports=function(t){i[o][t]=!0}},function(t,e,n){var o=n(12);t.exports=function(t,e){if(!o(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e,n){var o=n(19).f,i=n(25),r=n(14)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,r)&&o(t,r,{configurable:!0,value:e})}},function(t,e,n){var o=n(0),i=n(36),r=n(10),a=n(88),s="["+a+"]",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),u=function(t,e,n){var i={},s=r((function(){return!!a[t]()||"​…"!="​…"[t]()})),l=i[t]=s?e(d):a[t];n&&(i[n]=l),o(o.P+o.F*s,"String",i)},d=u.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(c,"")),t};t.exports=u},function(t,e){t.exports={}},function(t,e,n){"use strict";var o=n(9),i=n(19),r=n(18),a=n(14)("species");t.exports=function(t){var e=o[t];r&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,o){if(!(t instanceof e)||void 0!==o&&o in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var o=n(22);t.exports=function(t,e,n){for(var i in e)o(t,i,e[i],n);return t}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(140)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(){(0,i.default)(this,t)}return(0,r.default)(t,null,[{key:"ui",value:function(e,n){return t._t(e,n)}},{key:"t",value:function(e,n){return t._t(e,n)}},{key:"setDictionary",value:function(e){t.currentDictionary=e}},{key:"_t",value:function(e,n){var o=t.getNamespace(e);return o&&o[n]?o[n]:n}},{key:"getNamespace",value:function(e){return e.split(".").reduce((function(t,e){return t&&Object.keys(t).length?t[e]:{}}),t.currentDictionary)}}]),t}();o.default=l,l.displayName="I18n",l.currentDictionary=a.default,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(375),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s){"use strict";var l=n(13),c=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=c(i),r=c(r),a=c(a),s=l(s);var u=function(){function t(e){var n=this;(0,i.default)(this,t),this.iterator=null,this.activated=!1,this.allowArrows=!0,this.onKeyDown=function(e){if(n.isEventReadyForHandling(e))switch(t.usedKeys.includes(e.keyCode)&&e.preventDefault(),e.keyCode){case s.keyCodes.TAB:n.handleTabPress(e);break;case s.keyCodes.LEFT:case s.keyCodes.UP:n.flipLeft();break;case s.keyCodes.RIGHT:case s.keyCodes.DOWN:n.flipRight();break;case s.keyCodes.ENTER:n.handleEnterPress(e)}},this.allowArrows="boolean"!=typeof e.allowArrows||e.allowArrows,this.iterator=new a.default(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback}return(0,r.default)(t,[{key:"activate",value:function(t){this.activated=!0,t&&this.iterator.setItems(t),document.addEventListener("keydown",this.onKeyDown)}},{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()}},{key:"flipRight",value:function(){this.iterator.next()}},{key:"dropCursor",value:function(){this.iterator.dropCursor()}},{key:"isEventReadyForHandling",value:function(t){var e=[s.keyCodes.TAB,s.keyCodes.ENTER],n=this.iterator.currentItem==document.activeElement;return this.allowArrows&&!n&&e.push(s.keyCodes.LEFT,s.keyCodes.RIGHT,s.keyCodes.UP,s.keyCodes.DOWN),this.activated&&-1!==e.indexOf(t.keyCode)}},{key:"handleTabPress",value:function(t){switch(t.shiftKey?a.default.directions.LEFT:a.default.directions.RIGHT){case a.default.directions.RIGHT:this.flipRight();break;case a.default.directions.LEFT:this.flipLeft()}}},{key:"handleEnterPress",value:function(t){this.activated&&(this.iterator.currentItem&&this.iterator.currentItem.click(),s.isFunction(this.activateCallback)&&this.activateCallback(this.iterator.currentItem),t.preventDefault(),t.stopPropagation())}},{key:"currentItem",get:function(){return this.iterator.currentItem}}],[{key:"usedKeys",get:function(){return[s.keyCodes.TAB,s.keyCodes.LEFT,s.keyCodes.RIGHT,s.keyCodes.ENTER,s.keyCodes.UP,s.keyCodes.DOWN]}}]),t}();o.default=u,u.displayName="Flipper",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(15),n(8),n(143),n(66),n(376),n(377),n(378),n(24)],void 0===(r="function"==typeof(o=function(t,e,o,i,r,a,s,l,c,u,d,f){"use strict";var h,p=n(13),v=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockToolAPI=void 0,e=v(e),o=v(o),i=v(i),r=v(r),a=p(a),s=v(s),c=v(c),u=v(u),d=v(d),f=v(f),t.BlockToolAPI=h,function(t){t.APPEND_CALLBACK="appendCallback",t.RENDERED="rendered",t.MOVED="moved",t.UPDATED="updated",t.REMOVED="removed",t.ON_PASTE="onPaste"}(h||(t.BlockToolAPI=h={}));var g=function(){function t(e){var n=this,i=e.name,r=e.data,c=e.Tool,u=e.settings,d=e.api,f=e.readOnly;(0,o.default)(this,t),this.cachedInputs=[],this.inputIndex=0,this.modificationDebounceTimer=450,this.didMutated=a.debounce((function(){n.cachedInputs=[],n.updateCurrentInput(),n.call(h.UPDATED)}),this.modificationDebounceTimer),this.handleFocus=function(){n.cachedInputs=[],n.updateCurrentInput()},this.name=i,this.class=c,this.settings=u,this.config=u.config||{},this.api=d,this.blockAPI=new s.default(this),this.mutationObserver=new MutationObserver(this.didMutated),this.tool=new c({data:r,config:this.config,api:this.api.getMethodsForTool(i,l.ToolType.Block),block:this.blockAPI,readOnly:f}),this.holder=this.compose(),this.tunes=this.makeTunes()}return(0,i.default)(t,[{key:"mergeable",value:function(){return a.isFunction(this.tool.merge)}},{key:"call",value:function(t,e){if(this.tool[t]&&this.tool[t]instanceof Function){t===h.APPEND_CALLBACK&&a.log("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.tool[t].call(this.tool,e)}catch(e){a.log("Error during '".concat(t,"' call: ").concat(e.message),"error")}}}},{key:"mergeWith",value:function(t){return e.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.default.awrap(this.tool.merge(t));case 2:case"end":return n.stop()}}),null,this)}},{key:"save",value:function(){var t,n,o,i=this;return e.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.default.awrap(this.tool.save(this.pluginsContent));case 2:return t=r.sent,n=window.performance.now(),r.abrupt("return",Promise.resolve(t).then((function(t){return o=window.performance.now(),{tool:i.name,data:t,time:o-n}})).catch((function(t){a.log("Saving proccess for ".concat(i.name," tool failed due to the ").concat(t),"log","red")})));case 5:case"end":return r.stop()}}),null,this)}},{key:"validate",value:function(t){var n;return e.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(n=!0,!(this.tool.validate instanceof Function)){o.next=5;break}return o.next=4,e.default.awrap(this.tool.validate(t));case 4:n=o.sent;case 5:return o.abrupt("return",n);case 6:case"end":return o.stop()}}),null,this)}},{key:"makeTunes",value:function(){var t=this;return[{name:"moveUp",Tune:c.default},{name:"delete",Tune:u.default},{name:"moveDown",Tune:d.default}].map((function(e){var n=e.name;return new(0,e.Tune)({api:t.api.getMethodsForTool(n,l.ToolType.Tune),settings:t.config})}))}},{key:"renderTunes",value:function(){var t=document.createDocumentFragment();return this.tunes.forEach((function(e){r.default.append(t,e.render())})),t}},{key:"updateCurrentInput",value:function(){this.currentInput=r.default.isNativeInput(document.activeElement)||!f.default.anchorNode?document.activeElement:f.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:"compose",value:function(){var e=r.default.make("div",t.CSS.wrapper),n=r.default.make("div",t.CSS.content),o=this.tool.render();return n.appendChild(o),e.appendChild(n),e}},{key:"addInputEvents",value:function(){var t=this;this.inputs.forEach((function(e){e.addEventListener("focus",t.handleFocus)}))}},{key:"removeInputEvents",value:function(){var t=this;this.inputs.forEach((function(e){e.removeEventListener("focus",t.handleFocus)}))}},{key:"inputs",get:function(){if(0!==this.cachedInputs.length)return this.cachedInputs;var t=r.default.findAllInputs(this.holder);return this.inputIndex>t.length-1&&(this.inputIndex=t.length-1),this.cachedInputs=t,t}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(t){var e=this.inputs.findIndex((function(e){return e===t||e.contains(t)}));-1!==e&&(this.inputIndex=e)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var t=this.inputs;return t[t.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(t){return t&&!a.isEmpty(t.data)?t.data:{}}))}},{key:"sanitize",get:function(){return this.tool.sanitize}},{key:"isEmpty",get:function(){var t=r.default.isEmpty(this.pluginsContent),e=!this.hasMedia;return t&&e}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",set:function(e){this.holder.classList.toggle(t.CSS.focused,e)},get:function(){return this.holder.classList.contains(t.CSS.focused)}},{key:"selected",set:function(e){e?this.holder.classList.add(t.CSS.selected):this.holder.classList.remove(t.CSS.selected)},get:function(){return this.holder.classList.contains(t.CSS.selected)}},{key:"stretched",set:function(e){this.holder.classList.toggle(t.CSS.wrapperStretched,e)},get:function(){return this.holder.classList.contains(t.CSS.wrapperStretched)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(t.CSS.dropTarget,e)}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(t.CSS.content));if(e&&e.childNodes.length)for(var n=e.childNodes.length-1;n>=0;n--){var o=e.childNodes[n];if(!r.default.isExtensionNode(o))return o}return null}}],[{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"}}}]),t}();t.default=g,g.displayName="Block"})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var o=n(35),i=n(14)("toStringTag"),r="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:r?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var o=n(11),i=n(30),r=n(14)("species");t.exports=function(t,e){var n,a=o(t).constructor;return void 0===a||null==(n=o(a)[r])?e:i(n)}},function(t,e,n){var o=n(361),i=n(362),r=n(363);t.exports=function(t){return o(t)||i(t)||r()}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(21),n(51),n(2),n(3),n(5),n(4),n(6),n(370),n(7),n(8),n(371),n(372),n(373),n(374)],void 0===(r="function"==typeof(o=function(t,e,o,i,r,a,s,l,c,u,d,f,h,p,v,g){"use strict";var y=n(13),b=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.ToolType=t.default=void 0,e=b(e),o=b(o),i=b(i),r=b(r),a=b(a),s=b(s),l=b(l),c=b(c),u=b(u),d=b(d),f=y(f),h=b(h),p=b(p),v=b(v),g=b(g);var k,m=function(t){function n(t){var e,o=t.config;return(0,r.default)(this,n),(e=(0,s.default)(this,(0,l.default)(n).call(this,{config:o}))).stubTool="stub",e.toolsClasses={},e.toolsAvailable={},e.toolsUnavailable={},e.toolsSettings={},e._inlineTools={},e.toolsClasses={},e.toolsSettings={},e.toolsAvailable={},e.toolsUnavailable={},e._inlineTools=null,e}return(0,c.default)(n,t),(0,a.default)(n,[{key:"prepare",value:function(){var t=this;if(this.validateTools(),this.config.tools=f.deepMerge({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");for(var e in this.config.tools)"object"===(0,i.default)(this.config.tools[e])?(this.toolsClasses[e]=this.config.tools[e].class,this.toolsSettings[e]=this.config.tools[e],delete this.toolsSettings[e].class):(this.toolsClasses[e]=this.config.tools[e],this.toolsSettings[e]={class:this.config.tools[e]});var n=this.getListOfPrepareFunctions();return 0===n.length?Promise.resolve():f.sequence(n,(function(e){t.success(e)}),(function(e){t.fallback(e)}))}},{key:"success",value:function(t){this.toolsAvailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"fallback",value:function(t){this.toolsUnavailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"constructInline",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={api:this.Editor.API.getMethodsForTool(e),config:n[this.USER_SETTINGS.CONFIG]||{}};return new t(o)}},{key:"isDefault",value:function(t){return t instanceof this.available[this.config.defaultBlock]}},{key:"getToolSettings",value:function(t){var e=this.toolsSettings[t],n=e[this.USER_SETTINGS.CONFIG]||{};return t!==this.config.defaultBlock||n.placeholder||(n.placeholder=this.config.placeholder,e[this.USER_SETTINGS.CONFIG]=n),e}},{key:"isReadOnlySupported",value:function(t){return!0===t[this.INTERNAL_SETTINGS.IS_READ_ONLY_SUPPORTED]}},{key:"destroy",value:function(){Object.values(this.available).forEach((function(t){return o.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f.isFunction(t.reset)){e.next=3;break}return e.next=3,o.default.awrap(t.reset());case 3:case"end":return e.stop()}}))}))}},{key:"getListOfPrepareFunctions",value:function(){var t=[];for(var e in this.toolsClasses)if(Object.prototype.hasOwnProperty.call(this.toolsClasses,e)){var n=this.toolsClasses[e],o=this.toolsSettings[e][this.USER_SETTINGS.CONFIG];t.push({function:f.isFunction(n.prepare)?n.prepare:function(){},data:{toolName:e,config:o}})}return t}},{key:"validateTools",value:function(){for(var t in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,t)){if(t in this.internalTools)return;var e=this.config.tools[t];if(!f.isFunction(e)&&!f.isFunction(e.class))throw Error("Tool «".concat(t,"» must be a constructor function or an object with function in the «class» property"))}}},{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inline",get:function(){var t=this;if(this._inlineTools)return this._inlineTools;var n=Object.entries(this.available).filter((function(n){var o=(0,e.default)(n,2),i=o[0],r=o[1];if(!r[t.INTERNAL_SETTINGS.IS_INLINE])return!1;var a=["render","surround","checkState"].filter((function(e){return!t.constructInline(r,i)[e]}));return!a.length||(f.log("Incorrect Inline Tool: ".concat(r.name,". Some of required methods is not implemented %o"),"warn",a),!1)})),o={};return n.forEach((function(t){var n=(0,e.default)(t,2),i=n[0],r=n[1];o[i]=r})),this._inlineTools=o,this._inlineTools}},{key:"blockTools",get:function(){var t=this,n=Object.entries(this.available).filter((function(n){return!(0,e.default)(n,2)[1][t.INTERNAL_SETTINGS.IS_INLINE]})),o={};return n.forEach((function(t){var n=(0,e.default)(t,2),i=n[0],r=n[1];o[i]=r})),o}},{key:"INTERNAL_SETTINGS",get:function(){return{IS_ENABLED_LINE_BREAKS:"enableLineBreaks",IS_INLINE:"isInline",TITLE:"title",SHORTCUT:"shortcut",TOOLBOX:"toolbox",SANITIZE_CONFIG:"sanitize",CONVERSION_CONFIG:"conversionConfig",IS_READ_ONLY_SUPPORTED:"isReadOnlySupported"}}},{key:"USER_SETTINGS",get:function(){return{SHORTCUT:"shortcut",TOOLBOX:"toolbox",ENABLED_INLINE_TOOLS:"inlineToolbar",CONFIG:"config"}}},{key:"internalTools",get:function(){return{bold:{class:h.default},italic:{class:p.default},link:{class:v.default},paragraph:{class:u.default,inlineToolbar:!0},stub:{class:g.default}}}}]),n}(d.default);t.default=m,m.displayName="Tools",t.ToolType=k,function(t){t[t.Block=0]="Block",t[t.Inline=1]="Inline",t[t.Tune=2]="Tune"}(k||(t.ToolType=k={}))})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(17),i=n(9),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n(43)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var o=n(27),i=n(16),r=n(45);t.exports=function(t){return function(e,n,a){var s,l=o(e),c=i(l.length),u=r(a,c);if(t&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var o=n(35);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,n){var o=n(14)("iterator"),i=!1;try{var r=[7][o]();r.return=function(){i=!0},Array.from(r,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r=[7],a=r[o]();a.next=function(){return{done:n=!0}},r[o]=function(){return a},t(r)}catch(t){}return n}},function(t,e,n){"use strict";var o=n(11);t.exports=function(){var t=o(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var o=n(63),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(128);var o=n(22),i=n(26),r=n(10),a=n(36),s=n(14),l=n(103),c=s("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),h=!r((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=h?!r((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!h||!p||"replace"===t&&!u||"split"===t&&!d){var v=/./[f],g=n(a,f,""[t],(function(t,e,n,o,i){return e.exec===l?h&&!i?{done:!0,value:v.call(e,n,o)}:{done:!0,value:t.call(n,e,o)}:{done:!1}})),y=g[0],b=g[1];o(String.prototype,t,y),i(RegExp.prototype,f,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},function(t,e,n){var o=n(29),i=n(123),r=n(98),a=n(11),s=n(16),l=n(100),c={},u={};(e=t.exports=function(t,e,n,d,f){var h,p,v,g,y=f?function(){return t}:l(t),b=o(n,d,e?2:1),k=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(r(y)){for(h=s(t.length);h>k;k++)if((g=e?b(a(p=t[k])[0],p[1]):b(t[k]))===c||g===u)return g}else for(v=y.call(t);!(p=v.next()).done;)if((g=i(v,b,p.value,e))===c||g===u)return g}).BREAK=c,e.RETURN=u},function(t,e,n){var o=n(9).navigator;t.exports=o&&o.userAgent||""},function(t,e,n){"use strict";var o=n(9),i=n(0),r=n(22),a=n(57),s=n(40),l=n(75),c=n(56),u=n(12),d=n(10),f=n(71),h=n(52),p=n(89);t.exports=function(t,e,n,v,g,y){var b=o[t],k=b,m=g?"set":"add",x=k&&k.prototype,S={},w=function(t){var e=x[t];r(x,t,"delete"==t?function(t){return!(y&&!u(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!u(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof k&&(y||x.forEach&&!d((function(){(new k).entries().next()})))){var E=new k,T=E[m](y?{}:-0,1)!=E,B=d((function(){E.has(1)})),C=f((function(t){new k(t)})),_=!y&&d((function(){for(var t=new k,e=5;e--;)t[m](e,e);return!t.has(-0)}));C||((k=e((function(e,n){c(e,k,t);var o=p(new b,e,k);return null!=n&&l(n,g,o[m],o),o}))).prototype=x,x.constructor=k),(B||_)&&(w("delete"),w("has"),g&&w("get")),(_||T)&&w(m),y&&x.clear&&delete x.clear}else k=v.getConstructor(e,t,g,m),a(k.prototype,n),s.NEED=!0;return h(k,t),S[t]=k,i(i.G+i.W+i.F*(k!=b),S),y||v.setStrong(k,t,g),k}},function(t,e,n){for(var o,i=n(9),r=n(26),a=n(42),s=a("typed_array"),l=a("view"),c=!(!i.ArrayBuffer||!i.DataView),u=c,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(o=i[f[d++]])?(r(o.prototype,s,!0),r(o.prototype,l,!0)):u=!1;t.exports={ABV:c,CONSTR:u,TYPED:s,VIEW:l}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(66)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l);var f=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"getMethodsForTool",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.ToolType.Block;return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(t,e)})}},{key:"methods",get:function(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods}}}]),e}((c=d(c)).default);o.default=f,f.displayName="API",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h){"use strict";var p=n(13),v=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=v(i),r=v(r),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),d=p(d),f=v(f);var g=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"toggleReadOnly",value:function(t){t?(this.destroy(),this.Editor.Toolbox.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):(this.drawUI(),this.enableModuleBindings())}},{key:"move",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.Editor.Toolbox.close(),this.Editor.BlockSettings.close());var e=this.Editor.BlockManager.currentBlock.holder;if(e){var n=this.Editor.UI.isMobile,o=e.offsetHeight,i=e.offsetTop;if(n)i+=o;else{var r=Math.floor(o/2);this.nodes.plusButton.style.transform="translate3d(0, calc(".concat(r,"px - 50%), 0)"),this.Editor.Toolbox.nodes.toolbox.style.transform="translate3d(0, calc(".concat(r,"px - 50%), 0)")}this.nodes.wrapper.style.transform="translate3D(0, ".concat(Math.floor(i),"px, 0)")}}},{key:"open",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.delay((function(){t.move(n),t.nodes.wrapper.classList.add(t.CSS.toolbarOpened),e?t.blockActions.show():t.blockActions.hide()}),50)()}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),this.Editor.Toolbox.close(),this.Editor.BlockSettings.close()}},{key:"make",value:function(){var t=this;this.nodes.wrapper=u.default.make("div",this.CSS.toolbar),["content","actions"].forEach((function(e){t.nodes[e]=u.default.make("div",t.CSS[e])})),u.default.append(this.nodes.wrapper,this.nodes.content),u.default.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=u.default.make("div",this.CSS.plusButton),u.default.append(this.nodes.plusButton,u.default.svg("plus",14,14)),u.default.append(this.nodes.content,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",(function(){t.plusButtonClicked()}),!1);var e=u.default.make("div");e.appendChild(document.createTextNode(f.default.ui(h.I18nInternalNS.ui.toolbar.toolbox,"Add"))),e.appendChild(u.default.make("div",this.CSS.plusButtonShortcut,{textContent:"⇥ Tab"})),this.Editor.Tooltip.onHover(this.nodes.plusButton,e),this.nodes.blockActionsButtons=u.default.make("div",this.CSS.blockActionsButtons),this.nodes.settingsToggler=u.default.make("span",this.CSS.settingsToggler);var n=u.default.svg("dots",8,8);u.default.append(this.nodes.settingsToggler,n),u.default.append(this.nodes.blockActionsButtons,this.nodes.settingsToggler),u.default.append(this.nodes.actions,this.nodes.blockActionsButtons),this.Editor.Tooltip.onHover(this.nodes.settingsToggler,f.default.ui(h.I18nInternalNS.ui.blockTunes.toggler,"Click to tune"),{placement:"top"}),u.default.append(this.nodes.content,this.Editor.Toolbox.nodes.toolbox),u.default.append(this.nodes.actions,this.Editor.BlockSettings.nodes.wrapper),u.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}},{key:"plusButtonClicked",value:function(){this.Editor.Toolbox.toggle()}},{key:"enableModuleBindings",value:function(){var t=this;this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"click",(function(){t.settingsTogglerClicked()}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open()}},{key:"drawUI",value:function(){this.Editor.BlockSettings.make(),this.Editor.Toolbox.make(),this.make()}},{key:"destroy",value:function(){this.removeAllNodes()}},{key:"CSS",get:function(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",plusButtonHidden:"ce-toolbar__plus--hidden",blockActionsButtons:"ce-toolbar__actions-buttons",settingsToggler:"ce-toolbar__settings-btn"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}},{key:"plusButton",get:function(){var t=this;return{hide:function(){return t.nodes.plusButton.classList.add(t.CSS.plusButtonHidden)},show:function(){t.Editor.Toolbox.isEmpty||t.nodes.plusButton.classList.remove(t.CSS.plusButtonHidden)}}}},{key:"blockActions",get:function(){var t=this;return{hide:function(){t.nodes.actions.classList.remove(t.CSS.actionsOpened)},show:function(){t.nodes.actions.classList.add(t.CSS.actionsOpened)}}}}]),e}(c.default);o.default=g,g.displayName="Toolbar",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(140),n(8)],void 0===(r="function"==typeof(o=function(t,e,o,i){"use strict";var r=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.I18nInternalNS=void 0,e=r(e);var a=function t(n,o){var r={};return Object.entries(n).forEach((function(n){var a=(0,e.default)(n,2),s=a[0],l=a[1];if("object"!==(0,i.typeOf)(l))r[s]=l;else{var c=o?"".concat(o,".").concat(s):s,u=Object.values(l).every((function(t){return"string"===(0,i.typeOf)(t)}));r[s]=u?c:t(l,c)}})),r}((o=r(o)).default);t.I18nInternalNS=a})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(12),i=n(9).document,r=o(i)&&o(i.createElement);t.exports=function(t){return r?i.createElement(t):{}}},function(t,e,n){e.f=n(14)},function(t,e,n){var o=n(67)("keys"),i=n(42);t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var o=n(9).document;t.exports=o&&o.documentElement},function(t,e,n){var o=n(12),i=n(11),r=function(t,e){if(i(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{(o=n(29)(Function.call,n(32).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return r(t,n),e?t.__proto__=n:o(t,n),t}}({},!1):void 0),check:r}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var o=n(12),i=n(87).set;t.exports=function(t,e,n){var r,a=e.constructor;return a!==n&&"function"==typeof a&&(r=a.prototype)!==n.prototype&&o(r)&&i&&i(t,r),t}},function(t,e,n){"use strict";var o=n(31),i=n(36);t.exports=function(t){var e=String(i(this)),n="",r=o(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var o=n(31),i=n(36);t.exports=function(t){return function(e,n){var r,a,s=String(i(e)),l=o(n),c=s.length;return l<0||l>=c?t?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):r:t?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},function(t,e,n){"use strict";var o=n(43),i=n(0),r=n(22),a=n(26),s=n(54),l=n(122),c=n(52),u=n(48),d=n(14)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,p,v,g,y){l(n,e,p);var b,k,m,x=function(t){if(!f&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==v,E=!1,T=t.prototype,B=T[d]||T["@@iterator"]||v&&T[v],C=B||x(v),_=v?w?x("entries"):C:void 0,O="Array"==e&&T.entries||B;if(O&&(m=u(O.call(new t)))!==Object.prototype&&m.next&&(c(m,S,!0),o||"function"==typeof m[d]||a(m,d,h)),w&&B&&"values"!==B.name&&(E=!0,C=function(){return B.call(this)}),o&&!y||!f&&!E&&T[d]||a(T,d,C),s[e]=C,s[S]=h,v)if(b={values:w?C:x("values"),keys:g?C:x("keys"),entries:_},y)for(k in b)k in T||r(T,k,b[k]);else i(i.P+i.F*(f||E),e,b);return b}},function(t,e,n){var o=n(96),i=n(36);t.exports=function(t,e,n){if(o(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var o=n(12),i=n(35),r=n(14)("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==i(t))}},function(t,e,n){var o=n(14)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var o=n(54),i=n(14)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||r[i]===t)}},function(t,e,n){"use strict";var o=n(19),i=n(41);t.exports=function(t,e,n){e in t?o.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var o=n(63),i=n(14)("iterator"),r=n(54);t.exports=n(17).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||r[o(t)]}},function(t,e,n){"use strict";var o=n(20),i=n(45),r=n(16);t.exports=function(t){for(var e=o(this),n=r(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:i(l,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var o=n(49),i=n(127),r=n(54),a=n(27);t.exports=n(94)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},function(t,e,n){"use strict";var o,i,r=n(72),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(o=/a/,i=/b*/g,a.call(o,"a"),a.call(i,"a"),0!==o.lastIndex||0!==i.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(t){var e,n,o,i,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),c&&(e=l.lastIndex),o=a.call(l,t),c&&o&&(l.lastIndex=l.global?o.index+o[0].length:e),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(i=1;in;)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},o(g),g},h=function(t){delete y[t]},"process"==n(35)(d)?o=function(t){d.nextTick(a(b,t,1))}:v&&v.now?o=function(t){v.now(a(b,t,1))}:p?(r=(i=new p).port2,i.port1.onmessage=k,o=a(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(o=function(t){u.postMessage(t+"","*")},u.addEventListener("message",k,!1)):o="onreadystatechange"in c("script")?function(t){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:f,clear:h}},function(t,e,n){"use strict";var o=n(9),i=n(18),r=n(43),a=n(78),s=n(26),l=n(57),c=n(10),u=n(56),d=n(31),f=n(16),h=n(135),p=n(47).f,v=n(19).f,g=n(101),y=n(52),b="prototype",k="Wrong index!",m=o.ArrayBuffer,x=o.DataView,S=o.Math,w=o.RangeError,E=o.Infinity,T=m,B=S.abs,C=S.pow,_=S.floor,O=S.log,I=S.LN2,N=i?"_b":"buffer",M=i?"_l":"byteLength",L=i?"_o":"byteOffset";function A(t,e,n){var o,i,r,a=new Array(n),s=8*n-e-1,l=(1<>1,u=23===e?C(2,-24)-C(2,-77):0,d=0,f=t<0||0===t&&1/t<0?1:0;for((t=B(t))!=t||t===E?(i=t!=t?1:0,o=l):(o=_(O(t)/I),t*(r=C(2,-o))<1&&(o--,r*=2),(t+=o+c>=1?u/r:u*C(2,1-c))*r>=2&&(o++,r/=2),o+c>=l?(i=0,o=l):o+c>=1?(i=(t*r-1)*C(2,e),o+=c):(i=t*C(2,c-1)*C(2,e),o=0));e>=8;a[d++]=255&i,i/=256,e-=8);for(o=o<0;a[d++]=255&o,o/=256,s-=8);return a[--d]|=128*f,a}function P(t,e,n){var o,i=8*n-e-1,r=(1<>1,s=i-7,l=n-1,c=t[l--],u=127&c;for(c>>=7;s>0;u=256*u+t[l],l--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=e;s>0;o=256*o+t[l],l--,s-=8);if(0===u)u=1-a;else{if(u===r)return o?NaN:c?-E:E;o+=C(2,e),u-=a}return(c?-1:1)*o*C(2,u-e)}function R(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function j(t){return[255&t]}function D(t){return[255&t,t>>8&255]}function F(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function H(t){return A(t,52,8)}function U(t){return A(t,23,4)}function z(t,e,n){v(t[b],e,{get:function(){return this[n]}})}function G(t,e,n,o){var i=h(+n);if(i+e>t[M])throw w(k);var r=t[N]._b,a=i+t[L],s=r.slice(a,a+e);return o?s:s.reverse()}function W(t,e,n,o,i,r){var a=h(+n);if(a+e>t[M])throw w(k);for(var s=t[N]._b,l=a+t[L],c=o(+i),u=0;uK;)(Y=V[K++])in m||s(m,Y,T[Y]);r||(X.constructor=m)}var Z=new x(new m(2)),q=x[b].setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||l(x[b],{setInt8:function(t,e){q.call(this,t,e<<24>>24)},setUint8:function(t,e){q.call(this,t,e<<24>>24)}},!0)}else m=function(t){u(this,m,"ArrayBuffer");var e=h(t);this._b=g.call(new Array(e),0),this[M]=e},x=function(t,e,n){u(this,x,"DataView"),u(t,m,"DataView");var o=t[M],i=d(e);if(i<0||i>o)throw w("Wrong offset!");if(i+(n=void 0===n?o-i:f(n))>o)throw w("Wrong length!");this[N]=t,this[L]=i,this[M]=n},i&&(z(m,"byteLength","_l"),z(x,"buffer","_b"),z(x,"byteLength","_l"),z(x,"byteOffset","_o")),l(x[b],{getInt8:function(t){return G(this,1,t)[0]<<24>>24},getUint8:function(t){return G(this,1,t)[0]},getInt16:function(t){var e=G(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=G(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(G(this,4,t,arguments[1]))},getUint32:function(t){return R(G(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return P(G(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return P(G(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){W(this,1,t,j,e)},setUint8:function(t,e){W(this,1,t,j,e)},setInt16:function(t,e){W(this,2,t,D,e,arguments[2])},setUint16:function(t,e){W(this,2,t,D,e,arguments[2])},setInt32:function(t,e){W(this,4,t,F,e,arguments[2])},setUint32:function(t,e){W(this,4,t,F,e,arguments[2])},setFloat32:function(t,e){W(this,4,t,U,e,arguments[2])},setFloat64:function(t,e){W(this,8,t,H,e,arguments[2])}});y(m,"ArrayBuffer"),y(x,"DataView"),s(x[b],a.VIEW,!0),e.ArrayBuffer=m,e.DataView=x},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e,n){t.exports=!n(18)&&!n(10)((function(){return 7!=Object.defineProperty(n(82)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var o=n(9),i=n(17),r=n(43),a=n(83),s=n(19).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=r?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var o=n(25),i=n(27),r=n(68)(!1),a=n(84)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),l=0,c=[];for(n in s)n!=a&&o(s,n)&&c.push(n);for(;e.length>l;)o(s,n=e[l++])&&(~r(c,n)||c.push(n));return c}},function(t,e,n){var o=n(19),i=n(11),r=n(44);t.exports=n(18)?Object.defineProperties:function(t,e){i(t);for(var n,a=r(e),s=a.length,l=0;s>l;)o.f(t,n=a[l++],e[n]);return t}},function(t,e,n){var o=n(27),i=n(47).f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==r.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(o(t))}},function(t,e,n){"use strict";var o=n(18),i=n(44),r=n(69),a=n(62),s=n(20),l=n(61),c=Object.assign;t.exports=!c||n(10)((function(){var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=o}))?function(t,e){for(var n=s(t),c=arguments.length,u=1,d=r.f,f=a.f;c>u;)for(var h,p=l(arguments[u++]),v=d?i(p).concat(d(p)):i(p),g=v.length,y=0;g>y;)h=v[y++],o&&!f.call(p,h)||(n[h]=p[h]);return n}:c},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var o=n(30),i=n(12),r=n(116),a=[].slice,s={},l=function(t,e,n){if(!(e in s)){for(var o=[],i=0;i>>0||(a.test(n)?16:10))}:o},function(t,e,n){var o=n(9).parseFloat,i=n(53).trim;t.exports=1/o(n(88)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=o(e);return 0===n&&"-"==e.charAt(0)?-0:n}:o},function(t,e,n){var o=n(35);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=o(t))throw TypeError(e);return+t}},function(t,e,n){var o=n(12),i=Math.floor;t.exports=function(t){return!o(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var o=n(46),i=n(41),r=n(52),a={};n(26)(a,n(14)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=o(a,{next:i(1,n)}),r(t,e+" Iterator")}},function(t,e,n){var o=n(11);t.exports=function(t,e,n,i){try{return i?e(o(n)[0],n[1]):e(n)}catch(e){var r=t.return;throw void 0!==r&&o(r.call(t)),e}}},function(t,e,n){var o=n(275);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,n){var o=n(30),i=n(20),r=n(61),a=n(16);t.exports=function(t,e,n,s,l){o(e);var c=i(t),u=r(c),d=a(c.length),f=l?d-1:0,h=l?-1:1;if(n<2)for(;;){if(f in u){s=u[f],f+=h;break}if(f+=h,l?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:d>f;f+=h)f in u&&(s=e(s,u[f],f,c));return s}},function(t,e,n){"use strict";var o=n(20),i=n(45),r=n(16);t.exports=[].copyWithin||function(t,e){var n=o(this),a=r(n.length),s=i(t,a),l=i(e,a),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?a:i(c,a))-l,a-s),d=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=d,l+=d;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var o=n(103);n(0)({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},function(t,e,n){n(18)&&"g"!=/./g.flags&&n(19).f(RegExp.prototype,"flags",{configurable:!0,get:n(72)})},function(t,e,n){"use strict";var o,i,r,a,s=n(43),l=n(9),c=n(29),u=n(63),d=n(0),f=n(12),h=n(30),p=n(56),v=n(75),g=n(64),y=n(105).set,b=n(295)(),k=n(131),m=n(296),x=n(76),S=n(132),w=l.TypeError,E=l.process,T=E&&E.versions,B=T&&T.v8||"",C=l.Promise,_="process"==u(E),O=function(){},I=i=k.f,N=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(14)("species")]=function(t){t(O,O)};return(_||"function"==typeof PromiseRejectionEvent)&&t.then(O)instanceof e&&0!==B.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),M=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var n=t._c;b((function(){for(var o=t._v,i=1==t._s,r=0,a=function(e){var n,r,a,s=i?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(i||(2==t._h&&R(t),t._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),a=!0)),n===e.promise?c(w("Promise-chain cycle")):(r=M(n))?r.call(n,l,c):l(n)):c(o)}catch(t){u&&!a&&u.exit(),c(t)}};n.length>r;)a(n[r++]);t._c=[],t._n=!1,e&&!t._h&&A(t)}))}},A=function(t){y.call(l,(function(){var e,n,o,i=t._v,r=P(t);if(r&&(e=m((function(){_?E.emit("unhandledRejection",i,t):(n=l.onunhandledrejection)?n({promise:t,reason:i}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",i)})),t._h=_||P(t)?2:1),t._a=void 0,r&&e.e)throw e.v}))},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){y.call(l,(function(){var e;_?E.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})}))},j=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=M(t))?b((function(){var o={_w:n,_d:!1};try{e.call(t,c(D,o,1),c(j,o,1))}catch(t){j.call(o,t)}})):(n._v=t,n._s=1,L(n,!1))}catch(t){j.call({_w:n,_d:!1},t)}}};N||(C=function(t){p(this,C,"Promise","_h"),h(t),o.call(this);try{t(c(D,this,1),c(j,this,1))}catch(t){j.call(this,t)}},(o=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(57)(C.prototype,{then:function(t,e){var n=I(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=_?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new o;this.promise=t,this.resolve=c(D,t,1),this.reject=c(j,t,1)},k.f=I=function(t){return t===C||t===a?new r(t):i(t)}),d(d.G+d.W+d.F*!N,{Promise:C}),n(52)(C,"Promise"),n(55)("Promise"),a=n(17).Promise,d(d.S+d.F*!N,"Promise",{reject:function(t){var e=I(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!N),"Promise",{resolve:function(t){return S(s&&this===a?C:this,t)}}),d(d.S+d.F*!(N&&n(71)((function(t){C.all(t).catch(O)}))),"Promise",{all:function(t){var e=this,n=I(e),o=n.resolve,i=n.reject,r=m((function(){var n=[],r=0,a=1;v(t,!1,(function(t){var s=r++,l=!1;n.push(void 0),a++,e.resolve(t).then((function(t){l||(l=!0,n[s]=t,--a||o(n))}),i)})),--a||o(n)}));return r.e&&i(r.v),n.promise},race:function(t){var e=this,n=I(e),o=n.reject,i=m((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,o)}))}));return i.e&&o(i.v),n.promise}})},function(t,e,n){"use strict";var o=n(30);function i(t){var e,n;this.promise=new t((function(t,o){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=o})),this.resolve=o(e),this.reject=o(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){var o=n(11),i=n(12),r=n(131);t.exports=function(t,e){if(o(t),i(e)&&e.constructor===t)return e;var n=r.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var o=n(19).f,i=n(46),r=n(57),a=n(29),s=n(56),l=n(75),c=n(94),u=n(127),d=n(55),f=n(18),h=n(40).fastKey,p=n(50),v=f?"_s":"size",g=function(t,e){var n,o=h(e);if("F"!==o)return t._i[o];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var u=t((function(t,o){s(t,u,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=o&&l(o,n,t[c],t)}));return r(u.prototype,{clear:function(){for(var t=p(this,e),n=t._i,o=t._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=p(this,e),o=g(n,t);if(o){var i=o.n,r=o.p;delete n._i[o.i],o.r=!0,r&&(r.n=i),i&&(i.p=r),n._f==o&&(n._f=i),n._l==o&&(n._l=r),n[v]--}return!!o},forEach:function(t){p(this,e);for(var n,o=a(t,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(t){return!!g(p(this,e),t)}}),f&&o(u.prototype,"size",{get:function(){return p(this,e)[v]}}),u},def:function(t,e,n){var o,i,r=g(t,e);return r?r.v=n:(t._l=r={i:i=h(e,!0),k:e,v:n,p:o=t._l,n:void 0,r:!1},t._f||(t._f=r),o&&(o.n=r),t[v]++,"F"!==i&&(t._i[i]=r)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,(function(t,n){this._t=p(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?u(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),d(e)}}},function(t,e,n){"use strict";var o=n(57),i=n(40).getWeak,r=n(11),a=n(12),s=n(56),l=n(75),c=n(34),u=n(25),d=n(50),f=c(5),h=c(6),p=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return f(t.a,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var c=t((function(t,o){s(t,c,e,"_i"),t._t=e,t._i=p++,t._l=void 0,null!=o&&l(o,n,t[r],t)}));return o(c.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).delete(t):n&&u(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).has(t):n&&u(n,this._i)}}),c},def:function(t,e,n){var o=i(r(e),!0);return!0===o?v(t).set(e,n):o[t._i]=n,t},ufstore:v}},function(t,e,n){var o=n(31),i=n(16);t.exports=function(t){if(void 0===t)return 0;var e=o(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var o=n(47),i=n(69),r=n(11),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=o.f(r(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var o=n(16),i=n(90),r=n(36);t.exports=function(t,e,n,a){var s=String(r(t)),l=s.length,c=void 0===n?" ":String(n),u=o(e);if(u<=l||""==c)return s;var d=u-l,f=i.call(c,Math.ceil(d/c.length));return f.length>d&&(f=f.slice(0,d)),a?f+s:s+f}},function(t,e,n){var o=n(18),i=n(44),r=n(27),a=n(62).f;t.exports=function(t){return function(e){for(var n,s=r(e),l=i(s),c=l.length,u=0,d=[];c>u;)n=l[u++],o&&!a.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}}},function(t,e,n){var o=function(t){"use strict";var e,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n,o){var i=e&&e.prototype instanceof v?e:v,r=Object.create(i.prototype),a=new C(o||[]);return r._invoke=function(t,e,n){var o=u;return function(i,r){if(o===f)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw r;return O()}for(n.method=i,n.arg=r;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===u)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=c(t,e,n);if("normal"===l.type){if(o=n.done?h:d,l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.arg)}}}(t,n,a),r}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u="suspendedStart",d="suspendedYield",f="executing",h="completed",p={};function v(){}function g(){}function y(){}var b={};b[r]=function(){return this};var k=Object.getPrototypeOf,m=k&&k(k(_([])));m&&m!==n&&o.call(m,r)&&(b=m);var x=y.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t){var e;this._invoke=function(n,i){function r(){return new Promise((function(e,r){!function e(n,i,r,a){var s=c(t[n],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then((function(t){e("next",t,r,a)}),(function(t){e("throw",t,r,a)})):Promise.resolve(u).then((function(t){l.value=t,r(l)}),(function(t){return e("throw",t,r,a)}))}a(s.arg)}(n,i,e,r)}))}return e=e?e.then(r,r):r()}}function E(t,n){var o=t.iterator[n.method];if(o===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=c(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var r=i.arg;return r?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(t){if(t){var n=t[r];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),B(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},function(t){t.exports=JSON.parse('{"ui":{"blockTunes":{"toggler":{"Click to tune":"","or drag to move":""}},"inlineToolbar":{"converter":{"Convert to":""}},"toolbar":{"toolbox":{"Add":""}}},"toolNames":{"Text":"","Link":"","Bold":"","Italic":""},"tools":{"link":{"Add a link":""},"stub":{"The block can not be displayed correctly.":""}},"blockTunes":{"delete":{"Delete":""},"moveUp":{"Move up":""},"moveDown":{"Move down":""}}}')},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(5),n(4),n(6),n(366)],void 0===(r="function"==typeof(o=function(t,e,o,i,r,a){"use strict";var s=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.CriticalError=void 0,e=s(e),o=s(o),i=s(i),r=s(r);var l=function(t){function n(){return(0,e.default)(this,n),(0,o.default)(this,(0,i.default)(n).apply(this,arguments))}return(0,r.default)(n,t),n}((0,(a=s(a)).default)(Error));t.CriticalError=l,l.displayName="CriticalError"})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(8),n(143),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=f(c),u=h(u);var p=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).insert=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.config.defaultBlock,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3?arguments[3]:void 0),i=arguments.length>4?arguments[4]:void 0;t.Editor.BlockManager.insert({tool:e,data:n,index:o,needToFocus:i})},t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockByIndex",value:function(t){var e=this.Editor.BlockManager.getBlockByIndex(t);if(void 0!==e)return new u.default(e);c.logLabeled("There is no block at index `"+t+"`","warn")}},{key:"swap",value:function(t,e){c.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(t,e),this.Editor.Toolbar.move(!1)}},{key:"move",value:function(t,e){this.Editor.BlockManager.move(t,e),this.Editor.Toolbar.move(!1)}},{key:"delete",value:function(t){try{this.Editor.BlockManager.removeBlock(t)}catch(t){return void c.logLabeled(t,"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(t){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(t.blocks)}},{key:"renderFromHTML",value:function(t){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(t,!0)}},{key:"stretchBlock",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];c.deprecationAssert(!0,"blocks.stretchBlock()","BlockAPI");var n=this.Editor.BlockManager.getBlockByIndex(t);n&&(n.stretched=e)}},{key:"insertNewBlock",value:function(){c.log("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}},{key:"methods",get:function(){var t=this;return{clear:function(){return t.clear()},render:function(e){return t.render(e)},renderFromHTML:function(e){return t.renderFromHTML(e)},delete:function(e){return t.delete(e)},swap:function(e,n){return t.swap(e,n)},move:function(e,n){return t.move(e,n)},getBlockByIndex:function(e){return t.getBlockByIndex(e)},getCurrentBlockIndex:function(){return t.getCurrentBlockIndex()},getBlocksCount:function(){return t.getBlocksCount()},stretchBlock:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.stretchBlock(e,n)},insertNewBlock:function(){return t.insertNewBlock()},insert:this.insert}}}]),e}((d=h(d)).default);o.default=p,p.displayName="BlocksAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e],void 0===(r="function"==typeof(o=function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(t){var e={get name(){return t.name},get config(){return t.config},get holder(){return t.holder},get isEmpty(){return t.isEmpty},get selected(){return t.selected},set stretched(e){t.stretched=e},get stretched(){return t.stretched},call:function(e,n){return t.call(e,n)},save:function(){return t.save()},validate:function(e){return t.validate(e)}};Object.setPrototypeOf(this,e)};n.default=o,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).setToFirstBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.firstBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.firstBlock,e,n),!0)},t.setToLastBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.lastBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.lastBlock,e,n),!0)},t.setToPreviousBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.previousBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.previousBlock,e,n),!0)},t.setToNextBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.nextBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.nextBlock,e,n),!0)},t.setToBlock=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.Editor.Caret.positions.DEFAULT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!t.Editor.BlockManager.blocks[e]&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.blocks[e],n,o),!0)},t.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?t.setToLastBlock(t.Editor.Caret.positions.END):t.setToFirstBlock(t.Editor.Caret.positions.START)},t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"methods",get:function(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}]),e}((c=u(c)).default);o.default=d,d.displayName="CaretAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"on",value:function(t,e){this.Editor.Events.on(t,e)}},{key:"emit",value:function(t,e){this.Editor.Events.emit(t,e)}},{key:"off",value:function(t,e){this.Editor.Events.off(t,e)}},{key:"methods",get:function(){var t=this;return{emit:function(e,n){return t.emit(e,n)},off:function(e,n){return t.off(e,n)},on:function(e,n){return t.on(e,n)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="EventsAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(58),n(66),n(8),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c);var p=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"getMethodsForTool",value:function(t,n){return Object.assign(this.methods,{t:function(o){return c.default.t(e.getNamespace(t,n),o)}})}},{key:"methods",get:function(){return{t:function(){(0,d.logLabeled)("I18n.t() method can be accessed only from Tools","warn")}}}}],[{key:"getNamespace",value:function(t,e){switch(e){case u.ToolType.Block:case u.ToolType.Inline:return"tools.".concat(t);case u.ToolType.Tune:return"blockTunes.".concat(t)}}}]),e}((f=h(f)).default);o.default=p,p.displayName="I18nAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"open",value:function(){this.Editor.InlineToolbar.tryToShow()}},{key:"close",value:function(){this.Editor.InlineToolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="InlineToolbarAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"on",value:function(t,e,n,o){this.Editor.Listeners.on(t,e,n,o)}},{key:"off",value:function(t,e,n,o){this.Editor.Listeners.off(t,e,n,o)}},{key:"methods",get:function(){var t=this;return{on:function(e,n,o,i){return t.on(e,n,o,i)},off:function(e,n,o,i){return t.off(e,n,o,i)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="ListenersAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t){return this.Editor.Notifier.show(t)}},{key:"methods",get:function(){var t=this;return{show:function(e){return t.show(e)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="NotifierAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"toggle",value:function(t){return this.Editor.ReadOnly.toggle(t)}},{key:"methods",get:function(){var t=this;return{toggle:function(e){return t.toggle(e)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="ReadOnlyAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"clean",value:function(t,e){return this.Editor.Sanitizer.clean(t,e)}},{key:"methods",get:function(){var t=this;return{clean:function(e,n){return t.clean(e,n)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="SanitizerAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(8),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(13),f=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=f(i),r=f(r),a=f(a),s=f(s),l=f(l),c=d(c);var h=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"save",value:function(){var t="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(c.logLabeled(t,"warn"),Promise.reject(new Error(t))):this.Editor.Saver.save()}},{key:"methods",get:function(){var t=this;return{save:function(){return t.save()}}}}]),e}((u=f(u)).default);o.default=h,h.displayName="SaverAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(24),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c);var f=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"findParentTag",value:function(t,e){return(new c.default).findParentTag(t,e)}},{key:"expandToTag",value:function(t){(new c.default).expandToTag(t)}},{key:"methods",get:function(){var t=this;return{findParentTag:function(e,n){return t.findParentTag(e,n)},expandToTag:function(e){return t.expandToTag(e)}}}}]),e}((u=d(u)).default);o.default=f,f.displayName="SelectionAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{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"}}}]),e}((c=u(c)).default);o.default=d,d.displayName="StylesAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"open",value:function(){this.Editor.Toolbar.open()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="ToolbarAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t,e,n){this.Editor.Tooltip.show(t,e,n)}},{key:"hide",value:function(){this.Editor.Tooltip.hide()}},{key:"onHover",value:function(t,e,n){this.Editor.Tooltip.onHover(t,e,n)}},{key:"methods",get:function(){var t=this;return{show:function(e,n,o){return t.show(e,n,o)},hide:function(){return t.hide()},onHover:function(e,n,o){return t.onHover(e,n,o)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="TooltipAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(8),n(24),n(59)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(13),p=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=p(i),r=p(r),a=p(a),s=p(s),l=p(l),c=p(c),u=h(u),d=p(d),f=p(f);var v=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"keydown",value:function(t){switch(this.beforeKeydownProcessing(t),t.keyCode){case u.keyCodes.BACKSPACE:this.backspace(t);break;case u.keyCodes.ENTER:this.enter(t);break;case u.keyCodes.DOWN:case u.keyCodes.RIGHT:this.arrowRightAndDown(t);break;case u.keyCodes.UP:case u.keyCodes.LEFT:this.arrowLeftAndUp(t);break;case u.keyCodes.DELETE:this.deletePressed(t);break;case u.keyCodes.TAB:this.tabPressed(t)}}},{key:"beforeKeydownProcessing",value:function(t){this.needToolbarClosing(t)&&u.isPrintableKey(t.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(t)))}},{key:"keyup",value:function(t){t.shiftKey||this.Editor.UI.checkEmptiness()}},{key:"deletePressed",value:function(t){var e,n=this.Editor,o=n.BlockManager,i=n.BlockSelection,r=n.Caret,a=o.currentBlock,s=this.Editor.Tools.available[a.name];if(a.selected||a.isEmpty&&a.currentInput===a.lastInput){t.preventDefault();var l=o.currentBlockIndex;return o.nextBlock&&0===o.nextBlock.inputs.length?o.removeBlock(l+1):o.removeBlock(),r.setToBlock(null!=(e=o.nextBlock)?e:o.currentBlock,l?r.positions.START:r.positions.END),this.Editor.Toolbar.close(),void i.clearSelection(t)}if(!s||!s[this.Editor.Tools.INTERNAL_SETTINGS.IS_ENABLED_LINE_BREAKS]||r.isAtEnd){var c=o.currentBlockIndex===o.blocks.length-1;r.isAtEnd&&d.default.isCollapsed&&a.currentInput===a.lastInput&&!c&&(t.preventDefault(),this.mergeBlocks(!0))}}},{key:"tabPressed",value:function(t){this.Editor.BlockSelection.clearSelection(t);var e=this.Editor,n=e.BlockManager,o=e.Tools,i=e.InlineToolbar,r=e.ConversionToolbar,a=n.currentBlock;if(a){var s=o.isDefault(a.tool)&&a.isEmpty,l=!a.isEmpty&&r.opened,c=!a.isEmpty&&!d.default.isCollapsed&&i.opened;s?this.activateToolbox():l||c||this.activateBlockSettings()}}},{key:"dragOver",value:function(t){this.Editor.BlockManager.getBlockByChildNode(t.target).dropTarget=!0}},{key:"dragLeave",value:function(t){this.Editor.BlockManager.getBlockByChildNode(t.target).dropTarget=!1}},{key:"handleCommandC",value:function(t){var e=this.Editor.BlockSelection;e.anyBlockSelected&&e.copySelectedBlocks(t)}},{key:"handleCommandX",value:function(t){var e=this.Editor,n=e.BlockSelection,o=e.BlockManager,i=e.Caret;if(n.anyBlockSelected){n.copySelectedBlocks(t);var r=o.removeSelectedBlocks();i.setToBlock(o.insertDefaultBlockAtIndex(r,!0),i.positions.START),n.clearSelection(t)}}},{key:"enter",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.Tools,i=e.UI,r=n.currentBlock,a=o.available[r.name];if(!(a&&a[o.INTERNAL_SETTINGS.IS_ENABLED_LINE_BREAKS]||i.someToolbarOpened&&i.someFlipperButtonFocused||t.shiftKey)){var s=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):s=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(s),this.Editor.Tools.isDefault(s.tool)&&s.isEmpty&&(this.Editor.Toolbar.open(!1),this.Editor.Toolbar.plusButton.show()),t.preventDefault()}}},{key:"backspace",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.BlockSelection,i=e.Caret,r=n.currentBlock,a=this.Editor.Tools.available[r.name];if(r.selected||r.isEmpty&&r.currentInput===r.firstInput){t.preventDefault();var s=n.currentBlockIndex;return n.previousBlock&&0===n.previousBlock.inputs.length?n.removeBlock(s-1):n.removeBlock(),i.setToBlock(n.currentBlock,s?i.positions.END:i.positions.START),this.Editor.Toolbar.close(),void o.clearSelection(t)}if(!a||!a[this.Editor.Tools.INTERNAL_SETTINGS.IS_ENABLED_LINE_BREAKS]||i.isAtStart){var l=0===n.currentBlockIndex;i.isAtStart&&d.default.isCollapsed&&r.currentInput===r.firstInput&&!l&&(t.preventDefault(),this.mergeBlocks())}}},{key:"mergeBlocks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor,n=e.BlockManager,o=e.Caret,i=e.Toolbar,r=t?n.currentBlock:n.previousBlock,a=t?n.nextBlock:n.currentBlock;if(a.name!==r.name||!r.mergeable)return 0===r.inputs.length||r.isEmpty?(n.removeBlock(n.currentBlockIndex-1),o.setToBlock(n.currentBlock),void i.close()):void((t?o.navigateNext():o.navigatePrevious())&&i.close());o.createShadow(r.pluginsContent),n.mergeBlocks(r,a).then((function(){o.restoreCaret(r.pluginsContent),r.pluginsContent.normalize(),i.close()}))}},{key:"arrowRightAndDown",value:function(t){var e=this,n=f.default.usedKeys.includes(t.keyCode)&&(!t.shiftKey||t.keyCode===u.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;t.shiftKey&&t.keyCode===u.keyCodes.DOWN&&o?this.Editor.CrossBlockSelection.toggleBlockSelectedState():((t.keyCode===u.keyCodes.DOWN||t.keyCode===u.keyCodes.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?t.preventDefault():u.delay((function(){e.Editor.BlockManager.currentBlock&&e.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(t))}}},{key:"arrowLeftAndUp",value:function(t){var e=this;if(this.Editor.UI.someToolbarOpened){if(f.default.usedKeys.includes(t.keyCode)&&(!t.shiftKey||t.keyCode===u.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;t.shiftKey&&t.keyCode===u.keyCodes.UP&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):((t.keyCode===u.keyCodes.UP||t.keyCode===u.keyCodes.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?t.preventDefault():u.delay((function(){e.Editor.BlockManager.currentBlock&&e.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(t))}},{key:"needToolbarClosing",value:function(t){var e=t.keyCode===u.keyCodes.ENTER&&this.Editor.Toolbox.opened,n=t.keyCode===u.keyCodes.ENTER&&this.Editor.BlockSettings.opened,o=t.keyCode===u.keyCodes.ENTER&&this.Editor.InlineToolbar.opened,i=t.keyCode===u.keyCodes.ENTER&&this.Editor.ConversionToolbar.opened,r=t.keyCode===u.keyCodes.TAB;return!(t.shiftKey||r||e||n||o||i)}},{key:"activateToolbox",value:function(){this.Editor.Toolbar.opened||(this.Editor.Toolbar.open(!1,!1),this.Editor.Toolbar.plusButton.show()),this.Editor.Toolbox.open()}},{key:"activateBlockSettings",value:function(){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.open(!0,!1),this.Editor.Toolbar.plusButton.hide()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}]),e}(c.default);o.default=v,v.displayName="BlockEvents",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(60),n(7),n(15),n(8),n(379)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p){"use strict";var v=n(13),g=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=g(i),r=g(r),a=g(a),s=g(s),l=g(l),c=g(c),u=v(u),d=g(d),f=g(f),h=v(h),p=g(p);var y=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments)))._currentBlockIndex=-1,t._blocks=null,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"prepare",value:function(){var t=this,e=new p.default(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:p.default.set,get:p.default.get}),this.Editor.Listeners.on(document,"copy",(function(e){return t.Editor.BlockEvents.handleCommandC(e)}))}},{key:"toggleReadOnly",value:function(t){t?this.disableModuleBindings():this.enableModuleBindings()}},{key:"composeBlock",value:function(t){var e=t.tool,n=t.data,o=void 0===n?{}:n,i=this.Editor.ReadOnly.isEnabled,r=this.Editor.Tools.getToolSettings(e),a=this.Editor.Tools.available[e],s=new u.default({name:e,data:o,Tool:a,settings:r,api:this.Editor.API,readOnly:i});return i||this.bindBlockEvents(s),s}},{key:"insert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.tool,n=void 0===e?this.config.defaultBlock:e,o=t.data,i=void 0===o?{}:o,r=t.index,a=t.needToFocus,s=void 0===a||a,l=t.replace,c=void 0!==l&&l,u=r;void 0===u&&(u=this.currentBlockIndex+(c?0:1));var d=this.composeBlock({tool:n,data:i});return this._blocks.insert(u,d,c),s?this.currentBlockIndex=u:u<=this.currentBlockIndex&&this.currentBlockIndex++,d}},{key:"replace",value:function(t){var e=t.tool,n=void 0===e?this.config.defaultBlock:e,o=t.data,i=void 0===o?{}:o;return this.insert({tool:n,data:i,index:this.currentBlockIndex,replace:!0})}},{key:"paste",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.insert({tool:t,replace:n});try{o.call(u.BlockToolAPI.ON_PASTE,e)}catch(e){h.log("".concat(t,": onPaste callback call is failed"),"error",e)}return o}},{key:"insertDefaultBlockAtIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[t]=n,e?this.currentBlockIndex=t:t<=this.currentBlockIndex&&this.currentBlockIndex++,n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:function(t,e){var n,o;return i.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=this._blocks.indexOf(e),!e.isEmpty){r.next=5;break}return this.removeBlock(n),this.currentBlockIndex=this._blocks.indexOf(t),r.abrupt("return");case 5:return r.next=7,i.default.awrap(e.data);case 7:if(o=r.sent,h.isEmpty(o)){r.next=11;break}return r.next=11,i.default.awrap(t.mergeWith(o));case 11:this.removeBlock(n),this.currentBlockIndex=this._blocks.indexOf(t);case 13:case"end":return r.stop()}}),null,this)}},{key:"removeBlock",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentBlockIndex;if(!this.validateIndex(t))throw new Error("Can't find a Block to remove");this._blocks.remove(t),this.currentBlockIndex>=t&&this.currentBlockIndex--,this.blocks.length?0===t&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,this.insert())}},{key:"removeFocusedBlocks",value:function(){for(var t,e=this.blocks.length-1;e>=0;e--)this.blocks[e].focused&&(this.removeBlock(e),t=e);return t}},{key:"removeSelectedBlocks",value:function(){for(var t,e=this.blocks.length-1;e>=0;e--)this.blocks[e].selected&&(this.removeBlock(e),t=e);return t}},{key:"removeAllBlocks",value:function(){for(var t=this.blocks.length-1;t>=0;t--)this._blocks.remove(t);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var t=this.Editor.Caret.extractFragmentFromCaretPosition(),e=f.default.make("div");e.appendChild(t);var n={text:f.default.isEmpty(e)?"":e.innerHTML};return this.insert({data:n})}},{key:"getBlockByIndex",value:function(t){return this._blocks[t]}},{key:"getBlock",value:function(t){f.default.isElement(t)||(t=t.parentNode);var e=this._blocks.nodes,n=t.closest(".".concat(u.default.CSS.wrapper)),o=e.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(t){t.focused=!1}))}},{key:"setCurrentBlockByChildNode",value:function(t){f.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(u.default.CSS.wrapper));if(e)return this.currentBlockIndex=this._blocks.nodes.indexOf(e),this.currentBlock.updateCurrentInput(),this.currentBlock;throw new Error("Can not find a Block from this child Node")}},{key:"getBlockByChildNode",value:function(t){f.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(u.default.CSS.wrapper));return this.blocks.find((function(t){return t.holder===e}))}},{key:"swap",value:function(t,e){this._blocks.swap(t,e),this.currentBlockIndex=e}},{key:"move",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.currentBlockIndex;isNaN(t)||isNaN(e)?h.log("Warning during 'move' call: incorrect indices provided.","warn"):this.validateIndex(t)&&this.validateIndex(e)?(this._blocks.move(t,e),this.currentBlockIndex=t):h.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 t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),t&&this.insert(),this.Editor.UI.checkEmptiness()}},{key:"destroy",value:function(){return i.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.default.awrap(Promise.all(this.blocks.map((function(t){if(h.isFunction(t.tool.destroy))return t.tool.destroy()}))));case 2:case"end":return t.stop()}}),null,this)}},{key:"bindBlockEvents",value:function(t){var e=this.Editor.BlockEvents;this.readOnlyMutableListeners.on(t.holder,"keydown",(function(t){e.keydown(t)}),!0),this.readOnlyMutableListeners.on(t.holder,"keyup",(function(t){e.keyup(t)})),this.readOnlyMutableListeners.on(t.holder,"dragover",(function(t){e.dragOver(t)})),this.readOnlyMutableListeners.on(t.holder,"dragleave",(function(t){e.dragLeave(t)}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"enableModuleBindings",value:function(){var t=this;this.readOnlyMutableListeners.on(document,"cut",(function(e){return t.Editor.BlockEvents.handleCommandX(e)})),this.blocks.forEach((function(e){t.bindBlockEvents(e)}))}},{key:"validateIndex",value:function(t){return!(t<0||t>=this._blocks.length)}},{key:"currentBlockIndex",get:function(){return this._currentBlockIndex},set:function(t){this._blocks[this._currentBlockIndex]&&this._blocks[this._currentBlockIndex].willUnselect(),this._blocks[t]&&this._blocks[t].willSelect(),this._currentBlockIndex=t}},{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]}},{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(t){return!!t.inputs.length}))}},{key:"previousContentfulBlock",get:function(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((function(t){return!!t.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(t){return t.isEmpty}))}}]),e}(d.default);o.default=y,y.displayName="BlockManager",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(7),n(8),n(15),n(24)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h){"use strict";var p=n(13),v=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=v(i),r=v(r),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),d=p(d),f=v(f),h=v(h);var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments))).anyBlockSelectedCache=null,t.needToSelectAll=!1,t.nativeInputSelected=!1,t.readyToBlockSelection=!1,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"prepare",value:function(){var t=this,e=this.Editor.Shortcuts;this.selection=new h.default,e.add({name:"CMD+A",handler:function(e){var n=t.Editor,o=n.BlockManager;if(n.ReadOnly.isEnabled)return e.preventDefault(),void t.selectAllBlocks();o.currentBlock&&t.handleCommandA(e)}})}},{key:"toggleReadOnly",value:function(t){h.default.get().removeAllRanges(),this.allBlocksSelected=!1}},{key:"unSelectBlockByIndex",value:function(t){var e=this.Editor.BlockManager;(isNaN(t)?e.currentBlock:e.getBlockByIndex(t)).selected=!1,this.clearCache()}},{key:"clearSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.Editor,o=n.BlockManager,i=n.Caret,r=n.RectangleSelection;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;var a=t&&t instanceof KeyboardEvent,s=a&&d.isPrintableKey(t.keyCode);if(this.anyBlockSelected&&a&&s&&!h.default.isSelectionExists){var l=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(l,!0),i.setToBlock(o.currentBlock),d.delay((function(){var e=t.key;i.insertContentAtCaretPosition(e.length>1?"":e)}),20)()}this.Editor.CrossBlockSelection.clear(t),this.anyBlockSelected&&!r.isRectActivated()?(e&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}},{key:"copySelectedBlocks",value:function(t){var e,n,o,r,a=this;return i.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return t.preventDefault(),e=f.default.make("div"),this.selectedBlocks.forEach((function(t){var n=a.Editor.Sanitizer.clean(t.holder.innerHTML,a.sanitizerConfig),o=f.default.make("p");o.innerHTML=n,e.appendChild(o)})),s.next=5,i.default.awrap(Promise.all(this.selectedBlocks.map((function(t){return t.save()}))));case 5:n=s.sent,o=Array.from(e.childNodes).map((function(t){return t.textContent})).join("\n\n"),r=e.innerHTML,t.clipboardData.setData("text/plain",o),t.clipboardData.setData("text/html",r),t.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(n));case 11:case"end":return s.stop()}}),null,this)}},{key:"selectBlockByIndex",value:function(t){var e,n=this.Editor.BlockManager;n.clearFocused(),e=isNaN(t)?n.currentBlock:n.getBlockByIndex(t),this.selection.save(),h.default.get().removeAllRanges(),e.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}},{key:"clearCache",value:function(){this.anyBlockSelectedCache=null}},{key:"destroy",value:function(){this.Editor.Shortcuts.remove("CMD+A")}},{key:"handleCommandA",value:function(t){if(this.Editor.RectangleSelection.clearSelection(),!f.default.isNativeInput(t.target)||this.readyToBlockSelection){var e=this.Editor.BlockManager.getBlock(t.target).inputs;e.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==e.length||this.needToSelectAll?this.needToSelectAll?(t.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(t.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()}},{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(t){return!0===t.selected}))},set:function(t){this.Editor.BlockManager.blocks.forEach((function(e){e.selected=t})),this.clearCache()}},{key:"anyBlockSelected",get:function(){var t=this.Editor.BlockManager;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=t.blocks.some((function(t){return!0===t.selected}))),this.anyBlockSelectedCache}},{key:"anyBlockFocused",get:function(){return this.Editor.BlockManager.blocks.some((function(t){return!0===t.focused}))}},{key:"selectedBlocks",get:function(){return this.Editor.BlockManager.blocks.filter((function(t){return t.selected}))}}]),e}(u.default);o.default=g,g.displayName="BlockSelection",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(24),n(7),n(15),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(13),p=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=p(i),r=p(r),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),d=p(d),f=h(f);var v=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"setToBlock",value:function(t){var e,n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.Editor.BlockManager;switch(o){case this.positions.START:e=t.firstInput;break;case this.positions.END:e=t.lastInput;break;default:e=t.currentInput}if(e){var a=d.default.getDeepestNode(e,o===this.positions.END),s=d.default.getContentLength(a);switch(!0){case o===this.positions.START:i=0;break;case o===this.positions.END:case i>s:i=s}f.delay((function(){n.set(a,i)}),20)(),r.setCurrentBlockByChildNode(t.holder),r.currentBlock.currentInput=e}}},{key:"setToInput",value:function(t){var e=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,i=d.default.getDeepestNode(t);switch(e){case this.positions.START:this.set(i,0);break;case this.positions.END:this.set(i,d.default.getContentLength(i));break;default:n&&this.set(i,n)}o.currentInput=t}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=c.default.setCursor(t,e),o=n.top,i=n.bottom,r=window,a=r.innerHeight;o<0&&window.scrollBy(0,o),i>a&&window.scrollBy(0,i-a)}},{key:"setToTheLastBlock",value:function(){var t=this.Editor.BlockManager.lastBlock;if(t)if(this.Editor.Tools.isDefault(t.tool)&&t.isEmpty)this.setToBlock(t);else{var e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}},{key:"extractFragmentFromCaretPosition",value:function(){var t=c.default.get();if(t.rangeCount){var e=t.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(e.deleteContents(),n){if(d.default.isNativeInput(n)){var o=n,i=document.createDocumentFragment(),r=o.value.substring(0,o.selectionStart),a=o.value.substring(o.selectionStart);return i.textContent=a,o.value=r,i}var s=e.cloneRange();return s.selectNodeContents(n),s.setStart(e.endContainer,e.endOffset),s.extractContents()}}}},{key:"navigateNext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor,n=e.BlockManager,o=e.Tools,i=n.currentBlock,r=n.nextContentfulBlock,a=i.nextInput,s=r;if(!s&&!a){if(o.isDefault(i.tool))return!1;s=n.insertAtEnd()}return!(!t&&!this.isAtEnd||(a?this.setToInput(a,this.positions.START):this.setToBlock(s,this.positions.START),0))}},{key:"navigatePrevious",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor.BlockManager,n=e.currentBlock,o=e.previousContentfulBlock;if(!n)return!1;var i=n.previousInput;return!(!o&&!i||!t&&!this.isAtStart||(i?this.setToInput(i,this.positions.END):this.setToBlock(o,this.positions.END),0))}},{key:"createShadow",value:function(t){var n=document.createElement("span");n.classList.add(e.CSS.shadowCaret),t.insertAdjacentElement("beforeend",n)}},{key:"restoreCaret",value:function(t){var n=t.querySelector(".".concat(e.CSS.shadowCaret));n&&((new c.default).expandToTag(n),setTimeout((function(){var t=document.createRange();t.selectNode(n),t.extractContents()}),50))}},{key:"insertContentAtCaretPosition",value:function(t){var e=document.createDocumentFragment(),n=document.createElement("div"),o=c.default.get(),i=c.default.range;n.innerHTML=t,Array.from(n.childNodes).forEach((function(t){return e.appendChild(t)})),0===e.childNodes.length&&e.appendChild(new Text(""));var r=e.lastChild;i.deleteContents(),i.insertNode(e);var a=document.createRange();a.setStart(r,r.textContent.length),o.removeAllRanges(),o.addRange(a)}},{key:"getHigherLevelSiblings",value:function(t,e){for(var n=t,o=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var i="left"===e?"previousSibling":"nextSibling";n[i];)n=n[i],o.push(n);return o}},{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"isAtStart",get:function(){var t=c.default.get(),e=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput),n=t.focusNode;if(d.default.isNativeInput(e))return 0===e.selectionEnd;if(!t.anchorNode)return!1;var o=n.textContent.search(/\S/);-1===o&&(o=0);var i=t.focusOffset;return n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[i]?(n=n.childNodes[i],i=0):i=(n=n.childNodes[i-1]).textContent.length),!(!d.default.isLineBreakTag(e)&&!d.default.isEmpty(e)||!this.getHigherLevelSiblings(n,"left").every((function(t){var e=d.default.isLineBreakTag(t),n=1===t.children.length&&d.default.isLineBreakTag(t.children[0]),o=e||n;return d.default.isEmpty(t)&&!o}))||i!==o)||(null===e||n===e&&i<=o)}},{key:"isAtEnd",get:function(){var t=c.default.get(),e=t.focusNode,n=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(d.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(!t.focusNode)return!1;var o=t.focusOffset;if(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length&&(e.childNodes[o-1]?o=(e=e.childNodes[o-1]).textContent.length:(e=e.childNodes[0],o=0)),d.default.isLineBreakTag(n)||d.default.isEmpty(n)){var i=this.getHigherLevelSiblings(e,"right");if(i.every((function(t,e){return e===i.length-1&&d.default.isLineBreakTag(t)||d.default.isEmpty(t)&&!d.default.isLineBreakTag(t)}))&&o===e.textContent.length)return!0}var r=n.textContent.replace(/\s+$/,"");return e===n&&o>=r.length}}],[{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),e}(u.default);o.default=v,v.displayName="Caret",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(7),n(24),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(13),p=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=p(i),r=p(r),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),d=p(d),f=h(f);var v=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments))).onMouseUp=function(){var e=t.Editor.Listeners;e.off(document,"mouseover",t.onMouseOver),e.off(document,"mouseup",t.onMouseUp)},t.onMouseOver=function(e){var n=t.Editor,o=n.BlockManager,i=n.BlockSelection,r=o.getBlockByChildNode(e.relatedTarget)||t.lastSelectedBlock,a=o.getBlockByChildNode(e.target);if(r&&a&&a!==r){if(r===t.firstSelectedBlock)return d.default.get().removeAllRanges(),r.selected=!0,a.selected=!0,void i.clearCache();if(a===t.firstSelectedBlock)return r.selected=!1,a.selected=!1,void i.clearCache();t.Editor.InlineToolbar.close(),t.toggleBlocksSelectedState(r,a),t.lastSelectedBlock=a}},t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"prepare",value:function(){var t=this;return i.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.Editor.Listeners.on(document,"mousedown",(function(e){t.enableCrossBlockSelection(e)}));case 2:case"end":return e.stop()}}),null,this)}},{key:"watchSelection",value:function(t){if(t.button===f.mouseButtons.LEFT){var e=this.Editor,n=e.BlockManager,o=e.Listeners;this.firstSelectedBlock=n.getBlock(t.target),this.lastSelectedBlock=this.firstSelectedBlock,o.on(document,"mouseover",this.onMouseOver),o.on(document,"mouseup",this.onMouseUp)}}},{key:"toggleBlockSelectedState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.Editor,n=e.BlockManager,o=e.BlockSelection;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=n.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),d.default.get().removeAllRanges());var i=n.blocks.indexOf(this.lastSelectedBlock)+(t?1:-1),r=n.blocks[i];r&&(this.lastSelectedBlock.selected!==r.selected?(r.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=r,this.Editor.InlineToolbar.close())}},{key:"clear",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.BlockSelection,i=e.Caret,r=n.blocks.indexOf(this.firstSelectedBlock),a=n.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&r>-1&&a>-1)if(t&&t instanceof KeyboardEvent)switch(t.keyCode){case f.keyCodes.DOWN:case f.keyCodes.RIGHT:i.setToBlock(n.blocks[Math.max(r,a)],i.positions.END);break;case f.keyCodes.UP:case f.keyCodes.LEFT:i.setToBlock(n.blocks[Math.min(r,a)],i.positions.START);break;default:i.setToBlock(n.blocks[Math.max(r,a)],i.positions.END)}else i.setToBlock(n.blocks[Math.max(r,a)],i.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}},{key:"enableCrossBlockSelection",value:function(t){var e=this.Editor.UI;d.default.isCollapsed||this.Editor.BlockSelection.clearSelection(t),e.nodes.redactor.contains(t.target)?this.watchSelection(t):this.Editor.BlockSelection.clearSelection(t)}},{key:"toggleBlocksSelectedState",value:function(t,e){for(var n=this.Editor,o=n.BlockManager,i=n.BlockSelection,r=o.blocks.indexOf(t),a=o.blocks.indexOf(e),s=t.selected!==e.selected,l=Math.min(r,a);l<=Math.max(r,a);l++){var c=o.blocks[l];c!==this.firstSelectedBlock&&c!==(s?t:e)&&(o.blocks[l].selected=!o.blocks[l].selected,i.clearCache())}}},{key:"isCrossBlockSelectionStarted",get:function(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}}]),e}(u.default);o.default=v,v.displayName="CrossBlockSelection",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(24),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=f(i),r=f(r),a=f(a),s=f(s),l=f(l),c=f(c),u=f(u);var h=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments))).isStartedAtEditor=!1,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"toggleReadOnly",value:function(t){t?this.disableModuleBindings():this.enableModuleBindings()}},{key:"enableModuleBindings",value:function(){var t=this,e=this.Editor.UI;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",(function(e){return i.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.default.awrap(t.processDrop(e));case 2:case"end":return n.stop()}}))}),!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",(function(){t.processDragStart()})),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",(function(e){t.processDragOver(e)}),!0)}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"processDrop",value:function(t){var e,n,o,r,a,s;return i.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:e=this.Editor,n=e.BlockManager,o=e.Caret,r=e.Paste,t.preventDefault(),n.blocks.forEach((function(t){t.dropTarget=!1})),u.default.isAtEditor&&!u.default.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;try{a=n.setCurrentBlockByChildNode(t.target),this.Editor.Caret.setToBlock(a,o.positions.END)}catch(t){s=n.setCurrentBlockByChildNode(n.lastBlock.holder),this.Editor.Caret.setToBlock(s,o.positions.END)}return l.next=8,i.default.awrap(r.processDataTransfer(t.dataTransfer,!0));case 8:case"end":return l.stop()}}),null,this)}},{key:"processDragStart",value:function(){u.default.isAtEditor&&!u.default.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}},{key:"processDragOver",value:function(t){t.preventDefault()}}]),e}((d=f(d)).default);o.default=h,h.displayName="DragNDrop",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).subscribers={},t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"on",value:function(t,e){t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push(e)}},{key:"once",value:function(t,e){var n=this;t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push((function o(i){var r=e(i),a=n.subscribers[t].indexOf(o);return-1!==a&&n.subscribers[t].splice(a,1),r}))}},{key:"emit",value:function(t,e){this.subscribers[t]&&this.subscribers[t].reduce((function(t,e){return e(t)||t}),e)}},{key:"off",value:function(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],i=u.generateId("l"),r={id:i,element:t,eventType:e,handler:n,options:o},a=this.findOne(t,e,n);if(!a)return this.allListeners.push(r),t.addEventListener(e,n,o),i}},{key:"off",value:function(t,e,n,o){var i=this,r=this.findAll(t,e,n);r.forEach((function(t,e){var n=i.allListeners.indexOf(r[e]);n>0&&(i.allListeners.splice(n,1),t.element.removeEventListener(t.eventType,t.handler,t.options))}))}},{key:"offById",value:function(t){var e=this.findById(t);e&&e.element.removeEventListener(e.eventType,e.handler,e.options)}},{key:"findOne",value:function(t,e,n){var o=this.findAll(t,e,n);return o.length>0?o[0]:null}},{key:"findAll",value:function(t,e,n){var o=t?this.findByEventTarget(t):[];return t&&e&&n?o.filter((function(t){return t.eventType===e&&t.handler===n})):t&&e?o.filter((function(t){return t.eventType===e})):o}},{key:"removeAll",value:function(){this.allListeners.map((function(t){t.element.removeEventListener(t.eventType,t.handler,t.options)})),this.allListeners=[]}},{key:"destroy",value:function(){this.removeAll()}},{key:"findByEventTarget",value:function(t){return this.allListeners.filter((function(e){if(e.element===t)return e}))}},{key:"findByType",value:function(t){return this.allListeners.filter((function(e){if(e.eventType===t)return e}))}},{key:"findByHandler",value:function(t){return this.allListeners.filter((function(e){if(e.handler===t)return e}))}},{key:"findById",value:function(t){return this.allListeners.find((function(e){return e.id===t}))}}]),e}(c.default);o.default=h,h.displayName="Listeners",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(8),n(60)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=f(u),d=h(d);var p=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).DebounceTimer=450,t.disabled=!1,t.mutationDebouncer=u.debounce((function(){t.updateNativeInputs(),u.isFunction(t.config.onChange)&&t.config.onChange(t.Editor.API.methods)}),t.DebounceTimer),t.nativeInputs=[],t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"destroy",value:function(){var t=this;this.mutationDebouncer=null,this.observer&&this.observer.disconnect(),this.observer=null,this.nativeInputs.forEach((function(e){return t.Editor.Listeners.off(e,"input",t.mutationDebouncer)})),this.mutationDebouncer=null}},{key:"toggleReadOnly",value:function(t){t?this.disableModule():this.enableModule()}},{key:"disable",value:function(){this.disabled=!0}},{key:"enable",value:function(){this.disabled=!1}},{key:"setObserver",value:function(){var t=this,e=this.Editor.UI;this.observer=new MutationObserver((function(e,n){t.mutationHandler(e,n)})),this.observer.observe(e.nodes.redactor,{childList:!0,attributes:!0,subtree:!0,characterData:!0,characterDataOldValue:!0})}},{key:"mutationHandler",value:function(t,e){if(!this.disabled){var n=!1;t.forEach((function(t){switch(t.type){case"childList":case"characterData":n=!0;break;case"attributes":t.target.classList.contains(d.default.CSS.wrapper)||(n=!0)}})),n&&this.mutationDebouncer()}}},{key:"updateNativeInputs",value:function(){var t=this;this.nativeInputs&&this.nativeInputs.forEach((function(e){t.Editor.Listeners.off(e,"input")})),this.nativeInputs=Array.from(this.Editor.UI.nodes.redactor.querySelectorAll("textarea, input, select")),this.nativeInputs.forEach((function(e){return t.Editor.Listeners.on(e,"input",t.mutationDebouncer)}))}},{key:"enableModule",value:function(){var t,e=this;(null===(t=null==this?void 0:this.config)||void 0===t?void 0:t.saverDebounce)&&(this.DebounceTimer=this.config.saverDebounce),window.setTimeout((function(){e.setObserver(),e.updateNativeInputs(),e.enable()}),1e3)}},{key:"disableModule",value:function(){this.disable()}}]),e}(c.default);o.default=p,p.displayName="ModificationsObserver",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(380)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c),u=d(u);var f=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t){u.default.show(t)}}]),e}(c.default);o.default=f,f.displayName="Notifier",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(65),n(21),n(38),n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p){"use strict";var v=n(13),g=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=g(i),r=g(r),a=g(a),s=g(s),l=g(l),c=g(c),u=g(u),d=g(d),f=g(f),h=g(h),p=v(p);var y=function(t){function e(){var t;return(0,s.default)(this,e),(t=(0,c.default)(this,(0,u.default)(e).apply(this,arguments))).MIME_TYPE="application/x-editor-js",t.toolsTags={},t.tagsByTool={},t.toolsPatterns=[],t.toolsFiles={},t.exceptionList=[],t.processTool=function(e){var n=(0,a.default)(e,2),o=n[0],i=n[1];try{var r=new t.Editor.Tools.blockTools[o]({api:t.Editor.API.getMethodsForTool(o),config:{},data:{},readOnly:!1});if(!1===i.pasteConfig)return void t.exceptionList.push(o);if("function"!=typeof r.onPaste)return;var s=i.pasteConfig||{};t.getTagsConfig(o,s),t.getFilesConfig(o,s),t.getPatternsConfig(o,s)}catch(t){p.log("Paste handling for «".concat(o,"» Tool hasn't been set up because of the error"),"warn",t)}},t.handlePasteEvent=function(e){var n,o,i;return r.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=t.Editor,o=n.BlockManager,i=n.Toolbar,o.currentBlock&&(!t.isNativeBehaviour(e.target)||e.clipboardData.types.includes("Files"))){r.next=3;break}return r.abrupt("return");case 3:if(!o.currentBlock||!t.exceptionList.includes(o.currentBlock.name)){r.next=5;break}return r.abrupt("return");case 5:e.preventDefault(),t.processDataTransfer(e.clipboardData),o.clearFocused(),i.close();case 9:case"end":return r.stop()}}))},t}return(0,d.default)(e,t),(0,l.default)(e,[{key:"prepare",value:function(){return r.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:this.processTools();case 1:case"end":return t.stop()}}),null,this)}},{key:"toggleReadOnly",value:function(t){t?this.unsetCallback():this.setCallback()}},{key:"processDataTransfer",value:function(t){var e,n,o,i,a,s,l,c,u,d=arguments;return r.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(e=d.length>1&&void 0!==d[1]&&d[1],n=this.Editor.Sanitizer,!((o=t.types).includes?o.includes("Files"):o.contains("Files"))){f.next=8;break}return f.next=7,r.default.awrap(this.processFiles(t.files));case 7:return f.abrupt("return");case 8:if(i=t.getData(this.MIME_TYPE),a=t.getData("text/plain"),s=t.getData("text/html"),!i){f.next=19;break}return f.prev=12,this.insertEditorJSData(JSON.parse(i)),f.abrupt("return");case 17:f.prev=17,f.t0=f.catch(12);case 19:if(e&&a.trim()&&s.trim()&&(s="

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

"),l=Object.keys(this.toolsTags).reduce((function(t,e){return t[e.toLowerCase()]=!0,t}),{}),c=Object.assign({},l,n.getAllInlineToolsConfig(),{br:{}}),(u=n.clean(s,c)).trim()&&u.trim()!==a&&h.default.isHTMLString(u)){f.next=28;break}return f.next=26,r.default.awrap(this.processText(a));case 26:f.next=30;break;case 28:return f.next=30,r.default.awrap(this.processText(u,!0));case 30:case"end":return f.stop()}}),null,this,[[12,17]])}},{key:"processText",value:function(t){var e,n,o,i,a,s,l,c,u=this,d=arguments;return r.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(e=d.length>1&&void 0!==d[1]&&d[1],n=this.Editor,o=n.Caret,i=n.BlockManager,a=n.Tools,(s=e?this.processHTML(t):this.processPlain(t)).length){f.next=5;break}return f.abrupt("return");case 5:if(1!==s.length){f.next=8;break}return s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop()),f.abrupt("return");case 8:l=i.currentBlock&&a.isDefault(i.currentBlock.tool),c=l&&i.currentBlock.isEmpty,s.map((function(t,e){return r.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",u.insertBlock(t,0===e&&c));case 1:case"end":return n.stop()}}))})),i.currentBlock&&o.setToBlock(i.currentBlock,o.positions.END);case 12:case"end":return f.stop()}}),null,this)}},{key:"setCallback",value:function(){this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"unsetCallback",value:function(){this.Editor.Listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var t=this.Editor.Tools.blockTools;Object.entries(t).forEach(this.processTool)}},{key:"getTagsConfig",value:function(t,e){var n=this,o=e.tags||[];o.forEach((function(e){Object.prototype.hasOwnProperty.call(n.toolsTags,e)?p.log("Paste handler for «".concat(t,"» Tool on «").concat(e,"» tag is skipped ")+"because it is already used by «".concat(n.toolsTags[e].tool,"» Tool."),"warn"):n.toolsTags[e.toUpperCase()]={tool:t}})),this.tagsByTool[t]=o.map((function(t){return t.toUpperCase()}))}},{key:"getFilesConfig",value:function(t,e){var n=e.files,o=void 0===n?{}:n,i=o.extensions,r=o.mimeTypes;(i||r)&&(i&&!Array.isArray(i)&&(p.log("«extensions» property of the onDrop config for «".concat(t,"» Tool should be an array")),i=[]),r&&!Array.isArray(r)&&(p.log("«mimeTypes» property of the onDrop config for «".concat(t,"» Tool should be an array")),r=[]),r&&(r=r.filter((function(e){return!!p.isValidMimeType(e)||(p.log("MIME type value «".concat(e,"» for the «").concat(t,"» Tool is not a valid MIME type"),"warn"),!1)}))),this.toolsFiles[t]={extensions:i||[],mimeTypes:r||[]})}},{key:"getPatternsConfig",value:function(t,e){var n=this;e.patterns&&!p.isEmpty(e.patterns)&&Object.entries(e.patterns).forEach((function(e){var o=(0,a.default)(e,2),i=o[0],r=o[1];r instanceof RegExp||p.log("Pattern ".concat(r," for «").concat(t,"» Tool is skipped because it should be a Regexp instance."),"warn"),n.toolsPatterns.push({key:i,pattern:r,tool:t})}))}},{key:"isNativeBehaviour",value:function(t){return h.default.isNativeInput(t)}},{key:"processFiles",value:function(t){var e,n,o,i,a,s,l=this;return r.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return e=this.Editor,n=e.BlockManager,o=e.Tools,c.next=3,r.default.awrap(Promise.all(Array.from(t).map((function(t){return l.processFile(t)}))));case 3:i=(i=c.sent).filter((function(t){return!!t})),a=o.isDefault(n.currentBlock.tool),s=a&&n.currentBlock.isEmpty,i.forEach((function(t,e){n.paste(t.type,t.event,0===e&&s)}));case 8:case"end":return c.stop()}}),null,this)}},{key:"processFile",value:function(t){var e,n,o,i,s;return r.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=p.getFileExtension(t),n=Object.entries(this.toolsFiles).find((function(n){var o=(0,a.default)(n,2),i=(o[0],o[1]),r=i.mimeTypes,s=i.extensions,l=t.type.split("/"),c=(0,a.default)(l,2),u=c[0],d=c[1],f=s.find((function(t){return t.toLowerCase()===e.toLowerCase()})),h=r.find((function(t){var e=t.split("/"),n=(0,a.default)(e,2),o=n[0],i=n[1];return o===u&&(i===d||"*"===i)}));return!!f||!!h}))){r.next=4;break}return r.abrupt("return");case 4:return o=(0,a.default)(n,1),i=o[0],s=this.composePasteEvent("file",{file:t}),r.abrupt("return",{event:s,type:i});case 7:case"end":return r.stop()}}),null,this)}},{key:"processHTML",value:function(t){var e=this,n=this.Editor,o=n.Tools,i=n.Sanitizer,r=this.config.defaultBlock,a=h.default.make("DIV");return a.innerHTML=t,this.getNodes(a).map((function(t){var n,a=r,s=!1;switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(n=h.default.make("div")).appendChild(t);break;case Node.ELEMENT_NODE:n=t,s=!0,e.toolsTags[n.tagName]&&(a=e.toolsTags[n.tagName].tool)}var l=o.blockTools[a].pasteConfig.tags.reduce((function(t,e){return t[e.toLowerCase()]={},t}),{}),c=Object.assign({},l,i.getInlineToolsConfig(a));return n.innerHTML=i.clean(n.innerHTML,c),{content:n,isBlock:s,tool:a,event:e.composePasteEvent("tag",{data:n})}})).filter((function(t){return!h.default.isNodeEmpty(t.content)||h.default.isSingleTag(t.content)}))}},{key:"processPlain",value:function(t){var e=this,n=this.config.defaultBlock;if(!t)return[];var o=n;return t.split(/\r?\n/).filter((function(t){return t.trim()})).map((function(t){var n=h.default.make("div");n.textContent=t;var i=e.composePasteEvent("tag",{data:n});return{content:n,tool:o,isBlock:!1,event:i}}))}},{key:"processSingleBlock",value:function(t){var e,n,o,i,a;return r.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=this.Editor,n=e.Caret,o=e.BlockManager,i=e.Tools,(a=o.currentBlock)&&t.tool===a.name&&h.default.containsOnlyInlineElements(t.content.innerHTML)){r.next=5;break}return this.insertBlock(t,a&&i.isDefault(a.tool)&&a.isEmpty),r.abrupt("return");case 5:n.insertContentAtCaretPosition(t.content.innerHTML);case 6:case"end":return r.stop()}}),null,this)}},{key:"processInlinePaste",value:function(t){var n,o,i,a,s,l,c,u,d,f;return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:if(n=this.Editor,o=n.BlockManager,i=n.Caret,a=n.Sanitizer,s=n.Tools,l=t.content,!(o.currentBlock&&s.isDefault(o.currentBlock.tool)&&l.textContent.length1&&void 0!==arguments[1]&&arguments[1],o=this.Editor,i=o.BlockManager,r=o.Caret,a=i.currentBlock;if(n&&a&&a.isEmpty)return e=i.paste(t.tool,t.event,!0),void r.setToBlock(e,r.positions.END);e=i.paste(t.tool,t.event),r.setToBlock(e,r.positions.END)}},{key:"insertEditorJSData",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.Tools;t.forEach((function(t,e){var i=t.tool,r=t.data,a=!1;0===e&&(a=n.currentBlock&&o.isDefault(n.currentBlock.tool)&&n.currentBlock.isEmpty),n.insert({tool:i,data:r,replace:a})}))}},{key:"processElementNode",value:function(t,e,n){var o=Object.keys(this.toolsTags),r=t,a=(this.toolsTags[r.tagName]||{}).tool,s=void 0===a?"":a,l=this.tagsByTool[s]||[],c=o.includes(r.tagName),u=h.default.blockElements.includes(r.tagName.toLowerCase()),d=Array.from(r.children).some((function(t){var e=t.tagName;return o.includes(e)&&!l.includes(e)})),f=Array.from(r.children).some((function(t){var e=t.tagName;return h.default.blockElements.includes(e.toLowerCase())}));return u||c||d?c&&!d||u&&!f&&!d?[].concat((0,i.default)(e),[n,r]):void 0:(n.appendChild(r),[].concat((0,i.default)(e),[n]))}},{key:"getNodes",value:function(t){var e,n=this;return Array.from(t.childNodes).reduce((function t(o,r){if(h.default.isEmpty(r)&&!h.default.isSingleTag(r))return o;var a=o[o.length-1],s=new DocumentFragment;switch(a&&h.default.isFragment(a)&&(s=o.pop()),r.nodeType){case Node.ELEMENT_NODE:if(e=n.processElementNode(r,o,s))return e;break;case Node.TEXT_NODE:return s.appendChild(r),[].concat((0,i.default)(o),[s]);default:return[].concat((0,i.default)(o),[s])}return[].concat((0,i.default)(o),(0,i.default)(Array.from(r.childNodes).reduce(t,[])))}),[])}},{key:"composePasteEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}}]),e}(f.default);o.default=y,y.displayName="Paste",y.PATTERN_PROCESSING_MAX_LENGTH=450,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(38),n(2),n(3),n(5),n(4),n(6),n(7),n(141)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u);var p=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,l.default)(this,(0,c.default)(e).apply(this,arguments))).toolsDontSupportReadOnly=[],t.readOnlyEnabled=!1,t}return(0,u.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){var t,e,n;return i.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:t=this.Editor.Tools,e=t.blockTools,n=[],Object.entries(e).forEach((function(e){var o=(0,r.default)(e,2),i=o[0],a=o[1];t.isReadOnlySupported(a)||n.push(i)})),this.toolsDontSupportReadOnly=n,this.config.readOnly&&n.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly);case 7:case"end":return o.stop()}}),null,this)}},{key:"toggle",value:function(){var t,e,n,o,r=arguments;return i.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:(t=r.length>0&&void 0!==r[0]?r[0]:!this.readOnlyEnabled)&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError(),e=this.readOnlyEnabled,this.readOnlyEnabled=t,a.t0=i.default.keys(this.Editor);case 5:if((a.t1=a.t0()).done){a.next=12;break}if(n=a.t1.value,this.Editor[n].toggleReadOnly){a.next=9;break}return a.abrupt("continue",5);case 9:this.Editor[n].toggleReadOnly(t),a.next=5;break;case 12:if(e!==t){a.next=14;break}return a.abrupt("return",this.readOnlyEnabled);case 14:return a.next=16,i.default.awrap(this.Editor.Saver.save());case 16:return o=a.sent,a.next=19,i.default.awrap(this.Editor.BlockManager.clear());case 19:return a.next=21,i.default.awrap(this.Editor.Renderer.render(o.blocks));case 21:return a.abrupt("return",this.readOnlyEnabled);case 22:case"end":return a.stop()}}),null,this)}},{key:"throwCriticalError",value:function(){throw new f.CriticalError("To enable read-only mode all connected tools should support it. Tools ".concat(this.toolsDontSupportReadOnly.join(", ")," don't support read-only mode."))}},{key:"isEnabled",get:function(){return this.readOnlyEnabled}}]),e}((d=h(d)).default);o.default=p,p.displayName="ReadOnly",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(24),n(60)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),d=h(d),f=h(f);var p=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).isRectSelectionActivated=!1,t.SCROLL_SPEED=3,t.HEIGHT_OF_SCROLL_ZONE=40,t.BOTTOM_SCROLL_ZONE=1,t.TOP_SCROLL_ZONE=2,t.MAIN_MOUSE_BUTTON=0,t.mousedown=!1,t.isScrolling=!1,t.inScrollZone=null,t.startX=0,t.startY=0,t.mouseX=0,t.mouseY=0,t.stackOfSelected=[],t.listenerIds=[],t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"prepare",value:function(){this.enableModuleBindings()}},{key:"startSelection",value:function(t,e){var n=document.elementFromPoint(t-window.pageXOffset,e-window.pageYOffset);n.closest(".".concat(this.Editor.Toolbar.CSS.toolbar))||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);var o=[".".concat(f.default.CSS.content),".".concat(this.Editor.Toolbar.CSS.toolbar),".".concat(this.Editor.InlineToolbar.CSS.inlineToolbar)],i=n.closest("."+this.Editor.UI.CSS.editorWrapper),r=o.some((function(t){return!!n.closest(t)}));i&&!r&&(this.mousedown=!0,this.startX=t,this.startY=e)}},{key:"endSelection",value:function(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}},{key:"isRectActivated",value:function(){return this.isRectSelectionActivated}},{key:"clearSelection",value:function(){this.isRectSelectionActivated=!1}},{key:"enableModuleBindings",value:function(){var t=this,e=this.Editor.Listeners,n=this.genHTML().container;e.on(n,"mousedown",(function(e){t.processMouseDown(e)}),!1),e.on(document.body,"mousemove",(function(e){t.processMouseMove(e)}),!1),e.on(document.body,"mouseleave",(function(){t.processMouseLeave()})),e.on(window,"scroll",(function(e){t.processScroll(e)}),!1),e.on(document.body,"mouseup",(function(){t.processMouseUp()}),!1)}},{key:"processMouseDown",value:function(t){t.button===this.MAIN_MOUSE_BUTTON&&this.startSelection(t.pageX,t.pageY)}},{key:"processMouseMove",value:function(t){this.changingRectangle(t),this.scrollByZones(t.clientY)}},{key:"processMouseLeave",value:function(){this.clearSelection(),this.endSelection()}},{key:"processScroll",value:function(t){this.changingRectangle(t)}},{key:"processMouseUp",value:function(){this.endSelection()}},{key:"scrollByZones",value:function(t){this.inScrollZone=null,t<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-t<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),this.inScrollZone?this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0):this.isScrolling=!1}},{key:"genHTML",value:function(){var t=this.Editor.UI,n=t.nodes.holder.querySelector("."+t.CSS.editorWrapper),o=u.default.make("div",e.CSS.overlay,{}),i=u.default.make("div",e.CSS.overlayContainer,{}),r=u.default.make("div",e.CSS.rect,{});return i.appendChild(r),o.appendChild(i),n.appendChild(o),this.overlayRectangle=r,{container:n,overlay:o}}},{key:"scrollVertical",value:function(t){var e=this;if(this.inScrollZone&&this.mousedown){var n=window.pageYOffset;window.scrollBy(0,t),this.mouseY+=window.pageYOffset-n,setTimeout((function(){e.scrollVertical(t)}),0)}}},{key:"changingRectangle",value:function(t){if(this.mousedown){void 0!==t.pageY&&(this.mouseX=t.pageX,this.mouseY=t.pageY);var e=this.genInfoForMouseSelection(),n=e.rightPos,o=e.leftPos,i=e.index,r=this.startX>n&&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 t,e=document.body.offsetWidth/2,n=this.mouseY-window.pageYOffset,o=document.elementFromPoint(e,n),i=this.Editor.BlockManager.getBlockByChildNode(o);void 0!==i&&(t=this.Editor.BlockManager.blocks.findIndex((function(t){return t.holder===i.holder})));var r=this.Editor.BlockManager.lastBlock.holder.querySelector("."+f.default.CSS.content),a=Number.parseInt(window.getComputedStyle(r).width,10)/2;return{index:t,leftPos:e-a,rightPos:e+a}}},{key:"addBlockInSelection",value:function(t){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(t),this.stackOfSelected.push(t)}},{key:"trySelectNextBlock",value:function(t){var e=this,n=this.stackOfSelected[this.stackOfSelected.length-1]===t,o=this.stackOfSelected.length;if(!n){var i=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0,r=0;o>1&&(r=i?1:-1);var a=t>this.stackOfSelected[o-1]&&1===r,s=tthis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){if(!l&&t=t;c--)this.addBlockInSelection(c);else if(l){var u,d=o-1;for(u=t>this.stackOfSelected[o-1]?function(){return t>e.stackOfSelected[d]}:function(){return t1&&void 0!==arguments[1]?arguments[1]:{},n={tags:e},o=this.createHTMLJanitorInstance(n);return o.clean(t)}},{key:"composeToolConfig",value:function(t){if(this.configCache[t])return this.configCache[t];var e=this.Editor.Tools.INTERNAL_SETTINGS.SANITIZE_CONFIG,n=this.Editor.Tools.available[t],o=this.getInlineToolsConfig(t);if(!n.sanitize||n[e]&&f.isEmpty(n[e]))return o;var i=n.sanitize,a={};for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var l=i[s];"object"===(0,r.default)(l)?a[s]=Object.assign({},o,l):a[s]=l}return this.configCache[t]=a,a}},{key:"getInlineToolsConfig",value:function(t){var e=this.Editor.Tools,n=e.getToolSettings(t).inlineToolbar||[],o={};return"boolean"==typeof n&&n?o=this.getAllInlineToolsConfig():n.map((function(t){o=Object.assign(o,e.inline[t][e.INTERNAL_SETTINGS.SANITIZE_CONFIG])})),o.br=!0,o.wbr=!0,o}},{key:"getAllInlineToolsConfig",value:function(){var t=this.Editor.Tools;if(this.inlineToolsConfigCache)return this.inlineToolsConfigCache;var e={};return Object.entries(t.inline).forEach((function(n){var o=(0,i.default)(n,2)[1];Object.assign(e,o[t.INTERNAL_SETTINGS.SANITIZE_CONFIG])})),this.inlineToolsConfigCache=e,this.inlineToolsConfigCache}},{key:"cleanArray",value:function(t,e){var n=this;return t.map((function(t){return n.deepSanitize(t,e)}))}},{key:"cleanObject",value:function(t,e){var n={};for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=t[o],r=this.isRule(e[o])?e[o]:e;n[o]=this.deepSanitize(i,r)}return n}},{key:"cleanOneItem",value:function(t,e){return"object"===(0,r.default)(e)?this.clean(t,e):!1===e?this.clean(t,{}):t}},{key:"isRule",value:function(t){return"object"===(0,r.default)(t)||"boolean"==typeof t||f.isFunction(t)}},{key:"createHTMLJanitorInstance",value:function(t){return t?new h.default(t):null}}]),e}(d.default);o.default=g,g.displayName="Sanitizer",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(7),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),d=f(d);var p=function(t){function e(){return(0,r.default)(this,e),(0,s.default)(this,(0,l.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,a.default)(e,[{key:"save",value:function(){var t,e,n,o,r,a,s,l,c=this;return i.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return t=this.Editor,e=t.BlockManager,n=t.Sanitizer,o=t.ModificationsObserver,r=e.blocks,a=[],o.disable(),u.prev=3,r.forEach((function(t){a.push(c.getSavedData(t))})),u.next=7,i.default.awrap(Promise.all(a));case 7:return s=u.sent,u.next=10,i.default.awrap(n.sanitizeBlocks(s));case 10:return l=u.sent,u.abrupt("return",this.makeOutput(l));case 12:return u.prev=12,o.enable(),u.finish(12);case 15:case"end":return u.stop()}}),null,this,[[3,,12,15]])}},{key:"getSavedData",value:function(t){var e,n;return i.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,i.default.awrap(t.save());case 2:if(e=o.sent,o.t0=e,!o.t0){o.next=8;break}return o.next=7,i.default.awrap(t.validate(e.data));case 7:o.t0=o.sent;case 8:return n=o.t0,o.abrupt("return",Object.assign(Object.assign({},e),{isValid:n}));case 10:case"end":return o.stop()}}))}},{key:"makeOutput",value:function(t){var e=this,n=0,o=[];return d.log("[Editor.js saving]:","groupCollapsed"),t.forEach((function(t){var i=t.tool,r=t.data,a=t.time,s=t.isValid;if(n+=a,d.log("".concat(i.charAt(0).toUpperCase()+i.slice(1)),"group"),!s)return d.log("Block «".concat(i,"» skipped because saved data is invalid")),void d.log(void 0,"groupEnd");d.log(r),d.log(void 0,"groupEnd"),i!==e.Editor.Tools.stubTool?o.push({type:i,data:r}):o.push(r)})),d.log("Total","log",n),d.log(void 0,"groupEnd"),{time:+new Date,blocks:o,version:"2.19.0"}}}]),e}(u.default);o.default=p,p.displayName="Saver",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(382),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c);var f=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).registeredShortcuts=[],t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"add",value:function(t){var e=new c.default({name:t.name,on:document,callback:t.handler});this.registeredShortcuts.push(e)}},{key:"remove",value:function(t){var e=this.registeredShortcuts.findIndex((function(e){return e.name===t}));-1!==e&&this.registeredShortcuts[e]&&(this.registeredShortcuts[e].remove(),this.registeredShortcuts.splice(e,1))}}]),e}((u=d(u)).default);o.default=f,f.displayName="Shortcuts",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(59),n(8),n(24)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h){"use strict";var p=n(13),v=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=v(i),r=v(r),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),d=v(d),f=p(f),h=v(h);var g=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).buttons=[],t.flipper=null,t.selection=new h.default,t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"make",value:function(){this.nodes.wrapper=u.default.make("div",this.CSS.wrapper),this.nodes.toolSettings=u.default.make("div",this.CSS.toolSettings),this.nodes.defaultSettings=u.default.make("div",this.CSS.defaultSettings),u.default.append(this.nodes.wrapper,[this.nodes.toolSettings,this.nodes.defaultSettings]),this.enableFlipper()}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:"open",value:function(){this.nodes.wrapper.classList.add(this.CSS.wrapperOpened),this.selection.save(),this.Editor.BlockManager.currentBlock.selected=!0,this.Editor.BlockSelection.clearCache(),this.addToolSettings(),this.addDefaultSettings(),this.Editor.Events.emit(this.events.opened),this.flipper.activate(this.blockTunesButtons)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.wrapperOpened),h.default.isAtEditor||this.selection.restore(),this.selection.clearSaved(),this.nodes.toolSettings.innerHTML="",this.nodes.defaultSettings.innerHTML="",this.Editor.Events.emit(this.events.closed),this.buttons=[],this.flipper.deactivate()}},{key:"addToolSettings",value:function(){f.isFunction(this.Editor.BlockManager.currentBlock.tool.renderSettings)&&u.default.append(this.nodes.toolSettings,this.Editor.BlockManager.currentBlock.tool.renderSettings())}},{key:"addDefaultSettings",value:function(){u.default.append(this.nodes.defaultSettings,this.Editor.BlockManager.currentBlock.renderTunes())}},{key:"enableFlipper",value:function(){var t=this;this.flipper=new d.default({focusedItemClass:this.CSS.focusedButton,activateCallback:function(e){e&&u.default.canSetCaret(e)?t.close():f.delay((function(){t.Editor.Caret.setToBlock(t.Editor.BlockManager.currentBlock)}),50)()}})}},{key:"events",get:function(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}},{key:"CSS",get:function(){return{wrapper:"ce-settings",wrapperOpened:"ce-settings--opened",toolSettings:"ce-settings__plugin-zone",defaultSettings:"ce-settings__default-zone",button:"ce-settings__button",focusedButton:"ce-settings__button--focused",focusedButtonAnimated:"ce-settings__button--focused-animated"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(this.CSS.wrapperOpened)}},{key:"blockTunesButtons",get:function(){var t=this,e=this.Editor.StylesAPI;if(0!==this.buttons.length)return this.buttons;var n=this.nodes.toolSettings.querySelectorAll(".".concat(e.classes.settingsButton,", ").concat(u.default.allInputsSelector)),o=this.nodes.defaultSettings.querySelectorAll(".".concat(this.CSS.button));return n.forEach((function(e){t.buttons.push(e)})),o.forEach((function(e){t.buttons.push(e)})),this.buttons}}]),e}(c.default);o.default=g,g.displayName="BlockSettings",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(21),n(65),n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8),n(59),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v,g,y){"use strict";var b=n(13),k=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=k(i),r=k(r),a=k(a),s=k(s),l=k(l),c=k(c),u=k(u),d=k(d),f=k(f),h=k(h),p=b(p),v=k(v),g=k(g);var m=function(t){function e(){var t;return(0,s.default)(this,e),(t=(0,c.default)(this,(0,u.default)(e).apply(this,arguments))).opened=!1,t.tools={},t.flipper=null,t.togglingCallback=null,t}return(0,d.default)(e,t),(0,l.default)(e,[{key:"make",value:function(){this.nodes.wrapper=h.default.make("div",[e.CSS.conversionToolbarWrapper].concat((0,a.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.tools=h.default.make("div",e.CSS.conversionToolbarTools);var t=h.default.make("div",e.CSS.conversionToolbarLabel,{textContent:g.default.ui(y.I18nInternalNS.ui.inlineToolbar.converter,"Convert to")});return this.addTools(),this.enableFlipper(),h.default.append(this.nodes.wrapper,t),h.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(t){this.opened?this.close():this.open(),p.isFunction(t)&&(this.togglingCallback=t)}},{key:"open",value:function(){var t=this;this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(e.CSS.conversionToolbarShowed),setTimeout((function(){t.flipper.activate(Object.values(t.tools).filter((function(t){return!t.classList.contains(e.CSS.conversionToolHidden)}))),t.flipper.focusFirst(),p.isFunction(t.togglingCallback)&&t.togglingCallback(!0)}),50)}},{key:"close",value:function(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(e.CSS.conversionToolbarShowed),p.isFunction(this.togglingCallback)&&this.togglingCallback(!1)}},{key:"hasTools",value:function(){var t=Object.keys(this.tools);return!(1===t.length&&t.shift()===this.config.defaultBlock)}},{key:"replaceWithBlock",value:function(t){var e,n,o,i,a,s,l,c,u,d,f,h=this;return r.default.async((function(v){for(;;)switch(v.prev=v.next){case 0:return e=this.Editor.BlockManager.currentBlock.class,n=this.Editor.BlockManager.currentBlock.name,v.next=4,r.default.awrap(this.Editor.BlockManager.currentBlock.save());case 4:if(o=v.sent,i=this.Editor.Tools.INTERNAL_SETTINGS,a=o.data,n===t&&(t=this.config.defaultBlock),s=this.Editor.Tools.toolsClasses[t],l="",c=e[i.CONVERSION_CONFIG].export,!p.isFunction(c)){v.next=15;break}l=c(a),v.next=21;break;case 15:if("string"!=typeof c){v.next=19;break}l=a[c],v.next=21;break;case 19:return p.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."),v.abrupt("return");case 21:if(u=this.Editor.Sanitizer.clean(l,s.sanitize),d={},f=s[i.CONVERSION_CONFIG].import,!p.isFunction(f)){v.next=28;break}d=f(u),v.next=34;break;case 28:if("string"!=typeof f){v.next=32;break}d[f]=u,v.next=34;break;case 32:return p.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."),v.abrupt("return");case 34:this.Editor.BlockManager.replace({tool:t,data:d}),this.Editor.BlockSelection.clearSelection(),this.close(),this.Editor.InlineToolbar.close(),p.delay((function(){h.Editor.Caret.setToBlock(h.Editor.BlockManager.currentBlock)}),10)();case 39:case"end":return v.stop()}}),null,this)}},{key:"addTools",value:function(){var t=this.Editor.Tools.blockTools;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=this.Editor.Tools.INTERNAL_SETTINGS,o=t[e],i=o[n.TOOLBOX],r=o[n.CONVERSION_CONFIG],a=this.Editor.Tools.USER_SETTINGS,s=this.Editor.Tools.getToolSettings(e)[a.TOOLBOX],l=null!=s?s:i;!p.isEmpty(l)&&l.icon&&r&&r.import&&this.addTool(e,l.icon,l.title)}}},{key:"addTool",value:function(t,n,o){var i=this,a=h.default.make("div",[e.CSS.conversionTool]),s=h.default.make("div",[e.CSS.conversionToolIcon]);a.dataset.tool=t,s.innerHTML=n,h.default.append(a,s),h.default.append(a,h.default.text(g.default.t(y.I18nInternalNS.toolNames,o||p.capitalize(t)))),h.default.append(this.nodes.tools,a),this.tools[t]=a,this.Editor.Listeners.on(a,"click",(function(){return r.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.awrap(i.replaceWithBlock(t));case 2:case"end":return e.stop()}}))}))}},{key:"filterTools",value:function(){var t=this.Editor.BlockManager.currentBlock;Object.entries(this.tools).forEach((function(n){var o=(0,i.default)(n,2),r=o[0],a=o[1];a.hidden=!1,a.classList.toggle(e.CSS.conversionToolHidden,r===t.name)}))}},{key:"enableFlipper",value:function(){this.flipper=new v.default({focusedItemClass:e.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",conversionToolHidden:"ce-conversion-tool--hidden",conversionToolIcon:"ce-conversion-tool__icon",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}}]),e}(f.default);o.default=m,m.displayName="ConversionToolbar",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(65),n(38),n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(24),n(8),n(59),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v,g,y){"use strict";var b=n(13),k=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=k(i),r=k(r),a=k(a),s=k(s),l=k(l),c=k(c),u=k(u),d=k(d),f=k(f),h=k(h),p=b(p),v=k(v),g=k(g);var m=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,l.default)(this,(0,c.default)(e).apply(this,arguments))).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",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=5,t.buttonsList=null,t.width=0,t.flipper=null,t}return(0,u.default)(e,t),(0,s.default)(e,[{key:"toggleReadOnly",value:function(t){t?(this.destroy(),this.Editor.ConversionToolbar.destroy()):this.make()}},{key:"tryToShow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.allowedToShow()?(this.move(),this.open(),this.Editor.Toolbar.close()):t&&this.close()}},{key:"move",value:function(){var t=h.default.rect,e=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:t.x-e.left,y:t.y+t.height-e.top+this.toolbarVerticalMargin};t.width&&(n.x+=Math.floor(t.width/2));var o=n.x-this.width/2,i=n.x+this.width/2;this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarLeftOriented,othis.Editor.UI.contentRect.right),this.nodes.wrapper.style.left=Math.floor(n.x)+"px",this.nodes.wrapper.style.top=Math.floor(n.y)+"px"}},{key:"close",value:function(){this.opened&&(this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),this.toolsInstances.forEach((function(t){p.isFunction(t.clear)&&t.clear()})),this.opened=!1,this.flipper.deactivate(),this.Editor.ConversionToolbar.close()))}},{key:"open",value:function(){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,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(t){return!t.hidden})),this.flipper.activate(t)}}},{key:"containsNode",value:function(t){return this.nodes.wrapper.contains(t)}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:"getInlineToolbarSettings",value:function(t){var e=this,n=this.Editor.Tools.getToolSettings(t)[this.Editor.Tools.USER_SETTINGS.ENABLED_INLINE_TOOLS];if(!0!==n&&!Array.isArray(n))return!1;if(Array.isArray(n))return n;var o=this.config.inlineToolbar;return Array.isArray(o)?o:!0===o&&Object.entries(this.Editor.Tools.available).filter((function(t){var n=(0,r.default)(t,2);return n[0],n[1][e.Editor.Tools.INTERNAL_SETTINGS.IS_INLINE]})).map((function(t){var e=(0,r.default)(t,2),n=e[0];return e[1],n}))}},{key:"make",value:function(){var t=this;this.nodes.wrapper=f.default.make("div",[this.CSS.inlineToolbar].concat((0,i.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.togglerAndButtonsWrapper=f.default.make("div",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=f.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=f.default.make("div",this.CSS.actionsWrapper),this.Editor.Listeners.on(this.nodes.wrapper,"mousedown",(function(e){e.target.closest(".".concat(t.CSS.actionsWrapper))||e.preventDefault()})),f.default.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),f.default.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),this.recalculateWidth(),this.enableFlipper()}},{key:"allowedToShow",value:function(){var t=h.default.get(),e=h.default.text;if(!t||!t.anchorNode)return!1;if(t.isCollapsed||e.length<1)return!1;var n=f.default.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(t&&["IMG","INPUT"].includes(n.tagName))return!1;if(null===n.closest('[contenteditable="true"]'))return!1;var o=this.Editor.BlockManager.getBlock(t.anchorNode);return!!o&&!1!==this.getInlineToolbarSettings(o.name)}},{key:"recalculateWidth",value:function(){this.width=this.nodes.wrapper.offsetWidth}},{key:"addConversionToggler",value:function(){var t=this;this.nodes.conversionToggler=f.default.make("div",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=f.default.make("div",this.CSS.conversionTogglerContent);var e=f.default.svg("toggler-down",13,13);this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(e),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.Editor.Listeners.on(this.nodes.conversionToggler,"click",(function(){t.Editor.ConversionToolbar.toggle((function(e){!e&&t.opened?t.flipper.activate():t.opened&&t.flipper.deactivate()}))})),this.Editor.Tooltip.onHover(this.nodes.conversionToggler,g.default.ui(y.I18nInternalNS.ui.inlineToolbar.converter,"Convert to"),{placement:"top",hidingDelay:100})}},{key:"setConversionTogglerContent",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Tools,o=e.currentBlock.name,i=n.available[o][n.INTERNAL_SETTINGS.CONVERSION_CONFIG]||{},r=i&&i.export;this.nodes.conversionToggler.hidden=!r,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!r);var a=n.getToolSettings(o),s=n.available[o][n.INTERNAL_SETTINGS.TOOLBOX]||{},l=a.toolbox||{};this.nodes.conversionTogglerContent.innerHTML=l.icon||s.icon||l.title||s.title||p.capitalize(o)}},{key:"prepareConversionToolbar",value:function(){var t=this.Editor.ConversionToolbar.make();f.default.append(this.nodes.wrapper,t)}},{key:"addToolsFiltered",value:function(){var t=this,e=h.default.get(),n=this.Editor.BlockManager.getBlock(e.anchorNode);this.nodes.buttons.innerHTML="",this.nodes.actions.innerHTML="",this.toolsInstances=new Map,this.getInlineToolbarSettings(n.name).forEach((function(e){var n=t.Editor.Tools.getToolSettings(e),o=t.Editor.Tools.constructInline(t.Editor.Tools.inline[e],e,n);t.addTool(e,o),o.checkState(h.default.get())})),this.recalculateWidth()}},{key:"addTool",value:function(t,e){var n=this,o=this.Editor,i=o.Listeners,a=o.Tools,s=o.Tooltip,l=e.render();if(l){if(l.dataset.tool=t,this.nodes.buttons.appendChild(l),this.toolsInstances.set(t,e),p.isFunction(e.renderActions)){var c=e.renderActions();this.nodes.actions.appendChild(c)}i.on(l,"click",(function(t){n.toolClicked(e),t.preventDefault()}));var u=a.getToolSettings(t),d=null;Object.entries(a.internalTools).filter((function(t){var e=(0,r.default)(t,2)[1];return p.isFunction(e)?e[a.INTERNAL_SETTINGS.IS_INLINE]:e.class[a.INTERNAL_SETTINGS.IS_INLINE]})).map((function(t){return(0,r.default)(t,1)[0]})).includes(t)?d=this.inlineTools[t][a.INTERNAL_SETTINGS.SHORTCUT]:u&&u[a.USER_SETTINGS.SHORTCUT]?d=u[a.USER_SETTINGS.SHORTCUT]:e.shortcut&&(d=e.shortcut),d&&this.enableShortcuts(e,d);var h=f.default.make("div"),v=g.default.t(y.I18nInternalNS.toolNames,a.toolsClasses[t][a.INTERNAL_SETTINGS.TITLE]||p.capitalize(t));h.appendChild(f.default.text(v)),d&&h.appendChild(f.default.make("div",this.CSS.inlineToolbarShortcut,{textContent:p.beautifyShortcut(d)})),s.onHover(l,h,{placement:"top",hidingDelay:100})}else p.log("Render method must return an instance of Node","warn",t)}},{key:"enableShortcuts",value:function(t,e){var n=this;this.Editor.Shortcuts.add({name:e,handler:function(e){var o=n.Editor.BlockManager.currentBlock;if(o){var i=n.Editor.Tools.getToolSettings(o.name);i&&i[n.Editor.Tools.USER_SETTINGS.ENABLED_INLINE_TOOLS]&&(e.preventDefault(),n.toolClicked(t))}}})}},{key:"toolClicked",value:function(t){var e=h.default.range;t.surround(e),this.checkToolsState()}},{key:"checkToolsState",value:function(){this.toolsInstances.forEach((function(t){t.checkState(h.default.get())}))}},{key:"enableFlipper",value:function(){this.flipper=new v.default({focusedItemClass:this.CSS.focusedButton,allowArrows:!1})}},{key:"inlineTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)if(Object.prototype.hasOwnProperty.call(this.Editor.Tools.inline,e)){var n=this.Editor.Tools.getToolSettings(e);t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e],e,n)}return t}}]),e}(d.default);o.default=m,m.displayName="InlineToolbar",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8),n(59),n(60),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v){"use strict";var g=n(13),y=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=y(i),r=y(r),a=y(a),s=y(s),l=y(l),c=y(c),u=y(u),d=g(d),f=y(f),p=y(p);var b=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={toolbox:null,buttons:[]},t.opened=!1,t.displayedToolsCount=0,t.flipper=null,t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"make",value:function(){this.nodes.toolbox=u.default.make("div",this.CSS.toolbox),this.addTools(),this.enableFlipper()}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes(),this.removeAllShortcuts()}},{key:"toolButtonActivate",value:function(t,e){var n=this.Editor.Tools.toolsClasses[e];this.insertNewBlock(n,e)}},{key:"open",value:function(){this.isEmpty||(this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolbarHolderModifier),this.nodes.toolbox.classList.add(this.CSS.toolboxOpened),this.opened=!0,this.flipper.activate())}},{key:"close",value:function(){this.nodes.toolbox.classList.remove(this.CSS.toolboxOpened),this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolbarHolderModifier),this.opened=!1,this.flipper.deactivate()}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"addTools",value:function(){var t=this.Editor.Tools.available;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&this.addTool(e,t[e])}},{key:"addTool",value:function(t,e){var n=this,o=this.Editor.Tools.INTERNAL_SETTINGS,i=this.Editor.Tools.USER_SETTINGS,r=e[o.TOOLBOX];if(!d.isEmpty(r))if(!r||r.icon){var a=this.Editor.Tools.getToolSettings(t)[i.TOOLBOX];if(!1!==(null!=a?a:r)){var s=u.default.make("li",[this.CSS.toolboxButton]);s.dataset.tool=t,s.innerHTML=a&&a.icon||r.icon,u.default.append(this.nodes.toolbox,s),this.nodes.toolbox.appendChild(s),this.nodes.buttons.push(s),this.Editor.Listeners.on(s,"click",(function(e){n.toolButtonActivate(e,t)}));var l=this.drawTooltip(t);this.Editor.Tooltip.onHover(s,l,{placement:"bottom",hidingDelay:200});var c=this.getToolShortcut(t,e);c&&this.enableShortcut(e,t,c),this.displayedToolsCount++}}else d.log("Toolbar icon is missed. Tool %o skipped","warn",t)}},{key:"getToolShortcut",value:function(t,e){var n=this.Editor.Tools.getToolSettings(t),o=e[this.Editor.Tools.INTERNAL_SETTINGS.SHORTCUT];return(n?n[this.Editor.Tools.USER_SETTINGS.SHORTCUT]:null)||o}},{key:"drawTooltip",value:function(t){var e=this.Editor.Tools.available[t],n=this.Editor.Tools.getToolSettings(t),o=this.Editor.Tools.available[t][this.Editor.Tools.INTERNAL_SETTINGS.TOOLBOX]||{},i=n.toolbox||{},r=p.default.t(v.I18nInternalNS.toolNames,i.title||o.title||t),a=this.getToolShortcut(t,e),s=u.default.make("div",this.CSS.buttonTooltip),l=document.createTextNode(d.capitalize(r));return s.appendChild(l),a&&(a=d.beautifyShortcut(a),s.appendChild(u.default.make("div",this.CSS.buttonShortcut,{textContent:a}))),s}},{key:"enableShortcut",value:function(t,e,n){var o=this;this.Editor.Shortcuts.add({name:n,handler:function(n){n.preventDefault(),o.insertNewBlock(t,e)}})}},{key:"removeAllShortcuts",value:function(){var t=this.Editor.Tools.available;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=this.getToolShortcut(e,t[e]);n&&this.Editor.Shortcuts.remove(n)}}},{key:"enableFlipper",value:function(){var t=Array.from(this.nodes.toolbox.childNodes);this.flipper=new f.default({items:t,focusedItemClass:this.CSS.toolboxButtonActive})}},{key:"insertNewBlock",value:function(t,e){var n=this.Editor,o=n.BlockManager,i=n.Caret,r=o.currentBlock,a=o.insert({tool:e,replace:r.isEmpty});a.call(h.BlockToolAPI.APPEND_CALLBACK),this.Editor.Caret.setToBlock(a),0===a.inputs.length&&(a===o.lastBlock?(o.insertAtEnd(),i.setToBlock(o.lastBlock)):i.setToBlock(o.nextBlock)),this.Editor.Toolbar.close()}},{key:"CSS",get:function(){return{toolbox:"ce-toolbox",toolboxButton:"ce-toolbox__button",toolboxButtonActive:"ce-toolbox__button--active",toolboxOpened:"ce-toolbox--opened",openedToolbarHolderModifier:"codex-editor--toolbox-opened",buttonTooltip:"ce-toolbox-button-tooltip",buttonShortcut:"ce-toolbox-button-tooltip__shortcut"}}},{key:"isEmpty",get:function(){return 0===this.displayedToolsCount}}]),e}(c.default);o.default=b,b.displayName="Toolbox",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(383)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c),u=d(u);var f=function(t){function e(t){var n,o=t.config;return(0,i.default)(this,e),(n=(0,a.default)(this,(0,s.default)(e).call(this,{config:o}))).lib=new u.default,n}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t,e,n){this.lib.show(t,e,n)}},{key:"hide",value:function(){this.lib.hide()}},{key:"onHover",value:function(t,e,n){this.lib.onHover(t,e,n)}}]),e}(c.default);o.default=f,f.displayName="Tooltip",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(65),n(21),n(2),n(3),n(5),n(4),n(6),n(384),n(7),n(15),n(8),n(24),n(60),n(59)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v,g,y,b){"use strict";var k=n(13),m=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=m(i),r=m(r),a=m(a),s=m(s),l=m(l),c=m(c),u=m(u),d=m(d),f=m(f),h=m(h),p=m(p),v=k(v),g=m(g),y=m(y),b=m(b);var x=function(t){function e(){var t;return(0,s.default)(this,e),(t=(0,c.default)(this,(0,u.default)(e).apply(this,arguments))).isMobile=!1,t.contentRectCache=void 0,t.resizeDebouncer=v.debounce((function(){t.windowResize()}),200),t}return(0,d.default)(e,t),(0,l.default)(e,[{key:"addLoader",value:function(){this.nodes.loader=p.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:function(){return a.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:this.checkIsMobile(),this.make(),this.addLoader(),this.appendSVGSprite(),this.loadStyles();case 5:case"end":return t.stop()}}),null,this)}},{key:"toggleReadOnly",value:function(t){t?this.disableModuleBindings():this.enableModuleBindings()}},{key:"checkEmptiness",value:function(){var t=this.Editor.BlockManager;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,t.isEditorEmpty)}},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"closeAllToolbars",value:function(){var t=this.Editor,e=t.Toolbox,n=t.BlockSettings,o=t.InlineToolbar,i=t.ConversionToolbar;n.close(),o.close(),i.close(),e.close()}},{key:"checkIsMobile",value:function(){this.isMobile=window.innerWidth<650}},{key:"make",value:function(){this.nodes.holder=p.default.getHolder(this.config.holder),this.nodes.wrapper=p.default.make("div",[this.CSS.editorWrapper].concat((0,r.default)(this.isRtl?[this.CSS.editorRtlFix]:[]))),this.nodes.redactor=p.default.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth=0);if(o.anyBlockSelected&&!g.default.isSelectionExists)return o.clearSelection(t),t.preventDefault(),t.stopImmediatePropagation(),void t.stopPropagation();if(!this.someToolbarOpened&&i&&"BODY"===t.target.tagName){var r=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(r),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.move(),this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection(t)}},{key:"documentClicked",value:function(t){if(t.isTrusted){var e=t.target;this.nodes.holder.contains(e)||g.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.InlineToolbar.close(),this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close()),this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted||this.Editor.BlockSelection.clearSelection(t)}}},{key:"documentTouched",value:function(t){var e=t.target;if(e===this.nodes.redactor){var n=t instanceof MouseEvent?t.clientX:t.touches[0].clientX,o=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;e=document.elementFromPoint(n,o)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(e),this.Editor.BlockManager.highlightCurrentNode()}catch(t){this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.open(),this.Editor.Toolbar.plusButton.hide()}},{key:"redactorClicked",value:function(t){if(g.default.isCollapsed){var e=function(){t.stopImmediatePropagation(),t.stopPropagation()},n=t.target,o=t.metaKey||t.ctrlKey;if(p.default.isAnchor(n)&&o){e();var i=n.getAttribute("href"),r=v.getValidUrl(i);v.openTab(r)}else this.Editor.BlockManager.currentBlock||(e(),this.Editor.BlockManager.insert()),this.Editor.Tools.isDefault(this.Editor.BlockManager.currentBlock.tool)&&(e(),this.Editor.BlockManager.currentBlock.isEmpty&&this.Editor.Toolbar.plusButton.show())}}},{key:"selectionChanged",value:function(t){var e=this.Editor,n=e.CrossBlockSelection,o=e.BlockSelection,i=g.default.anchorElement;n.isCrossBlockSelectionStarted&&o.anyBlockSelected&&g.default.get().removeAllRanges(),i&&i.closest(".".concat(y.default.CSS.content))?this.Editor.InlineToolbar.tryToShow(!0):this.Editor.InlineToolbar.containsNode(i)||this.Editor.InlineToolbar.close()}},{key:"appendSVGSprite",value:function(){var t=p.default.make("div");t.hidden=!0,t.style.display="none",t.innerHTML=f.default,p.default.append(this.nodes.wrapper,t)}},{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 t=this.nodes.wrapper.querySelector(".".concat(y.default.CSS.content));return t?(this.contentRectCache=t.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}},{key:"someToolbarOpened",get:function(){var t=this.Editor,e=t.Toolbox,n=t.BlockSettings,o=t.InlineToolbar,i=t.ConversionToolbar;return n.opened||o.opened||i.opened||e.opened}},{key:"someFlipperButtonFocused",get:function(){return Object.entries(this.Editor).filter((function(t){var e=(0,i.default)(t,2);return e[0],e[1].flipper instanceof b.default})).some((function(t){var e=(0,i.default)(t,2);return e[0],e[1].flipper.currentItem}))}}]),e}(h.default);o.default=x,x.displayName="UI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){n(181),t.exports=n(353)},function(t,e,n){n(182)},function(t,e,n){"use strict";n(183),n(326),n(328),n(331),n(333),n(335),n(337),n(339),n(341),n(343),n(345),n(347),n(349),n(139)},function(t,e,n){n(184),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(265),n(266),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(102),n(289),n(128),n(290),n(129),n(291),n(292),n(293),n(294),n(130),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),t.exports=n(17)},function(t,e,n){"use strict";var o=n(9),i=n(25),r=n(18),a=n(0),s=n(22),l=n(40).KEY,c=n(10),u=n(67),d=n(52),f=n(42),h=n(14),p=n(83),v=n(109),g=n(186),y=n(70),b=n(11),k=n(12),m=n(20),x=n(27),S=n(39),w=n(41),E=n(46),T=n(112),B=n(32),C=n(69),_=n(19),O=n(44),I=B.f,N=_.f,M=T.f,L=o.Symbol,A=o.JSON,P=A&&A.stringify,R=h("_hidden"),j=h("toPrimitive"),D={}.propertyIsEnumerable,F=u("symbol-registry"),H=u("symbols"),U=u("op-symbols"),z=Object.prototype,G="function"==typeof L&&!!C.f,W=o.QObject,Y=!W||!W.prototype||!W.prototype.findChild,X=r&&c((function(){return 7!=E(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a}))?function(t,e,n){var o=I(z,e);o&&delete z[e],N(t,e,n),o&&t!==z&&N(z,e,o)}:N,V=function(t){var e=H[t]=E(L.prototype);return e._k=t,e},K=G&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},Z=function(t,e,n){return t===z&&Z(U,e,n),b(t),e=S(e,!0),b(n),i(H,e)?(n.enumerable?(i(t,R)&&t[R][e]&&(t[R][e]=!1),n=E(n,{enumerable:w(0,!1)})):(i(t,R)||N(t,R,w(1,{})),t[R][e]=!0),X(t,e,n)):N(t,e,n)},q=function(t,e){b(t);for(var n,o=g(e=x(e)),i=0,r=o.length;r>i;)Z(t,n=o[i++],e[n]);return t},J=function(t){var e=D.call(this,t=S(t,!0));return!(this===z&&i(H,t)&&!i(U,t))&&(!(e||!i(this,t)||!i(H,t)||i(this,R)&&this[R][t])||e)},$=function(t,e){if(t=x(t),e=S(e,!0),t!==z||!i(H,e)||i(U,e)){var n=I(t,e);return!n||!i(H,e)||i(t,R)&&t[R][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=M(x(t)),o=[],r=0;n.length>r;)i(H,e=n[r++])||e==R||e==l||o.push(e);return o},tt=function(t){for(var e,n=t===z,o=M(n?U:x(t)),r=[],a=0;o.length>a;)!i(H,e=o[a++])||n&&!i(z,e)||r.push(H[e]);return r};G||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(U,n),i(this,R)&&i(this[R],t)&&(this[R][t]=!1),X(this,t,w(1,n))};return r&&Y&&X(z,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",(function(){return this._k})),B.f=$,_.f=Z,n(47).f=T.f=Q,n(62).f=J,C.f=tt,r&&!n(43)&&s(z,"propertyIsEnumerable",J,!0),p.f=function(t){return V(h(t))}),a(a.G+a.W+a.F*!G,{Symbol:L});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var ot=O(h.store),it=0;ot.length>it;)v(ot[it++]);a(a.S+a.F*!G,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=L(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!G,"Object",{create:function(t,e){return void 0===e?E(t):q(E(t),e)},defineProperty:Z,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var rt=c((function(){C.f(1)}));a(a.S+a.F*rt,"Object",{getOwnPropertySymbols:function(t){return C.f(m(t))}}),A&&a(a.S+a.F*(!G||c((function(){var t=L();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e=o[1],(k(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),o[1]=e,P.apply(A,o)}}),L.prototype[j]||n(26)(L.prototype,j,L.prototype.valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(o.JSON,"JSON",!0)},function(t,e,n){t.exports=n(67)("native-function-to-string",Function.toString)},function(t,e,n){var o=n(44),i=n(69),r=n(62);t.exports=function(t){var e=o(t),n=i.f;if(n)for(var a,s=n(t),l=r.f,c=0;s.length>c;)l.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var o=n(0);o(o.S,"Object",{create:n(46)})},function(t,e,n){var o=n(0);o(o.S+o.F*!n(18),"Object",{defineProperty:n(19).f})},function(t,e,n){var o=n(0);o(o.S+o.F*!n(18),"Object",{defineProperties:n(111)})},function(t,e,n){var o=n(27),i=n(32).f;n(33)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(o(t),e)}}))},function(t,e,n){var o=n(20),i=n(48);n(33)("getPrototypeOf",(function(){return function(t){return i(o(t))}}))},function(t,e,n){var o=n(20),i=n(44);n(33)("keys",(function(){return function(t){return i(o(t))}}))},function(t,e,n){n(33)("getOwnPropertyNames",(function(){return n(112).f}))},function(t,e,n){var o=n(12),i=n(40).onFreeze;n(33)("freeze",(function(t){return function(e){return t&&o(e)?t(i(e)):e}}))},function(t,e,n){var o=n(12),i=n(40).onFreeze;n(33)("seal",(function(t){return function(e){return t&&o(e)?t(i(e)):e}}))},function(t,e,n){var o=n(12),i=n(40).onFreeze;n(33)("preventExtensions",(function(t){return function(e){return t&&o(e)?t(i(e)):e}}))},function(t,e,n){var o=n(12);n(33)("isFrozen",(function(t){return function(e){return!o(e)||!!t&&t(e)}}))},function(t,e,n){var o=n(12);n(33)("isSealed",(function(t){return function(e){return!o(e)||!!t&&t(e)}}))},function(t,e,n){var o=n(12);n(33)("isExtensible",(function(t){return function(e){return!!o(e)&&(!t||t(e))}}))},function(t,e,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(113)})},function(t,e,n){var o=n(0);o(o.S,"Object",{is:n(114)})},function(t,e,n){var o=n(0);o(o.S,"Object",{setPrototypeOf:n(87).set})},function(t,e,n){"use strict";var o=n(63),i={};i[n(14)("toStringTag")]="z",i+""!="[object z]"&&n(22)(Object.prototype,"toString",(function(){return"[object "+o(this)+"]"}),!0)},function(t,e,n){var o=n(0);o(o.P,"Function",{bind:n(115)})},function(t,e,n){var o=n(19).f,i=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in i||n(18)&&o(i,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var o=n(12),i=n(48),r=n(14)("hasInstance"),a=Function.prototype;r in a||n(19).f(a,r,{value:function(t){if("function"!=typeof this||!o(t))return!1;if(!o(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var o=n(0),i=n(117);o(o.G+o.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var o=n(0),i=n(118);o(o.G+o.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var o=n(9),i=n(25),r=n(35),a=n(89),s=n(39),l=n(10),c=n(47).f,u=n(32).f,d=n(19).f,f=n(53).trim,h=o.Number,p=h,v=h.prototype,g="Number"==r(n(46)(v)),y="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,o,i,r=(e=y?e.trim():f(e,3)).charCodeAt(0);if(43===r||45===r){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===r){switch(e.charCodeAt(1)){case 66:case 98:o=2,i=49;break;case 79:case 111:o=8,i=55;break;default:return+e}for(var a,l=e.slice(2),c=0,u=l.length;ci)return NaN;return parseInt(l,o)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(g?l((function(){v.valueOf.call(n)})):"Number"!=r(n))?a(new p(b(e)),n,h):b(e)};for(var k,m=n(18)?c(p):"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;m.length>x;x++)i(p,k=m[x])&&!i(h,k)&&d(h,k,u(p,k));h.prototype=v,v.constructor=h,n(22)(o,"Number",h)}},function(t,e,n){"use strict";var o=n(0),i=n(31),r=n(119),a=n(90),s=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",d=function(t,e){for(var n=-1,o=e;++n<6;)o+=t*c[n],c[n]=o%1e7,o=l(o/1e7)},f=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=l(n/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/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(10)((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,o,s,l=r(this,u),c=i(t),v="",g="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=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(l*p(2,69,1))-69)<0?l*p(2,-e,1):l/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(d(0,n),o=c;o>=7;)d(1e7,0),o-=7;for(d(p(10,o,1),0),o=e-1;o>=23;)f(1<<23),o-=23;f(1<0?v+((s=g.length)<=c?"0."+a.call("0",c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c)):v+g}})},function(t,e,n){"use strict";var o=n(0),i=n(10),r=n(119),a=1..toPrecision;o(o.P+o.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=r(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var o=n(0);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var o=n(0),i=n(9).isFinite;o(o.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var o=n(0);o(o.S,"Number",{isInteger:n(120)})},function(t,e,n){var o=n(0);o(o.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var o=n(0),i=n(120),r=Math.abs;o(o.S,"Number",{isSafeInteger:function(t){return i(t)&&r(t)<=9007199254740991}})},function(t,e,n){var o=n(0);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var o=n(0);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var o=n(0),i=n(118);o(o.S+o.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var o=n(0),i=n(117);o(o.S+o.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var o=n(0),i=n(121),r=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(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+r(t-1)*r(t+1))}})},function(t,e,n){var o=n(0),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var o=n(0),i=Math.atanh;o(o.S+o.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var o=n(0),i=n(91);o(o.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var o=n(0);o(o.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var o=n(0),i=Math.exp;o(o.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var o=n(0),i=n(92);o(o.S+o.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var o=n(0);o(o.S,"Math",{fround:n(229)})},function(t,e,n){var o=n(91),i=Math.pow,r=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),l=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),c=o(t);return is||n!=n?c*(1/0):c*n}},function(t,e,n){var o=n(0),i=Math.abs;o(o.S,"Math",{hypot:function(t,e){for(var n,o,r=0,a=0,s=arguments.length,l=0;a0?(o=n/l)*o:n;return l===1/0?1/0:l*Math.sqrt(r)}})},function(t,e,n){var o=n(0),i=Math.imul;o(o.S+o.F*n(10)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=+t,o=+e,i=65535&n,r=65535&o;return 0|i*r+((65535&n>>>16)*r+i*(65535&o>>>16)<<16>>>0)}})},function(t,e,n){var o=n(0);o(o.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var o=n(0);o(o.S,"Math",{log1p:n(121)})},function(t,e,n){var o=n(0);o(o.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var o=n(0);o(o.S,"Math",{sign:n(91)})},function(t,e,n){var o=n(0),i=n(92),r=Math.exp;o(o.S+o.F*n(10)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(r(t-1)-r(-t-1))*(Math.E/2)}})},function(t,e,n){var o=n(0),i=n(92),r=Math.exp;o(o.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(r(t)+r(-t))}})},function(t,e,n){var o=n(0);o(o.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var o=n(0),i=n(45),r=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],o=arguments.length,a=0;o>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?r(e):r(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var o=n(0),i=n(27),r=n(16);o(o.S,"String",{raw:function(t){for(var e=i(t.raw),n=r(e.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=o(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var o=n(0),i=n(93)(!1);o(o.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var o=n(0),i=n(16),r=n(95),a="".endsWith;o(o.P+o.F*n(97)("endsWith"),"String",{endsWith:function(t){var e=r(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=i(e.length),s=void 0===n?o:Math.min(i(n),o),l=String(t);return a?a.call(e,l,s):e.slice(s-l.length,s)===l}})},function(t,e,n){"use strict";var o=n(0),i=n(95);o(o.P+o.F*n(97)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var o=n(0);o(o.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var o=n(0),i=n(16),r=n(95),a="".startsWith;o(o.P+o.F*n(97)("startsWith"),"String",{startsWith:function(t){var e=r(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),o=String(t);return a?a.call(e,o,n):e.slice(n,n+o.length)===o}})},function(t,e,n){"use strict";n(23)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(23)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(23)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(23)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(23)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(23)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(23)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(23)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(23)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(23)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(23)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(23)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(23)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var o=n(0);o(o.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var o=n(0),i=n(20),r=n(39);o(o.P+o.F*n(10)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=r(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var o=n(0),i=n(264);o(o.P+o.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var o=n(10),i=Date.prototype.getTime,r=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=o((function(){return"0385-07-25T07:06:39.999Z"!=r.call(new Date(-5e13-1))}))||!o((function(){r.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),o=e<0?"-":e>9999?"+":"";return o+("00000"+Math.abs(e)).slice(o?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:r},function(t,e,n){var o=Date.prototype,i=o.toString,r=o.getTime;new Date(NaN)+""!="Invalid Date"&&n(22)(o,"toString",(function(){var t=r.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,e,n){var o=n(14)("toPrimitive"),i=Date.prototype;o in i||n(26)(i,o,n(267))},function(t,e,n){"use strict";var o=n(11),i=n(39);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(o(this),"number"!=t)}},function(t,e,n){var o=n(0);o(o.S,"Array",{isArray:n(70)})},function(t,e,n){"use strict";var o=n(29),i=n(0),r=n(20),a=n(123),s=n(98),l=n(16),c=n(99),u=n(100);i(i.S+i.F*!n(71)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,d,f=r(t),h="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,b=u(f);if(g&&(v=o(v,p>2?arguments[2]:void 0,2)),null==b||h==Array&&s(b))for(n=new h(e=l(f.length));e>y;y++)c(n,y,g?v(f[y],y):f[y]);else for(d=b.call(f),n=new h;!(i=d.next()).done;y++)c(n,y,g?a(d,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){"use strict";var o=n(0),i=n(99);o(o.S+o.F*n(10)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var o=n(0),i=n(27),r=[].join;o(o.P+o.F*(n(61)!=Object||!n(28)(r)),"Array",{join:function(t){return r.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var o=n(0),i=n(86),r=n(35),a=n(45),s=n(16),l=[].slice;o(o.P+o.F*n(10)((function(){i&&l.call(i)})),"Array",{slice:function(t,e){var n=s(this.length),o=r(this);if(e=void 0===e?n:e,"Array"==o)return l.call(this,t,e);for(var i=a(t,n),c=a(e,n),u=s(c-i),d=new Array(u),f=0;f1&&(o=Math.min(o,r(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}})},function(t,e,n){var o=n(0);o(o.P,"Array",{copyWithin:n(126)}),n(49)("copyWithin")},function(t,e,n){var o=n(0);o(o.P,"Array",{fill:n(101)}),n(49)("fill")},function(t,e,n){"use strict";var o=n(0),i=n(34)(5),r=!0;"find"in[]&&Array(1).find((function(){r=!1})),o(o.P+o.F*r,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(49)("find")},function(t,e,n){"use strict";var o=n(0),i=n(34)(6),r="findIndex",a=!0;r in[]&&Array(1)[r]((function(){a=!1})),o(o.P+o.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(49)(r)},function(t,e,n){n(55)("Array")},function(t,e,n){var o=n(9),i=n(89),r=n(19).f,a=n(47).f,s=n(96),l=n(72),c=o.RegExp,u=c,d=c.prototype,f=/a/g,h=/a/g,p=new c(f)!==f;if(n(18)&&(!p||n(10)((function(){return h[n(14)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")})))){c=function(t,e){var n=this instanceof c,o=s(t),r=void 0===e;return!n&&o&&t.constructor===c&&r?t:i(p?new u(o&&!r?t.source:t,e):u((o=t instanceof c)?t.source:t,o&&r?l.call(t):e),n?this:d,c)};for(var v=function(t){t in c||r(c,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},g=a(u),y=0;g.length>y;)v(g[y++]);d.constructor=c,c.prototype=d,n(22)(o,"RegExp",c)}n(55)("RegExp")},function(t,e,n){"use strict";n(129);var o=n(11),i=n(72),r=n(18),a=/./.toString,s=function(t){n(22)(RegExp.prototype,"toString",t,!0)};n(10)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=o(this);return"/".concat(t.source,"/","flags"in t?t.flags:!r&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";var o=n(11),i=n(16),r=n(104),a=n(73);n(74)("match",1,(function(t,e,n,s){return[function(n){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o):new RegExp(n)[e](String(o))},function(t){var e=s(n,t,this);if(e.done)return e.value;var l=o(t),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var d,f=[],h=0;null!==(d=a(l,c));){var p=String(d[0]);f[h]=p,""===p&&(l.lastIndex=r(c,i(l.lastIndex),u)),h++}return 0===h?null:f}]}))},function(t,e,n){"use strict";var o=n(11),i=n(20),r=n(16),a=n(31),s=n(104),l=n(73),c=Math.max,u=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(74)("replace",2,(function(t,e,n,p){return[function(o,i){var r=t(this),a=null==o?void 0:o[e];return void 0!==a?a.call(o,r,i):n.call(String(r),o,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var d=o(t),f=String(this),h="function"==typeof e;h||(e=String(e));var g=d.global;if(g){var y=d.unicode;d.lastIndex=0}for(var b=[];;){var k=l(d,f);if(null===k)break;if(b.push(k),!g)break;""===String(k[0])&&(d.lastIndex=s(f,r(d.lastIndex),y))}for(var m,x="",S=0,w=0;w=S&&(x+=f.slice(S,T)+I,S=T+E.length)}return x+f.slice(S)}];function v(t,e,o,r,a,s){var l=o+t.length,c=r.length,u=h;return void 0!==a&&(a=i(a),u=f),n.call(s,u,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,o);case"'":return e.slice(l);case"<":s=a[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>c){var f=d(u/10);return 0===f?n:f<=c?void 0===r[f-1]?i.charAt(1):r[f-1]+i.charAt(1):n}s=r[u-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var o=n(11),i=n(114),r=n(73);n(74)("search",1,(function(t,e,n,a){return[function(n){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o):new RegExp(n)[e](String(o))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=o(t),l=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var u=r(s,l);return i(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},function(t,e,n){"use strict";var o=n(96),i=n(11),r=n(64),a=n(104),s=n(16),l=n(73),c=n(103),u=n(10),d=Math.min,f=[].push,h=!u((function(){RegExp(4294967295,"y")}));n(74)("split",2,(function(t,e,n,u){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!o(t))return n.call(i,t,e);for(var r,a,s,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,h=void 0===e?4294967295:e>>>0,p=new RegExp(t.source,u+"g");(r=c.call(p,i))&&!((a=p.lastIndex)>d&&(l.push(i.slice(d,r.index)),r.length>1&&r.index=h));)p.lastIndex===r.index&&p.lastIndex++;return d===i.length?!s&&p.test("")||l.push(""):l.push(i.slice(d)),l.length>h?l.slice(0,h):l}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,o){var i=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i,o):p.call(String(i),n,o)},function(t,e){var o=u(p,t,this,e,p!==n);if(o.done)return o.value;var c=i(t),f=String(this),v=r(c,RegExp),g=c.unicode,y=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(h?"y":"g"),b=new v(h?c:"^(?:"+c.source+")",y),k=void 0===e?4294967295:e>>>0;if(0===k)return[];if(0===f.length)return null===l(b,f)?[f]:[];for(var m=0,x=0,S=[];x0?arguments[0]:void 0)}}),{get:function(t){var e=o.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return o.def(i(this,"Map"),0===t?0:t,e)}},o,!0)},function(t,e,n){"use strict";var o=n(133),i=n(50);t.exports=n(77)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return o.def(i(this,"Set"),t=0===t?0:t,t)}},o)},function(t,e,n){"use strict";var o,i=n(9),r=n(34)(0),a=n(22),s=n(40),l=n(113),c=n(134),u=n(12),d=n(50),f=n(50),h=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,v=Object.isExtensible,g=c.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(t){if(u(t)){var e=p(t);return!0===e?g(d(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(d(this,"WeakMap"),t,e)}},k=t.exports=n(77)("WeakMap",y,b,c,!0,!0);f&&h&&(l((o=c.getConstructor(y,"WeakMap")).prototype,b),s.NEED=!0,r(["delete","has","get","set"],(function(t){var e=k.prototype,n=e[t];a(e,t,(function(e,i){if(u(e)&&!v(e)){this._f||(this._f=new o);var r=this._f[t](e,i);return"set"==t?this:r}return n.call(this,e,i)}))})))},function(t,e,n){"use strict";var o=n(134),i=n(50);n(77)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return o.def(i(this,"WeakSet"),t,!0)}},o,!1,!0)},function(t,e,n){"use strict";var o=n(0),i=n(78),r=n(106),a=n(11),s=n(45),l=n(16),c=n(12),u=n(9).ArrayBuffer,d=n(64),f=r.ArrayBuffer,h=r.DataView,p=i.ABV&&u.isView,v=f.prototype.slice,g=i.VIEW;o(o.G+o.W+o.F*(u!==f),{ArrayBuffer:f}),o(o.S+o.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||c(t)&&g in t}}),o(o.P+o.U+o.F*n(10)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,o=s(t,n),i=s(void 0===e?n:e,n),r=new(d(this,f))(l(i-o)),c=new h(this),u=new h(r),p=0;o=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),o(o.S,"Reflect",{enumerate:function(t){return new r(t)}})},function(t,e,n){var o=n(32),i=n(48),r=n(25),a=n(0),s=n(12),l=n(11);a(a.S,"Reflect",{get:function t(e,n){var a,c,u=arguments.length<3?e:arguments[2];return l(e)===u?e[n]:(a=o.f(e,n))?r(a,"value")?a.value:void 0!==a.get?a.get.call(u):void 0:s(c=i(e))?t(c,n,u):void 0}})},function(t,e,n){var o=n(32),i=n(0),r=n(11);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return o.f(r(t),e)}})},function(t,e,n){var o=n(0),i=n(48),r=n(11);o(o.S,"Reflect",{getPrototypeOf:function(t){return i(r(t))}})},function(t,e,n){var o=n(0);o(o.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var o=n(0),i=n(11),r=Object.isExtensible;o(o.S,"Reflect",{isExtensible:function(t){return i(t),!r||r(t)}})},function(t,e,n){var o=n(0);o(o.S,"Reflect",{ownKeys:n(136)})},function(t,e,n){var o=n(0),i=n(11),r=Object.preventExtensions;o(o.S,"Reflect",{preventExtensions:function(t){i(t);try{return r&&r(t),!0}catch(t){return!1}}})},function(t,e,n){var o=n(19),i=n(32),r=n(48),a=n(25),s=n(0),l=n(41),c=n(11),u=n(12);s(s.S,"Reflect",{set:function t(e,n,s){var d,f,h=arguments.length<4?e:arguments[3],p=i.f(c(e),n);if(!p){if(u(f=r(e)))return t(f,n,s,h);p=l(0)}if(a(p,"value")){if(!1===p.writable||!u(h))return!1;if(d=i.f(h,n)){if(d.get||d.set||!1===d.writable)return!1;d.value=s,o.f(h,n,d)}else o.f(h,n,l(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},function(t,e,n){var o=n(0),i=n(87);i&&o(o.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(327),t.exports=n(17).Array.includes},function(t,e,n){"use strict";var o=n(0),i=n(68)(!0);o(o.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(49)("includes")},function(t,e,n){n(329),t.exports=n(17).Array.flatMap},function(t,e,n){"use strict";var o=n(0),i=n(330),r=n(20),a=n(16),s=n(30),l=n(124);o(o.P,"Array",{flatMap:function(t){var e,n,o=r(this);return s(t),e=a(o.length),n=l(o,0),i(n,o,o,e,0,1,t,arguments[1]),n}}),n(49)("flatMap")},function(t,e,n){"use strict";var o=n(70),i=n(12),r=n(16),a=n(29),s=n(14)("isConcatSpreadable");t.exports=function t(e,n,l,c,u,d,f,h){for(var p,v,g=u,y=0,b=!!f&&a(f,h,3);y0)g=t(e,n,p,r(p.length),g,d-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=p}g++}y++}return g}},function(t,e,n){n(332),t.exports=n(17).String.padStart},function(t,e,n){"use strict";var o=n(0),i=n(137),r=n(76),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r);o(o.P+o.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(334),t.exports=n(17).String.padEnd},function(t,e,n){"use strict";var o=n(0),i=n(137),r=n(76),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r);o(o.P+o.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(336),t.exports=n(17).String.trimLeft},function(t,e,n){"use strict";n(53)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){n(338),t.exports=n(17).String.trimRight},function(t,e,n){"use strict";n(53)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){n(340),t.exports=n(83).f("asyncIterator")},function(t,e,n){n(109)("asyncIterator")},function(t,e,n){n(342),t.exports=n(17).Object.getOwnPropertyDescriptors},function(t,e,n){var o=n(0),i=n(136),r=n(27),a=n(32),s=n(99);o(o.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,o=r(t),l=a.f,c=i(o),u={},d=0;c.length>d;)void 0!==(n=l(o,e=c[d++]))&&s(u,e,n);return u}})},function(t,e,n){n(344),t.exports=n(17).Object.values},function(t,e,n){var o=n(0),i=n(138)(!1);o(o.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){n(346),t.exports=n(17).Object.entries},function(t,e,n){var o=n(0),i=n(138)(!0);o(o.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";n(130),n(348),t.exports=n(17).Promise.finally},function(t,e,n){"use strict";var o=n(0),i=n(17),r=n(9),a=n(64),s=n(132);o(o.P+o.R,"Promise",{finally:function(t){var e=a(this,i.Promise||r.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){n(350),n(351),n(352),t.exports=n(17)},function(t,e,n){var o=n(9),i=n(0),r=n(76),a=[].slice,s=/MSIE .\./.test(r),l=function(t){return function(e,n){var o=arguments.length>2,i=!!o&&a.call(arguments,2);return t(o?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(t,e,n){var o=n(0),i=n(105);o(o.G+o.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var o=n(102),i=n(44),r=n(22),a=n(9),s=n(26),l=n(54),c=n(14),u=c("iterator"),d=c("toStringTag"),f=l.Array,h={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},p=i(h),v=0;v=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(t){var e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach((function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(t))})),this.insertBefore(e,this.firstChild)})})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(51),n(21),n(2),n(3),n(15),n(8),n(58),n(141)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=f(c),u=h(u);var p=n(369),v=[];p.keys().forEach((function(t){t.match(/^\.\/[^_][\w/]*\.([tj])s$/)&&v.push(p(t))}));var g=function(){function t(e){var n,o,i=this;(0,a.default)(this,t),this.moduleInstances={},this.isReady=new Promise((function(t,e){n=t,o=e})),Promise.resolve().then((function(){return r.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:return i.configuration=e,t.next=3,r.default.awrap(i.validate());case 3:return t.next=5,r.default.awrap(i.init());case 5:return t.next=7,r.default.awrap(i.start());case 7:c.logLabeled("I'm ready! (ノ◕ヮ◕)ノ*:・゚✧","log","","color: #E24A75"),setTimeout((function(){var t,e,o;return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,r.default.awrap(i.render());case 2:i.configuration.autofocus&&(t=i.moduleInstances,e=t.BlockManager,(o=t.Caret).setToBlock(e.blocks[0],o.positions.START),e.highlightCurrentNode()),i.moduleInstances.UI.removeLoader(),n();case 5:case"end":return a.stop()}}))}),500);case 9:case"end":return t.stop()}}))})).catch((function(t){c.log("Editor.js is not ready because of ".concat(t),"error"),o(t)}))}return(0,s.default)(t,[{key:"validate",value:function(){var t,e,n;return r.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=this.config,e=t.holderId,n=t.holder,!e||!n){o.next=3;break}throw Error("«holderId» and «holder» param can't assign at the same time.");case 3:if("string"!=typeof n||l.default.get(n)){o.next=5;break}throw Error("element with ID «".concat(n,"» is missing. Pass correct holder's ID."));case 5:if(!n||"object"!==(0,i.default)(n)||l.default.isElement(n)){o.next=7;break}throw Error("holder as HTMLElement if provided must be inherit from Element class.");case 7:case"end":return o.stop()}}),null,this)}},{key:"init",value:function(){this.constructModules(),this.configureModules()}},{key:"start",value:function(){var t,e=this;return r.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t=["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"],n.next=3,r.default.awrap(t.reduce((function(t,n){return t.then((function(){return r.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.default.awrap(e.moduleInstances[n].prepare());case 3:t.next=10;break;case 5:if(t.prev=5,t.t0=t.catch(0),!(t.t0 instanceof d.CriticalError)){t.next=9;break}throw new Error(t.t0.message);case 9:c.log("Module ".concat(n," was skipped because of %o"),"warn",t.t0);case 10:case"end":return t.stop()}}),null,null,[[0,5]])}))}),Promise.resolve()));case 3:case"end":return n.stop()}}))}},{key:"render",value:function(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}},{key:"constructModules",value:function(){var t=this;v.forEach((function(e){var n=c.isFunction(e)?e:e.default;try{t.moduleInstances[n.displayName]=new n({config:t.configuration})}catch(t){c.log("Module ".concat(n.displayName," skipped because"),"warn",t)}}))}},{key:"configureModules",value:function(){for(var t in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,t)&&(this.moduleInstances[t].state=this.getModulesDiff(t))}},{key:"getModulesDiff",value:function(t){var e={};for(var n in this.moduleInstances)n!==t&&(e[n]=this.moduleInstances[n]);return e}},{key:"configuration",set:function(t){var e,n;"object"!==(0,i.default)(t)&&(t={holder:t}),c.deprecationAssert(!!t.holderId,"config.holderId","config.holder"),t.holderId&&!t.holder&&(t.holder=t.holderId,t.holderId=null),this.config=t,null==this.config.holder&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=c.LogLevels.VERBOSE),c.setLogLevel(this.config.logLevel),c.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||{},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,c.isEmpty(this.config.data)?(this.config.data={},this.config.data.blocks=[o]):this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data.blocks=[o]),this.config.readOnly=this.config.readOnly||!1,(null===(e=t.i18n)||void 0===e?void 0:e.messages)&&u.default.setDictionary(t.i18n.messages),this.config.i18n.direction=(null===(n=t.i18n)||void 0===n?void 0:n.direction)||"ltr"},get:function(){return this.config}}]),t}();o.default=g,g.displayName="Core",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]&&arguments[0];this.nodes.input.classList.add(this.CSS.inputShowed),t&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.selection.isFakeBackgroundEnabled){var e=new a.default;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",t&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(t){var e=this.nodes.input.value||"";if(e.trim()||(this.selection.restore(),this.unlink(),t.preventDefault(),this.closeActions()),!this.validateURL(e))return this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void l.log("Incorrect Link pasted","warn",e);e=this.prepareLink(e),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(e),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}},{key:"validateURL",value:function(t){return!/\s/.test(t)}},{key:"prepareLink",value:function(t){return t=t.trim(),t=this.addProtocol(t)}},{key:"addProtocol",value:function(t){if(/^(\w+):(\/\/)?/.test(t))return t;var e=/^\/[^/\s]/.test(t),n="#"===t.substring(0,1),o=/^\/\/[^/\s]/.test(t);return e||n||o||(t="http://"+t),t}},{key:"insertLink",value:function(t){var e=this.selection.findParentTag("A");e&&this.selection.expandToTag(e),document.execCommand(this.commandLink,!1,t)}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}},{key:"shortcut",get:function(){return"CMD+K"}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),t}();o.default=d,d.displayName="LinkInlineTool",d.isInline=!0,d.title="Link",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=e.data,o=e.api;(0,i.default)(this,t),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,r.default)(t,[{key:"render",value:function(){return this.wrapper}},{key:"save",value:function(){return this.savedData}},{key:"make",value:function(){var t=a.default.make("div",this.CSS.wrapper),e=a.default.svg("sad-face",52,52),n=a.default.make("div",this.CSS.info),o=a.default.make("div",this.CSS.title,{textContent:this.title}),i=a.default.make("div",this.CSS.subtitle,{textContent:this.subtitle});return t.appendChild(e),n.appendChild(o),n.appendChild(i),t.appendChild(n),t}}]),t}();o.default=l,l.displayName="Stub",l.isReadOnlySupported=!0,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15),n(8),n(24)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l){"use strict";var c=n(13),u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=c(s),l=u(l);var d=function(){function t(e,n){(0,i.default)(this,t),this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=n}return(0,r.default)(t,[{key:"setItems",value:function(t){this.items=t}},{key:"next",value:function(){this.cursor=this.leafNodesAndReturnIndex(t.directions.RIGHT)}},{key:"previous",value:function(){this.cursor=this.leafNodesAndReturnIndex(t.directions.LEFT)}},{key:"dropCursor",value:function(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}},{key:"leafNodesAndReturnIndex",value:function(e){var n=this;if(0===this.items.length)return this.cursor;var o=this.cursor;return-1===o?o=e===t.directions.RIGHT?-1:0:this.items[o].classList.remove(this.focusedCssClass),o=e===t.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length,a.default.canSetCaret(this.items[o])&&s.delay((function(){return l.default.setCursor(n.items[o])}),50)(),this.items[o].classList.add(this.focusedCssClass),o}},{key:"currentItem",get:function(){return-1===this.cursor?null:this.items[this.cursor]}}]),t}();o.default=d,d.displayName="DomIterator",d.directions={RIGHT:"right",LEFT:"left"},t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=e.api;(0,i.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-up",animation:"wobble"},this.api=n}return(0,r.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-up",14,14)),this.api.listeners.on(e,"click",(function(n){return t.handleClick(n,e)}),!1),this.api.tooltip.onHover(e,this.api.i18n.t("Move up")),e}},{key:"handleClick",value:function(t,e){var n=this,o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o),r=this.api.blocks.getBlockByIndex(o-1);if(0===o||!i||!r)return e.classList.add(this.CSS.animation),void window.setTimeout((function(){e.classList.remove(n.CSS.animation)}),500);var a,s=i.holder,l=r.holder,c=s.getBoundingClientRect(),u=l.getBoundingClientRect();a=u.top>0?Math.abs(c.top)-Math.abs(u.top):window.innerHeight-Math.abs(c.top)+Math.abs(u.top),window.scrollBy(0,-1*a),this.api.blocks.move(o-1),this.api.tooltip.hide()}}]),t}();o.default=l,l.displayName="MoveUpTune",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=this,o=e.api;(0,i.default)(this,t),this.CSS={button:"ce-settings__button",buttonDelete:"ce-settings__button--delete",buttonConfirm:"ce-settings__button--confirm"},this.nodes={button:null},this.api=o,this.resetConfirmation=function(){n.setConfirmation(!1)}}return(0,r.default)(t,[{key:"render",value:function(){var t=this;return this.nodes.button=a.default.make("div",[this.CSS.button,this.CSS.buttonDelete],{}),this.nodes.button.appendChild(a.default.svg("cross",12,12)),this.api.listeners.on(this.nodes.button,"click",(function(e){return t.handleClick(e)}),!1),this.api.tooltip.onHover(this.nodes.button,this.api.i18n.t("Delete")),this.nodes.button}},{key:"handleClick",value:function(t){this.needConfirmation?(this.api.events.off("block-settings-closed",this.resetConfirmation),this.api.blocks.delete(),this.api.toolbar.close(),this.api.tooltip.hide(),t.stopPropagation()):(this.setConfirmation(!0),this.api.events.on("block-settings-closed",this.resetConfirmation))}},{key:"setConfirmation",value:function(t){this.needConfirmation=t,this.nodes.button.classList.add(this.CSS.buttonConfirm)}}]),t}();o.default=l,l.displayName="DeleteTune",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=e.api;(0,i.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-down",animation:"wobble"},this.api=n}return(0,r.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-down",14,14)),this.api.listeners.on(e,"click",(function(n){return t.handleClick(n,e)}),!1),this.api.tooltip.onHover(e,this.api.i18n.t("Move down")),e}},{key:"handleClick",value:function(t,e){var n=this,o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o+1);if(!i)return e.classList.add(this.CSS.animation),void window.setTimeout((function(){e.classList.remove(n.CSS.animation)}),500);var r=i.holder,a=r.getBoundingClientRect(),s=Math.abs(window.innerHeight-r.offsetHeight);a.top0?this.insertToDOM(n,"afterend",r):this.insertToDOM(n,"beforebegin",r),this.blocks.splice(t,0,n);var a=this.composeBlockEvent("move",{fromIndex:e,toIndex:t});n.call(l.BlockToolAPI.MOVED,a)}},{key:"insert",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.length){t>this.length&&(t=this.length),n&&(this.blocks[t].holder.remove(),this.blocks[t].call(l.BlockToolAPI.REMOVED));var o=n?1:0;if(this.blocks.splice(t,o,e),t>0){var i=this.blocks[t-1];this.insertToDOM(e,"afterend",i)}else{var r=this.blocks[t+1];r?this.insertToDOM(e,"beforebegin",r):this.insertToDOM(e)}}else this.push(e)}},{key:"remove",value:function(t){isNaN(t)&&(t=this.length-1),this.blocks[t].holder.remove(),this.blocks[t].call(l.BlockToolAPI.REMOVED),this.blocks.splice(t,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.forEach((function(t){return t.call(l.BlockToolAPI.REMOVED)})),this.blocks.length=0}},{key:"insertAfter",value:function(t,e){var n=this.blocks.indexOf(t);this.insert(n+1,e)}},{key:"get",value:function(t){return this.blocks[t]}},{key:"indexOf",value:function(t){return this.blocks.indexOf(t)}},{key:"insertToDOM",value:function(t,e,n){e?n.holder.insertAdjacentElement(e,t.holder):this.workingArea.appendChild(t.holder),t.call(l.BlockToolAPI.RENDERED)}},{key:"composeBlockEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}},{key:"length",get:function(){return this.blocks.length}},{key:"array",get:function(){return this.blocks}},{key:"nodes",get:function(){return a.array(this.workingArea.children)}}],[{key:"set",value:function(t,e,n){return isNaN(Number(e))?(Reflect.set(t,e,n),!0):(t.insert(+e,n),!0)}},{key:"get",value:function(t,e){return isNaN(Number(e))?Reflect.get(t,e):t.get(+e)}}]),t}();o.default=d,d.displayName="Blocks",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){window,t.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";n(1),t.exports=function(){var t=n(6),e=null;return{show:function(n){if(n.message){!function(){if(e)return!0;e=t.getWrapper(),document.body.appendChild(e)}();var o=null,i=n.time||8e3;switch(n.type){case"confirm":o=t.confirm(n);break;case"prompt":o=t.prompt(n);break;default:o=t.alert(n),window.setTimeout((function(){o.remove()}),i)}e.appendChild(o),o.classList.add("cdx-notify--bounce-in")}}}}()},function(t,e,n){var o=n(2);"string"==typeof o&&(o=[[t.i,o,""]]),n(4)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(t.exports=o.locals)},function(t,e,n){(t.exports=n(3)(!1)).push([t.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(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,o=t[1]||"",i=t[3];if(!i)return o;if(e&&"function"==typeof btoa){var r=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[o].concat(a).concat([r]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i=0&&u.splice(e,1)}function g(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),p(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function b(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var a=c++;n=l||(l=g(e)),o=x.bind(null,n,a,!1),i=x.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),p(t,e),e}(e),o=function(t,e,n){var o=n.css,i=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||r)&&(o=d(o)),i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),o=function(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return f(n,e),function(t){for(var o=[],i=0;i0;)e.insertBefore(l.childNodes[0],l);e.removeChild(l),this._sanitize(t,e);break}for(var v=0;v{this.showed&&this.hide(!0)},{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(t,e,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 e)this.nodes.content.appendChild(document.createTextNode(e));else{if(!(e instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof e+" given.");this.nodes.content.appendChild(e)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),o.placement){case"top":this.placeTop(t,o);break;case"left":this.placeLeft(t,o);break;case"right":this.placeRight(t,o);break;case"bottom":default:this.placeBottom(t,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(t=!1){if(this.hidingDelay&&!t)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(t,e,n){t.addEventListener("mouseenter",()=>{this.show(t,e,n)}),t.addEventListener("mouseleave",()=>{this.hide()})}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 t="codex-tooltips-style";if(document.getElementById(t))return;const e=n(2),o=this.make("style",null,{textContent:e.toString(),id:t});this.prepend(document.head,o)}placeBottom(t,e){const n=t.getBoundingClientRect(),o=n.left+t.clientWidth/2-this.nodes.wrapper.offsetWidth/2,i=n.bottom+window.pageYOffset+this.offsetTop+e.marginTop;this.applyPlacement("bottom",o,i)}placeTop(t,e){const n=t.getBoundingClientRect(),o=n.left+t.clientWidth/2-this.nodes.wrapper.offsetWidth/2,i=n.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",o,i)}placeLeft(t,e){const n=t.getBoundingClientRect(),o=n.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-e.marginLeft,i=n.top+window.pageYOffset+t.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",o,i)}placeRight(t,e){const n=t.getBoundingClientRect(),o=n.right+this.offsetRight+e.marginRight,i=n.top+window.pageYOffset+t.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",o,i)}applyPlacement(t,e,n){this.nodes.wrapper.classList.add(this.CSS.placement[t]),this.nodes.wrapper.style.left=`${e}px`,this.nodes.wrapper.style.top=`${n}px`}make(t,e=null,n={}){const o=document.createElement(t);Array.isArray(e)?o.classList.add(...e):e&&o.classList.add(e);for(const t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}append(t,e){Array.isArray(e)?e.forEach(e=>t.appendChild(e)):t.appendChild(e)}prepend(t,e){Array.isArray(e)?(e=e.reverse()).forEach(e=>t.prepend(e)):t.prepend(e)}}},function(t,e){t.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;-webkit-mask-box-image:url(\'data:image/svg+xml;charset=utf-8,\') 48% 41% 37.9% 53.3%;z-index:-1}@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(t,e,n){"use strict";n.r(e),e.default='\n\n\n \n\n\n\n \n\n\n\n\n\n \n\n\n\n \n \n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n'},function(t,e){t.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:651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width:651px){.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{fill:currentColor;vertical-align:middle;max-height:100%}::-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-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,transform;display:none}@media (max-width:650px){.ce-toolbar{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}}@media (max-width:650px) and (max-width:650px){.ce-toolbar{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}@media (max-width:650px){.ce-toolbar{padding:3px;margin-top:5px}.ce-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar--opened{display:block}@media (max-width:650px){.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:650px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:calc(100% - 35px)}}.ce-toolbar__plus{color:#707684;cursor:pointer;width:34px;height:34px;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;position:absolute;left:-34px;-ms-flex-negative:0;flex-shrink:0}.ce-toolbar__plus--active,.ce-toolbar__plus:hover{color:#388ae5}.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-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}.ce-toolbar__plus--hidden{display:none}@media (max-width:650px){.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static;-webkit-transform:none!important;transform:none!important}}.ce-toolbar .ce-toolbox,.ce-toolbar__plus{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ce-toolbar__actions{position:absolute;right:-30px;top:5px;opacity:0}@media (max-width:650px){.ce-toolbar__actions{position:absolute;right:-28px;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}.ce-toolbar__actions-buttons{text-align:right}.ce-toolbar__settings-btn{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:18px;height:18px;color:#707684;cursor:pointer;background:#eff2f5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-toolbar__settings-btn:hover{color:#1d202b}@media (max-width:650px){.ce-toolbar__settings-btn{background:transparent}}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{position:absolute;visibility:hidden;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}@media (max-width:650px){.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}}.ce-toolbox--opened{opacity:1;visibility:visible}.ce-toolbox__button{color:#707684;cursor:pointer;width:34px;height:34px;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;-ms-flex-negative:0;flex-shrink:0}.ce-toolbox__button--active,.ce-toolbox__button:hover{color:#388ae5}.ce-toolbox__button--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbox-button-tooltip__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}@media (min-width:651px){.codex-editor--narrow .ce-toolbox{background:#fff;z-index:2}}.ce-inline-toolbar{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}@media (max-width:650px){.ce-inline-toolbar{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}.ce-inline-toolbar{-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}.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--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.9);transform:translateX(-23px) translateY(8px) scale(.9)}.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(.9);transform:translateX(-100%) translateY(8px) scale(.9);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%;padding:0 6px}.ce-inline-toolbar__buttons,.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:34px;padding:0 9px 0 10px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48)}.ce-inline-toolbar__dropdown:hover{background:#eff2f5}.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}.ce-inline-toolbar__dropdown-content svg{height:12px}.ce-inline-toolbar__dropdown .icon--toggler-down{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:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#000;margin:0}.ce-inline-tool:hover{background-color:#eff2f5}.ce-inline-tool{border-radius:0;line-height:normal;width:auto;padding:0 5px!important;min-width:24px}.ce-inline-tool--active{color:#388ae5}.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:not(:last-of-type){margin-right:2px}.ce-inline-tool .icon{height:12px}.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:13px;padding:10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;border-top:1px solid rgba(201,201,204,.48)}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}@media (max-width:650px){.ce-conversion-toolbar{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}.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:150px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box}.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--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:#707684;font-size:11px;font-weight:500;letter-spacing:.33px;padding:10px 10px 5px;text-transform:uppercase}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px 10px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--hidden{display:none}.ce-conversion-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-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#eff2f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:20px;height:20px;border:1px solid rgba(201,201,204,.48);border-radius:3px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:10px;background:#fff}.ce-conversion-tool__icon svg{width:11px;height:11px}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#388ae5!important;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}@media (max-width:650px){.ce-settings{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}.ce-settings{right:-1px;top:30px;min-width:114px;-webkit-box-sizing:content-box;box-sizing:content-box}.ce-settings--left-oriented:before{left:15px;margin-left:0}.ce-settings--right-oriented:before{left:auto;right:15px;margin-left:0}@media (max-width:650px){.ce-settings{bottom:40px;right:-11px;top:auto}}.ce-settings:before{left:auto;right:12px}@media (max-width:650px){.ce-settings:before{bottom:-5px;top:auto}}.ce-settings{display:none}.ce-settings--opened{display:block;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-name:panelShowing;animation-name:panelShowing}.ce-settings__plugin-zone:not(:empty){padding:3px 3px 0}.ce-settings__default-zone:not(:empty){padding:3px}.ce-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:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#000;margin:0}.ce-settings__button:hover{background-color:#eff2f5}.ce-settings__button--active{color:#388ae5}.ce-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}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button{line-height:32px}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#388ae5}.ce-settings__button--delete{-webkit-transition:background-color .3s ease;transition:background-color .3s ease;will-change:background-color}.ce-settings__button--delete .icon{-webkit-transition:-webkit-transform .2s ease-out;transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out;transition:transform .2s ease-out,-webkit-transform .2s ease-out;will-change:transform}.ce-settings__button--confirm{background-color:#e24a4a!important;color:#fff}.ce-settings__button--confirm:hover{background-color:#d54a4a!important}.ce-settings__button--confirm .icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.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 #388ae5;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:#388ae5;background:repeating-linear-gradient(90deg,#388ae5,#388ae5 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:651px){.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)}}.cdx-block{padding:.4em 0}.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:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#000;margin:0}.cdx-settings-button:hover{background-color:#eff2f5}.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{color:#388ae5}.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:#388ae5;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}.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:-34px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-34px}@media (max-width:650px){.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:651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}'}])})); \ No newline at end of file +!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.EditorJS=e():t.EditorJS=e()}(window,(function(){return function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=180)}([function(t,e,n){var o=n(9),i=n(17),r=n(26),a=n(22),s=n(29),l=function(t,e,n){var c,u,d,f,h=t&l.F,p=t&l.G,v=t&l.S,g=t&l.P,y=t&l.B,b=p?o:v?o[e]||(o[e]={}):(o[e]||{}).prototype,k=p?i:i[e]||(i[e]={}),m=k.prototype||(k.prototype={});for(c in p&&(n=e),n)d=((u=!h&&b&&void 0!==b[c])?b:n)[c],f=y&&u?s(d,o):g&&"function"==typeof d?s(Function.call,d):d,b&&a(b,c,d,t&l.U),k[c]!=d&&r(k,c,f),g&&m[c]!=d&&(m[c]=d)};o.core=i,l.F=1,l.G=2,l.S=4,l.P=8,l.B=16,l.W=32,l.U=64,l.R=128,t.exports=l},function(t,e){t.exports=function(t){return t&&t.__esModule?t:{default:t}}},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){function n(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],r=n.Editor.Listeners;n.mutableListenerIds.push(r.on(t,e,o,i))},clearAll:function(){var t=n.Editor.Listeners,e=!0,o=!1,i=void 0;try{for(var r,a=n.mutableListenerIds[Symbol.iterator]();!(e=(r=a.next()).done);e=!0){var s=r.value;t.offById(s)}}catch(t){o=!0,i=t}finally{try{e||null==a.return||a.return()}finally{if(o)throw i}}n.mutableListenerIds=[]}},this.mutableListenerIds=[],(this instanceof t?this.constructor:void 0)===t)throw new TypeError("Constructors for abstract class Module are not allowed.");this.config=o}return(0,r.default)(t,[{key:"removeAllNodes",value:function(){for(var t in this.nodes){var e=this.nodes[t];e instanceof HTMLElement&&e.remove()}}},{key:"state",set:function(t){this.Editor=t}},{key:"isRtl",get:function(){return"rtl"===this.config.i18n.direction}}]),t}();o.default=s,s.displayName="Module",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(364),n(21),n(15)],void 0===(r="function"==typeof(o=function(t,e,o,i){"use strict";var r,a=n(1);function s(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"log",o=arguments.length>3?arguments[3]:void 0,i=arguments.length>4&&void 0!==arguments[4]?arguments[4]:"color: inherit";if("console"in window&&window.console[n]){var a=["info","log","warn","error"].includes(n),l=[];switch(s.logLevel){case r.ERROR:if("error"!==n)return;break;case r.WARN:if(!["error","warn"].includes(n))return;break;case r.INFO:if(!a||t)return}o&&l.push(o);var c="Editor.js ".concat("2.19.0-smb.1");t&&(a?(l.unshift("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;",i),e="%c".concat(c,"%c ").concat(e)):e="( ".concat(c," )").concat(e));try{if(a)if(o){var u;(u=console)[n].apply(u,["".concat(e," %o")].concat(l))}else{var d;(d=console)[n].apply(d,[e].concat(l))}else console[n](e)}catch(t){}}}Object.defineProperty(t,"__esModule",{value:!0}),t.setLogLevel=function(t){s.logLevel=t},t.isPrintableKey=function(t){return t>47&&t<58||32===t||13===t||229===t||t>64&&t<91||t>95&&t<112||t>185&&t<193||t>218&&t<223},t.sequence=function(t){var e,n,i,r=arguments;return o.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return i=function(t,e,n){return o.default.async((function(i){for(;;)switch(i.prev=i.next){case 0:return i.prev=0,i.next=3,o.default.awrap(t.function(t.data));case 3:return i.next=5,o.default.awrap(e(void 0!==t.data?t.data:{}));case 5:i.next=10;break;case 7:i.prev=7,i.t0=i.catch(0),n(void 0!==t.data?t.data:{});case 10:case"end":return i.stop()}}),null,null,[[0,7]])},e=r.length>1&&void 0!==r[1]?r[1]:function(){},n=r.length>2&&void 0!==r[2]?r[2]:function(){},a.abrupt("return",t.reduce((function(t,r){return o.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,o.default.awrap(t);case 2:return a.abrupt("return",i(r,e,n));case 3:case"end":return a.stop()}}))}),Promise.resolve()));case 4:case"end":return a.stop()}}))},t.array=function(t){return Array.prototype.slice.call(t)},t.isFunction=u,t.isClass=function(t){return u(t)&&/^\s*class\s+/.test(t.toString())},t.isEmpty=function(t){return!t||0===Object.keys(t).length&&t.constructor===Object},t.isPromise=function(t){return Promise.resolve(t)===t},t.delay=function(t,e){return function(){var n=this,o=arguments;window.setTimeout((function(){return t.apply(n,o)}),e)}},t.getFileExtension=function(t){return t.name.split(".").pop()},t.isValidMimeType=function(t){return/^[-\w]+\/([-+\w]+|\*)$/.test(t)},t.debounce=function(t,e,n){var o,i=arguments,r=this;return function(){var a=r,s=i,l=n&&!o;window.clearTimeout(o),o=window.setTimeout((function(){o=null,n||t.apply(a,s)}),e),l&&t.apply(a,s)}},t.copyTextToClipboard=function(t){var e=i.default.make("div","codex-editor-clipboard",{innerHTML:t});document.body.appendChild(e);var n=window.getSelection(),o=document.createRange();o.selectNode(e),window.getSelection().removeAllRanges(),n.addRange(o),document.execCommand("copy"),document.body.removeChild(e)},t.getUserOS=d,t.capitalize=function(t){return t[0].toUpperCase()+t.slice(1)},t.typeOf=f,t.deepMerge=function t(n){for(var o=function(t){return t&&"object"===f(t)},i=arguments.length,r=new Array(i>1?i-1:0),a=1;a0&&void 0!==arguments[0]?arguments[0]:"";return"".concat(t).concat(Math.floor(1e8*Math.random()).toString(16))},t.deprecationAssert=function(t,e,n){var o="«".concat(e,"» is deprecated and will be removed in the next major release. Please use the «").concat(n,"» instead.");t&&c(o,"warn")},t.isTouchSupported=t.logLabeled=t.log=t.mouseButtons=t.keyCodes=t.LogLevels=void 0,e=a(e),o=a(o),i=a(i),t.LogLevels=r,function(t){t.VERBOSE="VERBOSE",t.INFO="INFO",t.WARN="WARN",t.ERROR="ERROR"}(r||(t.LogLevels=r={})),t.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},t.mouseButtons={LEFT:0,WHEEL:1,RIGHT:2,BACKWARD:3,FORWARD:4},s.logLevel=r.VERBOSE;var l=s.bind(window,!1);t.log=l;var c=s.bind(window,!0);function u(t){return"function"==typeof t}function d(){var t={win:!1,mac:!1,x11:!1,linux:!1},e=Object.keys(t).find((function(t){return-1!==navigator.appVersion.toLowerCase().indexOf(t)}));return e?(t[e]=!0,t):t}function f(t){return Object.prototype.toString.call(t).match(/\s([a-zA-Z]+)/)[1].toLowerCase()}t.logLabeled=c;var h="ontouchstart"in document.documentElement;t.isTouchSupported=h})?o.apply(e,i):o)||(t.exports=r)},function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var o=n(12);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e,n){var o=n(51);function i(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return i=function(){return t},t}t.exports=function(t){if(t&&t.__esModule)return t;if(null===t||"object"!==o(t)&&"function"!=typeof t)return{default:t};var e=i();if(e&&e.has(t))return e.get(t);var n={},r=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var s=r?Object.getOwnPropertyDescriptor(t,a):null;s&&(s.get||s.set)?Object.defineProperty(n,a,s):n[a]=t[a]}return n.default=t,e&&e.set(t,n),n}},function(t,e,n){var o=n(67)("wks"),i=n(42),r=n(9).Symbol,a="function"==typeof r;(t.exports=function(t){return o[t]||(o[t]=a&&r[t]||(a?r:i)("Symbol."+t))}).store=o},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(51),n(65),n(2),n(3),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l){"use strict";var c=n(13),u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=c(l);var d=function(){function t(){(0,a.default)(this,t)}return(0,s.default)(t,null,[{key:"isSingleTag",value:function(t){return t.tagName&&["AREA","BASE","BR","COL","COMMAND","EMBED","HR","IMG","INPUT","KEYGEN","LINK","META","PARAM","SOURCE","TRACK","WBR"].includes(t.tagName)}},{key:"isLineBreakTag",value:function(t){return t&&t.tagName&&["BR","WBR"].includes(t.tagName)}},{key:"make",value:function(t){var e,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=document.createElement(t);for(var a in Array.isArray(n)?(e=i.classList).add.apply(e,(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(t){return document.createTextNode(t)}},{key:"svg",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:14,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:14,o=document.createElementNS("http://www.w3.org/2000/svg","svg");return o.classList.add("icon","icon--"+t),o.setAttribute("width",e+"px"),o.setAttribute("height",n+"px"),o.innerHTML=''),o}},{key:"append",value:function(t,e){Array.isArray(e)?e.forEach((function(e){return t.appendChild(e)})):t.appendChild(e)}},{key:"prepend",value:function(t,e){Array.isArray(e)?(e=e.reverse()).forEach((function(e){return t.prepend(e)})):t.prepend(e)}},{key:"swap",value:function(t,e){var n=document.createElement("div"),o=t.parentNode;o.insertBefore(n,t),o.insertBefore(t,e),o.insertBefore(e,n),o.removeChild(n)}},{key:"find",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelector(e)}},{key:"get",value:function(t){return document.getElementById(t)}},{key:"findAll",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:document,e=arguments.length>1?arguments[1]:void 0;return t.querySelectorAll(e)}},{key:"findAllInputs",value:function(e){return l.array(e.querySelectorAll(t.allInputsSelector)).reduce((function(e,n){return t.isNativeInput(n)||t.containsOnlyInlineElements(n)?[].concat((0,r.default)(e),[n]):[].concat((0,r.default)(e),(0,r.default)(t.getDeepestBlockElements(n)))}),[])}},{key:"getDeepestNode",value:function(e){var n=arguments.length>1&&void 0!==arguments[1]&&arguments[1],o=n?"lastChild":"firstChild",i=n?"previousSibling":"nextSibling";if(e&&e.nodeType===Node.ELEMENT_NODE&&e[o]){var r=e[o];if(t.isSingleTag(r)&&!t.isNativeInput(r)&&!t.isLineBreakTag(r))if(r[i])r=r[i];else{if(!r.parentNode[i])return r.parentNode;r=r.parentNode[i]}return this.getDeepestNode(r,n)}return e}},{key:"isElement",value:function(t){return t&&"object"===(0,i.default)(t)&&t.nodeType&&t.nodeType===Node.ELEMENT_NODE}},{key:"isFragment",value:function(t){return t&&"object"===(0,i.default)(t)&&t.nodeType&&t.nodeType===Node.DOCUMENT_FRAGMENT_NODE}},{key:"isContentEditable",value:function(t){return"true"===t.contentEditable}},{key:"isNativeInput",value:function(t){return!(!t||!t.tagName)&&["INPUT","TEXTAREA"].includes(t.tagName)}},{key:"canSetCaret",value:function(e){var n=!0;if(t.isNativeInput(e))switch(e.type){case"file":case"checkbox":case"radio":case"hidden":case"submit":case"button":case"image":case"reset":n=!1}else n=t.isContentEditable(e);return n}},{key:"isNodeEmpty",value:function(t){return!(this.isSingleTag(t)&&!this.isLineBreakTag(t))&&0===(this.isElement(t)&&this.isNativeInput(t)?t.value:t.textContent.replace("​","")).trim().length}},{key:"isLeaf",value:function(t){return!!t&&0===t.childNodes.length}},{key:"isEmpty",value:function(t){t.normalize();for(var e=[t];e.length>0;)if(t=e.shift()){if(this.isLeaf(t)&&!this.isNodeEmpty(t))return!1;t.childNodes&&e.push.apply(e,(0,r.default)(Array.from(t.childNodes)))}return!0}},{key:"isHTMLString",value:function(e){var n=t.make("div");return n.innerHTML=e,n.childElementCount>0}},{key:"getContentLength",value:function(e){return t.isNativeInput(e)?e.value.length:e.nodeType===Node.TEXT_NODE?e.length:e.textContent.length}},{key:"containsOnlyInlineElements",value:function(e){var n;return"string"==typeof e?(n=document.createElement("div")).innerHTML=e:n=e,Array.from(n.children).every((function e(n){return!t.blockElements.includes(n.tagName.toLowerCase())&&Array.from(n.children).every(e)}))}},{key:"getDeepestBlockElements",value:function(e){return t.containsOnlyInlineElements(e)?[e]:Array.from(e.children).reduce((function(e,n){return[].concat((0,r.default)(e),(0,r.default)(t.getDeepestBlockElements(n)))}),[])}},{key:"getHolder",value:function(t){return"string"==typeof t?document.getElementById(t):t}},{key:"isExtensionNode",value:function(t){return t&&["GRAMMARLY-EXTENSION"].includes(t.nodeName)}},{key:"isAnchor",value:function(t){return"a"===t.tagName.toLowerCase()}},{key:"allInputsSelector",get:function(){return"[contenteditable], textarea, input:not([type]), "+["text","password","email","number","search","tel","url"].map((function(t){return'input[type="'.concat(t,'"]')})).join(", ")}},{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","tr","tfoot","ul","video"]}}]),t}();o.default=d,d.displayName="Dom",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(31),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},function(t,e){var n=t.exports={version:"2.6.10"};"number"==typeof __e&&(__e=n)},function(t,e,n){t.exports=!n(10)((function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a}))},function(t,e,n){var o=n(11),i=n(108),r=n(39),a=Object.defineProperty;e.f=n(18)?Object.defineProperty:function(t,e,n){if(o(t),e=r(e,!0),o(n),i)try{return a(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var o=n(36);t.exports=function(t){return Object(o(t))}},function(t,e,n){t.exports=n(139)},function(t,e,n){var o=n(9),i=n(26),r=n(25),a=n(42)("src"),s=n(185),l=(""+s).split("toString");n(17).inspectSource=function(t){return s.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(r(n,"name")||i(n,"name",e)),t[e]!==n&&(c&&(r(n,a)||i(n,a,t[e]?""+t[e]:l.join(String(e)))),t===o?t[e]=n:s?t[e]?t[e]=n:i(t,e,n):(delete t[e],i(t,e,n)))})(Function.prototype,"toString",(function(){return"function"==typeof this&&this[a]||s.call(this)}))},function(t,e,n){var o=n(0),i=n(10),r=n(36),a=/"/g,s=function(t,e,n,o){var i=String(r(t)),s="<"+e;return""!==n&&(s+=" "+n+'="'+String(o).replace(a,""")+'"'),s+">"+i+""};t.exports=function(t,e){var n={};n[t]=e(s),o(o.P+o.F*i((function(){var e=""[t]('"');return e!==e.toLowerCase()||e.split('"').length>3})),"String",n)}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(8),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a,s){"use strict";var l=n(13),c=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=c(i),r=c(r),a=l(a),s=c(s);var u=function(){function t(){(0,i.default)(this,t),this.instance=null,this.selection=null,this.savedSelectionRange=null,this.isFakeBackgroundEnabled=!1,this.commandBackground="backColor",this.commandRemoveFormat="removeFormat"}return(0,r.default)(t,[{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=t.range}},{key:"restore",value:function(){if(this.savedSelectionRange){var t=window.getSelection();t.removeAllRanges(),t.addRange(this.savedSelectionRange)}}},{key:"clearSaved",value:function(){this.savedSelectionRange=null}},{key:"collapseToEnd",value:function(){var t=window.getSelection(),e=document.createRange();e.selectNodeContents(t.focusNode),e.collapse(!1),t.removeAllRanges(),t.addRange(e)}},{key:"findParentTag",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:10,o=window.getSelection(),i=null;if(!o||!o.anchorNode||!o.focusNode)return null;var r=[o.anchorNode,o.focusNode];return r.forEach((function(o){for(var r=n;r>0&&o.parentNode&&(o.tagName!==t||(i=o,e&&o.classList&&!o.classList.contains(e)&&(i=null),!i));)o=o.parentNode,r--})),i}},{key:"expandToTag",value:function(t){var e=window.getSelection();e.removeAllRanges();var n=document.createRange();n.selectNodeContents(t),e.addRange(n)}}],[{key:"get",value:function(){return window.getSelection()}},{key:"setCursor",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=document.createRange(),o=window.getSelection();if(s.default.isNativeInput(t)){if(!s.default.canSetCaret(t))return;return t.focus(),t.selectionStart=t.selectionEnd=e,t.getBoundingClientRect()}return n.setStart(t,e),n.setEnd(t,e),o.removeAllRanges(),o.addRange(n),n.getBoundingClientRect()}},{key:"CSS",get:function(){return{editorWrapper:"codex-editor",editorZone:"codex-editor__redactor"}}},{key:"anchorNode",get:function(){var t=window.getSelection();return t?t.anchorNode:null}},{key:"anchorElement",get:function(){var t=window.getSelection();if(!t)return null;var e=t.anchorNode;return e?s.default.isElement(e)?e:e.parentElement:null}},{key:"anchorOffset",get:function(){var t=window.getSelection();return t?t.anchorOffset:null}},{key:"isCollapsed",get:function(){var t=window.getSelection();return t?t.isCollapsed:null}},{key:"isAtEditor",get:function(){var e=t.get(),n=e.anchorNode||e.focusNode;n&&n.nodeType===Node.TEXT_NODE&&(n=n.parentNode);var o=null;return n&&(o=n.closest(".".concat(t.CSS.editorZone))),o&&o.nodeType===Node.ELEMENT_NODE}},{key:"isSelectionExists",get:function(){return!!t.get().anchorNode}},{key:"range",get:function(){var t=window.getSelection();return t&&t.rangeCount?t.getRangeAt(0):null}},{key:"rect",get:function(){var t,e=document.selection,n={x:0,y:0,width:0,height:0};if(e&&"Control"!==e.type)return t=(e=e).createRange(),n.x=t.boundingLeft,n.y=t.boundingTop,n.width=t.boundingWidth,n.height=t.boundingHeight,n;if(!window.getSelection)return a.log("Method window.getSelection is not supported","warn"),n;if(null===(e=window.getSelection()).rangeCount||isNaN(e.rangeCount))return a.log("Method SelectionUtils.rangeCount is not supported","warn"),n;if(0===e.rangeCount)return n;if((t=e.getRangeAt(0).cloneRange()).getBoundingClientRect&&(n=t.getBoundingClientRect()),0===n.x&&0===n.y){var o=document.createElement("span");if(o.getBoundingClientRect){o.appendChild(document.createTextNode("​")),t.insertNode(o),n=o.getBoundingClientRect();var i=o.parentNode;i.removeChild(o),i.normalize()}}return n}},{key:"text",get:function(){return window.getSelection?window.getSelection().toString():""}}]),t}();o.default=u,u.displayName="SelectionUtils",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var o=n(19),i=n(41);t.exports=n(18)?function(t,e,n){return o.f(t,e,i(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var o=n(61),i=n(36);t.exports=function(t){return o(i(t))}},function(t,e,n){"use strict";var o=n(10);t.exports=function(t,e){return!!t&&o((function(){e?t.call(null,(function(){}),1):t.call(null)}))}},function(t,e,n){var o=n(30);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,o){return t.call(e,n,o)};case 3:return function(n,o,i){return t.call(e,n,o,i)}}return function(){return t.apply(e,arguments)}}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){var n=Math.ceil,o=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?o:n)(t)}},function(t,e,n){var o=n(62),i=n(41),r=n(27),a=n(39),s=n(25),l=n(108),c=Object.getOwnPropertyDescriptor;e.f=n(18)?c:function(t,e){if(t=r(t),e=a(e,!0),l)try{return c(t,e)}catch(t){}if(s(t,e))return i(!o.f.call(t,e),t[e])}},function(t,e,n){var o=n(0),i=n(17),r=n(10);t.exports=function(t,e){var n=(i.Object||{})[t]||Object[t],a={};a[t]=e(n),o(o.S+o.F*r((function(){n(1)})),"Object",a)}},function(t,e,n){var o=n(29),i=n(61),r=n(20),a=n(16),s=n(124);t.exports=function(t,e){var n=1==t,l=2==t,c=3==t,u=4==t,d=6==t,f=5==t||d,h=e||s;return function(e,s,p){for(var v,g,y=r(e),b=i(y),k=o(s,p,3),m=a(b.length),x=0,S=n?h(e,m):l?h(e,0):void 0;m>x;x++)if((f||x in b)&&(g=k(v=b[x],x,y),t))if(n)S[x]=g;else if(g)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:S.push(v)}else if(u)return!1;return d?-1:c||u?u:S}}},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){"use strict";if(n(18)){var o=n(43),i=n(9),r=n(10),a=n(0),s=n(78),l=n(106),c=n(29),u=n(56),d=n(41),f=n(26),h=n(57),p=n(31),v=n(16),g=n(135),y=n(45),b=n(39),k=n(25),m=n(63),x=n(12),S=n(20),w=n(98),E=n(46),T=n(48),B=n(47).f,C=n(100),_=n(42),O=n(14),I=n(34),N=n(68),M=n(64),L=n(102),A=n(54),P=n(71),R=n(55),j=n(101),D=n(126),F=n(19),H=n(32),U=F.f,z=H.f,G=i.RangeError,W=i.TypeError,Y=i.Uint8Array,X=Array.prototype,V=l.ArrayBuffer,K=l.DataView,Z=I(0),q=I(2),J=I(3),$=I(4),Q=I(5),tt=I(6),et=N(!0),nt=N(!1),ot=L.values,it=L.keys,rt=L.entries,at=X.lastIndexOf,st=X.reduce,lt=X.reduceRight,ct=X.join,ut=X.sort,dt=X.slice,ft=X.toString,ht=X.toLocaleString,pt=O("iterator"),vt=O("toStringTag"),gt=_("typed_constructor"),yt=_("def_constructor"),bt=s.CONSTR,kt=s.TYPED,mt=s.VIEW,xt=I(1,(function(t,e){return Bt(M(t,t[yt]),e)})),St=r((function(){return 1===new Y(new Uint16Array([1]).buffer)[0]})),wt=!!Y&&!!Y.prototype.set&&r((function(){new Y(1).set({})})),Et=function(t,e){var n=p(t);if(n<0||n%e)throw G("Wrong offset!");return n},Tt=function(t){if(x(t)&&kt in t)return t;throw W(t+" is not a typed array!")},Bt=function(t,e){if(!(x(t)&> in t))throw W("It is not a typed array constructor!");return new t(e)},Ct=function(t,e){return _t(M(t,t[yt]),e)},_t=function(t,e){for(var n=0,o=e.length,i=Bt(t,o);o>n;)i[n]=e[n++];return i},Ot=function(t,e,n){U(t,e,{get:function(){return this._d[n]}})},It=function(t){var e,n,o,i,r,a,s=S(t),l=arguments.length,u=l>1?arguments[1]:void 0,d=void 0!==u,f=C(s);if(null!=f&&!w(f)){for(a=f.call(s),o=[],e=0;!(r=a.next()).done;e++)o.push(r.value);s=o}for(d&&l>2&&(u=c(u,arguments[2],2)),e=0,n=v(s.length),i=Bt(this,n);n>e;e++)i[e]=d?u(s[e],e):s[e];return i},Nt=function(){for(var t=0,e=arguments.length,n=Bt(this,e);e>t;)n[t]=arguments[t++];return n},Mt=!!Y&&r((function(){ht.call(new Y(1))})),Lt=function(){return ht.apply(Mt?dt.call(Tt(this)):Tt(this),arguments)},At={copyWithin:function(t,e){return D.call(Tt(this),t,e,arguments.length>2?arguments[2]:void 0)},every:function(t){return $(Tt(this),t,arguments.length>1?arguments[1]:void 0)},fill:function(t){return j.apply(Tt(this),arguments)},filter:function(t){return Ct(this,q(Tt(this),t,arguments.length>1?arguments[1]:void 0))},find:function(t){return Q(Tt(this),t,arguments.length>1?arguments[1]:void 0)},findIndex:function(t){return tt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},forEach:function(t){Z(Tt(this),t,arguments.length>1?arguments[1]:void 0)},indexOf:function(t){return nt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},includes:function(t){return et(Tt(this),t,arguments.length>1?arguments[1]:void 0)},join:function(t){return ct.apply(Tt(this),arguments)},lastIndexOf:function(t){return at.apply(Tt(this),arguments)},map:function(t){return xt(Tt(this),t,arguments.length>1?arguments[1]:void 0)},reduce:function(t){return st.apply(Tt(this),arguments)},reduceRight:function(t){return lt.apply(Tt(this),arguments)},reverse:function(){for(var t,e=Tt(this).length,n=Math.floor(e/2),o=0;o1?arguments[1]:void 0)},sort:function(t){return ut.call(Tt(this),t)},subarray:function(t,e){var n=Tt(this),o=n.length,i=y(t,o);return new(M(n,n[yt]))(n.buffer,n.byteOffset+i*n.BYTES_PER_ELEMENT,v((void 0===e?o:y(e,o))-i))}},Pt=function(t,e){return Ct(this,dt.call(Tt(this),t,e))},Rt=function(t){Tt(this);var e=Et(arguments[1],1),n=this.length,o=S(t),i=v(o.length),r=0;if(i+e>n)throw G("Wrong length!");for(;r255?255:255&o),i.v[h](n*e+i.o,o,St)}(this,n,t)},enumerable:!0})};k?(p=n((function(t,n,o,i){u(t,p,c,"_d");var r,a,s,l,d=0,h=0;if(x(n)){if(!(n instanceof V||"ArrayBuffer"==(l=m(n))||"SharedArrayBuffer"==l))return kt in n?_t(p,n):It.call(p,n);r=n,h=Et(o,e);var y=n.byteLength;if(void 0===i){if(y%e)throw G("Wrong length!");if((a=y-h)<0)throw G("Wrong length!")}else if((a=v(i)*e)+h>y)throw G("Wrong length!");s=a/e}else s=g(n),r=new V(a=s*e);for(f(t,"_d",{b:r,o:h,l:a,e:s,v:new K(r)});ddocument.F=Object<\/script>"),t.close(),l=t.F;o--;)delete l.prototype[r[o]];return l()};t.exports=Object.create||function(t,e){var n;return null!==t?(s.prototype=o(t),n=new s,s.prototype=null,n[a]=t):n=l(),void 0===e?n:i(n,e)}},function(t,e,n){var o=n(110),i=n(85).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return o(t,i)}},function(t,e,n){var o=n(25),i=n(20),r=n(84)("IE_PROTO"),a=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=i(t),o(t,r)?t[r]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?a:null}},function(t,e,n){var o=n(14)("unscopables"),i=Array.prototype;null==i[o]&&n(26)(i,o,{}),t.exports=function(t){i[o][t]=!0}},function(t,e,n){var o=n(12);t.exports=function(t,e){if(!o(t)||t._t!==e)throw TypeError("Incompatible receiver, "+e+" required!");return t}},function(t,e){function n(e){return"function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?t.exports=n=function(t){return typeof t}:t.exports=n=function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(e)}t.exports=n},function(t,e,n){var o=n(19).f,i=n(25),r=n(14)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,r)&&o(t,r,{configurable:!0,value:e})}},function(t,e,n){var o=n(0),i=n(36),r=n(10),a=n(88),s="["+a+"]",l=RegExp("^"+s+s+"*"),c=RegExp(s+s+"*$"),u=function(t,e,n){var i={},s=r((function(){return!!a[t]()||"​…"!="​…"[t]()})),l=i[t]=s?e(d):a[t];n&&(i[n]=l),o(o.P+o.F*s,"String",i)},d=u.trim=function(t,e){return t=String(i(t)),1&e&&(t=t.replace(l,"")),2&e&&(t=t.replace(c,"")),t};t.exports=u},function(t,e){t.exports={}},function(t,e,n){"use strict";var o=n(9),i=n(19),r=n(18),a=n(14)("species");t.exports=function(t){var e=o[t];r&&e&&!e[a]&&i.f(e,a,{configurable:!0,get:function(){return this}})}},function(t,e){t.exports=function(t,e,n,o){if(!(t instanceof e)||void 0!==o&&o in t)throw TypeError(n+": incorrect invocation!");return t}},function(t,e,n){var o=n(22);t.exports=function(t,e,n){for(var i in e)o(t,i,e[i],n);return t}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(140)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(){(0,i.default)(this,t)}return(0,r.default)(t,null,[{key:"ui",value:function(e,n){return t._t(e,n)}},{key:"t",value:function(e,n){return t._t(e,n)}},{key:"setDictionary",value:function(e){t.currentDictionary=e}},{key:"_t",value:function(e,n){var o=t.getNamespace(e);return o&&o[n]?o[n]:n}},{key:"getNamespace",value:function(e){return e.split(".").reduce((function(t,e){return t&&Object.keys(t).length?t[e]:{}}),t.currentDictionary)}}]),t}();o.default=l,l.displayName="I18n",l.currentDictionary=a.default,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(375),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s){"use strict";var l=n(13),c=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=c(i),r=c(r),a=c(a),s=l(s);var u=function(){function t(e){var n=this;(0,i.default)(this,t),this.iterator=null,this.activated=!1,this.allowArrows=!0,this.onKeyDown=function(e){if(n.isEventReadyForHandling(e))switch(t.usedKeys.includes(e.keyCode)&&e.preventDefault(),e.keyCode){case s.keyCodes.TAB:n.handleTabPress(e);break;case s.keyCodes.LEFT:case s.keyCodes.UP:n.flipLeft();break;case s.keyCodes.RIGHT:case s.keyCodes.DOWN:n.flipRight();break;case s.keyCodes.ENTER:n.handleEnterPress(e)}},this.allowArrows="boolean"!=typeof e.allowArrows||e.allowArrows,this.iterator=new a.default(e.items,e.focusedItemClass),this.activateCallback=e.activateCallback}return(0,r.default)(t,[{key:"activate",value:function(t){this.activated=!0,t&&this.iterator.setItems(t),document.addEventListener("keydown",this.onKeyDown)}},{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()}},{key:"flipRight",value:function(){this.iterator.next()}},{key:"dropCursor",value:function(){this.iterator.dropCursor()}},{key:"isEventReadyForHandling",value:function(t){var e=[s.keyCodes.TAB,s.keyCodes.ENTER],n=this.iterator.currentItem==document.activeElement;return this.allowArrows&&!n&&e.push(s.keyCodes.LEFT,s.keyCodes.RIGHT,s.keyCodes.UP,s.keyCodes.DOWN),this.activated&&-1!==e.indexOf(t.keyCode)}},{key:"handleTabPress",value:function(t){switch(t.shiftKey?a.default.directions.LEFT:a.default.directions.RIGHT){case a.default.directions.RIGHT:this.flipRight();break;case a.default.directions.LEFT:this.flipLeft()}}},{key:"handleEnterPress",value:function(t){this.activated&&(this.iterator.currentItem&&this.iterator.currentItem.click(),s.isFunction(this.activateCallback)&&this.activateCallback(this.iterator.currentItem),t.preventDefault(),t.stopPropagation())}},{key:"currentItem",get:function(){return this.iterator.currentItem}}],[{key:"usedKeys",get:function(){return[s.keyCodes.TAB,s.keyCodes.LEFT,s.keyCodes.RIGHT,s.keyCodes.ENTER,s.keyCodes.UP,s.keyCodes.DOWN]}}]),t}();o.default=u,u.displayName="Flipper",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(15),n(8),n(143),n(66),n(376),n(377),n(378),n(24)],void 0===(r="function"==typeof(o=function(t,e,o,i,r,a,s,l,c,u,d,f){"use strict";var h,p=n(13),v=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.default=t.BlockToolAPI=void 0,e=v(e),o=v(o),i=v(i),r=v(r),a=p(a),s=v(s),c=v(c),u=v(u),d=v(d),f=v(f),t.BlockToolAPI=h,function(t){t.APPEND_CALLBACK="appendCallback",t.RENDERED="rendered",t.MOVED="moved",t.UPDATED="updated",t.REMOVED="removed",t.ON_PASTE="onPaste"}(h||(t.BlockToolAPI=h={}));var g=function(){function t(e){var n=this,i=e.name,r=e.data,c=e.Tool,u=e.settings,d=e.api,f=e.readOnly;(0,o.default)(this,t),this.cachedInputs=[],this.inputIndex=0,this.modificationDebounceTimer=450,this.didMutated=a.debounce((function(){n.cachedInputs=[],n.updateCurrentInput(),n.call(h.UPDATED)}),this.modificationDebounceTimer),this.handleFocus=function(){n.cachedInputs=[],n.updateCurrentInput()},this.name=i,this.class=c,this.settings=u,this.config=u.config||{},this.api=d,this.blockAPI=new s.default(this),this.mutationObserver=new MutationObserver(this.didMutated),this.tool=new c({data:r,config:this.config,api:this.api.getMethodsForTool(i,l.ToolType.Block),block:this.blockAPI,readOnly:f}),this.holder=this.compose(),this.tunes=this.makeTunes()}return(0,i.default)(t,[{key:"mergeable",value:function(){return a.isFunction(this.tool.merge)}},{key:"call",value:function(t,e){if(this.tool[t]&&this.tool[t]instanceof Function){t===h.APPEND_CALLBACK&&a.log("`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead","warn");try{this.tool[t].call(this.tool,e)}catch(e){a.log("Error during '".concat(t,"' call: ").concat(e.message),"error")}}}},{key:"mergeWith",value:function(t){return e.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,e.default.awrap(this.tool.merge(t));case 2:case"end":return n.stop()}}),null,this)}},{key:"save",value:function(){var t,n,o,i=this;return e.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,e.default.awrap(this.tool.save(this.pluginsContent));case 2:return t=r.sent,n=window.performance.now(),r.abrupt("return",Promise.resolve(t).then((function(t){return o=window.performance.now(),{tool:i.name,data:t,time:o-n}})).catch((function(t){a.log("Saving proccess for ".concat(i.name," tool failed due to the ").concat(t),"log","red")})));case 5:case"end":return r.stop()}}),null,this)}},{key:"validate",value:function(t){var n;return e.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(n=!0,!(this.tool.validate instanceof Function)){o.next=5;break}return o.next=4,e.default.awrap(this.tool.validate(t));case 4:n=o.sent;case 5:return o.abrupt("return",n);case 6:case"end":return o.stop()}}),null,this)}},{key:"makeTunes",value:function(){var t=this;return[{name:"moveUp",Tune:c.default},{name:"delete",Tune:u.default},{name:"moveDown",Tune:d.default}].map((function(e){var n=e.name;return new(0,e.Tune)({api:t.api.getMethodsForTool(n,l.ToolType.Tune),settings:t.config})}))}},{key:"renderTunes",value:function(){var t=document.createDocumentFragment();return this.tunes.forEach((function(e){r.default.append(t,e.render())})),t}},{key:"updateCurrentInput",value:function(){this.currentInput=r.default.isNativeInput(document.activeElement)||!f.default.anchorNode?document.activeElement:f.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:"compose",value:function(){var e=r.default.make("div",t.CSS.wrapper),n=r.default.make("div",t.CSS.content),o=this.tool.render();return n.appendChild(o),e.appendChild(n),e}},{key:"addInputEvents",value:function(){var t=this;this.inputs.forEach((function(e){e.addEventListener("focus",t.handleFocus)}))}},{key:"removeInputEvents",value:function(){var t=this;this.inputs.forEach((function(e){e.removeEventListener("focus",t.handleFocus)}))}},{key:"inputs",get:function(){if(0!==this.cachedInputs.length)return this.cachedInputs;var t=r.default.findAllInputs(this.holder);return this.inputIndex>t.length-1&&(this.inputIndex=t.length-1),this.cachedInputs=t,t}},{key:"currentInput",get:function(){return this.inputs[this.inputIndex]},set:function(t){var e=this.inputs.findIndex((function(e){return e===t||e.contains(t)}));-1!==e&&(this.inputIndex=e)}},{key:"firstInput",get:function(){return this.inputs[0]}},{key:"lastInput",get:function(){var t=this.inputs;return t[t.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(t){return t&&!a.isEmpty(t.data)?t.data:{}}))}},{key:"sanitize",get:function(){return this.tool.sanitize}},{key:"isEmpty",get:function(){var t=r.default.isEmpty(this.pluginsContent),e=!this.hasMedia;return t&&e}},{key:"hasMedia",get:function(){return!!this.holder.querySelector(["img","iframe","video","audio","source","input","textarea","twitterwidget"].join(","))}},{key:"focused",set:function(e){this.holder.classList.toggle(t.CSS.focused,e)},get:function(){return this.holder.classList.contains(t.CSS.focused)}},{key:"selected",set:function(e){e?this.holder.classList.add(t.CSS.selected):this.holder.classList.remove(t.CSS.selected)},get:function(){return this.holder.classList.contains(t.CSS.selected)}},{key:"stretched",set:function(e){this.holder.classList.toggle(t.CSS.wrapperStretched,e)},get:function(){return this.holder.classList.contains(t.CSS.wrapperStretched)}},{key:"dropTarget",set:function(e){this.holder.classList.toggle(t.CSS.dropTarget,e)}},{key:"pluginsContent",get:function(){var e=this.holder.querySelector(".".concat(t.CSS.content));if(e&&e.childNodes.length)for(var n=e.childNodes.length-1;n>=0;n--){var o=e.childNodes[n];if(!r.default.isExtensionNode(o))return o}return null}}],[{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"}}}]),t}();t.default=g,g.displayName="Block"})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(35);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e){e.f={}.propertyIsEnumerable},function(t,e,n){var o=n(35),i=n(14)("toStringTag"),r="Arguments"==o(function(){return arguments}());t.exports=function(t){var e,n,a;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),i))?n:r?o(e):"Object"==(a=o(e))&&"function"==typeof e.callee?"Arguments":a}},function(t,e,n){var o=n(11),i=n(30),r=n(14)("species");t.exports=function(t,e){var n,a=o(t).constructor;return void 0===a||null==(n=o(a)[r])?e:i(n)}},function(t,e,n){var o=n(361),i=n(362),r=n(363);t.exports=function(t){return o(t)||i(t)||r()}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(21),n(51),n(2),n(3),n(5),n(4),n(6),n(370),n(7),n(8),n(371),n(372),n(373),n(374)],void 0===(r="function"==typeof(o=function(t,e,o,i,r,a,s,l,c,u,d,f,h,p,v,g){"use strict";var y=n(13),b=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.ToolType=t.default=void 0,e=b(e),o=b(o),i=b(i),r=b(r),a=b(a),s=b(s),l=b(l),c=b(c),u=b(u),d=b(d),f=y(f),h=b(h),p=b(p),v=b(v),g=b(g);var k,m=function(t){function n(t){var e,o=t.config;return(0,r.default)(this,n),(e=(0,s.default)(this,(0,l.default)(n).call(this,{config:o}))).stubTool="stub",e.toolsClasses={},e.toolsAvailable={},e.toolsUnavailable={},e.toolsSettings={},e._inlineTools={},e.toolsClasses={},e.toolsSettings={},e.toolsAvailable={},e.toolsUnavailable={},e._inlineTools=null,e}return(0,c.default)(n,t),(0,a.default)(n,[{key:"prepare",value:function(){var t=this;if(this.validateTools(),this.config.tools=f.deepMerge({},this.internalTools,this.config.tools),!Object.prototype.hasOwnProperty.call(this.config,"tools")||0===Object.keys(this.config.tools).length)throw Error("Can't start without tools");for(var e in this.config.tools)"object"===(0,i.default)(this.config.tools[e])?(this.toolsClasses[e]=this.config.tools[e].class,this.toolsSettings[e]=this.config.tools[e],delete this.toolsSettings[e].class):(this.toolsClasses[e]=this.config.tools[e],this.toolsSettings[e]={class:this.config.tools[e]});var n=this.getListOfPrepareFunctions();return 0===n.length?Promise.resolve():f.sequence(n,(function(e){t.success(e)}),(function(e){t.fallback(e)}))}},{key:"success",value:function(t){this.toolsAvailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"fallback",value:function(t){this.toolsUnavailable[t.toolName]=this.toolsClasses[t.toolName]}},{key:"constructInline",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o={api:this.Editor.API.getMethodsForTool(e),config:n[this.USER_SETTINGS.CONFIG]||{}};return new t(o)}},{key:"isDefault",value:function(t){return t instanceof this.available[this.config.defaultBlock]}},{key:"getToolSettings",value:function(t){var e=this.toolsSettings[t],n=e[this.USER_SETTINGS.CONFIG]||{};return t!==this.config.defaultBlock||n.placeholder||(n.placeholder=this.config.placeholder,e[this.USER_SETTINGS.CONFIG]=n),e}},{key:"isReadOnlySupported",value:function(t){return!0===t[this.INTERNAL_SETTINGS.IS_READ_ONLY_SUPPORTED]}},{key:"destroy",value:function(){Object.values(this.available).forEach((function(t){return o.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:if(!f.isFunction(t.reset)){e.next=3;break}return e.next=3,o.default.awrap(t.reset());case 3:case"end":return e.stop()}}))}))}},{key:"getListOfPrepareFunctions",value:function(){var t=[];for(var e in this.toolsClasses)if(Object.prototype.hasOwnProperty.call(this.toolsClasses,e)){var n=this.toolsClasses[e],o=this.toolsSettings[e][this.USER_SETTINGS.CONFIG];t.push({function:f.isFunction(n.prepare)?n.prepare:function(){},data:{toolName:e,config:o}})}return t}},{key:"validateTools",value:function(){for(var t in this.config.tools)if(Object.prototype.hasOwnProperty.call(this.config.tools,t)){if(t in this.internalTools)return;var e=this.config.tools[t];if(!f.isFunction(e)&&!f.isFunction(e.class))throw Error("Tool «".concat(t,"» must be a constructor function or an object with function in the «class» property"))}}},{key:"available",get:function(){return this.toolsAvailable}},{key:"unavailable",get:function(){return this.toolsUnavailable}},{key:"inline",get:function(){var t=this;if(this._inlineTools)return this._inlineTools;var n=Object.entries(this.available).filter((function(n){var o=(0,e.default)(n,2),i=o[0],r=o[1];if(!r[t.INTERNAL_SETTINGS.IS_INLINE])return!1;var a=["render","surround","checkState"].filter((function(e){return!t.constructInline(r,i)[e]}));return!a.length||(f.log("Incorrect Inline Tool: ".concat(r.name,". Some of required methods is not implemented %o"),"warn",a),!1)})),o={};return n.forEach((function(t){var n=(0,e.default)(t,2),i=n[0],r=n[1];o[i]=r})),this._inlineTools=o,this._inlineTools}},{key:"blockTools",get:function(){var t=this,n=Object.entries(this.available).filter((function(n){return!(0,e.default)(n,2)[1][t.INTERNAL_SETTINGS.IS_INLINE]})),o={};return n.forEach((function(t){var n=(0,e.default)(t,2),i=n[0],r=n[1];o[i]=r})),o}},{key:"INTERNAL_SETTINGS",get:function(){return{IS_ENABLED_LINE_BREAKS:"enableLineBreaks",IS_INLINE:"isInline",TITLE:"title",SHORTCUT:"shortcut",TOOLBOX:"toolbox",SANITIZE_CONFIG:"sanitize",CONVERSION_CONFIG:"conversionConfig",IS_READ_ONLY_SUPPORTED:"isReadOnlySupported"}}},{key:"USER_SETTINGS",get:function(){return{SHORTCUT:"shortcut",TOOLBOX:"toolbox",ENABLED_INLINE_TOOLS:"inlineToolbar",CONFIG:"config"}}},{key:"internalTools",get:function(){return{bold:{class:h.default},italic:{class:p.default},link:{class:v.default},paragraph:{class:u.default,inlineToolbar:!0},stub:{class:g.default}}}}]),n}(d.default);t.default=m,m.displayName="Tools",t.ToolType=k,function(t){t[t.Block=0]="Block",t[t.Inline=1]="Inline",t[t.Tune=2]="Tune"}(k||(t.ToolType=k={}))})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(17),i=n(9),r=i["__core-js_shared__"]||(i["__core-js_shared__"]={});(t.exports=function(t,e){return r[t]||(r[t]=void 0!==e?e:{})})("versions",[]).push({version:o.version,mode:n(43)?"pure":"global",copyright:"© 2019 Denis Pushkarev (zloirock.ru)"})},function(t,e,n){var o=n(27),i=n(16),r=n(45);t.exports=function(t){return function(e,n,a){var s,l=o(e),c=i(l.length),u=r(a,c);if(t&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}}},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var o=n(35);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,n){var o=n(14)("iterator"),i=!1;try{var r=[7][o]();r.return=function(){i=!0},Array.from(r,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var r=[7],a=r[o]();a.next=function(){return{done:n=!0}},r[o]=function(){return a},t(r)}catch(t){}return n}},function(t,e,n){"use strict";var o=n(11);t.exports=function(){var t=o(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){"use strict";var o=n(63),i=RegExp.prototype.exec;t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var r=n.call(t,e);if("object"!=typeof r)throw new TypeError("RegExp exec method returned something other than an Object or null");return r}if("RegExp"!==o(t))throw new TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){"use strict";n(128);var o=n(22),i=n(26),r=n(10),a=n(36),s=n(14),l=n(103),c=s("species"),u=!r((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$
")})),d=function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2===n.length&&"a"===n[0]&&"b"===n[1]}();t.exports=function(t,e,n){var f=s(t),h=!r((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),p=h?!r((function(){var e=!1,n=/a/;return n.exec=function(){return e=!0,null},"split"===t&&(n.constructor={},n.constructor[c]=function(){return n}),n[f](""),!e})):void 0;if(!h||!p||"replace"===t&&!u||"split"===t&&!d){var v=/./[f],g=n(a,f,""[t],(function(t,e,n,o,i){return e.exec===l?h&&!i?{done:!0,value:v.call(e,n,o)}:{done:!0,value:t.call(n,e,o)}:{done:!1}})),y=g[0],b=g[1];o(String.prototype,t,y),i(RegExp.prototype,f,2==e?function(t,e){return b.call(t,this,e)}:function(t){return b.call(t,this)})}}},function(t,e,n){var o=n(29),i=n(123),r=n(98),a=n(11),s=n(16),l=n(100),c={},u={};(e=t.exports=function(t,e,n,d,f){var h,p,v,g,y=f?function(){return t}:l(t),b=o(n,d,e?2:1),k=0;if("function"!=typeof y)throw TypeError(t+" is not iterable!");if(r(y)){for(h=s(t.length);h>k;k++)if((g=e?b(a(p=t[k])[0],p[1]):b(t[k]))===c||g===u)return g}else for(v=y.call(t);!(p=v.next()).done;)if((g=i(v,b,p.value,e))===c||g===u)return g}).BREAK=c,e.RETURN=u},function(t,e,n){var o=n(9).navigator;t.exports=o&&o.userAgent||""},function(t,e,n){"use strict";var o=n(9),i=n(0),r=n(22),a=n(57),s=n(40),l=n(75),c=n(56),u=n(12),d=n(10),f=n(71),h=n(52),p=n(89);t.exports=function(t,e,n,v,g,y){var b=o[t],k=b,m=g?"set":"add",x=k&&k.prototype,S={},w=function(t){var e=x[t];r(x,t,"delete"==t?function(t){return!(y&&!u(t))&&e.call(this,0===t?0:t)}:"has"==t?function(t){return!(y&&!u(t))&&e.call(this,0===t?0:t)}:"get"==t?function(t){return y&&!u(t)?void 0:e.call(this,0===t?0:t)}:"add"==t?function(t){return e.call(this,0===t?0:t),this}:function(t,n){return e.call(this,0===t?0:t,n),this})};if("function"==typeof k&&(y||x.forEach&&!d((function(){(new k).entries().next()})))){var E=new k,T=E[m](y?{}:-0,1)!=E,B=d((function(){E.has(1)})),C=f((function(t){new k(t)})),_=!y&&d((function(){for(var t=new k,e=5;e--;)t[m](e,e);return!t.has(-0)}));C||((k=e((function(e,n){c(e,k,t);var o=p(new b,e,k);return null!=n&&l(n,g,o[m],o),o}))).prototype=x,x.constructor=k),(B||_)&&(w("delete"),w("has"),g&&w("get")),(_||T)&&w(m),y&&x.clear&&delete x.clear}else k=v.getConstructor(e,t,g,m),a(k.prototype,n),s.NEED=!0;return h(k,t),S[t]=k,i(i.G+i.W+i.F*(k!=b),S),y||v.setStrong(k,t,g),k}},function(t,e,n){for(var o,i=n(9),r=n(26),a=n(42),s=a("typed_array"),l=a("view"),c=!(!i.ArrayBuffer||!i.DataView),u=c,d=0,f="Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array".split(",");d<9;)(o=i[f[d++]])?(r(o.prototype,s,!0),r(o.prototype,l,!0)):u=!1;t.exports={ABV:c,CONSTR:u,TYPED:s,VIEW:l}},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(66)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l);var f=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"getMethodsForTool",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:u.ToolType.Block;return Object.assign(this.methods,{i18n:this.Editor.I18nAPI.getMethodsForTool(t,e)})}},{key:"methods",get:function(){return{blocks:this.Editor.BlocksAPI.methods,caret:this.Editor.CaretAPI.methods,events:this.Editor.EventsAPI.methods,listeners:this.Editor.ListenersAPI.methods,notifier:this.Editor.NotifierAPI.methods,sanitizer:this.Editor.SanitizerAPI.methods,saver:this.Editor.SaverAPI.methods,selection:this.Editor.SelectionAPI.methods,styles:this.Editor.StylesAPI.classes,toolbar:this.Editor.ToolbarAPI.methods,inlineToolbar:this.Editor.InlineToolbarAPI.methods,tooltip:this.Editor.TooltipAPI.methods,i18n:this.Editor.I18nAPI.methods,readOnly:this.Editor.ReadOnlyAPI.methods}}}]),e}((c=d(c)).default);o.default=f,f.displayName="API",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h){"use strict";var p=n(13),v=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=v(i),r=v(r),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),d=p(d),f=v(f);var g=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"toggleReadOnly",value:function(t){t?(this.destroy(),this.Editor.Toolbox.destroy(),this.Editor.BlockSettings.destroy(),this.disableModuleBindings()):(this.drawUI(),this.enableModuleBindings())}},{key:"move",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];t&&(this.Editor.Toolbox.close(),this.Editor.BlockSettings.close());var e=this.Editor.BlockManager.currentBlock.holder;if(e){var n=this.Editor.UI.isMobile,o=e.offsetHeight,i=e.offsetTop;if(n)i+=o;else{var r=Math.floor(o/2);this.nodes.plusButton.style.transform="translate3d(0, calc(".concat(r,"px - 50%), 0)"),this.Editor.Toolbox.nodes.toolbox.style.transform="translate3d(0, calc(".concat(r,"px - 50%), 0)")}this.nodes.wrapper.style.transform="translate3D(0, ".concat(Math.floor(i),"px, 0)")}}},{key:"open",value:function(){var t=this,e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];d.delay((function(){t.move(n),t.nodes.wrapper.classList.add(t.CSS.toolbarOpened),e?t.blockActions.show():t.blockActions.hide()}),50)()}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened),this.blockActions.hide(),this.Editor.Toolbox.close(),this.Editor.BlockSettings.close()}},{key:"make",value:function(){var t=this;this.nodes.wrapper=u.default.make("div",this.CSS.toolbar),["content","actions"].forEach((function(e){t.nodes[e]=u.default.make("div",t.CSS[e])})),u.default.append(this.nodes.wrapper,this.nodes.content),u.default.append(this.nodes.content,this.nodes.actions),this.nodes.plusButton=u.default.make("div",this.CSS.plusButton),u.default.append(this.nodes.plusButton,u.default.svg("plus",14,14)),u.default.append(this.nodes.content,this.nodes.plusButton),this.readOnlyMutableListeners.on(this.nodes.plusButton,"click",(function(){t.plusButtonClicked()}),!1);var e=u.default.make("div");e.appendChild(document.createTextNode(f.default.ui(h.I18nInternalNS.ui.toolbar.toolbox,"Add"))),e.appendChild(u.default.make("div",this.CSS.plusButtonShortcut,{textContent:"⇥ Tab"})),this.Editor.Tooltip.onHover(this.nodes.plusButton,e),this.nodes.blockActionsButtons=u.default.make("div",this.CSS.blockActionsButtons),this.nodes.settingsToggler=u.default.make("span",this.CSS.settingsToggler);var n=u.default.svg("dots",8,8);u.default.append(this.nodes.settingsToggler,n),u.default.append(this.nodes.blockActionsButtons,this.nodes.settingsToggler),u.default.append(this.nodes.actions,this.nodes.blockActionsButtons),this.Editor.Tooltip.onHover(this.nodes.settingsToggler,f.default.ui(h.I18nInternalNS.ui.blockTunes.toggler,"Click to tune"),{placement:"top"}),u.default.append(this.nodes.content,this.Editor.Toolbox.nodes.toolbox),u.default.append(this.nodes.actions,this.Editor.BlockSettings.nodes.wrapper),u.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper)}},{key:"plusButtonClicked",value:function(){this.Editor.Toolbox.toggle()}},{key:"enableModuleBindings",value:function(){var t=this;this.readOnlyMutableListeners.on(this.nodes.settingsToggler,"click",(function(){t.settingsTogglerClicked()}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"settingsTogglerClicked",value:function(){this.Editor.BlockSettings.opened?this.Editor.BlockSettings.close():this.Editor.BlockSettings.open()}},{key:"drawUI",value:function(){this.Editor.BlockSettings.make(),this.Editor.Toolbox.make(),this.make()}},{key:"destroy",value:function(){this.removeAllNodes()}},{key:"CSS",get:function(){return{toolbar:"ce-toolbar",content:"ce-toolbar__content",actions:"ce-toolbar__actions",actionsOpened:"ce-toolbar__actions--opened",toolbarOpened:"ce-toolbar--opened",plusButton:"ce-toolbar__plus",plusButtonShortcut:"ce-toolbar__plus-shortcut",plusButtonHidden:"ce-toolbar__plus--hidden",blockActionsButtons:"ce-toolbar__actions-buttons",settingsToggler:"ce-toolbar__settings-btn"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened)}},{key:"plusButton",get:function(){var t=this;return{hide:function(){return t.nodes.plusButton.classList.add(t.CSS.plusButtonHidden)},show:function(){t.Editor.Toolbox.isEmpty||t.nodes.plusButton.classList.remove(t.CSS.plusButtonHidden)}}}},{key:"blockActions",get:function(){var t=this;return{hide:function(){t.nodes.actions.classList.remove(t.CSS.actionsOpened)},show:function(){t.nodes.actions.classList.add(t.CSS.actionsOpened)}}}}]),e}(c.default);o.default=g,g.displayName="Toolbar",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(140),n(8)],void 0===(r="function"==typeof(o=function(t,e,o,i){"use strict";var r=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.I18nInternalNS=void 0,e=r(e);var a=function t(n,o){var r={};return Object.entries(n).forEach((function(n){var a=(0,e.default)(n,2),s=a[0],l=a[1];if("object"!==(0,i.typeOf)(l))r[s]=l;else{var c=o?"".concat(o,".").concat(s):s,u=Object.values(l).every((function(t){return"string"===(0,i.typeOf)(t)}));r[s]=u?c:t(l,c)}})),r}((o=r(o)).default);t.I18nInternalNS=a})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o=n(12),i=n(9).document,r=o(i)&&o(i.createElement);t.exports=function(t){return r?i.createElement(t):{}}},function(t,e,n){e.f=n(14)},function(t,e,n){var o=n(67)("keys"),i=n(42);t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},function(t,e,n){var o=n(9).document;t.exports=o&&o.documentElement},function(t,e,n){var o=n(12),i=n(11),r=function(t,e){if(i(t),!o(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,o){try{(o=n(29)(Function.call,n(32).f(Object.prototype,"__proto__").set,2))(t,[]),e=!(t instanceof Array)}catch(t){e=!0}return function(t,n){return r(t,n),e?t.__proto__=n:o(t,n),t}}({},!1):void 0),check:r}},function(t,e){t.exports="\t\n\v\f\r   ᠎              \u2028\u2029\ufeff"},function(t,e,n){var o=n(12),i=n(87).set;t.exports=function(t,e,n){var r,a=e.constructor;return a!==n&&"function"==typeof a&&(r=a.prototype)!==n.prototype&&o(r)&&i&&i(t,r),t}},function(t,e,n){"use strict";var o=n(31),i=n(36);t.exports=function(t){var e=String(i(this)),n="",r=o(t);if(r<0||r==1/0)throw RangeError("Count can't be negative");for(;r>0;(r>>>=1)&&(e+=e))1&r&&(n+=e);return n}},function(t,e){t.exports=Math.sign||function(t){return 0==(t=+t)||t!=t?t:t<0?-1:1}},function(t,e){var n=Math.expm1;t.exports=!n||n(10)>22025.465794806718||n(10)<22025.465794806718||-2e-17!=n(-2e-17)?function(t){return 0==(t=+t)?t:t>-1e-6&&t<1e-6?t+t*t/2:Math.exp(t)-1}:n},function(t,e,n){var o=n(31),i=n(36);t.exports=function(t){return function(e,n){var r,a,s=String(i(e)),l=o(n),c=s.length;return l<0||l>=c?t?"":void 0:(r=s.charCodeAt(l))<55296||r>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):r:t?s.slice(l,l+2):a-56320+(r-55296<<10)+65536}}},function(t,e,n){"use strict";var o=n(43),i=n(0),r=n(22),a=n(26),s=n(54),l=n(122),c=n(52),u=n(48),d=n(14)("iterator"),f=!([].keys&&"next"in[].keys()),h=function(){return this};t.exports=function(t,e,n,p,v,g,y){l(n,e,p);var b,k,m,x=function(t){if(!f&&t in T)return T[t];switch(t){case"keys":case"values":return function(){return new n(this,t)}}return function(){return new n(this,t)}},S=e+" Iterator",w="values"==v,E=!1,T=t.prototype,B=T[d]||T["@@iterator"]||v&&T[v],C=B||x(v),_=v?w?x("entries"):C:void 0,O="Array"==e&&T.entries||B;if(O&&(m=u(O.call(new t)))!==Object.prototype&&m.next&&(c(m,S,!0),o||"function"==typeof m[d]||a(m,d,h)),w&&B&&"values"!==B.name&&(E=!0,C=function(){return B.call(this)}),o&&!y||!f&&!E&&T[d]||a(T,d,C),s[e]=C,s[S]=h,v)if(b={values:w?C:x("values"),keys:g?C:x("keys"),entries:_},y)for(k in b)k in T||r(T,k,b[k]);else i(i.P+i.F*(f||E),e,b);return b}},function(t,e,n){var o=n(96),i=n(36);t.exports=function(t,e,n){if(o(e))throw TypeError("String#"+n+" doesn't accept regex!");return String(i(t))}},function(t,e,n){var o=n(12),i=n(35),r=n(14)("match");t.exports=function(t){var e;return o(t)&&(void 0!==(e=t[r])?!!e:"RegExp"==i(t))}},function(t,e,n){var o=n(14)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[o]=!1,!"/./"[t](e)}catch(t){}}return!0}},function(t,e,n){var o=n(54),i=n(14)("iterator"),r=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||r[i]===t)}},function(t,e,n){"use strict";var o=n(19),i=n(41);t.exports=function(t,e,n){e in t?o.f(t,e,i(0,n)):t[e]=n}},function(t,e,n){var o=n(63),i=n(14)("iterator"),r=n(54);t.exports=n(17).getIteratorMethod=function(t){if(null!=t)return t[i]||t["@@iterator"]||r[o(t)]}},function(t,e,n){"use strict";var o=n(20),i=n(45),r=n(16);t.exports=function(t){for(var e=o(this),n=r(e.length),a=arguments.length,s=i(a>1?arguments[1]:void 0,n),l=a>2?arguments[2]:void 0,c=void 0===l?n:i(l,n);c>s;)e[s++]=t;return e}},function(t,e,n){"use strict";var o=n(49),i=n(127),r=n(54),a=n(27);t.exports=n(94)(Array,"Array",(function(t,e){this._t=a(t),this._i=0,this._k=e}),(function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,i(1)):i(0,"keys"==e?n:"values"==e?t[n]:[n,t[n]])}),"values"),r.Arguments=r.Array,o("keys"),o("values"),o("entries")},function(t,e,n){"use strict";var o,i,r=n(72),a=RegExp.prototype.exec,s=String.prototype.replace,l=a,c=(o=/a/,i=/b*/g,a.call(o,"a"),a.call(i,"a"),0!==o.lastIndex||0!==i.lastIndex),u=void 0!==/()??/.exec("")[1];(c||u)&&(l=function(t){var e,n,o,i,l=this;return u&&(n=new RegExp("^"+l.source+"$(?!\\s)",r.call(l))),c&&(e=l.lastIndex),o=a.call(l,t),c&&o&&(l.lastIndex=l.global?o.index+o[0].length:e),u&&o&&o.length>1&&s.call(o[0],n,(function(){for(i=1;in;)e.push(arguments[n++]);return y[++g]=function(){s("function"==typeof t?t:Function(t),e)},o(g),g},h=function(t){delete y[t]},"process"==n(35)(d)?o=function(t){d.nextTick(a(b,t,1))}:v&&v.now?o=function(t){v.now(a(b,t,1))}:p?(r=(i=new p).port2,i.port1.onmessage=k,o=a(r.postMessage,r,1)):u.addEventListener&&"function"==typeof postMessage&&!u.importScripts?(o=function(t){u.postMessage(t+"","*")},u.addEventListener("message",k,!1)):o="onreadystatechange"in c("script")?function(t){l.appendChild(c("script")).onreadystatechange=function(){l.removeChild(this),b.call(t)}}:function(t){setTimeout(a(b,t,1),0)}),t.exports={set:f,clear:h}},function(t,e,n){"use strict";var o=n(9),i=n(18),r=n(43),a=n(78),s=n(26),l=n(57),c=n(10),u=n(56),d=n(31),f=n(16),h=n(135),p=n(47).f,v=n(19).f,g=n(101),y=n(52),b="prototype",k="Wrong index!",m=o.ArrayBuffer,x=o.DataView,S=o.Math,w=o.RangeError,E=o.Infinity,T=m,B=S.abs,C=S.pow,_=S.floor,O=S.log,I=S.LN2,N=i?"_b":"buffer",M=i?"_l":"byteLength",L=i?"_o":"byteOffset";function A(t,e,n){var o,i,r,a=new Array(n),s=8*n-e-1,l=(1<>1,u=23===e?C(2,-24)-C(2,-77):0,d=0,f=t<0||0===t&&1/t<0?1:0;for((t=B(t))!=t||t===E?(i=t!=t?1:0,o=l):(o=_(O(t)/I),t*(r=C(2,-o))<1&&(o--,r*=2),(t+=o+c>=1?u/r:u*C(2,1-c))*r>=2&&(o++,r/=2),o+c>=l?(i=0,o=l):o+c>=1?(i=(t*r-1)*C(2,e),o+=c):(i=t*C(2,c-1)*C(2,e),o=0));e>=8;a[d++]=255&i,i/=256,e-=8);for(o=o<0;a[d++]=255&o,o/=256,s-=8);return a[--d]|=128*f,a}function P(t,e,n){var o,i=8*n-e-1,r=(1<>1,s=i-7,l=n-1,c=t[l--],u=127&c;for(c>>=7;s>0;u=256*u+t[l],l--,s-=8);for(o=u&(1<<-s)-1,u>>=-s,s+=e;s>0;o=256*o+t[l],l--,s-=8);if(0===u)u=1-a;else{if(u===r)return o?NaN:c?-E:E;o+=C(2,e),u-=a}return(c?-1:1)*o*C(2,u-e)}function R(t){return t[3]<<24|t[2]<<16|t[1]<<8|t[0]}function j(t){return[255&t]}function D(t){return[255&t,t>>8&255]}function F(t){return[255&t,t>>8&255,t>>16&255,t>>24&255]}function H(t){return A(t,52,8)}function U(t){return A(t,23,4)}function z(t,e,n){v(t[b],e,{get:function(){return this[n]}})}function G(t,e,n,o){var i=h(+n);if(i+e>t[M])throw w(k);var r=t[N]._b,a=i+t[L],s=r.slice(a,a+e);return o?s:s.reverse()}function W(t,e,n,o,i,r){var a=h(+n);if(a+e>t[M])throw w(k);for(var s=t[N]._b,l=a+t[L],c=o(+i),u=0;uK;)(Y=V[K++])in m||s(m,Y,T[Y]);r||(X.constructor=m)}var Z=new x(new m(2)),q=x[b].setInt8;Z.setInt8(0,2147483648),Z.setInt8(1,2147483649),!Z.getInt8(0)&&Z.getInt8(1)||l(x[b],{setInt8:function(t,e){q.call(this,t,e<<24>>24)},setUint8:function(t,e){q.call(this,t,e<<24>>24)}},!0)}else m=function(t){u(this,m,"ArrayBuffer");var e=h(t);this._b=g.call(new Array(e),0),this[M]=e},x=function(t,e,n){u(this,x,"DataView"),u(t,m,"DataView");var o=t[M],i=d(e);if(i<0||i>o)throw w("Wrong offset!");if(i+(n=void 0===n?o-i:f(n))>o)throw w("Wrong length!");this[N]=t,this[L]=i,this[M]=n},i&&(z(m,"byteLength","_l"),z(x,"buffer","_b"),z(x,"byteLength","_l"),z(x,"byteOffset","_o")),l(x[b],{getInt8:function(t){return G(this,1,t)[0]<<24>>24},getUint8:function(t){return G(this,1,t)[0]},getInt16:function(t){var e=G(this,2,t,arguments[1]);return(e[1]<<8|e[0])<<16>>16},getUint16:function(t){var e=G(this,2,t,arguments[1]);return e[1]<<8|e[0]},getInt32:function(t){return R(G(this,4,t,arguments[1]))},getUint32:function(t){return R(G(this,4,t,arguments[1]))>>>0},getFloat32:function(t){return P(G(this,4,t,arguments[1]),23,4)},getFloat64:function(t){return P(G(this,8,t,arguments[1]),52,8)},setInt8:function(t,e){W(this,1,t,j,e)},setUint8:function(t,e){W(this,1,t,j,e)},setInt16:function(t,e){W(this,2,t,D,e,arguments[2])},setUint16:function(t,e){W(this,2,t,D,e,arguments[2])},setInt32:function(t,e){W(this,4,t,F,e,arguments[2])},setUint32:function(t,e){W(this,4,t,F,e,arguments[2])},setFloat32:function(t,e){W(this,4,t,U,e,arguments[2])},setFloat64:function(t,e){W(this,8,t,H,e,arguments[2])}});y(m,"ArrayBuffer"),y(x,"DataView"),s(x[b],a.VIEW,!0),e.ArrayBuffer=m,e.DataView=x},function(t,e){function n(e,o){return t.exports=n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},n(e,o)}t.exports=n},function(t,e,n){t.exports=!n(18)&&!n(10)((function(){return 7!=Object.defineProperty(n(82)("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var o=n(9),i=n(17),r=n(43),a=n(83),s=n(19).f;t.exports=function(t){var e=i.Symbol||(i.Symbol=r?{}:o.Symbol||{});"_"==t.charAt(0)||t in e||s(e,t,{value:a.f(t)})}},function(t,e,n){var o=n(25),i=n(27),r=n(68)(!1),a=n(84)("IE_PROTO");t.exports=function(t,e){var n,s=i(t),l=0,c=[];for(n in s)n!=a&&o(s,n)&&c.push(n);for(;e.length>l;)o(s,n=e[l++])&&(~r(c,n)||c.push(n));return c}},function(t,e,n){var o=n(19),i=n(11),r=n(44);t.exports=n(18)?Object.defineProperties:function(t,e){i(t);for(var n,a=r(e),s=a.length,l=0;s>l;)o.f(t,n=a[l++],e[n]);return t}},function(t,e,n){var o=n(27),i=n(47).f,r={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==r.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(o(t))}},function(t,e,n){"use strict";var o=n(18),i=n(44),r=n(69),a=n(62),s=n(20),l=n(61),c=Object.assign;t.exports=!c||n(10)((function(){var t={},e={},n=Symbol(),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=o}))?function(t,e){for(var n=s(t),c=arguments.length,u=1,d=r.f,f=a.f;c>u;)for(var h,p=l(arguments[u++]),v=d?i(p).concat(d(p)):i(p),g=v.length,y=0;g>y;)h=v[y++],o&&!f.call(p,h)||(n[h]=p[h]);return n}:c},function(t,e){t.exports=Object.is||function(t,e){return t===e?0!==t||1/t==1/e:t!=t&&e!=e}},function(t,e,n){"use strict";var o=n(30),i=n(12),r=n(116),a=[].slice,s={},l=function(t,e,n){if(!(e in s)){for(var o=[],i=0;i>>0||(a.test(n)?16:10))}:o},function(t,e,n){var o=n(9).parseFloat,i=n(53).trim;t.exports=1/o(n(88)+"-0")!=-1/0?function(t){var e=i(String(t),3),n=o(e);return 0===n&&"-"==e.charAt(0)?-0:n}:o},function(t,e,n){var o=n(35);t.exports=function(t,e){if("number"!=typeof t&&"Number"!=o(t))throw TypeError(e);return+t}},function(t,e,n){var o=n(12),i=Math.floor;t.exports=function(t){return!o(t)&&isFinite(t)&&i(t)===t}},function(t,e){t.exports=Math.log1p||function(t){return(t=+t)>-1e-8&&t<1e-8?t-t*t/2:Math.log(1+t)}},function(t,e,n){"use strict";var o=n(46),i=n(41),r=n(52),a={};n(26)(a,n(14)("iterator"),(function(){return this})),t.exports=function(t,e,n){t.prototype=o(a,{next:i(1,n)}),r(t,e+" Iterator")}},function(t,e,n){var o=n(11);t.exports=function(t,e,n,i){try{return i?e(o(n)[0],n[1]):e(n)}catch(e){var r=t.return;throw void 0!==r&&o(r.call(t)),e}}},function(t,e,n){var o=n(275);t.exports=function(t,e){return new(o(t))(e)}},function(t,e,n){var o=n(30),i=n(20),r=n(61),a=n(16);t.exports=function(t,e,n,s,l){o(e);var c=i(t),u=r(c),d=a(c.length),f=l?d-1:0,h=l?-1:1;if(n<2)for(;;){if(f in u){s=u[f],f+=h;break}if(f+=h,l?f<0:d<=f)throw TypeError("Reduce of empty array with no initial value")}for(;l?f>=0:d>f;f+=h)f in u&&(s=e(s,u[f],f,c));return s}},function(t,e,n){"use strict";var o=n(20),i=n(45),r=n(16);t.exports=[].copyWithin||function(t,e){var n=o(this),a=r(n.length),s=i(t,a),l=i(e,a),c=arguments.length>2?arguments[2]:void 0,u=Math.min((void 0===c?a:i(c,a))-l,a-s),d=1;for(l0;)l in n?n[s]=n[l]:delete n[s],s+=d,l+=d;return n}},function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){"use strict";var o=n(103);n(0)({target:"RegExp",proto:!0,forced:o!==/./.exec},{exec:o})},function(t,e,n){n(18)&&"g"!=/./g.flags&&n(19).f(RegExp.prototype,"flags",{configurable:!0,get:n(72)})},function(t,e,n){"use strict";var o,i,r,a,s=n(43),l=n(9),c=n(29),u=n(63),d=n(0),f=n(12),h=n(30),p=n(56),v=n(75),g=n(64),y=n(105).set,b=n(295)(),k=n(131),m=n(296),x=n(76),S=n(132),w=l.TypeError,E=l.process,T=E&&E.versions,B=T&&T.v8||"",C=l.Promise,_="process"==u(E),O=function(){},I=i=k.f,N=!!function(){try{var t=C.resolve(1),e=(t.constructor={})[n(14)("species")]=function(t){t(O,O)};return(_||"function"==typeof PromiseRejectionEvent)&&t.then(O)instanceof e&&0!==B.indexOf("6.6")&&-1===x.indexOf("Chrome/66")}catch(t){}}(),M=function(t){var e;return!(!f(t)||"function"!=typeof(e=t.then))&&e},L=function(t,e){if(!t._n){t._n=!0;var n=t._c;b((function(){for(var o=t._v,i=1==t._s,r=0,a=function(e){var n,r,a,s=i?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(i||(2==t._h&&R(t),t._h=1),!0===s?n=o:(u&&u.enter(),n=s(o),u&&(u.exit(),a=!0)),n===e.promise?c(w("Promise-chain cycle")):(r=M(n))?r.call(n,l,c):l(n)):c(o)}catch(t){u&&!a&&u.exit(),c(t)}};n.length>r;)a(n[r++]);t._c=[],t._n=!1,e&&!t._h&&A(t)}))}},A=function(t){y.call(l,(function(){var e,n,o,i=t._v,r=P(t);if(r&&(e=m((function(){_?E.emit("unhandledRejection",i,t):(n=l.onunhandledrejection)?n({promise:t,reason:i}):(o=l.console)&&o.error&&o.error("Unhandled promise rejection",i)})),t._h=_||P(t)?2:1),t._a=void 0,r&&e.e)throw e.v}))},P=function(t){return 1!==t._h&&0===(t._a||t._c).length},R=function(t){y.call(l,(function(){var e;_?E.emit("rejectionHandled",t):(e=l.onrejectionhandled)&&e({promise:t,reason:t._v})}))},j=function(t){var e=this;e._d||(e._d=!0,(e=e._w||e)._v=t,e._s=2,e._a||(e._a=e._c.slice()),L(e,!0))},D=function(t){var e,n=this;if(!n._d){n._d=!0,n=n._w||n;try{if(n===t)throw w("Promise can't be resolved itself");(e=M(t))?b((function(){var o={_w:n,_d:!1};try{e.call(t,c(D,o,1),c(j,o,1))}catch(t){j.call(o,t)}})):(n._v=t,n._s=1,L(n,!1))}catch(t){j.call({_w:n,_d:!1},t)}}};N||(C=function(t){p(this,C,"Promise","_h"),h(t),o.call(this);try{t(c(D,this,1),c(j,this,1))}catch(t){j.call(this,t)}},(o=function(t){this._c=[],this._a=void 0,this._s=0,this._d=!1,this._v=void 0,this._h=0,this._n=!1}).prototype=n(57)(C.prototype,{then:function(t,e){var n=I(g(this,C));return n.ok="function"!=typeof t||t,n.fail="function"==typeof e&&e,n.domain=_?E.domain:void 0,this._c.push(n),this._a&&this._a.push(n),this._s&&L(this,!1),n.promise},catch:function(t){return this.then(void 0,t)}}),r=function(){var t=new o;this.promise=t,this.resolve=c(D,t,1),this.reject=c(j,t,1)},k.f=I=function(t){return t===C||t===a?new r(t):i(t)}),d(d.G+d.W+d.F*!N,{Promise:C}),n(52)(C,"Promise"),n(55)("Promise"),a=n(17).Promise,d(d.S+d.F*!N,"Promise",{reject:function(t){var e=I(this);return(0,e.reject)(t),e.promise}}),d(d.S+d.F*(s||!N),"Promise",{resolve:function(t){return S(s&&this===a?C:this,t)}}),d(d.S+d.F*!(N&&n(71)((function(t){C.all(t).catch(O)}))),"Promise",{all:function(t){var e=this,n=I(e),o=n.resolve,i=n.reject,r=m((function(){var n=[],r=0,a=1;v(t,!1,(function(t){var s=r++,l=!1;n.push(void 0),a++,e.resolve(t).then((function(t){l||(l=!0,n[s]=t,--a||o(n))}),i)})),--a||o(n)}));return r.e&&i(r.v),n.promise},race:function(t){var e=this,n=I(e),o=n.reject,i=m((function(){v(t,!1,(function(t){e.resolve(t).then(n.resolve,o)}))}));return i.e&&o(i.v),n.promise}})},function(t,e,n){"use strict";var o=n(30);function i(t){var e,n;this.promise=new t((function(t,o){if(void 0!==e||void 0!==n)throw TypeError("Bad Promise constructor");e=t,n=o})),this.resolve=o(e),this.reject=o(n)}t.exports.f=function(t){return new i(t)}},function(t,e,n){var o=n(11),i=n(12),r=n(131);t.exports=function(t,e){if(o(t),i(e)&&e.constructor===t)return e;var n=r.f(t);return(0,n.resolve)(e),n.promise}},function(t,e,n){"use strict";var o=n(19).f,i=n(46),r=n(57),a=n(29),s=n(56),l=n(75),c=n(94),u=n(127),d=n(55),f=n(18),h=n(40).fastKey,p=n(50),v=f?"_s":"size",g=function(t,e){var n,o=h(e);if("F"!==o)return t._i[o];for(n=t._f;n;n=n.n)if(n.k==e)return n};t.exports={getConstructor:function(t,e,n,c){var u=t((function(t,o){s(t,u,e,"_i"),t._t=e,t._i=i(null),t._f=void 0,t._l=void 0,t[v]=0,null!=o&&l(o,n,t[c],t)}));return r(u.prototype,{clear:function(){for(var t=p(this,e),n=t._i,o=t._f;o;o=o.n)o.r=!0,o.p&&(o.p=o.p.n=void 0),delete n[o.i];t._f=t._l=void 0,t[v]=0},delete:function(t){var n=p(this,e),o=g(n,t);if(o){var i=o.n,r=o.p;delete n._i[o.i],o.r=!0,r&&(r.n=i),i&&(i.p=r),n._f==o&&(n._f=i),n._l==o&&(n._l=r),n[v]--}return!!o},forEach:function(t){p(this,e);for(var n,o=a(t,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(t){return!!g(p(this,e),t)}}),f&&o(u.prototype,"size",{get:function(){return p(this,e)[v]}}),u},def:function(t,e,n){var o,i,r=g(t,e);return r?r.v=n:(t._l=r={i:i=h(e,!0),k:e,v:n,p:o=t._l,n:void 0,r:!1},t._f||(t._f=r),o&&(o.n=r),t[v]++,"F"!==i&&(t._i[i]=r)),t},getEntry:g,setStrong:function(t,e,n){c(t,e,(function(t,n){this._t=p(t,e),this._k=n,this._l=void 0}),(function(){for(var t=this._k,e=this._l;e&&e.r;)e=e.p;return this._t&&(this._l=e=e?e.n:this._t._f)?u(0,"keys"==t?e.k:"values"==t?e.v:[e.k,e.v]):(this._t=void 0,u(1))}),n?"entries":"values",!n,!0),d(e)}}},function(t,e,n){"use strict";var o=n(57),i=n(40).getWeak,r=n(11),a=n(12),s=n(56),l=n(75),c=n(34),u=n(25),d=n(50),f=c(5),h=c(6),p=0,v=function(t){return t._l||(t._l=new g)},g=function(){this.a=[]},y=function(t,e){return f(t.a,(function(t){return t[0]===e}))};g.prototype={get:function(t){var e=y(this,t);if(e)return e[1]},has:function(t){return!!y(this,t)},set:function(t,e){var n=y(this,t);n?n[1]=e:this.a.push([t,e])},delete:function(t){var e=h(this.a,(function(e){return e[0]===t}));return~e&&this.a.splice(e,1),!!~e}},t.exports={getConstructor:function(t,e,n,r){var c=t((function(t,o){s(t,c,e,"_i"),t._t=e,t._i=p++,t._l=void 0,null!=o&&l(o,n,t[r],t)}));return o(c.prototype,{delete:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).delete(t):n&&u(n,this._i)&&delete n[this._i]},has:function(t){if(!a(t))return!1;var n=i(t);return!0===n?v(d(this,e)).has(t):n&&u(n,this._i)}}),c},def:function(t,e,n){var o=i(r(e),!0);return!0===o?v(t).set(e,n):o[t._i]=n,t},ufstore:v}},function(t,e,n){var o=n(31),i=n(16);t.exports=function(t){if(void 0===t)return 0;var e=o(t),n=i(e);if(e!==n)throw RangeError("Wrong length!");return n}},function(t,e,n){var o=n(47),i=n(69),r=n(11),a=n(9).Reflect;t.exports=a&&a.ownKeys||function(t){var e=o.f(r(t)),n=i.f;return n?e.concat(n(t)):e}},function(t,e,n){var o=n(16),i=n(90),r=n(36);t.exports=function(t,e,n,a){var s=String(r(t)),l=s.length,c=void 0===n?" ":String(n),u=o(e);if(u<=l||""==c)return s;var d=u-l,f=i.call(c,Math.ceil(d/c.length));return f.length>d&&(f=f.slice(0,d)),a?f+s:s+f}},function(t,e,n){var o=n(18),i=n(44),r=n(27),a=n(62).f;t.exports=function(t){return function(e){for(var n,s=r(e),l=i(s),c=l.length,u=0,d=[];c>u;)n=l[u++],o&&!a.call(s,n)||d.push(t?[n,s[n]]:s[n]);return d}}},function(t,e,n){var o=function(t){"use strict";var e,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},r=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function l(t,e,n,o){var i=e&&e.prototype instanceof v?e:v,r=Object.create(i.prototype),a=new C(o||[]);return r._invoke=function(t,e,n){var o=u;return function(i,r){if(o===f)throw new Error("Generator is already running");if(o===h){if("throw"===i)throw r;return O()}for(n.method=i,n.arg=r;;){var a=n.delegate;if(a){var s=E(a,n);if(s){if(s===p)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===u)throw o=h,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=f;var l=c(t,e,n);if("normal"===l.type){if(o=n.done?h:d,l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=h,n.method="throw",n.arg=l.arg)}}}(t,n,a),r}function c(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}t.wrap=l;var u="suspendedStart",d="suspendedYield",f="executing",h="completed",p={};function v(){}function g(){}function y(){}var b={};b[r]=function(){return this};var k=Object.getPrototypeOf,m=k&&k(k(_([])));m&&m!==n&&o.call(m,r)&&(b=m);var x=y.prototype=v.prototype=Object.create(b);function S(t){["next","throw","return"].forEach((function(e){t[e]=function(t){return this._invoke(e,t)}}))}function w(t){var e;this._invoke=function(n,i){function r(){return new Promise((function(e,r){!function e(n,i,r,a){var s=c(t[n],t,i);if("throw"!==s.type){var l=s.arg,u=l.value;return u&&"object"==typeof u&&o.call(u,"__await")?Promise.resolve(u.__await).then((function(t){e("next",t,r,a)}),(function(t){e("throw",t,r,a)})):Promise.resolve(u).then((function(t){l.value=t,r(l)}),(function(t){return e("throw",t,r,a)}))}a(s.arg)}(n,i,e,r)}))}return e=e?e.then(r,r):r()}}function E(t,n){var o=t.iterator[n.method];if(o===e){if(n.delegate=null,"throw"===n.method){if(t.iterator.return&&(n.method="return",n.arg=e,E(t,n),"throw"===n.method))return p;n.method="throw",n.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=c(o,t.iterator,n.arg);if("throw"===i.type)return n.method="throw",n.arg=i.arg,n.delegate=null,p;var r=i.arg;return r?r.done?(n[t.resultName]=r.value,n.next=t.nextLoc,"return"!==n.method&&(n.method="next",n.arg=e),n.delegate=null,p):r:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,p)}function T(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function B(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(T,this),this.reset(!0)}function _(t){if(t){var n=t[r];if(n)return n.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function n(){for(;++i=0;--r){var a=this.tryEntries[r],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var l=o.call(a,"catchLoc"),c=o.call(a,"finallyLoc");if(l&&c){if(this.prev=0;--n){var i=this.tryEntries[n];if(i.tryLoc<=this.prev&&o.call(i,"finallyLoc")&&this.prev=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),B(n),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var o=n.completion;if("throw"===o.type){var i=o.arg;B(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,n,o){return this.delegate={iterator:_(t),resultName:n,nextLoc:o},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=o}catch(t){Function("r","regeneratorRuntime = r")(o)}},function(t){t.exports=JSON.parse('{"ui":{"blockTunes":{"toggler":{"Click to tune":"","or drag to move":""}},"inlineToolbar":{"converter":{"Convert to":""}},"toolbar":{"toolbox":{"Add":""}}},"toolNames":{"Text":"","Link":"","Bold":"","Italic":""},"tools":{"link":{"Add a link":""},"stub":{"The block can not be displayed correctly.":""}},"blockTunes":{"delete":{"Delete":""},"moveUp":{"Move up":""},"moveDown":{"Move down":""}}}')},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(5),n(4),n(6),n(366)],void 0===(r="function"==typeof(o=function(t,e,o,i,r,a){"use strict";var s=n(1);Object.defineProperty(t,"__esModule",{value:!0}),t.CriticalError=void 0,e=s(e),o=s(o),i=s(i),r=s(r);var l=function(t){function n(){return(0,e.default)(this,n),(0,o.default)(this,(0,i.default)(n).apply(this,arguments))}return(0,r.default)(n,t),n}((0,(a=s(a)).default)(Error));t.CriticalError=l,l.displayName="CriticalError"})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(8),n(143),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=f(c),u=h(u);var p=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).insert=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.config.defaultBlock,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=(arguments.length>2&&void 0!==arguments[2]&&arguments[2],arguments.length>3?arguments[3]:void 0),i=arguments.length>4?arguments[4]:void 0;t.Editor.BlockManager.insert({tool:e,data:n,index:o,needToFocus:i})},t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"getBlocksCount",value:function(){return this.Editor.BlockManager.blocks.length}},{key:"getCurrentBlockIndex",value:function(){return this.Editor.BlockManager.currentBlockIndex}},{key:"getBlockByIndex",value:function(t){var e=this.Editor.BlockManager.getBlockByIndex(t);if(void 0!==e)return new u.default(e);c.logLabeled("There is no block at index `"+t+"`","warn")}},{key:"swap",value:function(t,e){c.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(t,e),this.Editor.Toolbar.move(!1)}},{key:"move",value:function(t,e){this.Editor.BlockManager.move(t,e),this.Editor.Toolbar.move(!1)}},{key:"delete",value:function(t){try{this.Editor.BlockManager.removeBlock(t)}catch(t){return void c.logLabeled(t,"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(t){return this.Editor.BlockManager.clear(),this.Editor.Renderer.render(t.blocks)}},{key:"renderFromHTML",value:function(t){return this.Editor.BlockManager.clear(),this.Editor.Paste.processText(t,!0)}},{key:"stretchBlock",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];c.deprecationAssert(!0,"blocks.stretchBlock()","BlockAPI");var n=this.Editor.BlockManager.getBlockByIndex(t);n&&(n.stretched=e)}},{key:"insertNewBlock",value:function(){c.log("Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.","warn"),this.insert()}},{key:"methods",get:function(){var t=this;return{clear:function(){return t.clear()},render:function(e){return t.render(e)},renderFromHTML:function(e){return t.renderFromHTML(e)},delete:function(e){return t.delete(e)},swap:function(e,n){return t.swap(e,n)},move:function(e,n){return t.move(e,n)},getBlockByIndex:function(e){return t.getBlockByIndex(e)},getCurrentBlockIndex:function(){return t.getCurrentBlockIndex()},getBlocksCount:function(){return t.getBlocksCount()},stretchBlock:function(e){var n=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];return t.stretchBlock(e,n)},insertNewBlock:function(){return t.insertNewBlock()},insert:this.insert}}}]),e}((d=h(d)).default);o.default=p,p.displayName="BlocksAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e],void 0===(r="function"==typeof(o=function(n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.default=void 0;var o=function(t){var e={get name(){return t.name},get config(){return t.config},get holder(){return t.holder},get isEmpty(){return t.isEmpty},get selected(){return t.selected},set stretched(e){t.stretched=e},get stretched(){return t.stretched},call:function(e,n){return t.call(e,n)},save:function(){return t.save()},validate:function(e){return t.validate(e)}};Object.setPrototypeOf(this,e)};n.default=o,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).setToFirstBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.firstBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.firstBlock,e,n),!0)},t.setToLastBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.lastBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.lastBlock,e,n),!0)},t.setToPreviousBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.previousBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.previousBlock,e,n),!0)},t.setToNextBlock=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:t.Editor.Caret.positions.DEFAULT,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0;return!!t.Editor.BlockManager.nextBlock&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.nextBlock,e,n),!0)},t.setToBlock=function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.Editor.Caret.positions.DEFAULT,o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0;return!!t.Editor.BlockManager.blocks[e]&&(t.Editor.Caret.setToBlock(t.Editor.BlockManager.blocks[e],n,o),!0)},t.focus=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?t.setToLastBlock(t.Editor.Caret.positions.END):t.setToFirstBlock(t.Editor.Caret.positions.START)},t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"methods",get:function(){return{setToFirstBlock:this.setToFirstBlock,setToLastBlock:this.setToLastBlock,setToPreviousBlock:this.setToPreviousBlock,setToNextBlock:this.setToNextBlock,setToBlock:this.setToBlock,focus:this.focus}}}]),e}((c=u(c)).default);o.default=d,d.displayName="CaretAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"on",value:function(t,e){this.Editor.Events.on(t,e)}},{key:"emit",value:function(t,e){this.Editor.Events.emit(t,e)}},{key:"off",value:function(t,e){this.Editor.Events.off(t,e)}},{key:"methods",get:function(){var t=this;return{emit:function(e,n){return t.emit(e,n)},off:function(e,n){return t.off(e,n)},on:function(e,n){return t.on(e,n)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="EventsAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(58),n(66),n(8),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c);var p=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"getMethodsForTool",value:function(t,n){return Object.assign(this.methods,{t:function(o){return c.default.t(e.getNamespace(t,n),o)}})}},{key:"methods",get:function(){return{t:function(){(0,d.logLabeled)("I18n.t() method can be accessed only from Tools","warn")}}}}],[{key:"getNamespace",value:function(t,e){switch(e){case u.ToolType.Block:case u.ToolType.Inline:return"tools.".concat(t);case u.ToolType.Tune:return"blockTunes.".concat(t)}}}]),e}((f=h(f)).default);o.default=p,p.displayName="I18nAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"open",value:function(){this.Editor.InlineToolbar.tryToShow()}},{key:"close",value:function(){this.Editor.InlineToolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="InlineToolbarAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"on",value:function(t,e,n,o){this.Editor.Listeners.on(t,e,n,o)}},{key:"off",value:function(t,e,n,o){this.Editor.Listeners.off(t,e,n,o)}},{key:"methods",get:function(){var t=this;return{on:function(e,n,o,i){return t.on(e,n,o,i)},off:function(e,n,o,i){return t.off(e,n,o,i)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="ListenersAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t){return this.Editor.Notifier.show(t)}},{key:"methods",get:function(){var t=this;return{show:function(e){return t.show(e)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="NotifierAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"toggle",value:function(t){return this.Editor.ReadOnly.toggle(t)}},{key:"methods",get:function(){var t=this;return{toggle:function(e){return t.toggle(e)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="ReadOnlyAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"clean",value:function(t,e){return this.Editor.Sanitizer.clean(t,e)}},{key:"methods",get:function(){var t=this;return{clean:function(e,n){return t.clean(e,n)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="SanitizerAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(8),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(13),f=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=f(i),r=f(r),a=f(a),s=f(s),l=f(l),c=d(c);var h=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"save",value:function(){var t="Editor's content can not be saved in read-only mode";return this.Editor.ReadOnly.isEnabled?(c.logLabeled(t,"warn"),Promise.reject(new Error(t))):this.Editor.Saver.save()}},{key:"methods",get:function(){var t=this;return{save:function(){return t.save()}}}}]),e}((u=f(u)).default);o.default=h,h.displayName="SaverAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(24),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c);var f=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"findParentTag",value:function(t,e){return(new c.default).findParentTag(t,e)}},{key:"expandToTag",value:function(t){(new c.default).expandToTag(t)}},{key:"methods",get:function(){var t=this;return{findParentTag:function(e,n){return t.findParentTag(e,n)},expandToTag:function(e){return t.expandToTag(e)}}}}]),e}((u=d(u)).default);o.default=f,f.displayName="SelectionAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{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"}}}]),e}((c=u(c)).default);o.default=d,d.displayName="StylesAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"open",value:function(){this.Editor.Toolbar.open()}},{key:"close",value:function(){this.Editor.Toolbar.close()}},{key:"methods",get:function(){var t=this;return{close:function(){return t.close()},open:function(){return t.open()}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="ToolbarAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t,e,n){this.Editor.Tooltip.show(t,e,n)}},{key:"hide",value:function(){this.Editor.Tooltip.hide()}},{key:"onHover",value:function(t,e,n){this.Editor.Tooltip.onHover(t,e,n)}},{key:"methods",get:function(){var t=this;return{show:function(e,n,o){return t.show(e,n,o)},hide:function(){return t.hide()},onHover:function(e,n,o){return t.onHover(e,n,o)}}}}]),e}((c=u(c)).default);o.default=d,d.displayName="TooltipAPI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(8),n(24),n(59)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(13),p=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=p(i),r=p(r),a=p(a),s=p(s),l=p(l),c=p(c),u=h(u),d=p(d),f=p(f);var v=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"keydown",value:function(t){switch(this.beforeKeydownProcessing(t),t.keyCode){case u.keyCodes.BACKSPACE:this.backspace(t);break;case u.keyCodes.ENTER:this.enter(t);break;case u.keyCodes.DOWN:case u.keyCodes.RIGHT:this.arrowRightAndDown(t);break;case u.keyCodes.UP:case u.keyCodes.LEFT:this.arrowLeftAndUp(t);break;case u.keyCodes.DELETE:this.deletePressed(t);break;case u.keyCodes.TAB:this.tabPressed(t)}}},{key:"beforeKeydownProcessing",value:function(t){this.needToolbarClosing(t)&&u.isPrintableKey(t.keyCode)&&(this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close(),t.ctrlKey||t.metaKey||t.altKey||t.shiftKey||(this.Editor.BlockManager.clearFocused(),this.Editor.BlockSelection.clearSelection(t)))}},{key:"keyup",value:function(t){t.shiftKey||this.Editor.UI.checkEmptiness()}},{key:"deletePressed",value:function(t){var e,n=this.Editor,o=n.BlockManager,i=n.BlockSelection,r=n.Caret,a=o.currentBlock,s=this.Editor.Tools.available[a.name];if(a.selected||a.isEmpty&&a.currentInput===a.lastInput){t.preventDefault();var l=o.currentBlockIndex;return o.nextBlock&&0===o.nextBlock.inputs.length?o.removeBlock(l+1):o.removeBlock(),r.setToBlock(null!=(e=o.nextBlock)?e:o.currentBlock,l?r.positions.START:r.positions.END),this.Editor.Toolbar.close(),void i.clearSelection(t)}if(!s||!s[this.Editor.Tools.INTERNAL_SETTINGS.IS_ENABLED_LINE_BREAKS]||r.isAtEnd){var c=o.currentBlockIndex===o.blocks.length-1;r.isAtEnd&&d.default.isCollapsed&&a.currentInput===a.lastInput&&!c&&(t.preventDefault(),this.mergeBlocks(!0))}}},{key:"tabPressed",value:function(t){this.Editor.BlockSelection.clearSelection(t);var e=this.Editor,n=e.BlockManager,o=e.Tools,i=e.InlineToolbar,r=e.ConversionToolbar,a=n.currentBlock;if(a){var s=o.isDefault(a.tool)&&a.isEmpty,l=!a.isEmpty&&r.opened,c=!a.isEmpty&&!d.default.isCollapsed&&i.opened;s?this.activateToolbox():l||c||this.activateBlockSettings()}}},{key:"dragOver",value:function(t){this.Editor.BlockManager.getBlockByChildNode(t.target).dropTarget=!0}},{key:"dragLeave",value:function(t){this.Editor.BlockManager.getBlockByChildNode(t.target).dropTarget=!1}},{key:"handleCommandC",value:function(t){var e=this.Editor.BlockSelection;e.anyBlockSelected&&e.copySelectedBlocks(t)}},{key:"handleCommandX",value:function(t){var e=this.Editor,n=e.BlockSelection,o=e.BlockManager,i=e.Caret;if(n.anyBlockSelected){n.copySelectedBlocks(t);var r=o.removeSelectedBlocks();i.setToBlock(o.insertDefaultBlockAtIndex(r,!0),i.positions.START),n.clearSelection(t)}}},{key:"enter",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.Tools,i=e.UI,r=n.currentBlock,a=o.available[r.name];if(!(a&&a[o.INTERNAL_SETTINGS.IS_ENABLED_LINE_BREAKS]||i.someToolbarOpened&&i.someFlipperButtonFocused||t.shiftKey)){var s=this.Editor.BlockManager.currentBlock;this.Editor.Caret.isAtStart&&!this.Editor.BlockManager.currentBlock.hasMedia?this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex):s=this.Editor.BlockManager.split(),this.Editor.Caret.setToBlock(s),this.Editor.Tools.isDefault(s.tool)&&s.isEmpty&&(this.Editor.Toolbar.open(!1),this.Editor.Toolbar.plusButton.show()),t.preventDefault()}}},{key:"backspace",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.BlockSelection,i=e.Caret,r=n.currentBlock,a=this.Editor.Tools.available[r.name];if(r.selected||r.isEmpty&&r.currentInput===r.firstInput){t.preventDefault();var s=n.currentBlockIndex;return n.previousBlock&&0===n.previousBlock.inputs.length?n.removeBlock(s-1):n.removeBlock(),i.setToBlock(n.currentBlock,s?i.positions.END:i.positions.START),this.Editor.Toolbar.close(),void o.clearSelection(t)}if(!a||!a[this.Editor.Tools.INTERNAL_SETTINGS.IS_ENABLED_LINE_BREAKS]||i.isAtStart){var l=0===n.currentBlockIndex;i.isAtStart&&d.default.isCollapsed&&r.currentInput===r.firstInput&&!l&&(t.preventDefault(),this.mergeBlocks())}}},{key:"mergeBlocks",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor,n=e.BlockManager,o=e.Caret,i=e.Toolbar,r=t?n.currentBlock:n.previousBlock,a=t?n.nextBlock:n.currentBlock;if(a.name!==r.name||!r.mergeable)return 0===r.inputs.length||r.isEmpty?(n.removeBlock(n.currentBlockIndex-1),o.setToBlock(n.currentBlock),void i.close()):void((t?o.navigateNext():o.navigatePrevious())&&i.close());o.createShadow(r.pluginsContent),n.mergeBlocks(r,a).then((function(){o.restoreCaret(r.pluginsContent),r.pluginsContent.normalize(),i.close()}))}},{key:"arrowRightAndDown",value:function(t){var e=this,n=f.default.usedKeys.includes(t.keyCode)&&(!t.shiftKey||t.keyCode===u.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;t.shiftKey&&t.keyCode===u.keyCodes.DOWN&&o?this.Editor.CrossBlockSelection.toggleBlockSelectedState():((t.keyCode===u.keyCodes.DOWN||t.keyCode===u.keyCodes.RIGHT&&!this.isRtl?this.Editor.Caret.navigateNext():this.Editor.Caret.navigatePrevious())?t.preventDefault():u.delay((function(){e.Editor.BlockManager.currentBlock&&e.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(t))}}},{key:"arrowLeftAndUp",value:function(t){var e=this;if(this.Editor.UI.someToolbarOpened){if(f.default.usedKeys.includes(t.keyCode)&&(!t.shiftKey||t.keyCode===u.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;t.shiftKey&&t.keyCode===u.keyCodes.UP&&n?this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1):((t.keyCode===u.keyCodes.UP||t.keyCode===u.keyCodes.LEFT&&!this.isRtl?this.Editor.Caret.navigatePrevious():this.Editor.Caret.navigateNext())?t.preventDefault():u.delay((function(){e.Editor.BlockManager.currentBlock&&e.Editor.BlockManager.currentBlock.updateCurrentInput()}),20)(),this.Editor.BlockSelection.clearSelection(t))}},{key:"needToolbarClosing",value:function(t){var e=t.keyCode===u.keyCodes.ENTER&&this.Editor.Toolbox.opened,n=t.keyCode===u.keyCodes.ENTER&&this.Editor.BlockSettings.opened,o=t.keyCode===u.keyCodes.ENTER&&this.Editor.InlineToolbar.opened,i=t.keyCode===u.keyCodes.ENTER&&this.Editor.ConversionToolbar.opened,r=t.keyCode===u.keyCodes.TAB;return!(t.shiftKey||r||e||n||o||i)}},{key:"activateToolbox",value:function(){this.Editor.Toolbar.opened||(this.Editor.Toolbar.open(!1,!1),this.Editor.Toolbar.plusButton.show()),this.Editor.Toolbox.open()}},{key:"activateBlockSettings",value:function(){this.Editor.Toolbar.opened||(this.Editor.BlockManager.currentBlock.focused=!0,this.Editor.Toolbar.open(!0,!1),this.Editor.Toolbar.plusButton.hide()),this.Editor.BlockSettings.opened||this.Editor.BlockSettings.open()}}]),e}(c.default);o.default=v,v.displayName="BlockEvents",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(60),n(7),n(15),n(8),n(379)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p){"use strict";var v=n(13),g=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=g(i),r=g(r),a=g(a),s=g(s),l=g(l),c=g(c),u=v(u),d=g(d),f=g(f),h=v(h),p=g(p);var y=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments)))._currentBlockIndex=-1,t._blocks=null,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"prepare",value:function(){var t=this,e=new p.default(this.Editor.UI.nodes.redactor);this._blocks=new Proxy(e,{set:p.default.set,get:p.default.get}),this.Editor.Listeners.on(document,"copy",(function(e){return t.Editor.BlockEvents.handleCommandC(e)}))}},{key:"toggleReadOnly",value:function(t){t?this.disableModuleBindings():this.enableModuleBindings()}},{key:"composeBlock",value:function(t){var e=t.tool,n=t.data,o=void 0===n?{}:n,i=this.Editor.ReadOnly.isEnabled,r=this.Editor.Tools.getToolSettings(e),a=this.Editor.Tools.available[e],s=new u.default({name:e,data:o,Tool:a,settings:r,api:this.Editor.API,readOnly:i});return i||this.bindBlockEvents(s),s}},{key:"insert",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.tool,n=void 0===e?this.config.defaultBlock:e,o=t.data,i=void 0===o?{}:o,r=t.index,a=t.needToFocus,s=void 0===a||a,l=t.replace,c=void 0!==l&&l,u=r;void 0===u&&(u=this.currentBlockIndex+(c?0:1));var d=this.composeBlock({tool:n,data:i});return this._blocks.insert(u,d,c),s?this.currentBlockIndex=u:u<=this.currentBlockIndex&&this.currentBlockIndex++,d}},{key:"replace",value:function(t){var e=t.tool,n=void 0===e?this.config.defaultBlock:e,o=t.data,i=void 0===o?{}:o;return this.insert({tool:n,data:i,index:this.currentBlockIndex,replace:!0})}},{key:"paste",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],o=this.insert({tool:t,replace:n});try{o.call(u.BlockToolAPI.ON_PASTE,e)}catch(e){h.log("".concat(t,": onPaste callback call is failed"),"error",e)}return o}},{key:"insertDefaultBlockAtIndex",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.composeBlock({tool:this.config.defaultBlock});return this._blocks[t]=n,e?this.currentBlockIndex=t:t<=this.currentBlockIndex&&this.currentBlockIndex++,n}},{key:"insertAtEnd",value:function(){return this.currentBlockIndex=this.blocks.length-1,this.insert()}},{key:"mergeBlocks",value:function(t,e){var n,o;return i.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=this._blocks.indexOf(e),!e.isEmpty){r.next=5;break}return this.removeBlock(n),this.currentBlockIndex=this._blocks.indexOf(t),r.abrupt("return");case 5:return r.next=7,i.default.awrap(e.data);case 7:if(o=r.sent,h.isEmpty(o)){r.next=11;break}return r.next=11,i.default.awrap(t.mergeWith(o));case 11:this.removeBlock(n),this.currentBlockIndex=this._blocks.indexOf(t);case 13:case"end":return r.stop()}}),null,this)}},{key:"removeBlock",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.currentBlockIndex;if(!this.validateIndex(t))throw new Error("Can't find a Block to remove");this._blocks.remove(t),this.currentBlockIndex>=t&&this.currentBlockIndex--,this.blocks.length?0===t&&(this.currentBlockIndex=0):(this.currentBlockIndex=-1,this.insert())}},{key:"removeFocusedBlocks",value:function(){for(var t,e=this.blocks.length-1;e>=0;e--)this.blocks[e].focused&&(this.removeBlock(e),t=e);return t}},{key:"removeSelectedBlocks",value:function(){for(var t,e=this.blocks.length-1;e>=0;e--)this.blocks[e].selected&&(this.removeBlock(e),t=e);return t}},{key:"removeAllBlocks",value:function(){for(var t=this.blocks.length-1;t>=0;t--)this._blocks.remove(t);this.currentBlockIndex=-1,this.insert(),this.currentBlock.firstInput.focus()}},{key:"split",value:function(){var t=this.Editor.Caret.extractFragmentFromCaretPosition(),e=f.default.make("div");e.appendChild(t);var n={text:f.default.isEmpty(e)?"":e.innerHTML};return this.insert({data:n})}},{key:"getBlockByIndex",value:function(t){return this._blocks[t]}},{key:"getBlock",value:function(t){f.default.isElement(t)||(t=t.parentNode);var e=this._blocks.nodes,n=t.closest(".".concat(u.default.CSS.wrapper)),o=e.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(t){t.focused=!1}))}},{key:"setCurrentBlockByChildNode",value:function(t){f.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(u.default.CSS.wrapper));if(e)return this.currentBlockIndex=this._blocks.nodes.indexOf(e),this.currentBlock.updateCurrentInput(),this.currentBlock;throw new Error("Can not find a Block from this child Node")}},{key:"getBlockByChildNode",value:function(t){f.default.isElement(t)||(t=t.parentNode);var e=t.closest(".".concat(u.default.CSS.wrapper));return this.blocks.find((function(t){return t.holder===e}))}},{key:"swap",value:function(t,e){this._blocks.swap(t,e),this.currentBlockIndex=e}},{key:"move",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.currentBlockIndex;isNaN(t)||isNaN(e)?h.log("Warning during 'move' call: incorrect indices provided.","warn"):this.validateIndex(t)&&this.validateIndex(e)?(this._blocks.move(t,e),this.currentBlockIndex=t):h.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 t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this._blocks.removeAll(),this.dropPointer(),t&&this.insert(),this.Editor.UI.checkEmptiness()}},{key:"destroy",value:function(){return i.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,i.default.awrap(Promise.all(this.blocks.map((function(t){if(h.isFunction(t.tool.destroy))return t.tool.destroy()}))));case 2:case"end":return t.stop()}}),null,this)}},{key:"bindBlockEvents",value:function(t){var e=this.Editor.BlockEvents;this.readOnlyMutableListeners.on(t.holder,"keydown",(function(t){e.keydown(t)}),!0),this.readOnlyMutableListeners.on(t.holder,"keyup",(function(t){e.keyup(t)})),this.readOnlyMutableListeners.on(t.holder,"dragover",(function(t){e.dragOver(t)})),this.readOnlyMutableListeners.on(t.holder,"dragleave",(function(t){e.dragLeave(t)}))}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"enableModuleBindings",value:function(){var t=this;this.readOnlyMutableListeners.on(document,"cut",(function(e){return t.Editor.BlockEvents.handleCommandX(e)})),this.blocks.forEach((function(e){t.bindBlockEvents(e)}))}},{key:"validateIndex",value:function(t){return!(t<0||t>=this._blocks.length)}},{key:"currentBlockIndex",get:function(){return this._currentBlockIndex},set:function(t){this._blocks[this._currentBlockIndex]&&this._blocks[this._currentBlockIndex].willUnselect(),this._blocks[t]&&this._blocks[t].willSelect(),this._currentBlockIndex=t}},{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]}},{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(t){return!!t.inputs.length}))}},{key:"previousContentfulBlock",get:function(){return this.blocks.slice(0,this.currentBlockIndex).reverse().find((function(t){return!!t.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(t){return t.isEmpty}))}}]),e}(d.default);o.default=y,y.displayName="BlockManager",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(7),n(8),n(15),n(24)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h){"use strict";var p=n(13),v=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=v(i),r=v(r),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),d=p(d),f=v(f),h=v(h);var g=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments))).anyBlockSelectedCache=null,t.needToSelectAll=!1,t.nativeInputSelected=!1,t.readyToBlockSelection=!1,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"prepare",value:function(){var t=this,e=this.Editor.Shortcuts;this.selection=new h.default,e.add({name:"CMD+A",handler:function(e){var n=t.Editor,o=n.BlockManager;if(n.ReadOnly.isEnabled)return e.preventDefault(),void t.selectAllBlocks();o.currentBlock&&t.handleCommandA(e)}})}},{key:"toggleReadOnly",value:function(t){h.default.get().removeAllRanges(),this.allBlocksSelected=!1}},{key:"unSelectBlockByIndex",value:function(t){var e=this.Editor.BlockManager;(isNaN(t)?e.currentBlock:e.getBlockByIndex(t)).selected=!1,this.clearCache()}},{key:"clearSelection",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=this.Editor,o=n.BlockManager,i=n.Caret,r=n.RectangleSelection;this.needToSelectAll=!1,this.nativeInputSelected=!1,this.readyToBlockSelection=!1;var a=t&&t instanceof KeyboardEvent,s=a&&d.isPrintableKey(t.keyCode);if(this.anyBlockSelected&&a&&s&&!h.default.isSelectionExists){var l=o.removeSelectedBlocks();o.insertDefaultBlockAtIndex(l,!0),i.setToBlock(o.currentBlock),d.delay((function(){var e=t.key;i.insertContentAtCaretPosition(e.length>1?"":e)}),20)()}this.Editor.CrossBlockSelection.clear(t),this.anyBlockSelected&&!r.isRectActivated()?(e&&this.selection.restore(),this.allBlocksSelected=!1):this.Editor.RectangleSelection.clearSelection()}},{key:"copySelectedBlocks",value:function(t){var e,n,o,r,a=this;return i.default.async((function(s){for(;;)switch(s.prev=s.next){case 0:return t.preventDefault(),e=f.default.make("div"),this.selectedBlocks.forEach((function(t){var n=a.Editor.Sanitizer.clean(t.holder.innerHTML,a.sanitizerConfig),o=f.default.make("p");o.innerHTML=n,e.appendChild(o)})),s.next=5,i.default.awrap(Promise.all(this.selectedBlocks.map((function(t){return t.save()}))));case 5:n=s.sent,o=Array.from(e.childNodes).map((function(t){return t.textContent})).join("\n\n"),r=e.innerHTML,t.clipboardData.setData("text/plain",o),t.clipboardData.setData("text/html",r),t.clipboardData.setData(this.Editor.Paste.MIME_TYPE,JSON.stringify(n));case 11:case"end":return s.stop()}}),null,this)}},{key:"selectBlockByIndex",value:function(t){var e,n=this.Editor.BlockManager;n.clearFocused(),e=isNaN(t)?n.currentBlock:n.getBlockByIndex(t),this.selection.save(),h.default.get().removeAllRanges(),e.selected=!0,this.clearCache(),this.Editor.InlineToolbar.close()}},{key:"clearCache",value:function(){this.anyBlockSelectedCache=null}},{key:"destroy",value:function(){this.Editor.Shortcuts.remove("CMD+A")}},{key:"handleCommandA",value:function(t){if(this.Editor.RectangleSelection.clearSelection(),!f.default.isNativeInput(t.target)||this.readyToBlockSelection){var e=this.Editor.BlockManager.getBlock(t.target).inputs;e.length>1&&!this.readyToBlockSelection?this.readyToBlockSelection=!0:1!==e.length||this.needToSelectAll?this.needToSelectAll?(t.preventDefault(),this.selectAllBlocks(),this.needToSelectAll=!1,this.readyToBlockSelection=!1,this.Editor.ConversionToolbar.close()):this.readyToBlockSelection&&(t.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()}},{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(t){return!0===t.selected}))},set:function(t){this.Editor.BlockManager.blocks.forEach((function(e){e.selected=t})),this.clearCache()}},{key:"anyBlockSelected",get:function(){var t=this.Editor.BlockManager;return null===this.anyBlockSelectedCache&&(this.anyBlockSelectedCache=t.blocks.some((function(t){return!0===t.selected}))),this.anyBlockSelectedCache}},{key:"anyBlockFocused",get:function(){return this.Editor.BlockManager.blocks.some((function(t){return!0===t.focused}))}},{key:"selectedBlocks",get:function(){return this.Editor.BlockManager.blocks.filter((function(t){return t.selected}))}}]),e}(u.default);o.default=g,g.displayName="BlockSelection",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(24),n(7),n(15),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(13),p=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=p(i),r=p(r),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),d=p(d),f=h(f);var v=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"setToBlock",value:function(t){var e,n=this,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:this.positions.DEFAULT,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=this.Editor.BlockManager;switch(o){case this.positions.START:e=t.firstInput;break;case this.positions.END:e=t.lastInput;break;default:e=t.currentInput}if(e){var a=d.default.getDeepestNode(e,o===this.positions.END),s=d.default.getContentLength(a);switch(!0){case o===this.positions.START:i=0;break;case o===this.positions.END:case i>s:i=s}f.delay((function(){n.set(a,i)}),20)(),r.setCurrentBlockByChildNode(t.holder),r.currentBlock.currentInput=e}}},{key:"setToInput",value:function(t){var e=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,i=d.default.getDeepestNode(t);switch(e){case this.positions.START:this.set(i,0);break;case this.positions.END:this.set(i,d.default.getContentLength(i));break;default:n&&this.set(i,n)}o.currentInput=t}},{key:"set",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=c.default.setCursor(t,e),o=n.top,i=n.bottom,r=window,a=r.innerHeight;o<0&&window.scrollBy(0,o),i>a&&window.scrollBy(0,i-a)}},{key:"setToTheLastBlock",value:function(){var t=this.Editor.BlockManager.lastBlock;if(t)if(this.Editor.Tools.isDefault(t.tool)&&t.isEmpty)this.setToBlock(t);else{var e=this.Editor.BlockManager.insertAtEnd();this.setToBlock(e)}}},{key:"extractFragmentFromCaretPosition",value:function(){var t=c.default.get();if(t.rangeCount){var e=t.getRangeAt(0),n=this.Editor.BlockManager.currentBlock.currentInput;if(e.deleteContents(),n){if(d.default.isNativeInput(n)){var o=n,i=document.createDocumentFragment(),r=o.value.substring(0,o.selectionStart),a=o.value.substring(o.selectionStart);return i.textContent=a,o.value=r,i}var s=e.cloneRange();return s.selectNodeContents(n),s.setStart(e.endContainer,e.endOffset),s.extractContents()}}}},{key:"navigateNext",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor,n=e.BlockManager,o=e.Tools,i=n.currentBlock,r=n.nextContentfulBlock,a=i.nextInput,s=r;if(!s&&!a){if(o.isDefault(i.tool))return!1;s=n.insertAtEnd()}return!(!t&&!this.isAtEnd||(a?this.setToInput(a,this.positions.START):this.setToBlock(s,this.positions.START),0))}},{key:"navigatePrevious",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=this.Editor.BlockManager,n=e.currentBlock,o=e.previousContentfulBlock;if(!n)return!1;var i=n.previousInput;return!(!o&&!i||!t&&!this.isAtStart||(i?this.setToInput(i,this.positions.END):this.setToBlock(o,this.positions.END),0))}},{key:"createShadow",value:function(t){var n=document.createElement("span");n.classList.add(e.CSS.shadowCaret),t.insertAdjacentElement("beforeend",n)}},{key:"restoreCaret",value:function(t){var n=t.querySelector(".".concat(e.CSS.shadowCaret));n&&((new c.default).expandToTag(n),setTimeout((function(){var t=document.createRange();t.selectNode(n),t.extractContents()}),50))}},{key:"insertContentAtCaretPosition",value:function(t){var e=document.createDocumentFragment(),n=document.createElement("div"),o=c.default.get(),i=c.default.range;n.innerHTML=t,Array.from(n.childNodes).forEach((function(t){return e.appendChild(t)})),0===e.childNodes.length&&e.appendChild(new Text(""));var r=e.lastChild;i.deleteContents(),i.insertNode(e);var a=document.createRange();a.setStart(r,r.textContent.length),o.removeAllRanges(),o.addRange(a)}},{key:"getHigherLevelSiblings",value:function(t,e){for(var n=t,o=[];n.parentNode&&"true"!==n.parentNode.contentEditable;)n=n.parentNode;for(var i="left"===e?"previousSibling":"nextSibling";n[i];)n=n[i],o.push(n);return o}},{key:"positions",get:function(){return{START:"start",END:"end",DEFAULT:"default"}}},{key:"isAtStart",get:function(){var t=c.default.get(),e=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput),n=t.focusNode;if(d.default.isNativeInput(e))return 0===e.selectionEnd;if(!t.anchorNode)return!1;var o=n.textContent.search(/\S/);-1===o&&(o=0);var i=t.focusOffset;return n.nodeType!==Node.TEXT_NODE&&n.childNodes.length&&(n.childNodes[i]?(n=n.childNodes[i],i=0):i=(n=n.childNodes[i-1]).textContent.length),!(!d.default.isLineBreakTag(e)&&!d.default.isEmpty(e)||!this.getHigherLevelSiblings(n,"left").every((function(t){var e=d.default.isLineBreakTag(t),n=1===t.children.length&&d.default.isLineBreakTag(t.children[0]),o=e||n;return d.default.isEmpty(t)&&!o}))||i!==o)||(null===e||n===e&&i<=o)}},{key:"isAtEnd",get:function(){var t=c.default.get(),e=t.focusNode,n=d.default.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput,!0);if(d.default.isNativeInput(n))return n.selectionEnd===n.value.length;if(!t.focusNode)return!1;var o=t.focusOffset;if(e.nodeType!==Node.TEXT_NODE&&e.childNodes.length&&(e.childNodes[o-1]?o=(e=e.childNodes[o-1]).textContent.length:(e=e.childNodes[0],o=0)),d.default.isLineBreakTag(n)||d.default.isEmpty(n)){var i=this.getHigherLevelSiblings(e,"right");if(i.every((function(t,e){return e===i.length-1&&d.default.isLineBreakTag(t)||d.default.isEmpty(t)&&!d.default.isLineBreakTag(t)}))&&o===e.textContent.length)return!0}var r=n.textContent.replace(/\s+$/,"");return e===n&&o>=r.length}}],[{key:"CSS",get:function(){return{shadowCaret:"cdx-shadow-caret"}}}]),e}(u.default);o.default=v,v.displayName="Caret",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(7),n(24),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(13),p=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=p(i),r=p(r),a=p(a),s=p(s),l=p(l),c=p(c),u=p(u),d=p(d),f=h(f);var v=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments))).onMouseUp=function(){var e=t.Editor.Listeners;e.off(document,"mouseover",t.onMouseOver),e.off(document,"mouseup",t.onMouseUp)},t.onMouseOver=function(e){var n=t.Editor,o=n.BlockManager,i=n.BlockSelection,r=o.getBlockByChildNode(e.relatedTarget)||t.lastSelectedBlock,a=o.getBlockByChildNode(e.target);if(r&&a&&a!==r){if(r===t.firstSelectedBlock)return d.default.get().removeAllRanges(),r.selected=!0,a.selected=!0,void i.clearCache();if(a===t.firstSelectedBlock)return r.selected=!1,a.selected=!1,void i.clearCache();t.Editor.InlineToolbar.close(),t.toggleBlocksSelectedState(r,a),t.lastSelectedBlock=a}},t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"prepare",value:function(){var t=this;return i.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:this.Editor.Listeners.on(document,"mousedown",(function(e){t.enableCrossBlockSelection(e)}));case 2:case"end":return e.stop()}}),null,this)}},{key:"watchSelection",value:function(t){if(t.button===f.mouseButtons.LEFT){var e=this.Editor,n=e.BlockManager,o=e.Listeners;this.firstSelectedBlock=n.getBlock(t.target),this.lastSelectedBlock=this.firstSelectedBlock,o.on(document,"mouseover",this.onMouseOver),o.on(document,"mouseup",this.onMouseUp)}}},{key:"toggleBlockSelectedState",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=this.Editor,n=e.BlockManager,o=e.BlockSelection;this.lastSelectedBlock||(this.lastSelectedBlock=this.firstSelectedBlock=n.currentBlock),this.firstSelectedBlock===this.lastSelectedBlock&&(this.firstSelectedBlock.selected=!0,o.clearCache(),d.default.get().removeAllRanges());var i=n.blocks.indexOf(this.lastSelectedBlock)+(t?1:-1),r=n.blocks[i];r&&(this.lastSelectedBlock.selected!==r.selected?(r.selected=!0,o.clearCache()):(this.lastSelectedBlock.selected=!1,o.clearCache()),this.lastSelectedBlock=r,this.Editor.InlineToolbar.close())}},{key:"clear",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.BlockSelection,i=e.Caret,r=n.blocks.indexOf(this.firstSelectedBlock),a=n.blocks.indexOf(this.lastSelectedBlock);if(o.anyBlockSelected&&r>-1&&a>-1)if(t&&t instanceof KeyboardEvent)switch(t.keyCode){case f.keyCodes.DOWN:case f.keyCodes.RIGHT:i.setToBlock(n.blocks[Math.max(r,a)],i.positions.END);break;case f.keyCodes.UP:case f.keyCodes.LEFT:i.setToBlock(n.blocks[Math.min(r,a)],i.positions.START);break;default:i.setToBlock(n.blocks[Math.max(r,a)],i.positions.END)}else i.setToBlock(n.blocks[Math.max(r,a)],i.positions.END);this.firstSelectedBlock=this.lastSelectedBlock=null}},{key:"enableCrossBlockSelection",value:function(t){var e=this.Editor.UI;d.default.isCollapsed||this.Editor.BlockSelection.clearSelection(t),e.nodes.redactor.contains(t.target)?this.watchSelection(t):this.Editor.BlockSelection.clearSelection(t)}},{key:"toggleBlocksSelectedState",value:function(t,e){for(var n=this.Editor,o=n.BlockManager,i=n.BlockSelection,r=o.blocks.indexOf(t),a=o.blocks.indexOf(e),s=t.selected!==e.selected,l=Math.min(r,a);l<=Math.max(r,a);l++){var c=o.blocks[l];c!==this.firstSelectedBlock&&c!==(s?t:e)&&(o.blocks[l].selected=!o.blocks[l].selected,i.clearCache())}}},{key:"isCrossBlockSelectionStarted",get:function(){return!!this.firstSelectedBlock&&!!this.lastSelectedBlock}}]),e}(u.default);o.default=v,v.displayName="CrossBlockSelection",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(24),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=f(i),r=f(r),a=f(a),s=f(s),l=f(l),c=f(c),u=f(u);var h=function(t){function e(){var t;return(0,r.default)(this,e),(t=(0,s.default)(this,(0,l.default)(e).apply(this,arguments))).isStartedAtEditor=!1,t}return(0,c.default)(e,t),(0,a.default)(e,[{key:"toggleReadOnly",value:function(t){t?this.disableModuleBindings():this.enableModuleBindings()}},{key:"enableModuleBindings",value:function(){var t=this,e=this.Editor.UI;this.readOnlyMutableListeners.on(e.nodes.holder,"drop",(function(e){return i.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.next=2,i.default.awrap(t.processDrop(e));case 2:case"end":return n.stop()}}))}),!0),this.readOnlyMutableListeners.on(e.nodes.holder,"dragstart",(function(){t.processDragStart()})),this.readOnlyMutableListeners.on(e.nodes.holder,"dragover",(function(e){t.processDragOver(e)}),!0)}},{key:"disableModuleBindings",value:function(){this.readOnlyMutableListeners.clearAll()}},{key:"processDrop",value:function(t){var e,n,o,r,a,s;return i.default.async((function(l){for(;;)switch(l.prev=l.next){case 0:e=this.Editor,n=e.BlockManager,o=e.Caret,r=e.Paste,t.preventDefault(),n.blocks.forEach((function(t){t.dropTarget=!1})),u.default.isAtEditor&&!u.default.isCollapsed&&this.isStartedAtEditor&&document.execCommand("delete"),this.isStartedAtEditor=!1;try{a=n.setCurrentBlockByChildNode(t.target),this.Editor.Caret.setToBlock(a,o.positions.END)}catch(t){s=n.setCurrentBlockByChildNode(n.lastBlock.holder),this.Editor.Caret.setToBlock(s,o.positions.END)}return l.next=8,i.default.awrap(r.processDataTransfer(t.dataTransfer,!0));case 8:case"end":return l.stop()}}),null,this)}},{key:"processDragStart",value:function(){u.default.isAtEditor&&!u.default.isCollapsed&&(this.isStartedAtEditor=!0),this.Editor.InlineToolbar.close()}},{key:"processDragOver",value:function(t){t.preventDefault()}}]),e}((d=f(d)).default);o.default=h,h.displayName="DragNDrop",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c){"use strict";var u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=u(s),l=u(l);var d=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).subscribers={},t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"on",value:function(t,e){t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push(e)}},{key:"once",value:function(t,e){var n=this;t in this.subscribers||(this.subscribers[t]=[]),this.subscribers[t].push((function o(i){var r=e(i),a=n.subscribers[t].indexOf(o);return-1!==a&&n.subscribers[t].splice(a,1),r}))}},{key:"emit",value:function(t,e){this.subscribers[t]&&this.subscribers[t].reduce((function(t,e){return e(t)||t}),e)}},{key:"off",value:function(t,e){for(var n=0;n3&&void 0!==arguments[3]&&arguments[3],i=u.generateId("l"),r={id:i,element:t,eventType:e,handler:n,options:o},a=this.findOne(t,e,n);if(!a)return this.allListeners.push(r),t.addEventListener(e,n,o),i}},{key:"off",value:function(t,e,n,o){var i=this,r=this.findAll(t,e,n);r.forEach((function(t,e){var n=i.allListeners.indexOf(r[e]);n>0&&(i.allListeners.splice(n,1),t.element.removeEventListener(t.eventType,t.handler,t.options))}))}},{key:"offById",value:function(t){var e=this.findById(t);e&&e.element.removeEventListener(e.eventType,e.handler,e.options)}},{key:"findOne",value:function(t,e,n){var o=this.findAll(t,e,n);return o.length>0?o[0]:null}},{key:"findAll",value:function(t,e,n){var o=t?this.findByEventTarget(t):[];return t&&e&&n?o.filter((function(t){return t.eventType===e&&t.handler===n})):t&&e?o.filter((function(t){return t.eventType===e})):o}},{key:"removeAll",value:function(){this.allListeners.map((function(t){t.element.removeEventListener(t.eventType,t.handler,t.options)})),this.allListeners=[]}},{key:"destroy",value:function(){this.removeAll()}},{key:"findByEventTarget",value:function(t){return this.allListeners.filter((function(e){if(e.element===t)return e}))}},{key:"findByType",value:function(t){return this.allListeners.filter((function(e){if(e.eventType===t)return e}))}},{key:"findByHandler",value:function(t){return this.allListeners.filter((function(e){if(e.handler===t)return e}))}},{key:"findById",value:function(t){return this.allListeners.find((function(e){return e.id===t}))}}]),e}(c.default);o.default=h,h.displayName="Listeners",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(8),n(60)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=f(u),d=h(d);var p=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).DebounceTimer=450,t.disabled=!1,t.mutationDebouncer=u.debounce((function(){t.updateNativeInputs(),u.isFunction(t.config.onChange)&&t.config.onChange(t.Editor.API.methods)}),t.DebounceTimer),t.nativeInputs=[],t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"destroy",value:function(){var t=this;this.mutationDebouncer=null,this.observer&&this.observer.disconnect(),this.observer=null,this.nativeInputs.forEach((function(e){return t.Editor.Listeners.off(e,"input",t.mutationDebouncer)})),this.mutationDebouncer=null}},{key:"toggleReadOnly",value:function(t){t?this.disableModule():this.enableModule()}},{key:"disable",value:function(){this.disabled=!0}},{key:"enable",value:function(){this.disabled=!1}},{key:"setObserver",value:function(){var t=this,e=this.Editor.UI;this.observer=new MutationObserver((function(e,n){t.mutationHandler(e,n)})),this.observer.observe(e.nodes.redactor,{childList:!0,attributes:!0,subtree:!0,characterData:!0,characterDataOldValue:!0})}},{key:"mutationHandler",value:function(t,e){if(!this.disabled){var n=!1;t.forEach((function(t){switch(t.type){case"childList":case"characterData":n=!0;break;case"attributes":t.target.classList.contains(d.default.CSS.wrapper)||(n=!0)}})),n&&this.mutationDebouncer()}}},{key:"updateNativeInputs",value:function(){var t=this;this.nativeInputs&&this.nativeInputs.forEach((function(e){t.Editor.Listeners.off(e,"input")})),this.nativeInputs=Array.from(this.Editor.UI.nodes.redactor.querySelectorAll("textarea, input, select")),this.nativeInputs.forEach((function(e){return t.Editor.Listeners.on(e,"input",t.mutationDebouncer)}))}},{key:"enableModule",value:function(){var t,e=this;(null===(t=null==this?void 0:this.config)||void 0===t?void 0:t.saverDebounce)&&(this.DebounceTimer=this.config.saverDebounce),window.setTimeout((function(){e.setObserver(),e.updateNativeInputs(),e.enable()}),1e3)}},{key:"disableModule",value:function(){this.disable()}}]),e}(c.default);o.default=p,p.displayName="ModificationsObserver",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(380)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c),u=d(u);var f=function(t){function e(){return(0,i.default)(this,e),(0,a.default)(this,(0,s.default)(e).apply(this,arguments))}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t){u.default.show(t)}}]),e}(c.default);o.default=f,f.displayName="Notifier",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(65),n(21),n(38),n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p){"use strict";var v=n(13),g=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=g(i),r=g(r),a=g(a),s=g(s),l=g(l),c=g(c),u=g(u),d=g(d),f=g(f),h=g(h),p=v(p);var y=function(t){function e(){var t;return(0,s.default)(this,e),(t=(0,c.default)(this,(0,u.default)(e).apply(this,arguments))).MIME_TYPE="application/x-editor-js",t.toolsTags={},t.tagsByTool={},t.toolsPatterns=[],t.toolsFiles={},t.exceptionList=[],t.processTool=function(e){var n=(0,a.default)(e,2),o=n[0],i=n[1];try{var r=new t.Editor.Tools.blockTools[o]({api:t.Editor.API.getMethodsForTool(o),config:{},data:{},readOnly:!1});if(!1===i.pasteConfig)return void t.exceptionList.push(o);if("function"!=typeof r.onPaste)return;var s=i.pasteConfig||{};t.getTagsConfig(o,s),t.getFilesConfig(o,s),t.getPatternsConfig(o,s)}catch(t){p.log("Paste handling for «".concat(o,"» Tool hasn't been set up because of the error"),"warn",t)}},t.handlePasteEvent=function(e){var n,o,i;return r.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(n=t.Editor,o=n.BlockManager,i=n.Toolbar,o.currentBlock&&(!t.isNativeBehaviour(e.target)||e.clipboardData.types.includes("Files"))){r.next=3;break}return r.abrupt("return");case 3:if(!o.currentBlock||!t.exceptionList.includes(o.currentBlock.name)){r.next=5;break}return r.abrupt("return");case 5:e.preventDefault(),t.processDataTransfer(e.clipboardData),o.clearFocused(),i.close();case 9:case"end":return r.stop()}}))},t}return(0,d.default)(e,t),(0,l.default)(e,[{key:"prepare",value:function(){return r.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:this.processTools();case 1:case"end":return t.stop()}}),null,this)}},{key:"toggleReadOnly",value:function(t){t?this.unsetCallback():this.setCallback()}},{key:"processDataTransfer",value:function(t){var e,n,o,i,a,s,l,c,u,d=arguments;return r.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(e=d.length>1&&void 0!==d[1]&&d[1],n=this.Editor.Sanitizer,!((o=t.types).includes?o.includes("Files"):o.contains("Files"))){f.next=8;break}return f.next=7,r.default.awrap(this.processFiles(t.files));case 7:return f.abrupt("return");case 8:if(i=t.getData(this.MIME_TYPE),a=t.getData("text/plain"),s=t.getData("text/html"),!i){f.next=19;break}return f.prev=12,this.insertEditorJSData(JSON.parse(i)),f.abrupt("return");case 17:f.prev=17,f.t0=f.catch(12);case 19:if(e&&a.trim()&&s.trim()&&(s="

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

"),l=Object.keys(this.toolsTags).reduce((function(t,e){return t[e.toLowerCase()]=!0,t}),{}),c=Object.assign({},l,n.getAllInlineToolsConfig(),{br:{}}),(u=n.clean(s,c)).trim()&&u.trim()!==a&&h.default.isHTMLString(u)){f.next=28;break}return f.next=26,r.default.awrap(this.processText(a));case 26:f.next=30;break;case 28:return f.next=30,r.default.awrap(this.processText(u,!0));case 30:case"end":return f.stop()}}),null,this,[[12,17]])}},{key:"processText",value:function(t){var e,n,o,i,a,s,l,c,u=this,d=arguments;return r.default.async((function(f){for(;;)switch(f.prev=f.next){case 0:if(e=d.length>1&&void 0!==d[1]&&d[1],n=this.Editor,o=n.Caret,i=n.BlockManager,a=n.Tools,(s=e?this.processHTML(t):this.processPlain(t)).length){f.next=5;break}return f.abrupt("return");case 5:if(1!==s.length){f.next=8;break}return s[0].isBlock?this.processSingleBlock(s.pop()):this.processInlinePaste(s.pop()),f.abrupt("return");case 8:l=i.currentBlock&&a.isDefault(i.currentBlock.tool),c=l&&i.currentBlock.isEmpty,s.map((function(t,e){return r.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return n.abrupt("return",u.insertBlock(t,0===e&&c));case 1:case"end":return n.stop()}}))})),i.currentBlock&&o.setToBlock(i.currentBlock,o.positions.END);case 12:case"end":return f.stop()}}),null,this)}},{key:"setCallback",value:function(){this.Editor.Listeners.on(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"unsetCallback",value:function(){this.Editor.Listeners.off(this.Editor.UI.nodes.holder,"paste",this.handlePasteEvent)}},{key:"processTools",value:function(){var t=this.Editor.Tools.blockTools;Object.entries(t).forEach(this.processTool)}},{key:"getTagsConfig",value:function(t,e){var n=this,o=e.tags||[];o.forEach((function(e){Object.prototype.hasOwnProperty.call(n.toolsTags,e)?p.log("Paste handler for «".concat(t,"» Tool on «").concat(e,"» tag is skipped ")+"because it is already used by «".concat(n.toolsTags[e].tool,"» Tool."),"warn"):n.toolsTags[e.toUpperCase()]={tool:t}})),this.tagsByTool[t]=o.map((function(t){return t.toUpperCase()}))}},{key:"getFilesConfig",value:function(t,e){var n=e.files,o=void 0===n?{}:n,i=o.extensions,r=o.mimeTypes;(i||r)&&(i&&!Array.isArray(i)&&(p.log("«extensions» property of the onDrop config for «".concat(t,"» Tool should be an array")),i=[]),r&&!Array.isArray(r)&&(p.log("«mimeTypes» property of the onDrop config for «".concat(t,"» Tool should be an array")),r=[]),r&&(r=r.filter((function(e){return!!p.isValidMimeType(e)||(p.log("MIME type value «".concat(e,"» for the «").concat(t,"» Tool is not a valid MIME type"),"warn"),!1)}))),this.toolsFiles[t]={extensions:i||[],mimeTypes:r||[]})}},{key:"getPatternsConfig",value:function(t,e){var n=this;e.patterns&&!p.isEmpty(e.patterns)&&Object.entries(e.patterns).forEach((function(e){var o=(0,a.default)(e,2),i=o[0],r=o[1];r instanceof RegExp||p.log("Pattern ".concat(r," for «").concat(t,"» Tool is skipped because it should be a Regexp instance."),"warn"),n.toolsPatterns.push({key:i,pattern:r,tool:t})}))}},{key:"isNativeBehaviour",value:function(t){return h.default.isNativeInput(t)}},{key:"processFiles",value:function(t){var e,n,o,i,a,s,l=this;return r.default.async((function(c){for(;;)switch(c.prev=c.next){case 0:return e=this.Editor,n=e.BlockManager,o=e.Tools,c.next=3,r.default.awrap(Promise.all(Array.from(t).map((function(t){return l.processFile(t)}))));case 3:i=(i=c.sent).filter((function(t){return!!t})),a=o.isDefault(n.currentBlock.tool),s=a&&n.currentBlock.isEmpty,i.forEach((function(t,e){n.paste(t.type,t.event,0===e&&s)}));case 8:case"end":return c.stop()}}),null,this)}},{key:"processFile",value:function(t){var e,n,o,i,s;return r.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=p.getFileExtension(t),n=Object.entries(this.toolsFiles).find((function(n){var o=(0,a.default)(n,2),i=(o[0],o[1]),r=i.mimeTypes,s=i.extensions,l=t.type.split("/"),c=(0,a.default)(l,2),u=c[0],d=c[1],f=s.find((function(t){return t.toLowerCase()===e.toLowerCase()})),h=r.find((function(t){var e=t.split("/"),n=(0,a.default)(e,2),o=n[0],i=n[1];return o===u&&(i===d||"*"===i)}));return!!f||!!h}))){r.next=4;break}return r.abrupt("return");case 4:return o=(0,a.default)(n,1),i=o[0],s=this.composePasteEvent("file",{file:t}),r.abrupt("return",{event:s,type:i});case 7:case"end":return r.stop()}}),null,this)}},{key:"processHTML",value:function(t){var e=this,n=this.Editor,o=n.Tools,i=n.Sanitizer,r=this.config.defaultBlock,a=h.default.make("DIV");return a.innerHTML=t,this.getNodes(a).map((function(t){var n,a=r,s=!1;switch(t.nodeType){case Node.DOCUMENT_FRAGMENT_NODE:(n=h.default.make("div")).appendChild(t);break;case Node.ELEMENT_NODE:n=t,s=!0,e.toolsTags[n.tagName]&&(a=e.toolsTags[n.tagName].tool)}var l=o.blockTools[a].pasteConfig.tags.reduce((function(t,e){return t[e.toLowerCase()]={},t}),{}),c=Object.assign({},l,i.getInlineToolsConfig(a));return n.innerHTML=i.clean(n.innerHTML,c),{content:n,isBlock:s,tool:a,event:e.composePasteEvent("tag",{data:n})}})).filter((function(t){return!h.default.isNodeEmpty(t.content)||h.default.isSingleTag(t.content)}))}},{key:"processPlain",value:function(t){var e=this,n=this.config.defaultBlock;if(!t)return[];var o=n;return t.split(/\r?\n/).filter((function(t){return t.trim()})).map((function(t){var n=h.default.make("div");n.textContent=t;var i=e.composePasteEvent("tag",{data:n});return{content:n,tool:o,isBlock:!1,event:i}}))}},{key:"processSingleBlock",value:function(t){var e,n,o,i,a;return r.default.async((function(r){for(;;)switch(r.prev=r.next){case 0:if(e=this.Editor,n=e.Caret,o=e.BlockManager,i=e.Tools,(a=o.currentBlock)&&t.tool===a.name&&h.default.containsOnlyInlineElements(t.content.innerHTML)){r.next=5;break}return this.insertBlock(t,a&&i.isDefault(a.tool)&&a.isEmpty),r.abrupt("return");case 5:n.insertContentAtCaretPosition(t.content.innerHTML);case 6:case"end":return r.stop()}}),null,this)}},{key:"processInlinePaste",value:function(t){var n,o,i,a,s,l,c,u,d,f;return r.default.async((function(h){for(;;)switch(h.prev=h.next){case 0:if(n=this.Editor,o=n.BlockManager,i=n.Caret,a=n.Sanitizer,s=n.Tools,l=t.content,!(o.currentBlock&&s.isDefault(o.currentBlock.tool)&&l.textContent.length1&&void 0!==arguments[1]&&arguments[1],o=this.Editor,i=o.BlockManager,r=o.Caret,a=i.currentBlock;if(n&&a&&a.isEmpty)return e=i.paste(t.tool,t.event,!0),void r.setToBlock(e,r.positions.END);e=i.paste(t.tool,t.event),r.setToBlock(e,r.positions.END)}},{key:"insertEditorJSData",value:function(t){var e=this.Editor,n=e.BlockManager,o=e.Tools;t.forEach((function(t,e){var i=t.tool,r=t.data,a=!1;0===e&&(a=n.currentBlock&&o.isDefault(n.currentBlock.tool)&&n.currentBlock.isEmpty),n.insert({tool:i,data:r,replace:a})}))}},{key:"processElementNode",value:function(t,e,n){var o=Object.keys(this.toolsTags),r=t,a=(this.toolsTags[r.tagName]||{}).tool,s=void 0===a?"":a,l=this.tagsByTool[s]||[],c=o.includes(r.tagName),u=h.default.blockElements.includes(r.tagName.toLowerCase()),d=Array.from(r.children).some((function(t){var e=t.tagName;return o.includes(e)&&!l.includes(e)})),f=Array.from(r.children).some((function(t){var e=t.tagName;return h.default.blockElements.includes(e.toLowerCase())}));return u||c||d?c&&!d||u&&!f&&!d?[].concat((0,i.default)(e),[n,r]):void 0:(n.appendChild(r),[].concat((0,i.default)(e),[n]))}},{key:"getNodes",value:function(t){var e,n=this;return Array.from(t.childNodes).reduce((function t(o,r){if(h.default.isEmpty(r)&&!h.default.isSingleTag(r))return o;var a=o[o.length-1],s=new DocumentFragment;switch(a&&h.default.isFragment(a)&&(s=o.pop()),r.nodeType){case Node.ELEMENT_NODE:if(e=n.processElementNode(r,o,s))return e;break;case Node.TEXT_NODE:return s.appendChild(r),[].concat((0,i.default)(o),[s]);default:return[].concat((0,i.default)(o),[s])}return[].concat((0,i.default)(o),(0,i.default)(Array.from(r.childNodes).reduce(t,[])))}),[])}},{key:"composePasteEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}}]),e}(f.default);o.default=y,y.displayName="Paste",y.PATTERN_PROCESSING_MAX_LENGTH=450,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(38),n(2),n(3),n(5),n(4),n(6),n(7),n(141)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u);var p=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,l.default)(this,(0,c.default)(e).apply(this,arguments))).toolsDontSupportReadOnly=[],t.readOnlyEnabled=!1,t}return(0,u.default)(e,t),(0,s.default)(e,[{key:"prepare",value:function(){var t,e,n;return i.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:t=this.Editor.Tools,e=t.blockTools,n=[],Object.entries(e).forEach((function(e){var o=(0,r.default)(e,2),i=o[0],a=o[1];t.isReadOnlySupported(a)||n.push(i)})),this.toolsDontSupportReadOnly=n,this.config.readOnly&&n.length>0&&this.throwCriticalError(),this.toggle(this.config.readOnly);case 7:case"end":return o.stop()}}),null,this)}},{key:"toggle",value:function(){var t,e,n,o,r=arguments;return i.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:(t=r.length>0&&void 0!==r[0]?r[0]:!this.readOnlyEnabled)&&this.toolsDontSupportReadOnly.length>0&&this.throwCriticalError(),e=this.readOnlyEnabled,this.readOnlyEnabled=t,a.t0=i.default.keys(this.Editor);case 5:if((a.t1=a.t0()).done){a.next=12;break}if(n=a.t1.value,this.Editor[n].toggleReadOnly){a.next=9;break}return a.abrupt("continue",5);case 9:this.Editor[n].toggleReadOnly(t),a.next=5;break;case 12:if(e!==t){a.next=14;break}return a.abrupt("return",this.readOnlyEnabled);case 14:return a.next=16,i.default.awrap(this.Editor.Saver.save());case 16:return o=a.sent,a.next=19,i.default.awrap(this.Editor.BlockManager.clear());case 19:return a.next=21,i.default.awrap(this.Editor.Renderer.render(o.blocks));case 21:return a.abrupt("return",this.readOnlyEnabled);case 22:case"end":return a.stop()}}),null,this)}},{key:"throwCriticalError",value:function(){throw new f.CriticalError("To enable read-only mode all connected tools should support it. Tools ".concat(this.toolsDontSupportReadOnly.join(", ")," don't support read-only mode."))}},{key:"isEnabled",get:function(){return this.readOnlyEnabled}}]),e}((d=h(d)).default);o.default=p,p.displayName="ReadOnly",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(24),n(60)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f){"use strict";var h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),d=h(d),f=h(f);var p=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).isRectSelectionActivated=!1,t.SCROLL_SPEED=3,t.HEIGHT_OF_SCROLL_ZONE=40,t.BOTTOM_SCROLL_ZONE=1,t.TOP_SCROLL_ZONE=2,t.MAIN_MOUSE_BUTTON=0,t.mousedown=!1,t.isScrolling=!1,t.inScrollZone=null,t.startX=0,t.startY=0,t.mouseX=0,t.mouseY=0,t.stackOfSelected=[],t.listenerIds=[],t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"prepare",value:function(){this.enableModuleBindings()}},{key:"startSelection",value:function(t,e){var n=document.elementFromPoint(t-window.pageXOffset,e-window.pageYOffset);n.closest(".".concat(this.Editor.Toolbar.CSS.toolbar))||(this.Editor.BlockSelection.allBlocksSelected=!1,this.clearSelection(),this.stackOfSelected=[]);var o=[".".concat(f.default.CSS.content),".".concat(this.Editor.Toolbar.CSS.toolbar),".".concat(this.Editor.InlineToolbar.CSS.inlineToolbar)],i=n.closest("."+this.Editor.UI.CSS.editorWrapper),r=o.some((function(t){return!!n.closest(t)}));i&&!r&&(this.mousedown=!0,this.startX=t,this.startY=e)}},{key:"endSelection",value:function(){this.mousedown=!1,this.startX=0,this.startY=0,this.overlayRectangle.style.display="none"}},{key:"isRectActivated",value:function(){return this.isRectSelectionActivated}},{key:"clearSelection",value:function(){this.isRectSelectionActivated=!1}},{key:"enableModuleBindings",value:function(){var t=this,e=this.Editor.Listeners,n=this.genHTML().container;e.on(n,"mousedown",(function(e){t.processMouseDown(e)}),!1),e.on(document.body,"mousemove",(function(e){t.processMouseMove(e)}),!1),e.on(document.body,"mouseleave",(function(){t.processMouseLeave()})),e.on(window,"scroll",(function(e){t.processScroll(e)}),!1),e.on(document.body,"mouseup",(function(){t.processMouseUp()}),!1)}},{key:"processMouseDown",value:function(t){t.button===this.MAIN_MOUSE_BUTTON&&this.startSelection(t.pageX,t.pageY)}},{key:"processMouseMove",value:function(t){this.changingRectangle(t),this.scrollByZones(t.clientY)}},{key:"processMouseLeave",value:function(){this.clearSelection(),this.endSelection()}},{key:"processScroll",value:function(t){this.changingRectangle(t)}},{key:"processMouseUp",value:function(){this.endSelection()}},{key:"scrollByZones",value:function(t){this.inScrollZone=null,t<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.TOP_SCROLL_ZONE),document.documentElement.clientHeight-t<=this.HEIGHT_OF_SCROLL_ZONE&&(this.inScrollZone=this.BOTTOM_SCROLL_ZONE),this.inScrollZone?this.isScrolling||(this.scrollVertical(this.inScrollZone===this.TOP_SCROLL_ZONE?-this.SCROLL_SPEED:this.SCROLL_SPEED),this.isScrolling=!0):this.isScrolling=!1}},{key:"genHTML",value:function(){var t=this.Editor.UI,n=t.nodes.holder.querySelector("."+t.CSS.editorWrapper),o=u.default.make("div",e.CSS.overlay,{}),i=u.default.make("div",e.CSS.overlayContainer,{}),r=u.default.make("div",e.CSS.rect,{});return i.appendChild(r),o.appendChild(i),n.appendChild(o),this.overlayRectangle=r,{container:n,overlay:o}}},{key:"scrollVertical",value:function(t){var e=this;if(this.inScrollZone&&this.mousedown){var n=window.pageYOffset;window.scrollBy(0,t),this.mouseY+=window.pageYOffset-n,setTimeout((function(){e.scrollVertical(t)}),0)}}},{key:"changingRectangle",value:function(t){if(this.mousedown){void 0!==t.pageY&&(this.mouseX=t.pageX,this.mouseY=t.pageY);var e=this.genInfoForMouseSelection(),n=e.rightPos,o=e.leftPos,i=e.index,r=this.startX>n&&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 t,e=document.body.offsetWidth/2,n=this.mouseY-window.pageYOffset,o=document.elementFromPoint(e,n),i=this.Editor.BlockManager.getBlockByChildNode(o);void 0!==i&&(t=this.Editor.BlockManager.blocks.findIndex((function(t){return t.holder===i.holder})));var r=this.Editor.BlockManager.lastBlock.holder.querySelector("."+f.default.CSS.content),a=Number.parseInt(window.getComputedStyle(r).width,10)/2;return{index:t,leftPos:e-a,rightPos:e+a}}},{key:"addBlockInSelection",value:function(t){this.rectCrossesBlocks&&this.Editor.BlockSelection.selectBlockByIndex(t),this.stackOfSelected.push(t)}},{key:"trySelectNextBlock",value:function(t){var e=this,n=this.stackOfSelected[this.stackOfSelected.length-1]===t,o=this.stackOfSelected.length;if(!n){var i=this.stackOfSelected[o-1]-this.stackOfSelected[o-2]>0,r=0;o>1&&(r=i?1:-1);var a=t>this.stackOfSelected[o-1]&&1===r,s=tthis.stackOfSelected[o-1]||void 0===this.stackOfSelected[o-1])){if(!l&&t=t;c--)this.addBlockInSelection(c);else if(l){var u,d=o-1;for(u=t>this.stackOfSelected[o-1]?function(){return t>e.stackOfSelected[d]}:function(){return t1&&void 0!==arguments[1]?arguments[1]:{},n={tags:e},o=this.createHTMLJanitorInstance(n);return o.clean(t)}},{key:"composeToolConfig",value:function(t){if(this.configCache[t])return this.configCache[t];var e=this.Editor.Tools.INTERNAL_SETTINGS.SANITIZE_CONFIG,n=this.Editor.Tools.available[t],o=this.getInlineToolsConfig(t);if(!n.sanitize||n[e]&&f.isEmpty(n[e]))return o;var i=n.sanitize,a={};for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var l=i[s];"object"===(0,r.default)(l)?a[s]=Object.assign({},o,l):a[s]=l}return this.configCache[t]=a,a}},{key:"getInlineToolsConfig",value:function(t){var e=this.Editor.Tools,n=e.getToolSettings(t).inlineToolbar||[],o={};return"boolean"==typeof n&&n?o=this.getAllInlineToolsConfig():n.map((function(t){o=Object.assign(o,e.inline[t][e.INTERNAL_SETTINGS.SANITIZE_CONFIG])})),o.br=!0,o.wbr=!0,o}},{key:"getAllInlineToolsConfig",value:function(){var t=this.Editor.Tools;if(this.inlineToolsConfigCache)return this.inlineToolsConfigCache;var e={};return Object.entries(t.inline).forEach((function(n){var o=(0,i.default)(n,2)[1];Object.assign(e,o[t.INTERNAL_SETTINGS.SANITIZE_CONFIG])})),this.inlineToolsConfigCache=e,this.inlineToolsConfigCache}},{key:"cleanArray",value:function(t,e){var n=this;return t.map((function(t){return n.deepSanitize(t,e)}))}},{key:"cleanObject",value:function(t,e){var n={};for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=t[o],r=this.isRule(e[o])?e[o]:e;n[o]=this.deepSanitize(i,r)}return n}},{key:"cleanOneItem",value:function(t,e){return"object"===(0,r.default)(e)?this.clean(t,e):!1===e?this.clean(t,{}):t}},{key:"isRule",value:function(t){return"object"===(0,r.default)(t)||"boolean"==typeof t||f.isFunction(t)}},{key:"createHTMLJanitorInstance",value:function(t){return t?new h.default(t):null}}]),e}(d.default);o.default=g,g.displayName="Sanitizer",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(21),n(2),n(3),n(5),n(4),n(6),n(7),n(8)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=h(c),u=h(u),d=f(d);var p=function(t){function e(){return(0,r.default)(this,e),(0,s.default)(this,(0,l.default)(e).apply(this,arguments))}return(0,c.default)(e,t),(0,a.default)(e,[{key:"save",value:function(){var t,e,n,o,r,a,s,l,c=this;return i.default.async((function(u){for(;;)switch(u.prev=u.next){case 0:return t=this.Editor,e=t.BlockManager,n=t.Sanitizer,o=t.ModificationsObserver,r=e.blocks,a=[],o.disable(),u.prev=3,r.forEach((function(t){a.push(c.getSavedData(t))})),u.next=7,i.default.awrap(Promise.all(a));case 7:return s=u.sent,u.next=10,i.default.awrap(n.sanitizeBlocks(s));case 10:return l=u.sent,u.abrupt("return",this.makeOutput(l));case 12:return u.prev=12,o.enable(),u.finish(12);case 15:case"end":return u.stop()}}),null,this,[[3,,12,15]])}},{key:"getSavedData",value:function(t){var e,n;return i.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,i.default.awrap(t.save());case 2:if(e=o.sent,o.t0=e,!o.t0){o.next=8;break}return o.next=7,i.default.awrap(t.validate(e.data));case 7:o.t0=o.sent;case 8:return n=o.t0,o.abrupt("return",Object.assign(Object.assign({},e),{isValid:n}));case 10:case"end":return o.stop()}}))}},{key:"makeOutput",value:function(t){var e=this,n=0,o=[];return d.log("[Editor.js saving]:","groupCollapsed"),t.forEach((function(t){var i=t.tool,r=t.data,a=t.time,s=t.isValid;if(n+=a,d.log("".concat(i.charAt(0).toUpperCase()+i.slice(1)),"group"),!s)return d.log("Block «".concat(i,"» skipped because saved data is invalid")),void d.log(void 0,"groupEnd");d.log(r),d.log(void 0,"groupEnd"),i!==e.Editor.Tools.stubTool?o.push({type:i,data:r}):o.push(r)})),d.log("Total","log",n),d.log(void 0,"groupEnd"),{time:+new Date,blocks:o,version:"2.19.0-smb.1"}}}]),e}(u.default);o.default=p,p.displayName="Saver",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(382),n(7)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c);var f=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).registeredShortcuts=[],t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"add",value:function(t){var e=new c.default({name:t.name,on:document,callback:t.handler});this.registeredShortcuts.push(e)}},{key:"remove",value:function(t){var e=this.registeredShortcuts.findIndex((function(e){return e.name===t}));-1!==e&&this.registeredShortcuts[e]&&(this.registeredShortcuts[e].remove(),this.registeredShortcuts.splice(e,1))}}]),e}((u=d(u)).default);o.default=f,f.displayName="Shortcuts",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(59),n(8),n(24)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h){"use strict";var p=n(13),v=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=v(i),r=v(r),a=v(a),s=v(s),l=v(l),c=v(c),u=v(u),d=v(d),f=p(f),h=v(h);var g=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).buttons=[],t.flipper=null,t.selection=new h.default,t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"make",value:function(){this.nodes.wrapper=u.default.make("div",this.CSS.wrapper),this.nodes.toolSettings=u.default.make("div",this.CSS.toolSettings),this.nodes.defaultSettings=u.default.make("div",this.CSS.defaultSettings),u.default.append(this.nodes.wrapper,[this.nodes.toolSettings,this.nodes.defaultSettings]),this.enableFlipper()}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:"open",value:function(){this.nodes.wrapper.classList.add(this.CSS.wrapperOpened),this.selection.save(),this.Editor.BlockManager.currentBlock.selected=!0,this.Editor.BlockSelection.clearCache(),this.addToolSettings(),this.addDefaultSettings(),this.Editor.Events.emit(this.events.opened),this.flipper.activate(this.blockTunesButtons)}},{key:"close",value:function(){this.nodes.wrapper.classList.remove(this.CSS.wrapperOpened),h.default.isAtEditor||this.selection.restore(),this.selection.clearSaved(),this.nodes.toolSettings.innerHTML="",this.nodes.defaultSettings.innerHTML="",this.Editor.Events.emit(this.events.closed),this.buttons=[],this.flipper.deactivate()}},{key:"addToolSettings",value:function(){f.isFunction(this.Editor.BlockManager.currentBlock.tool.renderSettings)&&u.default.append(this.nodes.toolSettings,this.Editor.BlockManager.currentBlock.tool.renderSettings())}},{key:"addDefaultSettings",value:function(){u.default.append(this.nodes.defaultSettings,this.Editor.BlockManager.currentBlock.renderTunes())}},{key:"enableFlipper",value:function(){var t=this;this.flipper=new d.default({focusedItemClass:this.CSS.focusedButton,activateCallback:function(e){e&&u.default.canSetCaret(e)?t.close():f.delay((function(){t.Editor.Caret.setToBlock(t.Editor.BlockManager.currentBlock)}),50)()}})}},{key:"events",get:function(){return{opened:"block-settings-opened",closed:"block-settings-closed"}}},{key:"CSS",get:function(){return{wrapper:"ce-settings",wrapperOpened:"ce-settings--opened",toolSettings:"ce-settings__plugin-zone",defaultSettings:"ce-settings__default-zone",button:"ce-settings__button",focusedButton:"ce-settings__button--focused",focusedButtonAnimated:"ce-settings__button--focused-animated"}}},{key:"opened",get:function(){return this.nodes.wrapper.classList.contains(this.CSS.wrapperOpened)}},{key:"blockTunesButtons",get:function(){var t=this,e=this.Editor.StylesAPI;if(0!==this.buttons.length)return this.buttons;var n=this.nodes.toolSettings.querySelectorAll(".".concat(e.classes.settingsButton,", ").concat(u.default.allInputsSelector)),o=this.nodes.defaultSettings.querySelectorAll(".".concat(this.CSS.button));return n.forEach((function(e){t.buttons.push(e)})),o.forEach((function(e){t.buttons.push(e)})),this.buttons}}]),e}(c.default);o.default=g,g.displayName="BlockSettings",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(21),n(65),n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8),n(59),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v,g,y){"use strict";var b=n(13),k=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=k(i),r=k(r),a=k(a),s=k(s),l=k(l),c=k(c),u=k(u),d=k(d),f=k(f),h=k(h),p=b(p),v=k(v),g=k(g);var m=function(t){function e(){var t;return(0,s.default)(this,e),(t=(0,c.default)(this,(0,u.default)(e).apply(this,arguments))).opened=!1,t.tools={},t.flipper=null,t.togglingCallback=null,t}return(0,d.default)(e,t),(0,l.default)(e,[{key:"make",value:function(){this.nodes.wrapper=h.default.make("div",[e.CSS.conversionToolbarWrapper].concat((0,a.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.tools=h.default.make("div",e.CSS.conversionToolbarTools);var t=h.default.make("div",e.CSS.conversionToolbarLabel,{textContent:g.default.ui(y.I18nInternalNS.ui.inlineToolbar.converter,"Convert to")});return this.addTools(),this.enableFlipper(),h.default.append(this.nodes.wrapper,t),h.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(t){this.opened?this.close():this.open(),p.isFunction(t)&&(this.togglingCallback=t)}},{key:"open",value:function(){var t=this;this.filterTools(),this.opened=!0,this.nodes.wrapper.classList.add(e.CSS.conversionToolbarShowed),setTimeout((function(){t.flipper.activate(Object.values(t.tools).filter((function(t){return!t.classList.contains(e.CSS.conversionToolHidden)}))),t.flipper.focusFirst(),p.isFunction(t.togglingCallback)&&t.togglingCallback(!0)}),50)}},{key:"close",value:function(){this.opened=!1,this.flipper.deactivate(),this.nodes.wrapper.classList.remove(e.CSS.conversionToolbarShowed),p.isFunction(this.togglingCallback)&&this.togglingCallback(!1)}},{key:"hasTools",value:function(){var t=Object.keys(this.tools);return!(1===t.length&&t.shift()===this.config.defaultBlock)}},{key:"replaceWithBlock",value:function(t){var e,n,o,i,a,s,l,c,u,d,f,h=this;return r.default.async((function(v){for(;;)switch(v.prev=v.next){case 0:return e=this.Editor.BlockManager.currentBlock.class,n=this.Editor.BlockManager.currentBlock.name,v.next=4,r.default.awrap(this.Editor.BlockManager.currentBlock.save());case 4:if(o=v.sent,i=this.Editor.Tools.INTERNAL_SETTINGS,a=o.data,n===t&&(t=this.config.defaultBlock),s=this.Editor.Tools.toolsClasses[t],l="",c=e[i.CONVERSION_CONFIG].export,!p.isFunction(c)){v.next=15;break}l=c(a),v.next=21;break;case 15:if("string"!=typeof c){v.next=19;break}l=a[c],v.next=21;break;case 19:return p.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."),v.abrupt("return");case 21:if(u=this.Editor.Sanitizer.clean(l,s.sanitize),d={},f=s[i.CONVERSION_CONFIG].import,!p.isFunction(f)){v.next=28;break}d=f(u),v.next=34;break;case 28:if("string"!=typeof f){v.next=32;break}d[f]=u,v.next=34;break;case 32:return p.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."),v.abrupt("return");case 34:this.Editor.BlockManager.replace({tool:t,data:d}),this.Editor.BlockSelection.clearSelection(),this.close(),this.Editor.InlineToolbar.close(),p.delay((function(){h.Editor.Caret.setToBlock(h.Editor.BlockManager.currentBlock)}),10)();case 39:case"end":return v.stop()}}),null,this)}},{key:"addTools",value:function(){var t=this.Editor.Tools.blockTools;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=this.Editor.Tools.INTERNAL_SETTINGS,o=t[e],i=o[n.TOOLBOX],r=o[n.CONVERSION_CONFIG],a=this.Editor.Tools.USER_SETTINGS,s=this.Editor.Tools.getToolSettings(e)[a.TOOLBOX],l=null!=s?s:i;!p.isEmpty(l)&&l.icon&&r&&r.import&&this.addTool(e,l.icon,l.title)}}},{key:"addTool",value:function(t,n,o){var i=this,a=h.default.make("div",[e.CSS.conversionTool]),s=h.default.make("div",[e.CSS.conversionToolIcon]);a.dataset.tool=t,s.innerHTML=n,h.default.append(a,s),h.default.append(a,h.default.text(g.default.t(y.I18nInternalNS.toolNames,o||p.capitalize(t)))),h.default.append(this.nodes.tools,a),this.tools[t]=a,this.Editor.Listeners.on(a,"click",(function(){return r.default.async((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,r.default.awrap(i.replaceWithBlock(t));case 2:case"end":return e.stop()}}))}))}},{key:"filterTools",value:function(){var t=this.Editor.BlockManager.currentBlock;Object.entries(this.tools).forEach((function(n){var o=(0,i.default)(n,2),r=o[0],a=o[1];a.hidden=!1,a.classList.toggle(e.CSS.conversionToolHidden,r===t.name)}))}},{key:"enableFlipper",value:function(){this.flipper=new v.default({focusedItemClass:e.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",conversionToolHidden:"ce-conversion-tool--hidden",conversionToolIcon:"ce-conversion-tool__icon",conversionToolFocused:"ce-conversion-tool--focused",conversionToolActive:"ce-conversion-tool--active"}}}]),e}(f.default);o.default=m,m.displayName="ConversionToolbar",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(65),n(38),n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(24),n(8),n(59),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v,g,y){"use strict";var b=n(13),k=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=k(i),r=k(r),a=k(a),s=k(s),l=k(l),c=k(c),u=k(u),d=k(d),f=k(f),h=k(h),p=b(p),v=k(v),g=k(g);var m=function(t){function e(){var t;return(0,a.default)(this,e),(t=(0,l.default)(this,(0,c.default)(e).apply(this,arguments))).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",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=5,t.buttonsList=null,t.width=0,t.flipper=null,t}return(0,u.default)(e,t),(0,s.default)(e,[{key:"toggleReadOnly",value:function(t){t?(this.destroy(),this.Editor.ConversionToolbar.destroy()):this.make()}},{key:"tryToShow",value:function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.allowedToShow()?(this.move(),this.open(),this.Editor.Toolbar.close()):t&&this.close()}},{key:"move",value:function(){var t=h.default.rect,e=this.Editor.UI.nodes.wrapper.getBoundingClientRect(),n={x:t.x-e.left,y:t.y+t.height-e.top+this.toolbarVerticalMargin};t.width&&(n.x+=Math.floor(t.width/2));var o=n.x-this.width/2,i=n.x+this.width/2;this.nodes.wrapper.classList.toggle(this.CSS.inlineToolbarLeftOriented,othis.Editor.UI.contentRect.right),this.nodes.wrapper.style.left=Math.floor(n.x)+"px",this.nodes.wrapper.style.top=Math.floor(n.y)+"px"}},{key:"close",value:function(){this.opened&&(this.Editor.ReadOnly.isEnabled||(this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed),this.toolsInstances.forEach((function(t){p.isFunction(t.clear)&&t.clear()})),this.opened=!1,this.flipper.deactivate(),this.Editor.ConversionToolbar.close()))}},{key:"open",value:function(){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,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(t){return!t.hidden})),this.flipper.activate(t)}}},{key:"containsNode",value:function(t){return this.nodes.wrapper.contains(t)}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes()}},{key:"getInlineToolbarSettings",value:function(t){var e=this,n=this.Editor.Tools.getToolSettings(t)[this.Editor.Tools.USER_SETTINGS.ENABLED_INLINE_TOOLS];if(!0!==n&&!Array.isArray(n))return!1;if(Array.isArray(n))return n;var o=this.config.inlineToolbar;return Array.isArray(o)?o:!0===o&&Object.entries(this.Editor.Tools.available).filter((function(t){var n=(0,r.default)(t,2);return n[0],n[1][e.Editor.Tools.INTERNAL_SETTINGS.IS_INLINE]})).map((function(t){var e=(0,r.default)(t,2),n=e[0];return e[1],n}))}},{key:"make",value:function(){var t=this;this.nodes.wrapper=f.default.make("div",[this.CSS.inlineToolbar].concat((0,i.default)(this.isRtl?[this.Editor.UI.CSS.editorRtlFix]:[]))),this.nodes.togglerAndButtonsWrapper=f.default.make("div",this.CSS.togglerAndButtonsWrapper),this.nodes.buttons=f.default.make("div",this.CSS.buttonsWrapper),this.nodes.actions=f.default.make("div",this.CSS.actionsWrapper),this.Editor.Listeners.on(this.nodes.wrapper,"mousedown",(function(e){e.target.closest(".".concat(t.CSS.actionsWrapper))||e.preventDefault()})),f.default.append(this.nodes.wrapper,[this.nodes.togglerAndButtonsWrapper,this.nodes.actions]),f.default.append(this.Editor.UI.nodes.wrapper,this.nodes.wrapper),this.addConversionToggler(),f.default.append(this.nodes.togglerAndButtonsWrapper,this.nodes.buttons),this.prepareConversionToolbar(),this.recalculateWidth(),this.enableFlipper()}},{key:"allowedToShow",value:function(){var t=h.default.get(),e=h.default.text;if(!t||!t.anchorNode)return!1;if(t.isCollapsed||e.length<1)return!1;var n=f.default.isElement(t.anchorNode)?t.anchorNode:t.anchorNode.parentElement;if(t&&["IMG","INPUT"].includes(n.tagName))return!1;if(null===n.closest('[contenteditable="true"]'))return!1;var o=this.Editor.BlockManager.getBlock(t.anchorNode);return!!o&&!1!==this.getInlineToolbarSettings(o.name)}},{key:"recalculateWidth",value:function(){this.width=this.nodes.wrapper.offsetWidth}},{key:"addConversionToggler",value:function(){var t=this;this.nodes.conversionToggler=f.default.make("div",this.CSS.conversionToggler),this.nodes.conversionTogglerContent=f.default.make("div",this.CSS.conversionTogglerContent);var e=f.default.svg("toggler-down",13,13);this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent),this.nodes.conversionToggler.appendChild(e),this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler),this.Editor.Listeners.on(this.nodes.conversionToggler,"click",(function(){t.Editor.ConversionToolbar.toggle((function(e){!e&&t.opened?t.flipper.activate():t.opened&&t.flipper.deactivate()}))})),this.Editor.Tooltip.onHover(this.nodes.conversionToggler,g.default.ui(y.I18nInternalNS.ui.inlineToolbar.converter,"Convert to"),{placement:"top",hidingDelay:100})}},{key:"setConversionTogglerContent",value:function(){var t=this.Editor,e=t.BlockManager,n=t.Tools,o=e.currentBlock.name,i=n.available[o][n.INTERNAL_SETTINGS.CONVERSION_CONFIG]||{},r=i&&i.export;this.nodes.conversionToggler.hidden=!r,this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden,!r);var a=n.getToolSettings(o),s=n.available[o][n.INTERNAL_SETTINGS.TOOLBOX]||{},l=a.toolbox||{};this.nodes.conversionTogglerContent.innerHTML=l.icon||s.icon||l.title||s.title||p.capitalize(o)}},{key:"prepareConversionToolbar",value:function(){var t=this.Editor.ConversionToolbar.make();f.default.append(this.nodes.wrapper,t)}},{key:"addToolsFiltered",value:function(){var t=this,e=h.default.get(),n=this.Editor.BlockManager.getBlock(e.anchorNode);this.nodes.buttons.innerHTML="",this.nodes.actions.innerHTML="",this.toolsInstances=new Map,this.getInlineToolbarSettings(n.name).forEach((function(e){var n=t.Editor.Tools.getToolSettings(e),o=t.Editor.Tools.constructInline(t.Editor.Tools.inline[e],e,n);t.addTool(e,o),o.checkState(h.default.get())})),this.recalculateWidth()}},{key:"addTool",value:function(t,e){var n=this,o=this.Editor,i=o.Listeners,a=o.Tools,s=o.Tooltip,l=e.render();if(l){if(l.dataset.tool=t,this.nodes.buttons.appendChild(l),this.toolsInstances.set(t,e),p.isFunction(e.renderActions)){var c=e.renderActions();this.nodes.actions.appendChild(c)}i.on(l,"click",(function(t){n.toolClicked(e),t.preventDefault()}));var u=a.getToolSettings(t),d=null;Object.entries(a.internalTools).filter((function(t){var e=(0,r.default)(t,2)[1];return p.isFunction(e)?e[a.INTERNAL_SETTINGS.IS_INLINE]:e.class[a.INTERNAL_SETTINGS.IS_INLINE]})).map((function(t){return(0,r.default)(t,1)[0]})).includes(t)?d=this.inlineTools[t][a.INTERNAL_SETTINGS.SHORTCUT]:u&&u[a.USER_SETTINGS.SHORTCUT]?d=u[a.USER_SETTINGS.SHORTCUT]:e.shortcut&&(d=e.shortcut),d&&this.enableShortcuts(e,d);var h=f.default.make("div"),v=g.default.t(y.I18nInternalNS.toolNames,a.toolsClasses[t][a.INTERNAL_SETTINGS.TITLE]||p.capitalize(t));h.appendChild(f.default.text(v)),d&&h.appendChild(f.default.make("div",this.CSS.inlineToolbarShortcut,{textContent:p.beautifyShortcut(d)})),s.onHover(l,h,{placement:"top",hidingDelay:100})}else p.log("Render method must return an instance of Node","warn",t)}},{key:"enableShortcuts",value:function(t,e){var n=this;this.Editor.Shortcuts.add({name:e,handler:function(e){var o=n.Editor.BlockManager.currentBlock;if(o){var i=n.Editor.Tools.getToolSettings(o.name);i&&i[n.Editor.Tools.USER_SETTINGS.ENABLED_INLINE_TOOLS]&&(e.preventDefault(),n.toolClicked(t))}}})}},{key:"toolClicked",value:function(t){var e=h.default.range;t.surround(e),this.checkToolsState()}},{key:"checkToolsState",value:function(){this.toolsInstances.forEach((function(t){t.checkState(h.default.get())}))}},{key:"enableFlipper",value:function(){this.flipper=new v.default({focusedItemClass:this.CSS.focusedButton,allowArrows:!1})}},{key:"inlineTools",get:function(){var t={};for(var e in this.Editor.Tools.inline)if(Object.prototype.hasOwnProperty.call(this.Editor.Tools.inline,e)){var n=this.Editor.Tools.getToolSettings(e);t[e]=this.Editor.Tools.constructInline(this.Editor.Tools.inline[e],e,n)}return t}}]),e}(d.default);o.default=m,m.displayName="InlineToolbar",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(15),n(8),n(59),n(60),n(58),n(81)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v){"use strict";var g=n(13),y=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=y(i),r=y(r),a=y(a),s=y(s),l=y(l),c=y(c),u=y(u),d=g(d),f=y(f),p=y(p);var b=function(t){function e(){var t;return(0,i.default)(this,e),(t=(0,a.default)(this,(0,s.default)(e).apply(this,arguments))).nodes={toolbox:null,buttons:[]},t.opened=!1,t.displayedToolsCount=0,t.flipper=null,t}return(0,l.default)(e,t),(0,r.default)(e,[{key:"make",value:function(){this.nodes.toolbox=u.default.make("div",this.CSS.toolbox),this.addTools(),this.enableFlipper()}},{key:"destroy",value:function(){this.flipper&&(this.flipper.deactivate(),this.flipper=null),this.removeAllNodes(),this.removeAllShortcuts()}},{key:"toolButtonActivate",value:function(t,e){var n=this.Editor.Tools.toolsClasses[e];this.insertNewBlock(n,e)}},{key:"open",value:function(){this.isEmpty||(this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolbarHolderModifier),this.nodes.toolbox.classList.add(this.CSS.toolboxOpened),this.opened=!0,this.flipper.activate())}},{key:"close",value:function(){this.nodes.toolbox.classList.remove(this.CSS.toolboxOpened),this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolbarHolderModifier),this.opened=!1,this.flipper.deactivate()}},{key:"toggle",value:function(){this.opened?this.close():this.open()}},{key:"addTools",value:function(){var t=this.Editor.Tools.available;for(var e in t)Object.prototype.hasOwnProperty.call(t,e)&&this.addTool(e,t[e])}},{key:"addTool",value:function(t,e){var n=this,o=this.Editor.Tools.INTERNAL_SETTINGS,i=this.Editor.Tools.USER_SETTINGS,r=e[o.TOOLBOX];if(!d.isEmpty(r))if(!r||r.icon){var a=this.Editor.Tools.getToolSettings(t)[i.TOOLBOX];if(!1!==(null!=a?a:r)){var s=u.default.make("li",[this.CSS.toolboxButton]);s.dataset.tool=t,s.innerHTML=a&&a.icon||r.icon,u.default.append(this.nodes.toolbox,s),this.nodes.toolbox.appendChild(s),this.nodes.buttons.push(s),this.Editor.Listeners.on(s,"click",(function(e){n.toolButtonActivate(e,t)}));var l=this.drawTooltip(t);this.Editor.Tooltip.onHover(s,l,{placement:"bottom",hidingDelay:200});var c=this.getToolShortcut(t,e);c&&this.enableShortcut(e,t,c),this.displayedToolsCount++}}else d.log("Toolbar icon is missed. Tool %o skipped","warn",t)}},{key:"getToolShortcut",value:function(t,e){var n=this.Editor.Tools.getToolSettings(t),o=e[this.Editor.Tools.INTERNAL_SETTINGS.SHORTCUT];return(n?n[this.Editor.Tools.USER_SETTINGS.SHORTCUT]:null)||o}},{key:"drawTooltip",value:function(t){var e=this.Editor.Tools.available[t],n=this.Editor.Tools.getToolSettings(t),o=this.Editor.Tools.available[t][this.Editor.Tools.INTERNAL_SETTINGS.TOOLBOX]||{},i=n.toolbox||{},r=p.default.t(v.I18nInternalNS.toolNames,i.title||o.title||t),a=this.getToolShortcut(t,e),s=u.default.make("div",this.CSS.buttonTooltip),l=document.createTextNode(d.capitalize(r));return s.appendChild(l),a&&(a=d.beautifyShortcut(a),s.appendChild(u.default.make("div",this.CSS.buttonShortcut,{textContent:a}))),s}},{key:"enableShortcut",value:function(t,e,n){var o=this;this.Editor.Shortcuts.add({name:n,handler:function(n){n.preventDefault(),o.insertNewBlock(t,e)}})}},{key:"removeAllShortcuts",value:function(){var t=this.Editor.Tools.available;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e)){var n=this.getToolShortcut(e,t[e]);n&&this.Editor.Shortcuts.remove(n)}}},{key:"enableFlipper",value:function(){var t=Array.from(this.nodes.toolbox.childNodes);this.flipper=new f.default({items:t,focusedItemClass:this.CSS.toolboxButtonActive})}},{key:"insertNewBlock",value:function(t,e){var n=this.Editor,o=n.BlockManager,i=n.Caret,r=o.currentBlock,a=o.insert({tool:e,replace:r.isEmpty});a.call(h.BlockToolAPI.APPEND_CALLBACK),this.Editor.Caret.setToBlock(a),0===a.inputs.length&&(a===o.lastBlock?(o.insertAtEnd(),i.setToBlock(o.lastBlock)):i.setToBlock(o.nextBlock)),this.Editor.Toolbar.close()}},{key:"CSS",get:function(){return{toolbox:"ce-toolbox",toolboxButton:"ce-toolbox__button",toolboxButtonActive:"ce-toolbox__button--active",toolboxOpened:"ce-toolbox--opened",openedToolbarHolderModifier:"codex-editor--toolbox-opened",buttonTooltip:"ce-toolbox-button-tooltip",buttonShortcut:"ce-toolbox-button-tooltip__shortcut"}}},{key:"isEmpty",get:function(){return 0===this.displayedToolsCount}}]),e}(c.default);o.default=b,b.displayName="Toolbox",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(5),n(4),n(6),n(7),n(383)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u){"use strict";var d=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=d(i),r=d(r),a=d(a),s=d(s),l=d(l),c=d(c),u=d(u);var f=function(t){function e(t){var n,o=t.config;return(0,i.default)(this,e),(n=(0,a.default)(this,(0,s.default)(e).call(this,{config:o}))).lib=new u.default,n}return(0,l.default)(e,t),(0,r.default)(e,[{key:"show",value:function(t,e,n){this.lib.show(t,e,n)}},{key:"hide",value:function(){this.lib.hide()}},{key:"onHover",value:function(t,e,n){this.lib.onHover(t,e,n)}}]),e}(c.default);o.default=f,f.displayName="Tooltip",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(38),n(65),n(21),n(2),n(3),n(5),n(4),n(6),n(384),n(7),n(15),n(8),n(24),n(60),n(59)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d,f,h,p,v,g,y,b){"use strict";var k=n(13),m=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=m(i),r=m(r),a=m(a),s=m(s),l=m(l),c=m(c),u=m(u),d=m(d),f=m(f),h=m(h),p=m(p),v=k(v),g=m(g),y=m(y),b=m(b);var x=function(t){function e(){var t;return(0,s.default)(this,e),(t=(0,c.default)(this,(0,u.default)(e).apply(this,arguments))).isMobile=!1,t.contentRectCache=void 0,t.resizeDebouncer=v.debounce((function(){t.windowResize()}),200),t}return(0,d.default)(e,t),(0,l.default)(e,[{key:"addLoader",value:function(){this.nodes.loader=p.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:function(){return a.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:this.checkIsMobile(),this.make(),this.addLoader(),this.appendSVGSprite(),this.loadStyles();case 5:case"end":return t.stop()}}),null,this)}},{key:"toggleReadOnly",value:function(t){t?this.disableModuleBindings():this.enableModuleBindings()}},{key:"checkEmptiness",value:function(){var t=this.Editor.BlockManager;this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty,t.isEditorEmpty)}},{key:"destroy",value:function(){this.nodes.holder.innerHTML=""}},{key:"closeAllToolbars",value:function(){var t=this.Editor,e=t.Toolbox,n=t.BlockSettings,o=t.InlineToolbar,i=t.ConversionToolbar;n.close(),o.close(),i.close(),e.close()}},{key:"checkIsMobile",value:function(){this.isMobile=window.innerWidth<650}},{key:"make",value:function(){this.nodes.holder=p.default.getHolder(this.config.holder),this.nodes.wrapper=p.default.make("div",[this.CSS.editorWrapper].concat((0,r.default)(this.isRtl?[this.CSS.editorRtlFix]:[]))),this.nodes.redactor=p.default.make("div",this.CSS.editorZone),this.nodes.holder.offsetWidth=0);if(o.anyBlockSelected&&!g.default.isSelectionExists)return o.clearSelection(t),t.preventDefault(),t.stopImmediatePropagation(),void t.stopPropagation();if(!this.someToolbarOpened&&i&&"BODY"===t.target.tagName){var r=this.Editor.BlockManager.insert();this.Editor.Caret.setToBlock(r),this.Editor.BlockManager.highlightCurrentNode(),this.Editor.Toolbar.move(),this.Editor.Toolbar.plusButton.show()}this.Editor.BlockSelection.clearSelection(t)}},{key:"documentClicked",value:function(t){if(t.isTrusted){var e=t.target;this.nodes.holder.contains(e)||g.default.isAtEditor||(this.Editor.BlockManager.dropPointer(),this.Editor.InlineToolbar.close(),this.Editor.Toolbar.close(),this.Editor.ConversionToolbar.close()),this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted||this.Editor.BlockSelection.clearSelection(t)}}},{key:"documentTouched",value:function(t){var e=t.target;if(e===this.nodes.redactor){var n=t instanceof MouseEvent?t.clientX:t.touches[0].clientX,o=t instanceof MouseEvent?t.clientY:t.touches[0].clientY;e=document.elementFromPoint(n,o)}try{this.Editor.BlockManager.setCurrentBlockByChildNode(e),this.Editor.BlockManager.highlightCurrentNode()}catch(t){this.Editor.RectangleSelection.isRectActivated()||this.Editor.Caret.setToTheLastBlock()}this.Editor.Toolbar.open(),this.Editor.Toolbar.plusButton.hide()}},{key:"redactorClicked",value:function(t){if(g.default.isCollapsed){var e=function(){t.stopImmediatePropagation(),t.stopPropagation()},n=t.target,o=t.metaKey||t.ctrlKey;if(p.default.isAnchor(n)&&o){e();var i=n.getAttribute("href"),r=v.getValidUrl(i);v.openTab(r)}else this.Editor.BlockManager.currentBlock||(e(),this.Editor.BlockManager.insert()),this.Editor.Tools.isDefault(this.Editor.BlockManager.currentBlock.tool)&&(e(),this.Editor.BlockManager.currentBlock.isEmpty&&this.Editor.Toolbar.plusButton.show())}}},{key:"selectionChanged",value:function(t){var e=this.Editor,n=e.CrossBlockSelection,o=e.BlockSelection,i=g.default.anchorElement;n.isCrossBlockSelectionStarted&&o.anyBlockSelected&&g.default.get().removeAllRanges(),i&&i.closest(".".concat(y.default.CSS.content))?this.Editor.InlineToolbar.tryToShow(!0):this.Editor.InlineToolbar.containsNode(i)||this.Editor.InlineToolbar.close()}},{key:"appendSVGSprite",value:function(){var t=p.default.make("div");t.hidden=!0,t.style.display="none",t.innerHTML=f.default,p.default.append(this.nodes.wrapper,t)}},{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 t=this.nodes.wrapper.querySelector(".".concat(y.default.CSS.content));return t?(this.contentRectCache=t.getBoundingClientRect(),this.contentRectCache):{width:650,left:0,right:0}}},{key:"someToolbarOpened",get:function(){var t=this.Editor,e=t.Toolbox,n=t.BlockSettings,o=t.InlineToolbar,i=t.ConversionToolbar;return n.opened||o.opened||i.opened||e.opened}},{key:"someFlipperButtonFocused",get:function(){return Object.entries(this.Editor).filter((function(t){var e=(0,i.default)(t,2);return e[0],e[1].flipper instanceof b.default})).some((function(t){var e=(0,i.default)(t,2);return e[0],e[1].flipper.currentItem}))}}]),e}(h.default);o.default=x,x.displayName="UI",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){n(181),t.exports=n(353)},function(t,e,n){n(182)},function(t,e,n){"use strict";n(183),n(326),n(328),n(331),n(333),n(335),n(337),n(339),n(341),n(343),n(345),n(347),n(349),n(139)},function(t,e,n){n(184),n(187),n(188),n(189),n(190),n(191),n(192),n(193),n(194),n(195),n(196),n(197),n(198),n(199),n(200),n(201),n(202),n(203),n(204),n(205),n(206),n(207),n(208),n(209),n(210),n(211),n(212),n(213),n(214),n(215),n(216),n(217),n(218),n(219),n(220),n(221),n(222),n(223),n(224),n(225),n(226),n(227),n(228),n(230),n(231),n(232),n(233),n(234),n(235),n(236),n(237),n(238),n(239),n(240),n(241),n(242),n(243),n(244),n(245),n(246),n(247),n(248),n(249),n(250),n(251),n(252),n(253),n(254),n(255),n(256),n(257),n(258),n(259),n(260),n(261),n(262),n(263),n(265),n(266),n(268),n(269),n(270),n(271),n(272),n(273),n(274),n(276),n(277),n(278),n(279),n(280),n(281),n(282),n(283),n(284),n(285),n(286),n(287),n(288),n(102),n(289),n(128),n(290),n(129),n(291),n(292),n(293),n(294),n(130),n(297),n(298),n(299),n(300),n(301),n(302),n(303),n(304),n(305),n(306),n(307),n(308),n(309),n(310),n(311),n(312),n(313),n(314),n(315),n(316),n(317),n(318),n(319),n(320),n(321),n(322),n(323),n(324),n(325),t.exports=n(17)},function(t,e,n){"use strict";var o=n(9),i=n(25),r=n(18),a=n(0),s=n(22),l=n(40).KEY,c=n(10),u=n(67),d=n(52),f=n(42),h=n(14),p=n(83),v=n(109),g=n(186),y=n(70),b=n(11),k=n(12),m=n(20),x=n(27),S=n(39),w=n(41),E=n(46),T=n(112),B=n(32),C=n(69),_=n(19),O=n(44),I=B.f,N=_.f,M=T.f,L=o.Symbol,A=o.JSON,P=A&&A.stringify,R=h("_hidden"),j=h("toPrimitive"),D={}.propertyIsEnumerable,F=u("symbol-registry"),H=u("symbols"),U=u("op-symbols"),z=Object.prototype,G="function"==typeof L&&!!C.f,W=o.QObject,Y=!W||!W.prototype||!W.prototype.findChild,X=r&&c((function(){return 7!=E(N({},"a",{get:function(){return N(this,"a",{value:7}).a}})).a}))?function(t,e,n){var o=I(z,e);o&&delete z[e],N(t,e,n),o&&t!==z&&N(z,e,o)}:N,V=function(t){var e=H[t]=E(L.prototype);return e._k=t,e},K=G&&"symbol"==typeof L.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof L},Z=function(t,e,n){return t===z&&Z(U,e,n),b(t),e=S(e,!0),b(n),i(H,e)?(n.enumerable?(i(t,R)&&t[R][e]&&(t[R][e]=!1),n=E(n,{enumerable:w(0,!1)})):(i(t,R)||N(t,R,w(1,{})),t[R][e]=!0),X(t,e,n)):N(t,e,n)},q=function(t,e){b(t);for(var n,o=g(e=x(e)),i=0,r=o.length;r>i;)Z(t,n=o[i++],e[n]);return t},J=function(t){var e=D.call(this,t=S(t,!0));return!(this===z&&i(H,t)&&!i(U,t))&&(!(e||!i(this,t)||!i(H,t)||i(this,R)&&this[R][t])||e)},$=function(t,e){if(t=x(t),e=S(e,!0),t!==z||!i(H,e)||i(U,e)){var n=I(t,e);return!n||!i(H,e)||i(t,R)&&t[R][e]||(n.enumerable=!0),n}},Q=function(t){for(var e,n=M(x(t)),o=[],r=0;n.length>r;)i(H,e=n[r++])||e==R||e==l||o.push(e);return o},tt=function(t){for(var e,n=t===z,o=M(n?U:x(t)),r=[],a=0;o.length>a;)!i(H,e=o[a++])||n&&!i(z,e)||r.push(H[e]);return r};G||(s((L=function(){if(this instanceof L)throw TypeError("Symbol is not a constructor!");var t=f(arguments.length>0?arguments[0]:void 0),e=function(n){this===z&&e.call(U,n),i(this,R)&&i(this[R],t)&&(this[R][t]=!1),X(this,t,w(1,n))};return r&&Y&&X(z,t,{configurable:!0,set:e}),V(t)}).prototype,"toString",(function(){return this._k})),B.f=$,_.f=Z,n(47).f=T.f=Q,n(62).f=J,C.f=tt,r&&!n(43)&&s(z,"propertyIsEnumerable",J,!0),p.f=function(t){return V(h(t))}),a(a.G+a.W+a.F*!G,{Symbol:L});for(var et="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),nt=0;et.length>nt;)h(et[nt++]);for(var ot=O(h.store),it=0;ot.length>it;)v(ot[it++]);a(a.S+a.F*!G,"Symbol",{for:function(t){return i(F,t+="")?F[t]:F[t]=L(t)},keyFor:function(t){if(!K(t))throw TypeError(t+" is not a symbol!");for(var e in F)if(F[e]===t)return e},useSetter:function(){Y=!0},useSimple:function(){Y=!1}}),a(a.S+a.F*!G,"Object",{create:function(t,e){return void 0===e?E(t):q(E(t),e)},defineProperty:Z,defineProperties:q,getOwnPropertyDescriptor:$,getOwnPropertyNames:Q,getOwnPropertySymbols:tt});var rt=c((function(){C.f(1)}));a(a.S+a.F*rt,"Object",{getOwnPropertySymbols:function(t){return C.f(m(t))}}),A&&a(a.S+a.F*(!G||c((function(){var t=L();return"[null]"!=P([t])||"{}"!=P({a:t})||"{}"!=P(Object(t))}))),"JSON",{stringify:function(t){for(var e,n,o=[t],i=1;arguments.length>i;)o.push(arguments[i++]);if(n=e=o[1],(k(e)||void 0!==t)&&!K(t))return y(e)||(e=function(t,e){if("function"==typeof n&&(e=n.call(this,t,e)),!K(e))return e}),o[1]=e,P.apply(A,o)}}),L.prototype[j]||n(26)(L.prototype,j,L.prototype.valueOf),d(L,"Symbol"),d(Math,"Math",!0),d(o.JSON,"JSON",!0)},function(t,e,n){t.exports=n(67)("native-function-to-string",Function.toString)},function(t,e,n){var o=n(44),i=n(69),r=n(62);t.exports=function(t){var e=o(t),n=i.f;if(n)for(var a,s=n(t),l=r.f,c=0;s.length>c;)l.call(t,a=s[c++])&&e.push(a);return e}},function(t,e,n){var o=n(0);o(o.S,"Object",{create:n(46)})},function(t,e,n){var o=n(0);o(o.S+o.F*!n(18),"Object",{defineProperty:n(19).f})},function(t,e,n){var o=n(0);o(o.S+o.F*!n(18),"Object",{defineProperties:n(111)})},function(t,e,n){var o=n(27),i=n(32).f;n(33)("getOwnPropertyDescriptor",(function(){return function(t,e){return i(o(t),e)}}))},function(t,e,n){var o=n(20),i=n(48);n(33)("getPrototypeOf",(function(){return function(t){return i(o(t))}}))},function(t,e,n){var o=n(20),i=n(44);n(33)("keys",(function(){return function(t){return i(o(t))}}))},function(t,e,n){n(33)("getOwnPropertyNames",(function(){return n(112).f}))},function(t,e,n){var o=n(12),i=n(40).onFreeze;n(33)("freeze",(function(t){return function(e){return t&&o(e)?t(i(e)):e}}))},function(t,e,n){var o=n(12),i=n(40).onFreeze;n(33)("seal",(function(t){return function(e){return t&&o(e)?t(i(e)):e}}))},function(t,e,n){var o=n(12),i=n(40).onFreeze;n(33)("preventExtensions",(function(t){return function(e){return t&&o(e)?t(i(e)):e}}))},function(t,e,n){var o=n(12);n(33)("isFrozen",(function(t){return function(e){return!o(e)||!!t&&t(e)}}))},function(t,e,n){var o=n(12);n(33)("isSealed",(function(t){return function(e){return!o(e)||!!t&&t(e)}}))},function(t,e,n){var o=n(12);n(33)("isExtensible",(function(t){return function(e){return!!o(e)&&(!t||t(e))}}))},function(t,e,n){var o=n(0);o(o.S+o.F,"Object",{assign:n(113)})},function(t,e,n){var o=n(0);o(o.S,"Object",{is:n(114)})},function(t,e,n){var o=n(0);o(o.S,"Object",{setPrototypeOf:n(87).set})},function(t,e,n){"use strict";var o=n(63),i={};i[n(14)("toStringTag")]="z",i+""!="[object z]"&&n(22)(Object.prototype,"toString",(function(){return"[object "+o(this)+"]"}),!0)},function(t,e,n){var o=n(0);o(o.P,"Function",{bind:n(115)})},function(t,e,n){var o=n(19).f,i=Function.prototype,r=/^\s*function ([^ (]*)/;"name"in i||n(18)&&o(i,"name",{configurable:!0,get:function(){try{return(""+this).match(r)[1]}catch(t){return""}}})},function(t,e,n){"use strict";var o=n(12),i=n(48),r=n(14)("hasInstance"),a=Function.prototype;r in a||n(19).f(a,r,{value:function(t){if("function"!=typeof this||!o(t))return!1;if(!o(this.prototype))return t instanceof this;for(;t=i(t);)if(this.prototype===t)return!0;return!1}})},function(t,e,n){var o=n(0),i=n(117);o(o.G+o.F*(parseInt!=i),{parseInt:i})},function(t,e,n){var o=n(0),i=n(118);o(o.G+o.F*(parseFloat!=i),{parseFloat:i})},function(t,e,n){"use strict";var o=n(9),i=n(25),r=n(35),a=n(89),s=n(39),l=n(10),c=n(47).f,u=n(32).f,d=n(19).f,f=n(53).trim,h=o.Number,p=h,v=h.prototype,g="Number"==r(n(46)(v)),y="trim"in String.prototype,b=function(t){var e=s(t,!1);if("string"==typeof e&&e.length>2){var n,o,i,r=(e=y?e.trim():f(e,3)).charCodeAt(0);if(43===r||45===r){if(88===(n=e.charCodeAt(2))||120===n)return NaN}else if(48===r){switch(e.charCodeAt(1)){case 66:case 98:o=2,i=49;break;case 79:case 111:o=8,i=55;break;default:return+e}for(var a,l=e.slice(2),c=0,u=l.length;ci)return NaN;return parseInt(l,o)}}return+e};if(!h(" 0o1")||!h("0b1")||h("+0x1")){h=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof h&&(g?l((function(){v.valueOf.call(n)})):"Number"!=r(n))?a(new p(b(e)),n,h):b(e)};for(var k,m=n(18)?c(p):"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;m.length>x;x++)i(p,k=m[x])&&!i(h,k)&&d(h,k,u(p,k));h.prototype=v,v.constructor=h,n(22)(o,"Number",h)}},function(t,e,n){"use strict";var o=n(0),i=n(31),r=n(119),a=n(90),s=1..toFixed,l=Math.floor,c=[0,0,0,0,0,0],u="Number.toFixed: incorrect invocation!",d=function(t,e){for(var n=-1,o=e;++n<6;)o+=t*c[n],c[n]=o%1e7,o=l(o/1e7)},f=function(t){for(var e=6,n=0;--e>=0;)n+=c[e],c[e]=l(n/t),n=n%t*1e7},h=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==c[t]){var n=String(c[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e},p=function(t,e,n){return 0===e?n:e%2==1?p(t,e-1,n*t):p(t*t,e/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(10)((function(){s.call({})}))),"Number",{toFixed:function(t){var e,n,o,s,l=r(this,u),c=i(t),v="",g="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=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(l*p(2,69,1))-69)<0?l*p(2,-e,1):l/p(2,e,1),n*=4503599627370496,(e=52-e)>0){for(d(0,n),o=c;o>=7;)d(1e7,0),o-=7;for(d(p(10,o,1),0),o=e-1;o>=23;)f(1<<23),o-=23;f(1<0?v+((s=g.length)<=c?"0."+a.call("0",c-s)+g:g.slice(0,s-c)+"."+g.slice(s-c)):v+g}})},function(t,e,n){"use strict";var o=n(0),i=n(10),r=n(119),a=1..toPrecision;o(o.P+o.F*(i((function(){return"1"!==a.call(1,void 0)}))||!i((function(){a.call({})}))),"Number",{toPrecision:function(t){var e=r(this,"Number#toPrecision: incorrect invocation!");return void 0===t?a.call(e):a.call(e,t)}})},function(t,e,n){var o=n(0);o(o.S,"Number",{EPSILON:Math.pow(2,-52)})},function(t,e,n){var o=n(0),i=n(9).isFinite;o(o.S,"Number",{isFinite:function(t){return"number"==typeof t&&i(t)}})},function(t,e,n){var o=n(0);o(o.S,"Number",{isInteger:n(120)})},function(t,e,n){var o=n(0);o(o.S,"Number",{isNaN:function(t){return t!=t}})},function(t,e,n){var o=n(0),i=n(120),r=Math.abs;o(o.S,"Number",{isSafeInteger:function(t){return i(t)&&r(t)<=9007199254740991}})},function(t,e,n){var o=n(0);o(o.S,"Number",{MAX_SAFE_INTEGER:9007199254740991})},function(t,e,n){var o=n(0);o(o.S,"Number",{MIN_SAFE_INTEGER:-9007199254740991})},function(t,e,n){var o=n(0),i=n(118);o(o.S+o.F*(Number.parseFloat!=i),"Number",{parseFloat:i})},function(t,e,n){var o=n(0),i=n(117);o(o.S+o.F*(Number.parseInt!=i),"Number",{parseInt:i})},function(t,e,n){var o=n(0),i=n(121),r=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(t){return(t=+t)<1?NaN:t>94906265.62425156?Math.log(t)+Math.LN2:i(t-1+r(t-1)*r(t+1))}})},function(t,e,n){var o=n(0),i=Math.asinh;o(o.S+o.F*!(i&&1/i(0)>0),"Math",{asinh:function t(e){return isFinite(e=+e)&&0!=e?e<0?-t(-e):Math.log(e+Math.sqrt(e*e+1)):e}})},function(t,e,n){var o=n(0),i=Math.atanh;o(o.S+o.F*!(i&&1/i(-0)<0),"Math",{atanh:function(t){return 0==(t=+t)?t:Math.log((1+t)/(1-t))/2}})},function(t,e,n){var o=n(0),i=n(91);o(o.S,"Math",{cbrt:function(t){return i(t=+t)*Math.pow(Math.abs(t),1/3)}})},function(t,e,n){var o=n(0);o(o.S,"Math",{clz32:function(t){return(t>>>=0)?31-Math.floor(Math.log(t+.5)*Math.LOG2E):32}})},function(t,e,n){var o=n(0),i=Math.exp;o(o.S,"Math",{cosh:function(t){return(i(t=+t)+i(-t))/2}})},function(t,e,n){var o=n(0),i=n(92);o(o.S+o.F*(i!=Math.expm1),"Math",{expm1:i})},function(t,e,n){var o=n(0);o(o.S,"Math",{fround:n(229)})},function(t,e,n){var o=n(91),i=Math.pow,r=i(2,-52),a=i(2,-23),s=i(2,127)*(2-a),l=i(2,-126);t.exports=Math.fround||function(t){var e,n,i=Math.abs(t),c=o(t);return is||n!=n?c*(1/0):c*n}},function(t,e,n){var o=n(0),i=Math.abs;o(o.S,"Math",{hypot:function(t,e){for(var n,o,r=0,a=0,s=arguments.length,l=0;a0?(o=n/l)*o:n;return l===1/0?1/0:l*Math.sqrt(r)}})},function(t,e,n){var o=n(0),i=Math.imul;o(o.S+o.F*n(10)((function(){return-5!=i(4294967295,5)||2!=i.length})),"Math",{imul:function(t,e){var n=+t,o=+e,i=65535&n,r=65535&o;return 0|i*r+((65535&n>>>16)*r+i*(65535&o>>>16)<<16>>>0)}})},function(t,e,n){var o=n(0);o(o.S,"Math",{log10:function(t){return Math.log(t)*Math.LOG10E}})},function(t,e,n){var o=n(0);o(o.S,"Math",{log1p:n(121)})},function(t,e,n){var o=n(0);o(o.S,"Math",{log2:function(t){return Math.log(t)/Math.LN2}})},function(t,e,n){var o=n(0);o(o.S,"Math",{sign:n(91)})},function(t,e,n){var o=n(0),i=n(92),r=Math.exp;o(o.S+o.F*n(10)((function(){return-2e-17!=!Math.sinh(-2e-17)})),"Math",{sinh:function(t){return Math.abs(t=+t)<1?(i(t)-i(-t))/2:(r(t-1)-r(-t-1))*(Math.E/2)}})},function(t,e,n){var o=n(0),i=n(92),r=Math.exp;o(o.S,"Math",{tanh:function(t){var e=i(t=+t),n=i(-t);return e==1/0?1:n==1/0?-1:(e-n)/(r(t)+r(-t))}})},function(t,e,n){var o=n(0);o(o.S,"Math",{trunc:function(t){return(t>0?Math.floor:Math.ceil)(t)}})},function(t,e,n){var o=n(0),i=n(45),r=String.fromCharCode,a=String.fromCodePoint;o(o.S+o.F*(!!a&&1!=a.length),"String",{fromCodePoint:function(t){for(var e,n=[],o=arguments.length,a=0;o>a;){if(e=+arguments[a++],i(e,1114111)!==e)throw RangeError(e+" is not a valid code point");n.push(e<65536?r(e):r(55296+((e-=65536)>>10),e%1024+56320))}return n.join("")}})},function(t,e,n){var o=n(0),i=n(27),r=n(16);o(o.S,"String",{raw:function(t){for(var e=i(t.raw),n=r(e.length),o=arguments.length,a=[],s=0;n>s;)a.push(String(e[s++])),s=e.length?{value:void 0,done:!0}:(t=o(e,n),this._i+=t.length,{value:t,done:!1})}))},function(t,e,n){"use strict";var o=n(0),i=n(93)(!1);o(o.P,"String",{codePointAt:function(t){return i(this,t)}})},function(t,e,n){"use strict";var o=n(0),i=n(16),r=n(95),a="".endsWith;o(o.P+o.F*n(97)("endsWith"),"String",{endsWith:function(t){var e=r(this,t,"endsWith"),n=arguments.length>1?arguments[1]:void 0,o=i(e.length),s=void 0===n?o:Math.min(i(n),o),l=String(t);return a?a.call(e,l,s):e.slice(s-l.length,s)===l}})},function(t,e,n){"use strict";var o=n(0),i=n(95);o(o.P+o.F*n(97)("includes"),"String",{includes:function(t){return!!~i(this,t,"includes").indexOf(t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var o=n(0);o(o.P,"String",{repeat:n(90)})},function(t,e,n){"use strict";var o=n(0),i=n(16),r=n(95),a="".startsWith;o(o.P+o.F*n(97)("startsWith"),"String",{startsWith:function(t){var e=r(this,t,"startsWith"),n=i(Math.min(arguments.length>1?arguments[1]:void 0,e.length)),o=String(t);return a?a.call(e,o,n):e.slice(n,n+o.length)===o}})},function(t,e,n){"use strict";n(23)("anchor",(function(t){return function(e){return t(this,"a","name",e)}}))},function(t,e,n){"use strict";n(23)("big",(function(t){return function(){return t(this,"big","","")}}))},function(t,e,n){"use strict";n(23)("blink",(function(t){return function(){return t(this,"blink","","")}}))},function(t,e,n){"use strict";n(23)("bold",(function(t){return function(){return t(this,"b","","")}}))},function(t,e,n){"use strict";n(23)("fixed",(function(t){return function(){return t(this,"tt","","")}}))},function(t,e,n){"use strict";n(23)("fontcolor",(function(t){return function(e){return t(this,"font","color",e)}}))},function(t,e,n){"use strict";n(23)("fontsize",(function(t){return function(e){return t(this,"font","size",e)}}))},function(t,e,n){"use strict";n(23)("italics",(function(t){return function(){return t(this,"i","","")}}))},function(t,e,n){"use strict";n(23)("link",(function(t){return function(e){return t(this,"a","href",e)}}))},function(t,e,n){"use strict";n(23)("small",(function(t){return function(){return t(this,"small","","")}}))},function(t,e,n){"use strict";n(23)("strike",(function(t){return function(){return t(this,"strike","","")}}))},function(t,e,n){"use strict";n(23)("sub",(function(t){return function(){return t(this,"sub","","")}}))},function(t,e,n){"use strict";n(23)("sup",(function(t){return function(){return t(this,"sup","","")}}))},function(t,e,n){var o=n(0);o(o.S,"Date",{now:function(){return(new Date).getTime()}})},function(t,e,n){"use strict";var o=n(0),i=n(20),r=n(39);o(o.P+o.F*n(10)((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})})),"Date",{toJSON:function(t){var e=i(this),n=r(e);return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},function(t,e,n){var o=n(0),i=n(264);o(o.P+o.F*(Date.prototype.toISOString!==i),"Date",{toISOString:i})},function(t,e,n){"use strict";var o=n(10),i=Date.prototype.getTime,r=Date.prototype.toISOString,a=function(t){return t>9?t:"0"+t};t.exports=o((function(){return"0385-07-25T07:06:39.999Z"!=r.call(new Date(-5e13-1))}))||!o((function(){r.call(new Date(NaN))}))?function(){if(!isFinite(i.call(this)))throw RangeError("Invalid time value");var t=this,e=t.getUTCFullYear(),n=t.getUTCMilliseconds(),o=e<0?"-":e>9999?"+":"";return o+("00000"+Math.abs(e)).slice(o?-6:-4)+"-"+a(t.getUTCMonth()+1)+"-"+a(t.getUTCDate())+"T"+a(t.getUTCHours())+":"+a(t.getUTCMinutes())+":"+a(t.getUTCSeconds())+"."+(n>99?n:"0"+a(n))+"Z"}:r},function(t,e,n){var o=Date.prototype,i=o.toString,r=o.getTime;new Date(NaN)+""!="Invalid Date"&&n(22)(o,"toString",(function(){var t=r.call(this);return t==t?i.call(this):"Invalid Date"}))},function(t,e,n){var o=n(14)("toPrimitive"),i=Date.prototype;o in i||n(26)(i,o,n(267))},function(t,e,n){"use strict";var o=n(11),i=n(39);t.exports=function(t){if("string"!==t&&"number"!==t&&"default"!==t)throw TypeError("Incorrect hint");return i(o(this),"number"!=t)}},function(t,e,n){var o=n(0);o(o.S,"Array",{isArray:n(70)})},function(t,e,n){"use strict";var o=n(29),i=n(0),r=n(20),a=n(123),s=n(98),l=n(16),c=n(99),u=n(100);i(i.S+i.F*!n(71)((function(t){Array.from(t)})),"Array",{from:function(t){var e,n,i,d,f=r(t),h="function"==typeof this?this:Array,p=arguments.length,v=p>1?arguments[1]:void 0,g=void 0!==v,y=0,b=u(f);if(g&&(v=o(v,p>2?arguments[2]:void 0,2)),null==b||h==Array&&s(b))for(n=new h(e=l(f.length));e>y;y++)c(n,y,g?v(f[y],y):f[y]);else for(d=b.call(f),n=new h;!(i=d.next()).done;y++)c(n,y,g?a(d,v,[i.value,y],!0):i.value);return n.length=y,n}})},function(t,e,n){"use strict";var o=n(0),i=n(99);o(o.S+o.F*n(10)((function(){function t(){}return!(Array.of.call(t)instanceof t)})),"Array",{of:function(){for(var t=0,e=arguments.length,n=new("function"==typeof this?this:Array)(e);e>t;)i(n,t,arguments[t++]);return n.length=e,n}})},function(t,e,n){"use strict";var o=n(0),i=n(27),r=[].join;o(o.P+o.F*(n(61)!=Object||!n(28)(r)),"Array",{join:function(t){return r.call(i(this),void 0===t?",":t)}})},function(t,e,n){"use strict";var o=n(0),i=n(86),r=n(35),a=n(45),s=n(16),l=[].slice;o(o.P+o.F*n(10)((function(){i&&l.call(i)})),"Array",{slice:function(t,e){var n=s(this.length),o=r(this);if(e=void 0===e?n:e,"Array"==o)return l.call(this,t,e);for(var i=a(t,n),c=a(e,n),u=s(c-i),d=new Array(u),f=0;f1&&(o=Math.min(o,r(arguments[1]))),o<0&&(o=n+o);o>=0;o--)if(o in e&&e[o]===t)return o||0;return-1}})},function(t,e,n){var o=n(0);o(o.P,"Array",{copyWithin:n(126)}),n(49)("copyWithin")},function(t,e,n){var o=n(0);o(o.P,"Array",{fill:n(101)}),n(49)("fill")},function(t,e,n){"use strict";var o=n(0),i=n(34)(5),r=!0;"find"in[]&&Array(1).find((function(){r=!1})),o(o.P+o.F*r,"Array",{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(49)("find")},function(t,e,n){"use strict";var o=n(0),i=n(34)(6),r="findIndex",a=!0;r in[]&&Array(1)[r]((function(){a=!1})),o(o.P+o.F*a,"Array",{findIndex:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(49)(r)},function(t,e,n){n(55)("Array")},function(t,e,n){var o=n(9),i=n(89),r=n(19).f,a=n(47).f,s=n(96),l=n(72),c=o.RegExp,u=c,d=c.prototype,f=/a/g,h=/a/g,p=new c(f)!==f;if(n(18)&&(!p||n(10)((function(){return h[n(14)("match")]=!1,c(f)!=f||c(h)==h||"/a/i"!=c(f,"i")})))){c=function(t,e){var n=this instanceof c,o=s(t),r=void 0===e;return!n&&o&&t.constructor===c&&r?t:i(p?new u(o&&!r?t.source:t,e):u((o=t instanceof c)?t.source:t,o&&r?l.call(t):e),n?this:d,c)};for(var v=function(t){t in c||r(c,t,{configurable:!0,get:function(){return u[t]},set:function(e){u[t]=e}})},g=a(u),y=0;g.length>y;)v(g[y++]);d.constructor=c,c.prototype=d,n(22)(o,"RegExp",c)}n(55)("RegExp")},function(t,e,n){"use strict";n(129);var o=n(11),i=n(72),r=n(18),a=/./.toString,s=function(t){n(22)(RegExp.prototype,"toString",t,!0)};n(10)((function(){return"/a/b"!=a.call({source:"a",flags:"b"})}))?s((function(){var t=o(this);return"/".concat(t.source,"/","flags"in t?t.flags:!r&&t instanceof RegExp?i.call(t):void 0)})):"toString"!=a.name&&s((function(){return a.call(this)}))},function(t,e,n){"use strict";var o=n(11),i=n(16),r=n(104),a=n(73);n(74)("match",1,(function(t,e,n,s){return[function(n){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o):new RegExp(n)[e](String(o))},function(t){var e=s(n,t,this);if(e.done)return e.value;var l=o(t),c=String(this);if(!l.global)return a(l,c);var u=l.unicode;l.lastIndex=0;for(var d,f=[],h=0;null!==(d=a(l,c));){var p=String(d[0]);f[h]=p,""===p&&(l.lastIndex=r(c,i(l.lastIndex),u)),h++}return 0===h?null:f}]}))},function(t,e,n){"use strict";var o=n(11),i=n(20),r=n(16),a=n(31),s=n(104),l=n(73),c=Math.max,u=Math.min,d=Math.floor,f=/\$([$&`']|\d\d?|<[^>]*>)/g,h=/\$([$&`']|\d\d?)/g;n(74)("replace",2,(function(t,e,n,p){return[function(o,i){var r=t(this),a=null==o?void 0:o[e];return void 0!==a?a.call(o,r,i):n.call(String(r),o,i)},function(t,e){var i=p(n,t,this,e);if(i.done)return i.value;var d=o(t),f=String(this),h="function"==typeof e;h||(e=String(e));var g=d.global;if(g){var y=d.unicode;d.lastIndex=0}for(var b=[];;){var k=l(d,f);if(null===k)break;if(b.push(k),!g)break;""===String(k[0])&&(d.lastIndex=s(f,r(d.lastIndex),y))}for(var m,x="",S=0,w=0;w=S&&(x+=f.slice(S,T)+I,S=T+E.length)}return x+f.slice(S)}];function v(t,e,o,r,a,s){var l=o+t.length,c=r.length,u=h;return void 0!==a&&(a=i(a),u=f),n.call(s,u,(function(n,i){var s;switch(i.charAt(0)){case"$":return"$";case"&":return t;case"`":return e.slice(0,o);case"'":return e.slice(l);case"<":s=a[i.slice(1,-1)];break;default:var u=+i;if(0===u)return n;if(u>c){var f=d(u/10);return 0===f?n:f<=c?void 0===r[f-1]?i.charAt(1):r[f-1]+i.charAt(1):n}s=r[u-1]}return void 0===s?"":s}))}}))},function(t,e,n){"use strict";var o=n(11),i=n(114),r=n(73);n(74)("search",1,(function(t,e,n,a){return[function(n){var o=t(this),i=null==n?void 0:n[e];return void 0!==i?i.call(n,o):new RegExp(n)[e](String(o))},function(t){var e=a(n,t,this);if(e.done)return e.value;var s=o(t),l=String(this),c=s.lastIndex;i(c,0)||(s.lastIndex=0);var u=r(s,l);return i(s.lastIndex,c)||(s.lastIndex=c),null===u?-1:u.index}]}))},function(t,e,n){"use strict";var o=n(96),i=n(11),r=n(64),a=n(104),s=n(16),l=n(73),c=n(103),u=n(10),d=Math.min,f=[].push,h=!u((function(){RegExp(4294967295,"y")}));n(74)("split",2,(function(t,e,n,u){var p;return p="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,e){var i=String(this);if(void 0===t&&0===e)return[];if(!o(t))return n.call(i,t,e);for(var r,a,s,l=[],u=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),d=0,h=void 0===e?4294967295:e>>>0,p=new RegExp(t.source,u+"g");(r=c.call(p,i))&&!((a=p.lastIndex)>d&&(l.push(i.slice(d,r.index)),r.length>1&&r.index=h));)p.lastIndex===r.index&&p.lastIndex++;return d===i.length?!s&&p.test("")||l.push(""):l.push(i.slice(d)),l.length>h?l.slice(0,h):l}:"0".split(void 0,0).length?function(t,e){return void 0===t&&0===e?[]:n.call(this,t,e)}:n,[function(n,o){var i=t(this),r=null==n?void 0:n[e];return void 0!==r?r.call(n,i,o):p.call(String(i),n,o)},function(t,e){var o=u(p,t,this,e,p!==n);if(o.done)return o.value;var c=i(t),f=String(this),v=r(c,RegExp),g=c.unicode,y=(c.ignoreCase?"i":"")+(c.multiline?"m":"")+(c.unicode?"u":"")+(h?"y":"g"),b=new v(h?c:"^(?:"+c.source+")",y),k=void 0===e?4294967295:e>>>0;if(0===k)return[];if(0===f.length)return null===l(b,f)?[f]:[];for(var m=0,x=0,S=[];x0?arguments[0]:void 0)}}),{get:function(t){var e=o.getEntry(i(this,"Map"),t);return e&&e.v},set:function(t,e){return o.def(i(this,"Map"),0===t?0:t,e)}},o,!0)},function(t,e,n){"use strict";var o=n(133),i=n(50);t.exports=n(77)("Set",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return o.def(i(this,"Set"),t=0===t?0:t,t)}},o)},function(t,e,n){"use strict";var o,i=n(9),r=n(34)(0),a=n(22),s=n(40),l=n(113),c=n(134),u=n(12),d=n(50),f=n(50),h=!i.ActiveXObject&&"ActiveXObject"in i,p=s.getWeak,v=Object.isExtensible,g=c.ufstore,y=function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}},b={get:function(t){if(u(t)){var e=p(t);return!0===e?g(d(this,"WeakMap")).get(t):e?e[this._i]:void 0}},set:function(t,e){return c.def(d(this,"WeakMap"),t,e)}},k=t.exports=n(77)("WeakMap",y,b,c,!0,!0);f&&h&&(l((o=c.getConstructor(y,"WeakMap")).prototype,b),s.NEED=!0,r(["delete","has","get","set"],(function(t){var e=k.prototype,n=e[t];a(e,t,(function(e,i){if(u(e)&&!v(e)){this._f||(this._f=new o);var r=this._f[t](e,i);return"set"==t?this:r}return n.call(this,e,i)}))})))},function(t,e,n){"use strict";var o=n(134),i=n(50);n(77)("WeakSet",(function(t){return function(){return t(this,arguments.length>0?arguments[0]:void 0)}}),{add:function(t){return o.def(i(this,"WeakSet"),t,!0)}},o,!1,!0)},function(t,e,n){"use strict";var o=n(0),i=n(78),r=n(106),a=n(11),s=n(45),l=n(16),c=n(12),u=n(9).ArrayBuffer,d=n(64),f=r.ArrayBuffer,h=r.DataView,p=i.ABV&&u.isView,v=f.prototype.slice,g=i.VIEW;o(o.G+o.W+o.F*(u!==f),{ArrayBuffer:f}),o(o.S+o.F*!i.CONSTR,"ArrayBuffer",{isView:function(t){return p&&p(t)||c(t)&&g in t}}),o(o.P+o.U+o.F*n(10)((function(){return!new f(2).slice(1,void 0).byteLength})),"ArrayBuffer",{slice:function(t,e){if(void 0!==v&&void 0===e)return v.call(a(this),t);for(var n=a(this).byteLength,o=s(t,n),i=s(void 0===e?n:e,n),r=new(d(this,f))(l(i-o)),c=new h(this),u=new h(r),p=0;o=e.length)return{value:void 0,done:!0}}while(!((t=e[this._i++])in this._t));return{value:t,done:!1}})),o(o.S,"Reflect",{enumerate:function(t){return new r(t)}})},function(t,e,n){var o=n(32),i=n(48),r=n(25),a=n(0),s=n(12),l=n(11);a(a.S,"Reflect",{get:function t(e,n){var a,c,u=arguments.length<3?e:arguments[2];return l(e)===u?e[n]:(a=o.f(e,n))?r(a,"value")?a.value:void 0!==a.get?a.get.call(u):void 0:s(c=i(e))?t(c,n,u):void 0}})},function(t,e,n){var o=n(32),i=n(0),r=n(11);i(i.S,"Reflect",{getOwnPropertyDescriptor:function(t,e){return o.f(r(t),e)}})},function(t,e,n){var o=n(0),i=n(48),r=n(11);o(o.S,"Reflect",{getPrototypeOf:function(t){return i(r(t))}})},function(t,e,n){var o=n(0);o(o.S,"Reflect",{has:function(t,e){return e in t}})},function(t,e,n){var o=n(0),i=n(11),r=Object.isExtensible;o(o.S,"Reflect",{isExtensible:function(t){return i(t),!r||r(t)}})},function(t,e,n){var o=n(0);o(o.S,"Reflect",{ownKeys:n(136)})},function(t,e,n){var o=n(0),i=n(11),r=Object.preventExtensions;o(o.S,"Reflect",{preventExtensions:function(t){i(t);try{return r&&r(t),!0}catch(t){return!1}}})},function(t,e,n){var o=n(19),i=n(32),r=n(48),a=n(25),s=n(0),l=n(41),c=n(11),u=n(12);s(s.S,"Reflect",{set:function t(e,n,s){var d,f,h=arguments.length<4?e:arguments[3],p=i.f(c(e),n);if(!p){if(u(f=r(e)))return t(f,n,s,h);p=l(0)}if(a(p,"value")){if(!1===p.writable||!u(h))return!1;if(d=i.f(h,n)){if(d.get||d.set||!1===d.writable)return!1;d.value=s,o.f(h,n,d)}else o.f(h,n,l(0,s));return!0}return void 0!==p.set&&(p.set.call(h,s),!0)}})},function(t,e,n){var o=n(0),i=n(87);i&&o(o.S,"Reflect",{setPrototypeOf:function(t,e){i.check(t,e);try{return i.set(t,e),!0}catch(t){return!1}}})},function(t,e,n){n(327),t.exports=n(17).Array.includes},function(t,e,n){"use strict";var o=n(0),i=n(68)(!0);o(o.P,"Array",{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),n(49)("includes")},function(t,e,n){n(329),t.exports=n(17).Array.flatMap},function(t,e,n){"use strict";var o=n(0),i=n(330),r=n(20),a=n(16),s=n(30),l=n(124);o(o.P,"Array",{flatMap:function(t){var e,n,o=r(this);return s(t),e=a(o.length),n=l(o,0),i(n,o,o,e,0,1,t,arguments[1]),n}}),n(49)("flatMap")},function(t,e,n){"use strict";var o=n(70),i=n(12),r=n(16),a=n(29),s=n(14)("isConcatSpreadable");t.exports=function t(e,n,l,c,u,d,f,h){for(var p,v,g=u,y=0,b=!!f&&a(f,h,3);y0)g=t(e,n,p,r(p.length),g,d-1)-1;else{if(g>=9007199254740991)throw TypeError();e[g]=p}g++}y++}return g}},function(t,e,n){n(332),t.exports=n(17).String.padStart},function(t,e,n){"use strict";var o=n(0),i=n(137),r=n(76),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r);o(o.P+o.F*a,"String",{padStart:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!0)}})},function(t,e,n){n(334),t.exports=n(17).String.padEnd},function(t,e,n){"use strict";var o=n(0),i=n(137),r=n(76),a=/Version\/10\.\d+(\.\d+)?( Mobile\/\w+)? Safari\//.test(r);o(o.P+o.F*a,"String",{padEnd:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0,!1)}})},function(t,e,n){n(336),t.exports=n(17).String.trimLeft},function(t,e,n){"use strict";n(53)("trimLeft",(function(t){return function(){return t(this,1)}}),"trimStart")},function(t,e,n){n(338),t.exports=n(17).String.trimRight},function(t,e,n){"use strict";n(53)("trimRight",(function(t){return function(){return t(this,2)}}),"trimEnd")},function(t,e,n){n(340),t.exports=n(83).f("asyncIterator")},function(t,e,n){n(109)("asyncIterator")},function(t,e,n){n(342),t.exports=n(17).Object.getOwnPropertyDescriptors},function(t,e,n){var o=n(0),i=n(136),r=n(27),a=n(32),s=n(99);o(o.S,"Object",{getOwnPropertyDescriptors:function(t){for(var e,n,o=r(t),l=a.f,c=i(o),u={},d=0;c.length>d;)void 0!==(n=l(o,e=c[d++]))&&s(u,e,n);return u}})},function(t,e,n){n(344),t.exports=n(17).Object.values},function(t,e,n){var o=n(0),i=n(138)(!1);o(o.S,"Object",{values:function(t){return i(t)}})},function(t,e,n){n(346),t.exports=n(17).Object.entries},function(t,e,n){var o=n(0),i=n(138)(!0);o(o.S,"Object",{entries:function(t){return i(t)}})},function(t,e,n){"use strict";n(130),n(348),t.exports=n(17).Promise.finally},function(t,e,n){"use strict";var o=n(0),i=n(17),r=n(9),a=n(64),s=n(132);o(o.P+o.R,"Promise",{finally:function(t){var e=a(this,i.Promise||r.Promise),n="function"==typeof t;return this.then(n?function(n){return s(e,t()).then((function(){return n}))}:t,n?function(n){return s(e,t()).then((function(){throw n}))}:t)}})},function(t,e,n){n(350),n(351),n(352),t.exports=n(17)},function(t,e,n){var o=n(9),i=n(0),r=n(76),a=[].slice,s=/MSIE .\./.test(r),l=function(t){return function(e,n){var o=arguments.length>2,i=!!o&&a.call(arguments,2);return t(o?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};i(i.G+i.B+i.F*s,{setTimeout:l(o.setTimeout),setInterval:l(o.setInterval)})},function(t,e,n){var o=n(0),i=n(105);o(o.G+o.B,{setImmediate:i.set,clearImmediate:i.clear})},function(t,e,n){for(var o=n(102),i=n(44),r=n(22),a=n(9),s=n(26),l=n(54),c=n(14),u=c("iterator"),d=c("toStringTag"),f=l.Array,h={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},p=i(h),v=0;v=0&&e.item(n)!==this;);return n>-1}),Element.prototype.closest||(Element.prototype.closest=function(t){var e=this;if(!document.documentElement.contains(e))return null;do{if(e.matches(t))return e;e=e.parentElement||e.parentNode}while(null!==e);return null}),Element.prototype.prepend||(Element.prototype.prepend=function(t){var e=document.createDocumentFragment();Array.isArray(t)||(t=[t]),t.forEach((function(t){var n=t instanceof Node;e.appendChild(n?t:document.createTextNode(t))})),this.insertBefore(e,this.firstChild)})})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(51),n(21),n(2),n(3),n(15),n(8),n(58),n(141)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l,c,u,d){"use strict";var f=n(13),h=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=h(i),r=h(r),a=h(a),s=h(s),l=h(l),c=f(c),u=h(u);var p=n(369),v=[];p.keys().forEach((function(t){t.match(/^\.\/[^_][\w/]*\.([tj])s$/)&&v.push(p(t))}));var g=function(){function t(e){var n,o,i=this;(0,a.default)(this,t),this.moduleInstances={},this.isReady=new Promise((function(t,e){n=t,o=e})),Promise.resolve().then((function(){return r.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:return i.configuration=e,t.next=3,r.default.awrap(i.validate());case 3:return t.next=5,r.default.awrap(i.init());case 5:return t.next=7,r.default.awrap(i.start());case 7:c.logLabeled("I'm ready! (ノ◕ヮ◕)ノ*:・゚✧","log","","color: #E24A75"),setTimeout((function(){var t,e,o;return r.default.async((function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,r.default.awrap(i.render());case 2:i.configuration.autofocus&&(t=i.moduleInstances,e=t.BlockManager,(o=t.Caret).setToBlock(e.blocks[0],o.positions.START),e.highlightCurrentNode()),i.moduleInstances.UI.removeLoader(),n();case 5:case"end":return a.stop()}}))}),500);case 9:case"end":return t.stop()}}))})).catch((function(t){c.log("Editor.js is not ready because of ".concat(t),"error"),o(t)}))}return(0,s.default)(t,[{key:"validate",value:function(){var t,e,n;return r.default.async((function(o){for(;;)switch(o.prev=o.next){case 0:if(t=this.config,e=t.holderId,n=t.holder,!e||!n){o.next=3;break}throw Error("«holderId» and «holder» param can't assign at the same time.");case 3:if("string"!=typeof n||l.default.get(n)){o.next=5;break}throw Error("element with ID «".concat(n,"» is missing. Pass correct holder's ID."));case 5:if(!n||"object"!==(0,i.default)(n)||l.default.isElement(n)){o.next=7;break}throw Error("holder as HTMLElement if provided must be inherit from Element class.");case 7:case"end":return o.stop()}}),null,this)}},{key:"init",value:function(){this.constructModules(),this.configureModules()}},{key:"start",value:function(){var t,e=this;return r.default.async((function(n){for(;;)switch(n.prev=n.next){case 0:return t=["Tools","UI","BlockManager","Paste","BlockSelection","RectangleSelection","CrossBlockSelection","ReadOnly"],n.next=3,r.default.awrap(t.reduce((function(t,n){return t.then((function(){return r.default.async((function(t){for(;;)switch(t.prev=t.next){case 0:return t.prev=0,t.next=3,r.default.awrap(e.moduleInstances[n].prepare());case 3:t.next=10;break;case 5:if(t.prev=5,t.t0=t.catch(0),!(t.t0 instanceof d.CriticalError)){t.next=9;break}throw new Error(t.t0.message);case 9:c.log("Module ".concat(n," was skipped because of %o"),"warn",t.t0);case 10:case"end":return t.stop()}}),null,null,[[0,5]])}))}),Promise.resolve()));case 3:case"end":return n.stop()}}))}},{key:"render",value:function(){return this.moduleInstances.Renderer.render(this.config.data.blocks)}},{key:"constructModules",value:function(){var t=this;v.forEach((function(e){var n=c.isFunction(e)?e:e.default;try{t.moduleInstances[n.displayName]=new n({config:t.configuration})}catch(t){c.log("Module ".concat(n.displayName," skipped because"),"warn",t)}}))}},{key:"configureModules",value:function(){for(var t in this.moduleInstances)Object.prototype.hasOwnProperty.call(this.moduleInstances,t)&&(this.moduleInstances[t].state=this.getModulesDiff(t))}},{key:"getModulesDiff",value:function(t){var e={};for(var n in this.moduleInstances)n!==t&&(e[n]=this.moduleInstances[n]);return e}},{key:"configuration",set:function(t){var e,n;"object"!==(0,i.default)(t)&&(t={holder:t}),c.deprecationAssert(!!t.holderId,"config.holderId","config.holder"),t.holderId&&!t.holder&&(t.holder=t.holderId,t.holderId=null),this.config=t,null==this.config.holder&&(this.config.holder="editorjs"),this.config.logLevel||(this.config.logLevel=c.LogLevels.VERBOSE),c.setLogLevel(this.config.logLevel),c.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||{},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,c.isEmpty(this.config.data)?(this.config.data={},this.config.data.blocks=[o]):this.config.data.blocks&&0!==this.config.data.blocks.length||(this.config.data.blocks=[o]),this.config.readOnly=this.config.readOnly||!1,(null===(e=t.i18n)||void 0===e?void 0:e.messages)&&u.default.setDictionary(t.i18n.messages),this.config.i18n.direction=(null===(n=t.i18n)||void 0===n?void 0:n.direction)||"ltr"},get:function(){return this.config}}]),t}();o.default=g,g.displayName="Core",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e){t.exports=function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e0&&void 0!==arguments[0]&&arguments[0];this.nodes.input.classList.add(this.CSS.inputShowed),t&&this.nodes.input.focus(),this.inputOpened=!0}},{key:"closeActions",value:function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];if(this.selection.isFakeBackgroundEnabled){var e=new a.default;e.save(),this.selection.restore(),this.selection.removeFakeBackground(),e.restore()}this.nodes.input.classList.remove(this.CSS.inputShowed),this.nodes.input.value="",t&&this.selection.clearSaved(),this.inputOpened=!1}},{key:"enterPressed",value:function(t){var e=this.nodes.input.value||"";if(e.trim()||(this.selection.restore(),this.unlink(),t.preventDefault(),this.closeActions()),!this.validateURL(e))return this.notifier.show({message:"Pasted link is not valid.",style:"error"}),void l.log("Incorrect Link pasted","warn",e);e=this.prepareLink(e),this.selection.restore(),this.selection.removeFakeBackground(),this.insertLink(e),t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),this.selection.collapseToEnd(),this.inlineToolbar.close()}},{key:"validateURL",value:function(t){return!/\s/.test(t)}},{key:"prepareLink",value:function(t){return t=t.trim(),t=this.addProtocol(t)}},{key:"addProtocol",value:function(t){if(/^(\w+):(\/\/)?/.test(t))return t;var e=/^\/[^/\s]/.test(t),n="#"===t.substring(0,1),o=/^\/\/[^/\s]/.test(t);return e||n||o||(t="http://"+t),t}},{key:"insertLink",value:function(t){var e=this.selection.findParentTag("A");e&&this.selection.expandToTag(e),document.execCommand(this.commandLink,!1,t)}},{key:"unlink",value:function(){document.execCommand(this.commandUnlink)}},{key:"shortcut",get:function(){return"CMD+K"}}],[{key:"sanitize",get:function(){return{a:{href:!0,target:"_blank",rel:"nofollow"}}}}]),t}();o.default=d,d.displayName="LinkInlineTool",d.isInline=!0,d.title="Link",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=e.data,o=e.api;(0,i.default)(this,t),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,r.default)(t,[{key:"render",value:function(){return this.wrapper}},{key:"save",value:function(){return this.savedData}},{key:"make",value:function(){var t=a.default.make("div",this.CSS.wrapper),e=a.default.svg("sad-face",52,52),n=a.default.make("div",this.CSS.info),o=a.default.make("div",this.CSS.title,{textContent:this.title}),i=a.default.make("div",this.CSS.subtitle,{textContent:this.subtitle});return t.appendChild(e),n.appendChild(o),n.appendChild(i),t.appendChild(n),t}}]),t}();o.default=l,l.displayName="Stub",l.isReadOnlySupported=!0,t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15),n(8),n(24)],void 0===(r="function"==typeof(o=function(o,i,r,a,s,l){"use strict";var c=n(13),u=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=u(i),r=u(r),a=u(a),s=c(s),l=u(l);var d=function(){function t(e,n){(0,i.default)(this,t),this.cursor=-1,this.items=[],this.items=e||[],this.focusedCssClass=n}return(0,r.default)(t,[{key:"setItems",value:function(t){this.items=t}},{key:"next",value:function(){this.cursor=this.leafNodesAndReturnIndex(t.directions.RIGHT)}},{key:"previous",value:function(){this.cursor=this.leafNodesAndReturnIndex(t.directions.LEFT)}},{key:"dropCursor",value:function(){-1!==this.cursor&&(this.items[this.cursor].classList.remove(this.focusedCssClass),this.cursor=-1)}},{key:"leafNodesAndReturnIndex",value:function(e){var n=this;if(0===this.items.length)return this.cursor;var o=this.cursor;return-1===o?o=e===t.directions.RIGHT?-1:0:this.items[o].classList.remove(this.focusedCssClass),o=e===t.directions.RIGHT?(o+1)%this.items.length:(this.items.length+o-1)%this.items.length,a.default.canSetCaret(this.items[o])&&s.delay((function(){return l.default.setCursor(n.items[o])}),50)(),this.items[o].classList.add(this.focusedCssClass),o}},{key:"currentItem",get:function(){return-1===this.cursor?null:this.items[this.cursor]}}]),t}();o.default=d,d.displayName="DomIterator",d.directions={RIGHT:"right",LEFT:"left"},t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=e.api;(0,i.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-up",animation:"wobble"},this.api=n}return(0,r.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-up",14,14)),this.api.listeners.on(e,"click",(function(n){return t.handleClick(n,e)}),!1),this.api.tooltip.onHover(e,this.api.i18n.t("Move up")),e}},{key:"handleClick",value:function(t,e){var n=this,o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o),r=this.api.blocks.getBlockByIndex(o-1);if(0===o||!i||!r)return e.classList.add(this.CSS.animation),void window.setTimeout((function(){e.classList.remove(n.CSS.animation)}),500);var a,s=i.holder,l=r.holder,c=s.getBoundingClientRect(),u=l.getBoundingClientRect();a=u.top>0?Math.abs(c.top)-Math.abs(u.top):window.innerHeight-Math.abs(c.top)+Math.abs(u.top),window.scrollBy(0,-1*a),this.api.blocks.move(o-1),this.api.tooltip.hide()}}]),t}();o.default=l,l.displayName="MoveUpTune",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=this,o=e.api;(0,i.default)(this,t),this.CSS={button:"ce-settings__button",buttonDelete:"ce-settings__button--delete",buttonConfirm:"ce-settings__button--confirm"},this.nodes={button:null},this.api=o,this.resetConfirmation=function(){n.setConfirmation(!1)}}return(0,r.default)(t,[{key:"render",value:function(){var t=this;return this.nodes.button=a.default.make("div",[this.CSS.button,this.CSS.buttonDelete],{}),this.nodes.button.appendChild(a.default.svg("cross",12,12)),this.api.listeners.on(this.nodes.button,"click",(function(e){return t.handleClick(e)}),!1),this.api.tooltip.onHover(this.nodes.button,this.api.i18n.t("Delete")),this.nodes.button}},{key:"handleClick",value:function(t){this.needConfirmation?(this.api.events.off("block-settings-closed",this.resetConfirmation),this.api.blocks.delete(),this.api.toolbar.close(),this.api.tooltip.hide(),t.stopPropagation()):(this.setConfirmation(!0),this.api.events.on("block-settings-closed",this.resetConfirmation))}},{key:"setConfirmation",value:function(t){this.needConfirmation=t,this.nodes.button.classList.add(this.CSS.buttonConfirm)}}]),t}();o.default=l,l.displayName="DeleteTune",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){var o,i,r;"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self&&self,i=[e,n(2),n(3),n(15)],void 0===(r="function"==typeof(o=function(o,i,r,a){"use strict";var s=n(1);Object.defineProperty(o,"__esModule",{value:!0}),o.default=void 0,i=s(i),r=s(r),a=s(a);var l=function(){function t(e){var n=e.api;(0,i.default)(this,t),this.CSS={button:"ce-settings__button",wrapper:"ce-tune-move-down",animation:"wobble"},this.api=n}return(0,r.default)(t,[{key:"render",value:function(){var t=this,e=a.default.make("div",[this.CSS.button,this.CSS.wrapper],{});return e.appendChild(a.default.svg("arrow-down",14,14)),this.api.listeners.on(e,"click",(function(n){return t.handleClick(n,e)}),!1),this.api.tooltip.onHover(e,this.api.i18n.t("Move down")),e}},{key:"handleClick",value:function(t,e){var n=this,o=this.api.blocks.getCurrentBlockIndex(),i=this.api.blocks.getBlockByIndex(o+1);if(!i)return e.classList.add(this.CSS.animation),void window.setTimeout((function(){e.classList.remove(n.CSS.animation)}),500);var r=i.holder,a=r.getBoundingClientRect(),s=Math.abs(window.innerHeight-r.offsetHeight);a.top0?this.insertToDOM(n,"afterend",r):this.insertToDOM(n,"beforebegin",r),this.blocks.splice(t,0,n);var a=this.composeBlockEvent("move",{fromIndex:e,toIndex:t});n.call(l.BlockToolAPI.MOVED,a)}},{key:"insert",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2];if(this.length){t>this.length&&(t=this.length),n&&(this.blocks[t].holder.remove(),this.blocks[t].call(l.BlockToolAPI.REMOVED));var o=n?1:0;if(this.blocks.splice(t,o,e),t>0){var i=this.blocks[t-1];this.insertToDOM(e,"afterend",i)}else{var r=this.blocks[t+1];r?this.insertToDOM(e,"beforebegin",r):this.insertToDOM(e)}}else this.push(e)}},{key:"remove",value:function(t){isNaN(t)&&(t=this.length-1),this.blocks[t].holder.remove(),this.blocks[t].call(l.BlockToolAPI.REMOVED),this.blocks.splice(t,1)}},{key:"removeAll",value:function(){this.workingArea.innerHTML="",this.blocks.forEach((function(t){return t.call(l.BlockToolAPI.REMOVED)})),this.blocks.length=0}},{key:"insertAfter",value:function(t,e){var n=this.blocks.indexOf(t);this.insert(n+1,e)}},{key:"get",value:function(t){return this.blocks[t]}},{key:"indexOf",value:function(t){return this.blocks.indexOf(t)}},{key:"insertToDOM",value:function(t,e,n){e?n.holder.insertAdjacentElement(e,t.holder):this.workingArea.appendChild(t.holder),t.call(l.BlockToolAPI.RENDERED)}},{key:"composeBlockEvent",value:function(t,e){return new CustomEvent(t,{detail:e})}},{key:"length",get:function(){return this.blocks.length}},{key:"array",get:function(){return this.blocks}},{key:"nodes",get:function(){return a.array(this.workingArea.children)}}],[{key:"set",value:function(t,e,n){return isNaN(Number(e))?(Reflect.set(t,e,n),!0):(t.insert(+e,n),!0)}},{key:"get",value:function(t,e){return isNaN(Number(e))?Reflect.get(t,e):t.get(+e)}}]),t}();o.default=d,d.displayName="Blocks",t.exports=e.default})?o.apply(e,i):o)||(t.exports=r)},function(t,e,n){window,t.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var i=e[o]={i:o,l:!1,exports:{}};return t[o].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(o,i,function(e){return t[e]}.bind(null,i));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="/",n(n.s=0)}([function(t,e,n){"use strict";n(1),t.exports=function(){var t=n(6),e=null;return{show:function(n){if(n.message){!function(){if(e)return!0;e=t.getWrapper(),document.body.appendChild(e)}();var o=null,i=n.time||8e3;switch(n.type){case"confirm":o=t.confirm(n);break;case"prompt":o=t.prompt(n);break;default:o=t.alert(n),window.setTimeout((function(){o.remove()}),i)}e.appendChild(o),o.classList.add("cdx-notify--bounce-in")}}}}()},function(t,e,n){var o=n(2);"string"==typeof o&&(o=[[t.i,o,""]]),n(4)(o,{hmr:!0,transform:void 0,insertInto:void 0}),o.locals&&(t.exports=o.locals)},function(t,e,n){(t.exports=n(3)(!1)).push([t.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(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n=function(t,e){var n,o=t[1]||"",i=t[3];if(!i)return o;if(e&&"function"==typeof btoa){var r=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map((function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"}));return[o].concat(a).concat([r]).join("\n")}return[o].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n})).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var o={},i=0;i=0&&u.splice(e,1)}function g(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),p(t,e),e}function y(t,e){Object.keys(e).forEach((function(n){t.setAttribute(n,e[n])}))}function b(t,e){var n,o,i,r;if(e.transform&&t.css){if(!(r=e.transform(t.css)))return function(){};t.css=r}if(e.singleton){var a=c++;n=l||(l=g(e)),o=x.bind(null,n,a,!1),i=x.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),p(t,e),e}(e),o=function(t,e,n){var o=n.css,i=n.sourceMap,r=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||r)&&(o=d(o)),i&&(o+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([o],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){v(n),n.href&&URL.revokeObjectURL(n.href)}):(n=g(e),o=function(t,e){var n=e.css,o=e.media;if(o&&t.setAttribute("media",o),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){v(n)});return o(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;o(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=h(t,e);return f(n,e),function(t){for(var o=[],i=0;i0;)e.insertBefore(l.childNodes[0],l);e.removeChild(l),this._sanitize(t,e);break}for(var v=0;v{this.showed&&this.hide(!0)},{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(t,e,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 e)this.nodes.content.appendChild(document.createTextNode(e));else{if(!(e instanceof Node))throw Error("[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But "+typeof e+" given.");this.nodes.content.appendChild(e)}switch(this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)),o.placement){case"top":this.placeTop(t,o);break;case"left":this.placeLeft(t,o);break;case"right":this.placeRight(t,o);break;case"bottom":default:this.placeBottom(t,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(t=!1){if(this.hidingDelay&&!t)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(t,e,n){t.addEventListener("mouseenter",()=>{this.show(t,e,n)}),t.addEventListener("mouseleave",()=>{this.hide()})}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 t="codex-tooltips-style";if(document.getElementById(t))return;const e=n(2),o=this.make("style",null,{textContent:e.toString(),id:t});this.prepend(document.head,o)}placeBottom(t,e){const n=t.getBoundingClientRect(),o=n.left+t.clientWidth/2-this.nodes.wrapper.offsetWidth/2,i=n.bottom+window.pageYOffset+this.offsetTop+e.marginTop;this.applyPlacement("bottom",o,i)}placeTop(t,e){const n=t.getBoundingClientRect(),o=n.left+t.clientWidth/2-this.nodes.wrapper.offsetWidth/2,i=n.top+window.pageYOffset-this.nodes.wrapper.clientHeight-this.offsetTop;this.applyPlacement("top",o,i)}placeLeft(t,e){const n=t.getBoundingClientRect(),o=n.left-this.nodes.wrapper.offsetWidth-this.offsetLeft-e.marginLeft,i=n.top+window.pageYOffset+t.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("left",o,i)}placeRight(t,e){const n=t.getBoundingClientRect(),o=n.right+this.offsetRight+e.marginRight,i=n.top+window.pageYOffset+t.clientHeight/2-this.nodes.wrapper.offsetHeight/2;this.applyPlacement("right",o,i)}applyPlacement(t,e,n){this.nodes.wrapper.classList.add(this.CSS.placement[t]),this.nodes.wrapper.style.left=`${e}px`,this.nodes.wrapper.style.top=`${n}px`}make(t,e=null,n={}){const o=document.createElement(t);Array.isArray(e)?o.classList.add(...e):e&&o.classList.add(e);for(const t in n)n.hasOwnProperty(t)&&(o[t]=n[t]);return o}append(t,e){Array.isArray(e)?e.forEach(e=>t.appendChild(e)):t.appendChild(e)}prepend(t,e){Array.isArray(e)?(e=e.reverse()).forEach(e=>t.prepend(e)):t.prepend(e)}}},function(t,e){t.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;-webkit-mask-box-image:url(\'data:image/svg+xml;charset=utf-8,\') 48% 41% 37.9% 53.3%;z-index:-1}@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(t,e,n){"use strict";n.r(e),e.default='\n\n\n \n\n\n\n \n\n\n\n\n\n \n\n\n\n \n \n \n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n\n\n \n\n'},function(t,e){t.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:651px){.codex-editor--narrow .codex-editor__redactor{margin-right:50px}}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .codex-editor__redactor{margin-left:50px;margin-right:0}}@media (min-width:651px){.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{fill:currentColor;vertical-align:middle;max-height:100%}::-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-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,transform;display:none}@media (max-width:650px){.ce-toolbar{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}}@media (max-width:650px) and (max-width:650px){.ce-toolbar{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}@media (max-width:650px){.ce-toolbar{padding:3px;margin-top:5px}.ce-toolbar--left-oriented:before{left:15px;margin-left:0}.ce-toolbar--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar--opened{display:block}@media (max-width:650px){.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:650px){.ce-toolbar__content{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:center;align-content:center;margin:0;max-width:calc(100% - 35px)}}.ce-toolbar__plus{color:#707684;cursor:pointer;width:34px;height:34px;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;position:absolute;left:-34px;-ms-flex-negative:0;flex-shrink:0}.ce-toolbar__plus--active,.ce-toolbar__plus:hover{color:#388ae5}.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-shortcut{opacity:.6;word-spacing:-2px;margin-top:5px}.ce-toolbar__plus--hidden{display:none}@media (max-width:650px){.ce-toolbar__plus{display:-webkit-inline-box!important;display:-ms-inline-flexbox!important;display:inline-flex!important;position:static;-webkit-transform:none!important;transform:none!important}}.ce-toolbar .ce-toolbox,.ce-toolbar__plus{top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%)}.ce-toolbar__actions{position:absolute;right:-30px;top:5px;opacity:0}@media (max-width:650px){.ce-toolbar__actions{position:absolute;right:-28px;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}.ce-toolbar__actions-buttons{text-align:right}.ce-toolbar__settings-btn{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:18px;height:18px;color:#707684;cursor:pointer;background:#eff2f5;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.ce-toolbar__settings-btn:hover{color:#1d202b}@media (max-width:650px){.ce-toolbar__settings-btn{background:transparent}}@media (min-width:651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}.ce-toolbox{position:absolute;visibility:hidden;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:horizontal;-webkit-box-direction:normal;-ms-flex-direction:row;flex-direction:row}@media (max-width:650px){.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}}.ce-toolbox--opened{opacity:1;visibility:visible}.ce-toolbox__button{color:#707684;cursor:pointer;width:34px;height:34px;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;-ms-flex-negative:0;flex-shrink:0}.ce-toolbox__button--active,.ce-toolbox__button:hover{color:#388ae5}.ce-toolbox__button--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-toolbox-button-tooltip__shortcut{opacity:.6;word-spacing:-3px;margin-top:3px}@media (min-width:651px){.codex-editor--narrow .ce-toolbox{background:#fff;z-index:2}}.ce-inline-toolbar{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}@media (max-width:650px){.ce-inline-toolbar{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}.ce-inline-toolbar{-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}.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--showed{opacity:1;visibility:visible;-webkit-transform:translateX(-50%);transform:translateX(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.9);transform:translateX(-23px) translateY(8px) scale(.9)}.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(.9);transform:translateX(-100%) translateY(8px) scale(.9);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%;padding:0 6px}.ce-inline-toolbar__buttons,.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;height:34px;padding:0 9px 0 10px;margin:0 6px 0 -6px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;cursor:pointer;border-right:1px solid rgba(201,201,204,.48)}.ce-inline-toolbar__dropdown:hover{background:#eff2f5}.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}.ce-inline-toolbar__dropdown-content svg{height:12px}.ce-inline-toolbar__dropdown .icon--toggler-down{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:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#000;margin:0}.ce-inline-tool:hover{background-color:#eff2f5}.ce-inline-tool{border-radius:0;line-height:normal;width:auto;padding:0 5px!important;min-width:24px}.ce-inline-tool--active{color:#388ae5}.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:not(:last-of-type){margin-right:2px}.ce-inline-tool .icon{height:12px}.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:13px;padding:10px;width:100%;-webkit-box-sizing:border-box;box-sizing:border-box;display:none;font-weight:500;border-top:1px solid rgba(201,201,204,.48)}.ce-inline-tool-input::-webkit-input-placeholder{color:#707684}.ce-inline-tool-input::-moz-placeholder{color:#707684}.ce-inline-tool-input:-ms-input-placeholder{color:#707684}.ce-inline-tool-input::-ms-input-placeholder{color:#707684}.ce-inline-tool-input::placeholder{color:#707684}.ce-inline-tool-input--showed{display:block}.ce-conversion-toolbar{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}@media (max-width:650px){.ce-conversion-toolbar{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}.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:150px;margin-top:5px;-webkit-box-sizing:content-box;box-sizing:content-box}.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--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:#707684;font-size:11px;font-weight:500;letter-spacing:.33px;padding:10px 10px 5px;text-transform:uppercase}.ce-conversion-tool{display:-webkit-box;display:-ms-flexbox;display:flex;padding:5px 10px;font-size:14px;line-height:20px;font-weight:500;cursor:pointer;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.ce-conversion-tool--hidden{display:none}.ce-conversion-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-conversion-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-conversion-tool:hover{background:#eff2f5}.ce-conversion-tool__icon{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;width:20px;height:20px;border:1px solid rgba(201,201,204,.48);border-radius:3px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:10px;background:#fff}.ce-conversion-tool__icon svg{width:11px;height:11px}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#388ae5!important;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-settings{position:absolute;background-color:#fff;border:1px solid #eaeaea;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px rgba(13,20,33,.13);border-radius:4px;z-index:2}@media (max-width:650px){.ce-settings{-webkit-box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);box-shadow:0 13px 7px -5px rgba(26,38,49,.09),6px 15px 34px -6px rgba(33,48,73,.29);border-bottom-color:#d5d7db}}.ce-settings{right:-1px;top:30px;min-width:114px;-webkit-box-sizing:content-box;box-sizing:content-box}.ce-settings--left-oriented:before{left:15px;margin-left:0}.ce-settings--right-oriented:before{left:auto;right:15px;margin-left:0}@media (max-width:650px){.ce-settings{bottom:40px;right:-11px;top:auto}}.ce-settings:before{left:auto;right:12px}@media (max-width:650px){.ce-settings:before{bottom:-5px;top:auto}}.ce-settings{display:none}.ce-settings--opened{display:block;-webkit-animation-duration:.1s;animation-duration:.1s;-webkit-animation-name:panelShowing;animation-name:panelShowing}.ce-settings__plugin-zone:not(:empty){padding:3px 3px 0}.ce-settings__default-zone:not(:empty){padding:3px}.ce-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:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#000;margin:0}.ce-settings__button:hover{background-color:#eff2f5}.ce-settings__button--active{color:#388ae5}.ce-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}.ce-settings__button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.ce-settings__button:not(:nth-child(3n+3)){margin-right:3px}.ce-settings__button:nth-child(n+4){margin-top:3px}.ce-settings__button{line-height:32px}.ce-settings__button--disabled{cursor:not-allowed!important;opacity:.3}.ce-settings__button--selected{color:#388ae5}.ce-settings__button--delete{-webkit-transition:background-color .3s ease;transition:background-color .3s ease;will-change:background-color}.ce-settings__button--delete .icon{-webkit-transition:-webkit-transform .2s ease-out;transition:-webkit-transform .2s ease-out;transition:transform .2s ease-out;transition:transform .2s ease-out,-webkit-transform .2s ease-out;will-change:transform}.ce-settings__button--confirm{background-color:#e24a4a!important;color:#fff}.ce-settings__button--confirm:hover{background-color:#d54a4a!important}.ce-settings__button--confirm .icon{-webkit-transform:rotate(90deg);transform:rotate(90deg)}.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 #388ae5;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:#388ae5;background:repeating-linear-gradient(90deg,#388ae5,#388ae5 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:651px){.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)}}.cdx-block{padding:.4em 0}.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:34px;height:34px;line-height:34px;padding:0!important;text-align:center;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:#000;margin:0}.cdx-settings-button:hover{background-color:#eff2f5}.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{color:#388ae5}.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:#388ae5;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}.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:-34px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-34px}@media (max-width:650px){.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:651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__plus{left:0;right:5px}}@media (min-width:651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}'}])})); \ No newline at end of file diff --git a/dist/editor.js.LICENSE b/dist/editor.js.LICENSE index e47a4e186..cd1e6dfef 100644 --- a/dist/editor.js.LICENSE +++ b/dist/editor.js.LICENSE @@ -1,7 +1,7 @@ /*! * Editor.js * - * @version 2.19.0 + * @version 2.19.0-smb.1 * * @licence Apache-2.0 * @author CodeX diff --git a/package.json b/package.json index 5f9771faa..9c69aadd6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@editorjs/editorjs", - "version": "2.19.0", + "version": "2.19.0-smb.1", "description": "Editor.js — Native JS, based on API and Open Source", "main": "dist/editor.js", "types": "./types/index.d.ts",