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AC1CtC,OAAOgC,eAAetH,EAAS2H,OAAOC,YAAa,CAAEC,MAAO,WAE7DvC,OAAOgC,eAAetH,EAAS,aAAc,CAAE6H,OAAO,GAAO,ECL9DgzC,EAAoB1V,QAAKjkC,ECGzB,IAAIk6C,EAAsBP,EAAoB","sources":["webpack://BlueBoxMoon.Rockumentation/./src/main.css","webpack://BlueBoxMoon.Rockumentation/./node_modules/css-loader/dist/runtime/api.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/css-loader/dist/runtime/sourceMaps.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/editorjs-drag-drop/dist/bundle.js","webpack://BlueBoxMoon.Rockumentation/./src/main.css?ddd3","webpack://BlueBoxMoon.Rockumentation/./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/style-loader/dist/runtime/insertBySelector.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/style-loader/dist/runtime/insertStyleElement.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/style-loader/dist/runtime/styleDomAPI.js","webpack://BlueBoxMoon.Rockumentation/./node_modules/style-loader/dist/runtime/styleTagTransform.js","webpack://BlueBoxMoon.Rockumentation/./src/dragdrop.ts","webpack://BlueBoxMoon.Rockumentation/./src/main.ts","webpack://BlueBoxMoon.Rockumentation/./node_modules/@editorjs/editorjs/dist/editorjs.mjs","webpack://BlueBoxMoon.Rockumentation/webpack/bootstrap","webpack://BlueBoxMoon.Rockumentation/webpack/runtime/compat get default export","webpack://BlueBoxMoon.Rockumentation/webpack/runtime/define property getters","webpack://BlueBoxMoon.Rockumentation/webpack/runtime/hasOwnProperty shorthand","webpack://BlueBoxMoon.Rockumentation/webpack/runtime/make namespace object","webpack://BlueBoxMoon.Rockumentation/webpack/runtime/nonce","webpack://BlueBoxMoon.Rockumentation/webpack/startup"],"sourcesContent":["// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../node_modules/css-loader/dist/runtime/sourceMaps.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, `/*\r\n By default nested-list plugin displays nested ordered lists like \"3.2.2.1\".\r\n This changes it to display the same as just \"1\".\r\n*/\r\n.cdx-nested-list--ordered > .cdx-nested-list__item::before {\r\n content: counter(item) \". \";\r\n}\r\n\r\n/*\r\n Adjust the default color of the raw editor to be more Rock like.\r\n*/\r\n\r\ntextarea.ce-rawtool__textarea {\r\n background-color: #f8f8f8;\r\n color: inherit;\r\n line-height: inherit;\r\n letter-spacing: inherit;\r\n}\r\n\r\n/*\r\n Increase the size of the inline toolbar icons.\r\n*/\r\n.ce-inline-tool {\r\n padding: 10px 8px;\r\n}\r\n\r\n.ce-inline-tool > svg {\r\n transform: scale(1.25);\r\n}\r\n`, \"\",{\"version\":3,\"sources\":[\"webpack://./src/main.css\"],\"names\":[],\"mappings\":\"AAAA;;;CAGC;AACD;IACI,2BAA2B;AAC/B;;AAEA;;CAEC;;AAED;IACI,yBAAyB;IACzB,cAAc;IACd,oBAAoB;IACpB,uBAAuB;AAC3B;;AAEA;;CAEC;AACD;IACI,iBAAiB;AACrB;;AAEA;IACI,sBAAsB;AAC1B\",\"sourcesContent\":[\"/*\\r\\n By default nested-list plugin displays nested ordered lists like \\\"3.2.2.1\\\".\\r\\n This changes it to display the same as just \\\"1\\\".\\r\\n*/\\r\\n.cdx-nested-list--ordered > .cdx-nested-list__item::before {\\r\\n content: counter(item) \\\". \\\";\\r\\n}\\r\\n\\r\\n/*\\r\\n Adjust the default color of the raw editor to be more Rock like.\\r\\n*/\\r\\n\\r\\ntextarea.ce-rawtool__textarea {\\r\\n background-color: #f8f8f8;\\r\\n color: inherit;\\r\\n line-height: inherit;\\r\\n letter-spacing: inherit;\\r\\n}\\r\\n\\r\\n/*\\r\\n Increase the size of the inline toolbar icons.\\r\\n*/\\r\\n.ce-inline-tool {\\r\\n padding: 10px 8px;\\r\\n}\\r\\n\\r\\n.ce-inline-tool > svg {\\r\\n transform: scale(1.25);\\r\\n}\\r\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","\"use strict\";\n\n/*\n MIT License http://www.opensource.org/licenses/mit-license.php\n Author Tobias Koppers @sokra\n*/\nmodule.exports = function (cssWithMappingToString) {\n var list = [];\n\n // return the list of modules as css string\n list.toString = function toString() {\n return this.map(function (item) {\n var content = \"\";\n var needLayer = typeof item[5] !== \"undefined\";\n if (item[4]) {\n content += \"@supports (\".concat(item[4], \") {\");\n }\n if (item[2]) {\n content += \"@media \".concat(item[2], \" {\");\n }\n if (needLayer) {\n content += \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\");\n }\n content += cssWithMappingToString(item);\n if (needLayer) {\n content += \"}\";\n }\n if (item[2]) {\n content += \"}\";\n }\n if (item[4]) {\n content += \"}\";\n }\n return content;\n }).join(\"\");\n };\n\n // import a list of modules into the list\n list.i = function i(modules, media, dedupe, supports, layer) {\n if (typeof modules === \"string\") {\n modules = [[null, modules, undefined]];\n }\n var alreadyImportedModules = {};\n if (dedupe) {\n for (var k = 0; k < this.length; k++) {\n var id = this[k][0];\n if (id != null) {\n alreadyImportedModules[id] = true;\n }\n }\n }\n for (var _k = 0; _k < modules.length; _k++) {\n var item = [].concat(modules[_k]);\n if (dedupe && alreadyImportedModules[item[0]]) {\n continue;\n }\n if (typeof layer !== \"undefined\") {\n if (typeof item[5] === \"undefined\") {\n item[5] = layer;\n } else {\n item[1] = \"@layer\".concat(item[5].length > 0 ? \" \".concat(item[5]) : \"\", \" {\").concat(item[1], \"}\");\n item[5] = layer;\n }\n }\n if (media) {\n if (!item[2]) {\n item[2] = media;\n } else {\n item[1] = \"@media \".concat(item[2], \" {\").concat(item[1], \"}\");\n item[2] = media;\n }\n }\n if (supports) {\n if (!item[4]) {\n item[4] = \"\".concat(supports);\n } else {\n item[1] = \"@supports (\".concat(item[4], \") {\").concat(item[1], \"}\");\n item[4] = supports;\n }\n }\n list.push(item);\n }\n };\n return list;\n};","\"use strict\";\n\nmodule.exports = function (item) {\n var content = item[1];\n var cssMapping = item[3];\n if (!cssMapping) {\n return content;\n }\n if (typeof btoa === \"function\") {\n var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));\n var data = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(base64);\n var sourceMapping = \"/*# \".concat(data, \" */\");\n return [content].concat([sourceMapping]).join(\"\\n\");\n }\n return [content].join(\"\\n\");\n};","!function(e,t){\"object\"==typeof exports&&\"object\"==typeof module?module.exports=t():\"function\"==typeof define&&define.amd?define([],t):\"object\"==typeof exports?exports.DragDrop=t():e.DragDrop=t()}(self,(function(){return(()=>{var e={424:(e,t,r)=>{\"use strict\";r.r(t),r.d(t,{default:()=>s});var n=r(81),o=r.n(n),i=r(645),a=r.n(i)()(o());a.push([e.id,'.ce-block--drop-target .ce-block__content:before {\\n content: \"\";\\n position: absolute;\\n top: 50%;\\n left: -20px;\\n margin-top: -1px;\\n height: 8px;\\n width: 8px;\\n border: solid #a0a0a0;\\n border-width: 1px 1px 0 0;\\n -webkit-transform-origin: right;\\n transform-origin: right;\\n -webkit-transform: rotate(45deg);\\n transform: rotate(45deg);\\n}\\n\\n.ce-block--drop-target .ce-block__content:after {\\n background: none;\\n}',\"\"]);const s=a},645:e=>{\"use strict\";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=\"\",n=void 0!==t[5];return t[4]&&(r+=\"@supports (\".concat(t[4],\") {\")),t[2]&&(r+=\"@media \".concat(t[2],\" {\")),n&&(r+=\"@layer\".concat(t[5].length>0?\" \".concat(t[5]):\"\",\" {\")),r+=e(t),n&&(r+=\"}\"),t[2]&&(r+=\"}\"),t[4]&&(r+=\"}\"),r})).join(\"\")},t.i=function(e,r,n,o,i){\"string\"==typeof e&&(e=[[null,e,void 0]]);var a={};if(n)for(var s=0;s0?\" \".concat(u[5]):\"\",\" {\").concat(u[1],\"}\")),u[5]=i),r&&(u[2]?(u[1]=\"@media \".concat(u[2],\" {\").concat(u[1],\"}\"),u[2]=r):u[2]=r),o&&(u[4]?(u[1]=\"@supports (\".concat(u[4],\") {\").concat(u[1],\"}\"),u[4]=o):u[4]=\"\".concat(o)),t.push(u))}},t}},81:e=>{\"use strict\";e.exports=function(e){return e[1]}},406:(e,t,r)=>{var n=r(424);\"string\"==typeof n&&(n=[[e.id,n,\"\"]]);r(723)(n,{hmr:!0,transform:void 0,insertInto:void 0}),n.locals&&(e.exports=n.locals)},723:(e,t,r)=>{var n,o,i={},a=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===o&&(o=n.apply(this,arguments)),o}),s=function(e){return document.querySelector(e)},c=function(e){var t={};return function(e){if(\"function\"==typeof e)return e();if(void 0===t[e]){var r=s.call(this,e);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}t[e]=r}return t[e]}}(),l=null,u=0,f=[],d=r(947);function p(e,t){for(var r=0;r=0&&f.splice(t,1)}function y(e){var t=document.createElement(\"style\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),g(t,e.attrs),v(e,t),t}function g(e,t){Object.keys(t).forEach((function(r){e.setAttribute(r,t[r])}))}function m(e,t){var r,n,o,i;if(t.transform&&e.css){if(!(i=t.transform(e.css)))return function(){};e.css=i}if(t.singleton){var a=u++;r=l||(l=y(t)),n=x.bind(null,r,a,!1),o=x.bind(null,r,a,!0)}else e.sourceMap&&\"function\"==typeof URL&&\"function\"==typeof URL.createObjectURL&&\"function\"==typeof URL.revokeObjectURL&&\"function\"==typeof Blob&&\"function\"==typeof btoa?(r=function(e){var t=document.createElement(\"link\");return void 0===e.attrs.type&&(e.attrs.type=\"text/css\"),e.attrs.rel=\"stylesheet\",g(t,e.attrs),v(e,t),t}(t),n=O.bind(null,r,t),o=function(){b(r),r.href&&URL.revokeObjectURL(r.href)}):(r=y(t),n=B.bind(null,r),o=function(){b(r)});return n(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;n(e=t)}else o()}}e.exports=function(e,t){if(\"undefined\"!=typeof DEBUG&&DEBUG&&\"object\"!=typeof document)throw new Error(\"The style-loader cannot be used in a non-browser environment\");(t=t||{}).attrs=\"object\"==typeof t.attrs?t.attrs:{},t.singleton||\"boolean\"==typeof t.singleton||(t.singleton=a()),t.insertInto||(t.insertInto=\"head\"),t.insertAt||(t.insertAt=\"bottom\");var r=h(e,t);return p(r,t),function(e){for(var n=[],o=0;o{e.exports=function(e){var t=\"undefined\"!=typeof window&&window.location;if(!t)throw new Error(\"fixUrls requires window.location\");if(!e||\"string\"!=typeof e)return e;var r=t.protocol+\"//\"+t.host,n=r+t.pathname.replace(/\\/[^\\/]*$/,\"/\");return e.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi,(function(e,t){var o,i=t.trim().replace(/^\"(.*)\"$/,(function(e,t){return t})).replace(/^'(.*)'$/,(function(e,t){return t}));return/^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(i)?e:(o=0===i.indexOf(\"//\")?i:0===i.indexOf(\"/\")?r+i:n+i.replace(/^\\.\\//,\"\"),\"url(\"+JSON.stringify(o)+\")\")}))}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={id:n,exports:{}};return e[n](i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{\"undefined\"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:\"Module\"}),Object.defineProperty(e,\"__esModule\",{value:!0})};var n={};return(()=>{\"use strict\";function e(e,t){for(var r=0;rt}),r(406);var t=function(){function t(e,r){var n=e.configuration,o=e.blocks,i=e.toolbar,a=e.save;!function(e,t){if(!(e instanceof t))throw new TypeError(\"Cannot call a class as a function\")}(this,t),this.toolbar=i,this.borderStyle=r||\"1px dashed #aaa\",this.api=o,this.holder=\"string\"==typeof n.holder?document.getElementById(n.holder):n.holder,this.readOnly=n.readOnly,this.startBlock=null,this.endBlock=null,this.save=a,this.setDragListener(),this.setDropListener()}var r,n,o;return r=t,o=[{key:\"isReadOnlySupported\",get:function(){return!0}}],(n=[{key:\"setElementCursor\",value:function(e){if(e){var t=document.createRange(),r=window.getSelection();t.setStart(e.childNodes[0],0),t.collapse(!0),r.removeAllRanges(),r.addRange(t),e.focus()}}},{key:\"setDragListener\",value:function(){var e=this;if(!this.readOnly){var t=this.holder.querySelector(\".ce-toolbar__settings-btn\");t.setAttribute(\"draggable\",\"true\"),t.addEventListener(\"dragstart\",(function(){e.startBlock=e.api.getCurrentBlockIndex()})),t.addEventListener(\"drag\",(function(){if(e.toolbar.close(),!e.isTheOnlyBlock()){var t=e.holder.querySelectorAll(\".ce-block\"),r=e.holder.querySelector(\".ce-block--drop-target\");e.setElementCursor(r),e.setBorderBlocks(t,r)}}))}}},{key:\"setBorderBlocks\",value:function(e,t){var r=this;Object.values(e).forEach((function(n){var o=n.querySelector(\".ce-block__content\");n!==t?(o.style.removeProperty(\"border-top\"),o.style.removeProperty(\"border-bottom\")):Object.keys(e).find((function(r){return e[r]===t}))>r.startBlock?o.style.borderBottom=r.borderStyle||borderStyle:o.style.borderTop=r.borderStyle}))}},{key:\"setDropListener\",value:function(){var e=this;document.addEventListener(\"drop\",(function(t){var r=t.target;if(e.holder.contains(r)&&null!==e.startBlock){var n=e.getDropTarget(r);if(n){var o=n.querySelector(\".ce-block__content\");o.style.removeProperty(\"border-top\"),o.style.removeProperty(\"border-bottom\"),e.endBlock=e.getTargetPosition(n),e.moveBlocks()}}e.startBlock=null}))}},{key:\"getDropTarget\",value:function(e){return e.classList.contains(\"ce-block\")?e:e.closest(\".ce-block\")}},{key:\"getTargetPosition\",value:function(e){return Array.from(e.parentNode.children).indexOf(e)}},{key:\"isTheOnlyBlock\",value:function(){return 1===this.api.getBlocksCount()}},{key:\"moveBlocks\",value:function(){this.isTheOnlyBlock()||this.api.move(this.endBlock,this.startBlock)}}])&&e(r.prototype,n),o&&e(r,o),Object.defineProperty(r,\"prototype\",{writable:!1}),t}()})(),n.default})()}));","\n import API from \"!../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import domAPI from \"!../node_modules/style-loader/dist/runtime/styleDomAPI.js\";\n import insertFn from \"!../node_modules/style-loader/dist/runtime/insertBySelector.js\";\n import setAttributes from \"!../node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js\";\n import insertStyleElement from \"!../node_modules/style-loader/dist/runtime/insertStyleElement.js\";\n import styleTagTransformFn from \"!../node_modules/style-loader/dist/runtime/styleTagTransform.js\";\n import content, * as namedExport from \"!!../node_modules/css-loader/dist/cjs.js!./main.css\";\n \n \n\nvar options = {};\n\noptions.styleTagTransform = styleTagTransformFn;\noptions.setAttributes = setAttributes;\n\n options.insert = insertFn.bind(null, \"head\");\n \noptions.domAPI = domAPI;\noptions.insertStyleElement = insertStyleElement;\n\nvar update = API(content, options);\n\n\n\nexport * from \"!!../node_modules/css-loader/dist/cjs.js!./main.css\";\n export default content && content.locals ? content.locals : undefined;\n","\"use strict\";\n\nvar stylesInDOM = [];\nfunction getIndexByIdentifier(identifier) {\n var result = -1;\n for (var i = 0; i < stylesInDOM.length; i++) {\n if (stylesInDOM[i].identifier === identifier) {\n result = i;\n break;\n }\n }\n return result;\n}\nfunction modulesToDom(list, options) {\n var idCountMap = {};\n var identifiers = [];\n for (var i = 0; i < list.length; i++) {\n var item = list[i];\n var id = options.base ? item[0] + options.base : item[0];\n var count = idCountMap[id] || 0;\n var identifier = \"\".concat(id, \" \").concat(count);\n idCountMap[id] = count + 1;\n var indexByIdentifier = getIndexByIdentifier(identifier);\n var obj = {\n css: item[1],\n media: item[2],\n sourceMap: item[3],\n supports: item[4],\n layer: item[5]\n };\n if (indexByIdentifier !== -1) {\n stylesInDOM[indexByIdentifier].references++;\n stylesInDOM[indexByIdentifier].updater(obj);\n } else {\n var updater = addElementStyle(obj, options);\n options.byIndex = i;\n stylesInDOM.splice(i, 0, {\n identifier: identifier,\n updater: updater,\n references: 1\n });\n }\n identifiers.push(identifier);\n }\n return identifiers;\n}\nfunction addElementStyle(obj, options) {\n var api = options.domAPI(options);\n api.update(obj);\n var updater = function updater(newObj) {\n if (newObj) {\n if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {\n return;\n }\n api.update(obj = newObj);\n } else {\n api.remove();\n }\n };\n return updater;\n}\nmodule.exports = function (list, options) {\n options = options || {};\n list = list || [];\n var lastIdentifiers = modulesToDom(list, options);\n return function update(newList) {\n newList = newList || [];\n for (var i = 0; i < lastIdentifiers.length; i++) {\n var identifier = lastIdentifiers[i];\n var index = getIndexByIdentifier(identifier);\n stylesInDOM[index].references--;\n }\n var newLastIdentifiers = modulesToDom(newList, options);\n for (var _i = 0; _i < lastIdentifiers.length; _i++) {\n var _identifier = lastIdentifiers[_i];\n var _index = getIndexByIdentifier(_identifier);\n if (stylesInDOM[_index].references === 0) {\n stylesInDOM[_index].updater();\n stylesInDOM.splice(_index, 1);\n }\n }\n lastIdentifiers = newLastIdentifiers;\n };\n};","\"use strict\";\n\nvar memo = {};\n\n/* istanbul ignore next */\nfunction getTarget(target) {\n if (typeof memo[target] === \"undefined\") {\n var styleTarget = document.querySelector(target);\n\n // Special case to return head of iframe instead of iframe itself\n if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {\n try {\n // This will throw an exception if access to iframe is blocked\n // due to cross-origin restrictions\n styleTarget = styleTarget.contentDocument.head;\n } catch (e) {\n // istanbul ignore next\n styleTarget = null;\n }\n }\n memo[target] = styleTarget;\n }\n return memo[target];\n}\n\n/* istanbul ignore next */\nfunction insertBySelector(insert, style) {\n var target = getTarget(insert);\n if (!target) {\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n }\n target.appendChild(style);\n}\nmodule.exports = insertBySelector;","\"use strict\";\n\n/* istanbul ignore next */\nfunction insertStyleElement(options) {\n var element = document.createElement(\"style\");\n options.setAttributes(element, options.attributes);\n options.insert(element, options.options);\n return element;\n}\nmodule.exports = insertStyleElement;","\"use strict\";\n\n/* istanbul ignore next */\nfunction setAttributesWithoutAttributes(styleElement) {\n var nonce = typeof __webpack_nonce__ !== \"undefined\" ? __webpack_nonce__ : null;\n if (nonce) {\n styleElement.setAttribute(\"nonce\", nonce);\n }\n}\nmodule.exports = setAttributesWithoutAttributes;","\"use strict\";\n\n/* istanbul ignore next */\nfunction apply(styleElement, options, obj) {\n var css = \"\";\n if (obj.supports) {\n css += \"@supports (\".concat(obj.supports, \") {\");\n }\n if (obj.media) {\n css += \"@media \".concat(obj.media, \" {\");\n }\n var needLayer = typeof obj.layer !== \"undefined\";\n if (needLayer) {\n css += \"@layer\".concat(obj.layer.length > 0 ? \" \".concat(obj.layer) : \"\", \" {\");\n }\n css += obj.css;\n if (needLayer) {\n css += \"}\";\n }\n if (obj.media) {\n css += \"}\";\n }\n if (obj.supports) {\n css += \"}\";\n }\n var sourceMap = obj.sourceMap;\n if (sourceMap && typeof btoa !== \"undefined\") {\n css += \"\\n/*# sourceMappingURL=data:application/json;base64,\".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), \" */\");\n }\n\n // For old IE\n /* istanbul ignore if */\n options.styleTagTransform(css, styleElement, options.options);\n}\nfunction removeStyleElement(styleElement) {\n // istanbul ignore if\n if (styleElement.parentNode === null) {\n return false;\n }\n styleElement.parentNode.removeChild(styleElement);\n}\n\n/* istanbul ignore next */\nfunction domAPI(options) {\n if (typeof document === \"undefined\") {\n return {\n update: function update() {},\n remove: function remove() {}\n };\n }\n var styleElement = options.insertStyleElement(options);\n return {\n update: function update(obj) {\n apply(styleElement, options, obj);\n },\n remove: function remove() {\n removeStyleElement(styleElement);\n }\n };\n}\nmodule.exports = domAPI;","\"use strict\";\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElement) {\n if (styleElement.styleSheet) {\n styleElement.styleSheet.cssText = css;\n } else {\n while (styleElement.firstChild) {\n styleElement.removeChild(styleElement.firstChild);\n }\n styleElement.appendChild(document.createTextNode(css));\n }\n}\nmodule.exports = styleTagTransform;","import EditorDragDrop from \"editorjs-drag-drop\";\r\nimport EditorJS from \"@editorjs/editorjs\";\r\n\r\n/**\r\n * Custom subclass that fixes a bug with drag/drop when only one block.\r\n */\r\nexport class DragDrop extends EditorDragDrop {\r\n constructor(editor: EditorJS) {\r\n super(editor);\r\n\r\n this.setDragEndListener();\r\n }\r\n\r\n /**\r\n * Sets the drag end events listener. This clears our drag operation\r\n * so we don't fire during an external drag even (like an image being\r\n * dragged into the editor).\r\n */\r\n protected setDragEndListener() {\r\n if (!this.readOnly) {\r\n const settingsButton = this.holder.querySelector('.ce-toolbar__settings-btn');\r\n\r\n settingsButton!.setAttribute('draggable', 'true');\r\n settingsButton!.addEventListener('dragend', () => {\r\n this.startBlock = null;\r\n });\r\n }\r\n }\r\n\r\n /**\r\n * Gets the real drop target element.\r\n * \r\n * @param target The target of the drop operation.\r\n * @returns The real drop target or null if invalid.\r\n */\r\n protected getDropTarget(target: HTMLElement) {\r\n const block = super.getDropTarget(target);\r\n\r\n /* Bug in editor.js when trying to move block when there is only one\r\n * block. */\r\n if (block !== null && super.getTargetPosition(block) === this.startBlock) {\r\n return null;\r\n }\r\n\r\n return block;\r\n }\r\n\r\n /**\r\n * Moves the dragged element to the drop position.\r\n *\r\n * @see {@link https://editorjs.io/blocks#move}\r\n */\r\n protected moveBlocks() {\r\n /* Ensure this drop operation is happening for our drag operation. */\r\n if (this.startBlock != null && this.endBlock != null) {\r\n super.moveBlocks();\r\n }\r\n }\r\n}","/*\r\n * Fix broken string prototype from Microsoft AJAX library. Can be removed in Rock v14 (13?).\r\n */\r\nif (String.prototype.startsWith.toString().indexOf(\"function String$startsWith(\") === 0) {\r\n String.prototype.startsWith = function (searchString: string, pos?: number): boolean {\r\n pos = pos ?? 0;\r\n\r\n return this.indexOf(searchString, pos) === 0;\r\n };\r\n}\r\n\r\nimport EditorJS from \"@editorjs/editorjs\";\r\nimport { DragDrop as EditorDragDrop } from \"./dragdrop\";\r\n\r\nexport { EditorJS, EditorDragDrop }\r\n\r\nimport \"./main.css\";\r\n","var Ot = typeof globalThis < \"u\" ? globalThis : typeof window < \"u\" ? window : typeof global < \"u\" ? global : typeof self < \"u\" ? self : {};\nfunction xe(s) {\n return s && s.__esModule && Object.prototype.hasOwnProperty.call(s, \"default\") ? s.default : s;\n}\nfunction Be() {\n}\nObject.assign(Be, {\n default: Be,\n register: Be,\n revert: function() {\n },\n __esModule: !0\n});\nElement.prototype.matches || (Element.prototype.matches = Element.prototype.matchesSelector || Element.prototype.mozMatchesSelector || Element.prototype.msMatchesSelector || Element.prototype.oMatchesSelector || Element.prototype.webkitMatchesSelector || function(s) {\n const e = (this.document || this.ownerDocument).querySelectorAll(s);\n let t = e.length;\n for (; --t >= 0 && e.item(t) !== this; )\n ;\n return t > -1;\n});\nElement.prototype.closest || (Element.prototype.closest = function(s) {\n let e = this;\n if (!document.documentElement.contains(e))\n return null;\n do {\n if (e.matches(s))\n return e;\n e = e.parentElement || e.parentNode;\n } while (e !== null);\n return null;\n});\nElement.prototype.prepend || (Element.prototype.prepend = function(e) {\n const t = document.createDocumentFragment();\n Array.isArray(e) || (e = [e]), e.forEach((o) => {\n const i = o instanceof Node;\n t.appendChild(i ? o : document.createTextNode(o));\n }), this.insertBefore(t, this.firstChild);\n});\nElement.prototype.scrollIntoViewIfNeeded || (Element.prototype.scrollIntoViewIfNeeded = function(s) {\n s = arguments.length === 0 ? !0 : !!s;\n const e = this.parentNode, t = window.getComputedStyle(e, null), o = parseInt(t.getPropertyValue(\"border-top-width\")), i = parseInt(t.getPropertyValue(\"border-left-width\")), n = this.offsetTop - e.offsetTop < e.scrollTop, r = this.offsetTop - e.offsetTop + this.clientHeight - o > e.scrollTop + e.clientHeight, a = this.offsetLeft - e.offsetLeft < e.scrollLeft, l = this.offsetLeft - e.offsetLeft + this.clientWidth - i > e.scrollLeft + e.clientWidth, c = n && !r;\n (n || r) && s && (e.scrollTop = this.offsetTop - e.offsetTop - e.clientHeight / 2 - o + this.clientHeight / 2), (a || l) && s && (e.scrollLeft = this.offsetLeft - e.offsetLeft - e.clientWidth / 2 - i + this.clientWidth / 2), (n || r || a || l) && !s && this.scrollIntoView(c);\n});\nwindow.requestIdleCallback = window.requestIdleCallback || function(s) {\n const e = Date.now();\n return setTimeout(function() {\n s({\n didTimeout: !1,\n timeRemaining: function() {\n return Math.max(0, 50 - (Date.now() - e));\n }\n });\n }, 1);\n};\nwindow.cancelIdleCallback = window.cancelIdleCallback || function(s) {\n clearTimeout(s);\n};\nlet At = (s = 21) => crypto.getRandomValues(new Uint8Array(s)).reduce((e, t) => (t &= 63, t < 36 ? e += t.toString(36) : t < 62 ? e += (t - 26).toString(36).toUpperCase() : t > 62 ? e += \"-\" : e += \"_\", e), \"\");\nvar it = /* @__PURE__ */ ((s) => (s.VERBOSE = \"VERBOSE\", s.INFO = \"INFO\", s.WARN = \"WARN\", s.ERROR = \"ERROR\", s))(it || {});\nconst B = {\n BACKSPACE: 8,\n TAB: 9,\n ENTER: 13,\n SHIFT: 16,\n CTRL: 17,\n ALT: 18,\n ESC: 27,\n SPACE: 32,\n LEFT: 37,\n UP: 38,\n DOWN: 40,\n RIGHT: 39,\n DELETE: 46,\n META: 91\n}, _t = {\n LEFT: 0,\n WHEEL: 1,\n RIGHT: 2,\n BACKWARD: 3,\n FORWARD: 4\n};\nfunction be(s, e, t = \"log\", o, i = \"color: inherit\") {\n if (!(\"console\" in window) || !window.console[t])\n return;\n const n = [\"info\", \"log\", \"warn\", \"error\"].includes(t), r = [];\n switch (be.logLevel) {\n case \"ERROR\":\n if (t !== \"error\")\n return;\n break;\n case \"WARN\":\n if (![\"error\", \"warn\"].includes(t))\n return;\n break;\n case \"INFO\":\n if (!n || s)\n return;\n break;\n }\n o && r.push(o);\n const a = \"Editor.js 2.28.0\", l = `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;`;\n s && (n ? (r.unshift(l, i), e = `%c${a}%c ${e}`) : e = `( ${a} )${e}`);\n try {\n n ? o ? console[t](`${e} %o`, ...r) : console[t](e, ...r) : console[t](e);\n } catch {\n }\n}\nbe.logLevel = \"VERBOSE\";\nfunction Nt(s) {\n be.logLevel = s;\n}\nconst L = be.bind(window, !1), K = be.bind(window, !0);\nfunction oe(s) {\n return Object.prototype.toString.call(s).match(/\\s([a-zA-Z]+)/)[1].toLowerCase();\n}\nfunction D(s) {\n return oe(s) === \"function\" || oe(s) === \"asyncfunction\";\n}\nfunction z(s) {\n return oe(s) === \"object\";\n}\nfunction J(s) {\n return oe(s) === \"string\";\n}\nfunction Rt(s) {\n return oe(s) === \"boolean\";\n}\nfunction qe(s) {\n return oe(s) === \"number\";\n}\nfunction Ze(s) {\n return oe(s) === \"undefined\";\n}\nfunction V(s) {\n return s ? Object.keys(s).length === 0 && s.constructor === Object : !0;\n}\nfunction nt(s) {\n return s > 47 && s < 58 || // number keys\n s === 32 || s === 13 || // Space bar & return key(s)\n s === 229 || // processing key input for certain languages — Chinese, Japanese, etc.\n s > 64 && s < 91 || // letter keys\n s > 95 && s < 112 || // Numpad keys\n s > 185 && s < 193 || // ;=,-./` (in order)\n s > 218 && s < 223;\n}\nasync function Dt(s, e = () => {\n}, t = () => {\n}) {\n async function o(i, n, r) {\n try {\n await i.function(i.data), await n(Ze(i.data) ? {} : i.data);\n } catch {\n r(Ze(i.data) ? {} : i.data);\n }\n }\n return s.reduce(async (i, n) => (await i, o(n, e, t)), Promise.resolve());\n}\nfunction st(s) {\n return Array.prototype.slice.call(s);\n}\nfunction re(s, e) {\n return function() {\n const t = this, o = arguments;\n window.setTimeout(() => s.apply(t, o), e);\n };\n}\nfunction Pt(s) {\n return s.name.split(\".\").pop();\n}\nfunction Ft(s) {\n return /^[-\\w]+\\/([-+\\w]+|\\*)$/.test(s);\n}\nfunction Ht(s, e, t) {\n let o;\n return (...i) => {\n const n = this, r = () => {\n o = null, t || s.apply(n, i);\n }, a = t && !o;\n window.clearTimeout(o), o = window.setTimeout(r, e), a && s.apply(n, i);\n };\n}\nfunction Ce(s, e, t = void 0) {\n let o, i, n, r = null, a = 0;\n t || (t = {});\n const l = function() {\n a = t.leading === !1 ? 0 : Date.now(), r = null, n = s.apply(o, i), r || (o = i = null);\n };\n return function() {\n const c = Date.now();\n !a && t.leading === !1 && (a = c);\n const u = e - (c - a);\n return o = this, i = arguments, u <= 0 || u > e ? (r && (clearTimeout(r), r = null), a = c, n = s.apply(o, i), r || (o = i = null)) : !r && t.trailing !== !1 && (r = setTimeout(l, u)), n;\n };\n}\nfunction jt() {\n const s = {\n win: !1,\n mac: !1,\n x11: !1,\n linux: !1\n }, e = Object.keys(s).find((t) => window.navigator.appVersion.toLowerCase().indexOf(t) !== -1);\n return e && (s[e] = !0), s;\n}\nfunction ae(s) {\n return s[0].toUpperCase() + s.slice(1);\n}\nfunction Se(s, ...e) {\n if (!e.length)\n return s;\n const t = e.shift();\n if (z(s) && z(t))\n for (const o in t)\n z(t[o]) ? (s[o] || Object.assign(s, { [o]: {} }), Se(s[o], t[o])) : Object.assign(s, { [o]: t[o] });\n return Se(s, ...e);\n}\nfunction Re(s) {\n const e = jt();\n return s = s.replace(/shift/gi, \"⇧\").replace(/backspace/gi, \"⌫\").replace(/enter/gi, \"⏎\").replace(/up/gi, \"↑\").replace(/left/gi, \"→\").replace(/down/gi, \"↓\").replace(/right/gi, \"←\").replace(/escape/gi, \"⎋\").replace(/insert/gi, \"Ins\").replace(/delete/gi, \"␡\").replace(/\\+/gi, \" + \"), e.mac ? s = s.replace(/ctrl|cmd/gi, \"⌘\").replace(/alt/gi, \"⌥\") : s = s.replace(/cmd/gi, \"Ctrl\").replace(/windows/gi, \"WIN\"), s;\n}\nfunction zt(s) {\n try {\n return new URL(s).href;\n } catch {\n }\n return s.substring(0, 2) === \"//\" ? window.location.protocol + s : window.location.origin + s;\n}\nfunction Ut() {\n return At(10);\n}\nfunction $t(s) {\n window.open(s, \"_blank\");\n}\nfunction Wt(s = \"\") {\n return `${s}${Math.floor(Math.random() * 1e8).toString(16)}`;\n}\nfunction Ie(s, e, t) {\n const o = `«${e}» is deprecated and will be removed in the next major release. Please use the «${t}» instead.`;\n s && K(o, \"warn\");\n}\nfunction ce(s, e, t) {\n const o = t.value ? \"value\" : \"get\", i = t[o], n = `#${e}Cache`;\n if (t[o] = function(...r) {\n return this[n] === void 0 && (this[n] = i.apply(this, ...r)), this[n];\n }, o === \"get\" && t.set) {\n const r = t.set;\n t.set = function(a) {\n delete s[n], r.apply(this, a);\n };\n }\n return t;\n}\nconst rt = 650;\nfunction te() {\n return window.matchMedia(`(max-width: ${rt}px)`).matches;\n}\nconst Ge = typeof window < \"u\" && window.navigator && window.navigator.platform && (/iP(ad|hone|od)/.test(window.navigator.platform) || window.navigator.platform === \"MacIntel\" && window.navigator.maxTouchPoints > 1);\nfunction Yt(s, e) {\n const t = Array.isArray(s) || z(s), o = Array.isArray(e) || z(e);\n return t || o ? JSON.stringify(s) === JSON.stringify(e) : s === e;\n}\nclass d {\n /**\n * Check if passed tag has no closed tag\n *\n * @param {HTMLElement} tag - element to check\n * @returns {boolean}\n */\n static isSingleTag(e) {\n return e.tagName && [\n \"AREA\",\n \"BASE\",\n \"BR\",\n \"COL\",\n \"COMMAND\",\n \"EMBED\",\n \"HR\",\n \"IMG\",\n \"INPUT\",\n \"KEYGEN\",\n \"LINK\",\n \"META\",\n \"PARAM\",\n \"SOURCE\",\n \"TRACK\",\n \"WBR\"\n ].includes(e.tagName);\n }\n /**\n * Check if element is BR or WBR\n *\n * @param {HTMLElement} element - element to check\n * @returns {boolean}\n */\n static isLineBreakTag(e) {\n return e && e.tagName && [\n \"BR\",\n \"WBR\"\n ].includes(e.tagName);\n }\n /**\n * Helper for making Elements with class name and attributes\n *\n * @param {string} tagName - new Element tag name\n * @param {string[]|string} [classNames] - list or name of CSS class name(s)\n * @param {object} [attributes] - any attributes\n * @returns {HTMLElement}\n */\n static make(e, t = null, o = {}) {\n const i = document.createElement(e);\n Array.isArray(t) ? i.classList.add(...t) : t && i.classList.add(t);\n for (const n in o)\n Object.prototype.hasOwnProperty.call(o, n) && (i[n] = o[n]);\n return i;\n }\n /**\n * Creates Text Node with the passed content\n *\n * @param {string} content - text content\n * @returns {Text}\n */\n static text(e) {\n return document.createTextNode(e);\n }\n /**\n * Append one or several elements to the parent\n *\n * @param {Element|DocumentFragment} parent - where to append\n * @param {Element|Element[]|DocumentFragment|Text|Text[]} elements - element or elements list\n */\n static append(e, t) {\n Array.isArray(t) ? t.forEach((o) => e.appendChild(o)) : e.appendChild(t);\n }\n /**\n * Append element or a couple to the beginning of the parent elements\n *\n * @param {Element} parent - where to append\n * @param {Element|Element[]} elements - element or elements list\n */\n static prepend(e, t) {\n Array.isArray(t) ? (t = t.reverse(), t.forEach((o) => e.prepend(o))) : e.prepend(t);\n }\n /**\n * Swap two elements in parent\n *\n * @param {HTMLElement} el1 - from\n * @param {HTMLElement} el2 - to\n * @deprecated\n */\n static swap(e, t) {\n const o = document.createElement(\"div\"), i = e.parentNode;\n i.insertBefore(o, e), i.insertBefore(e, t), i.insertBefore(t, o), i.removeChild(o);\n }\n /**\n * Selector Decorator\n *\n * Returns first match\n *\n * @param {Element} el - element we searching inside. Default - DOM Document\n * @param {string} selector - searching string\n * @returns {Element}\n */\n static find(e = document, t) {\n return e.querySelector(t);\n }\n /**\n * Get Element by Id\n *\n * @param {string} id - id to find\n * @returns {HTMLElement | null}\n */\n static get(e) {\n return document.getElementById(e);\n }\n /**\n * Selector Decorator.\n *\n * Returns all matches\n *\n * @param {Element|Document} el - element we searching inside. Default - DOM Document\n * @param {string} selector - searching string\n * @returns {NodeList}\n */\n static findAll(e = document, t) {\n return e.querySelectorAll(t);\n }\n /**\n * Returns CSS selector for all text inputs\n */\n static get allInputsSelector() {\n return \"[contenteditable=true], textarea, input:not([type]), \" + [\"text\", \"password\", \"email\", \"number\", \"search\", \"tel\", \"url\"].map((t) => `input[type=\"${t}\"]`).join(\", \");\n }\n /**\n * Find all contenteditable, textarea and editable input elements passed holder contains\n *\n * @param holder - element where to find inputs\n */\n static findAllInputs(e) {\n return st(e.querySelectorAll(d.allInputsSelector)).reduce((t, o) => d.isNativeInput(o) || d.containsOnlyInlineElements(o) ? [...t, o] : [...t, ...d.getDeepestBlockElements(o)], []);\n }\n /**\n * Search for deepest node which is Leaf.\n * Leaf is the vertex that doesn't have any child nodes\n *\n * @description Method recursively goes throw the all Node until it finds the Leaf\n * @param {Node} node - root Node. From this vertex we start Deep-first search\n * {@link https://en.wikipedia.org/wiki/Depth-first_search}\n * @param {boolean} [atLast] - find last text node\n * @returns {Node} - it can be text Node or Element Node, so that caret will able to work with it\n */\n static getDeepestNode(e, t = !1) {\n const o = t ? \"lastChild\" : \"firstChild\", i = t ? \"previousSibling\" : \"nextSibling\";\n if (e && e.nodeType === Node.ELEMENT_NODE && e[o]) {\n let n = e[o];\n if (d.isSingleTag(n) && !d.isNativeInput(n) && !d.isLineBreakTag(n))\n if (n[i])\n n = n[i];\n else if (n.parentNode[i])\n n = n.parentNode[i];\n else\n return n.parentNode;\n return this.getDeepestNode(n, t);\n }\n return e;\n }\n /**\n * Check if object is DOM node\n *\n * @param {*} node - object to check\n * @returns {boolean}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static isElement(e) {\n return qe(e) ? !1 : e && e.nodeType && e.nodeType === Node.ELEMENT_NODE;\n }\n /**\n * Check if object is DocumentFragment node\n *\n * @param {object} node - object to check\n * @returns {boolean}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static isFragment(e) {\n return qe(e) ? !1 : e && e.nodeType && e.nodeType === Node.DOCUMENT_FRAGMENT_NODE;\n }\n /**\n * Check if passed element is contenteditable\n *\n * @param {HTMLElement} element - html element to check\n * @returns {boolean}\n */\n static isContentEditable(e) {\n return e.contentEditable === \"true\";\n }\n /**\n * Checks target if it is native input\n *\n * @param {*} target - HTML element or string\n * @returns {boolean}\n */\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n static isNativeInput(e) {\n const t = [\n \"INPUT\",\n \"TEXTAREA\"\n ];\n return e && e.tagName ? t.includes(e.tagName) : !1;\n }\n /**\n * Checks if we can set caret\n *\n * @param {HTMLElement} target - target to check\n * @returns {boolean}\n */\n static canSetCaret(e) {\n let t = !0;\n if (d.isNativeInput(e))\n switch (e.type) {\n case \"file\":\n case \"checkbox\":\n case \"radio\":\n case \"hidden\":\n case \"submit\":\n case \"button\":\n case \"image\":\n case \"reset\":\n t = !1;\n break;\n }\n else\n t = d.isContentEditable(e);\n return t;\n }\n /**\n * Checks node if it is empty\n *\n * @description Method checks simple Node without any childs for emptiness\n * If you have Node with 2 or more children id depth, you better use {@link Dom#isEmpty} method\n * @param {Node} node - node to check\n * @returns {boolean} true if it is empty\n */\n static isNodeEmpty(e) {\n let t;\n return this.isSingleTag(e) && !this.isLineBreakTag(e) ? !1 : (this.isElement(e) && this.isNativeInput(e) ? t = e.value : t = e.textContent.replace(\"​\", \"\"), t.trim().length === 0);\n }\n /**\n * checks node if it is doesn't have any child nodes\n *\n * @param {Node} node - node to check\n * @returns {boolean}\n */\n static isLeaf(e) {\n return e ? e.childNodes.length === 0 : !1;\n }\n /**\n * breadth-first search (BFS)\n * {@link https://en.wikipedia.org/wiki/Breadth-first_search}\n *\n * @description Pushes to stack all DOM leafs and checks for emptiness\n * @param {Node} node - node to check\n * @returns {boolean}\n */\n static isEmpty(e) {\n e.normalize();\n const t = [e];\n for (; t.length > 0; )\n if (e = t.shift(), !!e) {\n if (this.isLeaf(e) && !this.isNodeEmpty(e))\n return !1;\n e.childNodes && t.push(...Array.from(e.childNodes));\n }\n return !0;\n }\n /**\n * Check if string contains html elements\n *\n * @param {string} str - string to check\n * @returns {boolean}\n */\n static isHTMLString(e) {\n const t = d.make(\"div\");\n return t.innerHTML = e, t.childElementCount > 0;\n }\n /**\n * Return length of node`s text content\n *\n * @param {Node} node - node with content\n * @returns {number}\n */\n static getContentLength(e) {\n return d.isNativeInput(e) ? e.value.length : e.nodeType === Node.TEXT_NODE ? e.length : e.textContent.length;\n }\n /**\n * Return array of names of block html elements\n *\n * @returns {string[]}\n */\n static get blockElements() {\n return [\n \"address\",\n \"article\",\n \"aside\",\n \"blockquote\",\n \"canvas\",\n \"div\",\n \"dl\",\n \"dt\",\n \"fieldset\",\n \"figcaption\",\n \"figure\",\n \"footer\",\n \"form\",\n \"h1\",\n \"h2\",\n \"h3\",\n \"h4\",\n \"h5\",\n \"h6\",\n \"header\",\n \"hgroup\",\n \"hr\",\n \"li\",\n \"main\",\n \"nav\",\n \"noscript\",\n \"ol\",\n \"output\",\n \"p\",\n \"pre\",\n \"ruby\",\n \"section\",\n \"table\",\n \"tbody\",\n \"thead\",\n \"tr\",\n \"tfoot\",\n \"ul\",\n \"video\"\n ];\n }\n /**\n * Check if passed content includes only inline elements\n *\n * @param {string|HTMLElement} data - element or html string\n * @returns {boolean}\n */\n static containsOnlyInlineElements(e) {\n let t;\n J(e) ? (t = document.createElement(\"div\"), t.innerHTML = e) : t = e;\n const o = (i) => !d.blockElements.includes(i.tagName.toLowerCase()) && Array.from(i.children).every(o);\n return Array.from(t.children).every(o);\n }\n /**\n * Find and return all block elements in the passed parent (including subtree)\n *\n * @param {HTMLElement} parent - root element\n * @returns {HTMLElement[]}\n */\n static getDeepestBlockElements(e) {\n return d.containsOnlyInlineElements(e) ? [e] : Array.from(e.children).reduce((t, o) => [...t, ...d.getDeepestBlockElements(o)], []);\n }\n /**\n * Helper for get holder from {string} or return HTMLElement\n *\n * @param {string | HTMLElement} element - holder's id or holder's HTML Element\n * @returns {HTMLElement}\n */\n static getHolder(e) {\n return J(e) ? document.getElementById(e) : e;\n }\n /**\n * Returns true if element is anchor (is A tag)\n *\n * @param {Element} element - element to check\n * @returns {boolean}\n */\n static isAnchor(e) {\n return e.tagName.toLowerCase() === \"a\";\n }\n /**\n * Return element's offset related to the document\n *\n * @todo handle case when editor initialized in scrollable popup\n * @param el - element to compute offset\n */\n static offset(e) {\n const t = e.getBoundingClientRect(), o = window.pageXOffset || document.documentElement.scrollLeft, i = window.pageYOffset || document.documentElement.scrollTop, n = t.top + i, r = t.left + o;\n return {\n top: n,\n left: r,\n bottom: n + t.height,\n right: r + t.width\n };\n }\n}\nconst Kt = {\n blockTunes: {\n toggler: {\n \"Click to tune\": \"\",\n \"or drag to move\": \"\"\n }\n },\n inlineToolbar: {\n converter: {\n \"Convert to\": \"\"\n }\n },\n toolbar: {\n toolbox: {\n Add: \"\"\n }\n },\n popover: {\n Filter: \"\",\n \"Nothing found\": \"\"\n }\n}, Xt = {\n Text: \"\",\n Link: \"\",\n Bold: \"\",\n Italic: \"\"\n}, Vt = {\n link: {\n \"Add a link\": \"\"\n },\n stub: {\n \"The block can not be displayed correctly.\": \"\"\n }\n}, qt = {\n delete: {\n Delete: \"\",\n \"Click to delete\": \"\"\n },\n moveUp: {\n \"Move up\": \"\"\n },\n moveDown: {\n \"Move down\": \"\"\n }\n}, at = {\n ui: Kt,\n toolNames: Xt,\n tools: Vt,\n blockTunes: qt\n}, ie = class {\n /**\n * Type-safe translation for internal UI texts:\n * Perform translation of the string by namespace and a key\n *\n * @example I18n.ui(I18nInternalNS.ui.blockTunes.toggler, 'Click to tune')\n * @param internalNamespace - path to translated string in dictionary\n * @param dictKey - dictionary key. Better to use default locale original text\n */\n static ui(s, e) {\n return ie._t(s, e);\n }\n /**\n * Translate for external strings that is not presented in default dictionary.\n * For example, for user-specified tool names\n *\n * @param namespace - path to translated string in dictionary\n * @param dictKey - dictionary key. Better to use default locale original text\n */\n static t(s, e) {\n return ie._t(s, e);\n }\n /**\n * Adjust module for using external dictionary\n *\n * @param dictionary - new messages list to override default\n */\n static setDictionary(s) {\n ie.currentDictionary = s;\n }\n /**\n * Perform translation both for internal and external namespaces\n * If there is no translation found, returns passed key as a translated message\n *\n * @param namespace - path to translated string in dictionary\n * @param dictKey - dictionary key. Better to use default locale original text\n */\n static _t(s, e) {\n const t = ie.getNamespace(s);\n return !t || !t[e] ? e : t[e];\n }\n /**\n * Find messages section by namespace path\n *\n * @param namespace - path to section\n */\n static getNamespace(s) {\n return s.split(\".\").reduce((t, o) => !t || !Object.keys(t).length ? {} : t[o], ie.currentDictionary);\n }\n};\nlet $ = ie;\n$.currentDictionary = at;\nclass lt extends Error {\n}\nclass we {\n constructor() {\n this.subscribers = {};\n }\n /**\n * Subscribe any event on callback\n *\n * @param eventName - event name\n * @param callback - subscriber\n */\n on(e, t) {\n e in this.subscribers || (this.subscribers[e] = []), this.subscribers[e].push(t);\n }\n /**\n * Subscribe any event on callback. Callback will be called once and be removed from subscribers array after call.\n *\n * @param eventName - event name\n * @param callback - subscriber\n */\n once(e, t) {\n e in this.subscribers || (this.subscribers[e] = []);\n const o = (i) => {\n const n = t(i), r = this.subscribers[e].indexOf(o);\n return r !== -1 && this.subscribers[e].splice(r, 1), n;\n };\n this.subscribers[e].push(o);\n }\n /**\n * Emit callbacks with passed data\n *\n * @param eventName - event name\n * @param data - subscribers get this data when they were fired\n */\n emit(e, t) {\n V(this.subscribers) || !this.subscribers[e] || this.subscribers[e].reduce((o, i) => {\n const n = i(o);\n return n !== void 0 ? n : o;\n }, t);\n }\n /**\n * Unsubscribe callback from event\n *\n * @param eventName - event name\n * @param callback - event handler\n */\n off(e, t) {\n if (this.subscribers[e] === void 0) {\n console.warn(`EventDispatcher .off(): there is no subscribers for event \"${e.toString()}\". Probably, .off() called before .on()`);\n return;\n }\n for (let o = 0; o < this.subscribers[e].length; o++)\n if (this.subscribers[e][o] === t) {\n delete this.subscribers[e][o];\n break;\n }\n }\n /**\n * Destroyer\n * clears subscribers list\n */\n destroy() {\n this.subscribers = {};\n }\n}\nfunction ee(s) {\n Object.setPrototypeOf(this, {\n /**\n * Block id\n *\n * @returns {string}\n */\n get id() {\n return s.id;\n },\n /**\n * Tool name\n *\n * @returns {string}\n */\n get name() {\n return s.name;\n },\n /**\n * Tool config passed on Editor's initialization\n *\n * @returns {ToolConfig}\n */\n get config() {\n return s.config;\n },\n /**\n * .ce-block element, that wraps plugin contents\n *\n * @returns {HTMLElement}\n */\n get holder() {\n return s.holder;\n },\n /**\n * True if Block content is empty\n *\n * @returns {boolean}\n */\n get isEmpty() {\n return s.isEmpty;\n },\n /**\n * True if Block is selected with Cross-Block selection\n *\n * @returns {boolean}\n */\n get selected() {\n return s.selected;\n },\n /**\n * Set Block's stretch state\n *\n * @param {boolean} state — state to set\n */\n set stretched(t) {\n s.stretched = t;\n },\n /**\n * True if Block is stretched\n *\n * @returns {boolean}\n */\n get stretched() {\n return s.stretched;\n },\n /**\n * Call Tool method with errors handler under-the-hood\n *\n * @param {string} methodName - method to call\n * @param {object} param - object with parameters\n * @returns {unknown}\n */\n call(t, o) {\n return s.call(t, o);\n },\n /**\n * Save Block content\n *\n * @returns {Promise}\n */\n save() {\n return s.save();\n },\n /**\n * Validate Block data\n *\n * @param {BlockToolData} data - data to validate\n * @returns {Promise}\n */\n validate(t) {\n return s.validate(t);\n },\n /**\n * Allows to say Editor that Block was changed. Used to manually trigger Editor's 'onChange' callback\n * Can be useful for block changes invisible for editor core.\n */\n dispatchChange() {\n s.dispatchChange();\n }\n });\n}\nclass De {\n constructor() {\n this.allListeners = [];\n }\n /**\n * Assigns event listener on element and returns unique identifier\n *\n * @param {EventTarget} element - DOM element that needs to be listened\n * @param {string} eventType - event type\n * @param {Function} handler - method that will be fired on event\n * @param {boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once}\n */\n on(e, t, o, i = !1) {\n const n = Wt(\"l\"), r = {\n id: n,\n element: e,\n eventType: t,\n handler: o,\n options: i\n };\n if (!this.findOne(e, t, o))\n return this.allListeners.push(r), e.addEventListener(t, o, i), n;\n }\n /**\n * Removes event listener from element\n *\n * @param {EventTarget} element - DOM element that we removing listener\n * @param {string} eventType - event type\n * @param {Function} handler - remove handler, if element listens several handlers on the same event type\n * @param {boolean|AddEventListenerOptions} options - useCapture or {capture, passive, once}\n */\n off(e, t, o, i) {\n const n = this.findAll(e, t, o);\n n.forEach((r, a) => {\n const l = this.allListeners.indexOf(n[a]);\n l > -1 && (this.allListeners.splice(l, 1), r.element.removeEventListener(r.eventType, r.handler, r.options));\n });\n }\n /**\n * Removes listener by id\n *\n * @param {string} id - listener identifier\n */\n offById(e) {\n const t = this.findById(e);\n t && t.element.removeEventListener(t.eventType, t.handler, t.options);\n }\n /**\n * Finds and returns first listener by passed params\n *\n * @param {EventTarget} element - event target\n * @param {string} [eventType] - event type\n * @param {Function} [handler] - event handler\n * @returns {ListenerData|null}\n */\n findOne(e, t, o) {\n const i = this.findAll(e, t, o);\n return i.length > 0 ? i[0] : null;\n }\n /**\n * Return all stored listeners by passed params\n *\n * @param {EventTarget} element - event target\n * @param {string} eventType - event type\n * @param {Function} handler - event handler\n * @returns {ListenerData[]}\n */\n findAll(e, t, o) {\n let i;\n const n = e ? this.findByEventTarget(e) : [];\n return e && t && o ? i = n.filter((r) => r.eventType === t && r.handler === o) : e && t ? i = n.filter((r) => r.eventType === t) : i = n, i;\n }\n /**\n * Removes all listeners\n */\n removeAll() {\n this.allListeners.map((e) => {\n e.element.removeEventListener(e.eventType, e.handler, e.options);\n }), this.allListeners = [];\n }\n /**\n * Module cleanup on destruction\n */\n destroy() {\n this.removeAll();\n }\n /**\n * Search method: looks for listener by passed element\n *\n * @param {EventTarget} element - searching element\n * @returns {Array} listeners that found on element\n */\n findByEventTarget(e) {\n return this.allListeners.filter((t) => {\n if (t.element === e)\n return t;\n });\n }\n /**\n * Search method: looks for listener by passed event type\n *\n * @param {string} eventType - event type\n * @returns {ListenerData[]} listeners that found on element\n */\n findByType(e) {\n return this.allListeners.filter((t) => {\n if (t.eventType === e)\n return t;\n });\n }\n /**\n * Search method: looks for listener by passed handler\n *\n * @param {Function} handler - event handler\n * @returns {ListenerData[]} listeners that found on element\n */\n findByHandler(e) {\n return this.allListeners.filter((t) => {\n if (t.handler === e)\n return t;\n });\n }\n /**\n * Returns listener data found by id\n *\n * @param {string} id - listener identifier\n * @returns {ListenerData}\n */\n findById(e) {\n return this.allListeners.find((t) => t.id === e);\n }\n}\nclass C {\n /**\n * @class\n * @param options - Module options\n * @param options.config - Module config\n * @param options.eventsDispatcher - Common event bus\n */\n constructor({ config: e, eventsDispatcher: t }) {\n if (this.nodes = {}, this.listeners = new De(), this.readOnlyMutableListeners = {\n /**\n * Assigns event listener on DOM element and pushes into special array that might be removed\n *\n * @param {EventTarget} element - DOM Element\n * @param {string} eventType - Event name\n * @param {Function} handler - Event handler\n * @param {boolean|AddEventListenerOptions} options - Listening options\n */\n on: (o, i, n, r = !1) => {\n this.mutableListenerIds.push(\n this.listeners.on(o, i, n, r)\n );\n },\n /**\n * Clears all mutable listeners\n */\n clearAll: () => {\n for (const o of this.mutableListenerIds)\n this.listeners.offById(o);\n this.mutableListenerIds = [];\n }\n }, this.mutableListenerIds = [], new.target === C)\n throw new TypeError(\"Constructors for abstract class Module are not allowed.\");\n this.config = e, this.eventsDispatcher = t;\n }\n /**\n * Editor modules setter\n *\n * @param {EditorModules} Editor - Editor's Modules\n */\n set state(e) {\n this.Editor = e;\n }\n /**\n * Remove memorized nodes\n */\n removeAllNodes() {\n for (const e in this.nodes) {\n const t = this.nodes[e];\n t instanceof HTMLElement && t.remove();\n }\n }\n /**\n * Returns true if current direction is RTL (Right-To-Left)\n */\n get isRtl() {\n return this.config.i18n.direction === \"rtl\";\n }\n}\nclass m {\n constructor() {\n this.instance = null, this.selection = null, this.savedSelectionRange = null, this.isFakeBackgroundEnabled = !1, this.commandBackground = \"backColor\", this.commandRemoveFormat = \"removeFormat\";\n }\n /**\n * Editor styles\n *\n * @returns {{editorWrapper: string, editorZone: string}}\n */\n static get CSS() {\n return {\n editorWrapper: \"codex-editor\",\n editorZone: \"codex-editor__redactor\"\n };\n }\n /**\n * Returns selected anchor\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorNode}\n *\n * @returns {Node|null}\n */\n static get anchorNode() {\n const e = window.getSelection();\n return e ? e.anchorNode : null;\n }\n /**\n * Returns selected anchor element\n *\n * @returns {Element|null}\n */\n static get anchorElement() {\n const e = window.getSelection();\n if (!e)\n return null;\n const t = e.anchorNode;\n return t ? d.isElement(t) ? t : t.parentElement : null;\n }\n /**\n * Returns selection offset according to the anchor node\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Selection/anchorOffset}\n *\n * @returns {number|null}\n */\n static get anchorOffset() {\n const e = window.getSelection();\n return e ? e.anchorOffset : null;\n }\n /**\n * Is current selection range collapsed\n *\n * @returns {boolean|null}\n */\n static get isCollapsed() {\n const e = window.getSelection();\n return e ? e.isCollapsed : null;\n }\n /**\n * Check current selection if it is at Editor's zone\n *\n * @returns {boolean}\n */\n static get isAtEditor() {\n return this.isSelectionAtEditor(m.get());\n }\n /**\n * Check if passed selection is at Editor's zone\n *\n * @param selection - Selection object to check\n */\n static isSelectionAtEditor(e) {\n if (!e)\n return !1;\n let t = e.anchorNode || e.focusNode;\n t && t.nodeType === Node.TEXT_NODE && (t = t.parentNode);\n let o = null;\n return t && t instanceof Element && (o = t.closest(`.${m.CSS.editorZone}`)), o ? o.nodeType === Node.ELEMENT_NODE : !1;\n }\n /**\n * Check if passed range at Editor zone\n *\n * @param range - range to check\n */\n static isRangeAtEditor(e) {\n if (!e)\n return;\n let t = e.startContainer;\n t && t.nodeType === Node.TEXT_NODE && (t = t.parentNode);\n let o = null;\n return t && t instanceof Element && (o = t.closest(`.${m.CSS.editorZone}`)), o ? o.nodeType === Node.ELEMENT_NODE : !1;\n }\n /**\n * Methods return boolean that true if selection exists on the page\n */\n static get isSelectionExists() {\n return !!m.get().anchorNode;\n }\n /**\n * Return first range\n *\n * @returns {Range|null}\n */\n static get range() {\n return this.getRangeFromSelection(this.get());\n }\n /**\n * Returns range from passed Selection object\n *\n * @param selection - Selection object to get Range from\n */\n static getRangeFromSelection(e) {\n return e && e.rangeCount ? e.getRangeAt(0) : null;\n }\n /**\n * Calculates position and size of selected text\n *\n * @returns {DOMRect | ClientRect}\n */\n static get rect() {\n let e = document.selection, t, o = {\n x: 0,\n y: 0,\n width: 0,\n height: 0\n };\n if (e && e.type !== \"Control\")\n return e = e, t = e.createRange(), o.x = t.boundingLeft, o.y = t.boundingTop, o.width = t.boundingWidth, o.height = t.boundingHeight, o;\n if (!window.getSelection)\n return L(\"Method window.getSelection is not supported\", \"warn\"), o;\n if (e = window.getSelection(), e.rangeCount === null || isNaN(e.rangeCount))\n return L(\"Method SelectionUtils.rangeCount is not supported\", \"warn\"), o;\n if (e.rangeCount === 0)\n return o;\n if (t = e.getRangeAt(0).cloneRange(), t.getBoundingClientRect && (o = t.getBoundingClientRect()), o.x === 0 && o.y === 0) {\n const i = document.createElement(\"span\");\n if (i.getBoundingClientRect) {\n i.appendChild(document.createTextNode(\"​\")), t.insertNode(i), o = i.getBoundingClientRect();\n const n = i.parentNode;\n n.removeChild(i), n.normalize();\n }\n }\n return o;\n }\n /**\n * Returns selected text as String\n *\n * @returns {string}\n */\n static get text() {\n return window.getSelection ? window.getSelection().toString() : \"\";\n }\n /**\n * Returns window SelectionUtils\n * {@link https://developer.mozilla.org/ru/docs/Web/API/Window/getSelection}\n *\n * @returns {Selection}\n */\n static get() {\n return window.getSelection();\n }\n /**\n * Set focus to contenteditable or native input element\n *\n * @param element - element where to set focus\n * @param offset - offset of cursor\n */\n static setCursor(e, t = 0) {\n const o = document.createRange(), i = window.getSelection();\n return d.isNativeInput(e) ? d.canSetCaret(e) ? (e.focus(), e.selectionStart = e.selectionEnd = t, e.getBoundingClientRect()) : void 0 : (o.setStart(e, t), o.setEnd(e, t), i.removeAllRanges(), i.addRange(o), o.getBoundingClientRect());\n }\n /**\n * Check if current range exists and belongs to container\n *\n * @param container - where range should be\n */\n static isRangeInsideContainer(e) {\n const t = m.range;\n return t === null ? !1 : e.contains(t.startContainer);\n }\n /**\n * Adds fake cursor to the current range\n */\n static addFakeCursor() {\n const e = m.range;\n if (e === null)\n return;\n const t = d.make(\"span\", \"codex-editor__fake-cursor\");\n t.dataset.mutationFree = \"true\", e.collapse(), e.insertNode(t);\n }\n /**\n * Check if passed element contains a fake cursor\n *\n * @param el - where to check\n */\n static isFakeCursorInsideContainer(e) {\n return d.find(e, \".codex-editor__fake-cursor\") !== null;\n }\n /**\n * Removes fake cursor from a container\n *\n * @param container - container to look for\n */\n static removeFakeCursor(e = document.body) {\n const t = d.find(e, \".codex-editor__fake-cursor\");\n t && t.remove();\n }\n /**\n * Removes fake background\n */\n removeFakeBackground() {\n this.isFakeBackgroundEnabled && (this.isFakeBackgroundEnabled = !1, document.execCommand(this.commandRemoveFormat));\n }\n /**\n * Sets fake background\n */\n setFakeBackground() {\n document.execCommand(this.commandBackground, !1, \"#a8d6ff\"), this.isFakeBackgroundEnabled = !0;\n }\n /**\n * Save SelectionUtils's range\n */\n save() {\n this.savedSelectionRange = m.range;\n }\n /**\n * Restore saved SelectionUtils's range\n */\n restore() {\n if (!this.savedSelectionRange)\n return;\n const e = window.getSelection();\n e.removeAllRanges(), e.addRange(this.savedSelectionRange);\n }\n /**\n * Clears saved selection\n */\n clearSaved() {\n this.savedSelectionRange = null;\n }\n /**\n * Collapse current selection\n */\n collapseToEnd() {\n const e = window.getSelection(), t = document.createRange();\n t.selectNodeContents(e.focusNode), t.collapse(!1), e.removeAllRanges(), e.addRange(t);\n }\n /**\n * Looks ahead to find passed tag from current selection\n *\n * @param {string} tagName - tag to found\n * @param {string} [className] - tag's class name\n * @param {number} [searchDepth] - count of tags that can be included. For better performance.\n * @returns {HTMLElement|null}\n */\n findParentTag(e, t, o = 10) {\n const i = window.getSelection();\n let n = null;\n return !i || !i.anchorNode || !i.focusNode ? null : ([\n /** the Node in which the selection begins */\n i.anchorNode,\n /** the Node in which the selection ends */\n i.focusNode\n ].forEach((a) => {\n let l = o;\n for (; l > 0 && a.parentNode && !(a.tagName === e && (n = a, t && a.classList && !a.classList.contains(t) && (n = null), n)); )\n a = a.parentNode, l--;\n }), n);\n }\n /**\n * Expands selection range to the passed parent node\n *\n * @param {HTMLElement} element - element which contents should be selected\n */\n expandToTag(e) {\n const t = window.getSelection();\n t.removeAllRanges();\n const o = document.createRange();\n o.selectNodeContents(e), t.addRange(o);\n }\n}\nfunction Zt(s, e) {\n const { type: t, target: o, addedNodes: i, removedNodes: n } = s;\n if (o === e)\n return !0;\n if ([\"characterData\", \"attributes\"].includes(t)) {\n const l = o.nodeType === Node.TEXT_NODE ? o.parentNode : o;\n return e.contains(l);\n }\n const r = Array.from(i).some((l) => e.contains(l)), a = Array.from(n).some((l) => e.contains(l));\n return r || a;\n}\nconst Me = \"redactor dom changed\", ct = \"block changed\", dt = \"fake cursor is about to be toggled\", ht = \"fake cursor have been set\";\nfunction Je(s, e) {\n return s.mergeable && s.name === e.name;\n}\nfunction Gt(s, e) {\n const t = e == null ? void 0 : e.export;\n return D(t) ? t(s) : J(t) ? s[t] : (t !== void 0 && L(\"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.\"), \"\");\n}\nfunction Jt(s, e) {\n const t = e == null ? void 0 : e.import;\n return D(t) ? t(s) : J(t) ? {\n [t]: s\n } : (t !== void 0 && L(\"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.\"), {});\n}\nvar q = /* @__PURE__ */ ((s) => (s.APPEND_CALLBACK = \"appendCallback\", s.RENDERED = \"rendered\", s.MOVED = \"moved\", s.UPDATED = \"updated\", s.REMOVED = \"removed\", s.ON_PASTE = \"onPaste\", s))(q || {});\nclass F extends we {\n /**\n * @param options - block constructor options\n * @param [options.id] - block's id. Will be generated if omitted.\n * @param options.data - Tool's initial data\n * @param options.tool — block's tool\n * @param options.api - Editor API module for pass it to the Block Tunes\n * @param options.readOnly - Read-Only flag\n * @param [eventBus] - Editor common event bus. Allows to subscribe on some Editor events. Could be omitted when \"virtual\" Block is created. See BlocksAPI@composeBlockData.\n */\n constructor({\n id: e = Ut(),\n data: t,\n tool: o,\n api: i,\n readOnly: n,\n tunesData: r\n }, a) {\n super(), this.cachedInputs = [], this.toolRenderedElement = null, this.tunesInstances = /* @__PURE__ */ new Map(), this.defaultTunesInstances = /* @__PURE__ */ new Map(), this.unavailableTunesData = {}, this.inputIndex = 0, this.editorEventBus = null, this.handleFocus = () => {\n this.dropInputsCache(), this.updateCurrentInput();\n }, this.didMutated = (l = void 0) => {\n const c = l === void 0, u = l instanceof InputEvent;\n !c && !u && this.detectToolRootChange(l);\n let h;\n c || u ? h = !0 : h = !(l.length > 0 && l.every((k) => {\n const { addedNodes: p, removedNodes: v, target: A } = k;\n return [\n ...Array.from(p),\n ...Array.from(v),\n A\n ].some((_) => d.isElement(_) ? _.dataset.mutationFree === \"true\" : !1);\n })), h && (this.dropInputsCache(), this.updateCurrentInput(), this.call(\n \"updated\"\n /* UPDATED */\n ), this.emit(\"didMutated\", this));\n }, this.name = o.name, this.id = e, this.settings = o.settings, this.config = o.settings.config || {}, this.api = i, this.editorEventBus = a || null, this.blockAPI = new ee(this), this.tool = o, this.toolInstance = o.create(t, this.blockAPI, n), this.tunes = o.tunes, this.composeTunes(r), this.holder = this.compose(), window.requestIdleCallback(() => {\n this.watchBlockMutations(), this.addInputEvents();\n });\n }\n /**\n * CSS classes for the Block\n *\n * @returns {{wrapper: string, content: string}}\n */\n static get CSS() {\n return {\n wrapper: \"ce-block\",\n wrapperStretched: \"ce-block--stretched\",\n content: \"ce-block__content\",\n focused: \"ce-block--focused\",\n selected: \"ce-block--selected\",\n dropTarget: \"ce-block--drop-target\"\n };\n }\n /**\n * Find and return all editable elements (contenteditable and native inputs) in the Tool HTML\n *\n * @returns {HTMLElement[]}\n */\n get inputs() {\n if (this.cachedInputs.length !== 0)\n return this.cachedInputs;\n const e = d.findAllInputs(this.holder);\n return this.inputIndex > e.length - 1 && (this.inputIndex = e.length - 1), this.cachedInputs = e, e;\n }\n /**\n * Return current Tool`s input\n *\n * @returns {HTMLElement}\n */\n get currentInput() {\n return this.inputs[this.inputIndex];\n }\n /**\n * Set input index to the passed element\n *\n * @param {HTMLElement | Node} element - HTML Element to set as current input\n */\n set currentInput(e) {\n const t = this.inputs.findIndex((o) => o === e || o.contains(e));\n t !== -1 && (this.inputIndex = t);\n }\n /**\n * Return first Tool`s input\n *\n * @returns {HTMLElement}\n */\n get firstInput() {\n return this.inputs[0];\n }\n /**\n * Return first Tool`s input\n *\n * @returns {HTMLElement}\n */\n get lastInput() {\n const e = this.inputs;\n return e[e.length - 1];\n }\n /**\n * Return next Tool`s input or undefined if it doesn't exist\n *\n * @returns {HTMLElement}\n */\n get nextInput() {\n return this.inputs[this.inputIndex + 1];\n }\n /**\n * Return previous Tool`s input or undefined if it doesn't exist\n *\n * @returns {HTMLElement}\n */\n get previousInput() {\n return this.inputs[this.inputIndex - 1];\n }\n /**\n * Get Block's JSON data\n *\n * @returns {object}\n */\n get data() {\n return this.save().then((e) => e && !V(e.data) ? e.data : {});\n }\n /**\n * Returns tool's sanitizer config\n *\n * @returns {object}\n */\n get sanitize() {\n return this.tool.sanitizeConfig;\n }\n /**\n * is block mergeable\n * We plugin have merge function then we call it mergeable\n *\n * @returns {boolean}\n */\n get mergeable() {\n return D(this.toolInstance.merge);\n }\n /**\n * Check block for emptiness\n *\n * @returns {boolean}\n */\n get isEmpty() {\n const e = d.isEmpty(this.pluginsContent), t = !this.hasMedia;\n return e && t;\n }\n /**\n * Check if block has a media content such as images, iframe and other\n *\n * @returns {boolean}\n */\n get hasMedia() {\n const e = [\n \"img\",\n \"iframe\",\n \"video\",\n \"audio\",\n \"source\",\n \"input\",\n \"textarea\",\n \"twitterwidget\"\n ];\n return !!this.holder.querySelector(e.join(\",\"));\n }\n /**\n * Set focused state\n *\n * @param {boolean} state - 'true' to select, 'false' to remove selection\n */\n set focused(e) {\n this.holder.classList.toggle(F.CSS.focused, e);\n }\n /**\n * Get Block's focused state\n */\n get focused() {\n return this.holder.classList.contains(F.CSS.focused);\n }\n /**\n * Set selected state\n * We don't need to mark Block as Selected when it is empty\n *\n * @param {boolean} state - 'true' to select, 'false' to remove selection\n */\n set selected(e) {\n var i, n;\n this.holder.classList.toggle(F.CSS.selected, e);\n const t = e === !0 && m.isRangeInsideContainer(this.holder), o = e === !1 && m.isFakeCursorInsideContainer(this.holder);\n (t || o) && ((i = this.editorEventBus) == null || i.emit(dt, { state: e }), t ? m.addFakeCursor() : m.removeFakeCursor(this.holder), (n = this.editorEventBus) == null || n.emit(ht, { state: e }));\n }\n /**\n * Returns True if it is Selected\n *\n * @returns {boolean}\n */\n get selected() {\n return this.holder.classList.contains(F.CSS.selected);\n }\n /**\n * Set stretched state\n *\n * @param {boolean} state - 'true' to enable, 'false' to disable stretched state\n */\n set stretched(e) {\n this.holder.classList.toggle(F.CSS.wrapperStretched, e);\n }\n /**\n * Return Block's stretched state\n *\n * @returns {boolean}\n */\n get stretched() {\n return this.holder.classList.contains(F.CSS.wrapperStretched);\n }\n /**\n * Toggle drop target state\n *\n * @param {boolean} state - 'true' if block is drop target, false otherwise\n */\n set dropTarget(e) {\n this.holder.classList.toggle(F.CSS.dropTarget, e);\n }\n /**\n * Returns Plugins content\n *\n * @returns {HTMLElement}\n */\n get pluginsContent() {\n return this.toolRenderedElement;\n }\n /**\n * Calls Tool's method\n *\n * Method checks tool property {MethodName}. Fires method with passes params If it is instance of Function\n *\n * @param {string} methodName - method to call\n * @param {object} params - method argument\n */\n call(e, t) {\n if (D(this.toolInstance[e])) {\n e === \"appendCallback\" && L(\n \"`appendCallback` hook is deprecated and will be removed in the next major release. Use `rendered` hook instead\",\n \"warn\"\n );\n try {\n this.toolInstance[e].call(this.toolInstance, t);\n } catch (o) {\n L(`Error during '${e}' call: ${o.message}`, \"error\");\n }\n }\n }\n /**\n * Call plugins merge method\n *\n * @param {BlockToolData} data - data to merge\n */\n async mergeWith(e) {\n await this.toolInstance.merge(e);\n }\n /**\n * Extracts data from Block\n * Groups Tool's save processing time\n *\n * @returns {object}\n */\n async save() {\n const e = await this.toolInstance.save(this.pluginsContent), t = this.unavailableTunesData;\n [\n ...this.tunesInstances.entries(),\n ...this.defaultTunesInstances.entries()\n ].forEach(([n, r]) => {\n if (D(r.save))\n try {\n t[n] = r.save();\n } catch (a) {\n L(`Tune ${r.constructor.name} save method throws an Error %o`, \"warn\", a);\n }\n });\n const o = window.performance.now();\n let i;\n return Promise.resolve(e).then((n) => (i = window.performance.now(), {\n id: this.id,\n tool: this.name,\n data: n,\n tunes: t,\n time: i - o\n })).catch((n) => {\n L(`Saving process for ${this.name} tool failed due to the ${n}`, \"log\", \"red\");\n });\n }\n /**\n * Uses Tool's validation method to check the correctness of output data\n * Tool's validation method is optional\n *\n * @description Method returns true|false whether data passed the validation or not\n * @param {BlockToolData} data - data to validate\n * @returns {Promise} valid\n */\n async validate(e) {\n let t = !0;\n return this.toolInstance.validate instanceof Function && (t = await this.toolInstance.validate(e)), t;\n }\n /**\n * Returns data to render in tunes menu.\n * Splits block tunes settings into 2 groups: popover items and custom html.\n */\n getTunes() {\n const e = document.createElement(\"div\"), t = [], o = typeof this.toolInstance.renderSettings == \"function\" ? this.toolInstance.renderSettings() : [], i = [\n ...this.tunesInstances.values(),\n ...this.defaultTunesInstances.values()\n ].map((n) => n.render());\n return [o, i].flat().forEach((n) => {\n d.isElement(n) ? e.appendChild(n) : Array.isArray(n) ? t.push(...n) : t.push(n);\n }), [t, e];\n }\n /**\n * Update current input index with selection anchor node\n */\n updateCurrentInput() {\n this.currentInput = d.isNativeInput(document.activeElement) || !m.anchorNode ? document.activeElement : m.anchorNode;\n }\n /**\n * Allows to say Editor that Block was changed. Used to manually trigger Editor's 'onChange' callback\n * Can be useful for block changes invisible for editor core.\n */\n dispatchChange() {\n this.didMutated();\n }\n /**\n * Call Tool instance destroy method\n */\n destroy() {\n this.unwatchBlockMutations(), this.removeInputEvents(), super.destroy(), D(this.toolInstance.destroy) && this.toolInstance.destroy();\n }\n /**\n * Tool could specify several entries to be displayed at the Toolbox (for example, \"Heading 1\", \"Heading 2\", \"Heading 3\")\n * This method returns the entry that is related to the Block (depended on the Block data)\n */\n async getActiveToolboxEntry() {\n const e = this.tool.toolbox;\n if (e.length === 1)\n return Promise.resolve(this.tool.toolbox[0]);\n const t = await this.data;\n return e.find((i) => Object.entries(i.data).some(([n, r]) => t[n] && Yt(t[n], r)));\n }\n /**\n * Exports Block data as string using conversion config\n */\n async exportDataAsString() {\n const e = await this.data;\n return Gt(e, this.tool.conversionConfig);\n }\n /**\n * Make default Block wrappers and put Tool`s content there\n *\n * @returns {HTMLDivElement}\n */\n compose() {\n const e = d.make(\"div\", F.CSS.wrapper), t = d.make(\"div\", F.CSS.content), o = this.toolInstance.render();\n e.dataset.id = this.id, this.toolRenderedElement = o, t.appendChild(this.toolRenderedElement);\n let i = t;\n return [...this.tunesInstances.values(), ...this.defaultTunesInstances.values()].forEach((n) => {\n if (D(n.wrap))\n try {\n i = n.wrap(i);\n } catch (r) {\n L(`Tune ${n.constructor.name} wrap method throws an Error %o`, \"warn\", r);\n }\n }), e.appendChild(i), e;\n }\n /**\n * Instantiate Block Tunes\n *\n * @param tunesData - current Block tunes data\n * @private\n */\n composeTunes(e) {\n Array.from(this.tunes.values()).forEach((t) => {\n (t.isInternal ? this.defaultTunesInstances : this.tunesInstances).set(t.name, t.create(e[t.name], this.blockAPI));\n }), Object.entries(e).forEach(([t, o]) => {\n this.tunesInstances.has(t) || (this.unavailableTunesData[t] = o);\n });\n }\n /**\n * Adds focus event listeners to all inputs and contenteditable\n */\n addInputEvents() {\n this.inputs.forEach((e) => {\n e.addEventListener(\"focus\", this.handleFocus), d.isNativeInput(e) && e.addEventListener(\"input\", this.didMutated);\n });\n }\n /**\n * removes focus event listeners from all inputs and contenteditable\n */\n removeInputEvents() {\n this.inputs.forEach((e) => {\n e.removeEventListener(\"focus\", this.handleFocus), d.isNativeInput(e) && e.removeEventListener(\"input\", this.didMutated);\n });\n }\n /**\n * Listen common editor Dom Changed event and detect mutations related to the Block\n */\n watchBlockMutations() {\n var e;\n this.redactorDomChangedCallback = (t) => {\n const { mutations: o } = t;\n o.some((n) => Zt(n, this.toolRenderedElement)) && this.didMutated(o);\n }, (e = this.editorEventBus) == null || e.on(Me, this.redactorDomChangedCallback);\n }\n /**\n * Remove redactor dom change event listener\n */\n unwatchBlockMutations() {\n var e;\n (e = this.editorEventBus) == null || e.off(Me, this.redactorDomChangedCallback);\n }\n /**\n * Sometimes Tool can replace own main element, for example H2 -> H4 or UL -> OL\n * We need to detect such changes and update a link to tools main element with the new one\n *\n * @param mutations - records of block content mutations\n */\n detectToolRootChange(e) {\n e.forEach((t) => {\n if (Array.from(t.removedNodes).includes(this.toolRenderedElement)) {\n const i = t.addedNodes[t.addedNodes.length - 1];\n this.toolRenderedElement = i;\n }\n });\n }\n /**\n * Clears inputs cached value\n */\n dropInputsCache() {\n this.cachedInputs = [];\n }\n}\nclass Qt extends C {\n constructor() {\n super(...arguments), this.insert = (e = this.config.defaultBlock, t = {}, o = {}, i, n, r, a) => {\n const l = this.Editor.BlockManager.insert({\n id: a,\n tool: e,\n data: t,\n index: i,\n needToFocus: n,\n replace: r\n });\n return new ee(l);\n }, this.composeBlockData = async (e) => {\n const t = this.Editor.Tools.blockTools.get(e);\n return new F({\n tool: t,\n api: this.Editor.API,\n readOnly: !0,\n data: {},\n tunesData: {}\n }).data;\n }, this.update = async (e, t) => {\n const { BlockManager: o } = this.Editor, i = o.getBlockById(e);\n if (i === void 0)\n throw new Error(`Block with id \"${e}\" not found`);\n const n = await o.update(i, t);\n return new ee(n);\n }, this.convert = (e, t, o) => {\n var h, f;\n const { BlockManager: i, Tools: n } = this.Editor, r = i.getBlockById(e);\n if (!r)\n throw new Error(`Block with id \"${e}\" not found`);\n const a = n.blockTools.get(r.name), l = n.blockTools.get(t);\n if (!l)\n throw new Error(`Block Tool with type \"${t}\" not found`);\n const c = ((h = a == null ? void 0 : a.conversionConfig) == null ? void 0 : h.export) !== void 0, u = ((f = l.conversionConfig) == null ? void 0 : f.import) !== void 0;\n if (c && u)\n i.convert(r, t, o);\n else {\n const k = [\n c ? !1 : ae(r.name),\n u ? !1 : ae(t)\n ].filter(Boolean).join(\" and \");\n throw new Error(`Conversion from \"${r.name}\" to \"${t}\" is not possible. ${k} tool(s) should provide a \"conversionConfig\"`);\n }\n }, this.insertMany = (e, t = this.Editor.BlockManager.blocks.length - 1) => {\n this.validateIndex(t);\n const o = e.map(({ id: i, type: n, data: r }) => this.Editor.BlockManager.composeBlock({\n id: i,\n tool: n || this.config.defaultBlock,\n data: r\n }));\n return this.Editor.BlockManager.insertMany(o, t), o.map((i) => new ee(i));\n };\n }\n /**\n * Available methods\n *\n * @returns {Blocks}\n */\n get methods() {\n return {\n clear: () => this.clear(),\n render: (e) => this.render(e),\n renderFromHTML: (e) => this.renderFromHTML(e),\n delete: (e) => this.delete(e),\n swap: (e, t) => this.swap(e, t),\n move: (e, t) => this.move(e, t),\n getBlockByIndex: (e) => this.getBlockByIndex(e),\n getById: (e) => this.getById(e),\n getCurrentBlockIndex: () => this.getCurrentBlockIndex(),\n getBlockIndex: (e) => this.getBlockIndex(e),\n getBlocksCount: () => this.getBlocksCount(),\n stretchBlock: (e, t = !0) => this.stretchBlock(e, t),\n insertNewBlock: () => this.insertNewBlock(),\n insert: this.insert,\n insertMany: this.insertMany,\n update: this.update,\n composeBlockData: this.composeBlockData,\n convert: this.convert\n };\n }\n /**\n * Returns Blocks count\n *\n * @returns {number}\n */\n getBlocksCount() {\n return this.Editor.BlockManager.blocks.length;\n }\n /**\n * Returns current block index\n *\n * @returns {number}\n */\n getCurrentBlockIndex() {\n return this.Editor.BlockManager.currentBlockIndex;\n }\n /**\n * Returns the index of Block by id;\n *\n * @param id - block id\n */\n getBlockIndex(e) {\n const t = this.Editor.BlockManager.getBlockById(e);\n if (!t) {\n K(\"There is no block with id `\" + e + \"`\", \"warn\");\n return;\n }\n return this.Editor.BlockManager.getBlockIndex(t);\n }\n /**\n * Returns BlockAPI object by Block index\n *\n * @param {number} index - index to get\n */\n getBlockByIndex(e) {\n const t = this.Editor.BlockManager.getBlockByIndex(e);\n if (t === void 0) {\n K(\"There is no block at index `\" + e + \"`\", \"warn\");\n return;\n }\n return new ee(t);\n }\n /**\n * Returns BlockAPI object by Block id\n *\n * @param id - id of block to get\n */\n getById(e) {\n const t = this.Editor.BlockManager.getBlockById(e);\n return t === void 0 ? (K(\"There is no block with id `\" + e + \"`\", \"warn\"), null) : new ee(t);\n }\n /**\n * Call Block Manager method that swap Blocks\n *\n * @param {number} fromIndex - position of first Block\n * @param {number} toIndex - position of second Block\n * @deprecated — use 'move' instead\n */\n swap(e, t) {\n L(\n \"`blocks.swap()` method is deprecated and will be removed in the next major release. Use `block.move()` method instead\",\n \"info\"\n ), this.Editor.BlockManager.swap(e, t);\n }\n /**\n * Move block from one index to another\n *\n * @param {number} toIndex - index to move to\n * @param {number} fromIndex - index to move from\n */\n move(e, t) {\n this.Editor.BlockManager.move(e, t);\n }\n /**\n * Deletes Block\n *\n * @param {number} blockIndex - index of Block to delete\n */\n delete(e = this.Editor.BlockManager.currentBlockIndex) {\n try {\n const t = this.Editor.BlockManager.getBlockByIndex(e);\n this.Editor.BlockManager.removeBlock(t);\n } catch (t) {\n K(t, \"warn\");\n return;\n }\n this.Editor.BlockManager.blocks.length === 0 && 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();\n }\n /**\n * Clear Editor's area\n */\n async clear() {\n await this.Editor.BlockManager.clear(!0), this.Editor.InlineToolbar.close();\n }\n /**\n * Fills Editor with Blocks data\n *\n * @param {OutputData} data — Saved Editor data\n */\n async render(e) {\n if (e === void 0 || e.blocks === void 0)\n throw new Error(\"Incorrect data passed to the render() method\");\n this.Editor.ModificationsObserver.disable(), await this.Editor.BlockManager.clear(), await this.Editor.Renderer.render(e.blocks), this.Editor.ModificationsObserver.enable();\n }\n /**\n * Render passed HTML string\n *\n * @param {string} data - HTML string to render\n * @returns {Promise}\n */\n renderFromHTML(e) {\n return this.Editor.BlockManager.clear(), this.Editor.Paste.processText(e, !0);\n }\n /**\n * Stretch Block's content\n *\n * @param {number} index - index of Block to stretch\n * @param {boolean} status - true to enable, false to disable\n * @deprecated Use BlockAPI interface to stretch Blocks\n */\n stretchBlock(e, t = !0) {\n Ie(\n !0,\n \"blocks.stretchBlock()\",\n \"BlockAPI\"\n );\n const o = this.Editor.BlockManager.getBlockByIndex(e);\n o && (o.stretched = t);\n }\n /**\n * Insert new Block\n * After set caret to this Block\n *\n * @todo remove in 3.0.0\n * @deprecated with insert() method\n */\n insertNewBlock() {\n L(\"Method blocks.insertNewBlock() is deprecated and it will be removed in the next major release. Use blocks.insert() instead.\", \"warn\"), this.insert();\n }\n /**\n * Validated block index and throws an error if it's invalid\n *\n * @param index - index to validate\n */\n validateIndex(e) {\n if (typeof e != \"number\")\n throw new Error(\"Index should be a number\");\n if (e < 0)\n throw new Error(\"Index should be greater than or equal to 0\");\n if (e === null)\n throw new Error(\"Index should be greater than or equal to 0\");\n }\n}\nclass eo extends C {\n constructor() {\n super(...arguments), this.setToFirstBlock = (e = this.Editor.Caret.positions.DEFAULT, t = 0) => this.Editor.BlockManager.firstBlock ? (this.Editor.Caret.setToBlock(this.Editor.BlockManager.firstBlock, e, t), !0) : !1, this.setToLastBlock = (e = this.Editor.Caret.positions.DEFAULT, t = 0) => this.Editor.BlockManager.lastBlock ? (this.Editor.Caret.setToBlock(this.Editor.BlockManager.lastBlock, e, t), !0) : !1, this.setToPreviousBlock = (e = this.Editor.Caret.positions.DEFAULT, t = 0) => this.Editor.BlockManager.previousBlock ? (this.Editor.Caret.setToBlock(this.Editor.BlockManager.previousBlock, e, t), !0) : !1, this.setToNextBlock = (e = this.Editor.Caret.positions.DEFAULT, t = 0) => this.Editor.BlockManager.nextBlock ? (this.Editor.Caret.setToBlock(this.Editor.BlockManager.nextBlock, e, t), !0) : !1, this.setToBlock = (e, t = this.Editor.Caret.positions.DEFAULT, o = 0) => this.Editor.BlockManager.blocks[e] ? (this.Editor.Caret.setToBlock(this.Editor.BlockManager.blocks[e], t, o), !0) : !1, this.focus = (e = !1) => e ? this.setToLastBlock(this.Editor.Caret.positions.END) : this.setToFirstBlock(this.Editor.Caret.positions.START);\n }\n /**\n * Available methods\n *\n * @returns {Caret}\n */\n get methods() {\n return {\n setToFirstBlock: this.setToFirstBlock,\n setToLastBlock: this.setToLastBlock,\n setToPreviousBlock: this.setToPreviousBlock,\n setToNextBlock: this.setToNextBlock,\n setToBlock: this.setToBlock,\n focus: this.focus\n };\n }\n}\nclass to extends C {\n /**\n * Available methods\n *\n * @returns {Events}\n */\n get methods() {\n return {\n emit: (e, t) => this.emit(e, t),\n off: (e, t) => this.off(e, t),\n on: (e, t) => this.on(e, t)\n };\n }\n /**\n * Subscribe on Events\n *\n * @param {string} eventName - event name to subscribe\n * @param {Function} callback - event handler\n */\n on(e, t) {\n this.eventsDispatcher.on(e, t);\n }\n /**\n * Emit event with data\n *\n * @param {string} eventName - event to emit\n * @param {object} data - event's data\n */\n emit(e, t) {\n this.eventsDispatcher.emit(e, t);\n }\n /**\n * Unsubscribe from Event\n *\n * @param {string} eventName - event to unsubscribe\n * @param {Function} callback - event handler\n */\n off(e, t) {\n this.eventsDispatcher.off(e, t);\n }\n}\nclass Pe extends C {\n /**\n * Return namespace section for tool or block tune\n *\n * @param tool - tool object\n */\n static getNamespace(e) {\n return e.isTune() ? `blockTunes.${e.name}` : `tools.${e.name}`;\n }\n /**\n * Return I18n API methods with global dictionary access\n */\n get methods() {\n return {\n t: () => {\n K(\"I18n.t() method can be accessed only from Tools\", \"warn\");\n }\n };\n }\n /**\n * Return I18n API methods with tool namespaced dictionary\n *\n * @param tool - Tool object\n */\n getMethodsForTool(e) {\n return Object.assign(\n this.methods,\n {\n t: (t) => $.t(Pe.getNamespace(e), t)\n }\n );\n }\n}\nclass oo extends C {\n /**\n * Editor.js Core API modules\n */\n get methods() {\n return {\n blocks: this.Editor.BlocksAPI.methods,\n caret: this.Editor.CaretAPI.methods,\n events: this.Editor.EventsAPI.methods,\n listeners: this.Editor.ListenersAPI.methods,\n notifier: this.Editor.NotifierAPI.methods,\n sanitizer: this.Editor.SanitizerAPI.methods,\n saver: this.Editor.SaverAPI.methods,\n selection: this.Editor.SelectionAPI.methods,\n styles: this.Editor.StylesAPI.classes,\n toolbar: this.Editor.ToolbarAPI.methods,\n inlineToolbar: this.Editor.InlineToolbarAPI.methods,\n tooltip: this.Editor.TooltipAPI.methods,\n i18n: this.Editor.I18nAPI.methods,\n readOnly: this.Editor.ReadOnlyAPI.methods,\n ui: this.Editor.UiAPI.methods\n };\n }\n /**\n * Returns Editor.js Core API methods for passed tool\n *\n * @param tool - tool object\n */\n getMethodsForTool(e) {\n return Object.assign(\n this.methods,\n {\n i18n: this.Editor.I18nAPI.getMethodsForTool(e)\n }\n );\n }\n}\nclass io extends C {\n /**\n * Available methods\n *\n * @returns {InlineToolbar}\n */\n get methods() {\n return {\n close: () => this.close(),\n open: () => this.open()\n };\n }\n /**\n * Open Inline Toolbar\n */\n open() {\n this.Editor.InlineToolbar.tryToShow();\n }\n /**\n * Close Inline Toolbar\n */\n close() {\n this.Editor.InlineToolbar.close();\n }\n}\nclass no extends C {\n /**\n * Available methods\n *\n * @returns {Listeners}\n */\n get methods() {\n return {\n on: (e, t, o, i) => this.on(e, t, o, i),\n off: (e, t, o, i) => this.off(e, t, o, i),\n offById: (e) => this.offById(e)\n };\n }\n /**\n * Ads a DOM event listener. Return it's id.\n *\n * @param {HTMLElement} element - Element to set handler to\n * @param {string} eventType - event type\n * @param {() => void} handler - event handler\n * @param {boolean} useCapture - capture event or not\n */\n on(e, t, o, i) {\n return this.listeners.on(e, t, o, i);\n }\n /**\n * Removes DOM listener from element\n *\n * @param {Element} element - Element to remove handler from\n * @param eventType - event type\n * @param handler - event handler\n * @param {boolean} useCapture - capture event or not\n */\n off(e, t, o, i) {\n this.listeners.off(e, t, o, i);\n }\n /**\n * Removes DOM listener by the listener id\n *\n * @param id - id of the listener to remove\n */\n offById(e) {\n this.listeners.offById(e);\n }\n}\nvar Le = {}, so = {\n get exports() {\n return Le;\n },\n set exports(s) {\n Le = s;\n }\n};\n(function(s, e) {\n (function(t, o) {\n s.exports = o();\n })(window, function() {\n return function(t) {\n var o = {};\n function i(n) {\n if (o[n])\n return o[n].exports;\n var r = o[n] = { i: n, l: !1, exports: {} };\n return t[n].call(r.exports, r, r.exports, i), r.l = !0, r.exports;\n }\n return i.m = t, i.c = o, i.d = function(n, r, a) {\n i.o(n, r) || Object.defineProperty(n, r, { enumerable: !0, get: a });\n }, i.r = function(n) {\n typeof Symbol < \"u\" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(n, \"__esModule\", { value: !0 });\n }, i.t = function(n, r) {\n if (1 & r && (n = i(n)), 8 & r || 4 & r && typeof n == \"object\" && n && n.__esModule)\n return n;\n var a = /* @__PURE__ */ Object.create(null);\n if (i.r(a), Object.defineProperty(a, \"default\", { enumerable: !0, value: n }), 2 & r && typeof n != \"string\")\n for (var l in n)\n i.d(a, l, function(c) {\n return n[c];\n }.bind(null, l));\n return a;\n }, i.n = function(n) {\n var r = n && n.__esModule ? function() {\n return n.default;\n } : function() {\n return n;\n };\n return i.d(r, \"a\", r), r;\n }, i.o = function(n, r) {\n return Object.prototype.hasOwnProperty.call(n, r);\n }, i.p = \"/\", i(i.s = 0);\n }([function(t, o, i) {\n i(1), /*!\n * Codex JavaScript Notification module\n * https://github.com/codex-team/js-notifier\n */\n t.exports = function() {\n var n = i(6), r = \"cdx-notify--bounce-in\", a = null;\n return { show: function(l) {\n if (l.message) {\n (function() {\n if (a)\n return !0;\n a = n.getWrapper(), document.body.appendChild(a);\n })();\n var c = null, u = l.time || 8e3;\n switch (l.type) {\n case \"confirm\":\n c = n.confirm(l);\n break;\n case \"prompt\":\n c = n.prompt(l);\n break;\n default:\n c = n.alert(l), window.setTimeout(function() {\n c.remove();\n }, u);\n }\n a.appendChild(c), c.classList.add(r);\n }\n } };\n }();\n }, function(t, o, i) {\n var n = i(2);\n typeof n == \"string\" && (n = [[t.i, n, \"\"]]);\n var r = { hmr: !0, transform: void 0, insertInto: void 0 };\n i(4)(n, r), n.locals && (t.exports = n.locals);\n }, function(t, o, i) {\n (t.exports = i(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}`, \"\"]);\n }, function(t, o) {\n t.exports = function(i) {\n var n = [];\n return n.toString = function() {\n return this.map(function(r) {\n var a = function(l, c) {\n var u = l[1] || \"\", h = l[3];\n if (!h)\n return u;\n if (c && typeof btoa == \"function\") {\n var f = (p = h, \"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,\" + btoa(unescape(encodeURIComponent(JSON.stringify(p)))) + \" */\"), k = h.sources.map(function(v) {\n return \"/*# sourceURL=\" + h.sourceRoot + v + \" */\";\n });\n return [u].concat(k).concat([f]).join(`\n`);\n }\n var p;\n return [u].join(`\n`);\n }(r, i);\n return r[2] ? \"@media \" + r[2] + \"{\" + a + \"}\" : a;\n }).join(\"\");\n }, n.i = function(r, a) {\n typeof r == \"string\" && (r = [[null, r, \"\"]]);\n for (var l = {}, c = 0; c < this.length; c++) {\n var u = this[c][0];\n typeof u == \"number\" && (l[u] = !0);\n }\n for (c = 0; c < r.length; c++) {\n var h = r[c];\n typeof h[0] == \"number\" && l[h[0]] || (a && !h[2] ? h[2] = a : a && (h[2] = \"(\" + h[2] + \") and (\" + a + \")\"), n.push(h));\n }\n }, n;\n };\n }, function(t, o, i) {\n var n, r, a = {}, l = (n = function() {\n return window && document && document.all && !window.atob;\n }, function() {\n return r === void 0 && (r = n.apply(this, arguments)), r;\n }), c = function(b) {\n var g = {};\n return function(E) {\n if (typeof E == \"function\")\n return E();\n if (g[E] === void 0) {\n var T = function(O) {\n return document.querySelector(O);\n }.call(this, E);\n if (window.HTMLIFrameElement && T instanceof window.HTMLIFrameElement)\n try {\n T = T.contentDocument.head;\n } catch {\n T = null;\n }\n g[E] = T;\n }\n return g[E];\n };\n }(), u = null, h = 0, f = [], k = i(5);\n function p(b, g) {\n for (var E = 0; E < b.length; E++) {\n var T = b[E], O = a[T.id];\n if (O) {\n O.refs++;\n for (var S = 0; S < O.parts.length; S++)\n O.parts[S](T.parts[S]);\n for (; S < T.parts.length; S++)\n O.parts.push(x(T.parts[S], g));\n } else {\n var H = [];\n for (S = 0; S < T.parts.length; S++)\n H.push(x(T.parts[S], g));\n a[T.id] = { id: T.id, refs: 1, parts: H };\n }\n }\n }\n function v(b, g) {\n for (var E = [], T = {}, O = 0; O < b.length; O++) {\n var S = b[O], H = g.base ? S[0] + g.base : S[0], M = { css: S[1], media: S[2], sourceMap: S[3] };\n T[H] ? T[H].parts.push(M) : E.push(T[H] = { id: H, parts: [M] });\n }\n return E;\n }\n function A(b, g) {\n var E = c(b.insertInto);\n if (!E)\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.\");\n var T = f[f.length - 1];\n if (b.insertAt === \"top\")\n T ? T.nextSibling ? E.insertBefore(g, T.nextSibling) : E.appendChild(g) : E.insertBefore(g, E.firstChild), f.push(g);\n else if (b.insertAt === \"bottom\")\n E.appendChild(g);\n else {\n if (typeof b.insertAt != \"object\" || !b.insertAt.before)\n throw new Error(`[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n`);\n var O = c(b.insertInto + \" \" + b.insertAt.before);\n E.insertBefore(g, O);\n }\n }\n function N(b) {\n if (b.parentNode === null)\n return !1;\n b.parentNode.removeChild(b);\n var g = f.indexOf(b);\n g >= 0 && f.splice(g, 1);\n }\n function _(b) {\n var g = document.createElement(\"style\");\n return b.attrs.type === void 0 && (b.attrs.type = \"text/css\"), y(g, b.attrs), A(b, g), g;\n }\n function y(b, g) {\n Object.keys(g).forEach(function(E) {\n b.setAttribute(E, g[E]);\n });\n }\n function x(b, g) {\n var E, T, O, S;\n if (g.transform && b.css) {\n if (!(S = g.transform(b.css)))\n return function() {\n };\n b.css = S;\n }\n if (g.singleton) {\n var H = h++;\n E = u || (u = _(g)), T = R.bind(null, E, H, !1), O = R.bind(null, E, H, !0);\n } else\n b.sourceMap && typeof URL == \"function\" && typeof URL.createObjectURL == \"function\" && typeof URL.revokeObjectURL == \"function\" && typeof Blob == \"function\" && typeof btoa == \"function\" ? (E = function(M) {\n var W = document.createElement(\"link\");\n return M.attrs.type === void 0 && (M.attrs.type = \"text/css\"), M.attrs.rel = \"stylesheet\", y(W, M.attrs), A(M, W), W;\n }(g), T = function(M, W, de) {\n var Q = de.css, Ee = de.sourceMap, Mt = W.convertToAbsoluteUrls === void 0 && Ee;\n (W.convertToAbsoluteUrls || Mt) && (Q = k(Q)), Ee && (Q += `\n/*# sourceMappingURL=data:application/json;base64,` + btoa(unescape(encodeURIComponent(JSON.stringify(Ee)))) + \" */\");\n var Lt = new Blob([Q], { type: \"text/css\" }), Ve = M.href;\n M.href = URL.createObjectURL(Lt), Ve && URL.revokeObjectURL(Ve);\n }.bind(null, E, g), O = function() {\n N(E), E.href && URL.revokeObjectURL(E.href);\n }) : (E = _(g), T = function(M, W) {\n var de = W.css, Q = W.media;\n if (Q && M.setAttribute(\"media\", Q), M.styleSheet)\n M.styleSheet.cssText = de;\n else {\n for (; M.firstChild; )\n M.removeChild(M.firstChild);\n M.appendChild(document.createTextNode(de));\n }\n }.bind(null, E), O = function() {\n N(E);\n });\n return T(b), function(M) {\n if (M) {\n if (M.css === b.css && M.media === b.media && M.sourceMap === b.sourceMap)\n return;\n T(b = M);\n } else\n O();\n };\n }\n t.exports = function(b, g) {\n if (typeof DEBUG < \"u\" && DEBUG && typeof document != \"object\")\n throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n (g = g || {}).attrs = typeof g.attrs == \"object\" ? g.attrs : {}, g.singleton || typeof g.singleton == \"boolean\" || (g.singleton = l()), g.insertInto || (g.insertInto = \"head\"), g.insertAt || (g.insertAt = \"bottom\");\n var E = v(b, g);\n return p(E, g), function(T) {\n for (var O = [], S = 0; S < E.length; S++) {\n var H = E[S];\n (M = a[H.id]).refs--, O.push(M);\n }\n for (T && p(v(T, g), g), S = 0; S < O.length; S++) {\n var M;\n if ((M = O[S]).refs === 0) {\n for (var W = 0; W < M.parts.length; W++)\n M.parts[W]();\n delete a[M.id];\n }\n }\n };\n };\n var w, I = (w = [], function(b, g) {\n return w[b] = g, w.filter(Boolean).join(`\n`);\n });\n function R(b, g, E, T) {\n var O = E ? \"\" : T.css;\n if (b.styleSheet)\n b.styleSheet.cssText = I(g, O);\n else {\n var S = document.createTextNode(O), H = b.childNodes;\n H[g] && b.removeChild(H[g]), H.length ? b.insertBefore(S, H[g]) : b.appendChild(S);\n }\n }\n }, function(t, o) {\n t.exports = function(i) {\n var n = typeof window < \"u\" && window.location;\n if (!n)\n throw new Error(\"fixUrls requires window.location\");\n if (!i || typeof i != \"string\")\n return i;\n var r = n.protocol + \"//\" + n.host, a = r + n.pathname.replace(/\\/[^\\/]*$/, \"/\");\n return i.replace(/url\\s*\\(((?:[^)(]|\\((?:[^)(]+|\\([^)(]*\\))*\\))*)\\)/gi, function(l, c) {\n var u, h = c.trim().replace(/^\"(.*)\"$/, function(f, k) {\n return k;\n }).replace(/^'(.*)'$/, function(f, k) {\n return k;\n });\n return /^(#|data:|http:\\/\\/|https:\\/\\/|file:\\/\\/\\/|\\s*$)/i.test(h) ? l : (u = h.indexOf(\"//\") === 0 ? h : h.indexOf(\"/\") === 0 ? r + h : a + h.replace(/^\\.\\//, \"\"), \"url(\" + JSON.stringify(u) + \")\");\n });\n };\n }, function(t, o, i) {\n var n, r, a, l, c, u, h, f, k;\n t.exports = (n = \"cdx-notifies\", r = \"cdx-notify\", a = \"cdx-notify__cross\", l = \"cdx-notify__button--confirm\", c = \"cdx-notify__button--cancel\", u = \"cdx-notify__input\", h = \"cdx-notify__button\", f = \"cdx-notify__btns-wrapper\", { alert: k = function(p) {\n var v = document.createElement(\"DIV\"), A = document.createElement(\"DIV\"), N = p.message, _ = p.style;\n return v.classList.add(r), _ && v.classList.add(r + \"--\" + _), v.innerHTML = N, A.classList.add(a), A.addEventListener(\"click\", v.remove.bind(v)), v.appendChild(A), v;\n }, confirm: function(p) {\n var v = k(p), A = document.createElement(\"div\"), N = document.createElement(\"button\"), _ = document.createElement(\"button\"), y = v.querySelector(\".\" + a), x = p.cancelHandler, w = p.okHandler;\n return A.classList.add(f), N.innerHTML = p.okText || \"Confirm\", _.innerHTML = p.cancelText || \"Cancel\", N.classList.add(h), _.classList.add(h), N.classList.add(l), _.classList.add(c), x && typeof x == \"function\" && (_.addEventListener(\"click\", x), y.addEventListener(\"click\", x)), w && typeof w == \"function\" && N.addEventListener(\"click\", w), N.addEventListener(\"click\", v.remove.bind(v)), _.addEventListener(\"click\", v.remove.bind(v)), A.appendChild(N), A.appendChild(_), v.appendChild(A), v;\n }, prompt: function(p) {\n var v = k(p), A = document.createElement(\"div\"), N = document.createElement(\"button\"), _ = document.createElement(\"input\"), y = v.querySelector(\".\" + a), x = p.cancelHandler, w = p.okHandler;\n return A.classList.add(f), N.innerHTML = p.okText || \"Ok\", N.classList.add(h), N.classList.add(l), _.classList.add(u), p.placeholder && _.setAttribute(\"placeholder\", p.placeholder), p.default && (_.value = p.default), p.inputType && (_.type = p.inputType), x && typeof x == \"function\" && y.addEventListener(\"click\", x), w && typeof w == \"function\" && N.addEventListener(\"click\", function() {\n w(_.value);\n }), N.addEventListener(\"click\", v.remove.bind(v)), A.appendChild(_), A.appendChild(N), v.appendChild(A), v;\n }, getWrapper: function() {\n var p = document.createElement(\"DIV\");\n return p.classList.add(n), p;\n } });\n }]);\n });\n})(so);\nconst ro = /* @__PURE__ */ xe(Le);\nclass ao {\n /**\n * Show web notification\n *\n * @param {NotifierOptions | ConfirmNotifierOptions | PromptNotifierOptions} options - notification options\n */\n show(e) {\n ro.show(e);\n }\n}\nclass lo extends C {\n /**\n * @param moduleConfiguration - Module Configuration\n * @param moduleConfiguration.config - Editor's config\n * @param moduleConfiguration.eventsDispatcher - Editor's event dispatcher\n */\n constructor({ config: e, eventsDispatcher: t }) {\n super({\n config: e,\n eventsDispatcher: t\n }), this.notifier = new ao();\n }\n /**\n * Available methods\n */\n get methods() {\n return {\n show: (e) => this.show(e)\n };\n }\n /**\n * Show notification\n *\n * @param {NotifierOptions} options - message option\n */\n show(e) {\n return this.notifier.show(e);\n }\n}\nclass co extends C {\n /**\n * Available methods\n */\n get methods() {\n const e = () => this.isEnabled;\n return {\n toggle: (t) => this.toggle(t),\n get isEnabled() {\n return e();\n }\n };\n }\n /**\n * Set or toggle read-only state\n *\n * @param {boolean|undefined} state - set or toggle state\n * @returns {boolean} current value\n */\n toggle(e) {\n return this.Editor.ReadOnly.toggle(e);\n }\n /**\n * Returns current read-only state\n */\n get isEnabled() {\n return this.Editor.ReadOnly.isEnabled;\n }\n}\nvar Oe = {}, ho = {\n get exports() {\n return Oe;\n },\n set exports(s) {\n Oe = s;\n }\n};\n(function(s, e) {\n (function(t, o) {\n s.exports = o();\n })(Ot, function() {\n function t(h) {\n var f = h.tags, k = Object.keys(f), p = k.map(function(v) {\n return typeof f[v];\n }).every(function(v) {\n return v === \"object\" || v === \"boolean\" || v === \"function\";\n });\n if (!p)\n throw new Error(\"The configuration was invalid\");\n this.config = h;\n }\n var o = [\"P\", \"LI\", \"TD\", \"TH\", \"DIV\", \"H1\", \"H2\", \"H3\", \"H4\", \"H5\", \"H6\", \"PRE\"];\n function i(h) {\n return o.indexOf(h.nodeName) !== -1;\n }\n var n = [\"A\", \"B\", \"STRONG\", \"I\", \"EM\", \"SUB\", \"SUP\", \"U\", \"STRIKE\"];\n function r(h) {\n return n.indexOf(h.nodeName) !== -1;\n }\n t.prototype.clean = function(h) {\n const f = document.implementation.createHTMLDocument(), k = f.createElement(\"div\");\n return k.innerHTML = h, this._sanitize(f, k), k.innerHTML;\n }, t.prototype._sanitize = function(h, f) {\n var k = a(h, f), p = k.firstChild();\n if (p)\n do {\n if (p.nodeType === Node.TEXT_NODE)\n if (p.data.trim() === \"\" && (p.previousElementSibling && i(p.previousElementSibling) || p.nextElementSibling && i(p.nextElementSibling))) {\n f.removeChild(p), this._sanitize(h, f);\n break;\n } else\n continue;\n if (p.nodeType === Node.COMMENT_NODE) {\n f.removeChild(p), this._sanitize(h, f);\n break;\n }\n var v = r(p), A;\n v && (A = Array.prototype.some.call(p.childNodes, i));\n var N = !!f.parentNode, _ = i(f) && i(p) && N, y = p.nodeName.toLowerCase(), x = l(this.config, y, p), w = v && A;\n if (w || c(p, x) || !this.config.keepNestedBlockElements && _) {\n if (!(p.nodeName === \"SCRIPT\" || p.nodeName === \"STYLE\"))\n for (; p.childNodes.length > 0; )\n f.insertBefore(p.childNodes[0], p);\n f.removeChild(p), this._sanitize(h, f);\n break;\n }\n for (var I = 0; I < p.attributes.length; I += 1) {\n var R = p.attributes[I];\n u(R, x, p) && (p.removeAttribute(R.name), I = I - 1);\n }\n this._sanitize(h, p);\n } while (p = k.nextSibling());\n };\n function a(h, f) {\n return h.createTreeWalker(\n f,\n NodeFilter.SHOW_TEXT | NodeFilter.SHOW_ELEMENT | NodeFilter.SHOW_COMMENT,\n null,\n !1\n );\n }\n function l(h, f, k) {\n return typeof h.tags[f] == \"function\" ? h.tags[f](k) : h.tags[f];\n }\n function c(h, f) {\n return typeof f > \"u\" ? !0 : typeof f == \"boolean\" ? !f : !1;\n }\n function u(h, f, k) {\n var p = h.name.toLowerCase();\n return f === !0 ? !1 : typeof f[p] == \"function\" ? !f[p](h.value, k) : typeof f[p] > \"u\" || f[p] === !1 ? !0 : typeof f[p] == \"string\" ? f[p] !== h.value : !1;\n }\n return t;\n });\n})(ho);\nconst uo = Oe;\nfunction ut(s, e) {\n return s.map((t) => {\n const o = D(e) ? e(t.tool) : e;\n return V(o) || (t.data = Fe(t.data, o)), t;\n });\n}\nfunction Z(s, e = {}) {\n const t = {\n tags: e\n };\n return new uo(t).clean(s);\n}\nfunction Fe(s, e) {\n return Array.isArray(s) ? po(s, e) : z(s) ? fo(s, e) : J(s) ? go(s, e) : s;\n}\nfunction po(s, e) {\n return s.map((t) => Fe(t, e));\n}\nfunction fo(s, e) {\n const t = {};\n for (const o in s) {\n if (!Object.prototype.hasOwnProperty.call(s, o))\n continue;\n const i = s[o], n = bo(e[o]) ? e[o] : e;\n t[o] = Fe(i, n);\n }\n return t;\n}\nfunction go(s, e) {\n return z(e) ? Z(s, e) : e === !1 ? Z(s, {}) : s;\n}\nfunction bo(s) {\n return z(s) || Rt(s) || D(s);\n}\nclass mo extends C {\n /**\n * Available methods\n *\n * @returns {SanitizerConfig}\n */\n get methods() {\n return {\n clean: (e, t) => this.clean(e, t)\n };\n }\n /**\n * Perform sanitizing of a string\n *\n * @param {string} taintString - what to sanitize\n * @param {SanitizerConfig} config - sanitizer config\n * @returns {string}\n */\n clean(e, t) {\n return Z(e, t);\n }\n}\nclass ko extends C {\n /**\n * Available methods\n *\n * @returns {Saver}\n */\n get methods() {\n return {\n save: () => this.save()\n };\n }\n /**\n * Return Editor's data\n *\n * @returns {OutputData}\n */\n save() {\n const e = \"Editor's content can not be saved in read-only mode\";\n return this.Editor.ReadOnly.isEnabled ? (K(e, \"warn\"), Promise.reject(new Error(e))) : this.Editor.Saver.save();\n }\n}\nclass vo extends C {\n /**\n * Available methods\n *\n * @returns {SelectionAPIInterface}\n */\n get methods() {\n return {\n findParentTag: (e, t) => this.findParentTag(e, t),\n expandToTag: (e) => this.expandToTag(e)\n };\n }\n /**\n * Looks ahead from selection and find passed tag with class name\n *\n * @param {string} tagName - tag to find\n * @param {string} className - tag's class name\n * @returns {HTMLElement|null}\n */\n findParentTag(e, t) {\n return new m().findParentTag(e, t);\n }\n /**\n * Expand selection to passed tag\n *\n * @param {HTMLElement} node - tag that should contain selection\n */\n expandToTag(e) {\n new m().expandToTag(e);\n }\n}\nclass xo extends C {\n /**\n * Exported classes\n */\n get classes() {\n return {\n /**\n * Base Block styles\n */\n block: \"cdx-block\",\n /**\n * Inline Tools styles\n */\n inlineToolButton: \"ce-inline-tool\",\n inlineToolButtonActive: \"ce-inline-tool--active\",\n /**\n * UI elements\n */\n input: \"cdx-input\",\n loader: \"cdx-loader\",\n button: \"cdx-button\",\n /**\n * Settings styles\n */\n settingsButton: \"cdx-settings-button\",\n settingsButtonActive: \"cdx-settings-button--active\"\n };\n }\n}\nclass wo extends C {\n /**\n * Available methods\n *\n * @returns {Toolbar}\n */\n get methods() {\n return {\n close: () => this.close(),\n open: () => this.open(),\n toggleBlockSettings: (e) => this.toggleBlockSettings(e),\n toggleToolbox: (e) => this.toggleToolbox(e)\n };\n }\n /**\n * Open toolbar\n */\n open() {\n this.Editor.Toolbar.moveAndOpen();\n }\n /**\n * Close toolbar and all included elements\n */\n close() {\n this.Editor.Toolbar.close();\n }\n /**\n * Toggles Block Setting of the current block\n *\n * @param {boolean} openingState — opening state of Block Setting\n */\n toggleBlockSettings(e) {\n if (this.Editor.BlockManager.currentBlockIndex === -1) {\n K(\"Could't toggle the Toolbar because there is no block selected \", \"warn\");\n return;\n }\n e ?? !this.Editor.BlockSettings.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.BlockSettings.open()) : this.Editor.BlockSettings.close();\n }\n /**\n * Open toolbox\n *\n * @param {boolean} openingState - Opening state of toolbox\n */\n toggleToolbox(e) {\n if (this.Editor.BlockManager.currentBlockIndex === -1) {\n K(\"Could't toggle the Toolbox because there is no block selected \", \"warn\");\n return;\n }\n e ?? !this.Editor.Toolbar.toolbox.opened ? (this.Editor.Toolbar.moveAndOpen(), this.Editor.Toolbar.toolbox.open()) : this.Editor.Toolbar.toolbox.close();\n }\n}\nvar Ae = {}, yo = {\n get exports() {\n return Ae;\n },\n set exports(s) {\n Ae = s;\n }\n};\n/*!\n * CodeX.Tooltips\n * \n * @version 1.0.5\n * \n * @licence MIT\n * @author CodeX \n * \n * \n */\n(function(s, e) {\n (function(t, o) {\n s.exports = o();\n })(window, function() {\n return function(t) {\n var o = {};\n function i(n) {\n if (o[n])\n return o[n].exports;\n var r = o[n] = { i: n, l: !1, exports: {} };\n return t[n].call(r.exports, r, r.exports, i), r.l = !0, r.exports;\n }\n return i.m = t, i.c = o, i.d = function(n, r, a) {\n i.o(n, r) || Object.defineProperty(n, r, { enumerable: !0, get: a });\n }, i.r = function(n) {\n typeof Symbol < \"u\" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(n, \"__esModule\", { value: !0 });\n }, i.t = function(n, r) {\n if (1 & r && (n = i(n)), 8 & r || 4 & r && typeof n == \"object\" && n && n.__esModule)\n return n;\n var a = /* @__PURE__ */ Object.create(null);\n if (i.r(a), Object.defineProperty(a, \"default\", { enumerable: !0, value: n }), 2 & r && typeof n != \"string\")\n for (var l in n)\n i.d(a, l, function(c) {\n return n[c];\n }.bind(null, l));\n return a;\n }, i.n = function(n) {\n var r = n && n.__esModule ? function() {\n return n.default;\n } : function() {\n return n;\n };\n return i.d(r, \"a\", r), r;\n }, i.o = function(n, r) {\n return Object.prototype.hasOwnProperty.call(n, r);\n }, i.p = \"\", i(i.s = 0);\n }([function(t, o, i) {\n t.exports = i(1);\n }, function(t, o, i) {\n i.r(o), i.d(o, \"default\", function() {\n return n;\n });\n class n {\n constructor() {\n this.nodes = { wrapper: null, content: null }, this.showed = !1, this.offsetTop = 10, this.offsetLeft = 10, this.offsetRight = 10, this.hidingDelay = 0, this.handleWindowScroll = () => {\n this.showed && this.hide(!0);\n }, this.loadStyles(), this.prepare(), window.addEventListener(\"scroll\", this.handleWindowScroll, { passive: !0 });\n }\n get CSS() {\n return { tooltip: \"ct\", tooltipContent: \"ct__content\", tooltipShown: \"ct--shown\", placement: { left: \"ct--left\", bottom: \"ct--bottom\", right: \"ct--right\", top: \"ct--top\" } };\n }\n show(a, l, c) {\n this.nodes.wrapper || this.prepare(), this.hidingTimeout && clearTimeout(this.hidingTimeout);\n const u = Object.assign({ placement: \"bottom\", marginTop: 0, marginLeft: 0, marginRight: 0, marginBottom: 0, delay: 70, hidingDelay: 0 }, c);\n if (u.hidingDelay && (this.hidingDelay = u.hidingDelay), this.nodes.content.innerHTML = \"\", typeof l == \"string\")\n this.nodes.content.appendChild(document.createTextNode(l));\n else {\n if (!(l instanceof Node))\n throw Error(\"[CodeX Tooltip] Wrong type of «content» passed. It should be an instance of Node or String. But \" + typeof l + \" given.\");\n this.nodes.content.appendChild(l);\n }\n switch (this.nodes.wrapper.classList.remove(...Object.values(this.CSS.placement)), u.placement) {\n case \"top\":\n this.placeTop(a, u);\n break;\n case \"left\":\n this.placeLeft(a, u);\n break;\n case \"right\":\n this.placeRight(a, u);\n break;\n case \"bottom\":\n default:\n this.placeBottom(a, u);\n }\n u && u.delay ? this.showingTimeout = setTimeout(() => {\n this.nodes.wrapper.classList.add(this.CSS.tooltipShown), this.showed = !0;\n }, u.delay) : (this.nodes.wrapper.classList.add(this.CSS.tooltipShown), this.showed = !0);\n }\n hide(a = !1) {\n if (this.hidingDelay && !a)\n return this.hidingTimeout && clearTimeout(this.hidingTimeout), void (this.hidingTimeout = setTimeout(() => {\n this.hide(!0);\n }, this.hidingDelay));\n this.nodes.wrapper.classList.remove(this.CSS.tooltipShown), this.showed = !1, this.showingTimeout && clearTimeout(this.showingTimeout);\n }\n onHover(a, l, c) {\n a.addEventListener(\"mouseenter\", () => {\n this.show(a, l, c);\n }), a.addEventListener(\"mouseleave\", () => {\n this.hide();\n });\n }\n destroy() {\n this.nodes.wrapper.remove(), window.removeEventListener(\"scroll\", this.handleWindowScroll);\n }\n prepare() {\n 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);\n }\n loadStyles() {\n const a = \"codex-tooltips-style\";\n if (document.getElementById(a))\n return;\n const l = i(2), c = this.make(\"style\", null, { textContent: l.toString(), id: a });\n this.prepend(document.head, c);\n }\n placeBottom(a, l) {\n const c = a.getBoundingClientRect(), u = c.left + a.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, h = c.bottom + window.pageYOffset + this.offsetTop + l.marginTop;\n this.applyPlacement(\"bottom\", u, h);\n }\n placeTop(a, l) {\n const c = a.getBoundingClientRect(), u = c.left + a.clientWidth / 2 - this.nodes.wrapper.offsetWidth / 2, h = c.top + window.pageYOffset - this.nodes.wrapper.clientHeight - this.offsetTop;\n this.applyPlacement(\"top\", u, h);\n }\n placeLeft(a, l) {\n const c = a.getBoundingClientRect(), u = c.left - this.nodes.wrapper.offsetWidth - this.offsetLeft - l.marginLeft, h = c.top + window.pageYOffset + a.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;\n this.applyPlacement(\"left\", u, h);\n }\n placeRight(a, l) {\n const c = a.getBoundingClientRect(), u = c.right + this.offsetRight + l.marginRight, h = c.top + window.pageYOffset + a.clientHeight / 2 - this.nodes.wrapper.offsetHeight / 2;\n this.applyPlacement(\"right\", u, h);\n }\n applyPlacement(a, l, c) {\n this.nodes.wrapper.classList.add(this.CSS.placement[a]), this.nodes.wrapper.style.left = l + \"px\", this.nodes.wrapper.style.top = c + \"px\";\n }\n make(a, l = null, c = {}) {\n const u = document.createElement(a);\n Array.isArray(l) ? u.classList.add(...l) : l && u.classList.add(l);\n for (const h in c)\n c.hasOwnProperty(h) && (u[h] = c[h]);\n return u;\n }\n append(a, l) {\n Array.isArray(l) ? l.forEach((c) => a.appendChild(c)) : a.appendChild(l);\n }\n prepend(a, l) {\n Array.isArray(l) ? (l = l.reverse()).forEach((c) => a.prepend(c)) : a.prepend(l);\n }\n }\n }, function(t, o) {\n 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;z-index:-1;border-radius:4px}@supports(-webkit-mask-box-image:url(\"\")){.ct:before{border-radius:0;-webkit-mask-box-image:url('data:image/svg+xml;charset=utf-8,') 48% 41% 37.9% 53.3%}}@media (--mobile){.ct{display:none}}.ct__content{padding:6px 10px;color:#cdd1e0;font-size:12px;text-align:center;letter-spacing:.02em;line-height:1em}.ct:after{content:\"\";width:8px;height:8px;position:absolute;background-color:#1d202b;z-index:-1}.ct--bottom{-webkit-transform:translateY(5px);transform:translateY(5px)}.ct--bottom:after{top:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--top{-webkit-transform:translateY(-5px);transform:translateY(-5px)}.ct--top:after{top:auto;bottom:-3px;left:50%;-webkit-transform:translateX(-50%) rotate(-45deg);transform:translateX(-50%) rotate(-45deg)}.ct--left{-webkit-transform:translateX(-5px);transform:translateX(-5px)}.ct--left:after{top:50%;left:auto;right:0;-webkit-transform:translate(41.6%,-50%) rotate(-45deg);transform:translate(41.6%,-50%) rotate(-45deg)}.ct--right{-webkit-transform:translateX(5px);transform:translateX(5px)}.ct--right:after{top:50%;left:0;-webkit-transform:translate(-41.6%,-50%) rotate(-45deg);transform:translate(-41.6%,-50%) rotate(-45deg)}.ct--shown{opacity:1;-webkit-transform:none;transform:none}`;\n }]).default;\n });\n})(yo);\nconst Eo = /* @__PURE__ */ xe(Ae);\nclass He {\n constructor() {\n this.lib = new Eo();\n }\n /**\n * Release the library\n */\n destroy() {\n this.lib.destroy();\n }\n /**\n * Shows tooltip on element with passed HTML content\n *\n * @param {HTMLElement} element - any HTML element in DOM\n * @param content - tooltip's content\n * @param options - showing settings\n */\n show(e, t, o) {\n this.lib.show(e, t, o);\n }\n /**\n * Hides tooltip\n *\n * @param skipHidingDelay — pass true to immediately hide the tooltip\n */\n hide(e = !1) {\n this.lib.hide(e);\n }\n /**\n * Binds 'mouseenter' and 'mouseleave' events that shows/hides the Tooltip\n *\n * @param {HTMLElement} element - any HTML element in DOM\n * @param content - tooltip's content\n * @param options - showing settings\n */\n onHover(e, t, o) {\n this.lib.onHover(e, t, o);\n }\n}\nclass Bo extends C {\n /**\n * @class\n * @param moduleConfiguration - Module Configuration\n * @param moduleConfiguration.config - Editor's config\n * @param moduleConfiguration.eventsDispatcher - Editor's event dispatcher\n */\n constructor({ config: e, eventsDispatcher: t }) {\n super({\n config: e,\n eventsDispatcher: t\n }), this.tooltip = new He();\n }\n /**\n * Destroy Module\n */\n destroy() {\n this.tooltip.destroy();\n }\n /**\n * Available methods\n */\n get methods() {\n return {\n show: (e, t, o) => this.show(e, t, o),\n hide: () => this.hide(),\n onHover: (e, t, o) => this.onHover(e, t, o)\n };\n }\n /**\n * Method show tooltip on element with passed HTML content\n *\n * @param {HTMLElement} element - element on which tooltip should be shown\n * @param {TooltipContent} content - tooltip content\n * @param {TooltipOptions} options - tooltip options\n */\n show(e, t, o) {\n this.tooltip.show(e, t, o);\n }\n /**\n * Method hides tooltip on HTML page\n */\n hide() {\n this.tooltip.hide();\n }\n /**\n * Decorator for showing Tooltip by mouseenter/mouseleave\n *\n * @param {HTMLElement} element - element on which tooltip should be shown\n * @param {TooltipContent} content - tooltip content\n * @param {TooltipOptions} options - tooltip options\n */\n onHover(e, t, o) {\n this.tooltip.onHover(e, t, o);\n }\n}\nclass To extends C {\n /**\n * Available methods / getters\n */\n get methods() {\n return {\n nodes: this.editorNodes\n /**\n * There can be added some UI methods, like toggleThinMode() etc\n */\n };\n }\n /**\n * Exported classes\n */\n get editorNodes() {\n return {\n /**\n * Top-level editor instance wrapper\n */\n wrapper: this.Editor.UI.nodes.wrapper,\n /**\n * Element that holds all the Blocks\n */\n redactor: this.Editor.UI.nodes.redactor\n };\n }\n}\nfunction pt(s, e) {\n const t = {};\n return Object.entries(s).forEach(([o, i]) => {\n if (z(i)) {\n const n = e ? `${e}.${o}` : o;\n Object.values(i).every((a) => J(a)) ? t[o] = n : t[o] = pt(i, n);\n return;\n }\n t[o] = i;\n }), t;\n}\nconst X = pt(at);\nfunction Co(s, e) {\n const t = {};\n return Object.keys(s).forEach((o) => {\n const i = e[o];\n i !== void 0 ? t[i] = s[o] : t[o] = s[o];\n }), t;\n}\nconst So = '', ft = '', Io = '', Mo = '', Lo = '', Oo = '', Qe = '', Ao = '', _o = '', No = '', Ro = '', Do = '';\nclass P {\n /**\n * Constructs popover item instance\n *\n * @param params - popover item construction params\n */\n constructor(e) {\n this.nodes = {\n root: null,\n icon: null\n }, this.confirmationState = null, this.removeSpecialFocusBehavior = () => {\n this.nodes.root.classList.remove(P.CSS.noFocus);\n }, this.removeSpecialHoverBehavior = () => {\n this.nodes.root.classList.remove(P.CSS.noHover);\n }, this.onErrorAnimationEnd = () => {\n this.nodes.icon.classList.remove(P.CSS.wobbleAnimation), this.nodes.icon.removeEventListener(\"animationend\", this.onErrorAnimationEnd);\n }, this.params = e, this.nodes.root = this.make(e);\n }\n /**\n * True if item is disabled and hence not clickable\n */\n get isDisabled() {\n return this.params.isDisabled;\n }\n /**\n * Exposes popover item toggle parameter\n */\n get toggle() {\n return this.params.toggle;\n }\n /**\n * Item title\n */\n get title() {\n return this.params.title;\n }\n /**\n * True if popover should close once item is activated\n */\n get closeOnActivate() {\n return this.params.closeOnActivate;\n }\n /**\n * True if confirmation state is enabled for popover item\n */\n get isConfirmationStateEnabled() {\n return this.confirmationState !== null;\n }\n /**\n * True if item is focused in keyboard navigation process\n */\n get isFocused() {\n return this.nodes.root.classList.contains(P.CSS.focused);\n }\n /**\n * Popover item CSS classes\n */\n static get CSS() {\n return {\n container: \"ce-popover-item\",\n title: \"ce-popover-item__title\",\n secondaryTitle: \"ce-popover-item__secondary-title\",\n icon: \"ce-popover-item__icon\",\n active: \"ce-popover-item--active\",\n disabled: \"ce-popover-item--disabled\",\n focused: \"ce-popover-item--focused\",\n hidden: \"ce-popover-item--hidden\",\n confirmationState: \"ce-popover-item--confirmation\",\n noHover: \"ce-popover-item--no-hover\",\n noFocus: \"ce-popover-item--no-focus\",\n wobbleAnimation: \"wobble\"\n };\n }\n /**\n * Returns popover item root element\n */\n getElement() {\n return this.nodes.root;\n }\n /**\n * Called on popover item click\n */\n handleClick() {\n if (this.isConfirmationStateEnabled) {\n this.activateOrEnableConfirmationMode(this.confirmationState);\n return;\n }\n this.activateOrEnableConfirmationMode(this.params);\n }\n /**\n * Toggles item active state\n *\n * @param isActive - true if item should strictly should become active\n */\n toggleActive(e) {\n this.nodes.root.classList.toggle(P.CSS.active, e);\n }\n /**\n * Toggles item hidden state\n *\n * @param isHidden - true if item should be hidden\n */\n toggleHidden(e) {\n this.nodes.root.classList.toggle(P.CSS.hidden, e);\n }\n /**\n * Resets popover item to its original state\n */\n reset() {\n this.isConfirmationStateEnabled && this.disableConfirmationMode();\n }\n /**\n * Method called once item becomes focused during keyboard navigation\n */\n onFocus() {\n this.disableSpecialHoverAndFocusBehavior();\n }\n /**\n * Constructs HTML element corresponding to popover item params\n *\n * @param params - item construction params\n */\n make(e) {\n const t = d.make(\"div\", P.CSS.container);\n return e.name && (t.dataset.itemName = e.name), this.nodes.icon = d.make(\"div\", P.CSS.icon, {\n innerHTML: e.icon || Lo\n }), t.appendChild(this.nodes.icon), t.appendChild(d.make(\"div\", P.CSS.title, {\n innerHTML: e.title || \"\"\n })), e.secondaryLabel && t.appendChild(d.make(\"div\", P.CSS.secondaryTitle, {\n textContent: e.secondaryLabel\n })), e.isActive && t.classList.add(P.CSS.active), e.isDisabled && t.classList.add(P.CSS.disabled), t;\n }\n /**\n * Activates confirmation mode for the item.\n *\n * @param newState - new popover item params that should be applied\n */\n enableConfirmationMode(e) {\n const t = {\n ...this.params,\n ...e,\n confirmation: e.confirmation\n }, o = this.make(t);\n this.nodes.root.innerHTML = o.innerHTML, this.nodes.root.classList.add(P.CSS.confirmationState), this.confirmationState = e, this.enableSpecialHoverAndFocusBehavior();\n }\n /**\n * Returns item to its original state\n */\n disableConfirmationMode() {\n const e = this.make(this.params);\n this.nodes.root.innerHTML = e.innerHTML, this.nodes.root.classList.remove(P.CSS.confirmationState), this.confirmationState = null, this.disableSpecialHoverAndFocusBehavior();\n }\n /**\n * Enables special focus and hover behavior for item in confirmation state.\n * This is needed to prevent item from being highlighted as hovered/focused just after click.\n */\n enableSpecialHoverAndFocusBehavior() {\n this.nodes.root.classList.add(P.CSS.noHover), this.nodes.root.classList.add(P.CSS.noFocus), this.nodes.root.addEventListener(\"mouseleave\", this.removeSpecialHoverBehavior, { once: !0 });\n }\n /**\n * Disables special focus and hover behavior\n */\n disableSpecialHoverAndFocusBehavior() {\n this.removeSpecialFocusBehavior(), this.removeSpecialHoverBehavior(), this.nodes.root.removeEventListener(\"mouseleave\", this.removeSpecialHoverBehavior);\n }\n /**\n * Executes item's onActivate callback if the item has no confirmation configured\n *\n * @param item - item to activate or bring to confirmation mode\n */\n activateOrEnableConfirmationMode(e) {\n if (e.confirmation === void 0)\n try {\n e.onActivate(e), this.disableConfirmationMode();\n } catch {\n this.animateError();\n }\n else\n this.enableConfirmationMode(e.confirmation);\n }\n /**\n * Animates item which symbolizes that error occured while executing 'onActivate()' callback\n */\n animateError() {\n this.nodes.icon.classList.contains(P.CSS.wobbleAnimation) || (this.nodes.icon.classList.add(P.CSS.wobbleAnimation), this.nodes.icon.addEventListener(\"animationend\", this.onErrorAnimationEnd));\n }\n}\nconst he = class {\n /**\n * @param {HTMLElement[]} nodeList — the list of iterable HTML-items\n * @param {string} focusedCssClass - user-provided CSS-class that will be set in flipping process\n */\n constructor(s, e) {\n this.cursor = -1, this.items = [], this.items = s || [], this.focusedCssClass = e;\n }\n /**\n * Returns Focused button Node\n *\n * @returns {HTMLElement}\n */\n get currentItem() {\n return this.cursor === -1 ? null : this.items[this.cursor];\n }\n /**\n * Sets cursor to specified position\n *\n * @param cursorPosition - new cursor position\n */\n setCursor(s) {\n s < this.items.length && s >= -1 && (this.dropCursor(), this.cursor = s, this.items[this.cursor].classList.add(this.focusedCssClass));\n }\n /**\n * Sets items. Can be used when iterable items changed dynamically\n *\n * @param {HTMLElement[]} nodeList - nodes to iterate\n */\n setItems(s) {\n this.items = s;\n }\n /**\n * Sets cursor next to the current\n */\n next() {\n this.cursor = this.leafNodesAndReturnIndex(he.directions.RIGHT);\n }\n /**\n * Sets cursor before current\n */\n previous() {\n this.cursor = this.leafNodesAndReturnIndex(he.directions.LEFT);\n }\n /**\n * Sets cursor to the default position and removes CSS-class from previously focused item\n */\n dropCursor() {\n this.cursor !== -1 && (this.items[this.cursor].classList.remove(this.focusedCssClass), this.cursor = -1);\n }\n /**\n * Leafs nodes inside the target list from active element\n *\n * @param {string} direction - leaf direction. Can be 'left' or 'right'\n * @returns {number} index of focused node\n */\n leafNodesAndReturnIndex(s) {\n if (this.items.length === 0)\n return this.cursor;\n let e = this.cursor;\n return e === -1 ? e = s === he.directions.RIGHT ? -1 : 0 : this.items[e].classList.remove(this.focusedCssClass), s === he.directions.RIGHT ? e = (e + 1) % this.items.length : e = (this.items.length + e - 1) % this.items.length, d.canSetCaret(this.items[e]) && re(() => m.setCursor(this.items[e]), 50)(), this.items[e].classList.add(this.focusedCssClass), e;\n }\n};\nlet ne = he;\nne.directions = {\n RIGHT: \"right\",\n LEFT: \"left\"\n};\nclass G {\n /**\n * @param {FlipperOptions} options - different constructing settings\n */\n constructor(e) {\n this.iterator = null, this.activated = !1, this.flipCallbacks = [], this.onKeyDown = (t) => {\n if (this.isEventReadyForHandling(t))\n switch (G.usedKeys.includes(t.keyCode) && t.preventDefault(), t.keyCode) {\n case B.TAB:\n this.handleTabPress(t);\n break;\n case B.LEFT:\n case B.UP:\n this.flipLeft();\n break;\n case B.RIGHT:\n case B.DOWN:\n this.flipRight();\n break;\n case B.ENTER:\n this.handleEnterPress(t);\n break;\n }\n }, this.iterator = new ne(e.items, e.focusedItemClass), this.activateCallback = e.activateCallback, this.allowedKeys = e.allowedKeys || G.usedKeys;\n }\n /**\n * True if flipper is currently activated\n */\n get isActivated() {\n return this.activated;\n }\n /**\n * Array of keys (codes) that is handled by Flipper\n * Used to:\n * - preventDefault only for this keys, not all keydowns (@see constructor)\n * - to skip external behaviours only for these keys, when filler is activated (@see BlockEvents@arrowRightAndDown)\n */\n static get usedKeys() {\n return [\n B.TAB,\n B.LEFT,\n B.RIGHT,\n B.ENTER,\n B.UP,\n B.DOWN\n ];\n }\n /**\n * Active tab/arrows handling by flipper\n *\n * @param items - Some modules (like, InlineToolbar, BlockSettings) might refresh buttons dynamically\n * @param cursorPosition - index of the item that should be focused once flipper is activated\n */\n activate(e, t) {\n this.activated = !0, e && this.iterator.setItems(e), t !== void 0 && this.iterator.setCursor(t), document.addEventListener(\"keydown\", this.onKeyDown, !0);\n }\n /**\n * Disable tab/arrows handling by flipper\n */\n deactivate() {\n this.activated = !1, this.dropCursor(), document.removeEventListener(\"keydown\", this.onKeyDown);\n }\n /**\n * Focus first item\n */\n focusFirst() {\n this.dropCursor(), this.flipRight();\n }\n /**\n * Focuses previous flipper iterator item\n */\n flipLeft() {\n this.iterator.previous(), this.flipCallback();\n }\n /**\n * Focuses next flipper iterator item\n */\n flipRight() {\n this.iterator.next(), this.flipCallback();\n }\n /**\n * Return true if some button is focused\n */\n hasFocus() {\n return !!this.iterator.currentItem;\n }\n /**\n * Registeres function that should be executed on each navigation action\n *\n * @param cb - function to execute\n */\n onFlip(e) {\n this.flipCallbacks.push(e);\n }\n /**\n * Unregisteres function that is executed on each navigation action\n *\n * @param cb - function to stop executing\n */\n removeOnFlip(e) {\n this.flipCallbacks = this.flipCallbacks.filter((t) => t !== e);\n }\n /**\n * Drops flipper's iterator cursor\n *\n * @see DomIterator#dropCursor\n */\n dropCursor() {\n this.iterator.dropCursor();\n }\n /**\n * This function is fired before handling flipper keycodes\n * The result of this function defines if it is need to be handled or not\n *\n * @param {KeyboardEvent} event - keydown keyboard event\n * @returns {boolean}\n */\n isEventReadyForHandling(e) {\n return this.activated && this.allowedKeys.includes(e.keyCode);\n }\n /**\n * When flipper is activated tab press will leaf the items\n *\n * @param {KeyboardEvent} event - tab keydown event\n */\n handleTabPress(e) {\n switch (e.shiftKey ? ne.directions.LEFT : ne.directions.RIGHT) {\n case ne.directions.RIGHT:\n this.flipRight();\n break;\n case ne.directions.LEFT:\n this.flipLeft();\n break;\n }\n }\n /**\n * Enter press will click current item if flipper is activated\n *\n * @param {KeyboardEvent} event - enter keydown event\n */\n handleEnterPress(e) {\n this.activated && (this.iterator.currentItem && (e.stopPropagation(), e.preventDefault(), this.iterator.currentItem.click()), D(this.activateCallback) && this.activateCallback(this.iterator.currentItem));\n }\n /**\n * Fired after flipping in any direction\n */\n flipCallback() {\n this.iterator.currentItem && this.iterator.currentItem.scrollIntoViewIfNeeded(), this.flipCallbacks.forEach((e) => e());\n }\n}\nclass pe {\n /**\n * Styles\n */\n static get CSS() {\n return {\n wrapper: \"cdx-search-field\",\n icon: \"cdx-search-field__icon\",\n input: \"cdx-search-field__input\"\n };\n }\n /**\n * @param options - available config\n * @param options.items - searchable items list\n * @param options.onSearch - search callback\n * @param options.placeholder - input placeholder\n */\n constructor({ items: e, onSearch: t, placeholder: o }) {\n this.listeners = new De(), this.items = e, this.onSearch = t, this.render(o);\n }\n /**\n * Returns search field element\n */\n getElement() {\n return this.wrapper;\n }\n /**\n * Sets focus to the input\n */\n focus() {\n this.input.focus();\n }\n /**\n * Clears search query and results\n */\n clear() {\n this.input.value = \"\", this.searchQuery = \"\", this.onSearch(\"\", this.foundItems);\n }\n /**\n * Clears memory\n */\n destroy() {\n this.listeners.removeAll();\n }\n /**\n * Creates the search field\n *\n * @param placeholder - input placeholder\n */\n render(e) {\n this.wrapper = d.make(\"div\", pe.CSS.wrapper);\n const t = d.make(\"div\", pe.CSS.icon, {\n innerHTML: No\n });\n this.input = d.make(\"input\", pe.CSS.input, {\n placeholder: e\n }), this.wrapper.appendChild(t), this.wrapper.appendChild(this.input), this.listeners.on(this.input, \"input\", () => {\n this.searchQuery = this.input.value, this.onSearch(this.searchQuery, this.foundItems);\n });\n }\n /**\n * Returns list of found items for the current search query\n */\n get foundItems() {\n return this.items.filter((e) => this.checkItem(e));\n }\n /**\n * Contains logic for checking whether passed item conforms the search query\n *\n * @param item - item to be checked\n */\n checkItem(e) {\n var i;\n const t = ((i = e.title) == null ? void 0 : i.toLowerCase()) || \"\", o = this.searchQuery.toLowerCase();\n return t.includes(o);\n }\n}\nconst ue = class {\n /**\n * Locks body element scroll\n */\n lock() {\n Ge ? this.lockHard() : document.body.classList.add(ue.CSS.scrollLocked);\n }\n /**\n * Unlocks body element scroll\n */\n unlock() {\n Ge ? this.unlockHard() : document.body.classList.remove(ue.CSS.scrollLocked);\n }\n /**\n * Locks scroll in a hard way (via setting fixed position to body element)\n */\n lockHard() {\n this.scrollPosition = window.pageYOffset, document.documentElement.style.setProperty(\n \"--window-scroll-offset\",\n `${this.scrollPosition}px`\n ), document.body.classList.add(ue.CSS.scrollLockedHard);\n }\n /**\n * Unlocks hard scroll lock\n */\n unlockHard() {\n document.body.classList.remove(ue.CSS.scrollLockedHard), this.scrollPosition !== null && window.scrollTo(0, this.scrollPosition), this.scrollPosition = null;\n }\n};\nlet gt = ue;\ngt.CSS = {\n scrollLocked: \"ce-scroll-locked\",\n scrollLockedHard: \"ce-scroll-locked--hard\"\n};\nvar Po = Object.defineProperty, Fo = Object.getOwnPropertyDescriptor, Ho = (s, e, t, o) => {\n for (var i = o > 1 ? void 0 : o ? Fo(e, t) : e, n = s.length - 1, r; n >= 0; n--)\n (r = s[n]) && (i = (o ? r(e, t, i) : r(i)) || i);\n return o && i && Po(e, t, i), i;\n}, ge = /* @__PURE__ */ ((s) => (s.Close = \"close\", s))(ge || {});\nconst j = class extends we {\n /**\n * Constructs the instance\n *\n * @param params - popover construction params\n */\n constructor(s) {\n super(), this.scopeElement = document.body, this.listeners = new De(), this.scrollLocker = new gt(), this.nodes = {\n wrapper: null,\n popover: null,\n nothingFoundMessage: null,\n customContent: null,\n items: null,\n overlay: null\n }, this.messages = {\n nothingFound: \"Nothing found\",\n search: \"Search\"\n }, this.onFlip = () => {\n this.items.find((t) => t.isFocused).onFocus();\n }, this.items = s.items.map((e) => new P(e)), s.scopeElement !== void 0 && (this.scopeElement = s.scopeElement), s.messages && (this.messages = {\n ...this.messages,\n ...s.messages\n }), s.customContentFlippableItems && (this.customContentFlippableItems = s.customContentFlippableItems), this.make(), s.customContent && this.addCustomContent(s.customContent), s.searchable && this.addSearch(), this.initializeFlipper();\n }\n /**\n * Popover CSS classes\n */\n static get CSS() {\n return {\n popover: \"ce-popover\",\n popoverOpenTop: \"ce-popover--open-top\",\n popoverOpened: \"ce-popover--opened\",\n search: \"ce-popover__search\",\n nothingFoundMessage: \"ce-popover__nothing-found-message\",\n nothingFoundMessageDisplayed: \"ce-popover__nothing-found-message--displayed\",\n customContent: \"ce-popover__custom-content\",\n customContentHidden: \"ce-popover__custom-content--hidden\",\n items: \"ce-popover__items\",\n overlay: \"ce-popover__overlay\",\n overlayHidden: \"ce-popover__overlay--hidden\"\n };\n }\n /**\n * Returns HTML element corresponding to the popover\n */\n getElement() {\n return this.nodes.wrapper;\n }\n /**\n * Returns true if some item inside popover is focused\n */\n hasFocus() {\n return this.flipper.hasFocus();\n }\n /**\n * Open popover\n */\n show() {\n this.shouldOpenBottom || (this.nodes.popover.style.setProperty(\"--popover-height\", this.height + \"px\"), this.nodes.popover.classList.add(j.CSS.popoverOpenTop)), this.nodes.overlay.classList.remove(j.CSS.overlayHidden), this.nodes.popover.classList.add(j.CSS.popoverOpened), this.flipper.activate(this.flippableElements), this.search !== void 0 && setTimeout(() => {\n this.search.focus();\n }, 100), te() && this.scrollLocker.lock();\n }\n /**\n * Closes popover\n */\n hide() {\n this.nodes.popover.classList.remove(j.CSS.popoverOpened), this.nodes.popover.classList.remove(j.CSS.popoverOpenTop), this.nodes.overlay.classList.add(j.CSS.overlayHidden), this.flipper.deactivate(), this.items.forEach((s) => s.reset()), this.search !== void 0 && this.search.clear(), te() && this.scrollLocker.unlock(), this.emit(\n \"close\"\n /* Close */\n );\n }\n /**\n * Clears memory\n */\n destroy() {\n this.flipper.deactivate(), this.listeners.removeAll(), te() && this.scrollLocker.unlock();\n }\n /**\n * Constructs HTML element corresponding to popover\n */\n make() {\n this.nodes.popover = d.make(\"div\", [j.CSS.popover]), this.nodes.nothingFoundMessage = d.make(\"div\", [j.CSS.nothingFoundMessage], {\n textContent: this.messages.nothingFound\n }), this.nodes.popover.appendChild(this.nodes.nothingFoundMessage), this.nodes.items = d.make(\"div\", [j.CSS.items]), this.items.forEach((s) => {\n this.nodes.items.appendChild(s.getElement());\n }), this.nodes.popover.appendChild(this.nodes.items), this.listeners.on(this.nodes.popover, \"click\", (s) => {\n const e = this.getTargetItem(s);\n e !== void 0 && this.handleItemClick(e);\n }), this.nodes.wrapper = d.make(\"div\"), this.nodes.overlay = d.make(\"div\", [j.CSS.overlay, j.CSS.overlayHidden]), this.listeners.on(this.nodes.overlay, \"click\", () => {\n this.hide();\n }), this.nodes.wrapper.appendChild(this.nodes.overlay), this.nodes.wrapper.appendChild(this.nodes.popover);\n }\n /**\n * Adds search to the popover\n */\n addSearch() {\n this.search = new pe({\n items: this.items,\n placeholder: this.messages.search,\n onSearch: (e, t) => {\n this.items.forEach((i) => {\n const n = !t.includes(i);\n i.toggleHidden(n);\n }), this.toggleNothingFoundMessage(t.length === 0), this.toggleCustomContent(e !== \"\");\n const o = e === \"\" ? this.flippableElements : t.map((i) => i.getElement());\n this.flipper.isActivated && (this.flipper.deactivate(), this.flipper.activate(o));\n }\n });\n const s = this.search.getElement();\n s.classList.add(j.CSS.search), this.nodes.popover.insertBefore(s, this.nodes.popover.firstChild);\n }\n /**\n * Adds custom html content to the popover\n *\n * @param content - html content to append\n */\n addCustomContent(s) {\n this.nodes.customContent = s, this.nodes.customContent.classList.add(j.CSS.customContent), this.nodes.popover.insertBefore(s, this.nodes.popover.firstChild);\n }\n /**\n * Retrieves popover item that is the target of the specified event\n *\n * @param event - event to retrieve popover item from\n */\n getTargetItem(s) {\n return this.items.find((e) => s.composedPath().includes(e.getElement()));\n }\n /**\n * Handles item clicks\n *\n * @param item - item to handle click of\n */\n handleItemClick(s) {\n s.isDisabled || (this.items.filter((e) => e !== s).forEach((e) => e.reset()), s.handleClick(), this.toggleItemActivenessIfNeeded(s), s.closeOnActivate && this.hide());\n }\n /**\n * Creates Flipper instance which allows to navigate between popover items via keyboard\n */\n initializeFlipper() {\n this.flipper = new G({\n items: this.flippableElements,\n focusedItemClass: P.CSS.focused,\n allowedKeys: [\n B.TAB,\n B.UP,\n B.DOWN,\n B.ENTER\n ]\n }), this.flipper.onFlip(this.onFlip);\n }\n /**\n * Returns list of elements available for keyboard navigation.\n * Contains both usual popover items elements and custom html content.\n */\n get flippableElements() {\n const s = this.items.map((t) => t.getElement());\n return (this.customContentFlippableItems || []).concat(s);\n }\n get height() {\n let s = 0;\n if (this.nodes.popover === null)\n return s;\n const e = this.nodes.popover.cloneNode(!0);\n return e.style.visibility = \"hidden\", e.style.position = \"absolute\", e.style.top = \"-1000px\", e.classList.add(j.CSS.popoverOpened), document.body.appendChild(e), s = e.offsetHeight, e.remove(), s;\n }\n /**\n * Checks if popover should be opened bottom.\n * It should happen when there is enough space below or not enough space above\n */\n get shouldOpenBottom() {\n const s = this.nodes.popover.getBoundingClientRect(), e = this.scopeElement.getBoundingClientRect(), t = this.height, o = s.top + t, i = s.top - t, n = Math.min(window.innerHeight, e.bottom);\n return i < e.top || o <= n;\n }\n /**\n * Toggles nothing found message visibility\n *\n * @param isDisplayed - true if the message should be displayed\n */\n toggleNothingFoundMessage(s) {\n this.nodes.nothingFoundMessage.classList.toggle(j.CSS.nothingFoundMessageDisplayed, s);\n }\n /**\n * Toggles custom content visibility\n *\n * @param isDisplayed - true if custom content should be displayed\n */\n toggleCustomContent(s) {\n var e;\n (e = this.nodes.customContent) == null || e.classList.toggle(j.CSS.customContentHidden, s);\n }\n /**\n * - Toggles item active state, if clicked popover item has property 'toggle' set to true.\n *\n * - Performs radiobutton-like behavior if the item has property 'toggle' set to string key.\n * (All the other items with the same key get inactive, and the item gets active)\n *\n * @param clickedItem - popover item that was clicked\n */\n toggleItemActivenessIfNeeded(s) {\n if (s.toggle === !0 && s.toggleActive(), typeof s.toggle == \"string\") {\n const e = this.items.filter((t) => t.toggle === s.toggle);\n if (e.length === 1) {\n s.toggleActive();\n return;\n }\n e.forEach((t) => {\n t.toggleActive(t === s);\n });\n }\n }\n};\nlet je = j;\nHo([\n ce\n], je.prototype, \"height\", 1);\nclass jo extends C {\n constructor() {\n super(...arguments), this.opened = !1, this.selection = new m(), this.onPopoverClose = () => {\n this.close();\n };\n }\n /**\n * Module Events\n *\n * @returns {{opened: string, closed: string}}\n */\n get events() {\n return {\n opened: \"block-settings-opened\",\n closed: \"block-settings-closed\"\n };\n }\n /**\n * Block Settings CSS\n */\n get CSS() {\n return {\n settings: \"ce-settings\"\n };\n }\n /**\n * Getter for inner popover's flipper instance\n *\n * @todo remove once BlockSettings becomes standalone non-module class\n */\n get flipper() {\n var e;\n return (e = this.popover) == null ? void 0 : e.flipper;\n }\n /**\n * Panel with block settings with 2 sections:\n * - Tool's Settings\n * - Default Settings [Move, Remove, etc]\n */\n make() {\n this.nodes.wrapper = d.make(\"div\", [this.CSS.settings]);\n }\n /**\n * Destroys module\n */\n destroy() {\n this.removeAllNodes();\n }\n /**\n * Open Block Settings pane\n *\n * @param targetBlock - near which Block we should open BlockSettings\n */\n open(e = this.Editor.BlockManager.currentBlock) {\n this.opened = !0, this.selection.save(), e.selected = !0, this.Editor.BlockSelection.clearCache();\n const [t, o] = e.getTunes();\n this.eventsDispatcher.emit(this.events.opened), this.popover = new je({\n searchable: !0,\n items: t.map((i) => this.resolveTuneAliases(i)),\n customContent: o,\n customContentFlippableItems: this.getControls(o),\n scopeElement: this.Editor.API.methods.ui.nodes.redactor,\n messages: {\n nothingFound: $.ui(X.ui.popover, \"Nothing found\"),\n search: $.ui(X.ui.popover, \"Filter\")\n }\n }), this.popover.on(ge.Close, this.onPopoverClose), this.nodes.wrapper.append(this.popover.getElement()), this.popover.show();\n }\n /**\n * Returns root block settings element\n */\n getElement() {\n return this.nodes.wrapper;\n }\n /**\n * Close Block Settings pane\n */\n close() {\n this.opened = !1, m.isAtEditor || this.selection.restore(), this.selection.clearSaved(), !this.Editor.CrossBlockSelection.isCrossBlockSelectionStarted && this.Editor.BlockManager.currentBlock && (this.Editor.BlockManager.currentBlock.selected = !1), this.eventsDispatcher.emit(this.events.closed), this.popover && (this.popover.off(ge.Close, this.onPopoverClose), this.popover.destroy(), this.popover.getElement().remove(), this.popover = null);\n }\n /**\n * Returns list of buttons and inputs inside specified container\n *\n * @param container - container to query controls inside of\n */\n getControls(e) {\n const { StylesAPI: t } = this.Editor, o = e.querySelectorAll(\n `.${t.classes.settingsButton}, ${d.allInputsSelector}`\n );\n return Array.from(o);\n }\n /**\n * Resolves aliases in tunes menu items\n *\n * @param item - item with resolved aliases\n */\n resolveTuneAliases(e) {\n const t = Co(e, { label: \"title\" });\n return e.confirmation && (t.confirmation = this.resolveTuneAliases(e.confirmation)), t;\n }\n}\nclass Y extends C {\n constructor() {\n super(...arguments), this.opened = !1, this.tools = [], this.flipper = null, this.togglingCallback = null;\n }\n /**\n * CSS getter\n */\n static get CSS() {\n return {\n conversionToolbarWrapper: \"ce-conversion-toolbar\",\n conversionToolbarShowed: \"ce-conversion-toolbar--showed\",\n conversionToolbarTools: \"ce-conversion-toolbar__tools\",\n conversionToolbarLabel: \"ce-conversion-toolbar__label\",\n conversionTool: \"ce-conversion-tool\",\n conversionToolHidden: \"ce-conversion-tool--hidden\",\n conversionToolIcon: \"ce-conversion-tool__icon\",\n conversionToolSecondaryLabel: \"ce-conversion-tool__secondary-label\",\n conversionToolFocused: \"ce-conversion-tool--focused\",\n conversionToolActive: \"ce-conversion-tool--active\"\n };\n }\n /**\n * Create UI of Conversion Toolbar\n */\n make() {\n this.nodes.wrapper = d.make(\"div\", [\n Y.CSS.conversionToolbarWrapper,\n ...this.isRtl ? [this.Editor.UI.CSS.editorRtlFix] : []\n ]), this.nodes.tools = d.make(\"div\", Y.CSS.conversionToolbarTools);\n const e = d.make(\"div\", Y.CSS.conversionToolbarLabel, {\n textContent: $.ui(X.ui.inlineToolbar.converter, \"Convert to\")\n });\n return this.addTools(), this.enableFlipper(), d.append(this.nodes.wrapper, e), d.append(this.nodes.wrapper, this.nodes.tools), this.nodes.wrapper;\n }\n /**\n * Deactivates flipper and removes all nodes\n */\n destroy() {\n this.flipper && (this.flipper.deactivate(), this.flipper = null), this.removeAllNodes();\n }\n /**\n * Toggle conversion dropdown visibility\n *\n * @param {Function} [togglingCallback] — callback that will accept opening state\n */\n toggle(e) {\n this.opened ? this.close() : this.open(), D(e) && (this.togglingCallback = e);\n }\n /**\n * Shows Conversion Toolbar\n */\n open() {\n this.filterTools(), this.opened = !0, this.nodes.wrapper.classList.add(Y.CSS.conversionToolbarShowed), window.requestAnimationFrame(() => {\n this.flipper.activate(this.tools.map((e) => e.button).filter((e) => !e.classList.contains(Y.CSS.conversionToolHidden))), this.flipper.focusFirst(), D(this.togglingCallback) && this.togglingCallback(!0);\n });\n }\n /**\n * Closes Conversion Toolbar\n */\n close() {\n this.opened = !1, this.flipper.deactivate(), this.nodes.wrapper.classList.remove(Y.CSS.conversionToolbarShowed), D(this.togglingCallback) && this.togglingCallback(!1);\n }\n /**\n * Returns true if it has more than one tool available for convert in\n */\n hasTools() {\n return this.tools.length === 1 ? this.tools[0].name !== this.config.defaultBlock : !0;\n }\n /**\n * Replaces one Block with another\n * For that Tools must provide import/export methods\n *\n * @param {string} replacingToolName - name of Tool which replaces current\n * @param blockDataOverrides - If this conversion fired by the one of multiple Toolbox items, extend converted data with this item's \"data\" overrides\n */\n async replaceWithBlock(e, t) {\n const { BlockManager: o, BlockSelection: i, InlineToolbar: n, Caret: r } = this.Editor;\n o.convert(this.Editor.BlockManager.currentBlock, e, t), i.clearSelection(), this.close(), n.close(), window.requestAnimationFrame(() => {\n r.setToBlock(this.Editor.BlockManager.currentBlock, r.positions.END);\n });\n }\n /**\n * Iterates existing Tools and inserts to the ConversionToolbar\n * if tools have ability to import\n */\n addTools() {\n const e = this.Editor.Tools.blockTools;\n Array.from(e.entries()).forEach(([t, o]) => {\n var n;\n const i = o.conversionConfig;\n !i || !i.import || (n = o.toolbox) == null || n.forEach(\n (r) => this.addToolIfValid(t, r)\n );\n });\n }\n /**\n * Inserts a tool to the ConversionToolbar if the tool's toolbox config is valid\n *\n * @param name - tool's name\n * @param toolboxSettings - tool's single toolbox setting\n */\n addToolIfValid(e, t) {\n V(t) || !t.icon || this.addTool(e, t);\n }\n /**\n * Add tool to the Conversion Toolbar\n *\n * @param toolName - name of Tool to add\n * @param toolboxItem - tool's toolbox item data\n */\n addTool(e, t) {\n var r;\n const o = d.make(\"div\", [Y.CSS.conversionTool]), i = d.make(\"div\", [Y.CSS.conversionToolIcon]);\n o.dataset.tool = e, i.innerHTML = t.icon, d.append(o, i), d.append(o, d.text($.t(X.toolNames, t.title || ae(e))));\n const n = (r = this.Editor.Tools.blockTools.get(e)) == null ? void 0 : r.shortcut;\n if (n) {\n const a = d.make(\"span\", Y.CSS.conversionToolSecondaryLabel, {\n innerText: Re(n)\n });\n d.append(o, a);\n }\n d.append(this.nodes.tools, o), this.tools.push({\n name: e,\n button: o,\n toolboxItem: t\n }), this.listeners.on(o, \"click\", async () => {\n await this.replaceWithBlock(e, t.data);\n });\n }\n /**\n * Hide current Tool and show others\n */\n async filterTools() {\n const { currentBlock: e } = this.Editor.BlockManager, t = await e.getActiveToolboxEntry();\n function o(i, n) {\n return i.icon === n.icon && i.title === n.title;\n }\n this.tools.forEach((i) => {\n let n = !1;\n if (t) {\n const r = o(t, i.toolboxItem);\n n = i.button.dataset.tool === e.name && r;\n }\n i.button.hidden = n, i.button.classList.toggle(Y.CSS.conversionToolHidden, n);\n });\n }\n /**\n * Prepare Flipper to be able to leaf tools by arrows/tab\n */\n enableFlipper() {\n this.flipper = new G({\n focusedItemClass: Y.CSS.conversionToolFocused\n });\n }\n}\nvar _e = {}, zo = {\n get exports() {\n return _e;\n },\n set exports(s) {\n _e = s;\n }\n};\n/*!\n * Library for handling keyboard shortcuts\n * @copyright CodeX (https://codex.so)\n * @license MIT\n * @author CodeX (https://codex.so)\n * @version 1.2.0\n */\n(function(s, e) {\n (function(t, o) {\n s.exports = o();\n })(window, function() {\n return function(t) {\n var o = {};\n function i(n) {\n if (o[n])\n return o[n].exports;\n var r = o[n] = { i: n, l: !1, exports: {} };\n return t[n].call(r.exports, r, r.exports, i), r.l = !0, r.exports;\n }\n return i.m = t, i.c = o, i.d = function(n, r, a) {\n i.o(n, r) || Object.defineProperty(n, r, { enumerable: !0, get: a });\n }, i.r = function(n) {\n typeof Symbol < \"u\" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(n, \"__esModule\", { value: !0 });\n }, i.t = function(n, r) {\n if (1 & r && (n = i(n)), 8 & r || 4 & r && typeof n == \"object\" && n && n.__esModule)\n return n;\n var a = /* @__PURE__ */ Object.create(null);\n if (i.r(a), Object.defineProperty(a, \"default\", { enumerable: !0, value: n }), 2 & r && typeof n != \"string\")\n for (var l in n)\n i.d(a, l, function(c) {\n return n[c];\n }.bind(null, l));\n return a;\n }, i.n = function(n) {\n var r = n && n.__esModule ? function() {\n return n.default;\n } : function() {\n return n;\n };\n return i.d(r, \"a\", r), r;\n }, i.o = function(n, r) {\n return Object.prototype.hasOwnProperty.call(n, r);\n }, i.p = \"\", i(i.s = 0);\n }([function(t, o, i) {\n function n(l, c) {\n for (var u = 0; u < c.length; u++) {\n var h = c[u];\n h.enumerable = h.enumerable || !1, h.configurable = !0, \"value\" in h && (h.writable = !0), Object.defineProperty(l, h.key, h);\n }\n }\n function r(l, c, u) {\n return c && n(l.prototype, c), u && n(l, u), l;\n }\n i.r(o);\n var a = function() {\n function l(c) {\n var u = this;\n (function(h, f) {\n if (!(h instanceof f))\n throw new TypeError(\"Cannot call a class as a function\");\n })(this, l), this.commands = {}, this.keys = {}, this.name = c.name, this.parseShortcutName(c.name), this.element = c.on, this.callback = c.callback, this.executeShortcut = function(h) {\n u.execute(h);\n }, this.element.addEventListener(\"keydown\", this.executeShortcut, !1);\n }\n return r(l, null, [{ key: \"supportedCommands\", get: function() {\n return { SHIFT: [\"SHIFT\"], CMD: [\"CMD\", \"CONTROL\", \"COMMAND\", \"WINDOWS\", \"CTRL\"], ALT: [\"ALT\", \"OPTION\"] };\n } }, { key: \"keyCodes\", get: function() {\n return { 0: 48, 1: 49, 2: 50, 3: 51, 4: 52, 5: 53, 6: 54, 7: 55, 8: 56, 9: 57, A: 65, B: 66, C: 67, D: 68, E: 69, F: 70, G: 71, H: 72, I: 73, J: 74, K: 75, L: 76, M: 77, N: 78, O: 79, P: 80, Q: 81, R: 82, S: 83, T: 84, U: 85, V: 86, W: 87, X: 88, Y: 89, Z: 90, BACKSPACE: 8, ENTER: 13, ESCAPE: 27, LEFT: 37, UP: 38, RIGHT: 39, DOWN: 40, INSERT: 45, DELETE: 46, \".\": 190 };\n } }]), r(l, [{ key: \"parseShortcutName\", value: function(c) {\n c = c.split(\"+\");\n for (var u = 0; u < c.length; u++) {\n c[u] = c[u].toUpperCase();\n var h = !1;\n for (var f in l.supportedCommands)\n if (l.supportedCommands[f].includes(c[u])) {\n h = this.commands[f] = !0;\n break;\n }\n h || (this.keys[c[u]] = !0);\n }\n for (var k in l.supportedCommands)\n this.commands[k] || (this.commands[k] = !1);\n } }, { key: \"execute\", value: function(c) {\n var u, h = { CMD: c.ctrlKey || c.metaKey, SHIFT: c.shiftKey, ALT: c.altKey }, f = !0;\n for (u in this.commands)\n this.commands[u] !== h[u] && (f = !1);\n var k, p = !0;\n for (k in this.keys)\n p = p && c.keyCode === l.keyCodes[k];\n f && p && this.callback(c);\n } }, { key: \"remove\", value: function() {\n this.element.removeEventListener(\"keydown\", this.executeShortcut);\n } }]), l;\n }();\n o.default = a;\n }]).default;\n });\n})(zo);\nconst Uo = /* @__PURE__ */ xe(_e);\nclass $o {\n constructor() {\n this.registeredShortcuts = /* @__PURE__ */ new Map();\n }\n /**\n * Register shortcut\n *\n * @param shortcut - shortcut options\n */\n add(e) {\n if (this.findShortcut(e.on, e.name))\n throw Error(\n `Shortcut ${e.name} is already registered for ${e.on}. Please remove it before add a new handler.`\n );\n const o = new Uo({\n name: e.name,\n on: e.on,\n callback: e.handler\n }), i = this.registeredShortcuts.get(e.on) || [];\n this.registeredShortcuts.set(e.on, [...i, o]);\n }\n /**\n * Remove shortcut\n *\n * @param element - Element shortcut is set for\n * @param name - shortcut name\n */\n remove(e, t) {\n const o = this.findShortcut(e, t);\n if (!o)\n return;\n o.remove();\n const i = this.registeredShortcuts.get(e);\n this.registeredShortcuts.set(e, i.filter((n) => n !== o));\n }\n /**\n * Get Shortcut instance if exist\n *\n * @param element - Element shorcut is set for\n * @param shortcut - shortcut name\n * @returns {number} index - shortcut index if exist\n */\n findShortcut(e, t) {\n return (this.registeredShortcuts.get(e) || []).find(({ name: i }) => i === t);\n }\n}\nconst le = new $o();\nvar Wo = Object.defineProperty, Yo = Object.getOwnPropertyDescriptor, bt = (s, e, t, o) => {\n for (var i = o > 1 ? void 0 : o ? Yo(e, t) : e, n = s.length - 1, r; n >= 0; n--)\n (r = s[n]) && (i = (o ? r(e, t, i) : r(i)) || i);\n return o && i && Wo(e, t, i), i;\n}, me = /* @__PURE__ */ ((s) => (s.Opened = \"toolbox-opened\", s.Closed = \"toolbox-closed\", s.BlockAdded = \"toolbox-block-added\", s))(me || {});\nconst mt = class extends we {\n /**\n * Toolbox constructor\n *\n * @param options - available parameters\n * @param options.api - Editor API methods\n * @param options.tools - Tools available to check whether some of them should be displayed at the Toolbox or not\n */\n constructor({ api: s, tools: e, i18nLabels: t }) {\n super(), this.opened = !1, this.nodes = {\n toolbox: null\n }, this.onPopoverClose = () => {\n this.opened = !1, this.emit(\n \"toolbox-closed\"\n /* Closed */\n );\n }, this.api = s, this.tools = e, this.i18nLabels = t;\n }\n /**\n * Returns True if Toolbox is Empty and nothing to show\n *\n * @returns {boolean}\n */\n get isEmpty() {\n return this.toolsToBeDisplayed.length === 0;\n }\n /**\n * CSS styles\n *\n * @returns {Object}\n */\n static get CSS() {\n return {\n toolbox: \"ce-toolbox\"\n };\n }\n /**\n * Makes the Toolbox\n */\n make() {\n return this.popover = new je({\n scopeElement: this.api.ui.nodes.redactor,\n searchable: !0,\n messages: {\n nothingFound: this.i18nLabels.nothingFound,\n search: this.i18nLabels.filter\n },\n items: this.toolboxItemsToBeDisplayed\n }), this.popover.on(ge.Close, this.onPopoverClose), this.enableShortcuts(), this.nodes.toolbox = this.popover.getElement(), this.nodes.toolbox.classList.add(mt.CSS.toolbox), this.nodes.toolbox;\n }\n /**\n * Returns true if the Toolbox has the Flipper activated and the Flipper has selected button\n */\n hasFocus() {\n var s;\n return (s = this.popover) == null ? void 0 : s.hasFocus();\n }\n /**\n * Destroy Module\n */\n destroy() {\n var s;\n super.destroy(), this.nodes && this.nodes.toolbox && (this.nodes.toolbox.remove(), this.nodes.toolbox = null), this.removeAllShortcuts(), (s = this.popover) == null || s.off(ge.Close, this.onPopoverClose);\n }\n /**\n * Toolbox Tool's button click handler\n *\n * @param toolName - tool type to be activated\n * @param blockDataOverrides - Block data predefined by the activated Toolbox item\n */\n toolButtonActivated(s, e) {\n this.insertNewBlock(s, e);\n }\n /**\n * Open Toolbox with Tools\n */\n open() {\n var s;\n this.isEmpty || ((s = this.popover) == null || s.show(), this.opened = !0, this.emit(\n \"toolbox-opened\"\n /* Opened */\n ));\n }\n /**\n * Close Toolbox\n */\n close() {\n var s;\n (s = this.popover) == null || s.hide(), this.opened = !1, this.emit(\n \"toolbox-closed\"\n /* Closed */\n );\n }\n /**\n * Close Toolbox\n */\n toggle() {\n this.opened ? this.close() : this.open();\n }\n get toolsToBeDisplayed() {\n const s = [];\n return this.tools.forEach((e) => {\n e.toolbox && s.push(e);\n }), s;\n }\n get toolboxItemsToBeDisplayed() {\n const s = (e, t) => ({\n icon: e.icon,\n title: $.t(X.toolNames, e.title || ae(t.name)),\n name: t.name,\n onActivate: () => {\n this.toolButtonActivated(t.name, e.data);\n },\n secondaryLabel: t.shortcut ? Re(t.shortcut) : \"\"\n });\n return this.toolsToBeDisplayed.reduce((e, t) => (Array.isArray(t.toolbox) ? t.toolbox.forEach((o) => {\n e.push(s(o, t));\n }) : t.toolbox !== void 0 && e.push(s(t.toolbox, t)), e), []);\n }\n /**\n * Iterate all tools and enable theirs shortcuts if specified\n */\n enableShortcuts() {\n this.toolsToBeDisplayed.forEach((s) => {\n const e = s.shortcut;\n e && this.enableShortcutForTool(s.name, e);\n });\n }\n /**\n * Enable shortcut Block Tool implemented shortcut\n *\n * @param {string} toolName - Tool name\n * @param {string} shortcut - shortcut according to the ShortcutData Module format\n */\n enableShortcutForTool(s, e) {\n le.add({\n name: e,\n on: this.api.ui.nodes.redactor,\n handler: (t) => {\n t.preventDefault();\n const o = this.api.blocks.getCurrentBlockIndex(), i = this.api.blocks.getBlockByIndex(o);\n if (i)\n try {\n this.api.blocks.convert(i.id, s), window.requestAnimationFrame(() => {\n this.api.caret.setToBlock(o, \"end\");\n });\n return;\n } catch {\n }\n this.insertNewBlock(s);\n }\n });\n }\n /**\n * Removes all added shortcuts\n * Fired when the Read-Only mode is activated\n */\n removeAllShortcuts() {\n this.toolsToBeDisplayed.forEach((s) => {\n const e = s.shortcut;\n e && le.remove(this.api.ui.nodes.redactor, e);\n });\n }\n /**\n * Inserts new block\n * Can be called when button clicked on Toolbox or by ShortcutData\n *\n * @param {string} toolName - Tool name\n * @param blockDataOverrides - predefined Block data\n */\n async insertNewBlock(s, e) {\n const t = this.api.blocks.getCurrentBlockIndex(), o = this.api.blocks.getBlockByIndex(t);\n if (!o)\n return;\n const i = o.isEmpty ? t : t + 1;\n let n;\n if (e) {\n const a = await this.api.blocks.composeBlockData(s);\n n = Object.assign(a, e);\n }\n const r = this.api.blocks.insert(\n s,\n n,\n void 0,\n i,\n void 0,\n o.isEmpty\n );\n r.call(q.APPEND_CALLBACK), this.api.caret.setToBlock(i), this.emit(\"toolbox-block-added\", {\n block: r\n }), this.api.toolbar.close();\n }\n};\nlet ze = mt;\nbt([\n ce\n], ze.prototype, \"toolsToBeDisplayed\", 1);\nbt([\n ce\n], ze.prototype, \"toolboxItemsToBeDisplayed\", 1);\nconst kt = \"block hovered\";\nclass Ko extends C {\n /**\n * @class\n * @param moduleConfiguration - Module Configuration\n * @param moduleConfiguration.config - Editor's config\n * @param moduleConfiguration.eventsDispatcher - Editor's event dispatcher\n */\n constructor({ config: e, eventsDispatcher: t }) {\n super({\n config: e,\n eventsDispatcher: t\n }), this.toolboxInstance = null, this.tooltip = new He();\n }\n /**\n * CSS styles\n *\n * @returns {object}\n */\n get CSS() {\n return {\n toolbar: \"ce-toolbar\",\n content: \"ce-toolbar__content\",\n actions: \"ce-toolbar__actions\",\n actionsOpened: \"ce-toolbar__actions--opened\",\n toolbarOpened: \"ce-toolbar--opened\",\n openedToolboxHolderModifier: \"codex-editor--toolbox-opened\",\n plusButton: \"ce-toolbar__plus\",\n plusButtonShortcut: \"ce-toolbar__plus-shortcut\",\n settingsToggler: \"ce-toolbar__settings-btn\",\n settingsTogglerHidden: \"ce-toolbar__settings-btn--hidden\"\n };\n }\n /**\n * Returns the Toolbar opening state\n *\n * @returns {boolean}\n */\n get opened() {\n return this.nodes.wrapper.classList.contains(this.CSS.toolbarOpened);\n }\n /**\n * Public interface for accessing the Toolbox\n */\n get toolbox() {\n var e;\n return {\n opened: (e = this.toolboxInstance) == null ? void 0 : e.opened,\n close: () => {\n var t;\n (t = this.toolboxInstance) == null || t.close();\n },\n open: () => {\n if (this.toolboxInstance === null) {\n L(\"toolbox.open() called before initialization is finished\", \"warn\");\n return;\n }\n this.Editor.BlockManager.currentBlock = this.hoveredBlock, this.toolboxInstance.open();\n },\n toggle: () => {\n if (this.toolboxInstance === null) {\n L(\"toolbox.toggle() called before initialization is finished\", \"warn\");\n return;\n }\n this.toolboxInstance.toggle();\n },\n hasFocus: () => {\n var t;\n return (t = this.toolboxInstance) == null ? void 0 : t.hasFocus();\n }\n };\n }\n /**\n * Block actions appearance manipulations\n */\n get blockActions() {\n return {\n hide: () => {\n this.nodes.actions.classList.remove(this.CSS.actionsOpened);\n },\n show: () => {\n this.nodes.actions.classList.add(this.CSS.actionsOpened);\n }\n };\n }\n /**\n * Methods for working with Block Tunes toggler\n */\n get blockTunesToggler() {\n return {\n hide: () => this.nodes.settingsToggler.classList.add(this.CSS.settingsTogglerHidden),\n show: () => this.nodes.settingsToggler.classList.remove(this.CSS.settingsTogglerHidden)\n };\n }\n /**\n * Toggles read-only mode\n *\n * @param {boolean} readOnlyEnabled - read-only mode\n */\n toggleReadOnly(e) {\n e ? (this.destroy(), this.Editor.BlockSettings.destroy(), this.disableModuleBindings()) : window.requestIdleCallback(() => {\n this.drawUI(), this.enableModuleBindings();\n }, { timeout: 2e3 });\n }\n /**\n * Move Toolbar to the passed (or current) Block\n *\n * @param block - block to move Toolbar near it\n */\n moveAndOpen(e = this.Editor.BlockManager.currentBlock) {\n if (this.toolboxInstance === null) {\n L(\"Can't open Toolbar since Editor initialization is not finished yet\", \"warn\");\n return;\n }\n if (this.toolboxInstance.opened && this.toolboxInstance.close(), this.Editor.BlockSettings.opened && this.Editor.BlockSettings.close(), !e)\n return;\n this.hoveredBlock = e;\n const t = e.holder, { isMobile: o } = this.Editor.UI, i = e.pluginsContent, n = window.getComputedStyle(i), r = parseInt(n.paddingTop, 10), a = t.offsetHeight;\n let l;\n o ? l = t.offsetTop + a : l = t.offsetTop + r, this.nodes.wrapper.style.top = `${Math.floor(l)}px`, this.Editor.BlockManager.blocks.length === 1 && e.isEmpty ? this.blockTunesToggler.hide() : this.blockTunesToggler.show(), this.open();\n }\n /**\n * Close the Toolbar\n */\n close() {\n var e;\n this.Editor.ReadOnly.isEnabled || (this.nodes.wrapper.classList.remove(this.CSS.toolbarOpened), this.blockActions.hide(), (e = this.toolboxInstance) == null || e.close(), this.Editor.BlockSettings.close());\n }\n /**\n * Open Toolbar with Plus Button and Actions\n *\n * @param {boolean} withBlockActions - by default, Toolbar opens with Block Actions.\n * This flag allows to open Toolbar without Actions.\n */\n open(e = !0) {\n re(() => {\n this.nodes.wrapper.classList.add(this.CSS.toolbarOpened), e ? this.blockActions.show() : this.blockActions.hide();\n }, 50)();\n }\n /**\n * Draws Toolbar elements\n */\n make() {\n this.nodes.wrapper = d.make(\"div\", this.CSS.toolbar), [\"content\", \"actions\"].forEach((t) => {\n this.nodes[t] = d.make(\"div\", this.CSS[t]);\n }), d.append(this.nodes.wrapper, this.nodes.content), d.append(this.nodes.content, this.nodes.actions), this.nodes.plusButton = d.make(\"div\", this.CSS.plusButton, {\n innerHTML: _o\n }), d.append(this.nodes.actions, this.nodes.plusButton), this.readOnlyMutableListeners.on(this.nodes.plusButton, \"click\", () => {\n this.tooltip.hide(!0), this.plusButtonClicked();\n }, !1);\n const e = d.make(\"div\");\n e.appendChild(document.createTextNode($.ui(X.ui.toolbar.toolbox, \"Add\"))), e.appendChild(d.make(\"div\", this.CSS.plusButtonShortcut, {\n textContent: \"⇥ Tab\"\n })), this.tooltip.onHover(this.nodes.plusButton, e, {\n hidingDelay: 400\n }), this.nodes.settingsToggler = d.make(\"span\", this.CSS.settingsToggler, {\n innerHTML: Ao\n }), d.append(this.nodes.actions, this.nodes.settingsToggler), this.tooltip.onHover(\n this.nodes.settingsToggler,\n $.ui(X.ui.blockTunes.toggler, \"Click to tune\"),\n {\n hidingDelay: 400\n }\n ), d.append(this.nodes.actions, this.makeToolbox()), d.append(this.nodes.actions, this.Editor.BlockSettings.getElement()), d.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper);\n }\n /**\n * Creates the Toolbox instance and return it's rendered element\n */\n makeToolbox() {\n return this.toolboxInstance = new ze({\n api: this.Editor.API.methods,\n tools: this.Editor.Tools.blockTools,\n i18nLabels: {\n filter: $.ui(X.ui.popover, \"Filter\"),\n nothingFound: $.ui(X.ui.popover, \"Nothing found\")\n }\n }), this.toolboxInstance.on(me.Opened, () => {\n this.Editor.UI.nodes.wrapper.classList.add(this.CSS.openedToolboxHolderModifier);\n }), this.toolboxInstance.on(me.Closed, () => {\n this.Editor.UI.nodes.wrapper.classList.remove(this.CSS.openedToolboxHolderModifier);\n }), this.toolboxInstance.on(me.BlockAdded, ({ block: e }) => {\n const { BlockManager: t, Caret: o } = this.Editor, i = t.getBlockById(e.id);\n i.inputs.length === 0 && (i === t.lastBlock ? (t.insertAtEnd(), o.setToBlock(t.lastBlock)) : o.setToBlock(t.nextBlock));\n }), this.toolboxInstance.make();\n }\n /**\n * Handler for Plus Button\n */\n plusButtonClicked() {\n var e;\n this.Editor.BlockManager.currentBlock = this.hoveredBlock, (e = this.toolboxInstance) == null || e.toggle();\n }\n /**\n * Enable bindings\n */\n enableModuleBindings() {\n this.readOnlyMutableListeners.on(this.nodes.settingsToggler, \"mousedown\", (e) => {\n var t;\n e.stopPropagation(), this.settingsTogglerClicked(), (t = this.toolboxInstance) != null && t.opened && this.toolboxInstance.close(), this.tooltip.hide(!0);\n }, !0), te() || this.eventsDispatcher.on(kt, (e) => {\n var t;\n this.Editor.BlockSettings.opened || (t = this.toolboxInstance) != null && t.opened || this.moveAndOpen(e.block);\n });\n }\n /**\n * Disable bindings\n */\n disableModuleBindings() {\n this.readOnlyMutableListeners.clearAll();\n }\n /**\n * Clicks on the Block Settings toggler\n */\n settingsTogglerClicked() {\n this.Editor.BlockManager.currentBlock = this.hoveredBlock, this.Editor.BlockSettings.opened ? this.Editor.BlockSettings.close() : this.Editor.BlockSettings.open(this.hoveredBlock);\n }\n /**\n * Draws Toolbar UI\n *\n * Toolbar contains BlockSettings and Toolbox.\n * That's why at first we draw its components and then Toolbar itself\n *\n * Steps:\n * - Make Toolbar dependent components like BlockSettings, Toolbox and so on\n * - Make itself and append dependent nodes to itself\n *\n */\n drawUI() {\n this.Editor.BlockSettings.make(), this.make();\n }\n /**\n * Removes all created and saved HTMLElements\n * It is used in Read-Only mode\n */\n destroy() {\n this.removeAllNodes(), this.toolboxInstance && this.toolboxInstance.destroy(), this.tooltip.destroy();\n }\n}\nvar ye = /* @__PURE__ */ ((s) => (s[s.Block = 0] = \"Block\", s[s.Inline = 1] = \"Inline\", s[s.Tune = 2] = \"Tune\", s))(ye || {}), ke = /* @__PURE__ */ ((s) => (s.Shortcut = \"shortcut\", s.Toolbox = \"toolbox\", s.EnabledInlineTools = \"inlineToolbar\", s.EnabledBlockTunes = \"tunes\", s.Config = \"config\", s))(ke || {}), vt = /* @__PURE__ */ ((s) => (s.Shortcut = \"shortcut\", s.SanitizeConfig = \"sanitize\", s))(vt || {}), se = /* @__PURE__ */ ((s) => (s.IsEnabledLineBreaks = \"enableLineBreaks\", s.Toolbox = \"toolbox\", s.ConversionConfig = \"conversionConfig\", s.IsReadOnlySupported = \"isReadOnlySupported\", s.PasteConfig = \"pasteConfig\", s))(se || {}), Ue = /* @__PURE__ */ ((s) => (s.IsInline = \"isInline\", s.Title = \"title\", s))(Ue || {}), xt = /* @__PURE__ */ ((s) => (s.IsTune = \"isTune\", s))(xt || {});\nclass $e {\n /**\n * @class\n * @param {ConstructorOptions} options - Constructor options\n */\n constructor({\n name: e,\n constructable: t,\n config: o,\n api: i,\n isDefault: n,\n isInternal: r = !1,\n defaultPlaceholder: a\n }) {\n this.api = i, this.name = e, this.constructable = t, this.config = o, this.isDefault = n, this.isInternal = r, this.defaultPlaceholder = a;\n }\n /**\n * Returns Tool user configuration\n */\n get settings() {\n const e = this.config.config || {};\n return this.isDefault && !(\"placeholder\" in e) && this.defaultPlaceholder && (e.placeholder = this.defaultPlaceholder), e;\n }\n /**\n * Calls Tool's reset method\n */\n reset() {\n if (D(this.constructable.reset))\n return this.constructable.reset();\n }\n /**\n * Calls Tool's prepare method\n */\n prepare() {\n if (D(this.constructable.prepare))\n return this.constructable.prepare({\n toolName: this.name,\n config: this.settings\n });\n }\n /**\n * Returns shortcut for Tool (internal or specified by user)\n */\n get shortcut() {\n const e = this.constructable.shortcut;\n return this.config.shortcut || e;\n }\n /**\n * Returns Tool's sanitizer configuration\n */\n get sanitizeConfig() {\n return this.constructable.sanitize || {};\n }\n /**\n * Returns true if Tools is inline\n */\n isInline() {\n return this.type === 1;\n }\n /**\n * Returns true if Tools is block\n */\n isBlock() {\n return this.type === 0;\n }\n /**\n * Returns true if Tools is tune\n */\n isTune() {\n return this.type === 2;\n }\n}\nclass Xo extends C {\n /**\n * @class\n * @param moduleConfiguration - Module Configuration\n * @param moduleConfiguration.config - Editor's config\n * @param moduleConfiguration.eventsDispatcher - Editor's event dispatcher\n */\n constructor({ config: e, eventsDispatcher: t }) {\n super({\n config: e,\n eventsDispatcher: t\n }), this.CSS = {\n inlineToolbar: \"ce-inline-toolbar\",\n inlineToolbarShowed: \"ce-inline-toolbar--showed\",\n inlineToolbarLeftOriented: \"ce-inline-toolbar--left-oriented\",\n inlineToolbarRightOriented: \"ce-inline-toolbar--right-oriented\",\n inlineToolbarShortcut: \"ce-inline-toolbar__shortcut\",\n buttonsWrapper: \"ce-inline-toolbar__buttons\",\n actionsWrapper: \"ce-inline-toolbar__actions\",\n inlineToolButton: \"ce-inline-tool\",\n inputField: \"cdx-input\",\n focusedButton: \"ce-inline-tool--focused\",\n conversionToggler: \"ce-inline-toolbar__dropdown\",\n conversionTogglerArrow: \"ce-inline-toolbar__dropdown-arrow\",\n conversionTogglerHidden: \"ce-inline-toolbar__dropdown--hidden\",\n conversionTogglerContent: \"ce-inline-toolbar__dropdown-content\",\n togglerAndButtonsWrapper: \"ce-inline-toolbar__toggler-and-button-wrapper\"\n }, this.opened = !1, this.toolbarVerticalMargin = te() ? 20 : 6, this.buttonsList = null, this.width = 0, this.flipper = null, this.tooltip = new He();\n }\n /**\n * Toggles read-only mode\n *\n * @param {boolean} readOnlyEnabled - read-only mode\n */\n toggleReadOnly(e) {\n e ? (this.destroy(), this.Editor.ConversionToolbar.destroy()) : window.requestIdleCallback(() => {\n this.make();\n }, { timeout: 2e3 });\n }\n /**\n * Moving / appearance\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n */\n /**\n * Shows Inline Toolbar if something is selected\n *\n * @param [needToClose] - pass true to close toolbar if it is not allowed.\n * Avoid to use it just for closing IT, better call .close() clearly.\n * @param [needToShowConversionToolbar] - pass false to not to show Conversion Toolbar\n */\n tryToShow(e = !1, t = !0) {\n if (!this.allowedToShow()) {\n e && this.close();\n return;\n }\n this.move(), this.open(t), this.Editor.Toolbar.close();\n }\n /**\n * Move Toolbar to the selected text\n */\n move() {\n const e = m.rect, t = this.Editor.UI.nodes.wrapper.getBoundingClientRect(), o = {\n x: e.x - t.left,\n y: e.y + e.height - // + window.scrollY\n t.top + this.toolbarVerticalMargin\n };\n e.width && (o.x += Math.floor(e.width / 2));\n const i = o.x - this.width / 2, n = o.x + this.width / 2;\n this.nodes.wrapper.classList.toggle(\n this.CSS.inlineToolbarLeftOriented,\n i < this.Editor.UI.contentRect.left\n ), this.nodes.wrapper.classList.toggle(\n this.CSS.inlineToolbarRightOriented,\n n > this.Editor.UI.contentRect.right\n ), this.nodes.wrapper.style.left = Math.floor(o.x) + \"px\", this.nodes.wrapper.style.top = Math.floor(o.y) + \"px\";\n }\n /**\n * Hides Inline Toolbar\n */\n close() {\n this.opened && (this.Editor.ReadOnly.isEnabled || (this.nodes.wrapper.classList.remove(this.CSS.inlineToolbarShowed), Array.from(this.toolsInstances.entries()).forEach(([e, t]) => {\n const o = this.getToolShortcut(e);\n o && le.remove(this.Editor.UI.nodes.redactor, o), D(t.clear) && t.clear();\n }), this.opened = !1, this.flipper.deactivate(), this.Editor.ConversionToolbar.close()));\n }\n /**\n * Shows Inline Toolbar\n *\n * @param [needToShowConversionToolbar] - pass false to not to show Conversion Toolbar\n */\n open(e = !0) {\n if (this.opened)\n return;\n this.addToolsFiltered(), this.nodes.wrapper.classList.add(this.CSS.inlineToolbarShowed), this.buttonsList = this.nodes.buttons.querySelectorAll(`.${this.CSS.inlineToolButton}`), this.opened = !0, e && this.Editor.ConversionToolbar.hasTools() ? this.setConversionTogglerContent() : this.nodes.conversionToggler.hidden = !0;\n let t = Array.from(this.buttonsList);\n t.unshift(this.nodes.conversionToggler), t = t.filter((o) => !o.hidden), this.flipper.activate(t);\n }\n /**\n * Check if node is contained by Inline Toolbar\n *\n * @param {Node} node — node to check\n */\n containsNode(e) {\n return this.nodes.wrapper.contains(e);\n }\n /**\n * Removes UI and its components\n */\n destroy() {\n this.flipper && (this.flipper.deactivate(), this.flipper = null), this.removeAllNodes(), this.tooltip.destroy();\n }\n /**\n * Making DOM\n */\n make() {\n this.nodes.wrapper = d.make(\"div\", [\n this.CSS.inlineToolbar,\n ...this.isRtl ? [this.Editor.UI.CSS.editorRtlFix] : []\n ]), this.nodes.togglerAndButtonsWrapper = d.make(\"div\", this.CSS.togglerAndButtonsWrapper), this.nodes.buttons = d.make(\"div\", this.CSS.buttonsWrapper), this.nodes.actions = d.make(\"div\", this.CSS.actionsWrapper), this.listeners.on(this.nodes.wrapper, \"mousedown\", (e) => {\n e.target.closest(`.${this.CSS.actionsWrapper}`) || e.preventDefault();\n }), d.append(this.nodes.wrapper, [this.nodes.togglerAndButtonsWrapper, this.nodes.actions]), d.append(this.Editor.UI.nodes.wrapper, this.nodes.wrapper), this.addConversionToggler(), d.append(this.nodes.togglerAndButtonsWrapper, this.nodes.buttons), this.prepareConversionToolbar(), window.requestAnimationFrame(() => {\n this.recalculateWidth();\n }), this.enableFlipper();\n }\n /**\n * Need to show Inline Toolbar or not\n */\n allowedToShow() {\n const e = [\"IMG\", \"INPUT\"], t = m.get(), o = m.text;\n if (!t || !t.anchorNode || t.isCollapsed || o.length < 1)\n return !1;\n const i = d.isElement(t.anchorNode) ? t.anchorNode : t.anchorNode.parentElement;\n if (t && e.includes(i.tagName) || i.closest('[contenteditable=\"true\"]') === null)\n return !1;\n const r = this.Editor.BlockManager.getBlock(t.anchorNode);\n return r ? r.tool.inlineTools.size !== 0 : !1;\n }\n /**\n * Recalculate inline toolbar width\n */\n recalculateWidth() {\n this.width = this.nodes.wrapper.offsetWidth;\n }\n /**\n * Create a toggler for Conversion Dropdown\n * and prepend it to the buttons list\n */\n addConversionToggler() {\n this.nodes.conversionToggler = d.make(\"div\", this.CSS.conversionToggler), this.nodes.conversionTogglerContent = d.make(\"div\", this.CSS.conversionTogglerContent);\n const e = d.make(\"div\", this.CSS.conversionTogglerArrow, {\n innerHTML: ft\n });\n this.nodes.conversionToggler.appendChild(this.nodes.conversionTogglerContent), this.nodes.conversionToggler.appendChild(e), this.nodes.togglerAndButtonsWrapper.appendChild(this.nodes.conversionToggler), this.listeners.on(this.nodes.conversionToggler, \"click\", () => {\n this.Editor.ConversionToolbar.toggle((t) => {\n !t && this.opened ? this.flipper.activate() : this.opened && this.flipper.deactivate();\n });\n }), te() === !1 && this.tooltip.onHover(this.nodes.conversionToggler, $.ui(X.ui.inlineToolbar.converter, \"Convert to\"), {\n placement: \"top\",\n hidingDelay: 100\n });\n }\n /**\n * Changes Conversion Dropdown content for current block's Tool\n */\n async setConversionTogglerContent() {\n const { BlockManager: e } = this.Editor, { currentBlock: t } = e, o = t.name, i = t.tool.conversionConfig, n = i && i.export;\n this.nodes.conversionToggler.hidden = !n, this.nodes.conversionToggler.classList.toggle(this.CSS.conversionTogglerHidden, !n);\n const r = await t.getActiveToolboxEntry() || {};\n this.nodes.conversionTogglerContent.innerHTML = r.icon || r.title || ae(o);\n }\n /**\n * Makes the Conversion Dropdown\n */\n prepareConversionToolbar() {\n const e = this.Editor.ConversionToolbar.make();\n d.append(this.nodes.wrapper, e);\n }\n /**\n * Working with Tools\n * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n */\n /**\n * Append only allowed Tools\n */\n addToolsFiltered() {\n const e = m.get(), t = this.Editor.BlockManager.getBlock(e.anchorNode);\n this.nodes.buttons.innerHTML = \"\", this.nodes.actions.innerHTML = \"\", this.toolsInstances = /* @__PURE__ */ new Map(), Array.from(t.tool.inlineTools.values()).forEach((o) => {\n this.addTool(o);\n }), this.recalculateWidth();\n }\n /**\n * Add tool button and activate clicks\n *\n * @param {InlineTool} tool - InlineTool object\n */\n addTool(e) {\n const t = e.create(), o = t.render();\n if (!o) {\n L(\"Render method must return an instance of Node\", \"warn\", e.name);\n return;\n }\n if (o.dataset.tool = e.name, this.nodes.buttons.appendChild(o), this.toolsInstances.set(e.name, t), D(t.renderActions)) {\n const a = t.renderActions();\n this.nodes.actions.appendChild(a);\n }\n this.listeners.on(o, \"click\", (a) => {\n this.toolClicked(t), a.preventDefault();\n });\n const i = this.getToolShortcut(e.name);\n if (i)\n try {\n this.enableShortcuts(t, i);\n } catch {\n }\n const n = d.make(\"div\"), r = $.t(\n X.toolNames,\n e.title || ae(e.name)\n );\n n.appendChild(d.text(r)), i && n.appendChild(d.make(\"div\", this.CSS.inlineToolbarShortcut, {\n textContent: Re(i)\n })), te() === !1 && this.tooltip.onHover(o, n, {\n placement: \"top\",\n hidingDelay: 100\n }), t.checkState(m.get());\n }\n /**\n * Get shortcut name for tool\n *\n * @param toolName — Tool name\n */\n getToolShortcut(e) {\n const { Tools: t } = this.Editor, o = t.inlineTools.get(e), i = t.internal.inlineTools;\n return Array.from(i.keys()).includes(e) ? this.inlineTools[e][vt.Shortcut] : o.shortcut;\n }\n /**\n * Enable Tool shortcut with Editor Shortcuts Module\n *\n * @param {InlineTool} tool - Tool instance\n * @param {string} shortcut - shortcut according to the ShortcutData Module format\n */\n enableShortcuts(e, t) {\n le.add({\n name: t,\n handler: (o) => {\n const { currentBlock: i } = this.Editor.BlockManager;\n i && i.tool.enabledInlineTools && (o.preventDefault(), this.toolClicked(e));\n },\n on: this.Editor.UI.nodes.redactor\n });\n }\n /**\n * Inline Tool button clicks\n *\n * @param {InlineTool} tool - Tool's instance\n */\n toolClicked(e) {\n const t = m.range;\n e.surround(t), this.checkToolsState(), e.renderActions !== void 0 && this.flipper.deactivate();\n }\n /**\n * Check Tools` state by selection\n */\n checkToolsState() {\n this.toolsInstances.forEach((e) => {\n e.checkState(m.get());\n });\n }\n /**\n * Get inline tools tools\n * Tools that has isInline is true\n */\n get inlineTools() {\n const e = {};\n return Array.from(this.Editor.Tools.inlineTools.entries()).forEach(([t, o]) => {\n e[t] = o.create();\n }), e;\n }\n /**\n * Allow to leaf buttons by arrows / tab\n * Buttons will be filled on opening\n */\n enableFlipper() {\n this.flipper = new G({\n focusedItemClass: this.CSS.focusedButton,\n allowedKeys: [\n B.ENTER,\n B.TAB\n ]\n });\n }\n}\nclass Vo extends C {\n /**\n * All keydowns on Block\n *\n * @param {KeyboardEvent} event - keydown\n */\n keydown(e) {\n switch (this.beforeKeydownProcessing(e), e.keyCode) {\n case B.BACKSPACE:\n this.backspace(e);\n break;\n case B.DELETE:\n this.delete(e);\n break;\n case B.ENTER:\n this.enter(e);\n break;\n case B.DOWN:\n case B.RIGHT:\n this.arrowRightAndDown(e);\n break;\n case B.UP:\n case B.LEFT:\n this.arrowLeftAndUp(e);\n break;\n case B.TAB:\n this.tabPressed(e);\n break;\n }\n }\n /**\n * Fires on keydown before event processing\n *\n * @param {KeyboardEvent} event - keydown\n */\n beforeKeydownProcessing(e) {\n this.needToolbarClosing(e) && nt(e.keyCode) && (this.Editor.Toolbar.close(), this.Editor.ConversionToolbar.close(), e.ctrlKey || e.metaKey || e.altKey || e.shiftKey || (this.Editor.BlockManager.clearFocused(), this.Editor.BlockSelection.clearSelection(e)));\n }\n /**\n * Key up on Block:\n * - shows Inline Toolbar if something selected\n * - shows conversion toolbar with 85% of block selection\n *\n * @param {KeyboardEvent} event - keyup event\n */\n keyup(e) {\n e.shiftKey || this.Editor.UI.checkEmptiness();\n }\n /**\n * Open Toolbox to leaf Tools\n *\n * @param {KeyboardEvent} event - tab keydown event\n */\n tabPressed(e) {\n this.Editor.BlockSelection.clearSelection(e);\n const { BlockManager: t, InlineToolbar: o, ConversionToolbar: i } = this.Editor, n = t.currentBlock;\n if (!n)\n return;\n const r = n.isEmpty, a = n.tool.isDefault && r, l = !r && i.opened, c = !r && !m.isCollapsed && o.opened;\n a ? this.activateToolbox() : !l && !c && this.activateBlockSettings();\n }\n /**\n * Add drop target styles\n *\n * @param {DragEvent} event - drag over event\n */\n dragOver(e) {\n const t = this.Editor.BlockManager.getBlockByChildNode(e.target);\n t.dropTarget = !0;\n }\n /**\n * Remove drop target style\n *\n * @param {DragEvent} event - drag leave event\n */\n dragLeave(e) {\n const t = this.Editor.BlockManager.getBlockByChildNode(e.target);\n t.dropTarget = !1;\n }\n /**\n * Copying selected blocks\n * Before putting to the clipboard we sanitize all blocks and then copy to the clipboard\n *\n * @param {ClipboardEvent} event - clipboard event\n */\n handleCommandC(e) {\n const { BlockSelection: t } = this.Editor;\n t.anyBlockSelected && t.copySelectedBlocks(e);\n }\n /**\n * Copy and Delete selected Blocks\n *\n * @param {ClipboardEvent} event - clipboard event\n */\n handleCommandX(e) {\n const { BlockSelection: t, BlockManager: o, Caret: i } = this.Editor;\n t.anyBlockSelected && t.copySelectedBlocks(e).then(() => {\n const n = o.removeSelectedBlocks(), r = o.insertDefaultBlockAtIndex(n, !0);\n i.setToBlock(r, i.positions.START), t.clearSelection(e);\n });\n }\n /**\n * ENTER pressed on block\n *\n * @param {KeyboardEvent} event - keydown\n */\n enter(e) {\n const { BlockManager: t, UI: o } = this.Editor;\n if (t.currentBlock.tool.isLineBreaksEnabled || o.someToolbarOpened && o.someFlipperButtonFocused || e.shiftKey)\n return;\n let n = this.Editor.BlockManager.currentBlock;\n this.Editor.Caret.isAtStart && !this.Editor.BlockManager.currentBlock.hasMedia ? this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex) : this.Editor.Caret.isAtEnd ? n = this.Editor.BlockManager.insertDefaultBlockAtIndex(this.Editor.BlockManager.currentBlockIndex + 1) : n = this.Editor.BlockManager.split(), this.Editor.Caret.setToBlock(n), this.Editor.Toolbar.moveAndOpen(n), e.preventDefault();\n }\n /**\n * Handle backspace keydown on Block\n *\n * @param {KeyboardEvent} event - keydown\n */\n backspace(e) {\n const { BlockManager: t, Caret: o } = this.Editor, { currentBlock: i, previousBlock: n } = t;\n if (!m.isCollapsed || !o.isAtStart)\n return;\n if (e.preventDefault(), this.Editor.Toolbar.close(), !(i.currentInput === i.firstInput)) {\n o.navigatePrevious();\n return;\n }\n if (n === null)\n return;\n if (n.isEmpty) {\n t.removeBlock(n);\n return;\n }\n if (i.isEmpty) {\n t.removeBlock(i);\n const l = t.currentBlock;\n o.setToBlock(l, o.positions.END);\n return;\n }\n Je(i, n) ? this.mergeBlocks(n, i) : o.setToBlock(n, o.positions.END);\n }\n /**\n * Handles delete keydown on Block\n * Removes char after the caret.\n * If caret is at the end of the block, merge next block with current\n *\n * @param {KeyboardEvent} event - keydown\n */\n delete(e) {\n const { BlockManager: t, Caret: o } = this.Editor, { currentBlock: i, nextBlock: n } = t;\n if (!m.isCollapsed || !o.isAtEnd)\n return;\n if (e.preventDefault(), this.Editor.Toolbar.close(), !(i.currentInput === i.lastInput)) {\n o.navigateNext();\n return;\n }\n if (n === null)\n return;\n if (n.isEmpty) {\n t.removeBlock(n);\n return;\n }\n if (i.isEmpty) {\n t.removeBlock(i), o.setToBlock(n, o.positions.START);\n return;\n }\n Je(i, n) ? this.mergeBlocks(i, n) : o.setToBlock(n, o.positions.START);\n }\n /**\n * Merge passed Blocks\n *\n * @param targetBlock - to which Block we want to merge\n * @param blockToMerge - what Block we want to merge\n */\n mergeBlocks(e, t) {\n const { BlockManager: o, Caret: i, Toolbar: n } = this.Editor;\n i.createShadow(e.pluginsContent), o.mergeBlocks(e, t).then(() => {\n window.requestAnimationFrame(() => {\n i.restoreCaret(e.pluginsContent), e.pluginsContent.normalize(), n.close();\n });\n });\n }\n /**\n * Handle right and down keyboard keys\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n arrowRightAndDown(e) {\n const t = G.usedKeys.includes(e.keyCode) && (!e.shiftKey || e.keyCode === B.TAB);\n if (this.Editor.UI.someToolbarOpened && t)\n return;\n this.Editor.BlockManager.clearFocused(), this.Editor.Toolbar.close();\n const o = this.Editor.Caret.isAtEnd || this.Editor.BlockSelection.anyBlockSelected;\n if (e.shiftKey && e.keyCode === B.DOWN && o) {\n this.Editor.CrossBlockSelection.toggleBlockSelectedState();\n return;\n }\n (e.keyCode === B.DOWN || e.keyCode === B.RIGHT && !this.isRtl ? this.Editor.Caret.navigateNext() : this.Editor.Caret.navigatePrevious()) ? e.preventDefault() : re(() => {\n this.Editor.BlockManager.currentBlock && this.Editor.BlockManager.currentBlock.updateCurrentInput();\n }, 20)(), this.Editor.BlockSelection.clearSelection(e);\n }\n /**\n * Handle left and up keyboard keys\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n arrowLeftAndUp(e) {\n if (this.Editor.UI.someToolbarOpened) {\n if (G.usedKeys.includes(e.keyCode) && (!e.shiftKey || e.keyCode === B.TAB))\n return;\n this.Editor.UI.closeAllToolbars();\n }\n this.Editor.BlockManager.clearFocused(), this.Editor.Toolbar.close();\n const t = this.Editor.Caret.isAtStart || this.Editor.BlockSelection.anyBlockSelected;\n if (e.shiftKey && e.keyCode === B.UP && t) {\n this.Editor.CrossBlockSelection.toggleBlockSelectedState(!1);\n return;\n }\n (e.keyCode === B.UP || e.keyCode === B.LEFT && !this.isRtl ? this.Editor.Caret.navigatePrevious() : this.Editor.Caret.navigateNext()) ? e.preventDefault() : re(() => {\n this.Editor.BlockManager.currentBlock && this.Editor.BlockManager.currentBlock.updateCurrentInput();\n }, 20)(), this.Editor.BlockSelection.clearSelection(e);\n }\n /**\n * Cases when we need to close Toolbar\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n needToolbarClosing(e) {\n const t = e.keyCode === B.ENTER && this.Editor.Toolbar.toolbox.opened, o = e.keyCode === B.ENTER && this.Editor.BlockSettings.opened, i = e.keyCode === B.ENTER && this.Editor.InlineToolbar.opened, n = e.keyCode === B.ENTER && this.Editor.ConversionToolbar.opened, r = e.keyCode === B.TAB;\n return !(e.shiftKey || r || t || o || i || n);\n }\n /**\n * If Toolbox is not open, then just open it and show plus button\n */\n activateToolbox() {\n this.Editor.Toolbar.opened || this.Editor.Toolbar.moveAndOpen(), this.Editor.Toolbar.toolbox.open();\n }\n /**\n * Open Toolbar and show BlockSettings before flipping Tools\n */\n activateBlockSettings() {\n this.Editor.Toolbar.opened || (this.Editor.BlockManager.currentBlock.focused = !0, this.Editor.Toolbar.moveAndOpen()), this.Editor.BlockSettings.opened || this.Editor.BlockSettings.open();\n }\n}\nclass Te {\n /**\n * @class\n * @param {HTMLElement} workingArea — editor`s working node\n */\n constructor(e) {\n this.blocks = [], this.workingArea = e;\n }\n /**\n * Get length of Block instances array\n *\n * @returns {number}\n */\n get length() {\n return this.blocks.length;\n }\n /**\n * Get Block instances array\n *\n * @returns {Block[]}\n */\n get array() {\n return this.blocks;\n }\n /**\n * Get blocks html elements array\n *\n * @returns {HTMLElement[]}\n */\n get nodes() {\n return st(this.workingArea.children);\n }\n /**\n * Proxy trap to implement array-like setter\n *\n * @example\n * blocks[0] = new Block(...)\n * @param {Blocks} instance — Blocks instance\n * @param {PropertyKey} property — block index or any Blocks class property key to set\n * @param {Block} value — value to set\n * @returns {boolean}\n */\n static set(e, t, o) {\n return isNaN(Number(t)) ? (Reflect.set(e, t, o), !0) : (e.insert(+t, o), !0);\n }\n /**\n * Proxy trap to implement array-like getter\n *\n * @param {Blocks} instance — Blocks instance\n * @param {PropertyKey} property — Blocks class property key\n * @returns {Block|*}\n */\n static get(e, t) {\n return isNaN(Number(t)) ? Reflect.get(e, t) : e.get(+t);\n }\n /**\n * Push new Block to the blocks array and append it to working area\n *\n * @param {Block} block - Block to add\n */\n push(e) {\n this.blocks.push(e), this.insertToDOM(e);\n }\n /**\n * Swaps blocks with indexes first and second\n *\n * @param {number} first - first block index\n * @param {number} second - second block index\n * @deprecated — use 'move' instead\n */\n swap(e, t) {\n const o = this.blocks[t];\n d.swap(this.blocks[e].holder, o.holder), this.blocks[t] = this.blocks[e], this.blocks[e] = o;\n }\n /**\n * Move a block from one to another index\n *\n * @param {number} toIndex - new index of the block\n * @param {number} fromIndex - block to move\n */\n move(e, t) {\n const o = this.blocks.splice(t, 1)[0], i = e - 1, n = Math.max(0, i), r = this.blocks[n];\n e > 0 ? this.insertToDOM(o, \"afterend\", r) : this.insertToDOM(o, \"beforebegin\", r), this.blocks.splice(e, 0, o);\n const a = this.composeBlockEvent(\"move\", {\n fromIndex: t,\n toIndex: e\n });\n o.call(q.MOVED, a);\n }\n /**\n * Insert new Block at passed index\n *\n * @param {number} index — index to insert Block\n * @param {Block} block — Block to insert\n * @param {boolean} replace — it true, replace block on given index\n */\n insert(e, t, o = !1) {\n if (!this.length) {\n this.push(t);\n return;\n }\n e > this.length && (e = this.length), o && (this.blocks[e].holder.remove(), this.blocks[e].call(q.REMOVED));\n const i = o ? 1 : 0;\n if (this.blocks.splice(e, i, t), e > 0) {\n const n = this.blocks[e - 1];\n this.insertToDOM(t, \"afterend\", n);\n } else {\n const n = this.blocks[e + 1];\n n ? this.insertToDOM(t, \"beforebegin\", n) : this.insertToDOM(t);\n }\n }\n /**\n * Replaces block under passed index with passed block\n *\n * @param index - index of existed block\n * @param block - new block\n */\n replace(e, t) {\n if (this.blocks[e] === void 0)\n throw Error(\"Incorrect index\");\n this.blocks[e].holder.replaceWith(t.holder), this.blocks[e] = t;\n }\n /**\n * Inserts several blocks at once\n *\n * @param blocks - blocks to insert\n * @param index - index to insert blocks at\n */\n insertMany(e, t) {\n const o = new DocumentFragment();\n for (const i of e)\n o.appendChild(i.holder);\n if (this.length > 0) {\n if (t > 0) {\n const i = Math.min(t - 1, this.length - 1);\n this.blocks[i].holder.after(o);\n } else\n t === 0 && this.workingArea.prepend(o);\n this.blocks.splice(t, 0, ...e);\n } else\n this.blocks.push(...e), this.workingArea.appendChild(o);\n e.forEach((i) => i.call(q.RENDERED));\n }\n /**\n * Remove block\n *\n * @param {number} index - index of Block to remove\n */\n remove(e) {\n isNaN(e) && (e = this.length - 1), this.blocks[e].holder.remove(), this.blocks[e].call(q.REMOVED), this.blocks.splice(e, 1);\n }\n /**\n * Remove all blocks\n */\n removeAll() {\n this.workingArea.innerHTML = \"\", this.blocks.forEach((e) => e.call(q.REMOVED)), this.blocks.length = 0;\n }\n /**\n * Insert Block after passed target\n *\n * @todo decide if this method is necessary\n * @param {Block} targetBlock — target after which Block should be inserted\n * @param {Block} newBlock — Block to insert\n */\n insertAfter(e, t) {\n const o = this.blocks.indexOf(e);\n this.insert(o + 1, t);\n }\n /**\n * Get Block by index\n *\n * @param {number} index — Block index\n * @returns {Block}\n */\n get(e) {\n return this.blocks[e];\n }\n /**\n * Return index of passed Block\n *\n * @param {Block} block - Block to find\n * @returns {number}\n */\n indexOf(e) {\n return this.blocks.indexOf(e);\n }\n /**\n * Insert new Block into DOM\n *\n * @param {Block} block - Block to insert\n * @param {InsertPosition} position — insert position (if set, will use insertAdjacentElement)\n * @param {Block} target — Block related to position\n */\n insertToDOM(e, t, o) {\n t ? o.holder.insertAdjacentElement(t, e.holder) : this.workingArea.appendChild(e.holder), e.call(q.RENDERED);\n }\n /**\n * Composes Block event with passed type and details\n *\n * @param {string} type - event type\n * @param {object} detail - event detail\n */\n composeBlockEvent(e, t) {\n return new CustomEvent(e, {\n detail: t\n });\n }\n}\nconst et = \"block-removed\", tt = \"block-added\", qo = \"block-moved\", ot = \"block-changed\";\nclass Zo {\n constructor() {\n this.completed = Promise.resolve();\n }\n /**\n * Add new promise to queue\n *\n * @param operation - promise should be added to queue\n */\n add(e) {\n return new Promise((t, o) => {\n this.completed = this.completed.then(e).then(t).catch(o);\n });\n }\n}\nclass Go extends C {\n constructor() {\n super(...arguments), this._currentBlockIndex = -1, this._blocks = null;\n }\n /**\n * Returns current Block index\n *\n * @returns {number}\n */\n get currentBlockIndex() {\n return this._currentBlockIndex;\n }\n /**\n * Set current Block index and fire Block lifecycle callbacks\n *\n * @param {number} newIndex - index of Block to set as current\n */\n set currentBlockIndex(e) {\n this._currentBlockIndex = e;\n }\n /**\n * returns first Block\n *\n * @returns {Block}\n */\n get firstBlock() {\n return this._blocks[0];\n }\n /**\n * returns last Block\n *\n * @returns {Block}\n */\n get lastBlock() {\n return this._blocks[this._blocks.length - 1];\n }\n /**\n * Get current Block instance\n *\n * @returns {Block}\n */\n get currentBlock() {\n return this._blocks[this.currentBlockIndex];\n }\n /**\n * Set passed Block as a current\n *\n * @param block - block to set as a current\n */\n set currentBlock(e) {\n this.currentBlockIndex = this.getBlockIndex(e);\n }\n /**\n * Returns next Block instance\n *\n * @returns {Block|null}\n */\n get nextBlock() {\n return this.currentBlockIndex === this._blocks.length - 1 ? null : this._blocks[this.currentBlockIndex + 1];\n }\n /**\n * Return first Block with inputs after current Block\n *\n * @returns {Block | undefined}\n */\n get nextContentfulBlock() {\n return this.blocks.slice(this.currentBlockIndex + 1).find((t) => !!t.inputs.length);\n }\n /**\n * Return first Block with inputs before current Block\n *\n * @returns {Block | undefined}\n */\n get previousContentfulBlock() {\n return this.blocks.slice(0, this.currentBlockIndex).reverse().find((t) => !!t.inputs.length);\n }\n /**\n * Returns previous Block instance\n *\n * @returns {Block|null}\n */\n get previousBlock() {\n return this.currentBlockIndex === 0 ? null : this._blocks[this.currentBlockIndex - 1];\n }\n /**\n * Get array of Block instances\n *\n * @returns {Block[]} {@link Blocks#array}\n */\n get blocks() {\n return this._blocks.array;\n }\n /**\n * Check if each Block is empty\n *\n * @returns {boolean}\n */\n get isEditorEmpty() {\n return this.blocks.every((e) => e.isEmpty);\n }\n /**\n * Should be called after Editor.UI preparation\n * Define this._blocks property\n */\n prepare() {\n const e = new Te(this.Editor.UI.nodes.redactor);\n this._blocks = new Proxy(e, {\n set: Te.set,\n get: Te.get\n }), this.listeners.on(\n document,\n \"copy\",\n (t) => this.Editor.BlockEvents.handleCommandC(t)\n );\n }\n /**\n * Toggle read-only state\n *\n * If readOnly is true:\n * - Unbind event handlers from created Blocks\n *\n * if readOnly is false:\n * - Bind event handlers to all existing Blocks\n *\n * @param {boolean} readOnlyEnabled - \"read only\" state\n */\n toggleReadOnly(e) {\n e ? this.disableModuleBindings() : this.enableModuleBindings();\n }\n /**\n * Creates Block instance by tool name\n *\n * @param {object} options - block creation options\n * @param {string} options.tool - tools passed in editor config {@link EditorConfig#tools}\n * @param {string} [options.id] - unique id for this block\n * @param {BlockToolData} [options.data] - constructor params\n * @returns {Block}\n */\n composeBlock({\n tool: e,\n data: t = {},\n id: o = void 0,\n tunes: i = {}\n }) {\n const n = this.Editor.ReadOnly.isEnabled, r = this.Editor.Tools.blockTools.get(e), a = new F({\n id: o,\n data: t,\n tool: r,\n api: this.Editor.API,\n readOnly: n,\n tunesData: i\n }, this.eventsDispatcher);\n return n || window.requestIdleCallback(() => {\n this.bindBlockEvents(a);\n }, { timeout: 2e3 }), a;\n }\n /**\n * Insert new block into _blocks\n *\n * @param {object} options - insert options\n * @param {string} [options.id] - block's unique id\n * @param {string} [options.tool] - plugin name, by default method inserts the default block type\n * @param {object} [options.data] - plugin data\n * @param {number} [options.index] - index where to insert new Block\n * @param {boolean} [options.needToFocus] - flag shows if needed to update current Block index\n * @param {boolean} [options.replace] - flag shows if block by passed index should be replaced with inserted one\n * @returns {Block}\n */\n insert({\n id: e = void 0,\n tool: t = this.config.defaultBlock,\n data: o = {},\n index: i,\n needToFocus: n = !0,\n replace: r = !1,\n tunes: a = {}\n } = {}) {\n let l = i;\n l === void 0 && (l = this.currentBlockIndex + (r ? 0 : 1));\n const c = this.composeBlock({\n id: e,\n tool: t,\n data: o,\n tunes: a\n });\n return r && this.blockDidMutated(et, this.getBlockByIndex(l), {\n index: l\n }), this._blocks.insert(l, c, r), this.blockDidMutated(tt, c, {\n index: l\n }), n ? this.currentBlockIndex = l : l <= this.currentBlockIndex && this.currentBlockIndex++, c;\n }\n /**\n * Inserts several blocks at once\n *\n * @param blocks - blocks to insert\n * @param index - index where to insert\n */\n insertMany(e, t = 0) {\n this._blocks.insertMany(e, t);\n }\n /**\n * Update Block data.\n *\n * Currently we don't have an 'update' method in the Tools API, so we just create a new block with the same id and type\n * Should not trigger 'block-removed' or 'block-added' events\n *\n * @param block - block to update\n * @param data - new data\n */\n async update(e, t) {\n const o = await e.data, i = this.composeBlock({\n id: e.id,\n tool: e.name,\n data: Object.assign({}, o, t),\n tunes: e.tunes\n }), n = this.getBlockIndex(e);\n return this._blocks.replace(n, i), this.blockDidMutated(ot, i, {\n index: n\n }), i;\n }\n /**\n * Replace passed Block with the new one with specified Tool and data\n *\n * @param block - block to replace\n * @param newTool - new Tool name\n * @param data - new Tool data\n */\n replace(e, t, o) {\n const i = this.getBlockIndex(e);\n this.insert({\n tool: t,\n data: o,\n index: i,\n replace: !0\n });\n }\n /**\n * Insert pasted content. Call onPaste callback after insert.\n *\n * @param {string} toolName - name of Tool to insert\n * @param {PasteEvent} pasteEvent - pasted data\n * @param {boolean} replace - should replace current block\n */\n paste(e, t, o = !1) {\n const i = this.insert({\n tool: e,\n replace: o\n });\n try {\n i.call(q.ON_PASTE, t);\n } catch (n) {\n L(`${e}: onPaste callback call is failed`, \"error\", n);\n }\n return i;\n }\n /**\n * Insert new default block at passed index\n *\n * @param {number} index - index where Block should be inserted\n * @param {boolean} needToFocus - if true, updates current Block index\n *\n * TODO: Remove method and use insert() with index instead (?)\n * @returns {Block} inserted Block\n */\n insertDefaultBlockAtIndex(e, t = !1) {\n const o = this.composeBlock({ tool: this.config.defaultBlock });\n return this._blocks[e] = o, this.blockDidMutated(tt, o, {\n index: e\n }), t ? this.currentBlockIndex = e : e <= this.currentBlockIndex && this.currentBlockIndex++, o;\n }\n /**\n * Always inserts at the end\n *\n * @returns {Block}\n */\n insertAtEnd() {\n return this.currentBlockIndex = this.blocks.length - 1, this.insert();\n }\n /**\n * Merge two blocks\n *\n * @param {Block} targetBlock - previous block will be append to this block\n * @param {Block} blockToMerge - block that will be merged with target block\n * @returns {Promise} - the sequence that can be continued\n */\n async mergeBlocks(e, t) {\n const o = await t.data;\n V(o) || await e.mergeWith(o), this.removeBlock(t), this.currentBlockIndex = this._blocks.indexOf(e);\n }\n /**\n * Remove passed Block\n *\n * @param block - Block to remove\n * @param addLastBlock - if true, adds new default block at the end. @todo remove this logic and use event-bus instead\n */\n removeBlock(e, t = !0) {\n return new Promise((o) => {\n const i = this._blocks.indexOf(e);\n if (!this.validateIndex(i))\n throw new Error(\"Can't find a Block to remove\");\n e.destroy(), this._blocks.remove(i), this.blockDidMutated(et, e, {\n index: i\n }), this.currentBlockIndex >= i && this.currentBlockIndex--, this.blocks.length ? i === 0 && (this.currentBlockIndex = 0) : (this.currentBlockIndex = -1, t && this.insert()), o();\n });\n }\n /**\n * Remove only selected Blocks\n * and returns first Block index where started removing...\n *\n * @returns {number|undefined}\n */\n removeSelectedBlocks() {\n let e;\n for (let t = this.blocks.length - 1; t >= 0; t--)\n this.blocks[t].selected && (this.removeBlock(this.blocks[t]), e = t);\n return e;\n }\n /**\n * Attention!\n * After removing insert the new default typed Block and focus on it\n * Removes all blocks\n */\n removeAllBlocks() {\n for (let e = this.blocks.length - 1; e >= 0; e--)\n this._blocks.remove(e);\n this.currentBlockIndex = -1, this.insert(), this.currentBlock.firstInput.focus();\n }\n /**\n * Split current Block\n * 1. Extract content from Caret position to the Block`s end\n * 2. Insert a new Block below current one with extracted content\n *\n * @returns {Block}\n */\n split() {\n const e = this.Editor.Caret.extractFragmentFromCaretPosition(), t = d.make(\"div\");\n t.appendChild(e);\n const o = {\n text: d.isEmpty(t) ? \"\" : t.innerHTML\n };\n return this.insert({ data: o });\n }\n /**\n * Returns Block by passed index\n *\n * @param {number} index - index to get. -1 to get last\n * @returns {Block}\n */\n getBlockByIndex(e) {\n return e === -1 && (e = this._blocks.length - 1), this._blocks[e];\n }\n /**\n * Returns an index for passed Block\n *\n * @param block - block to find index\n */\n getBlockIndex(e) {\n return this._blocks.indexOf(e);\n }\n /**\n * Returns the Block by passed id\n *\n * @param id - id of block to get\n * @returns {Block}\n */\n getBlockById(e) {\n return this._blocks.array.find((t) => t.id === e);\n }\n /**\n * Get Block instance by html element\n *\n * @param {Node} element - html element to get Block by\n */\n getBlock(e) {\n d.isElement(e) || (e = e.parentNode);\n const t = this._blocks.nodes, o = e.closest(`.${F.CSS.wrapper}`), i = t.indexOf(o);\n if (i >= 0)\n return this._blocks[i];\n }\n /**\n * Remove selection from all Blocks then highlight only Current Block\n */\n highlightCurrentNode() {\n this.clearFocused(), this.currentBlock.focused = !0;\n }\n /**\n * Remove selection from all Blocks\n */\n clearFocused() {\n this.blocks.forEach((e) => {\n e.focused = !1;\n });\n }\n /**\n * 1) Find first-level Block from passed child Node\n * 2) Mark it as current\n *\n * @param {Node} childNode - look ahead from this node.\n * @returns {Block | undefined} can return undefined in case when the passed child note is not a part of the current editor instance\n */\n setCurrentBlockByChildNode(e) {\n d.isElement(e) || (e = e.parentNode);\n const t = e.closest(`.${F.CSS.wrapper}`);\n if (!t)\n return;\n const o = t.closest(`.${this.Editor.UI.CSS.editorWrapper}`);\n if (o != null && o.isEqualNode(this.Editor.UI.nodes.wrapper))\n return this.currentBlockIndex = this._blocks.nodes.indexOf(t), this.currentBlock.updateCurrentInput(), this.currentBlock;\n }\n /**\n * Return block which contents passed node\n *\n * @param {Node} childNode - node to get Block by\n * @returns {Block}\n */\n getBlockByChildNode(e) {\n d.isElement(e) || (e = e.parentNode);\n const t = e.closest(`.${F.CSS.wrapper}`);\n return this.blocks.find((o) => o.holder === t);\n }\n /**\n * Swap Blocks Position\n *\n * @param {number} fromIndex - index of first block\n * @param {number} toIndex - index of second block\n * @deprecated — use 'move' instead\n */\n swap(e, t) {\n this._blocks.swap(e, t), this.currentBlockIndex = t;\n }\n /**\n * Move a block to a new index\n *\n * @param {number} toIndex - index where to move Block\n * @param {number} fromIndex - index of Block to move\n */\n move(e, t = this.currentBlockIndex) {\n if (isNaN(e) || isNaN(t)) {\n L(\"Warning during 'move' call: incorrect indices provided.\", \"warn\");\n return;\n }\n if (!this.validateIndex(e) || !this.validateIndex(t)) {\n L(\"Warning during 'move' call: indices cannot be lower than 0 or greater than the amount of blocks.\", \"warn\");\n return;\n }\n this._blocks.move(e, t), this.currentBlockIndex = e, this.blockDidMutated(qo, this.currentBlock, {\n fromIndex: t,\n toIndex: e\n });\n }\n /**\n * Converts passed Block to the new Tool\n * Uses Conversion Config\n *\n * @param blockToConvert - Block that should be converted\n * @param targetToolName - name of the Tool to convert to\n * @param blockDataOverrides - optional new Block data overrides\n */\n async convert(e, t, o) {\n if (!await e.save())\n throw new Error(\"Could not convert Block. Failed to extract original Block data.\");\n const n = this.Editor.Tools.blockTools.get(t);\n if (!n)\n throw new Error(`Could not convert Block. Tool «${t}» not found.`);\n const r = await e.exportDataAsString(), a = Z(\n r,\n n.sanitizeConfig\n );\n let l = Jt(a, n.conversionConfig);\n o && (l = Object.assign(l, o)), this.replace(e, n.name, l);\n }\n /**\n * Sets current Block Index -1 which means unknown\n * and clear highlights\n */\n dropPointer() {\n this.currentBlockIndex = -1, this.clearFocused();\n }\n /**\n * Clears Editor\n *\n * @param {boolean} needToAddDefaultBlock - 1) in internal calls (for example, in api.blocks.render)\n * we don't need to add an empty default block\n * 2) in api.blocks.clear we should add empty block\n */\n async clear(e = !1) {\n const t = new Zo();\n this.blocks.forEach((o) => {\n t.add(async () => {\n await this.removeBlock(o, !1);\n });\n }), await t.completed, this.dropPointer(), e && this.insert(), this.Editor.UI.checkEmptiness();\n }\n /**\n * Cleans up all the block tools' resources\n * This is called when editor is destroyed\n */\n async destroy() {\n await Promise.all(this.blocks.map((e) => e.destroy()));\n }\n /**\n * Bind Block events\n *\n * @param {Block} block - Block to which event should be bound\n */\n bindBlockEvents(e) {\n const { BlockEvents: t } = this.Editor;\n this.readOnlyMutableListeners.on(e.holder, \"keydown\", (o) => {\n t.keydown(o);\n }), this.readOnlyMutableListeners.on(e.holder, \"keyup\", (o) => {\n t.keyup(o);\n }), this.readOnlyMutableListeners.on(e.holder, \"dragover\", (o) => {\n t.dragOver(o);\n }), this.readOnlyMutableListeners.on(e.holder, \"dragleave\", (o) => {\n t.dragLeave(o);\n }), e.on(\"didMutated\", (o) => this.blockDidMutated(ot, o, {\n index: this.getBlockIndex(o)\n }));\n }\n /**\n * Disable mutable handlers and bindings\n */\n disableModuleBindings() {\n this.readOnlyMutableListeners.clearAll();\n }\n /**\n * Enables all module handlers and bindings for all Blocks\n */\n enableModuleBindings() {\n this.readOnlyMutableListeners.on(\n document,\n \"cut\",\n (e) => this.Editor.BlockEvents.handleCommandX(e)\n ), this.blocks.forEach((e) => {\n this.bindBlockEvents(e);\n });\n }\n /**\n * Validates that the given index is not lower than 0 or higher than the amount of blocks\n *\n * @param {number} index - index of blocks array to validate\n * @returns {boolean}\n */\n validateIndex(e) {\n return !(e < 0 || e >= this._blocks.length);\n }\n /**\n * Block mutation callback\n *\n * @param mutationType - what happened with block\n * @param block - mutated block\n * @param detailData - additional data to pass with change event\n */\n blockDidMutated(e, t, o) {\n const i = new CustomEvent(e, {\n detail: {\n target: new ee(t),\n ...o\n }\n });\n return this.eventsDispatcher.emit(ct, {\n event: i\n }), t;\n }\n}\nclass Jo extends C {\n constructor() {\n super(...arguments), this.anyBlockSelectedCache = null, this.needToSelectAll = !1, this.nativeInputSelected = !1, this.readyToBlockSelection = !1;\n }\n /**\n * Sanitizer Config\n *\n * @returns {SanitizerConfig}\n */\n get sanitizerConfig() {\n return {\n p: {},\n h1: {},\n h2: {},\n h3: {},\n h4: {},\n h5: {},\n h6: {},\n ol: {},\n ul: {},\n li: {},\n br: !0,\n img: {\n src: !0,\n width: !0,\n height: !0\n },\n a: {\n href: !0\n },\n b: {},\n i: {},\n u: {}\n };\n }\n /**\n * Flag that identifies all Blocks selection\n *\n * @returns {boolean}\n */\n get allBlocksSelected() {\n const { BlockManager: e } = this.Editor;\n return e.blocks.every((t) => t.selected === !0);\n }\n /**\n * Set selected all blocks\n *\n * @param {boolean} state - state to set\n */\n set allBlocksSelected(e) {\n const { BlockManager: t } = this.Editor;\n t.blocks.forEach((o) => {\n o.selected = e;\n }), this.clearCache();\n }\n /**\n * Flag that identifies any Block selection\n *\n * @returns {boolean}\n */\n get anyBlockSelected() {\n const { BlockManager: e } = this.Editor;\n return this.anyBlockSelectedCache === null && (this.anyBlockSelectedCache = e.blocks.some((t) => t.selected === !0)), this.anyBlockSelectedCache;\n }\n /**\n * Return selected Blocks array\n *\n * @returns {Block[]}\n */\n get selectedBlocks() {\n return this.Editor.BlockManager.blocks.filter((e) => e.selected);\n }\n /**\n * Module Preparation\n * Registers Shortcuts CMD+A and CMD+C\n * to select all and copy them\n */\n prepare() {\n this.selection = new m(), le.add({\n name: \"CMD+A\",\n handler: (e) => {\n const { BlockManager: t, ReadOnly: o } = this.Editor;\n if (o.isEnabled) {\n e.preventDefault(), this.selectAllBlocks();\n return;\n }\n t.currentBlock && this.handleCommandA(e);\n },\n on: this.Editor.UI.nodes.redactor\n });\n }\n /**\n * Toggle read-only state\n *\n * - Remove all ranges\n * - Unselect all Blocks\n */\n toggleReadOnly() {\n m.get().removeAllRanges(), this.allBlocksSelected = !1;\n }\n /**\n * Remove selection of Block\n *\n * @param {number?} index - Block index according to the BlockManager's indexes\n */\n unSelectBlockByIndex(e) {\n const { BlockManager: t } = this.Editor;\n let o;\n isNaN(e) ? o = t.currentBlock : o = t.getBlockByIndex(e), o.selected = !1, this.clearCache();\n }\n /**\n * Clear selection from Blocks\n *\n * @param {Event} reason - event caused clear of selection\n * @param {boolean} restoreSelection - if true, restore saved selection\n */\n clearSelection(e, t = !1) {\n const { BlockManager: o, Caret: i, RectangleSelection: n } = this.Editor;\n this.needToSelectAll = !1, this.nativeInputSelected = !1, this.readyToBlockSelection = !1;\n const r = e && e instanceof KeyboardEvent, a = r && nt(e.keyCode);\n if (this.anyBlockSelected && r && a && !m.isSelectionExists) {\n const l = o.removeSelectedBlocks();\n o.insertDefaultBlockAtIndex(l, !0), i.setToBlock(o.currentBlock), re(() => {\n const c = e.key;\n i.insertContentAtCaretPosition(c.length > 1 ? \"\" : c);\n }, 20)();\n }\n if (this.Editor.CrossBlockSelection.clear(e), !this.anyBlockSelected || n.isRectActivated()) {\n this.Editor.RectangleSelection.clearSelection();\n return;\n }\n t && this.selection.restore(), this.allBlocksSelected = !1;\n }\n /**\n * Reduce each Block and copy its content\n *\n * @param {ClipboardEvent} e - copy/cut event\n * @returns {Promise}\n */\n copySelectedBlocks(e) {\n e.preventDefault();\n const t = d.make(\"div\");\n this.selectedBlocks.forEach((n) => {\n const r = Z(n.holder.innerHTML, this.sanitizerConfig), a = d.make(\"p\");\n a.innerHTML = r, t.appendChild(a);\n });\n const o = Array.from(t.childNodes).map((n) => n.textContent).join(`\n\n`), i = t.innerHTML;\n return e.clipboardData.setData(\"text/plain\", o), e.clipboardData.setData(\"text/html\", i), Promise.all(this.selectedBlocks.map((n) => n.save())).then((n) => {\n try {\n e.clipboardData.setData(this.Editor.Paste.MIME_TYPE, JSON.stringify(n));\n } catch {\n }\n });\n }\n /**\n * select Block\n *\n * @param {number?} index - Block index according to the BlockManager's indexes\n */\n selectBlockByIndex(e) {\n const { BlockManager: t } = this.Editor;\n t.clearFocused();\n let o;\n isNaN(e) ? o = t.currentBlock : o = t.getBlockByIndex(e), this.selection.save(), m.get().removeAllRanges(), o.selected = !0, this.clearCache(), this.Editor.InlineToolbar.close();\n }\n /**\n * Clear anyBlockSelected cache\n */\n clearCache() {\n this.anyBlockSelectedCache = null;\n }\n /**\n * Module destruction\n * De-registers Shortcut CMD+A\n */\n destroy() {\n le.remove(this.Editor.UI.nodes.redactor, \"CMD+A\");\n }\n /**\n * First CMD+A selects all input content by native behaviour,\n * next CMD+A keypress selects all blocks\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n handleCommandA(e) {\n if (this.Editor.RectangleSelection.clearSelection(), d.isNativeInput(e.target) && !this.readyToBlockSelection) {\n this.readyToBlockSelection = !0;\n return;\n }\n const o = this.Editor.BlockManager.getBlock(e.target).inputs;\n if (o.length > 1 && !this.readyToBlockSelection) {\n this.readyToBlockSelection = !0;\n return;\n }\n if (o.length === 1 && !this.needToSelectAll) {\n this.needToSelectAll = !0;\n return;\n }\n this.needToSelectAll ? (e.preventDefault(), this.selectAllBlocks(), this.needToSelectAll = !1, this.readyToBlockSelection = !1, this.Editor.ConversionToolbar.close()) : this.readyToBlockSelection && (e.preventDefault(), this.selectBlockByIndex(), this.needToSelectAll = !0);\n }\n /**\n * Select All Blocks\n * Each Block has selected setter that makes Block copyable\n */\n selectAllBlocks() {\n this.selection.save(), m.get().removeAllRanges(), this.allBlocksSelected = !0, this.Editor.InlineToolbar.close();\n }\n}\nclass ve extends C {\n /**\n * Allowed caret positions in input\n *\n * @static\n * @returns {{START: string, END: string, DEFAULT: string}}\n */\n get positions() {\n return {\n START: \"start\",\n END: \"end\",\n DEFAULT: \"default\"\n };\n }\n /**\n * Elements styles that can be useful for Caret Module\n */\n static get CSS() {\n return {\n shadowCaret: \"cdx-shadow-caret\"\n };\n }\n /**\n * Get's deepest first node and checks if offset is zero\n *\n * @returns {boolean}\n */\n get isAtStart() {\n const e = m.get(), t = d.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput);\n let o = e.focusNode;\n if (d.isNativeInput(t))\n return t.selectionEnd === 0;\n if (!e.anchorNode)\n return !1;\n let i = o.textContent.search(/\\S/);\n i === -1 && (i = 0);\n let n = e.focusOffset;\n return o.nodeType !== Node.TEXT_NODE && o.childNodes.length && (o.childNodes[n] ? (o = o.childNodes[n], n = 0) : (o = o.childNodes[n - 1], n = o.textContent.length)), (d.isLineBreakTag(t) || d.isEmpty(t)) && this.getHigherLevelSiblings(o, \"left\").every((l) => {\n const c = d.isLineBreakTag(l), u = l.children.length === 1 && d.isLineBreakTag(l.children[0]), h = c || u;\n return d.isEmpty(l) && !h;\n }) && n === i ? !0 : t === null || o === t && n <= i;\n }\n /**\n * Get's deepest last node and checks if offset is last node text length\n *\n * @returns {boolean}\n */\n get isAtEnd() {\n const e = m.get();\n let t = e.focusNode;\n const o = d.getDeepestNode(this.Editor.BlockManager.currentBlock.currentInput, !0);\n if (d.isNativeInput(o))\n return o.selectionEnd === o.value.length;\n if (!e.focusNode)\n return !1;\n let i = e.focusOffset;\n if (t.nodeType !== Node.TEXT_NODE && t.childNodes.length && (t.childNodes[i - 1] ? (t = t.childNodes[i - 1], i = t.textContent.length) : (t = t.childNodes[0], i = 0)), d.isLineBreakTag(o) || d.isEmpty(o)) {\n const r = this.getHigherLevelSiblings(t, \"right\");\n if (r.every((l, c) => c === r.length - 1 && d.isLineBreakTag(l) || d.isEmpty(l) && !d.isLineBreakTag(l)) && i === t.textContent.length)\n return !0;\n }\n const n = o.textContent.replace(/\\s+$/, \"\");\n return t === o && i >= n.length;\n }\n /**\n * Method gets Block instance and puts caret to the text node with offset\n * There two ways that method applies caret position:\n * - first found text node: sets at the beginning, but you can pass an offset\n * - last found text node: sets at the end of the node. Also, you can customize the behaviour\n *\n * @param {Block} block - Block class\n * @param {string} position - position where to set caret.\n * If default - leave default behaviour and apply offset if it's passed\n * @param {number} offset - caret offset regarding to the text node\n */\n setToBlock(e, t = this.positions.DEFAULT, o = 0) {\n const { BlockManager: i } = this.Editor;\n let n;\n switch (t) {\n case this.positions.START:\n n = e.firstInput;\n break;\n case this.positions.END:\n n = e.lastInput;\n break;\n default:\n n = e.currentInput;\n }\n if (!n)\n return;\n const r = d.getDeepestNode(n, t === this.positions.END), a = d.getContentLength(r);\n switch (!0) {\n case t === this.positions.START:\n o = 0;\n break;\n case t === this.positions.END:\n case o > a:\n o = a;\n break;\n }\n re(() => {\n this.set(r, o);\n }, 20)(), i.setCurrentBlockByChildNode(e.holder), i.currentBlock.currentInput = n;\n }\n /**\n * Set caret to the current input of current Block.\n *\n * @param {HTMLElement} input - input where caret should be set\n * @param {string} position - position of the caret.\n * If default - leave default behaviour and apply offset if it's passed\n * @param {number} offset - caret offset regarding to the text node\n */\n setToInput(e, t = this.positions.DEFAULT, o = 0) {\n const { currentBlock: i } = this.Editor.BlockManager, n = d.getDeepestNode(e);\n switch (t) {\n case this.positions.START:\n this.set(n, 0);\n break;\n case this.positions.END:\n this.set(n, d.getContentLength(n));\n break;\n default:\n o && this.set(n, o);\n }\n i.currentInput = e;\n }\n /**\n * Creates Document Range and sets caret to the element with offset\n *\n * @param {HTMLElement} element - target node.\n * @param {number} offset - offset\n */\n set(e, t = 0) {\n const { top: o, bottom: i } = m.setCursor(e, t), { innerHeight: n } = window;\n o < 0 && window.scrollBy(0, o), i > n && window.scrollBy(0, i - n);\n }\n /**\n * Set Caret to the last Block\n * If last block is not empty, append another empty block\n */\n setToTheLastBlock() {\n const e = this.Editor.BlockManager.lastBlock;\n if (e)\n if (e.tool.isDefault && e.isEmpty)\n this.setToBlock(e);\n else {\n const t = this.Editor.BlockManager.insertAtEnd();\n this.setToBlock(t);\n }\n }\n /**\n * Extract content fragment of current Block from Caret position to the end of the Block\n */\n extractFragmentFromCaretPosition() {\n const e = m.get();\n if (e.rangeCount) {\n const t = e.getRangeAt(0), o = this.Editor.BlockManager.currentBlock.currentInput;\n if (t.deleteContents(), o)\n if (d.isNativeInput(o)) {\n const i = o, n = document.createDocumentFragment(), r = i.value.substring(0, i.selectionStart), a = i.value.substring(i.selectionStart);\n return n.textContent = a, i.value = r, n;\n } else {\n const i = t.cloneRange();\n return i.selectNodeContents(o), i.setStart(t.endContainer, t.endOffset), i.extractContents();\n }\n }\n }\n /**\n * Set's caret to the next Block or Tool`s input\n * Before moving caret, we should check if caret position is at the end of Plugins node\n * Using {@link Dom#getDeepestNode} to get a last node and match with current selection\n *\n * @returns {boolean}\n */\n navigateNext() {\n const { BlockManager: e } = this.Editor, { currentBlock: t, nextContentfulBlock: o } = e, { nextInput: i } = t, n = this.isAtEnd;\n let r = o;\n if (!r && !i) {\n if (t.tool.isDefault || !n)\n return !1;\n r = e.insertAtEnd();\n }\n return n ? (i ? this.setToInput(i, this.positions.START) : this.setToBlock(r, this.positions.START), !0) : !1;\n }\n /**\n * Set's caret to the previous Tool`s input or Block\n * Before moving caret, we should check if caret position is start of the Plugins node\n * Using {@link Dom#getDeepestNode} to get a last node and match with current selection\n *\n * @returns {boolean}\n */\n navigatePrevious() {\n const { currentBlock: e, previousContentfulBlock: t } = this.Editor.BlockManager;\n if (!e)\n return !1;\n const { previousInput: o } = e;\n return !t && !o ? !1 : this.isAtStart ? (o ? this.setToInput(o, this.positions.END) : this.setToBlock(t, this.positions.END), !0) : !1;\n }\n /**\n * Inserts shadow element after passed element where caret can be placed\n *\n * @param {Element} element - element after which shadow caret should be inserted\n */\n createShadow(e) {\n const t = document.createElement(\"span\");\n t.classList.add(ve.CSS.shadowCaret), e.insertAdjacentElement(\"beforeend\", t);\n }\n /**\n * Restores caret position\n *\n * @param {HTMLElement} element - element where caret should be restored\n */\n restoreCaret(e) {\n const t = e.querySelector(`.${ve.CSS.shadowCaret}`);\n if (!t)\n return;\n new m().expandToTag(t);\n const i = document.createRange();\n i.selectNode(t), i.extractContents();\n }\n /**\n * Inserts passed content at caret position\n *\n * @param {string} content - content to insert\n */\n insertContentAtCaretPosition(e) {\n const t = document.createDocumentFragment(), o = document.createElement(\"div\"), i = m.get(), n = m.range;\n o.innerHTML = e, Array.from(o.childNodes).forEach((c) => t.appendChild(c)), t.childNodes.length === 0 && t.appendChild(new Text());\n const r = t.lastChild;\n n.deleteContents(), n.insertNode(t);\n const a = document.createRange(), l = r.nodeType === Node.TEXT_NODE ? r : r.firstChild;\n l !== null && l.textContent !== null && a.setStart(l, l.textContent.length), i.removeAllRanges(), i.addRange(a);\n }\n /**\n * Get all first-level (first child of [contenteditable]) siblings from passed node\n * Then you can check it for emptiness\n *\n * @example\n * \n * @param {HTMLElement} from - element from which siblings should be searched\n * @param {'left' | 'right'} direction - direction of search\n * @returns {HTMLElement[]}\n */\n getHigherLevelSiblings(e, t) {\n let o = e;\n const i = [];\n for (; o.parentNode && o.parentNode.contentEditable !== \"true\"; )\n o = o.parentNode;\n const n = t === \"left\" ? \"previousSibling\" : \"nextSibling\";\n for (; o[n]; )\n o = o[n], i.push(o);\n return i;\n }\n}\nclass Qo extends C {\n constructor() {\n super(...arguments), this.onMouseUp = () => {\n this.listeners.off(document, \"mouseover\", this.onMouseOver), this.listeners.off(document, \"mouseup\", this.onMouseUp);\n }, this.onMouseOver = (e) => {\n const { BlockManager: t, BlockSelection: o } = this.Editor, i = t.getBlockByChildNode(e.relatedTarget) || this.lastSelectedBlock, n = t.getBlockByChildNode(e.target);\n if (!(!i || !n) && n !== i) {\n if (i === this.firstSelectedBlock) {\n m.get().removeAllRanges(), i.selected = !0, n.selected = !0, o.clearCache();\n return;\n }\n if (n === this.firstSelectedBlock) {\n i.selected = !1, n.selected = !1, o.clearCache();\n return;\n }\n this.Editor.InlineToolbar.close(), this.toggleBlocksSelectedState(i, n), this.lastSelectedBlock = n;\n }\n };\n }\n /**\n * Module preparation\n *\n * @returns {Promise}\n */\n async prepare() {\n this.listeners.on(document, \"mousedown\", (e) => {\n this.enableCrossBlockSelection(e);\n });\n }\n /**\n * Sets up listeners\n *\n * @param {MouseEvent} event - mouse down event\n */\n watchSelection(e) {\n if (e.button !== _t.LEFT)\n return;\n const { BlockManager: t } = this.Editor;\n this.firstSelectedBlock = t.getBlock(e.target), this.lastSelectedBlock = this.firstSelectedBlock, this.listeners.on(document, \"mouseover\", this.onMouseOver), this.listeners.on(document, \"mouseup\", this.onMouseUp);\n }\n /**\n * return boolean is cross block selection started\n */\n get isCrossBlockSelectionStarted() {\n return !!this.firstSelectedBlock && !!this.lastSelectedBlock;\n }\n /**\n * Change selection state of the next Block\n * Used for CBS via Shift + arrow keys\n *\n * @param {boolean} next - if true, toggle next block. Previous otherwise\n */\n toggleBlockSelectedState(e = !0) {\n const { BlockManager: t, BlockSelection: o } = this.Editor;\n this.lastSelectedBlock || (this.lastSelectedBlock = this.firstSelectedBlock = t.currentBlock), this.firstSelectedBlock === this.lastSelectedBlock && (this.firstSelectedBlock.selected = !0, o.clearCache(), m.get().removeAllRanges());\n const i = t.blocks.indexOf(this.lastSelectedBlock) + (e ? 1 : -1), n = t.blocks[i];\n n && (this.lastSelectedBlock.selected !== n.selected ? (n.selected = !0, o.clearCache()) : (this.lastSelectedBlock.selected = !1, o.clearCache()), this.lastSelectedBlock = n, this.Editor.InlineToolbar.close(), n.holder.scrollIntoView({\n block: \"nearest\"\n }));\n }\n /**\n * Clear saved state\n *\n * @param {Event} reason - event caused clear of selection\n */\n clear(e) {\n const { BlockManager: t, BlockSelection: o, Caret: i } = this.Editor, n = t.blocks.indexOf(this.firstSelectedBlock), r = t.blocks.indexOf(this.lastSelectedBlock);\n if (o.anyBlockSelected && n > -1 && r > -1)\n if (e && e instanceof KeyboardEvent)\n switch (e.keyCode) {\n case B.DOWN:\n case B.RIGHT:\n i.setToBlock(t.blocks[Math.max(n, r)], i.positions.END);\n break;\n case B.UP:\n case B.LEFT:\n i.setToBlock(t.blocks[Math.min(n, r)], i.positions.START);\n break;\n default:\n i.setToBlock(t.blocks[Math.max(n, r)], i.positions.END);\n }\n else\n i.setToBlock(t.blocks[Math.max(n, r)], i.positions.END);\n this.firstSelectedBlock = this.lastSelectedBlock = null;\n }\n /**\n * Enables Cross Block Selection\n *\n * @param {MouseEvent} event - mouse down event\n */\n enableCrossBlockSelection(e) {\n const { UI: t } = this.Editor;\n m.isCollapsed || this.Editor.BlockSelection.clearSelection(e), t.nodes.redactor.contains(e.target) ? this.watchSelection(e) : this.Editor.BlockSelection.clearSelection(e);\n }\n /**\n * Change blocks selection state between passed two blocks.\n *\n * @param {Block} firstBlock - first block in range\n * @param {Block} lastBlock - last block in range\n */\n toggleBlocksSelectedState(e, t) {\n const { BlockManager: o, BlockSelection: i } = this.Editor, n = o.blocks.indexOf(e), r = o.blocks.indexOf(t), a = e.selected !== t.selected;\n for (let l = Math.min(n, r); l <= Math.max(n, r); l++) {\n const c = o.blocks[l];\n c !== this.firstSelectedBlock && c !== (a ? e : t) && (o.blocks[l].selected = !o.blocks[l].selected, i.clearCache());\n }\n }\n}\nclass ei extends C {\n constructor() {\n super(...arguments), this.isStartedAtEditor = !1;\n }\n /**\n * Toggle read-only state\n *\n * if state is true:\n * - disable all drag-n-drop event handlers\n *\n * if state is false:\n * - restore drag-n-drop event handlers\n *\n * @param {boolean} readOnlyEnabled - \"read only\" state\n */\n toggleReadOnly(e) {\n e ? this.disableModuleBindings() : this.enableModuleBindings();\n }\n /**\n * Add drag events listeners to editor zone\n */\n enableModuleBindings() {\n const { UI: e } = this.Editor;\n this.readOnlyMutableListeners.on(e.nodes.holder, \"drop\", async (t) => {\n await this.processDrop(t);\n }, !0), this.readOnlyMutableListeners.on(e.nodes.holder, \"dragstart\", () => {\n this.processDragStart();\n }), this.readOnlyMutableListeners.on(e.nodes.holder, \"dragover\", (t) => {\n this.processDragOver(t);\n }, !0);\n }\n /**\n * Unbind drag-n-drop event handlers\n */\n disableModuleBindings() {\n this.readOnlyMutableListeners.clearAll();\n }\n /**\n * Handle drop event\n *\n * @param {DragEvent} dropEvent - drop event\n */\n async processDrop(e) {\n const {\n BlockManager: t,\n Caret: o,\n Paste: i\n } = this.Editor;\n e.preventDefault(), t.blocks.forEach((r) => {\n r.dropTarget = !1;\n }), m.isAtEditor && !m.isCollapsed && this.isStartedAtEditor && document.execCommand(\"delete\"), this.isStartedAtEditor = !1;\n const n = t.setCurrentBlockByChildNode(e.target);\n if (n)\n this.Editor.Caret.setToBlock(n, o.positions.END);\n else {\n const r = t.setCurrentBlockByChildNode(t.lastBlock.holder);\n this.Editor.Caret.setToBlock(r, o.positions.END);\n }\n await i.processDataTransfer(e.dataTransfer, !0);\n }\n /**\n * Handle drag start event\n */\n processDragStart() {\n m.isAtEditor && !m.isCollapsed && (this.isStartedAtEditor = !0), this.Editor.InlineToolbar.close();\n }\n /**\n * @param {DragEvent} dragEvent - drag event\n */\n processDragOver(e) {\n e.preventDefault();\n }\n}\nclass ti extends C {\n /**\n * Prepare the module\n *\n * @param options - options used by the modification observer module\n * @param options.config - Editor configuration object\n * @param options.eventsDispatcher - common Editor event bus\n */\n constructor({ config: e, eventsDispatcher: t }) {\n super({\n config: e,\n eventsDispatcher: t\n }), this.disabled = !1, this.batchingTimeout = null, this.batchingOnChangeQueue = /* @__PURE__ */ new Map(), this.batchTime = 400, this.mutationObserver = new MutationObserver((o) => {\n this.redactorChanged(o);\n }), this.eventsDispatcher.on(ct, (o) => {\n this.particularBlockChanged(o.event);\n }), this.eventsDispatcher.on(dt, () => {\n this.disable();\n }), this.eventsDispatcher.on(ht, () => {\n this.enable();\n });\n }\n /**\n * Enables onChange event\n */\n enable() {\n this.mutationObserver.observe(\n this.Editor.UI.nodes.redactor,\n {\n childList: !0,\n subtree: !0,\n characterData: !0,\n attributes: !0\n }\n ), this.disabled = !1;\n }\n /**\n * Disables onChange event\n */\n disable() {\n this.mutationObserver.disconnect(), this.disabled = !0;\n }\n /**\n * Call onChange event passed to Editor.js configuration\n *\n * @param event - some of our custom change events\n */\n particularBlockChanged(e) {\n this.disabled || !D(this.config.onChange) || (this.batchingOnChangeQueue.set(`block:${e.detail.target.id}:event:${e.type}`, e), this.batchingTimeout && clearTimeout(this.batchingTimeout), this.batchingTimeout = setTimeout(() => {\n let t;\n this.batchingOnChangeQueue.size === 1 ? t = this.batchingOnChangeQueue.values().next().value : t = Array.from(this.batchingOnChangeQueue.values()), this.config.onChange && this.config.onChange(this.Editor.API.methods, t), this.batchingOnChangeQueue.clear();\n }, this.batchTime));\n }\n /**\n * Fired on every blocks wrapper dom change\n *\n * @param mutations - mutations happened\n */\n redactorChanged(e) {\n this.eventsDispatcher.emit(Me, {\n mutations: e\n });\n }\n}\nconst wt = class extends C {\n constructor() {\n super(...arguments), this.MIME_TYPE = \"application/x-editor-js\", this.toolsTags = {}, this.tagsByTool = {}, this.toolsPatterns = [], this.toolsFiles = {}, this.exceptionList = [], this.processTool = (s) => {\n try {\n const e = s.create({}, {}, !1);\n if (s.pasteConfig === !1) {\n this.exceptionList.push(s.name);\n return;\n }\n if (!D(e.onPaste))\n return;\n this.getTagsConfig(s), this.getFilesConfig(s), this.getPatternsConfig(s);\n } catch (e) {\n L(\n `Paste handling for «${s.name}» Tool hasn't been set up because of the error`,\n \"warn\",\n e\n );\n }\n }, this.handlePasteEvent = async (s) => {\n const { BlockManager: e, Toolbar: t } = this.Editor, o = e.setCurrentBlockByChildNode(s.target);\n !o || this.isNativeBehaviour(s.target) && !s.clipboardData.types.includes(\"Files\") || o && this.exceptionList.includes(o.name) || (s.preventDefault(), this.processDataTransfer(s.clipboardData), e.clearFocused(), t.close());\n };\n }\n /**\n * Set onPaste callback and collect tools` paste configurations\n */\n async prepare() {\n this.processTools();\n }\n /**\n * Set read-only state\n *\n * @param {boolean} readOnlyEnabled - read only flag value\n */\n toggleReadOnly(s) {\n s ? this.unsetCallback() : this.setCallback();\n }\n /**\n * Handle pasted or dropped data transfer object\n *\n * @param {DataTransfer} dataTransfer - pasted or dropped data transfer object\n * @param {boolean} isDragNDrop - true if data transfer comes from drag'n'drop events\n */\n async processDataTransfer(s, e = !1) {\n const { Tools: t } = this.Editor, o = s.types;\n if ((o.includes ? o.includes(\"Files\") : o.contains(\"Files\")) && !V(this.toolsFiles)) {\n await this.processFiles(s.files);\n return;\n }\n const n = s.getData(this.MIME_TYPE), r = s.getData(\"text/plain\");\n let a = s.getData(\"text/html\");\n if (n)\n try {\n this.insertEditorJSData(JSON.parse(n));\n return;\n } catch {\n }\n e && r.trim() && a.trim() && (a = \"

\" + (a.trim() ? a : r) + \"

\");\n const l = Object.keys(this.toolsTags).reduce((h, f) => (h[f.toLowerCase()] = this.toolsTags[f].sanitizationConfig ?? {}, h), {}), c = Object.assign({}, l, t.getAllInlineToolsSanitizeConfig(), { br: {} }), u = Z(a, c);\n !u.trim() || u.trim() === r || !d.isHTMLString(u) ? await this.processText(r) : await this.processText(u, !0);\n }\n /**\n * Process pasted text and divide them into Blocks\n *\n * @param {string} data - text to process. Can be HTML or plain.\n * @param {boolean} isHTML - if passed string is HTML, this parameter should be true\n */\n async processText(s, e = !1) {\n const { Caret: t, BlockManager: o } = this.Editor, i = e ? this.processHTML(s) : this.processPlain(s);\n if (!i.length)\n return;\n if (i.length === 1) {\n i[0].isBlock ? this.processSingleBlock(i.pop()) : this.processInlinePaste(i.pop());\n return;\n }\n const r = o.currentBlock && o.currentBlock.tool.isDefault && o.currentBlock.isEmpty;\n i.map(\n async (a, l) => this.insertBlock(a, l === 0 && r)\n ), o.currentBlock && t.setToBlock(o.currentBlock, t.positions.END);\n }\n /**\n * Set onPaste callback handler\n */\n setCallback() {\n this.listeners.on(this.Editor.UI.nodes.holder, \"paste\", this.handlePasteEvent);\n }\n /**\n * Unset onPaste callback handler\n */\n unsetCallback() {\n this.listeners.off(this.Editor.UI.nodes.holder, \"paste\", this.handlePasteEvent);\n }\n /**\n * Get and process tool`s paste configs\n */\n processTools() {\n const s = this.Editor.Tools.blockTools;\n Array.from(s.values()).forEach(this.processTool);\n }\n /**\n * Get tags name list from either tag name or sanitization config.\n *\n * @param {string | object} tagOrSanitizeConfig - tag name or sanitize config object.\n * @returns {string[]} array of tags.\n */\n collectTagNames(s) {\n return J(s) ? [s] : z(s) ? Object.keys(s) : [];\n }\n /**\n * Get tags to substitute by Tool\n *\n * @param tool - BlockTool object\n */\n getTagsConfig(s) {\n if (s.pasteConfig === !1)\n return;\n const e = s.pasteConfig.tags || [], t = [];\n e.forEach((o) => {\n const i = this.collectTagNames(o);\n t.push(...i), i.forEach((n) => {\n if (Object.prototype.hasOwnProperty.call(this.toolsTags, n)) {\n L(\n `Paste handler for «${s.name}» Tool on «${n}» tag is skipped because it is already used by «${this.toolsTags[n].tool.name}» Tool.`,\n \"warn\"\n );\n return;\n }\n const r = z(o) ? o[n] : null;\n this.toolsTags[n.toUpperCase()] = {\n tool: s,\n sanitizationConfig: r\n };\n });\n }), this.tagsByTool[s.name] = t.map((o) => o.toUpperCase());\n }\n /**\n * Get files` types and extensions to substitute by Tool\n *\n * @param tool - BlockTool object\n */\n getFilesConfig(s) {\n if (s.pasteConfig === !1)\n return;\n const { files: e = {} } = s.pasteConfig;\n let { extensions: t, mimeTypes: o } = e;\n !t && !o || (t && !Array.isArray(t) && (L(`«extensions» property of the onDrop config for «${s.name}» Tool should be an array`), t = []), o && !Array.isArray(o) && (L(`«mimeTypes» property of the onDrop config for «${s.name}» Tool should be an array`), o = []), o && (o = o.filter((i) => Ft(i) ? !0 : (L(`MIME type value «${i}» for the «${s.name}» Tool is not a valid MIME type`, \"warn\"), !1))), this.toolsFiles[s.name] = {\n extensions: t || [],\n mimeTypes: o || []\n });\n }\n /**\n * Get RegExp patterns to substitute by Tool\n *\n * @param tool - BlockTool object\n */\n getPatternsConfig(s) {\n s.pasteConfig === !1 || !s.pasteConfig.patterns || V(s.pasteConfig.patterns) || Object.entries(s.pasteConfig.patterns).forEach(([e, t]) => {\n t instanceof RegExp || L(\n `Pattern ${t} for «${s.name}» Tool is skipped because it should be a Regexp instance.`,\n \"warn\"\n ), this.toolsPatterns.push({\n key: e,\n pattern: t,\n tool: s\n });\n });\n }\n /**\n * Check if browser behavior suits better\n *\n * @param {EventTarget} element - element where content has been pasted\n * @returns {boolean}\n */\n isNativeBehaviour(s) {\n return d.isNativeInput(s);\n }\n /**\n * Get files from data transfer object and insert related Tools\n *\n * @param {FileList} items - pasted or dropped items\n */\n async processFiles(s) {\n const { BlockManager: e } = this.Editor;\n let t;\n t = await Promise.all(\n Array.from(s).map((n) => this.processFile(n))\n ), t = t.filter((n) => !!n);\n const i = e.currentBlock.tool.isDefault && e.currentBlock.isEmpty;\n t.forEach(\n (n, r) => {\n e.paste(n.type, n.event, r === 0 && i);\n }\n );\n }\n /**\n * Get information about file and find Tool to handle it\n *\n * @param {File} file - file to process\n */\n async processFile(s) {\n const e = Pt(s), t = Object.entries(this.toolsFiles).find(([n, { mimeTypes: r, extensions: a }]) => {\n const [l, c] = s.type.split(\"/\"), u = a.find((f) => f.toLowerCase() === e.toLowerCase()), h = r.find((f) => {\n const [k, p] = f.split(\"/\");\n return k === l && (p === c || p === \"*\");\n });\n return !!u || !!h;\n });\n if (!t)\n return;\n const [o] = t;\n return {\n event: this.composePasteEvent(\"file\", {\n file: s\n }),\n type: o\n };\n }\n /**\n * Split HTML string to blocks and return it as array of Block data\n *\n * @param {string} innerHTML - html string to process\n * @returns {PasteData[]}\n */\n processHTML(s) {\n const { Tools: e } = this.Editor, t = d.make(\"DIV\");\n return t.innerHTML = s, this.getNodes(t).map((i) => {\n let n, r = e.defaultTool, a = !1;\n switch (i.nodeType) {\n case Node.DOCUMENT_FRAGMENT_NODE:\n n = d.make(\"div\"), n.appendChild(i);\n break;\n case Node.ELEMENT_NODE:\n n = i, a = !0, this.toolsTags[n.tagName] && (r = this.toolsTags[n.tagName].tool);\n break;\n }\n const { tags: l } = r.pasteConfig || { tags: [] }, c = l.reduce((f, k) => (this.collectTagNames(k).forEach((v) => {\n const A = z(k) ? k[v] : null;\n f[v.toLowerCase()] = A || {};\n }), f), {}), u = Object.assign({}, c, r.baseSanitizeConfig);\n if (n.tagName.toLowerCase() === \"table\") {\n const f = Z(n.outerHTML, u);\n n = d.make(\"div\", void 0, {\n innerHTML: f\n }).firstChild;\n } else\n n.innerHTML = Z(n.innerHTML, u);\n const h = this.composePasteEvent(\"tag\", {\n data: n\n });\n return {\n content: n,\n isBlock: a,\n tool: r.name,\n event: h\n };\n }).filter((i) => {\n const n = d.isEmpty(i.content), r = d.isSingleTag(i.content);\n return !n || r;\n });\n }\n /**\n * Split plain text by new line symbols and return it as array of Block data\n *\n * @param {string} plain - string to process\n * @returns {PasteData[]}\n */\n processPlain(s) {\n const { defaultBlock: e } = this.config;\n if (!s)\n return [];\n const t = e;\n return s.split(/\\r?\\n/).filter((o) => o.trim()).map((o) => {\n const i = d.make(\"div\");\n i.textContent = o;\n const n = this.composePasteEvent(\"tag\", {\n data: i\n });\n return {\n content: i,\n tool: t,\n isBlock: !1,\n event: n\n };\n });\n }\n /**\n * Process paste of single Block tool content\n *\n * @param {PasteData} dataToInsert - data of Block to insert\n */\n async processSingleBlock(s) {\n const { Caret: e, BlockManager: t } = this.Editor, { currentBlock: o } = t;\n if (!o || s.tool !== o.name || !d.containsOnlyInlineElements(s.content.innerHTML)) {\n this.insertBlock(s, (o == null ? void 0 : o.tool.isDefault) && o.isEmpty);\n return;\n }\n e.insertContentAtCaretPosition(s.content.innerHTML);\n }\n /**\n * Process paste to single Block:\n * 1. Find patterns` matches\n * 2. Insert new block if it is not the same type as current one\n * 3. Just insert text if there is no substitutions\n *\n * @param {PasteData} dataToInsert - data of Block to insert\n */\n async processInlinePaste(s) {\n const { BlockManager: e, Caret: t } = this.Editor, { content: o } = s;\n if (e.currentBlock && e.currentBlock.tool.isDefault && o.textContent.length < wt.PATTERN_PROCESSING_MAX_LENGTH) {\n const n = await this.processPattern(o.textContent);\n if (n) {\n const r = e.currentBlock && e.currentBlock.tool.isDefault && e.currentBlock.isEmpty, a = e.paste(n.tool, n.event, r);\n t.setToBlock(a, t.positions.END);\n return;\n }\n }\n if (e.currentBlock && e.currentBlock.currentInput) {\n const n = e.currentBlock.tool.baseSanitizeConfig;\n document.execCommand(\n \"insertHTML\",\n !1,\n Z(o.innerHTML, n)\n );\n } else\n this.insertBlock(s);\n }\n /**\n * Get patterns` matches\n *\n * @param {string} text - text to process\n * @returns {Promise<{event: PasteEvent, tool: string}>}\n */\n async processPattern(s) {\n const e = this.toolsPatterns.find((o) => {\n const i = o.pattern.exec(s);\n return i ? s === i.shift() : !1;\n });\n return e ? {\n event: this.composePasteEvent(\"pattern\", {\n key: e.key,\n data: s\n }),\n tool: e.tool.name\n } : void 0;\n }\n /**\n * Insert pasted Block content to Editor\n *\n * @param {PasteData} data - data to insert\n * @param {boolean} canReplaceCurrentBlock - if true and is current Block is empty, will replace current Block\n * @returns {void}\n */\n insertBlock(s, e = !1) {\n const { BlockManager: t, Caret: o } = this.Editor, { currentBlock: i } = t;\n let n;\n if (e && i && i.isEmpty) {\n n = t.paste(s.tool, s.event, !0), o.setToBlock(n, o.positions.END);\n return;\n }\n n = t.paste(s.tool, s.event), o.setToBlock(n, o.positions.END);\n }\n /**\n * Insert data passed as application/x-editor-js JSON\n *\n * @param {Array} blocks — Blocks' data to insert\n * @returns {void}\n */\n insertEditorJSData(s) {\n const { BlockManager: e, Caret: t, Tools: o } = this.Editor;\n ut(\n s,\n (n) => o.blockTools.get(n).sanitizeConfig\n ).forEach(({ tool: n, data: r }, a) => {\n let l = !1;\n a === 0 && (l = e.currentBlock && e.currentBlock.tool.isDefault && e.currentBlock.isEmpty);\n const c = e.insert({\n tool: n,\n data: r,\n replace: l\n });\n t.setToBlock(c, t.positions.END);\n });\n }\n /**\n * Fetch nodes from Element node\n *\n * @param {Node} node - current node\n * @param {Node[]} nodes - processed nodes\n * @param {Node} destNode - destination node\n */\n processElementNode(s, e, t) {\n const o = Object.keys(this.toolsTags), i = s, { tool: n } = this.toolsTags[i.tagName] || {}, r = this.tagsByTool[n == null ? void 0 : n.name] || [], a = o.includes(i.tagName), l = d.blockElements.includes(i.tagName.toLowerCase()), c = Array.from(i.children).some(\n ({ tagName: h }) => o.includes(h) && !r.includes(h)\n ), u = Array.from(i.children).some(\n ({ tagName: h }) => d.blockElements.includes(h.toLowerCase())\n );\n if (!l && !a && !c)\n return t.appendChild(i), [...e, t];\n if (a && !c || l && !u && !c)\n return [...e, t, i];\n }\n /**\n * Recursively divide HTML string to two types of nodes:\n * 1. Block element\n * 2. Document Fragments contained text and markup tags like a, b, i etc.\n *\n * @param {Node} wrapper - wrapper of paster HTML content\n * @returns {Node[]}\n */\n getNodes(s) {\n const e = Array.from(s.childNodes);\n let t;\n const o = (i, n) => {\n if (d.isEmpty(n) && !d.isSingleTag(n))\n return i;\n const r = i[i.length - 1];\n let a = new DocumentFragment();\n switch (r && d.isFragment(r) && (a = i.pop()), n.nodeType) {\n case Node.ELEMENT_NODE:\n if (t = this.processElementNode(n, i, a), t)\n return t;\n break;\n case Node.TEXT_NODE:\n return a.appendChild(n), [...i, a];\n default:\n return [...i, a];\n }\n return [...i, ...Array.from(n.childNodes).reduce(o, [])];\n };\n return e.reduce(o, []);\n }\n /**\n * Compose paste event with passed type and detail\n *\n * @param {string} type - event type\n * @param {PasteEventDetail} detail - event detail\n */\n composePasteEvent(s, e) {\n return new CustomEvent(s, {\n detail: e\n });\n }\n};\nlet yt = wt;\nyt.PATTERN_PROCESSING_MAX_LENGTH = 450;\nclass oi extends C {\n constructor() {\n super(...arguments), this.toolsDontSupportReadOnly = [], this.readOnlyEnabled = !1;\n }\n /**\n * Returns state of read only mode\n */\n get isEnabled() {\n return this.readOnlyEnabled;\n }\n /**\n * Set initial state\n */\n async prepare() {\n const { Tools: e } = this.Editor, { blockTools: t } = e, o = [];\n Array.from(t.entries()).forEach(([i, n]) => {\n n.isReadOnlySupported || o.push(i);\n }), this.toolsDontSupportReadOnly = o, this.config.readOnly && o.length > 0 && this.throwCriticalError(), this.toggle(this.config.readOnly);\n }\n /**\n * Set read-only mode or toggle current state\n * Call all Modules `toggleReadOnly` method and re-render Editor\n *\n * @param {boolean} state - (optional) read-only state or toggle\n */\n async toggle(e = !this.readOnlyEnabled) {\n e && this.toolsDontSupportReadOnly.length > 0 && this.throwCriticalError();\n const t = this.readOnlyEnabled;\n this.readOnlyEnabled = e;\n for (const i in this.Editor)\n this.Editor[i].toggleReadOnly && this.Editor[i].toggleReadOnly(e);\n if (t === e)\n return this.readOnlyEnabled;\n const o = await this.Editor.Saver.save();\n return await this.Editor.BlockManager.clear(), await this.Editor.Renderer.render(o.blocks), this.readOnlyEnabled;\n }\n /**\n * Throws an error about tools which don't support read-only mode\n */\n throwCriticalError() {\n throw new lt(\n `To enable read-only mode all connected tools should support it. Tools ${this.toolsDontSupportReadOnly.join(\", \")} don't support read-only mode.`\n );\n }\n}\nclass fe extends C {\n constructor() {\n super(...arguments), this.isRectSelectionActivated = !1, this.SCROLL_SPEED = 3, this.HEIGHT_OF_SCROLL_ZONE = 40, this.BOTTOM_SCROLL_ZONE = 1, this.TOP_SCROLL_ZONE = 2, this.MAIN_MOUSE_BUTTON = 0, this.mousedown = !1, this.isScrolling = !1, this.inScrollZone = null, this.startX = 0, this.startY = 0, this.mouseX = 0, this.mouseY = 0, this.stackOfSelected = [], this.listenerIds = [];\n }\n /**\n * CSS classes for the Block\n *\n * @returns {{wrapper: string, content: string}}\n */\n static get CSS() {\n return {\n overlay: \"codex-editor-overlay\",\n overlayContainer: \"codex-editor-overlay__container\",\n rect: \"codex-editor-overlay__rectangle\",\n topScrollZone: \"codex-editor-overlay__scroll-zone--top\",\n bottomScrollZone: \"codex-editor-overlay__scroll-zone--bottom\"\n };\n }\n /**\n * Module Preparation\n * Creating rect and hang handlers\n */\n prepare() {\n this.enableModuleBindings();\n }\n /**\n * Init rect params\n *\n * @param {number} pageX - X coord of mouse\n * @param {number} pageY - Y coord of mouse\n */\n startSelection(e, t) {\n const o = document.elementFromPoint(e - window.pageXOffset, t - window.pageYOffset);\n o.closest(`.${this.Editor.Toolbar.CSS.toolbar}`) || (this.Editor.BlockSelection.allBlocksSelected = !1, this.clearSelection(), this.stackOfSelected = []);\n const n = [\n `.${F.CSS.content}`,\n `.${this.Editor.Toolbar.CSS.toolbar}`,\n `.${this.Editor.InlineToolbar.CSS.inlineToolbar}`\n ], r = o.closest(\".\" + this.Editor.UI.CSS.editorWrapper), a = n.some((l) => !!o.closest(l));\n !r || a || (this.mousedown = !0, this.startX = e, this.startY = t);\n }\n /**\n * Clear all params to end selection\n */\n endSelection() {\n this.mousedown = !1, this.startX = 0, this.startY = 0, this.overlayRectangle.style.display = \"none\";\n }\n /**\n * is RectSelection Activated\n */\n isRectActivated() {\n return this.isRectSelectionActivated;\n }\n /**\n * Mark that selection is end\n */\n clearSelection() {\n this.isRectSelectionActivated = !1;\n }\n /**\n * Sets Module necessary event handlers\n */\n enableModuleBindings() {\n const { container: e } = this.genHTML();\n this.listeners.on(e, \"mousedown\", (t) => {\n this.processMouseDown(t);\n }, !1), this.listeners.on(document.body, \"mousemove\", Ce((t) => {\n this.processMouseMove(t);\n }, 10), {\n passive: !0\n }), this.listeners.on(document.body, \"mouseleave\", () => {\n this.processMouseLeave();\n }), this.listeners.on(window, \"scroll\", Ce((t) => {\n this.processScroll(t);\n }, 10), {\n passive: !0\n }), this.listeners.on(document.body, \"mouseup\", () => {\n this.processMouseUp();\n }, !1);\n }\n /**\n * Handle mouse down events\n *\n * @param {MouseEvent} mouseEvent - mouse event payload\n */\n processMouseDown(e) {\n if (e.button !== this.MAIN_MOUSE_BUTTON)\n return;\n e.target.closest(d.allInputsSelector) !== null || this.startSelection(e.pageX, e.pageY);\n }\n /**\n * Handle mouse move events\n *\n * @param {MouseEvent} mouseEvent - mouse event payload\n */\n processMouseMove(e) {\n this.changingRectangle(e), this.scrollByZones(e.clientY);\n }\n /**\n * Handle mouse leave\n */\n processMouseLeave() {\n this.clearSelection(), this.endSelection();\n }\n /**\n * @param {MouseEvent} mouseEvent - mouse event payload\n */\n processScroll(e) {\n this.changingRectangle(e);\n }\n /**\n * Handle mouse up\n */\n processMouseUp() {\n this.clearSelection(), this.endSelection();\n }\n /**\n * Scroll If mouse in scroll zone\n *\n * @param {number} clientY - Y coord of mouse\n */\n scrollByZones(e) {\n if (this.inScrollZone = null, e <= this.HEIGHT_OF_SCROLL_ZONE && (this.inScrollZone = this.TOP_SCROLL_ZONE), document.documentElement.clientHeight - e <= this.HEIGHT_OF_SCROLL_ZONE && (this.inScrollZone = this.BOTTOM_SCROLL_ZONE), !this.inScrollZone) {\n this.isScrolling = !1;\n return;\n }\n this.isScrolling || (this.scrollVertical(this.inScrollZone === this.TOP_SCROLL_ZONE ? -this.SCROLL_SPEED : this.SCROLL_SPEED), this.isScrolling = !0);\n }\n /**\n * Generates required HTML elements\n *\n * @returns {Object}\n */\n genHTML() {\n const { UI: e } = this.Editor, t = e.nodes.holder.querySelector(\".\" + e.CSS.editorWrapper), o = d.make(\"div\", fe.CSS.overlay, {}), i = d.make(\"div\", fe.CSS.overlayContainer, {}), n = d.make(\"div\", fe.CSS.rect, {});\n return i.appendChild(n), o.appendChild(i), t.appendChild(o), this.overlayRectangle = n, {\n container: t,\n overlay: o\n };\n }\n /**\n * Activates scrolling if blockSelection is active and mouse is in scroll zone\n *\n * @param {number} speed - speed of scrolling\n */\n scrollVertical(e) {\n if (!(this.inScrollZone && this.mousedown))\n return;\n const t = window.pageYOffset;\n window.scrollBy(0, e), this.mouseY += window.pageYOffset - t, setTimeout(() => {\n this.scrollVertical(e);\n }, 0);\n }\n /**\n * Handles the change in the rectangle and its effect\n *\n * @param {MouseEvent} event - mouse event\n */\n changingRectangle(e) {\n if (!this.mousedown)\n return;\n e.pageY !== void 0 && (this.mouseX = e.pageX, this.mouseY = e.pageY);\n const { rightPos: t, leftPos: o, index: i } = this.genInfoForMouseSelection(), n = this.startX > t && this.mouseX > t, r = this.startX < o && this.mouseX < o;\n this.rectCrossesBlocks = !(n || r), this.isRectSelectionActivated || (this.rectCrossesBlocks = !1, this.isRectSelectionActivated = !0, this.shrinkRectangleToPoint(), this.overlayRectangle.style.display = \"block\"), this.updateRectangleSize(), this.Editor.Toolbar.close(), i !== void 0 && (this.trySelectNextBlock(i), this.inverseSelection(), m.get().removeAllRanges());\n }\n /**\n * Shrink rect to singular point\n */\n shrinkRectangleToPoint() {\n this.overlayRectangle.style.left = `${this.startX - window.pageXOffset}px`, this.overlayRectangle.style.top = `${this.startY - window.pageYOffset}px`, this.overlayRectangle.style.bottom = `calc(100% - ${this.startY - window.pageYOffset}px`, this.overlayRectangle.style.right = `calc(100% - ${this.startX - window.pageXOffset}px`;\n }\n /**\n * Select or unselect all of blocks in array if rect is out or in selectable area\n */\n inverseSelection() {\n const t = this.Editor.BlockManager.getBlockByIndex(this.stackOfSelected[0]).selected;\n if (this.rectCrossesBlocks && !t)\n for (const o of this.stackOfSelected)\n this.Editor.BlockSelection.selectBlockByIndex(o);\n if (!this.rectCrossesBlocks && t)\n for (const o of this.stackOfSelected)\n this.Editor.BlockSelection.unSelectBlockByIndex(o);\n }\n /**\n * Updates size of rectangle\n */\n updateRectangleSize() {\n this.mouseY >= this.startY ? (this.overlayRectangle.style.top = `${this.startY - window.pageYOffset}px`, this.overlayRectangle.style.bottom = `calc(100% - ${this.mouseY - window.pageYOffset}px`) : (this.overlayRectangle.style.bottom = `calc(100% - ${this.startY - window.pageYOffset}px`, this.overlayRectangle.style.top = `${this.mouseY - window.pageYOffset}px`), this.mouseX >= this.startX ? (this.overlayRectangle.style.left = `${this.startX - window.pageXOffset}px`, this.overlayRectangle.style.right = `calc(100% - ${this.mouseX - window.pageXOffset}px`) : (this.overlayRectangle.style.right = `calc(100% - ${this.startX - window.pageXOffset}px`, this.overlayRectangle.style.left = `${this.mouseX - window.pageXOffset}px`);\n }\n /**\n * Collects information needed to determine the behavior of the rectangle\n *\n * @returns {object} index - index next Block, leftPos - start of left border of Block, rightPos - right border\n */\n genInfoForMouseSelection() {\n const t = document.body.offsetWidth / 2, o = this.mouseY - window.pageYOffset, i = document.elementFromPoint(t, o), n = this.Editor.BlockManager.getBlockByChildNode(i);\n let r;\n n !== void 0 && (r = this.Editor.BlockManager.blocks.findIndex((h) => h.holder === n.holder));\n const a = this.Editor.BlockManager.lastBlock.holder.querySelector(\".\" + F.CSS.content), l = Number.parseInt(window.getComputedStyle(a).width, 10) / 2, c = t - l, u = t + l;\n return {\n index: r,\n leftPos: c,\n rightPos: u\n };\n }\n /**\n * Select block with index index\n *\n * @param index - index of block in redactor\n */\n addBlockInSelection(e) {\n this.rectCrossesBlocks && this.Editor.BlockSelection.selectBlockByIndex(e), this.stackOfSelected.push(e);\n }\n /**\n * Adds a block to the selection and determines which blocks should be selected\n *\n * @param {object} index - index of new block in the reactor\n */\n trySelectNextBlock(e) {\n const t = this.stackOfSelected[this.stackOfSelected.length - 1] === e, o = this.stackOfSelected.length, i = 1, n = -1, r = 0;\n if (t)\n return;\n const a = this.stackOfSelected[o - 1] - this.stackOfSelected[o - 2] > 0;\n let l = r;\n o > 1 && (l = a ? i : n);\n const c = e > this.stackOfSelected[o - 1] && l === i, u = e < this.stackOfSelected[o - 1] && l === n, f = !(c || u || l === r);\n if (!f && (e > this.stackOfSelected[o - 1] || this.stackOfSelected[o - 1] === void 0)) {\n let v = this.stackOfSelected[o - 1] + 1 || e;\n for (v; v <= e; v++)\n this.addBlockInSelection(v);\n return;\n }\n if (!f && e < this.stackOfSelected[o - 1]) {\n for (let v = this.stackOfSelected[o - 1] - 1; v >= e; v--)\n this.addBlockInSelection(v);\n return;\n }\n if (!f)\n return;\n let k = o - 1, p;\n for (e > this.stackOfSelected[o - 1] ? p = () => e > this.stackOfSelected[k] : p = () => e < this.stackOfSelected[k]; p(); )\n this.rectCrossesBlocks && this.Editor.BlockSelection.unSelectBlockByIndex(this.stackOfSelected[k]), this.stackOfSelected.pop(), k--;\n }\n}\nclass ii extends C {\n /**\n * Renders passed blocks as one batch\n *\n * @param blocksData - blocks to render\n */\n async render(e) {\n return new Promise((t) => {\n const { Tools: o, BlockManager: i } = this.Editor, n = e.map(({ type: r, data: a, tunes: l, id: c }) => {\n o.available.has(r) === !1 && (K(`Tool «${r}» is not found. Check 'tools' property at the Editor.js config.`, \"warn\"), a = this.composeStubDataForTool(r, a, c), r = o.stubTool);\n let u;\n try {\n u = i.composeBlock({\n id: c,\n tool: r,\n data: a,\n tunes: l\n });\n } catch (h) {\n L(`Block «${r}» skipped because of plugins error`, \"error\", {\n data: a,\n error: h\n }), a = this.composeStubDataForTool(r, a, c), r = o.stubTool, u = i.composeBlock({\n id: c,\n tool: r,\n data: a,\n tunes: l\n });\n }\n return u;\n });\n i.insertMany(n), window.requestIdleCallback(() => {\n t();\n }, { timeout: 2e3 });\n });\n }\n /**\n * Create data for the Stub Tool that will be used instead of unavailable tool\n *\n * @param tool - unavailable tool name to stub\n * @param data - data of unavailable block\n * @param [id] - id of unavailable block\n */\n composeStubDataForTool(e, t, o) {\n const { Tools: i } = this.Editor;\n let n = e;\n if (i.unavailable.has(e)) {\n const r = i.unavailable.get(e).toolbox;\n r !== void 0 && r[0].title !== void 0 && (n = r[0].title);\n }\n return {\n savedData: {\n id: o,\n type: e,\n data: t\n },\n title: n\n };\n }\n}\nclass ni extends C {\n /**\n * Composes new chain of Promises to fire them alternatelly\n *\n * @returns {OutputData}\n */\n async save() {\n const { BlockManager: e, Tools: t } = this.Editor, o = e.blocks, i = [];\n try {\n o.forEach((a) => {\n i.push(this.getSavedData(a));\n });\n const n = await Promise.all(i), r = await ut(n, (a) => t.blockTools.get(a).sanitizeConfig);\n return this.makeOutput(r);\n } catch (n) {\n K(\"Saving failed due to the Error %o\", \"error\", n);\n }\n }\n /**\n * Saves and validates\n *\n * @param {Block} block - Editor's Tool\n * @returns {ValidatedData} - Tool's validated data\n */\n async getSavedData(e) {\n const t = await e.save(), o = t && await e.validate(t.data);\n return {\n ...t,\n isValid: o\n };\n }\n /**\n * Creates output object with saved data, time and version of editor\n *\n * @param {ValidatedData} allExtractedData - data extracted from Blocks\n * @returns {OutputData}\n */\n makeOutput(e) {\n const t = [];\n return e.forEach(({ id: o, tool: i, data: n, tunes: r, isValid: a }) => {\n if (!a) {\n L(`Block «${i}» skipped because saved data is invalid`);\n return;\n }\n if (i === this.Editor.Tools.stubTool) {\n t.push(n);\n return;\n }\n const l = {\n id: o,\n type: i,\n data: n,\n ...!V(r) && {\n tunes: r\n }\n };\n t.push(l);\n }), {\n time: +/* @__PURE__ */ new Date(),\n blocks: t,\n version: \"2.28.0\"\n };\n }\n}\nvar Ne = {}, si = {\n get exports() {\n return Ne;\n },\n set exports(s) {\n Ne = s;\n }\n};\n(function(s, e) {\n (function(t, o) {\n s.exports = o();\n })(window, function() {\n return function(t) {\n var o = {};\n function i(n) {\n if (o[n])\n return o[n].exports;\n var r = o[n] = { i: n, l: !1, exports: {} };\n return t[n].call(r.exports, r, r.exports, i), r.l = !0, r.exports;\n }\n return i.m = t, i.c = o, i.d = function(n, r, a) {\n i.o(n, r) || Object.defineProperty(n, r, { enumerable: !0, get: a });\n }, i.r = function(n) {\n typeof Symbol < \"u\" && Symbol.toStringTag && Object.defineProperty(n, Symbol.toStringTag, { value: \"Module\" }), Object.defineProperty(n, \"__esModule\", { value: !0 });\n }, i.t = function(n, r) {\n if (1 & r && (n = i(n)), 8 & r || 4 & r && typeof n == \"object\" && n && n.__esModule)\n return n;\n var a = /* @__PURE__ */ Object.create(null);\n if (i.r(a), Object.defineProperty(a, \"default\", { enumerable: !0, value: n }), 2 & r && typeof n != \"string\")\n for (var l in n)\n i.d(a, l, function(c) {\n return n[c];\n }.bind(null, l));\n return a;\n }, i.n = function(n) {\n var r = n && n.__esModule ? function() {\n return n.default;\n } : function() {\n return n;\n };\n return i.d(r, \"a\", r), r;\n }, i.o = function(n, r) {\n return Object.prototype.hasOwnProperty.call(n, r);\n }, i.p = \"/\", i(i.s = 4);\n }([function(t, o, i) {\n var n = i(1), r = i(2);\n typeof (r = r.__esModule ? r.default : r) == \"string\" && (r = [[t.i, r, \"\"]]);\n var a = { insert: \"head\", singleton: !1 };\n n(r, a), t.exports = r.locals || {};\n }, function(t, o, i) {\n var n, r = function() {\n return n === void 0 && (n = !!(window && document && document.all && !window.atob)), n;\n }, a = function() {\n var y = {};\n return function(x) {\n if (y[x] === void 0) {\n var w = document.querySelector(x);\n if (window.HTMLIFrameElement && w instanceof window.HTMLIFrameElement)\n try {\n w = w.contentDocument.head;\n } catch {\n w = null;\n }\n y[x] = w;\n }\n return y[x];\n };\n }(), l = [];\n function c(y) {\n for (var x = -1, w = 0; w < l.length; w++)\n if (l[w].identifier === y) {\n x = w;\n break;\n }\n return x;\n }\n function u(y, x) {\n for (var w = {}, I = [], R = 0; R < y.length; R++) {\n var b = y[R], g = x.base ? b[0] + x.base : b[0], E = w[g] || 0, T = \"\".concat(g, \" \").concat(E);\n w[g] = E + 1;\n var O = c(T), S = { css: b[1], media: b[2], sourceMap: b[3] };\n O !== -1 ? (l[O].references++, l[O].updater(S)) : l.push({ identifier: T, updater: _(S, x), references: 1 }), I.push(T);\n }\n return I;\n }\n function h(y) {\n var x = document.createElement(\"style\"), w = y.attributes || {};\n if (w.nonce === void 0) {\n var I = i.nc;\n I && (w.nonce = I);\n }\n if (Object.keys(w).forEach(function(b) {\n x.setAttribute(b, w[b]);\n }), typeof y.insert == \"function\")\n y.insert(x);\n else {\n var R = a(y.insert || \"head\");\n if (!R)\n throw new Error(\"Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.\");\n R.appendChild(x);\n }\n return x;\n }\n var f, k = (f = [], function(y, x) {\n return f[y] = x, f.filter(Boolean).join(`\n`);\n });\n function p(y, x, w, I) {\n var R = w ? \"\" : I.media ? \"@media \".concat(I.media, \" {\").concat(I.css, \"}\") : I.css;\n if (y.styleSheet)\n y.styleSheet.cssText = k(x, R);\n else {\n var b = document.createTextNode(R), g = y.childNodes;\n g[x] && y.removeChild(g[x]), g.length ? y.insertBefore(b, g[x]) : y.appendChild(b);\n }\n }\n function v(y, x, w) {\n var I = w.css, R = w.media, b = w.sourceMap;\n if (R ? y.setAttribute(\"media\", R) : y.removeAttribute(\"media\"), b && btoa && (I += `\n/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(b)))), \" */\")), y.styleSheet)\n y.styleSheet.cssText = I;\n else {\n for (; y.firstChild; )\n y.removeChild(y.firstChild);\n y.appendChild(document.createTextNode(I));\n }\n }\n var A = null, N = 0;\n function _(y, x) {\n var w, I, R;\n if (x.singleton) {\n var b = N++;\n w = A || (A = h(x)), I = p.bind(null, w, b, !1), R = p.bind(null, w, b, !0);\n } else\n w = h(x), I = v.bind(null, w, x), R = function() {\n (function(g) {\n if (g.parentNode === null)\n return !1;\n g.parentNode.removeChild(g);\n })(w);\n };\n return I(y), function(g) {\n if (g) {\n if (g.css === y.css && g.media === y.media && g.sourceMap === y.sourceMap)\n return;\n I(y = g);\n } else\n R();\n };\n }\n t.exports = function(y, x) {\n (x = x || {}).singleton || typeof x.singleton == \"boolean\" || (x.singleton = r());\n var w = u(y = y || [], x);\n return function(I) {\n if (I = I || [], Object.prototype.toString.call(I) === \"[object Array]\") {\n for (var R = 0; R < w.length; R++) {\n var b = c(w[R]);\n l[b].references--;\n }\n for (var g = u(I, x), E = 0; E < w.length; E++) {\n var T = c(w[E]);\n l[T].references === 0 && (l[T].updater(), l.splice(T, 1));\n }\n w = g;\n }\n };\n };\n }, function(t, o, i) {\n (o = i(3)(!1)).push([t.i, `.ce-paragraph {\n line-height: 1.6em;\n outline: none;\n}\n\n.ce-paragraph[data-placeholder]:empty::before{\n content: attr(data-placeholder);\n color: #707684;\n font-weight: normal;\n opacity: 0;\n}\n\n/** Show placeholder at the first paragraph if Editor is empty */\n.codex-editor--empty .ce-block:first-child .ce-paragraph[data-placeholder]:empty::before {\n opacity: 1;\n}\n\n.codex-editor--toolbox-opened .ce-block:first-child .ce-paragraph[data-placeholder]:empty::before,\n.codex-editor--empty .ce-block:first-child .ce-paragraph[data-placeholder]:empty:focus::before {\n opacity: 0;\n}\n\n.ce-paragraph p:first-of-type{\n margin-top: 0;\n}\n\n.ce-paragraph p:last-of-type{\n margin-bottom: 0;\n}\n`, \"\"]), t.exports = o;\n }, function(t, o, i) {\n t.exports = function(n) {\n var r = [];\n return r.toString = function() {\n return this.map(function(a) {\n var l = function(c, u) {\n var h = c[1] || \"\", f = c[3];\n if (!f)\n return h;\n if (u && typeof btoa == \"function\") {\n var k = (v = f, A = btoa(unescape(encodeURIComponent(JSON.stringify(v)))), N = \"sourceMappingURL=data:application/json;charset=utf-8;base64,\".concat(A), \"/*# \".concat(N, \" */\")), p = f.sources.map(function(_) {\n return \"/*# sourceURL=\".concat(f.sourceRoot || \"\").concat(_, \" */\");\n });\n return [h].concat(p).concat([k]).join(`\n`);\n }\n var v, A, N;\n return [h].join(`\n`);\n }(a, n);\n return a[2] ? \"@media \".concat(a[2], \" {\").concat(l, \"}\") : l;\n }).join(\"\");\n }, r.i = function(a, l, c) {\n typeof a == \"string\" && (a = [[null, a, \"\"]]);\n var u = {};\n if (c)\n for (var h = 0; h < this.length; h++) {\n var f = this[h][0];\n f != null && (u[f] = !0);\n }\n for (var k = 0; k < a.length; k++) {\n var p = [].concat(a[k]);\n c && u[p[0]] || (l && (p[2] ? p[2] = \"\".concat(l, \" and \").concat(p[2]) : p[2] = l), r.push(p));\n }\n }, r;\n };\n }, function(t, o, i) {\n i.r(o), i.d(o, \"default\", function() {\n return a;\n }), i(0);\n function n(l, c) {\n for (var u = 0; u < c.length; u++) {\n var h = c[u];\n h.enumerable = h.enumerable || !1, h.configurable = !0, \"value\" in h && (h.writable = !0), Object.defineProperty(l, h.key, h);\n }\n }\n function r(l, c, u) {\n return c && n(l.prototype, c), u && n(l, u), l;\n }\n /**\n * Base Paragraph Block for the Editor.js.\n * Represents a regular text block\n *\n * @author CodeX (team@codex.so)\n * @copyright CodeX 2018\n * @license The MIT License (MIT)\n */\n var a = function() {\n function l(c) {\n var u = c.data, h = c.config, f = c.api, k = c.readOnly;\n (function(p, v) {\n if (!(p instanceof v))\n throw new TypeError(\"Cannot call a class as a function\");\n })(this, l), this.api = f, this.readOnly = k, this._CSS = { block: this.api.styles.block, wrapper: \"ce-paragraph\" }, this.readOnly || (this.onKeyUp = this.onKeyUp.bind(this)), this._placeholder = h.placeholder ? h.placeholder : l.DEFAULT_PLACEHOLDER, this._data = {}, this._element = null, this._preserveBlank = h.preserveBlank !== void 0 && h.preserveBlank, this.data = u;\n }\n return r(l, null, [{ key: \"DEFAULT_PLACEHOLDER\", get: function() {\n return \"\";\n } }]), r(l, [{ key: \"onKeyUp\", value: function(c) {\n c.code !== \"Backspace\" && c.code !== \"Delete\" || this._element.textContent === \"\" && (this._element.innerHTML = \"\");\n } }, { key: \"drawView\", value: function() {\n var c = document.createElement(\"DIV\");\n return c.classList.add(this._CSS.wrapper, this._CSS.block), c.contentEditable = !1, c.dataset.placeholder = this.api.i18n.t(this._placeholder), this.readOnly || (c.contentEditable = !0, c.addEventListener(\"keyup\", this.onKeyUp)), c;\n } }, { key: \"render\", value: function() {\n return this._element === null && (this._element = this.drawView()), this.hydrate(), this._element;\n } }, { key: \"merge\", value: function(c) {\n var u = { text: this.data.text + c.text };\n this.data = u;\n } }, { key: \"validate\", value: function(c) {\n return !(c.text.trim() === \"\" && !this._preserveBlank);\n } }, { key: \"save\", value: function(c) {\n return { text: c.innerHTML };\n } }, { key: \"onPaste\", value: function(c) {\n var u = { text: c.detail.data.innerHTML };\n this.data = u;\n } }, { key: \"hydrate\", value: function() {\n var c = this;\n window.requestAnimationFrame(function() {\n c._element.innerHTML = c._data.text || \"\";\n });\n } }, { key: \"data\", get: function() {\n if (this._element !== null) {\n var c = this._element.innerHTML;\n this._data.text = c;\n }\n return this._data;\n }, set: function(c) {\n this._data = c || {}, this._element !== null && this.hydrate();\n } }], [{ key: \"conversionConfig\", get: function() {\n return { export: \"text\", import: \"text\" };\n } }, { key: \"sanitize\", get: function() {\n return { text: { br: !0 } };\n } }, { key: \"isReadOnlySupported\", get: function() {\n return !0;\n } }, { key: \"pasteConfig\", get: function() {\n return { tags: [\"P\"] };\n } }, { key: \"toolbox\", get: function() {\n return { icon: '', title: \"Text\" };\n } }]), l;\n }();\n }]).default;\n });\n})(si);\nconst ri = /* @__PURE__ */ xe(Ne);\nclass We {\n constructor() {\n this.commandName = \"bold\", this.CSS = {\n button: \"ce-inline-tool\",\n buttonActive: \"ce-inline-tool--active\",\n buttonModifier: \"ce-inline-tool--bold\"\n }, this.nodes = {\n button: void 0\n };\n }\n /**\n * Sanitizer Rule\n * Leave tags\n *\n * @returns {object}\n */\n static get sanitize() {\n return {\n b: {}\n };\n }\n /**\n * Create button for Inline Toolbar\n */\n render() {\n return this.nodes.button = document.createElement(\"button\"), this.nodes.button.type = \"button\", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML = So, this.nodes.button;\n }\n /**\n * Wrap range with tag\n */\n surround() {\n document.execCommand(this.commandName);\n }\n /**\n * Check selection and set activated state to button if there are tag\n *\n * @returns {boolean}\n */\n checkState() {\n const e = document.queryCommandState(this.commandName);\n return this.nodes.button.classList.toggle(this.CSS.buttonActive, e), e;\n }\n /**\n * Set a shortcut\n *\n * @returns {boolean}\n */\n get shortcut() {\n return \"CMD+B\";\n }\n}\nWe.isInline = !0;\nWe.title = \"Bold\";\nclass Ye {\n constructor() {\n this.commandName = \"italic\", this.CSS = {\n button: \"ce-inline-tool\",\n buttonActive: \"ce-inline-tool--active\",\n buttonModifier: \"ce-inline-tool--italic\"\n }, this.nodes = {\n button: null\n };\n }\n /**\n * Sanitizer Rule\n * Leave tags\n *\n * @returns {object}\n */\n static get sanitize() {\n return {\n i: {}\n };\n }\n /**\n * Create button for Inline Toolbar\n */\n render() {\n return this.nodes.button = document.createElement(\"button\"), this.nodes.button.type = \"button\", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML = Oo, this.nodes.button;\n }\n /**\n * Wrap range with tag\n */\n surround() {\n document.execCommand(this.commandName);\n }\n /**\n * Check selection and set activated state to button if there are tag\n */\n checkState() {\n const e = document.queryCommandState(this.commandName);\n return this.nodes.button.classList.toggle(this.CSS.buttonActive, e), e;\n }\n /**\n * Set a shortcut\n */\n get shortcut() {\n return \"CMD+I\";\n }\n}\nYe.isInline = !0;\nYe.title = \"Italic\";\nclass Ke {\n /**\n * @param api - Editor.js API\n */\n constructor({ api: e }) {\n this.commandLink = \"createLink\", this.commandUnlink = \"unlink\", this.ENTER_KEY = 13, this.CSS = {\n button: \"ce-inline-tool\",\n buttonActive: \"ce-inline-tool--active\",\n buttonModifier: \"ce-inline-tool--link\",\n buttonUnlink: \"ce-inline-tool--unlink\",\n input: \"ce-inline-tool-input\",\n inputShowed: \"ce-inline-tool-input--showed\"\n }, this.nodes = {\n button: null,\n input: null\n }, this.inputOpened = !1, this.toolbar = e.toolbar, this.inlineToolbar = e.inlineToolbar, this.notifier = e.notifier, this.i18n = e.i18n, this.selection = new m();\n }\n /**\n * Sanitizer Rule\n * Leave
tags\n *\n * @returns {object}\n */\n static get sanitize() {\n return {\n a: {\n href: !0,\n target: \"_blank\",\n rel: \"nofollow\"\n }\n };\n }\n /**\n * Create button for Inline Toolbar\n */\n render() {\n return this.nodes.button = document.createElement(\"button\"), this.nodes.button.type = \"button\", this.nodes.button.classList.add(this.CSS.button, this.CSS.buttonModifier), this.nodes.button.innerHTML = Qe, this.nodes.button;\n }\n /**\n * Input for the link\n */\n renderActions() {\n return this.nodes.input = document.createElement(\"input\"), this.nodes.input.placeholder = this.i18n.t(\"Add a link\"), this.nodes.input.classList.add(this.CSS.input), this.nodes.input.addEventListener(\"keydown\", (e) => {\n e.keyCode === this.ENTER_KEY && this.enterPressed(e);\n }), this.nodes.input;\n }\n /**\n * Handle clicks on the Inline Toolbar icon\n *\n * @param {Range} range - range to wrap with link\n */\n surround(e) {\n if (e) {\n this.inputOpened ? (this.selection.restore(), this.selection.removeFakeBackground()) : (this.selection.setFakeBackground(), this.selection.save());\n const t = this.selection.findParentTag(\"A\");\n if (t) {\n this.selection.expandToTag(t), this.unlink(), this.closeActions(), this.checkState(), this.toolbar.close();\n return;\n }\n }\n this.toggleActions();\n }\n /**\n * Check selection and set activated state to button if there are tag\n */\n checkState() {\n const e = this.selection.findParentTag(\"A\");\n if (e) {\n this.nodes.button.innerHTML = Ro, this.nodes.button.classList.add(this.CSS.buttonUnlink), this.nodes.button.classList.add(this.CSS.buttonActive), this.openActions();\n const t = e.getAttribute(\"href\");\n this.nodes.input.value = t !== \"null\" ? t : \"\", this.selection.save();\n } else\n this.nodes.button.innerHTML = Qe, this.nodes.button.classList.remove(this.CSS.buttonUnlink), this.nodes.button.classList.remove(this.CSS.buttonActive);\n return !!e;\n }\n /**\n * Function called with Inline Toolbar closing\n */\n clear() {\n this.closeActions();\n }\n /**\n * Set a shortcut\n */\n get shortcut() {\n return \"CMD+K\";\n }\n /**\n * Show/close link input\n */\n toggleActions() {\n this.inputOpened ? this.closeActions(!1) : this.openActions(!0);\n }\n /**\n * @param {boolean} needFocus - on link creation we need to focus input. On editing - nope.\n */\n openActions(e = !1) {\n this.nodes.input.classList.add(this.CSS.inputShowed), e && this.nodes.input.focus(), this.inputOpened = !0;\n }\n /**\n * Close input\n *\n * @param {boolean} clearSavedSelection — we don't need to clear saved selection\n * on toggle-clicks on the icon of opened Toolbar\n */\n closeActions(e = !0) {\n if (this.selection.isFakeBackgroundEnabled) {\n const t = new m();\n t.save(), this.selection.restore(), this.selection.removeFakeBackground(), t.restore();\n }\n this.nodes.input.classList.remove(this.CSS.inputShowed), this.nodes.input.value = \"\", e && this.selection.clearSaved(), this.inputOpened = !1;\n }\n /**\n * Enter pressed on input\n *\n * @param {KeyboardEvent} event - enter keydown event\n */\n enterPressed(e) {\n let t = this.nodes.input.value || \"\";\n if (!t.trim()) {\n this.selection.restore(), this.unlink(), e.preventDefault(), this.closeActions();\n return;\n }\n if (!this.validateURL(t)) {\n this.notifier.show({\n message: \"Pasted link is not valid.\",\n style: \"error\"\n }), L(\"Incorrect Link pasted\", \"warn\", t);\n return;\n }\n t = this.prepareLink(t), this.selection.restore(), this.selection.removeFakeBackground(), this.insertLink(t), e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation(), this.selection.collapseToEnd(), this.inlineToolbar.close();\n }\n /**\n * Detects if passed string is URL\n *\n * @param {string} str - string to validate\n * @returns {boolean}\n */\n validateURL(e) {\n return !/\\s/.test(e);\n }\n /**\n * Process link before injection\n * - sanitize\n * - add protocol for links like 'google.com'\n *\n * @param {string} link - raw user input\n */\n prepareLink(e) {\n return e = e.trim(), e = this.addProtocol(e), e;\n }\n /**\n * Add 'http' protocol to the links like 'vc.ru', 'google.com'\n *\n * @param {string} link - string to process\n */\n addProtocol(e) {\n if (/^(\\w+):(\\/\\/)?/.test(e))\n return e;\n const t = /^\\/[^/\\s]/.test(e), o = e.substring(0, 1) === \"#\", i = /^\\/\\/[^/\\s]/.test(e);\n return !t && !o && !i && (e = \"http://\" + e), e;\n }\n /**\n * Inserts tag with \"href\"\n *\n * @param {string} link - \"href\" value\n */\n insertLink(e) {\n const t = this.selection.findParentTag(\"A\");\n t && this.selection.expandToTag(t), document.execCommand(this.commandLink, !1, e);\n }\n /**\n * Removes tag\n */\n unlink() {\n document.execCommand(this.commandUnlink);\n }\n}\nKe.isInline = !0;\nKe.title = \"Link\";\nclass Et {\n /**\n * @param options - constructor options\n * @param options.data - stub tool data\n * @param options.api - Editor.js API\n */\n constructor({ data: e, api: t }) {\n this.CSS = {\n wrapper: \"ce-stub\",\n info: \"ce-stub__info\",\n title: \"ce-stub__title\",\n subtitle: \"ce-stub__subtitle\"\n }, this.api = t, this.title = e.title || this.api.i18n.t(\"Error\"), this.subtitle = this.api.i18n.t(\"The block can not be displayed correctly.\"), this.savedData = e.savedData, this.wrapper = this.make();\n }\n /**\n * Returns stub holder\n *\n * @returns {HTMLElement}\n */\n render() {\n return this.wrapper;\n }\n /**\n * Return original Tool data\n *\n * @returns {BlockToolData}\n */\n save() {\n return this.savedData;\n }\n /**\n * Create Tool html markup\n *\n * @returns {HTMLElement}\n */\n make() {\n const e = d.make(\"div\", this.CSS.wrapper), t = Do, o = d.make(\"div\", this.CSS.info), i = d.make(\"div\", this.CSS.title, {\n textContent: this.title\n }), n = d.make(\"div\", this.CSS.subtitle, {\n textContent: this.subtitle\n });\n return e.innerHTML = t, o.appendChild(i), o.appendChild(n), e.appendChild(o), e;\n }\n}\nEt.isReadOnlySupported = !0;\nclass ai extends $e {\n constructor() {\n super(...arguments), this.type = ye.Inline;\n }\n /**\n * Returns title for Inline Tool if specified by user\n */\n get title() {\n return this.constructable[Ue.Title];\n }\n /**\n * Constructs new InlineTool instance from constructable\n */\n create() {\n return new this.constructable({\n api: this.api.getMethodsForTool(this),\n config: this.settings\n });\n }\n}\nclass li extends $e {\n constructor() {\n super(...arguments), this.type = ye.Tune;\n }\n /**\n * Constructs new BlockTune instance from constructable\n *\n * @param data - Tune data\n * @param block - Block API object\n */\n create(e, t) {\n return new this.constructable({\n api: this.api.getMethodsForTool(this),\n config: this.settings,\n block: t,\n data: e\n });\n }\n}\nclass U extends Map {\n /**\n * Returns Block Tools collection\n */\n get blockTools() {\n const e = Array.from(this.entries()).filter(([, t]) => t.isBlock());\n return new U(e);\n }\n /**\n * Returns Inline Tools collection\n */\n get inlineTools() {\n const e = Array.from(this.entries()).filter(([, t]) => t.isInline());\n return new U(e);\n }\n /**\n * Returns Block Tunes collection\n */\n get blockTunes() {\n const e = Array.from(this.entries()).filter(([, t]) => t.isTune());\n return new U(e);\n }\n /**\n * Returns internal Tools collection\n */\n get internalTools() {\n const e = Array.from(this.entries()).filter(([, t]) => t.isInternal);\n return new U(e);\n }\n /**\n * Returns Tools collection provided by user\n */\n get externalTools() {\n const e = Array.from(this.entries()).filter(([, t]) => !t.isInternal);\n return new U(e);\n }\n}\nvar ci = Object.defineProperty, di = Object.getOwnPropertyDescriptor, Bt = (s, e, t, o) => {\n for (var i = o > 1 ? void 0 : o ? di(e, t) : e, n = s.length - 1, r; n >= 0; n--)\n (r = s[n]) && (i = (o ? r(e, t, i) : r(i)) || i);\n return o && i && ci(e, t, i), i;\n};\nclass Xe extends $e {\n constructor() {\n super(...arguments), this.type = ye.Block, this.inlineTools = new U(), this.tunes = new U();\n }\n /**\n * Creates new Tool instance\n *\n * @param data - Tool data\n * @param block - BlockAPI for current Block\n * @param readOnly - True if Editor is in read-only mode\n */\n create(e, t, o) {\n return new this.constructable({\n data: e,\n block: t,\n readOnly: o,\n api: this.api.getMethodsForTool(this),\n config: this.settings\n });\n }\n /**\n * Returns true if read-only mode is supported by Tool\n */\n get isReadOnlySupported() {\n return this.constructable[se.IsReadOnlySupported] === !0;\n }\n /**\n * Returns true if Tool supports linebreaks\n */\n get isLineBreaksEnabled() {\n return this.constructable[se.IsEnabledLineBreaks];\n }\n /**\n * Returns Tool toolbox configuration (internal or user-specified).\n *\n * Merges internal and user-defined toolbox configs based on the following rules:\n *\n * - If both internal and user-defined toolbox configs are arrays their items are merged.\n * Length of the second one is kept.\n *\n * - If both are objects their properties are merged.\n *\n * - If one is an object and another is an array than internal config is replaced with user-defined\n * config. This is made to allow user to override default tool's toolbox representation (single/multiple entries)\n */\n get toolbox() {\n const e = this.constructable[se.Toolbox], t = this.config[ke.Toolbox];\n if (!V(e) && t !== !1)\n return t ? Array.isArray(e) ? Array.isArray(t) ? t.map((o, i) => {\n const n = e[i];\n return n ? {\n ...n,\n ...o\n } : o;\n }) : [t] : Array.isArray(t) ? t : [\n {\n ...e,\n ...t\n }\n ] : Array.isArray(e) ? e : [e];\n }\n /**\n * Returns Tool conversion configuration\n */\n get conversionConfig() {\n return this.constructable[se.ConversionConfig];\n }\n /**\n * Returns enabled inline tools for Tool\n */\n get enabledInlineTools() {\n return this.config[ke.EnabledInlineTools] || !1;\n }\n /**\n * Returns enabled tunes for Tool\n */\n get enabledBlockTunes() {\n return this.config[ke.EnabledBlockTunes];\n }\n /**\n * Returns Tool paste configuration\n */\n get pasteConfig() {\n return this.constructable[se.PasteConfig] ?? {};\n }\n get sanitizeConfig() {\n const e = super.sanitizeConfig, t = this.baseSanitizeConfig;\n if (V(e))\n return t;\n const o = {};\n for (const i in e)\n if (Object.prototype.hasOwnProperty.call(e, i)) {\n const n = e[i];\n z(n) ? o[i] = Object.assign({}, t, n) : o[i] = n;\n }\n return o;\n }\n get baseSanitizeConfig() {\n const e = {};\n return Array.from(this.inlineTools.values()).forEach((t) => Object.assign(e, t.sanitizeConfig)), Array.from(this.tunes.values()).forEach((t) => Object.assign(e, t.sanitizeConfig)), e;\n }\n}\nBt([\n ce\n], Xe.prototype, \"sanitizeConfig\", 1);\nBt([\n ce\n], Xe.prototype, \"baseSanitizeConfig\", 1);\nclass hi {\n /**\n * @class\n * @param config - tools config\n * @param editorConfig - EditorJS config\n * @param api - EditorJS API module\n */\n constructor(e, t, o) {\n this.api = o, this.config = e, this.editorConfig = t;\n }\n /**\n * Returns Tool object based on it's type\n *\n * @param name - tool name\n */\n get(e) {\n const { class: t, isInternal: o = !1, ...i } = this.config[e], n = this.getConstructor(t);\n return new n({\n name: e,\n constructable: t,\n config: i,\n api: this.api,\n isDefault: e === this.editorConfig.defaultBlock,\n defaultPlaceholder: this.editorConfig.placeholder,\n isInternal: o\n });\n }\n /**\n * Find appropriate Tool object constructor for Tool constructable\n *\n * @param constructable - Tools constructable\n */\n getConstructor(e) {\n switch (!0) {\n case e[Ue.IsInline]:\n return ai;\n case e[xt.IsTune]:\n return li;\n default:\n return Xe;\n }\n }\n}\nclass Tt {\n /**\n * MoveDownTune constructor\n *\n * @param {API} api — Editor's API\n */\n constructor({ api: e }) {\n this.CSS = {\n animation: \"wobble\"\n }, this.api = e;\n }\n /**\n * Tune's appearance in block settings menu\n */\n render() {\n return {\n icon: ft,\n title: this.api.i18n.t(\"Move down\"),\n onActivate: () => this.handleClick(),\n name: \"move-down\"\n };\n }\n /**\n * Handle clicks on 'move down' button\n */\n handleClick() {\n const e = this.api.blocks.getCurrentBlockIndex(), t = this.api.blocks.getBlockByIndex(e + 1);\n if (!t)\n throw new Error(\"Unable to move Block down since it is already the last\");\n const o = t.holder, i = o.getBoundingClientRect();\n let n = Math.abs(window.innerHeight - o.offsetHeight);\n i.top < window.innerHeight && (n = window.scrollY + o.offsetHeight), window.scrollTo(0, n), this.api.blocks.move(e + 1), this.api.toolbar.toggleBlockSettings(!0);\n }\n}\nTt.isTune = !0;\nclass Ct {\n /**\n * DeleteTune constructor\n *\n * @param {API} api - Editor's API\n */\n constructor({ api: e }) {\n this.api = e;\n }\n /**\n * Tune's appearance in block settings menu\n */\n render() {\n return {\n icon: Mo,\n title: this.api.i18n.t(\"Delete\"),\n name: \"delete\",\n confirmation: {\n title: this.api.i18n.t(\"Click to delete\"),\n onActivate: () => this.handleClick()\n }\n };\n }\n /**\n * Delete block conditions passed\n */\n handleClick() {\n this.api.blocks.delete();\n }\n}\nCt.isTune = !0;\nclass St {\n /**\n * MoveUpTune constructor\n *\n * @param {API} api - Editor's API\n */\n constructor({ api: e }) {\n this.CSS = {\n animation: \"wobble\"\n }, this.api = e;\n }\n /**\n * Tune's appearance in block settings menu\n */\n render() {\n return {\n icon: Io,\n title: this.api.i18n.t(\"Move up\"),\n onActivate: () => this.handleClick(),\n name: \"move-up\"\n };\n }\n /**\n * Move current block up\n */\n handleClick() {\n const e = this.api.blocks.getCurrentBlockIndex(), t = this.api.blocks.getBlockByIndex(e), o = this.api.blocks.getBlockByIndex(e - 1);\n if (e === 0 || !t || !o)\n throw new Error(\"Unable to move Block up since it is already the first\");\n const i = t.holder, n = o.holder, r = i.getBoundingClientRect(), a = n.getBoundingClientRect();\n let l;\n a.top > 0 ? l = Math.abs(r.top) - Math.abs(a.top) : l = Math.abs(r.top) + a.height, window.scrollBy(0, -1 * l), this.api.blocks.move(e - 1), this.api.toolbar.toggleBlockSettings(!0);\n }\n}\nSt.isTune = !0;\nvar ui = Object.defineProperty, pi = Object.getOwnPropertyDescriptor, fi = (s, e, t, o) => {\n for (var i = o > 1 ? void 0 : o ? pi(e, t) : e, n = s.length - 1, r; n >= 0; n--)\n (r = s[n]) && (i = (o ? r(e, t, i) : r(i)) || i);\n return o && i && ui(e, t, i), i;\n};\nclass It extends C {\n constructor() {\n super(...arguments), this.stubTool = \"stub\", this.toolsAvailable = new U(), this.toolsUnavailable = new U();\n }\n /**\n * Returns available Tools\n */\n get available() {\n return this.toolsAvailable;\n }\n /**\n * Returns unavailable Tools\n */\n get unavailable() {\n return this.toolsUnavailable;\n }\n /**\n * Return Tools for the Inline Toolbar\n */\n get inlineTools() {\n return this.available.inlineTools;\n }\n /**\n * Return editor block tools\n */\n get blockTools() {\n return this.available.blockTools;\n }\n /**\n * Return available Block Tunes\n *\n * @returns {object} - object of Inline Tool's classes\n */\n get blockTunes() {\n return this.available.blockTunes;\n }\n /**\n * Returns default Tool object\n */\n get defaultTool() {\n return this.blockTools.get(this.config.defaultBlock);\n }\n /**\n * Returns internal tools\n */\n get internal() {\n return this.available.internalTools;\n }\n /**\n * Creates instances via passed or default configuration\n *\n * @returns {Promise}\n */\n async prepare() {\n if (this.validateTools(), this.config.tools = Se({}, this.internalTools, this.config.tools), !Object.prototype.hasOwnProperty.call(this.config, \"tools\") || Object.keys(this.config.tools).length === 0)\n throw Error(\"Can't start without tools\");\n const e = this.prepareConfig();\n this.factory = new hi(e, this.config, this.Editor.API);\n const t = this.getListOfPrepareFunctions(e);\n if (t.length === 0)\n return Promise.resolve();\n await Dt(t, (o) => {\n this.toolPrepareMethodSuccess(o);\n }, (o) => {\n this.toolPrepareMethodFallback(o);\n }), this.prepareBlockTools();\n }\n getAllInlineToolsSanitizeConfig() {\n const e = {};\n return Array.from(this.inlineTools.values()).forEach((t) => {\n Object.assign(e, t.sanitizeConfig);\n }), e;\n }\n /**\n * Calls each Tool reset method to clean up anything set by Tool\n */\n destroy() {\n Object.values(this.available).forEach(async (e) => {\n D(e.reset) && await e.reset();\n });\n }\n /**\n * Returns internal tools\n * Includes Bold, Italic, Link and Paragraph\n */\n get internalTools() {\n return {\n bold: {\n class: We,\n isInternal: !0\n },\n italic: {\n class: Ye,\n isInternal: !0\n },\n link: {\n class: Ke,\n isInternal: !0\n },\n paragraph: {\n class: ri,\n inlineToolbar: !0,\n isInternal: !0\n },\n stub: {\n class: Et,\n isInternal: !0\n },\n moveUp: {\n class: St,\n isInternal: !0\n },\n delete: {\n class: Ct,\n isInternal: !0\n },\n moveDown: {\n class: Tt,\n isInternal: !0\n }\n };\n }\n /**\n * Tool prepare method success callback\n *\n * @param {object} data - append tool to available list\n */\n toolPrepareMethodSuccess(e) {\n const t = this.factory.get(e.toolName);\n if (t.isInline()) {\n const i = [\"render\", \"surround\", \"checkState\"].filter((n) => !t.create()[n]);\n if (i.length) {\n L(\n `Incorrect Inline Tool: ${t.name}. Some of required methods is not implemented %o`,\n \"warn\",\n i\n ), this.toolsUnavailable.set(t.name, t);\n return;\n }\n }\n this.toolsAvailable.set(t.name, t);\n }\n /**\n * Tool prepare method fail callback\n *\n * @param {object} data - append tool to unavailable list\n */\n toolPrepareMethodFallback(e) {\n this.toolsUnavailable.set(e.toolName, this.factory.get(e.toolName));\n }\n /**\n * Binds prepare function of plugins with user or default config\n *\n * @returns {Array} list of functions that needs to be fired sequentially\n * @param config - tools config\n */\n getListOfPrepareFunctions(e) {\n const t = [];\n return Object.entries(e).forEach(([o, i]) => {\n t.push({\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n function: D(i.class.prepare) ? i.class.prepare : () => {\n },\n data: {\n toolName: o,\n config: i.config\n }\n });\n }), t;\n }\n /**\n * Assign enabled Inline Tools and Block Tunes for Block Tool\n */\n prepareBlockTools() {\n Array.from(this.blockTools.values()).forEach((e) => {\n this.assignInlineToolsToBlockTool(e), this.assignBlockTunesToBlockTool(e);\n });\n }\n /**\n * Assign enabled Inline Tools for Block Tool\n *\n * @param tool - Block Tool\n */\n assignInlineToolsToBlockTool(e) {\n if (this.config.inlineToolbar !== !1) {\n if (e.enabledInlineTools === !0) {\n e.inlineTools = new U(\n Array.isArray(this.config.inlineToolbar) ? this.config.inlineToolbar.map((t) => [t, this.inlineTools.get(t)]) : Array.from(this.inlineTools.entries())\n );\n return;\n }\n Array.isArray(e.enabledInlineTools) && (e.inlineTools = new U(\n e.enabledInlineTools.map((t) => [t, this.inlineTools.get(t)])\n ));\n }\n }\n /**\n * Assign enabled Block Tunes for Block Tool\n *\n * @param tool — Block Tool\n */\n assignBlockTunesToBlockTool(e) {\n if (e.enabledBlockTunes !== !1) {\n if (Array.isArray(e.enabledBlockTunes)) {\n const t = new U(\n e.enabledBlockTunes.map((o) => [o, this.blockTunes.get(o)])\n );\n e.tunes = new U([...t, ...this.blockTunes.internalTools]);\n return;\n }\n if (Array.isArray(this.config.tunes)) {\n const t = new U(\n this.config.tunes.map((o) => [o, this.blockTunes.get(o)])\n );\n e.tunes = new U([...t, ...this.blockTunes.internalTools]);\n return;\n }\n e.tunes = this.blockTunes.internalTools;\n }\n }\n /**\n * Validate Tools configuration objects and throw Error for user if it is invalid\n */\n validateTools() {\n for (const e in this.config.tools)\n if (Object.prototype.hasOwnProperty.call(this.config.tools, e)) {\n if (e in this.internalTools)\n return;\n const t = this.config.tools[e];\n if (!D(t) && !D(t.class))\n throw Error(\n `Tool «${e}» must be a constructor function or an object with function in the «class» property`\n );\n }\n }\n /**\n * Unify tools config\n */\n prepareConfig() {\n const e = {};\n for (const t in this.config.tools)\n z(this.config.tools[t]) ? e[t] = this.config.tools[t] : e[t] = { class: this.config.tools[t] };\n return e;\n }\n}\nfi([\n ce\n], It.prototype, \"getAllInlineToolsSanitizeConfig\", 1);\nconst gi = `:root{--selectionColor: #e1f2ff;--inlineSelectionColor: #d4ecff;--bg-light: #eff2f5;--grayText: #707684;--color-dark: #1D202B;--color-active-icon: #388AE5;--color-gray-border: rgba(201, 201, 204, .48);--content-width: 650px;--narrow-mode-right-padding: 50px;--toolbox-buttons-size: 26px;--toolbox-buttons-size--mobile: 36px;--icon-size: 20px;--icon-size--mobile: 28px;--block-padding-vertical: .4em;--color-line-gray: #EFF0F1 }.codex-editor{position:relative;-webkit-box-sizing:border-box;box-sizing:border-box;z-index:1}.codex-editor .hide{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-copyable{position:absolute;height:1px;width:1px;top:-400%;opacity:.001}.codex-editor-overlay{position:fixed;top:0px;left:0px;right:0px;bottom:0px;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:#2eaadc33;border:1px solid transparent}.codex-editor svg{max-height:100%}.codex-editor path{stroke:currentColor}.codex-editor ::-moz-selection{background-color:#d4ecff}.codex-editor ::selection{background-color:#d4ecff}.codex-editor--toolbox-opened [contentEditable=true][data-placeholder]:focus:before{opacity:0!important}.ce-scroll-locked{overflow:hidden}.ce-scroll-locked--hard{overflow:hidden;top:calc(-1 * var(--window-scroll-offset));position:fixed;width:100%}.ce-toolbar{position:absolute;left:0;right:0;top:0;-webkit-transition:opacity .1s ease;transition:opacity .1s ease;will-change:opacity,top;display:none}.ce-toolbar--opened{display:block}.ce-toolbar__content{max-width:650px;margin:0 auto;position:relative}.ce-toolbar__plus{color:#1d202b;cursor:pointer;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-ms-flex-negative:0;flex-shrink:0}@media (max-width: 650px){.ce-toolbar__plus{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__plus:hover{background-color:#eff2f5}}.ce-toolbar__plus--active{background-color:#eff2f5;-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}@media (max-width: 650px){.ce-toolbar__plus{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__plus--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__plus--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__actions{position:absolute;right:100%;opacity:0;display:-webkit-box;display:-ms-flexbox;display:flex;padding-right:5px}.ce-toolbar__actions--opened{opacity:1}@media (max-width: 650px){.ce-toolbar__actions{right:auto}}.ce-toolbar__settings-btn{color:#1d202b;width:26px;height:26px;border-radius:7px;display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;margin-left:3px;cursor:pointer;user-select:none}@media (max-width: 650px){.ce-toolbar__settings-btn{width:36px;height:36px}}@media (hover: hover){.ce-toolbar__settings-btn:hover{background-color:#eff2f5}}.ce-toolbar__settings-btn--active{background-color:#eff2f5;-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}@media (min-width: 651px){.ce-toolbar__settings-btn{width:24px}}.ce-toolbar__settings-btn--hidden{display:none}@media (max-width: 650px){.ce-toolbar__settings-btn{position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;position:static}.ce-toolbar__settings-btn--left-oriented:before{left:15px;margin-left:0}.ce-toolbar__settings-btn--right-oriented:before{left:auto;right:15px;margin-left:0}}.ce-toolbar__plus svg,.ce-toolbar__settings-btn svg{width:24px;height:24px}@media (min-width: 651px){.codex-editor--narrow .ce-toolbar__plus{left:5px}}@media (min-width: 651px){.codex-editor--narrow .ce-toolbox .ce-popover{right:0;left:auto;left:initial}}.ce-inline-toolbar{--y-offset: 8px;position:absolute;background-color:#fff;border:1px solid #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;-webkit-transform:translateX(-50%) translateY(8px) scale(.94);transform:translate(-50%) translateY(8px) scale(.94);opacity:0;visibility:hidden;-webkit-transition:opacity .25s ease,-webkit-transform .15s ease;transition:opacity .25s ease,-webkit-transform .15s ease;transition:transform .15s ease,opacity .25s ease;transition:transform .15s ease,opacity .25s ease,-webkit-transform .15s ease;will-change:transform,opacity;top:0;left:0;z-index:3}.ce-inline-toolbar--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:translate(-50%)}.ce-inline-toolbar--left-oriented{-webkit-transform:translateX(-23px) translateY(8px) scale(.94);transform:translate(-23px) translateY(8px) scale(.94)}.ce-inline-toolbar--left-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-23px);transform:translate(-23px)}.ce-inline-toolbar--right-oriented{-webkit-transform:translateX(-100%) translateY(8px) scale(.94);transform:translate(-100%) translateY(8px) scale(.94);margin-left:23px}.ce-inline-toolbar--right-oriented.ce-inline-toolbar--showed{-webkit-transform:translateX(-100%);transform:translate(-100%)}.ce-inline-toolbar [hidden]{display:none!important}.ce-inline-toolbar__toggler-and-button-wrapper{display:-webkit-box;display:-ms-flexbox;display:flex;width:100%;padding:0 6px}.ce-inline-toolbar__buttons{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown{display:-webkit-box;display:-ms-flexbox;display:flex;padding:6px;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);-webkit-box-sizing:border-box;box-sizing:border-box}@media (hover: hover){.ce-inline-toolbar__dropdown:hover{background:#eff2f5}}.ce-inline-toolbar__dropdown--hidden{display:none}.ce-inline-toolbar__dropdown-content,.ce-inline-toolbar__dropdown-arrow{display:-webkit-box;display:-ms-flexbox;display:flex}.ce-inline-toolbar__dropdown-content svg,.ce-inline-toolbar__dropdown-arrow svg{width:20px;height:20px}.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;padding:6px 1px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;border-radius:0;line-height:normal}.ce-inline-tool svg{width:20px;height:20px}@media (max-width: 650px){.ce-inline-tool svg{width:28px;height:28px}}@media (hover: hover){.ce-inline-tool:hover{background-color:#eff2f5}}.ce-inline-tool--active{color:#388ae5}.ce-inline-tool--focused{background:rgba(34,186,255,.08)!important}.ce-inline-tool--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.ce-inline-tool--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.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);-webkit-appearance:none;font-family:inherit}@media (max-width: 650px){.ce-inline-tool-input{font-size:15px;font-weight:500}}.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 #E8E8EB;-webkit-box-shadow:0 3px 15px -3px rgba(13,20,33,.13);box-shadow:0 3px 15px -3px #0d142121;border-radius:6px;z-index:2;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:190px;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{background:rgba(34,186,255,.08)!important}.ce-conversion-tool--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.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:26px;height:26px;-webkit-box-shadow:0 0 0 1px rgba(201,201,204,.48);box-shadow:0 0 0 1px #c9c9cc7a;border-radius:5px;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;background:#fff;-webkit-box-sizing:content-box;box-sizing:content-box;-ms-flex-negative:0;flex-shrink:0;margin-right:10px}.ce-conversion-tool__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-conversion-tool__icon{width:36px;height:36px;border-radius:8px}.ce-conversion-tool__icon svg{width:28px;height:28px}}.ce-conversion-tool--last{margin-right:0!important}.ce-conversion-tool--active{color:#388ae5!important}.ce-conversion-tool--active{-webkit-animation:bounceIn .75s 1;animation:bounceIn .75s 1;-webkit-animation-fill-mode:forwards;animation-fill-mode:forwards}.ce-conversion-tool__secondary-label{color:#707684;font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width: 650px){.ce-conversion-tool__secondary-label{display:none}}.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;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;line-height:32px}.ce-settings__button svg{width:20px;height:20px}@media (max-width: 650px){.ce-settings__button svg{width:28px;height:28px}}@media (hover: hover){.ce-settings__button:hover{background-color:#eff2f5}}.ce-settings__button--active{color:#388ae5}.ce-settings__button--focused{background:rgba(34,186,255,.08)!important}.ce-settings__button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.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--disabled{cursor:not-allowed!important}.ce-settings__button--disabled{opacity:.3}.ce-settings__button--selected{color:#388ae5}@media (min-width: 651px){.codex-editor--narrow .ce-settings .ce-popover{right:0;left:auto;left:initial}}@-webkit-keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}.ce-block{-webkit-animation:fade-in .3s ease;animation:fade-in .3s ease;-webkit-animation-fill-mode:none;animation-fill-mode:none;-webkit-animation-fill-mode:initial;animation-fill-mode:initial}.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 img,.ce-block--selected .ce-block__content .ce-stub{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 1px,#fff 6px)}.ce-block a{cursor:pointer;-webkit-text-decoration:underline;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}}@-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:scale3d(1,1,1);transform:scaleZ(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:scale3d(1,1,1);transform:scaleZ(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:scale3d(1,1,1);transform:scaleZ(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:scale3d(1,1,1);transform:scaleZ(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:scale3d(1,1,1);transform:scaleZ(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:scale3d(1,1,1);transform:scaleZ(1)}}.cdx-block{padding:.4em 0}.cdx-block::-webkit-input-placeholder{line-height:normal!important}.cdx-input{border:1px solid rgba(201,201,204,.48);-webkit-box-shadow:inset 0 1px 2px 0 rgba(35,44,72,.06);box-shadow:inset 0 1px 2px #232c480f;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}.cdx-input[data-placeholder]:before{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;padding:6px 1px;border-radius:3px;cursor:pointer;border:0;outline:none;background-color:transparent;vertical-align:bottom;color:inherit;margin:0;min-width:26px;min-height:26px}.cdx-settings-button svg{width:20px;height:20px}@media (max-width: 650px){.cdx-settings-button svg{width:28px;height:28px}}@media (hover: hover){.cdx-settings-button:hover{background-color:#eff2f5}}.cdx-settings-button--focused{background:rgba(34,186,255,.08)!important}.cdx-settings-button--focused{-webkit-box-shadow:inset 0 0 0px 1px rgba(7,161,227,.08);box-shadow:inset 0 0 0 1px #07a1e314}.cdx-settings-button--focused-animated{-webkit-animation-name:buttonClicked;animation-name:buttonClicked;-webkit-animation-duration:.25s;animation-duration:.25s}.cdx-settings-button--active{color:#388ae5}.cdx-settings-button svg{width:auto;height:auto}@media (max-width: 650px){.cdx-settings-button{width:36px;height:36px;border-radius:8px}}.cdx-loader{position:relative;border:1px solid rgba(201,201,204,.48)}.cdx-loader:before{content:\"\";position:absolute;left:50%;top:50%;width:18px;height:18px;margin:-11px 0 0 -11px;border:2px solid rgba(201,201,204,.48);border-left-color:#388ae5;border-radius:50%;-webkit-animation:cdxRotation 1.2s infinite linear;animation:cdxRotation 1.2s infinite linear}@-webkit-keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}@keyframes cdxRotation{0%{-webkit-transform:rotate(0deg);transform:rotate(0)}to{-webkit-transform:rotate(360deg);transform:rotate(360deg)}}.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 #121e390a;color:#707684;text-align:center;cursor:pointer}@media (hover: hover){.cdx-button:hover{background:#FBFCFE;-webkit-box-shadow:0 1px 3px 0 rgba(18,30,57,.08);box-shadow:0 1px 3px #121e3914}}.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;padding:12px 18px;margin:10px 0;border-radius:10px;background:#eff2f5;border:1px solid #EFF0F1;color:#707684;font-size:14px}.ce-stub svg{width:20px;height:20px}.ce-stub__info{margin-left:14px}.ce-stub__title{font-weight:500;text-transform:capitalize}.codex-editor.codex-editor--rtl{direction:rtl}.codex-editor.codex-editor--rtl .cdx-list{padding-left:0;padding-right:40px}.codex-editor.codex-editor--rtl .ce-toolbar__plus{right:-26px;left:auto}.codex-editor.codex-editor--rtl .ce-toolbar__actions{right:auto;left:-26px}@media (max-width: 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:0px 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:0px;right:5px}}@media (min-width: 651px){.codex-editor--narrow.codex-editor--rtl .ce-toolbar__actions{left:-5px}}.cdx-search-field{--icon-margin-right: 10px;background:rgba(232,232,235,.49);border:1px solid rgba(226,226,229,.2);border-radius:6px;padding:2px;display:grid;grid-template-columns:auto auto 1fr;grid-template-rows:auto}.cdx-search-field__icon{width:26px;height:26px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:var(--icon-margin-right)}.cdx-search-field__icon svg{width:20px;height:20px;color:#707684}.cdx-search-field__input{font-size:14px;outline:none;font-weight:500;font-family:inherit;border:0;background:transparent;margin:0;padding:0;line-height:22px;min-width:calc(100% - 26px - var(--icon-margin-right))}.cdx-search-field__input::-webkit-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-moz-placeholder{color:#707684;font-weight:500}.cdx-search-field__input:-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::-ms-input-placeholder{color:#707684;font-weight:500}.cdx-search-field__input::placeholder{color:#707684;font-weight:500}.ce-popover{--border-radius: 6px;--width: 200px;--max-height: 270px;--padding: 6px;--offset-from-target: 8px;--color-border: #e8e8eb;--color-shadow: rgba(13,20,33,.13);--color-background: white;--color-text-primary: black;--color-text-secondary: #707684;--color-border-icon: rgba(201, 201, 204, .48);--color-border-icon-disabled: #EFF0F1;--color-text-icon-active: #388AE5;--color-background-icon-active: rgba(56, 138, 229, .1);--color-background-item-focus: rgba(34, 186, 255, .08);--color-shadow-item-focus: rgba(7, 161, 227, .08);--color-background-item-hover: #eff2f5;--color-background-item-confirm: #E24A4A;--color-background-item-confirm-hover: #CE4343;min-width:var(--width);width:var(--width);max-height:var(--max-height);border-radius:var(--border-radius);overflow:hidden;-webkit-box-sizing:border-box;box-sizing:border-box;-webkit-box-shadow:0 3px 15px -3px var(--color-shadow);box-shadow:0 3px 15px -3px var(--color-shadow);position:absolute;left:0;top:calc(100% + var(--offset-from-target));background:var(--color-background);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;z-index:4;opacity:0;max-height:0;pointer-events:none;padding:0;border:none}.ce-popover--opened{opacity:1;padding:var(--padding);max-height:var(--max-height);pointer-events:auto;-webkit-animation:panelShowing .1s ease;animation:panelShowing .1s ease;border:1px solid var(--color-border)}@media (max-width: 650px){.ce-popover--opened{-webkit-animation:panelShowingMobile .25s ease;animation:panelShowingMobile .25s ease}}.ce-popover__items{overflow-y:auto;-ms-scroll-chaining:none;overscroll-behavior:contain}@media (max-width: 650px){.ce-popover__overlay{position:fixed;top:0;bottom:0;left:0;right:0;background:#1D202B;z-index:3;opacity:.5;-webkit-transition:opacity .12s ease-in;transition:opacity .12s ease-in;will-change:opacity;visibility:visible}}.ce-popover__overlay--hidden{display:none}.ce-popover--open-top{top:calc(-1 * (var(--offset-from-target) + var(--popover-height)))}@media (max-width: 650px){.ce-popover{--offset: 5px;position:fixed;max-width:none;min-width:calc(100% - var(--offset) * 2);left:var(--offset);right:var(--offset);bottom:calc(var(--offset) + env(safe-area-inset-bottom));top:auto;border-radius:10px}.ce-popover .ce-popover__search{display:none}}.ce-popover__search,.ce-popover__custom-content:not(:empty){margin-bottom:5px}.ce-popover__nothing-found-message{color:#707684;display:none;cursor:default;padding:3px;font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ce-popover__nothing-found-message--displayed{display:block}.ce-popover__custom-content:not(:empty){padding:4px}@media (min-width: 651px){.ce-popover__custom-content:not(:empty){padding:0}}.ce-popover__custom-content--hidden{display:none}.ce-popover-item{--border-radius: 6px;--icon-size: 20px;--icon-size-mobile: 28px;border-radius:var(--border-radius);display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:3px;color:var(--color-text-primary);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media (max-width: 650px){.ce-popover-item{padding:4px}}.ce-popover-item:not(:last-of-type){margin-bottom:1px}.ce-popover-item__icon{border-radius:5px;width:26px;height:26px;-webkit-box-shadow:0 0 0 1px var(--color-border-icon);box-shadow:0 0 0 1px var(--color-border-icon);background:#fff;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;margin-right:10px}.ce-popover-item__icon svg{width:20px;height:20px}@media (max-width: 650px){.ce-popover-item__icon{width:36px;height:36px;border-radius:8px}.ce-popover-item__icon svg{width:var(--icon-size-mobile);height:var(--icon-size-mobile)}}.ce-popover-item__title{font-size:14px;line-height:20px;font-weight:500;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}@media (max-width: 650px){.ce-popover-item__title{font-size:16px}}.ce-popover-item__secondary-title{color:var(--color-text-secondary);font-size:12px;margin-left:auto;white-space:nowrap;letter-spacing:-.1em;padding-right:5px;margin-bottom:-2px;opacity:.6}@media (max-width: 650px){.ce-popover-item__secondary-title{display:none}}.ce-popover-item--active{background:var(--color-background-icon-active);color:var(--color-text-icon-active)}.ce-popover-item--active .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}.ce-popover-item--disabled{color:var(--color-text-secondary);cursor:default;pointer-events:none}.ce-popover-item--disabled .ce-popover-item__icon{-webkit-box-shadow:0 0 0 1px var(--color-border-icon-disabled);box-shadow:0 0 0 1px var(--color-border-icon-disabled)}.ce-popover-item--focused:not(.ce-popover-item--no-focus){background:var(--color-background-item-focus)!important}.ce-popover-item--focused:not(.ce-popover-item--no-focus){-webkit-box-shadow:inset 0 0 0px 1px var(--color-shadow-item-focus);box-shadow:inset 0 0 0 1px var(--color-shadow-item-focus)}.ce-popover-item--hidden{display:none}@media (hover: hover){.ce-popover-item:hover{cursor:pointer}.ce-popover-item:hover:not(.ce-popover-item--no-hover){background-color:var(--color-background-item-hover)}.ce-popover-item:hover .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}}.ce-popover-item--confirmation{background:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__icon{color:var(--color-background-item-confirm)}.ce-popover-item--confirmation .ce-popover-item__title{color:#fff}@media (hover: hover){.ce-popover-item--confirmation:not(.ce-popover-item--no-hover):hover{background:var(--color-background-item-confirm-hover)}}.ce-popover-item--confirmation:not(.ce-popover-item--no-focus).ce-popover-item--focused{background:var(--color-background-item-confirm-hover)!important}.ce-popover-item--confirmation .ce-popover-item__icon,.ce-popover-item--active .ce-popover-item__icon,.ce-popover-item--focused .ce-popover-item__icon{-webkit-box-shadow:none;box-shadow:none}@-webkit-keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowing{0%{opacity:0;-webkit-transform:translateY(-8px) scale(.9);transform:translateY(-8px) scale(.9)}70%{opacity:1;-webkit-transform:translateY(2px);transform:translateY(2px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@-webkit-keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes panelShowingMobile{0%{opacity:0;-webkit-transform:translateY(14px) scale(.98);transform:translateY(14px) scale(.98)}70%{opacity:1;-webkit-transform:translateY(-4px);transform:translateY(-4px)}to{-webkit-transform:translateY(0);transform:translateY(0)}}.wobble{-webkit-animation-name:wobble;animation-name:wobble;-webkit-animation-duration:.4s;animation-duration:.4s}@-webkit-keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}@keyframes wobble{0%{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}15%{-webkit-transform:translate3d(-9%,0,0);transform:translate3d(-9%,0,0)}30%{-webkit-transform:translate3d(9%,0,0);transform:translate3d(9%,0,0)}45%{-webkit-transform:translate3d(-4%,0,0);transform:translate3d(-4%,0,0)}60%{-webkit-transform:translate3d(4%,0,0);transform:translate3d(4%,0,0)}75%{-webkit-transform:translate3d(-1%,0,0);transform:translate3d(-1%,0,0)}to{-webkit-transform:translate3d(0,0,0);transform:translateZ(0)}}\n`;\nclass bi extends C {\n constructor() {\n super(...arguments), this.isMobile = !1, this.contentRectCache = void 0, this.resizeDebouncer = Ht(() => {\n this.windowResize();\n }, 200);\n }\n /**\n * Editor.js UI CSS class names\n *\n * @returns {{editorWrapper: string, editorZone: string}}\n */\n get CSS() {\n return {\n editorWrapper: \"codex-editor\",\n editorWrapperNarrow: \"codex-editor--narrow\",\n editorZone: \"codex-editor__redactor\",\n editorZoneHidden: \"codex-editor__redactor--hidden\",\n editorEmpty: \"codex-editor--empty\",\n editorRtlFix: \"codex-editor--rtl\"\n };\n }\n /**\n * Return Width of center column of Editor\n *\n * @returns {DOMRect}\n */\n get contentRect() {\n if (this.contentRectCache)\n return this.contentRectCache;\n const e = this.nodes.wrapper.querySelector(`.${F.CSS.content}`);\n return e ? (this.contentRectCache = e.getBoundingClientRect(), this.contentRectCache) : {\n width: 650,\n left: 0,\n right: 0\n };\n }\n /**\n * Making main interface\n */\n async prepare() {\n this.checkIsMobile(), this.make(), this.loadStyles();\n }\n /**\n * Toggle read-only state\n *\n * If readOnly is true:\n * - removes all listeners from main UI module elements\n *\n * if readOnly is false:\n * - enables all listeners to UI module elements\n *\n * @param {boolean} readOnlyEnabled - \"read only\" state\n */\n toggleReadOnly(e) {\n e ? this.disableModuleBindings() : this.enableModuleBindings();\n }\n /**\n * Check if Editor is empty and set CSS class to wrapper\n */\n checkEmptiness() {\n const { BlockManager: e } = this.Editor;\n this.nodes.wrapper.classList.toggle(this.CSS.editorEmpty, e.isEditorEmpty);\n }\n /**\n * Check if one of Toolbar is opened\n * Used to prevent global keydowns (for example, Enter) conflicts with Enter-on-toolbar\n *\n * @returns {boolean}\n */\n get someToolbarOpened() {\n const { Toolbar: e, BlockSettings: t, InlineToolbar: o, ConversionToolbar: i } = this.Editor;\n return t.opened || o.opened || i.opened || e.toolbox.opened;\n }\n /**\n * Check for some Flipper-buttons is under focus\n */\n get someFlipperButtonFocused() {\n return this.Editor.Toolbar.toolbox.hasFocus() ? !0 : Object.entries(this.Editor).filter(([e, t]) => t.flipper instanceof G).some(([e, t]) => t.flipper.hasFocus());\n }\n /**\n * Clean editor`s UI\n */\n destroy() {\n this.nodes.holder.innerHTML = \"\";\n }\n /**\n * Close all Editor's toolbars\n */\n closeAllToolbars() {\n const { Toolbar: e, BlockSettings: t, InlineToolbar: o, ConversionToolbar: i } = this.Editor;\n t.close(), o.close(), i.close(), e.toolbox.close();\n }\n /**\n * Check for mobile mode and cache a result\n */\n checkIsMobile() {\n this.isMobile = window.innerWidth < rt;\n }\n /**\n * Makes Editor.js interface\n */\n make() {\n this.nodes.holder = d.getHolder(this.config.holder), this.nodes.wrapper = d.make(\"div\", [\n this.CSS.editorWrapper,\n ...this.isRtl ? [this.CSS.editorRtlFix] : []\n ]), this.nodes.redactor = d.make(\"div\", this.CSS.editorZone), this.nodes.holder.offsetWidth < this.contentRect.width && this.nodes.wrapper.classList.add(this.CSS.editorWrapperNarrow), this.nodes.redactor.style.paddingBottom = this.config.minHeight + \"px\", this.nodes.wrapper.appendChild(this.nodes.redactor), this.nodes.holder.appendChild(this.nodes.wrapper);\n }\n /**\n * Appends CSS\n */\n loadStyles() {\n const e = \"editor-js-styles\";\n if (d.get(e))\n return;\n const t = d.make(\"style\", null, {\n id: e,\n textContent: gi.toString()\n });\n d.prepend(document.head, t);\n }\n /**\n * Bind events on the Editor.js interface\n */\n enableModuleBindings() {\n this.readOnlyMutableListeners.on(this.nodes.redactor, \"click\", (e) => {\n this.redactorClicked(e);\n }, !1), this.readOnlyMutableListeners.on(this.nodes.redactor, \"mousedown\", (e) => {\n this.documentTouched(e);\n }, !0), this.readOnlyMutableListeners.on(this.nodes.redactor, \"touchstart\", (e) => {\n this.documentTouched(e);\n }, !0), this.readOnlyMutableListeners.on(document, \"keydown\", (e) => {\n this.documentKeydown(e);\n }, !0), this.readOnlyMutableListeners.on(document, \"mousedown\", (e) => {\n this.documentClicked(e);\n }, !0), this.readOnlyMutableListeners.on(document, \"selectionchange\", () => {\n this.selectionChanged();\n }, !0), this.readOnlyMutableListeners.on(window, \"resize\", () => {\n this.resizeDebouncer();\n }, {\n passive: !0\n }), this.watchBlockHoveredEvents();\n }\n /**\n * Listen redactor mousemove to emit 'block-hovered' event\n */\n watchBlockHoveredEvents() {\n let e;\n this.readOnlyMutableListeners.on(this.nodes.redactor, \"mousemove\", Ce((t) => {\n const o = t.target.closest(\".ce-block\");\n this.Editor.BlockSelection.anyBlockSelected || o && e !== o && (e = o, this.eventsDispatcher.emit(kt, {\n block: this.Editor.BlockManager.getBlockByChildNode(o)\n }));\n }, 20), {\n passive: !0\n });\n }\n /**\n * Unbind events on the Editor.js interface\n */\n disableModuleBindings() {\n this.readOnlyMutableListeners.clearAll();\n }\n /**\n * Resize window handler\n */\n windowResize() {\n this.contentRectCache = null, this.checkIsMobile();\n }\n /**\n * All keydowns on document\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n documentKeydown(e) {\n switch (e.keyCode) {\n case B.ENTER:\n this.enterPressed(e);\n break;\n case B.BACKSPACE:\n case B.DELETE:\n this.backspacePressed(e);\n break;\n case B.ESC:\n this.escapePressed(e);\n break;\n default:\n this.defaultBehaviour(e);\n break;\n }\n }\n /**\n * Ignore all other document's keydown events\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n defaultBehaviour(e) {\n const { currentBlock: t } = this.Editor.BlockManager, o = e.target.closest(`.${this.CSS.editorWrapper}`), i = e.altKey || e.ctrlKey || e.metaKey || e.shiftKey;\n if (t !== void 0 && o === null) {\n this.Editor.BlockEvents.keydown(e);\n return;\n }\n o || t && i || (this.Editor.BlockManager.dropPointer(), this.Editor.Toolbar.close());\n }\n /**\n * @param {KeyboardEvent} event - keyboard event\n */\n backspacePressed(e) {\n const { BlockManager: t, BlockSelection: o, Caret: i } = this.Editor;\n if (o.anyBlockSelected && !m.isSelectionExists) {\n const n = t.removeSelectedBlocks();\n i.setToBlock(t.insertDefaultBlockAtIndex(n, !0), i.positions.START), o.clearSelection(e), e.preventDefault(), e.stopPropagation(), e.stopImmediatePropagation();\n }\n }\n /**\n * Escape pressed\n * If some of Toolbar components are opened, then close it otherwise close Toolbar\n *\n * @param {Event} event - escape keydown event\n */\n escapePressed(e) {\n this.Editor.BlockSelection.clearSelection(e), this.Editor.Toolbar.toolbox.opened ? (this.Editor.Toolbar.toolbox.close(), this.Editor.Caret.setToBlock(this.Editor.BlockManager.currentBlock)) : this.Editor.BlockSettings.opened ? this.Editor.BlockSettings.close() : this.Editor.ConversionToolbar.opened ? this.Editor.ConversionToolbar.close() : this.Editor.InlineToolbar.opened ? this.Editor.InlineToolbar.close() : this.Editor.Toolbar.close();\n }\n /**\n * Enter pressed on document\n *\n * @param {KeyboardEvent} event - keyboard event\n */\n enterPressed(e) {\n const { BlockManager: t, BlockSelection: o } = this.Editor, i = t.currentBlockIndex >= 0;\n if (o.anyBlockSelected && !m.isSelectionExists) {\n o.clearSelection(e), e.preventDefault(), e.stopImmediatePropagation(), e.stopPropagation();\n return;\n }\n if (!this.someToolbarOpened && i && e.target.tagName === \"BODY\") {\n const n = this.Editor.BlockManager.insert();\n this.Editor.Caret.setToBlock(n), this.Editor.BlockManager.highlightCurrentNode(), this.Editor.Toolbar.moveAndOpen(n);\n }\n this.Editor.BlockSelection.clearSelection(e);\n }\n /**\n * All clicks on document\n *\n * @param {MouseEvent} event - Click event\n */\n documentClicked(e) {\n if (e.target.closest(\".model-backdrop\") || e.target.closest(\".modal-scrollable\")) {\n return;\n }\n if (!e.isTrusted)\n return;\n const t = e.target;\n this.nodes.holder.contains(t) || m.isAtEditor || (this.Editor.BlockManager.dropPointer(), this.Editor.Toolbar.close());\n const i = this.Editor.BlockSettings.nodes.wrapper.contains(t), n = this.Editor.Toolbar.nodes.settingsToggler.contains(t), r = i || n;\n if (this.Editor.BlockSettings.opened && !r) {\n this.Editor.BlockSettings.close();\n const a = this.Editor.BlockManager.getBlockByChildNode(t);\n this.Editor.Toolbar.moveAndOpen(a);\n }\n this.Editor.BlockSelection.clearSelection(e);\n }\n /**\n * First touch on editor\n * Fired before click\n *\n * Used to change current block — we need to do it before 'selectionChange' event.\n * Also:\n * - Move and show the Toolbar\n * - Set a Caret\n *\n * @param {MouseEvent | TouchEvent} event - touch or mouse event\n */\n documentTouched(e) {\n if (document.body.querySelector(\".model-backdrop\") || document.body.querySelector(\".modal-scrollable\")) {\n return;\n }\n let t = e.target;\n if (t === this.nodes.redactor) {\n const o = e instanceof MouseEvent ? e.clientX : e.touches[0].clientX, i = e instanceof MouseEvent ? e.clientY : e.touches[0].clientY;\n t = document.elementFromPoint(o, i);\n }\n try {\n this.Editor.BlockManager.setCurrentBlockByChildNode(t), this.Editor.BlockManager.highlightCurrentNode();\n } catch {\n this.Editor.RectangleSelection.isRectActivated() || this.Editor.Caret.setToTheLastBlock();\n }\n this.Editor.Toolbar.moveAndOpen();\n }\n /**\n * All clicks on the redactor zone\n *\n * @param {MouseEvent} event - click event\n * @description\n * - By clicks on the Editor's bottom zone:\n * - if last Block is empty, set a Caret to this\n * - otherwise, add a new empty Block and set a Caret to that\n */\n redactorClicked(e) {\n const { BlockSelection: t } = this.Editor;\n if (!m.isCollapsed)\n return;\n const o = () => {\n e.stopImmediatePropagation(), e.stopPropagation();\n }, i = e.target, n = e.metaKey || e.ctrlKey;\n if (d.isAnchor(i) && n) {\n o();\n const u = i.getAttribute(\"href\"), h = zt(u);\n $t(h);\n return;\n }\n const r = this.Editor.BlockManager.getBlockByIndex(-1), a = d.offset(r.holder).bottom, l = e.pageY;\n if (e.target instanceof Element && e.target.isEqualNode(this.nodes.redactor) && /**\n * If there is cross block selection started, target will be equal to redactor so we need additional check\n */\n !t.anyBlockSelected && /**\n * Prevent caret jumping (to last block) when clicking between blocks\n */\n a < l) {\n o();\n const { BlockManager: u, Caret: h, Toolbar: f } = this.Editor;\n (!u.lastBlock.tool.isDefault || !u.lastBlock.isEmpty) && u.insertAtEnd(), h.setToTheLastBlock(), f.moveAndOpen(u.lastBlock);\n }\n }\n /**\n * Handle selection changes on mobile devices\n * Uses for showing the Inline Toolbar\n */\n selectionChanged() {\n const { CrossBlockSelection: e, BlockSelection: t } = this.Editor, o = m.anchorElement;\n if (e.isCrossBlockSelectionStarted && t.anyBlockSelected && m.get().removeAllRanges(), !o) {\n m.range || this.Editor.InlineToolbar.close();\n return;\n }\n const i = o.closest(`.${F.CSS.content}`) === null;\n if (document.body.querySelector(\".model-backdrop\") || document.body.querySelector(\".modal-scrollable\")) {\n return;\n }\n if (i && (this.Editor.InlineToolbar.containsNode(o) || this.Editor.InlineToolbar.close(), !(o.dataset.inlineToolbar === \"true\")))\n return;\n this.Editor.BlockManager.currentBlock || this.Editor.BlockManager.setCurrentBlockByChildNode(o);\n const n = i !== !0;\n this.Editor.InlineToolbar.tryToShow(!0, n);\n }\n}\nconst mi = {\n // API Modules\n BlocksAPI: Qt,\n CaretAPI: eo,\n EventsAPI: to,\n I18nAPI: Pe,\n API: oo,\n InlineToolbarAPI: io,\n ListenersAPI: no,\n NotifierAPI: lo,\n ReadOnlyAPI: co,\n SanitizerAPI: mo,\n SaverAPI: ko,\n SelectionAPI: vo,\n StylesAPI: xo,\n ToolbarAPI: wo,\n TooltipAPI: Bo,\n UiAPI: To,\n // Toolbar Modules\n BlockSettings: jo,\n ConversionToolbar: Y,\n Toolbar: Ko,\n InlineToolbar: Xo,\n // Modules\n BlockEvents: Vo,\n BlockManager: Go,\n BlockSelection: Jo,\n Caret: ve,\n CrossBlockSelection: Qo,\n DragNDrop: ei,\n ModificationsObserver: ti,\n Paste: yt,\n ReadOnly: oi,\n RectangleSelection: fe,\n Renderer: ii,\n Saver: ni,\n Tools: It,\n UI: bi\n};\nclass ki {\n /**\n * @param {EditorConfig} config - user configuration\n */\n constructor(e) {\n this.moduleInstances = {}, this.eventsDispatcher = new we();\n let t, o;\n this.isReady = new Promise((i, n) => {\n t = i, o = n;\n }), Promise.resolve().then(async () => {\n this.configuration = e, this.validate(), this.init(), await this.start(), await this.render();\n const { BlockManager: i, Caret: n, UI: r, ModificationsObserver: a } = this.moduleInstances;\n r.checkEmptiness(), a.enable(), this.configuration.autofocus && (n.setToBlock(i.blocks[0], n.positions.START), i.highlightCurrentNode()), t();\n }).catch((i) => {\n L(`Editor.js is not ready because of ${i}`, \"error\"), o(i);\n });\n }\n /**\n * Setting for configuration\n *\n * @param {EditorConfig|string} config - Editor's config to set\n */\n set configuration(e) {\n var o, i;\n z(e) ? this.config = {\n ...e\n } : this.config = {\n holder: e\n }, Ie(!!this.config.holderId, \"config.holderId\", \"config.holder\"), this.config.holderId && !this.config.holder && (this.config.holder = this.config.holderId, this.config.holderId = null), this.config.holder == null && (this.config.holder = \"editorjs\"), this.config.logLevel || (this.config.logLevel = it.VERBOSE), Nt(this.config.logLevel), Ie(!!this.config.initialBlock, \"config.initialBlock\", \"config.defaultBlock\"), this.config.defaultBlock = this.config.defaultBlock || this.config.initialBlock || \"paragraph\", this.config.minHeight = this.config.minHeight !== void 0 ? this.config.minHeight : 300;\n const t = {\n type: this.config.defaultBlock,\n data: {}\n };\n this.config.placeholder = this.config.placeholder || !1, this.config.sanitizer = this.config.sanitizer || {\n p: !0,\n b: !0,\n a: !0\n }, this.config.hideToolbar = this.config.hideToolbar ? this.config.hideToolbar : !1, this.config.tools = this.config.tools || {}, this.config.i18n = this.config.i18n || {}, this.config.data = this.config.data || { blocks: [] }, this.config.onReady = this.config.onReady || (() => {\n }), this.config.onChange = this.config.onChange || (() => {\n }), this.config.inlineToolbar = this.config.inlineToolbar !== void 0 ? this.config.inlineToolbar : !0, (V(this.config.data) || !this.config.data.blocks || this.config.data.blocks.length === 0) && (this.config.data = { blocks: [t] }), this.config.readOnly = this.config.readOnly || !1, (o = this.config.i18n) != null && o.messages && $.setDictionary(this.config.i18n.messages), this.config.i18n.direction = ((i = this.config.i18n) == null ? void 0 : i.direction) || \"ltr\";\n }\n /**\n * Returns private property\n *\n * @returns {EditorConfig}\n */\n get configuration() {\n return this.config;\n }\n /**\n * Checks for required fields in Editor's config\n */\n validate() {\n const { holderId: e, holder: t } = this.config;\n if (e && t)\n throw Error(\"«holderId» and «holder» param can't assign at the same time.\");\n if (J(t) && !d.get(t))\n throw Error(`element with ID «${t}» is missing. Pass correct holder's ID.`);\n if (t && z(t) && !d.isElement(t))\n throw Error(\"«holder» value must be an Element node\");\n }\n /**\n * Initializes modules:\n * - make and save instances\n * - configure\n */\n init() {\n this.constructModules(), this.configureModules();\n }\n /**\n * Start Editor!\n *\n * Get list of modules that needs to be prepared and return a sequence (Promise)\n *\n * @returns {Promise}\n */\n async start() {\n await [\n \"Tools\",\n \"UI\",\n \"BlockManager\",\n \"Paste\",\n \"BlockSelection\",\n \"RectangleSelection\",\n \"CrossBlockSelection\",\n \"ReadOnly\"\n ].reduce(\n (t, o) => t.then(async () => {\n try {\n await this.moduleInstances[o].prepare();\n } catch (i) {\n if (i instanceof lt)\n throw new Error(i.message);\n L(`Module ${o} was skipped because of %o`, \"warn\", i);\n }\n }),\n Promise.resolve()\n );\n }\n /**\n * Render initial data\n */\n render() {\n return this.moduleInstances.Renderer.render(this.config.data.blocks);\n }\n /**\n * Make modules instances and save it to the @property this.moduleInstances\n */\n constructModules() {\n Object.entries(mi).forEach(([e, t]) => {\n try {\n this.moduleInstances[e] = new t({\n config: this.configuration,\n eventsDispatcher: this.eventsDispatcher\n });\n } catch (o) {\n L(\"[constructModules]\", `Module ${e} skipped because`, \"error\", o);\n }\n });\n }\n /**\n * Modules instances configuration:\n * - pass other modules to the 'state' property\n * - ...\n */\n configureModules() {\n for (const e in this.moduleInstances)\n Object.prototype.hasOwnProperty.call(this.moduleInstances, e) && (this.moduleInstances[e].state = this.getModulesDiff(e));\n }\n /**\n * Return modules without passed name\n *\n * @param {string} name - module for witch modules difference should be calculated\n */\n getModulesDiff(e) {\n const t = {};\n for (const o in this.moduleInstances)\n o !== e && (t[o] = this.moduleInstances[o]);\n return t;\n }\n}\n/**\n * Editor.js\n *\n * @license Apache-2.0\n * @see Editor.js \n * @author CodeX Team \n */\nclass vi {\n /** Editor version */\n static get version() {\n return \"2.28.0\";\n }\n /**\n * @param {EditorConfig|string|undefined} [configuration] - user configuration\n */\n constructor(e) {\n let t = () => {\n };\n z(e) && D(e.onReady) && (t = e.onReady);\n const o = new ki(e);\n this.isReady = o.isReady.then(() => {\n this.exportAPI(o), t();\n });\n }\n /**\n * Export external API methods\n *\n * @param {Core} editor — Editor's instance\n */\n exportAPI(e) {\n const t = [\"configuration\"], o = () => {\n Object.values(e.moduleInstances).forEach((n) => {\n D(n.destroy) && n.destroy(), n.listeners.removeAll();\n }), e = null;\n for (const n in this)\n Object.prototype.hasOwnProperty.call(this, n) && delete this[n];\n Object.setPrototypeOf(this, null);\n };\n t.forEach((n) => {\n this[n] = e[n];\n }), this.destroy = o, Object.setPrototypeOf(this, e.moduleInstances.API.methods), delete this.exportAPI, Object.entries({\n blocks: {\n clear: \"clear\",\n render: \"render\"\n },\n caret: {\n focus: \"focus\"\n },\n events: {\n on: \"on\",\n off: \"off\",\n emit: \"emit\"\n },\n saver: {\n save: \"save\"\n }\n }).forEach(([n, r]) => {\n Object.entries(r).forEach(([a, l]) => {\n this[l] = e.moduleInstances.API.methods[n][a];\n });\n });\n }\n}\nexport {\n vi as default\n};\n","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\tid: moduleId,\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","__webpack_require__.nc = undefined;","// startup\n// Load entry module and return exports\n// This entry module is referenced by other modules so it can't be inlined\nvar __webpack_exports__ = __webpack_require__(8519);\n"],"names":["___CSS_LOADER_EXPORT___","push","module","id","exports","cssWithMappingToString","list","toString","this","map","item","content","needLayer","concat","length","join","i","modules","media","dedupe","supports","layer","undefined","alreadyImportedModules","k","_k","cssMapping","btoa","base64","unescape","encodeURIComponent","JSON","stringify","data","sourceMapping","self","e","t","r","d","default","s","n","o","a","c","l","u","hmr","transform","insertInto","locals","window","document","all","atob","apply","arguments","querySelector","call","HTMLIFrameElement","contentDocument","head","f","p","refs","parts","m","h","base","css","sourceMap","v","Error","insertAt","nextSibling","insertBefore","appendChild","firstChild","before","b","parentNode","removeChild","indexOf","splice","y","createElement","attrs","type","g","Object","keys","forEach","setAttribute","singleton","x","bind","URL","createObjectURL","revokeObjectURL","Blob","rel","O","href","B","DEBUG","w","filter","Boolean","styleSheet","cssText","createTextNode","childNodes","convertToAbsoluteUrls","location","protocol","host","pathname","replace","trim","test","__esModule","defineProperty","enumerable","get","prototype","hasOwnProperty","Symbol","toStringTag","value","configurable","writable","key","configuration","blocks","toolbar","save","TypeError","borderStyle","api","holder","getElementById","readOnly","startBlock","endBlock","setDragListener","setDropListener","createRange","getSelection","setStart","collapse","removeAllRanges","addRange","focus","addEventListener","getCurrentBlockIndex","close","isTheOnlyBlock","querySelectorAll","setElementCursor","setBorderBlocks","values","style","removeProperty","find","borderBottom","borderTop","target","contains","getDropTarget","getTargetPosition","moveBlocks","classList","closest","Array","from","children","getBlocksCount","move","options","styleTagTransform","setAttributes","insert","domAPI","insertStyleElement","stylesInDOM","getIndexByIdentifier","identifier","result","modulesToDom","idCountMap","identifiers","count","indexByIdentifier","obj","references","updater","addElementStyle","byIndex","update","newObj","remove","lastIdentifiers","newList","index","newLastIdentifiers","_i","_index","memo","styleTarget","getTarget","element","attributes","styleElement","nonce","removeStyleElement","DragDrop","constructor","editor","super","setDragEndListener","settingsButton","block","String","startsWith","searchString","pos","EditorJS","xe","Be","globalThis","global","assign","register","revert","Element","matches","matchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector","webkitMatchesSelector","ownerDocument","documentElement","parentElement","prepend","createDocumentFragment","isArray","Node","scrollIntoViewIfNeeded","getComputedStyle","parseInt","getPropertyValue","offsetTop","scrollTop","clientHeight","offsetLeft","scrollLeft","clientWidth","scrollIntoView","requestIdleCallback","Date","now","setTimeout","didTimeout","timeRemaining","Math","max","cancelIdleCallback","clearTimeout","it","VERBOSE","INFO","WARN","ERROR","be","console","includes","logLevel","unshift","L","K","oe","match","toLowerCase","D","z","J","qe","Ze","V","nt","st","slice","re","Ce","leading","trailing","ae","toUpperCase","Se","shift","Re","win","mac","x11","linux","navigator","appVersion","jt","Ut","crypto","getRandomValues","Uint8Array","reduce","At","Ie","ce","set","te","matchMedia","Ge","platform","maxTouchPoints","isSingleTag","tagName","isLineBreakTag","make","add","text","append","reverse","swap","findAll","allInputsSelector","findAllInputs","isNativeInput","containsOnlyInlineElements","getDeepestBlockElements","getDeepestNode","nodeType","ELEMENT_NODE","isElement","isFragment","DOCUMENT_FRAGMENT_NODE","isContentEditable","contentEditable","canSetCaret","isNodeEmpty","textContent","isLeaf","isEmpty","normalize","isHTMLString","innerHTML","childElementCount","getContentLength","TEXT_NODE","blockElements","every","getHolder","isAnchor","offset","getBoundingClientRect","pageXOffset","pageYOffset","top","left","bottom","height","right","width","at","ui","blockTunes","toggler","inlineToolbar","converter","toolbox","Add","popover","Filter","toolNames","Text","Link","Bold","Italic","tools","link","stub","delete","Delete","moveUp","moveDown","ie","_t","setDictionary","currentDictionary","getNamespace","split","$","lt","we","subscribers","on","once","emit","off","warn","destroy","ee","setPrototypeOf","name","config","selected","stretched","validate","dispatchChange","De","allListeners","floor","random","Wt","eventType","handler","findOne","removeEventListener","offById","findById","findByEventTarget","removeAll","findByType","findByHandler","C","eventsDispatcher","nodes","listeners","readOnlyMutableListeners","mutableListenerIds","clearAll","state","Editor","removeAllNodes","HTMLElement","isRtl","i18n","direction","instance","selection","savedSelectionRange","isFakeBackgroundEnabled","commandBackground","commandRemoveFormat","CSS","editorWrapper","editorZone","anchorNode","anchorElement","anchorOffset","isCollapsed","isAtEditor","isSelectionAtEditor","focusNode","isRangeAtEditor","startContainer","isSelectionExists","range","getRangeFromSelection","rangeCount","getRangeAt","rect","boundingLeft","boundingTop","boundingWidth","boundingHeight","isNaN","cloneRange","insertNode","setCursor","selectionStart","selectionEnd","setEnd","isRangeInsideContainer","addFakeCursor","dataset","mutationFree","isFakeCursorInsideContainer","removeFakeCursor","body","removeFakeBackground","execCommand","setFakeBackground","restore","clearSaved","collapseToEnd","selectNodeContents","findParentTag","expandToTag","Me","ct","dt","ht","Je","mergeable","q","APPEND_CALLBACK","RENDERED","MOVED","UPDATED","REMOVED","ON_PASTE","F","tool","tunesData","cachedInputs","toolRenderedElement","tunesInstances","Map","defaultTunesInstances","unavailableTunesData","inputIndex","editorEventBus","handleFocus","dropInputsCache","updateCurrentInput","didMutated","InputEvent","detectToolRootChange","addedNodes","removedNodes","A","some","_","settings","blockAPI","toolInstance","create","tunes","composeTunes","compose","watchBlockMutations","addInputEvents","wrapper","wrapperStretched","focused","dropTarget","inputs","currentInput","findIndex","firstInput","lastInput","nextInput","previousInput","then","sanitize","sanitizeConfig","merge","pluginsContent","hasMedia","toggle","message","mergeWith","entries","performance","Promise","resolve","time","catch","Function","getTunes","renderSettings","render","flat","activeElement","unwatchBlockMutations","removeInputEvents","getActiveToolboxEntry","Yt","exportDataAsString","export","Gt","conversionConfig","wrap","isInternal","has","redactorDomChangedCallback","mutations","Zt","Pe","isTune","methods","getMethodsForTool","Le","so","show","getWrapper","confirm","prompt","alert","sources","sourceRoot","E","T","S","H","M","N","W","R","de","Q","Ee","Mt","Lt","Ve","I","cancelHandler","okHandler","okText","cancelText","placeholder","inputType","ro","ao","Oe","ho","tags","nodeName","clean","implementation","createHTMLDocument","_sanitize","createTreeWalker","NodeFilter","SHOW_TEXT","SHOW_ELEMENT","SHOW_COMMENT","COMMENT_NODE","keepNestedBlockElements","removeAttribute","previousElementSibling","nextElementSibling","uo","ut","Fe","Z","po","bo","fo","go","Rt","Ae","yo","showed","offsetRight","hidingDelay","handleWindowScroll","hide","loadStyles","prepare","passive","tooltip","tooltipContent","tooltipShown","placement","hidingTimeout","marginTop","marginLeft","marginRight","marginBottom","delay","placeTop","placeLeft","placeRight","placeBottom","showingTimeout","onHover","offsetWidth","applyPlacement","offsetHeight","Eo","He","lib","X","pt","ft","Qe","P","root","icon","confirmationState","removeSpecialFocusBehavior","noFocus","removeSpecialHoverBehavior","noHover","onErrorAnimationEnd","wobbleAnimation","params","isDisabled","title","closeOnActivate","isConfirmationStateEnabled","isFocused","container","secondaryTitle","active","disabled","hidden","getElement","handleClick","activateOrEnableConfirmationMode","toggleActive","toggleHidden","reset","disableConfirmationMode","onFocus","disableSpecialHoverAndFocusBehavior","itemName","secondaryLabel","isActive","enableConfirmationMode","confirmation","enableSpecialHoverAndFocusBehavior","onActivate","animateError","he","cursor","items","focusedCssClass","currentItem","dropCursor","setItems","next","leafNodesAndReturnIndex","directions","RIGHT","previous","LEFT","ne","G","iterator","activated","flipCallbacks","onKeyDown","isEventReadyForHandling","usedKeys","keyCode","preventDefault","handleTabPress","flipLeft","flipRight","handleEnterPress","focusedItemClass","activateCallback","allowedKeys","isActivated","activate","deactivate","focusFirst","flipCallback","hasFocus","onFlip","removeOnFlip","shiftKey","stopPropagation","click","pe","input","onSearch","clear","searchQuery","foundItems","checkItem","ue","lock","lockHard","scrollLocked","unlock","unlockHard","scrollPosition","setProperty","scrollLockedHard","scrollTo","gt","Po","Fo","getOwnPropertyDescriptor","ge","Close","j","scopeElement","scrollLocker","nothingFoundMessage","customContent","overlay","messages","nothingFound","search","customContentFlippableItems","addCustomContent","searchable","addSearch","initializeFlipper","popoverOpenTop","popoverOpened","nothingFoundMessageDisplayed","customContentHidden","overlayHidden","flipper","shouldOpenBottom","flippableElements","getTargetItem","handleItemClick","toggleNothingFoundMessage","toggleCustomContent","composedPath","toggleItemActivenessIfNeeded","cloneNode","visibility","position","min","innerHeight","je","Ho","Y","opened","togglingCallback","conversionToolbarWrapper","conversionToolbarShowed","conversionToolbarTools","conversionToolbarLabel","conversionTool","conversionToolHidden","conversionToolIcon","conversionToolSecondaryLabel","conversionToolFocused","conversionToolActive","UI","editorRtlFix","addTools","enableFlipper","open","filterTools","requestAnimationFrame","button","hasTools","defaultBlock","replaceWithBlock","BlockManager","BlockSelection","InlineToolbar","Caret","convert","currentBlock","clearSelection","setToBlock","positions","END","Tools","blockTools","import","addToolIfValid","addTool","shortcut","innerText","toolboxItem","async","_e","zo","commands","parseShortcutName","callback","executeShortcut","execute","SHIFT","CMD","ALT","U","BACKSPACE","ENTER","ESCAPE","UP","DOWN","INSERT","DELETE","supportedCommands","ctrlKey","metaKey","altKey","keyCodes","Uo","le","registeredShortcuts","findShortcut","Wo","Yo","bt","me","Opened","Closed","BlockAdded","mt","i18nLabels","onPopoverClose","toolsToBeDisplayed","redactor","toolboxItemsToBeDisplayed","enableShortcuts","removeAllShortcuts","toolButtonActivated","insertNewBlock","enableShortcutForTool","getBlockByIndex","caret","composeBlockData","ze","kt","ye","Block","Inline","Tune","ke","Shortcut","Toolbox","EnabledInlineTools","EnabledBlockTunes","Config","vt","SanitizeConfig","se","IsEnabledLineBreaks","ConversionConfig","IsReadOnlySupported","PasteConfig","Ue","IsInline","Title","xt","IsTune","$e","constructable","isDefault","defaultPlaceholder","toolName","isInline","isBlock","Te","workingArea","array","Number","Reflect","insertToDOM","composeBlockEvent","fromIndex","toIndex","replaceWith","insertMany","DocumentFragment","after","insertAfter","insertAdjacentElement","CustomEvent","detail","et","tt","ot","Zo","completed","ve","START","DEFAULT","shadowCaret","isAtStart","focusOffset","getHigherLevelSiblings","isAtEnd","setCurrentBlockByChildNode","setToInput","scrollBy","setToTheLastBlock","lastBlock","insertAtEnd","extractFragmentFromCaretPosition","deleteContents","substring","endContainer","endOffset","extractContents","navigateNext","nextContentfulBlock","navigatePrevious","previousContentfulBlock","createShadow","restoreCaret","selectNode","insertContentAtCaretPosition","lastChild","wt","MIME_TYPE","toolsTags","tagsByTool","toolsPatterns","toolsFiles","exceptionList","processTool","pasteConfig","onPaste","getTagsConfig","getFilesConfig","getPatternsConfig","handlePasteEvent","Toolbar","isNativeBehaviour","clipboardData","types","processDataTransfer","clearFocused","processTools","toggleReadOnly","unsetCallback","setCallback","processFiles","files","getData","insertEditorJSData","parse","sanitizationConfig","getAllInlineToolsSanitizeConfig","br","processText","processHTML","processPlain","processSingleBlock","pop","processInlinePaste","insertBlock","collectTagNames","extensions","mimeTypes","Ft","patterns","RegExp","pattern","processFile","paste","event","Pt","composePasteEvent","file","getNodes","defaultTool","baseSanitizeConfig","outerHTML","PATTERN_PROCESSING_MAX_LENGTH","processPattern","exec","processElementNode","yt","fe","isRectSelectionActivated","SCROLL_SPEED","HEIGHT_OF_SCROLL_ZONE","BOTTOM_SCROLL_ZONE","TOP_SCROLL_ZONE","MAIN_MOUSE_BUTTON","mousedown","isScrolling","inScrollZone","startX","startY","mouseX","mouseY","stackOfSelected","listenerIds","overlayContainer","topScrollZone","bottomScrollZone","enableModuleBindings","startSelection","elementFromPoint","allBlocksSelected","endSelection","overlayRectangle","display","isRectActivated","genHTML","processMouseDown","processMouseMove","processMouseLeave","processScroll","processMouseUp","pageX","pageY","changingRectangle","scrollByZones","clientY","scrollVertical","rightPos","leftPos","genInfoForMouseSelection","rectCrossesBlocks","shrinkRectangleToPoint","updateRectangleSize","trySelectNextBlock","inverseSelection","selectBlockByIndex","unSelectBlockByIndex","getBlockByChildNode","addBlockInSelection","Ne","si","nc","_CSS","styles","onKeyUp","_placeholder","DEFAULT_PLACEHOLDER","_data","_element","_preserveBlank","preserveBlank","code","drawView","hydrate","ri","We","commandName","buttonActive","buttonModifier","surround","checkState","queryCommandState","Ye","Ke","commandLink","commandUnlink","ENTER_KEY","buttonUnlink","inputShowed","inputOpened","notifier","renderActions","enterPressed","unlink","closeActions","toggleActions","openActions","getAttribute","validateURL","prepareLink","insertLink","stopImmediatePropagation","addProtocol","Et","info","subtitle","savedData","isReadOnlySupported","ai","li","inlineTools","internalTools","externalTools","ci","di","Bt","Xe","isLineBreaksEnabled","enabledInlineTools","enabledBlockTunes","hi","editorConfig","class","getConstructor","Tt","animation","abs","scrollY","toggleBlockSettings","Ct","St","pi","It","stubTool","toolsAvailable","toolsUnavailable","available","unavailable","internal","validateTools","prepareConfig","factory","API","getListOfPrepareFunctions","function","Dt","toolPrepareMethodSuccess","toolPrepareMethodFallback","prepareBlockTools","bold","italic","paragraph","assignInlineToolsToBlockTool","assignBlockTunesToBlockTool","fi","mi","BlocksAPI","needToFocus","getBlockById","validateIndex","composeBlock","renderFromHTML","getById","getBlockIndex","stretchBlock","currentBlockIndex","removeBlock","ModificationsObserver","disable","Renderer","enable","Paste","CaretAPI","setToFirstBlock","firstBlock","setToLastBlock","setToPreviousBlock","previousBlock","setToNextBlock","nextBlock","EventsAPI","I18nAPI","events","ListenersAPI","NotifierAPI","sanitizer","SanitizerAPI","saver","SaverAPI","SelectionAPI","StylesAPI","classes","ToolbarAPI","InlineToolbarAPI","TooltipAPI","ReadOnlyAPI","UiAPI","tryToShow","isEnabled","ReadOnly","reject","Saver","inlineToolButton","inlineToolButtonActive","loader","settingsButtonActive","toggleToolbox","moveAndOpen","BlockSettings","editorNodes","closed","clearCache","resolveTuneAliases","getControls","CrossBlockSelection","isCrossBlockSelectionStarted","Co","label","ConversionToolbar","toolboxInstance","actions","actionsOpened","toolbarOpened","openedToolboxHolderModifier","plusButton","plusButtonShortcut","settingsToggler","settingsTogglerHidden","hoveredBlock","blockActions","blockTunesToggler","disableModuleBindings","drawUI","timeout","isMobile","paddingTop","plusButtonClicked","makeToolbox","settingsTogglerClicked","inlineToolbarShowed","inlineToolbarLeftOriented","inlineToolbarRightOriented","inlineToolbarShortcut","buttonsWrapper","actionsWrapper","inputField","focusedButton","conversionToggler","conversionTogglerArrow","conversionTogglerHidden","conversionTogglerContent","togglerAndButtonsWrapper","toolbarVerticalMargin","buttonsList","allowedToShow","contentRect","toolsInstances","getToolShortcut","addToolsFiltered","buttons","setConversionTogglerContent","containsNode","addConversionToggler","prepareConversionToolbar","recalculateWidth","getBlock","size","toolClicked","checkToolsState","BlockEvents","keydown","beforeKeydownProcessing","backspace","enter","arrowRightAndDown","arrowLeftAndUp","tabPressed","needToolbarClosing","keyup","checkEmptiness","activateToolbox","activateBlockSettings","dragOver","dragLeave","handleCommandC","anyBlockSelected","copySelectedBlocks","handleCommandX","removeSelectedBlocks","insertDefaultBlockAtIndex","someToolbarOpened","someFlipperButtonFocused","mergeBlocks","toggleBlockSelectedState","closeAllToolbars","_currentBlockIndex","_blocks","isEditorEmpty","Proxy","bindBlockEvents","blockDidMutated","removeAllBlocks","highlightCurrentNode","isEqualNode","Jt","dropPointer","anyBlockSelectedCache","needToSelectAll","nativeInputSelected","readyToBlockSelection","sanitizerConfig","h1","h2","h3","h4","h5","h6","ol","ul","img","src","selectedBlocks","selectAllBlocks","handleCommandA","RectangleSelection","KeyboardEvent","setData","onMouseUp","onMouseOver","relatedTarget","lastSelectedBlock","firstSelectedBlock","toggleBlocksSelectedState","enableCrossBlockSelection","watchSelection","DragNDrop","isStartedAtEditor","processDrop","processDragStart","processDragOver","dataTransfer","batchingTimeout","batchingOnChangeQueue","batchTime","mutationObserver","MutationObserver","redactorChanged","particularBlockChanged","observe","childList","subtree","characterData","disconnect","onChange","toolsDontSupportReadOnly","readOnlyEnabled","throwCriticalError","composeStubDataForTool","error","getSavedData","makeOutput","isValid","version","contentRectCache","resizeDebouncer","Ht","windowResize","editorWrapperNarrow","editorZoneHidden","editorEmpty","checkIsMobile","innerWidth","paddingBottom","minHeight","redactorClicked","documentTouched","documentKeydown","documentClicked","selectionChanged","watchBlockHoveredEvents","backspacePressed","escapePressed","defaultBehaviour","isTrusted","MouseEvent","clientX","touches","origin","zt","$t","ki","moduleInstances","isReady","init","start","autofocus","holderId","Nt","initialBlock","hideToolbar","onReady","constructModules","configureModules","getModulesDiff","vi","exportAPI","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","prop","__webpack_exports__"],"sourceRoot":""}