diff --git a/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js b/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js index 8b19679004..3f31a51222 100644 --- a/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js +++ b/core/assets/vendor/ckeditor5/ckeditor5-dll/ckeditor5-dll.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton:active{background:transparent}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-spacing-medium),calc(var(--ck-font-size-base)*.6)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-spacing-medium)*-1),calc(var(--ck-font-size-base)*.6)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const r=i},"./node_modules/css-loader/dist/runtime/api.js":e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var s=e(t);return t[2]?"@media ".concat(t[2]," {").concat(s,"}"):s})).join("")},t.i=function(e,s,o){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(o)for(var r=0;r{"use strict";s.d(t,{Z:()=>o});const o=''},"./packages/ckeditor5-core/theme/icons/pilcrow.svg":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=''},"./packages/ckeditor5-core/theme/icons/three-vertical-dots.svg":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=''},"./packages/ckeditor5-ui/theme/icons/dropdown-arrow.svg":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=''},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":(e,t,s)=>{"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var e={};return function(t){if(void 0===e[t]){var s=document.querySelector(t);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}e[t]=s}return e[t]}}(),n=[];function a(e){for(var t=-1,s=0;s{"use strict";s.d(t,{Z:()=>Z});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts"),n=s("./packages/ckeditor5-engine/src/conversion/mapper.ts"),a=s("./packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts"),c=s("./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts"),l=s("./node_modules/lodash-es/isArray.js");class d{constructor(){this._consumables=new Map}add(e,t){let s;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?s=this._consumables.get(e):(s=new u(e),this._consumables.set(e,s)),s.add(t))}test(e,t){const s=this._consumables.get(e);return void 0===s?null:e.is("$text")||e.is("documentFragment")?s:s.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const s=this._consumables.get(e);void 0!==s&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):s.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},s=e.getAttributeKeys();for(const e of s)"style"!=e&&"class"!=e&&t.attributes.push(e);const o=e.getClassNames();for(const e of o)t.classes.push(e);const i=e.getStyleNames();for(const e of i)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new d),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,d.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const s of e.getChildren())t=d.createFrom(s,t);return t}}const h=["attributes","classes","styles"];class u{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of h)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of h)if(t in e){const s=this._test(t,e[t]);if(!0!==s)return s}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of h)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of h)t in e&&this._revert(t,e[t])}_add(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s){if("attributes"===e&&("class"===t||"style"===t))throw new i.ZP("viewconsumable-invalid-attribute",this);if(o.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!0)}}_test(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s)if("attributes"!==e||"class"!==t&&"style"!==t){const e=o.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",s=this._test(e,[...this._consumables[e].keys()]);if(!0!==s)return s}return!0}_consume(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s)if("attributes"!==e||"class"!==t&&"style"!==t){if(o.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s)if("attributes"!==e||"class"!==t&&"style"!==t){!1===o.get(t)&&o.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}var p=s("./packages/ckeditor5-engine/src/model/range.ts"),g=s("./packages/ckeditor5-engine/src/model/position.ts"),f=s("./packages/ckeditor5-engine/src/model/schema.ts"),m=s("./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts");class k extends r.Q5{constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,s=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let s;for(const o of new f.G(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const i=t.createElement(o.name,e);s&&t.insert(i,s),s=g.ZP._createAt(i,0)}return s}(s,t),this.conversionApi.writer=t,this.conversionApi.consumable=d.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),i=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,i);i.markers=function(e,t){const s=new Set,o=new Map,i=p.Z._createIn(e).getItems();for(const e of i)e.is("element","$marker")&&s.add(e);for(const e of s){const s=e.getAttribute("data-name"),i=t.createPositionBefore(e);o.has(s)?o.get(s).end=i.clone():o.set(s,new p.Z(i.clone())),t.remove(e)}return o}(i,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,t){const s={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,s,this.conversionApi):e.is("$text")?this.fire("text",s,this.conversionApi):this.fire("documentFragment",s,this.conversionApi),s.modelRange&&!(s.modelRange instanceof p.Z))throw new i.ZP("view-conversion-dispatcher-incorrect-result",this);return{modelRange:s.modelRange,modelCursor:s.modelCursor}}_convertChildren(e,t){let s=t.is("position")?t:g.ZP._createAt(t,0);const o=new p.Z(s);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,s);e.modelRange instanceof p.Z&&(o.end=e.modelRange.end,s=e.modelCursor)}return{modelRange:o,modelCursor:s}}_safeInsert(e,t){const s=this._splitToAllowedParent(e,t);return!!s&&(this.conversionApi.writer.insert(e,s.position),!0)}_updateConversionResult(e,t){const s=this._getSplitParts(e),o=this.conversionApi.writer;t.modelRange||(t.modelRange=o.createRange(o.createPositionBefore(e),o.createPositionAfter(s[s.length-1])));const i=this._cursorParents.get(e);t.modelCursor=i?o.createPositionAt(i,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:s,writer:o}=this.conversionApi;let i=s.findAllowedParent(t,e);if(i){if(i===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return(0,m.gg)(t,e,s)?{position:(0,m.zX)(t,o)}:null;const r=this.conversionApi.writer.split(t,i),n=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)n.push(e.item);else{const t=n.pop(),s=e.item;this._registerSplitPair(t,s)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const s=this._splitParts.get(e);this._splitParts.set(t,s),s.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}var b=s("./packages/ckeditor5-engine/src/conversion/upcasthelpers.ts"),_=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),w=s("./packages/ckeditor5-engine/src/view/document.ts"),v=s("./packages/ckeditor5-engine/src/view/downcastwriter.ts"),y=s("./packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts");class Z extends r.Q5{constructor(e,t){super(),this.model=e,this.mapper=new n.Z,this.downcastDispatcher=new a.Z({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(0,c.Om)(),{priority:"lowest"}),this.downcastDispatcher.on("insert",(0,c.o6)(),{priority:"lowest"}),this.upcastDispatcher=new k({schema:e.schema}),this.viewDocument=new w.Z(t),this.stylesProcessor=t,this.htmlProcessor=new y.Z(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new v.Z(this.viewDocument),this.upcastDispatcher.on("text",(0,b.s8)(),{priority:"lowest"}),this.upcastDispatcher.on("element",(0,b._p)(),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(0,b._p)(),{priority:"lowest"}),o.y.prototype.decorate.call(this,"init"),o.y.prototype.decorate.call(this,"set"),o.y.prototype.decorate.call(this,"get"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},m._m)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:s="empty"}=e;if(!this._checkIfRootsExists([t]))throw new i.ZP("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(t);return"empty"!==s||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,e):""}stringify(e,t={}){const s=this.toView(e,t);return this.processor.toData(s)}toView(e,t={}){const s=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const i=p.Z._createIn(e),r=new _.Z(s);this.mapper.bindElements(e,r);const n=e.is("documentFragment")?e.markers:function(e){const t=[],s=e.root.document;if(!s)return new Map;const o=p.Z._createIn(e);for(const e of s.model.markers){const s=e.getRange(),i=s.isCollapsed,r=s.start.isEqual(o.start)||s.end.isEqual(o.end);if(i&&r)t.push([e.name,s]);else{const i=o.getIntersection(s);i&&t.push([e.name,i])}}return t.sort((([e,t],[s,o])=>{if("after"!==t.end.compareWith(o.start))return 1;if("before"!==t.start.compareWith(o.end))return-1;switch(t.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return s.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(i,n,o,t),r}init(e){if(this.model.document.version)throw new i.ZP("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new i.ZP("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const s of Object.keys(t)){const o=this.model.document.getRoot(s);e.insert(this.parse(t[s],o),o,0)}})),Promise.resolve()}set(e,t={}){let s={};if("string"==typeof e?s.main=e:s=e,!this._checkIfRootsExists(Object.keys(s)))throw new i.ZP("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(s)){const o=this.model.document.getRoot(t);e.remove(e.createRangeIn(o)),e.insert(this.parse(s[t],o),o,0)}}))}parse(e,t="$root"){const s=this.processor.toView(e);return this.toModel(s,t)}toModel(e,t="$root"){return this.model.change((s=>this.upcastDispatcher.convert(e,s,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}},"./packages/ckeditor5-engine/src/controller/editingcontroller.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>F});var o=s("./packages/ckeditor5-engine/src/view/editableelement.ts");const i=Symbol("rootName");class r extends o.Z{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(i)}set rootName(e){this._setCustomProperty(i,e)}set _name(e){this.name=e}}r.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};var n=s("./packages/ckeditor5-engine/src/view/document.ts"),a=s("./packages/ckeditor5-engine/src/view/downcastwriter.ts"),c=s("./packages/ckeditor5-engine/src/view/renderer.ts"),l=s("./packages/ckeditor5-engine/src/view/domconverter.ts"),d=s("./packages/ckeditor5-engine/src/view/position.ts"),h=s("./packages/ckeditor5-engine/src/view/range.ts"),u=s("./packages/ckeditor5-engine/src/view/selection.ts"),p=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),g=s("./packages/ckeditor5-engine/src/view/filler.ts"),f=s("./node_modules/lodash-es/_baseIsEqual.js");const m=function(e,t,s){var o=(s="function"==typeof s?s:void 0)?s(e,t):void 0;return void 0===o?(0,f.Z)(e,t,void 0,s):!!o};class k extends p.Z{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,s=new Map,o=new Set;for(const s of e)if("childList"===s.type){const e=t.mapDomToView(s.target);if(e&&(e.is("uiElement")||e.is("rawElement")))continue;e&&!this._isBogusBrMutation(s)&&o.add(e)}for(const i of e){const e=t.mapDomToView(i.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===i.type){const e=t.findCorrespondingViewText(i.target);e&&!o.has(e.parent)?s.set(e,{type:"text",oldText:e.data,newText:(0,g.th)(i.target),node:e}):!e&&(0,g.Sw)(i.target)&&o.add(t.mapDomToView(i.target.parentNode))}}const i=[];for(const e of s.values())this.renderer.markToSync("text",e.node),i.push(e);for(const e of o){const s=t.mapViewToDom(e),o=Array.from(e.getChildren()),r=Array.from(t.domChildrenToView(s,{withChildren:!1}));m(o,r,a)||(this.renderer.markToSync("children",e),i.push({type:"children",oldChildren:o,newChildren:r,node:e}))}const r=e[0].target.ownerDocument.getSelection();let n=null;if(r&&r.anchorNode){const e=t.domPositionToView(r.anchorNode,r.anchorOffset),s=t.domPositionToView(r.focusNode,r.focusOffset);e&&s&&(n=new u.Z(e),n.setFocus(s))}function a(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}i.length&&(this.document.fire("mutations",i,n),this.view.forceRender())}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}var b=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts"),_=s("./packages/ckeditor5-utils/src/keyboard.ts");class w extends b.Z{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,_.Cq)(this)}};this.fire(e.type,e,t)}}var v=s("./node_modules/lodash-es/debounce.js");class y extends p.Z{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,v.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,s)=>{e.selection.isFake&&this.isEnabled&&s.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,s)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(s.keyCode)}),{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,s=new u.Z(t.getRanges(),{backward:t.isBackward,fake:!1});e!=_.Do.arrowleft&&e!=_.Do.arrowup||s.setTo(s.getFirstPosition()),e!=_.Do.arrowright&&e!=_.Do.arrowdown||s.setTo(s.getLastPosition());const o={oldSelection:t,newSelection:s,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}class Z extends p.Z{constructor(e){super(e),this.mutationObserver=e.getObserver(k),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,v.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,v.Z)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,s=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",s,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",s,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",s,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,s)=>{this._handleSelectionChange(s,t),this._documentIsSelectingInactivityTimeoutDebounced()})),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(e,t){if(!this.isEnabled)return;const s=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(s.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(s);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(o)&&this.domConverter.isDomSelectionCorrect(s)||++this._loopbackCounter>60))if(this.selection.isSimilar(o))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:o,domSelection:s};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class P extends b.Z{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout((()=>e.change((()=>{}))),50)})),t.on("blur",((s,o)=>{const i=t.selection.editableElement;null!==i&&i!==o.target||(t.isFocused=!1,e.change((()=>{})))}))}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class x extends b.Z{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0})),t.on("compositionend",(()=>{t.isComposing=!1}))}onDomEvent(e){this.fire(e.type,e)}}class T extends b.Z{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}var A=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts"),C=s("./packages/ckeditor5-utils/src/index.ts");class E extends p.Z{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&(0,C.dj)(t.keyCode)){const s=new A.Z(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(s,t),s.stop.called&&e.stop()}}))}observe(){}}class S extends p.Z{constructor(e){super(e);const t=this.document;t.on("keydown",((e,s)=>{if(!this.isEnabled||s.keyCode!=_.Do.tab||s.ctrlKey)return;const o=new A.Z(t,"tab",t.selection.getFirstRange());t.fire(o,s),o.stop.called&&e.stop()}))}observe(){}}var j=s("./packages/ckeditor5-utils/src/observablemixin.ts"),O=s("./packages/ckeditor5-utils/src/dom/scroll.ts"),R=s("./packages/ckeditor5-engine/src/view/uielement.ts"),M=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),N=s("./packages/ckeditor5-utils/src/env.ts");class V extends j.y{constructor(e){super(),this.document=new n.Z(e),this.domConverter=new l.Z(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new c.Z(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting").to(this.document,"isFocused","isSelecting"),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new a.Z(this.document),this.addObserver(k),this.addObserver(Z),this.addObserver(P),this.addObserver(w),this.addObserver(y),this.addObserver(x),this.addObserver(E),this.addObserver(S),N.ZP.isAndroid&&this.addObserver(T),(0,g.mm)(this),(0,R.h)(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const s=this.document.getRoot(t);s._name=e.tagName.toLowerCase();const o={};for(const{name:t,value:i}of Array.from(e.attributes))o[t]=i,"class"===t?this._writer.addClass(i.split(" "),s):this._writer.setAttribute(t,i,s);this._initialDomRootAttributes.set(e,o);const i=()=>{this._writer.setAttribute("contenteditable",(!s.isReadOnly).toString(),s),s.isReadOnly?this._writer.addClass("ck-read-only",s):this._writer.removeClass("ck-read-only",s)};i(),this.domRoots.set(t,e),this.domConverter.bindElements(e,s),this._renderer.markToSync("children",s),this._renderer.markToSync("attributes",s),this._renderer.domDocuments.add(e.ownerDocument),s.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),s.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),s.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),s.on("change:isReadOnly",(()=>this.change(i))),s.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const s of this._observers.values())s.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const s=this._initialDomRootAttributes.get(t);for(const e in s)t.setAttribute(e,s[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,s]of this.domRoots)t.observe(s,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&(0,O.m)({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new M.ZP("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){M.ZP.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return d.Z._createAt(e,t)}createPositionAfter(e){return d.Z._createAfter(e)}createPositionBefore(e){return d.Z._createBefore(e)}createRange(...e){return new h.Z(...e)}createRangeOn(e){return h.Z._createOn(e)}createRangeIn(e){return h.Z._createIn(e)}createSelection(...e){return new u.Z(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}var I=s("./packages/ckeditor5-engine/src/conversion/mapper.ts"),D=s("./packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts"),z=s("./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts"),B=s("./packages/ckeditor5-engine/src/conversion/upcasthelpers.ts");class F extends j.y{constructor(e,t){super(),this.model=e,this.view=new V(t),this.mapper=new I.Z,this.downcastDispatcher=new D.Z({mapper:this.mapper,schema:e.schema});const s=this.model.document,o=s.selection,i=this.model.markers;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(s,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(s.differ,i,e),this.downcastDispatcher.convertSelection(o,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",(0,B.Fo)(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(0,z.Om)(),{priority:"lowest"}),this.downcastDispatcher.on("insert",(0,z.o6)(),{priority:"lowest"}),this.downcastDispatcher.on("remove",(0,z.Od)(),{priority:"low"}),this.downcastDispatcher.on("selection",(0,z.iO)(),{priority:"high"}),this.downcastDispatcher.on("selection",(0,z.k3)(),{priority:"low"}),this.downcastDispatcher.on("selection",(0,z.GM)(),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new r(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,s=this.model.markers.get(t);if(!s)throw new M.ZP("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(s)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}},"./packages/ckeditor5-engine/src/conversion/conversion.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-engine/src/conversion/upcasthelpers.ts"),r=s("./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts"),n=s("./packages/ckeditor5-utils/src/toarray.ts");class a{constructor(e,t){this._helpers=new Map,this._downcast=(0,n.Z)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,n.Z)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const s=this._downcast.includes(t);if(!this._upcast.includes(t)&&!s)throw new o.ZP("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:s})}for(e){if(!this._helpers.has(e))throw new o.ZP("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:s}of c(e))this.for("upcast").elementToElement({model:t,view:s,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:s}of c(e))this.for("upcast").elementToAttribute({view:s,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:s}of c(e))this.for("upcast").attributeToAttribute({view:s,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:s}){if(this._helpers.has(e))throw new o.ZP("conversion-group-exists",this);const n=s?new r.ZP(t):new i.ZP(t);this._helpers.set(e,n)}}function*c(e){if(e.model.values)for(const t of e.model.values){const s={key:e.model.key,value:t},o=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*l(s,o,i)}else yield*l(e.model,e.view,e.upcastAlso)}function*l(e,t,s){if(yield{model:e,view:t},s)for(const t of(0,n.Z)(s))yield{model:e,view:t}}},"./packages/ckeditor5-engine/src/conversion/conversionhelpers.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}},"./packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e));const s=this._consumable.get(e);if(void 0===s)return null;const i=s.get(t);return void 0===i?null:i}revert(e,t){t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e));const s=this.test(e,t);return!1===s?(this._consumable.get(e).set(t,!0),!0):!0!==s&&null}verifyAllConsumed(e){const t=[];for(const[s,o]of this._consumable)for(const[i,r]of o){const o=i.split(":")[0];r&&e==o&&t.push({event:i,item:s.name||s.description})}if(t.length)throw new i.ZP("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const s=this._textProxyRegistry.get(e.startOffset);if(s){const o=s.get(e.endOffset);o&&(t=o.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,s=e.endOffset,o=e.parent,i=Symbol("$textProxy:"+e.data);let r,n;return r=this._textProxyRegistry.get(t),r||(r=new Map,this._textProxyRegistry.set(t,r)),n=r.get(s),n||(n=new Map,r.set(s,n)),n.set(o,i),i}}function n(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}var a=s("./packages/ckeditor5-engine/src/model/range.ts"),c=s("./packages/ckeditor5-utils/src/emittermixin.ts");class l extends c.Q5{constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,s){const o=this._createConversionApi(s,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,o);const i=this._reduceChanges(e.getChanges());for(const e of i)"insert"===e.type?this._convertInsert(a.Z._createFromPositionAndShift(e.position,e.length),o):"reinsert"===e.type?this._convertReinsert(a.Z._createFromPositionAndShift(e.position,e.length),o):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,o):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,o);for(const e of o.mapper.flushUnboundMarkerNames()){const s=t.get(e).getRange();this._convertMarkerRemove(e,s,o),this._convertMarkerAdd(e,s,o)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(e,t,s,o={}){const i=this._createConversionApi(s,void 0,o);this._convertInsert(e,i);for(const[e,s]of t)this._convertMarkerAdd(e,s,i);i.consumable.verifyAllConsumed("insert")}convertSelection(e,t,s){const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),i=this._createConversionApi(s);if(this._addConsumablesForSelection(i.consumable,e,o),this.fire("selection",{selection:e},i),e.isCollapsed){for(const t of o){const s=t.getRange();if(!d(e.getFirstPosition(),t,i.mapper))continue;const o={item:e,markerName:t.name,markerRange:s};i.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,o,i)}for(const t of e.getAttributeKeys()){const s={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};i.consumable.test(e,"attribute:"+s.attributeKey)&&this.fire(`attribute:${s.attributeKey}:$text`,s,i)}}}_convertInsert(e,t,s={}){s.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const s of Array.from(e.getWalker({shallow:!0})).map(h))this._testAndFire("insert",s,t)}_convertRemove(e,t,s,o){this.fire(`remove:${s}`,{position:e,length:t},o)}_convertAttribute(e,t,s,o,i){this._addConsumablesForRange(i.consumable,e,`attribute:${t}`);for(const r of e){const e={item:r.item,range:a.Z._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:s,attributeNewValue:o};this._testAndFire(`attribute:${t}`,e,i)}}_convertReinsert(e,t){const s=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,s);for(const e of s.map(h))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,s){if("$graveyard"==t.root.rootName)return;const o=`addMarker:${e}`;if(s.consumable.add(t,o),this.fire(o,{markerName:e,markerRange:t},s),s.consumable.consume(t,o)){this._addConsumablesForRange(s.consumable,t,o);for(const i of t.getItems()){if(!s.consumable.test(i,o))continue;const r={item:i,range:a.Z._createOn(i),markerName:e,markerRange:t};this.fire(o,r,s)}}}_convertMarkerRemove(e,t,s){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},s)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const s of t){const t=s.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const s of t.getAttributeKeys())e.add(t,"attribute:"+s)}}return e}_addConsumablesForRange(e,t,s){for(const o of t.getItems())e.add(o,s);return e}_addConsumablesForSelection(e,t,s){e.add(t,"selection");for(const o of s)e.add(t,"addMarker:"+o.name);for(const s of t.getAttributeKeys())e.add(t,"attribute:"+s);return e}_testAndFire(e,t,s){const o=function(e,t){const s=t.item.is("element")?t.item.name:"$text";return`${e}:${s}`}(e,t),i=t.item.is("$textProxy")?s.consumable._getSymbolForTextProxy(t.item):t.item,r=this._firedEventsMap.get(s),n=r.get(i);if(n){if(n.has(o))return;n.add(o)}else r.set(i,new Set([o]));this.fire(o,t,s)}_testAndFireAddAttributes(e,t){const s={item:e,range:a.Z._createOn(e)};for(const e of s.item.getAttributeKeys())s.attributeKey=e,s.attributeOldValue=null,s.attributeNewValue=s.item.getAttribute(e),this._testAndFire(`attribute:${e}`,s,t)}_createConversionApi(e,t=new Set,s={}){const o={...this._conversionApi,consumable:new r,writer:e,options:s,convertItem:e=>this._convertInsert(a.Z._createOn(e),o),convertChildren:e=>this._convertInsert(a.Z._createIn(e),o,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,o),canReuseView:e=>!t.has(o.mapper.toModelElement(e))};return this._firedEventsMap.set(o,new Map),o}}function d(e,t,s){const o=t.getRange(),i=Array.from(e.getAncestors());i.shift(),i.reverse();return!i.some((e=>{if(o.containsItem(e)){return!!s.toViewElement(e).getCustomProperty("addHighlight")}}))}function h(e){return{item:e.item,range:a.Z._createFromPositionAndShift(e.previousPosition,e.length)}}},"./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts":(e,t,s)=>{"use strict";s.d(t,{GM:()=>_,Od:()=>m,Om:()=>g,ZP:()=>p,iO:()=>w,k3:()=>b,o6:()=>f});var o=s("./packages/ckeditor5-engine/src/model/range.ts"),i=s("./packages/ckeditor5-engine/src/model/selection.ts"),r=s("./packages/ckeditor5-engine/src/model/documentselection.ts"),n=s("./packages/ckeditor5-engine/src/model/element.ts"),a=s("./packages/ckeditor5-engine/src/model/position.ts"),c=s("./packages/ckeditor5-engine/src/view/attributeelement.ts"),l=s("./packages/ckeditor5-engine/src/conversion/conversionhelpers.ts"),d=s("./node_modules/lodash-es/cloneDeep.js"),h=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),u=s("./packages/ckeditor5-utils/src/toarray.ts");class p extends l.Z{elementToElement(e){return this.add(function(e){const t=y(e.model),s=Z(e.view,"container");t.attributes.length&&(t.children=!0);return o=>{o.on(`insert:${t.name}`,function(e,t=j){return(s,o,i)=>{if(!t(o.item,i.consumable,{preflight:!0}))return;const r=e(o.item,i,o);if(!r)return;t(o.item,i.consumable);const n=i.mapper.toViewPosition(o.range.start);i.mapper.bindElements(o.item,r),i.writer.insert(n,r),i.convertAttributes(o.item),E(r,o.item.getChildren(),i,{reconversion:o.reconversion})}}(s,C(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&o.on("reduceChanges",A(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=y(e.model),s=Z(e.view,"container");return t.children=!0,o=>{if(o._conversionApi.schema.checkChild(t.name,"$text"))throw new h.ZP("conversion-element-to-structure-disallowed-text",o,{elementName:t.name});var i,r;o.on(`insert:${t.name}`,(i=s,r=C(t),(e,t,s)=>{if(!r(t.item,s.consumable,{preflight:!0}))return;const o=new Map;s.writer._registerSlotFactory(function(e,t,s){return(o,i="children")=>{const r=o.createContainerElement("$slot");let n=null;if("children"===i)n=Array.from(e.getChildren());else{if("function"!=typeof i)throw new h.ZP("conversion-slot-mode-unknown",s.dispatcher,{modeOrFilter:i});n=Array.from(e.getChildren()).filter((e=>i(e)))}return t.set(r,n),r}}(t.item,o,s));const n=i(t.item,s,t);if(s.writer._clearSlotFactory(),!n)return;!function(e,t,s){const o=Array.from(t.values()).flat(),i=new Set(o);if(i.size!=o.length)throw new h.ZP("conversion-slot-filter-overlap",s.dispatcher,{element:e});if(i.size!=e.childCount)throw new h.ZP("conversion-slot-filter-incomplete",s.dispatcher,{element:e})}(t.item,o,s),r(t.item,s.consumable);const a=s.mapper.toViewPosition(t.range.start);s.mapper.bindElements(t.item,n),s.writer.insert(a,n),s.convertAttributes(t.item),function(e,t,s,o){s.mapper.on("modelToViewPosition",n,{priority:"highest"});let i=null,r=null;for([i,r]of t)E(e,r,s,o),s.writer.move(s.writer.createRangeIn(i),s.writer.createPositionBefore(i)),s.writer.remove(i);function n(e,t){const s=t.modelPosition.nodeAfter,o=r.indexOf(s);o<0||(t.viewPosition=t.mapper.findPositionIn(i,o))}s.mapper.off("modelToViewPosition",n)}(n,o,s,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),o.on("reduceChanges",A(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t=(e=(0,d.Z)(e)).model;"string"==typeof t&&(t={key:t});let s=`attribute:${t.key}`;t.name&&(s+=":"+t.name);if(t.values)for(const s of t.values)e.view[s]=Z(e.view[s],"attribute");else e.view=Z(e.view,"attribute");const o=P(e);return t=>{t.on(s,function(e){return(t,s,o)=>{if(!o.consumable.test(s.item,t.name))return;const n=e(s.attributeOldValue,o,s),a=e(s.attributeNewValue,o,s);if(!n&&!a)return;o.consumable.consume(s.item,t.name);const c=o.writer,l=c.document.selection;if(s.item instanceof i.Z||s.item instanceof r.Z)c.wrap(l.getFirstRange(),a);else{let e=o.mapper.toViewRange(s.range);null!==s.attributeOldValue&&n&&(e=c.unwrap(e,n)),null!==s.attributeNewValue&&a&&c.wrap(e,a)}}}(o),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=(0,d.Z)(e)).model;"string"==typeof t&&(t={key:t});let s=`attribute:${t.key}`;t.name&&(s+=":"+t.name);if(t.values)for(const s of t.values)e.view[s]=x(e.view[s]);else e.view=x(e.view);const o=P(e);return t=>{var i;t.on(s,(i=o,(e,t,s)=>{if(!s.consumable.test(t.item,e.name))return;const o=i(t.attributeOldValue,s,t),r=i(t.attributeNewValue,s,t);if(!o&&!r)return;s.consumable.consume(t.item,e.name);const n=s.mapper.toViewElement(t.item),a=s.writer;if(!n)throw new h.ZP("conversion-attribute-to-attribute-on-text",s.dispatcher,t);if(null!==t.attributeOldValue&&o)if("class"==o.key){const e=(0,u.Z)(o.value);for(const t of e)a.removeClass(t,n)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)a.removeStyle(t,n)}else a.removeAttribute(o.key,n);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e=(0,u.Z)(r.value);for(const t of e)a.addClass(t,n)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],n)}else a.setAttribute(r.key,r.value,n)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=Z(e.view,"ui");return s=>{var o;s.on(`addMarker:${e.model}`,(o=t,(e,t,s)=>{t.isOpening=!0;const i=o(t,s);t.isOpening=!1;const r=o(t,s);if(!i||!r)return;const n=t.markerRange;if(n.isCollapsed&&!s.consumable.consume(n,e.name))return;for(const t of n)if(!s.consumable.consume(t.item,e.name))return;const a=s.mapper,c=s.writer;c.insert(a.toViewPosition(n.start),i),s.mapper.bindElementToMarker(i,t.markerName),n.isCollapsed||(c.insert(a.toViewPosition(n.end),r),s.mapper.bindElementToMarker(r,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),s.on(`removeMarker:${e.model}`,((e,t,s)=>{const o=s.mapper.markerNameToElements(t.markerName);if(o){for(const e of o)s.mapper.unbindElementFromMarkerName(e,t.markerName),s.writer.clear(s.writer.createRangeOn(e),e);s.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var s;t.on(`addMarker:${e.model}`,(s=e.view,(e,t,o)=>{if(!t.item)return;if(!(t.item instanceof i.Z||t.item instanceof r.Z||t.item.is("$textProxy")))return;const n=T(s,t,o);if(!n)return;if(!o.consumable.consume(t.item,e.name))return;const a=o.writer,c=k(a,n),l=a.document.selection;if(t.item instanceof i.Z||t.item instanceof r.Z)a.wrap(l.getFirstRange(),c);else{const e=o.mapper.toViewRange(t.range),s=a.wrap(e,c);for(const e of s.getItems())if(e.is("attributeElement")&&e.isSimilar(c)){o.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,s,i)=>{if(!s.item)return;if(!(s.item instanceof n.Z))return;const r=T(e,s,i);if(!r)return;if(!i.consumable.test(s.item,t.name))return;const a=i.mapper.toViewElement(s.item);if(a&&a.getCustomProperty("addHighlight")){i.consumable.consume(s.item,t.name);for(const e of o.Z._createIn(s.item))i.consumable.consume(e.item,t.name);a.getCustomProperty("addHighlight")(a,r,i.writer),i.mapper.bindElementToMarker(a,s.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,s,o)=>{if(s.markerRange.isCollapsed)return;const i=T(e,s,o);if(!i)return;const r=k(o.writer,i),n=o.mapper.markerNameToElements(s.markerName);if(n){for(const e of n)if(o.mapper.unbindElementFromMarkerName(e,s.markerName),e.is("attributeElement"))o.writer.unwrap(o.writer.createRangeOn(e),r);else{e.getCustomProperty("removeHighlight")(e,i.id,o.writer)}o.writer.clearClonedElementsGroup(s.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=(0,d.Z)(e)).model;let s=e.view;s||(s=s=>({group:t,name:s.substr(e.model.length+1)}));return o=>{var i;o.on(`addMarker:${t}`,(i=s,(e,t,s)=>{const o=i(t.markerName,s);if(!o)return;const r=t.markerRange;s.consumable.consume(r,e.name)&&(v(r,!1,s,t,o),v(r,!0,s,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${t}`,function(e){return(t,s,o)=>{const i=e(s.markerName,o);if(!i)return;const r=o.mapper.markerNameToElements(s.markerName);if(r){for(const e of r)o.mapper.unbindElementFromMarkerName(e,s.markerName),e.is("containerElement")?(n(`data-${i.group}-start-before`,e),n(`data-${i.group}-start-after`,e),n(`data-${i.group}-end-before`,e),n(`data-${i.group}-end-after`,e)):o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(s.markerName),t.stop()}function n(e,t){if(t.hasAttribute(e)){const s=new Set(t.getAttribute(e).split(","));s.delete(i.name),0==s.size?o.writer.removeAttribute(e,t):o.writer.setAttribute(e,Array.from(s).join(","),t)}}}}(s),{priority:e.converterPriority||"normal"})}}(e))}}function g(){return(e,t,s)=>{if(!s.consumable.consume(t.item,e.name))return;const o=s.writer,i=s.mapper.toViewPosition(t.range.start),r=o.createText(t.item.data);o.insert(i,r)}}function f(){return(e,t,s)=>{s.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||s.convertChildren(t.item)}}function m(){return(e,t,s)=>{const o=s.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),r=s.mapper.toViewPosition(i,{isPhantom:!0}),n=s.writer.createRange(o,r),a=s.writer.remove(n.getTrimmed());for(const e of s.writer.createRangeIn(a).getItems())s.mapper.unbindViewElement(e,{defer:!0})}}function k(e,t){const s=e.createAttributeElement("span",t.attributes);return t.classes&&s._addClass(t.classes),"number"==typeof t.priority&&(s._priority=t.priority),s._id=t.id,s}function b(){return(e,t,s)=>{const o=t.selection;if(o.isCollapsed)return;if(!s.consumable.consume(o,"selection"))return;const i=[];for(const e of o.getRanges())i.push(s.mapper.toViewRange(e));s.writer.setSelection(i,{backward:o.isBackward})}}function _(){return(e,t,s)=>{const o=t.selection;if(!o.isCollapsed)return;if(!s.consumable.consume(o,"selection"))return;const i=s.writer,r=o.getFirstPosition(),n=s.mapper.toViewPosition(r),a=i.breakAttributes(n);i.setSelection(a)}}function w(){return(e,t,s)=>{const o=s.writer,i=o.document.selection;for(const e of i.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&s.writer.mergeAttributes(e.start);o.setSelection(null)}}function v(e,t,s,o,i){const r=t?e.start:e.end,n=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(n||a){let e,r;t&&n||!t&&!a?(e=n,r=!0):(e=a,r=!1);const c=s.mapper.toViewElement(e);if(c)return void function(e,t,s,o,i,r){const n=`data-${r.group}-${t?"start":"end"}-${s?"before":"after"}`,a=e.hasAttribute(n)?e.getAttribute(n).split(","):[];a.unshift(r.name),o.writer.setAttribute(n,a.join(","),e),o.mapper.bindElementToMarker(e,i.markerName)}(c,t,r,s,o,i)}!function(e,t,s,o,i){const r=`${i.group}-${t?"start":"end"}`,n=i.name?{name:i.name}:null,a=s.writer.createUIElement(r,n);s.writer.insert(e,a),s.mapper.bindElementToMarker(a,o.markerName)}(s.mapper.toViewPosition(r),t,s,o,i)}function y(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function Z(e,t){return"function"==typeof e?e:(s,o)=>function(e,t,s){"string"==typeof e&&(e={name:e});let o;const i=t.writer,r=Object.assign({},e.attributes);if("container"==s)o=i.createContainerElement(e.name,r);else if("attribute"==s){const t={priority:e.priority||c.Z.DEFAULT_PRIORITY};o=i.createAttributeElement(e.name,r,t)}else o=i.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const s of t)i.setStyle(s,e.styles[s],o)}if(e.classes){const t=e.classes;if("string"==typeof t)i.addClass(t,o);else for(const e of t)i.addClass(e,o)}return o}(e,o,t)}function P(e){return e.model.values?(t,s,o)=>{const i=e.view[t];return i?i(t,s,o):null}:e.view}function x(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function T(e,t,s){const o="function"==typeof e?e(t,s):e;return o?(o.priority||(o.priority=10),o.id||(o.id=t.markerName),o):null}function A(e){const t=function(e){return(t,s)=>{if(!t.is("element",e.name))return!1;if("attribute"==s.type){if(e.attributes.includes(s.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,s)=>{const o=[];s.reconvertedElements||(s.reconvertedElements=new Set);for(const e of s.changes){const i="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(i&&t(i,e)){if(!s.reconvertedElements.has(i)){s.reconvertedElements.add(i);const e=a.ZP._createBefore(i);o.push({type:"remove",name:i.name,position:e,length:1},{type:"reinsert",name:i.name,position:e,length:1})}}else o.push(e)}s.changes=o}}function C(e){return(t,s,o={})=>{const i=["insert"];for(const s of e.attributes)t.hasAttribute(s)&&i.push(`attribute:${s}`);return!!i.every((e=>s.test(t,e)))&&(o.preflight||i.forEach((e=>s.consume(t,e))),!0)}}function E(e,t,s,o){for(const i of t)S(e.root,i,s,o)||s.convertItem(i)}function S(e,t,s,o){const{writer:i,mapper:r}=s;if(!o.reconversion)return!1;const n=r.toViewElement(t);return!(!n||n.root==e)&&(!!s.canReuseView(n)&&(i.move(i.createRangeOn(n),r.toViewPosition(a.ZP._createBefore(t))),!0))}function j(e,t,{preflight:s}={}){return s?t.test(e,"insert"):t.consume(e,"insert")}},"./packages/ckeditor5-engine/src/conversion/mapper.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./packages/ckeditor5-engine/src/model/position.ts"),i=s("./packages/ckeditor5-engine/src/model/range.ts"),r=s("./packages/ckeditor5-engine/src/view/position.ts"),n=s("./packages/ckeditor5-engine/src/view/range.ts"),a=s("./packages/ckeditor5-engine/src/view/text.ts"),c=s("./packages/ckeditor5-utils/src/emittermixin.ts"),l=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class d extends c.Q5{constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const s=this._modelToViewMapping.get(t.modelPosition.parent);if(!s)throw new l.ZP("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(s,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const s=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(s),r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,s);t.modelPosition=o.ZP._createAt(i,r)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const s=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(s)==e&&this._modelToViewMapping.delete(s))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const s=this._markerNameToElements.get(t)||new Set;s.add(e);const o=this._elementToMarkerNames.get(e)||new Set;o.add(t),this._markerNameToElements.set(t,s),this._elementToMarkerNames.set(e,o)}unbindElementFromMarkerName(e,t){const s=this._markerNameToElements.get(t);s&&(s.delete(e),0==s.size&&this._markerNameToElements.delete(t));const o=this._elementToMarkerNames.get(e);o&&(o.delete(t),0==o.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new i.Z(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new n.Z(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const s={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",s),s.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const s=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())s.add(t);else s.add(e);return s}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,s){if(s!=e){return this._toModelOffset(e.parent,e.index,s)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let o=0;for(let s=0;s{"use strict";s.d(t,{Fo:()=>h,ZP:()=>c,_p:()=>l,s8:()=>d});var o=s("./packages/ckeditor5-engine/src/view/matcher.ts"),i=s("./packages/ckeditor5-engine/src/conversion/conversionhelpers.ts"),r=s("./node_modules/lodash-es/cloneDeep.js"),n=s("./packages/ckeditor5-utils/src/priorities.ts"),a=s("./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts");class c extends i.Z{elementToElement(e){return this.add(u(e))}elementToAttribute(e){return this.add(function(e){f(e=(0,r.Z)(e));const t=m(e,!1),s=p(e.view),o=s?`element:${s}`:"element";return s=>{s.on(o,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=(0,r.Z)(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let s;if("class"==t||"style"==t){s={["class"==t?"classes":"styles"]:e.view.value}}else{s={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(s.name=e.view.name);return e.view=s,t}(e));f(e,t);const s=m(e,!0);return t=>{t.on("element",s,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,s)=>{const o="string"==typeof e?e:e(t,s);return s.writer.createElement("$marker",{"data-name":o})}}(e.model);return u({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){(e=(0,r.Z)(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},s=g(k(t,"start")),o=g(k(t,"end"));return i=>{i.on(`element:${e.view}-start`,s,{priority:e.converterPriority||"normal"}),i.on(`element:${e.view}-end`,o,{priority:e.converterPriority||"normal"});const r=n.Z.get("low"),a=n.Z.get("highest"),c=n.Z.get(e.converterPriority)/a;i.on("element",function(e){return(t,s,o)=>{const i=`data-${e.view}`;function r(t,i){for(const r of i){const i=e.model(r,o),n=o.writer.createElement("$marker",{"data-name":i});o.writer.insert(n,t),s.modelCursor.isEqual(t)?s.modelCursor=s.modelCursor.getShiftedBy(1):s.modelCursor=s.modelCursor._getTransformedByInsertion(t,1),s.modelRange=s.modelRange._getTransformedByInsertion(t,1)[0]}}(o.consumable.test(s.viewItem,{attributes:i+"-end-after"})||o.consumable.test(s.viewItem,{attributes:i+"-start-after"})||o.consumable.test(s.viewItem,{attributes:i+"-end-before"})||o.consumable.test(s.viewItem,{attributes:i+"-start-before"}))&&(s.modelRange||Object.assign(s,o.convertChildren(s.viewItem,s.modelCursor)),o.consumable.consume(s.viewItem,{attributes:i+"-end-after"})&&r(s.modelRange.end,s.viewItem.getAttribute(i+"-end-after").split(",")),o.consumable.consume(s.viewItem,{attributes:i+"-start-after"})&&r(s.modelRange.end,s.viewItem.getAttribute(i+"-start-after").split(",")),o.consumable.consume(s.viewItem,{attributes:i+"-end-before"})&&r(s.modelRange.start,s.viewItem.getAttribute(i+"-end-before").split(",")),o.consumable.consume(s.viewItem,{attributes:i+"-start-before"})&&r(s.modelRange.start,s.viewItem.getAttribute(i+"-start-before").split(",")))}}(t),{priority:r+c})}}(e))}}function l(){return(e,t,s)=>{if(!t.modelRange&&s.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=s.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}}function d(){return(e,t,{schema:s,consumable:o,writer:i})=>{let r=t.modelCursor;if(!o.test(t.viewItem))return;if(!s.checkChild(r,"$text")){if(!(0,a.gg)(r,"$text",s))return;if(0==t.viewItem.data.trim().length)return;r=(0,a.zX)(r,i)}o.consume(t.viewItem);const n=i.createText(t.viewItem.data);i.insert(n,r),t.modelRange=i.createRange(r,r.getShiftedBy(n.offsetSize)),t.modelCursor=t.modelRange.end}}function h(e,t){return(s,o)=>{const i=o.newSelection,r=[];for(const e of i.getRanges())r.push(t.toModelRange(e));const n=e.createSelection(r,{backward:i.isBackward});n.isEqual(e.document.selection)||e.change((e=>{e.setSelection(n)}))}}function u(e){const t=g(e=(0,r.Z)(e)),s=p(e.view),o=s?`element:${s}`:"element";return s=>{s.on(o,t,{priority:e.converterPriority||"normal"})}}function p(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function g(e){const t=new o.Z(e.view);return(s,o,i)=>{const r=t.match(o.viewItem);if(!r)return;const n=r.match;if(n.name=!0,!i.consumable.test(o.viewItem,n))return;const a=function(e,t,s){return e instanceof Function?e(t,s):s.writer.createElement(e)}(e.model,o.viewItem,i);a&&i.safeInsert(a,o.modelCursor)&&(i.consumable.consume(o.viewItem,n),i.convertChildren(o.viewItem,a),i.updateConversionResult(a,o))}}function f(e,t=null){const s=null===t||(e=>e.getAttribute(t)),o="object"!=typeof e.model?e.model:e.model.key,i="object"!=typeof e.model||void 0===e.model.value?s:e.model.value;e.model={key:o,value:i}}function m(e,t){const s=new o.Z(e.view);return(o,i,r)=>{if(!i.modelRange&&t)return;const n=s.match(i.viewItem);if(!n)return;if(!function(e,t){const s="function"==typeof e?e(t):e;if("object"==typeof s&&!p(s))return!1;return!s.classes&&!s.attributes&&!s.styles}(e.view,i.viewItem)?delete n.match.name:n.match.name=!0,!r.consumable.test(i.viewItem,n.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(i.viewItem,r):e.model.value;if(null===c)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const l=function(e,t,s,o){let i=!1;for(const r of Array.from(e.getItems({shallow:s})))o.schema.checkAttribute(r,t.key)&&(i=!0,r.hasAttribute(t.key)||o.writer.setAttribute(t.key,t.value,r));return i}(i.modelRange,{key:a,value:c},t,r);l&&(r.consumable.test(i.viewItem,{name:!0})&&(n.match.name=!0),r.consumable.consume(i.viewItem,n.match))}}function k(e,t){return{view:`${e.view}-${t}`,model:(t,s)=>{const o=t.getAttribute("name"),i=e.model(o,s);return s.writer.createElement("$marker",{"data-name":i})}}}},"./packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});class o{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}var i=s("./packages/ckeditor5-engine/src/view/domconverter.ts");class r{constructor(e){this.domParser=new DOMParser,this.domConverter=new i.Z(e,{renderingMode:"data"}),this.htmlWriter=new o}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t)}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),s=t.createDocumentFragment(),o=t.body.childNodes;for(;o.length>0;)s.appendChild(o[0]);return s}}},"./packages/ckeditor5-engine/src/index.ts":(e,t,s)=>{"use strict";s.d(t,{KU:()=>K,uz:()=>b.Z,Yc:()=>k.Z,f4:()=>O.Z,uj:()=>P.Z,pG:()=>N.Z,dK:()=>oe.Z,qZ:()=>U.Z,qD:()=>J.Z,jH:()=>m.Z,W_:()=>S.Z,Ay:()=>R.Z,X5:()=>_.Z,IZ:()=>w.Z,jP:()=>A.Z,iE:()=>T.Z,zj:()=>v.Z,xO:()=>se.Z,Hn:()=>C.Z,dM:()=>G.Z,Qj:()=>H.Z,Bz:()=>y.Z,Ly:()=>j.ZP,e6:()=>x.Z,Th:()=>V.Z,A_:()=>ie.A,xv:()=>M.Z,Po:()=>E.Z,yj:()=>te,m1:()=>F.Z,By:()=>B.Z,Ux:()=>I.Z,y_:()=>q.Z,y9:()=>z.Z,pc:()=>L.Z,wx:()=>W.Z,Xj:()=>D.Z,dq:()=>$.Z,QR:()=>je,sI:()=>Oe,vt:()=>Le,J8:()=>We,DA:()=>l,ID:()=>c,I8:()=>Ce,mq:()=>Ae,oz:()=>Te,YG:()=>B.Y,m0:()=>Ee,uT:()=>Se,$_:()=>h,SB:()=>Ze,D5:()=>he,G9:()=>fe,IT:()=>pe,zz:()=>ke,WK:()=>ve,Zb:()=>_e,PX:()=>xe,Q7:()=>u,NJ:()=>d,Rf:()=>Z.R});var o=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=s.n(o),r=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css"),n={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i()(r.Z,n);r.Z.locals;const a=new WeakMap;function c(e){const{view:t,element:s,text:o,isDirectHost:i=!0,keepOnFocus:r=!1}=e,n=t.document;a.has(n)||(a.set(n,new Map),n.registerPostFixer((e=>p(n,e)))),a.get(n).set(s,{text:o,isDirectHost:i,keepOnFocus:r,hostElement:i?s:null}),t.change((e=>p(n,e)))}function l(e,t){const s=t.document;e.change((e=>{if(!a.has(s))return;const o=a.get(s),i=o.get(t);e.removeAttribute("data-placeholder",i.hostElement),h(e,i.hostElement),o.delete(t)}))}function d(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function h(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function u(e,t){if(!e.isAttached())return!1;const s=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(s)return!1;if(t)return!0;const o=e.document;if(!o.isFocused)return!0;const i=o.selection.anchor;return!!i&&i.parent!==e}function p(e,t){const s=a.get(e),o=[];let i=!1;for(const[e,r]of s)r.isDirectHost&&(o.push(e),g(t,e,r)&&(i=!0));for(const[e,r]of s){if(r.isDirectHost)continue;const s=f(e);s&&(o.includes(s)||(r.hostElement=s,g(t,e,r)&&(i=!0)))}return i}function g(e,t,s){const{text:o,isDirectHost:i,hostElement:r}=s;let n=!1;r.getAttribute("data-placeholder")!==o&&(e.setAttribute("data-placeholder",o,r),n=!0);return(i||1==t.childCount)&&u(r,s.keepOnFocus)?d(e,r)&&(n=!0):h(e,r)&&(n=!0),n}function f(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}var m=s("./packages/ckeditor5-engine/src/controller/editingcontroller.ts"),k=s("./packages/ckeditor5-engine/src/controller/datacontroller.ts"),b=s("./packages/ckeditor5-engine/src/conversion/conversion.ts"),_=s("./packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts"),w=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),v=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),y=s("./packages/ckeditor5-engine/src/model/operation/operationfactory.ts"),Z=s("./packages/ckeditor5-engine/src/model/operation/transform.ts"),P=s("./packages/ckeditor5-engine/src/model/documentselection.ts"),x=s("./packages/ckeditor5-engine/src/model/range.ts"),T=s("./packages/ckeditor5-engine/src/model/liverange.ts"),A=s("./packages/ckeditor5-engine/src/model/liveposition.ts"),C=s("./packages/ckeditor5-engine/src/model/model.ts"),E=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),S=s("./packages/ckeditor5-engine/src/model/element.ts"),j=s("./packages/ckeditor5-engine/src/model/position.ts"),O=s("./packages/ckeditor5-engine/src/model/documentfragment.ts"),R=s("./packages/ckeditor5-engine/src/model/history.ts"),M=s("./packages/ckeditor5-engine/src/model/text.ts"),N=s("./packages/ckeditor5-engine/src/view/domconverter.ts"),V=s("./packages/ckeditor5-engine/src/view/renderer.ts"),I=s("./packages/ckeditor5-engine/src/view/document.ts"),D=s("./packages/ckeditor5-engine/src/view/text.ts"),z=s("./packages/ckeditor5-engine/src/view/element.ts"),B=s("./packages/ckeditor5-engine/src/view/containerelement.ts"),F=s("./packages/ckeditor5-engine/src/view/attributeelement.ts"),L=s("./packages/ckeditor5-engine/src/view/emptyelement.ts"),W=s("./packages/ckeditor5-engine/src/view/rawelement.ts"),$=s("./packages/ckeditor5-engine/src/view/uielement.ts"),q=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),H=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),U=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts");class K extends U.Z{constructor(e){super(e),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}var G=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),J=s("./packages/ckeditor5-engine/src/view/downcastwriter.ts"),Q=s("./node_modules/lodash-es/isPlainObject.js"),X=s("./packages/ckeditor5-engine/src/view/position.ts"),Y=s("./packages/ckeditor5-engine/src/view/range.ts"),ee=s("./packages/ckeditor5-engine/src/view/selection.ts");class te{constructor(e){this.document=e}createDocumentFragment(e){return new q.Z(this.document,e)}createElement(e,t,s){return new z.Z(this.document,e,t,s)}createText(e){return new D.Z(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,s){return s._insertChild(e,t)}removeChildren(e,t,s){return s._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const s=e.parent;if(s){const o=s.getChildIndex(e);return this.removeChildren(o,1,s),this.insertChild(o,t,s),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const s=t.getChildIndex(e);this.remove(e),this.insertChild(s,e.getChildren(),t)}}rename(e,t){const s=new z.Z(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,s)?s:null}setAttribute(e,t,s){s._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,s){(0,Q.Z)(e)&&void 0===s?t._setStyle(e):s._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,s){s._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return X.Z._createAt(e,t)}createPositionAfter(e){return X.Z._createAfter(e)}createPositionBefore(e){return X.Z._createBefore(e)}createRange(e,t){return new Y.Z(e,t)}createRangeOn(e){return Y.Z._createOn(e)}createRangeIn(e){return Y.Z._createIn(e)}createSelection(...e){return new ee.Z(...e)}}var se=s("./packages/ckeditor5-engine/src/view/matcher.ts"),oe=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),ie=s("./packages/ckeditor5-engine/src/view/stylesmap.ts");const re=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,ne=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,ae=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,ce=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,le=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,de=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function he(e){return e.startsWith("#")?re.test(e):e.startsWith("rgb")?ne.test(e)||ae.test(e):e.startsWith("hsl")?ce.test(e)||le.test(e):de.has(e.toLowerCase())}const ue=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function pe(e){return ue.includes(e)}const ge=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function fe(e){return ge.test(e)}const me=/^[+-]?[0-9]*([.][0-9]+)?%$/;function ke(e){return me.test(e)}const be=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function _e(e){return be.includes(e)}const we=["center","top","bottom","left","right"];function ve(e){return we.includes(e)}const ye=["fixed","scroll","local"];function Ze(e){return ye.includes(e)}const Pe=/^url\(/;function xe(e){return Pe.test(e)}function Te(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=Se(e),s=t[0],o=t[2]||s,i=t[1]||s;return{top:s,bottom:o,right:i,left:t[3]||i}}function Ae(e){return t=>{const{top:s,right:o,bottom:i,left:r}=t,n=[];return[s,o,r,i].every((e=>!!e))?n.push([e,Ce(t)]):(s&&n.push([e+"-top",s]),o&&n.push([e+"-right",o]),i&&n.push([e+"-bottom",i]),r&&n.push([e+"-left",r])),n}}function Ce({top:e,right:t,bottom:s,left:o}){const i=[];return o!==t?i.push(e,t,s,o):s!==e?i.push(e,t,s):t!==e?i.push(e,t):i.push(e),i.join(" ")}function Ee(e){return t=>({path:e,value:Te(t)})}function Se(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function je(e){e.setNormalizer("background",(e=>{const t={},s=Se(e);for(const e of s)_e(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):ve(e)?(t.position=t.position||[],t.position.push(e)):Ze(e)?t.attachment=e:he(e)?t.color=e:xe(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Oe(e){e.setNormalizer("border",(e=>{const{color:t,style:s,width:o}=ze(e);return{path:"border",value:{color:Te(t),style:Te(s),width:Te(o)}}})),e.setNormalizer("border-top",Re("top")),e.setNormalizer("border-right",Re("right")),e.setNormalizer("border-bottom",Re("bottom")),e.setNormalizer("border-left",Re("left")),e.setNormalizer("border-color",Me("color")),e.setNormalizer("border-width",Me("width")),e.setNormalizer("border-style",Me("style")),e.setNormalizer("border-top-color",Ve("color","top")),e.setNormalizer("border-top-style",Ve("style","top")),e.setNormalizer("border-top-width",Ve("width","top")),e.setNormalizer("border-right-color",Ve("color","right")),e.setNormalizer("border-right-style",Ve("style","right")),e.setNormalizer("border-right-width",Ve("width","right")),e.setNormalizer("border-bottom-color",Ve("color","bottom")),e.setNormalizer("border-bottom-style",Ve("style","bottom")),e.setNormalizer("border-bottom-width",Ve("width","bottom")),e.setNormalizer("border-left-color",Ve("color","left")),e.setNormalizer("border-left-style",Ve("style","left")),e.setNormalizer("border-left-width",Ve("width","left")),e.setExtractor("border-top",Ie("top")),e.setExtractor("border-right",Ie("right")),e.setExtractor("border-bottom",Ie("bottom")),e.setExtractor("border-left",Ie("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Ae("border-color")),e.setReducer("border-style",Ae("border-style")),e.setReducer("border-width",Ae("border-width")),e.setReducer("border-top",Be("top")),e.setReducer("border-right",Be("right")),e.setReducer("border-bottom",Be("bottom")),e.setReducer("border-left",Be("left")),e.setReducer("border",function(){return t=>{const s=De(t,"top"),o=De(t,"right"),i=De(t,"bottom"),r=De(t,"left"),n=[s,o,i,r],a={width:e(n,"width"),style:e(n,"style"),color:e(n,"color")},c=Fe(a,"all");if(c.length)return c;const l=Object.entries(a).reduce(((e,[t,s])=>(s&&(e.push([`border-${t}`,s]),n.forEach((e=>delete e[t]))),e)),[]);return[...l,...Fe(s,"top"),...Fe(o,"right"),...Fe(i,"bottom"),...Fe(r,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Re(e){return t=>{const{color:s,style:o,width:i}=ze(t),r={};return void 0!==s&&(r.color={[e]:s}),void 0!==o&&(r.style={[e]:o}),void 0!==i&&(r.width={[e]:i}),{path:"border",value:r}}}function Me(e){return t=>({path:"border",value:Ne(t,e)})}function Ne(e,t){return{[t]:Te(e)}}function Ve(e,t){return s=>({path:"border",value:{[e]:{[t]:s}}})}function Ie(e){return(t,s)=>{if(s.border)return De(s.border,e)}}function De(e,t){const s={};return e.width&&e.width[t]&&(s.width=e.width[t]),e.style&&e.style[t]&&(s.style=e.style[t]),e.color&&e.color[t]&&(s.color=e.color[t]),s}function ze(e){const t={},s=Se(e);for(const e of s)fe(e)||/thin|medium|thick/.test(e)?t.width=e:pe(e)?t.style=e:t.color=e;return t}function Be(e){return t=>Fe(t,e)}function Fe(e,t){const s=[];if(e&&e.width&&s.push("width"),e&&e.style&&s.push("style"),e&&e.color&&s.push("color"),3==s.length){const o=s.map((t=>e[t])).join(" ");return["all"==t?["border",o]:[`border-${t}`,o]]}return"all"==t?[]:s.map((s=>[`border-${t}-${s}`,e[s]]))}function Le(e){e.setNormalizer("margin",Ee("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Ae("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function We(e){e.setNormalizer("padding",Ee("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Ae("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}},"./packages/ckeditor5-engine/src/model/documentfragment.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/element.ts"),r=s("./packages/ckeditor5-engine/src/model/nodelist.ts"),n=s("./packages/ckeditor5-engine/src/model/text.ts"),a=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),c=s("./packages/ckeditor5-utils/src/isiterable.ts");class l extends o.Z{constructor(e){super(),this.markers=new Map,this._children=new r.Z,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const s of e)t=t.getChild(t.offsetToIndex(s));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const s of e)s.name?t.push(i.Z.fromJSON(s)):t.push(n.Z.fromJSON(s));return new l(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const s=function(e){if("string"==typeof e)return[new n.Z(e)];(0,c.Z)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new n.Z(e):e instanceof a.Z?new n.Z(e.data,e.getAttributes()):e))}(t);for(const e of s)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,s)}_removeChildren(e,t=1){const s=this._children._removeNodes(e,t);for(const e of s)e.parent=null;return s}}l.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e}},"./packages/ckeditor5-engine/src/model/documentselection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/liverange.ts"),r=s("./packages/ckeditor5-engine/src/model/selection.ts"),n=s("./packages/ckeditor5-engine/src/model/text.ts"),a=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),l=s("./packages/ckeditor5-utils/src/collection.ts"),d=s("./packages/ckeditor5-utils/src/emittermixin.ts"),h=s("./packages/ckeditor5-utils/src/tomap.ts"),u=s("./packages/ckeditor5-utils/src/uid.ts");const p="selection:";class g extends((0,d.ZP)(o.Z)){constructor(e){super(),this._selection=new f(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return p+e}static _isStoreAttributeKey(e){return e.startsWith(p)}}g.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class f extends r.Z{constructor(e){super(),this.markers=new l.Z({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&"marker"!=s.type&&"rename"!=s.type&&"noop"!=s.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,s,o)=>{this._updateMarker(t,o)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const s=e.document.differ;for(const o of s.getChanges()){if("insert"!=o.type)continue;const s=o.position.parent;o.length===s.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(s.getAttributeKeys()).filter((e=>e.startsWith(p)));for(const o of t)e.removeAttribute(o,s)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const s=t.name.split(":",1)[0];if(!this._observedMarkers.has(s))continue;const o=t.getRange();for(const s of this.getRanges())o.containsRange(s,!s.isCollapsed)&&e.push(t)}const s=Array.from(this.markers);for(const s of e)this.markers.has(s)||(this.markers.add(s),t=!0);for(const s of Array.from(this.markers))e.includes(s)||(this.markers.remove(s),t=!0);t&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateMarker(e,t){const s=e.name.split(":",1)[0];if(!this._observedMarkers.has(s))return;let o=!1;const i=Array.from(this.markers),r=this.markers.has(e);if(t){let s=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){s=!0;break}s&&!r?(this.markers.add(e),o=!0):!s&&r&&(this.markers.remove(e),o=!0)}else r&&(this.markers.remove(e),o=!0);o&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=(0,h.Z)(this._getSurroundingAttributes()),s=(0,h.Z)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[e,t]of this.getAttributes())s.has(e)&&s.get(e)===t||o.push(e);for(const[e]of s)this.hasAttribute(e)||o.push(e);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(e,t,s=!0){const o=s?"normal":"low";if("low"==o&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,o),!0)}_removeAttribute(e,t=!0){const s=t?"normal":"low";return("low"!=s||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,s),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,s]of this.getAttributes())e.get(t)!==s&&this._removeAttribute(t,!1);for(const[s,o]of e){this._setAttribute(s,o,!1)&&t.add(s)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(p)){const s=t.substr(p.length);yield[s,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let s=null;if(this.isCollapsed){const o=e.textNode?e.textNode:e.nodeBefore,i=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(s=m(o)),s||(s=m(i)),!this.isGravityOverridden&&!s){let e=o;for(;e&&!t.isInline(e)&&!s;)e=e.previousSibling,s=m(e)}if(!s){let e=i;for(;e&&!t.isInline(e)&&!s;)e=e.nextSibling,s=m(e)}s||(s=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const o of e){if(o.item.is("element")&&t.isObject(o.item))break;if("text"==o.type){s=o.item.getAttributes();break}}}return s}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function m(e){return e instanceof a.Z||e instanceof n.Z?e.getAttributes():null}},"./packages/ckeditor5-engine/src/model/element.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/model/node.ts"),i=s("./packages/ckeditor5-engine/src/model/nodelist.ts"),r=s("./packages/ckeditor5-engine/src/model/text.ts"),n=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),a=s("./packages/ckeditor5-utils/src/isiterable.ts");class c extends o.Z{constructor(e,t,s){super(t),this.name=e,this._children=new i.Z,s&&this._insertChild(0,s)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const s of e)t=t.getChild(t.offsetToIndex(s));return t}findAncestor(e,t={}){let s=t.includeSelf?this:this.parent;for(;s;){if(s.name===e)return s;s=s.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new c(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const s=function(e){if("string"==typeof e)return[new r.Z(e)];(0,a.Z)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new r.Z(e):e instanceof n.Z?new r.Z(e.data,e.getAttributes()):e))}(t);for(const e of s)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,s)}_removeChildren(e,t=1){const s=this._children._removeNodes(e,t);for(const e of s)e.parent=null;return s}static fromJSON(e){let t;if(e.children){t=[];for(const s of e.children)s.name?t.push(c.fromJSON(s)):t.push(r.Z.fromJSON(s))}return new c(e.name,e.attributes,t)}}c.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}},"./packages/ckeditor5-engine/src/model/history.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/index.ts");class i{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new o.Bb("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const s=this._operations[0];void 0===e&&(e=s.baseVersion);let o=t-1;for(const[t,s]of this._gaps)e>t&&et&&othis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(e);void 0===i&&(i=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(i,r+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}},"./packages/ckeditor5-engine/src/model/liveposition.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/model/position.ts"),i=s("./packages/ckeditor5-utils/src/emittermixin.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends((0,i.ZP)(o.ZP)){constructor(e,t,s="toNone"){if(super(e,t,s),!this.root.is("rootElement"))throw new r.ZP("model-liveposition-root-not-rootelement",e);a.call(this)}detach(){this.stopListening()}toPosition(){return new o.ZP(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function a(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&c.call(this,s)}),{priority:"low"})}function c(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}n.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}},"./packages/ckeditor5-engine/src/model/liverange.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/range.ts"),i=s("./packages/ckeditor5-utils/src/emittermixin.ts");class r extends((0,i.ZP)(o.Z)){constructor(e,t){super(e,t),n.call(this)}detach(){this.stopListening()}toRange(){return new o.Z(this.start,this.end)}static fromRange(e){return new r(e.start,e.end)}}function n(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&a.call(this,s)}),{priority:"low"})}function a(e){const t=this.getTransformedByOperation(e),s=o.Z._createFromRanges(t),i=!s.isEqual(this),r=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let n=null;if(i){"$graveyard"==s.root.rootName&&(n="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=s.start,this.end=s.end,this.fire("change:range",t,{deletionPosition:n})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:n})}r.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}},"./packages/ckeditor5-engine/src/model/model.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>Ze});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class i{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,o.KE)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:s=!0,isUndo:i=!1,isTyping:r=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=s,this.isUndo=i,this.isTyping=r}get type(){return(0,o.KE)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}var r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts");class a{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),s=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),s||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=n.Z._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const s=t.graveyardPosition.parent;this._markInsert(s,t.graveyardPosition.offset,1);const o=t.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,s){const o=this._changedMarkers.get(e);o?(o.newMarkerData=s,null==o.oldMarkerData.range&&null==s.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:s,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,s]of this._changedMarkers)null!=s.oldMarkerData.range&&e.push({name:t,range:s.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,s]of this._changedMarkers)null!=s.newMarkerData.range&&e.push({name:t,range:s.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const s=e.range&&!t.range,o=!e.range&&t.range,i=e.range&&t.range&&!e.range.isEqual(t.range);if(s||o||i)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const s=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(d),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=n.Z._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,s){const o={type:"insert",offset:t,howMany:s,count:this._changeCount++};this._markChange(e,o)}_markRemove(e,t,s){const o={type:"remove",offset:t,howMany:s,count:this._changeCount++};this._markChange(e,o),this._removeAllNestedChanges(e,t,s)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const s=this._getChangesForElement(e);this._handleChange(t,s),s.push(t);for(let e=0;es.offset){if(o>i){const e={type:"attribute",offset:i,howMany:o-i,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=s.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=s.offset&&e.offseti?(e.nodesToHandle=o-i,e.offset=i):e.nodesToHandle=0);if("remove"==s.type&&e.offsets.offset){const i={type:"attribute",offset:s.offset,howMany:o-s.offset,count:this._changeCount++};this._handleChange(i,t),t.push(i),e.nodesToHandle=s.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==s.type&&(e.offset>=s.offset&&o<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=s.offset&&o>=i&&(s.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,s){return{type:"insert",position:r.ZP._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,s){return{type:"remove",position:r.ZP._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,s){const o=[];s=new Map(s);for(const[i,r]of t){const t=s.has(i)?s.get(i):null;t!==r&&o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),s.delete(i)}for(const[t,i]of s)o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const s=this._changesInElement.get(t),o=e.startOffset;if(s)for(const e of s)if("insert"==e.type&&o>=e.offset&&oo){for(let t=0;te.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function w(e,t){const s=String(e).matchAll(_);return Array.from(s).some((e=>e.index{const s=t[0];s.isDocumentOperation&&this.differ.bufferOperation(s)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&this.history.addOperation(s)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,s,o,i)=>{const r={...t.getData(),range:o};this.differ.bufferMarkerChange(t.name,i,r),null===s&&t.on("change",((e,s)=>{const o=t.getData();this.differ.bufferMarkerChange(t.name,{...o,range:s},o)}))}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(y)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new o.ZP("model-document-createroot-name-exists",this,{name:t});const s=new g(this,e,t);return this.roots.add(s),s}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,(e=>e.rootName)).filter((e=>e!=y))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=(0,v.Z)(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,s=t.schema,o=t.createPositionFromPath(e,[0]);return s.getNearestSelectionRange(o)||t.createRange(o)}_validateSelectionRange(e){return P(e.start)&&P(e.end)}_callPostFixers(e){let t=!1;do{for(const s of this._postFixers)if(this.selection.refresh(),t=s(e),t)break}while(t)}}function P(e){const t=e.textNode;if(t){const s=t.data,o=e.offset-t.startOffset;return!k(s,o)&&!b(s,o)}return!0}var x=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),T=s("./packages/ckeditor5-engine/src/model/liverange.ts");class A extends m.Q5{constructor(){super(),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof C?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,s=!1,i=!1){const r=e instanceof C?e.name:e;if(r.includes(","))throw new o.ZP("markercollection-incorrect-marker-name",this);const n=this._markers.get(r);if(n){const e=n.getData(),o=n.getRange();let a=!1;return o.isEqual(t)||(n._attachLiveRange(T.Z.fromRange(t)),a=!0),s!=n.managedUsingOperations&&(n._managedUsingOperations=s,a=!0),"boolean"==typeof i&&i!=n.affectsData&&(n._affectsData=i,a=!0),a&&this.fire(`update:${r}`,n,o,t,e),n}const a=T.Z.fromRange(t),c=new C(r,a,s,i);return this._markers.set(r,c),this.fire(`update:${r}`,c,null,t,{...c.getData(),range:null}),c}_remove(e){const t=e instanceof C?e.name:e,s=this._markers.get(t);return!!s&&(this._markers.delete(t),this.fire(`update:${t}`,s,s.getRange(),null,s.getData()),this._destroyMarker(s),!0)}_refresh(e){const t=e instanceof C?e.name:e,s=this._markers.get(t);if(!s)throw new o.ZP("markercollection-refresh-marker-not-exists",this);const i=s.getRange();this.fire(`update:${t}`,s,i,i,s.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class C extends((0,m.ZP)(x.Z)){constructor(e,t,s,o){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=s,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}C.prototype.is=function(e){return"marker"===e||"model:marker"===e};var E=s("./packages/ckeditor5-engine/src/model/selection.ts"),S=s("./packages/ckeditor5-engine/src/model/operation/operationfactory.ts"),j=s("./packages/ckeditor5-engine/src/model/schema.ts"),O=s("./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts"),R=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),M=s("./packages/ckeditor5-engine/src/model/operation/utils.ts");class N extends R.Z{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new o.ZP("detach-operation-on-document-node",this)}_execute(){(0,M.X9)(n.Z._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}var V=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),I=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),D=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts"),z=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),B=s("./packages/ckeditor5-engine/src/model/operation/renameoperation.ts"),F=s("./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts"),L=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),W=s("./packages/ckeditor5-engine/src/model/documentfragment.ts"),$=s("./packages/ckeditor5-engine/src/model/text.ts"),q=s("./packages/ckeditor5-utils/src/tomap.ts");class H{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new $.Z(e,t)}createElement(e,t){return new p.Z(e,t)}createDocumentFragment(){return new W.Z}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,s=0){if(this._assertWriterUsedCorrectly(),e instanceof $.Z&&""==e.data)return;const i=r.ZP._createAt(t,s);if(e.parent){if(Q(e.root,i.root))return void this.move(n.Z._createOn(e),i);if(e.root.document)throw new o.ZP("model-writer-insert-forbidden-move",this);this.remove(e)}const a=i.root.document?i.root.document.version:null,c=new V.Z(i,e,a);if(e instanceof $.Z&&(c.shouldReceiveAttributes=!0),this.batch.addOperation(c),this.model.applyOperation(c),e instanceof W.Z)for(const[t,s]of e.markers){const e=r.ZP._createAt(s.root,0),o={range:new n.Z(s.start._getCombined(e,i),s.end._getCombined(e,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,o):this.addMarker(t,o)}}insertText(e,t,s,o){t instanceof W.Z||t instanceof p.Z||t instanceof r.ZP?this.insert(this.createText(e),t,s):this.insert(this.createText(e,t),s,o)}insertElement(e,t,s,o){t instanceof W.Z||t instanceof p.Z||t instanceof r.ZP?this.insert(this.createElement(e),t,s):this.insert(this.createElement(e,t),s,o)}append(e,t){this.insert(e,t,"end")}appendText(e,t,s){t instanceof W.Z||t instanceof p.Z?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),s,"end")}appendElement(e,t,s){t instanceof W.Z||t instanceof p.Z?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),s,"end")}setAttribute(e,t,s){if(this._assertWriterUsedCorrectly(),s instanceof n.Z){const o=s.getMinimalFlatRanges();for(const s of o)U(this,e,t,s)}else K(this,e,t,s)}setAttributes(e,t){for(const[s,o]of(0,q.Z)(e))this.setAttribute(s,o,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof n.Z){const s=t.getMinimalFlatRanges();for(const t of s)U(this,e,null,t)}else K(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof n.Z)for(const s of e.getItems())t(s);else t(e)}move(e,t,s){if(this._assertWriterUsedCorrectly(),!(e instanceof n.Z))throw new o.ZP("writer-move-invalid-range",this);if(!e.isFlat)throw new o.ZP("writer-move-range-not-flat",this);const i=r.ZP._createAt(t,s);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Q(e.root,i.root))throw new o.ZP("writer-move-different-document",this);const a=e.root.document?e.root.document.version:null,c=new z.Z(e.start,e.end.offset-e.start.offset,i,a);this.batch.addOperation(c),this.model.applyOperation(c)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof n.Z?e:n.Z._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),J(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,s=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof p.Z))throw new o.ZP("writer-merge-no-element-before",this);if(!(s instanceof p.Z))throw new o.ZP("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,s){return this.model.createPositionFromPath(e,t,s)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,s=e.nodeAfter;this.move(n.Z._createIn(s),r.ZP._createAt(t,"end")),this.remove(s)}_merge(e){const t=r.ZP._createAt(e.nodeBefore,"end"),s=r.ZP._createAt(e.nodeAfter,0),o=e.root.document.graveyard,i=new r.ZP(o,[0]),n=e.root.document.version,a=new D.Z(s,e.nodeAfter.maxOffset,t,i,n);this.batch.addOperation(a),this.model.applyOperation(a)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof p.Z))throw new o.ZP("writer-rename-not-element-instance",this);const s=e.root.document?e.root.document.version:null,i=new B.Z(r.ZP._createBefore(e),e.name,t,s);this.batch.addOperation(i),this.model.applyOperation(i)}split(e,t){this._assertWriterUsedCorrectly();let s,i,a=e.parent;if(!a.parent)throw new o.ZP("writer-split-element-no-parent",this);if(t||(t=a.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new o.ZP("writer-split-invalid-limit-element",this);do{const t=a.root.document?a.root.document.version:null,o=a.maxOffset-e.offset,r=L.Z.getInsertionPosition(e),n=new L.Z(e,o,r,null,t);this.batch.addOperation(n),this.model.applyOperation(n),s||i||(s=a,i=e.parent.nextSibling),a=(e=this.createPositionAfter(e.parent)).parent}while(a!==t);return{position:e,range:new n.Z(r.ZP._createAt(s,"end"),r.ZP._createAt(i,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new o.ZP("writer-wrap-range-not-flat",this);const s=t instanceof p.Z?t:new p.Z(t);if(s.childCount>0)throw new o.ZP("writer-wrap-element-not-empty",this);if(null!==s.parent)throw new o.ZP("writer-wrap-element-attached",this);this.insert(s,e.start);const i=new n.Z(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,r.ZP._createAt(s,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new o.ZP("writer-unwrap-element-no-parent",this);this.move(n.Z._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new o.ZP("writer-addmarker-no-usingoperation",this);const s=t.usingOperation,i=t.range,r=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new o.ZP("writer-addmarker-marker-exists",this);if(!i)throw new o.ZP("writer-addmarker-no-range",this);return s?(G(this,e,null,i,r),this.model.markers.get(e)):this.model.markers._set(e,i,s,r)}updateMarker(e,t){this._assertWriterUsedCorrectly();const s="string"==typeof e?e:e.name,i=this.model.markers.get(s);if(!i)throw new o.ZP("writer-updatemarker-marker-not-exists",this);if(!t)return(0,o.KE)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:s}),void this.model.markers._refresh(i);const r="boolean"==typeof t.usingOperation,n="boolean"==typeof t.affectsData,a=n?t.affectsData:i.affectsData;if(!r&&!t.range&&!n)throw new o.ZP("writer-updatemarker-wrong-options",this);const c=i.getRange(),l=t.range?t.range:c;r&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?G(this,s,null,l,a):(G(this,s,c,null,a),this.model.markers._set(s,l,void 0,a)):i.managedUsingOperations?G(this,s,c,l,a):this.model.markers._set(s,l,void 0,a)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new o.ZP("writer-removemarker-no-marker",this);const s=this.model.markers.get(t);if(!s.managedUsingOperations)return void this.model.markers._remove(t);G(this,t,s.getRange(),null,s.affectsData)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,s]of(0,q.Z)(e))this._setSelectionAttribute(t,s)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const s=this.model.document.selection;if(s.isCollapsed&&s.anchor.parent.isEmpty){const o=h.Z._getStoreAttributeKey(e);this.setAttribute(o,t,s.anchor.parent)}s._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const s=h.Z._getStoreAttributeKey(e);this.removeAttribute(s,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new o.ZP("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const s of this.model.markers){if(!s.managedUsingOperations)continue;const o=s.getRange();let i=!1;if("move"===e){const e=t;i=e.containsPosition(o.start)||e.start.isEqual(o.start)||e.containsPosition(o.end)||e.end.isEqual(o.end)}else{const e=t,s=e.nodeBefore,r=e.nodeAfter,n=o.start.parent==s&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,c=o.end.nodeAfter==r,l=o.start.nodeAfter==r;i=n||a||c||l}i&&this.updateMarker(s.name,{range:o})}}}function U(e,t,s,o){const i=e.model,a=i.document;let c,l,d,h=o.start;for(const e of o.getWalker({shallow:!0}))d=e.item.getAttribute(t),c&&l!=d&&(l!=s&&u(),h=c),c=e.nextPosition,l=d;function u(){const o=new n.Z(h,c),r=o.root.document?a.version:null,d=new O.Z(o,t,l,s,r);e.batch.addOperation(d),i.applyOperation(d)}c instanceof r.ZP&&c!=h&&l!=s&&u()}function K(e,t,s,o){const i=e.model,a=i.document,c=o.getAttribute(t);let l,d;if(c!=s){if(o.root===o){const e=o.document?a.version:null;d=new F.Z(o,t,c,s,e)}else{l=new n.Z(r.ZP._createBefore(o),e.createPositionAfter(o));const i=l.root.document?a.version:null;d=new O.Z(l,t,c,s,i)}e.batch.addOperation(d),i.applyOperation(d)}}function G(e,t,s,o,i){const r=e.model,n=r.document,a=new I.Z(t,s,o,r.markers,!!i,n.version);e.batch.addOperation(a),r.applyOperation(a)}function J(e,t,s,o){let i;if(e.root.document){const s=o.document,n=new r.ZP(s.graveyard,[0]);i=new z.Z(e,t,n,s.version)}else i=new N(e,t);s.addOperation(i),o.applyOperation(i)}function Q(e,t){return e===t||e instanceof g&&t instanceof g}var X=s("./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts");function Y(e){e.document.registerPostFixer((t=>function(e,t){const s=t.document.selection,o=t.schema,i=[];let r=!1;for(const e of s.getRanges()){const t=ee(e,o);t&&!t.isEqual(e)?(i.push(t),r=!0):i.push(e)}r&&e.setSelection(function(e){const t=[...e],s=new Set;let o=1;for(;o!s.has(t)))}(i),{backward:s.isBackward});return!1}(t,e)))}function ee(e,t){return e.isCollapsed?function(e,t){const s=e.start,o=t.getNearestSelectionRange(s);if(!o){const e=s.getAncestors().reverse().find((e=>t.isObject(e)));return e?n.Z._createOn(e):null}if(!o.isCollapsed)return o;const i=o.start;if(s.isEqual(i))return null;return new n.Z(i)}(e,t):function(e,t){const{start:s,end:o}=e,i=t.checkChild(s,"$text"),a=t.checkChild(o,"$text"),c=t.getLimitElement(s),l=t.getLimitElement(o);if(c===l){if(i&&a)return null;if(function(e,t,s){const o=e.nodeAfter&&!s.isLimit(e.nodeAfter)||s.checkChild(e,"$text"),i=t.nodeBefore&&!s.isLimit(t.nodeBefore)||s.checkChild(t,"$text");return o||i}(s,o,t)){const e=s.nodeAfter&&t.isSelectable(s.nodeAfter)?null:t.getNearestSelectionRange(s,"forward"),i=o.nodeBefore&&t.isSelectable(o.nodeBefore)?null:t.getNearestSelectionRange(o,"backward"),r=e?e.start:s,a=i?i.end:o;return new n.Z(r,a)}}const d=c&&!c.is("rootElement"),h=l&&!l.is("rootElement");if(d||h){const e=s.nodeAfter&&o.nodeBefore&&s.nodeAfter.parent===o.nodeBefore.parent,i=d&&(!e||!se(s.nodeAfter,t)),a=h&&(!e||!se(o.nodeBefore,t));let u=s,p=o;return i&&(u=r.ZP._createBefore(te(c,t))),a&&(p=r.ZP._createAfter(te(l,t))),new n.Z(u,p)}return null}(e,t)}function te(e,t){let s=e,o=s;for(;t.isLimit(o)&&o.parent;)s=o,o=o.parent;return s}function se(e,t){return e&&t.isSelectable(e)}var oe=s("./packages/ckeditor5-engine/src/model/liveposition.ts");function ie(e,t,s={}){if(t.isCollapsed)return;const o=t.getFirstRange();if("$graveyard"==o.root.rootName)return;const i=e.schema;e.change((e=>{if(!s.doNotResetEntireContent&&function(e,t){const s=e.getLimitElement(t);if(!t.containsEntireContent(s))return!1;const o=t.getFirstRange();if(o.start.parent==o.end.parent)return!1;return e.checkChild(s,"paragraph")}(i,t))return void function(e,t){const s=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(s)),ce(e,e.createPositionAt(s,0),t)}(e,t);const r={};if(!s.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(r,i.getAttributesWithProperty(e,"copyOnReplace",!0))}const[n,a]=function(e){const t=e.root.document.model,s=e.start;let o=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const s=function(e){const t=e.parent,s=t.root.document.model.schema,o=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of o){if(s.isLimit(e))return null;if(s.isBlock(e))return e}}(o);if(s&&o.isTouching(t.createPositionAt(s,0))){const s=t.createSelection(e);t.modifySelection(s,{direction:"backward"});const i=s.getLastPosition(),r=t.createRange(i,o);t.hasContent(r,{ignoreMarkers:!0})||(o=i)}}return[oe.Z.fromPosition(s,"toPrevious"),oe.Z.fromPosition(o,"toNext")]}(o);n.isTouching(a)||e.remove(e.createRange(n,a)),s.leaveUnmerged||(!function(e,t,s){const o=e.model;if(!ae(e.model.schema,t,s))return;const[i,r]=function(e,t){const s=e.getAncestors(),o=t.getAncestors();let i=0;for(;s[i]&&s[i]==o[i];)i++;return[s[i],o[i]]}(t,s);if(!i||!r)return;!o.hasContent(i,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?ne(e,t,s,i.parent):re(e,t,s,i.parent)}(e,n,a),i.removeDisallowedAttributes(n.parent.getChildren(),e)),le(e,t,n),!s.doNotAutoparagraph&&function(e,t){const s=e.checkChild(t,"$text"),o=e.checkChild(t,"paragraph");return!s&&o}(i,n)&&ce(e,n,t,r),n.detach(),a.detach()}))}function re(e,t,s,o){const i=t.parent,r=s.parent;if(i!=o&&r!=o){for(t=e.createPositionAfter(i),(s=e.createPositionBefore(r)).isEqual(t)||e.insert(r,t),e.merge(t);s.parent.isEmpty;){const t=s.parent;s=e.createPositionBefore(t),e.remove(t)}ae(e.model.schema,t,s)&&re(e,t,s,o)}}function ne(e,t,s,o){const i=t.parent,r=s.parent;if(i!=o&&r!=o){for(t=e.createPositionAfter(i),(s=e.createPositionBefore(r)).isEqual(t)||e.insert(i,s);t.parent.isEmpty;){const s=t.parent;t=e.createPositionBefore(s),e.remove(s)}s=e.createPositionBefore(r),function(e,t){const s=t.nodeBefore,o=t.nodeAfter;s.name!=o.name&&e.rename(s,o.name);e.clearAttributes(s),e.setAttributes(Object.fromEntries(o.getAttributes()),s),e.merge(t)}(e,s),ae(e.model.schema,t,s)&&ne(e,t,s,o)}}function ae(e,t,s){const o=t.parent,i=s.parent;return o!=i&&(!e.isLimit(o)&&!e.isLimit(i)&&function(e,t,s){const o=new n.Z(e,t);for(const e of o.getWalker())if(s.isLimit(e.item))return!1;return!0}(t,s,e))}function ce(e,t,s,o={}){const i=e.createElement("paragraph");e.model.schema.setAllowedAttributes(i,o,e),e.insert(i,t),le(e,s,e.createPositionAt(i,0))}function le(e,t,s){t instanceof h.Z?e.setSelection(s):t.setTo(s)}function de(e,t){const s=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{s.push(e.start.parent),t.remove(e)})),s.forEach((e=>{let s=e;for(;s.parent&&s.isEmpty;){const e=t.createRangeOn(s);s=s.parent,t.remove(e)}}))}var he=s("./packages/ckeditor5-engine/src/index.ts");class ue{constructor(e,t,s){this.model=e,this.writer=t,this.position=s,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),s=this.writer.createPositionAfter(e);if(s.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new o.ZP("insertcontent-invalid-insertion-position",this);this.position=s,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?n.Z._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new n.Z(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=oe.Z.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new o.ZP("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=oe.Z.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=oe.Z.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof p.Z))return;if(!this._canMergeLeft(e))return;const t=oe.Z._createBefore(e);t.stickiness="toNext";const s=oe.Z.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=oe.Z._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=oe.Z._createAt(t.nodeBefore,"end","toNext")),this.position=s.toPosition(),s.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof p.Z))return;if(!this._canMergeRight(e))return;const t=oe.Z._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new o.ZP("insertcontent-invalid-insertion-position",this);this.position=r.ZP._createAt(t.nodeBefore,"end");const s=oe.Z.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=oe.Z._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=oe.Z._createAt(t.nodeBefore,0,"toPrevious")),this.position=s.toPosition(),s.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof p.Z&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof p.Z&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}var pe=s("./packages/ckeditor5-engine/src/model/utils/findoptimalinsertionrange.ts"),ge=s("./packages/ckeditor5-utils/src/first.ts");function fe(e,t,s,i,r={}){if(!e.schema.isObject(t))throw new o.ZP("insertobject-element-not-an-object",e,{object:t});let n;n=s?s instanceof E.Z||s instanceof h.Z?s:e.createSelection(s,i):e.document.selection;let a=n;r.findOptimalPosition&&e.schema.isBlock(t)&&(a=e.createSelection((0,pe.K)(n,e,r.findOptimalPosition)));const c=(0,ge.Z)(n.getSelectedBlocks()),l={};return c&&Object.assign(l,e.schema.getAttributesWithProperty(c,"copyOnReplace",!0)),e.change((s=>{a.isCollapsed||e.deleteContent(a,{doNotAutoparagraph:!0});let i=t;const n=a.anchor.parent;!e.schema.checkChild(n,t)&&e.schema.checkChild(n,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=s.createElement("paragraph"),s.insert(t,i)),e.schema.setAllowedAttributes(i,l,s);const c=e.insertContent(i,a);return c.isCollapsed||r.setSelection&&function(e,t,s,i){const r=e.model;if("after"==s){let s=t.nextSibling;!(s&&r.schema.checkChild(s,"$text"))&&r.schema.checkChild(t.parent,"paragraph")&&(s=e.createElement("paragraph"),r.schema.setAllowedAttributes(s,i,e),r.insertContent(s,e.createPositionAfter(t))),s&&e.setSelection(s,0)}else{if("on"!=s)throw new o.ZP("insertobject-invalid-place-parameter-value",r);e.setSelection(t,"on")}}(s,t,r.setSelection,l),c}))}var me=s("./packages/ckeditor5-engine/src/model/treewalker.ts");const ke=' ,.?!:;"-()';function be(e,t){const{isForward:s,walker:o,unit:i,schema:n,treatEmojiAsSingleUnit:a}=e,{type:c,item:l,nextPosition:d}=t;if("text"==c)return"word"===e.unit?function(e,t){let s=e.position.textNode;if(s){let o=e.position.offset-s.startOffset;for(;!we(s.data,o,t)&&!ve(s,o,t);){e.next();const i=t?e.position.nodeAfter:e.position.nodeBefore;if(i&&i.is("$text")){const o=i.data.charAt(t?0:i.data.length-1);ke.includes(o)||(e.next(),s=e.position.textNode)}o=e.position.offset-s.startOffset}}return e.position}(o,s):function(e,t,s){const o=e.position.textNode;if(o){const i=o.data;let r=e.position.offset-o.startOffset;for(;k(i,r)||"character"==t&&b(i,r)||s&&w(i,r);)e.next(),r=e.position.offset-o.startOffset}return e.position}(o,i,a);if(c==(s?"elementStart":"elementEnd")){if(n.isSelectable(l))return r.ZP._createAt(l,s?"after":"before");if(n.checkChild(d,"$text"))return d}else{if(n.isLimit(l))return void o.skip((()=>!0));if(n.checkChild(d,"$text"))return d}}function _e(e,t){const s=e.root,o=r.ZP._createAt(s,t?"end":0);return t?new n.Z(e,o):new n.Z(o,e)}function we(e,t,s){const o=t+(s?0:-1);return ke.includes(e.charAt(o))}function ve(e,t,s){return t===(s?e.endOffset:0)}var ye=s("./packages/ckeditor5-utils/src/observablemixin.ts");class Ze extends ye.y{constructor(){super(),this.markers=new A,this.document=new Z(this),this.schema=new j.Z,this._pendingChanges=[],this._currentWriter=null,["insertContent","insertObject","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Y(this),this.document.registerPostFixer(X._m)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new i,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){o.ZP.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new i):e instanceof i||(e=new i(e)):e=new i,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){o.ZP.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,s){return function(e,t,s,o){return e.change((i=>{let r;r=s?s instanceof E.Z||s instanceof h.Z?s:i.createSelection(s,o):e.document.selection,r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const a=new ue(e,i,r.anchor),c=[];let l;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[s,o]of t.markers){const{start:t,end:i}=o,r=t.isEqual(i);e.push({position:t,name:s,isCollapsed:r},{position:i,name:s,isCollapsed:r})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:s,name:o,isCollapsed:r}of e){let e=null,n=null;const a=s.parent===t&&s.isAtStart,l=s.parent===t&&s.isAtEnd;a||l?r&&(n=a?"start":"end"):(e=i.createElement("$marker"),i.insert(e,s)),c.push({name:o,element:e,collapsed:n})}}l=t.getChildren()}else l=[t];a.handleNodes(l);let d=a.getSelectionRange();if(t.is("documentFragment")&&c.length){const e=d?he.iE.fromRange(d):null,t={};for(let e=c.length-1;e>=0;e--){const{name:s,element:o,collapsed:r}=c[e],n=!t[s];if(n&&(t[s]=[]),o){const e=i.createPositionAt(o,"before");t[s].push(e),i.remove(o)}else{const e=a.getAffectedRange();if(!e){r&&t[s].push(a.position);continue}r?t[s].push(e[r]):t[s].push(n?e.start:e.end)}}for(const[e,[s,o]]of Object.entries(t))s&&o&&s.root===o.root&&i.addMarker(e,{usingOperation:!0,affectsData:!0,range:new n.Z(s,o)});e&&(d=e.toRange(),e.detach())}d&&(r instanceof h.Z?i.setSelection(d):r.setTo(d));const u=a.getAffectedRange()||e.createRange(r.anchor);return a.destroy(),u}))}(this,e,t,s)}insertObject(e,t,s,o){return fe(this,e,t,s,o)}deleteContent(e,t){ie(this,e,t)}modifySelection(e,t){!function(e,t,s={}){const o=e.schema,i="backward"!=s.direction,r=s.unit?s.unit:"character",n=!!s.treatEmojiAsSingleUnit,a=t.focus,c=new me.Z({boundaries:_e(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),l={walker:c,schema:o,isForward:i,unit:r,treatEmojiAsSingleUnit:n};let d;for(;d=c.next();){if(d.done)return;const s=be(l,d.value);if(s)return void(t instanceof h.Z?e.change((e=>{e.setSelectionFocus(s)})):t.setFocus(s))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const s=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return s;const i=o.start.root,r=o.start.getCommonPath(o.end),n=i.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:e.createRange(e.createPositionAt(n,o.start.path[r.length]),e.createPositionAt(n,o.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),s):e.append(e.cloneElement(t,!0),s);if(a!=o){const t=o._getTransformedByMove(a.start,e.createPositionAt(s,0),c)[0],i=e.createRange(e.createPositionAt(s,0),t.start);de(e.createRange(t.end,e.createPositionAt(s,"end")),e),de(i,e)}return s}))}(this,e)}hasContent(e,t={}){const s=e instanceof n.Z?e:n.Z._createIn(e);if(s.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:i=!1}=t;if(!i)for(const e of this.markers.getMarkersIntersectingRange(s))if(e.affectsData)return!0;for(const e of s.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!o)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,s){return new r.ZP(e,t,s)}createPositionAt(e,t){return r.ZP._createAt(e,t)}createPositionAfter(e){return r.ZP._createAfter(e)}createPositionBefore(e){return r.ZP._createBefore(e)}createRange(e,t){return new n.Z(e,t)}createRangeIn(e){return n.Z._createIn(e)}createRangeOn(e){return n.Z._createOn(e)}createSelection(...e){return new E.Z(...e)}createBatch(e){return new i(e)}createOperationFromJSON(e){return S.Z.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new H(this,t);const s=this._pendingChanges[0].callback(this._currentWriter);e.push(s),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}},"./packages/ckeditor5-engine/src/model/node.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/tomap.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-utils/src/comparearrays.ts");s("./packages/ckeditor5-utils/src/version.ts");class a extends o.Z{constructor(e){super(),this.parent=null,this._attrs=(0,i.Z)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new r.ZP("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new r.ZP("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let s=e.includeSelf?this:this.parent;for(;s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}getCommonAncestor(e,t={}){const s=this.getAncestors(t),o=e.getAncestors(t);let i=0;for(;s[i]==o[i]&&s[i];)i++;return 0===i?null:s[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),s=e.getPath(),o=(0,n.Z)(t,s);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o](e[t[0]]=t[1],e)),{})),e}_clone(e){return new a(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,i.Z)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}a.prototype.is=function(e){return"node"===e||"model:node"===e}},"./packages/ckeditor5-engine/src/model/nodelist.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/node.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new i.ZP("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const s of this._nodes){if(e>=t&&e1e4)return e.slice(0,s).concat(t).concat(e.slice(s+o,e.length));{const i=Array.from(e);return i.splice(s,o,...t),i}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}},"./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),r=s("./packages/ckeditor5-engine/src/model/range.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./node_modules/lodash-es/_baseIsEqual.js");const c=function(e,t){return(0,a.Z)(e,t)};class l extends o.Z{constructor(e,t,s,o,i){super(i),this.range=e.clone(),this.key=t,this.oldValue=void 0===s?null:s,this.newValue=void 0===o?null:o}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new l(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new l(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new n.ZP("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!c(e.getAttribute(this.key),this.oldValue))throw new n.ZP("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new n.ZP("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){c(this.oldValue,this.newValue)||(0,i.pX)(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new l(r.Z.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/insertoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/nodelist.ts"),n=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),c=s("./packages/ckeditor5-engine/src/model/text.ts"),l=s("./packages/ckeditor5-engine/src/model/element.ts"),d=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class h extends o.Z{constructor(e,t,s){super(s),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new r.Z((0,a.So)(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const e=new r.Z([...this.nodes].map((e=>e._clone(!0)))),t=new h(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new i.ZP(e,[0]);return new n.Z(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),(0,a.fj)(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const s=[];for(const t of e.nodes)t.name?s.push(l.Z.fromJSON(t)):s.push(c.Z.fromJSON(t));const o=new h(i.ZP.fromJSON(e.position,t),s,e.baseVersion);return o.shouldReceiveAttributes=e.shouldReceiveAttributes,o}}},"./packages/ckeditor5-engine/src/model/operation/markeroperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/range.ts");class r extends o.Z{constructor(e,t,s,o,i,r){super(r),this.name=e,this.oldRange=t?t.clone():null,this.newRange=s?s.clone():null,this.affectsData=i,this._markers=o}get type(){return"marker"}clone(){return new r(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new r(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new r(e.name,e.oldRange?i.Z.fromJSON(e.oldRange,t):null,e.newRange?i.Z.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class l extends o.Z{constructor(e,t,s,o,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=s.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=o.clone()}get type(){return"merge"}get deletionPosition(){return new r.ZP(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new n.Z(this.sourcePosition,e)}clone(){return new l(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),s=new r.ZP(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new i.Z(e,this.howMany,s,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new c.ZP("merge-operation-source-position-invalid",this);if(!t.parent)throw new c.ZP("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new c.ZP("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent,t=n.Z._createIn(e);(0,a.XF)(t,this.targetPosition),(0,a.XF)(n.Z._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const s=r.ZP.fromJSON(e.sourcePosition,t),o=r.ZP.fromJSON(e.targetPosition,t),i=r.ZP.fromJSON(e.graveyardPosition,t);return new this(s,e.howMany,o,i,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/moveoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/range.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./packages/ckeditor5-utils/src/comparearrays.ts"),c=s("./packages/ckeditor5-engine/src/model/operation/utils.ts");class l extends o.Z{constructor(e,t,s,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=s.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new l(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new l(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,s=this.sourcePosition.offset,o=this.targetPosition.offset;if(s+this.howMany>e.maxOffset)throw new n.ZP("move-operation-nodes-do-not-exist",this);if(e===t&&s=s&&this.targetPosition.path[e]{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts");class i extends o.Z{get type(){return"noop"}clone(){return new i(this.baseVersion)}getReversed(){return new i(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}},"./packages/ckeditor5-engine/src/model/operation/operation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/operationfactory.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),n=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/nooperation.ts"),c=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),l=s("./packages/ckeditor5-engine/src/model/operation/renameoperation.ts"),d=s("./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts"),h=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),u=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts");const p={};p[o.Z.className]=o.Z,p[i.Z.className]=i.Z,p[r.Z.className]=r.Z,p[n.Z.className]=n.Z,p[a.Z.className]=a.Z,p[c.Z.className]=c.Z,p[l.Z.className]=l.Z,p[d.Z.className]=d.Z,p[h.Z.className]=h.Z,p[u.Z.className]=u.Z;class g{static fromJSON(e,t){return p[e.__className].fromJSON(e,t)}}},"./packages/ckeditor5-engine/src/model/operation/renameoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/element.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-engine/src/model/position.ts");class a extends o.Z{constructor(e,t,s,o){super(o),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=s}get type(){return"rename"}clone(){return new a(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new a(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof i.Z))throw new r.ZP("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new r.ZP("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new a(n.ZP.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e,t,s,o,i){super(i),this.root=e,this.key=t,this.oldValue=s,this.newValue=o}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new r(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new r(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new i.ZP("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new i.ZP("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new i.ZP("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new i.ZP("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new r(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/splitoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class l extends o.Z{constructor(e,t,s,o,i){super(i),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=s,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new r.ZP(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new n.Z(this.splitPosition,e)}clone(){return new l(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new r.ZP(e,[0]);return new i.Z(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{"use strict";s.d(t,{R:()=>_});var o=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/operation/renameoperation.ts"),n=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),c=s("./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts"),l=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts"),d=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),h=s("./packages/ckeditor5-engine/src/model/operation/nooperation.ts"),u=s("./packages/ckeditor5-engine/src/model/range.ts"),p=s("./packages/ckeditor5-engine/src/model/position.ts"),g=s("./packages/ckeditor5-utils/src/comparearrays.ts");const f=new Map;function m(e,t,s){let o=f.get(e);o||(o=new Map,f.set(e,o)),o.set(t,s)}function k(e){return[e]}function b(e,t,s={}){const o=function(e,t){const s=f.get(e);return s&&s.has(t)?s.get(t):k}(e.constructor,t.constructor);try{return o(e=e.clone(),t,s)}catch(e){throw e}}function _(e,t,s){e=e.slice(),t=t.slice();const o=new w(s.document,s.useRelations,s.forceWeakRemove);o.setOriginalOperations(e),o.setOriginalOperations(t);const i=o.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:i};const r=new WeakMap;for(const t of e)r.set(t,0);const n={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const o=e.range.getDifference(t.range).map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,0))),r=e.range.getIntersection(t.range);return r&&s.aIsStrong&&o.push(new i.Z(r,t.key,t.newValue,e.newValue,0)),0==o.length?[new h.Z(0)]:o}return[e]})),m(i.Z,o.Z,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const s=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const o=Z(t,e.key,e.oldValue);o&&s.unshift(o)}return s}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),m(i.Z,l.Z,((e,t)=>{const s=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&s.push(u.Z._createFromPositionAndShift(t.graveyardPosition,1));const o=e.range._getTransformedByMergeOperation(t);return o.isCollapsed||s.push(o),s.map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),m(i.Z,a.Z,((e,t)=>function(e,t){const s=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);let o=null,i=[];s.containsRange(e,!0)?o=e:e.start.hasSameParentAs(s.start)?(i=e.getDifference(s),o=e.getIntersection(s)):i=[e];const r=[];for(let e of i){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const s=t.getMovedRangeStart(),o=e.start.hasSameParentAs(s),i=e._getTransformedByInsertion(s,t.howMany,o);r.push(...i)}o&&r.push(o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return r}(e.range,t).map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),m(i.Z,d.Z,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const s=e.clone();return s.range=new u.Z(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,s]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),m(o.Z,i.Z,((e,t)=>{const s=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const o=Z(e,t.key,t.newValue);o&&s.push(o)}return s})),m(o.Z,o.Z,((e,t,s)=>(e.position.isEqual(t.position)&&s.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),m(o.Z,a.Z,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),m(o.Z,d.Z,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),m(o.Z,l.Z,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),m(n.Z,o.Z,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),m(n.Z,n.Z,((e,t,s)=>{if(e.name==t.name){if(!s.aIsStrong)return[new h.Z(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),m(n.Z,l.Z,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),m(n.Z,a.Z,((e,t,s)=>{if(e.oldRange&&(e.oldRange=u.Z._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(s.abRelation){const o=u.Z._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==s.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=o.end,e.newRange.start.path=s.abRelation.path,[e];if("right"==s.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=o.start,e.newRange.end.path=s.abRelation.path,[e]}e.newRange=u.Z._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),m(n.Z,d.Z,((e,t,s)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(s.abRelation){const o=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&s.abRelation.wasStartBeforeMergedElement?e.newRange.start=p.ZP._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!s.abRelation.wasInLeftElement&&(e.newRange.start=p.ZP._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&s.abRelation.wasInRightElement?e.newRange.end=p.ZP._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&s.abRelation.wasEndBeforeMergedElement?e.newRange.end=p.ZP._createAt(t.insertionPosition):e.newRange.end=o.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),m(l.Z,o.Z,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),m(l.Z,l.Z,((e,t,s)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(s.bWasUndone){const s=t.graveyardPosition.path.slice();return s.push(0),e.sourcePosition=new p.ZP(t.graveyardPosition.root,s),e.howMany=0,[e]}return[new h.Z(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!s.bWasUndone&&"splitAtSource"!=s.abRelation){const o="$graveyard"==e.targetPosition.root.rootName,i="$graveyard"==t.targetPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&s.aIsStrong){const s=t.targetPosition._getTransformedByMergeOperation(t),o=e.targetPosition._getTransformedByMergeOperation(t);return[new a.Z(s,e.howMany,o,0)]}return[new h.Z(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&s.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),m(l.Z,a.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!s.bWasUndone&&!s.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition)?[new h.Z(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),m(l.Z,d.Z,((e,t,s)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const o=0!=t.howMany,i=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(o||i||"mergeTargetNotMoved"==s.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==s.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==s.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),m(a.Z,o.Z,((e,t)=>{const s=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=s.start,e.howMany=s.end.offset-s.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),m(a.Z,a.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany),i=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,n=s.aIsStrong,a=!s.aIsStrong;if("insertBefore"==s.abRelation||"insertAfter"==s.baRelation?a=!0:"insertAfter"!=s.abRelation&&"insertBefore"!=s.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),P(e,t)&&P(t,e))return[t.getReversed()];if(o.containsPosition(t.targetPosition)&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),x([o],r);if(i.containsPosition(e.targetPosition)&&i.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),x([o],r);const c=(0,g.Z)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),x([o],r);"remove"!=e.type||"remove"==t.type||s.aWasUndone||s.forceWeakRemove?"remove"==e.type||"remove"!=t.type||s.bWasUndone||s.forceWeakRemove||(n=!1):n=!0;const l=[],d=o.getDifference(i);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const s="same"==(0,g.Z)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),o=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,s);l.push(...o)}const p=o.getIntersection(i);return null!==p&&n&&(p.start=p.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),p.end=p.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(p):1==l.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?l.unshift(p):l.push(p):l.splice(1,0,p)),0===l.length?[new h.Z(e.baseVersion)]:x(l,r)})),m(a.Z,d.Z,((e,t,s)=>{let o=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=s.abRelation||(o=e.targetPosition._getTransformedBySplitOperation(t));const i=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=o,[e];if(i.start.hasSameParentAs(t.splitPosition)&&i.containsPosition(t.splitPosition)){let e=new u.Z(t.splitPosition,i.end);e=e._getTransformedBySplitOperation(t);return x([new u.Z(i.start,t.splitPosition),e],o)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==s.abRelation&&(o=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==s.abRelation&&(o=e.targetPosition);const r=[i._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);e.howMany>1&&o&&!s.aWasUndone&&r.push(u.Z._createFromPositionAndShift(t.insertionPosition,1))}return x(r,o)})),m(a.Z,l.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition))if("remove"!=e.type||s.forceWeakRemove){if(1==e.howMany)return s.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new h.Z(0)]}else if(!s.aWasUndone){const s=[];let o=t.graveyardPosition.clone(),i=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(s.push(new a.Z(e.sourcePosition,e.howMany-1,e.targetPosition,0)),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),n=new a.Z(o,1,r,0),c=n.getMovedRangeStart().path.slice();c.push(0);const l=new p.ZP(n.targetPosition.root,c);i=i._getTransformedByMove(o,r,1);const d=new a.Z(i,t.howMany,l,0);return s.push(n),s.push(d),s}const i=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),m(r.Z,o.Z,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),m(r.Z,l.Z,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),m(r.Z,a.Z,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),m(r.Z,r.Z,((e,t,s)=>{if(e.position.isEqual(t.position)){if(!s.aIsStrong)return[new h.Z(0)];e.oldName=t.newName}return[e]})),m(r.Z,d.Z,((e,t)=>{const s=e.position.path,o=t.splitPosition.getParentPath();if("same"==(0,g.Z)(s,o)&&!t.graveyardPosition){const t=new r.Z(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),m(c.Z,c.Z,((e,t,s)=>{if(e.root===t.root&&e.key===t.key){if(!s.aIsStrong||e.newValue===t.newValue)return[new h.Z(0)];e.oldValue=t.newValue}return[e]})),m(d.Z,o.Z,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!s.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const s=t.graveyardPosition.path.slice();s.push(0);const o=new p.ZP(t.graveyardPosition.root,s),i=d.Z.getInsertionPosition(new p.ZP(t.graveyardPosition.root,s)),r=new d.Z(o,0,i,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=d.Z.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=d.Z.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),m(d.Z,a.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const i=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(!s.bWasUndone&&i){const s=e.splitPosition._getTransformedByMoveOperation(t),o=e.graveyardPosition._getTransformedByMoveOperation(t),i=o.path.slice();i.push(0);const r=new p.ZP(o.root,i);return[new a.Z(s,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const i=e.splitPosition.isEqual(t.targetPosition);if(i&&("insertAtSource"==s.baRelation||"splitBefore"==s.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=d.Z.getInsertionPosition(e.splitPosition),[e];if(i&&s.abRelation&&s.abRelation.howMany){const{howMany:t,offset:o}=s.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(o),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.splitPosition)){const s=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=s,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new h.Z(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new h.Z(0)];if("splitBefore"==s.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const o="$graveyard"==e.splitPosition.root.rootName,i="$graveyard"==t.splitPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&s.aIsStrong){const s=[];return t.howMany&&s.push(new a.Z(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&s.push(new a.Z(e.splitPosition,e.howMany,e.moveTargetPosition,0)),s}return[new h.Z(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==s.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==s.baRelation){const s=t.insertionPosition.path.slice();s.push(0);const o=new p.ZP(t.insertionPosition.root,s);return[e,new a.Z(e.insertionPosition,1,o,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{"use strict";s.d(t,{So:()=>p,X9:()=>d,XF:()=>h,fj:()=>l,pX:()=>u});var o=s("./packages/ckeditor5-engine/src/model/node.ts"),i=s("./packages/ckeditor5-engine/src/model/range.ts"),r=s("./packages/ckeditor5-engine/src/model/text.ts"),n=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),c=s("./packages/ckeditor5-utils/src/isiterable.ts");function l(e,t){const s=p(t),o=s.reduce(((e,t)=>e+t.offsetSize),0),r=e.parent;f(e);const n=e.index;return r._insertChild(n,s),g(r,n+s.length),g(r,n),new i.Z(e,e.getShiftedBy(o))}function d(e){if(!e.isFlat)throw new a.ZP("operation-utils-remove-range-not-flat",this);const t=e.start.parent;f(e.start),f(e.end);const s=t._removeChildren(e.start.index,e.end.index-e.start.index);return g(t,e.start.index),s}function h(e,t){if(!e.isFlat)throw new a.ZP("operation-utils-move-range-not-flat",this);const s=d(e);return l(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),s)}function u(e,t,s){f(e.start),f(e.end);for(const o of e.getItems({shallow:!0})){const e=o.is("$textProxy")?o.textNode:o;null!==s?e._setAttribute(t,s):e._removeAttribute(t),g(e.parent,e.index)}g(e.end.parent,e.end.index)}function p(e){const t=[];!function e(s){if("string"==typeof s)t.push(new r.Z(s));else if(s instanceof n.Z)t.push(new r.Z(s.data,s.getAttributes()));else if(s instanceof o.Z)t.push(s);else if((0,c.Z)(s))for(const t of s)e(t)}(e);for(let e=1;e{"use strict";s.d(t,{Rt:()=>c,Ux:()=>l,YV:()=>d,ZP:()=>a});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),r=s("./packages/ckeditor5-utils/src/comparearrays.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");s("./packages/ckeditor5-utils/src/version.ts");class a extends o.Z{constructor(e,t,s="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new n.ZP("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new n.ZP("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=s}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return h(e,this,s);if(-1===t)return h(this,e,s)}return this.path.length===e.path.length||(this.path.length>e.path.length?u(this.path,t):u(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),s=e.getParentPath();return"same"==(0,r.Z)(t,s)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=a._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let s;return t.containsPosition(this)||t.start.isEqual(this)?(s=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(s=s._getTransformedByDeletion(e.deletionPosition,1))):s=this.isEqual(e.deletionPosition)?a._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),s}_getTransformedByDeletion(e,t){const s=a._createAt(this);if(this.root!=e.root)return s;if("same"==(0,r.Z)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;s.offset-=t}}else if("prefix"==(0,r.Z)(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;s.path[o]-=t}}return s}_getTransformedByInsertion(e,t){const s=a._createAt(this);if(this.root!=e.root)return s;if("same"==(0,r.Z)(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[o]+i!==s.maxOffset)return!1;i=1,o--,s=s.parent}return!0}(e,s+1))}function u(e,t){for(;t{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./packages/ckeditor5-utils/src/comparearrays.ts");class c extends o.Z{constructor(e,t){super(),this.start=i.ZP._createAt(e),this.end=t?i.ZP._createAt(t):i.ZP._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new r.Z({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const e=this.start.getParentPath(),t=this.end.getParentPath();return"same"==(0,a.Z)(e,t)}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const s=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return s&&o}containsItem(e){const t=i.ZP._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new c(this.start,e.start)),this.containsPosition(e.end)&&t.push(new c(e.end,this.end))):t.push(new c(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,s=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(s=e.end),new c(t,s)}return null}getJoined(e,t=!1){let s=this.isIntersecting(e);if(s||(s=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!s)return null;let o=this.start,i=this.end;return e.start.isBefore(o)&&(o=e.start),e.end.isAfter(i)&&(i=e.end),new c(o,i)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,s=i.ZP._createAt(this.start);let o=s.parent;for(;s.path.length>t+1;){const t=o.maxOffset-s.offset;0!==t&&e.push(new c(s,s.getShiftedBy(t))),s.path=s.path.slice(0,-1),s.offset++,o=o.parent}for(;s.path.length<=this.end.path.length;){const t=this.end.path[s.path.length-1],o=t-s.offset;0!==o&&e.push(new c(s,s.getShiftedBy(o))),s.offset=t,s.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new r.Z(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new r.Z(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new r.Z(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new c(this.start,this.end)]}getTransformedByOperations(e){const t=[new c(this.start,this.end)];for(const s of e)for(let e=0;e0?new this(s,o):new this(o,s)}static _createIn(e){return new this(i.ZP._createAt(e,0),i.ZP._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(i.ZP._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new n.ZP("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const s=e.indexOf(t),o=new this(t.start,t.end);if(s>0)for(let t=s-1;e[t].end.isEqual(o.start);t++)o.start=i.ZP._createAt(e[t].start);for(let t=s+1;t{"use strict";s.d(t,{G:()=>h,Z:()=>d});var o=s("./packages/ckeditor5-engine/src/model/element.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/range.ts"),n=s("./packages/ckeditor5-engine/src/model/text.ts"),a=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),l=s("./packages/ckeditor5-utils/src/observablemixin.ts");class d extends l.y{constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new h(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new h(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new c.ZP("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new c.ZP("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const s=this.getDefinition(e.last);return!!s&&s.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof i.ZP){const t=e.nodeBefore,s=e.nodeAfter;if(!(t instanceof o.Z))throw new c.ZP("schema-check-merge-no-element-before",this);if(!(s instanceof o.Z))throw new c.ZP("schema-check-merge-no-element-after",this);return this.checkMerge(t,s)}for(const s of t.getChildren())if(!this.checkChild(e,s))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[s,o])=>{if(!o)return;const i=e(s,o);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[s,o])=>{const i=e(s,o);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof i.ZP)t=e.parent;else{t=(e instanceof r.Z?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const s=t.getCommonAncestor();return e?e.getCommonAncestor(s,{includeSelf:!0}):s}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const s=[...e.getFirstPosition().getAncestors(),new n.Z("",e.getAttributes())];return this.checkAttribute(s,t)}{const s=e.getRanges();for(const e of s)for(const s of e)if(this.checkAttribute(s.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const s of e)yield*this._getValidRangesForRange(s,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new r.Z(e);let s,o;const i=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(s=new a.Z({boundaries:r.Z._createIn(i),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(o=new a.Z({boundaries:r.Z._createIn(i),startPosition:e}));for(const e of function*(e,t){let s=!1;for(;!s;){if(s=!0,e){const t=e.next();t.done||(s=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(s=!1,yield{walker:t,value:e.value})}}}(s,o)){const t=e.walker==s?"elementEnd":"elementStart",o=e.value;if(o.type==t&&this.isObject(o.item))return r.Z._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new r.Z(o.nextPosition)}return null}findAllowedParent(e,t){let s=e.parent;for(;s;){if(this.checkChild(s,t))return s;if(this.isLimit(s))return null;s=s.parent}return null}setAllowedAttributes(e,t,s){const o=s.model;for(const[i,r]of Object.entries(t))o.schema.checkAttribute(e,i)&&s.setAttribute(i,r,e)}removeDisallowedAttributes(e,t){for(const s of e)if(s.is("$text"))P(this,s,t);else{const e=r.Z._createIn(s).getPositions();for(const s of e){P(this,s.nodeBefore||s.parent,t)}}}getAttributesWithProperty(e,t,s){const o={};for(const[i,r]of e.getAttributes()){const e=this.getAttributeProperties(i);void 0!==e[t]&&(void 0!==s&&s!==e[t]||(o[i]=r))}return o}createContext(e){return new h(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,s=Object.keys(t);for(const o of s)e[o]=u(t[o],o);for(const t of s)p(e,t);for(const t of s)g(e,t);for(const t of s)f(e,t);for(const t of s)m(e,t),k(e,t);for(const t of s)b(e,t),_(e,t),w(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,s=t.length-1){const o=t.getItem(s);if(e.allowIn.includes(o.name)){if(0==s)return!0;{const e=this.getDefinition(o);return this._checkContextMatch(e,t,s-1)}}return!1}*_getValidRangesForRange(e,t){let s=e.start,o=e.start;for(const n of e.getItems({shallow:!0}))n.is("element")&&(yield*this._getValidRangesForRange(r.Z._createIn(n),t)),this.checkAttribute(n,t)||(s.isEqual(o)||(yield new r.Z(s,o)),s=i.ZP._createAfter(n)),o=i.ZP._createAfter(n);s.isEqual(o)||(yield new r.Z(s,o))}}class h{constructor(e){if(e instanceof h)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Z)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new h([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function u(e,t){const s={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const s of e){const e=Object.keys(s).filter((e=>e.startsWith("is")));for(const o of e)t[o]=!!s[o]}}(e,s),v(e,s,"allowIn"),v(e,s,"allowContentOf"),v(e,s,"allowWhere"),v(e,s,"allowAttributes"),v(e,s,"allowAttributesOf"),v(e,s,"allowChildren"),v(e,s,"inheritTypesFrom"),function(e,t){for(const s of e){const e=s.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,s),s}function p(e,t){const s=e[t];for(const o of s.allowChildren){const s=e[o];s&&s.allowIn.push(t)}s.allowChildren.length=0}function g(e,t){for(const s of e[t].allowContentOf)if(e[s]){y(e,s).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function f(e,t){for(const s of e[t].allowWhere){const o=e[s];if(o){const s=o.allowIn;e[t].allowIn.push(...s)}}delete e[t].allowWhere}function m(e,t){for(const s of e[t].allowAttributesOf){const o=e[s];if(o){const s=o.allowAttributes;e[t].allowAttributes.push(...s)}}delete e[t].allowAttributesOf}function k(e,t){const s=e[t];for(const t of s.inheritTypesFrom){const o=e[t];if(o){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const t of e)t in s||(s[t]=o[t])}}delete s.inheritTypesFrom}function b(e,t){const s=e[t],o=s.allowIn.filter((t=>e[t]));s.allowIn=Array.from(new Set(o))}function _(e,t){const s=e[t];for(const o of s.allowIn){e[o].allowChildren.push(t)}}function w(e,t){const s=e[t];s.allowAttributes=Array.from(new Set(s.allowAttributes))}function v(e,t,s){for(const o of e){const e=o[s];"string"==typeof e?t[s].push(e):Array.isArray(e)&&t[s].push(...e)}}function y(e,t){const s=e[t];return(o=e,Object.keys(o).map((e=>o[e]))).filter((e=>e.allowIn.includes(s.name)));var o}function Z(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function P(e,t,s){for(const o of t.getAttributeKeys())e.checkAttribute(t,o)||s.removeAttribute(o,t)}},"./packages/ckeditor5-engine/src/model/selection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/node.ts"),r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),c=s("./packages/ckeditor5-utils/src/emittermixin.ts"),l=s("./packages/ckeditor5-utils/src/isiterable.ts");class d extends((0,c.ZP)(o.Z)){constructor(...e){super(),this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let s=!1;for(const o of e._ranges)if(t.isEqual(o)){s=!0;break}if(!s)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new n.Z(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new n.Z(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new n.Z(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,s,o]=e;if("object"==typeof s&&(o=s,s=void 0),null===t)this._setRanges([]);else if(t instanceof d)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof n.Z)this._setRanges([t],!!o&&!!o.backward);else if(t instanceof r.ZP)this._setRanges([new n.Z(t)]);else if(t instanceof i.Z){const e=!!o&&!!o.backward;let i;if("in"==s)i=n.Z._createIn(t);else if("on"==s)i=n.Z._createOn(t);else{if(void 0===s)throw new a.ZP("model-selection-setto-required-second-parameter",[this,t]);i=new n.Z(r.ZP._createAt(t,s))}this._setRanges([i],e)}else{if(!(0,l.Z)(t))throw new a.ZP("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,o&&!!o.backward)}}_setRanges(e,t=!1){const s=Array.from(e),o=s.some((t=>{if(!(t instanceof n.Z))throw new a.ZP("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(s.length!==this._ranges.length||o)&&(this._replaceAllRanges(s),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new a.ZP("model-selection-setfocus-no-ranges",[this,e]);const s=r.ZP._createAt(e,t);if("same"==s.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==s.compareWith(o)?(this._pushRange(new n.Z(s,o)),this._lastRangeBackward=!0):(this._pushRange(new n.Z(o,s)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const s=p(t.start,e);s&&g(s,t)&&(yield s);for(const s of t.getWalker()){const o=s.item;"elementEnd"==s.type&&u(o,e,t)&&(yield o)}const o=p(t.end,e);o&&!t.end.isTouching(r.ZP._createAt(o,0))&&g(o,t)&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=r.ZP._createAt(e,0),s=r.ZP._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&s.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new n.Z(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function h(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&e.parent)}function u(e,t,s){return h(e,t)&&g(e,s)}function p(e,t){const s=e.parent.root.document.model.schema,o=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=o.find((e=>!i&&(i=s.isLimit(e),!i&&h(e,t))));return o.forEach((e=>t.add(e))),r}function g(e,t){const s=function(e){const t=e.root.document.model.schema;let s=e.parent;for(;s;){if(t.isBlock(s))return s;s=s.parent}}(e);if(!s)return!0;return!t.containsRange(n.Z._createOn(s),!0)}d.prototype.is=function(e){return"selection"===e||"model:selection"===e}},"./packages/ckeditor5-engine/src/model/text.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/model/node.ts");class i extends o.Z{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new i(this.data,this.getAttributes())}static fromJSON(e){return new i(e.data,e.attributes)}}i.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}},"./packages/ckeditor5-engine/src/model/textproxy.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e,t,s){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new i.ZP("model-textproxy-wrong-offsetintext",this);if(s<0||t+s>e.offsetSize)throw new i.ZP("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+s),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let s=e.includeSelf?this:this.parent;for(;s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}r.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}},"./packages/ckeditor5-engine/src/model/treewalker.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/model/element.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/text.ts"),n=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class c{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new a.ZP("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new a.ZP("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=i.ZP._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,s,o,i;do{o=this.position,i=this._visitedParent,({done:t,value:s}=this.next())}while(!t&&e(s));t||(this.position=o,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),s=this._visitedParent;if(null===s.parent&&t.offset===s.maxOffset)return{done:!0,value:void 0};if(s===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const a=(0,i.Rt)(t,s),c=a||(0,i.Ux)(t,s,a);if(c instanceof o.Z)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=c),this.position=t,l("elementStart",c,e,t,1);if(c instanceof r.Z){let o;if(this.singleCharacters)o=1;else{let e=c.endOffset;this._boundaryEndParent==s&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),o=t.offset-e}const i=t.offset-d.startOffset,r=new n.Z(d,i-o,o);return t.offset-=o,this.position=t,l("text",r,e,t,o)}return t.path.pop(),this.position=t,this._visitedParent=s.parent,l("elementStart",s,e,t,1)}}function l(e,t,s,o,i){return{done:!1,value:{type:e,item:t,previousPosition:s,nextPosition:o,length:i}}}},"./packages/ckeditor5-engine/src/model/typecheckable.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{is(){throw new Error("is() method is abstract")}}},"./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts":(e,t,s)=>{"use strict";function o(e){const{schema:t,document:s}=e.model;for(const o of s.getRootNames()){const i=s.getRoot(o);if(i.isEmpty&&!t.checkChild(i,"$text")&&t.checkChild(i,"paragraph"))return e.insertElement("paragraph",i),!0}return!1}function i(e,t,s){const o=s.createContext(e);return!!s.checkChild(o,"paragraph")&&!!s.checkChild(o.push("paragraph"),t)}function r(e,t){const s=t.createElement("paragraph");return t.insert(s,e),t.createPositionAt(s,0)}s.d(t,{_m:()=>o,gg:()=>i,zX:()=>r})},"./packages/ckeditor5-engine/src/model/utils/findoptimalinsertionrange.ts":(e,t,s)=>{"use strict";s.d(t,{K:()=>i});var o=s("./packages/ckeditor5-utils/src/first.ts");function i(e,t,s="auto"){const i=e.getSelectedElement();if(i&&t.schema.isObject(i)&&!t.schema.isInline(i))return"before"==s||"after"==s?t.createRange(t.createPositionAt(i,s)):t.createRangeOn(i);const r=(0,o.Z)(e.getSelectedBlocks());if(!r)return t.createRange(e.focus);if(r.isEmpty)return t.createRange(t.createPositionAt(r,0));const n=t.createPositionAfter(r);return e.focus.isTouching(n)?t.createRange(n):t.createRange(t.createPositionBefore(r))}},"./packages/ckeditor5-engine/src/view/attributeelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(...e){super(...e),this.getFillerOffset=n,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new i.ZP("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function n(){if(a(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(a(e)>1)return null;e=e.parent}return!e||a(e)>1?null:this.childCount}function a(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}r.DEFAULT_PRIORITY=10,r.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/containerelement.ts":(e,t,s)=>{"use strict";s.d(t,{Y:()=>r,Z:()=>i});var o=s("./packages/ckeditor5-engine/src/view/element.ts");class i extends o.Z{constructor(...e){super(...e),this.getFillerOffset=r}}function r(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}i.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/document.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>k});var o=s("./packages/ckeditor5-engine/src/view/documentselection.ts"),i=s("./packages/ckeditor5-utils/src/collection.ts"),r=s("./packages/ckeditor5-utils/src/eventinfo.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./packages/ckeditor5-utils/src/emittermixin.ts"),c=s("./packages/ckeditor5-utils/src/toarray.ts"),l=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts");const d=Symbol("bubbling contexts");function h(e){return class extends e{fire(e,...t){try{const s=e instanceof r.Z?e:new r.Z(this,e),o=f(this);if(!o.size)return;if(u(s,"capturing",this),p(o,"$capture",s,...t))return s.return;const i=s.startRange||this.selection.getFirstRange(),n=i?i.getContainedElement():null,a=!!n&&Boolean(g(o,n));let c=n||function(e){if(!e)return null;const t=e.start.parent,s=e.end.parent,o=t.getPath(),i=s.getPath();return o.length>i.length?t:s}(i);if(u(s,"atTarget",c),!a){if(p(o,"$text",s,...t))return s.return;u(s,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(p(o,"$root",s,...t))return s.return}else if(c.is("element")&&p(o,c.name,s,...t))return s.return;if(p(o,c,s,...t))return s.return;c=c.parent,u(s,"bubbling",c)}return u(s,"bubbling",this),p(o,"$document",s,...t),s.return}catch(e){n.ZP.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,s){const o=(0,c.Z)(s.context||"$document"),i=f(this);for(const r of o){let o=i.get(r);o||(o=new a.Q5,i.set(r,o)),this.listenTo(o,e,t,s)}}_removeEventListener(e,t){const s=f(this);for(const o of s.values())this.stopListening(o,e,t)}}}{const e=h(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{h[t]=e.prototype[t]}))}function u(e,t,s){e instanceof l.Z&&(e._eventPhase=t,e._currentTarget=s)}function p(e,t,s,...o){const i="string"==typeof t?e.get(t):g(e,t);return!!i&&(i.fire(s,...o),s.stop.called)}function g(e,t){for(const[s,o]of e)if("function"==typeof s&&s(t))return o;return null}function f(e){return e[d]||(e[d]=new Map),e[d]}var m=s("./packages/ckeditor5-utils/src/observablemixin.ts");class k extends(h(m.y)){constructor(e){super(),this.selection=new o.Z,this.roots=new i.Z({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const s of this._postFixers)if(t=s(e),t)break}while(t)}}},"./packages/ckeditor5-engine/src/view/documentfragment.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/text.ts"),r=s("./packages/ckeditor5-engine/src/view/textproxy.ts"),n=s("./packages/ckeditor5-utils/src/isiterable.ts"),a=s("./packages/ckeditor5-utils/src/emittermixin.ts");class c extends((0,a.ZP)(o.Z)){constructor(e,t){super(),this.document=e,this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let s=0;const o=function(e,t){if("string"==typeof t)return[new i.Z(e,t)];(0,n.Z)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new i.Z(e,t):t instanceof r.Z?new i.Z(e,t.data):t))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,s++;return s}_removeChildren(e,t=1){this._fireChange("children",this);for(let s=e;s{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/selection.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts");class n extends((0,r.ZP)(o.Z)){constructor(...e){super(),this._selection=new i.Z,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}n.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}},"./packages/ckeditor5-engine/src/view/domconverter.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>P});var o=s("./packages/ckeditor5-engine/src/view/text.ts"),i=s("./packages/ckeditor5-engine/src/view/element.ts"),r=s("./packages/ckeditor5-engine/src/view/uielement.ts"),n=s("./packages/ckeditor5-engine/src/view/position.ts"),a=s("./packages/ckeditor5-engine/src/view/range.ts"),c=s("./packages/ckeditor5-engine/src/view/selection.ts"),l=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),d=s("./packages/ckeditor5-engine/src/view/treewalker.ts"),h=s("./packages/ckeditor5-engine/src/view/matcher.ts"),u=s("./packages/ckeditor5-engine/src/view/filler.ts"),p=s("./packages/ckeditor5-utils/src/dom/global.ts"),g=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");function f(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function m(e){const t=[];let s=e;for(;s&&s.nodeType!=Node.DOCUMENT_NODE;)t.unshift(s),s=s.parentNode;return t}var k=s("./packages/ckeditor5-utils/src/dom/istext.ts"),b=s("./packages/ckeditor5-utils/src/dom/iscomment.ts");const _=(0,u.yl)(p.Z.document),w=(0,u.N3)(p.Z.document),v=(0,u.PQ)(p.Z.document),y="data-ck-unsafe-attribute-",Z="data-ck-unsafe-element";class P{constructor(e,t={}){this.document=e,this.renderingMode=t.renderingMode||"editing",this.blockFillerMode=t.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?p.Z.document:p.Z.document.implementation.createHTMLDocument(""),this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new h.Z,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new c.Z(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,s){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===s&&("src"===e||"srcset"===e)||("source"===s&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const s=(new DOMParser).parseFromString(t,"text/html"),o=s.createDocumentFragment(),i=s.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);const r=s.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),n=[];let a;for(;a=r.nextNode();)n.push(a);for(const e of n){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(A(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(o)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let s;if(e.is("documentFragment"))s=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(s,e);else{if(e.is("uiElement"))return s="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(s,e),s;this._shouldRenameElement(e.name)?(A(e.name),s=this._createReplacementDomElement(e.name)):s=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(s,this),t.bind&&this.bindElements(s,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(s,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const o of this.viewChildrenToDom(e,t))s.appendChild(o);return s}}setDomElementAttribute(e,t,s,o){const i=this.shouldRenderAttribute(t,s,e.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(t);i||(0,g.KE)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:s}),e.hasAttribute(t)&&!i?e.removeAttribute(t):e.hasAttribute(y+t)&&i&&e.removeAttribute(y+t),e.setAttribute(i?t:y+t,s)}removeDomElementAttribute(e,t){t!=Z&&(e.removeAttribute(t),e.removeAttribute(y+t))}*viewChildrenToDom(e,t={}){const s=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const i of e.getChildren()){s===o&&(yield this._getBlockFiller());const e=i.is("element")&&i.getCustomProperty("dataPipeline:transparentRendering");e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,t):(e&&(0,g.KE)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,t)),o++}s===o&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),s=this.viewPositionToDom(e.end),o=this._domDocument.createRange();return o.setStart(t.parent,t.offset),o.setEnd(s.parent,s.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const s=this.findCorrespondingDomText(t);if(!s)return null;let o=e.offset;return(0,u.Sw)(s)&&(o+=u.b_),{parent:s,offset:o}}{let s,o,i;if(0===e.offset){if(s=this.mapViewToDom(t),!s)return null;i=s.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!o)return null;s=o.parentNode,i=o.nextSibling}if((0,k.Z)(i)&&(0,u.Sw)(i))return{parent:i,offset:u.b_};return{parent:s,offset:o?f(o)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const s=this.getHostViewElement(e);if(s)return s;if((0,b.Z)(e)&&t.skipComments)return null;if((0,k.Z)(e)){if((0,u.Qh)(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new o.Z(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let s;if(this.isDocumentFragment(e))s=new l.Z(this.document),t.bind&&this.bindDocumentFragments(e,s);else{s=this._createViewElement(e,t),t.bind&&this.bindElements(e,s);const o=e.attributes;if(o)for(let e=o.length,t=0;t{const{scrollLeft:t,scrollTop:s}=e;o.push([t,s])})),t.focus(),x(t,(e=>{const[t,s]=o.shift();e.scrollLeft=t,e.scrollTop=s})),p.Z.window.scrollTo(e,s)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(_):!("BR"!==e.tagName||!T(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(v)||function(e,t){return e.isEqualNode(w)&&T(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const s=t.collapsed;return t.detach(),s}getHostViewElement(e){const t=m(e);for(t.pop();t.length;){const e=t.pop(),s=this._domToViewMapping.get(e);if(s&&(s.is("uiElement")||s.is("rawElement")))return s}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return(0,u.N3)(this._domDocument);case"markedNbsp":return(0,u.PQ)(this._domDocument);case"br":return(0,u.yl)(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,k.Z)(e)&&(0,u.Sw)(e)&&tthis.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const s=this._getTouchingInlineViewNode(e,!1);!(s&&s.is("$textProxy")&&this._nodeEndsWithSpace(s))&&s||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const s=this._getTouchingInlineViewNode(e,!0),o=s&&s.is("$textProxy")&&" "==s.data.charAt(0);" "!=t.charAt(t.length-2)&&s&&!o||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){return m(e).some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return(0,u.th)(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const s=this._getTouchingInlineDomNode(e,!1),o=this._getTouchingInlineDomNode(e,!0),i=this._checkShouldLeftTrimDomText(e,s),r=this._checkShouldRightTrimDomText(e,o);i&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=(0,u.th)(new Text(t)),t=t.replace(/ \u00A0/g," ");const n=o&&this.isElement(o)&&"BR"!=o.tagName,a=o&&(0,k.Z)(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!o||n||a)&&(t=t.replace(/\u00A0$/," ")),(i||s&&this.isElement(s)&&"BR"!=s.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!(0,u.Sw)(e)}_getTouchingInlineViewNode(e,t){const s=new d.Z({startPosition:t?n.Z._createAfter(e):n.Z._createBefore(e),direction:t?"forward":"backward"});for(const e of s){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const s=t?"firstChild":"lastChild",o=t?"nextSibling":"previousSibling";let i=!0,r=e;do{if(!i&&r[s]?r=r[s]:r[o]?(r=r[o],i=!1):(r=r.parentNode,i=!0),!r||this._isBlockElement(r))return null}while(!(0,k.Z)(r)&&"BR"!=r.tagName&&!this._isInlineObjectElement(r));return r}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if((0,b.Z)(e))return new r.Z(this.document,"$comment");const s=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new i.Z(this.document,s)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const s=this._domDocument.createElement("span");if(s.setAttribute(Z,e),t){for(;t.firstChild;)s.appendChild(t.firstChild);for(const e of t.getAttributeNames())s.setAttribute(e,t.getAttribute(e))}return s}}function x(e,t){let s=e;for(;s;)t(s),s=s.parentElement}function T(e,t){const s=e.parentNode;return!!s&&!!s.tagName&&t.includes(s.tagName.toLowerCase())}function A(e){"script"===e&&(0,g.KE)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,g.KE)("domconverter-unsafe-style-element-detected")}},"./packages/ckeditor5-engine/src/view/downcastwriter.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>k});var o=s("./packages/ckeditor5-engine/src/view/position.ts"),i=s("./packages/ckeditor5-engine/src/view/range.ts"),r=s("./packages/ckeditor5-engine/src/view/selection.ts"),n=s("./packages/ckeditor5-engine/src/view/containerelement.ts"),a=s("./packages/ckeditor5-engine/src/view/attributeelement.ts"),c=s("./packages/ckeditor5-engine/src/view/emptyelement.ts"),l=s("./packages/ckeditor5-engine/src/view/uielement.ts"),d=s("./packages/ckeditor5-engine/src/view/rawelement.ts"),h=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),u=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),p=s("./packages/ckeditor5-utils/src/isiterable.ts"),g=s("./packages/ckeditor5-engine/src/view/text.ts"),f=s("./packages/ckeditor5-engine/src/view/editableelement.ts"),m=s("./node_modules/lodash-es/isPlainObject.js");class k{constructor(e){this.document=e,this._cloneGroups=new Map,this._slotFactory=null}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(...e){this.document.selection._setFocus(...e)}createDocumentFragment(e){return new u.Z(this.document,e)}createText(e){return new g.Z(this.document,e)}createAttributeElement(e,t,s={}){const o=new a.Z(this.document,e,t);return"number"==typeof s.priority&&(o._priority=s.priority),s.id&&(o._id=s.id),s.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...s.renderUnsafeAttributes),o}createContainerElement(e,t,s={},o={}){let i=null;(0,m.Z)(s)?o=s:i=s;const r=new n.Z(this.document,e,t,i);return o.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),r}createEditableElement(e,t,s={}){const o=new f.Z(this.document,e,t);return s.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...s.renderUnsafeAttributes),o}createEmptyElement(e,t,s={}){const o=new c.Z(this.document,e,t);return s.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...s.renderUnsafeAttributes),o}createUIElement(e,t,s){const o=new l.Z(this.document,e,t);return s&&(o.render=s),o}createRawElement(e,t,s,o={}){const i=new d.Z(this.document,e,t);return s&&(i.render=s),o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}setAttribute(e,t,s){s._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,s){(0,m.Z)(e)&&void 0===s?t._setStyle(e):s._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,s){s._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof o.Z?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new h.ZP("view-writer-break-non-container-element",this.document);if(!t.parent)throw new h.ZP("view-writer-break-root",this.document);if(e.isAtStart)return o.Z._createBefore(t);if(!e.isAtEnd){const s=t._clone(!1);this.insert(o.Z._createAfter(t),s);const r=new i.Z(e,o.Z._createAt(t,"end")),n=new o.Z(s,0);this.move(r,n)}return o.Z._createAfter(t)}mergeAttributes(e){const t=e.offset,s=e.parent;if(s.is("$text"))return e;if(s.is("attributeElement")&&0===s.childCount){const e=s.parent,t=s.index;return s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new o.Z(e,t))}const i=s.getChild(t-1),r=s.getChild(t);if(!i||!r)return e;if(i.is("$text")&&r.is("$text"))return y(i,r);if(i.is("attributeElement")&&r.is("attributeElement")&&i.isSimilar(r)){const e=i.childCount;return i._appendChild(r.getChildren()),r._remove(),this._removeFromClonedElementsGroup(r),this.mergeAttributes(new o.Z(i,e))}return e}mergeContainers(e){const t=e.nodeBefore,s=e.nodeAfter;if(!(t&&s&&t.is("containerElement")&&s.is("containerElement")))throw new h.ZP("view-writer-merge-containers-invalid-position",this.document);const r=t.getChild(t.childCount-1),n=r instanceof g.Z?o.Z._createAt(r,"end"):o.Z._createAt(t,"end");return this.move(i.Z._createIn(s),o.Z._createAt(t,"end")),this.remove(i.Z._createOn(s)),n}insert(e,t){P(t=(0,p.Z)(t)?[...t]:[t],this.document);const s=t.reduce(((e,t)=>{const s=e[e.length-1],o=!t.is("uiElement");return s&&s.breakAttributes==o?s.nodes.push(t):e.push({breakAttributes:o,nodes:[t]}),e}),[]);let o=null,r=e;for(const{nodes:e,breakAttributes:t}of s){const s=this._insertNodes(r,e,t);o||(o=s.start),r=s.end}return o?new i.Z(o,r):new i.Z(e)}remove(e){const t=e instanceof i.Z?e:i.Z._createOn(e);if(T(t,this.document),t.isCollapsed)return new u.Z(this.document);const{start:s,end:o}=this._breakAttributesRange(t,!0),r=s.parent,n=o.offset-s.offset,a=r._removeChildren(s.offset,n);for(const e of a)this._removeFromClonedElementsGroup(e);const c=this.mergeAttributes(s);return t.start=c,t.end=c.clone(),new u.Z(this.document,a)}clear(e,t){T(e,this.document);const s=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of s){const s=o.item;let r;if(s.is("element")&&t.isSimilar(s))r=i.Z._createOn(s);else if(!o.nextPosition.isAfter(e.start)&&s.is("$textProxy")){const e=s.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(r=i.Z._createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let s;if(t.isAfter(e.end)){const o=(t=this._breakAttributes(t,!0)).parent,i=o.childCount;e=this._breakAttributesRange(e,!0),s=this.remove(e),t.offset+=o.childCount-i}else s=this.remove(e);return this.insert(t,s)}wrap(e,t){if(!(t instanceof a.Z))throw new h.ZP("view-writer-wrap-invalid-attribute",this.document);if(T(e,this.document),e.isCollapsed){let o=e.start;o.parent.is("element")&&(s=o.parent,!Array.from(s.getChildren()).some((e=>!e.is("uiElement"))))&&(o=o.getLastMatchingPosition((e=>e.item.is("uiElement")))),o=this._wrapPosition(o,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(o),new i.Z(o)}return this._wrapRange(e,t);var s}unwrap(e,t){if(!(t instanceof a.Z))throw new h.ZP("view-writer-unwrap-invalid-attribute",this.document);if(T(e,this.document),e.isCollapsed)return e;const{start:s,end:o}=this._breakAttributesRange(e,!0),r=s.parent,n=this._unwrapChildren(r,s.offset,o.offset,t),c=this.mergeAttributes(n.start);c.isEqual(n.start)||n.end.offset--;const l=this.mergeAttributes(n.end);return new i.Z(c,l)}rename(e,t){const s=new n.Z(this.document,e,t.getAttributes());return this.insert(o.Z._createAfter(t),s),this.move(i.Z._createIn(t),o.Z._createAt(s,0)),this.remove(i.Z._createOn(t)),s}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return o.Z._createAt(e,t)}createPositionAfter(e){return o.Z._createAfter(e)}createPositionBefore(e){return o.Z._createBefore(e)}createRange(...e){return new i.Z(...e)}createRangeOn(e){return i.Z._createOn(e)}createRangeIn(e){return i.Z._createIn(e)}createSelection(...e){return new r.Z(...e)}createSlot(e){if(!this._slotFactory)throw new h.ZP("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,s){let o,r;if(o=s?b(e):e.parent.is("$text")?e.parent.parent:e.parent,!o)throw new h.ZP("view-writer-invalid-position-container",this.document);r=s?this._breakAttributes(e,!0):e.parent.is("$text")?v(e):e;const n=o._insertChild(r.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const a=r.getShiftedBy(n),c=this.mergeAttributes(r);c.isEqual(r)||a.offset--;const l=this.mergeAttributes(a);return new i.Z(c,l)}_wrapChildren(e,t,s,r){let n=t;const a=[];for(;n!1,e.parent._insertChild(e.offset,s);const r=new i.Z(e,e.getShiftedBy(1));this.wrap(r,t);const n=new o.Z(s.parent,s.index);s._remove();const a=n.nodeBefore,c=n.nodeAfter;return a instanceof g.Z&&c instanceof g.Z?y(a,c):w(n)}_wrapAttributeElement(e,t){if(!A(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const s of e.getAttributeKeys())if("class"!==s&&"style"!==s&&t.hasAttribute(s)&&t.getAttribute(s)!==e.getAttribute(s))return!1;for(const s of e.getStyleNames())if(t.hasStyle(s)&&t.getStyle(s)!==e.getStyle(s))return!1;for(const s of e.getAttributeKeys())"class"!==s&&"style"!==s&&(t.hasAttribute(s)||this.setAttribute(s,e.getAttribute(s),t));for(const s of e.getStyleNames())t.hasStyle(s)||this.setStyle(s,e.getStyle(s),t);for(const s of e.getClassNames())t.hasClass(s)||this.addClass(s,t);return!0}_unwrapAttributeElement(e,t){if(!A(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const s of e.getAttributeKeys())if("class"!==s&&"style"!==s&&(!t.hasAttribute(s)||t.getAttribute(s)!==e.getAttribute(s)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const s of e.getStyleNames())if(!t.hasStyle(s)||t.getStyle(s)!==e.getStyle(s))return!1;for(const s of e.getAttributeKeys())"class"!==s&&"style"!==s&&this.removeAttribute(s,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const s=e.start,o=e.end;if(T(e,this.document),e.isCollapsed){const s=this._breakAttributes(e.start,t);return new i.Z(s,s)}const r=this._breakAttributes(o,t),n=r.parent.childCount,a=this._breakAttributes(s,t);return r.offset+=r.parent.childCount-n,new i.Z(a,r)}_breakAttributes(e,t=!1){const s=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new h.ZP("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new h.ZP("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new h.ZP("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&x(i.parent))return e.clone();if(x(i))return e.clone();if(i.is("$text"))return this._breakAttributes(v(e),t);if(s==i.childCount){const e=new o.Z(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===s){const e=new o.Z(i.parent,i.index);return this._breakAttributes(e,t)}{const e=i.index+1,r=i._clone();i.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const n=i.childCount-s,a=i._removeChildren(s,n);r._appendChild(a);const c=new o.Z(i.parent,e);return this._breakAttributes(c,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let s=this._cloneGroups.get(t);s||(s=new Set,this._cloneGroups.set(t,s)),s.add(e),e._clonesGroup=s}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const s=this._cloneGroups.get(t);s&&s.delete(e)}}function b(e){let t=e.parent;for(;!x(t);){if(!t)return;t=t.parent}return t}function _(e,t){return e.priorityt.priority)&&e.getIdentity()s instanceof e)))throw new h.ZP("view-writer-insert-invalid-node-type",t);s.is("$text")||P(s.getChildren(),t)}}function x(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function T(e,t){const s=b(e.start),o=b(e.end);if(!s||!o||s!==o)throw new h.ZP("view-writer-invalid-range-container",t)}function A(e,t){return null===e.id&&null===t.id}},"./packages/ckeditor5-engine/src/view/editableelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/containerelement.ts"),i=s("./packages/ckeditor5-utils/src/observablemixin.ts");class r extends((0,i.Z)(o.Z)){constructor(...e){super(...e);const t=e[0];this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",(e=>e&&t.selection.editableElement==this)),this.listenTo(t.selection,"change",(()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this}))}destroy(){this.stopListening()}}r.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/element.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-engine/src/view/node.ts"),i=s("./packages/ckeditor5-engine/src/view/text.ts"),r=s("./packages/ckeditor5-engine/src/view/textproxy.ts"),n=s("./packages/ckeditor5-utils/src/tomap.ts"),a=s("./packages/ckeditor5-utils/src/toarray.ts"),c=s("./packages/ckeditor5-utils/src/isiterable.ts"),l=s("./packages/ckeditor5-engine/src/view/matcher.ts"),d=s("./packages/ckeditor5-engine/src/view/stylesmap.ts"),h=s("./node_modules/lodash-es/isPlainObject.js");class u extends o.Z{constructor(e,t,s,o){if(super(e),this.name=t,this._attrs=function(e){const t=(0,n.Z)(e);for(const[e,s]of t)null===s?t.delete(e):"string"!=typeof s&&t.set(e,String(s));return t}(s),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");p(this._classes,e),this._attrs.delete("class")}this._styles=new d.Z(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof u))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,s]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==s)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new l.Z(...e);let s=this.parent;for(;s&&!s.is("documentFragment");){if(t.match(s))return s;s=s.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),s=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==s?"":` ${s}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const s of this.getChildren())t.push(s._clone(e));const s=new this.constructor(this.document,this.name,this._attrs,t);return s._classes=new Set(this._classes),s._styles.set(this._styles.getNormalized()),s._customProperties=new Map(this._customProperties),s.getFillerOffset=this.getFillerOffset,s._unsafeAttributesToRender=this._unsafeAttributesToRender,s}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let s=0;const o=function(e,t){if("string"==typeof t)return[new i.Z(e,t)];(0,c.Z)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new i.Z(e,t):t instanceof r.Z?new i.Z(e,t.data):t))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,s++;return s}_removeChildren(e,t=1){this._fireChange("children",this);for(let s=e;s0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,a.Z)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,a.Z)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),(0,h.Z)(e)?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,a.Z)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function p(e,t){const s=t.split(/\s+/);e.clear(),s.forEach((t=>e.add(t)))}u.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/emptyelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/node.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends o.Z{constructor(e,t,s,o){super(e,t,s,o),this.getFillerOffset=a}_insertChild(e,t){if(t&&(t instanceof i.Z||Array.from(t).length>0))throw new r.ZP("view-emptyelement-cannot-add",[this,t]);return 0}}function a(){return null}n.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/filler.ts":(e,t,s)=>{"use strict";s.d(t,{N3:()=>r,PQ:()=>n,Pj:()=>l,Qh:()=>h,Sw:()=>d,b_:()=>c,mm:()=>p,th:()=>u,yl:()=>a});var o=s("./packages/ckeditor5-utils/src/keyboard.ts"),i=s("./packages/ckeditor5-utils/src/dom/istext.ts");const r=e=>e.createTextNode(" "),n=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},a=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},c=7,l="⁠".repeat(c);function d(e){return(0,i.Z)(e)&&e.data.substr(0,c)===l}function h(e){return e.data.length==c&&d(e)}function u(e){return d(e)?e.data.slice(c):e.data}function p(e){e.document.on("arrowKey",g,{priority:"low"})}function g(e,t){if(t.keyCode==o.Do.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,s=e.getRangeAt(0).startOffset;d(t)&&s<=c&&e.collapse(t,0)}}}},"./packages/ckeditor5-engine/src/view/matcher.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/isPlainObject.js"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const s=n(t,e);if(s)return{element:t,pattern:e,match:s}}return null}matchAll(...e){const t=[];for(const s of e)for(const e of this._patterns){const o=n(s,e);o&&t.push({element:s,pattern:e,match:o})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function n(e,t){if("function"==typeof t)return t(e);const s={};return t.name&&(s.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!s.name)||t.attributes&&(s.attributes=function(e,t){const s=new Set(t.getAttributeKeys());(0,o.Z)(e)?(void 0!==e.style&&(0,i.KE)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,i.KE)("matcher-pattern-deprecated-attributes-class-key",e)):(s.delete("style"),s.delete("class"));return a(e,s,(e=>t.getAttribute(e)))}(t.attributes,e),!s.attributes)||t.classes&&(s.classes=function(e,t){return a(e,t.getClassNames(),(()=>{}))}(t.classes,e),!s.classes)||t.styles&&(s.styles=function(e,t){return a(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!s.styles)?null:s}function a(e,t,s){const r=function(e){if(Array.isArray(e))return e.map((e=>(0,o.Z)(e)?(void 0!==e.key&&void 0!==e.value||(0,i.KE)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if((0,o.Z)(e))return Object.entries(e);return[[e,!0]]}(e),n=Array.from(t),a=[];if(r.forEach((([e,t])=>{n.forEach((o=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,o)&&function(e,t,s){if(!0===e)return!0;const o=s(t);return e===o||e instanceof RegExp&&!!String(o).match(e)}(t,o,s)&&a.push(o)}))})),r.length&&!(a.length{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts"),n=s("./packages/ckeditor5-utils/src/comparearrays.ts"),a=s("./node_modules/lodash-es/clone.js");s("./packages/ckeditor5-utils/src/version.ts");class c extends((0,r.ZP)(o.Z)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new i.ZP("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let s=e.includeSelf?this:this.parent;for(;s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}getCommonAncestor(e,t={}){const s=this.getAncestors(t),o=e.getAncestors(t);let i=0;for(;s[i]==o[i]&&s[i];)i++;return 0===i?null:s[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),s=e.getPath(),o=(0,n.Z)(t,s);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o]{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/eventinfo.ts");class i extends o.Z{constructor(e,t,s){super(e,t),this.startRange=s,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}},"./packages/ckeditor5-engine/src/view/observer/domeventdata.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/assignIn.js");class i{constructor(e,t,s){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,o.Z)(this,s)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}},"./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),i=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts");class r extends o.Z{constructor(e){super(e),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}fire(e,t,s){this.isEnabled&&this.document.fire(e,new i.Z(this.view,t,s))}}},"./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts");class i extends o.Z{constructor(e){super(e),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}},"./packages/ckeditor5-engine/src/view/observer/observer.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts");class i extends o.Q{constructor(e){super(),this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}},"./packages/ckeditor5-engine/src/view/position.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/comparearrays.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-engine/src/view/editableelement.ts"),a=(s("./packages/ckeditor5-utils/src/version.ts"),s("./packages/ckeditor5-engine/src/view/treewalker.ts"));class c extends o.Z{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof n.Z);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=c._createAt(this),s=t.offset+e;return t.offset=s<0?0:s,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const s=new a.Z(t);return s.skip(e),s.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),s=e.getAncestors();let o=0;for(;t[o]==s[o]&&t[o];)o++;return 0===o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],s=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),s.push(e.offset);const o=(0,i.Z)(t,s);switch(o){case"prefix":return"before";case"extension":return"after";default:return t[o]{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/position.ts"),r=s("./packages/ckeditor5-engine/src/view/treewalker.ts");class n extends o.Z{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new r.Z({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(a,{direction:"backward"}),t=this.end.getLastMatchingPosition(a);return e.parent.is("$text")&&e.isAtStart&&(e=i.Z._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=i.Z._createAfter(t.parent)),new n(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(a);if(e.isAfter(this.end)||e.isEqual(this.end))return new n(e,e);let t=this.end.getLastMatchingPosition(a,{direction:"backward"});const s=e.nodeAfter,o=t.nodeBefore;return s&&s.is("$text")&&(e=new i.Z(s,0)),o&&o.is("$text")&&(t=new i.Z(o,o.data.length)),new n(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const s=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return s&&o}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new n(this.start,e.start)),this.containsPosition(e.end)&&t.push(new n(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,s=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(s=e.end),new n(t,s)}return null}getWalker(e={}){return e.boundaries=this,new r.Z(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new n(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new r.Z(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new r.Z(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,s,o){return new this(new i.Z(e,t),new i.Z(s,o))}static _createFromPositionAndShift(e,t){const s=e,o=e.getShiftedBy(t);return t>0?new this(s,o):new this(o,s)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(i.Z._createBefore(e),t)}}function a(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}n.prototype.is=function(e){return"range"===e||"view:range"===e}},"./packages/ckeditor5-engine/src/view/rawelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/node.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends o.Z{constructor(...e){super(...e),this.getFillerOffset=a}_insertChild(e,t){if(t&&(t instanceof i.Z||Array.from(t).length>0))throw new r.ZP("view-rawelement-cannot-add",[this,t]);return 0}render(){}}function a(){return null}n.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/renderer.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>w});var o=s("./packages/ckeditor5-engine/src/view/text.ts"),i=s("./packages/ckeditor5-engine/src/view/position.ts"),r=s("./packages/ckeditor5-engine/src/view/filler.ts"),n=s("./packages/ckeditor5-utils/src/diff.ts");function a(e,t,s){e.insertBefore(s,e.childNodes[t]||null)}function c(e){const t=e.parentNode;t&&t.removeChild(e)}var l=s("./packages/ckeditor5-utils/src/observablemixin.ts"),d=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),h=s("./packages/ckeditor5-utils/src/dom/istext.ts"),u=s("./packages/ckeditor5-utils/src/dom/iscomment.ts"),p=s("./packages/ckeditor5-utils/src/dom/isnode.ts"),g=s("./packages/ckeditor5-utils/src/fastdiff.ts"),f=s("./packages/ckeditor5-utils/src/env.ts"),m=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),k=s.n(m),b=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css"),_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};k()(b.Z,_);b.Z.locals;class w extends l.y{constructor(e,t){super(),this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),f.ZP.isBlink&&!f.ZP.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new d.ZP("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){let e=null;const t=!(f.ZP.isBlink&&!f.ZP.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=i.Z._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),s=t.parent.ownerDocument;(0,r.Sw)(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=v(s,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),s=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),o=this._diffNodeLists(t,s),i=this._findReplaceActions(o,t,s);if(-1!==i.indexOf("replace")){const o={equal:0,insert:0,delete:0};for(const r of i)if("replace"===r){const i=o.equal+o.insert,r=o.equal+o.delete,n=e.getChild(i);!n||n.is("uiElement")||n.is("rawElement")||this._updateElementMappings(n,t[r]),c(s[i]),o.equal++}else o[r]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?i.Z._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,h.Z)(t.parent)&&(0,r.Sw)(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!(0,r.Sw)(e))throw new d.ZP("view-renderer-filler-was-lost",this);(0,r.Qh)(e)?e.remove():e.data=e.data.substr(r.b_),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,s=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(s===t.getFillerOffset())return!1;const i=e.nodeBefore,r=e.nodeAfter;return!(i instanceof o.Z||r instanceof o.Z)}_updateText(e,t){const s=this.domConverter.findCorrespondingDomText(e),o=this.domConverter.viewToDom(e),i=s.data;let n=o.data;const a=t.inlineFillerPosition;if(a&&a.parent==e.parent&&a.offset==e.index&&(n=r.Pj+n),i!=n){const e=(0,g.Z)(i,n);for(const t of e)"insert"===t.type?s.insertData(t.index,t.values.join("")):s.deleteData(t.index,t.howMany)}}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const s=Array.from(t.attributes).map((e=>e.name)),o=e.getAttributeKeys();for(const s of o)this.domConverter.setDomElementAttribute(t,s,e.getAttribute(s),e);for(const o of s)e.hasAttribute(o)||this.domConverter.removeDomElementAttribute(t,o)}_updateChildren(e,t){const s=this.domConverter.mapViewToDom(e);if(!s)return;const o=t.inlineFillerPosition,i=this.domConverter.mapViewToDom(e).childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));o&&o.parent===e&&v(s.ownerDocument,r,o.offset);const n=this._diffNodeLists(i,r);let l=0;const d=new Set;for(const e of n)"delete"===e?(d.add(i[l]),c(i[l])):"equal"===e&&l++;l=0;for(const e of n)"insert"===e?(a(s,l,r[l]),l++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[l])),l++);for(const e of d)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const s=Array.from(e);if(0==s.length||!t)return s;s[s.length-1]==t&&s.pop();return s}(e,this._fakeSelectionContainer),(0,n.Z)(e,t,Z.bind(null,this.domConverter))}_findReplaceActions(e,t,s){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let o=[],i=[],r=[];const a={equal:0,insert:0,delete:0};for(const c of e)"insert"===c?r.push(s[a.equal+a.insert]):"delete"===c?i.push(t[a.equal+a.delete]):(o=o.concat((0,n.Z)(i,r,y).map((e=>"equal"===e?"replace":e))),o.push("equal"),i=[],r=[]),a[c]++;return o.concat((0,n.Z)(i,r,y).map((e=>"equal"===e?"replace":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(f.ZP.isBlink&&!f.ZP.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const s=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(s,this.selection),!this._fakeSelectionNeedsUpdate(e))return;s.parentElement&&s.parentElement==e||e.appendChild(s),s.textContent=this.selection.fakeSelectionLabel||" ";const o=t.getSelection(),i=t.createRange();o.removeAllRanges(),i.selectNodeContents(s),o.addRange(i)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const s=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(s.parent,s.offset),t.extend(o.parent,o.offset),f.ZP.isGecko&&function(e,t){const s=e.parent;if(s.nodeType!=Node.ELEMENT_NODE||e.offset!=s.childNodes.length-1)return;const o=s.childNodes[e.offset];o&&"BR"==o.tagName&&t.addRange(t.getRangeAt(0))}(o,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,s=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(s.anchorNode!==t&&!t.contains(s.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const s=e.activeElement,o=this.domConverter.mapDomToView(s);s&&o&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function v(e,t,s){const o=t instanceof Array?t:t.childNodes,i=o[s];if((0,h.Z)(i))return i.data=r.Pj+i.data,i;{const i=e.createTextNode(r.Pj);return Array.isArray(t)?o.splice(s,0,i):a(t,s,i),i}}function y(e,t){return(0,p.Z)(e)&&(0,p.Z)(t)&&!(0,h.Z)(e)&&!(0,h.Z)(t)&&!(0,u.Z)(e)&&!(0,u.Z)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Z(e,t,s){return t===s||((0,h.Z)(t)&&(0,h.Z)(s)?t.data===s.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(s)))}},"./packages/ckeditor5-engine/src/view/selection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/range.ts"),r=s("./packages/ckeditor5-engine/src/view/position.ts"),n=s("./packages/ckeditor5-engine/src/view/node.ts"),a=s("./packages/ckeditor5-engine/src/view/documentselection.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),l=s("./packages/ckeditor5-utils/src/count.ts"),d=s("./packages/ckeditor5-utils/src/isiterable.ts"),h=s("./packages/ckeditor5-utils/src/emittermixin.ts");class u extends((0,h.ZP)(o.Z)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let s=!1;for(const o of e._ranges)if(t.isEqual(o)){s=!0;break}if(!s)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,l.Z)(this.getRanges());if(t!=(0,l.Z)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let s=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){s=!0;break}if(!s)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,s,o]=e;if("object"==typeof s&&(o=s,s=void 0),null===t)this._setRanges([]),this._setFakeOptions(o);else if(t instanceof u||t instanceof a.Z)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof i.Z)this._setRanges([t],o&&o.backward),this._setFakeOptions(o);else if(t instanceof r.Z)this._setRanges([new i.Z(t)]),this._setFakeOptions(o);else if(t instanceof n.Z){const e=!!o&&!!o.backward;let n;if(void 0===s)throw new c.ZP("view-selection-setto-required-second-parameter",this);n="in"==s?i.Z._createIn(t):"on"==s?i.Z._createOn(t):new i.Z(r.Z._createAt(t,s)),this._setRanges([n],e),this._setFakeOptions(o)}else{if(!(0,d.Z)(t))throw new c.ZP("view-selection-setto-not-selectable",this);this._setRanges(t,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new c.ZP("view-selection-setfocus-no-ranges",this);const s=r.Z._createAt(e,t);if("same"==s.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==s.compareWith(o)?this._addRange(new i.Z(s,o),!0):this._addRange(new i.Z(o,s)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof i.Z))throw new c.ZP("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new c.ZP("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new i.Z(e.start,e.end))}}u.prototype.is=function(e){return"selection"===e||"view:selection"===e}},"./packages/ckeditor5-engine/src/view/stylesmap.ts":(e,t,s)=>{"use strict";s.d(t,{A:()=>ee,Z:()=>Y});var o=s("./node_modules/lodash-es/isObject.js"),i=s("./node_modules/lodash-es/isArray.js"),r=s("./node_modules/lodash-es/isSymbol.js"),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const c=function(e,t){if((0,i.Z)(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!(0,r.Z)(e))||(a.test(e)||!n.test(e)||null!=t&&e in Object(t))};var l=s("./node_modules/lodash-es/_MapCache.js");function d(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var o=arguments,i=t?t.apply(this,o):o[0],r=s.cache;if(r.has(i))return r.get(i);var n=e.apply(this,o);return s.cache=r.set(i,n)||r,n};return s.cache=new(d.Cache||l.Z),s}d.Cache=l.Z;const h=d;var u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g;const g=function(e){var t=h(e,(function(e){return 500===s.size&&s.clear(),e})),s=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(u,(function(e,s,o,i){t.push(o?i.replace(p,"$1"):s||e)})),t}));var f=s("./node_modules/lodash-es/toString.js");const m=function(e,t){return(0,i.Z)(e)?e:c(e,t)?[e]:g((0,f.Z)(e))};const k=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const b=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const _=function(e,t){for(var s=0,o=(t=m(t,e)).length;null!=e&&si?0:i+t),(s=s>i?i:s)<0&&(s+=i),i=t>s?0:s-t>>>0,t>>>=0;for(var r=Array(i);++ot===e));return Array.isArray(t)}set(e,t){if((0,o.Z)(e))for(const[t,s]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,s,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=te(e);Z(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,o.Z)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const s of t)e.push(...this._styleProcessor.getReducedForm(s,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const s=t.splice(0,t.length-1).join("."),o=P(this._styles,s);if(!o)return;!Array.from(Object.keys(o)).length&&this.remove(s)}}class ee{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,s){if((0,o.Z)(t))se(s,te(e),t);else if(this._normalizers.has(e)){const o=this._normalizers.get(e),{path:i,value:r}=o(t);se(s,i,r)}else se(s,e,t)}getNormalized(e,t){if(!e)return K({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const s=this._extractors.get(e);if("string"==typeof s)return P(t,s);const o=s(e,t);if(o)return o}return P(t,te(e))}getReducedForm(e,t){const s=this.getNormalized(e,t);if(void 0===s)return[];if(this._reducers.has(e)){return this._reducers.get(e)(s)}return[[e,s]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const s=this.getNormalized(t,e);return s&&"object"==typeof s?Object.keys(s).length:s})),s=new Set([...t,...Object.keys(e)]);return Array.from(s.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const s of t)this._mapStyleNames(s,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function te(e){return e.replace("-",".")}function se(e,t,s){let i=s;(0,o.Z)(s)&&(i=K({},P(e,t),s)),X(e,t,i)}},"./packages/ckeditor5-engine/src/view/text.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/view/node.ts");class i extends o.Z{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof i&&(this===e||this.data===e.data)}_clone(){return new i(this.document,this.data)}}i.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/textproxy.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e,t,s){if(super(),this.textNode=e,t<0||t>e.data.length)throw new i.ZP("view-textproxy-wrong-offsetintext",this);if(s<0||t+s>e.data.length)throw new i.ZP("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+s),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let s=e.includeSelf?this.textNode:this.parent;for(;null!==s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}}r.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}},"./packages/ckeditor5-engine/src/view/treewalker.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/text.ts"),r=s("./packages/ckeditor5-engine/src/view/textproxy.ts"),n=s("./packages/ckeditor5-engine/src/view/position.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class c{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new a.ZP("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new a.ZP("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=n.Z._createAt(e.startPosition):this.position=n.Z._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,s,o;do{o=this.position,({done:t,value:s}=this.next())}while(!t&&e(s));t||(this.position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,s=e.parent;if(null===s.parent&&e.offset===s.childCount)return{done:!0,value:void 0};if(s===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let a;if(s instanceof i.Z){if(e.isAtEnd)return this.position=n.Z._createAfter(s),this._next();a=s.data[e.offset]}else a=s.getChild(e.offset);if(a instanceof o.Z)return this.shallow?e.offset++:e=new n.Z(a,0),this.position=e,this._formatReturnValue("elementStart",a,t,e,1);if(a instanceof i.Z){if(this.singleCharacters)return e=new n.Z(a,0),this.position=e,this._next();{let s,o=a.data.length;return a==this._boundaryEndParent?(o=this.boundaries.end.offset,s=new r.Z(a,0,o),e=n.Z._createAfter(s)):(s=new r.Z(a,0,a.data.length),e.offset++),this.position=e,this._formatReturnValue("text",s,t,e,o)}}if("string"==typeof a){let o;if(this.singleCharacters)o=1;else{o=(s===this._boundaryEndParent?this.boundaries.end.offset:s.data.length)-e.offset}const i=new r.Z(s,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue("text",i,t,e,o)}return e=n.Z._createAfter(s),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",s,t,e)}_previous(){let e=this.position.clone();const t=this.position,s=e.parent;if(null===s.parent&&0===e.offset)return{done:!0,value:void 0};if(s==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let a;if(s instanceof i.Z){if(e.isAtStart)return this.position=n.Z._createBefore(s),this._previous();a=s.data[e.offset-1]}else a=s.getChild(e.offset-1);if(a instanceof o.Z)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",a,t,e,1)):(e=new n.Z(a,a.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",a,t,e));if(a instanceof i.Z){if(this.singleCharacters)return e=new n.Z(a,a.data.length),this.position=e,this._previous();{let s,o=a.data.length;if(a==this._boundaryStartParent){const t=this.boundaries.start.offset;s=new r.Z(a,t,a.data.length-t),o=s.data.length,e=n.Z._createBefore(s)}else s=new r.Z(a,0,a.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",s,t,e,o)}}if("string"==typeof a){let o;if(this.singleCharacters)o=1;else{const t=s===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}e.offset-=o;const i=new r.Z(s,e.offset,o);return this.position=e,this._formatReturnValue("text",i,t,e,o)}return e=n.Z._createBefore(s),this.position=e,this._formatReturnValue("elementStart",s,t,e,1)}_formatReturnValue(e,t,s,o,i){return t instanceof r.Z&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?s=n.Z._createAfter(t.textNode):(o=n.Z._createAfter(t.textNode),this.position=o)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?s=n.Z._createBefore(t.textNode):(o=n.Z._createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:s,nextPosition:o,length:i}}}}},"./packages/ckeditor5-engine/src/view/typecheckable.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{is(){throw new Error("is() method is abstract")}}},"./packages/ckeditor5-engine/src/view/uielement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a,h:()=>c});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/node.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-utils/src/keyboard.ts");class a extends o.Z{constructor(...e){super(...e),this.getFillerOffset=l}_insertChild(e,t){if(t&&(t instanceof i.Z||Array.from(t).length>0))throw new r.ZP("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function c(e){e.document.on("arrowKey",((t,s)=>function(e,t,s){if(t.keyCode==n.Do.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,i=e.focusOffset,r=s.domPositionToView(t,i);if(null===r)return;let n=!1;const a=r.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(n=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(n){const t=s.viewPositionToDom(a);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,s,e.domConverter)),{priority:"low"})}function l(){return null}a.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-utils/src/ckeditorerror.ts":(e,t,s)=>{"use strict";s.d(t,{H:()=>r,KE:()=>i,ZP:()=>o});class o extends Error{constructor(e,t,s){super(function(e,t){const s=new WeakSet,o=(e,t)=>{if("object"==typeof t&&null!==t){if(s.has(t))return`[object ${t.constructor.name}]`;s.add(t)}return t},i=t?` ${JSON.stringify(t,o)}`:"",r=n(e);return e+i+r}(e,s)),this.name="CKEditorError",this.context=t,this.data=s}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const s=new o(e.message,t);throw s.stack=e.stack,s}}function i(e,t){console.warn(...a(e,t))}function r(e,t){console.error(...a(e,t))}function n(e){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${e}`}function a(e,t){const s=n(e);return t?[e,t,s]:[e,s]}},"./packages/ckeditor5-utils/src/collection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-utils/src/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/uid.ts"),n=s("./packages/ckeditor5-utils/src/isiterable.ts");class a extends o.Q5{constructor(e={},t={}){super();const s=(0,n.Z)(e);if(s||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],s)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new i.ZP("collection-add-item-invalid-index",this);let s=0;for(const o of e){const e=this._getItemIdBeforeAdding(o),i=t+s;this._items.splice(i,0,o),this._itemMap.set(e,o),this.fire("add",o,i),s++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new i.ZP("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,s]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:s}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new i.ZP("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,s=(s,o,i)=>{const r=t._bindToCollection==this,n=t._bindToInternalToExternalMap.get(o);if(r&&n)this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o);else{const s=e(o);if(!s)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const e of this._skippedIndexesFromExternal)i>e&&r--;for(const e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(o,s),this._bindToInternalToExternalMap.set(s,o),this.add(s,r);for(let e=0;e{const o=this._bindToExternalToInternalMap.get(t);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(st&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let s;if(t in e){if(s=e[t],"string"!=typeof s)throw new i.ZP("collection-add-invalid-id",this);if(this.get(s))throw new i.ZP("collection-add-item-already-exists",this)}else e[t]=s=(0,r.Z)();return s}_remove(e){let t,s,o,r=!1;const n=this._idProperty;if("string"==typeof e?(s=e,o=this._itemMap.get(s),r=!o,o&&(t=this._items.indexOf(o))):"number"==typeof e?(t=e,o=this._items[t],r=!o,o&&(s=o[n])):(o=e,s=o[n],t=this._items.indexOf(o),r=-1==t||!this._itemMap.get(s)),r)throw new i.ZP("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(s);const a=this._bindToInternalToExternalMap.get(o);return this._bindToInternalToExternalMap.delete(o),this._bindToExternalToInternalMap.delete(a),this.fire("remove",o,t),[o,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}},"./packages/ckeditor5-utils/src/comparearrays.ts":(e,t,s)=>{"use strict";function o(e,t){const s=Math.min(e.length,t.length);for(let o=0;oo})},"./packages/ckeditor5-utils/src/count.ts":(e,t,s)=>{"use strict";function o(e){let t=0;for(const s of e)t++;return t}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/diff.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/fastdiff.ts");function i(e,t,s){s=s||function(e,t){return e===t};const o=e.length,r=t.length;if(o>200||r>200||o+r>300)return i.fastDiff(e,t,s,!0);let n,a;if(rr?-1:1;h[o+d]&&(h[o]=h[o+d].slice(0)),h[o]||(h[o]=[]),h[o].push(i>r?n:a);let p=Math.max(i,r),g=p-o;for(;gd;g--)u[g]=p(g);u[d]=p(d),f++}while(u[d]!==l);return h[d].slice(1)}i.fastDiff=o.Z},"./packages/ckeditor5-utils/src/dom/createelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-utils/src/isiterable.ts"),i=s("./node_modules/lodash-es/_baseGetTag.js"),r=s("./node_modules/lodash-es/isArray.js"),n=s("./node_modules/lodash-es/isObjectLike.js");const a=function(e){return"string"==typeof e||!(0,r.Z)(e)&&(0,n.Z)(e)&&"[object String]"==(0,i.Z)(e)};function c(e,t,s={},i=[]){const r=s&&s.xmlns,n=r?e.createElementNS(r,t):e.createElement(t);for(const e in s)n.setAttribute(e,s[e]);!a(i)&&(0,o.Z)(i)||(i=[i]);for(let t of i)a(t)&&(t=e.createTextNode(t)),n.appendChild(t);return n}},"./packages/ckeditor5-utils/src/dom/emittermixin.ts":(e,t,s)=>{"use strict";s.d(t,{Q:()=>c,Z:()=>a});var o=s("./packages/ckeditor5-utils/src/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/uid.ts"),r=s("./packages/ckeditor5-utils/src/dom/isnode.ts"),n=s("./packages/ckeditor5-utils/src/dom/iswindow.ts");function a(e){return class extends e{listenTo(e,t,s,i={}){if((0,r.Z)(e)||(0,n.Z)(e)){const o={capture:!!i.useCapture,passive:!!i.usePassive},r=this._getProxyEmitter(e,o)||new l(e,o);this.listenTo(r,t,s,i)}else o.Q5.prototype.listenTo.call(this,e,t,s,i)}stopListening(e,t,s){if((0,r.Z)(e)||(0,n.Z)(e)){const o=this._getAllProxyEmitters(e);for(const e of o)this.stopListening(e,t,s)}else o.Q5.prototype.stopListening.call(this,e,t,s)}_getProxyEmitter(e,t){return(0,o.Rl)(this,d(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}const c=a(o.Q5);["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{a[e]=c.prototype[e]}));class l extends o.Q5{constructor(e,t){super(),(0,o.Hv)(this,d(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,s){this.attach(e),o.Q5.prototype._addEventListener.call(this,e,t,s)}_removeEventListener(e,t){o.Q5.prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function d(e,t){let s=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=(0,i.Z)())}(e);for(const e of Object.keys(t).sort())t[e]&&(s+="-"+e);return s}},"./packages/ckeditor5-utils/src/dom/getborderwidths.ts":(e,t,s)=>{"use strict";function o(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/global.ts":(e,t,s)=>{"use strict";let o;s.d(t,{Z:()=>i});try{o={window,document}}catch(e){o={window:{},document:{}}}const i=o},"./packages/ckeditor5-utils/src/dom/iscomment.ts":(e,t,s)=>{"use strict";function o(e){return e&&e.nodeType===Node.COMMENT_NODE}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/isnode.ts":(e,t,s)=>{"use strict";function o(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/isrange.ts":(e,t,s)=>{"use strict";function o(e){return"[object Range]"==Object.prototype.toString.apply(e)}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/istext.ts":(e,t,s)=>{"use strict";function o(e){return"[object Text]"==Object.prototype.toString.call(e)}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/isvisible.ts":(e,t,s)=>{"use strict";function o(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/iswindow.ts":(e,t,s)=>{"use strict";function o(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/position.ts":(e,t,s)=>{"use strict";s.d(t,{x:()=>a});var o=s("./packages/ckeditor5-utils/src/dom/global.ts"),i=s("./packages/ckeditor5-utils/src/dom/rect.ts");var r=s("./packages/ckeditor5-utils/src/dom/getborderwidths.ts"),n=s("./node_modules/lodash-es/isFunction.js");function a({element:e,target:t,positions:s,limiter:r,fitInViewport:a,viewportOffsetConfig:c}){(0,n.Z)(t)&&(t=t()),(0,n.Z)(r)&&(r=r());const d=function(e){return e&&e.parentNode?e.offsetParent===o.Z.document.body?null:e.offsetParent:null}(e),h=new i.Z(e),u=new i.Z(t);let p;const g=a&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new i.Z(o.Z.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(c)||null,f={targetRect:u,elementRect:h,positionedElementAncestor:d,viewportRect:g};if(r||a){const e=r&&new i.Z(r).getVisible();Object.assign(f,{limiterRect:e,viewportRect:g}),p=function(e,t){const{elementRect:s}=t,o=s.getArea(),i=e.map((e=>new l(e,t))).filter((e=>!!e.name));let r=0,n=null;for(const e of i){const{limiterIntersectionArea:t,viewportIntersectionArea:s}=e;if(t===o)return e;const i=s**2+t**2;i>r&&(r=i,n=e)}return n}(s,f)||new l(s[0],f)}else p=new l(s[0],f);return p}function c(e){const{scrollX:t,scrollY:s}=o.Z.window;return e.clone().moveBy(t,s)}class l{constructor(e,t){const s=e(t.targetRect,t.elementRect,t.viewportRect);if(!s)return;const{left:o,top:i,name:r,config:n}=s;this.name=r,this.config=n,this._positioningFunctionCorrdinates={left:o,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const s=e.getIntersection(t);if(s)return s.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=c(this._rect),this._options.positionedElementAncestor&&function(e,t){const s=c(new i.Z(t)),o=(0,r.Z)(t);let n=0,a=0;n-=s.left,a-=s.top,n+=t.scrollLeft,a+=t.scrollTop,n-=o.left,a-=o.top,e.moveBy(n,a)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}},"./packages/ckeditor5-utils/src/dom/rect.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-utils/src/dom/isrange.ts"),i=s("./packages/ckeditor5-utils/src/dom/iswindow.ts"),r=s("./packages/ckeditor5-utils/src/dom/getborderwidths.ts"),n=s("./packages/ckeditor5-utils/src/dom/istext.ts");const a=["top","right","bottom","left","width","height"];class c{constructor(e){const t=(0,o.Z)(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),h(e)||t)if(t){const t=c.getDomRangeRects(e);l(this,c.getBoundingRect(t))}else l(this,e.getBoundingClientRect());else if((0,i.Z)(e)){const{innerWidth:t,innerHeight:s}=e;l(this,{top:0,right:t,bottom:s,left:0,width:t,height:s})}else l(this,e)}clone(){return new c(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new c(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!d(e)){let s=e.parentNode||e.commonAncestorContainer;for(;s&&!d(s);){const e=new c(s),o=t.getIntersection(e);if(!o)return null;o.getArea(){"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/dom/global.ts");class i{constructor(e,t){i._observerInstance||i._createObserver(),this._element=e,this._callback=t,i._addElementCallback(e,t),i._observerInstance.observe(e)}destroy(){i._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){i._elementCallbacks||(i._elementCallbacks=new Map);let s=i._elementCallbacks.get(e);s||(s=new Set,i._elementCallbacks.set(e,s)),s.add(t)}static _deleteElementCallback(e,t){const s=i._getElementCallbacks(e);s&&(s.delete(t),s.size||(i._elementCallbacks.delete(e),i._observerInstance.unobserve(e))),i._elementCallbacks&&!i._elementCallbacks.size&&(i._observerInstance=null,i._elementCallbacks=null)}static _getElementCallbacks(e){return i._elementCallbacks?i._elementCallbacks.get(e):null}static _createObserver(){i._observerInstance=new o.Z.window.ResizeObserver((e=>{for(const t of e){const e=i._getElementCallbacks(t.target);if(e)for(const s of e)s(t)}}))}}i._observerInstance=null,i._elementCallbacks=null},"./packages/ckeditor5-utils/src/dom/scroll.ts":(e,t,s)=>{"use strict";s.d(t,{F:()=>a,m:()=>n});var o=s("./packages/ckeditor5-utils/src/dom/isrange.ts"),i=s("./packages/ckeditor5-utils/src/dom/rect.ts"),r=s("./packages/ckeditor5-utils/src/dom/istext.ts");function n({target:e,viewportOffset:t=0}){const s=g(e);let o=s,i=null;for(;o;){let r;r=f(o==s?e:i),l(r,(()=>m(e,o)));const n=m(e,o);if(c(o,n,t),o.parent!=o){if(i=o.frameElement,o=o.parent,!i)return}else o=null}}function a(e){l(f(e),(()=>new i.Z(e)))}function c(e,t,s){const o=t.clone().moveBy(0,s),r=t.clone().moveBy(0,-s),n=new i.Z(e).excludeScrollbarsAndBorders();if(![r,o].every((e=>n.contains(e)))){let{scrollX:i,scrollY:a}=e;h(r,n)?a-=n.top-t.top+s:d(o,n)&&(a+=t.bottom-n.bottom+s),u(t,n)?i-=n.left-t.left+s:p(t,n)&&(i+=t.right-n.right+s),e.scrollTo(i,a)}}function l(e,t){const s=g(e);let o,r;for(;e!=s.document.body;)r=t(),o=new i.Z(e).excludeScrollbarsAndBorders(),o.contains(r)||(h(r,o)?e.scrollTop-=o.top-r.top:d(r,o)&&(e.scrollTop+=r.bottom-o.bottom),u(r,o)?e.scrollLeft-=o.left-r.left:p(r,o)&&(e.scrollLeft+=r.right-o.right)),e=e.parentNode}function d(e,t){return e.bottom>t.bottom}function h(e,t){return e.topt.right}function g(e){return(0,o.Z)(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function f(e){if((0,o.Z)(e)){let t=e.commonAncestorContainer;return(0,r.Z)(t)&&(t=t.parentNode),t}return e.parentNode}function m(e,t){const s=g(e),o=new i.Z(e);if(s===t)return o;{let e=s;for(;e!=t;){const t=e.frameElement,s=new i.Z(t).excludeScrollbarsAndBorders();o.moveBy(s.left,s.top),e=e.parent}}return o}},"./packages/ckeditor5-utils/src/dom/setdatainelement.ts":(e,t,s)=>{"use strict";function o(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/tounit.ts":(e,t,s)=>{"use strict";function o(e){return t=>t+e}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/emittermixin.ts":(e,t,s)=>{"use strict";s.d(t,{Hv:()=>g,Q5:()=>u,Rl:()=>p,ZP:()=>h});var o=s("./packages/ckeditor5-utils/src/eventinfo.ts"),i=s("./packages/ckeditor5-utils/src/uid.ts"),r=s("./packages/ckeditor5-utils/src/priorities.ts"),n=s("./packages/ckeditor5-utils/src/inserttopriorityarray.ts"),a=(s("./packages/ckeditor5-utils/src/version.ts"),s("./packages/ckeditor5-utils/src/ckeditorerror.ts"));const c=Symbol("listeningTo"),l=Symbol("emitterId"),d=Symbol("delegations");function h(e){return class extends e{on(e,t,s){this.listenTo(this,e,t,s)}once(e,t,s){let o=!1;this.listenTo(this,e,((e,...s)=>{o||(o=!0,e.off(),t.call(this,e,...s))}),s)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,s,o={}){let i,r;this[c]||(this[c]={});const n=this[c];f(e)||g(e);const a=f(e);(i=n[a])||(i=n[a]={emitter:e,callbacks:{}}),(r=i.callbacks[t])||(r=i.callbacks[t]=[]),r.push(s),function(e,t,s,o,i){t._addEventListener?t._addEventListener(s,o,i):e._addEventListener.call(t,s,o,i)}(this,e,t,s,o)}stopListening(e,t,s){const o=this[c];let i=e&&f(e);const r=o&&i?o[i]:void 0,n=r&&t?r.callbacks[t]:void 0;if(!(!o||e&&!r||t&&!n))if(s){w(this,e,t,s);-1!==n.indexOf(s)&&(1===n.length?delete r.callbacks[t]:w(this,e,t,s))}else if(n){for(;s=n.pop();)w(this,e,t,s);delete r.callbacks[t]}else if(r){for(t in r.callbacks)this.stopListening(e,t);delete o[i]}else{for(i in o)this.stopListening(o[i].emitter);delete this[c]}}fire(e,...t){try{const s=e instanceof o.Z?e:new o.Z(this,e),i=s.name;let r=b(this,i);if(s.path.push(this),r){const e=[s,...t];r=Array.from(r);for(let t=0;t{this[d]||(this[d]=new Map),e.forEach((e=>{const o=this[d].get(e);o?o.set(t,s):this[d].set(e,new Map([[t,s]]))}))}}}stopDelegating(e,t){if(this[d])if(e)if(t){const s=this[d].get(e);s&&s.delete(t)}else this[d].delete(e);else this[d].clear()}_addEventListener(e,t,s){!function(e,t){const s=m(e);if(s[t])return;let o=t,i=null;const r=[];for(;""!==o&&!s[o];)s[o]={callbacks:[],childEvents:[]},r.push(s[o]),i&&s[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(":"));if(""!==o){for(const e of r)e.callbacks=s[o].callbacks.slice();s[o].childEvents.push(i)}}(this,e);const o=k(this,e),i={callback:t,priority:r.Z.get(s.priority)};for(const e of o)(0,n.Z)(e,i)}_removeEventListener(e,t){const s=k(this,e);for(const e of s)for(let s=0;s-1?b(e,t.substr(0,t.lastIndexOf(":"))):null}function _(e,t,s){for(let[i,r]of e){r?"function"==typeof r&&(r=r(t.name)):r=t.name;const e=new o.Z(t.source,r);e.path=[...t.path],i.fire(e,...s)}}function w(e,t,s,o){t._removeEventListener?t._removeEventListener(s,o):e._removeEventListener.call(t,s,o)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{h[e]=u.prototype[e]}))},"./packages/ckeditor5-utils/src/env.ts":(e,t,s)=>{"use strict";s.d(t,{ZP:()=>r});const o=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),i={isMac:n(o),isWindows:function(e){return e.indexOf("windows")>-1}(o),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(o),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(o),isiOS:function(e){return!!e.match(/iphone|ipad/i)||n(e)&&navigator.maxTouchPoints>0}(o),isAndroid:function(e){return e.indexOf("android")>-1}(o),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(o),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},r=i;function n(e){return e.indexOf("macintosh")>-1}},"./packages/ckeditor5-utils/src/eventinfo.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const o=function(){return function e(){e.called=!0}};class i{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=o(),this.off=o()}}},"./packages/ckeditor5-utils/src/fastdiff.ts":(e,t,s)=>{"use strict";function o(e,t,s,o=!1){s=s||function(e,t){return e===t};const n=Array.isArray(e)?e:Array.prototype.slice.call(e),a=Array.isArray(t)?t:Array.prototype.slice.call(t),c=function(e,t,s){const o=i(e,t,s);if(-1===o)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const n=r(e,o),a=r(t,o),c=i(n,a,s),l=e.length-c,d=t.length-c;return{firstIndex:o,lastIndexOld:l,lastIndexNew:d}}(n,a,s);return o?function(e,t){const{firstIndex:s,lastIndexOld:o,lastIndexNew:i}=e;if(-1===s)return Array(t).fill("equal");let r=[];s>0&&(r=r.concat(Array(s).fill("equal")));i-s>0&&(r=r.concat(Array(i-s).fill("insert")));o-s>0&&(r=r.concat(Array(o-s).fill("delete")));i0&&s.push({index:o,type:"insert",values:e.slice(o,r)});i-o>0&&s.push({index:o+(r-o),type:"delete",howMany:i-o});return s}(a,c)}function i(e,t,s){for(let o=0;oo})},"./packages/ckeditor5-utils/src/first.ts":(e,t,s)=>{"use strict";function o(e){const t=e.next();return t.done?null:t.value}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/focustracker.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/observablemixin.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends((0,o.Z)(i.y)){constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new r.ZP("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}},"./packages/ckeditor5-utils/src/index.ts":(e,t,s)=>{"use strict";s.d(t,{Bb:()=>c.ZP,FE:()=>Z.Z,Xu:()=>h.Z,a6:()=>l,ln:()=>n.ZP,Rh:()=>x.Z,VD:()=>T.Z,go:()=>y.Z,Re:()=>a.Z,UL:()=>g.Z,do:()=>f.Z,az:()=>d.Z,Hg:()=>i.Z,OB:()=>o.ZP,Ps:()=>P.Z,Cq:()=>w.Cq,yy:()=>p,XU:()=>w.XU,j9:()=>v.j,mA:()=>w.mA,CO:()=>u.Z,dj:()=>w.dj,Zt:()=>w.Zt,pn:()=>b.Z,Do:()=>w.Do,H:()=>c.H,KE:()=>c.KE,CD:()=>r.Z,Zz:()=>w.Zz,tA:()=>E.Z,F0:()=>_.F,mR:()=>_.m,jS:()=>m.Z,qo:()=>A.Z,qL:()=>C.Z,nn:()=>k.Z,hQ:()=>S.Z,i8:()=>j.Z});var o=s("./packages/ckeditor5-utils/src/env.ts"),i=s("./packages/ckeditor5-utils/src/diff.ts"),r=s("./packages/ckeditor5-utils/src/mix.ts"),n=s("./packages/ckeditor5-utils/src/emittermixin.ts"),a=s("./packages/ckeditor5-utils/src/observablemixin.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class l{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}var d=s("./packages/ckeditor5-utils/src/dom/createelement.ts"),h=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),u=s("./packages/ckeditor5-utils/src/dom/global.ts");function p(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}var g=s("./packages/ckeditor5-utils/src/dom/rect.ts"),f=s("./packages/ckeditor5-utils/src/dom/resizeobserver.ts"),m=s("./packages/ckeditor5-utils/src/dom/setdatainelement.ts"),k=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),b=s("./packages/ckeditor5-utils/src/dom/isvisible.ts"),_=s("./packages/ckeditor5-utils/src/dom/scroll.ts"),w=s("./packages/ckeditor5-utils/src/keyboard.ts"),v=s("./packages/ckeditor5-utils/src/language.ts"),y=s("./packages/ckeditor5-utils/src/locale.ts"),Z=s("./packages/ckeditor5-utils/src/collection.ts"),P=s("./packages/ckeditor5-utils/src/first.ts"),x=s("./packages/ckeditor5-utils/src/focustracker.ts"),T=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),A=s("./packages/ckeditor5-utils/src/toarray.ts"),C=s("./packages/ckeditor5-utils/src/tomap.ts"),E=s("./packages/ckeditor5-utils/src/priorities.ts"),S=s("./packages/ckeditor5-utils/src/uid.ts"),j=s("./packages/ckeditor5-utils/src/version.ts")},"./packages/ckeditor5-utils/src/inserttopriorityarray.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/priorities.ts");function i(e,t){const s=o.Z.get(t.priority);for(let i=0;i{"use strict";function o(e){return!(!e||!e[Symbol.iterator])}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/keyboard.ts":(e,t,s)=>{"use strict";s.d(t,{Cq:()=>l,Do:()=>a,XU:()=>h,Zt:()=>g,Zz:()=>d,dj:()=>u,mA:()=>p});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/env.ts");const r={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},n={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},a=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){const s=String.fromCharCode(t);e[s.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),c=Object.fromEntries(Object.entries(a).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function l(e){let t;if("string"==typeof e){if(t=a[e.toLowerCase()],!t)throw new o.ZP("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?a.alt:0)+(e.ctrlKey?a.ctrl:0)+(e.shiftKey?a.shift:0)+(e.metaKey?a.cmd:0);return t}function d(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return l(e.slice(0,-1));const t=l(e);return i.ZP.isMac&&t==a.ctrl?a.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function h(e){let t=d(e);return Object.entries(i.ZP.isMac?r:n).reduce(((e,[s,o])=>(0!=(t&a[s])&&(t&=~a[s],e+=o),e)),"")+(t?c[t]:"")}function u(e){return e==a.arrowright||e==a.arrowleft||e==a.arrowup||e==a.arrowdown}function p(e,t){const s="ltr"===t;switch(e){case a.arrowleft:return s?"left":"right";case a.arrowright:return s?"right":"left";case a.arrowup:return"up";case a.arrowdown:return"down"}}function g(e,t){const s=p(e,t);return"down"===s||"right"===s}},"./packages/ckeditor5-utils/src/keystrokehandler.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/keyboard.ts");class r{constructor(){this._listener=Object.create(o.Z)}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+(0,i.Cq)(t),t)}))}set(e,t,s={}){const o=(0,i.Zz)(e),r=s.priority;this._listener.listenTo(this._listener,"_keydown:"+o,((e,s)=>{t(s,(()=>{s.preventDefault(),s.stopPropagation(),e.stop()})),e.return=!0}),{priority:r})}press(e){return!!this._listener.fire("_keydown:"+(0,i.Cq)(e),e)}destroy(){this._listener.stopListening()}}},"./packages/ckeditor5-utils/src/language.ts":(e,t,s)=>{"use strict";s.d(t,{j:()=>i});const o=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function i(e){return o.includes(e)?"rtl":"ltr"}},"./packages/ckeditor5-utils/src/locale.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-utils/src/toarray.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/dom/global.ts");function n(e,t,s=1){if("number"!=typeof s)throw new i.ZP("translation-service-quantity-not-a-number",null,{quantity:s});const o=Object.keys(r.Z.window.CKEDITOR_TRANSLATIONS).length;1===o&&(e=Object.keys(r.Z.window.CKEDITOR_TRANSLATIONS)[0]);const n=t.id||t.string;if(0===o||!function(e,t){return!!r.Z.window.CKEDITOR_TRANSLATIONS[e]&&!!r.Z.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,n))return 1!==s?t.plural:t.string;const a=r.Z.window.CKEDITOR_TRANSLATIONS[e].dictionary,c=r.Z.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),l=a[n];if("string"==typeof l)return l;return l[Number(c(s))]}r.Z.window.CKEDITOR_TRANSLATIONS||(r.Z.window.CKEDITOR_TRANSLATIONS={});var a=s("./packages/ckeditor5-utils/src/language.ts");class c{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=(0,a.j)(this.uiLanguage),this.contentLanguageDirection=(0,a.j)(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=(0,o.Z)(t),"string"==typeof e&&(e={string:e});const s=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,s)=>s{"use strict";function o(e,...t){t.forEach((t=>{const s=Object.getOwnPropertyNames(t),o=Object.getOwnPropertySymbols(t);s.concat(o).forEach((s=>{if(s in e.prototype)return;if("function"==typeof t&&("length"==s||"name"==s||"prototype"==s))return;const o=Object.getOwnPropertyDescriptor(t,s);o.enumerable=!1,Object.defineProperty(e.prototype,s,o)}))}))}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/observablemixin.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h,y:()=>u});var o=s("./packages/ckeditor5-utils/src/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./node_modules/lodash-es/isObject.js");const n=Symbol("observableProperties"),a=Symbol("boundObservables"),c=Symbol("boundProperties"),l=Symbol("decoratedMethods"),d=Symbol("decoratedOriginal");function h(e){return class extends e{set(e,t){if((0,r.Z)(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);p(this);const s=this[n];if(e in this&&!s.has(e))throw new i.ZP("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>s.get(e),set(t){const o=s.get(e);let i=this.fire(`set:${e}`,e,t,o);void 0===i&&(i=t),o===i&&s.has(e)||(s.set(e,i),this.fire(`change:${e}`,e,i,o))}}),this[e]=t}bind(...e){if(!e.length||!m(e))throw new i.ZP("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new i.ZP("observable-bind-duplicate-properties",this);p(this);const t=this[c];e.forEach((e=>{if(t.has(e))throw new i.ZP("observable-bind-rebind",this)}));const s=new Map;return e.forEach((e=>{const o={property:e,to:[]};t.set(e,o),s.set(e,o)})),{to:g,toMany:f,_observable:this,_bindProperties:e,_to:[],_bindings:s}}unbind(...e){if(!this[n])return;const t=this[c],s=this[a];if(e.length){if(!m(e))throw new i.ZP("observable-unbind-wrong-properties",this);e.forEach((e=>{const o=t.get(e);o&&(o.to.forEach((([e,t])=>{const i=s.get(e),r=i[t];r.delete(o),r.size||delete i[t],Object.keys(i).length||(s.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else s.forEach(((e,t)=>{this.stopListening(t,"change")})),s.clear(),t.clear()}decorate(e){p(this);const t=this[e];if(!t)throw new i.ZP("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,s)=>{e.return=t.apply(this,s)})),this[e]=function(...t){return this.fire(e,t)},this[e][d]=t,this[l]||(this[l]=[]),this[l].push(e)}stopListening(e,t,s){if(!e&&this[l]){for(const e of this[l])this[e]=this[e][d];delete this[l]}o.Q5.prototype.stopListening.call(this,e,t,s)}}}const u=h(o.Q5);function p(e){e[n]||(Object.defineProperty(e,n,{value:new Map}),Object.defineProperty(e,a,{value:new Map}),Object.defineProperty(e,c,{value:new Map}))}function g(...e){const t=function(...e){if(!e.length)throw new i.ZP("observable-bind-to-parse-error",null);const t={to:[]};let s;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)s.properties.push(e);else{if("object"!=typeof e)throw new i.ZP("observable-bind-to-parse-error",null);s={observable:e,properties:[]},t.to.push(s)}})),t}(...e),s=Array.from(this._bindings.keys()),o=s.length;if(!t.callback&&t.to.length>1)throw new i.ZP("observable-bind-to-no-callback",this);if(o>1&&t.callback)throw new i.ZP("observable-bind-to-extra-callback",this);var r;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==o)throw new i.ZP("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(s[0]).callback=t.callback),r=this._observable,this._to.forEach((e=>{const t=r[a];let s;t.get(e.observable)||r.listenTo(e.observable,"change",((o,i)=>{s=t.get(e.observable)[i],s&&s.forEach((e=>{k(r,e.property)}))}))})),function(e){let t;e._bindings.forEach(((s,o)=>{e._to.forEach((i=>{t=i.properties[s.callback?0:e._bindProperties.indexOf(o)],s.to.push([i.observable,t]),function(e,t,s,o){const i=e[a],r=i.get(s),n=r||{};n[o]||(n[o]=new Set);n[o].add(t),r||i.set(s,n)}(e._observable,s,i.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{k(this._observable,e)}))}function f(e,t,s){if(this._bindings.size>1)throw new i.ZP("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const s=e.map((e=>[e,t]));return Array.prototype.concat.apply([],s)}(e,t),s)}function m(e){return e.every((e=>"string"==typeof e))}function k(e,t){const s=e[c].get(t);let o;s.callback?o=s.callback.apply(e,s.to.map((e=>e[0][e[1]]))):(o=s.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=o:e.set(t,o)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{h[e]=u.prototype[e]}))},"./packages/ckeditor5-utils/src/priorities.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5}},"./packages/ckeditor5-utils/src/toarray.ts":(e,t,s)=>{"use strict";function o(e){return Array.isArray(e)?e:[e]}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/tomap.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/isiterable.ts");function i(e){return(0,o.Z)(e)?new Map(e):function(e){const t=new Map;for(const s in e)t.set(s,e[s]);return t}(e)}},"./packages/ckeditor5-utils/src/uid.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const o=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function i(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,s=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+o[e>>0&255]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]+o[t>>0&255]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+o[s>>0&255]+o[s>>8&255]+o[s>>16&255]+o[s>>24&255]+o[i>>0&255]+o[i>>8&255]+o[i>>16&255]+o[i>>24&255]}},"./packages/ckeditor5-utils/src/version.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");const i="35.2.1",r=i,n="object"==typeof window?window:s.g;if(n.CKEDITOR_VERSION)throw new o.ZP("ckeditor-duplicated-modules",null);n.CKEDITOR_VERSION=i},"./packages/ckeditor5-core/src/command.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts"),i=s("./packages/ckeditor5-utils/src/mix.ts");class r{constructor(e){this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this.affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"}),this.listenTo(e,"change:isReadOnly",((e,t,s)=>{s&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",n,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",n),this.refresh())}execute(){}destroy(){this.stopListening()}}function n(e){e.return=!1,e.stop()}(0,i.Z)(r,o.Z)},"./packages/ckeditor5-core/src/contextplugin.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts"),i=s("./packages/ckeditor5-utils/src/mix.ts");class r{constructor(e){this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}(0,i.Z)(r,o.Z)},"./packages/ckeditor5-core/src/index.js":(e,t,s)=>{"use strict";s.d(t,{mY:()=>i.Z,_y:()=>_,eO:()=>w.Z,W9:()=>B,ML:()=>S,S8:()=>V,xK:()=>L,AJ:()=>n,lR:()=>$.Z,Sy:()=>o.Z,P$:()=>z,ci:()=>U,Nu:()=>W});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-core/src/command.js"),r=s("./packages/ckeditor5-utils/src/inserttopriorityarray.ts");class n extends i.Z{constructor(e){super(e),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={priority:"normal"}){(0,r.Z)(this._childCommandsDefinitions,{command:e,priority:t.priority}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}var a=s("./node_modules/lodash-es/isPlainObject.js"),c=s("./node_modules/lodash-es/cloneDeepWith.js"),l=s("./node_modules/lodash-es/isElement.js");class d{constructor(e,t){this._config={},t&&this.define(h(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,s,o=!1){if((0,a.Z)(t))return void this._setObjectToTarget(e,t,o);const i=t.split(".");t=i.pop();for(const t of i)(0,a.Z)(e[t])||(e[t]={}),e=e[t];if((0,a.Z)(s))return(0,a.Z)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,s,o);o&&void 0!==e[t]||(e[t]=s)}_getFromSource(e,t){const s=t.split(".");t=s.pop();for(const t of s){if(!(0,a.Z)(e[t])){e=null;break}e=e[t]}return e?h(e[t]):void 0}_setObjectToTarget(e,t,s){Object.keys(t).forEach((o=>{this._setToTarget(e,o,t[o],s)}))}}function h(e){return(0,c.Z)(e,u)}function u(e){return(0,l.Z)(e)?e:void 0}var p=s("./packages/ckeditor5-utils/src/collection.ts"),g=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),f=s("./packages/ckeditor5-utils/src/emittermixin.ts"),m=s("./packages/ckeditor5-utils/src/mix.ts");class k{constructor(e,t=[],s=[]){this._context=e,this._plugins=new Map,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of s)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new g.ZP("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],s=[]){const o=this,i=this._context;!function e(t,s=new Set){t.forEach((t=>{a(t)&&(s.has(t)||(s.add(t),t.pluginName&&!o._availablePlugins.has(t.pluginName)&&o._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,s)))}))}(e),h(e);const r=[...function e(t,s=new Set){return t.map((e=>a(e)?e:o._availablePlugins.get(e))).reduce(((t,o)=>s.has(o)?t:(s.add(o),o.requires&&(h(o.requires,o),e(o.requires,s).forEach((e=>t.add(e)))),t.add(o))),new Set)}(e.filter((e=>!l(e,t))))];!function(e,t){for(const s of t){if("function"!=typeof s)throw new g.ZP("plugincollection-replace-plugin-invalid-type",null,{pluginItem:s});const t=s.pluginName;if(!t)throw new g.ZP("plugincollection-replace-plugin-missing-name",null,{pluginItem:s});if(s.requires&&s.requires.length)throw new g.ZP("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const i=o._availablePlugins.get(t);if(!i)throw new g.ZP("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(i);if(-1===r){if(o._contextPlugins.has(i))return;throw new g.ZP("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(i.requires&&i.requires.length)throw new g.ZP("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,s),o._availablePlugins.set(t,s)}}(r,s);const n=function(e){return e.map((e=>{const t=o._contextPlugins.get(e)||new e(i);return o._add(e,t),t}))}(r);return u(n,"init").then((()=>u(n,"afterInit"))).then((()=>n));function a(e){return"function"==typeof e}function c(e){return a(e)&&e.isContextPlugin}function l(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function h(e,s=null){e.map((e=>a(e)?e:o._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new g.ZP("plugincollection-soft-required",i,{missingPlugin:e,requiredBy:d(t)});throw new g.ZP("plugincollection-plugin-not-found",i,{plugin:e})}(e,s),function(e,t){if(!c(t))return;if(c(e))return;throw new g.ZP("plugincollection-context-required",i,{plugin:d(e),requiredBy:d(t)})}(e,s),function(e,s){if(!s)return;if(!l(e,t))return;throw new g.ZP("plugincollection-required",i,{plugin:d(e),requiredBy:d(s)})}(e,s)}))}function u(e,t){return e.reduce(((e,s)=>s[t]?o._contextPlugins.has(s)?e:e.then(s[t].bind(s)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const s=e.pluginName;if(s){if(this._plugins.has(s))throw new g.ZP("plugincollection-plugin-name-conflict",null,{pluginName:s,plugin1:this._plugins.get(s).constructor,plugin2:e});this._plugins.set(s,t)}}}(0,m.Z)(k,f.ZP);var b=s("./packages/ckeditor5-utils/src/locale.ts");class _{constructor(e){this.config=new d(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new k(this,t);const s=this.config.get("language")||{};this.locale=new b.Z({uiLanguage:"string"==typeof s?s:s.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new p.Z,this._contextOwner=null}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const s of e.concat(t)){if("function"!=typeof s)throw new g.ZP("context-initplugins-constructor-only",null,{Plugin:s});if(!0!==s.isContextPlugin)throw new g.ZP("context-initplugins-invalid-plugin",null,{Plugin:s})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new g.ZP("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const s=new this(e);t(s.initPlugins().then((()=>s)))}))}}var w=s("./packages/ckeditor5-core/src/contextplugin.js"),v=s("./packages/ckeditor5-engine/src/controller/editingcontroller.ts");class y{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const s=this.get(e);if(!s)throw new g.ZP("commandcollection-command-not-found",this,{commandName:e});return s.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}var Z=s("./packages/ckeditor5-engine/src/controller/datacontroller.ts"),P=s("./packages/ckeditor5-engine/src/conversion/conversion.ts"),x=s("./packages/ckeditor5-engine/src/model/model.ts"),T=s("./packages/ckeditor5-utils/src/keystrokehandler.ts");class A extends T.Z{constructor(e){super(),this.editor=e}set(e,t,s={}){if("string"==typeof t){const e=t;t=(t,s)=>{this.editor.execute(e),s()}}super.set(e,t,s)}}var C=s("./packages/ckeditor5-utils/src/observablemixin.ts"),E=s("./packages/ckeditor5-engine/src/view/stylesmap.ts");class S{constructor(e={}){const t=e.language||this.constructor.defaultConfig&&this.constructor.defaultConfig.language;this._context=e.context||new _({language:t}),this._context._addEditor(this,!e.context);const s=Array.from(this.constructor.builtinPlugins||[]);this.config=new d(e,this.constructor.defaultConfig),this.config.define("plugins",s),this.config.define(this._context._getEditorConfig()),this.plugins=new k(this,s,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new y,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new x.Z;const o=new E.A;this.data=new Z.Z(this.model,o),this.editing=new v.Z(this.model,o),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new P.Z([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new A(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new g.ZP("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new g.ZP("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new g.ZP("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),s=e.get("removePlugins")||[],o=e.get("extraPlugins")||[],i=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(o),s,i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(...e){try{return this.commands.execute(...e)}catch(e){g.ZP.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}}(0,m.Z)(S,C.Z);class j{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(O(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new g.ZP("componentfactory-item-missing",this,{name:e});return this._components.get(O(e)).callback(this.editor.locale)}has(e){return this._components.has(O(e))}}function O(e){return String(e).toLowerCase()}var R=s("./packages/ckeditor5-utils/src/focustracker.ts"),M=s("./packages/ckeditor5-ui/src/tooltipmanager.js"),N=s("./packages/ckeditor5-utils/src/dom/isvisible.ts");class V{constructor(e){this.editor=e,this.componentFactory=new j(e),this.focusTracker=new R.Z,this.tooltipManager=new M.Z(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.isReady=!1,this.once("ready",(()=>{this.isReady=!0})),this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.listenTo(e.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor);for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const s=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?s():this.once("ready",s)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const s=e.config.get("toolbar.viewportTopOffset");return s?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:s}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let s,o;e.keystrokes.set("Alt+F10",((e,i)=>{const r=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(r)&&!Array.from(t.domRoots.values()).includes(r)&&(s=r);const n=this._getCurrentFocusedToolbarDefinition();n&&o||(o=this._getFocusableCandidateToolbarDefinitions(n));for(let e=0;e{const i=this._getCurrentFocusedToolbarDefinition();i&&(s?(s.focus(),s=null):e.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),o())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:s,options:o}=t;((0,N.Z)(s.element)||o.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>I(e)-I(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:s}}=e;return s&&s(),!!(0,N.Z)(t.element)&&(t.focus(),!0)}}function I(e){const{toolbarView:t,options:s}=e;let o=10;return(0,N.Z)(t.element)&&o--,s.isContextual&&o--,o}(0,m.Z)(V,C.Z);var D=s("./node_modules/lodash-es/isFunction.js");function z(e){if(!(0,D.Z)(e.updateSourceElement))throw new g.ZP("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(t&&"textarea"===t.tagName.toLowerCase()&&t.form){let s;const o=t.form,i=()=>e.updateSourceElement();(0,D.Z)(o.submit)&&(s=o.submit,o.submit=()=>{i(),s.apply(o)}),o.addEventListener("submit",i),e.on("destroy",(()=>{o.removeEventListener("submit",i),s&&(o.submit=s)}))}}const B={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}};var F=s("./packages/ckeditor5-utils/src/dom/setdatainelement.ts");const L={updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new g.ZP("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),s=this.sourceElement instanceof HTMLTextAreaElement;t||s?(0,F.Z)(this.sourceElement,e):(0,F.Z)(this.sourceElement,"")}};function W(e){const t=e.sourceElement;if(t){if(t.ckeditorInstance)throw new g.ZP("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}}var $=s("./packages/ckeditor5-core/src/pendingactions.js");var q=s("./packages/ckeditor5-core/theme/icons/pilcrow.svg");var H=s("./packages/ckeditor5-core/theme/icons/three-vertical-dots.svg");const U={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:s("./packages/ckeditor5-core/theme/icons/paragraph.svg").Z,plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:q.Z,quote:'',threeVerticalDots:H.Z}},"./packages/ckeditor5-core/src/pendingactions.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-core/src/contextplugin.js"),i=s("./packages/ckeditor5-utils/src/observablemixin.ts"),r=s("./packages/ckeditor5-utils/src/collection.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class a extends o.Z{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new r.Z({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new n.ZP("pendingactions-add-invalid-message",this);const t=Object.create(i.Z);return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}},"./packages/ckeditor5-core/src/plugin.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts"),i=s("./packages/ckeditor5-utils/src/mix.ts");class r{constructor(e){this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",n,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",n),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function n(e){e.return=!1,e.stop()}(0,i.Z)(r,o.Z)},"./packages/ckeditor5-enter/src/enter.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-core/src/command.js"),r=s("./packages/ckeditor5-enter/src/utils.js");class n extends i.Z{execute(){const e=this.editor.model,t=e.document;e.change((s=>{!function(e,t,s,o){const i=s.isCollapsed,n=s.getFirstRange(),c=n.start.parent,l=n.end.parent;if(o.isLimit(c)||o.isLimit(l))return void(i||c!=l||e.deleteContent(s));if(i){const e=(0,r.G)(t.model.schema,s.getAttributes());a(t,n.start),t.setSelectionAttribute(e)}else{const o=!(n.start.isAtStart&&n.end.isAtEnd),i=c==l;e.deleteContent(s,{leaveUnmerged:o}),o&&(i?a(t,s.focus):t.setSelection(l,0))}}(this.editor.model,s,t.selection,e.schema),this.fire("afterExecute",{writer:s})}))}}function a(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var c=s("./packages/ckeditor5-enter/src/enterobserver.js");class l extends o.Z{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,s=t.document;t.addObserver(c.Z),e.commands.add("enter",new n(e)),this.listenTo(s,"enter",((s,o)=>{o.preventDefault(),o.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}},"./packages/ckeditor5-enter/src/enterobserver.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),i=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),r=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts"),n=s("./packages/ckeditor5-utils/src/keyboard.ts");class a extends o.Z{constructor(e){super(e);const t=this.document;t.on("keydown",((e,s)=>{if(this.isEnabled&&s.keyCode==n.Do.enter){const o=new r.Z(t,"enter",t.selection.getFirstRange());t.fire(o,new i.Z(t,s.domEvent,{isSoft:s.shiftKey})),o.stop.called&&e.stop()}}))}observe(){}}},"./packages/ckeditor5-enter/src/utils.js":(e,t,s)=>{"use strict";function*o(e,t){for(const s of t)s&&e.getAttributeProperties(s[0]).copyOnEnter&&(yield s)}s.d(t,{G:()=>o})},"./packages/ckeditor5-typing/src/delete.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>f});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-core/src/command.js"),r=s("./packages/ckeditor5-utils/src/count.ts"),n=s("./packages/ckeditor5-typing/src/utils/changebuffer.js");class a extends i.Z{constructor(e,t){super(e),this.direction=t,this._buffer=new n.Z(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,s=t.document;t.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const i=o.createSelection(e.selection||s.selection),n=e.sequence||1,a=i.isCollapsed;if(i.isCollapsed&&t.modifySelection(i,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(n))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(i,n))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let c=0;i.getFirstRange().getMinimalFlatRanges().forEach((e=>{c+=(0,r.Z)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(i,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),o.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,s=t.document.selection,o=t.schema.getLimitElement(s);if(!(s.isCollapsed&&s.containsEntireContent(o)))return!1;if(!t.schema.checkChild(o,"paragraph"))return!1;const i=o.getChild(0);return!i||"paragraph"!==i.name}_replaceEntireContentWithParagraph(e){const t=this.editor.model,s=t.document.selection,o=t.schema.getLimitElement(s),i=e.createElement("paragraph");e.remove(e.createRangeIn(o)),e.insert(i,o),e.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const s=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const o=e.getFirstPosition(),i=s.schema.getLimitElement(o),r=i.getChild(0);return o.parent==r&&(!!e.containsEntireContent(r)&&(!!s.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}var c=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),l=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),d=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts"),h=s("./packages/ckeditor5-utils/src/keyboard.ts"),u=s("./packages/ckeditor5-utils/src/env.ts"),p=s("./packages/ckeditor5-typing/src/utils/utils.js");class g extends c.Z{constructor(e){super(e);const t=e.document;let s=0;function o(e,s,o){const i=new d.Z(t,"delete",t.selection.getFirstRange());t.fire(i,new l.Z(t,s,o)),i.stop.called&&e.stop()}t.on("keyup",((e,t)=>{t.keyCode!=h.Do.delete&&t.keyCode!=h.Do.backspace||(s=0)})),t.on("keydown",((e,i)=>{if(u.ZP.isWindows&&(0,p.Uw)(i,t))return;const r={};if(i.keyCode==h.Do.delete)r.direction="forward",r.unit="character";else{if(i.keyCode!=h.Do.backspace)return;r.direction="backward",r.unit="codePoint"}const n=u.ZP.isMac?i.altKey:i.ctrlKey;r.unit=n?"word":r.unit,r.sequence=++s,o(e,i.domEvent,r)})),u.ZP.isAndroid&&t.on("beforeinput",((t,s)=>{if("deleteContentBackward"!=s.domEvent.inputType)return;const i={unit:"codepoint",direction:"backward",sequence:1},r=s.domTarget.ownerDocument.defaultView.getSelection();r.anchorNode==r.focusNode&&r.anchorOffset+1!=r.focusOffset&&(i.selectionToRemove=e.domConverter.domSelectionToView(r)),o(t,s.domEvent,i)}))}observe(){}}class f extends o.Z{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,s=t.document,o=e.model.document;t.addObserver(g),this._undoOnBackspace=!1;const i=new a(e,"forward");if(e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new a(e,"backward")),this.listenTo(s,"delete",((s,o)=>{const i={unit:o.unit,sequence:o.sequence};if(o.selectionToRemove){const t=e.model.createSelection(),s=[];for(const t of o.selectionToRemove.getRanges())s.push(e.editing.mapper.toModelRange(t));t.setTo(s),i.selection=t}e.execute("forward"==o.direction?"deleteForward":"delete",i),o.preventDefault(),t.scrollToTheSelection()}),{priority:"low"}),u.ZP.isAndroid){let e=null;this.listenTo(s,"delete",((t,s)=>{const o=s.domTarget.ownerDocument.defaultView.getSelection();e={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}}),{priority:"lowest"}),this.listenTo(s,"keyup",((t,s)=>{if(e){const t=s.domTarget.ownerDocument.defaultView.getSelection();t.collapse(e.anchorNode,e.anchorOffset),t.extend(e.focusNode,e.focusOffset),e=null}}))}this.editor.plugins.has("UndoEditing")&&(this.listenTo(s,"delete",((t,s)=>{this._undoOnBackspace&&"backward"==s.direction&&1==s.sequence&&"codePoint"==s.unit&&(this._undoOnBackspace=!1,e.execute("undo"),s.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}},"./packages/ckeditor5-typing/src/utils/changebuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e,t=20){this.model=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}input(e){this.size+=e,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e){this.isLocked&&!e||(this._batch=null,this.size=0)}}},"./packages/ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n,u:()=>c});var o=s("./packages/ckeditor5-utils/src/keyboard.ts"),i=s("./packages/ckeditor5-utils/src/env.ts"),r=s("./packages/ckeditor5-typing/src/utils/utils.js");function n(e){let t=null;const s=e.model,o=e.editing.view,n=e.commands.get("input");function a(e){if(i.ZP.isWindows&&(0,r.Uw)(e,o.document))return;const a=s.document,d=o.document.isComposing,h=t&&t.isEqual(a.selection);t=null,n.isEnabled&&(c(e)||a.selection.isCollapsed||d&&229===e.keyCode||!d&&229===e.keyCode&&h||l())}function l(){const e=n.buffer;e.lock();const t=e.batch;s.enqueueChange(t,(()=>{s.deleteContent(s.document.selection)})),e.unlock()}i.ZP.isAndroid?o.document.on("beforeinput",((e,t)=>a(t)),{priority:"lowest"}):o.document.on("keydown",((e,t)=>a(t)),{priority:"lowest"}),o.document.on("compositionstart",(function(){const e=s.document,t=1!==e.selection.rangeCount||e.selection.getFirstRange().isFlat;if(e.selection.isCollapsed||t)return;l()}),{priority:"lowest"}),o.document.on("compositionend",(()=>{t=s.createSelection(s.document.selection)}),{priority:"lowest"})}const a=[(0,o.Cq)("arrowUp"),(0,o.Cq)("arrowRight"),(0,o.Cq)("arrowDown"),(0,o.Cq)("arrowLeft"),9,16,17,18,19,20,27,33,34,35,36,45,91,93,144,145,173,174,175,176,177,178,179,255];for(let e=112;e<=135;e++)a.push(e);function c(e){return!(!e.ctrlKey&&!e.metaKey)||a.includes(e.keyCode)}},"./packages/ckeditor5-typing/src/utils/utils.js":(e,t,s)=>{"use strict";s.d(t,{E9:()=>r,xG:()=>n,Uw:()=>c});var o=s("./packages/ckeditor5-utils/src/diff.ts");var i=s("./packages/ckeditor5-utils/src/keyboard.ts");function r(e){if(0==e.length)return!1;for(const t of e)if("children"===t.type&&!n(t))return!0;return!1}function n(e){if(e.newChildren.length-e.oldChildren.length!=1)return;const t=function(e,t){const s=[];let o=0,i=null;return e.forEach((e=>{"equal"==e?(r(),o++):"insert"==e?(i&&"insert"==i.type?i.values.push(t[o]):(r(),i={type:"insert",index:o,values:[t[o]]}),o++):i&&"delete"==i.type?i.howMany++:(r(),i={type:"delete",index:o,howMany:1})})),r(),s;function r(){i&&(s.push(i),i=null)}}((0,o.Z)(e.oldChildren,e.newChildren,a),e.newChildren);if(t.length>1)return;const s=t[0];return s.values[0]&&s.values[0].is("$text")?s:void 0}function a(e,t){return e&&e.is("$text")&&t&&t.is("$text")?e.data===t.data:e===t}function c(e,t){const s=t.selection,o=e.shiftKey&&e.keyCode===i.Do.delete,r=!s.isCollapsed;return o&&r}},"./packages/ckeditor5-ui/src/bindings/clickoutsidehandler.js":(e,t,s)=>{"use strict";function o({emitter:e,activator:t,callback:s,contextElements:o}){e.listenTo(document,"mousedown",((e,i)=>{if(!t())return;const r="function"==typeof i.composedPath?i.composedPath():[];for(const e of o)if(e.contains(i.target)||r.includes(e))return;s()}))}s.d(t,{Z:()=>o})},"./packages/ckeditor5-ui/src/button/buttonview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-ui/src/icon/iconview.js"),r=s("./packages/ckeditor5-utils/src/uid.ts"),n=s("./packages/ckeditor5-utils/src/keyboard.ts"),a=s("./packages/ckeditor5-utils/src/env.ts"),c=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),l=s.n(c),d=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css"),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(d.Z,h);d.Z.locals;class u extends o.Z{constructor(e){super(e);const t=this.bindTemplate,s=(0,r.Z)();this.set("class"),this.set("labelStyle"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(s),this.iconView=new i.Z,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const o={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("isVisible","ck-hidden",(e=>!e)),t.to("isOn",(e=>e?"ck-on":"ck-off")),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",(e=>e||"button")),tabindex:t.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${s}`,"aria-disabled":t.if("isEnabled",!0,(e=>!e)),"aria-pressed":t.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};a.ZP.isSafari&&(o.on.mousedown=t.to((e=>{this.focus(),e.preventDefault()}))),this.setTemplate(o)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createLabelView(e){const t=new o.Z,s=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:s.to("labelStyle"),id:`ck-editor__aria-label_${e}`},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new o.Z;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>(0,n.XU)(e)))}]}),e}_getTooltipString(e,t,s){return e?"string"==typeof e?e:(s&&(s=(0,n.XU)(s)),e instanceof Function?e(t,s):`${t}${s?` (${s})`:""}`):""}}},"./packages/ckeditor5-ui/src/button/switchbuttonview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-ui/src/button/buttonview.js"),r=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),n=s.n(r),a=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css"),c={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n()(a.Z,c);a.Z.locals;class l extends i.Z{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new o.Z;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}},"./packages/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-ui/src/button/buttonview.js"),i=s("./packages/ckeditor5-ui/theme/icons/dropdown-arrow.svg"),r=s("./packages/ckeditor5-ui/src/icon/iconview.js");class n extends o.Z{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new r.Z;return e.content=i.Z,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}},"./packages/ckeditor5-ui/src/dropdown/utils.js":(e,t,s)=>{"use strict";s.d(t,{Pm:()=>C,up:()=>A,t9:()=>T,Mh:()=>E});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to((e=>e.preventDefault()))}})}focus(){this.children.length&&("function"==typeof this.children.first.focus?this.children.first.focus():(0,i.KE)("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this}))}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var n=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),a=s("./packages/ckeditor5-utils/src/index.ts"),c=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),l=s.n(c),d=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css"),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(d.Z,h);d.Z.locals;var u=s("./packages/ckeditor5-utils/src/dom/position.ts");class p extends o.Z{constructor(e,t,s){super(e);const o=this.bindTemplate;this.buttonView=t,this.panelView=s,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("id"),this.set("panelPosition","auto"),this.keystrokes=new n.Z,this.focusTracker=new a.Rh,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",(e=>!e))],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[t,s]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":o.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((e,t,s)=>{s&&("auto"===this.panelPosition?this.panelView.position=p._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:s,southWest:o,northEast:i,northWest:r,southMiddleEast:n,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=p.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[s,o,n,a,e,i,r,c,l,t]:[o,s,a,n,e,r,i,l,c,t]}}p.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},p._getOptimalPosition=u.x;var g=s("./packages/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js"),f=s("./packages/ckeditor5-ui/src/toolbar/toolbarview.js"),m=s("./packages/ckeditor5-ui/src/list/listview.js"),k=s("./packages/ckeditor5-ui/src/list/listitemview.js");class b extends o.Z{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var _=s("./packages/ckeditor5-ui/src/button/buttonview.js"),w=s("./packages/ckeditor5-ui/src/button/switchbuttonview.js"),v=s("./packages/ckeditor5-ui/src/bindings/clickoutsidehandler.js"),y=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"),Z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(y.Z,Z);y.Z.locals;var P=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css"),x={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(P.Z,x);P.Z.locals;function T(e,t=g.Z){const s=new t(e),o=new r(e),i=new p(e,s,o);return s.bind("isEnabled").to(i),s instanceof g.Z?s.bind("isOn").to(i,"isOpen"):s.arrowView.bind("isOn").to(i,"isOpen"),function(e){(function(e){e.on("render",(()=>{(0,v.Z)({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof w.Z||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,s,o)=>{e.isOpen&&!o&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,s)=>{e.isOpen&&(e.panelView.focus(),s())})),e.keystrokes.set("arrowup",((t,s)=>{e.isOpen&&(e.panelView.focusLast(),s())}))}(e),function(e){e.on("change:isOpen",((t,s,o)=>{o||e.panelView.element.contains(a.CO.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,s,o)=>{o&&e.panelView.focus()}),{priority:"low"})}(e)}(i),i}function A(e,t,s={}){const o=e.locale,i=o.t,r=e.toolbarView=new f.Z(o);r.set("ariaLabel",i("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map((e=>r.items.add(e))),s.enableActiveItemFocusOnDropdownOpen&&E(e,(()=>r.items.find((e=>e.isOn)))),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function C(e,t){const s=e.locale,o=e.listView=new m.Z(s);o.items.bindTo(t).using((({type:e,model:t})=>{if("separator"===e)return new b(s);if("button"===e||"switchbutton"===e){const o=new k.Z(s);let i;return i="button"===e?new _.Z(s):new w.Z(s),i.bind(...Object.keys(t)).to(t),i.delegate("execute").to(o),o.children.add(i),o}})),e.panelView.children.add(o),o.items.delegate("execute").to(e),E(e,(()=>o.items.find((e=>e instanceof k.Z&&e.children.first.isOn))))}function E(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const s=t();s&&("function"==typeof s.focus?s.focus():(0,a.KE)("ui-dropdown-focus-child-on-open-child-missing-focus",{view:s}))}),{priority:a.tA.low-10})}},"./packages/ckeditor5-ui/src/focuscycler.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/dom/isvisible.ts");class i{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let s=e.actions[t];"string"==typeof s&&(s=[s]);for(const o of s)e.keystrokeHandler.set(o,((e,s)=>{this[t](),s()}))}}get first(){return this.focusables.find(r)||null}get last(){return this.focusables.filter(r).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,s)=>{const o=t.element===this.focusTracker.focusedElement;return o&&(e=s),o})),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,s=this.focusables.length;if(!s)return null;if(null===t)return this[1===e?"first":"last"];let o=(t+s+e)%s;do{const t=this.focusables.get(o);if(r(t))return t;o=(o+s+e)%s}while(o!==t);return null}}function r(e){return!(!e.focus||!(0,o.Z)(e.element))}},"./packages/ckeditor5-ui/src/icon/iconview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),r=s.n(i),n=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css"),a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};r()(n.Z,a);n.Z.locals;class c extends o.Z{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon"],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");for(t&&(this.viewBox=t);this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}},"./packages/ckeditor5-ui/src/list/listitemview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-ui/src/view.js");class i extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){this.children.first.focus()}}},"./packages/ckeditor5-ui/src/list/listview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-utils/src/focustracker.ts"),r=s("./packages/ckeditor5-ui/src/focuscycler.js"),n=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),a=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),c=s.n(a),l=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css"),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(l.Z,d);l.Z.locals;class h extends o.Z{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new i.Z,this.keystrokes=new n.Z,this._focusCycler=new r.Z({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}},"./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>f,M:()=>k});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-utils/src/dom/position.ts"),r=s("./packages/ckeditor5-utils/src/dom/isrange.ts"),n=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),a=s("./packages/ckeditor5-utils/src/dom/global.ts"),c=s("./node_modules/lodash-es/isElement.js"),l=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=s.n(l),h=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css"),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(h.Z,u);h.Z.locals;const p=(0,n.Z)("px"),g=a.Z.document.body;class f extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class"),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",p),left:t.to("left",p)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=f.defaultPositions,s=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:g,fitInViewport:!0},e),o=f._getOptimalPosition(s),i=parseInt(o.left),r=parseInt(o.top),{name:n,config:a={}}=o,{withArrow:c=!0}=a;Object.assign(this,{top:r,left:i,position:n,withArrow:c})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=m(e.target),s=e.limiter?m(e.limiter):g;this.listenTo(a.Z.document,"scroll",((o,i)=>{const r=i.target,n=t&&r.contains(t),a=s&&r.contains(s);!n&&!a&&t&&s||this.attachTo(e)}),{useCapture:!0}),this.listenTo(a.Z.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(a.Z.document,"scroll"),this.stopListening(a.Z.window,"resize")}}function m(e){return(0,c.Z)(e)?e:(0,r.Z)(e)?e.commonAncestorContainer:"function"==typeof e?m(e()):null}function k({sideOffset:e=f.arrowSideOffset,heightOffset:t=f.arrowHeightOffset,stickyVerticalOffset:s=f.stickyVerticalOffset,config:o}={}){return{northWestArrowSouthWest:(t,s)=>({top:i(t,s),left:t.left-e,name:"arrow_sw",...o&&{config:o}}),northWestArrowSouthMiddleWest:(t,s)=>({top:i(t,s),left:t.left-.25*s.width-e,name:"arrow_smw",...o&&{config:o}}),northWestArrowSouth:(e,t)=>({top:i(e,t),left:e.left-t.width/2,name:"arrow_s",...o&&{config:o}}),northWestArrowSouthMiddleEast:(t,s)=>({top:i(t,s),left:t.left-.75*s.width+e,name:"arrow_sme",...o&&{config:o}}),northWestArrowSouthEast:(t,s)=>({top:i(t,s),left:t.left-s.width+e,name:"arrow_se",...o&&{config:o}}),northArrowSouthWest:(t,s)=>({top:i(t,s),left:t.left+t.width/2-e,name:"arrow_sw",...o&&{config:o}}),northArrowSouthMiddleWest:(t,s)=>({top:i(t,s),left:t.left+t.width/2-.25*s.width-e,name:"arrow_smw",...o&&{config:o}}),northArrowSouth:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...o&&{config:o}}),northArrowSouthMiddleEast:(t,s)=>({top:i(t,s),left:t.left+t.width/2-.75*s.width+e,name:"arrow_sme",...o&&{config:o}}),northArrowSouthEast:(t,s)=>({top:i(t,s),left:t.left+t.width/2-s.width+e,name:"arrow_se",...o&&{config:o}}),northEastArrowSouthWest:(t,s)=>({top:i(t,s),left:t.right-e,name:"arrow_sw",...o&&{config:o}}),northEastArrowSouthMiddleWest:(t,s)=>({top:i(t,s),left:t.right-.25*s.width-e,name:"arrow_smw",...o&&{config:o}}),northEastArrowSouth:(e,t)=>({top:i(e,t),left:e.right-t.width/2,name:"arrow_s",...o&&{config:o}}),northEastArrowSouthMiddleEast:(t,s)=>({top:i(t,s),left:t.right-.75*s.width+e,name:"arrow_sme",...o&&{config:o}}),northEastArrowSouthEast:(t,s)=>({top:i(t,s),left:t.right-s.width+e,name:"arrow_se",...o&&{config:o}}),southWestArrowNorthWest:(t,s)=>({top:r(t),left:t.left-e,name:"arrow_nw",...o&&{config:o}}),southWestArrowNorthMiddleWest:(t,s)=>({top:r(t),left:t.left-.25*s.width-e,name:"arrow_nmw",...o&&{config:o}}),southWestArrowNorth:(e,t)=>({top:r(e),left:e.left-t.width/2,name:"arrow_n",...o&&{config:o}}),southWestArrowNorthMiddleEast:(t,s)=>({top:r(t),left:t.left-.75*s.width+e,name:"arrow_nme",...o&&{config:o}}),southWestArrowNorthEast:(t,s)=>({top:r(t),left:t.left-s.width+e,name:"arrow_ne",...o&&{config:o}}),southArrowNorthWest:(t,s)=>({top:r(t),left:t.left+t.width/2-e,name:"arrow_nw",...o&&{config:o}}),southArrowNorthMiddleWest:(t,s)=>({top:r(t),left:t.left+t.width/2-.25*s.width-e,name:"arrow_nmw",...o&&{config:o}}),southArrowNorth:(e,t)=>({top:r(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...o&&{config:o}}),southArrowNorthMiddleEast:(t,s)=>({top:r(t),left:t.left+t.width/2-.75*s.width+e,name:"arrow_nme",...o&&{config:o}}),southArrowNorthEast:(t,s)=>({top:r(t),left:t.left+t.width/2-s.width+e,name:"arrow_ne",...o&&{config:o}}),southEastArrowNorthWest:(t,s)=>({top:r(t),left:t.right-e,name:"arrow_nw",...o&&{config:o}}),southEastArrowNorthMiddleWest:(t,s)=>({top:r(t),left:t.right-.25*s.width-e,name:"arrow_nmw",...o&&{config:o}}),southEastArrowNorth:(e,t)=>({top:r(e),left:e.right-t.width/2,name:"arrow_n",...o&&{config:o}}),southEastArrowNorthMiddleEast:(t,s)=>({top:r(t),left:t.right-.75*s.width+e,name:"arrow_nme",...o&&{config:o}}),southEastArrowNorthEast:(t,s)=>({top:r(t),left:t.right-s.width+e,name:"arrow_ne",...o&&{config:o}}),westArrowEast:(e,s)=>({top:e.top+e.height/2-s.height/2,left:e.left-s.width-t,name:"arrow_e",...o&&{config:o}}),eastArrowWest:(e,s)=>({top:e.top+e.height/2-s.height/2,left:e.right+t,name:"arrow_w",...o&&{config:o}}),viewportStickyNorth:(e,t,i)=>e.getIntersection(i)?{top:i.top+s,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...o}}:null};function i(e,s){return e.top-s.height-t}function r(e){return e.bottom+t}}f.arrowSideOffset=25,f.arrowHeightOffset=10,f.stickyVerticalOffset=20,f._getOptimalPosition=i.x,f.defaultPositions=k()},"./packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.js"),r=s("./packages/ckeditor5-ui/src/view.js"),n=s("./packages/ckeditor5-ui/src/button/buttonview.js"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),c=s("./packages/ckeditor5-utils/src/focustracker.ts"),l=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),d=s("./packages/ckeditor5-utils/src/dom/rect.ts");var h=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),u=s.n(h),p=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css"),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};u()(p.Z,g);p.Z.locals;var f=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css"),m={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};u()(f.Z,m);f.Z.locals;const k=(0,l.Z)("px");class b extends o.Z{static get pluginName(){return"ContextualBalloon"}constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new i.Z(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new a.ZP("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const s=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),s.set(e.view,e),this._viewToStack.set(e.view,s),s===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new a.ZP("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new a.ZP("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new _(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,s)=>{if(s<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[o,s])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new w(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:s=!0,singleViewMode:o=!1}){this.view.class=t,this.view.withArrow=s,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class _ extends r.Z{constructor(e){super(e);const t=e.t,s=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new c.Z,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",s.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:s.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const s=new n.Z(this.locale);return s.set({label:e,icon:t,tooltip:!0}),s}}class w extends r.Z{constructor(e,t){super(e);const s=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",s.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:s.to("top",k),left:s.to("left",k),width:s.to("width",k),height:s.to("height",k)}},children:this.content}),this.on("change:numberOfPanels",((e,t,s,o)=>{s>o?this._addPanels(s-o):this._removePanels(o-s),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new r.Z;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:s,height:o}=new d.Z(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:s,height:o})}}}},"./packages/ckeditor5-ui/src/template.js":(e,t,s)=>{"use strict";s.d(t,{ZP:()=>u});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/mix.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts"),n=s("./packages/ckeditor5-ui/src/view.js"),a=s("./packages/ckeditor5-ui/src/viewcollection.js"),c=s("./packages/ckeditor5-utils/src/dom/isnode.ts"),l=s("./node_modules/lodash-es/isObject.js"),d=s("./node_modules/lodash-es/cloneDeepWith.js"),h=s("./packages/ckeditor5-utils/src/toarray.ts");class u{constructor(e){Object.assign(this,y(v(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new o.ZP("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const s of t.children)C(s)?yield s:E(s)&&(yield*e(s))}(this)}static bind(e,t){return{to:(s,o)=>new g({eventNameOrFunction:s,attribute:s,observable:e,emitter:t,callback:o}),if:(s,o,i)=>new f({observable:e,emitter:t,attribute:s,valueIfTrue:o,callback:i})}}static extend(e,t){if(e._isRendered)throw new o.ZP("template-extend-render",[this,e]);T(e,y(v(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new o.ZP("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),m(this.text)?this._bindToObservable({schema:this.text,updater:b(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){let t,s,o,i;if(!this.attributes)return;const r=e.node,n=e.revertData;for(t in this.attributes)if(o=r.getAttribute(t),s=this.attributes[t],n&&(n.attributes[t]=o),i=(0,l.Z)(s[0])&&s[0].ns?s[0].ns:null,m(s)){const a=i?s[0].value:s;n&&j(t)&&a.unshift(o),this._bindToObservable({schema:a,updater:_(r,t,i),data:e})}else"style"==t&&"string"!=typeof s[0]?this._renderStyleAttribute(s[0],e):(n&&o&&j(t)&&s.unshift(o),s=s.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(P,""),A(s)||r.setAttributeNS(i,t,s))}_renderStyleAttribute(e,t){const s=t.node;for(const o in e){const i=e[o];m(i)?this._bindToObservable({schema:[i],updater:w(s,o),data:t}):s.style[o]=i}}_renderElementChildren(e){const t=e.node,s=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let i=0;for(const r of this.children)if(S(r)){if(!o){r.setParent(t);for(const e of r)s.appendChild(e.element)}}else if(C(r))o||(r.isRendered||r.render(),s.appendChild(r.element));else if((0,c.Z)(r))s.appendChild(r);else if(o){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({node:s.childNodes[i++],isApplying:!0,revertData:t})}else s.appendChild(r.render());e.intoFragment&&t.appendChild(s)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const s=this.eventListeners[t].map((s=>{const[o,i]=t.split("@");return s.activateDomEventListener(o,i,e)}));e.revertData&&e.revertData.bindings.push(s)}}_bindToObservable({schema:e,updater:t,data:s}){const o=s.revertData;k(e,t,s);const i=e.filter((e=>!A(e))).filter((e=>e.observable)).map((o=>o.activateAttributeListener(e,t,s)));o&&o.bindings.push(i)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)e.textContent=t.text;else{for(const s in t.attributes){const o=t.attributes[s];null===o?e.removeAttribute(s):e.setAttribute(s,o)}for(let s=0;sk(e,t,s);return this.emitter.listenTo(this.observable,"change:"+this.attribute,o),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,o)}}}class g extends p{activateDomEventListener(e,t,s){const o=(e,s)=>{t&&!s.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(s):this.observable.fire(this.eventNameOrFunction,s))};return this.emitter.listenTo(s.node,e,o),()=>{this.emitter.stopListening(s.node,e,o)}}}class f extends p{getValue(e){return!A(super.getValue(e))&&(this.valueIfTrue||!0)}}function m(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(m):e instanceof p)}function k(e,t,{node:s}){let o=function(e,t){return e.map((e=>e instanceof p?e.getValue(t):e))}(e,s);o=1==e.length&&e[0]instanceof f?o[0]:o.reduce(P,""),A(o)?t.remove():t.set(o)}function b(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function _(e,t,s){return{set(o){e.setAttributeNS(s,t,o)},remove(){e.removeAttributeNS(s,t)}}}function w(e,t){return{set(s){e.style[t]=s},remove(){e.style[t]=null}}}function v(e){return(0,d.Z)(e,(e=>{if(e&&(e instanceof p||E(e)||C(e)||S(e)))return e}))}function y(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=(0,h.Z)(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)Z(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=(0,h.Z)(e[t].value)),Z(e,t)}(e.attributes);const t=[];if(e.children)if(S(e.children))t.push(e.children);else for(const s of e.children)E(s)||C(s)||(0,c.Z)(s)?t.push(s):t.push(new u(s));e.children=t}return e}function Z(e,t){e[t]=(0,h.Z)(e[t])}function P(e,t){return A(t)?e:A(e)?t:`${e} ${t}`}function x(e,t){for(const s in t)e[s]?e[s].push(...t[s]):e[s]=t[s]}function T(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),x(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),x(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new o.ZP("ui-template-extend-children-mismatch",e);let s=0;for(const o of t.children)T(e.children[s++],o)}}function A(e){return!e&&0!==e}function C(e){return e instanceof n.Z}function E(e){return e instanceof u}function S(e){return e instanceof a.Z}function j(e){return"class"==e||"style"==e}},"./packages/ckeditor5-ui/src/toolbar/normalizetoolbarconfig.js":(e,t,s)=>{"use strict";function o(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}s.d(t,{Z:()=>o})},"./packages/ckeditor5-ui/src/toolbar/toolbarseparatorview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-ui/src/view.js");class i extends o.Z{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}},"./packages/ckeditor5-ui/src/toolbar/toolbarview.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>x});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-utils/src/focustracker.ts"),r=s("./packages/ckeditor5-ui/src/focuscycler.js"),n=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),a=s("./packages/ckeditor5-ui/src/toolbar/toolbarseparatorview.js");class c extends o.Z{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var l=s("./packages/ckeditor5-utils/src/dom/resizeobserver.ts");function d(e){return e.bindTemplate.to((t=>{t.target===e.element&&t.preventDefault()}))}var h=s("./packages/ckeditor5-utils/src/dom/rect.ts"),u=s("./packages/ckeditor5-utils/src/dom/isvisible.ts"),p=s("./packages/ckeditor5-utils/src/dom/global.ts"),g=s("./packages/ckeditor5-ui/src/dropdown/utils.js"),f=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),m=s("./packages/ckeditor5-ui/src/toolbar/normalizetoolbarconfig.js"),k=s("./node_modules/lodash-es/isObject.js"),b=s("./packages/ckeditor5-core/theme/icons/three-vertical-dots.svg"),_=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),w=s.n(_),v=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css"),y={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};w()(v.Z,y);v.Z.locals;var Z=s("./packages/ckeditor5-core/src/index.js");const P={alignLeft:Z.ci.alignLeft,bold:Z.ci.bold,importExport:Z.ci.importExport,paragraph:Z.ci.paragraph,plus:Z.ci.plus,text:Z.ci.text,threeVerticalDots:Z.ci.threeVerticalDots};class x extends o.Z{constructor(e,t){super(e);const s=this.bindTemplate,o=this.t;this.options=t||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new i.Z,this.keystrokes=new n.Z,this.set("class"),this.set("isCompact",!1),this.itemsView=new T(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const a="rtl"===e.uiLanguageDirection;this._focusCycler=new r.Z({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[a?"arrowright":"arrowleft","arrowup"],focusNext:[a?"arrowleft":"arrowright","arrowdown"]}});const c=["ck","ck-toolbar",s.to("class"),s.if("isCompact","ck-toolbar_compact")];this.options.shouldGroupWhenFull&&this.options.isFloating&&c.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:c,role:"toolbar","aria-label":s.to("ariaLabel"),style:{maxWidth:s.to("maxWidth")}},children:this.children,on:{mousedown:d(this)}}),this._behavior=this.options.shouldGroupWhenFull?new C(this):new A(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,s){const o=(0,m.Z)(e),i=s||o.removeItems,r=this._cleanItemsConfiguration(o.items,t,i).map((e=>(0,k.Z)(e)?this._createNestedToolbarDropdown(e,t,i):"|"===e?new a.Z:"-"===e?new c:t.create(e))).filter((e=>e));this.items.addMany(r)}_cleanItemsConfiguration(e,t,s){const o=e.filter(((e,o,i)=>"|"===e||-1===s.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||((0,f.KE)("toolbarview-line-break-ignored-when-grouping-items",i),!1):!(!(0,k.Z)(e)&&!t.has(e))||((0,f.KE)("toolbarview-item-unavailable",{name:e}),!1))));return this._cleanSeparatorsAndLineBreaks(o)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,s=e.length,o=e.findIndex(t);if(-1===o)return[];const i=s-e.slice().reverse().findIndex(t);return e.slice(o,i).filter(((e,s,o)=>{if(t(e))return!0;return!(s>0&&o[s-1]===e)}))}_createNestedToolbarDropdown(e,t,s){let{label:o,icon:i,items:r,tooltip:n=!0,withText:a=!1}=e;if(r=this._cleanItemsConfiguration(r,t,s),!r.length)return null;const c=this.locale,l=(0,g.t9)(c);return o||(0,f.KE)("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:o,tooltip:n,withText:!!a}),!1!==i?l.buttonView.icon=P[i]||i||P.threeVerticalDots:l.buttonView.withText=!0,(0,g.up)(l,[]),l.toolbarView.fillFromConfig(r,t,s),l}}class T extends o.Z{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class A{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class C{constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const s=t.index;for(const e of t.removed)s>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=s;ethis.ungroupedItems.length?this.groupedItems.add(o,e-this.ungroupedItems.length):this.ungroupedItems.add(o,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!(0,u.Z)(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,s=new h.Z(e.lastChild),o=new h.Z(e);if(!this.cachedPadding){const s=p.Z.window.getComputedStyle(e),o="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(s[o])}return"ltr"===t?s.right>o.right-this.cachedPadding:s.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new a.Z),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,s=(0,g.t9)(e);return s.class="ck-toolbar__grouped-dropdown",s.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",(0,g.up)(s,[]),s.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:b.Z}),s.toolbarView.items.bindTo(this.groupedItems).using((e=>e)),s}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}},"./packages/ckeditor5-ui/src/tooltipmanager.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-ui/src/view.js"),i=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.js"),r=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),n=s("./packages/ckeditor5-utils/src/index.ts"),a=s("./node_modules/lodash-es/debounce.js"),c=s("./node_modules/lodash-es/isElement.js"),l=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=s.n(l),h=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css"),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(h.Z,u);h.Z.locals;const p="ck-tooltip";class g{constructor(e){if(g._editors.add(e),g._instance)return g._instance;g._instance=this,this.tooltipTextView=new o.Z(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new i.Z(e.locale),this.balloonPanelView.class=p,this.balloonPanelView.content.add(this.tooltipTextView),this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._pinTooltipDebounced=(0,a.Z)(this._pinTooltip,600),this.listenTo(n.CO.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){g._editors.delete(e),this.stopListening(e.ui),g._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),g._instance=null)}_onEnterOrFocus(e,{target:t}){const s=f(t);var o;s&&(s!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(s,{text:(o=s).dataset.ckeTooltipText,position:o.dataset.ckeTooltipPosition||"s",cssClass:o.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:s}){if("mouseleave"===e.name){if(!(0,c.Z)(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=f(t),o=f(s);e&&e!==o&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:s,cssClass:o}){const i=(0,n.Ps)(g._editors.values()).ui.view.body;i.has(this.balloonPanelView)||i.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:g.getPositioningFunctions(s)}),this.balloonPanelView.class=[p,o].filter((e=>e)).join(" ");for(const e of g._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=s}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of g._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null}_updateTooltipPosition(){(0,n.pn)(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:g.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}static getPositioningFunctions(e){const t=g.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}}function f(e){return(0,c.Z)(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}(0,n.CD)(g,r.Z),g.defaultBalloonPositions=(0,i.M)({heightOffset:5,sideOffset:13}),g._instance=null,g._editors=new Set},"./packages/ckeditor5-ui/src/view.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>f});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-ui/src/viewcollection.js"),r=s("./packages/ckeditor5-ui/src/template.js"),n=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),a=s("./packages/ckeditor5-utils/src/observablemixin.ts"),c=s("./packages/ckeditor5-utils/src/collection.ts"),l=s("./packages/ckeditor5-utils/src/mix.ts"),d=s("./packages/ckeditor5-utils/src/isiterable.ts"),h=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),u=s.n(h),p=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css"),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};u()(p.Z,g);p.Z.locals;class f{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new c.Z,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,s)=>{s.locale=e})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=r.ZP.bind(this,this)}createCollection(e){const t=new i.Z(e);return this._viewCollections.add(t),t}registerChild(e){(0,d.Z)(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){(0,d.Z)(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new r.ZP(e)}extendTemplate(e){r.ZP.extend(this.template,e)}render(){if(this.isRendered)throw new o.ZP("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}(0,l.Z)(f,n.Z),(0,l.Z)(f,a.Z)},"./packages/ckeditor5-ui/src/viewcollection.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/collection.ts");class r extends i.Z{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,s)=>{this._renderViewIntoCollectionParent(t,s)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new o.ZP("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const s of this)for(const o of e)s.delegate(o).to(t);this.on("add",((s,o)=>{for(const s of e)o.delegate(s).to(t)})),this.on("remove",((s,o)=>{for(const s of e)o.stopDelegating(s,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}},"./packages/ckeditor5-widget/src/utils.js":(e,t,s)=>{"use strict";s.d(t,{s4:()=>f,Uo:()=>m,KT:()=>x,id:()=>Z,Qd:()=>k,em:()=>v,l6:()=>y,XC:()=>b,sC:()=>P,$n:()=>T});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/toarray.ts"),r=s("./packages/ckeditor5-engine/src/model/utils/findoptimalinsertionrange.ts"),n=s("./packages/ckeditor5-utils/src/emittermixin.ts"),a=s("./packages/ckeditor5-utils/src/mix.ts");class c{constructor(){this._stack=[]}add(e,t){const s=this._stack,o=s[0];this._insertDescriptor(e);const i=s[0];o===i||l(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:t})}remove(e,t){const s=this._stack,o=s[0];this._removeDescriptor(e);const i=s[0];o===i||l(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:t})}_insertDescriptor(e){const t=this._stack,s=t.findIndex((t=>t.id===e.id));if(l(e,t[s]))return;s>-1&&t.splice(s,1);let o=0;for(;t[o]&&d(t[o],e);)o++;t.splice(o,0,e)}_removeDescriptor(e){const t=this._stack,s=t.findIndex((t=>t.id===e));s>-1&&t.splice(s,1)}}function l(e,t){return e&&t&&e.priority==t.priority&&h(e.classes)==h(t.classes)}function d(e,t){return e.priority>t.priority||!(e.priorityh(t.classes)}function h(e){return Array.isArray(e)?e.sort().join(","):e}(0,a.Z)(c,n.ZP);var u=s("./packages/ckeditor5-widget/src/widgettypearound/utils.js"),p=s("./packages/ckeditor5-ui/src/icon/iconview.js");const g='',f="ck-widget",m="ck-widget_selected";function k(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function b(e,t,s={}){if(!e.is("containerElement"))throw new o.ZP("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(f,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=A,s.label&&y(e,s.label,t),s.hasSelectionHandle&&function(e,t){const s=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),s=new p.Z;return s.set("content",g),s.render(),t.appendChild(s.element),t}));t.insert(t.createPositionAt(e,0),s),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),v(e,t),e}function _(e,t,s){if(t.classes&&s.addClass((0,i.Z)(t.classes),e),t.attributes)for(const o in t.attributes)s.setAttribute(o,t.attributes[o],e)}function w(e,t,s){if(t.classes&&s.removeClass((0,i.Z)(t.classes),e),t.attributes)for(const o in t.attributes)s.removeAttribute(o,e)}function v(e,t,s=_,o=w){const i=new c;i.on("change:top",((t,i)=>{i.oldDescriptor&&o(e,i.oldDescriptor,i.writer),i.newDescriptor&&s(e,i.newDescriptor,i.writer)})),t.setCustomProperty("addHighlight",((e,t,s)=>i.add(t,s)),e),t.setCustomProperty("removeHighlight",((e,t,s)=>i.remove(t,s)),e)}function y(e,t,s){s.setCustomProperty("widgetLabel",t,e)}function Z(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function P(e,t,s={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),s.label&&t.setAttribute("aria-label",s.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((s,o,i)=>{t.setAttribute("contenteditable",i?"false":"true",e)})),e.on("change:isFocused",((s,o,i)=>{i?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),v(e,t),e}function x(e,t){const s=e.getSelectedElement();if(s){const o=(0,u.tB)(e);if(o)return t.createRange(t.createPositionAt(s,o))}return(0,r.K)(e,t)}function T(e,t){return(s,o)=>{const{mapper:i,viewPosition:r}=o,n=i.findMappedViewAncestor(r);if(!t(n))return;const a=i.toModelElement(n);o.modelPosition=e.createPositionAt(a,r.isAtStart?"before":"after")}}function A(){return null}},"./packages/ckeditor5-widget/src/widget.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),r=s("./packages/ckeditor5-widget/src/widgettypearound/widgettypearound.js"),n=s("./packages/ckeditor5-typing/src/delete.js"),a=s("./packages/ckeditor5-utils/src/env.ts"),c=s("./packages/ckeditor5-utils/src/keyboard.ts"),l=s("./packages/ckeditor5-utils/src/dom/rect.ts");function d(e){const t=e.model;return(s,o)=>{const i=o.keyCode==c.Do.arrowup,r=o.keyCode==c.Do.arrowdown,n=o.shiftKey,a=t.document.selection;if(!i&&!r)return;const d=r;if(n&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,d))return;const p=function(e,t,s){const o=e.model;if(s){const e=t.isCollapsed?t.focus:t.getLastPosition(),s=h(o,e,"forward");if(!s)return null;const i=o.createRange(e,s),r=u(o.schema,i,"backward");return r?o.createRange(e,r):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),s=h(o,e,"backward");if(!s)return null;const i=o.createRange(s,e),r=u(o.schema,i,"forward");return r?o.createRange(r,e):null}}(e,a,d);if(p){if(p.isCollapsed){if(a.isCollapsed)return;if(n)return}(p.isCollapsed||function(e,t,s){const o=e.model,i=e.view.domConverter;if(s){const e=o.createSelection(t.start);o.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=o.createRange(e.focus,t.end))}const r=e.mapper.toViewRange(t),n=i.viewRangeToDom(r),a=l.Z.getDomRangeRects(n);let c;for(const e of a)if(void 0!==c){if(Math.round(e.top)>=c)return!1;c=Math.max(c,Math.round(e.bottom))}else c=Math.round(e.bottom);return!0}(e,p,d))&&(t.change((e=>{const s=d?p.end:p.start;if(n){const o=t.createSelection(a.anchor);o.setFocus(s),e.setSelection(o)}else e.setSelection(s)})),s.stop(),o.preventDefault(),o.stopPropagation())}}}function h(e,t,s){const o=e.schema,i=e.createRangeIn(t.root),r="forward"==s?"elementStart":"elementEnd";for(const{previousPosition:e,item:n,type:a}of i.getWalker({startPosition:t,direction:s})){if(o.isLimit(n)&&!o.isInline(n))return e;if(a==r&&o.isBlock(n))return null}return null}function u(e,t,s){const o="backward"==s?t.end:t.start;if(e.checkChild(o,"$text"))return o;for(const{nextPosition:o}of t.getWalker({direction:s}))if(e.checkChild(o,"$text"))return o;return null}var p=s("./packages/ckeditor5-widget/src/utils.js"),g=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),f=s.n(g),m=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css"),k={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};f()(m.Z,k);m.Z.locals;class b extends o.Z{static get pluginName(){return"Widget"}static get requires(){return[r.Z,n.Z]}init(){const e=this.editor,t=e.editing.view,s=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",((t,s,o)=>{const i=o.writer,r=s.selection;if(r.isCollapsed)return;const n=r.getSelectedElement();if(!n)return;const a=e.editing.mapper.toViewElement(n);(0,p.Qd)(a)&&o.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:(0,p.id)(a)})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,s)=>{this._clearPreviouslySelectedWidgets(s.writer);const o=s.writer,i=o.document.selection;let r=null;for(const e of i.getRanges())for(const t of e){const e=t.item;(0,p.Qd)(e)&&!_(e,r)&&(o.addClass(p.Uo,e),this._previouslySelected.add(e),r=e)}}),{priority:"low"}),t.addObserver(i.Z),this.listenTo(s,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(s,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[p.Qd,"$text"]}),this.listenTo(s,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(s,"arrowKey",d(this.editor.editing),{context:"$text"}),this.listenTo(s,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const s=this.editor,o=s.editing.view,i=o.document;let r=t.target;if(function(e){for(;e;){if(e.is("editableElement")&&!e.is("rootElement"))return!0;if((0,p.Qd)(e))return!1;e=e.parent}return!1}(r)){if((a.ZP.isSafari||a.ZP.isGecko)&&t.domEvent.detail>=3){const e=s.editing.mapper,o=r.is("attributeElement")?r.findAncestor((e=>!e.is("attributeElement"))):r,i=e.toModelElement(o);t.preventDefault(),this.editor.model.change((e=>{e.setSelection(i,"in")}))}return}if(!(0,p.Qd)(r)&&(r=r.findAncestor(p.Qd),!r))return;a.ZP.isAndroid&&t.preventDefault(),i.isFocused||o.focus();const n=s.editing.mapper.toModelElement(r);this._setSelectionOverElement(n)}_handleSelectionChangeOnArrowKeyPress(e,t){const s=t.keyCode,o=this.editor.model,i=o.schema,r=o.document.selection,n=r.getSelectedElement(),a=(0,c.mA)(s,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,d="up"==a||"down"==a;if(n&&i.isObject(n)){const s=l?r.getLastPosition():r.getFirstPosition(),n=i.getNearestSelectionRange(s,l?"forward":"backward");return void(n&&(o.change((e=>{e.setSelection(n)})),t.preventDefault(),e.stop()))}if(!r.isCollapsed&&!t.shiftKey){const s=r.getFirstPosition(),n=r.getLastPosition(),a=s.nodeAfter,c=n.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(o.change((e=>{e.setSelection(l?n:s)})),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&i.isObject(h)){if(i.isInline(h)&&d)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const s=this.editor.model,o=s.schema,i=s.document.selection.getSelectedElement();i&&o.isObject(i)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const s=this._getObjectElementNextToSelection(e);return s?(this.editor.model.change((e=>{let o=t.anchor.parent;for(;o.isEmpty;){const t=o;o=t.parent,e.remove(t)}this._setSelectionOverElement(s)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,s=t.schema,o=t.document.selection,i=t.createSelection(o);if(t.modifySelection(i,{direction:e?"forward":"backward"}),i.isEqual(o))return null;const r=e?i.focus.nodeBefore:i.focus.nodeAfter;return r&&s.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(p.Uo,t);this._previouslySelected.clear()}}function _(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}},"./packages/ckeditor5-widget/src/widgettypearound/utils.js":(e,t,s)=>{"use strict";s.d(t,{Xr:()=>n,_m:()=>r,aU:()=>a,bi:()=>i,t:()=>c,tB:()=>l});var o=s("./packages/ckeditor5-widget/src/utils.js");const i="widget-type-around";function r(e,t,s){return e&&(0,o.Qd)(e)&&!s.isInline(t)}function n(e){return e.closest(".ck-widget__type-around__button")}function a(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function c(e,t){const s=e.closest(".ck-widget");return t.mapDomToView(s)}function l(e){return e.getAttribute(i)}},"./packages/ckeditor5-widget/src/widgettypearound/widgettypearound.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-ui/src/template.js"),r=s("./packages/ckeditor5-enter/src/enter.js"),n=s("./packages/ckeditor5-typing/src/delete.js"),a=s("./packages/ckeditor5-utils/src/keyboard.ts"),c=s("./packages/ckeditor5-widget/src/widgettypearound/utils.js"),l=s("./packages/ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js"),d=s("./packages/ckeditor5-widget/src/utils.js");var h=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),u=s.n(h),p=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css"),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};u()(p.Z,g);p.Z.locals;const f=["before","after"],m=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,k="ck-widget__type-around_disabled";class b extends o.Z{static get pluginName(){return"WidgetTypeAround"}static get requires(){return[r.Z,n.Z]}constructor(e){super(e),this._currentFakeCaretModelElement=null}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((s,o,i)=>{t.change((e=>{for(const s of t.document.roots)i?e.removeClass(k,s):e.addClass(k,s)})),i||e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const s=this.editor,o=s.editing.view,i=s.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);s.execute("insertParagraph",{position:s.model.createPositionAt(e,t),attributes:i}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(e,t,s,o){this.listenTo(e,t,((...e)=>{this.isEnabled&&s(...e)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=(0,c.tB)(e);if(!t)return!1;const s=e.getSelectedElement();return this._insertParagraph(s,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,s=e.locale.t,o={before:s("Insert paragraph before block"),after:s("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,s,r)=>{const n=r.mapper.toViewElement(s.item);(0,c._m)(n,s.item,t)&&function(e,t,s){const o=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const s=this.toDomElement(e);return function(e,t){for(const s of f){const o=new i.ZP({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${s}`],title:t[s]},children:[e.ownerDocument.importNode(m,!0)]});e.appendChild(o.render())}}(s,t),function(e){const t=new i.ZP({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(s),s}));e.insert(e.createPositionAt(s,"end"),o)}(r.writer,o,n)}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,s=t.document.selection,o=t.schema,i=e.editing.view;function r(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(i.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[d.Qd,"$text"],priority:"high"}),this._listenToIfEnabled(s,"change:range",((t,s)=>{s.directChange&&e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=s.getSelectedElement();if(t){const s=e.editing.mapper.toViewElement(t);if((0,c._m)(s,t,o))return}e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,s)=>{const i=s.writer;if(this._currentFakeCaretModelElement){const e=s.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(i.removeClass(f.map(r),e),this._currentFakeCaretModelElement=null)}const n=t.selection.getSelectedElement();if(!n)return;const a=s.mapper.toViewElement(n);if(!(0,c._m)(a,n,o))return;const l=(0,c.tB)(t.selection);l&&(i.addClass(r(l),a),this._currentFakeCaretModelElement=n)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,s,o)=>{o||e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))}))}_handleArrowKeyPress(e,t){const s=this.editor,o=s.model,i=o.document.selection,r=o.schema,n=s.editing.view,l=t.keyCode,d=(0,a.Zt)(l,s.locale.contentLanguageDirection),h=n.document.selection.getSelectedElement(),u=s.editing.mapper.toModelElement(h);let p;(0,c._m)(h,u,r)?p=this._handleArrowKeyPressOnSelectedWidget(d):i.isCollapsed?p=this._handleArrowKeyPressWhenSelectionNextToAWidget(d):t.shiftKey||(p=this._handleArrowKeyPressWhenNonCollapsedSelection(d)),p&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,s=t.document.selection,o=(0,c.tB)(s);return t.change((t=>{if(!o)return t.setSelectionAttribute(c.bi,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(c.bi),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,s=t.model,o=s.schema,i=t.plugins.get("Widget"),r=i._getObjectElementNextToSelection(e),n=t.editing.mapper.toViewElement(r);return!!(0,c._m)(n,r,o)&&(s.change((t=>{i._setSelectionOverElement(r),t.setSelectionAttribute(c.bi,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,s=t.model,o=s.schema,i=t.editing.mapper,r=s.document.selection,n=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter,a=i.toViewElement(n);return!!(0,c._m)(a,n,o)&&(s.change((t=>{t.setSelection(n,"on"),t.setSelectionAttribute(c.bi,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((s,o)=>{const i=(0,c.Xr)(o.domTarget);if(!i)return;const r=(0,c.aU)(i),n=(0,c.t)(i,t.domConverter),a=e.editing.mapper.toModelElement(n);this._insertParagraph(a,r),o.preventDefault(),s.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,s=e.editing.view;this._listenToIfEnabled(s.document,"enter",((s,o)=>{if("atTarget"!=s.eventPhase)return;const i=t.getSelectedElement(),r=e.editing.mapper.toViewElement(i),n=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:(0,c._m)(r,i,n)&&(this._insertParagraph(i,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),s.stop())}),{context:d.Qd})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view,t=[a.Do.enter,a.Do.delete,a.Do.backspace];this._listenToIfEnabled(e.document,"keydown",((e,s)=>{t.includes(s.keyCode)||(0,l.u)(s)||this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,s=e.model,o=s.schema;this._listenToIfEnabled(t.document,"delete",((t,i)=>{if("atTarget"!=t.eventPhase)return;const r=(0,c.tB)(s.document.selection);if(!r)return;const n=i.direction,a=s.document.selection.getSelectedElement(),l="forward"==n;if("before"===r===l)e.execute("delete",{selection:s.createSelection(a,"on")});else{const t=o.getNearestSelectionRange(s.createPositionAt(a,r),n);if(t)if(t.isCollapsed){const i=s.createSelection(t.start);if(s.modifySelection(i,{direction:n}),i.focus.isEqual(t.start)){const e=function(e,t){let s=t;for(const o of t.getAncestors({parentFirst:!0})){if(o.childCount>1||e.isLimit(o))break;s=o}return s}(o,t.start.parent);s.deleteContent(s.createSelection(e,"on"),{doNotAutoparagraph:!0})}else s.change((s=>{s.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else s.change((s=>{s.setSelection(t),e.execute(l?"deleteForward":"delete")}))}i.preventDefault(),t.stop()}),{context:d.Qd})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,s=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[o,i])=>{if(i&&!i.is("documentSelection"))return;const r=(0,c.tB)(s);return r?(e.stop(),t.change((e=>{const i=s.getSelectedElement(),n=t.createPositionAt(i,r),a=e.createSelection(n),c=t.insertContent(o,a);return e.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,s)=>{const[,o,,i={}]=s;if(o&&!o.is("documentSelection"))return;const r=(0,c.tB)(t);r&&(i.findOptimalPosition=r,s[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[s])=>{if(s&&!s.is("documentSelection"))return;(0,c.tB)(t)&&e.stop()}),{priority:"high"})}}},"./src/clipboard.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Clipboard:()=>C,ClipboardPipeline:()=>d,DragDrop:()=>y,PastePlainText:()=>A});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-utils/src/eventinfo.ts"),r=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts");class n{constructor(e){this.files=function(e){const t=Array.from(e.files||[]),s=Array.from(e.items||[]);if(t.length)return t;return s.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}class a extends r.Z{constructor(e){super(e);const t=this.document;function s(e){return(s,o)=>{o.preventDefault();const r=o.dropRange?[o.dropRange]:null,n=new i.Z(t,e);t.fire(n,{dataTransfer:o.dataTransfer,method:s.name,targetRanges:r,target:o.target}),n.stop.called&&o.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(t,"paste",s("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",s("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",s("dragging"),{priority:"low"})}onDomEvent(e){const t={dataTransfer:new n(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"!=e.type&&"dragover"!=e.type||(t.dropRange=function(e,t){const s=t.target.ownerDocument,o=t.clientX,i=t.clientY;let r;s.caretRangeFromPoint&&s.caretRangeFromPoint(o,i)?r=s.caretRangeFromPoint(o,i):t.rangeParent&&(r=s.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0));if(r)return e.domConverter.domRangeToView(r);return null}(this.view,e)),this.fire(e.type,e,t)}}const c=["figcaption","li"];function l(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let s=null;for(const o of e.getChildren()){const e=l(o);s&&(s.is("containerElement")||o.is("containerElement"))&&(c.includes(s.name)||c.includes(o.name)?t+="\n":t+="\n\n"),t+=e,s=o}}return t}class d extends o.Z{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(a),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,s=e.editing.view,o=s.document;this.listenTo(o,"clipboardInput",(t=>{e.isReadOnly&&t.stop()}),{priority:"highest"}),this.listenTo(o,"clipboardInput",((e,t)=>{const o=t.dataTransfer;let r=t.content||"";var n;r||(o.getData("text/html")?r=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((n=(n=o.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||n.includes("
"))&&(n=`

${n}

`),r=n),r=this.editor.data.htmlProcessor.toView(r));const a=new i.Z(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),s.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,s)=>{if(s.content.isEmpty)return;const o=this.editor.data.toModel(s.content,"$clipboardHolder");0!=o.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:o,method:s.method,dataTransfer:s.dataTransfer,targetRanges:s.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,s)=>{s.resultRange=t.insertContent(s.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,s=e.editing.view.document;function o(o,i){const r=i.dataTransfer;i.preventDefault();const n=e.data.toView(e.model.getSelectedContent(t.selection));s.fire("clipboardOutput",{dataTransfer:r,content:n,method:o.name})}this.listenTo(s,"copy",o,{priority:"low"}),this.listenTo(s,"cut",((t,s)=>{e.isReadOnly?s.preventDefault():o(t,s)}),{priority:"low"}),this.listenTo(s,"clipboardOutput",((s,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",l(o.content))),"cut"==o.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var h=s("./packages/ckeditor5-engine/src/model/liverange.ts"),u=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),p=s("./packages/ckeditor5-widget/src/widget.js"),g=s("./packages/ckeditor5-utils/src/uid.ts"),f=s("./packages/ckeditor5-utils/src/env.ts"),m=s("./packages/ckeditor5-widget/src/utils.js"),k=s("./node_modules/lodash-es/throttle.js"),b=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_=s.n(b),w=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css"),v={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};_()(w.Z,v);w.Z.locals;class y extends o.Z{static get pluginName(){return"DragDrop"}static get requires(){return[d,p.Z]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=(0,k.Z)((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=x((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=x((()=>this._clearDraggableAttributes()),40),t.addObserver(a),t.addObserver(u.Z),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,s)=>{s?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,s)=>{s||this._finalizeDragging(!1)})),f.ZP.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,s=t.document,o=e.editing.view,i=o.document;this.listenTo(i,"dragstart",((o,r)=>{const n=s.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();const a=r.target?T(r.target):null;if(a){const s=e.editing.mapper.toModelElement(a);this._draggedRange=h.Z.fromRange(t.createRangeOn(s)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&(0,m.Qd)(e)||(this._draggedRange=h.Z.fromRange(n.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=(0,g.Z)(),r.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=t.createSelection(this._draggedRange.toRange()),l=e.data.toView(t.getSelectedContent(c));i.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:l,method:o.name}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(i,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((t,s)=>{if(!this.isEnabled)return void(s.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=Z(e,s.targetRanges,s.target);this._draggedRange||(s.dataTransfer.dropEffect="copy"),f.ZP.isGecko||("copy"==s.dataTransfer.effectAllowed?s.dataTransfer.dropEffect="copy":["all","copyMove"].includes(s.dataTransfer.effectAllowed)&&(s.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,s)=>{if("drop"!=s.method)return;const o=Z(e,s.targetRanges,s.target);if(this._removeDropMarker(),!o)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=s.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==P(s.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0))return this._finalizeDragging(!1),void t.stop();s.targetRanges=[e.editing.mapper.toViewRange(o)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(d);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const s=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(s)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const s="move"==P(t.dataTransfer),o=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(o&&s)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,s=t.document;this.listenTo(s,"mousedown",((o,i)=>{if(f.ZP.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let r=T(i.target);if(f.ZP.isBlink&&!e.isReadOnly&&!r&&!s.selection.isCollapsed){const e=s.selection.getSelectedElement();e&&(0,m.Qd)(e)||(r=s.selection.editableElement)}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(s,"mouseup",(()=>{f.ZP.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:s})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return s.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}})}_updateDropMarker(e){const t=this.editor,s=t.model.markers;t.model.change((t=>{s.has("drop-target")?s.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,s=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&s.deleteContent(s.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function Z(e,t,s){const o=e.model,i=e.editing.mapper;let r=null;const n=t?t[0].start:null;if(s.is("uiElement")&&(s=s.parent),r=function(e,t){const s=e.model,o=e.editing.mapper;if((0,m.Qd)(t))return s.createRangeOn(o.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>(0,m.Qd)(e)||e.is("editableElement")));if((0,m.Qd)(e))return s.createRangeOn(o.toModelElement(e))}return null}(e,s),r)return r;const a=function(e,t){const s=e.editing.mapper,o=e.editing.view,i=s.toModelElement(t);if(i)return i;const r=o.createPositionBefore(t),n=s.findMappedViewAncestor(r);return s.toModelElement(n)}(e,s),c=n?i.toModelPosition(n):null;return c?(r=function(e,t,s){const o=e.model;if(!o.schema.checkChild(s,"$block"))return null;const i=o.createPositionAt(s,0),r=t.path.slice(0,i.path.length),n=o.createPositionFromPath(t.root,r).nodeAfter;if(n&&o.schema.isObject(n))return o.createRangeOn(n);return null}(e,c,a),r||(r=o.schema.getNearestSelectionRange(c,f.ZP.isGecko?"forward":"backward"),r||function(e,t){const s=e.model;for(;t;){if(s.schema.isObject(t))return s.createRangeOn(t);t=t.parent}}(e,c.parent))):function(e,t){const s=e.model,o=s.schema,i=s.createPositionAt(t,0);return o.getNearestSelectionRange(i,"forward")}(e,a)}function P(e){return f.ZP.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function x(e,t){let s;function o(...i){o.cancel(),s=setTimeout((()=>e(...i)),t)}return o.cancel=()=>{clearTimeout(s)},o}function T(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(m.Qd);if((0,m.Qd)(e))return e;const t=e.findAncestor((e=>(0,m.Qd)(e)||e.is("editableElement")));return(0,m.Qd)(t)?t:null}class A extends o.Z{static get pluginName(){return"PastePlainText"}static get requires(){return[d]}init(){const e=this.editor,t=e.model,s=e.editing.view,o=s.document,i=t.document.selection;let r=!1;s.addObserver(a),this.listenTo(o,"keydown",((e,t)=>{r=t.shiftKey})),e.plugins.get(d).on("contentInsertion",((e,s)=>{(r||function(e,t){if(e.childCount>1)return!1;const s=e.getChild(0);if(t.isObject(s))return!1;return 0==[...s.getAttributeKeys()].length}(s.content,t.schema))&&t.change((e=>{const o=Array.from(i.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0}),o.push(...i.getAttributes());const r=e.createRangeIn(s.content);for(const t of r.getItems())t.is("$textProxy")&&e.setAttributes(o,t)}))}))}}class C extends o.Z{static get pluginName(){return"Clipboard"}static get requires(){return[d,y,A]}}},"./src/core.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Command:()=>o.mY,Context:()=>o._y,ContextPlugin:()=>o.eO,DataApiMixin:()=>o.W9,Editor:()=>o.ML,EditorUI:()=>o.S8,ElementApiMixin:()=>o.xK,MultiCommand:()=>o.AJ,PendingActions:()=>o.lR,Plugin:()=>o.Sy,attachToForm:()=>o.P$,icons:()=>o.ci,secureSourceElement:()=>o.Nu});var o=s("./packages/ckeditor5-core/src/index.js")},"./src/engine.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ClickObserver:()=>o.KU,Conversion:()=>o.uz,DataController:()=>o.Yc,DocumentFragment:()=>o.f4,DocumentSelection:()=>o.uj,DomConverter:()=>o.pG,DomEventData:()=>o.dK,DomEventObserver:()=>o.qZ,DowncastWriter:()=>o.qD,EditingController:()=>o.jH,Element:()=>o.W_,History:()=>o.Ay,HtmlDataProcessor:()=>o.X5,InsertOperation:()=>o.IZ,LivePosition:()=>o.jP,LiveRange:()=>o.iE,MarkerOperation:()=>o.zj,Matcher:()=>o.xO,Model:()=>o.Hn,MouseObserver:()=>o.dM,Observer:()=>o.Qj,OperationFactory:()=>o.Bz,Position:()=>o.Ly,Range:()=>o.e6,Renderer:()=>o.Th,StylesProcessor:()=>o.A_,Text:()=>o.xv,TreeWalker:()=>o.Po,UpcastWriter:()=>o.yj,ViewAttributeElement:()=>o.m1,ViewContainerElement:()=>o.By,ViewDocument:()=>o.Ux,ViewDocumentFragment:()=>o.y_,ViewElement:()=>o.y9,ViewEmptyElement:()=>o.pc,ViewRawElement:()=>o.wx,ViewText:()=>o.Xj,ViewUIElement:()=>o.dq,addBackgroundRules:()=>o.QR,addBorderRules:()=>o.sI,addMarginRules:()=>o.vt,addPaddingRules:()=>o.J8,disablePlaceholder:()=>o.DA,enablePlaceholder:()=>o.ID,getBoxSidesShorthandValue:()=>o.I8,getBoxSidesValueReducer:()=>o.mq,getBoxSidesValues:()=>o.oz,getFillerOffset:()=>o.YG,getPositionShorthandNormalizer:()=>o.m0,getShorthandValues:()=>o.uT,hidePlaceholder:()=>o.$_,isAttachment:()=>o.SB,isColor:()=>o.D5,isLength:()=>o.G9,isLineStyle:()=>o.IT,isPercentage:()=>o.zz,isPosition:()=>o.WK,isRepeat:()=>o.Zb,isURL:()=>o.PX,needsPlaceholder:()=>o.Q7,showPlaceholder:()=>o.NJ,transformSets:()=>o.Rf});var o=s("./packages/ckeditor5-engine/src/index.ts")},"./src/enter.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Enter:()=>o.Z,ShiftEnter:()=>h});var o=s("./packages/ckeditor5-enter/src/enter.js"),i=s("./packages/ckeditor5-core/src/command.js"),r=s("./packages/ckeditor5-enter/src/utils.js");class n extends i.Z{execute(){const e=this.editor.model,t=e.document;e.change((s=>{!function(e,t,s){const o=s.isCollapsed,i=s.getFirstRange(),n=i.start.parent,c=i.end.parent,l=n==c;if(o){const o=(0,r.G)(e.schema,s.getAttributes());a(e,t,i.end),t.removeSelectionAttribute(s.getAttributeKeys()),t.setSelectionAttribute(o)}else{const o=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(s,{leaveUnmerged:o}),l?a(e,t,s.focus):o&&t.setSelection(c,0)}}(e,s,t.selection),this.fire("afterExecute",{writer:s})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const s=t.anchor;if(!s||!e.checkChild(s,"softBreak"))return!1;const o=t.getFirstRange(),i=o.start.parent,r=o.end.parent;if((c(i,e)||c(r,e))&&i!==r)return!1;return!0}(e.schema,t.selection)}}function a(e,t,s){const o=t.createElement("softBreak");e.insertContent(o,s),t.setSelection(o,"after")}function c(e,t){return!e.is("rootElement")&&(t.isLimit(e)||c(e.parent,t))}var l=s("./packages/ckeditor5-enter/src/enterobserver.js"),d=s("./packages/ckeditor5-core/src/plugin.js");class h extends d.Z{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,s=e.conversion,o=e.editing.view,i=o.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),s.for("upcast").elementToElement({model:"softBreak",view:"br"}),s.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),o.addObserver(l.Z),e.commands.add("shiftEnter",new n(e)),this.listenTo(i,"enter",((t,s)=>{s.preventDefault(),s.isSoft&&(e.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}},"./src/paragraph.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Paragraph:()=>l,ParagraphButtonUI:()=>u});var o=s("./packages/ckeditor5-core/src/command.js"),i=s("./packages/ckeditor5-utils/src/first.ts");class r extends o.Z{refresh(){const e=this.editor.model,t=e.document,s=(0,i.Z)(t.selection.getSelectedBlocks());this.value=!!s&&s.is("element","paragraph"),this.isEnabled=!!s&&n(s,e.schema)}execute(e={}){const t=this.editor.model,s=t.document;t.change((o=>{const i=(e.selection||s.selection).getSelectedBlocks();for(const e of i)!e.is("element","paragraph")&&n(e,t.schema)&&o.rename(e,"paragraph")}))}}function n(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends o.Z{execute(e){const t=this.editor.model,s=e.attributes;let o=e.position;t.change((e=>{const i=e.createElement("paragraph");if(s&&t.schema.setAllowedAttributes(i,s,e),!t.schema.checkChild(o.parent,i)){const s=t.schema.findAllowedParent(o,i);if(!s)return;o=e.split(o,s).position}t.insertContent(i,o),e.setSelection(i,"in")}))}}var c=s("./packages/ckeditor5-core/src/plugin.js");class l extends c.Z{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new r(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>l.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var d=s("./packages/ckeditor5-ui/src/button/buttonview.js"),h=s("./packages/ckeditor5-core/theme/icons/paragraph.svg");class u extends c.Z{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(s=>{const o=new d.Z(s),i=e.commands.get("paragraph");return o.label=t("Paragraph"),o.icon=h.Z,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value"),o.on("execute",(()=>{e.execute("paragraph")})),o}))}}},"./src/select-all.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SelectAll:()=>u,SelectAllEditing:()=>l,SelectAllUI:()=>h});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-utils/src/keyboard.ts"),r=s("./packages/ckeditor5-core/src/command.js");class n extends r.Z{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let s=e.schema.getLimitElement(t);if(t.containsEntireContent(s)||!a(e.schema,s))do{if(s=s.parent,!s)return}while(!a(e.schema,s));e.change((e=>{e.setSelection(s,"in")}))}}function a(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const c=(0,i.Zz)("Ctrl+A");class l extends o.Z{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new n(e)),this.listenTo(t,"keydown",((t,s)=>{(0,i.Cq)(s)===c&&(e.execute("selectAll"),s.preventDefault())}))}}var d=s("./packages/ckeditor5-ui/src/button/buttonview.js");class h extends o.Z{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const s=e.commands.get("selectAll"),o=new d.Z(t),i=t.t;return o.set({label:i("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isOn","isEnabled").to(s,"value","isEnabled"),this.listenTo(o,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),o}))}}class u extends o.Z{static get requires(){return[l,h]}static get pluginName(){return"SelectAll"}}},"./src/typing.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Delete:()=>f.Z,Input:()=>g,TextTransformation:()=>M,TextWatcher:()=>w,TwoStepCaretMovement:()=>y,Typing:()=>m,findAttributeRange:()=>z,getLastTextLine:()=>_,inlineHighlight:()=>F,isNonTypingKeystroke:()=>a.u});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-core/src/command.js"),r=s("./packages/ckeditor5-typing/src/utils/changebuffer.js");class n extends i.Z{constructor(e,t){super(e),this._buffer=new r.Z(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,s=t.document,o=e.text||"",i=o.length,r=e.range?t.createSelection(e.range):s.selection,n=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock(),t.deleteContent(r),o&&t.insertContent(e.createText(o,s.selection.getAttributes()),r),n?e.setSelection(n):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}var a=s("./packages/ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js"),c=s("./packages/ckeditor5-utils/src/diff.ts"),l=s("./packages/ckeditor5-engine/src/view/domconverter.ts"),d=s("./packages/ckeditor5-typing/src/utils/utils.js");class h{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if((0,d.E9)(e))this._handleContainerChildrenMutations(e,t);else for(const s of e)this._handleTextMutation(s,t),this._handleTextNodeInsertion(s)}_handleContainerChildrenMutations(e,t){const s=function(e){const t=e.map((e=>e.node)).reduce(((e,t)=>e.getCommonAncestor(t,{includeSelf:!0})));if(!t)return;return t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e=>e.is("containerElement")||e.is("rootElement")))}(e);if(!s)return;const o=this.editor.editing.view.domConverter.mapViewToDom(s),i=new l.Z(this.editor.editing.view.document),r=this.editor.data.toModel(i.domToView(o)).getChild(0),n=this.editor.editing.mapper.toModelElement(s);if(!n)return;const a=Array.from(r.getChildren()),d=Array.from(n.getChildren()),h=a[a.length-1],g=d[d.length-1],f=h&&h.is("element","softBreak"),m=g&&!g.is("element","softBreak");f&&m&&a.pop();const k=this.editor.model.schema;if(!u(a,k)||!u(d,k))return;const b=a.map((e=>e.is("$text")?e.data:"@")).join("").replace(/\u00A0/g," "),_=d.map((e=>e.is("$text")?e.data:"@")).join("").replace(/\u00A0/g," ");if(_===b)return;const w=(0,c.Z)(_,b),{firstChangeAt:v,insertions:y,deletions:Z}=p(w);let P=null;t&&(P=this.editing.mapper.toModelRange(t.getFirstRange()));const x=b.substr(v,y),T=this.editor.model.createRange(this.editor.model.createPositionAt(n,v),this.editor.model.createPositionAt(n,v+Z));this.editor.execute("input",{text:x,range:T,resultRange:P})}_handleTextMutation(e,t){if("text"!=e.type)return;const s=e.newText.replace(/\u00A0/g," "),o=e.oldText.replace(/\u00A0/g," ");if(o===s)return;const i=(0,c.Z)(o,s),{firstChangeAt:r,insertions:n,deletions:a}=p(i);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const d=this.editing.view.createPositionAt(e.node,r),h=this.editing.mapper.toModelPosition(d),u=this.editor.model.createRange(h,h.getShiftedBy(a)),g=s.substr(r,n);this.editor.execute("input",{text:g,range:u,resultRange:l})}_handleTextNodeInsertion(e){if("children"!=e.type)return;const t=(0,d.xG)(e),s=this.editing.view.createPositionAt(e.node,t.index),o=this.editing.mapper.toModelPosition(s),i=t.values[0].data;this.editor.execute("input",{text:i.replace(/\u00A0/g," "),range:this.editor.model.createRange(o)})}}function u(e,t){return e.every((e=>t.isInline(e)))}function p(e){let t=null,s=null;for(let o=0;o{new h(e).handle(s,o)}))}(e)}}var f=s("./packages/ckeditor5-typing/src/delete.js");class m extends o.Z{static get requires(){return[g,f.Z]}static get pluginName(){return"Typing"}}var k=s("./packages/ckeditor5-utils/src/mix.ts"),b=s("./packages/ckeditor5-utils/src/observablemixin.ts");function _(e,t){let s=e.start;return{text:Array.from(e.getItems()).reduce(((e,o)=>o.is("$text")||o.is("$textProxy")?e+o.data:(s=t.createPositionAfter(o),"")),""),range:t.createRange(s,e.end)}}class w{constructor(e,t){this.model=e,this.testCallback=t,this.hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:s})=>{s&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this.hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const s=this.model,o=s.document.selection,i=s.createRange(s.createPositionAt(o.focus.parent,0),o.focus),{text:r,range:n}=_(i,s),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this.hasMatch=!!a,a){const s=Object.assign(t,{text:r,range:n});"object"==typeof a&&Object.assign(s,a),this.fire(`matched:${e}`,s)}}}(0,k.Z)(w,b.Z);var v=s("./packages/ckeditor5-utils/src/keyboard.ts");class y extends o.Z{static get pluginName(){return"TwoStepCaretMovement"}constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}init(){const e=this.editor,t=e.model,s=e.editing.view,o=e.locale,i=t.document.selection;this.listenTo(s.document,"arrowKey",((e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const s=t.keyCode==v.Do.arrowright,r=t.keyCode==v.Do.arrowleft;if(!s&&!r)return;const n=o.contentLanguageDirection;let a=!1;a="ltr"===n&&s||"rtl"===n&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(i,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&T(i.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,s=this.editor.model.document.selection,o=s.getFirstPosition();return!this._isGravityOverridden&&((!o.isAtStart||!Z(s,t))&&(T(o,t)?(x(e),this._overrideGravity(),!0):void 0))}_handleBackwardMovement(e){const t=this.attributes,s=this.editor.model,o=s.document.selection,i=o.getFirstPosition();return this._isGravityOverridden?(x(e),this._restoreGravity(),P(s,t,i),!0):i.isAtStart?!!Z(o,t)&&(x(e),P(s,t,i),!0):function(e,t){return T(e.getShiftedBy(-1),t)}(i,t)?i.isAtEnd&&!Z(o,t)&&T(i,t)?(x(e),P(s,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1):void 0}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function Z(e,t){for(const s of t)if(e.hasAttribute(s))return!0;return!1}function P(e,t,s){const o=s.nodeBefore;e.change((e=>{o?e.setSelectionAttribute(o.getAttributes()):e.removeSelectionAttribute(t)}))}function x(e){e.preventDefault()}function T(e,t){const{nodeBefore:s,nodeAfter:o}=e;for(const e of t){const t=s?s.getAttribute(e):void 0;if((o?o.getAttribute(e):void 0)!==t)return!0}return!1}var A=s("./node_modules/lodash-es/toString.js"),C=/[\\^$.*+?()[\]{}|]/g,E=RegExp(C.source);const S=function(e){return(e=(0,A.Z)(e))&&E.test(e)?e.replace(C,"\\$&"):e},j={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:D('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:D("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:D("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:D('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:D('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:D("'"),to:[null,"‚",null,"’"]}},O={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},R=["symbols","mathematical","typography","quotes"];class M extends o.Z{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:R}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,s=e.plugins.get("Delete"),o=function(e){const t=e.extra||[],s=e.remove||[],o=e=>!s.includes(e);return function(e){const t=new Set;for(const s of e)if(O[s])for(const e of O[s])t.add(e);else t.add(s);return Array.from(t)}(e.include.concat(t).filter(o)).filter(o).map((e=>j[e]||e)).filter((e=>"object"==typeof e)).map((e=>({from:N(e.from),to:V(e.to)})))}(e.config.get("typing.transformations")),i=new w(e.model,(e=>{for(const t of o){if(t.from.test(e))return{normalizedTransformation:t}}}));i.on("matched:data",((e,o)=>{if(!o.batch.isTyping)return;const{from:i,to:r}=o.normalizedTransformation,n=i.exec(o.text),a=r(n.slice(1)),c=o.range;let l=n.index;t.enqueueChange((e=>{for(let s=1;s{s.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}}function N(e){return"string"==typeof e?new RegExp(`(${S(e)})$`):e}function V(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function I(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function D(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function z(e,t,s,o){return o.createRange(B(e,t,s,!0,o),B(e,t,s,!1,o))}function B(e,t,s,o,i){let r=e.textNode||(o?e.nodeBefore:e.nodeAfter),n=null;for(;r&&r.getAttribute(t)==s;)n=r,r=o?r.previousSibling:r.nextSibling;return n?i.createPositionAt(n,o?"before":"after"):e}function F(e,t,s,o){const i=e.editing.view,r=new Set;i.document.registerPostFixer((i=>{const n=e.model.document.selection;let a=!1;if(n.hasAttribute(t)){const c=z(n.getFirstPosition(),t,n.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",s)&&!e.hasClass(o)&&(i.addClass(o,e),r.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){i.change((e=>{for(const t of r.values())e.removeClass(o,t),r.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}},"./src/ui.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{BalloonPanelView:()=>ue.Z,BalloonToolbar:()=>Se,BlockToolbar:()=>ze,BodyCollection:()=>d,BoxedEditorUIView:()=>D,ButtonView:()=>h.Z,ColorGridView:()=>P,ColorTileView:()=>k,ContextualBalloon:()=>pe.Z,DropdownButtonView:()=>x.Z,EditorUIView:()=>R,FocusCycler:()=>$.Z,FormHeaderView:()=>W,IconView:()=>q.Z,IframeView:()=>Q,InlineEditableUIView:()=>B,InputNumberView:()=>J,InputTextView:()=>G,InputView:()=>K,LabelView:()=>I,LabeledFieldView:()=>ee,ListItemView:()=>ie.Z,ListView:()=>re.Z,Model:()=>he,Notification:()=>ae,SplitButtonView:()=>E,StickyPanelView:()=>_e,SwitchButtonView:()=>u.Z,Template:()=>a.ZP,ToolbarSeparatorView:()=>ye.Z,ToolbarView:()=>ve.Z,TooltipManager:()=>we.Z,View:()=>m.Z,ViewCollection:()=>c.Z,addKeyboardHandlingForGrid:()=>n,addListToDropdown:()=>S.Pm,addToolbarToDropdown:()=>S.up,clickOutsideHandler:()=>o.Z,createDropdown:()=>S.t9,createLabeledDropdown:()=>oe,createLabeledInputNumber:()=>se,createLabeledInputText:()=>te,focusChildOnDropdownOpen:()=>S.Mh,getLocalizedColorOptions:()=>p,injectCssTransitionDisabler:()=>i,normalizeColorOptions:()=>g,normalizeSingleColorDefinition:()=>f,normalizeToolbarConfig:()=>Ze.Z,submitHandler:()=>r});var o=s("./packages/ckeditor5-ui/src/bindings/clickoutsidehandler.js");function i(e){e.set("_isCssTransitionsDisabled",!1),e.disableCssTransitions=()=>{e._isCssTransitionsDisabled=!0},e.enableCssTransitions=()=>{e._isCssTransitionsDisabled=!1},e.extendTemplate({attributes:{class:[e.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function r({view:e}){e.listenTo(e.element,"submit",((t,s)=>{s.preventDefault(),e.fire("submit")}),{useCapture:!0})}function n({keystrokeHandler:e,focusTracker:t,gridItems:s,numberOfColumns:o}){const i="number"==typeof o?()=>o:o;function r(e){return o=>{const i=s.find((e=>e.element===t.focusedElement)),r=s.getIndex(i),n=e(r,s);s.get(n).focus(),o.stopPropagation(),o.preventDefault()}}e.set("arrowright",r(((e,t)=>e===t.length-1?0:e+1))),e.set("arrowleft",r(((e,t)=>0===e?t.length-1:e-1))),e.set("arrowup",r(((e,t)=>{let s=e-i();return s<0&&(s=e+i()*Math.floor(t.length/i()),s>t.length-1&&(s-=i())),s}))),e.set("arrowdown",r(((e,t)=>{let s=e+i();return s>t.length-1&&(s=e%i()),s})))}var a=s("./packages/ckeditor5-ui/src/template.js"),c=s("./packages/ckeditor5-ui/src/viewcollection.js"),l=s("./packages/ckeditor5-utils/src/dom/createelement.ts");class d extends c.Z{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new a.ZP({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=(0,l.Z)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var h=s("./packages/ckeditor5-ui/src/button/buttonview.js"),u=s("./packages/ckeditor5-ui/src/button/switchbuttonview.js");function p(e,t){const s=e.t,o={Black:s("Black"),"Dim grey":s("Dim grey"),Grey:s("Grey"),"Light grey":s("Light grey"),White:s("White"),Red:s("Red"),Orange:s("Orange"),Yellow:s("Yellow"),"Light green":s("Light green"),Green:s("Green"),Aquamarine:s("Aquamarine"),Turquoise:s("Turquoise"),"Light blue":s("Light blue"),Blue:s("Blue"),Purple:s("Purple")};return t.map((e=>{const t=o[e.label];return t&&t!=e.label&&(e.label=t),e}))}function g(e){return e.map(f).filter((e=>!!e))}function f(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}var m=s("./packages/ckeditor5-ui/src/view.js");class k extends h.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("color"),this.set("hasBorder"),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var b=s("./packages/ckeditor5-utils/src/focustracker.ts"),_=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),w=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),v=s.n(w),y=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"),Z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(y.Z,Z);y.Z.locals;class P extends m.Z{constructor(e,t){super(e);const s=t&&t.colorDefinitions||[],o={};this.columns=t&&t.columns?t.columns:5,o.gridTemplateColumns=`repeat( ${this.columns}, 1fr)`,this.set("selectedColor"),this.items=this.createCollection(),this.focusTracker=new b.Z,this.keystrokes=new _.Z,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),s.forEach((e=>{const t=new k;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:o}}),this.on("change:selectedColor",((e,t,s)=>{for(const e of this.items)e.isOn=e.color===s}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),n({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var x=s("./packages/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js"),T=s("./packages/ckeditor5-ui/theme/icons/dropdown-arrow.svg"),A=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css"),C={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(A.Z,C);A.Z.locals;class E extends m.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("class"),this.set("icon"),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke"),this.set("label"),this.set("tabindex",-1),this.set("tooltip"),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new _.Z,this.focusTracker=new b.Z,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new h.Z;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new h.Z,t=e.bindTemplate;return e.icon=T.Z,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}var S=s("./packages/ckeditor5-ui/src/dropdown/utils.js"),j=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css"),O={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(j.Z,O);j.Z.locals;class R extends m.Z{constructor(e){super(e),this.body=new d(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}var M=s("./packages/ckeditor5-utils/src/uid.ts"),N=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css"),V={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(N.Z,V);N.Z.locals;class I extends m.Z{constructor(e){super(e),this.set("text"),this.set("for"),this.id=`ck-editor__label_${(0,M.Z)()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class D extends R{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new I;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class z extends m.Z{constructor(e,t,s){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=s,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((s=>{const o=e.document.getRoot(t.name);s.addClass(t.isFocused?"ck-focused":"ck-blurred",o),s.removeClass(t.isFocused?"ck-blurred":"ck-focused",o)}))}e.isRenderingInProgress?function s(o){e.once("change:isRenderingInProgress",((e,i,r)=>{r?s(o):t(o)}))}(this):t(this)}}class B extends z{constructor(e,t,s,o={}){super(e,t,s);const i=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=o.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const s=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),s)}))}}var F=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css"),L={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(F.Z,L);F.Z.locals;class W extends m.Z{constructor(e,t={}){super(e);const s=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",s.to("class")]},children:this.children});const o=new m.Z(e);o.setTemplate({tag:"span",attributes:{class:["ck","ck-form__header__label"]},children:[{text:s.to("label")}]}),this.children.add(o)}}var $=s("./packages/ckeditor5-ui/src/focuscycler.js"),q=s("./packages/ckeditor5-ui/src/icon/iconview.js"),H=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css"),U={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(H.Z,U);H.Z.locals;class K extends m.Z{constructor(e){super(e),this.set("value"),this.set("id"),this.set("placeholder"),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById"),this.focusTracker=new b.Z,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,s)=>{this._setDomElementValue(s),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class G extends K{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class J extends K{constructor(e,{min:t,max:s,step:o}={}){super(e);const i=this.bindTemplate;this.set("min",t),this.set("max",s),this.set("step",o),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}class Q extends m.Z{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise((e=>{this.on("loaded",e),super.render()}))}}var X=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"),Y={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(X.Z,Y);X.Z.locals;class ee extends m.Z{constructor(e,t){super(e);const s=`ck-labeled-field-view-${(0,M.Z)()}`,o=`ck-labeled-field-view-status-${(0,M.Z)()}`;this.fieldView=t(this,s,o),this.set("label"),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class"),this.set("placeholder"),this.labelView=this._createLabelView(s),this.statusView=this._createStatusView(o),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e)),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:[this.fieldView,this.labelView]},this.statusView]})}_createLabelView(e){const t=new I(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new m.Z(this.locale),s=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",s.if("errorText","ck-labeled-field-view__status_error"),s.if("_statusText","ck-hidden",(e=>!e))],id:e,role:s.if("errorText","alert")},children:[{text:s.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}function te(e,t,s){const o=new G(e.locale);return o.set({id:t,ariaDescribedById:s}),o.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),o.bind("hasError").to(e,"errorText",(e=>!!e)),o.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(o),o}function se(e,t,s){const o=new J(e.locale);return o.set({id:t,ariaDescribedById:s,inputMode:"numeric"}),o.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),o.bind("hasError").to(e,"errorText",(e=>!!e)),o.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(o),o}function oe(e,t,s){const o=(0,S.t9)(e.locale);return o.set({id:t,ariaDescribedById:s}),o.bind("isEnabled").to(e),o}var ie=s("./packages/ckeditor5-ui/src/list/listitemview.js"),re=s("./packages/ckeditor5-ui/src/list/listview.js"),ne=s("./packages/ckeditor5-core/src/contextplugin.js");class ae extends ne.Z{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:"");this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}var ce=s("./packages/ckeditor5-utils/src/mix.ts"),le=s("./packages/ckeditor5-utils/src/observablemixin.ts"),de=s("./node_modules/lodash-es/assignIn.js");class he{constructor(e,t){t&&(0,de.Z)(this,t),e&&this.set(e)}}(0,ce.Z)(he,le.Z);var ue=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.js"),pe=s("./packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js"),ge=s("./packages/ckeditor5-utils/src/dom/global.ts"),fe=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),me=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css"),ke={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(me.Z,ke);me.Z.locals;const be=(0,fe.Z)("px");class _e extends m.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new a.ZP({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?be(this._panelRect.height):null))}}}).render(),this._contentPanel=new a.ZP({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?be(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_hasViewportTopOffset",(e=>e?be(this.viewportTopOffset):null)),bottom:t.to("_isStickyToTheLimiter",(e=>e?be(this.limiterBottomOffset):null)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(ge.Z.window,"scroll",(()=>{this._checkIfShouldBeSticky()})),this.listenTo(this,"change:isActive",(()=>{this._checkIfShouldBeSticky()}))}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._resizeObserver=null,this._balloon=e.plugins.get(pe.Z),this._fireSelectionChangeDebounced=(0,Te.Z)((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((e,t,s)=>{const o=this._balloon.visibleView===this.toolbarView;!s&&o?this.hide():s&&this.show()})),this.listenTo(t,"change:range",((e,s)=>{(s.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",(()=>{const t=e.ui.view.editable.element;this._resizeObserver=new Ae.Z(t,(()=>{this.toolbarView.maxWidth=Ee(.9*new xe.Z(t).width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const e=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,e)}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,s=new ve.Z(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return s.ariaLabel=e("Editor contextual toolbar"),s.render(),s}show(e=!1){const t=this.editor,s=t.model.document.selection,o=t.model.schema;this._balloon.hasView(this.toolbarView)||s.isCollapsed&&!e||function(e,t){if(1===e.rangeCount)return!1;return[...e.getRanges()].every((e=>{const s=e.getContainedElement();return s&&t.isSelectable(s)}))}(s,o)||Array.from(this.toolbarView.items).every((e=>void 0!==e.isEnabled&&!e.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,s=t.selection,o=t.selection.isBackward;return{target:()=>{const t=o?s.getFirstRange():s.getLastRange(),i=xe.Z.getDomRangeRects(e.domConverter.viewRangeToDom(t));return o?i[0]:(i.length>1&&0===i[i.length-1].width&&i.pop(),i[i.length-1])},positions:this._getBalloonPositions(o)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=Ce.OB.isSafari&&Ce.OB.isiOS?(0,ue.M)({heightOffset:Math.max(ue.Z.arrowHeightOffset,Math.round(20/Ce.CO.window.visualViewport.scale))}):ue.Z.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}var je=s("./packages/ckeditor5-core/theme/icons/pilcrow.svg"),Oe=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"),Re={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(Oe.Z,Re);Oe.Z.locals;const Me=(0,fe.Z)("px");class Ne extends h.Z{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",(e=>Me(e))),left:t.to("left",(e=>Me(e)))}}})}}var Ve=s("./packages/ckeditor5-utils/src/dom/position.ts"),Ie=s("./packages/ckeditor5-utils/src/env.ts");const De=(0,fe.Z)("px");class ze extends Pe.Z{static get pluginName(){return"BlockToolbar"}constructor(e){super(e),this._blockToolbarConfig=(0,Ze.Z)(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),this._resizeObserver=null,(0,o.Z)({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}init(){const e=this.editor;this.listenTo(e.model.document.selection,"change:range",((e,t)=>{t.directChange&&this._hidePanel()})),this.listenTo(e.ui,"update",(()=>this._updateButton())),this.listenTo(e,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((e,t,s)=>{s?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()})}afterInit(){const e=this.editor.ui.componentFactory,t=this._blockToolbarConfig;this.toolbarView.fillFromConfig(t,e);for(const e of this.toolbarView.items)e.on("execute",(()=>this._hidePanel(!0)),{priority:"high"});t.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",(()=>{const e=this.editor.ui.view.editable.element;this._resizeObserver=new Ae.Z(e,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()}))}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,s=new ve.Z(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return s.ariaLabel=e("Editor block content toolbar"),s.focusTracker.on("change:isFocused",((e,t,s)=>{s||this._hidePanel()})),s}_createPanelView(){const e=this.editor,t=new ue.Z(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",((e,t)=>{this._hidePanel(!0),t()})),t}_createButtonView(){const e=this.editor,t=e.t,s=new Ne(e.locale),o=s.bindTemplate;return s.set({label:t("Edit block"),icon:je.Z,withText:!1}),s.extendTemplate({on:{mousedown:o.to((e=>{Ie.ZP.isSafari&&this.panelView.isVisible&&this.toolbarView.focus(),e.preventDefault()}))}}),s.bind("isOn").to(this.panelView,"isVisible"),s.bind("tooltip").to(this.panelView,"isVisible",(e=>!e)),this.listenTo(s,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),e.ui.view.body.add(s),e.ui.focusTracker.add(s.element),s}_updateButton(){const e=this.editor,t=e.model,s=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(e.isReadOnly)return void this._hideButton();const o=Array.from(t.document.selection.getSelectedBlocks())[0];if(!o||Array.from(this.toolbarView.items).every((e=>!e.isEnabled)))return void this._hideButton();const i=s.domConverter.mapViewToDom(e.editing.mapper.toViewElement(o));this.buttonView.isVisible=!0,this._attachButtonToElement(i),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),e||this.toolbarView.items.get(0).focus()}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){const t=window.getComputedStyle(e),s=new xe.Z(this.editor.ui.getEditableElement()),o=parseInt(t.paddingTop,10),i=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),r=(0,Ve.x)({element:this.buttonView.element,target:e,positions:[(e,t)=>{let r;return r="ltr"===this.editor.locale.uiLanguageDirection?s.left-t.width:s.right,{top:e.top+o+(i-t.height)/2,left:r}}]});this.buttonView.top=r.top,this.buttonView.left=r.left}_getToolbarMaxWidth(){const e=this.editor.ui.view.editable.element,t=new xe.Z(e),s=new xe.Z(this.buttonView.element),o="rtl"===this.editor.locale.uiLanguageDirection?s.left-t.right+s.width:t.left-s.left;return De(t.width+o)}}},"./src/undo.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Undo:()=>m,UndoEditing:()=>h,UndoUi:()=>f});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-core/src/command.js"),r=s("./packages/ckeditor5-engine/src/model/operation/transform.ts");class n extends i.Z{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const s=t[1];s.batchType||(s.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,s={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:s}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,s){const o=this.editor.model,i=o.document,r=[],n=e.map((e=>e.getTransformedByOperations(s))),l=n.flat();for(const e of n){const t=e.filter((e=>e.root!=i.graveyard)).filter((e=>!c(e,l)));t.length&&(a(t),r.push(t[0]))}r.length&&o.change((e=>{e.setSelection(r,{backward:t})}))}_undo(e,t){const s=this.editor.model,o=s.document;this._createdBatches.add(t);const i=e.operations.slice().filter((e=>e.isDocumentOperation));i.reverse();for(const e of i){const i=e.baseVersion+1,n=Array.from(o.history.getOperations(i)),a=(0,r.R)([e.getReversed()],n,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const i of a)t.addOperation(i),s.applyOperation(i),o.history.setOperationAsUndone(e,i)}}}function a(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class l extends n{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,s=this._stack.splice(t,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(s.batch,o);const e=this.editor.model.document.history.getOperations(s.batch.baseVersion);this._restoreSelection(s.selection.ranges,s.selection.isBackward,e),this.fire("revert",s.batch,o)})),this.refresh()}}class d extends n{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const s=e.batch.operations[e.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(s);this._restoreSelection(e.selection.ranges,e.selection.isBackward,o),this._undo(e.batch,t)})),this.refresh()}}class h extends o.Z{static get pluginName(){return"UndoEditing"}constructor(e){super(e),this._batchRegistry=new WeakSet}init(){const e=this.editor;this._undoCommand=new l(e),this._redoCommand=new d(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const s=t[0];if(!s.isDocumentOperation)return;const o=s.batch,i=this._redoCommand._createdBatches.has(o),r=this._undoCommand._createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(i?this._undoCommand.addBatch(o):r||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,s)=>{this._redoCommand.addBatch(s)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var u=s("./packages/ckeditor5-ui/src/button/buttonview.js");const p='',g='';class f extends o.Z{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,s=e.t,o="ltr"==t.uiLanguageDirection?p:g,i="ltr"==t.uiLanguageDirection?g:p;this._addButton("undo",s("Undo"),"CTRL+Z",o),this._addButton("redo",s("Redo"),"CTRL+Y",i)}_addButton(e,t,s,o){const i=this.editor;i.ui.componentFactory.add(e,(r=>{const n=i.commands.get(e),a=new u.Z(r);return a.set({label:t,icon:o,keystroke:s,tooltip:!0}),a.bind("isEnabled").to(n,"isEnabled"),this.listenTo(a,"execute",(()=>{i.execute(e),i.editing.view.focus()})),a}))}}class m extends o.Z{static get requires(){return[h,f]}static get pluginName(){return"Undo"}}},"./src/upload.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Base64UploadAdapter:()=>k,FileDialogButtonView:()=>f,FileRepository:()=>h,SimpleUploadAdapter:()=>_});var o=s("./packages/ckeditor5-core/src/plugin.js"),i=s("./packages/ckeditor5-core/src/pendingactions.js"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-utils/src/observablemixin.ts"),a=s("./packages/ckeditor5-utils/src/collection.ts"),c=s("./packages/ckeditor5-utils/src/mix.ts");class l{constructor(){const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((s,o)=>{t.onload=()=>{const e=t.result;this._data=e,s(e)},t.onerror=()=>{o("error")},t.onabort=()=>{o("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}(0,c.Z)(l,n.Z);var d=s("./packages/ckeditor5-utils/src/uid.ts");class h extends o.Z{static get pluginName(){return"FileRepository"}static get requires(){return[i.Z]}init(){this.loaders=new a.Z,this.loaders.on("add",(()=>this._updatePendingAction())),this.loaders.on("remove",(()=>this._updatePendingAction())),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return(0,r.KE)("filerepository-no-upload-adapter"),null;const t=new u(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof u?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,s)=>{e===t&&this._loadersMap.delete(s)}))}_updatePendingAction(){const e=this.editor.plugins.get(i.Z);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,s=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(s(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",s)}}else e.remove(this._pendingAction),this._pendingAction=null}}(0,c.Z)(h,n.Z);class u{constructor(e,t){this.id=(0,d.Z)(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new l,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new r.ZP("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new r.ZP("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((s,o)=>{t.rejecter=o,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,s(e)})).catch((e=>{t.isFulfilled=!0,o(e)}))})),t}}(0,c.Z)(u,n.Z);var p=s("./packages/ckeditor5-ui/src/button/buttonview.js"),g=s("./packages/ckeditor5-ui/src/view.js");class f extends g.Z{constructor(e){super(e),this.buttonView=new p.Z(e),this._fileInputView=new m(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class m extends g.Z{constructor(e){super(e),this.set("acceptedType"),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}class k extends o.Z{static get requires(){return[h]}static get pluginName(){return"Base64UploadAdapter"}init(){this.editor.plugins.get(h).createUploadAdapter=e=>new b(e)}}class b{constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{const s=this.reader=new window.FileReader;s.addEventListener("load",(()=>{e({default:s.result})})),s.addEventListener("error",(e=>{t(e)})),s.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{s.readAsDataURL(e)}))}))}abort(){this.reader.abort()}}class _ extends o.Z{static get requires(){return[h]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(h).createUploadAdapter=t=>new w(t,e):(0,r.KE)("simple-upload-adapter-missing-uploadurl"))}}class w{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,s)=>{this._initRequest(),this._initListeners(t,s,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,s){const o=this.xhr,i=this.loader,r=`Couldn't upload file: ${s.name}.`;o.addEventListener("error",(()=>t(r))),o.addEventListener("abort",(()=>t())),o.addEventListener("load",(()=>{const s=o.response;if(!s||s.error)return t(s&&s.error&&s.error.message?s.error.message:r);const i=s.url?{default:s.url}:s.urls;e({...s,urls:i})})),o.upload&&o.upload.addEventListener("progress",(e=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},s=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=s;const o=new FormData;o.append("upload",e),this.xhr.send(o)}}},"./src/utils.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CKEditorError:()=>o.Bb,Collection:()=>o.FE,DomEmitterMixin:()=>o.Xu,ElementReplacer:()=>o.a6,EmitterMixin:()=>o.ln,FocusTracker:()=>o.Rh,KeystrokeHandler:()=>o.VD,Locale:()=>o.go,ObservableMixin:()=>o.Re,Rect:()=>o.UL,ResizeObserver:()=>o.do,createElement:()=>o.az,diff:()=>o.Hg,env:()=>o.OB,first:()=>o.Ps,getCode:()=>o.Cq,getDataFromElement:()=>o.yy,getEnvKeystrokeText:()=>o.XU,getLanguageDirection:()=>o.j9,getLocalizedArrowKeyCodeDirection:()=>o.mA,global:()=>o.CO,isArrowKeyCode:()=>o.dj,isForwardArrowKeyCode:()=>o.Zt,isVisible:()=>o.pn,keyCodes:()=>o.Do,logError:()=>o.H,logWarning:()=>o.KE,mix:()=>o.CD,parseKeystroke:()=>o.Zz,priorities:()=>o.tA,scrollAncestorsToShowTarget:()=>o.F0,scrollViewportToShowTarget:()=>o.mR,setDataInElement:()=>o.jS,toArray:()=>o.qo,toMap:()=>o.qL,toUnit:()=>o.nn,uid:()=>o.hQ,version:()=>o.i8});var o=s("./packages/ckeditor5-utils/src/index.ts")},"./src/widget.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{WIDGET_CLASS_NAME:()=>c.s4,WIDGET_SELECTED_CLASS_NAME:()=>c.Uo,Widget:()=>o.Z,WidgetResize:()=>j,WidgetToolbarRepository:()=>d,WidgetTypeAround:()=>O.Z,findOptimalInsertionRange:()=>c.KT,getLabel:()=>c.id,isWidget:()=>c.Qd,setHighlightHandling:()=>c.em,setLabel:()=>c.l6,toWidget:()=>c.XC,toWidgetEditable:()=>c.sC,viewToModelPositionOutsideModelElement:()=>c.$n});var o=s("./packages/ckeditor5-widget/src/widget.js"),i=s("./packages/ckeditor5-core/src/plugin.js"),r=s("./packages/ckeditor5-ui/src/panel/balloon/contextualballoon.js"),n=s("./packages/ckeditor5-ui/src/toolbar/toolbarview.js"),a=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.js"),c=s("./packages/ckeditor5-widget/src/utils.js"),l=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class d extends i.Z{static get requires(){return[r.Z]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!(0,c.Qd)(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:s,getRelatedElement:o,balloonClassName:i="ck-toolbar-container"}){if(!s.length)return void(0,l.KE)("widget-toolbar-no-items",{toolbarId:e});const r=this.editor,a=r.t,c=new n.Z(r.locale);if(c.ariaLabel=t||a("Widget toolbar"),this._toolbarDefinitions.has(e))throw new l.ZP("widget-toolbar-duplicated",this,{toolbarId:e});c.fillFromConfig(s,r.ui.componentFactory);const d={view:c,getRelatedElement:o,balloonClassName:i};r.ui.addToolbar(c,{isContextual:!0,beforeFocus:()=>{const e=o(r.editing.view.document.selection);e&&this._showToolbar(d,e)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,s=null;for(const o of this._toolbarDefinitions.values()){const i=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>e&&(e=r,t=i,s=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}s&&this._showToolbar(s,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?h(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:u(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);h(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function h(e,t){const s=e.plugins.get("ContextualBalloon"),o=u(e,t);s.updatePosition(o)}function u(e,t){const s=e.editing.view,o=a.Z.defaultPositions;return{target:s.domConverter.mapViewToDom(t),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}var p=s("./packages/ckeditor5-ui/src/template.js"),g=s("./packages/ckeditor5-utils/src/dom/rect.ts"),f=s("./packages/ckeditor5-utils/src/comparearrays.ts"),m=s("./packages/ckeditor5-utils/src/observablemixin.ts"),k=s("./packages/ckeditor5-utils/src/mix.ts");class b{constructor(e){this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}begin(e,t,s){const o=new g.Z(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const s of t)if(e.classList.contains(_(s)))return s}(e),this._referenceCoordinates=function(e,t){const s=new g.Z(e),o=t.split("-"),i={x:"right"==o[1]?s.right:s.left,y:"bottom"==o[0]?s.bottom:s.top};return i.x+=e.ownerDocument.defaultView.scrollX,i.y+=e.ownerDocument.defaultView.scrollY,i}(t,function(e){const t=e.split("-"),s={top:"bottom",bottom:"top",left:"right",right:"left"};return`${s[t[0]]}-${s[t[1]]}`}(this.activeHandlePosition)),this.originalWidth=o.width,this.originalHeight=o.height,this.aspectRatio=o.width/o.height;const i=s.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this.originalWidthPercents=parseFloat(i):this.originalWidthPercents=function(e,t){const s=e.parentElement,o=parseFloat(s.ownerDocument.defaultView.getComputedStyle(s).width);return t.width/o*100}(s,o)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function _(e){return`ck-widget__resizer__handle-${e}`}(0,k.Z)(b,m.Z);var w=s("./packages/ckeditor5-ui/src/view.js");class v extends w.Z{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,s,o)=>"px"===e.unit?`${t}×${s}`:`${o}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,s)=>t<50||s<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class y{constructor(e){this._options=e,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"}),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((s=>{const o=s.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const s=this.toDomElement(t);return e._appendHandles(s),e._appendSizeUI(s),s}));s.insert(s.createPositionAt(t,"end"),o),s.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=o,this.isVisible||this.hide()}))}begin(e){this.state=new b(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const s=this._options.unit||"%",o=("%"===s?t.widthPercents:t.width)+s;e.setStyle("width",o,this._options.viewElement)}));const s=this._getHandleHost(),o=new g.Z(s);t.handleHostWidth=Math.round(o.width),t.handleHostHeight=Math.round(o.height);const i=new g.Z(s);t.width=Math.round(i.width),t.height=Math.round(i.height),this.redraw(o),this.state.update(t)}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((s=t)&&s.ownerDocument&&s.ownerDocument.contains(s)))return;var s;const o=t.parentElement,i=this._getHandleHost(),r=this._viewResizerWrapper,n=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(o.isSameNode(i)){const t=e||new g.Z(i);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==(0,f.Z)(n,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,s={x:(o=e).pageX,y:o.pageY};var o;const i=!this._options.isCentered||this._options.isCentered(this),r={x:t._referenceCoordinates.x-(s.x+t.originalWidth),y:s.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(r.x=s.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(r.x*=2);const n={width:Math.abs(t.originalWidth+r.x),height:Math.abs(t.originalHeight+r.y)};n.dominant=n.width/t.aspectRatio>n.height?"width":"height",n.max=n[n.dominant];const a={width:n.width,height:n.height};return"width"==n.dominant?a.height=a.width/t.aspectRatio:a.width=a.height*t.aspectRatio,{width:Math.round(a.width),height:Math.round(a.height),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*a.width*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)e.appendChild(new p.ZP({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(s=o,`ck-widget__resizer__handle-${s}`)}}).render());var s}_appendSizeUI(e){this._sizeView=new v,this._sizeView.render(),e.appendChild(this._sizeView.element)}}(0,k.Z)(y,m.Z);var Z=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),P=s("./packages/ckeditor5-utils/src/dom/global.ts"),x=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),T=s("./node_modules/lodash-es/throttle.js"),A=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),C=s.n(A),E=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css"),S={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};C()(E.Z,S);E.Z.locals;class j extends i.Z{static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=P.Z.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),this._resizers=new Map,e.view.addObserver(x.Z),this._observer=Object.create(Z.Z),this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this));this._redrawSelectedResizerThrottled=(0,T.Z)((()=>{this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(P.Z.window,"resize",this._redrawSelectedResizerThrottled);const s=this.editor.editing.view.document.selection;s.on("change",(()=>{const e=s.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}destroy(){this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new y(e),s=this.editor.plugins;if(t.attach(),s.has("WidgetToolbarRepository")){const e=s.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const o=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(o)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const s=t.domTarget;y.isResizeHandle(s)&&(this._activeResizer=this._getResizerByHandle(s),this._activeResizer&&(this._activeResizer.begin(s),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}(0,k.Z)(j,m.Z);var O=s("./packages/ckeditor5-widget/src/widgettypearound/widgettypearound.js")},"?7cdd":(e,t,s)=>{e.exports=s},"./node_modules/lodash-es/_ListCache.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});const o=function(){this.__data__=[],this.size=0};var i=s("./node_modules/lodash-es/eq.js");const r=function(e,t){for(var s=e.length;s--;)if((0,i.Z)(e[s][0],t))return s;return-1};var n=Array.prototype.splice;const a=function(e){var t=this.__data__,s=r(t,e);return!(s<0)&&(s==t.length-1?t.pop():n.call(t,s,1),--this.size,!0)};const c=function(e){var t=this.__data__,s=r(t,e);return s<0?void 0:t[s][1]};const l=function(e){return r(this.__data__,e)>-1};const d=function(e,t){var s=this.__data__,o=r(s,e);return o<0?(++this.size,s.push([e,t])):s[o][1]=t,this};function h(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_getNative.js"),i=s("./node_modules/lodash-es/_root.js");const r=(0,o.Z)(i.Z,"Map")},"./node_modules/lodash-es/_MapCache.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>Z});const o=(0,s("./node_modules/lodash-es/_getNative.js").Z)(Object,"create");const i=function(){this.__data__=o?o(null):{},this.size=0};const r=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var n=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(o){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return n.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(e){var t=this.__data__;return o?void 0!==t[e]:c.call(t,e)};const d=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=o&&void 0===t?"__lodash_hash_undefined__":t,this};function h(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t{"use strict";s.d(t,{Z:()=>u});var o=s("./node_modules/lodash-es/_ListCache.js");const i=function(){this.__data__=new o.Z,this.size=0};const r=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};const n=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var c=s("./node_modules/lodash-es/_Map.js"),l=s("./node_modules/lodash-es/_MapCache.js");const d=function(e,t){var s=this.__data__;if(s instanceof o.Z){var i=s.__data__;if(!c.Z||i.length<199)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new l.Z(i)}return s.set(e,t),this.size=s.size,this};function h(e){var t=this.__data__=new o.Z(e);this.size=t.size}h.prototype.clear=i,h.prototype.delete=r,h.prototype.get=n,h.prototype.has=a,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Symbol.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=s("./node_modules/lodash-es/_root.js").Z.Symbol},"./node_modules/lodash-es/_Uint8Array.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=s("./node_modules/lodash-es/_root.js").Z.Uint8Array},"./node_modules/lodash-es/_arrayLikeKeys.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});const o=function(e,t){for(var s=-1,o=Array(e);++s{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){for(var s=-1,o=t.length,i=e.length;++s{"use strict";s.d(t,{Z:()=>n});var o=s("./node_modules/lodash-es/_baseAssignValue.js"),i=s("./node_modules/lodash-es/eq.js"),r=Object.prototype.hasOwnProperty;const n=function(e,t,s){var n=e[t];r.call(e,t)&&(0,i.Z)(n,s)&&(void 0!==s||t in e)||(0,o.Z)(e,t,s)}},"./node_modules/lodash-es/_baseAssignValue.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_defineProperty.js");const i=function(e,t,s){"__proto__"==t&&o.Z?(0,o.Z)(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}},"./node_modules/lodash-es/_baseClone.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>Y});var o=s("./node_modules/lodash-es/_Stack.js");const i=function(e,t){for(var s=-1,o=null==e?0:e.length;++s{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_arrayPush.js"),i=s("./node_modules/lodash-es/isArray.js");const r=function(e,t,s){var r=t(e);return(0,i.Z)(e)?r:(0,o.Z)(r,s(e))}},"./node_modules/lodash-es/_baseGetTag.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./node_modules/lodash-es/_Symbol.js"),i=Object.prototype,r=i.hasOwnProperty,n=i.toString,a=o.Z?o.Z.toStringTag:void 0;const c=function(e){var t=r.call(e,a),s=e[a];try{e[a]=void 0;var o=!0}catch(e){}var i=n.call(e);return o&&(t?e[a]=s:delete e[a]),i};var l=Object.prototype.toString;const d=function(e){return l.call(e)};var h=o.Z?o.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?c(e):d(e)}},"./node_modules/lodash-es/_baseIsEqual.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>R});var o=s("./node_modules/lodash-es/_Stack.js"),i=s("./node_modules/lodash-es/_MapCache.js");const r=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const n=function(e){return this.__data__.has(e)};function a(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new i.Z;++ta))return!1;var u=r.get(e),p=r.get(t);if(u&&p)return u==t&&p==e;var g=-1,f=!0,m=2&s?new c:void 0;for(r.set(e,t),r.set(t,e);++g{"use strict";s.d(t,{Z:()=>o});const o=function(e){return function(t){return e(t)}}},"./node_modules/lodash-es/_cloneArrayBuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_Uint8Array.js");const i=function(e){var t=new e.constructor(e.byteLength);return new o.Z(t).set(new o.Z(e)),t}},"./node_modules/lodash-es/_cloneBuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./node_modules/lodash-es/_root.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=i&&"object"==typeof module&&module&&!module.nodeType&&module,n=r&&r.exports===i?o.Z.Buffer:void 0,a=n?n.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var s=e.length,o=a?a(s):new e.constructor(s);return e.copy(o),o}},"./node_modules/lodash-es/_cloneTypedArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_cloneArrayBuffer.js");const i=function(e,t){var s=t?(0,o.Z)(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}},"./node_modules/lodash-es/_copyArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){var s=-1,o=e.length;for(t||(t=Array(o));++s{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_assignValue.js"),i=s("./node_modules/lodash-es/_baseAssignValue.js");const r=function(e,t,s,r){var n=!s;s||(s={});for(var a=-1,c=t.length;++a{"use strict";s.d(t,{Z:()=>b});const o=function(e){return e};const i=function(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)};var r=Math.max;const n=function(e,t,s){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,n=-1,a=r(o.length-t,0),c=Array(a);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(l);const u=function(e,t){return h(n(e,t,o),e+"")};var p=s("./node_modules/lodash-es/eq.js"),g=s("./node_modules/lodash-es/isArrayLike.js"),f=s("./node_modules/lodash-es/_isIndex.js"),m=s("./node_modules/lodash-es/isObject.js");const k=function(e,t,s){if(!(0,m.Z)(s))return!1;var o=typeof t;return!!("number"==o?(0,g.Z)(s)&&(0,f.Z)(t,s.length):"string"==o&&t in s)&&(0,p.Z)(s[t],e)};const b=function(e){return u((function(t,s){var o=-1,i=s.length,r=i>1?s[i-1]:void 0,n=i>2?s[2]:void 0;for(r=e.length>3&&"function"==typeof r?(i--,r):void 0,n&&k(s[0],s[1],n)&&(r=i<3?void 0:r,i=1),t=Object(t);++o{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_getNative.js");const i=function(){try{var e=(0,o.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},"./node_modules/lodash-es/_freeGlobal.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o="object"==typeof global&&global&&global.Object===Object&&global},"./node_modules/lodash-es/_getAllKeys.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./node_modules/lodash-es/_baseGetAllKeys.js"),i=s("./node_modules/lodash-es/_getSymbols.js"),r=s("./node_modules/lodash-es/keys.js");const n=function(e){return(0,o.Z)(e,r.Z,i.Z)}},"./node_modules/lodash-es/_getNative.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./node_modules/lodash-es/isFunction.js");const i=s("./node_modules/lodash-es/_root.js").Z["__core-js_shared__"];var r,n=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";const a=function(e){return!!n&&n in e};var c=s("./node_modules/lodash-es/isObject.js"),l=s("./node_modules/lodash-es/_toSource.js"),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,p=h.toString,g=u.hasOwnProperty,f=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,c.Z)(e)||a(e))&&((0,o.Z)(e)?f:d).test((0,l.Z)(e))};const k=function(e,t){return null==e?void 0:e[t]};const b=function(e,t){var s=k(e,t);return m(s)?s:void 0}},"./node_modules/lodash-es/_getPrototype.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=(0,s("./node_modules/lodash-es/_overArg.js").Z)(Object.getPrototypeOf,Object)},"./node_modules/lodash-es/_getSymbols.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const o=function(e,t){for(var s=-1,o=null==e?0:e.length,i=0,r=[];++s{"use strict";s.d(t,{Z:()=>Z});var o=s("./node_modules/lodash-es/_getNative.js"),i=s("./node_modules/lodash-es/_root.js");const r=(0,o.Z)(i.Z,"DataView");var n=s("./node_modules/lodash-es/_Map.js");const a=(0,o.Z)(i.Z,"Promise");const c=(0,o.Z)(i.Z,"Set");const l=(0,o.Z)(i.Z,"WeakMap");var d=s("./node_modules/lodash-es/_baseGetTag.js"),h=s("./node_modules/lodash-es/_toSource.js"),u="[object Map]",p="[object Promise]",g="[object Set]",f="[object WeakMap]",m="[object DataView]",k=(0,h.Z)(r),b=(0,h.Z)(n.Z),_=(0,h.Z)(a),w=(0,h.Z)(c),v=(0,h.Z)(l),y=d.Z;(r&&y(new r(new ArrayBuffer(1)))!=m||n.Z&&y(new n.Z)!=u||a&&y(a.resolve())!=p||c&&y(new c)!=g||l&&y(new l)!=f)&&(y=function(e){var t=(0,d.Z)(e),s="[object Object]"==t?e.constructor:void 0,o=s?(0,h.Z)(s):"";if(o)switch(o){case k:return m;case b:return u;case _:return p;case w:return g;case v:return f}return t});const Z=y},"./node_modules/lodash-es/_initCloneObject.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./node_modules/lodash-es/isObject.js"),i=Object.create;const r=function(){function e(){}return function(t){if(!(0,o.Z)(t))return{};if(i)return i(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();var n=s("./node_modules/lodash-es/_getPrototype.js"),a=s("./node_modules/lodash-es/_isPrototype.js");const c=function(e){return"function"!=typeof e.constructor||(0,a.Z)(e)?{}:r((0,n.Z)(e))}},"./node_modules/lodash-es/_isIndex.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var s=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==s||"symbol"!=s&&o.test(e))&&e>-1&&e%1==0&&e{"use strict";s.d(t,{Z:()=>i});var o=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||o)}},"./node_modules/lodash-es/_nodeUtil.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=i&&"object"==typeof module&&module&&!module.nodeType&&module,n=r&&r.exports===i&&o.Z.process;const a=function(){try{var e=r&&r.require&&r.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}()},"./node_modules/lodash-es/_overArg.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){return function(s){return e(t(s))}}},"./node_modules/lodash-es/_root.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof self&&self&&self.Object===Object&&self;const r=o.Z||i||Function("return this")()},"./node_modules/lodash-es/_toSource.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=Function.prototype.toString;const i=function(e){if(null!=e){try{return o.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash-es/assignIn.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./node_modules/lodash-es/_copyObject.js"),i=s("./node_modules/lodash-es/_createAssigner.js"),r=s("./node_modules/lodash-es/keysIn.js");const n=(0,i.Z)((function(e,t){(0,o.Z)(t,(0,r.Z)(t),e)}))},"./node_modules/lodash-es/clone.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_baseClone.js");const i=function(e){return(0,o.Z)(e,4)}},"./node_modules/lodash-es/cloneDeep.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_baseClone.js");const i=function(e){return(0,o.Z)(e,5)}},"./node_modules/lodash-es/cloneDeepWith.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_baseClone.js");const i=function(e,t){return t="function"==typeof t?t:void 0,(0,o.Z)(e,5,t)}},"./node_modules/lodash-es/debounce.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./node_modules/lodash-es/isObject.js"),i=s("./node_modules/lodash-es/_root.js");const r=function(){return i.Z.Date.now()};var n=/\s/;const a=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t};var c=/^\s+/;const l=function(e){return e?e.slice(0,a(e)+1).replace(c,""):e};var d=s("./node_modules/lodash-es/isSymbol.js"),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,g=parseInt;const f=function(e){if("number"==typeof e)return e;if((0,d.Z)(e))return NaN;if((0,o.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var s=u.test(e);return s||p.test(e)?g(e.slice(2),s?2:8):h.test(e)?NaN:+e};var m=Math.max,k=Math.min;const b=function(e,t,s){var i,n,a,c,l,d,h=0,u=!1,p=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var s=i,o=n;return i=n=void 0,h=t,c=e.apply(o,s)}function _(e){return h=e,l=setTimeout(v,t),u?b(e):c}function w(e){var s=e-d;return void 0===d||s>=t||s<0||p&&e-h>=a}function v(){var e=r();if(w(e))return y(e);l=setTimeout(v,function(e){var s=t-(e-d);return p?k(s,a-(e-h)):s}(e))}function y(e){return l=void 0,g&&i?b(e):(i=n=void 0,c)}function Z(){var e=r(),s=w(e);if(i=arguments,n=this,d=e,s){if(void 0===l)return _(d);if(p)return clearTimeout(l),l=setTimeout(v,t),b(d)}return void 0===l&&(l=setTimeout(v,t)),c}return t=f(t)||0,(0,o.Z)(s)&&(u=!!s.leading,a=(p="maxWait"in s)?m(f(s.maxWait)||0,t):a,g="trailing"in s?!!s.trailing:g),Z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=d=n=l=void 0},Z.flush=function(){return void 0===l?c:y(r())},Z}},"./node_modules/lodash-es/eq.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash-es/isArguments.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isObjectLike.js");const r=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,o.Z)(e)};var n=Object.prototype,a=n.hasOwnProperty,c=n.propertyIsEnumerable;const l=r(function(){return arguments}())?r:function(e){return(0,i.Z)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},"./node_modules/lodash-es/isArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=Array.isArray},"./node_modules/lodash-es/isArrayLike.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/isFunction.js"),i=s("./node_modules/lodash-es/isLength.js");const r=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,o.Z)(e)}},"./node_modules/lodash-es/isBuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./node_modules/lodash-es/_root.js");const i=function(){return!1};var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=r&&"object"==typeof module&&module&&!module.nodeType&&module,a=n&&n.exports===r?o.Z.Buffer:void 0;const c=(a?a.isBuffer:void 0)||i},"./node_modules/lodash-es/isElement.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/isObjectLike.js"),i=s("./node_modules/lodash-es/isPlainObject.js");const r=function(e){return(0,o.Z)(e)&&1===e.nodeType&&!(0,i.Z)(e)}},"./node_modules/lodash-es/isFunction.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isObject.js");const r=function(e){if(!(0,i.Z)(e))return!1;var t=(0,o.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash-es/isLength.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash-es/isObject.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash-es/isObjectLike.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash-es/isPlainObject.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/_getPrototype.js"),r=s("./node_modules/lodash-es/isObjectLike.js"),n=Function.prototype,a=Object.prototype,c=n.toString,l=a.hasOwnProperty,d=c.call(Object);const h=function(e){if(!(0,r.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=(0,i.Z)(e);if(null===t)return!0;var s=l.call(t,"constructor")&&t.constructor;return"function"==typeof s&&s instanceof s&&c.call(s)==d}},"./node_modules/lodash-es/isSymbol.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isObjectLike.js");const r=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,o.Z)(e)}},"./node_modules/lodash-es/isTypedArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isLength.js"),r=s("./node_modules/lodash-es/isObjectLike.js"),n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1;const a=function(e){return(0,r.Z)(e)&&(0,i.Z)(e.length)&&!!n[(0,o.Z)(e)]};var c=s("./node_modules/lodash-es/_baseUnary.js"),l=s("./node_modules/lodash-es/_nodeUtil.js"),d=l.Z&&l.Z.isTypedArray;const h=d?(0,c.Z)(d):a},"./node_modules/lodash-es/keys.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./node_modules/lodash-es/_arrayLikeKeys.js"),i=s("./node_modules/lodash-es/_isPrototype.js");const r=(0,s("./node_modules/lodash-es/_overArg.js").Z)(Object.keys,Object);var n=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,i.Z)(e))return r(e);var t=[];for(var s in Object(e))n.call(e,s)&&"constructor"!=s&&t.push(s);return t};var c=s("./node_modules/lodash-es/isArrayLike.js");const l=function(e){return(0,c.Z)(e)?(0,o.Z)(e):a(e)}},"./node_modules/lodash-es/keysIn.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./node_modules/lodash-es/_arrayLikeKeys.js"),i=s("./node_modules/lodash-es/isObject.js"),r=s("./node_modules/lodash-es/_isPrototype.js");const n=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,i.Z)(e))return n(e);var t=(0,r.Z)(e),s=[];for(var o in e)("constructor"!=o||!t&&a.call(e,o))&&s.push(o);return s};var l=s("./node_modules/lodash-es/isArrayLike.js");const d=function(e){return(0,l.Z)(e)?(0,o.Z)(e,!0):c(e)}},"./node_modules/lodash-es/stubArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(){return[]}},"./node_modules/lodash-es/throttle.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/debounce.js"),i=s("./node_modules/lodash-es/isObject.js");const r=function(e,t,s){var r=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,i.Z)(s)&&(r="leading"in s?!!s.leading:r,n="trailing"in s?!!s.trailing:n),(0,o.Z)(e,t,{leading:r,maxWait:t,trailing:n})}},"./node_modules/lodash-es/toString.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./node_modules/lodash-es/_Symbol.js");const i=function(e,t){for(var s=-1,o=null==e?0:e.length,i=Array(o);++s{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nc=void 0;var o=s("?7cdd");(window.CKEditor5=window.CKEditor5||{}).dll=o})(),function(e){e.CKEditor5=e.CKEditor5||{};const t=["utils","core","engine","ui","clipboard","enter","paragraph","select-all","typing","undo","upload","widget"];for(const s of t){const t=s.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()));e.CKEditor5[t]=e.CKEditor5.dll(`./src/${s}.js`)}}(window); \ No newline at end of file + */(()=>{var e={"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position{display:inline;pointer-events:none;position:relative}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{position:absolute;width:0}.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__selection-handle,.ck.ck-editor__editable .ck-widget:-webkit-drag>.ck-widget__type-around{display:none}:root{--ck-clipboard-drop-target-dot-width:12px;--ck-clipboard-drop-target-dot-height:8px;--ck-clipboard-drop-target-color:var(--ck-color-focus-border)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span{background:var(--ck-clipboard-drop-target-color);border:1px solid var(--ck-clipboard-drop-target-color);bottom:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);margin-left:-1px;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5)}.ck.ck-editor__editable .ck.ck-clipboard-drop-target-position span:after{border-color:var(--ck-clipboard-drop-target-color) transparent transparent transparent;border-style:solid;border-width:calc(var(--ck-clipboard-drop-target-dot-height)) calc(var(--ck-clipboard-drop-target-dot-width)*.5) 0 calc(var(--ck-clipboard-drop-target-dot-width)*.5);content:"";display:block;height:0;left:50%;position:absolute;top:calc(var(--ck-clipboard-drop-target-dot-height)*-.5);transform:translateX(-50%);width:0}.ck.ck-editor__editable .ck-widget.ck-clipboard-drop-target-range{outline:var(--ck-widget-outline-thickness) solid var(--ck-clipboard-drop-target-color)!important}.ck.ck-editor__editable .ck-widget:-webkit-drag{zoom:.6;outline:none!important}',""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-placeholder,.ck.ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{content:attr(data-placeholder);left:0;pointer-events:none;position:absolute;right:0}.ck.ck-read-only .ck-placeholder:before{display:none}.ck.ck-reset_all .ck-placeholder{position:relative}.ck .ck-placeholder:before,.ck.ck-placeholder:before{color:var(--ck-color-engine-placeholder-text);cursor:text}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-editor__editable span[data-ck-unsafe-element]{display:none}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button,a.ck.ck-button{align-items:center;display:inline-flex;justify-content:left;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button,a.ck.ck-button{background:var(--ck-color-button-default-background)}.ck.ck-button:not(.ck-disabled):hover,a.ck.ck-button:not(.ck-disabled):hover{background:var(--ck-color-button-default-hover-background)}.ck.ck-button:not(.ck-disabled):active,a.ck.ck-button:not(.ck-disabled):active{background:var(--ck-color-button-default-active-background)}.ck.ck-button.ck-disabled,a.ck.ck-button.ck-disabled{background:var(--ck-color-button-default-disabled-background)}.ck.ck-button,a.ck.ck-button{border-radius:0}.ck-rounded-corners .ck.ck-button,.ck-rounded-corners a.ck.ck-button,.ck.ck-button.ck-rounded-corners,a.ck.ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-button,a.ck.ck-button{-webkit-appearance:none;border:1px solid transparent;cursor:default;font-size:inherit;line-height:1;min-height:var(--ck-ui-component-min-height);min-width:var(--ck-ui-component-min-height);padding:var(--ck-spacing-tiny);text-align:center;transition:box-shadow .2s ease-in-out,border .2s ease-in-out;vertical-align:middle;white-space:nowrap}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-button .ck-button__icon use,.ck.ck-button .ck-button__icon use *,a.ck.ck-button .ck-button__icon use,a.ck.ck-button .ck-button__icon use *{color:inherit}.ck.ck-button .ck-button__label,a.ck.ck-button .ck-button__label{color:inherit;cursor:inherit;font-size:inherit;font-weight:inherit;vertical-align:middle}[dir=ltr] .ck.ck-button .ck-button__label,[dir=ltr] a.ck.ck-button .ck-button__label{text-align:left}[dir=rtl] .ck.ck-button .ck-button__label,[dir=rtl] a.ck.ck-button .ck-button__label{text-align:right}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__icon,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(var(--ck-spacing-small)*-1);margin-right:var(--ck-spacing-small)}[dir=rtl] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=rtl] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:var(--ck-spacing-small);margin-right:calc(var(--ck-spacing-small)*-1)}.ck.ck-button.ck-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background)}.ck.ck-button.ck-on.ck-disabled,a.ck.ck-button.ck-on.ck-disabled{background:var(--ck-color-button-on-disabled-background)}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{color:var(--ck-color-button-on-color)}.ck.ck-button.ck-button-save,a.ck.ck-button.ck-button-save{color:var(--ck-color-button-save)}.ck.ck-button.ck-button-cancel,a.ck.ck-button.ck-button-cancel{color:var(--ck-color-button-cancel)}.ck.ck-button-action,a.ck.ck-button-action{background:var(--ck-color-button-action-background)}.ck.ck-button-action:not(.ck-disabled):hover,a.ck.ck-button-action:not(.ck-disabled):hover{background:var(--ck-color-button-action-hover-background)}.ck.ck-button-action:not(.ck-disabled):active,a.ck.ck-button-action:not(.ck-disabled):active{background:var(--ck-color-button-action-active-background)}.ck.ck-button-action.ck-disabled,a.ck.ck-button-action.ck-disabled{background:var(--ck-color-button-action-disabled-background)}.ck.ck-button-action,a.ck.ck-button-action{color:var(--ck-color-button-action-text)}.ck.ck-button-bold,a.ck.ck-button-bold{font-weight:700}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{display:block}:root{--ck-switch-button-toggle-width:2.6153846154em;--ck-switch-button-toggle-inner-size:calc(1.07692em + 1px);--ck-switch-button-translation:calc(var(--ck-switch-button-toggle-width) - var(--ck-switch-button-toggle-inner-size) - 2px);--ck-switch-button-inner-hover-shadow:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.ck.ck-button.ck-switchbutton,.ck.ck-button.ck-switchbutton.ck-on:active,.ck.ck-button.ck-switchbutton.ck-on:focus,.ck.ck-button.ck-switchbutton.ck-on:hover,.ck.ck-button.ck-switchbutton:active,.ck.ck-button.ck-switchbutton:focus,.ck.ck-button.ck-switchbutton:hover{background:transparent;color:inherit}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(var(--ck-spacing-large)*2)}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(var(--ck-spacing-large)*2)}.ck.ck-button.ck-switchbutton .ck-button__toggle{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle,.ck.ck-button.ck-switchbutton .ck-button__toggle.ck-rounded-corners{border-radius:var(--ck-border-radius)}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-left:auto}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__toggle{margin-right:auto}.ck.ck-button.ck-switchbutton .ck-button__toggle{background:var(--ck-color-switch-button-off-background);border:1px solid transparent;transition:background .4s ease,box-shadow .2s ease-in-out,outline .2s ease-in-out;width:var(--ck-switch-button-toggle-width)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{border-radius:0}.ck-rounded-corners .ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner,.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:calc(var(--ck-border-radius)*.5)}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{background:var(--ck-color-switch-button-inner-background);height:var(--ck-switch-button-toggle-inner-size);transition:all .3s ease;width:var(--ck-switch-button-toggle-inner-size)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover{background:var(--ck-color-switch-button-off-hover-background)}.ck.ck-button.ck-switchbutton .ck-button__toggle:hover .ck-button__toggle__inner{box-shadow:var(--ck-switch-button-inner-hover-shadow)}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-switchbutton:focus{border-color:transparent;box-shadow:none;outline:none}.ck.ck-button.ck-switchbutton:focus .ck-button__toggle{box-shadow:0 0 0 1px var(--ck-color-base-background),0 0 0 5px var(--ck-color-focus-outer-shadow);outline:var(--ck-focus-ring);outline-offset:1px}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle{background:var(--ck-color-switch-button-on-background)}.ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle:hover{background:var(--ck-color-switch-button-on-hover-background)}[dir=ltr] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(var( --ck-switch-button-translation ))}[dir=rtl] .ck.ck-button.ck-switchbutton.ck-on .ck-button__toggle .ck-button__toggle__inner{transform:translateX(calc(var( --ck-switch-button-translation )*-1))}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#166fd4}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{border:0;height:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-color-grid-tile-size)}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{color:var(--ck-color-color-grid-check-icon);display:none}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-dropdown-max-width:75vw}.ck.ck-dropdown{display:inline-block;position:relative}.ck.ck-dropdown .ck-dropdown__arrow{pointer-events:none;z-index:var(--ck-z-default)}.ck.ck-dropdown .ck-button.ck-dropdown__button{width:100%}.ck.ck-dropdown .ck-dropdown__panel{display:none;max-width:var(--ck-dropdown-max-width);position:absolute;z-index:var(--ck-z-modal)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{bottom:auto;top:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se{left:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{right:0}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_n,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_s{left:50%;transform:translateX(-50%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nmw,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_smw{left:75%;transform:translateX(-75%)}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nme,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sme{left:25%;transform:translateX(-25%)}.ck.ck-toolbar .ck-dropdown__panel{z-index:calc(var(--ck-z-modal) + 1)}:root{--ck-dropdown-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-dropdown{font-size:inherit}.ck.ck-dropdown .ck-dropdown__arrow{width:var(--ck-dropdown-arrow-size)}[dir=ltr] .ck.ck-dropdown .ck-dropdown__arrow{margin-left:var(--ck-spacing-standard);right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-dropdown .ck-dropdown__arrow{left:var(--ck-spacing-standard);margin-right:var(--ck-spacing-small)}.ck.ck-dropdown.ck-disabled .ck-dropdown__arrow{opacity:var(--ck-disabled-opacity)}[dir=ltr] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-left:var(--ck-spacing-small)}[dir=rtl] .ck.ck-dropdown .ck-button.ck-dropdown__button:not(.ck-button_with-text){padding-right:var(--ck-spacing-small)}.ck.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{overflow:hidden;text-overflow:ellipsis;width:7em}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on{border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-dropdown__button_label-width_auto .ck-button__label{width:auto}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active{box-shadow:none}.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-off:active:focus,.ck.ck-dropdown .ck-button.ck-dropdown__button.ck-on:active:focus{box-shadow:var(--ck-focus-outer-shadow),0 0}.ck.ck-dropdown__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;box-shadow:var(--ck-drop-shadow),0 0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-dropdown .ck-dropdown__panel .ck-list{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list,.ck.ck-dropdown .ck-dropdown__panel .ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:first-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0;border-top-left-radius:0}.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button{border-radius:0}.ck-rounded-corners .ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button,.ck.ck-dropdown .ck-dropdown__panel .ck-list .ck-list__item:last-child .ck-button.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-right-radius:unset;border-top-right-radius:unset}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__action{border-bottom-left-radius:unset;border-top-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-left-radius:unset;border-top-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-bottom-right-radius:unset;border-top-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,.ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{background-color:var(--ck-color-split-button-hover-border);content:"";height:100%;position:absolute;width:1px}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{left:-1px}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled):after,[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled):after{right:-1px}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}',""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-toolbar-dropdown-max-width:60vw}.ck.ck-toolbar-dropdown>.ck-dropdown__panel{max-width:var(--ck-toolbar-dropdown-max-width);width:max-content}.ck.ck-toolbar-dropdown>.ck-dropdown__panel .ck-button:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-toolbar-dropdown .ck-toolbar{border:0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-editable-blur-selection:#d9d9d9}.ck.ck-editor__editable:not(.ck-editor__nested-editable){border-radius:0}.ck-rounded-corners .ck.ck-editor__editable:not(.ck-editor__nested-editable),.ck.ck-editor__editable.ck-rounded-corners:not(.ck-editor__nested-editable){border-radius:var(--ck-border-radius)}.ck.ck-editor__editable.ck-focused:not(.ck-editor__nested-editable){border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck.ck-editor__editable_inline{border:1px solid transparent;overflow:auto;padding:0 var(--ck-spacing-standard)}.ck.ck-editor__editable_inline[dir=ltr]{text-align:left}.ck.ck-editor__editable_inline[dir=rtl]{text-align:right}.ck.ck-editor__editable_inline>:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.ck.ck-editor__editable_inline.ck-blurred ::selection{background:var(--ck-color-editable-blur-selection)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_n]:after{border-bottom-color:var(--ck-color-base-foreground)}.ck.ck-balloon-panel.ck-toolbar-container[class*=arrow_s]:after{border-top-color:var(--ck-color-base-foreground)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__header{align-items:center;display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}:root{--ck-form-header-height:38px}.ck.ck-form__header{border-bottom:1px solid var(--ck-color-base-border);height:var(--ck-form-header-height);line-height:var(--ck-form-header-height);padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-form__header .ck-form__header__label{font-weight:700}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{font-size:.8333350694em;height:var(--ck-icon-size);width:var(--ck-icon-size);will-change:transform}.ck.ck-icon,.ck.ck-icon *{cursor:inherit}.ck.ck-icon.ck-icon_inherit-color,.ck.ck-icon.ck-icon_inherit-color *{color:inherit}.ck.ck-icon.ck-icon_inherit-color :not([fill]){fill:currentColor}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-input-width:18em;--ck-input-text-width:var(--ck-input-width)}.ck.ck-input{border-radius:0}.ck-rounded-corners .ck.ck-input,.ck.ck-input.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input{background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);min-height:var(--ck-ui-component-min-height);min-width:var(--ck-input-width);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);transition:box-shadow .1s ease-in-out,border .1s ease-in-out}.ck.ck-input:focus{border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;outline:none}.ck.ck-input[readonly]{background:var(--ck-color-input-disabled-background);border:1px solid var(--ck-color-input-disabled-border);color:var(--ck-color-input-disabled-text)}.ck.ck-input[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-input.ck-error{animation:ck-input-shake .3s ease both;border-color:var(--ck-color-input-error-border)}.ck.ck-input.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),0 0}@keyframes ck-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{display:flex;position:relative}.ck.ck-labeled-field-view .ck.ck-label{display:block;position:absolute}:root{--ck-labeled-field-view-transition:.1s cubic-bezier(0,0,0.24,0.95);--ck-labeled-field-empty-unfocused-max-width:100% - 2 * var(--ck-spacing-medium);--ck-labeled-field-label-default-position-x:var(--ck-spacing-medium);--ck-labeled-field-label-default-position-y:calc(var(--ck-font-size-base)*0.6);--ck-color-labeled-field-label-background:var(--ck-color-base-background)}.ck.ck-labeled-field-view{border-radius:0}.ck-rounded-corners .ck.ck-labeled-field-view,.ck.ck-labeled-field-view.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper{width:100%}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{top:0}[dir=ltr] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{left:0}[dir=rtl] .ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{right:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:var(--ck-color-labeled-field-label-background);font-weight:400;line-height:normal;max-width:100%;overflow:hidden;padding:0 calc(var(--ck-font-size-tiny)*.5);pointer-events:none;text-overflow:ellipsis;transform:translate(var(--ck-spacing-medium),-6px) scale(.75);transform-origin:0 0;transition:transform var(--ck-labeled-field-view-transition),padding var(--ck-labeled-field-view-transition),background var(--ck-labeled-field-view-transition)}.ck.ck-labeled-field-view.ck-error .ck-input:not([readonly])+.ck.ck-label,.ck.ck-labeled-field-view.ck-error>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view .ck-labeled-field-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-field-view .ck-labeled-field-view__status.ck-labeled-field-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-field-view.ck-disabled>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{color:var(--ck-color-input-disabled-text)}[dir=ltr] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=ltr] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(var(--ck-labeled-field-label-default-position-x),var(--ck-labeled-field-label-default-position-y)) scale(1)}[dir=rtl] .ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,[dir=rtl] .ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{transform:translate(calc(var(--ck-labeled-field-label-default-position-x)*-1),var(--ck-labeled-field-label-default-position-y)) scale(1)}.ck.ck-labeled-field-view.ck-disabled.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label,.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck.ck-label{background:transparent;max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width));padding:0}.ck.ck-labeled-field-view>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck.ck-button{background:transparent}.ck.ck-labeled-field-view.ck-labeled-field-view_empty>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown>.ck-button>.ck-button__label{opacity:0}.ck.ck-labeled-field-view.ck-labeled-field-view_empty:not(.ck-labeled-field-view_focused):not(.ck-labeled-field-view_placeholder)>.ck.ck-labeled-field-view__input-wrapper>.ck-dropdown+.ck-label{max-width:calc(var(--ck-labeled-field-empty-unfocused-max-width) - var(--ck-dropdown-arrow-size) - var(--ck-spacing-standard))}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-list{display:flex;flex-direction:column;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-list .ck-list__item,.ck.ck-list .ck-list__separator{display:block}.ck.ck-list .ck-list__item>:focus{position:relative;z-index:var(--ck-z-default)}.ck.ck-list{border-radius:0}.ck-rounded-corners .ck.ck-list,.ck.ck-list.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-list{background:var(--ck-color-list-background);list-style-type:none}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{border-radius:0;min-height:unset;padding:calc(var(--ck-line-height-base)*.2*var(--ck-font-size-base)) calc(var(--ck-line-height-base)*.4*var(--ck-font-size-base));text-align:left;width:100%}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(var(--ck-line-height-base)*1.2*var(--ck-font-size-base))}.ck.ck-list__item .ck-button:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on{background:var(--ck-color-list-button-on-background);color:var(--ck-color-list-button-on-text)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-switchbutton):not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{background:var(--ck-color-base-border);height:1px;width:100%}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,':root{--ck-balloon-panel-arrow-z-index:calc(var(--ck-z-default) - 3)}.ck.ck-balloon-panel{display:none;position:absolute;z-index:var(--ck-z-modal)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_n]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_n]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel[class*=arrow_s]:before{z-index:var(--ck-balloon-panel-arrow-z-index)}.ck.ck-balloon-panel[class*=arrow_s]:after{z-index:calc(var(--ck-balloon-panel-arrow-z-index) + 1)}.ck.ck-balloon-panel.ck-balloon-panel_visible{display:block}:root{--ck-balloon-border-width:1px;--ck-balloon-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px;--ck-balloon-arrow-drop-shadow:0 2px 2px var(--ck-color-shadow-drop)}.ck.ck-balloon-panel{border-radius:0}.ck-rounded-corners .ck.ck-balloon-panel,.ck.ck-balloon-panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-balloon-panel{background:var(--ck-color-panel-background);border:var(--ck-balloon-border-width) solid var(--ck-color-panel-border);box-shadow:var(--ck-drop-shadow),0 0;min-height:15px}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{border-style:solid;height:0;width:0}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-width:0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_n]:before{border-color:transparent transparent var(--ck-color-panel-border) transparent;margin-top:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_n]:after{border-color:transparent transparent var(--ck-color-panel-background) transparent;margin-top:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-width:var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-color:var(--ck-color-panel-border) transparent transparent;filter:drop-shadow(var(--ck-balloon-arrow-drop-shadow));margin-bottom:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_s]:after{border-color:var(--ck-color-panel-background) transparent transparent transparent;margin-bottom:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_e]:after,.ck.ck-balloon-panel[class*=arrow_e]:before{border-width:var(--ck-balloon-arrow-half-width) 0 var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_e]:before{border-color:transparent transparent transparent var(--ck-color-panel-border);margin-right:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_e]:after{border-color:transparent transparent transparent var(--ck-color-panel-background);margin-right:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel[class*=arrow_w]:after,.ck.ck-balloon-panel[class*=arrow_w]:before{border-width:var(--ck-balloon-arrow-half-width) var(--ck-balloon-arrow-height) var(--ck-balloon-arrow-half-width) 0}.ck.ck-balloon-panel[class*=arrow_w]:before{border-color:transparent var(--ck-color-panel-border) transparent transparent;margin-left:calc(var(--ck-balloon-border-width)*-1)}.ck.ck-balloon-panel[class*=arrow_w]:after{border-color:transparent var(--ck-color-panel-background) transparent transparent;margin-left:calc(var(--ck-balloon-arrow-offset) - var(--ck-balloon-border-width))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:50%;margin-left:calc(var(--ck-balloon-arrow-half-width)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);right:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{bottom:calc(var(--ck-balloon-arrow-height)*-1);left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{margin-right:calc(var(--ck-balloon-arrow-half-width)*2);right:25%;top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(var(--ck-balloon-arrow-half-width)*2);top:calc(var(--ck-balloon-arrow-height)*-1)}.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_e:before{margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);right:calc(var(--ck-balloon-arrow-height)*-1);top:50%}.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_w:before{left:calc(var(--ck-balloon-arrow-height)*-1);margin-top:calc(var(--ck-balloon-arrow-half-width)*-1);top:50%}',""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-balloon-rotator__navigation{align-items:center;display:flex;justify-content:center}.ck .ck-balloon-rotator__content .ck-toolbar{justify-content:center}.ck .ck-balloon-rotator__navigation{background:var(--ck-color-toolbar-background);border-bottom:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation>*{margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-left:var(--ck-spacing-small);margin-right:var(--ck-spacing-standard)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-fake-panel{position:absolute;z-index:calc(var(--ck-z-modal) - 1)}.ck .ck-fake-panel div{position:absolute}.ck .ck-fake-panel div:first-child{z-index:2}.ck .ck-fake-panel div:nth-child(2){z-index:1}:root{--ck-balloon-fake-panel-offset-horizontal:6px;--ck-balloon-fake-panel-offset-vertical:6px}.ck .ck-fake-panel div{background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);box-shadow:var(--ck-drop-shadow),0 0;height:100%;min-height:15px;width:100%}.ck .ck-fake-panel div:first-child{margin-left:var(--ck-balloon-fake-panel-offset-horizontal);margin-top:var(--ck-balloon-fake-panel-offset-vertical)}.ck .ck-fake-panel div:nth-child(2){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*2);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*2)}.ck .ck-fake-panel div:nth-child(3){margin-left:calc(var(--ck-balloon-fake-panel-offset-horizontal)*3);margin-top:calc(var(--ck-balloon-fake-panel-offset-vertical)*3)}.ck .ck-balloon-panel_arrow_s+.ck-fake-panel,.ck .ck-balloon-panel_arrow_se+.ck-fake-panel,.ck .ck-balloon-panel_arrow_sw+.ck-fake-panel{--ck-balloon-fake-panel-offset-vertical:-6px}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{position:fixed;top:0;z-index:var(--ck-z-modal)}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{position:absolute;top:auto}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{border-top-left-radius:0;border-top-right-radius:0;border-width:0 1px 1px;box-shadow:var(--ck-drop-shadow),0 0}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-block-toolbar-button{position:absolute;z-index:var(--ck-z-default)}:root{--ck-color-block-toolbar-button:var(--ck-color-text);--ck-block-toolbar-button-size:var(--ck-font-size-normal)}.ck.ck-block-toolbar-button{color:var(--ck-color-block-toolbar-button);font-size:var(--ck-block-toolbar-size)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-toolbar{align-items:center;display:flex;flex-flow:row nowrap;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-toolbar>.ck-toolbar__items{align-items:center;display:flex;flex-flow:row wrap;flex-grow:1}.ck.ck-toolbar .ck.ck-toolbar__separator{display:inline-block}.ck.ck-toolbar .ck.ck-toolbar__separator:first-child,.ck.ck-toolbar .ck.ck-toolbar__separator:last-child{display:none}.ck.ck-toolbar .ck-toolbar__line-break{flex-basis:100%}.ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items{flex-direction:column}.ck.ck-toolbar.ck-toolbar_floating>.ck-toolbar__items{flex-wrap:nowrap}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck-dropdown__button .ck-dropdown__arrow{display:none}.ck.ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-toolbar,.ck.ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-toolbar{background:var(--ck-color-toolbar-background);border:1px solid var(--ck-color-toolbar-border);padding:0 var(--ck-spacing-small)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;background:var(--ck-color-toolbar-border);margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);min-width:1px;width:1px}.ck.ck-toolbar .ck-toolbar__line-break{height:0}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break){margin-right:var(--ck-spacing-small)}.ck.ck-toolbar>.ck-toolbar__items:empty+.ck.ck-toolbar__separator{display:none}.ck.ck-toolbar>.ck-toolbar__items>:not(.ck-toolbar__line-break),.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-bottom:var(--ck-spacing-small);margin-top:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{border-radius:0;margin:0;width:100%}.ck.ck-toolbar.ck-toolbar_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-dropdown__panel{min-width:auto}.ck.ck-toolbar .ck-toolbar__nested-toolbar-dropdown>.ck-button>.ck-button__label{max-width:7em;width:auto}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=rtl]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-bottom-right-radius:0;border-top-right-radius:0}.ck.ck-toolbar.ck-toolbar_compact[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-toolbar.ck-toolbar_grouping[dir=ltr]>.ck-toolbar__items:not(:empty):not(:only-child),.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck.ck-balloon-panel.ck-tooltip{--ck-balloon-border-width:0px;--ck-balloon-arrow-offset:0px;--ck-balloon-arrow-half-width:4px;--ck-balloon-arrow-height:4px;--ck-color-panel-background:var(--ck-color-tooltip-background);padding:0 var(--ck-spacing-medium);pointer-events:none;z-index:calc(var(--ck-z-modal) + 100)}.ck.ck-balloon-panel.ck-tooltip .ck-tooltip__text{color:var(--ck-color-tooltip-text);font-size:.9em;line-height:1.5}.ck.ck-balloon-panel.ck-tooltip{box-shadow:none}.ck.ck-balloon-panel.ck-tooltip:before{display:none}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck-hidden{display:none!important}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{box-sizing:border-box;height:auto;position:static;width:auto}:root{--ck-z-default:1;--ck-z-modal:calc(var(--ck-z-default) + 999)}.ck-transitions-disabled,.ck-transitions-disabled *{transition:none!important}:root{--ck-color-base-foreground:#fafafa;--ck-color-base-background:#fff;--ck-color-base-border:#ccced1;--ck-color-base-action:#53a336;--ck-color-base-focus:#6cb5f9;--ck-color-base-text:#333;--ck-color-base-active:#2977ff;--ck-color-base-active-focus:#0d65ff;--ck-color-base-error:#db3700;--ck-color-focus-border-coordinates:218,81.8%,56.9%;--ck-color-focus-border:hsl(var(--ck-color-focus-border-coordinates));--ck-color-focus-outer-shadow:#cae1fc;--ck-color-focus-disabled-shadow:rgba(119,186,248,.3);--ck-color-focus-error-shadow:rgba(255,64,31,.3);--ck-color-text:var(--ck-color-base-text);--ck-color-shadow-drop:rgba(0,0,0,.15);--ck-color-shadow-drop-active:rgba(0,0,0,.2);--ck-color-shadow-inner:rgba(0,0,0,.1);--ck-color-button-default-background:transparent;--ck-color-button-default-hover-background:#f0f0f0;--ck-color-button-default-active-background:#f0f0f0;--ck-color-button-default-disabled-background:transparent;--ck-color-button-on-background:#f0f7ff;--ck-color-button-on-hover-background:#dbecff;--ck-color-button-on-active-background:#dbecff;--ck-color-button-on-disabled-background:#f0f2f4;--ck-color-button-on-color:#2977ff;--ck-color-button-action-background:var(--ck-color-base-action);--ck-color-button-action-hover-background:#4d9d30;--ck-color-button-action-active-background:#4d9d30;--ck-color-button-action-disabled-background:#7ec365;--ck-color-button-action-text:var(--ck-color-base-background);--ck-color-button-save:#008a00;--ck-color-button-cancel:#db3700;--ck-color-switch-button-off-background:#939393;--ck-color-switch-button-off-hover-background:#7d7d7d;--ck-color-switch-button-on-background:var(--ck-color-button-action-background);--ck-color-switch-button-on-hover-background:#4d9d30;--ck-color-switch-button-inner-background:var(--ck-color-base-background);--ck-color-switch-button-inner-shadow:rgba(0,0,0,.1);--ck-color-dropdown-panel-background:var(--ck-color-base-background);--ck-color-dropdown-panel-border:var(--ck-color-base-border);--ck-color-input-background:var(--ck-color-base-background);--ck-color-input-border:var(--ck-color-base-border);--ck-color-input-error-border:var(--ck-color-base-error);--ck-color-input-text:var(--ck-color-base-text);--ck-color-input-disabled-background:#f2f2f2;--ck-color-input-disabled-border:var(--ck-color-base-border);--ck-color-input-disabled-text:#757575;--ck-color-list-background:var(--ck-color-base-background);--ck-color-list-button-hover-background:var(--ck-color-button-default-hover-background);--ck-color-list-button-on-background:var(--ck-color-button-on-color);--ck-color-list-button-on-background-focus:var(--ck-color-button-on-color);--ck-color-list-button-on-text:var(--ck-color-base-background);--ck-color-panel-background:var(--ck-color-base-background);--ck-color-panel-border:var(--ck-color-base-border);--ck-color-toolbar-background:var(--ck-color-base-background);--ck-color-toolbar-border:var(--ck-color-base-border);--ck-color-tooltip-background:var(--ck-color-base-text);--ck-color-tooltip-text:var(--ck-color-base-background);--ck-color-engine-placeholder-text:#707070;--ck-color-upload-bar-background:#6cb5f9;--ck-color-link-default:#0000f0;--ck-color-link-selected-background:rgba(31,176,255,.1);--ck-color-link-fake-selection:rgba(31,176,255,.3);--ck-color-highlight-background:#ff0;--ck-disabled-opacity:.5;--ck-focus-outer-shadow-geometry:0 0 0 3px;--ck-focus-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-outer-shadow);--ck-focus-disabled-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-disabled-shadow);--ck-focus-error-outer-shadow:var(--ck-focus-outer-shadow-geometry) var(--ck-color-focus-error-shadow);--ck-focus-ring:1px solid var(--ck-color-focus-border);--ck-font-size-base:13px;--ck-line-height-base:1.84615;--ck-font-face:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;--ck-font-size-tiny:0.7em;--ck-font-size-small:0.75em;--ck-font-size-normal:1em;--ck-font-size-big:1.4em;--ck-font-size-large:1.8em;--ck-ui-component-min-height:2.3em}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset,.ck.ck-reset_all{word-wrap:break-word;background:transparent;border:0;margin:0;padding:0;text-decoration:none;transition:none;vertical-align:middle}.ck-reset_all :not(.ck-reset_all-excluded *),.ck.ck-reset_all{border-collapse:collapse;color:var(--ck-color-text);cursor:auto;float:none;font:normal normal normal var(--ck-font-size-base)/var(--ck-line-height-base) var(--ck-font-face);text-align:left;white-space:nowrap}.ck-reset_all .ck-rtl :not(.ck-reset_all-excluded *){text-align:right}.ck-reset_all iframe:not(.ck-reset_all-excluded *){vertical-align:inherit}.ck-reset_all textarea:not(.ck-reset_all-excluded *){white-space:pre-wrap}.ck-reset_all input[type=password]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text]:not(.ck-reset_all-excluded *),.ck-reset_all textarea:not(.ck-reset_all-excluded *){cursor:text}.ck-reset_all input[type=password][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all input[type=text][disabled]:not(.ck-reset_all-excluded *),.ck-reset_all textarea[disabled]:not(.ck-reset_all-excluded *){cursor:default}.ck-reset_all fieldset:not(.ck-reset_all-excluded *){border:2px groove #dfdee3;padding:10px}.ck-reset_all button:not(.ck-reset_all-excluded *)::-moz-focus-inner{border:0;padding:0}.ck[dir=rtl],.ck[dir=rtl] .ck{text-align:right}:root{--ck-border-radius:2px;--ck-inner-shadow:2px 2px 3px var(--ck-color-shadow-inner) inset;--ck-drop-shadow:0 1px 2px 1px var(--ck-color-shadow-drop);--ck-drop-shadow-active:0 3px 6px 1px var(--ck-color-shadow-drop-active);--ck-spacing-unit:0.6em;--ck-spacing-large:calc(var(--ck-spacing-unit)*1.5);--ck-spacing-standard:var(--ck-spacing-unit);--ck-spacing-medium:calc(var(--ck-spacing-unit)*0.8);--ck-spacing-small:calc(var(--ck-spacing-unit)*0.5);--ck-spacing-tiny:calc(var(--ck-spacing-unit)*0.3);--ck-spacing-extra-tiny:calc(var(--ck-spacing-unit)*0.16)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2;--ck-resizer-border-radius:var(--ck-border-radius);--ck-resizer-tooltip-offset:10px;--ck-resizer-tooltip-height:calc(var(--ck-spacing-small)*2 + 10px)}.ck .ck-widget,.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);color:var(--ck-color-resizer-tooltip-text);display:block;font-size:var(--ck-font-size-tiny);height:var(--ck-resizer-tooltip-height);line-height:var(--ck-resizer-tooltip-height);padding:0 var(--ck-spacing-small)}.ck .ck-size-view.ck-orientation-above-center,.ck .ck-size-view.ck-orientation-bottom-left,.ck .ck-size-view.ck-orientation-bottom-right,.ck .ck-size-view.ck-orientation-top-left,.ck .ck-size-view.ck-orientation-top-right{position:absolute}.ck .ck-size-view.ck-orientation-top-left{left:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{right:var(--ck-resizer-tooltip-offset);top:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-right{bottom:var(--ck-resizer-tooltip-offset);right:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-bottom-left{bottom:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-above-center{left:50%;top:calc(var(--ck-resizer-tooltip-height)*-1);transform:translate(-50%)}:root{--ck-widget-outline-thickness:3px;--ck-widget-handler-icon-size:16px;--ck-widget-handler-animation-duration:200ms;--ck-widget-handler-animation-curve:ease;--ck-color-widget-blurred-border:#dedede;--ck-color-widget-hover-border:#ffc83d;--ck-color-widget-editable-focus-background:var(--ck-color-base-background);--ck-color-widget-drag-handler-icon-color:var(--ck-color-base-background)}.ck .ck-widget{outline-color:transparent;outline-style:solid;outline-width:var(--ck-widget-outline-thickness);transition:outline-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_selected,.ck .ck-widget.ck-widget_selected:hover{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-focus-border)}.ck .ck-widget:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-editor__nested-editable{border:1px solid transparent}.ck .ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck .ck-editor__nested-editable:focus{background-color:var(--ck-color-widget-editable-focus-background);border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;outline:none}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{background-color:transparent;border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;box-sizing:border-box;left:calc(0px - var(--ck-widget-outline-thickness));opacity:0;padding:4px;top:0;transform:translateY(-100%);transition:background-color var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),visibility var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{color:var(--ck-color-widget-drag-handler-icon-color);height:var(--ck-widget-handler-icon-size);width:var(--ck-widget-handler-icon-size)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:0;transition:opacity .3s var(--ck-widget-handler-animation-curve)}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle{background-color:var(--ck-color-widget-hover-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{background-color:var(--ck-color-focus-border);opacity:1}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{left:auto;right:calc(0px - var(--ck-widget-outline-thickness))}.ck.ck-editor__editable.ck-read-only .ck-widget{transition:none}.ck.ck-editor__editable.ck-read-only .ck-widget:not(.ck-widget_selected){--ck-widget-outline-thickness:0px}.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck.ck-editor__editable.ck-read-only .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle:hover>.ck-widget__selection-handle:hover,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle,.ck.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle>.ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child,.ck.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;left:0;pointer-events:none;position:absolute;top:0}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{pointer-events:all;position:absolute}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left,.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{cursor:nesw-resize}:root{--ck-resizer-size:10px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-border-width:1px}.ck .ck-widget__resizer{outline:1px solid var(--ck-color-resizer)}.ck .ck-widget__resizer__handle{background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius);height:var(--ck-resizer-size);width:var(--ck-resizer-size)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{left:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{right:var(--ck-resizer-offset);top:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset)}",""]);const r=i},"./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/css-loader/dist/runtime/api.js"),i=s.n(o)()((function(e){return e[1]}));i.push([e.id,'.ck .ck-widget .ck-widget__type-around__button{display:block;overflow:hidden;position:absolute;z-index:var(--ck-z-default)}.ck .ck-widget .ck-widget__type-around__button svg{left:50%;position:absolute;top:50%;z-index:calc(var(--ck-z-default) + 2)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_before{left:min(10%,30px);top:calc(var(--ck-widget-outline-thickness)*-.5);transform:translateY(-50%)}.ck .ck-widget .ck-widget__type-around__button.ck-widget__type-around__button_after{bottom:calc(var(--ck-widget-outline-thickness)*-.5);right:min(10%,30px);transform:translateY(50%)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{content:"";display:block;left:1px;position:absolute;top:1px;z-index:calc(var(--ck-z-default) + 1)}.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:none;left:0;position:absolute;right:0}.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__fake-caret{left:calc(var(--ck-widget-outline-thickness)*-1);right:calc(var(--ck-widget-outline-thickness)*-1)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__fake-caret{display:block;top:calc(var(--ck-widget-outline-thickness)*-1 - 1px)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__fake-caret{bottom:calc(var(--ck-widget-outline-thickness)*-1 - 1px);display:block}.ck.ck-editor__editable.ck-read-only .ck-widget__type-around,.ck.ck-editor__editable.ck-restricted-editing_mode_restricted .ck-widget__type-around,.ck.ck-editor__editable.ck-widget__type-around_disabled .ck-widget__type-around{display:none}:root{--ck-widget-type-around-button-size:20px;--ck-color-widget-type-around-button-active:var(--ck-color-focus-border);--ck-color-widget-type-around-button-hover:var(--ck-color-widget-hover-border);--ck-color-widget-type-around-button-blurred-editable:var(--ck-color-widget-blurred-border);--ck-color-widget-type-around-button-radar-start-alpha:0;--ck-color-widget-type-around-button-radar-end-alpha:.3;--ck-color-widget-type-around-button-icon:var(--ck-color-base-background)}.ck .ck-widget .ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button);border-radius:100px;height:var(--ck-widget-type-around-button-size);opacity:0;pointer-events:none;transition:opacity var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve),background var(--ck-widget-handler-animation-duration) var(--ck-widget-handler-animation-curve);width:var(--ck-widget-type-around-button-size)}.ck .ck-widget .ck-widget__type-around__button svg{height:8px;margin-top:1px;transform:translate(-50%,-50%);transition:transform .5s ease;width:10px}.ck .ck-widget .ck-widget__type-around__button svg *{stroke-dasharray:10;stroke-dashoffset:0;fill:none;stroke:var(--ck-color-widget-type-around-button-icon);stroke-width:1.5px;stroke-linecap:round;stroke-linejoin:round}.ck .ck-widget .ck-widget__type-around__button svg line{stroke-dasharray:7}.ck .ck-widget .ck-widget__type-around__button:hover{animation:ck-widget-type-around-button-sonar 1s ease infinite}.ck .ck-widget .ck-widget__type-around__button:hover svg polyline{animation:ck-widget-type-around-arrow-dash 2s linear}.ck .ck-widget .ck-widget__type-around__button:hover svg line{animation:ck-widget-type-around-arrow-tip-dash 2s linear}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:1;pointer-events:auto}.ck .ck-widget:not(.ck-widget_selected)>.ck-widget__type-around>.ck-widget__type-around__button{background:var(--ck-color-widget-type-around-button-hover)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover{background:var(--ck-color-widget-type-around-button-active)}.ck .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:after,.ck .ck-widget>.ck-widget__type-around>.ck-widget__type-around__button:hover:after{background:linear-gradient(135deg,hsla(0,0%,100%,0),hsla(0,0%,100%,.3));border-radius:100px;height:calc(var(--ck-widget-type-around-button-size) - 2px);width:calc(var(--ck-widget-type-around-button-size) - 2px)}.ck .ck-widget.ck-widget_with-selection-handle>.ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:20px}.ck .ck-widget .ck-widget__type-around__fake-caret{animation:ck-widget-type-around-fake-caret-pulse 1s linear infinite normal forwards;background:var(--ck-color-base-text);height:1px;outline:1px solid hsla(0,0%,100%,.5);pointer-events:none}.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_after,.ck .ck-widget.ck-widget_selected.ck-widget_type-around_show-fake-caret_before{outline-color:transparent}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected:hover,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected:hover{outline-color:var(--ck-color-widget-hover-border)}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after>.ck-widget__type-around>.ck-widget__type-around__button,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_after.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_selected.ck-widget_with-resizer>.ck-widget__resizer,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected:hover>.ck-widget__selection-handle,.ck .ck-widget.ck-widget_type-around_show-fake-caret_before.ck-widget_with-selection-handle.ck-widget_selected>.ck-widget__selection-handle{opacity:0}.ck[dir=rtl] .ck-widget.ck-widget_with-selection-handle .ck-widget__type-around>.ck-widget__type-around__button_before{margin-left:0;margin-right:20px}.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button,.ck-editor__nested-editable.ck-editor__editable_selected .ck-widget:hover>.ck-widget__type-around>.ck-widget__type-around__button{opacity:0;pointer-events:none}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover){background:var(--ck-color-widget-type-around-button-blurred-editable)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected>.ck-widget__type-around>.ck-widget__type-around__button:not(:hover) svg *{stroke:#999}@keyframes ck-widget-type-around-arrow-dash{0%{stroke-dashoffset:10}20%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-arrow-tip-dash{0%,20%{stroke-dashoffset:7}40%,to{stroke-dashoffset:0}}@keyframes ck-widget-type-around-button-sonar{0%{box-shadow:0 0 0 0 hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}50%{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-end-alpha))}to{box-shadow:0 0 0 5px hsla(var(--ck-color-focus-border-coordinates),var(--ck-color-widget-type-around-button-radar-start-alpha))}}@keyframes ck-widget-type-around-fake-caret-pulse{0%{opacity:1}49%{opacity:1}50%{opacity:0}99%{opacity:0}to{opacity:1}}',""]);const r=i},"./node_modules/css-loader/dist/runtime/api.js":e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var s=e(t);return t[2]?"@media ".concat(t[2]," {").concat(s,"}"):s})).join("")},t.i=function(e,s,o){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(o)for(var r=0;r{"use strict";s.d(t,{Z:()=>o});const o=''},"./packages/ckeditor5-core/theme/icons/pilcrow.svg":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=''},"./packages/ckeditor5-ui/theme/icons/dropdown-arrow.svg":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=''},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":(e,t,s)=>{"use strict";var o,i=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},r=function(){var e={};return function(t){if(void 0===e[t]){var s=document.querySelector(t);if(window.HTMLIFrameElement&&s instanceof window.HTMLIFrameElement)try{s=s.contentDocument.head}catch(e){s=null}e[t]=s}return e[t]}}(),n=[];function a(e){for(var t=-1,s=0;s{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts");class i extends o.y{constructor(e){super(),this.editor=e,this.set("value",void 0),this.set("isEnabled",!1),this._affectsData=!0,this._disableStack=new Set,this.decorate("execute"),this.listenTo(this.editor.model.document,"change",(()=>{this.refresh()})),this.on("execute",(e=>{this.isEnabled||e.stop()}),{priority:"high"}),this.listenTo(e,"change:isReadOnly",((e,t,s)=>{s&&this.affectsData?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")}))}get affectsData(){return this._affectsData}set affectsData(e){this._affectsData=e}refresh(){this.isEnabled=!0}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",r,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",r),this.refresh())}execute(...e){}destroy(){this.stopListening()}}function r(e){e.return=!1,e.stop()}},"./packages/ckeditor5-core/src/contextplugin.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts");class i extends o.y{constructor(e){super(),this.context=e}destroy(){this.stopListening()}static get isContextPlugin(){return!0}}},"./packages/ckeditor5-core/src/index.ts":(e,t,s)=>{"use strict";s.d(t,{mY:()=>i.Z,_y:()=>b,eO:()=>_.Z,W9:()=>z,ML:()=>E,S8:()=>N,xK:()=>F,AJ:()=>n,lR:()=>W.Z,Sy:()=>o.Z,P$:()=>D,ci:()=>H,Nu:()=>L});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-core/src/command.ts"),r=s("./packages/ckeditor5-utils/src/inserttopriorityarray.ts");class n extends i.Z{constructor(e){super(e),this._childCommandsDefinitions=[]}refresh(){}execute(...e){const t=this._getFirstEnabledCommand();return!!t&&t.execute(e)}registerChildCommand(e,t={}){(0,r.Z)(this._childCommandsDefinitions,{command:e,priority:t.priority||"normal"}),e.on("change:isEnabled",(()=>this._checkEnabled())),this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){const e=this._childCommandsDefinitions.find((({command:e})=>e.isEnabled));return e&&e.command}}var a=s("./node_modules/lodash-es/isPlainObject.js"),c=s("./node_modules/lodash-es/cloneDeepWith.js"),l=s("./node_modules/lodash-es/isElement.js");class d{constructor(e,t){this._config={},t&&this.define(h(t)),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}*names(){for(const e of Object.keys(this._config))yield e}_setToTarget(e,t,s,o=!1){if((0,a.Z)(t))return void this._setObjectToTarget(e,t,o);const i=t.split(".");t=i.pop();for(const t of i)(0,a.Z)(e[t])||(e[t]={}),e=e[t];if((0,a.Z)(s))return(0,a.Z)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,s,o);o&&void 0!==e[t]||(e[t]=s)}_getFromSource(e,t){const s=t.split(".");t=s.pop();for(const t of s){if(!(0,a.Z)(e[t])){e=null;break}e=e[t]}return e?h(e[t]):void 0}_setObjectToTarget(e,t,s){Object.keys(t).forEach((o=>{this._setToTarget(e,o,t[o],s)}))}}function h(e){return(0,c.Z)(e,u)}function u(e){return(0,l.Z)(e)?e:void 0}var p=s("./packages/ckeditor5-utils/src/collection.ts"),g=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),f=s("./packages/ckeditor5-utils/src/emittermixin.ts");class m extends f.Q5{constructor(e,t=[],s=[]){super(),this._context=e,this._plugins=new Map,this._availablePlugins=new Map;for(const e of t)e.pluginName&&this._availablePlugins.set(e.pluginName,e);this._contextPlugins=new Map;for(const[e,t]of s)this._contextPlugins.set(e,t),this._contextPlugins.set(t,e),e.pluginName&&this._availablePlugins.set(e.pluginName,e)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const t=this._plugins.get(e);if(!t){let t=e;throw"function"==typeof e&&(t=e.pluginName||e.name),new g.ZP("plugincollection-plugin-not-loaded",this._context,{plugin:t})}return t}has(e){return this._plugins.has(e)}init(e,t=[],s=[]){const o=this,i=this._context;!function e(t,s=new Set){t.forEach((t=>{a(t)&&(s.has(t)||(s.add(t),t.pluginName&&!o._availablePlugins.has(t.pluginName)&&o._availablePlugins.set(t.pluginName,t),t.requires&&e(t.requires,s)))}))}(e),h(e);const r=[...function e(t,s=new Set){return t.map((e=>a(e)?e:o._availablePlugins.get(e))).reduce(((t,o)=>s.has(o)?t:(s.add(o),o.requires&&(h(o.requires,o),e(o.requires,s).forEach((e=>t.add(e)))),t.add(o))),new Set)}(e.filter((e=>!l(e,t))))];!function(e,t){for(const s of t){if("function"!=typeof s)throw new g.ZP("plugincollection-replace-plugin-invalid-type",null,{pluginItem:s});const t=s.pluginName;if(!t)throw new g.ZP("plugincollection-replace-plugin-missing-name",null,{pluginItem:s});if(s.requires&&s.requires.length)throw new g.ZP("plugincollection-plugin-for-replacing-cannot-have-dependencies",null,{pluginName:t});const i=o._availablePlugins.get(t);if(!i)throw new g.ZP("plugincollection-plugin-for-replacing-not-exist",null,{pluginName:t});const r=e.indexOf(i);if(-1===r){if(o._contextPlugins.has(i))return;throw new g.ZP("plugincollection-plugin-for-replacing-not-loaded",null,{pluginName:t})}if(i.requires&&i.requires.length)throw new g.ZP("plugincollection-replaced-plugin-cannot-have-dependencies",null,{pluginName:t});e.splice(r,1,s),o._availablePlugins.set(t,s)}}(r,s);const n=function(e){return e.map((e=>{let t=o._contextPlugins.get(e);return t=t||new e(i),o._add(e,t),t}))}(r);return u(n,"init").then((()=>u(n,"afterInit"))).then((()=>n));function a(e){return"function"==typeof e}function c(e){return a(e)&&e.isContextPlugin}function l(e,t){return t.some((t=>t===e||(d(e)===t||d(t)===e)))}function d(e){return a(e)?e.pluginName||e.name:e}function h(e,s=null){e.map((e=>a(e)?e:o._availablePlugins.get(e)||e)).forEach((e=>{!function(e,t){if(a(e))return;if(t)throw new g.ZP("plugincollection-soft-required",i,{missingPlugin:e,requiredBy:d(t)});throw new g.ZP("plugincollection-plugin-not-found",i,{plugin:e})}(e,s),function(e,t){if(!c(t))return;if(c(e))return;throw new g.ZP("plugincollection-context-required",i,{plugin:d(e),requiredBy:d(t)})}(e,s),function(e,s){if(!s)return;if(!l(e,t))return;throw new g.ZP("plugincollection-required",i,{plugin:d(e),requiredBy:d(s)})}(e,s)}))}function u(e,t){return e.reduce(((e,s)=>s[t]?o._contextPlugins.has(s)?e:e.then(s[t].bind(s)):e),Promise.resolve())}}destroy(){const e=[];for(const[,t]of this)"function"!=typeof t.destroy||this._contextPlugins.has(t)||e.push(t.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const s=e.pluginName;if(s){if(this._plugins.has(s))throw new g.ZP("plugincollection-plugin-name-conflict",null,{pluginName:s,plugin1:this._plugins.get(s).constructor,plugin2:e});this._plugins.set(s,t)}}}var k=s("./packages/ckeditor5-utils/src/locale.ts");class b{constructor(e){this.config=new d(e,this.constructor.defaultConfig);const t=this.constructor.builtinPlugins;this.config.define("plugins",t),this.plugins=new m(this,t);const s=this.config.get("language")||{};this.locale=new k.Z({uiLanguage:"string"==typeof s?s:s.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.editors=new p.Z,this._contextOwner=null}initPlugins(){const e=this.config.get("plugins")||[],t=this.config.get("substitutePlugins")||[];for(const s of e.concat(t)){if("function"!=typeof s)throw new g.ZP("context-initplugins-constructor-only",null,{Plugin:s});if(!0!==s.isContextPlugin)throw new g.ZP("context-initplugins-invalid-plugin",null,{Plugin:s})}return this.plugins.init(e,[],t)}destroy(){return Promise.all(Array.from(this.editors,(e=>e.destroy()))).then((()=>this.plugins.destroy()))}_addEditor(e,t){if(this._contextOwner)throw new g.ZP("context-addeditor-private-context");this.editors.add(e),t&&(this._contextOwner=e)}_removeEditor(e){return this.editors.has(e)&&this.editors.remove(e),this._contextOwner===e?this.destroy():Promise.resolve()}_getEditorConfig(){const e={};for(const t of this.config.names())["plugins","removePlugins","extraPlugins"].includes(t)||(e[t]=this.config.get(t));return e}static create(e){return new Promise((t=>{const s=new this(e);t(s.initPlugins().then((()=>s)))}))}}var _=s("./packages/ckeditor5-core/src/contextplugin.ts"),w=s("./packages/ckeditor5-engine/src/controller/editingcontroller.ts");class v{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const s=this.get(e);if(!s)throw new g.ZP("commandcollection-command-not-found",this,{commandName:e});return s.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}var y=s("./packages/ckeditor5-engine/src/controller/datacontroller.ts"),Z=s("./packages/ckeditor5-engine/src/conversion/conversion.ts"),P=s("./packages/ckeditor5-engine/src/model/model.ts"),x=s("./packages/ckeditor5-utils/src/keystrokehandler.ts");class T extends x.Z{constructor(e){super(),this.editor=e}set(e,t,s={}){if("string"==typeof t){const e=t;t=(t,s)=>{this.editor.execute(e),s()}}super.set(e,t,s)}}var A=s("./packages/ckeditor5-utils/src/observablemixin.ts"),C=s("./packages/ckeditor5-engine/src/view/stylesmap.ts");class E extends A.y{constructor(e={}){super();const t=this.constructor,s=e.language||t.defaultConfig&&t.defaultConfig.language;this._context=e.context||new b({language:s}),this._context._addEditor(this,!e.context);const o=Array.from(t.builtinPlugins||[]);this.config=new d(e,t.defaultConfig),this.config.define("plugins",o),this.config.define(this._context._getEditorConfig()),this.plugins=new m(this,o,this._context.plugins),this.locale=this._context.locale,this.t=this.locale.t,this._readOnlyLocks=new Set,this.commands=new v,this.set("state","initializing"),this.once("ready",(()=>this.state="ready"),{priority:"high"}),this.once("destroy",(()=>this.state="destroyed"),{priority:"high"}),this.model=new P.Z;const i=new C.A;this.data=new y.Z(this.model,i),this.editing=new w.Z(this.model,i),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Z.Z([this.editing.downcastDispatcher,this.data.downcastDispatcher],this.data.upcastDispatcher),this.conversion.addAlias("dataDowncast",this.data.downcastDispatcher),this.conversion.addAlias("editingDowncast",this.editing.downcastDispatcher),this.keystrokes=new T(this),this.keystrokes.listenTo(this.editing.view.document)}get isReadOnly(){return this._readOnlyLocks.size>0}set isReadOnly(e){throw new g.ZP("editor-isreadonly-has-no-setter")}enableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new g.ZP("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)||(this._readOnlyLocks.add(e),1===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!0,!1))}disableReadOnlyMode(e){if("string"!=typeof e&&"symbol"!=typeof e)throw new g.ZP("editor-read-only-lock-id-invalid",null,{lockId:e});this._readOnlyLocks.has(e)&&(this._readOnlyLocks.delete(e),0===this._readOnlyLocks.size&&this.fire("change:isReadOnly","isReadOnly",!1,!0))}initPlugins(){const e=this.config,t=e.get("plugins"),s=e.get("removePlugins")||[],o=e.get("extraPlugins")||[],i=e.get("substitutePlugins")||[];return this.plugins.init(t.concat(o),s,i)}destroy(){let e=Promise.resolve();return"initializing"==this.state&&(e=new Promise((e=>this.once("ready",e)))),e.then((()=>{this.fire("destroy"),this.stopListening(),this.commands.destroy()})).then((()=>this.plugins.destroy())).then((()=>{this.model.destroy(),this.data.destroy(),this.editing.destroy(),this.keystrokes.destroy()})).then((()=>this._context._removeEditor(this)))}execute(e,...t){try{return this.commands.execute(e,...t)}catch(e){g.ZP.rethrowUnexpectedError(e,this)}}focus(){this.editing.view.focus()}}class S{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,t){this._components.set(O(e),{callback:t,originalName:e})}create(e){if(!this.has(e))throw new g.ZP("componentfactory-item-missing",this,{name:e});return this._components.get(O(e)).callback(this.editor.locale)}has(e){return this._components.has(O(e))}}function O(e){return String(e).toLowerCase()}var R=s("./packages/ckeditor5-utils/src/focustracker.ts"),j=s("./packages/ckeditor5-ui/src/tooltipmanager.ts"),M=s("./packages/ckeditor5-utils/src/dom/isvisible.ts");class N extends A.y{constructor(e){super(),this.editor=e,this.componentFactory=new S(e),this.focusTracker=new R.Z,this.tooltipManager=new j.Z(e),this.set("viewportOffset",this._readViewportOffsetFromConfig()),this.isReady=!1,this.once("ready",(()=>{this.isReady=!0})),this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[],this.listenTo(e.editing.view.document,"layoutChanged",(()=>this.update())),this._initFocusTracking()}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy(),this.tooltipManager.destroy(this.editor);for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map,this._focusableToolbarDefinitions=[]}setEditableElement(e,t){this._editableElementsMap.set(e,t),t.ckeditorInstance||(t.ckeditorInstance=this.editor),this.focusTracker.add(t);const s=()=>{this.editor.editing.view.getDomRoot(e)||this.editor.keystrokes.listenTo(t)};this.isReady?s():this.once("ready",s)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}addToolbar(e,t={}){e.isRendered?(this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)):e.once("render",(()=>{this.focusTracker.add(e.element),this.editor.keystrokes.listenTo(e.element)})),this._focusableToolbarDefinitions.push({toolbarView:e,options:t})}get _editableElements(){return console.warn("editor-ui-deprecated-editable-elements: The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this}),this._editableElementsMap}_readViewportOffsetFromConfig(){const e=this.editor,t=e.config.get("ui.viewportOffset");if(t)return t;const s=e.config.get("toolbar.viewportTopOffset");return s?(console.warn("editor-ui-deprecated-viewport-offset-config: The `toolbar.vieportTopOffset` configuration option is deprecated. It will be removed from future CKEditor versions. Use `ui.viewportOffset.top` instead."),{top:s}):{top:0}}_initFocusTracking(){const e=this.editor,t=e.editing.view;let s,o;e.keystrokes.set("Alt+F10",((e,i)=>{const r=this.focusTracker.focusedElement;Array.from(this._editableElementsMap.values()).includes(r)&&!Array.from(t.domRoots.values()).includes(r)&&(s=r);const n=this._getCurrentFocusedToolbarDefinition();n&&o||(o=this._getFocusableCandidateToolbarDefinitions());for(let e=0;e{const i=this._getCurrentFocusedToolbarDefinition();i&&(s?(s.focus(),s=null):e.editing.view.focus(),i.options.afterBlur&&i.options.afterBlur(),o())}))}_getFocusableCandidateToolbarDefinitions(){const e=[];for(const t of this._focusableToolbarDefinitions){const{toolbarView:s,options:o}=t;((0,M.Z)(s.element)||o.beforeFocus)&&e.push(t)}return e.sort(((e,t)=>V(e)-V(t))),e}_getCurrentFocusedToolbarDefinition(){for(const e of this._focusableToolbarDefinitions)if(e.toolbarView.element&&e.toolbarView.element.contains(this.focusTracker.focusedElement))return e;return null}_focusFocusableCandidateToolbar(e){const{toolbarView:t,options:{beforeFocus:s}}=e;return s&&s(),!!(0,M.Z)(t.element)&&(t.focus(),!0)}}function V(e){const{toolbarView:t,options:s}=e;let o=10;return(0,M.Z)(t.element)&&o--,s.isContextual&&o--,o}var I=s("./node_modules/lodash-es/isFunction.js");function D(e){if(!(0,I.Z)(e.updateSourceElement))throw new g.ZP("attachtoform-missing-elementapi-interface",e);const t=e.sourceElement;if(function(e){return!!e&&"textarea"===e.tagName.toLowerCase()}(t)&&t.form){let s;const o=t.form,i=()=>e.updateSourceElement();(0,I.Z)(o.submit)&&(s=o.submit,o.submit=()=>{i(),s.apply(o)}),o.addEventListener("submit",i),e.on("destroy",(()=>{o.removeEventListener("submit",i),s&&(o.submit=s)}))}}function z(e){return class extends e{setData(e){this.data.set(e)}getData(e){return this.data.get(e)}}}{const e=z(Object);z.setData=e.prototype.setData,z.getData=e.prototype.getData}var B=s("./packages/ckeditor5-utils/src/dom/setdatainelement.ts");function F(e){return class extends e{updateSourceElement(e=this.data.get()){if(!this.sourceElement)throw new g.ZP("editor-missing-sourceelement",this);const t=this.config.get("updateSourceElementOnDestroy"),s=this.sourceElement instanceof HTMLTextAreaElement;t||s?(0,B.Z)(this.sourceElement,e):(0,B.Z)(this.sourceElement,"")}}}function L(e){const t=e.sourceElement;if(t){if(t.ckeditorInstance)throw new g.ZP("editor-source-element-already-used",e);t.ckeditorInstance=e,e.once("destroy",(()=>{delete t.ckeditorInstance}))}}F.updateSourceElement=F(Object).prototype.updateSourceElement;var W=s("./packages/ckeditor5-core/src/pendingactions.ts");var $=s("./packages/ckeditor5-core/theme/icons/pilcrow.svg");const H={bold:'',cancel:'',caption:'',check:'',cog:'',eraser:'',image:'',lowVision:'',importExport:'',paragraph:s("./packages/ckeditor5-core/theme/icons/paragraph.svg").Z,plus:'',text:'',alignBottom:'',alignMiddle:'',alignTop:'',alignLeft:'',alignCenter:'',alignRight:'',alignJustify:'',objectLeft:'',objectCenter:'',objectRight:'',objectFullWidth:'',objectInline:'',objectBlockLeft:'',objectBlockRight:'',objectSizeFull:'',objectSizeLarge:'',objectSizeSmall:'',objectSizeMedium:'',pencil:'',pilcrow:$.Z,quote:'',threeVerticalDots:''}},"./packages/ckeditor5-core/src/pendingactions.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-core/src/contextplugin.ts"),i=s("./packages/ckeditor5-utils/src/observablemixin.ts"),r=s("./packages/ckeditor5-utils/src/collection.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class a extends o.Z{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",!1),this._actions=new r.Z({idProperty:"_id"}),this._actions.delegate("add","remove").to(this)}add(e){if("string"!=typeof e)throw new n.ZP("pendingactions-add-invalid-message",this);const t=new i.y;return t.set("message",e),this._actions.add(t),this.hasAny=!0,t}remove(e){this._actions.remove(e),this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}},"./packages/ckeditor5-core/src/plugin.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts");class i extends o.y{constructor(e){super(),this.editor=e,this.set("isEnabled",!0),this._disableStack=new Set}forceDisabled(e){this._disableStack.add(e),1==this._disableStack.size&&(this.on("set:isEnabled",r,{priority:"highest"}),this.isEnabled=!1)}clearForceDisabled(e){this._disableStack.delete(e),0==this._disableStack.size&&(this.off("set:isEnabled",r),this.isEnabled=!0)}destroy(){this.stopListening()}static get isContextPlugin(){return!1}}function r(e){e.return=!1,e.stop()}},"./packages/ckeditor5-engine/src/controller/datacontroller.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>Z});var o=s("./packages/ckeditor5-utils/src/observablemixin.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts"),n=s("./packages/ckeditor5-engine/src/conversion/mapper.ts"),a=s("./packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts"),c=s("./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts"),l=s("./node_modules/lodash-es/isArray.js");class d{constructor(){this._consumables=new Map}add(e,t){let s;e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):(this._consumables.has(e)?s=this._consumables.get(e):(s=new u(e),this._consumables.set(e,s)),s.add(t))}test(e,t){const s=this._consumables.get(e);return void 0===s?null:e.is("$text")||e.is("documentFragment")?s:s.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const s=this._consumables.get(e);void 0!==s&&(e.is("$text")||e.is("documentFragment")?this._consumables.set(e,!0):s.revert(t))}static consumablesFromElement(e){const t={element:e,name:!0,attributes:[],classes:[],styles:[]},s=e.getAttributeKeys();for(const e of s)"style"!=e&&"class"!=e&&t.attributes.push(e);const o=e.getClassNames();for(const e of o)t.classes.push(e);const i=e.getStyleNames();for(const e of i)t.styles.push(e);return t}static createFrom(e,t){if(t||(t=new d),e.is("$text"))return t.add(e),t;e.is("element")&&t.add(e,d.consumablesFromElement(e)),e.is("documentFragment")&&t.add(e);for(const s of e.getChildren())t=d.createFrom(s,t);return t}}const h=["attributes","classes","styles"];class u{constructor(e){this.element=e,this._canConsumeName=null,this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(e){e.name&&(this._canConsumeName=!0);for(const t of h)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t of h)if(t in e){const s=this._test(t,e[t]);if(!0!==s)return s}return!0}consume(e){e.name&&(this._canConsumeName=!1);for(const t of h)t in e&&this._consume(t,e[t])}revert(e){e.name&&(this._canConsumeName=!0);for(const t of h)t in e&&this._revert(t,e[t])}_add(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s){if("attributes"===e&&("class"===t||"style"===t))throw new i.ZP("viewconsumable-invalid-attribute",this);if(o.set(t,!0),"styles"===e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!0)}}_test(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s)if("attributes"!==e||"class"!==t&&"style"!==t){const e=o.get(t);if(void 0===e)return null;if(!e)return!1}else{const e="class"==t?"classes":"styles",s=this._test(e,[...this._consumables[e].keys()]);if(!0!==s)return s}return!0}_consume(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s)if("attributes"!==e||"class"!==t&&"style"!==t){if(o.set(t,!1),"styles"==e)for(const e of this.element.document.stylesProcessor.getRelatedStyles(t))o.set(e,!1)}else{const e="class"==t?"classes":"styles";this._consume(e,[...this._consumables[e].keys()])}}_revert(e,t){const s=(0,l.Z)(t)?t:[t],o=this._consumables[e];for(const t of s)if("attributes"!==e||"class"!==t&&"style"!==t){!1===o.get(t)&&o.set(t,!0)}else{const e="class"==t?"classes":"styles";this._revert(e,[...this._consumables[e].keys()])}}}var p=s("./packages/ckeditor5-engine/src/model/range.ts"),g=s("./packages/ckeditor5-engine/src/model/position.ts"),f=s("./packages/ckeditor5-engine/src/model/schema.ts"),m=s("./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts");class k extends r.Q5{constructor(e){super(),this._splitParts=new Map,this._cursorParents=new Map,this._modelCursor=null,this._emptyElementsToKeep=new Set,this.conversionApi={...e,consumable:null,writer:null,store:null,convertItem:(e,t)=>this._convertItem(e,t),convertChildren:(e,t)=>this._convertChildren(e,t),safeInsert:(e,t)=>this._safeInsert(e,t),updateConversionResult:(e,t)=>this._updateConversionResult(e,t),splitToAllowedParent:(e,t)=>this._splitToAllowedParent(e,t),getSplitParts:e=>this._getSplitParts(e),keepEmptyElement:e=>this._keepEmptyElement(e)}}convert(e,t,s=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,t){let s;for(const o of new f.G(e)){const e={};for(const t of o.getAttributeKeys())e[t]=o.getAttribute(t);const i=t.createElement(o.name,e);s&&t.insert(i,s),s=g.ZP._createAt(i,0)}return s}(s,t),this.conversionApi.writer=t,this.conversionApi.consumable=d.createFrom(e),this.conversionApi.store={};const{modelRange:o}=this._convertItem(e,this._modelCursor),i=t.createDocumentFragment();if(o){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))t.append(e,i);i.markers=function(e,t){const s=new Set,o=new Map,i=p.Z._createIn(e).getItems();for(const e of i)e.is("element","$marker")&&s.add(e);for(const e of s){const s=e.getAttribute("data-name"),i=t.createPositionBefore(e);o.has(s)?o.get(s).end=i.clone():o.set(s,new p.Z(i.clone())),t.remove(e)}return o}(i,t)}return this._modelCursor=null,this._splitParts.clear(),this._cursorParents.clear(),this._emptyElementsToKeep.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,t){const s={viewItem:e,modelCursor:t,modelRange:null};if(e.is("element")?this.fire(`element:${e.name}`,s,this.conversionApi):e.is("$text")?this.fire("text",s,this.conversionApi):this.fire("documentFragment",s,this.conversionApi),s.modelRange&&!(s.modelRange instanceof p.Z))throw new i.ZP("view-conversion-dispatcher-incorrect-result",this);return{modelRange:s.modelRange,modelCursor:s.modelCursor}}_convertChildren(e,t){let s=t.is("position")?t:g.ZP._createAt(t,0);const o=new p.Z(s);for(const t of Array.from(e.getChildren())){const e=this._convertItem(t,s);e.modelRange instanceof p.Z&&(o.end=e.modelRange.end,s=e.modelCursor)}return{modelRange:o,modelCursor:s}}_safeInsert(e,t){const s=this._splitToAllowedParent(e,t);return!!s&&(this.conversionApi.writer.insert(e,s.position),!0)}_updateConversionResult(e,t){const s=this._getSplitParts(e),o=this.conversionApi.writer;t.modelRange||(t.modelRange=o.createRange(o.createPositionBefore(e),o.createPositionAfter(s[s.length-1])));const i=this._cursorParents.get(e);t.modelCursor=i?o.createPositionAt(i,0):t.modelRange.end}_splitToAllowedParent(e,t){const{schema:s,writer:o}=this.conversionApi;let i=s.findAllowedParent(t,e);if(i){if(i===t.parent)return{position:t};this._modelCursor.parent.getAncestors().includes(i)&&(i=null)}if(!i)return(0,m.gg)(t,e,s)?{position:(0,m.zX)(t,o)}:null;const r=this.conversionApi.writer.split(t,i),n=[];for(const e of r.range.getWalker())if("elementEnd"==e.type)n.push(e.item);else{const t=n.pop(),s=e.item;this._registerSplitPair(t,s)}const a=r.range.end.parent;return this._cursorParents.set(e,a),{position:r.position,cursorParent:a}}_registerSplitPair(e,t){this._splitParts.has(e)||this._splitParts.set(e,[e]);const s=this._splitParts.get(e);this._splitParts.set(t,s),s.push(t)}_getSplitParts(e){let t;return t=this._splitParts.has(e)?this._splitParts.get(e):[e],t}_keepEmptyElement(e){this._emptyElementsToKeep.add(e)}_removeEmptyElements(){let e=!1;for(const t of this._splitParts.keys())t.isEmpty&&!this._emptyElementsToKeep.has(t)&&(this.conversionApi.writer.remove(t),this._splitParts.delete(t),e=!0);e&&this._removeEmptyElements()}}var b=s("./packages/ckeditor5-engine/src/conversion/upcasthelpers.ts"),_=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),w=s("./packages/ckeditor5-engine/src/view/document.ts"),v=s("./packages/ckeditor5-engine/src/view/downcastwriter.ts"),y=s("./packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts");class Z extends r.Q5{constructor(e,t){super(),this.model=e,this.mapper=new n.Z,this.downcastDispatcher=new a.Z({mapper:this.mapper,schema:e.schema}),this.downcastDispatcher.on("insert:$text",(0,c.Om)(),{priority:"lowest"}),this.downcastDispatcher.on("insert",(0,c.o6)(),{priority:"lowest"}),this.upcastDispatcher=new k({schema:e.schema}),this.viewDocument=new w.Z(t),this.stylesProcessor=t,this.htmlProcessor=new y.Z(this.viewDocument),this.processor=this.htmlProcessor,this._viewWriter=new v.Z(this.viewDocument),this.upcastDispatcher.on("text",(0,b.s8)(),{priority:"lowest"}),this.upcastDispatcher.on("element",(0,b._p)(),{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(0,b._p)(),{priority:"lowest"}),o.y.prototype.decorate.call(this,"init"),o.y.prototype.decorate.call(this,"set"),o.y.prototype.decorate.call(this,"get"),this.on("init",(()=>{this.fire("ready")}),{priority:"lowest"}),this.on("ready",(()=>{this.model.enqueueChange({isUndoable:!1},m._m)}),{priority:"lowest"})}get(e={}){const{rootName:t="main",trim:s="empty"}=e;if(!this._checkIfRootsExists([t]))throw new i.ZP("datacontroller-get-non-existent-root",this);const o=this.model.document.getRoot(t);return"empty"!==s||this.model.hasContent(o,{ignoreWhitespaces:!0})?this.stringify(o,e):""}stringify(e,t={}){const s=this.toView(e,t);return this.processor.toData(s)}toView(e,t={}){const s=this.viewDocument,o=this._viewWriter;this.mapper.clearBindings();const i=p.Z._createIn(e),r=new _.Z(s);this.mapper.bindElements(e,r);const n=e.is("documentFragment")?e.markers:function(e){const t=[],s=e.root.document;if(!s)return new Map;const o=p.Z._createIn(e);for(const e of s.model.markers){const s=e.getRange(),i=s.isCollapsed,r=s.start.isEqual(o.start)||s.end.isEqual(o.end);if(i&&r)t.push([e.name,s]);else{const i=o.getIntersection(s);i&&t.push([e.name,i])}}return t.sort((([e,t],[s,o])=>{if("after"!==t.end.compareWith(o.start))return 1;if("before"!==t.start.compareWith(o.end))return-1;switch(t.start.compareWith(o.start)){case"before":return 1;case"after":return-1;default:switch(t.end.compareWith(o.end)){case"before":return 1;case"after":return-1;default:return s.localeCompare(e)}}})),new Map(t)}(e);return this.downcastDispatcher.convert(i,n,o,t),r}init(e){if(this.model.document.version)throw new i.ZP("datacontroller-init-document-not-empty",this);let t={};if("string"==typeof e?t.main=e:t=e,!this._checkIfRootsExists(Object.keys(t)))throw new i.ZP("datacontroller-init-non-existent-root",this);return this.model.enqueueChange({isUndoable:!1},(e=>{for(const s of Object.keys(t)){const o=this.model.document.getRoot(s);e.insert(this.parse(t[s],o),o,0)}})),Promise.resolve()}set(e,t={}){let s={};if("string"==typeof e?s.main=e:s=e,!this._checkIfRootsExists(Object.keys(s)))throw new i.ZP("datacontroller-set-non-existent-root",this);this.model.enqueueChange(t.batchType||{},(e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(s)){const o=this.model.document.getRoot(t);e.remove(e.createRangeIn(o)),e.insert(this.parse(s[t],o),o,0)}}))}parse(e,t="$root"){const s=this.processor.toView(e);return this.toModel(s,t)}toModel(e,t="$root"){return this.model.change((s=>this.upcastDispatcher.convert(e,s,t)))}addStyleProcessorRules(e){e(this.stylesProcessor)}registerRawContentMatcher(e){this.processor&&this.processor!==this.htmlProcessor&&this.processor.registerRawContentMatcher(e),this.htmlProcessor.registerRawContentMatcher(e)}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const t of e)if(!this.model.document.getRootNames().includes(t))return!1;return!0}}},"./packages/ckeditor5-engine/src/controller/editingcontroller.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>p});var o=s("./packages/ckeditor5-engine/src/view/editableelement.ts");const i=Symbol("rootName");class r extends o.Z{constructor(e,t){super(e,t),this.rootName="main"}get rootName(){return this.getCustomProperty(i)}set rootName(e){this._setCustomProperty(i,e)}set _name(e){this.name=e}}r.prototype.is=function(e,t){return t?t===this.name&&("rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"rootElement"===e||"view:rootElement"===e||"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e};var n=s("./packages/ckeditor5-engine/src/view/view.ts"),a=s("./packages/ckeditor5-engine/src/conversion/mapper.ts"),c=s("./packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts"),l=s("./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts"),d=s("./packages/ckeditor5-utils/src/observablemixin.ts"),h=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),u=s("./packages/ckeditor5-engine/src/conversion/upcasthelpers.ts");class p extends d.y{constructor(e,t){super(),this.model=e,this.view=new n.Z(t),this.mapper=new a.Z,this.downcastDispatcher=new c.Z({mapper:this.mapper,schema:e.schema});const s=this.model.document,o=s.selection,i=this.model.markers;this.listenTo(this.model,"_beforeChanges",(()=>{this.view._disableRendering(!0)}),{priority:"highest"}),this.listenTo(this.model,"_afterChanges",(()=>{this.view._disableRendering(!1)}),{priority:"lowest"}),this.listenTo(s,"change",(()=>{this.view.change((e=>{this.downcastDispatcher.convertChanges(s.differ,i,e),this.downcastDispatcher.convertSelection(o,i,e)}))}),{priority:"low"}),this.listenTo(this.view.document,"selectionChange",(0,u.Fo)(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(0,l.Om)(),{priority:"lowest"}),this.downcastDispatcher.on("insert",(0,l.o6)(),{priority:"lowest"}),this.downcastDispatcher.on("remove",(0,l.Od)(),{priority:"low"}),this.downcastDispatcher.on("selection",(0,l.iO)(),{priority:"high"}),this.downcastDispatcher.on("selection",(0,l.k3)(),{priority:"low"}),this.downcastDispatcher.on("selection",(0,l.GM)(),{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using((e=>{if("$graveyard"==e.rootName)return null;const t=new r(this.view.document,e.name);return t.rootName=e.rootName,this.mapper.bindElements(e,t),t}))}destroy(){this.view.destroy(),this.stopListening()}reconvertMarker(e){const t="string"==typeof e?e:e.name,s=this.model.markers.get(t);if(!s)throw new h.ZP("editingcontroller-reconvertmarker-marker-not-exist",this,{markerName:t});this.model.change((()=>{this.model.markers._refresh(s)}))}reconvertItem(e){this.model.change((()=>{this.model.document.differ._refreshItem(e)}))}}},"./packages/ckeditor5-engine/src/conversion/conversion.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-engine/src/conversion/upcasthelpers.ts"),r=s("./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts"),n=s("./packages/ckeditor5-utils/src/toarray.ts");class a{constructor(e,t){this._helpers=new Map,this._downcast=(0,n.Z)(e),this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=(0,n.Z)(t),this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,t){const s=this._downcast.includes(t);if(!this._upcast.includes(t)&&!s)throw new o.ZP("conversion-add-alias-dispatcher-not-registered",this);this._createConversionHelpers({name:e,dispatchers:[t],isDowncast:s})}for(e){if(!this._helpers.has(e))throw new o.ZP("conversion-for-unknown-group",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:t,view:s}of c(e))this.for("upcast").elementToElement({model:t,view:s,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:t,view:s}of c(e))this.for("upcast").elementToAttribute({view:s,model:t,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:t,view:s}of c(e))this.for("upcast").attributeToAttribute({view:s,model:t})}_createConversionHelpers({name:e,dispatchers:t,isDowncast:s}){if(this._helpers.has(e))throw new o.ZP("conversion-group-exists",this);const n=s?new r.ZP(t):new i.ZP(t);this._helpers.set(e,n)}}function*c(e){if(e.model.values)for(const t of e.model.values){const s={key:e.model.key,value:t},o=e.view[t],i=e.upcastAlso?e.upcastAlso[t]:void 0;yield*l(s,o,i)}else yield*l(e.model,e.view,e.upcastAlso)}function*l(e,t,s){if(yield{model:e,view:t},s)for(const t of(0,n.Z)(s))yield{model:e,view:t}}},"./packages/ckeditor5-engine/src/conversion/conversionhelpers.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e){this._dispatchers=e}add(e){for(const t of this._dispatchers)e(t);return this}}},"./packages/ckeditor5-engine/src/conversion/downcastdispatcher.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e));const s=this._consumable.get(e);if(void 0===s)return null;const i=s.get(t);return void 0===i?null:i}revert(e,t){t=n(t),e instanceof o.Z&&(e=this._getSymbolForTextProxy(e));const s=this.test(e,t);return!1===s?(this._consumable.get(e).set(t,!0),!0):!0!==s&&null}verifyAllConsumed(e){const t=[];for(const[s,o]of this._consumable)for(const[i,r]of o){const o=i.split(":")[0];r&&e==o&&t.push({event:i,item:s.name||s.description})}if(t.length)throw new i.ZP("conversion-model-consumable-not-consumed",null,{items:t})}_getSymbolForTextProxy(e){let t=null;const s=this._textProxyRegistry.get(e.startOffset);if(s){const o=s.get(e.endOffset);o&&(t=o.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e)),t}_addSymbolForTextProxy(e){const t=e.startOffset,s=e.endOffset,o=e.parent,i=Symbol("$textProxy:"+e.data);let r,n;return r=this._textProxyRegistry.get(t),r||(r=new Map,this._textProxyRegistry.set(t,r)),n=r.get(s),n||(n=new Map,r.set(s,n)),n.set(o,i),i}}function n(e){const t=e.split(":");return"insert"==t[0]?t[0]:"addMarker"==t[0]||"removeMarker"==t[0]?e:t.length>1?t[0]+":"+t[1]:t[0]}var a=s("./packages/ckeditor5-engine/src/model/range.ts"),c=s("./packages/ckeditor5-utils/src/emittermixin.ts");class l extends c.Q5{constructor(e){super(),this._conversionApi={dispatcher:this,...e},this._firedEventsMap=new WeakMap}convertChanges(e,t,s){const o=this._createConversionApi(s,e.getRefreshedItems());for(const t of e.getMarkersToRemove())this._convertMarkerRemove(t.name,t.range,o);const i=this._reduceChanges(e.getChanges());for(const e of i)"insert"===e.type?this._convertInsert(a.Z._createFromPositionAndShift(e.position,e.length),o):"reinsert"===e.type?this._convertReinsert(a.Z._createFromPositionAndShift(e.position,e.length),o):"remove"===e.type?this._convertRemove(e.position,e.length,e.name,o):this._convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,o);for(const e of o.mapper.flushUnboundMarkerNames()){const s=t.get(e).getRange();this._convertMarkerRemove(e,s,o),this._convertMarkerAdd(e,s,o)}for(const t of e.getMarkersToAdd())this._convertMarkerAdd(t.name,t.range,o);o.mapper.flushDeferredBindings(),o.consumable.verifyAllConsumed("insert")}convert(e,t,s,o={}){const i=this._createConversionApi(s,void 0,o);this._convertInsert(e,i);for(const[e,s]of t)this._convertMarkerAdd(e,s,i);i.consumable.verifyAllConsumed("insert")}convertSelection(e,t,s){const o=Array.from(t.getMarkersAtPosition(e.getFirstPosition())),i=this._createConversionApi(s);if(this._addConsumablesForSelection(i.consumable,e,o),this.fire("selection",{selection:e},i),e.isCollapsed){for(const t of o){const s=t.getRange();if(!d(e.getFirstPosition(),t,i.mapper))continue;const o={item:e,markerName:t.name,markerRange:s};i.consumable.test(e,"addMarker:"+t.name)&&this.fire(`addMarker:${t.name}`,o,i)}for(const t of e.getAttributeKeys()){const s={item:e,range:e.getFirstRange(),attributeKey:t,attributeOldValue:null,attributeNewValue:e.getAttribute(t)};i.consumable.test(e,"attribute:"+s.attributeKey)&&this.fire(`attribute:${s.attributeKey}:$text`,s,i)}}}_convertInsert(e,t,s={}){s.doNotAddConsumables||this._addConsumablesForInsert(t.consumable,Array.from(e));for(const s of Array.from(e.getWalker({shallow:!0})).map(h))this._testAndFire("insert",s,t)}_convertRemove(e,t,s,o){this.fire(`remove:${s}`,{position:e,length:t},o)}_convertAttribute(e,t,s,o,i){this._addConsumablesForRange(i.consumable,e,`attribute:${t}`);for(const r of e){const e={item:r.item,range:a.Z._createFromPositionAndShift(r.previousPosition,r.length),attributeKey:t,attributeOldValue:s,attributeNewValue:o};this._testAndFire(`attribute:${t}`,e,i)}}_convertReinsert(e,t){const s=Array.from(e.getWalker({shallow:!0}));this._addConsumablesForInsert(t.consumable,s);for(const e of s.map(h))this._testAndFire("insert",{...e,reconversion:!0},t)}_convertMarkerAdd(e,t,s){if("$graveyard"==t.root.rootName)return;const o=`addMarker:${e}`;if(s.consumable.add(t,o),this.fire(o,{markerName:e,markerRange:t},s),s.consumable.consume(t,o)){this._addConsumablesForRange(s.consumable,t,o);for(const i of t.getItems()){if(!s.consumable.test(i,o))continue;const r={item:i,range:a.Z._createOn(i),markerName:e,markerRange:t};this.fire(o,r,s)}}}_convertMarkerRemove(e,t,s){"$graveyard"!=t.root.rootName&&this.fire(`removeMarker:${e}`,{markerName:e,markerRange:t},s)}_reduceChanges(e){const t={changes:e};return this.fire("reduceChanges",t),t.changes}_addConsumablesForInsert(e,t){for(const s of t){const t=s.item;if(null===e.test(t,"insert")){e.add(t,"insert");for(const s of t.getAttributeKeys())e.add(t,"attribute:"+s)}}return e}_addConsumablesForRange(e,t,s){for(const o of t.getItems())e.add(o,s);return e}_addConsumablesForSelection(e,t,s){e.add(t,"selection");for(const o of s)e.add(t,"addMarker:"+o.name);for(const s of t.getAttributeKeys())e.add(t,"attribute:"+s);return e}_testAndFire(e,t,s){const o=function(e,t){const s=t.item.is("element")?t.item.name:"$text";return`${e}:${s}`}(e,t),i=t.item.is("$textProxy")?s.consumable._getSymbolForTextProxy(t.item):t.item,r=this._firedEventsMap.get(s),n=r.get(i);if(n){if(n.has(o))return;n.add(o)}else r.set(i,new Set([o]));this.fire(o,t,s)}_testAndFireAddAttributes(e,t){const s={item:e,range:a.Z._createOn(e)};for(const e of s.item.getAttributeKeys())s.attributeKey=e,s.attributeOldValue=null,s.attributeNewValue=s.item.getAttribute(e),this._testAndFire(`attribute:${e}`,s,t)}_createConversionApi(e,t=new Set,s={}){const o={...this._conversionApi,consumable:new r,writer:e,options:s,convertItem:e=>this._convertInsert(a.Z._createOn(e),o),convertChildren:e=>this._convertInsert(a.Z._createIn(e),o,{doNotAddConsumables:!0}),convertAttributes:e=>this._testAndFireAddAttributes(e,o),canReuseView:e=>!t.has(o.mapper.toModelElement(e))};return this._firedEventsMap.set(o,new Map),o}}function d(e,t,s){const o=t.getRange(),i=Array.from(e.getAncestors());i.shift(),i.reverse();return!i.some((e=>{if(o.containsItem(e)){return!!s.toViewElement(e).getCustomProperty("addHighlight")}}))}function h(e){return{item:e.item,range:a.Z._createFromPositionAndShift(e.previousPosition,e.length)}}},"./packages/ckeditor5-engine/src/conversion/downcasthelpers.ts":(e,t,s)=>{"use strict";s.d(t,{GM:()=>_,Od:()=>m,Om:()=>g,ZP:()=>p,iO:()=>w,k3:()=>b,o6:()=>f});var o=s("./packages/ckeditor5-engine/src/model/range.ts"),i=s("./packages/ckeditor5-engine/src/model/selection.ts"),r=s("./packages/ckeditor5-engine/src/model/documentselection.ts"),n=s("./packages/ckeditor5-engine/src/model/element.ts"),a=s("./packages/ckeditor5-engine/src/model/position.ts"),c=s("./packages/ckeditor5-engine/src/view/attributeelement.ts"),l=s("./packages/ckeditor5-engine/src/conversion/conversionhelpers.ts"),d=s("./node_modules/lodash-es/cloneDeep.js"),h=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),u=s("./packages/ckeditor5-utils/src/toarray.ts");class p extends l.Z{elementToElement(e){return this.add(function(e){const t=y(e.model),s=Z(e.view,"container");t.attributes.length&&(t.children=!0);return o=>{o.on(`insert:${t.name}`,function(e,t=O){return(s,o,i)=>{if(!t(o.item,i.consumable,{preflight:!0}))return;const r=e(o.item,i,o);if(!r)return;t(o.item,i.consumable);const n=i.mapper.toViewPosition(o.range.start);i.mapper.bindElements(o.item,r),i.writer.insert(n,r),i.convertAttributes(o.item),E(r,o.item.getChildren(),i,{reconversion:o.reconversion})}}(s,C(t)),{priority:e.converterPriority||"normal"}),(t.children||t.attributes.length)&&o.on("reduceChanges",A(t),{priority:"low"})}}(e))}elementToStructure(e){return this.add(function(e){const t=y(e.model),s=Z(e.view,"container");return t.children=!0,o=>{if(o._conversionApi.schema.checkChild(t.name,"$text"))throw new h.ZP("conversion-element-to-structure-disallowed-text",o,{elementName:t.name});var i,r;o.on(`insert:${t.name}`,(i=s,r=C(t),(e,t,s)=>{if(!r(t.item,s.consumable,{preflight:!0}))return;const o=new Map;s.writer._registerSlotFactory(function(e,t,s){return(o,i="children")=>{const r=o.createContainerElement("$slot");let n=null;if("children"===i)n=Array.from(e.getChildren());else{if("function"!=typeof i)throw new h.ZP("conversion-slot-mode-unknown",s.dispatcher,{modeOrFilter:i});n=Array.from(e.getChildren()).filter((e=>i(e)))}return t.set(r,n),r}}(t.item,o,s));const n=i(t.item,s,t);if(s.writer._clearSlotFactory(),!n)return;!function(e,t,s){const o=Array.from(t.values()).flat(),i=new Set(o);if(i.size!=o.length)throw new h.ZP("conversion-slot-filter-overlap",s.dispatcher,{element:e});if(i.size!=e.childCount)throw new h.ZP("conversion-slot-filter-incomplete",s.dispatcher,{element:e})}(t.item,o,s),r(t.item,s.consumable);const a=s.mapper.toViewPosition(t.range.start);s.mapper.bindElements(t.item,n),s.writer.insert(a,n),s.convertAttributes(t.item),function(e,t,s,o){s.mapper.on("modelToViewPosition",n,{priority:"highest"});let i=null,r=null;for([i,r]of t)E(e,r,s,o),s.writer.move(s.writer.createRangeIn(i),s.writer.createPositionBefore(i)),s.writer.remove(i);function n(e,t){const s=t.modelPosition.nodeAfter,o=r.indexOf(s);o<0||(t.viewPosition=t.mapper.findPositionIn(i,o))}s.mapper.off("modelToViewPosition",n)}(n,o,s,{reconversion:t.reconversion})}),{priority:e.converterPriority||"normal"}),o.on("reduceChanges",A(t),{priority:"low"})}}(e))}attributeToElement(e){return this.add(function(e){let t=(e=(0,d.Z)(e)).model;"string"==typeof t&&(t={key:t});let s=`attribute:${t.key}`;t.name&&(s+=":"+t.name);if(t.values)for(const s of t.values)e.view[s]=Z(e.view[s],"attribute");else e.view=Z(e.view,"attribute");const o=P(e);return t=>{t.on(s,function(e){return(t,s,o)=>{if(!o.consumable.test(s.item,t.name))return;const n=e(s.attributeOldValue,o,s),a=e(s.attributeNewValue,o,s);if(!n&&!a)return;o.consumable.consume(s.item,t.name);const c=o.writer,l=c.document.selection;if(s.item instanceof i.Z||s.item instanceof r.Z)c.wrap(l.getFirstRange(),a);else{let e=o.mapper.toViewRange(s.range);null!==s.attributeOldValue&&n&&(e=c.unwrap(e,n)),null!==s.attributeNewValue&&a&&c.wrap(e,a)}}}(o),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let t=(e=(0,d.Z)(e)).model;"string"==typeof t&&(t={key:t});let s=`attribute:${t.key}`;t.name&&(s+=":"+t.name);if(t.values)for(const s of t.values)e.view[s]=x(e.view[s]);else e.view=x(e.view);const o=P(e);return t=>{var i;t.on(s,(i=o,(e,t,s)=>{if(!s.consumable.test(t.item,e.name))return;const o=i(t.attributeOldValue,s,t),r=i(t.attributeNewValue,s,t);if(!o&&!r)return;s.consumable.consume(t.item,e.name);const n=s.mapper.toViewElement(t.item),a=s.writer;if(!n)throw new h.ZP("conversion-attribute-to-attribute-on-text",s.dispatcher,t);if(null!==t.attributeOldValue&&o)if("class"==o.key){const e=(0,u.Z)(o.value);for(const t of e)a.removeClass(t,n)}else if("style"==o.key){const e=Object.keys(o.value);for(const t of e)a.removeStyle(t,n)}else a.removeAttribute(o.key,n);if(null!==t.attributeNewValue&&r)if("class"==r.key){const e=(0,u.Z)(r.value);for(const t of e)a.addClass(t,n)}else if("style"==r.key){const e=Object.keys(r.value);for(const t of e)a.setStyle(t,r.value[t],n)}else a.setAttribute(r.key,r.value,n)}),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){const t=Z(e.view,"ui");return s=>{var o;s.on(`addMarker:${e.model}`,(o=t,(e,t,s)=>{t.isOpening=!0;const i=o(t,s);t.isOpening=!1;const r=o(t,s);if(!i||!r)return;const n=t.markerRange;if(n.isCollapsed&&!s.consumable.consume(n,e.name))return;for(const t of n)if(!s.consumable.consume(t.item,e.name))return;const a=s.mapper,c=s.writer;c.insert(a.toViewPosition(n.start),i),s.mapper.bindElementToMarker(i,t.markerName),n.isCollapsed||(c.insert(a.toViewPosition(n.end),r),s.mapper.bindElementToMarker(r,t.markerName)),e.stop()}),{priority:e.converterPriority||"normal"}),s.on(`removeMarker:${e.model}`,((e,t,s)=>{const o=s.mapper.markerNameToElements(t.markerName);if(o){for(const e of o)s.mapper.unbindElementFromMarkerName(e,t.markerName),s.writer.clear(s.writer.createRangeOn(e),e);s.writer.clearClonedElementsGroup(t.markerName),e.stop()}}),{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return t=>{var s;t.on(`addMarker:${e.model}`,(s=e.view,(e,t,o)=>{if(!t.item)return;if(!(t.item instanceof i.Z||t.item instanceof r.Z||t.item.is("$textProxy")))return;const n=T(s,t,o);if(!n)return;if(!o.consumable.consume(t.item,e.name))return;const a=o.writer,c=k(a,n),l=a.document.selection;if(t.item instanceof i.Z||t.item instanceof r.Z)a.wrap(l.getFirstRange(),c);else{const e=o.mapper.toViewRange(t.range),s=a.wrap(e,c);for(const e of s.getItems())if(e.is("attributeElement")&&e.isSimilar(c)){o.mapper.bindElementToMarker(e,t.markerName);break}}}),{priority:e.converterPriority||"normal"}),t.on(`addMarker:${e.model}`,function(e){return(t,s,i)=>{if(!s.item)return;if(!(s.item instanceof n.Z))return;const r=T(e,s,i);if(!r)return;if(!i.consumable.test(s.item,t.name))return;const a=i.mapper.toViewElement(s.item);if(a&&a.getCustomProperty("addHighlight")){i.consumable.consume(s.item,t.name);for(const e of o.Z._createIn(s.item))i.consumable.consume(e.item,t.name);a.getCustomProperty("addHighlight")(a,r,i.writer),i.mapper.bindElementToMarker(a,s.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),t.on(`removeMarker:${e.model}`,function(e){return(t,s,o)=>{if(s.markerRange.isCollapsed)return;const i=T(e,s,o);if(!i)return;const r=k(o.writer,i),n=o.mapper.markerNameToElements(s.markerName);if(n){for(const e of n)if(o.mapper.unbindElementFromMarkerName(e,s.markerName),e.is("attributeElement"))o.writer.unwrap(o.writer.createRangeOn(e),r);else{e.getCustomProperty("removeHighlight")(e,i.id,o.writer)}o.writer.clearClonedElementsGroup(s.markerName),t.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}markerToData(e){return this.add(function(e){const t=(e=(0,d.Z)(e)).model;let s=e.view;s||(s=s=>({group:t,name:s.substr(e.model.length+1)}));return o=>{var i;o.on(`addMarker:${t}`,(i=s,(e,t,s)=>{const o=i(t.markerName,s);if(!o)return;const r=t.markerRange;s.consumable.consume(r,e.name)&&(v(r,!1,s,t,o),v(r,!0,s,t,o),e.stop())}),{priority:e.converterPriority||"normal"}),o.on(`removeMarker:${t}`,function(e){return(t,s,o)=>{const i=e(s.markerName,o);if(!i)return;const r=o.mapper.markerNameToElements(s.markerName);if(r){for(const e of r)o.mapper.unbindElementFromMarkerName(e,s.markerName),e.is("containerElement")?(n(`data-${i.group}-start-before`,e),n(`data-${i.group}-start-after`,e),n(`data-${i.group}-end-before`,e),n(`data-${i.group}-end-after`,e)):o.writer.clear(o.writer.createRangeOn(e),e);o.writer.clearClonedElementsGroup(s.markerName),t.stop()}function n(e,t){if(t.hasAttribute(e)){const s=new Set(t.getAttribute(e).split(","));s.delete(i.name),0==s.size?o.writer.removeAttribute(e,t):o.writer.setAttribute(e,Array.from(s).join(","),t)}}}}(s),{priority:e.converterPriority||"normal"})}}(e))}}function g(){return(e,t,s)=>{if(!s.consumable.consume(t.item,e.name))return;const o=s.writer,i=s.mapper.toViewPosition(t.range.start),r=o.createText(t.item.data);o.insert(i,r)}}function f(){return(e,t,s)=>{s.convertAttributes(t.item),t.reconversion||!t.item.is("element")||t.item.isEmpty||s.convertChildren(t.item)}}function m(){return(e,t,s)=>{const o=s.mapper.toViewPosition(t.position),i=t.position.getShiftedBy(t.length),r=s.mapper.toViewPosition(i,{isPhantom:!0}),n=s.writer.createRange(o,r),a=s.writer.remove(n.getTrimmed());for(const e of s.writer.createRangeIn(a).getItems())s.mapper.unbindViewElement(e,{defer:!0})}}function k(e,t){const s=e.createAttributeElement("span",t.attributes);return t.classes&&s._addClass(t.classes),"number"==typeof t.priority&&(s._priority=t.priority),s._id=t.id,s}function b(){return(e,t,s)=>{const o=t.selection;if(o.isCollapsed)return;if(!s.consumable.consume(o,"selection"))return;const i=[];for(const e of o.getRanges())i.push(s.mapper.toViewRange(e));s.writer.setSelection(i,{backward:o.isBackward})}}function _(){return(e,t,s)=>{const o=t.selection;if(!o.isCollapsed)return;if(!s.consumable.consume(o,"selection"))return;const i=s.writer,r=o.getFirstPosition(),n=s.mapper.toViewPosition(r),a=i.breakAttributes(n);i.setSelection(a)}}function w(){return(e,t,s)=>{const o=s.writer,i=o.document.selection;for(const e of i.getRanges())e.isCollapsed&&e.end.parent.isAttached()&&s.writer.mergeAttributes(e.start);o.setSelection(null)}}function v(e,t,s,o,i){const r=t?e.start:e.end,n=r.nodeAfter&&r.nodeAfter.is("element")?r.nodeAfter:null,a=r.nodeBefore&&r.nodeBefore.is("element")?r.nodeBefore:null;if(n||a){let e,r;t&&n||!t&&!a?(e=n,r=!0):(e=a,r=!1);const c=s.mapper.toViewElement(e);if(c)return void function(e,t,s,o,i,r){const n=`data-${r.group}-${t?"start":"end"}-${s?"before":"after"}`,a=e.hasAttribute(n)?e.getAttribute(n).split(","):[];a.unshift(r.name),o.writer.setAttribute(n,a.join(","),e),o.mapper.bindElementToMarker(e,i.markerName)}(c,t,r,s,o,i)}!function(e,t,s,o,i){const r=`${i.group}-${t?"start":"end"}`,n=i.name?{name:i.name}:null,a=s.writer.createUIElement(r,n);s.writer.insert(e,a),s.mapper.bindElementToMarker(a,o.markerName)}(s.mapper.toViewPosition(r),t,s,o,i)}function y(e){return"string"==typeof e&&(e={name:e}),e.attributes?Array.isArray(e.attributes)||(e.attributes=[e.attributes]):e.attributes=[],e.children=!!e.children,e}function Z(e,t){return"function"==typeof e?e:(s,o)=>function(e,t,s){"string"==typeof e&&(e={name:e});let o;const i=t.writer,r=Object.assign({},e.attributes);if("container"==s)o=i.createContainerElement(e.name,r);else if("attribute"==s){const t={priority:e.priority||c.Z.DEFAULT_PRIORITY};o=i.createAttributeElement(e.name,r,t)}else o=i.createUIElement(e.name,r);if(e.styles){const t=Object.keys(e.styles);for(const s of t)i.setStyle(s,e.styles[s],o)}if(e.classes){const t=e.classes;if("string"==typeof t)i.addClass(t,o);else for(const e of t)i.addClass(e,o)}return o}(e,o,t)}function P(e){return e.model.values?(t,s,o)=>{const i=e.view[t];return i?i(t,s,o):null}:e.view}function x(e){return"string"==typeof e?t=>({key:e,value:t}):"object"==typeof e?e.value?()=>e:t=>({key:e.key,value:t}):e}function T(e,t,s){const o="function"==typeof e?e(t,s):e;return o?(o.priority||(o.priority=10),o.id||(o.id=t.markerName),o):null}function A(e){const t=function(e){return(t,s)=>{if(!t.is("element",e.name))return!1;if("attribute"==s.type){if(e.attributes.includes(s.attributeKey))return!0}else if(e.children)return!0;return!1}}(e);return(e,s)=>{const o=[];s.reconvertedElements||(s.reconvertedElements=new Set);for(const e of s.changes){const i="attribute"==e.type?e.range.start.nodeAfter:e.position.parent;if(i&&t(i,e)){if(!s.reconvertedElements.has(i)){s.reconvertedElements.add(i);const e=a.ZP._createBefore(i);o.push({type:"remove",name:i.name,position:e,length:1},{type:"reinsert",name:i.name,position:e,length:1})}}else o.push(e)}s.changes=o}}function C(e){return(t,s,o={})=>{const i=["insert"];for(const s of e.attributes)t.hasAttribute(s)&&i.push(`attribute:${s}`);return!!i.every((e=>s.test(t,e)))&&(o.preflight||i.forEach((e=>s.consume(t,e))),!0)}}function E(e,t,s,o){for(const i of t)S(e.root,i,s,o)||s.convertItem(i)}function S(e,t,s,o){const{writer:i,mapper:r}=s;if(!o.reconversion)return!1;const n=r.toViewElement(t);return!(!n||n.root==e)&&(!!s.canReuseView(n)&&(i.move(i.createRangeOn(n),r.toViewPosition(a.ZP._createBefore(t))),!0))}function O(e,t,{preflight:s}={}){return s?t.test(e,"insert"):t.consume(e,"insert")}},"./packages/ckeditor5-engine/src/conversion/mapper.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./packages/ckeditor5-engine/src/model/position.ts"),i=s("./packages/ckeditor5-engine/src/model/range.ts"),r=s("./packages/ckeditor5-engine/src/view/position.ts"),n=s("./packages/ckeditor5-engine/src/view/range.ts"),a=s("./packages/ckeditor5-engine/src/view/text.ts"),c=s("./packages/ckeditor5-utils/src/emittermixin.ts"),l=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class d extends c.Q5{constructor(){super(),this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._deferredBindingRemovals=new Map,this._unboundMarkerNames=new Set,this.on("modelToViewPosition",((e,t)=>{if(t.viewPosition)return;const s=this._modelToViewMapping.get(t.modelPosition.parent);if(!s)throw new l.ZP("mapping-model-position-view-parent-not-found",this,{modelPosition:t.modelPosition});t.viewPosition=this.findPositionIn(s,t.modelPosition.offset)}),{priority:"low"}),this.on("viewToModelPosition",((e,t)=>{if(t.modelPosition)return;const s=this.findMappedViewAncestor(t.viewPosition),i=this._viewToModelMapping.get(s),r=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,s);t.modelPosition=o.ZP._createAt(i,r)}),{priority:"low"})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e,t={}){const s=this.toModelElement(e);if(this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);t.defer?this._deferredBindingRemovals.set(e,e.root):(this._viewToModelMapping.delete(e),this._modelToViewMapping.get(s)==e&&this._modelToViewMapping.delete(s))}unbindModelElement(e){const t=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(t)==e&&this._viewToModelMapping.delete(t)}bindElementToMarker(e,t){const s=this._markerNameToElements.get(t)||new Set;s.add(e);const o=this._elementToMarkerNames.get(e)||new Set;o.add(t),this._markerNameToElements.set(t,s),this._elementToMarkerNames.set(e,o)}unbindElementFromMarkerName(e,t){const s=this._markerNameToElements.get(t);s&&(s.delete(e),0==s.size&&this._markerNameToElements.delete(t));const o=this._elementToMarkerNames.get(e);o&&(o.delete(t),0==o.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}flushDeferredBindings(){for(const[e,t]of this._deferredBindingRemovals)e.root==t&&this.unbindViewElement(e);this._deferredBindingRemovals=new Map}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set,this._deferredBindingRemovals=new Map}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new i.Z(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new n.Z(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",t),t.modelPosition}toViewPosition(e,t={}){const s={modelPosition:e,mapper:this,isPhantom:t.isPhantom};return this.fire("modelToViewPosition",s),s.viewPosition}markerNameToElements(e){const t=this._markerNameToElements.get(e);if(!t)return null;const s=new Set;for(const e of t)if(e.is("attributeElement"))for(const t of e.getElementsWithSameId())s.add(t);else s.add(e);return s}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}findMappedViewAncestor(e){let t=e.parent;for(;!this._viewToModelMapping.has(t);)t=t.parent;return t}_toModelOffset(e,t,s){if(s!=e){return this._toModelOffset(e.parent,e.index,s)+this._toModelOffset(e,t,e)}if(e.is("$text"))return t;let o=0;for(let s=0;s{"use strict";s.d(t,{Fo:()=>h,ZP:()=>c,_p:()=>l,s8:()=>d});var o=s("./packages/ckeditor5-engine/src/view/matcher.ts"),i=s("./packages/ckeditor5-engine/src/conversion/conversionhelpers.ts"),r=s("./node_modules/lodash-es/cloneDeep.js"),n=s("./packages/ckeditor5-utils/src/priorities.ts"),a=s("./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts");class c extends i.Z{elementToElement(e){return this.add(u(e))}elementToAttribute(e){return this.add(function(e){f(e=(0,r.Z)(e));const t=m(e,!1),s=p(e.view),o=s?`element:${s}`:"element";return s=>{s.on(o,t,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){e=(0,r.Z)(e);let t=null;("string"==typeof e.view||e.view.key)&&(t=function(e){"string"==typeof e.view&&(e.view={key:e.view});const t=e.view.key;let s;if("class"==t||"style"==t){s={["class"==t?"classes":"styles"]:e.view.value}}else{s={attributes:{[t]:void 0===e.view.value?/[\s\S]*/:e.view.value}}}e.view.name&&(s.name=e.view.name);return e.view=s,t}(e));f(e,t);const s=m(e,!0);return t=>{t.on("element",s,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){const t=function(e){return(t,s)=>{const o="string"==typeof e?e:e(t,s);return s.writer.createElement("$marker",{"data-name":o})}}(e.model);return u({...e,model:t})}(e))}dataToMarker(e){return this.add(function(e){(e=(0,r.Z)(e)).model||(e.model=t=>t?e.view+":"+t:e.view);const t={view:e.view,model:e.model},s=g(k(t,"start")),o=g(k(t,"end"));return i=>{i.on(`element:${e.view}-start`,s,{priority:e.converterPriority||"normal"}),i.on(`element:${e.view}-end`,o,{priority:e.converterPriority||"normal"});const r=n.Z.get("low"),a=n.Z.get("highest"),c=n.Z.get(e.converterPriority)/a;i.on("element",function(e){return(t,s,o)=>{const i=`data-${e.view}`;function r(t,i){for(const r of i){const i=e.model(r,o),n=o.writer.createElement("$marker",{"data-name":i});o.writer.insert(n,t),s.modelCursor.isEqual(t)?s.modelCursor=s.modelCursor.getShiftedBy(1):s.modelCursor=s.modelCursor._getTransformedByInsertion(t,1),s.modelRange=s.modelRange._getTransformedByInsertion(t,1)[0]}}(o.consumable.test(s.viewItem,{attributes:i+"-end-after"})||o.consumable.test(s.viewItem,{attributes:i+"-start-after"})||o.consumable.test(s.viewItem,{attributes:i+"-end-before"})||o.consumable.test(s.viewItem,{attributes:i+"-start-before"}))&&(s.modelRange||Object.assign(s,o.convertChildren(s.viewItem,s.modelCursor)),o.consumable.consume(s.viewItem,{attributes:i+"-end-after"})&&r(s.modelRange.end,s.viewItem.getAttribute(i+"-end-after").split(",")),o.consumable.consume(s.viewItem,{attributes:i+"-start-after"})&&r(s.modelRange.end,s.viewItem.getAttribute(i+"-start-after").split(",")),o.consumable.consume(s.viewItem,{attributes:i+"-end-before"})&&r(s.modelRange.start,s.viewItem.getAttribute(i+"-end-before").split(",")),o.consumable.consume(s.viewItem,{attributes:i+"-start-before"})&&r(s.modelRange.start,s.viewItem.getAttribute(i+"-start-before").split(",")))}}(t),{priority:r+c})}}(e))}}function l(){return(e,t,s)=>{if(!t.modelRange&&s.consumable.consume(t.viewItem,{name:!0})){const{modelRange:e,modelCursor:o}=s.convertChildren(t.viewItem,t.modelCursor);t.modelRange=e,t.modelCursor=o}}}function d(){return(e,t,{schema:s,consumable:o,writer:i})=>{let r=t.modelCursor;if(!o.test(t.viewItem))return;if(!s.checkChild(r,"$text")){if(!(0,a.gg)(r,"$text",s))return;if(0==t.viewItem.data.trim().length)return;r=(0,a.zX)(r,i)}o.consume(t.viewItem);const n=i.createText(t.viewItem.data);i.insert(n,r),t.modelRange=i.createRange(r,r.getShiftedBy(n.offsetSize)),t.modelCursor=t.modelRange.end}}function h(e,t){return(s,o)=>{const i=o.newSelection,r=[];for(const e of i.getRanges())r.push(t.toModelRange(e));const n=e.createSelection(r,{backward:i.isBackward});n.isEqual(e.document.selection)||e.change((e=>{e.setSelection(n)}))}}function u(e){const t=g(e=(0,r.Z)(e)),s=p(e.view),o=s?`element:${s}`:"element";return s=>{s.on(o,t,{priority:e.converterPriority||"normal"})}}function p(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function g(e){const t=new o.Z(e.view);return(s,o,i)=>{const r=t.match(o.viewItem);if(!r)return;const n=r.match;if(n.name=!0,!i.consumable.test(o.viewItem,n))return;const a=function(e,t,s){return e instanceof Function?e(t,s):s.writer.createElement(e)}(e.model,o.viewItem,i);a&&i.safeInsert(a,o.modelCursor)&&(i.consumable.consume(o.viewItem,n),i.convertChildren(o.viewItem,a),i.updateConversionResult(a,o))}}function f(e,t=null){const s=null===t||(e=>e.getAttribute(t)),o="object"!=typeof e.model?e.model:e.model.key,i="object"!=typeof e.model||void 0===e.model.value?s:e.model.value;e.model={key:o,value:i}}function m(e,t){const s=new o.Z(e.view);return(o,i,r)=>{if(!i.modelRange&&t)return;const n=s.match(i.viewItem);if(!n)return;if(!function(e,t){const s="function"==typeof e?e(t):e;if("object"==typeof s&&!p(s))return!1;return!s.classes&&!s.attributes&&!s.styles}(e.view,i.viewItem)?delete n.match.name:n.match.name=!0,!r.consumable.test(i.viewItem,n.match))return;const a=e.model.key,c="function"==typeof e.model.value?e.model.value(i.viewItem,r):e.model.value;if(null===c)return;i.modelRange||Object.assign(i,r.convertChildren(i.viewItem,i.modelCursor));const l=function(e,t,s,o){let i=!1;for(const r of Array.from(e.getItems({shallow:s})))o.schema.checkAttribute(r,t.key)&&(i=!0,r.hasAttribute(t.key)||o.writer.setAttribute(t.key,t.value,r));return i}(i.modelRange,{key:a,value:c},t,r);l&&(r.consumable.test(i.viewItem,{name:!0})&&(n.match.name=!0),r.consumable.consume(i.viewItem,n.match))}}function k(e,t){return{view:`${e.view}-${t}`,model:(t,s)=>{const o=t.getAttribute("name"),i=e.model(o,s);return s.writer.createElement("$marker",{"data-name":i})}}}},"./packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});class o{getHtml(e){const t=document.implementation.createHTMLDocument("").createElement("div");return t.appendChild(e),t.innerHTML}}var i=s("./packages/ckeditor5-engine/src/view/domconverter.ts");class r{constructor(e){this.domParser=new DOMParser,this.domConverter=new i.Z(e,{renderingMode:"data"}),this.htmlWriter=new o}toData(e){const t=this.domConverter.viewToDom(e);return this.htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this.domConverter.domToView(t)}registerRawContentMatcher(e){this.domConverter.registerRawContentMatcher(e)}useFillerType(e){this.domConverter.blockFillerMode="marked"==e?"markedNbsp":"nbsp"}_toDom(e){e.match(/<(?:html|body|head|meta)(?:\s[^>]*)?>/i)||(e=`${e}`);const t=this.domParser.parseFromString(e,"text/html"),s=t.createDocumentFragment(),o=t.body.childNodes;for(;o.length>0;)s.appendChild(o[0]);return s}}},"./packages/ckeditor5-engine/src/index.ts":(e,t,s)=>{"use strict";s.d(t,{KU:()=>Q,uz:()=>b.Z,Yc:()=>k.Z,f4:()=>j.Z,uj:()=>x.Z,pG:()=>I.Z,dK:()=>ne.Z,qZ:()=>J.Z,qD:()=>Y.Z,jH:()=>m.Z,W_:()=>O.Z,Ay:()=>M.Z,X5:()=>_.Z,IZ:()=>w.Z,jP:()=>C.Z,iE:()=>A.Z,zj:()=>v.Z,xO:()=>re.Z,Hn:()=>E.Z,dM:()=>X.Z,Qj:()=>G.Z,Bz:()=>y.Z,Ly:()=>R.ZP,e6:()=>T.Z,Th:()=>D.Z,V_:()=>V.Z,Y1:()=>P.Z,A_:()=>ae.A,xv:()=>N.Z,Po:()=>S.Z,yj:()=>ie,G7:()=>z.Z,m1:()=>$.Z,By:()=>W.Z,Ux:()=>B.Z,y_:()=>K.Z,y9:()=>L.Z,pc:()=>H.Z,wx:()=>q.Z,Xj:()=>F.Z,dq:()=>U.Z,QR:()=>Me,sI:()=>Ne,vt:()=>He,J8:()=>qe,DA:()=>l,ID:()=>c,I8:()=>Oe,mq:()=>Se,oz:()=>Ee,YG:()=>W.Y,m0:()=>Re,uT:()=>je,$_:()=>h,SB:()=>Te,D5:()=>ge,G9:()=>be,IT:()=>me,zz:()=>we,WK:()=>Pe,Zb:()=>ye,PX:()=>Ce,Q7:()=>u,NJ:()=>d,Rf:()=>Z.R});var o=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),i=s.n(o),r=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/placeholder.css"),n={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};i()(r.Z,n);r.Z.locals;const a=new WeakMap;function c(e){const{view:t,element:s,text:o,isDirectHost:i=!0,keepOnFocus:r=!1}=e,n=t.document;a.has(n)||(a.set(n,new Map),n.registerPostFixer((e=>p(n,e))),n.on("change:isComposing",(()=>{t.change((e=>p(n,e)))}),{priority:"high"})),a.get(n).set(s,{text:o,isDirectHost:i,keepOnFocus:r,hostElement:i?s:null}),t.change((e=>p(n,e)))}function l(e,t){const s=t.document;e.change((e=>{if(!a.has(s))return;const o=a.get(s),i=o.get(t);e.removeAttribute("data-placeholder",i.hostElement),h(e,i.hostElement),o.delete(t)}))}function d(e,t){return!t.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",t),!0)}function h(e,t){return!!t.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",t),!0)}function u(e,t){if(!e.isAttached())return!1;const s=Array.from(e.getChildren()).some((e=>!e.is("uiElement")));if(s)return!1;const o=e.document,i=o.selection.anchor;return(!o.isComposing||!i||i.parent!==e)&&(!!t||(!o.isFocused||!!i&&i.parent!==e))}function p(e,t){const s=a.get(e),o=[];let i=!1;for(const[e,r]of s)r.isDirectHost&&(o.push(e),g(t,e,r)&&(i=!0));for(const[e,r]of s){if(r.isDirectHost)continue;const s=f(e);s&&(o.includes(s)||(r.hostElement=s,g(t,e,r)&&(i=!0)))}return i}function g(e,t,s){const{text:o,isDirectHost:i,hostElement:r}=s;let n=!1;r.getAttribute("data-placeholder")!==o&&(e.setAttribute("data-placeholder",o,r),n=!0);return(i||1==t.childCount)&&u(r,s.keepOnFocus)?d(e,r)&&(n=!0):h(e,r)&&(n=!0),n}function f(e){if(e.childCount){const t=e.getChild(0);if(t.is("element")&&!t.is("uiElement")&&!t.is("attributeElement"))return t}return null}var m=s("./packages/ckeditor5-engine/src/controller/editingcontroller.ts"),k=s("./packages/ckeditor5-engine/src/controller/datacontroller.ts"),b=s("./packages/ckeditor5-engine/src/conversion/conversion.ts"),_=s("./packages/ckeditor5-engine/src/dataprocessor/htmldataprocessor.ts"),w=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),v=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),y=s("./packages/ckeditor5-engine/src/model/operation/operationfactory.ts"),Z=s("./packages/ckeditor5-engine/src/model/operation/transform.ts"),P=s("./packages/ckeditor5-engine/src/model/selection.ts"),x=s("./packages/ckeditor5-engine/src/model/documentselection.ts"),T=s("./packages/ckeditor5-engine/src/model/range.ts"),A=s("./packages/ckeditor5-engine/src/model/liverange.ts"),C=s("./packages/ckeditor5-engine/src/model/liveposition.ts"),E=s("./packages/ckeditor5-engine/src/model/model.ts"),S=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),O=s("./packages/ckeditor5-engine/src/model/element.ts"),R=s("./packages/ckeditor5-engine/src/model/position.ts"),j=s("./packages/ckeditor5-engine/src/model/documentfragment.ts"),M=s("./packages/ckeditor5-engine/src/model/history.ts"),N=s("./packages/ckeditor5-engine/src/model/text.ts"),V=s("./packages/ckeditor5-engine/src/model/schema.ts"),I=s("./packages/ckeditor5-engine/src/view/domconverter.ts"),D=s("./packages/ckeditor5-engine/src/view/renderer.ts"),z=s("./packages/ckeditor5-engine/src/view/view.ts"),B=s("./packages/ckeditor5-engine/src/view/document.ts"),F=s("./packages/ckeditor5-engine/src/view/text.ts"),L=s("./packages/ckeditor5-engine/src/view/element.ts"),W=s("./packages/ckeditor5-engine/src/view/containerelement.ts"),$=s("./packages/ckeditor5-engine/src/view/attributeelement.ts"),H=s("./packages/ckeditor5-engine/src/view/emptyelement.ts"),q=s("./packages/ckeditor5-engine/src/view/rawelement.ts"),U=s("./packages/ckeditor5-engine/src/view/uielement.ts"),K=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),G=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),J=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts");class Q extends J.Z{constructor(e){super(e),this.domEventType="click"}onDomEvent(e){this.fire(e.type,e)}}var X=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),Y=s("./packages/ckeditor5-engine/src/view/downcastwriter.ts"),ee=s("./node_modules/lodash-es/isPlainObject.js"),te=s("./packages/ckeditor5-engine/src/view/position.ts"),se=s("./packages/ckeditor5-engine/src/view/range.ts"),oe=s("./packages/ckeditor5-engine/src/view/selection.ts");class ie{constructor(e){this.document=e}createDocumentFragment(e){return new K.Z(this.document,e)}createElement(e,t,s){return new L.Z(this.document,e,t,s)}createText(e){return new F.Z(this.document,e)}clone(e,t=!1){return e._clone(t)}appendChild(e,t){return t._appendChild(e)}insertChild(e,t,s){return s._insertChild(e,t)}removeChildren(e,t,s){return s._removeChildren(e,t)}remove(e){const t=e.parent;return t?this.removeChildren(t.getChildIndex(e),1,t):[]}replace(e,t){const s=e.parent;if(s){const o=s.getChildIndex(e);return this.removeChildren(o,1,s),this.insertChild(o,t,s),!0}return!1}unwrapElement(e){const t=e.parent;if(t){const s=t.getChildIndex(e);this.remove(e),this.insertChild(s,e.getChildren(),t)}}rename(e,t){const s=new L.Z(this.document,e,t.getAttributes(),t.getChildren());return this.replace(t,s)?s:null}setAttribute(e,t,s){s._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,s){(0,ee.Z)(e)&&void 0===s?t._setStyle(e):s._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,s){s._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}createPositionAt(e,t){return te.Z._createAt(e,t)}createPositionAfter(e){return te.Z._createAfter(e)}createPositionBefore(e){return te.Z._createBefore(e)}createRange(e,t){return new se.Z(e,t)}createRangeOn(e){return se.Z._createOn(e)}createRangeIn(e){return se.Z._createIn(e)}createSelection(...e){return new oe.Z(...e)}}var re=s("./packages/ckeditor5-engine/src/view/matcher.ts"),ne=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),ae=s("./packages/ckeditor5-engine/src/view/stylesmap.ts");const ce=/^#([0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/i,le=/^rgb\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}[0-9]{1,3}[ %]?\)$/i,de=/^rgba\([ ]?([0-9]{1,3}[ %]?,[ ]?){3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,he=/^hsl\([ ]?([0-9]{1,3}[ %]?[,]?[ ]*){3}(1|[0-9]+%|[0]?\.?[0-9]+)?\)$/i,ue=/^hsla\([ ]?([0-9]{1,3}[ %]?,[ ]?){2,3}(1|[0-9]+%|[0]?\.?[0-9]+)\)$/i,pe=new Set(["black","silver","gray","white","maroon","red","purple","fuchsia","green","lime","olive","yellow","navy","blue","teal","aqua","orange","aliceblue","antiquewhite","aquamarine","azure","beige","bisque","blanchedalmond","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","gainsboro","ghostwhite","gold","goldenrod","greenyellow","grey","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","limegreen","linen","magenta","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","oldlace","olivedrab","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","thistle","tomato","turquoise","violet","wheat","whitesmoke","yellowgreen","activeborder","activecaption","appworkspace","background","buttonface","buttonhighlight","buttonshadow","buttontext","captiontext","graytext","highlight","highlighttext","inactiveborder","inactivecaption","inactivecaptiontext","infobackground","infotext","menu","menutext","scrollbar","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","window","windowframe","windowtext","rebeccapurple","currentcolor","transparent"]);function ge(e){return e.startsWith("#")?ce.test(e):e.startsWith("rgb")?le.test(e)||de.test(e):e.startsWith("hsl")?he.test(e)||ue.test(e):pe.has(e.toLowerCase())}const fe=["none","hidden","dotted","dashed","solid","double","groove","ridge","inset","outset"];function me(e){return fe.includes(e)}const ke=/^([+-]?[0-9]*([.][0-9]+)?(px|cm|mm|in|pc|pt|ch|em|ex|rem|vh|vw|vmin|vmax)|0)$/;function be(e){return ke.test(e)}const _e=/^[+-]?[0-9]*([.][0-9]+)?%$/;function we(e){return _e.test(e)}const ve=["repeat-x","repeat-y","repeat","space","round","no-repeat"];function ye(e){return ve.includes(e)}const Ze=["center","top","bottom","left","right"];function Pe(e){return Ze.includes(e)}const xe=["fixed","scroll","local"];function Te(e){return xe.includes(e)}const Ae=/^url\(/;function Ce(e){return Ae.test(e)}function Ee(e=""){if(""===e)return{top:void 0,right:void 0,bottom:void 0,left:void 0};const t=je(e),s=t[0],o=t[2]||s,i=t[1]||s;return{top:s,bottom:o,right:i,left:t[3]||i}}function Se(e){return t=>{const{top:s,right:o,bottom:i,left:r}=t,n=[];return[s,o,r,i].every((e=>!!e))?n.push([e,Oe(t)]):(s&&n.push([e+"-top",s]),o&&n.push([e+"-right",o]),i&&n.push([e+"-bottom",i]),r&&n.push([e+"-left",r])),n}}function Oe({top:e,right:t,bottom:s,left:o}){const i=[];return o!==t?i.push(e,t,s,o):s!==e?i.push(e,t,s):t!==e?i.push(e,t):i.push(e),i.join(" ")}function Re(e){return t=>({path:e,value:Ee(t)})}function je(e){return e.replace(/, /g,",").split(" ").map((e=>e.replace(/,/g,", ")))}function Me(e){e.setNormalizer("background",(e=>{const t={},s=je(e);for(const e of s)ye(e)?(t.repeat=t.repeat||[],t.repeat.push(e)):Pe(e)?(t.position=t.position||[],t.position.push(e)):Te(e)?t.attachment=e:ge(e)?t.color=e:Ce(e)&&(t.image=e);return{path:"background",value:t}})),e.setNormalizer("background-color",(e=>({path:"background.color",value:e}))),e.setReducer("background",(e=>{const t=[];return t.push(["background-color",e.color]),t})),e.setStyleRelation("background",["background-color"])}function Ne(e){e.setNormalizer("border",(e=>{const{color:t,style:s,width:o}=Le(e);return{path:"border",value:{color:Ee(t),style:Ee(s),width:Ee(o)}}})),e.setNormalizer("border-top",Ve("top")),e.setNormalizer("border-right",Ve("right")),e.setNormalizer("border-bottom",Ve("bottom")),e.setNormalizer("border-left",Ve("left")),e.setNormalizer("border-color",Ie("color")),e.setNormalizer("border-width",Ie("width")),e.setNormalizer("border-style",Ie("style")),e.setNormalizer("border-top-color",ze("color","top")),e.setNormalizer("border-top-style",ze("style","top")),e.setNormalizer("border-top-width",ze("width","top")),e.setNormalizer("border-right-color",ze("color","right")),e.setNormalizer("border-right-style",ze("style","right")),e.setNormalizer("border-right-width",ze("width","right")),e.setNormalizer("border-bottom-color",ze("color","bottom")),e.setNormalizer("border-bottom-style",ze("style","bottom")),e.setNormalizer("border-bottom-width",ze("width","bottom")),e.setNormalizer("border-left-color",ze("color","left")),e.setNormalizer("border-left-style",ze("style","left")),e.setNormalizer("border-left-width",ze("width","left")),e.setExtractor("border-top",Be("top")),e.setExtractor("border-right",Be("right")),e.setExtractor("border-bottom",Be("bottom")),e.setExtractor("border-left",Be("left")),e.setExtractor("border-top-color","border.color.top"),e.setExtractor("border-right-color","border.color.right"),e.setExtractor("border-bottom-color","border.color.bottom"),e.setExtractor("border-left-color","border.color.left"),e.setExtractor("border-top-width","border.width.top"),e.setExtractor("border-right-width","border.width.right"),e.setExtractor("border-bottom-width","border.width.bottom"),e.setExtractor("border-left-width","border.width.left"),e.setExtractor("border-top-style","border.style.top"),e.setExtractor("border-right-style","border.style.right"),e.setExtractor("border-bottom-style","border.style.bottom"),e.setExtractor("border-left-style","border.style.left"),e.setReducer("border-color",Se("border-color")),e.setReducer("border-style",Se("border-style")),e.setReducer("border-width",Se("border-width")),e.setReducer("border-top",We("top")),e.setReducer("border-right",We("right")),e.setReducer("border-bottom",We("bottom")),e.setReducer("border-left",We("left")),e.setReducer("border",function(){return t=>{const s=Fe(t,"top"),o=Fe(t,"right"),i=Fe(t,"bottom"),r=Fe(t,"left"),n=[s,o,i,r],a={width:e(n,"width"),style:e(n,"style"),color:e(n,"color")},c=$e(a,"all");if(c.length)return c;const l=Object.entries(a).reduce(((e,[t,s])=>(s&&(e.push([`border-${t}`,s]),n.forEach((e=>delete e[t]))),e)),[]);return[...l,...$e(s,"top"),...$e(o,"right"),...$e(i,"bottom"),...$e(r,"left")]};function e(e,t){return e.map((e=>e[t])).reduce(((e,t)=>e==t?e:null))}}()),e.setStyleRelation("border",["border-color","border-style","border-width","border-top","border-right","border-bottom","border-left","border-top-color","border-right-color","border-bottom-color","border-left-color","border-top-style","border-right-style","border-bottom-style","border-left-style","border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-color",["border-top-color","border-right-color","border-bottom-color","border-left-color"]),e.setStyleRelation("border-style",["border-top-style","border-right-style","border-bottom-style","border-left-style"]),e.setStyleRelation("border-width",["border-top-width","border-right-width","border-bottom-width","border-left-width"]),e.setStyleRelation("border-top",["border-top-color","border-top-style","border-top-width"]),e.setStyleRelation("border-right",["border-right-color","border-right-style","border-right-width"]),e.setStyleRelation("border-bottom",["border-bottom-color","border-bottom-style","border-bottom-width"]),e.setStyleRelation("border-left",["border-left-color","border-left-style","border-left-width"])}function Ve(e){return t=>{const{color:s,style:o,width:i}=Le(t),r={};return void 0!==s&&(r.color={[e]:s}),void 0!==o&&(r.style={[e]:o}),void 0!==i&&(r.width={[e]:i}),{path:"border",value:r}}}function Ie(e){return t=>({path:"border",value:De(t,e)})}function De(e,t){return{[t]:Ee(e)}}function ze(e,t){return s=>({path:"border",value:{[e]:{[t]:s}}})}function Be(e){return(t,s)=>{if(s.border)return Fe(s.border,e)}}function Fe(e,t){const s={};return e.width&&e.width[t]&&(s.width=e.width[t]),e.style&&e.style[t]&&(s.style=e.style[t]),e.color&&e.color[t]&&(s.color=e.color[t]),s}function Le(e){const t={},s=je(e);for(const e of s)be(e)||/thin|medium|thick/.test(e)?t.width=e:me(e)?t.style=e:t.color=e;return t}function We(e){return t=>$e(t,e)}function $e(e,t){const s=[];if(e&&e.width&&s.push("width"),e&&e.style&&s.push("style"),e&&e.color&&s.push("color"),3==s.length){const o=s.map((t=>e[t])).join(" ");return["all"==t?["border",o]:[`border-${t}`,o]]}return"all"==t?[]:s.map((s=>[`border-${t}-${s}`,e[s]]))}function He(e){e.setNormalizer("margin",Re("margin")),e.setNormalizer("margin-top",(e=>({path:"margin.top",value:e}))),e.setNormalizer("margin-right",(e=>({path:"margin.right",value:e}))),e.setNormalizer("margin-bottom",(e=>({path:"margin.bottom",value:e}))),e.setNormalizer("margin-left",(e=>({path:"margin.left",value:e}))),e.setReducer("margin",Se("margin")),e.setStyleRelation("margin",["margin-top","margin-right","margin-bottom","margin-left"])}function qe(e){e.setNormalizer("padding",Re("padding")),e.setNormalizer("padding-top",(e=>({path:"padding.top",value:e}))),e.setNormalizer("padding-right",(e=>({path:"padding.right",value:e}))),e.setNormalizer("padding-bottom",(e=>({path:"padding.bottom",value:e}))),e.setNormalizer("padding-left",(e=>({path:"padding.left",value:e}))),e.setReducer("padding",Se("padding")),e.setStyleRelation("padding",["padding-top","padding-right","padding-bottom","padding-left"])}},"./packages/ckeditor5-engine/src/model/documentfragment.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/element.ts"),r=s("./packages/ckeditor5-engine/src/model/nodelist.ts"),n=s("./packages/ckeditor5-engine/src/model/text.ts"),a=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),c=s("./packages/ckeditor5-utils/src/isiterable.ts");class l extends o.Z{constructor(e){super(),this.markers=new Map,this._children=new r.Z,e&&this._insertChild(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get nextSibling(){return null}get previousSibling(){return null}get root(){return this}get parent(){return null}get document(){return null}getAncestors(){return[]}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const s of e)t=t.getChild(t.offsetToIndex(s));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const s of e)s.name?t.push(i.Z.fromJSON(s)):t.push(n.Z.fromJSON(s));return new l(t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const s=function(e){if("string"==typeof e)return[new n.Z(e)];(0,c.Z)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new n.Z(e):e instanceof a.Z?new n.Z(e.data,e.getAttributes()):e))}(t);for(const e of s)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,s)}_removeChildren(e,t=1){const s=this._children._removeNodes(e,t);for(const e of s)e.parent=null;return s}}l.prototype.is=function(e){return"documentFragment"===e||"model:documentFragment"===e}},"./packages/ckeditor5-engine/src/model/documentselection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/liverange.ts"),r=s("./packages/ckeditor5-engine/src/model/selection.ts"),n=s("./packages/ckeditor5-engine/src/model/text.ts"),a=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),l=s("./packages/ckeditor5-utils/src/collection.ts"),d=s("./packages/ckeditor5-utils/src/emittermixin.ts"),h=s("./packages/ckeditor5-utils/src/tomap.ts"),u=s("./packages/ckeditor5-utils/src/uid.ts");const p="selection:";class g extends((0,d.ZP)(o.Z)){constructor(e){super(),this._selection=new f(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").to(this),this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(e){return this._selection.containsEntireContent(e)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(e){return this._selection.getAttribute(e)}hasAttribute(e){return this._selection.hasAttribute(e)}refresh(){this._selection.updateMarkers(),this._selection._updateAttributes(!1)}observeMarkers(e){this._selection.observeMarkers(e)}_setFocus(e,t){this._selection.setFocus(e,t)}_setTo(...e){this._selection.setTo(...e)}_setAttribute(e,t){this._selection.setAttribute(e,t)}_removeAttribute(e){this._selection.removeAttribute(e)}_getStoredAttributes(){return this._selection.getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(e){this._selection.restoreGravity(e)}static _getStoreAttributeKey(e){return p+e}static _isStoreAttributeKey(e){return e.startsWith(p)}}g.prototype.is=function(e){return"selection"===e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e};class f extends r.Z{constructor(e){super(),this.markers=new l.Z({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._selectionRestorePosition=null,this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this._observedMarkers=new Set,this.listenTo(this._model,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&"marker"!=s.type&&"rename"!=s.type&&"noop"!=s.type&&(0==this._ranges.length&&this._selectionRestorePosition&&this._fixGraveyardSelection(this._selectionRestorePosition),this._selectionRestorePosition=null,this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1})))}),{priority:"lowest"}),this.on("change:range",(()=>{this._validateSelectionRanges(this.getRanges())})),this.listenTo(this._model.markers,"update",((e,t,s,o)=>{this._updateMarker(t,o)})),this.listenTo(this._document,"change",((e,t)=>{!function(e,t){const s=e.document.differ;for(const o of s.getChanges()){if("insert"!=o.type)continue;const s=o.position.parent;o.length===s.maxOffset&&e.enqueueChange(t,(e=>{const t=Array.from(s.getAttributeKeys()).filter((e=>e.startsWith(p)));for(const o of t)e.removeAttribute(o,s)}))}}(this._model,t)}))}get isCollapsed(){return 0===this._ranges.length?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return this._ranges.length>0}get isGravityOverridden(){return!!this._overriddenGravityRegister.size}destroy(){for(let e=0;e{if(this._hasChangedRange=!0,t.root==this._document.graveyard){this._selectionRestorePosition=o.deletionPosition;const e=this._ranges.indexOf(t);this._ranges.splice(e,1),t.detach()}})),t}updateMarkers(){if(!this._observedMarkers.size)return;const e=[];let t=!1;for(const t of this._model.markers){const s=t.name.split(":",1)[0];if(!this._observedMarkers.has(s))continue;const o=t.getRange();for(const s of this.getRanges())o.containsRange(s,!s.isCollapsed)&&e.push(t)}const s=Array.from(this.markers);for(const s of e)this.markers.has(s)||(this.markers.add(s),t=!0);for(const s of Array.from(this.markers))e.includes(s)||(this.markers.remove(s),t=!0);t&&this.fire("change:marker",{oldMarkers:s,directChange:!1})}_updateMarker(e,t){const s=e.name.split(":",1)[0];if(!this._observedMarkers.has(s))return;let o=!1;const i=Array.from(this.markers),r=this.markers.has(e);if(t){let s=!1;for(const e of this.getRanges())if(t.containsRange(e,!e.isCollapsed)){s=!0;break}s&&!r?(this.markers.add(e),o=!0):!s&&r&&(this.markers.remove(e),o=!0)}else r&&(this.markers.remove(e),o=!0);o&&this.fire("change:marker",{oldMarkers:i,directChange:!1})}_updateAttributes(e){const t=(0,h.Z)(this._getSurroundingAttributes()),s=(0,h.Z)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)"low"==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t);const o=[];for(const[e,t]of this.getAttributes())s.has(e)&&s.get(e)===t||o.push(e);for(const[e]of s)this.hasAttribute(e)||o.push(e);o.length>0&&this.fire("change:attribute",{attributeKeys:o,directChange:!1})}_setAttribute(e,t,s=!0){const o=s?"normal":"low";if("low"==o&&"normal"==this._attributePriority.get(e))return!1;return super.getAttribute(e)!==t&&(this._attrs.set(e,t),this._attributePriority.set(e,o),!0)}_removeAttribute(e,t=!0){const s=t?"normal":"low";return("low"!=s||"normal"!=this._attributePriority.get(e))&&(this._attributePriority.set(e,s),!!super.hasAttribute(e)&&(this._attrs.delete(e),!0))}_setAttributesTo(e){const t=new Set;for(const[t,s]of this.getAttributes())e.get(t)!==s&&this._removeAttribute(t,!1);for(const[s,o]of e){this._setAttribute(s,o,!1)&&t.add(s)}return t}*getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const t of e.getAttributeKeys())if(t.startsWith(p)){const s=t.substr(p.length);yield[s,e.getAttribute(t)]}}_getSurroundingAttributes(){const e=this.getFirstPosition(),t=this._model.schema;let s=null;if(this.isCollapsed){const o=e.textNode?e.textNode:e.nodeBefore,i=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(s=m(o)),s||(s=m(i)),!this.isGravityOverridden&&!s){let e=o;for(;e&&!t.isInline(e)&&!s;)e=e.previousSibling,s=m(e)}if(!s){let e=i;for(;e&&!t.isInline(e)&&!s;)e=e.nextSibling,s=m(e)}s||(s=this.getStoredAttributes())}else{const e=this.getFirstRange();for(const o of e){if(o.item.is("element")&&t.isObject(o.item))break;if("text"==o.type){s=o.item.getAttributes();break}}}return s}_fixGraveyardSelection(e){const t=this._model.schema.getNearestSelectionRange(e);t&&this._pushRange(t)}}function m(e){return e instanceof a.Z||e instanceof n.Z?e.getAttributes():null}},"./packages/ckeditor5-engine/src/model/element.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/model/node.ts"),i=s("./packages/ckeditor5-engine/src/model/nodelist.ts"),r=s("./packages/ckeditor5-engine/src/model/text.ts"),n=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),a=s("./packages/ckeditor5-utils/src/isiterable.ts");class c extends o.Z{constructor(e,t,s){super(t),this.name=e,this._children=new i.Z,s&&this._insertChild(0,s)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}offsetToIndex(e){return this._children.offsetToIndex(e)}getNodeByPath(e){let t=this;for(const s of e)t=t.getChild(t.offsetToIndex(s));return t}findAncestor(e,t={}){let s=t.includeSelf?this:this.parent;for(;s;){if(s.name===e)return s;s=s.parent}return null}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const t of this._children)e.children.push(t.toJSON())}return e}_clone(e=!1){const t=e?Array.from(this._children).map((e=>e._clone(!0))):void 0;return new c(this.name,this.getAttributes(),t)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,t){const s=function(e){if("string"==typeof e)return[new r.Z(e)];(0,a.Z)(e)||(e=[e]);return Array.from(e).map((e=>"string"==typeof e?new r.Z(e):e instanceof n.Z?new r.Z(e.data,e.getAttributes()):e))}(t);for(const e of s)null!==e.parent&&e._remove(),e.parent=this;this._children._insertNodes(e,s)}_removeChildren(e,t=1){const s=this._children._removeNodes(e,t);for(const e of s)e.parent=null;return s}static fromJSON(e){let t;if(e.children){t=[];for(const s of e.children)s.name?t.push(c.fromJSON(s)):t.push(r.Z.fromJSON(s))}return new c(e.name,e.attributes,t)}}c.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"model:element"===e):"element"===e||"model:element"===e||"node"===e||"model:node"===e}},"./packages/ckeditor5-engine/src/model/history.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/index.ts");class i{constructor(){this._operations=[],this._undoPairs=new Map,this._undoneOperations=new Set,this._baseVersionToOperationIndex=new Map,this._version=0,this._gaps=new Map}get version(){return this._version}set version(e){this._operations.length&&e>this._version+1&&this._gaps.set(this._version,e),this._version=e}get lastOperation(){return this._operations[this._operations.length-1]}addOperation(e){if(e.baseVersion!==this.version)throw new o.Bb("model-document-history-addoperation-incorrect-version",this,{operation:e,historyVersion:this.version});this._operations.push(e),this._version++,this._baseVersionToOperationIndex.set(e.baseVersion,this._operations.length-1)}getOperations(e,t=this.version){if(!this._operations.length)return[];const s=this._operations[0];void 0===e&&(e=s.baseVersion);let o=t-1;for(const[t,s]of this._gaps)e>t&&et&&othis.lastOperation.baseVersion)return[];let i=this._baseVersionToOperationIndex.get(e);void 0===i&&(i=0);let r=this._baseVersionToOperationIndex.get(o);return void 0===r&&(r=this._operations.length-1),this._operations.slice(i,r+1)}getOperation(e){const t=this._baseVersionToOperationIndex.get(e);if(void 0!==t)return this._operations[t]}setOperationAsUndone(e,t){this._undoPairs.set(t,e),this._undoneOperations.add(e)}isUndoingOperation(e){return this._undoPairs.has(e)}isUndoneOperation(e){return this._undoneOperations.has(e)}getUndoneOperation(e){return this._undoPairs.get(e)}reset(){this._version=0,this._undoPairs=new Map,this._operations=[],this._undoneOperations=new Set,this._gaps=new Map,this._baseVersionToOperationIndex=new Map}}},"./packages/ckeditor5-engine/src/model/liveposition.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/model/position.ts"),i=s("./packages/ckeditor5-utils/src/emittermixin.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends((0,i.ZP)(o.ZP)){constructor(e,t,s="toNone"){if(super(e,t,s),!this.root.is("rootElement"))throw new r.ZP("model-liveposition-root-not-rootelement",e);a.call(this)}detach(){this.stopListening()}toPosition(){return new o.ZP(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,t){return new this(e.root,e.path.slice(),t||e.stickiness)}}function a(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&c.call(this,s)}),{priority:"low"})}function c(e){const t=this.getTransformedByOperation(e);if(!this.isEqual(t)){const e=this.toPosition();this.path=t.path,this.root=t.root,this.fire("change",e)}}n.prototype.is=function(e){return"livePosition"===e||"model:livePosition"===e||"position"==e||"model:position"===e}},"./packages/ckeditor5-engine/src/model/liverange.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/range.ts"),i=s("./packages/ckeditor5-utils/src/emittermixin.ts");class r extends((0,i.ZP)(o.Z)){constructor(e,t){super(e,t),n.call(this)}detach(){this.stopListening()}toRange(){return new o.Z(this.start,this.end)}static fromRange(e){return new r(e.start,e.end)}}function n(){this.listenTo(this.root.document.model,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&a.call(this,s)}),{priority:"low"})}function a(e){const t=this.getTransformedByOperation(e),s=o.Z._createFromRanges(t),i=!s.isEqual(this),r=function(e,t){switch(t.type){case"insert":return e.containsPosition(t.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(t.sourcePosition)||e.start.isEqual(t.sourcePosition)||e.containsPosition(t.targetPosition);case"split":return e.containsPosition(t.splitPosition)||e.containsPosition(t.insertionPosition)}return!1}(this,e);let n=null;if(i){"$graveyard"==s.root.rootName&&(n="remove"==e.type?e.sourcePosition:e.deletionPosition);const t=this.toRange();this.start=s.start,this.end=s.end,this.fire("change:range",t,{deletionPosition:n})}else r&&this.fire("change:content",this.toRange(),{deletionPosition:n})}r.prototype.is=function(e){return"liveRange"===e||"model:liveRange"===e||"range"==e||"model:range"===e}},"./packages/ckeditor5-engine/src/model/model.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>ye});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class i{constructor(e={}){"string"==typeof e&&(e="transparent"===e?{isUndoable:!1}:{},(0,o.KE)("batch-constructor-deprecated-string-type"));const{isUndoable:t=!0,isLocal:s=!0,isUndo:i=!1,isTyping:r=!1}=e;this.operations=[],this.isUndoable=t,this.isLocal=s,this.isUndo=i,this.isTyping=r}get type(){return(0,o.KE)("batch-type-deprecated"),"default"}get baseVersion(){for(const e of this.operations)if(null!==e.baseVersion)return e.baseVersion;return null}addOperation(e){return e.batch=this,this.operations.push(e),e}}var r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts");class a{constructor(e){this._markerCollection=e,this._changesInElement=new Map,this._elementSnapshots=new Map,this._changedMarkers=new Map,this._changeCount=0,this._cachedChanges=null,this._cachedChangesWithGraveyard=null,this._refreshedItems=new Set}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}bufferOperation(e){const t=e;switch(t.type){case"insert":if(this._isInInsertedElement(t.position.parent))return;this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const e of t.range.getItems({shallow:!0}))this._isInInsertedElement(e.parent)||this._markAttribute(e);break;case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition))return;const e=this._isInInsertedElement(t.sourcePosition.parent),s=this._isInInsertedElement(t.targetPosition.parent);e||this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany),s||this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany);break}case"rename":{if(this._isInInsertedElement(t.position.parent))return;this._markRemove(t.position.parent,t.position.offset,1),this._markInsert(t.position.parent,t.position.offset,1);const e=n.Z._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getData();this.bufferMarkerChange(t.name,e,e)}break}case"split":{const e=t.splitPosition.parent;this._isInInsertedElement(e)||this._markRemove(e,t.splitPosition.offset,t.howMany),this._isInInsertedElement(t.insertionPosition.parent)||this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1),t.graveyardPosition&&this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1);break}case"merge":{const e=t.sourcePosition.parent;this._isInInsertedElement(e.parent)||this._markRemove(e.parent,e.startOffset,1);const s=t.graveyardPosition.parent;this._markInsert(s,t.graveyardPosition.offset,1);const o=t.targetPosition.parent;this._isInInsertedElement(o)||this._markInsert(o,t.targetPosition.offset,e.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,t,s){const o=this._changedMarkers.get(e);o?(o.newMarkerData=s,null==o.oldMarkerData.range&&null==s.range&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{newMarkerData:s,oldMarkerData:t})}getMarkersToRemove(){const e=[];for(const[t,s]of this._changedMarkers)null!=s.oldMarkerData.range&&e.push({name:t,range:s.oldMarkerData.range});return e}getMarkersToAdd(){const e=[];for(const[t,s]of this._changedMarkers)null!=s.newMarkerData.range&&e.push({name:t,range:s.newMarkerData.range});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map((([e,t])=>({name:e,data:{oldRange:t.oldMarkerData.range,newRange:t.newMarkerData.range}})))}hasDataChanges(){if(this._changesInElement.size>0)return!0;for(const{newMarkerData:e,oldMarkerData:t}of this._changedMarkers.values()){if(e.affectsData!==t.affectsData)return!0;if(e.affectsData){const s=e.range&&!t.range,o=!e.range&&t.range,i=e.range&&t.range&&!e.range.isEqual(t.range);if(s||o||i)return!0}}return!1}getChanges(e={}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();let t=[];for(const e of this._changesInElement.keys()){const s=this._changesInElement.get(e).sort(((e,t)=>e.offset===t.offset?e.type!=t.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=t.position.root?e.position.root.rootNamee));for(const e of t)delete e.changeCount,"attribute"==e.type&&(delete e.position,delete e.length);return this._changeCount=0,this._cachedChangesWithGraveyard=t,this._cachedChanges=t.filter(d),e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice()}getRefreshedItems(){return new Set(this._refreshedItems)}reset(){this._changesInElement.clear(),this._elementSnapshots.clear(),this._changedMarkers.clear(),this._refreshedItems=new Set,this._cachedChanges=null}_refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize),this._refreshedItems.add(e);const t=n.Z._createOn(e);for(const e of this._markerCollection.getMarkersIntersectingRange(t)){const t=e.getData();this.bufferMarkerChange(e.name,t,t)}this._cachedChanges=null}_markInsert(e,t,s){const o={type:"insert",offset:t,howMany:s,count:this._changeCount++};this._markChange(e,o)}_markRemove(e,t,s){const o={type:"remove",offset:t,howMany:s,count:this._changeCount++};this._markChange(e,o),this._removeAllNestedChanges(e,t,s)}_markAttribute(e){const t={type:"attribute",offset:e.startOffset,howMany:e.offsetSize,count:this._changeCount++};this._markChange(e.parent,t)}_markChange(e,t){this._makeSnapshot(e);const s=this._getChangesForElement(e);this._handleChange(t,s),s.push(t);for(let e=0;es.offset){if(o>i){const e={type:"attribute",offset:i,howMany:o-i,count:this._changeCount++};this._handleChange(e,t),t.push(e)}e.nodesToHandle=s.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=s.offset&&e.offseti?(e.nodesToHandle=o-i,e.offset=i):e.nodesToHandle=0);if("remove"==s.type&&e.offsets.offset){const i={type:"attribute",offset:s.offset,howMany:o-s.offset,count:this._changeCount++};this._handleChange(i,t),t.push(i),e.nodesToHandle=s.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==s.type&&(e.offset>=s.offset&&o<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=s.offset&&o>=i&&(s.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,t,s){return{type:"insert",position:r.ZP._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,t,s){return{type:"remove",position:r.ZP._createAt(e,t),name:s.name,attributes:new Map(s.attributes),length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,t,s){const o=[];s=new Map(s);for(const[i,r]of t){const t=s.has(i)?s.get(i):null;t!==r&&o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:r,attributeNewValue:t,changeCount:this._changeCount++}),s.delete(i)}for(const[t,i]of s)o.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:t,attributeOldValue:null,attributeNewValue:i,changeCount:this._changeCount++});return o}_isInInsertedElement(e){const t=e.parent;if(!t)return!1;const s=this._changesInElement.get(t),o=e.startOffset;if(s)for(const e of s)if("insert"==e.type&&o>=e.offset&&oo){for(let t=0;te.source)).join("|")+")";return new RegExp(`${e}|${t}(?:‍${t})*`,"ug")}();function w(e,t){const s=String(e).matchAll(_);return Array.from(s).some((e=>e.index{const s=t[0];s.isDocumentOperation&&this.differ.bufferOperation(s)}),{priority:"high"}),this.listenTo(e,"applyOperation",((e,t)=>{const s=t[0];s.isDocumentOperation&&this.history.addOperation(s)}),{priority:"low"}),this.listenTo(this.selection,"change",(()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0})),this.listenTo(e.markers,"update",((e,t,s,o,i)=>{const r={...t.getData(),range:o};this.differ.bufferMarkerChange(t.name,i,r),null===s&&t.on("change",((e,s)=>{const o=t.getData();this.differ.bufferMarkerChange(t.name,{...o,range:s},o)}))}))}get version(){return this.history.version}set version(e){this.history.version=e}get graveyard(){return this.getRoot(y)}createRoot(e="$root",t="main"){if(this.roots.get(t))throw new o.ZP("model-document-createroot-name-exists",this,{name:t});const s=new g(this,e,t);return this.roots.add(s),s}destroy(){this.selection.destroy(),this.stopListening()}getRoot(e="main"){return this.roots.get(e)}getRootNames(){return Array.from(this.roots,(e=>e.rootName)).filter((e=>e!=y))}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=(0,v.Z)(this);return e.selection="[engine.model.DocumentSelection]",e.model="[engine.model.Model]",e}_handleChangeBlock(e){this._hasDocumentChangedFromTheLastChangeBlock()&&(this._callPostFixers(e),this.selection.refresh(),this.differ.hasDataChanges()?this.fire("change:data",e.batch):this.fire("change",e.batch),this.selection.refresh(),this.differ.reset()),this._hasSelectionChangedFromTheLastChangeBlock=!1}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const e of this.roots)if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=this.model,s=t.schema,o=t.createPositionFromPath(e,[0]);return s.getNearestSelectionRange(o)||t.createRange(o)}_validateSelectionRange(e){return P(e.start)&&P(e.end)}_callPostFixers(e){let t=!1;do{for(const s of this._postFixers)if(this.selection.refresh(),t=s(e),t)break}while(t)}}function P(e){const t=e.textNode;if(t){const s=t.data,o=e.offset-t.startOffset;return!k(s,o)&&!b(s,o)}return!0}var x=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),T=s("./packages/ckeditor5-engine/src/model/liverange.ts");class A extends m.Q5{constructor(){super(),this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){const t=e instanceof C?e.name:e;return this._markers.has(t)}get(e){return this._markers.get(e)||null}_set(e,t,s=!1,i=!1){const r=e instanceof C?e.name:e;if(r.includes(","))throw new o.ZP("markercollection-incorrect-marker-name",this);const n=this._markers.get(r);if(n){const e=n.getData(),o=n.getRange();let a=!1;return o.isEqual(t)||(n._attachLiveRange(T.Z.fromRange(t)),a=!0),s!=n.managedUsingOperations&&(n._managedUsingOperations=s,a=!0),"boolean"==typeof i&&i!=n.affectsData&&(n._affectsData=i,a=!0),a&&this.fire(`update:${r}`,n,o,t,e),n}const a=T.Z.fromRange(t),c=new C(r,a,s,i);return this._markers.set(r,c),this.fire(`update:${r}`,c,null,t,{...c.getData(),range:null}),c}_remove(e){const t=e instanceof C?e.name:e,s=this._markers.get(t);return!!s&&(this._markers.delete(t),this.fire(`update:${t}`,s,s.getRange(),null,s.getData()),this._destroyMarker(s),!0)}_refresh(e){const t=e instanceof C?e.name:e,s=this._markers.get(t);if(!s)throw new o.ZP("markercollection-refresh-marker-not-exists",this);const i=s.getRange();this.fire(`update:${t}`,s,i,i,s.getData())}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}*getMarkersIntersectingRange(e){for(const t of this)null!==t.getRange().getIntersection(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+":")&&(yield t)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}class C extends((0,m.ZP)(x.Z)){constructor(e,t,s,o){super(),this.name=e,this._liveRange=this._attachLiveRange(t),this._managedUsingOperations=s,this._affectsData=o}get managedUsingOperations(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._affectsData}getData(){return{range:this.getRange(),affectsData:this.affectsData,managedUsingOperations:this.managedUsingOperations}}getStart(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new o.ZP("marker-destroyed",this);return this._liveRange.toRange()}_attachLiveRange(e){return this._liveRange&&this._detachLiveRange(),e.delegate("change:range").to(this),e.delegate("change:content").to(this),this._liveRange=e,e}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this),this._liveRange.stopDelegating("change:content",this),this._liveRange.detach(),this._liveRange=null}}C.prototype.is=function(e){return"marker"===e||"model:marker"===e};var E=s("./packages/ckeditor5-engine/src/model/selection.ts"),S=s("./packages/ckeditor5-engine/src/model/operation/operationfactory.ts"),O=s("./packages/ckeditor5-engine/src/model/schema.ts"),R=s("./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts"),j=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),M=s("./packages/ckeditor5-engine/src/model/operation/utils.ts");class N extends j.Z{constructor(e,t){super(null),this.sourcePosition=e.clone(),this.howMany=t}get type(){return"detach"}toJSON(){const e=super.toJSON();return e.sourcePosition=this.sourcePosition.toJSON(),e}_validate(){if(this.sourcePosition.root.document)throw new o.ZP("detach-operation-on-document-node",this)}_execute(){(0,M.X9)(n.Z._createFromPositionAndShift(this.sourcePosition,this.howMany))}static get className(){return"DetachOperation"}}var V=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),I=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),D=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts"),z=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),B=s("./packages/ckeditor5-engine/src/model/operation/renameoperation.ts"),F=s("./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts"),L=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),W=s("./packages/ckeditor5-engine/src/model/documentfragment.ts"),$=s("./packages/ckeditor5-engine/src/model/text.ts"),H=s("./packages/ckeditor5-utils/src/tomap.ts");class q{constructor(e,t){this.model=e,this.batch=t}createText(e,t){return new $.Z(e,t)}createElement(e,t){return new p.Z(e,t)}createDocumentFragment(){return new W.Z}cloneElement(e,t=!0){return e._clone(t)}insert(e,t,s=0){if(this._assertWriterUsedCorrectly(),e instanceof $.Z&&""==e.data)return;const i=r.ZP._createAt(t,s);if(e.parent){if(Q(e.root,i.root))return void this.move(n.Z._createOn(e),i);if(e.root.document)throw new o.ZP("model-writer-insert-forbidden-move",this);this.remove(e)}const a=i.root.document?i.root.document.version:null,c=new V.Z(i,e,a);if(e instanceof $.Z&&(c.shouldReceiveAttributes=!0),this.batch.addOperation(c),this.model.applyOperation(c),e instanceof W.Z)for(const[t,s]of e.markers){const e=r.ZP._createAt(s.root,0),o={range:new n.Z(s.start._getCombined(e,i),s.end._getCombined(e,i)),usingOperation:!0,affectsData:!0};this.model.markers.has(t)?this.updateMarker(t,o):this.addMarker(t,o)}}insertText(e,t,s,o){t instanceof W.Z||t instanceof p.Z||t instanceof r.ZP?this.insert(this.createText(e),t,s):this.insert(this.createText(e,t),s,o)}insertElement(e,t,s,o){t instanceof W.Z||t instanceof p.Z||t instanceof r.ZP?this.insert(this.createElement(e),t,s):this.insert(this.createElement(e,t),s,o)}append(e,t){this.insert(e,t,"end")}appendText(e,t,s){t instanceof W.Z||t instanceof p.Z?this.insert(this.createText(e),t,"end"):this.insert(this.createText(e,t),s,"end")}appendElement(e,t,s){t instanceof W.Z||t instanceof p.Z?this.insert(this.createElement(e),t,"end"):this.insert(this.createElement(e,t),s,"end")}setAttribute(e,t,s){if(this._assertWriterUsedCorrectly(),s instanceof n.Z){const o=s.getMinimalFlatRanges();for(const s of o)U(this,e,t,s)}else K(this,e,t,s)}setAttributes(e,t){for(const[s,o]of(0,H.Z)(e))this.setAttribute(s,o,t)}removeAttribute(e,t){if(this._assertWriterUsedCorrectly(),t instanceof n.Z){const s=t.getMinimalFlatRanges();for(const t of s)U(this,e,null,t)}else K(this,e,null,t)}clearAttributes(e){this._assertWriterUsedCorrectly();const t=e=>{for(const t of e.getAttributeKeys())this.removeAttribute(t,e)};if(e instanceof n.Z)for(const s of e.getItems())t(s);else t(e)}move(e,t,s){if(this._assertWriterUsedCorrectly(),!(e instanceof n.Z))throw new o.ZP("writer-move-invalid-range",this);if(!e.isFlat)throw new o.ZP("writer-move-range-not-flat",this);const i=r.ZP._createAt(t,s);if(i.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!Q(e.root,i.root))throw new o.ZP("writer-move-different-document",this);const a=e.root.document?e.root.document.version:null,c=new z.Z(e.start,e.end.offset-e.start.offset,i,a);this.batch.addOperation(c),this.model.applyOperation(c)}remove(e){this._assertWriterUsedCorrectly();const t=(e instanceof n.Z?e:n.Z._createOn(e)).getMinimalFlatRanges().reverse();for(const e of t)this._addOperationForAffectedMarkers("move",e),J(e.start,e.end.offset-e.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const t=e.nodeBefore,s=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(t instanceof p.Z))throw new o.ZP("writer-merge-no-element-before",this);if(!(s instanceof p.Z))throw new o.ZP("writer-merge-no-element-after",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,t,s){return this.model.createPositionFromPath(e,t,s)}createPositionAt(e,t){return this.model.createPositionAt(e,t)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,t){return this.model.createRange(e,t)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(...e){return this.model.createSelection(...e)}_mergeDetached(e){const t=e.nodeBefore,s=e.nodeAfter;this.move(n.Z._createIn(s),r.ZP._createAt(t,"end")),this.remove(s)}_merge(e){const t=r.ZP._createAt(e.nodeBefore,"end"),s=r.ZP._createAt(e.nodeAfter,0),o=e.root.document.graveyard,i=new r.ZP(o,[0]),n=e.root.document.version,a=new D.Z(s,e.nodeAfter.maxOffset,t,i,n);this.batch.addOperation(a),this.model.applyOperation(a)}rename(e,t){if(this._assertWriterUsedCorrectly(),!(e instanceof p.Z))throw new o.ZP("writer-rename-not-element-instance",this);const s=e.root.document?e.root.document.version:null,i=new B.Z(r.ZP._createBefore(e),e.name,t,s);this.batch.addOperation(i),this.model.applyOperation(i)}split(e,t){this._assertWriterUsedCorrectly();let s,i,a=e.parent;if(!a.parent)throw new o.ZP("writer-split-element-no-parent",this);if(t||(t=a.parent),!e.parent.getAncestors({includeSelf:!0}).includes(t))throw new o.ZP("writer-split-invalid-limit-element",this);do{const t=a.root.document?a.root.document.version:null,o=a.maxOffset-e.offset,r=L.Z.getInsertionPosition(e),n=new L.Z(e,o,r,null,t);this.batch.addOperation(n),this.model.applyOperation(n),s||i||(s=a,i=e.parent.nextSibling),a=(e=this.createPositionAfter(e.parent)).parent}while(a!==t);return{position:e,range:new n.Z(r.ZP._createAt(s,"end"),r.ZP._createAt(i,0))}}wrap(e,t){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new o.ZP("writer-wrap-range-not-flat",this);const s=t instanceof p.Z?t:new p.Z(t);if(s.childCount>0)throw new o.ZP("writer-wrap-element-not-empty",this);if(null!==s.parent)throw new o.ZP("writer-wrap-element-attached",this);this.insert(s,e.start);const i=new n.Z(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(i,r.ZP._createAt(s,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new o.ZP("writer-unwrap-element-no-parent",this);this.move(n.Z._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,t){if(this._assertWriterUsedCorrectly(),!t||"boolean"!=typeof t.usingOperation)throw new o.ZP("writer-addmarker-no-usingoperation",this);const s=t.usingOperation,i=t.range,r=void 0!==t.affectsData&&t.affectsData;if(this.model.markers.has(e))throw new o.ZP("writer-addmarker-marker-exists",this);if(!i)throw new o.ZP("writer-addmarker-no-range",this);return s?(G(this,e,null,i,r),this.model.markers.get(e)):this.model.markers._set(e,i,s,r)}updateMarker(e,t){this._assertWriterUsedCorrectly();const s="string"==typeof e?e:e.name,i=this.model.markers.get(s);if(!i)throw new o.ZP("writer-updatemarker-marker-not-exists",this);if(!t)return(0,o.KE)("writer-updatemarker-reconvert-using-editingcontroller",{markerName:s}),void this.model.markers._refresh(i);const r="boolean"==typeof t.usingOperation,n="boolean"==typeof t.affectsData,a=n?t.affectsData:i.affectsData;if(!r&&!t.range&&!n)throw new o.ZP("writer-updatemarker-wrong-options",this);const c=i.getRange(),l=t.range?t.range:c;r&&t.usingOperation!==i.managedUsingOperations?t.usingOperation?G(this,s,null,l,a):(G(this,s,c,null,a),this.model.markers._set(s,l,void 0,a)):i.managedUsingOperations?G(this,s,c,l,a):this.model.markers._set(s,l,void 0,a)}removeMarker(e){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name;if(!this.model.markers.has(t))throw new o.ZP("writer-removemarker-no-marker",this);const s=this.model.markers.get(t);if(!s.managedUsingOperations)return void this.model.markers._remove(t);G(this,t,s.getRange(),null,s.affectsData)}setSelection(...e){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(...e)}setSelectionFocus(e,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,t)}setSelectionAttribute(e,t){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,t);else for(const[t,s]of(0,H.Z)(e))this._setSelectionAttribute(t,s)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const t of e)this._removeSelectionAttribute(t)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,t){const s=this.model.document.selection;if(s.isCollapsed&&s.anchor.parent.isEmpty){const o=h.Z._getStoreAttributeKey(e);this.setAttribute(o,t,s.anchor.parent)}s._setAttribute(e,t)}_removeSelectionAttribute(e){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const s=h.Z._getStoreAttributeKey(e);this.removeAttribute(s,t.anchor.parent)}t._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new o.ZP("writer-incorrect-use",this)}_addOperationForAffectedMarkers(e,t){for(const s of this.model.markers){if(!s.managedUsingOperations)continue;const o=s.getRange();let i=!1;if("move"===e){const e=t;i=e.containsPosition(o.start)||e.start.isEqual(o.start)||e.containsPosition(o.end)||e.end.isEqual(o.end)}else{const e=t,s=e.nodeBefore,r=e.nodeAfter,n=o.start.parent==s&&o.start.isAtEnd,a=o.end.parent==r&&0==o.end.offset,c=o.end.nodeAfter==r,l=o.start.nodeAfter==r;i=n||a||c||l}i&&this.updateMarker(s.name,{range:o})}}}function U(e,t,s,o){const i=e.model,a=i.document;let c,l,d,h=o.start;for(const e of o.getWalker({shallow:!0}))d=e.item.getAttribute(t),c&&l!=d&&(l!=s&&u(),h=c),c=e.nextPosition,l=d;function u(){const o=new n.Z(h,c),r=o.root.document?a.version:null,d=new R.Z(o,t,l,s,r);e.batch.addOperation(d),i.applyOperation(d)}c instanceof r.ZP&&c!=h&&l!=s&&u()}function K(e,t,s,o){const i=e.model,a=i.document,c=o.getAttribute(t);let l,d;if(c!=s){if(o.root===o){const e=o.document?a.version:null;d=new F.Z(o,t,c,s,e)}else{l=new n.Z(r.ZP._createBefore(o),e.createPositionAfter(o));const i=l.root.document?a.version:null;d=new R.Z(l,t,c,s,i)}e.batch.addOperation(d),i.applyOperation(d)}}function G(e,t,s,o,i){const r=e.model,n=r.document,a=new I.Z(t,s,o,r.markers,!!i,n.version);e.batch.addOperation(a),r.applyOperation(a)}function J(e,t,s,o){let i;if(e.root.document){const s=o.document,n=new r.ZP(s.graveyard,[0]);i=new z.Z(e,t,n,s.version)}else i=new N(e,t);s.addOperation(i),o.applyOperation(i)}function Q(e,t){return e===t||e instanceof g&&t instanceof g}var X=s("./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts");function Y(e){e.document.registerPostFixer((t=>function(e,t){const s=t.document.selection,o=t.schema,i=[];let r=!1;for(const e of s.getRanges()){const t=ee(e,o);t&&!t.isEqual(e)?(i.push(t),r=!0):i.push(e)}r&&e.setSelection(function(e){const t=[...e],s=new Set;let o=1;for(;o!s.has(t)))}(i),{backward:s.isBackward});return!1}(t,e)))}function ee(e,t){return e.isCollapsed?function(e,t){const s=e.start,o=t.getNearestSelectionRange(s);if(!o){const e=s.getAncestors().reverse().find((e=>t.isObject(e)));return e?n.Z._createOn(e):null}if(!o.isCollapsed)return o;const i=o.start;if(s.isEqual(i))return null;return new n.Z(i)}(e,t):function(e,t){const{start:s,end:o}=e,i=t.checkChild(s,"$text"),a=t.checkChild(o,"$text"),c=t.getLimitElement(s),l=t.getLimitElement(o);if(c===l){if(i&&a)return null;if(function(e,t,s){const o=e.nodeAfter&&!s.isLimit(e.nodeAfter)||s.checkChild(e,"$text"),i=t.nodeBefore&&!s.isLimit(t.nodeBefore)||s.checkChild(t,"$text");return o||i}(s,o,t)){const e=s.nodeAfter&&t.isSelectable(s.nodeAfter)?null:t.getNearestSelectionRange(s,"forward"),i=o.nodeBefore&&t.isSelectable(o.nodeBefore)?null:t.getNearestSelectionRange(o,"backward"),r=e?e.start:s,a=i?i.end:o;return new n.Z(r,a)}}const d=c&&!c.is("rootElement"),h=l&&!l.is("rootElement");if(d||h){const e=s.nodeAfter&&o.nodeBefore&&s.nodeAfter.parent===o.nodeBefore.parent,i=d&&(!e||!se(s.nodeAfter,t)),a=h&&(!e||!se(o.nodeBefore,t));let u=s,p=o;return i&&(u=r.ZP._createBefore(te(c,t))),a&&(p=r.ZP._createAfter(te(l,t))),new n.Z(u,p)}return null}(e,t)}function te(e,t){let s=e,o=s;for(;t.isLimit(o)&&o.parent;)s=o,o=o.parent;return s}function se(e,t){return e&&t.isSelectable(e)}var oe=s("./packages/ckeditor5-engine/src/model/liveposition.ts");function ie(e,t,s={}){if(t.isCollapsed)return;const o=t.getFirstRange();if("$graveyard"==o.root.rootName)return;const i=e.schema;e.change((e=>{if(!s.doNotResetEntireContent&&function(e,t){const s=e.getLimitElement(t);if(!t.containsEntireContent(s))return!1;const o=t.getFirstRange();if(o.start.parent==o.end.parent)return!1;return e.checkChild(s,"paragraph")}(i,t))return void function(e,t){const s=e.model.schema.getLimitElement(t);e.remove(e.createRangeIn(s)),ce(e,e.createPositionAt(s,0),t)}(e,t);const r={};if(!s.doNotAutoparagraph){const e=t.getSelectedElement();e&&Object.assign(r,i.getAttributesWithProperty(e,"copyOnReplace",!0))}const[n,a]=function(e){const t=e.root.document.model,s=e.start;let o=e.end;if(t.hasContent(e,{ignoreMarkers:!0})){const s=function(e){const t=e.parent,s=t.root.document.model.schema,o=t.getAncestors({parentFirst:!0,includeSelf:!0});for(const e of o){if(s.isLimit(e))return null;if(s.isBlock(e))return e}}(o);if(s&&o.isTouching(t.createPositionAt(s,0))){const s=t.createSelection(e);t.modifySelection(s,{direction:"backward"});const i=s.getLastPosition(),r=t.createRange(i,o);t.hasContent(r,{ignoreMarkers:!0})||(o=i)}}return[oe.Z.fromPosition(s,"toPrevious"),oe.Z.fromPosition(o,"toNext")]}(o);n.isTouching(a)||e.remove(e.createRange(n,a)),s.leaveUnmerged||(!function(e,t,s){const o=e.model;if(!ae(e.model.schema,t,s))return;const[i,r]=function(e,t){const s=e.getAncestors(),o=t.getAncestors();let i=0;for(;s[i]&&s[i]==o[i];)i++;return[s[i],o[i]]}(t,s);if(!i||!r)return;!o.hasContent(i,{ignoreMarkers:!0})&&o.hasContent(r,{ignoreMarkers:!0})?ne(e,t,s,i.parent):re(e,t,s,i.parent)}(e,n,a),i.removeDisallowedAttributes(n.parent.getChildren(),e)),le(e,t,n),!s.doNotAutoparagraph&&function(e,t){const s=e.checkChild(t,"$text"),o=e.checkChild(t,"paragraph");return!s&&o}(i,n)&&ce(e,n,t,r),n.detach(),a.detach()}))}function re(e,t,s,o){const i=t.parent,r=s.parent;if(i!=o&&r!=o){for(t=e.createPositionAfter(i),(s=e.createPositionBefore(r)).isEqual(t)||e.insert(r,t),e.merge(t);s.parent.isEmpty;){const t=s.parent;s=e.createPositionBefore(t),e.remove(t)}ae(e.model.schema,t,s)&&re(e,t,s,o)}}function ne(e,t,s,o){const i=t.parent,r=s.parent;if(i!=o&&r!=o){for(t=e.createPositionAfter(i),(s=e.createPositionBefore(r)).isEqual(t)||e.insert(i,s);t.parent.isEmpty;){const s=t.parent;t=e.createPositionBefore(s),e.remove(s)}s=e.createPositionBefore(r),function(e,t){const s=t.nodeBefore,o=t.nodeAfter;s.name!=o.name&&e.rename(s,o.name);e.clearAttributes(s),e.setAttributes(Object.fromEntries(o.getAttributes()),s),e.merge(t)}(e,s),ae(e.model.schema,t,s)&&ne(e,t,s,o)}}function ae(e,t,s){const o=t.parent,i=s.parent;return o!=i&&(!e.isLimit(o)&&!e.isLimit(i)&&function(e,t,s){const o=new n.Z(e,t);for(const e of o.getWalker())if(s.isLimit(e.item))return!1;return!0}(t,s,e))}function ce(e,t,s,o={}){const i=e.createElement("paragraph");e.model.schema.setAllowedAttributes(i,o,e),e.insert(i,t),le(e,s,e.createPositionAt(i,0))}function le(e,t,s){t instanceof h.Z?e.setSelection(s):t.setTo(s)}function de(e,t){const s=[];Array.from(e.getItems({direction:"backward"})).map((e=>t.createRangeOn(e))).filter((t=>(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end)))).forEach((e=>{s.push(e.start.parent),t.remove(e)})),s.forEach((e=>{let s=e;for(;s.parent&&s.isEmpty;){const e=t.createRangeOn(s);s=s.parent,t.remove(e)}}))}var he=s("./packages/ckeditor5-engine/src/index.ts");class ue{constructor(e,t,s){this.model=e,this.writer=t,this.position=s,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._documentFragment=t.createDocumentFragment(),this._documentFragmentPosition=t.createPositionAt(this._documentFragment,0),this._firstNode=null,this._lastNode=null,this._lastAutoParagraph=null,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e){for(const t of Array.from(e))this._handleNode(t);this._insertPartialFragment(),this._lastAutoParagraph&&this._updateLastNodeFromAutoParagraph(this._lastAutoParagraph),this._mergeOnRight(),this.schema.removeDisallowedAttributes(this._filterAttributesOf,this.writer),this._filterAttributesOf=[]}_updateLastNodeFromAutoParagraph(e){const t=this.writer.createPositionAfter(this._lastNode),s=this.writer.createPositionAfter(e);if(s.isAfter(t)){if(this._lastNode=e,this.position.parent!=e||!this.position.isAtEnd)throw new o.ZP("insertcontent-invalid-insertion-position",this);this.position=s,this._setAffectedBoundaries(this.position)}}getSelectionRange(){return this._nodeToSelect?n.Z._createOn(this._nodeToSelect):this.model.schema.getNearestSelectionRange(this.position)}getAffectedRange(){return this._affectedStart?new n.Z(this._affectedStart,this._affectedEnd):null}destroy(){this._affectedStart&&this._affectedStart.detach(),this._affectedEnd&&this._affectedEnd.detach()}_handleNode(e){if(this.schema.isObject(e))return void this._handleObject(e);let t=this._checkAndAutoParagraphToAllowedPosition(e);t||(t=this._checkAndSplitToAllowedPosition(e),t)?(this._appendToFragment(e),this._firstNode||(this._firstNode=e),this._lastNode=e):this._handleDisallowedNode(e)}_insertPartialFragment(){if(this._documentFragment.isEmpty)return;const e=oe.Z.fromPosition(this.position,"toNext");this._setAffectedBoundaries(this.position),this._documentFragment.getChild(0)==this._firstNode&&(this.writer.insert(this._firstNode,this.position),this._mergeOnLeft(),this.position=e.toPosition()),this._documentFragment.isEmpty||this.writer.insert(this._documentFragment,this.position),this._documentFragmentPosition=this.writer.createPositionAt(this._documentFragment,0),this.position=e.toPosition(),e.detach()}_handleObject(e){this._checkAndSplitToAllowedPosition(e)?this._appendToFragment(e):this._tryAutoparagraphing(e)}_handleDisallowedNode(e){e.is("element")?this.handleNodes(e.getChildren()):this._tryAutoparagraphing(e)}_appendToFragment(e){if(!this.schema.checkChild(this.position,e))throw new o.ZP("insertcontent-wrong-position",this,{node:e,position:this.position});this.writer.insert(e,this._documentFragmentPosition),this._documentFragmentPosition=this._documentFragmentPosition.getShiftedBy(e.offsetSize),this.schema.isObject(e)&&!this.schema.checkChild(this.position,"$text")?this._nodeToSelect=e:this._nodeToSelect=null,this._filterAttributesOf.push(e)}_setAffectedBoundaries(e){this._affectedStart||(this._affectedStart=oe.Z.fromPosition(e,"toPrevious")),this._affectedEnd&&!this._affectedEnd.isBefore(e)||(this._affectedEnd&&this._affectedEnd.detach(),this._affectedEnd=oe.Z.fromPosition(e,"toNext"))}_mergeOnLeft(){const e=this._firstNode;if(!(e instanceof p.Z))return;if(!this._canMergeLeft(e))return;const t=oe.Z._createBefore(e);t.stickiness="toNext";const s=oe.Z.fromPosition(this.position,"toNext");this._affectedStart.isEqual(t)&&(this._affectedStart.detach(),this._affectedStart=oe.Z._createAt(t.nodeBefore,"end","toPrevious")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.isEqual(this._affectedEnd)&&this._firstNode===this._lastNode&&(this._affectedEnd.detach(),this._affectedEnd=oe.Z._createAt(t.nodeBefore,"end","toNext")),this.position=s.toPosition(),s.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_mergeOnRight(){const e=this._lastNode;if(!(e instanceof p.Z))return;if(!this._canMergeRight(e))return;const t=oe.Z._createAfter(e);if(t.stickiness="toNext",!this.position.isEqual(t))throw new o.ZP("insertcontent-invalid-insertion-position",this);this.position=r.ZP._createAt(t.nodeBefore,"end");const s=oe.Z.fromPosition(this.position,"toPrevious");this._affectedEnd.isEqual(t)&&(this._affectedEnd.detach(),this._affectedEnd=oe.Z._createAt(t.nodeBefore,"end","toNext")),this._firstNode===this._lastNode&&(this._firstNode=t.nodeBefore,this._lastNode=t.nodeBefore),this.writer.merge(t),t.getShiftedBy(-1).isEqual(this._affectedStart)&&this._firstNode===this._lastNode&&(this._affectedStart.detach(),this._affectedStart=oe.Z._createAt(t.nodeBefore,0,"toPrevious")),this.position=s.toPosition(),s.detach(),this._filterAttributesOf.push(this.position.parent),t.detach()}_canMergeLeft(e){const t=e.previousSibling;return t instanceof p.Z&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(t,e)}_canMergeRight(e){const t=e.nextSibling;return t instanceof p.Z&&this.canMergeWith.has(t)&&this.model.schema.checkMerge(e,t)}_tryAutoparagraphing(e){const t=this.writer.createElement("paragraph");this._getAllowedIn(this.position.parent,t)&&this.schema.checkChild(t,e)&&(t._appendChild(e),this._handleNode(t))}_checkAndAutoParagraphToAllowedPosition(e){if(this.schema.checkChild(this.position.parent,e))return!0;if(!this.schema.checkChild(this.position.parent,"paragraph")||!this.schema.checkChild("paragraph",e))return!1;this._insertPartialFragment();const t=this.writer.createElement("paragraph");return this.writer.insert(t,this.position),this._setAffectedBoundaries(this.position),this._lastAutoParagraph=t,this.position=this.writer.createPositionAt(t,0),!0}_checkAndSplitToAllowedPosition(e){const t=this._getAllowedIn(this.position.parent,e);if(!t)return!1;for(t!=this.position.parent&&this._insertPartialFragment();t!=this.position.parent;)if(this.position.isAtStart){const e=this.position.parent;this.position=this.writer.createPositionBefore(e),e.isEmpty&&e.parent===t&&this.writer.remove(e)}else if(this.position.isAtEnd)this.position=this.writer.createPositionAfter(this.position.parent);else{const e=this.writer.createPositionAfter(this.position.parent);this._setAffectedBoundaries(this.position),this.writer.split(this.position),this.position=e,this.canMergeWith.add(this.position.nodeAfter)}return!0}_getAllowedIn(e,t){return this.schema.checkChild(e,t)?e:this.schema.isLimit(e)?null:this._getAllowedIn(e.parent,t)}}var pe=s("./packages/ckeditor5-engine/src/model/utils/findoptimalinsertionrange.ts"),ge=s("./packages/ckeditor5-utils/src/first.ts");function fe(e,t,s,i,r={}){if(!e.schema.isObject(t))throw new o.ZP("insertobject-element-not-an-object",e,{object:t});let n;n=s?s instanceof E.Z||s instanceof h.Z?s:e.createSelection(s,i):e.document.selection;let a=n;r.findOptimalPosition&&e.schema.isBlock(t)&&(a=e.createSelection((0,pe.K)(n,e,r.findOptimalPosition)));const c=(0,ge.Z)(n.getSelectedBlocks()),l={};return c&&Object.assign(l,e.schema.getAttributesWithProperty(c,"copyOnReplace",!0)),e.change((s=>{a.isCollapsed||e.deleteContent(a,{doNotAutoparagraph:!0});let i=t;const n=a.anchor.parent;!e.schema.checkChild(n,t)&&e.schema.checkChild(n,"paragraph")&&e.schema.checkChild("paragraph",t)&&(i=s.createElement("paragraph"),s.insert(t,i)),e.schema.setAllowedAttributes(i,l,s);const c=e.insertContent(i,a);return c.isCollapsed||r.setSelection&&function(e,t,s,i){const r=e.model;if("after"==s){let s=t.nextSibling;!(s&&r.schema.checkChild(s,"$text"))&&r.schema.checkChild(t.parent,"paragraph")&&(s=e.createElement("paragraph"),r.schema.setAllowedAttributes(s,i,e),r.insertContent(s,e.createPositionAfter(t))),s&&e.setSelection(s,0)}else{if("on"!=s)throw new o.ZP("insertobject-invalid-place-parameter-value",r);e.setSelection(t,"on")}}(s,t,r.setSelection,l),c}))}var me=s("./packages/ckeditor5-engine/src/model/treewalker.ts");function ke(e,t){const{isForward:s,walker:o,unit:i,schema:n,treatEmojiAsSingleUnit:a}=e,{type:c,item:l,nextPosition:d}=t;if("text"==c)return"word"===e.unit?function(e,t){let s=e.position.textNode;s||(s=t?e.position.nodeAfter:e.position.nodeBefore);for(;s&&s.is("$text");){const o=e.position.offset-s.startOffset;if(we(s,o,t))s=t?e.position.nodeAfter:e.position.nodeBefore;else{if(_e(s.data,o,t))break;e.next()}}return e.position}(o,s):function(e,t,s){const o=e.position.textNode;if(o){const i=o.data;let r=e.position.offset-o.startOffset;for(;k(i,r)||"character"==t&&b(i,r)||s&&w(i,r);)e.next(),r=e.position.offset-o.startOffset}return e.position}(o,i,a);if(c==(s?"elementStart":"elementEnd")){if(n.isSelectable(l))return r.ZP._createAt(l,s?"after":"before");if(n.checkChild(d,"$text"))return d}else{if(n.isLimit(l))return void o.skip((()=>!0));if(n.checkChild(d,"$text"))return d}}function be(e,t){const s=e.root,o=r.ZP._createAt(s,t?"end":0);return t?new n.Z(e,o):new n.Z(o,e)}function _e(e,t,s){const o=t+(s?0:-1);return' ,.?!:;"-()'.includes(e.charAt(o))}function we(e,t,s){return t===(s?e.offsetSize:0)}var ve=s("./packages/ckeditor5-utils/src/observablemixin.ts");class ye extends ve.y{constructor(){super(),this.markers=new A,this.document=new Z(this),this.schema=new O.Z,this._pendingChanges=[],this._currentWriter=null,["insertContent","insertObject","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach((e=>this.decorate(e))),this.on("applyOperation",((e,t)=>{t[0]._validate()}),{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$container",{allowIn:["$root","$container"]}),this.schema.register("$block",{allowIn:["$root","$container"],isBlock:!0}),this.schema.register("$blockObject",{allowWhere:"$block",isBlock:!0,isObject:!0}),this.schema.register("$inlineObject",{allowWhere:"$text",allowAttributesOf:"$text",isInline:!0,isObject:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0,isContent:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$documentFragment",{allowContentOf:"$root",allowChildren:"$text",isLimit:!0}),this.schema.register("$marker"),this.schema.addChildCheck(((e,t)=>{if("$marker"===t.name)return!0})),Y(this),this.document.registerPostFixer(X._m)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new i,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){o.ZP.rethrowUnexpectedError(e,this)}}enqueueChange(e,t){try{e?"function"==typeof e?(t=e,e=new i):e instanceof i||(e=new i(e)):e=new i,this._pendingChanges.push({batch:e,callback:t}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){o.ZP.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,t,s){return function(e,t,s,o){return e.change((i=>{let r;r=s?s instanceof E.Z||s instanceof h.Z?s:i.createSelection(s,o):e.document.selection,r.isCollapsed||e.deleteContent(r,{doNotAutoparagraph:!0});const a=new ue(e,i,r.anchor),c=[];let l;if(t.is("documentFragment")){if(t.markers.size){const e=[];for(const[s,o]of t.markers){const{start:t,end:i}=o,r=t.isEqual(i);e.push({position:t,name:s,isCollapsed:r},{position:i,name:s,isCollapsed:r})}e.sort((({position:e},{position:t})=>e.isBefore(t)?1:-1));for(const{position:s,name:o,isCollapsed:r}of e){let e=null,n=null;const a=s.parent===t&&s.isAtStart,l=s.parent===t&&s.isAtEnd;a||l?r&&(n=a?"start":"end"):(e=i.createElement("$marker"),i.insert(e,s)),c.push({name:o,element:e,collapsed:n})}}l=t.getChildren()}else l=[t];a.handleNodes(l);let d=a.getSelectionRange();if(t.is("documentFragment")&&c.length){const e=d?he.iE.fromRange(d):null,t={};for(let e=c.length-1;e>=0;e--){const{name:s,element:o,collapsed:r}=c[e],n=!t[s];if(n&&(t[s]=[]),o){const e=i.createPositionAt(o,"before");t[s].push(e),i.remove(o)}else{const e=a.getAffectedRange();if(!e){r&&t[s].push(a.position);continue}r?t[s].push(e[r]):t[s].push(n?e.start:e.end)}}for(const[e,[s,o]]of Object.entries(t))s&&o&&s.root===o.root&&i.addMarker(e,{usingOperation:!0,affectsData:!0,range:new n.Z(s,o)});e&&(d=e.toRange(),e.detach())}d&&(r instanceof h.Z?i.setSelection(d):r.setTo(d));const u=a.getAffectedRange()||e.createRange(r.anchor);return a.destroy(),u}))}(this,e,t,s)}insertObject(e,t,s,o){return fe(this,e,t,s,o)}deleteContent(e,t){ie(this,e,t)}modifySelection(e,t){!function(e,t,s={}){const o=e.schema,i="backward"!=s.direction,r=s.unit?s.unit:"character",n=!!s.treatEmojiAsSingleUnit,a=t.focus,c=new me.Z({boundaries:be(a,i),singleCharacters:!0,direction:i?"forward":"backward"}),l={walker:c,schema:o,isForward:i,unit:r,treatEmojiAsSingleUnit:n};let d;for(;d=c.next();){if(d.done)return;const s=ke(l,d.value);if(s)return void(t instanceof h.Z?e.change((e=>{e.setSelectionFocus(s)})):t.setFocus(s))}}(this,e,t)}getSelectedContent(e){return function(e,t){return e.change((e=>{const s=e.createDocumentFragment(),o=t.getFirstRange();if(!o||o.isCollapsed)return s;const i=o.start.root,r=o.start.getCommonPath(o.end),n=i.getNodeByPath(r);let a;a=o.start.parent==o.end.parent?o:e.createRange(e.createPositionAt(n,o.start.path[r.length]),e.createPositionAt(n,o.end.path[r.length]+1));const c=a.end.offset-a.start.offset;for(const t of a.getItems({shallow:!0}))t.is("$textProxy")?e.appendText(t.data,t.getAttributes(),s):e.append(e.cloneElement(t,!0),s);if(a!=o){const t=o._getTransformedByMove(a.start,e.createPositionAt(s,0),c)[0],i=e.createRange(e.createPositionAt(s,0),t.start);de(e.createRange(t.end,e.createPositionAt(s,"end")),e),de(i,e)}return s}))}(this,e)}hasContent(e,t={}){const s=e instanceof n.Z?e:n.Z._createIn(e);if(s.isCollapsed)return!1;const{ignoreWhitespaces:o=!1,ignoreMarkers:i=!1}=t;if(!i)for(const e of this.markers.getMarkersIntersectingRange(s))if(e.affectsData)return!0;for(const e of s.getItems())if(this.schema.isContent(e)){if(!e.is("$textProxy"))return!0;if(!o)return!0;if(-1!==e.data.search(/\S/))return!0}return!1}createPositionFromPath(e,t,s){return new r.ZP(e,t,s)}createPositionAt(e,t){return r.ZP._createAt(e,t)}createPositionAfter(e){return r.ZP._createAfter(e)}createPositionBefore(e){return r.ZP._createBefore(e)}createRange(e,t){return new n.Z(e,t)}createRangeIn(e){return n.Z._createIn(e)}createRangeOn(e){return n.Z._createOn(e)}createSelection(...e){return new E.Z(...e)}createBatch(e){return new i(e)}createOperationFromJSON(e){return S.Z.fromJSON(e,this.document)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];this.fire("_beforeChanges");try{for(;this._pendingChanges.length;){const t=this._pendingChanges[0].batch;this._currentWriter=new q(this,t);const s=this._pendingChanges[0].callback(this._currentWriter);e.push(s),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}}finally{this._pendingChanges.length=0,this._currentWriter=null,this.fire("_afterChanges")}return e}}},"./packages/ckeditor5-engine/src/model/node.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/tomap.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-utils/src/comparearrays.ts");s("./packages/ckeditor5-utils/src/version.ts");class a extends o.Z{constructor(e){super(),this.parent=null,this._attrs=(0,i.Z)(e)}get document(){return null}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new r.ZP("model-node-not-found-in-parent",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new r.ZP("model-node-not-found-in-parent",this);return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={}){const t=[];let s=e.includeSelf?this:this.parent;for(;s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}getCommonAncestor(e,t={}){const s=this.getAncestors(t),o=e.getAncestors(t);let i=0;for(;s[i]==o[i]&&s[i];)i++;return 0===i?null:s[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),s=e.getPath(),o=(0,n.Z)(t,s);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o](e[t[0]]=t[1],e)),{})),e}_clone(e){return new a(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,t){this._attrs.set(e,t)}_setAttributesTo(e){this._attrs=(0,i.Z)(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}a.prototype.is=function(e){return"node"===e||"model:node"===e}},"./packages/ckeditor5-engine/src/model/nodelist.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/node.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r{constructor(e){this._nodes=[],e&&this._insertNodes(0,e)}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce(((e,t)=>e+t.offsetSize),0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce(((e,t)=>e+t.offsetSize),0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new i.ZP("model-nodelist-index-out-of-bounds",this);return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const s of this._nodes){if(e>=t&&e1e4)return e.slice(0,s).concat(t).concat(e.slice(s+o,e.length));{const i=Array.from(e);return i.splice(s,o,...t),i}}(this._nodes,Array.from(t),e,0)}_removeNodes(e,t=1){return this._nodes.splice(e,t)}toJSON(){return this._nodes.map((e=>e.toJSON()))}}},"./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),r=s("./packages/ckeditor5-engine/src/model/range.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./node_modules/lodash-es/_baseIsEqual.js");const c=function(e,t){return(0,a.Z)(e,t)};class l extends o.Z{constructor(e,t,s,o,i){super(i),this.range=e.clone(),this.key=t,this.oldValue=void 0===s?null:s,this.newValue=void 0===o?null:o}get type(){return null===this.oldValue?"addAttribute":null===this.newValue?"removeAttribute":"changeAttribute"}clone(){return new l(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new l(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}toJSON(){const e=super.toJSON();return e.range=this.range.toJSON(),e}_validate(){if(!this.range.isFlat)throw new n.ZP("attribute-operation-range-not-flat",this);for(const e of this.range.getItems({shallow:!0})){if(null!==this.oldValue&&!c(e.getAttribute(this.key),this.oldValue))throw new n.ZP("attribute-operation-wrong-old-value",this,{item:e,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&e.hasAttribute(this.key))throw new n.ZP("attribute-operation-attribute-exists",this,{node:e,key:this.key})}}_execute(){c(this.oldValue,this.newValue)||(0,i.pX)(this.range,this.key,this.newValue)}static get className(){return"AttributeOperation"}static fromJSON(e,t){return new l(r.Z.fromJSON(e.range,t),e.key,e.oldValue,e.newValue,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/insertoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/nodelist.ts"),n=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),c=s("./packages/ckeditor5-engine/src/model/text.ts"),l=s("./packages/ckeditor5-engine/src/model/element.ts"),d=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class h extends o.Z{constructor(e,t,s){super(s),this.position=e.clone(),this.position.stickiness="toNone",this.nodes=new r.Z((0,a.So)(t)),this.shouldReceiveAttributes=!1}get type(){return"insert"}get howMany(){return this.nodes.maxOffset}clone(){const e=new r.Z([...this.nodes].map((e=>e._clone(!0)))),t=new h(this.position,e,this.baseVersion);return t.shouldReceiveAttributes=this.shouldReceiveAttributes,t}getReversed(){const e=this.position.root.document.graveyard,t=new i.ZP(e,[0]);return new n.Z(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0)))),(0,a.fj)(this.position,e)}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e.nodes=this.nodes.toJSON(),e}static get className(){return"InsertOperation"}static fromJSON(e,t){const s=[];for(const t of e.nodes)t.name?s.push(l.Z.fromJSON(t)):s.push(c.Z.fromJSON(t));const o=new h(i.ZP.fromJSON(e.position,t),s,e.baseVersion);return o.shouldReceiveAttributes=e.shouldReceiveAttributes,o}}},"./packages/ckeditor5-engine/src/model/operation/markeroperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/range.ts");class r extends o.Z{constructor(e,t,s,o,i,r){super(r),this.name=e,this.oldRange=t?t.clone():null,this.newRange=s?s.clone():null,this.affectsData=i,this._markers=o}get type(){return"marker"}clone(){return new r(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new r(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this.newRange?this._markers._set(this.name,this.newRange,!0,this.affectsData):this._markers._remove(this.name)}toJSON(){const e=super.toJSON();return this.oldRange&&(e.oldRange=this.oldRange.toJSON()),this.newRange&&(e.newRange=this.newRange.toJSON()),delete e._markers,e}static get className(){return"MarkerOperation"}static fromJSON(e,t){return new r(e.name,e.oldRange?i.Z.fromJSON(e.oldRange,t):null,e.newRange?i.Z.fromJSON(e.newRange,t):null,t.model.markers,e.affectsData,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class l extends o.Z{constructor(e,t,s,o,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=t,this.targetPosition=s.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=o.clone()}get type(){return"merge"}get deletionPosition(){return new r.ZP(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new n.Z(this.sourcePosition,e)}clone(){return new l(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),t=this.sourcePosition.path.slice(0,-1),s=new r.ZP(this.sourcePosition.root,t)._getTransformedByMergeOperation(this);return new i.Z(e,this.howMany,s,this.graveyardPosition,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent;if(!e.parent)throw new c.ZP("merge-operation-source-position-invalid",this);if(!t.parent)throw new c.ZP("merge-operation-target-position-invalid",this);if(this.howMany!=e.maxOffset)throw new c.ZP("merge-operation-how-many-invalid",this)}_execute(){const e=this.sourcePosition.parent,t=n.Z._createIn(e);(0,a.XF)(t,this.targetPosition),(0,a.XF)(n.Z._createOn(e),this.graveyardPosition)}toJSON(){const e=super.toJSON();return e.sourcePosition=e.sourcePosition.toJSON(),e.targetPosition=e.targetPosition.toJSON(),e.graveyardPosition=e.graveyardPosition.toJSON(),e}static get className(){return"MergeOperation"}static fromJSON(e,t){const s=r.ZP.fromJSON(e.sourcePosition,t),o=r.ZP.fromJSON(e.targetPosition,t),i=r.ZP.fromJSON(e.graveyardPosition,t);return new this(s,e.howMany,o,i,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/moveoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/range.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./packages/ckeditor5-utils/src/comparearrays.ts"),c=s("./packages/ckeditor5-engine/src/model/operation/utils.ts");class l extends o.Z{constructor(e,t,s,o){super(o),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toNext",this.howMany=t,this.targetPosition=s.clone(),this.targetPosition.stickiness="toNone"}get type(){return"$graveyard"==this.targetPosition.root.rootName?"remove":"$graveyard"==this.sourcePosition.root.rootName?"reinsert":"move"}clone(){return new l(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion)}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new l(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}_validate(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,s=this.sourcePosition.offset,o=this.targetPosition.offset;if(s+this.howMany>e.maxOffset)throw new n.ZP("move-operation-nodes-do-not-exist",this);if(e===t&&s=s&&this.targetPosition.path[e]{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts");class i extends o.Z{get type(){return"noop"}clone(){return new i(this.baseVersion)}getReversed(){return new i(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}},"./packages/ckeditor5-engine/src/model/operation/operation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e){this.baseVersion=e,this.isDocumentOperation=null!==this.baseVersion,this.batch=null}_validate(){}toJSON(){const e=Object.assign({},this);return e.__className=this.constructor.className,delete e.batch,delete e.isDocumentOperation,e}static get className(){return"Operation"}static fromJSON(e,t){return new this(e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/operationfactory.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),n=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/nooperation.ts"),c=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),l=s("./packages/ckeditor5-engine/src/model/operation/renameoperation.ts"),d=s("./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts"),h=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),u=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts");const p={};p[o.Z.className]=o.Z,p[i.Z.className]=i.Z,p[r.Z.className]=r.Z,p[n.Z.className]=n.Z,p[a.Z.className]=a.Z,p[c.Z.className]=c.Z,p[l.Z.className]=l.Z,p[d.Z.className]=d.Z,p[h.Z.className]=h.Z,p[u.Z.className]=u.Z;class g{static fromJSON(e,t){return p[e.__className].fromJSON(e,t)}}},"./packages/ckeditor5-engine/src/model/operation/renameoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/element.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-engine/src/model/position.ts");class a extends o.Z{constructor(e,t,s,o){super(o),this.position=e,this.position.stickiness="toNext",this.oldName=t,this.newName=s}get type(){return"rename"}clone(){return new a(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new a(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof i.Z))throw new r.ZP("rename-operation-wrong-position",this);if(e.name!==this.oldName)throw new r.ZP("rename-operation-wrong-name",this)}_execute(){this.position.nodeAfter.name=this.newName}toJSON(){const e=super.toJSON();return e.position=this.position.toJSON(),e}static get className(){return"RenameOperation"}static fromJSON(e,t){return new a(n.ZP.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e,t,s,o,i){super(i),this.root=e,this.key=t,this.oldValue=s,this.newValue=o}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new r(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new r(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new i.ZP("rootattribute-operation-not-a-root",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new i.ZP("rootattribute-operation-wrong-old-value",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new i.ZP("rootattribute-operation-attribute-exists",this,{root:this.root,key:this.key})}_execute(){null!==this.newValue?this.root._setAttribute(this.key,this.newValue):this.root._removeAttribute(this.key)}toJSON(){const e=super.toJSON();return e.root=this.root.toJSON(),e}static get className(){return"RootAttributeOperation"}static fromJSON(e,t){if(!t.getRoot(e.root))throw new i.ZP("rootattribute-operation-fromjson-no-root",this,{rootName:e.root});return new r(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}},"./packages/ckeditor5-engine/src/model/operation/splitoperation.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-engine/src/model/operation/operation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/utils.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class l extends o.Z{constructor(e,t,s,o,i){super(i),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=t,this.insertionPosition=s,this.graveyardPosition=o?o.clone():null,this.graveyardPosition&&(this.graveyardPosition.stickiness="toNext")}get type(){return"split"}get moveTargetPosition(){const e=this.insertionPosition.path.slice();return e.push(0),new r.ZP(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new n.Z(this.splitPosition,e)}clone(){return new l(this.splitPosition,this.howMany,this.insertionPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.splitPosition.root.document.graveyard,t=new r.ZP(e,[0]);return new i.Z(this.moveTargetPosition,this.howMany,this.splitPosition,t,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent,t=this.splitPosition.offset;if(!e||e.maxOffset{"use strict";s.d(t,{R:()=>_});var o=s("./packages/ckeditor5-engine/src/model/operation/insertoperation.ts"),i=s("./packages/ckeditor5-engine/src/model/operation/attributeoperation.ts"),r=s("./packages/ckeditor5-engine/src/model/operation/renameoperation.ts"),n=s("./packages/ckeditor5-engine/src/model/operation/markeroperation.ts"),a=s("./packages/ckeditor5-engine/src/model/operation/moveoperation.ts"),c=s("./packages/ckeditor5-engine/src/model/operation/rootattributeoperation.ts"),l=s("./packages/ckeditor5-engine/src/model/operation/mergeoperation.ts"),d=s("./packages/ckeditor5-engine/src/model/operation/splitoperation.ts"),h=s("./packages/ckeditor5-engine/src/model/operation/nooperation.ts"),u=s("./packages/ckeditor5-engine/src/model/range.ts"),p=s("./packages/ckeditor5-engine/src/model/position.ts"),g=s("./packages/ckeditor5-utils/src/comparearrays.ts");const f=new Map;function m(e,t,s){let o=f.get(e);o||(o=new Map,f.set(e,o)),o.set(t,s)}function k(e){return[e]}function b(e,t,s={}){const o=function(e,t){const s=f.get(e);return s&&s.has(t)?s.get(t):k}(e.constructor,t.constructor);try{return o(e=e.clone(),t,s)}catch(e){throw e}}function _(e,t,s){e=e.slice(),t=t.slice();const o=new w(s.document,s.useRelations,s.forceWeakRemove);o.setOriginalOperations(e),o.setOriginalOperations(t);const i=o.originalOperations;if(0==e.length||0==t.length)return{operationsA:e,operationsB:t,originalOperations:i};const r=new WeakMap;for(const t of e)r.set(t,0);const n={nextBaseVersionA:e[e.length-1].baseVersion+1,nextBaseVersionB:t[t.length-1].baseVersion+1,originalOperationsACount:e.length,originalOperationsBCount:t.length};let a=0;for(;a{if(e.key===t.key&&e.range.start.hasSameParentAs(t.range.start)){const o=e.range.getDifference(t.range).map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,0))),r=e.range.getIntersection(t.range);return r&&s.aIsStrong&&o.push(new i.Z(r,t.key,t.newValue,e.newValue,0)),0==o.length?[new h.Z(0)]:o}return[e]})),m(i.Z,o.Z,((e,t)=>{if(e.range.start.hasSameParentAs(t.position)&&e.range.containsPosition(t.position)){const s=e.range._getTransformedByInsertion(t.position,t.howMany,!t.shouldReceiveAttributes).map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,e.baseVersion)));if(t.shouldReceiveAttributes){const o=Z(t,e.key,e.oldValue);o&&s.unshift(o)}return s}return e.range=e.range._getTransformedByInsertion(t.position,t.howMany,!1)[0],[e]})),m(i.Z,l.Z,((e,t)=>{const s=[];e.range.start.hasSameParentAs(t.deletionPosition)&&(e.range.containsPosition(t.deletionPosition)||e.range.start.isEqual(t.deletionPosition))&&s.push(u.Z._createFromPositionAndShift(t.graveyardPosition,1));const o=e.range._getTransformedByMergeOperation(t);return o.isCollapsed||s.push(o),s.map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,e.baseVersion)))})),m(i.Z,a.Z,((e,t)=>function(e,t){const s=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);let o=null,i=[];s.containsRange(e,!0)?o=e:e.start.hasSameParentAs(s.start)?(i=e.getDifference(s),o=e.getIntersection(s)):i=[e];const r=[];for(let e of i){e=e._getTransformedByDeletion(t.sourcePosition,t.howMany);const s=t.getMovedRangeStart(),o=e.start.hasSameParentAs(s),i=e._getTransformedByInsertion(s,t.howMany,o);r.push(...i)}o&&r.push(o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!1)[0]);return r}(e.range,t).map((t=>new i.Z(t,e.key,e.oldValue,e.newValue,e.baseVersion))))),m(i.Z,d.Z,((e,t)=>{if(e.range.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.range.end.offset++,[e];if(e.range.start.hasSameParentAs(t.splitPosition)&&e.range.containsPosition(t.splitPosition)){const s=e.clone();return s.range=new u.Z(t.moveTargetPosition.clone(),e.range.end._getCombined(t.splitPosition,t.moveTargetPosition)),e.range.end=t.splitPosition.clone(),e.range.end.stickiness="toPrevious",[e,s]}return e.range=e.range._getTransformedBySplitOperation(t),[e]})),m(o.Z,i.Z,((e,t)=>{const s=[e];if(e.shouldReceiveAttributes&&e.position.hasSameParentAs(t.range.start)&&t.range.containsPosition(e.position)){const o=Z(e,t.key,t.newValue);o&&s.push(o)}return s})),m(o.Z,o.Z,((e,t,s)=>(e.position.isEqual(t.position)&&s.aIsStrong||(e.position=e.position._getTransformedByInsertOperation(t)),[e]))),m(o.Z,a.Z,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),m(o.Z,d.Z,((e,t)=>(e.position=e.position._getTransformedBySplitOperation(t),[e]))),m(o.Z,l.Z,((e,t)=>(e.position=e.position._getTransformedByMergeOperation(t),[e]))),m(n.Z,o.Z,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByInsertOperation(t)[0]),e.newRange&&(e.newRange=e.newRange._getTransformedByInsertOperation(t)[0]),[e]))),m(n.Z,n.Z,((e,t,s)=>{if(e.name==t.name){if(!s.aIsStrong)return[new h.Z(0)];e.oldRange=t.newRange?t.newRange.clone():null}return[e]})),m(n.Z,l.Z,((e,t)=>(e.oldRange&&(e.oldRange=e.oldRange._getTransformedByMergeOperation(t)),e.newRange&&(e.newRange=e.newRange._getTransformedByMergeOperation(t)),[e]))),m(n.Z,a.Z,((e,t,s)=>{if(e.oldRange&&(e.oldRange=u.Z._createFromRanges(e.oldRange._getTransformedByMoveOperation(t))),e.newRange){if(s.abRelation){const o=u.Z._createFromRanges(e.newRange._getTransformedByMoveOperation(t));if("left"==s.abRelation.side&&t.targetPosition.isEqual(e.newRange.start))return e.newRange.end=o.end,e.newRange.start.path=s.abRelation.path,[e];if("right"==s.abRelation.side&&t.targetPosition.isEqual(e.newRange.end))return e.newRange.start=o.start,e.newRange.end.path=s.abRelation.path,[e]}e.newRange=u.Z._createFromRanges(e.newRange._getTransformedByMoveOperation(t))}return[e]})),m(n.Z,d.Z,((e,t,s)=>{if(e.oldRange&&(e.oldRange=e.oldRange._getTransformedBySplitOperation(t)),e.newRange){if(s.abRelation){const o=e.newRange._getTransformedBySplitOperation(t);return e.newRange.start.isEqual(t.splitPosition)&&s.abRelation.wasStartBeforeMergedElement?e.newRange.start=p.ZP._createAt(t.insertionPosition):e.newRange.start.isEqual(t.splitPosition)&&!s.abRelation.wasInLeftElement&&(e.newRange.start=p.ZP._createAt(t.moveTargetPosition)),e.newRange.end.isEqual(t.splitPosition)&&s.abRelation.wasInRightElement?e.newRange.end=p.ZP._createAt(t.moveTargetPosition):e.newRange.end.isEqual(t.splitPosition)&&s.abRelation.wasEndBeforeMergedElement?e.newRange.end=p.ZP._createAt(t.insertionPosition):e.newRange.end=o.end,[e]}e.newRange=e.newRange._getTransformedBySplitOperation(t)}return[e]})),m(l.Z,o.Z,((e,t)=>(e.sourcePosition.hasSameParentAs(t.position)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByInsertOperation(t),e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t),[e]))),m(l.Z,l.Z,((e,t,s)=>{if(e.sourcePosition.isEqual(t.sourcePosition)&&e.targetPosition.isEqual(t.targetPosition)){if(s.bWasUndone){const s=t.graveyardPosition.path.slice();return s.push(0),e.sourcePosition=new p.ZP(t.graveyardPosition.root,s),e.howMany=0,[e]}return[new h.Z(0)]}if(e.sourcePosition.isEqual(t.sourcePosition)&&!e.targetPosition.isEqual(t.targetPosition)&&!s.bWasUndone&&"splitAtSource"!=s.abRelation){const o="$graveyard"==e.targetPosition.root.rootName,i="$graveyard"==t.targetPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&s.aIsStrong){const s=t.targetPosition._getTransformedByMergeOperation(t),o=e.targetPosition._getTransformedByMergeOperation(t);return[new a.Z(s,e.howMany,o,0)]}return[new h.Z(0)]}return e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMergeOperation(t),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),e.graveyardPosition.isEqual(t.graveyardPosition)&&s.aIsStrong||(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),m(l.Z,a.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);return"remove"==t.type&&!s.bWasUndone&&!s.forceWeakRemove&&e.deletionPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.sourcePosition)?[new h.Z(0)]:(e.sourcePosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.sourcePosition.hasSameParentAs(t.sourcePosition)&&(e.howMany-=t.howMany),e.sourcePosition=e.sourcePosition._getTransformedByMoveOperation(t),e.targetPosition=e.targetPosition._getTransformedByMoveOperation(t),e.graveyardPosition.isEqual(t.targetPosition)||(e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)),[e])})),m(l.Z,d.Z,((e,t,s)=>{if(t.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByDeletion(t.graveyardPosition,1),e.deletionPosition.isEqual(t.graveyardPosition)&&(e.howMany=t.howMany)),e.targetPosition.isEqual(t.splitPosition)){const o=0!=t.howMany,i=t.graveyardPosition&&e.deletionPosition.isEqual(t.graveyardPosition);if(o||i||"mergeTargetNotMoved"==s.abRelation)return e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),[e]}if(e.sourcePosition.isEqual(t.splitPosition)){if("mergeSourceNotMoved"==s.abRelation)return e.howMany=0,e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e];if("mergeSameElement"==s.abRelation||e.sourcePosition.offset>0)return e.sourcePosition=t.moveTargetPosition.clone(),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]}return e.sourcePosition.hasSameParentAs(t.splitPosition)&&(e.howMany=t.splitPosition.offset),e.sourcePosition=e.sourcePosition._getTransformedBySplitOperation(t),e.targetPosition=e.targetPosition._getTransformedBySplitOperation(t),[e]})),m(a.Z,o.Z,((e,t)=>{const s=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByInsertOperation(t,!1)[0];return e.sourcePosition=s.start,e.howMany=s.end.offset-s.start.offset,e.targetPosition.isEqual(t.position)||(e.targetPosition=e.targetPosition._getTransformedByInsertOperation(t)),[e]})),m(a.Z,a.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany),i=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);let r,n=s.aIsStrong,a=!s.aIsStrong;if("insertBefore"==s.abRelation||"insertAfter"==s.baRelation?a=!0:"insertAfter"!=s.abRelation&&"insertBefore"!=s.baRelation||(a=!1),r=e.targetPosition.isEqual(t.targetPosition)&&a?e.targetPosition._getTransformedByDeletion(t.sourcePosition,t.howMany):e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),P(e,t)&&P(t,e))return[t.getReversed()];if(o.containsPosition(t.targetPosition)&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),x([o],r);if(i.containsPosition(e.targetPosition)&&i.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),x([o],r);const c=(0,g.Z)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if("prefix"==c||"extension"==c)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany),x([o],r);"remove"!=e.type||"remove"==t.type||s.aWasUndone||s.forceWeakRemove?"remove"==e.type||"remove"!=t.type||s.bWasUndone||s.forceWeakRemove||(n=!1):n=!0;const l=[],d=o.getDifference(i);for(const e of d){e.start=e.start._getTransformedByDeletion(t.sourcePosition,t.howMany),e.end=e.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const s="same"==(0,g.Z)(e.start.getParentPath(),t.getMovedRangeStart().getParentPath()),o=e._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,s);l.push(...o)}const p=o.getIntersection(i);return null!==p&&n&&(p.start=p.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),p.end=p.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===l.length?l.push(p):1==l.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?l.unshift(p):l.push(p):l.splice(1,0,p)),0===l.length?[new h.Z(e.baseVersion)]:x(l,r)})),m(a.Z,d.Z,((e,t,s)=>{let o=e.targetPosition.clone();e.targetPosition.isEqual(t.insertionPosition)&&t.graveyardPosition&&"moveTargetAfter"!=s.abRelation||(o=e.targetPosition._getTransformedBySplitOperation(t));const i=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany);if(i.end.isEqual(t.insertionPosition))return t.graveyardPosition||e.howMany++,e.targetPosition=o,[e];if(i.start.hasSameParentAs(t.splitPosition)&&i.containsPosition(t.splitPosition)){let e=new u.Z(t.splitPosition,i.end);e=e._getTransformedBySplitOperation(t);return x([new u.Z(i.start,t.splitPosition),e],o)}e.targetPosition.isEqual(t.splitPosition)&&"insertAtSource"==s.abRelation&&(o=t.moveTargetPosition),e.targetPosition.isEqual(t.insertionPosition)&&"insertBetween"==s.abRelation&&(o=e.targetPosition);const r=[i._getTransformedBySplitOperation(t)];if(t.graveyardPosition){const o=i.start.isEqual(t.graveyardPosition)||i.containsPosition(t.graveyardPosition);e.howMany>1&&o&&!s.aWasUndone&&r.push(u.Z._createFromPositionAndShift(t.insertionPosition,1))}return x(r,o)})),m(a.Z,l.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&o.containsPosition(t.sourcePosition))if("remove"!=e.type||s.forceWeakRemove){if(1==e.howMany)return s.bWasUndone?(e.sourcePosition=t.graveyardPosition.clone(),e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]):[new h.Z(0)]}else if(!s.aWasUndone){const s=[];let o=t.graveyardPosition.clone(),i=t.targetPosition._getTransformedByMergeOperation(t);e.howMany>1&&(s.push(new a.Z(e.sourcePosition,e.howMany-1,e.targetPosition,0)),o=o._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1),i=i._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany-1));const r=t.deletionPosition._getCombined(e.sourcePosition,e.targetPosition),n=new a.Z(o,1,r,0),c=n.getMovedRangeStart().path.slice();c.push(0);const l=new p.ZP(n.targetPosition.root,c);i=i._getTransformedByMove(o,r,1);const d=new a.Z(i,t.howMany,l,0);return s.push(n),s.push(d),s}const i=u.Z._createFromPositionAndShift(e.sourcePosition,e.howMany)._getTransformedByMergeOperation(t);return e.sourcePosition=i.start,e.howMany=i.end.offset-i.start.offset,e.targetPosition=e.targetPosition._getTransformedByMergeOperation(t),[e]})),m(r.Z,o.Z,((e,t)=>(e.position=e.position._getTransformedByInsertOperation(t),[e]))),m(r.Z,l.Z,((e,t)=>e.position.isEqual(t.deletionPosition)?(e.position=t.graveyardPosition.clone(),e.position.stickiness="toNext",[e]):(e.position=e.position._getTransformedByMergeOperation(t),[e]))),m(r.Z,a.Z,((e,t)=>(e.position=e.position._getTransformedByMoveOperation(t),[e]))),m(r.Z,r.Z,((e,t,s)=>{if(e.position.isEqual(t.position)){if(!s.aIsStrong)return[new h.Z(0)];e.oldName=t.newName}return[e]})),m(r.Z,d.Z,((e,t)=>{const s=e.position.path,o=t.splitPosition.getParentPath();if("same"==(0,g.Z)(s,o)&&!t.graveyardPosition){const t=new r.Z(e.position.getShiftedBy(1),e.oldName,e.newName,0);return[e,t]}return e.position=e.position._getTransformedBySplitOperation(t),[e]})),m(c.Z,c.Z,((e,t,s)=>{if(e.root===t.root&&e.key===t.key){if(!s.aIsStrong||e.newValue===t.newValue)return[new h.Z(0)];e.oldValue=t.newValue}return[e]})),m(d.Z,o.Z,((e,t)=>(e.splitPosition.hasSameParentAs(t.position)&&e.splitPosition.offset{if(!e.graveyardPosition&&!s.bWasUndone&&e.splitPosition.hasSameParentAs(t.sourcePosition)){const s=t.graveyardPosition.path.slice();s.push(0);const o=new p.ZP(t.graveyardPosition.root,s),i=d.Z.getInsertionPosition(new p.ZP(t.graveyardPosition.root,s)),r=new d.Z(o,0,i,null,0);return e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=d.Z.getInsertionPosition(e.splitPosition),e.graveyardPosition=r.insertionPosition.clone(),e.graveyardPosition.stickiness="toNext",[r,e]}return e.splitPosition.hasSameParentAs(t.deletionPosition)&&!e.splitPosition.isAfter(t.deletionPosition)&&e.howMany--,e.splitPosition.hasSameParentAs(t.targetPosition)&&(e.howMany+=t.howMany),e.splitPosition=e.splitPosition._getTransformedByMergeOperation(t),e.insertionPosition=d.Z.getInsertionPosition(e.splitPosition),e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedByMergeOperation(t)),[e]})),m(d.Z,a.Z,((e,t,s)=>{const o=u.Z._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.graveyardPosition){const i=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(!s.bWasUndone&&i){const s=e.splitPosition._getTransformedByMoveOperation(t),o=e.graveyardPosition._getTransformedByMoveOperation(t),i=o.path.slice();i.push(0);const r=new p.ZP(o.root,i);return[new a.Z(s,e.howMany,r,0)]}e.graveyardPosition=e.graveyardPosition._getTransformedByMoveOperation(t)}const i=e.splitPosition.isEqual(t.targetPosition);if(i&&("insertAtSource"==s.baRelation||"splitBefore"==s.abRelation))return e.howMany+=t.howMany,e.splitPosition=e.splitPosition._getTransformedByDeletion(t.sourcePosition,t.howMany),e.insertionPosition=d.Z.getInsertionPosition(e.splitPosition),[e];if(i&&s.abRelation&&s.abRelation.howMany){const{howMany:t,offset:o}=s.abRelation;return e.howMany+=t,e.splitPosition=e.splitPosition.getShiftedBy(o),[e]}if(e.splitPosition.hasSameParentAs(t.sourcePosition)&&o.containsPosition(e.splitPosition)){const s=t.howMany-(e.splitPosition.offset-t.sourcePosition.offset);return e.howMany-=s,e.splitPosition.hasSameParentAs(t.targetPosition)&&e.splitPosition.offset{if(e.splitPosition.isEqual(t.splitPosition)){if(!e.graveyardPosition&&!t.graveyardPosition)return[new h.Z(0)];if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition))return[new h.Z(0)];if("splitBefore"==s.abRelation)return e.howMany=0,e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t),[e]}if(e.graveyardPosition&&t.graveyardPosition&&e.graveyardPosition.isEqual(t.graveyardPosition)){const o="$graveyard"==e.splitPosition.root.rootName,i="$graveyard"==t.splitPosition.root.rootName,r=o&&!i;if(i&&!o||!r&&s.aIsStrong){const s=[];return t.howMany&&s.push(new a.Z(t.moveTargetPosition,t.howMany,t.splitPosition,0)),e.howMany&&s.push(new a.Z(e.splitPosition,e.howMany,e.moveTargetPosition,0)),s}return[new h.Z(0)]}if(e.graveyardPosition&&(e.graveyardPosition=e.graveyardPosition._getTransformedBySplitOperation(t)),e.splitPosition.isEqual(t.insertionPosition)&&"splitBefore"==s.abRelation)return e.howMany++,[e];if(t.splitPosition.isEqual(e.insertionPosition)&&"splitBefore"==s.baRelation){const s=t.insertionPosition.path.slice();s.push(0);const o=new p.ZP(t.insertionPosition.root,s);return[e,new a.Z(e.insertionPosition,1,o,0)]}return e.splitPosition.hasSameParentAs(t.splitPosition)&&e.splitPosition.offset{"use strict";s.d(t,{So:()=>p,X9:()=>d,XF:()=>h,fj:()=>l,pX:()=>u});var o=s("./packages/ckeditor5-engine/src/model/node.ts"),i=s("./packages/ckeditor5-engine/src/model/range.ts"),r=s("./packages/ckeditor5-engine/src/model/text.ts"),n=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),c=s("./packages/ckeditor5-utils/src/isiterable.ts");function l(e,t){const s=p(t),o=s.reduce(((e,t)=>e+t.offsetSize),0),r=e.parent;f(e);const n=e.index;return r._insertChild(n,s),g(r,n+s.length),g(r,n),new i.Z(e,e.getShiftedBy(o))}function d(e){if(!e.isFlat)throw new a.ZP("operation-utils-remove-range-not-flat",this);const t=e.start.parent;f(e.start),f(e.end);const s=t._removeChildren(e.start.index,e.end.index-e.start.index);return g(t,e.start.index),s}function h(e,t){if(!e.isFlat)throw new a.ZP("operation-utils-move-range-not-flat",this);const s=d(e);return l(t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),s)}function u(e,t,s){f(e.start),f(e.end);for(const o of e.getItems({shallow:!0})){const e=o.is("$textProxy")?o.textNode:o;null!==s?e._setAttribute(t,s):e._removeAttribute(t),g(e.parent,e.index)}g(e.end.parent,e.end.index)}function p(e){const t=[];!function e(s){if("string"==typeof s)t.push(new r.Z(s));else if(s instanceof n.Z)t.push(new r.Z(s.data,s.getAttributes()));else if(s instanceof o.Z)t.push(s);else if((0,c.Z)(s))for(const t of s)e(t)}(e);for(let e=1;e{"use strict";s.d(t,{Rt:()=>c,Ux:()=>l,YV:()=>d,ZP:()=>a});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),r=s("./packages/ckeditor5-utils/src/comparearrays.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");s("./packages/ckeditor5-utils/src/version.ts");class a extends o.Z{constructor(e,t,s="toNone"){if(super(),!e.is("element")&&!e.is("documentFragment"))throw new n.ZP("model-position-root-invalid",e);if(!(t instanceof Array)||0===t.length)throw new n.ZP("model-position-path-incorrect-format",e,{path:t});e.is("rootElement")?t=t.slice():(t=[...e.getPath(),...t],e=e.root),this.root=e,this.path=t,this.stickiness=s}get offset(){return this.path[this.path.length-1]}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;t1)return!1;if(1===t)return h(e,this,s);if(-1===t)return h(this,e,s)}return this.path.length===e.path.length||(this.path.length>e.path.length?u(this.path,t):u(e.path,t))}hasSameParentAs(e){if(this.root!==e.root)return!1;const t=this.getParentPath(),s=e.getParentPath();return"same"==(0,r.Z)(t,s)}getTransformedByOperation(e){let t;switch(e.type){case"insert":t=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":t=this._getTransformedByMoveOperation(e);break;case"split":t=this._getTransformedBySplitOperation(e);break;case"merge":t=this._getTransformedByMergeOperation(e);break;default:t=a._createAt(this)}return t}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const t=e.movedRange;return t.containsPosition(this)||t.start.isEqual(this)&&"toNext"==this.stickiness?this._getCombined(e.splitPosition,e.moveTargetPosition):e.graveyardPosition?this._getTransformedByMove(e.graveyardPosition,e.insertionPosition,1):this._getTransformedByInsertion(e.insertionPosition,1)}_getTransformedByMergeOperation(e){const t=e.movedRange;let s;return t.containsPosition(this)||t.start.isEqual(this)?(s=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(s=s._getTransformedByDeletion(e.deletionPosition,1))):s=this.isEqual(e.deletionPosition)?a._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),s}_getTransformedByDeletion(e,t){const s=a._createAt(this);if(this.root!=e.root)return s;if("same"==(0,r.Z)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;s.offset-=t}}else if("prefix"==(0,r.Z)(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;s.path[o]-=t}}return s}_getTransformedByInsertion(e,t){const s=a._createAt(this);if(this.root!=e.root)return s;if("same"==(0,r.Z)(e.getParentPath(),this.getParentPath()))(e.offset=t;){if(e.path[o]+i!==s.maxOffset)return!1;i=1,o--,s=s.parent}return!0}(e,s+1))}function u(e,t){for(;t{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./packages/ckeditor5-utils/src/comparearrays.ts");class c extends o.Z{constructor(e,t){super(),this.start=i.ZP._createAt(e),this.end=t?i.ZP._createAt(t):i.ZP._createAt(e),this.start.stickiness=this.isCollapsed?"toNone":"toNext",this.end.stickiness=this.isCollapsed?"toNone":"toPrevious"}*[Symbol.iterator](){yield*new r.Z({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){const e=this.start.getParentPath(),t=this.end.getParentPath();return"same"==(0,a.Z)(e,t)}get root(){return this.start.root}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const s=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return s&&o}containsItem(e){const t=i.ZP._createBefore(e);return this.containsPosition(t)||this.start.isEqual(t)}isEqual(e){return this.start.isEqual(e.start)&&this.end.isEqual(e.end)}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new c(this.start,e.start)),this.containsPosition(e.end)&&t.push(new c(e.end,this.end))):t.push(new c(this.start,this.end)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,s=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(s=e.end),new c(t,s)}return null}getJoined(e,t=!1){let s=this.isIntersecting(e);if(s||(s=this.start.isBefore(e.start)?t?this.end.isTouching(e.start):this.end.isEqual(e.start):t?e.end.isTouching(this.start):e.end.isEqual(this.start)),!s)return null;let o=this.start,i=this.end;return e.start.isBefore(o)&&(o=e.start),e.end.isAfter(i)&&(i=e.end),new c(o,i)}getMinimalFlatRanges(){const e=[],t=this.start.getCommonPath(this.end).length,s=i.ZP._createAt(this.start);let o=s.parent;for(;s.path.length>t+1;){const t=o.maxOffset-s.offset;0!==t&&e.push(new c(s,s.getShiftedBy(t))),s.path=s.path.slice(0,-1),s.offset++,o=o.parent}for(;s.path.length<=this.end.path.length;){const t=this.end.path[s.path.length-1],o=t-s.offset;0!==o&&e.push(new c(s,s.getShiftedBy(o))),s.offset=t,s.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new r.Z(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new r.Z(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new r.Z(e);yield t.position;for(const e of t)yield e.nextPosition}getTransformedByOperation(e){switch(e.type){case"insert":return this._getTransformedByInsertOperation(e);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(e);case"split":return[this._getTransformedBySplitOperation(e)];case"merge":return[this._getTransformedByMergeOperation(e)]}return[new c(this.start,this.end)]}getTransformedByOperations(e){const t=[new c(this.start,this.end)];for(const s of e)for(let e=0;e0?new this(s,o):new this(o,s)}static _createIn(e){return new this(i.ZP._createAt(e,0),i.ZP._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(i.ZP._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new n.ZP("range-create-from-ranges-empty-array",null);if(1==e.length)return e[0].clone();const t=e[0];e.sort(((e,t)=>e.start.isAfter(t.start)?1:-1));const s=e.indexOf(t),o=new this(t.start,t.end);if(s>0)for(let t=s-1;e[t].end.isEqual(o.start);t++)o.start=i.ZP._createAt(e[t].start);for(let t=s+1;t{"use strict";s.d(t,{G:()=>h,Z:()=>d});var o=s("./packages/ckeditor5-engine/src/model/element.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/range.ts"),n=s("./packages/ckeditor5-engine/src/model/text.ts"),a=s("./packages/ckeditor5-engine/src/model/treewalker.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),l=s("./packages/ckeditor5-utils/src/observablemixin.ts");class d extends l.y{constructor(){super(),this._sourceDefinitions={},this._attributeProperties={},this.decorate("checkChild"),this.decorate("checkAttribute"),this.on("checkAttribute",((e,t)=>{t[0]=new h(t[0])}),{priority:"highest"}),this.on("checkChild",((e,t)=>{t[0]=new h(t[0]),t[1]=this.getDefinition(t[1])}),{priority:"highest"})}register(e,t){if(this._sourceDefinitions[e])throw new c.ZP("schema-cannot-register-item-twice",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},t)],this._clearCache()}extend(e,t){if(!this._sourceDefinitions[e])throw new c.ZP("schema-cannot-extend-missing-item",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},t)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let t;return t="string"==typeof e?e:"is"in e&&(e.is("$text")||e.is("$textProxy"))?"$text":e.name,this.getDefinitions()[t]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const t=this.getDefinition(e);return!(!t||!t.isBlock)}isLimit(e){const t=this.getDefinition(e);return!!t&&!(!t.isLimit&&!t.isObject)}isObject(e){const t=this.getDefinition(e);return!!t&&!!(t.isObject||t.isLimit&&t.isSelectable&&t.isContent)}isInline(e){const t=this.getDefinition(e);return!(!t||!t.isInline)}isSelectable(e){const t=this.getDefinition(e);return!!t&&!(!t.isSelectable&&!t.isObject)}isContent(e){const t=this.getDefinition(e);return!!t&&!(!t.isContent&&!t.isObject)}checkChild(e,t){return!!t&&this._checkContextMatch(t,e)}checkAttribute(e,t){const s=this.getDefinition(e.last);return!!s&&s.allowAttributes.includes(t)}checkMerge(e,t){if(e instanceof i.ZP){const t=e.nodeBefore,s=e.nodeAfter;if(!(t instanceof o.Z))throw new c.ZP("schema-check-merge-no-element-before",this);if(!(s instanceof o.Z))throw new c.ZP("schema-check-merge-no-element-after",this);return this.checkMerge(t,s)}for(const s of t.getChildren())if(!this.checkChild(e,s))return!1;return!0}addChildCheck(e){this.on("checkChild",((t,[s,o])=>{if(!o)return;const i=e(s,o);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",((t,[s,o])=>{const i=e(s,o);"boolean"==typeof i&&(t.stop(),t.return=i)}),{priority:"high"})}setAttributeProperties(e,t){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),t)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let t;if(e instanceof i.ZP)t=e.parent;else{t=(e instanceof r.Z?[e]:Array.from(e.getRanges())).reduce(((e,t)=>{const s=t.getCommonAncestor();return e?e.getCommonAncestor(s,{includeSelf:!0}):s}),null)}for(;!this.isLimit(t)&&t.parent;)t=t.parent;return t}checkAttributeInSelection(e,t){if(e.isCollapsed){const s=[...e.getFirstPosition().getAncestors(),new n.Z("",e.getAttributes())];return this.checkAttribute(s,t)}{const s=e.getRanges();for(const e of s)for(const s of e)if(this.checkAttribute(s.item,t))return!0}return!1}*getValidRanges(e,t){e=function*(e){for(const t of e)yield*t.getMinimalFlatRanges()}(e);for(const s of e)yield*this._getValidRangesForRange(s,t)}getNearestSelectionRange(e,t="both"){if(this.checkChild(e,"$text"))return new r.Z(e);let s,o;const i=e.getAncestors().reverse().find((e=>this.isLimit(e)))||e.root;"both"!=t&&"backward"!=t||(s=new a.Z({boundaries:r.Z._createIn(i),startPosition:e,direction:"backward"})),"both"!=t&&"forward"!=t||(o=new a.Z({boundaries:r.Z._createIn(i),startPosition:e}));for(const e of function*(e,t){let s=!1;for(;!s;){if(s=!0,e){const t=e.next();t.done||(s=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(s=!1,yield{walker:t,value:e.value})}}}(s,o)){const t=e.walker==s?"elementEnd":"elementStart",o=e.value;if(o.type==t&&this.isObject(o.item))return r.Z._createOn(o.item);if(this.checkChild(o.nextPosition,"$text"))return new r.Z(o.nextPosition)}return null}findAllowedParent(e,t){let s=e.parent;for(;s;){if(this.checkChild(s,t))return s;if(this.isLimit(s))return null;s=s.parent}return null}setAllowedAttributes(e,t,s){const o=s.model;for(const[i,r]of Object.entries(t))o.schema.checkAttribute(e,i)&&s.setAttribute(i,r,e)}removeDisallowedAttributes(e,t){for(const s of e)if(s.is("$text"))P(this,s,t);else{const e=r.Z._createIn(s).getPositions();for(const s of e){P(this,s.nodeBefore||s.parent,t)}}}getAttributesWithProperty(e,t,s){const o={};for(const[i,r]of e.getAttributes()){const e=this.getAttributeProperties(i);void 0!==e[t]&&(void 0!==s&&s!==e[t]||(o[i]=r))}return o}createContext(e){return new h(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},t=this._sourceDefinitions,s=Object.keys(t);for(const o of s)e[o]=u(t[o],o);for(const t of s)p(e,t);for(const t of s)g(e,t);for(const t of s)f(e,t);for(const t of s)m(e,t),k(e,t);for(const t of s)b(e,t),_(e,t),w(e,t);this._compiledDefinitions=e}_checkContextMatch(e,t,s=t.length-1){const o=t.getItem(s);if(e.allowIn.includes(o.name)){if(0==s)return!0;{const e=this.getDefinition(o);return this._checkContextMatch(e,t,s-1)}}return!1}*_getValidRangesForRange(e,t){let s=e.start,o=e.start;for(const n of e.getItems({shallow:!0}))n.is("element")&&(yield*this._getValidRangesForRange(r.Z._createIn(n),t)),this.checkAttribute(n,t)||(s.isEqual(o)||(yield new r.Z(s,o)),s=i.ZP._createAfter(n)),o=i.ZP._createAfter(n);s.isEqual(o)||(yield new r.Z(s,o))}}class h{constructor(e){if(e instanceof h)return e;let t;t="string"==typeof e?[e]:Array.isArray(e)?e:e.getAncestors({includeSelf:!0}),this._items=t.map(Z)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(e){const t=new h([e]);return t._items=[...this._items,...t._items],t}getItem(e){return this._items[e]}*getNames(){yield*this._items.map((e=>e.name))}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}startsWith(e){return Array.from(this.getNames()).join(" ").startsWith(e)}}function u(e,t){const s={name:t,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],allowChildren:[],inheritTypesFrom:[]};return function(e,t){for(const s of e){const e=Object.keys(s).filter((e=>e.startsWith("is")));for(const o of e)t[o]=!!s[o]}}(e,s),v(e,s,"allowIn"),v(e,s,"allowContentOf"),v(e,s,"allowWhere"),v(e,s,"allowAttributes"),v(e,s,"allowAttributesOf"),v(e,s,"allowChildren"),v(e,s,"inheritTypesFrom"),function(e,t){for(const s of e){const e=s.inheritAllFrom;e&&(t.allowContentOf.push(e),t.allowWhere.push(e),t.allowAttributesOf.push(e),t.inheritTypesFrom.push(e))}}(e,s),s}function p(e,t){const s=e[t];for(const o of s.allowChildren){const s=e[o];s&&s.allowIn.push(t)}s.allowChildren.length=0}function g(e,t){for(const s of e[t].allowContentOf)if(e[s]){y(e,s).forEach((e=>{e.allowIn.push(t)}))}delete e[t].allowContentOf}function f(e,t){for(const s of e[t].allowWhere){const o=e[s];if(o){const s=o.allowIn;e[t].allowIn.push(...s)}}delete e[t].allowWhere}function m(e,t){for(const s of e[t].allowAttributesOf){const o=e[s];if(o){const s=o.allowAttributes;e[t].allowAttributes.push(...s)}}delete e[t].allowAttributesOf}function k(e,t){const s=e[t];for(const t of s.inheritTypesFrom){const o=e[t];if(o){const e=Object.keys(o).filter((e=>e.startsWith("is")));for(const t of e)t in s||(s[t]=o[t])}}delete s.inheritTypesFrom}function b(e,t){const s=e[t],o=s.allowIn.filter((t=>e[t]));s.allowIn=Array.from(new Set(o))}function _(e,t){const s=e[t];for(const o of s.allowIn){e[o].allowChildren.push(t)}}function w(e,t){const s=e[t];s.allowAttributes=Array.from(new Set(s.allowAttributes))}function v(e,t,s){for(const o of e){const e=o[s];"string"==typeof e?t[s].push(e):Array.isArray(e)&&t[s].push(...e)}}function y(e,t){const s=e[t];return(o=e,Object.keys(o).map((e=>o[e]))).filter((e=>e.allowIn.includes(s.name)));var o}function Z(e){return"string"==typeof e||e.is("documentFragment")?{name:"string"==typeof e?e:"$documentFragment",*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:t=>e.getAttribute(t)}}function P(e,t,s){for(const o of t.getAttributeKeys())e.checkAttribute(t,o)||s.removeAttribute(o,t)}},"./packages/ckeditor5-engine/src/model/selection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/model/node.ts"),r=s("./packages/ckeditor5-engine/src/model/position.ts"),n=s("./packages/ckeditor5-engine/src/model/range.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),c=s("./packages/ckeditor5-utils/src/emittermixin.ts"),l=s("./packages/ckeditor5-utils/src/isiterable.ts");class d extends((0,c.ZP)(o.Z)){constructor(...e){super(),this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e.length&&this.setTo(...e)}get anchor(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.end:e.start}return null}get focus(){if(this._ranges.length>0){const e=this._ranges[this._ranges.length-1];return this._lastRangeBackward?e.start:e.end}return null}get isCollapsed(){return 1===this._ranges.length&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(e){if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let s=!1;for(const o of e._ranges)if(t.isEqual(o)){s=!0;break}if(!s)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new n.Z(e.start,e.end)}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?new n.Z(e.start,e.end):null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?new n.Z(e.start,e.end):null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}setTo(...e){let[t,s,o]=e;if("object"==typeof s&&(o=s,s=void 0),null===t)this._setRanges([]);else if(t instanceof d)this._setRanges(t.getRanges(),t.isBackward);else if(t&&"function"==typeof t.getRanges)this._setRanges(t.getRanges(),t.isBackward);else if(t instanceof n.Z)this._setRanges([t],!!o&&!!o.backward);else if(t instanceof r.ZP)this._setRanges([new n.Z(t)]);else if(t instanceof i.Z){const e=!!o&&!!o.backward;let i;if("in"==s)i=n.Z._createIn(t);else if("on"==s)i=n.Z._createOn(t);else{if(void 0===s)throw new a.ZP("model-selection-setto-required-second-parameter",[this,t]);i=new n.Z(r.ZP._createAt(t,s))}this._setRanges([i],e)}else{if(!(0,l.Z)(t))throw new a.ZP("model-selection-setto-not-selectable",[this,t]);this._setRanges(t,o&&!!o.backward)}}_setRanges(e,t=!1){const s=Array.from(e),o=s.some((t=>{if(!(t instanceof n.Z))throw new a.ZP("model-selection-set-ranges-not-range",[this,e]);return this._ranges.every((e=>!e.isEqual(t)))}));(s.length!==this._ranges.length||o)&&(this._replaceAllRanges(s),this._lastRangeBackward=!!t,this.fire("change:range",{directChange:!0}))}setFocus(e,t){if(null===this.anchor)throw new a.ZP("model-selection-setfocus-no-ranges",[this,e]);const s=r.ZP._createAt(e,t);if("same"==s.compareWith(this.focus))return;const o=this.anchor;this._ranges.length&&this._popRange(),"before"==s.compareWith(o)?(this._pushRange(new n.Z(s,o)),this._lastRangeBackward=!0):(this._pushRange(new n.Z(o,s)),this._lastRangeBackward=!1),this.fire("change:range",{directChange:!0})}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}removeAttribute(e){this.hasAttribute(e)&&(this._attrs.delete(e),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}setAttribute(e,t){this.getAttribute(e)!==t&&(this._attrs.set(e,t),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}*getSelectedBlocks(){const e=new WeakSet;for(const t of this.getRanges()){const s=p(t.start,e);s&&g(s,t)&&(yield s);for(const s of t.getWalker()){const o=s.item;"elementEnd"==s.type&&u(o,e,t)&&(yield o)}const o=p(t.end,e);o&&!t.end.isTouching(r.ZP._createAt(o,0))&&g(o,t)&&(yield o)}}containsEntireContent(e=this.anchor.root){const t=r.ZP._createAt(e,0),s=r.ZP._createAt(e,"end");return t.isTouching(this.getFirstPosition())&&s.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new n.Z(e.start,e.end))}_checkRange(e){for(let t=0;t0;)this._popRange()}_popRange(){this._ranges.pop()}}function h(e,t){return!t.has(e)&&(t.add(e),e.root.document.model.schema.isBlock(e)&&!!e.parent)}function u(e,t,s){return h(e,t)&&g(e,s)}function p(e,t){const s=e.parent.root.document.model.schema,o=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const r=o.find((e=>!i&&(i=s.isLimit(e),!i&&h(e,t))));return o.forEach((e=>t.add(e))),r}function g(e,t){const s=function(e){const t=e.root.document.model.schema;let s=e.parent;for(;s;){if(t.isBlock(s))return s;s=s.parent}}(e);if(!s)return!0;return!t.containsRange(n.Z._createOn(s),!0)}d.prototype.is=function(e){return"selection"===e||"model:selection"===e}},"./packages/ckeditor5-engine/src/model/text.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/model/node.ts");class i extends o.Z{constructor(e,t){super(t),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new i(this.data,this.getAttributes())}static fromJSON(e){return new i(e.data,e.attributes)}}i.prototype.is=function(e){return"$text"===e||"model:$text"===e||"text"===e||"model:text"===e||"node"===e||"model:node"===e}},"./packages/ckeditor5-engine/src/model/textproxy.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/model/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e,t,s){if(super(),this.textNode=e,t<0||t>e.offsetSize)throw new i.ZP("model-textproxy-wrong-offsetintext",this);if(s<0||t+s>e.offsetSize)throw new i.ZP("model-textproxy-wrong-length",this);this.data=e.data.substring(t,t+s),this.offsetInText=t}get startOffset(){return null!==this.textNode.startOffset?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return null!==this.startOffset?this.startOffset+this.offsetSize:null}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={}){const t=[];let s=e.includeSelf?this:this.parent;for(;s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}r.prototype.is=function(e){return"$textProxy"===e||"model:$textProxy"===e||"textProxy"===e||"model:textProxy"===e}},"./packages/ckeditor5-engine/src/model/treewalker.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/model/element.ts"),i=s("./packages/ckeditor5-engine/src/model/position.ts"),r=s("./packages/ckeditor5-engine/src/model/text.ts"),n=s("./packages/ckeditor5-engine/src/model/textproxy.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class c{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new a.ZP("model-tree-walker-no-start-position",null);const t=e.direction||"forward";if("forward"!=t&&"backward"!=t)throw new a.ZP("model-tree-walker-unknown-direction",e,{direction:t});this.direction=t,this.boundaries=e.boundaries||null,e.startPosition?this.position=e.startPosition.clone():this.position=i.ZP._createAt(this.boundaries["backward"==this.direction?"end":"start"]),this.position.stickiness="toNone",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,s,o,i;do{o=this.position,i=this._visitedParent,({done:t,value:s}=this.next())}while(!t&&e(s));t||(this.position=o,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,t=this.position.clone(),s=this._visitedParent;if(null===s.parent&&t.offset===s.maxOffset)return{done:!0,value:void 0};if(s===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0,value:void 0};const a=(0,i.Rt)(t,s),c=a||(0,i.Ux)(t,s,a);if(c instanceof o.Z)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=c),this.position=t,l("elementStart",c,e,t,1);if(c instanceof r.Z){let o;if(this.singleCharacters)o=1;else{let e=c.endOffset;this._boundaryEndParent==s&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),o=t.offset-e}const i=t.offset-d.startOffset,r=new n.Z(d,i-o,o);return t.offset-=o,this.position=t,l("text",r,e,t,o)}return t.path.pop(),this.position=t,this._visitedParent=s.parent,l("elementStart",s,e,t,1)}}function l(e,t,s,o,i){return{done:!1,value:{type:e,item:t,previousPosition:s,nextPosition:o,length:i}}}},"./packages/ckeditor5-engine/src/model/typecheckable.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{is(){throw new Error("is() method is abstract")}}},"./packages/ckeditor5-engine/src/model/utils/autoparagraphing.ts":(e,t,s)=>{"use strict";function o(e){const{schema:t,document:s}=e.model;for(const o of s.getRootNames()){const i=s.getRoot(o);if(i.isEmpty&&!t.checkChild(i,"$text")&&t.checkChild(i,"paragraph"))return e.insertElement("paragraph",i),!0}return!1}function i(e,t,s){const o=s.createContext(e);return!!s.checkChild(o,"paragraph")&&!!s.checkChild(o.push("paragraph"),t)}function r(e,t){const s=t.createElement("paragraph");return t.insert(s,e),t.createPositionAt(s,0)}s.d(t,{_m:()=>o,gg:()=>i,zX:()=>r})},"./packages/ckeditor5-engine/src/model/utils/findoptimalinsertionrange.ts":(e,t,s)=>{"use strict";s.d(t,{K:()=>i});var o=s("./packages/ckeditor5-utils/src/first.ts");function i(e,t,s="auto"){const i=e.getSelectedElement();if(i&&t.schema.isObject(i)&&!t.schema.isInline(i))return"before"==s||"after"==s?t.createRange(t.createPositionAt(i,s)):t.createRangeOn(i);const r=(0,o.Z)(e.getSelectedBlocks());if(!r)return t.createRange(e.focus);if(r.isEmpty)return t.createRange(t.createPositionAt(r,0));const n=t.createPositionAfter(r);return e.focus.isTouching(n)?t.createRange(n):t.createRange(t.createPositionBefore(r))}},"./packages/ckeditor5-engine/src/view/attributeelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(...e){super(...e),this.getFillerOffset=n,this._priority=10,this._id=null,this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(null===this.id)throw new i.ZP("attribute-element-get-elements-with-same-id-no-id",this);return new Set(this._clonesGroup)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e=!1){const t=super._clone(e);return t._priority=this._priority,t._id=this._id,t}}function n(){if(a(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(a(e)>1)return null;e=e.parent}return!e||a(e)>1?null:this.childCount}function a(e){return Array.from(e.getChildren()).filter((e=>!e.is("uiElement"))).length}r.DEFAULT_PRIORITY=10,r.prototype.is=function(e,t){return t?t===this.name&&("attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e):"attributeElement"===e||"view:attributeElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/containerelement.ts":(e,t,s)=>{"use strict";s.d(t,{Y:()=>r,Z:()=>i});var o=s("./packages/ckeditor5-engine/src/view/element.ts");class i extends o.Z{constructor(...e){super(...e),this.getFillerOffset=r}}function r(){const e=[...this.getChildren()],t=e[this.childCount-1];if(t&&t.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}i.prototype.is=function(e,t){return t?t===this.name&&("containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/datatransfer.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e){this.files=function(e){const t=Array.from(e.files||[]),s=Array.from(e.items||[]);if(t.length)return t;return s.filter((e=>"file"===e.kind)).map((e=>e.getAsFile()))}(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}set effectAllowed(e){this._native.effectAllowed=e}get effectAllowed(){return this._native.effectAllowed}set dropEffect(e){this._native.dropEffect=e}get dropEffect(){return this._native.dropEffect}get isCanceled(){return"none"==this._native.dropEffect||!!this._native.mozUserCancelled}}},"./packages/ckeditor5-engine/src/view/document.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>k});var o=s("./packages/ckeditor5-engine/src/view/documentselection.ts"),i=s("./packages/ckeditor5-utils/src/collection.ts"),r=s("./packages/ckeditor5-utils/src/eventinfo.ts"),n=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),a=s("./packages/ckeditor5-utils/src/emittermixin.ts"),c=s("./packages/ckeditor5-utils/src/toarray.ts"),l=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts");const d=Symbol("bubbling contexts");function h(e){return class extends e{fire(e,...t){try{const s=e instanceof r.Z?e:new r.Z(this,e),o=f(this);if(!o.size)return;if(u(s,"capturing",this),p(o,"$capture",s,...t))return s.return;const i=s.startRange||this.selection.getFirstRange(),n=i?i.getContainedElement():null,a=!!n&&Boolean(g(o,n));let c=n||function(e){if(!e)return null;const t=e.start.parent,s=e.end.parent,o=t.getPath(),i=s.getPath();return o.length>i.length?t:s}(i);if(u(s,"atTarget",c),!a){if(p(o,"$text",s,...t))return s.return;u(s,"bubbling",c)}for(;c;){if(c.is("rootElement")){if(p(o,"$root",s,...t))return s.return}else if(c.is("element")&&p(o,c.name,s,...t))return s.return;if(p(o,c,s,...t))return s.return;c=c.parent,u(s,"bubbling",c)}return u(s,"bubbling",this),p(o,"$document",s,...t),s.return}catch(e){n.ZP.rethrowUnexpectedError(e,this)}}_addEventListener(e,t,s){const o=(0,c.Z)(s.context||"$document"),i=f(this);for(const r of o){let o=i.get(r);o||(o=new a.Q5,i.set(r,o)),this.listenTo(o,e,t,s)}}_removeEventListener(e,t){const s=f(this);for(const o of s.values())this.stopListening(o,e,t)}}}{const e=h(Object);["fire","_addEventListener","_removeEventListener"].forEach((t=>{h[t]=e.prototype[t]}))}function u(e,t,s){e instanceof l.Z&&(e._eventPhase=t,e._currentTarget=s)}function p(e,t,s,...o){const i="string"==typeof t?e.get(t):g(e,t);return!!i&&(i.fire(s,...o),s.stop.called)}function g(e,t){for(const[s,o]of e)if("function"==typeof s&&s(t))return o;return null}function f(e){return e[d]||(e[d]=new Map),e[d]}var m=s("./packages/ckeditor5-utils/src/observablemixin.ts");class k extends(h(m.y)){constructor(e){super(),this.selection=new o.Z,this.roots=new i.Z({idProperty:"rootName"}),this.stylesProcessor=e,this.set("isReadOnly",!1),this.set("isFocused",!1),this.set("isSelecting",!1),this.set("isComposing",!1),this._postFixers=new Set}getRoot(e="main"){return this.roots.get(e)}registerPostFixer(e){this._postFixers.add(e)}destroy(){this.roots.map((e=>e.destroy())),this.stopListening()}_callPostFixers(e){let t=!1;do{for(const s of this._postFixers)if(t=s(e),t)break}while(t)}}},"./packages/ckeditor5-engine/src/view/documentfragment.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/text.ts"),r=s("./packages/ckeditor5-engine/src/view/textproxy.ts"),n=s("./packages/ckeditor5-utils/src/isiterable.ts"),a=s("./packages/ckeditor5-utils/src/emittermixin.ts");class c extends((0,a.ZP)(o.Z)){constructor(e,t){super(),this.document=e,this._children=[],t&&this._insertChild(0,t)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}_appendChild(e){return this._insertChild(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(e,t){this._fireChange("children",this);let s=0;const o=function(e,t){if("string"==typeof t)return[new i.Z(e,t)];(0,n.Z)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new i.Z(e,t):t instanceof r.Z?new i.Z(e,t.data):t))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,this._children.splice(e,0,t),e++,s++;return s}_removeChildren(e,t=1){this._fireChange("children",this);for(let s=e;s{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/selection.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts");class n extends((0,r.ZP)(o.Z)){constructor(...e){super(),this._selection=new i.Z,this._selection.delegate("change").to(this),e.length&&this._selection.setTo(...e)}get isFake(){return this._selection.isFake}get fakeSelectionLabel(){return this._selection.fakeSelectionLabel}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get isCollapsed(){return this._selection.isCollapsed}get rangeCount(){return this._selection.rangeCount}get isBackward(){return this._selection.isBackward}get editableElement(){return this._selection.editableElement}get _ranges(){return this._selection._ranges}*getRanges(){yield*this._selection.getRanges()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getSelectedElement(){return this._selection.getSelectedElement()}isEqual(e){return this._selection.isEqual(e)}isSimilar(e){return this._selection.isSimilar(e)}_setTo(...e){this._selection.setTo(...e)}_setFocus(e,t){this._selection.setFocus(e,t)}}n.prototype.is=function(e){return"selection"===e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}},"./packages/ckeditor5-engine/src/view/domconverter.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>P});var o=s("./packages/ckeditor5-engine/src/view/text.ts"),i=s("./packages/ckeditor5-engine/src/view/element.ts"),r=s("./packages/ckeditor5-engine/src/view/uielement.ts"),n=s("./packages/ckeditor5-engine/src/view/position.ts"),a=s("./packages/ckeditor5-engine/src/view/range.ts"),c=s("./packages/ckeditor5-engine/src/view/selection.ts"),l=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),d=s("./packages/ckeditor5-engine/src/view/treewalker.ts"),h=s("./packages/ckeditor5-engine/src/view/matcher.ts"),u=s("./packages/ckeditor5-engine/src/view/filler.ts"),p=s("./packages/ckeditor5-utils/src/dom/global.ts"),g=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");function f(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function m(e){const t=[];let s=e;for(;s&&s.nodeType!=Node.DOCUMENT_NODE;)t.unshift(s),s=s.parentNode;return t}var k=s("./packages/ckeditor5-utils/src/dom/istext.ts"),b=s("./packages/ckeditor5-utils/src/dom/iscomment.ts");const _=(0,u.yl)(p.Z.document),w=(0,u.N3)(p.Z.document),v=(0,u.PQ)(p.Z.document),y="data-ck-unsafe-attribute-",Z="data-ck-unsafe-element";class P{constructor(e,t={}){this.document=e,this.renderingMode=t.renderingMode||"editing",this.blockFillerMode=t.blockFillerMode||("editing"===this.renderingMode?"br":"nbsp"),this.preElements=["pre"],this.blockElements=["address","article","aside","blockquote","caption","center","dd","details","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","legend","li","main","menu","nav","ol","p","pre","section","summary","table","tbody","td","tfoot","th","thead","tr","ul"],this.inlineObjectElements=["object","iframe","input","button","textarea","select","option","video","embed","audio","img","canvas"],this.unsafeElements=["script","style"],this._domDocument="editing"===this.renderingMode?p.Z.document:p.Z.document.implementation.createHTMLDocument(""),this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap,this._rawContentElementMatcher=new h.Z,this._encounteredRawContentDomNodes=new WeakSet}bindFakeSelection(e,t){this._fakeSelectionMapping.set(e,new c.Z(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.children))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}shouldRenderAttribute(e,t,s){return"data"===this.renderingMode||!(e=e.toLowerCase()).startsWith("on")&&(("srcdoc"!==e||!t.match(/\bon\S+\s*=|javascript:|<\s*\/*script/i))&&("img"===s&&("src"===e||"srcset"===e)||("source"===s&&"srcset"===e||!t.match(/^\s*(javascript:|data:(image\/svg|text\/x?html))/i))))}setContentOf(e,t){if("data"===this.renderingMode)return void(e.innerHTML=t);const s=(new DOMParser).parseFromString(t,"text/html"),o=s.createDocumentFragment(),i=s.body.childNodes;for(;i.length>0;)o.appendChild(i[0]);const r=s.createTreeWalker(o,NodeFilter.SHOW_ELEMENT),n=[];let a;for(;a=r.nextNode();)n.push(a);for(const e of n){for(const t of e.getAttributeNames())this.setDomElementAttribute(e,t,e.getAttribute(t));const t=e.tagName.toLowerCase();this._shouldRenameElement(t)&&(A(t),e.replaceWith(this._createReplacementDomElement(t,e)))}for(;e.firstChild;)e.firstChild.remove();e.append(o)}viewToDom(e,t={}){if(e.is("$text")){const t=this._processDataFromViewText(e);return this._domDocument.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let s;if(e.is("documentFragment"))s=this._domDocument.createDocumentFragment(),t.bind&&this.bindDocumentFragments(s,e);else{if(e.is("uiElement"))return s="$comment"===e.name?this._domDocument.createComment(e.getCustomProperty("$rawContent")):e.render(this._domDocument,this),t.bind&&this.bindElements(s,e),s;this._shouldRenameElement(e.name)?(A(e.name),s=this._createReplacementDomElement(e.name)):s=e.hasAttribute("xmlns")?this._domDocument.createElementNS(e.getAttribute("xmlns"),e.name):this._domDocument.createElement(e.name),e.is("rawElement")&&e.render(s,this),t.bind&&this.bindElements(s,e);for(const t of e.getAttributeKeys())this.setDomElementAttribute(s,t,e.getAttribute(t),e)}if(!1!==t.withChildren)for(const o of this.viewChildrenToDom(e,t))s.appendChild(o);return s}}setDomElementAttribute(e,t,s,o){const i=this.shouldRenderAttribute(t,s,e.tagName.toLowerCase())||o&&o.shouldRenderUnsafeAttribute(t);i||(0,g.KE)("domconverter-unsafe-attribute-detected",{domElement:e,key:t,value:s}),e.hasAttribute(t)&&!i?e.removeAttribute(t):e.hasAttribute(y+t)&&i&&e.removeAttribute(y+t),e.setAttribute(i?t:y+t,s)}removeDomElementAttribute(e,t){t!=Z&&(e.removeAttribute(t),e.removeAttribute(y+t))}*viewChildrenToDom(e,t={}){const s=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const i of e.getChildren()){s===o&&(yield this._getBlockFiller());const e=i.is("element")&&i.getCustomProperty("dataPipeline:transparentRendering");e&&"data"==this.renderingMode?yield*this.viewChildrenToDom(i,t):(e&&(0,g.KE)("domconverter-transparent-rendering-unsupported-in-editing-pipeline",{viewElement:i}),yield this.viewToDom(i,t)),o++}s===o&&(yield this._getBlockFiller())}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),s=this.viewPositionToDom(e.end),o=this._domDocument.createRange();return o.setStart(t.parent,t.offset),o.setEnd(s.parent,s.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is("$text")){const s=this.findCorrespondingDomText(t);if(!s)return null;let o=e.offset;return(0,u.Sw)(s)&&(o+=u.b_),{parent:s,offset:o}}{let s,o,i;if(0===e.offset){if(s=this.mapViewToDom(t),!s)return null;i=s.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is("$text")?this.findCorrespondingDomText(t):this.mapViewToDom(t),!o)return null;s=o.parentNode,i=o.nextSibling}if((0,k.Z)(i)&&(0,u.Sw)(i))return{parent:i,offset:u.b_};return{parent:s,offset:o?f(o)+1:0}}}domToView(e,t={}){if(this.isBlockFiller(e))return null;const s=this.getHostViewElement(e);if(s)return s;if((0,b.Z)(e)&&t.skipComments)return null;if((0,k.Z)(e)){if((0,u.Qh)(e))return null;{const t=this._processDataFromDomText(e);return""===t?null:new o.Z(this.document,t)}}{if(this.mapDomToView(e))return this.mapDomToView(e);let s;if(this.isDocumentFragment(e))s=new l.Z(this.document),t.bind&&this.bindDocumentFragments(e,s);else{s=this._createViewElement(e,t),t.bind&&this.bindElements(e,s);const o=e.attributes;if(o)for(let e=o.length,t=0;t{const{scrollLeft:t,scrollTop:s}=e;o.push([t,s])})),t.focus(),x(t,(e=>{const[t,s]=o.shift();e.scrollLeft=t,e.scrollTop=s})),p.Z.window.scrollTo(e,s)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(_):!("BR"!==e.tagName||!T(e,this.blockElements)||1!==e.parentNode.childNodes.length)||(e.isEqualNode(v)||function(e,t){return e.isEqualNode(w)&&T(e,t)&&1===e.parentNode.childNodes.length}(e,this.blockElements))}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=this._domDocument.createRange();try{t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset)}catch(e){return!1}const s=t.collapsed;return t.detach(),s}getHostViewElement(e){const t=m(e);for(t.pop();t.length;){const e=t.pop(),s=this._domToViewMapping.get(e);if(s&&(s.is("uiElement")||s.is("rawElement")))return s}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}registerRawContentMatcher(e){this._rawContentElementMatcher.add(e)}_getBlockFiller(){switch(this.blockFillerMode){case"nbsp":return(0,u.N3)(this._domDocument);case"markedNbsp":return(0,u.PQ)(this._domDocument);case"br":return(0,u.yl)(this._domDocument)}}_isDomSelectionPositionCorrect(e,t){if((0,k.Z)(e)&&(0,u.Sw)(e)&&tthis.preElements.includes(e.name))))return t;if(" "==t.charAt(0)){const s=this._getTouchingInlineViewNode(e,!1);!(s&&s.is("$textProxy")&&this._nodeEndsWithSpace(s))&&s||(t=" "+t.substr(1))}if(" "==t.charAt(t.length-1)){const s=this._getTouchingInlineViewNode(e,!0),o=s&&s.is("$textProxy")&&" "==s.data.charAt(0);" "!=t.charAt(t.length-2)&&s&&!o||(t=t.substr(0,t.length-1)+" ")}return t.replace(/ {2}/g,"  ")}_nodeEndsWithSpace(e){if(e.getAncestors().some((e=>this.preElements.includes(e.name))))return!1;const t=this._processDataFromViewText(e);return" "==t.charAt(t.length-1)}_processDataFromDomText(e){let t=e.data;if(function(e,t){return m(e).some((e=>e.tagName&&t.includes(e.tagName.toLowerCase())))}(e,this.preElements))return(0,u.th)(e);t=t.replace(/[ \n\t\r]{1,}/g," ");const s=this._getTouchingInlineDomNode(e,!1),o=this._getTouchingInlineDomNode(e,!0),i=this._checkShouldLeftTrimDomText(e,s),r=this._checkShouldRightTrimDomText(e,o);i&&(t=t.replace(/^ /,"")),r&&(t=t.replace(/ $/,"")),t=(0,u.th)(new Text(t)),t=t.replace(/ \u00A0/g," ");const n=o&&this.isElement(o)&&"BR"!=o.tagName,a=o&&(0,k.Z)(o)&&" "==o.data.charAt(0);return(/( |\u00A0)\u00A0$/.test(t)||!o||n||a)&&(t=t.replace(/\u00A0$/," ")),(i||s&&this.isElement(s)&&"BR"!=s.tagName)&&(t=t.replace(/^\u00A0/," ")),t}_checkShouldLeftTrimDomText(e,t){return!t||(this.isElement(t)?"BR"===t.tagName:!this._encounteredRawContentDomNodes.has(e.previousSibling)&&/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1)))}_checkShouldRightTrimDomText(e,t){return!t&&!(0,u.Sw)(e)}_getTouchingInlineViewNode(e,t){const s=new d.Z({startPosition:t?n.Z._createAfter(e):n.Z._createBefore(e),direction:t?"forward":"backward"});for(const e of s){if(e.item.is("element")&&this.inlineObjectElements.includes(e.item.name))return e.item;if(e.item.is("containerElement"))return null;if(e.item.is("element","br"))return null;if(e.item.is("$textProxy"))return e.item}return null}_getTouchingInlineDomNode(e,t){if(!e.parentNode)return null;const s=t?"firstChild":"lastChild",o=t?"nextSibling":"previousSibling";let i=!0,r=e;do{if(!i&&r[s]?r=r[s]:r[o]?(r=r[o],i=!1):(r=r.parentNode,i=!0),!r||this._isBlockElement(r))return null}while(!(0,k.Z)(r)&&"BR"!=r.tagName&&!this._isInlineObjectElement(r));return r}_isBlockElement(e){return this.isElement(e)&&this.blockElements.includes(e.tagName.toLowerCase())}_isInlineObjectElement(e){return this.isElement(e)&&this.inlineObjectElements.includes(e.tagName.toLowerCase())}_createViewElement(e,t){if((0,b.Z)(e))return new r.Z(this.document,"$comment");const s=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();return new i.Z(this.document,s)}_isViewElementWithRawContent(e,t){return!1!==t.withChildren&&!!this._rawContentElementMatcher.match(e)}_shouldRenameElement(e){const t=e.toLowerCase();return"editing"===this.renderingMode&&this.unsafeElements.includes(t)}_createReplacementDomElement(e,t){const s=this._domDocument.createElement("span");if(s.setAttribute(Z,e),t){for(;t.firstChild;)s.appendChild(t.firstChild);for(const e of t.getAttributeNames())s.setAttribute(e,t.getAttribute(e))}return s}}function x(e,t){let s=e;for(;s;)t(s),s=s.parentElement}function T(e,t){const s=e.parentNode;return!!s&&!!s.tagName&&t.includes(s.tagName.toLowerCase())}function A(e){"script"===e&&(0,g.KE)("domconverter-unsafe-script-element-detected"),"style"===e&&(0,g.KE)("domconverter-unsafe-style-element-detected")}},"./packages/ckeditor5-engine/src/view/downcastwriter.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>k});var o=s("./packages/ckeditor5-engine/src/view/position.ts"),i=s("./packages/ckeditor5-engine/src/view/range.ts"),r=s("./packages/ckeditor5-engine/src/view/selection.ts"),n=s("./packages/ckeditor5-engine/src/view/containerelement.ts"),a=s("./packages/ckeditor5-engine/src/view/attributeelement.ts"),c=s("./packages/ckeditor5-engine/src/view/emptyelement.ts"),l=s("./packages/ckeditor5-engine/src/view/uielement.ts"),d=s("./packages/ckeditor5-engine/src/view/rawelement.ts"),h=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),u=s("./packages/ckeditor5-engine/src/view/documentfragment.ts"),p=s("./packages/ckeditor5-utils/src/isiterable.ts"),g=s("./packages/ckeditor5-engine/src/view/text.ts"),f=s("./packages/ckeditor5-engine/src/view/editableelement.ts"),m=s("./node_modules/lodash-es/isPlainObject.js");class k{constructor(e){this.document=e,this._cloneGroups=new Map,this._slotFactory=null}setSelection(...e){this.document.selection._setTo(...e)}setSelectionFocus(...e){this.document.selection._setFocus(...e)}createDocumentFragment(e){return new u.Z(this.document,e)}createText(e){return new g.Z(this.document,e)}createAttributeElement(e,t,s={}){const o=new a.Z(this.document,e,t);return"number"==typeof s.priority&&(o._priority=s.priority),s.id&&(o._id=s.id),s.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...s.renderUnsafeAttributes),o}createContainerElement(e,t,s={},o={}){let i=null;(0,m.Z)(s)?o=s:i=s;const r=new n.Z(this.document,e,t,i);return o.renderUnsafeAttributes&&r._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),r}createEditableElement(e,t,s={}){const o=new f.Z(this.document,e,t);return s.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...s.renderUnsafeAttributes),o}createEmptyElement(e,t,s={}){const o=new c.Z(this.document,e,t);return s.renderUnsafeAttributes&&o._unsafeAttributesToRender.push(...s.renderUnsafeAttributes),o}createUIElement(e,t,s){const o=new l.Z(this.document,e,t);return s&&(o.render=s),o}createRawElement(e,t,s,o={}){const i=new d.Z(this.document,e,t);return s&&(i.render=s),o.renderUnsafeAttributes&&i._unsafeAttributesToRender.push(...o.renderUnsafeAttributes),i}setAttribute(e,t,s){s._setAttribute(e,t)}removeAttribute(e,t){t._removeAttribute(e)}addClass(e,t){t._addClass(e)}removeClass(e,t){t._removeClass(e)}setStyle(e,t,s){(0,m.Z)(e)&&void 0===s?t._setStyle(e):s._setStyle(e,t)}removeStyle(e,t){t._removeStyle(e)}setCustomProperty(e,t,s){s._setCustomProperty(e,t)}removeCustomProperty(e,t){return t._removeCustomProperty(e)}breakAttributes(e){return e instanceof o.Z?this._breakAttributes(e):this._breakAttributesRange(e)}breakContainer(e){const t=e.parent;if(!t.is("containerElement"))throw new h.ZP("view-writer-break-non-container-element",this.document);if(!t.parent)throw new h.ZP("view-writer-break-root",this.document);if(e.isAtStart)return o.Z._createBefore(t);if(!e.isAtEnd){const s=t._clone(!1);this.insert(o.Z._createAfter(t),s);const r=new i.Z(e,o.Z._createAt(t,"end")),n=new o.Z(s,0);this.move(r,n)}return o.Z._createAfter(t)}mergeAttributes(e){const t=e.offset,s=e.parent;if(s.is("$text"))return e;if(s.is("attributeElement")&&0===s.childCount){const e=s.parent,t=s.index;return s._remove(),this._removeFromClonedElementsGroup(s),this.mergeAttributes(new o.Z(e,t))}const i=s.getChild(t-1),r=s.getChild(t);if(!i||!r)return e;if(i.is("$text")&&r.is("$text"))return y(i,r);if(i.is("attributeElement")&&r.is("attributeElement")&&i.isSimilar(r)){const e=i.childCount;return i._appendChild(r.getChildren()),r._remove(),this._removeFromClonedElementsGroup(r),this.mergeAttributes(new o.Z(i,e))}return e}mergeContainers(e){const t=e.nodeBefore,s=e.nodeAfter;if(!(t&&s&&t.is("containerElement")&&s.is("containerElement")))throw new h.ZP("view-writer-merge-containers-invalid-position",this.document);const r=t.getChild(t.childCount-1),n=r instanceof g.Z?o.Z._createAt(r,"end"):o.Z._createAt(t,"end");return this.move(i.Z._createIn(s),o.Z._createAt(t,"end")),this.remove(i.Z._createOn(s)),n}insert(e,t){P(t=(0,p.Z)(t)?[...t]:[t],this.document);const s=t.reduce(((e,t)=>{const s=e[e.length-1],o=!t.is("uiElement");return s&&s.breakAttributes==o?s.nodes.push(t):e.push({breakAttributes:o,nodes:[t]}),e}),[]);let o=null,r=e;for(const{nodes:e,breakAttributes:t}of s){const s=this._insertNodes(r,e,t);o||(o=s.start),r=s.end}return o?new i.Z(o,r):new i.Z(e)}remove(e){const t=e instanceof i.Z?e:i.Z._createOn(e);if(T(t,this.document),t.isCollapsed)return new u.Z(this.document);const{start:s,end:o}=this._breakAttributesRange(t,!0),r=s.parent,n=o.offset-s.offset,a=r._removeChildren(s.offset,n);for(const e of a)this._removeFromClonedElementsGroup(e);const c=this.mergeAttributes(s);return t.start=c,t.end=c.clone(),new u.Z(this.document,a)}clear(e,t){T(e,this.document);const s=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const o of s){const s=o.item;let r;if(s.is("element")&&t.isSimilar(s))r=i.Z._createOn(s);else if(!o.nextPosition.isAfter(e.start)&&s.is("$textProxy")){const e=s.getAncestors().find((e=>e.is("element")&&t.isSimilar(e)));e&&(r=i.Z._createIn(e))}r&&(r.end.isAfter(e.end)&&(r.end=e.end),r.start.isBefore(e.start)&&(r.start=e.start),this.remove(r))}}move(e,t){let s;if(t.isAfter(e.end)){const o=(t=this._breakAttributes(t,!0)).parent,i=o.childCount;e=this._breakAttributesRange(e,!0),s=this.remove(e),t.offset+=o.childCount-i}else s=this.remove(e);return this.insert(t,s)}wrap(e,t){if(!(t instanceof a.Z))throw new h.ZP("view-writer-wrap-invalid-attribute",this.document);if(T(e,this.document),e.isCollapsed){let o=e.start;o.parent.is("element")&&(s=o.parent,!Array.from(s.getChildren()).some((e=>!e.is("uiElement"))))&&(o=o.getLastMatchingPosition((e=>e.item.is("uiElement")))),o=this._wrapPosition(o,t);const r=this.document.selection;return r.isCollapsed&&r.getFirstPosition().isEqual(e.start)&&this.setSelection(o),new i.Z(o)}return this._wrapRange(e,t);var s}unwrap(e,t){if(!(t instanceof a.Z))throw new h.ZP("view-writer-unwrap-invalid-attribute",this.document);if(T(e,this.document),e.isCollapsed)return e;const{start:s,end:o}=this._breakAttributesRange(e,!0),r=s.parent,n=this._unwrapChildren(r,s.offset,o.offset,t),c=this.mergeAttributes(n.start);c.isEqual(n.start)||n.end.offset--;const l=this.mergeAttributes(n.end);return new i.Z(c,l)}rename(e,t){const s=new n.Z(this.document,e,t.getAttributes());return this.insert(o.Z._createAfter(t),s),this.move(i.Z._createIn(t),o.Z._createAt(s,0)),this.remove(i.Z._createOn(t)),s}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,t){return o.Z._createAt(e,t)}createPositionAfter(e){return o.Z._createAfter(e)}createPositionBefore(e){return o.Z._createBefore(e)}createRange(...e){return new i.Z(...e)}createRangeOn(e){return i.Z._createOn(e)}createRangeIn(e){return i.Z._createIn(e)}createSelection(...e){return new r.Z(...e)}createSlot(e){if(!this._slotFactory)throw new h.ZP("view-writer-invalid-create-slot-context",this.document);return this._slotFactory(this,e)}_registerSlotFactory(e){this._slotFactory=e}_clearSlotFactory(){this._slotFactory=null}_insertNodes(e,t,s){let o,r;if(o=s?b(e):e.parent.is("$text")?e.parent.parent:e.parent,!o)throw new h.ZP("view-writer-invalid-position-container",this.document);r=s?this._breakAttributes(e,!0):e.parent.is("$text")?v(e):e;const n=o._insertChild(r.offset,t);for(const e of t)this._addToClonedElementsGroup(e);const a=r.getShiftedBy(n),c=this.mergeAttributes(r);c.isEqual(r)||a.offset--;const l=this.mergeAttributes(a);return new i.Z(c,l)}_wrapChildren(e,t,s,r){let n=t;const a=[];for(;n!1,e.parent._insertChild(e.offset,s);const r=new i.Z(e,e.getShiftedBy(1));this.wrap(r,t);const n=new o.Z(s.parent,s.index);s._remove();const a=n.nodeBefore,c=n.nodeAfter;return a instanceof g.Z&&c instanceof g.Z?y(a,c):w(n)}_wrapAttributeElement(e,t){if(!A(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const s of e.getAttributeKeys())if("class"!==s&&"style"!==s&&t.hasAttribute(s)&&t.getAttribute(s)!==e.getAttribute(s))return!1;for(const s of e.getStyleNames())if(t.hasStyle(s)&&t.getStyle(s)!==e.getStyle(s))return!1;for(const s of e.getAttributeKeys())"class"!==s&&"style"!==s&&(t.hasAttribute(s)||this.setAttribute(s,e.getAttribute(s),t));for(const s of e.getStyleNames())t.hasStyle(s)||this.setStyle(s,e.getStyle(s),t);for(const s of e.getClassNames())t.hasClass(s)||this.addClass(s,t);return!0}_unwrapAttributeElement(e,t){if(!A(e,t))return!1;if(e.name!==t.name||e.priority!==t.priority)return!1;for(const s of e.getAttributeKeys())if("class"!==s&&"style"!==s&&(!t.hasAttribute(s)||t.getAttribute(s)!==e.getAttribute(s)))return!1;if(!t.hasClass(...e.getClassNames()))return!1;for(const s of e.getStyleNames())if(!t.hasStyle(s)||t.getStyle(s)!==e.getStyle(s))return!1;for(const s of e.getAttributeKeys())"class"!==s&&"style"!==s&&this.removeAttribute(s,t);return this.removeClass(Array.from(e.getClassNames()),t),this.removeStyle(Array.from(e.getStyleNames()),t),!0}_breakAttributesRange(e,t=!1){const s=e.start,o=e.end;if(T(e,this.document),e.isCollapsed){const s=this._breakAttributes(e.start,t);return new i.Z(s,s)}const r=this._breakAttributes(o,t),n=r.parent.childCount,a=this._breakAttributes(s,t);return r.offset+=r.parent.childCount-n,new i.Z(a,r)}_breakAttributes(e,t=!1){const s=e.offset,i=e.parent;if(e.parent.is("emptyElement"))throw new h.ZP("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new h.ZP("view-writer-cannot-break-ui-element",this.document);if(e.parent.is("rawElement"))throw new h.ZP("view-writer-cannot-break-raw-element",this.document);if(!t&&i.is("$text")&&x(i.parent))return e.clone();if(x(i))return e.clone();if(i.is("$text"))return this._breakAttributes(v(e),t);if(s==i.childCount){const e=new o.Z(i.parent,i.index+1);return this._breakAttributes(e,t)}if(0===s){const e=new o.Z(i.parent,i.index);return this._breakAttributes(e,t)}{const e=i.index+1,r=i._clone();i.parent._insertChild(e,r),this._addToClonedElementsGroup(r);const n=i.childCount-s,a=i._removeChildren(s,n);r._appendChild(a);const c=new o.Z(i.parent,e);return this._breakAttributes(c,t)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const t of e.getChildren())this._addToClonedElementsGroup(t);const t=e.id;if(!t)return;let s=this._cloneGroups.get(t);s||(s=new Set,this._cloneGroups.set(t,s)),s.add(e),e._clonesGroup=s}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const t of e.getChildren())this._removeFromClonedElementsGroup(t);const t=e.id;if(!t)return;const s=this._cloneGroups.get(t);s&&s.delete(e)}}function b(e){let t=e.parent;for(;!x(t);){if(!t)return;t=t.parent}return t}function _(e,t){return e.priorityt.priority)&&e.getIdentity()s instanceof e)))throw new h.ZP("view-writer-insert-invalid-node-type",t);s.is("$text")||P(s.getChildren(),t)}}function x(e){return e&&(e.is("containerElement")||e.is("documentFragment"))}function T(e,t){const s=b(e.start),o=b(e.end);if(!s||!o||s!==o)throw new h.ZP("view-writer-invalid-range-container",t)}function A(e,t){return null===e.id&&null===t.id}},"./packages/ckeditor5-engine/src/view/editableelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/containerelement.ts"),i=s("./packages/ckeditor5-utils/src/observablemixin.ts");class r extends((0,i.Z)(o.Z)){constructor(...e){super(...e);const t=e[0];this.set("isReadOnly",!1),this.set("isFocused",!1),this.bind("isReadOnly").to(t),this.bind("isFocused").to(t,"isFocused",(e=>e&&t.selection.editableElement==this)),this.listenTo(t.selection,"change",(()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this}))}destroy(){this.stopListening()}}r.prototype.is=function(e,t){return t?t===this.name&&("editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e):"editableElement"===e||"view:editableElement"===e||"containerElement"===e||"view:containerElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/element.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-engine/src/view/node.ts"),i=s("./packages/ckeditor5-engine/src/view/text.ts"),r=s("./packages/ckeditor5-engine/src/view/textproxy.ts"),n=s("./packages/ckeditor5-utils/src/tomap.ts"),a=s("./packages/ckeditor5-utils/src/toarray.ts"),c=s("./packages/ckeditor5-utils/src/isiterable.ts"),l=s("./packages/ckeditor5-engine/src/view/matcher.ts"),d=s("./packages/ckeditor5-engine/src/view/stylesmap.ts"),h=s("./node_modules/lodash-es/isPlainObject.js");class u extends o.Z{constructor(e,t,s,o){if(super(e),this.name=t,this._attrs=function(e){const t=(0,n.Z)(e);for(const[e,s]of t)null===s?t.delete(e):"string"!=typeof s&&t.set(e,String(s));return t}(s),this._children=[],o&&this._insertChild(0,o),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");p(this._classes,e),this._attrs.delete("class")}this._styles=new d.Z(this.document.stylesProcessor),this._attrs.has("style")&&(this._styles.setTo(this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map,this._unsafeAttributesToRender=[]}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){this._classes.size>0&&(yield"class"),this._styles.isEmpty||(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.isEmpty||(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"==e){const e=this._styles.toString();return""==e?void 0:e}return this._attrs.get(e)}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?!this._styles.isEmpty:this._attrs.has(e)}isSimilar(e){if(!(e instanceof u))return!1;if(this===e)return!0;if(this.name!=e.name)return!1;if(this._attrs.size!==e._attrs.size||this._classes.size!==e._classes.size||this._styles.size!==e._styles.size)return!1;for(const[t,s]of this._attrs)if(!e._attrs.has(t)||e._attrs.get(t)!==s)return!1;for(const t of this._classes)if(!e._classes.has(t))return!1;for(const t of this._styles.getStyleNames())if(!e._styles.has(t)||e._styles.getAsString(t)!==this._styles.getAsString(t))return!1;return!0}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.getAsString(e)}getNormalizedStyle(e){return this._styles.getNormalized(e)}getStyleNames(e){return this._styles.getStyleNames(e)}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}findAncestor(...e){const t=new l.Z(...e);let s=this.parent;for(;s&&!s.is("documentFragment");){if(t.match(s))return s;s=s.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),t=this._styles.toString(),s=Array.from(this._attrs).map((e=>`${e[0]}="${e[1]}"`)).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(t?` style="${t}"`:"")+(""==s?"":` ${s}`)}shouldRenderUnsafeAttribute(e){return this._unsafeAttributesToRender.includes(e)}_clone(e=!1){const t=[];if(e)for(const s of this.getChildren())t.push(s._clone(e));const s=new this.constructor(this.document,this.name,this._attrs,t);return s._classes=new Set(this._classes),s._styles.set(this._styles.getNormalized()),s._customProperties=new Map(this._customProperties),s.getFillerOffset=this.getFillerOffset,s._unsafeAttributesToRender=this._unsafeAttributesToRender,s}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,t){this._fireChange("children",this);let s=0;const o=function(e,t){if("string"==typeof t)return[new i.Z(e,t)];(0,c.Z)(t)||(t=[t]);return Array.from(t).map((t=>"string"==typeof t?new i.Z(e,t):t instanceof r.Z?new i.Z(e,t.data):t))}(this.document,t);for(const t of o)null!==t.parent&&t._remove(),t.parent=this,t.document=this.document,this._children.splice(e,0,t),e++,s++;return s}_removeChildren(e,t=1){this._fireChange("children",this);for(let s=e;s0&&(this._classes.clear(),!0):"style"==e?!this._styles.isEmpty&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this);for(const t of(0,a.Z)(e))this._classes.add(t)}_removeClass(e){this._fireChange("attributes",this);for(const t of(0,a.Z)(e))this._classes.delete(t)}_setStyle(e,t){this._fireChange("attributes",this),(0,h.Z)(e)?this._styles.set(e):this._styles.set(e,t)}_removeStyle(e){this._fireChange("attributes",this);for(const t of(0,a.Z)(e))this._styles.remove(t)}_setCustomProperty(e,t){this._customProperties.set(e,t)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function p(e,t){const s=t.split(/\s+/);e.clear(),s.forEach((t=>e.add(t)))}u.prototype.is=function(e,t){return t?t===this.name&&("element"===e||"view:element"===e):"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/emptyelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/node.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends o.Z{constructor(e,t,s,o){super(e,t,s,o),this.getFillerOffset=a}_insertChild(e,t){if(t&&(t instanceof i.Z||Array.from(t).length>0))throw new r.ZP("view-emptyelement-cannot-add",[this,t]);return 0}}function a(){return null}n.prototype.is=function(e,t){return t?t===this.name&&("emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e):"emptyElement"===e||"view:emptyElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/filler.ts":(e,t,s)=>{"use strict";s.d(t,{N3:()=>r,PQ:()=>n,Pj:()=>l,Qh:()=>h,Sw:()=>d,b_:()=>c,mm:()=>p,th:()=>u,yl:()=>a});var o=s("./packages/ckeditor5-utils/src/keyboard.ts"),i=s("./packages/ckeditor5-utils/src/dom/istext.ts");const r=e=>e.createTextNode(" "),n=e=>{const t=e.createElement("span");return t.dataset.ckeFiller="true",t.innerText=" ",t},a=e=>{const t=e.createElement("br");return t.dataset.ckeFiller="true",t},c=7,l="⁠".repeat(c);function d(e){return(0,i.Z)(e)&&e.data.substr(0,c)===l}function h(e){return e.data.length==c&&d(e)}function u(e){return d(e)?e.data.slice(c):e.data}function p(e){e.document.on("arrowKey",g,{priority:"low"})}function g(e,t){if(t.keyCode==o.Do.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,s=e.getRangeAt(0).startOffset;d(t)&&s<=c&&e.collapse(t,0)}}}},"./packages/ckeditor5-engine/src/view/matcher.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/isPlainObject.js"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let t of e)("string"==typeof t||t instanceof RegExp)&&(t={name:t}),this._patterns.push(t)}match(...e){for(const t of e)for(const e of this._patterns){const s=n(t,e);if(s)return{element:t,pattern:e,match:s}}return null}matchAll(...e){const t=[];for(const s of e)for(const e of this._patterns){const o=n(s,e);o&&t.push({element:s,pattern:e,match:o})}return t.length>0?t:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],t=e.name;return"function"==typeof e||!t||t instanceof RegExp?null:t}}function n(e,t){if("function"==typeof t)return t(e);const s={};return t.name&&(s.name=function(e,t){if(e instanceof RegExp)return!!t.match(e);return e===t}(t.name,e.name),!s.name)||t.attributes&&(s.attributes=function(e,t){const s=new Set(t.getAttributeKeys());(0,o.Z)(e)?(void 0!==e.style&&(0,i.KE)("matcher-pattern-deprecated-attributes-style-key",e),void 0!==e.class&&(0,i.KE)("matcher-pattern-deprecated-attributes-class-key",e)):(s.delete("style"),s.delete("class"));return a(e,s,(e=>t.getAttribute(e)))}(t.attributes,e),!s.attributes)||t.classes&&(s.classes=function(e,t){return a(e,t.getClassNames(),(()=>{}))}(t.classes,e),!s.classes)||t.styles&&(s.styles=function(e,t){return a(e,t.getStyleNames(!0),(e=>t.getStyle(e)))}(t.styles,e),!s.styles)?null:s}function a(e,t,s){const r=function(e){if(Array.isArray(e))return e.map((e=>(0,o.Z)(e)?(void 0!==e.key&&void 0!==e.value||(0,i.KE)("matcher-pattern-missing-key-or-value",e),[e.key,e.value]):[e,!0]));if((0,o.Z)(e))return Object.entries(e);return[[e,!0]]}(e),n=Array.from(t),a=[];if(r.forEach((([e,t])=>{n.forEach((o=>{(function(e,t){return!0===e||e===t||e instanceof RegExp&&t.match(e)})(e,o)&&function(e,t,s){if(!0===e)return!0;const o=s(t);return e===o||e instanceof RegExp&&!!String(o).match(e)}(t,o,s)&&a.push(o)}))})),r.length&&!(a.length{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/emittermixin.ts"),n=s("./packages/ckeditor5-utils/src/comparearrays.ts"),a=s("./node_modules/lodash-es/clone.js");s("./packages/ckeditor5-utils/src/version.ts");class c extends((0,r.ZP)(o.Z)){constructor(e){super(),this.document=e,this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new i.ZP("view-node-not-found-in-parent",this);return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}isAttached(){return this.root.is("rootElement")}getPath(){const e=[];let t=this;for(;t.parent;)e.unshift(t.index),t=t.parent;return e}getAncestors(e={}){const t=[];let s=e.includeSelf?this:this.parent;for(;s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}getCommonAncestor(e,t={}){const s=this.getAncestors(t),o=e.getAncestors(t);let i=0;for(;s[i]==o[i]&&s[i];)i++;return 0===i?null:s[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const t=this.getPath(),s=e.getPath(),o=(0,n.Z)(t,s);switch(o){case"prefix":return!0;case"extension":return!1;default:return t[o]{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/eventinfo.ts");class i extends o.Z{constructor(e,t,s){super(e,t),this.startRange=s,this._eventPhase="none",this._currentTarget=null}get eventPhase(){return this._eventPhase}get currentTarget(){return this._currentTarget}}},"./packages/ckeditor5-engine/src/view/observer/domeventdata.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/assignIn.js");class i{constructor(e,t,s){this.view=e,this.document=e.document,this.domEvent=t,this.domTarget=t.target,(0,o.Z)(this,s)}get target(){return this.view.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}},"./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),i=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts");class r extends o.Z{constructor(e){super(e),this.useCapture=!1}observe(e){("string"==typeof this.domEventType?[this.domEventType]:this.domEventType).forEach((t=>{this.listenTo(e,t,((e,t)=>{this.isEnabled&&!this.checkShouldIgnoreEventFromTarget(t.target)&&this.onDomEvent(t)}),{useCapture:this.useCapture})}))}fire(e,t,s){this.isEnabled&&this.document.fire(e,new i.Z(this.view,t,s))}}},"./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts");class i extends o.Z{constructor(e){super(e),this.domEventType=["mousedown","mouseup","mouseover","mouseout"]}onDomEvent(e){this.fire(e.type,e)}}},"./packages/ckeditor5-engine/src/view/observer/observer.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts");class i extends o.Q{constructor(e){super(),this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}checkShouldIgnoreEventFromTarget(e){return e&&3===e.nodeType&&(e=e.parentNode),!(!e||1!==e.nodeType)&&e.matches("[data-cke-ignore-events], [data-cke-ignore-events] *")}}},"./packages/ckeditor5-engine/src/view/position.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/comparearrays.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-engine/src/view/editableelement.ts"),a=(s("./packages/ckeditor5-utils/src/version.ts"),s("./packages/ckeditor5-engine/src/view/treewalker.ts"));class c extends o.Z{constructor(e,t){super(),this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is("$text")?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is("$text")?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is("$text")?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof n.Z);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const t=c._createAt(this),s=t.offset+e;return t.offset=s<0?0:s,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const s=new a.Z(t);return s.skip(e),s.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),s=e.getAncestors();let o=0;for(;t[o]==s[o]&&t[o];)o++;return 0===o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return"before"==this.compareWith(e)}isAfter(e){return"after"==this.compareWith(e)}compareWith(e){if(this.root!==e.root)return"different";if(this.isEqual(e))return"same";const t=this.parent.is("node")?this.parent.getPath():[],s=e.parent.is("node")?e.parent.getPath():[];t.push(this.offset),s.push(e.offset);const o=(0,i.Z)(t,s);switch(o){case"prefix":return"before";case"extension":return"after";default:return t[o]{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/position.ts"),r=s("./packages/ckeditor5-engine/src/view/treewalker.ts");class n extends o.Z{constructor(e,t=null){super(),this.start=e.clone(),this.end=t?t.clone():e.clone()}*[Symbol.iterator](){yield*new r.Z({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(a,{direction:"backward"}),t=this.end.getLastMatchingPosition(a);return e.parent.is("$text")&&e.isAtStart&&(e=i.Z._createBefore(e.parent)),t.parent.is("$text")&&t.isAtEnd&&(t=i.Z._createAfter(t.parent)),new n(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(a);if(e.isAfter(this.end)||e.isEqual(this.end))return new n(e,e);let t=this.end.getLastMatchingPosition(a,{direction:"backward"});const s=e.nodeAfter,o=t.nodeBefore;return s&&s.is("$text")&&(e=new i.Z(s,0)),o&&o.is("$text")&&(t=new i.Z(o,o.data.length)),new n(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const s=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return s&&o}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new n(this.start,e.start)),this.containsPosition(e.end)&&t.push(new n(e.end,this.end))):t.push(this.clone()),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,s=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(s=e.end),new n(t,s)}return null}getWalker(e={}){return e.boundaries=this,new r.Z(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}getContainedElement(){if(this.isCollapsed)return null;let e=this.start.nodeAfter,t=this.end.nodeBefore;return this.start.parent.is("$text")&&this.start.isAtEnd&&this.start.parent.nextSibling&&(e=this.start.parent.nextSibling),this.end.parent.is("$text")&&this.end.isAtStart&&this.end.parent.previousSibling&&(t=this.end.parent.previousSibling),e&&e.is("element")&&e===t?e:null}clone(){return new n(this.start,this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new r.Z(e);for(const e of t)yield e.item}*getPositions(e={}){e.boundaries=this;const t=new r.Z(e);yield t.position;for(const e of t)yield e.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static _createFromParentsAndOffsets(e,t,s,o){return new this(new i.Z(e,t),new i.Z(s,o))}static _createFromPositionAndShift(e,t){const s=e,o=e.getShiftedBy(t);return t>0?new this(s,o):new this(o,s)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const t=e.is("$textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(i.Z._createBefore(e),t)}}function a(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}n.prototype.is=function(e){return"range"===e||"view:range"===e}},"./packages/ckeditor5-engine/src/view/rawelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/node.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends o.Z{constructor(...e){super(...e),this.getFillerOffset=a}_insertChild(e,t){if(t&&(t instanceof i.Z||Array.from(t).length>0))throw new r.ZP("view-rawelement-cannot-add",[this,t]);return 0}render(){}}function a(){return null}n.prototype.is=function(e,t){return t?t===this.name&&("rawElement"===e||"view:rawElement"===e||"element"===e||"view:element"===e):"rawElement"===e||"view:rawElement"===e||e===this.name||e==="view:"+this.name||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/renderer.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>w});var o=s("./packages/ckeditor5-engine/src/view/text.ts"),i=s("./packages/ckeditor5-engine/src/view/position.ts"),r=s("./packages/ckeditor5-engine/src/view/filler.ts"),n=s("./packages/ckeditor5-utils/src/diff.ts");function a(e,t,s){e.insertBefore(s,e.childNodes[t]||null)}function c(e){const t=e.parentNode;t&&t.removeChild(e)}var l=s("./packages/ckeditor5-utils/src/observablemixin.ts"),d=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),h=s("./packages/ckeditor5-utils/src/dom/istext.ts"),u=s("./packages/ckeditor5-utils/src/dom/iscomment.ts"),p=s("./packages/ckeditor5-utils/src/dom/isnode.ts"),g=s("./packages/ckeditor5-utils/src/fastdiff.ts"),f=s("./packages/ckeditor5-utils/src/env.ts"),m=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),k=s.n(m),b=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-engine/theme/renderer.css"),_={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};k()(b.Z,_);b.Z.locals;class w extends l.y{constructor(e,t){super(),this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this.set("isFocused",!1),this.set("isSelecting",!1),f.ZP.isBlink&&!f.ZP.isAndroid&&this.on("change:isSelecting",(()=>{this.isSelecting||this.render()})),this.set("isComposing",!1),this.on("change:isComposing",(()=>{this.isComposing||this.render()})),this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,t){if("text"===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if("attributes"===e)this.markedAttributes.add(t);else{if("children"!==e)throw new d.ZP("view-renderer-unknown-type",this);this.markedChildren.add(t)}}}render(){if(this.isComposing&&!f.ZP.isAndroid)return;let e=null;const t=!(f.ZP.isBlink&&!f.ZP.isAndroid)||!this.isSelecting;for(const e of this.markedChildren)this._updateChildrenMappings(e);t?(this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent))):this._inlineFiller&&this._inlineFiller.parentNode&&(e=this.domConverter.domPositionToView(this._inlineFiller),e&&e.parent.is("$text")&&(e=i.Z._createBefore(e.parent)));for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});if(t)if(e){const t=this.domConverter.viewPositionToDom(e),s=t.parent.ownerDocument;(0,r.Sw)(t.parent)?this._inlineFiller=t.parent:this._inlineFiller=v(s,t.parent,t.offset)}else this._inlineFiller=null;this._updateFocus(),this._updateSelection(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){if(!this.domConverter.mapViewToDom(e))return;const t=Array.from(this.domConverter.mapViewToDom(e).childNodes),s=Array.from(this.domConverter.viewChildrenToDom(e,{withChildren:!1})),o=this._diffNodeLists(t,s),i=this._findReplaceActions(o,t,s);if(-1!==i.indexOf("replace")){const o={equal:0,insert:0,delete:0};for(const r of i)if("replace"===r){const i=o.equal+o.insert,r=o.equal+o.delete,n=e.getChild(i);!n||n.is("uiElement")||n.is("rawElement")||this._updateElementMappings(n,t[r]),c(s[i]),o.equal++}else o[r]++}}_updateElementMappings(e,t){this.domConverter.unbindDomElement(t),this.domConverter.bindElements(t,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("$text")?i.Z._createBefore(e.parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return!!(t&&(0,h.Z)(t.parent)&&(0,r.Sw)(t.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!(0,r.Sw)(e))throw new d.ZP("view-renderer-filler-was-lost",this);(0,r.Qh)(e)?e.remove():e.data=e.data.substr(r.b_),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,s=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is("element"))return!1;if(!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const t=e.findAncestor((e=>e.hasAttribute("contenteditable")));return!t||"true"==t.getAttribute("contenteditable")}(t))return!1;if(s===t.getFillerOffset())return!1;const i=e.nodeBefore,r=e.nodeAfter;return!(i instanceof o.Z||r instanceof o.Z)&&(!f.ZP.isAndroid||!i&&!r)}_updateText(e,t){const s=this.domConverter.findCorrespondingDomText(e);let o=this.domConverter.viewToDom(e).data;const i=t.inlineFillerPosition;i&&i.parent==e.parent&&i.offset==e.index&&(o=r.Pj+o),x(s,o)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e);if(!t)return;const s=Array.from(t.attributes).map((e=>e.name)),o=e.getAttributeKeys();for(const s of o)this.domConverter.setDomElementAttribute(t,s,e.getAttribute(s),e);for(const o of s)e.hasAttribute(o)||this.domConverter.removeDomElementAttribute(t,o)}_updateChildren(e,t){const s=this.domConverter.mapViewToDom(e);if(!s)return;if(f.ZP.isAndroid){let e=null;for(const t of Array.from(s.childNodes)){if(e&&(0,h.Z)(e)&&(0,h.Z)(t)){s.normalize();break}e=t}}const o=t.inlineFillerPosition,i=s.childNodes,r=Array.from(this.domConverter.viewChildrenToDom(e,{bind:!0}));o&&o.parent===e&&v(s.ownerDocument,r,o.offset);const n=this._diffNodeLists(i,r),l=f.ZP.isAndroid?this._findReplaceActions(n,i,r,{replaceText:!0}):n;let d=0;const u=new Set;for(const e of l)"delete"===e?(u.add(i[d]),c(i[d])):"equal"!==e&&"replace"!==e||d++;d=0;for(const e of l)"insert"===e?(a(s,d,r[d]),d++):"replace"===e?(x(i[d],r[d].data),d++):"equal"===e&&(this._markDescendantTextToSync(this.domConverter.domToView(r[d])),d++);for(const e of u)e.parentNode||this.domConverter.unbindDomElement(e)}_diffNodeLists(e,t){return e=function(e,t){const s=Array.from(e);if(0==s.length||!t)return s;s[s.length-1]==t&&s.pop();return s}(e,this._fakeSelectionContainer),(0,n.Z)(e,t,P.bind(null,this.domConverter))}_findReplaceActions(e,t,s,o={}){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let i=[],r=[],a=[];const c={equal:0,insert:0,delete:0};for(const l of e)"insert"===l?a.push(s[c.equal+c.insert]):"delete"===l?r.push(t[c.equal+c.delete]):(i=i.concat((0,n.Z)(r,a,o.replaceText?Z:y).map((e=>"equal"===e?"replace":e))),i.push("equal"),r=[],a=[]),c[l]++;return i.concat((0,n.Z)(r,a,o.replaceText?Z:y).map((e=>"equal"===e?"replace":e)))}_markDescendantTextToSync(e){if(e)if(e.is("$text"))this.markedTexts.add(e);else if(e.is("element"))for(const t of e.getChildren())this._markDescendantTextToSync(t)}_updateSelection(){if(f.ZP.isBlink&&!f.ZP.isAndroid&&this.isSelecting&&!this.markedChildren.size)return;if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):this._fakeSelectionContainer&&this._fakeSelectionContainer.isConnected?(this._removeFakeSelection(),this._updateDomSelection(e)):this.isComposing&&f.ZP.isAndroid||this._updateDomSelection(e))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const t=e.createElement("div");return t.className="ck-fake-selection-container",Object.assign(t.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),t.textContent=" ",t}(t));const s=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(s,this.selection),!this._fakeSelectionNeedsUpdate(e))return;s.parentElement&&s.parentElement==e||e.appendChild(s),s.textContent=this.selection.fakeSelectionLabel||" ";const o=t.getSelection(),i=t.createRange();o.removeAllRanges(),i.selectNodeContents(s),o.addRange(i)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(t))return;const s=this.domConverter.viewPositionToDom(this.selection.anchor),o=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(s.parent,s.offset),t.extend(o.parent,o.offset),f.ZP.isGecko&&function(e,t){const s=e.parent;if(s.nodeType!=Node.ELEMENT_NODE||e.offset!=s.childNodes.length-1)return;const o=s.childNodes[e.offset];o&&"BR"==o.tagName&&t.addRange(t.getRangeAt(0))}(o,t)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return(!t||!this.selection.isEqual(t))&&!(!this.selection.isCollapsed&&this.selection.isSimilar(t))}_fakeSelectionNeedsUpdate(e){const t=this._fakeSelectionContainer,s=e.ownerDocument.getSelection();return!t||t.parentElement!==e||(s.anchorNode!==t&&!t.contains(s.anchorNode)||t.textContent!==this.selection.fakeSelectionLabel)}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const s=e.activeElement,o=this.domConverter.mapDomToView(s);s&&o&&t.removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function v(e,t,s){const o=t instanceof Array?t:t.childNodes,i=o[s];if((0,h.Z)(i))return i.data=r.Pj+i.data,i;{const i=e.createTextNode(r.Pj);return Array.isArray(t)?o.splice(s,0,i):a(t,s,i),i}}function y(e,t){return(0,p.Z)(e)&&(0,p.Z)(t)&&!(0,h.Z)(e)&&!(0,h.Z)(t)&&!(0,u.Z)(e)&&!(0,u.Z)(t)&&e.tagName.toLowerCase()===t.tagName.toLowerCase()}function Z(e,t){return(0,p.Z)(e)&&(0,p.Z)(t)&&(0,h.Z)(e)&&(0,h.Z)(t)}function P(e,t,s){return t===s||((0,h.Z)(t)&&(0,h.Z)(s)?t.data===s.data:!(!e.isBlockFiller(t)||!e.isBlockFiller(s)))}function x(e,t){const s=e.data;if(s==t)return;const o=(0,g.Z)(s,t);for(const t of o)"insert"===t.type?e.insertData(t.index,t.values.join("")):e.deleteData(t.index,t.howMany)}},"./packages/ckeditor5-engine/src/view/selection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-engine/src/view/range.ts"),r=s("./packages/ckeditor5-engine/src/view/position.ts"),n=s("./packages/ckeditor5-engine/src/view/node.ts"),a=s("./packages/ckeditor5-engine/src/view/documentselection.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),l=s("./packages/ckeditor5-utils/src/count.ts"),d=s("./packages/ckeditor5-utils/src/isiterable.ts"),h=s("./packages/ckeditor5-utils/src/emittermixin.ts");class u extends((0,h.ZP)(o.Z)){constructor(...e){super(),this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",e.length&&this.setTo(...e)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.end:e.start).clone()}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1];return(this._lastRangeBackward?e.start:e.end).clone()}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}*getRanges(){for(const e of this._ranges)yield e.clone()}getFirstRange(){let e=null;for(const t of this._ranges)e&&!t.start.isBefore(e.start)||(e=t);return e?e.clone():null}getLastRange(){let e=null;for(const t of this._ranges)e&&!t.end.isAfter(e.end)||(e=t);return e?e.clone():null}getFirstPosition(){const e=this.getFirstRange();return e?e.start.clone():null}getLastPosition(){const e=this.getLastRange();return e?e.end.clone():null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let s=!1;for(const o of e._ranges)if(t.isEqual(o)){s=!0;break}if(!s)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=(0,l.Z)(this.getRanges());if(t!=(0,l.Z)(e.getRanges()))return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let s=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){s=!0;break}if(!s)return!1}return!0}getSelectedElement(){return 1!==this.rangeCount?null:this.getFirstRange().getContainedElement()}setTo(...e){let[t,s,o]=e;if("object"==typeof s&&(o=s,s=void 0),null===t)this._setRanges([]),this._setFakeOptions(o);else if(t instanceof u||t instanceof a.Z)this._setRanges(t.getRanges(),t.isBackward),this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel});else if(t instanceof i.Z)this._setRanges([t],o&&o.backward),this._setFakeOptions(o);else if(t instanceof r.Z)this._setRanges([new i.Z(t)]),this._setFakeOptions(o);else if(t instanceof n.Z){const e=!!o&&!!o.backward;let n;if(void 0===s)throw new c.ZP("view-selection-setto-required-second-parameter",this);n="in"==s?i.Z._createIn(t):"on"==s?i.Z._createOn(t):new i.Z(r.Z._createAt(t,s)),this._setRanges([n],e),this._setFakeOptions(o)}else{if(!(0,d.Z)(t))throw new c.ZP("view-selection-setto-not-selectable",this);this._setRanges(t,o&&o.backward),this._setFakeOptions(o)}this.fire("change")}setFocus(e,t){if(null===this.anchor)throw new c.ZP("view-selection-setfocus-no-ranges",this);const s=r.Z._createAt(e,t);if("same"==s.compareWith(this.focus))return;const o=this.anchor;this._ranges.pop(),"before"==s.compareWith(o)?this._addRange(new i.Z(s,o),!0):this._addRange(new i.Z(o,s)),this.fire("change")}_setRanges(e,t=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!t}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,t=!1){if(!(e instanceof i.Z))throw new c.ZP("view-selection-add-range-not-range",this);this._pushRange(e),this._lastRangeBackward=!!t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new c.ZP("view-selection-range-intersects",this,{addedRange:e,intersectingRange:t});this._ranges.push(new i.Z(e.start,e.end))}}u.prototype.is=function(e){return"selection"===e||"view:selection"===e}},"./packages/ckeditor5-engine/src/view/stylesmap.ts":(e,t,s)=>{"use strict";s.d(t,{A:()=>ee,Z:()=>Y});var o=s("./node_modules/lodash-es/isObject.js"),i=s("./node_modules/lodash-es/isArray.js"),r=s("./node_modules/lodash-es/isSymbol.js"),n=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const c=function(e,t){if((0,i.Z)(e))return!1;var s=typeof e;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=e&&!(0,r.Z)(e))||(a.test(e)||!n.test(e)||null!=t&&e in Object(t))};var l=s("./node_modules/lodash-es/_MapCache.js");function d(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var s=function(){var o=arguments,i=t?t.apply(this,o):o[0],r=s.cache;if(r.has(i))return r.get(i);var n=e.apply(this,o);return s.cache=r.set(i,n)||r,n};return s.cache=new(d.Cache||l.Z),s}d.Cache=l.Z;const h=d;var u=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,p=/\\(\\)?/g;const g=function(e){var t=h(e,(function(e){return 500===s.size&&s.clear(),e})),s=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(u,(function(e,s,o,i){t.push(o?i.replace(p,"$1"):s||e)})),t}));var f=s("./node_modules/lodash-es/toString.js");const m=function(e,t){return(0,i.Z)(e)?e:c(e,t)?[e]:g((0,f.Z)(e))};const k=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0};const b=function(e){if("string"==typeof e||(0,r.Z)(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};const _=function(e,t){for(var s=0,o=(t=m(t,e)).length;null!=e&&si?0:i+t),(s=s>i?i:s)<0&&(s+=i),i=t>s?0:s-t>>>0,t>>>=0;for(var r=Array(i);++ot===e));return Array.isArray(t)}set(e,t){if((0,o.Z)(e))for(const[t,s]of Object.entries(e))this._styleProcessor.toNormalizedForm(t,s,this._styles);else this._styleProcessor.toNormalizedForm(e,t,this._styles)}remove(e){const t=te(e);Z(this._styles,t),delete this._styles[e],this._cleanEmptyObjectsOnPath(t)}getNormalized(e){return this._styleProcessor.getNormalized(e,this._styles)}toString(){return this.isEmpty?"":this._getStylesEntries().map((e=>e.join(":"))).sort().join(";")+";"}getAsString(e){if(this.isEmpty)return;if(this._styles[e]&&!(0,o.Z)(this._styles[e]))return this._styles[e];const t=this._styleProcessor.getReducedForm(e,this._styles).find((([t])=>t===e));return Array.isArray(t)?t[1]:void 0}getStyleNames(e=!1){if(this.isEmpty)return[];if(e)return this._styleProcessor.getStyleNames(this._styles);return this._getStylesEntries().map((([e])=>e))}clear(){this._styles={}}_getStylesEntries(){const e=[],t=Object.keys(this._styles);for(const s of t)e.push(...this._styleProcessor.getReducedForm(s,this._styles));return e}_cleanEmptyObjectsOnPath(e){const t=e.split(".");if(!(t.length>1))return;const s=t.splice(0,t.length-1).join("."),o=P(this._styles,s);if(!o)return;!Array.from(Object.keys(o)).length&&this.remove(s)}}class ee{constructor(){this._normalizers=new Map,this._extractors=new Map,this._reducers=new Map,this._consumables=new Map}toNormalizedForm(e,t,s){if((0,o.Z)(t))se(s,te(e),t);else if(this._normalizers.has(e)){const o=this._normalizers.get(e),{path:i,value:r}=o(t);se(s,i,r)}else se(s,e,t)}getNormalized(e,t){if(!e)return K({},t);if(void 0!==t[e])return t[e];if(this._extractors.has(e)){const s=this._extractors.get(e);if("string"==typeof s)return P(t,s);const o=s(e,t);if(o)return o}return P(t,te(e))}getReducedForm(e,t){const s=this.getNormalized(e,t);if(void 0===s)return[];if(this._reducers.has(e)){return this._reducers.get(e)(s)}return[[e,s]]}getStyleNames(e){const t=Array.from(this._consumables.keys()).filter((t=>{const s=this.getNormalized(t,e);return s&&"object"==typeof s?Object.keys(s).length:s})),s=new Set([...t,...Object.keys(e)]);return Array.from(s.values())}getRelatedStyles(e){return this._consumables.get(e)||[]}setNormalizer(e,t){this._normalizers.set(e,t)}setExtractor(e,t){this._extractors.set(e,t)}setReducer(e,t){this._reducers.set(e,t)}setStyleRelation(e,t){this._mapStyleNames(e,t);for(const s of t)this._mapStyleNames(s,[e])}_mapStyleNames(e,t){this._consumables.has(e)||this._consumables.set(e,[]),this._consumables.get(e).push(...t)}}function te(e){return e.replace("-",".")}function se(e,t,s){let i=s;(0,o.Z)(s)&&(i=K({},P(e,t),s)),X(e,t,i)}},"./packages/ckeditor5-engine/src/view/text.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-engine/src/view/node.ts");class i extends o.Z{constructor(e,t){super(e),this._textData=t}get data(){return this._textData}get _data(){return this.data}set _data(e){this._fireChange("text",this),this._textData=e}isSimilar(e){return e instanceof i&&(this===e||this.data===e.data)}_clone(){return new i(this.document,this.data)}}i.prototype.is=function(e){return"$text"===e||"view:$text"===e||"text"===e||"view:text"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/textproxy.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-engine/src/view/typecheckable.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e,t,s){if(super(),this.textNode=e,t<0||t>e.data.length)throw new i.ZP("view-textproxy-wrong-offsetintext",this);if(s<0||t+s>e.data.length)throw new i.ZP("view-textproxy-wrong-length",this);this.data=e.data.substring(t,t+s),this.offsetInText=t}get offsetSize(){return this.data.length}get isPartial(){return this.data.length!==this.textNode.data.length}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}getAncestors(e={}){const t=[];let s=e.includeSelf?this.textNode:this.parent;for(;null!==s;)t[e.parentFirst?"push":"unshift"](s),s=s.parent;return t}}r.prototype.is=function(e){return"$textProxy"===e||"view:$textProxy"===e||"textProxy"===e||"view:textProxy"===e}},"./packages/ckeditor5-engine/src/view/treewalker.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/text.ts"),r=s("./packages/ckeditor5-engine/src/view/textproxy.ts"),n=s("./packages/ckeditor5-engine/src/view/position.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class c{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new a.ZP("view-tree-walker-no-start-position",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new a.ZP("view-tree-walker-unknown-direction",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,e.startPosition?this.position=n.Z._createAt(e.startPosition):this.position=n.Z._createAt(e.boundaries["backward"==e.direction?"end":"start"]),this.direction=e.direction||"forward",this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,s,o;do{o=this.position,({done:t,value:s}=this.next())}while(!t&&e(s));t||(this.position=o)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const t=this.position,s=e.parent;if(null===s.parent&&e.offset===s.childCount)return{done:!0,value:void 0};if(s===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0,value:void 0};let a;if(s instanceof i.Z){if(e.isAtEnd)return this.position=n.Z._createAfter(s),this._next();a=s.data[e.offset]}else a=s.getChild(e.offset);if(a instanceof o.Z)return this.shallow?e.offset++:e=new n.Z(a,0),this.position=e,this._formatReturnValue("elementStart",a,t,e,1);if(a instanceof i.Z){if(this.singleCharacters)return e=new n.Z(a,0),this.position=e,this._next();{let s,o=a.data.length;return a==this._boundaryEndParent?(o=this.boundaries.end.offset,s=new r.Z(a,0,o),e=n.Z._createAfter(s)):(s=new r.Z(a,0,a.data.length),e.offset++),this.position=e,this._formatReturnValue("text",s,t,e,o)}}if("string"==typeof a){let o;if(this.singleCharacters)o=1;else{o=(s===this._boundaryEndParent?this.boundaries.end.offset:s.data.length)-e.offset}const i=new r.Z(s,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue("text",i,t,e,o)}return e=n.Z._createAfter(s),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",s,t,e)}_previous(){let e=this.position.clone();const t=this.position,s=e.parent;if(null===s.parent&&0===e.offset)return{done:!0,value:void 0};if(s==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0,value:void 0};let a;if(s instanceof i.Z){if(e.isAtStart)return this.position=n.Z._createBefore(s),this._previous();a=s.data[e.offset-1]}else a=s.getChild(e.offset-1);if(a instanceof o.Z)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",a,t,e,1)):(e=new n.Z(a,a.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",a,t,e));if(a instanceof i.Z){if(this.singleCharacters)return e=new n.Z(a,a.data.length),this.position=e,this._previous();{let s,o=a.data.length;if(a==this._boundaryStartParent){const t=this.boundaries.start.offset;s=new r.Z(a,t,a.data.length-t),o=s.data.length,e=n.Z._createBefore(s)}else s=new r.Z(a,0,a.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",s,t,e,o)}}if("string"==typeof a){let o;if(this.singleCharacters)o=1;else{const t=s===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}e.offset-=o;const i=new r.Z(s,e.offset,o);return this.position=e,this._formatReturnValue("text",i,t,e,o)}return e=n.Z._createBefore(s),this.position=e,this._formatReturnValue("elementStart",s,t,e,1)}_formatReturnValue(e,t,s,o,i){return t instanceof r.Z&&(t.offsetInText+t.data.length==t.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?s=n.Z._createAfter(t.textNode):(o=n.Z._createAfter(t.textNode),this.position=o)),0===t.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?s=n.Z._createBefore(t.textNode):(o=n.Z._createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:s,nextPosition:o,length:i}}}}},"./packages/ckeditor5-engine/src/view/typecheckable.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{is(){throw new Error("is() method is abstract")}}},"./packages/ckeditor5-engine/src/view/uielement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a,h:()=>c});var o=s("./packages/ckeditor5-engine/src/view/element.ts"),i=s("./packages/ckeditor5-engine/src/view/node.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-utils/src/keyboard.ts");class a extends o.Z{constructor(...e){super(...e),this.getFillerOffset=l}_insertChild(e,t){if(t&&(t instanceof i.Z||Array.from(t).length>0))throw new r.ZP("view-uielement-cannot-add",[this,t]);return 0}render(e,t){return this.toDomElement(e)}toDomElement(e){const t=e.createElement(this.name);for(const e of this.getAttributeKeys())t.setAttribute(e,this.getAttribute(e));return t}}function c(e){e.document.on("arrowKey",((t,s)=>function(e,t,s){if(t.keyCode==n.Do.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,i=e.focusOffset,r=s.domPositionToView(t,i);if(null===r)return;let n=!1;const a=r.getLastMatchingPosition((e=>(e.item.is("uiElement")&&(n=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement")))));if(n){const t=s.viewPositionToDom(a);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}(0,s,e.domConverter)),{priority:"low"})}function l(){return null}a.prototype.is=function(e,t){return t?t===this.name&&("uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e):"uiElement"===e||"view:uiElement"===e||"element"===e||"view:element"===e||"node"===e||"view:node"===e}},"./packages/ckeditor5-engine/src/view/view.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>N});var o=s("./packages/ckeditor5-engine/src/view/document.ts"),i=s("./packages/ckeditor5-engine/src/view/downcastwriter.ts"),r=s("./packages/ckeditor5-engine/src/view/renderer.ts"),n=s("./packages/ckeditor5-engine/src/view/domconverter.ts"),a=s("./packages/ckeditor5-engine/src/view/position.ts"),c=s("./packages/ckeditor5-engine/src/view/range.ts"),l=s("./packages/ckeditor5-engine/src/view/selection.ts"),d=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts"),h=s("./packages/ckeditor5-utils/src/keyboard.ts");class u extends d.Z{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){const t={keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey,shiftKey:e.shiftKey,metaKey:e.metaKey,get keystroke(){return(0,h.Cq)(this)}};this.fire(e.type,e,t)}}var p=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),g=s("./node_modules/lodash-es/debounce.js");class f extends p.Z{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=(0,g.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200)}observe(){const e=this.document;e.on("arrowKey",((t,s)=>{e.selection.isFake&&this.isEnabled&&s.preventDefault()}),{context:"$capture"}),e.on("arrowKey",((t,s)=>{e.selection.isFake&&this.isEnabled&&this._handleSelectionMove(s.keyCode)}),{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,s=new l.Z(t.getRanges(),{backward:t.isBackward,fake:!1});e!=h.Do.arrowleft&&e!=h.Do.arrowup||s.setTo(s.getFirstPosition()),e!=h.Do.arrowright&&e!=h.Do.arrowdown||s.setTo(s.getLastPosition());const o={oldSelection:t,newSelection:s,domSelection:null};this.document.fire("selectionChange",o),this._fireSelectionChangeDoneDebounced(o)}}var m=s("./packages/ckeditor5-engine/src/view/filler.ts"),k=s("./node_modules/lodash-es/_baseIsEqual.js");const b=function(e,t,s){var o=(s="function"==typeof s?s:void 0)?s(e,t):void 0;return void 0===o?(0,k.Z)(e,t,void 0,s):!!o};class _ extends p.Z{constructor(e){super(e),this._config={childList:!0,characterData:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e._renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){if(0===e.length)return;const t=this.domConverter,s=new Set,o=new Set;for(const s of e){const e=t.mapDomToView(s.target);e&&(e.is("uiElement")||e.is("rawElement")||"childList"!==s.type||this._isBogusBrMutation(s)||o.add(e))}for(const i of e){const e=t.mapDomToView(i.target);if((!e||!e.is("uiElement")&&!e.is("rawElement"))&&"characterData"===i.type){const e=t.findCorrespondingViewText(i.target);e&&!o.has(e.parent)?s.add(e):!e&&(0,m.Sw)(i.target)&&o.add(t.mapDomToView(i.target.parentNode))}}let i=!1;for(const e of s)i=!0,this.renderer.markToSync("text",e);for(const e of o){const s=t.mapViewToDom(e),o=Array.from(e.getChildren()),r=Array.from(t.domChildrenToView(s,{withChildren:!1}));b(o,r,w)||(i=!0,this.renderer.markToSync("children",e))}i&&this.view.forceRender()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is("element","br")}}function w(e,t){if(!Array.isArray(e))return e===t||!(!e.is("$text")||!t.is("$text"))&&e.data===t.data}var v=s("./packages/ckeditor5-utils/src/env.ts");class y extends p.Z{constructor(e){super(e),this.mutationObserver=e.getObserver(_),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=(0,g.Z)((e=>{this.document.fire("selectionChangeDone",e)}),200),this._clearInfiniteLoopInterval=setInterval((()=>this._clearInfiniteLoop()),1e3),this._documentIsSelectingInactivityTimeoutDebounced=(0,g.Z)((()=>this.document.isSelecting=!1),5e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument,s=()=>{this.document.isSelecting&&(this._handleSelectionChange(null,t),this.document.isSelecting=!1,this._documentIsSelectingInactivityTimeoutDebounced.cancel())};this.listenTo(e,"selectstart",(()=>{this.document.isSelecting=!0,this._documentIsSelectingInactivityTimeoutDebounced()}),{priority:"highest"}),this.listenTo(e,"keydown",s,{priority:"highest",useCapture:!0}),this.listenTo(e,"keyup",s,{priority:"highest",useCapture:!0}),this._documents.has(t)||(this.listenTo(t,"mouseup",s,{priority:"highest",useCapture:!0}),this.listenTo(t,"selectionchange",((e,s)=>{this.document.isComposing&&!v.ZP.isAndroid||(this._handleSelectionChange(s,t),this._documentIsSelectingInactivityTimeoutDebounced())})),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel(),this._documentIsSelectingInactivityTimeoutDebounced.cancel()}_handleSelectionChange(e,t){if(!this.isEnabled)return;const s=t.defaultView.getSelection();if(this.checkShouldIgnoreEventFromTarget(s.anchorNode))return;this.mutationObserver.flush();const o=this.domConverter.domSelectionToView(s);if(0!=o.rangeCount){if(this.view.hasDomSelection=!0,!(this.selection.isEqual(o)&&this.domConverter.isDomSelectionCorrect(s)||++this._loopbackCounter>60))if(this.selection.isSimilar(o))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:o,domSelection:s};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}else this.view.hasDomSelection=!1}_clearInfiniteLoop(){this._loopbackCounter=0}}class Z extends d.Z{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const t=this.document;t.on("focus",(()=>{t.isFocused=!0,this._renderTimeoutId=setTimeout((()=>e.change((()=>{}))),50)})),t.on("blur",((s,o)=>{const i=t.selection.editableElement;null!==i&&i!==o.target||(t.isFocused=!1,e.change((()=>{})))}))}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class P extends d.Z{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const t=this.document;t.on("compositionstart",(()=>{t.isComposing=!0}),{priority:"low"}),t.on("compositionend",(()=>{t.isComposing=!1}),{priority:"low"})}onDomEvent(e){this.fire(e.type,e,{data:e.data})}}var x=s("./packages/ckeditor5-engine/src/view/datatransfer.ts");class T extends d.Z{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){const t=e.getTargetRanges(),s=this.view,o=s.document;let i=null,r=null,n=[];if(e.dataTransfer&&(i=new x.Z(e.dataTransfer)),null!==e.data?r=e.data:i&&(r=i.getData("text/plain")),o.selection.isFake)n=Array.from(o.selection.getRanges());else if(t.length)n=t.map((e=>s.domConverter.domRangeToView(e)));else if(v.ZP.isAndroid){const t=e.target.ownerDocument.defaultView.getSelection();n=Array.from(s.domConverter.domSelectionToView(t).getRanges())}v.ZP.isAndroid&&"insertCompositionText"==e.inputType&&r&&r.endsWith("\n")?this.fire(e.type,e,{inputType:"insertParagraph",targetRanges:[s.createRange(n[0].end)]}):this.fire(e.type,e,{data:r,dataTransfer:i,targetRanges:n,inputType:e.inputType,isComposing:e.isComposing})}}var A=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts"),C=s("./packages/ckeditor5-utils/src/index.ts");class E extends p.Z{constructor(e){super(e),this.document.on("keydown",((e,t)=>{if(this.isEnabled&&(0,C.dj)(t.keyCode)){const s=new A.Z(this.document,"arrowKey",this.document.selection.getFirstRange());this.document.fire(s,t),s.stop.called&&e.stop()}}))}observe(){}}class S extends p.Z{constructor(e){super(e);const t=this.document;t.on("keydown",((e,s)=>{if(!this.isEnabled||s.keyCode!=h.Do.tab||s.ctrlKey)return;const o=new A.Z(t,"tab",t.selection.getFirstRange());t.fire(o,s),o.stop.called&&e.stop()}))}observe(){}}var O=s("./packages/ckeditor5-utils/src/observablemixin.ts"),R=s("./packages/ckeditor5-utils/src/dom/scroll.ts"),j=s("./packages/ckeditor5-engine/src/view/uielement.ts"),M=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class N extends O.y{constructor(e){super(),this.document=new o.Z(e),this.domConverter=new n.Z(this.document),this.domRoots=new Map,this.set("isRenderingInProgress",!1),this.set("hasDomSelection",!1),this._renderer=new r.Z(this.domConverter,this.document.selection),this._renderer.bind("isFocused","isSelecting","isComposing").to(this.document,"isFocused","isSelecting","isComposing"),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new i.Z(this.document),this.addObserver(_),this.addObserver(y),this.addObserver(Z),this.addObserver(u),this.addObserver(f),this.addObserver(P),this.addObserver(E),this.addObserver(T),this.addObserver(S),(0,m.mm)(this),(0,j.h)(this),this.on("render",(()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1})),this.listenTo(this.document.selection,"change",(()=>{this._hasChangedSinceTheLastRendering=!0})),this.listenTo(this.document,"change:isFocused",(()=>{this._hasChangedSinceTheLastRendering=!0}))}attachDomRoot(e,t="main"){const s=this.document.getRoot(t);s._name=e.tagName.toLowerCase();const o={};for(const{name:t,value:i}of Array.from(e.attributes))o[t]=i,"class"===t?this._writer.addClass(i.split(" "),s):this._writer.setAttribute(t,i,s);this._initialDomRootAttributes.set(e,o);const i=()=>{this._writer.setAttribute("contenteditable",(!s.isReadOnly).toString(),s),s.isReadOnly?this._writer.addClass("ck-read-only",s):this._writer.removeClass("ck-read-only",s)};i(),this.domRoots.set(t,e),this.domConverter.bindElements(e,s),this._renderer.markToSync("children",s),this._renderer.markToSync("attributes",s),this._renderer.domDocuments.add(e.ownerDocument),s.on("change:children",((e,t)=>this._renderer.markToSync("children",t))),s.on("change:attributes",((e,t)=>this._renderer.markToSync("attributes",t))),s.on("change:text",((e,t)=>this._renderer.markToSync("text",t))),s.on("change:isReadOnly",(()=>this.change(i))),s.on("change",(()=>{this._hasChangedSinceTheLastRendering=!0}));for(const s of this._observers.values())s.observe(e,t)}detachDomRoot(e){const t=this.domRoots.get(e);Array.from(t.attributes).forEach((({name:e})=>t.removeAttribute(e)));const s=this._initialDomRootAttributes.get(t);for(const e in s)t.setAttribute(e,s[e]);this.domRoots.delete(e),this.domConverter.unbindDomElement(t)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[e,s]of this.domRoots)t.observe(s,e);return t.enable(),t}getObserver(e){return this._observers.get(e)}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}scrollToTheSelection(){const e=this.document.selection.getFirstRange();e&&(0,R.m)({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}focus(){if(!this.document.isFocused){const e=this.document.selection.editableElement;e&&(this.domConverter.focus(e),this.forceRender())}}change(e){if(this.isRenderingInProgress||this._postFixersInProgress)throw new M.ZP("cannot-change-view-tree",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const t=e(this._writer);return this._ongoingChange=!1,!this._renderingDisabled&&this._hasChangedSinceTheLastRendering&&(this._postFixersInProgress=!0,this.document._callPostFixers(this._writer),this._postFixersInProgress=!1,this.fire("render")),t}catch(e){M.ZP.rethrowUnexpectedError(e,this)}}forceRender(){this._hasChangedSinceTheLastRendering=!0,this.change((()=>{}))}destroy(){for(const e of this._observers.values())e.destroy();this.document.destroy(),this.stopListening()}createPositionAt(e,t){return a.Z._createAt(e,t)}createPositionAfter(e){return a.Z._createAfter(e)}createPositionBefore(e){return a.Z._createBefore(e)}createRange(...e){return new c.Z(...e)}createRangeOn(e){return c.Z._createOn(e)}createRangeIn(e){return c.Z._createIn(e)}createSelection(...e){return new l.Z(...e)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change((()=>{}))}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}},"./packages/ckeditor5-enter/src/enter.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-core/src/command.ts"),r=s("./packages/ckeditor5-enter/src/utils.ts");class n extends i.Z{execute(){const e=this.editor.model,t=e.document;e.change((s=>{!function(e,t,s,o){const i=s.isCollapsed,n=s.getFirstRange(),c=n.start.parent,l=n.end.parent;if(o.isLimit(c)||o.isLimit(l))return void(i||c!=l||e.deleteContent(s));if(i){const e=(0,r.G)(t.model.schema,s.getAttributes());a(t,n.start),t.setSelectionAttribute(e)}else{const o=!(n.start.isAtStart&&n.end.isAtEnd),i=c==l;e.deleteContent(s,{leaveUnmerged:o}),o&&(i?a(t,s.focus):t.setSelection(l,0))}}(this.editor.model,s,t.selection,e.schema),this.fire("afterExecute",{writer:s})}))}}function a(e,t){e.split(t),e.setSelection(t.parent.nextSibling,0)}var c=s("./packages/ckeditor5-enter/src/enterobserver.ts");class l extends o.Z{static get pluginName(){return"Enter"}init(){const e=this.editor,t=e.editing.view,s=t.document;t.addObserver(c.Z),e.commands.add("enter",new n(e)),this.listenTo(s,"enter",((o,i)=>{s.isComposing||i.preventDefault(),i.isSoft||(e.execute("enter"),t.scrollToTheSelection())}),{priority:"low"})}}},"./packages/ckeditor5-enter/src/enterobserver.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),i=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),r=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts");const n={insertParagraph:{isSoft:!1},insertLineBreak:{isSoft:!0}};class a extends o.Z{constructor(e){super(e);const t=this.document;t.on("beforeinput",((s,o)=>{if(!this.isEnabled)return;const a=o.domEvent,c=n[o.inputType];if(!c)return;const l=new r.Z(t,"enter",o.targetRanges[0]);t.fire(l,new i.Z(e,a,{isSoft:c.isSoft})),l.stop.called&&s.stop()}))}observe(){}}},"./packages/ckeditor5-enter/src/utils.ts":(e,t,s)=>{"use strict";function*o(e,t){for(const s of t)s&&e.getAttributeProperties(s[0]).copyOnEnter&&(yield s)}s.d(t,{G:()=>o})},"./packages/ckeditor5-typing/src/delete.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-core/src/command.ts"),r=s("./packages/ckeditor5-utils/src/count.ts"),n=s("./packages/ckeditor5-typing/src/utils/changebuffer.ts");class a extends i.Z{constructor(e,t){super(e),this.direction=t,this._buffer=new n.Z(e.model,e.config.get("typing.undoStep"))}get buffer(){return this._buffer}execute(e={}){const t=this.editor.model,s=t.document;t.enqueueChange(this._buffer.batch,(o=>{this._buffer.lock();const i=o.createSelection(e.selection||s.selection),n=e.sequence||1,a=i.isCollapsed;if(i.isCollapsed&&t.modifySelection(i,{direction:this.direction,unit:e.unit,treatEmojiAsSingleUnit:!0}),this._shouldEntireContentBeReplacedWithParagraph(n))return void this._replaceEntireContentWithParagraph(o);if(this._shouldReplaceFirstBlockWithParagraph(i,n))return void this.editor.execute("paragraph",{selection:i});if(i.isCollapsed)return;let c=0;i.getFirstRange().getMinimalFlatRanges().forEach((e=>{c+=(0,r.Z)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))})),t.deleteContent(i,{doNotResetEntireContent:a,direction:this.direction}),this._buffer.input(c),o.setSelection(i),this._buffer.unlock()}))}_shouldEntireContentBeReplacedWithParagraph(e){if(e>1)return!1;const t=this.editor.model,s=t.document.selection,o=t.schema.getLimitElement(s);if(!(s.isCollapsed&&s.containsEntireContent(o)))return!1;if(!t.schema.checkChild(o,"paragraph"))return!1;const i=o.getChild(0);return!i||!i.is("element","paragraph")}_replaceEntireContentWithParagraph(e){const t=this.editor.model,s=t.document.selection,o=t.schema.getLimitElement(s),i=e.createElement("paragraph");e.remove(e.createRangeIn(o)),e.insert(i,o),e.setSelection(i,0)}_shouldReplaceFirstBlockWithParagraph(e,t){const s=this.editor.model;if(t>1||"backward"!=this.direction)return!1;if(!e.isCollapsed)return!1;const o=e.getFirstPosition(),i=s.schema.getLimitElement(o),r=i.getChild(0);return o.parent==r&&(!!e.containsEntireContent(r)&&(!!s.schema.checkChild(i,"paragraph")&&"paragraph"!=r.name))}}var c=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),l=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),d=s("./packages/ckeditor5-engine/src/view/observer/bubblingeventinfo.ts"),h=s("./packages/ckeditor5-utils/src/index.ts");const u="word",p="selection",g="backward",f="forward",m={deleteContent:{unit:p,direction:g},deleteContentBackward:{unit:"codePoint",direction:g},deleteWordBackward:{unit:u,direction:g},deleteHardLineBackward:{unit:p,direction:g},deleteSoftLineBackward:{unit:p,direction:g},deleteContentForward:{unit:"character",direction:f},deleteWordForward:{unit:u,direction:f},deleteHardLineForward:{unit:p,direction:f},deleteSoftLineForward:{unit:p,direction:f}};class k extends c.Z{constructor(e){super(e);const t=e.document;let s=0;t.on("keydown",(()=>{s++})),t.on("keyup",(()=>{s=0})),t.on("beforeinput",((o,i)=>{if(!this.isEnabled)return;const{targetRanges:r,domEvent:n,inputType:a}=i,c=m[a];if(!c)return;const u={direction:c.direction,unit:c.unit,sequence:s};u.unit==p&&(u.selectionToRemove=e.createSelection(r[0])),h.OB.isAndroid&&"deleteContentBackward"===a&&(u.sequence=1,1!=r.length||r[0].start.parent==r[0].end.parent&&r[0].start.offset+1==r[0].end.offset||(u.unit=p,u.selectionToRemove=e.createSelection(r)));const g=new d.Z(t,"delete",r[0]);t.fire(g,new l.Z(e,n,u)),g.stop.called&&o.stop()})),h.OB.isBlink&&function(e){const t=e.view,s=t.document;let o=null,i=!1;function r(e){return e==h.Do.backspace||e==h.Do.delete}function n(e){return e==h.Do.backspace?g:f}s.on("keydown",((e,{keyCode:t})=>{o=t,i=!1})),s.on("keyup",((a,{keyCode:c,domEvent:h})=>{const u=s.selection,g=e.isEnabled&&c==o&&r(c)&&!u.isCollapsed&&!i;if(o=null,g){const e=u.getFirstRange(),o=new d.Z(s,"delete",e),i={unit:p,direction:n(c),selectionToRemove:u};s.fire(o,new l.Z(t,h,i))}})),s.on("beforeinput",((e,{inputType:t})=>{const s=m[t];r(o)&&s&&s.direction==n(o)&&(i=!0)})),s.on("beforeinput",((e,{inputType:t,data:s})=>{o==h.Do.delete&&"insertText"==t&&""==s&&e.stop()}),{priority:"high"})}(this)}observe(){}}class b extends o.Z{static get pluginName(){return"Delete"}init(){const e=this.editor,t=e.editing.view,s=t.document,o=e.model.document;t.addObserver(k),this._undoOnBackspace=!1;const i=new a(e,"forward");e.commands.add("deleteForward",i),e.commands.add("forwardDelete",i),e.commands.add("delete",new a(e,"backward")),this.listenTo(s,"delete",((o,i)=>{s.isComposing||i.preventDefault();const{direction:r,sequence:n,selectionToRemove:a,unit:c}=i,l="forward"===r?"deleteForward":"delete",d={sequence:n};if("selection"==c){const t=Array.from(a.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));d.selection=e.model.createSelection(t)}else d.unit=c;e.execute(l,d),t.scrollToTheSelection()}),{priority:"low"}),this.editor.plugins.has("UndoEditing")&&(this.listenTo(s,"delete",((t,s)=>{this._undoOnBackspace&&"backward"==s.direction&&1==s.sequence&&"codePoint"==s.unit&&(this._undoOnBackspace=!1,e.execute("undo"),s.preventDefault(),t.stop())}),{context:"$capture"}),this.listenTo(o,"change",(()=>{this._undoOnBackspace=!1})))}requestUndoOnBackspace(){this.editor.plugins.has("UndoEditing")&&(this._undoOnBackspace=!0)}}},"./packages/ckeditor5-typing/src/utils/changebuffer.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});class o{constructor(e,t=20){this._batch=null,this.model=e,this._size=0,this.limit=t,this._isLocked=!1,this._changeCallback=(e,t)=>{t.isLocal&&t.isUndoable&&t!==this._batch&&this._reset(!0)},this._selectionChangeCallback=()=>{this._reset()},this.model.document.on("change",this._changeCallback),this.model.document.selection.on("change:range",this._selectionChangeCallback),this.model.document.selection.on("change:attribute",this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.model.createBatch({isTyping:!0})),this._batch}get size(){return this._size}input(e){this._size+=e,this._size>=this.limit&&this._reset(!0)}get isLocked(){return this._isLocked}lock(){this._isLocked=!0}unlock(){this._isLocked=!1}destroy(){this.model.document.off("change",this._changeCallback),this.model.document.selection.off("change:range",this._selectionChangeCallback),this.model.document.selection.off("change:attribute",this._selectionChangeCallback)}_reset(e=!1){this.isLocked&&!e||(this._batch=null,this._size=0)}}},"./packages/ckeditor5-ui/src/bindings/clickoutsidehandler.ts":(e,t,s)=>{"use strict";function o({emitter:e,activator:t,callback:s,contextElements:o}){e.listenTo(document,"mousedown",((e,i)=>{if(!t())return;const r="function"==typeof i.composedPath?i.composedPath():[];for(const e of o)if(e.contains(i.target)||r.includes(e))return;s()}))}s.d(t,{Z:()=>o})},"./packages/ckeditor5-ui/src/button/buttonview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-ui/src/icon/iconview.ts"),r=s("./packages/ckeditor5-utils/src/uid.ts"),n=s("./packages/ckeditor5-utils/src/keyboard.ts"),a=s("./packages/ckeditor5-utils/src/env.ts"),c=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),l=s.n(c),d=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/button.css"),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(d.Z,h);d.Z.locals;class u extends o.Z{constructor(e){super(e);const t=this.bindTemplate,s=(0,r.Z)();this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isVisible",!0),this.set("isToggleable",!1),this.set("keystroke",void 0),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.set("withKeystroke",!1),this.children=this.createCollection(),this.labelView=this._createLabelView(s),this.iconView=new i.Z,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.keystrokeView=this._createKeystrokeView(),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));const o={tag:"button",attributes:{class:["ck","ck-button",t.to("class"),t.if("isEnabled","ck-disabled",(e=>!e)),t.if("isVisible","ck-hidden",(e=>!e)),t.to("isOn",(e=>e?"ck-on":"ck-off")),t.if("withText","ck-button_with-text"),t.if("withKeystroke","ck-button_with-keystroke")],type:t.to("type",(e=>e||"button")),tabindex:t.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${s}`,"aria-disabled":t.if("isEnabled",!0,(e=>!e)),"aria-pressed":t.to("isOn",(e=>!!this.isToggleable&&String(!!e))),"data-cke-tooltip-text":t.to("_tooltipString"),"data-cke-tooltip-position":t.to("tooltipPosition")},children:this.children,on:{click:t.to((e=>{this.isEnabled?this.fire("execute"):e.preventDefault()}))}};a.ZP.isSafari&&(o.on.mousedown=t.to((e=>{this.focus(),e.preventDefault()}))),this.setTemplate(o)}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.labelView),this.withKeystroke&&this.keystroke&&this.children.add(this.keystrokeView)}focus(){this.element.focus()}_createLabelView(e){const t=new o.Z,s=this.bindTemplate;return t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:s.to("labelStyle"),id:`ck-editor__aria-label_${e}`},children:[{text:this.bindTemplate.to("label")}]}),t}_createKeystrokeView(){const e=new o.Z;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",(e=>(0,n.XU)(e)))}]}),e}_getTooltipString(e,t,s){return e?"string"==typeof e?e:(s&&(s=(0,n.XU)(s)),e instanceof Function?e(t,s):`${t}${s?` (${s})`:""}`):""}}},"./packages/ckeditor5-ui/src/button/switchbuttonview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),r=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),n=s.n(r),a=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/button/switchbutton.css"),c={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};n()(a.Z,c);a.Z.locals;class l extends i.Z{constructor(e){super(e),this.isToggleable=!0,this.toggleSwitchView=this._createToggleView(),this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render(),this.children.add(this.toggleSwitchView)}_createToggleView(){const e=new o.Z;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}},"./packages/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),i=s("./packages/ckeditor5-ui/theme/icons/dropdown-arrow.svg"),r=s("./packages/ckeditor5-ui/src/icon/iconview.ts");class n extends o.Z{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0,"aria-expanded":this.bindTemplate.to("isOn",(e=>String(e)))}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new r.Z;return e.content=i.Z,e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}},"./packages/ckeditor5-ui/src/dropdown/button/splitbuttonview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),r=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),n=s("./packages/ckeditor5-utils/src/focustracker.ts"),a=s("./packages/ckeditor5-ui/theme/icons/dropdown-arrow.svg"),c=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),l=s.n(c),d=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/splitbutton.css"),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};l()(d.Z,h);d.Z.locals;class u extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("class",void 0),this.set("labelStyle",void 0),this.set("icon",void 0),this.set("isEnabled",!0),this.set("isOn",!1),this.set("isToggleable",!1),this.set("isVisible",!0),this.set("keystroke",void 0),this.set("withKeystroke",!1),this.set("label",void 0),this.set("tabindex",-1),this.set("tooltip",!1),this.set("tooltipPosition","s"),this.set("type","button"),this.set("withText",!1),this.children=this.createCollection(),this.actionView=this._createActionView(),this.arrowView=this._createArrowView(),this.keystrokes=new r.Z,this.focusTracker=new n.Z,this.setTemplate({tag:"div",attributes:{class:["ck","ck-splitbutton",t.to("class"),t.if("isVisible","ck-hidden",(e=>!e)),this.arrowView.bindTemplate.if("isOn","ck-splitbutton_open")]},children:this.children})}render(){super.render(),this.children.add(this.actionView),this.children.add(this.arrowView),this.focusTracker.add(this.actionView.element),this.focusTracker.add(this.arrowView.element),this.keystrokes.listenTo(this.element),this.keystrokes.set("arrowright",((e,t)=>{this.focusTracker.focusedElement===this.actionView.element&&(this.arrowView.focus(),t())})),this.keystrokes.set("arrowleft",((e,t)=>{this.focusTracker.focusedElement===this.arrowView.element&&(this.actionView.focus(),t())}))}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.actionView.focus()}_createActionView(){const e=new i.Z;return e.bind("icon","isEnabled","isOn","isToggleable","keystroke","label","tabindex","tooltip","tooltipPosition","type","withText").to(this),e.extendTemplate({attributes:{class:"ck-splitbutton__action"}}),e.delegate("execute").to(this),e}_createArrowView(){const e=new i.Z,t=e.bindTemplate;return e.icon=a.Z,e.extendTemplate({attributes:{class:["ck-splitbutton__arrow"],"data-cke-tooltip-disabled":t.to("isOn"),"aria-haspopup":!0,"aria-expanded":t.to("isOn",(e=>String(e)))}}),e.bind("isEnabled").to(this),e.bind("label").to(this),e.bind("tooltip").to(this),e.delegate("execute").to(this,"open"),e}}},"./packages/ckeditor5-ui/src/dropdown/utils.ts":(e,t,s)=>{"use strict";s.d(t,{Pm:()=>E,up:()=>C,t9:()=>A,Mh:()=>S});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class r extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!1),this.set("position","se"),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",t.to("position",(e=>`ck-dropdown__panel_${e}`)),t.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:t.to((e=>e.preventDefault()))}})}focus(){if(this.children.length){const e=this.children.first;"function"==typeof e.focus?e.focus():(0,i.KE)("ui-dropdown-panel-focus-child-missing-focus",{childView:this.children.first,dropdownPanel:this})}}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}var n=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),a=s("./packages/ckeditor5-utils/src/index.ts"),c=s("./packages/ckeditor5-utils/src/dom/position.ts"),l=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=s.n(l),h=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/dropdown.css"),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(h.Z,u);h.Z.locals;class p extends o.Z{constructor(e,t,s){super(e);const o=this.bindTemplate;this.buttonView=t,this.panelView=s,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class",void 0),this.set("id",void 0),this.set("panelPosition","auto"),this.keystrokes=new n.Z,this.focusTracker=new a.Rh,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",o.to("class"),o.if("isEnabled","ck-disabled",(e=>!e))],id:o.to("id"),"aria-describedby":o.to("ariaDescribedById")},children:[t,s]}),t.extendTemplate({attributes:{class:["ck-dropdown__button"],"data-cke-tooltip-disabled":o.to("isOpen")}})}render(){super.render(),this.focusTracker.add(this.buttonView.element),this.focusTracker.add(this.panelView.element),this.listenTo(this.buttonView,"open",(()=>{this.isOpen=!this.isOpen})),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",((e,t,s)=>{s&&("auto"===this.panelPosition?this.panelView.position=p._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelView.position=this.panelPosition)})),this.keystrokes.listenTo(this.element);const e=(e,t)=>{this.isOpen&&(this.isOpen=!1,t())};this.keystrokes.set("arrowdown",((e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())})),this.keystrokes.set("arrowright",((e,t)=>{this.isOpen&&t()})),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{south:e,north:t,southEast:s,southWest:o,northEast:i,northWest:r,southMiddleEast:n,southMiddleWest:a,northMiddleEast:c,northMiddleWest:l}=p.defaultPanelPositions;return"rtl"!==this.locale.uiLanguageDirection?[s,o,n,a,e,i,r,c,l,t]:[o,s,a,n,e,r,i,l,c,t]}}p.defaultPanelPositions={south:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/2,name:"s"}),southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,t)=>({top:e.bottom,left:e.left-t.width+e.width,name:"sw"}),southMiddleEast:(e,t)=>({top:e.bottom,left:e.left-(t.width-e.width)/4,name:"sme"}),southMiddleWest:(e,t)=>({top:e.bottom,left:e.left-3*(t.width-e.width)/4,name:"smw"}),north:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/2,name:"n"}),northEast:(e,t)=>({top:e.top-t.height,left:e.left,name:"ne"}),northWest:(e,t)=>({top:e.top-t.height,left:e.left-t.width+e.width,name:"nw"}),northMiddleEast:(e,t)=>({top:e.top-t.height,left:e.left-(t.width-e.width)/4,name:"nme"}),northMiddleWest:(e,t)=>({top:e.top-t.height,left:e.left-3*(t.width-e.width)/4,name:"nmw"})},p._getOptimalPosition=c.x;var g=s("./packages/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.ts"),f=s("./packages/ckeditor5-ui/src/toolbar/toolbarview.ts"),m=s("./packages/ckeditor5-ui/src/list/listview.ts"),k=s("./packages/ckeditor5-ui/src/list/listitemview.ts");class b extends o.Z{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var _=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),w=s("./packages/ckeditor5-ui/src/dropdown/button/splitbuttonview.ts"),v=s("./packages/ckeditor5-ui/src/button/switchbuttonview.ts"),y=s("./packages/ckeditor5-ui/src/bindings/clickoutsidehandler.ts"),Z=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/toolbardropdown.css"),P={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(Z.Z,P);Z.Z.locals;var x=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/dropdown/listdropdown.css"),T={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(x.Z,T);x.Z.locals;function A(e,t=g.Z){const s=new t(e),o=new r(e),i=new p(e,s,o);return s.bind("isEnabled").to(i),s instanceof w.Z?s.arrowView.bind("isOn").to(i,"isOpen"):s.bind("isOn").to(i,"isOpen"),function(e){(function(e){e.on("render",(()=>{(0,y.Z)({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})}))})(e),function(e){e.on("execute",(t=>{t.source instanceof v.Z||(e.isOpen=!1)}))}(e),function(e){e.focusTracker.on("change:isFocused",((t,s,o)=>{e.isOpen&&!o&&(e.isOpen=!1)}))}(e),function(e){e.keystrokes.set("arrowdown",((t,s)=>{e.isOpen&&(e.panelView.focus(),s())})),e.keystrokes.set("arrowup",((t,s)=>{e.isOpen&&(e.panelView.focusLast(),s())}))}(e),function(e){e.on("change:isOpen",((t,s,o)=>{o||e.panelView.element.contains(a.CO.document.activeElement)&&e.buttonView.focus()}))}(e),function(e){e.on("change:isOpen",((t,s,o)=>{o&&e.panelView.focus()}),{priority:"low"})}(e)}(i),i}function C(e,t,s={}){const o=e.locale,i=o.t,r=e.toolbarView=new f.Z(o);r.set("ariaLabel",i("Dropdown toolbar")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),t.map((e=>r.items.add(e))),s.enableActiveItemFocusOnDropdownOpen&&S(e,(()=>r.items.find((e=>e.isOn)))),e.panelView.children.add(r),r.items.delegate("execute").to(e)}function E(e,t){const s=e.locale,o=e.listView=new m.Z(s);o.items.bindTo(t).using((e=>{if("separator"===e.type)return new b(s);if("button"===e.type||"switchbutton"===e.type){const t=new k.Z(s);let o;return o="button"===e.type?new _.Z(s):new v.Z(s),o.bind(...Object.keys(e.model)).to(e.model),o.delegate("execute").to(t),t.children.add(o),t}return null})),e.panelView.children.add(o),o.items.delegate("execute").to(e),S(e,(()=>o.items.find((e=>e instanceof k.Z&&e.children.first.isOn))))}function S(e,t){e.on("change:isOpen",(()=>{if(!e.isOpen)return;const s=t();s&&("function"==typeof s.focus?s.focus():(0,a.KE)("ui-dropdown-focus-child-on-open-child-missing-focus",{view:s}))}),{priority:a.tA.low-10})}},"./packages/ckeditor5-ui/src/focuscycler.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/dom/isvisible.ts");class i{constructor(e){if(this.focusables=e.focusables,this.focusTracker=e.focusTracker,this.keystrokeHandler=e.keystrokeHandler,this.actions=e.actions,e.actions&&e.keystrokeHandler)for(const t in e.actions){let s=e.actions[t];"string"==typeof s&&(s=[s]);for(const o of s)e.keystrokeHandler.set(o,((e,s)=>{this[t](),s()}))}}get first(){return this.focusables.find(r)||null}get last(){return this.focusables.filter(r).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find(((t,s)=>{const o=t.element===this.focusTracker.focusedElement;return o&&(e=s),o})),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,s=this.focusables.length;if(!s)return null;if(null===t)return this[1===e?"first":"last"];let o=(t+s+e)%s;do{const t=this.focusables.get(o);if(r(t))return t;o=(o+s+e)%s}while(o!==t);return null}}function r(e){return!(!e.focus||!(0,o.Z)(e.element))}},"./packages/ckeditor5-ui/src/icon/iconview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),r=s.n(i),n=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/icon/icon.css"),a={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};r()(n.Z,a);n.Z.locals;class c extends o.Z{constructor(){super();const e=this.bindTemplate;this.set("content",""),this.set("viewBox","0 0 20 20"),this.set("fillColor",""),this.set("isColorInherited",!0),this.setTemplate({tag:"svg",ns:"http://www.w3.org/2000/svg",attributes:{class:["ck","ck-icon","ck-reset_all-excluded",e.if("isColorInherited","ck-icon_inherit-color")],viewBox:e.to("viewBox")}})}render(){super.render(),this._updateXMLContent(),this._colorFillPaths(),this.on("change:content",(()=>{this._updateXMLContent(),this._colorFillPaths()})),this.on("change:fillColor",(()=>{this._colorFillPaths()}))}_updateXMLContent(){if(this.content){const e=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml").querySelector("svg"),t=e.getAttribute("viewBox");t&&(this.viewBox=t);for(const{name:t,value:s}of Array.from(e.attributes))c.presentationalAttributeNames.includes(t)&&this.element.setAttribute(t,s);for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);for(;e.childNodes.length>0;)this.element.appendChild(e.childNodes[0])}}_colorFillPaths(){this.fillColor&&this.element.querySelectorAll(".ck-icon__fill").forEach((e=>{e.style.fill=this.fillColor}))}}c.presentationalAttributeNames=["alignment-baseline","baseline-shift","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-rendering","cursor","direction","display","dominant-baseline","fill","fill-opacity","fill-rule","filter","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","image-rendering","letter-spacing","lighting-color","marker-end","marker-mid","marker-start","mask","opacity","overflow","paint-order","pointer-events","shape-rendering","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-anchor","text-decoration","text-overflow","text-rendering","transform","unicode-bidi","vector-effect","visibility","white-space","word-spacing","writing-mode"]},"./packages/ckeditor5-ui/src/list/listitemview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-ui/src/view.ts");class i extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("isVisible",!0),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item",t.if("isVisible","ck-hidden",(e=>!e))]},children:this.children})}focus(){this.children.first.focus()}}},"./packages/ckeditor5-ui/src/list/listview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-utils/src/focustracker.ts"),r=s("./packages/ckeditor5-ui/src/focuscycler.ts"),n=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),a=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),c=s.n(a),l=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/list/list.css"),d={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};c()(l.Z,d);l.Z.locals;class h extends o.Z{constructor(e){super(e),this.items=this.createCollection(),this.focusTracker=new i.Z,this.keystrokes=new n.Z,this._focusCycler=new r.Z({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"arrowup",focusNext:"arrowdown"}}),this.setTemplate({tag:"ul",attributes:{class:["ck","ck-reset","ck-list"]},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}},"./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>f,M:()=>k});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-utils/src/dom/position.ts"),r=s("./packages/ckeditor5-utils/src/dom/isrange.ts"),n=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),a=s("./packages/ckeditor5-utils/src/dom/global.ts"),c=s("./node_modules/lodash-es/isElement.js"),l=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=s.n(l),h=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonpanel.css"),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(h.Z,u);h.Z.locals;const p=(0,n.Z)("px"),g=a.Z.document.body;class f extends o.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("position","arrow_nw"),this.set("isVisible",!1),this.set("withArrow",!0),this.set("class",void 0),this._pinWhenIsVisibleCallback=null,this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",t.to("position",(e=>`ck-balloon-panel_${e}`)),t.if("isVisible","ck-balloon-panel_visible"),t.if("withArrow","ck-balloon-panel_with-arrow"),t.to("class")],style:{top:t.to("top",p),left:t.to("left",p)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=f.defaultPositions,s=Object.assign({},{element:this.element,positions:[t.southArrowNorth,t.southArrowNorthMiddleWest,t.southArrowNorthMiddleEast,t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouth,t.northArrowSouthMiddleWest,t.northArrowSouthMiddleEast,t.northArrowSouthWest,t.northArrowSouthEast,t.viewportStickyNorth],limiter:g,fitInViewport:!0},e),o=f._getOptimalPosition(s),i=parseInt(o.left),r=parseInt(o.top),n=o.name,a=o.config||{},{withArrow:c=!0}=a;this.top=r,this.left=i,this.position=n,this.withArrow=c}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=m(e.target),s=e.limiter?m(e.limiter):g;this.listenTo(a.Z.document,"scroll",((o,i)=>{const r=i.target,n=t&&r.contains(t),a=s&&r.contains(s);!n&&!a&&t&&s||this.attachTo(e)}),{useCapture:!0}),this.listenTo(a.Z.window,"resize",(()=>{this.attachTo(e)}))}_stopPinning(){this.stopListening(a.Z.document,"scroll"),this.stopListening(a.Z.window,"resize")}}function m(e){return(0,c.Z)(e)?e:(0,r.Z)(e)?e.commonAncestorContainer:"function"==typeof e?m(e()):null}function k(e={}){const{sideOffset:t=f.arrowSideOffset,heightOffset:s=f.arrowHeightOffset,stickyVerticalOffset:o=f.stickyVerticalOffset,config:i}=e;return{northWestArrowSouthWest:(e,s)=>({top:r(e,s),left:e.left-t,name:"arrow_sw",...i&&{config:i}}),northWestArrowSouthMiddleWest:(e,s)=>({top:r(e,s),left:e.left-.25*s.width-t,name:"arrow_smw",...i&&{config:i}}),northWestArrowSouth:(e,t)=>({top:r(e,t),left:e.left-t.width/2,name:"arrow_s",...i&&{config:i}}),northWestArrowSouthMiddleEast:(e,s)=>({top:r(e,s),left:e.left-.75*s.width+t,name:"arrow_sme",...i&&{config:i}}),northWestArrowSouthEast:(e,s)=>({top:r(e,s),left:e.left-s.width+t,name:"arrow_se",...i&&{config:i}}),northArrowSouthWest:(e,s)=>({top:r(e,s),left:e.left+e.width/2-t,name:"arrow_sw",...i&&{config:i}}),northArrowSouthMiddleWest:(e,s)=>({top:r(e,s),left:e.left+e.width/2-.25*s.width-t,name:"arrow_smw",...i&&{config:i}}),northArrowSouth:(e,t)=>({top:r(e,t),left:e.left+e.width/2-t.width/2,name:"arrow_s",...i&&{config:i}}),northArrowSouthMiddleEast:(e,s)=>({top:r(e,s),left:e.left+e.width/2-.75*s.width+t,name:"arrow_sme",...i&&{config:i}}),northArrowSouthEast:(e,s)=>({top:r(e,s),left:e.left+e.width/2-s.width+t,name:"arrow_se",...i&&{config:i}}),northEastArrowSouthWest:(e,s)=>({top:r(e,s),left:e.right-t,name:"arrow_sw",...i&&{config:i}}),northEastArrowSouthMiddleWest:(e,s)=>({top:r(e,s),left:e.right-.25*s.width-t,name:"arrow_smw",...i&&{config:i}}),northEastArrowSouth:(e,t)=>({top:r(e,t),left:e.right-t.width/2,name:"arrow_s",...i&&{config:i}}),northEastArrowSouthMiddleEast:(e,s)=>({top:r(e,s),left:e.right-.75*s.width+t,name:"arrow_sme",...i&&{config:i}}),northEastArrowSouthEast:(e,s)=>({top:r(e,s),left:e.right-s.width+t,name:"arrow_se",...i&&{config:i}}),southWestArrowNorthWest:e=>({top:n(e),left:e.left-t,name:"arrow_nw",...i&&{config:i}}),southWestArrowNorthMiddleWest:(e,s)=>({top:n(e),left:e.left-.25*s.width-t,name:"arrow_nmw",...i&&{config:i}}),southWestArrowNorth:(e,t)=>({top:n(e),left:e.left-t.width/2,name:"arrow_n",...i&&{config:i}}),southWestArrowNorthMiddleEast:(e,s)=>({top:n(e),left:e.left-.75*s.width+t,name:"arrow_nme",...i&&{config:i}}),southWestArrowNorthEast:(e,s)=>({top:n(e),left:e.left-s.width+t,name:"arrow_ne",...i&&{config:i}}),southArrowNorthWest:e=>({top:n(e),left:e.left+e.width/2-t,name:"arrow_nw",...i&&{config:i}}),southArrowNorthMiddleWest:(e,s)=>({top:n(e),left:e.left+e.width/2-.25*s.width-t,name:"arrow_nmw",...i&&{config:i}}),southArrowNorth:(e,t)=>({top:n(e),left:e.left+e.width/2-t.width/2,name:"arrow_n",...i&&{config:i}}),southArrowNorthMiddleEast:(e,s)=>({top:n(e),left:e.left+e.width/2-.75*s.width+t,name:"arrow_nme",...i&&{config:i}}),southArrowNorthEast:(e,s)=>({top:n(e),left:e.left+e.width/2-s.width+t,name:"arrow_ne",...i&&{config:i}}),southEastArrowNorthWest:e=>({top:n(e),left:e.right-t,name:"arrow_nw",...i&&{config:i}}),southEastArrowNorthMiddleWest:(e,s)=>({top:n(e),left:e.right-.25*s.width-t,name:"arrow_nmw",...i&&{config:i}}),southEastArrowNorth:(e,t)=>({top:n(e),left:e.right-t.width/2,name:"arrow_n",...i&&{config:i}}),southEastArrowNorthMiddleEast:(e,s)=>({top:n(e),left:e.right-.75*s.width+t,name:"arrow_nme",...i&&{config:i}}),southEastArrowNorthEast:(e,s)=>({top:n(e),left:e.right-s.width+t,name:"arrow_ne",...i&&{config:i}}),westArrowEast:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.left-t.width-s,name:"arrow_e",...i&&{config:i}}),eastArrowWest:(e,t)=>({top:e.top+e.height/2-t.height/2,left:e.right+s,name:"arrow_w",...i&&{config:i}}),viewportStickyNorth:(e,t,s)=>e.getIntersection(s)?{top:s.top+o,left:e.left+e.width/2-t.width/2,name:"arrowless",config:{withArrow:!1,...i}}:null};function r(e,t){return e.top-t.height-s}function n(e){return e.bottom+s}}f.arrowSideOffset=25,f.arrowHeightOffset=10,f.stickyVerticalOffset=20,f._getOptimalPosition=i.x,f.defaultPositions=k()},"./packages/ckeditor5-ui/src/panel/balloon/contextualballoon.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts"),r=s("./packages/ckeditor5-ui/src/view.ts"),n=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),a=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),c=s("./packages/ckeditor5-utils/src/focustracker.ts"),l=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),d=s("./packages/ckeditor5-utils/src/dom/rect.ts");var h=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),u=s.n(h),p=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/balloonrotator.css"),g={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};u()(p.Z,g);p.Z.locals;var f=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/fakepanel.css"),m={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};u()(f.Z,m);f.Z.locals;const k=(0,l.Z)("px");class b extends o.Z{constructor(e){super(e),this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.document.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this.set("visibleView",null),this.view=new i.Z(e.locale),e.ui.view.body.add(this.view),e.ui.focusTracker.add(this.view.element),this._viewToStack=new Map,this._idToStack=new Map,this.set("_numberOfStacks",0),this.set("_singleViewMode",!1),this._rotatorView=this._createRotatorView(),this._fakePanelsView=this._createFakePanelsView()}static get pluginName(){return"ContextualBalloon"}destroy(){super.destroy(),this.view.destroy(),this._rotatorView.destroy(),this._fakePanelsView.destroy()}hasView(e){return Array.from(this._viewToStack.keys()).includes(e)}add(e){if(this.hasView(e.view))throw new a.ZP("contextualballoon-add-view-exist",[this,e]);const t=e.stackId||"main";if(!this._idToStack.has(t))return this._idToStack.set(t,new Map([[e.view,e]])),this._viewToStack.set(e.view,this._idToStack.get(t)),this._numberOfStacks=this._idToStack.size,void(this._visibleStack&&!e.singleViewMode||this.showStack(t));const s=this._idToStack.get(t);e.singleViewMode&&this.showStack(t),s.set(e.view,e),this._viewToStack.set(e.view,s),s===this._visibleStack&&this._showView(e)}remove(e){if(!this.hasView(e))throw new a.ZP("contextualballoon-remove-view-not-exist",[this,e]);const t=this._viewToStack.get(e);this._singleViewMode&&this.visibleView===e&&(this._singleViewMode=!1),this.visibleView===e&&(1===t.size?this._idToStack.size>1?this._showNextStack():(this.view.hide(),this.visibleView=null,this._rotatorView.hideView()):this._showView(Array.from(t.values())[t.size-2])),1===t.size?(this._idToStack.delete(this._getStackId(t)),this._numberOfStacks=this._idToStack.size):t.delete(e),this._viewToStack.delete(e)}updatePosition(e){e&&(this._visibleStack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition()}showStack(e){this.visibleStack=e;const t=this._idToStack.get(e);if(!t)throw new a.ZP("contextualballoon-showstack-stack-not-exist",this);this._visibleStack!==t&&this._showView(Array.from(t.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(e){return Array.from(this._idToStack.entries()).find((t=>t[1]===e))[0]}_showNextStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)+1;e[t]||(t=0),this.showStack(this._getStackId(e[t]))}_showPrevStack(){const e=Array.from(this._idToStack.values());let t=e.indexOf(this._visibleStack)-1;e[t]||(t=e.length-1),this.showStack(this._getStackId(e[t]))}_createRotatorView(){const e=new _(this.editor.locale),t=this.editor.locale.t;return this.view.content.add(e),e.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>1)),e.on("change:isNavigationVisible",(()=>this.updatePosition()),{priority:"low"}),e.bind("counter").to(this,"visibleView",this,"_numberOfStacks",((e,s)=>{if(s<2)return"";const o=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return t("%0 of %1",[o,s])})),e.buttonNextView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showNextStack()})),e.buttonPrevView.on("execute",(()=>{e.focusTracker.isFocused&&this.editor.editing.view.focus(),this._showPrevStack()})),e}_createFakePanelsView(){const e=new w(this.editor.locale,this.view);return e.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",((e,t)=>!t&&e>=2?Math.min(e-1,2):0)),e.listenTo(this.view,"change:top",(()=>e.updatePosition())),e.listenTo(this.view,"change:left",(()=>e.updatePosition())),this.editor.ui.view.body.add(e),e}_showView({view:e,balloonClassName:t="",withArrow:s=!0,singleViewMode:o=!1}){this.view.class=t,this.view.withArrow=s,this._rotatorView.showView(e),this.visibleView=e,this.view.pin(this._getBalloonPosition()),this._fakePanelsView.updatePosition(),o&&(this._singleViewMode=!0)}_getBalloonPosition(){let e=Array.from(this._visibleStack.values()).pop().position;return e&&(e.limiter||(e=Object.assign({},e,{limiter:this.positionLimiter})),e=Object.assign({},e,{viewportOffsetConfig:this.editor.ui.viewportOffset})),e}}class _ extends r.Z{constructor(e){super(e);const t=e.t,s=this.bindTemplate;this.set("isNavigationVisible",!0),this.focusTracker=new c.Z,this.buttonPrevView=this._createButtonView(t("Previous"),''),this.buttonNextView=this._createButtonView(t("Next"),''),this.content=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",s.to("isNavigationVisible",(e=>e?"":"ck-hidden"))]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:s.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render(),this.focusTracker.add(this.element)}destroy(){super.destroy(),this.focusTracker.destroy()}showView(e){this.hideView(),this.content.add(e)}hideView(){this.content.clear()}_createButtonView(e,t){const s=new n.Z(this.locale);return s.set({label:e,icon:t,tooltip:!0}),s}}class w extends r.Z{constructor(e,t){super(e);const s=this.bindTemplate;this.set("top",0),this.set("left",0),this.set("height",0),this.set("width",0),this.set("numberOfPanels",0),this.content=this.createCollection(),this._balloonPanelView=t,this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",s.to("numberOfPanels",(e=>e?"":"ck-hidden"))],style:{top:s.to("top",k),left:s.to("left",k),width:s.to("width",k),height:s.to("height",k)}},children:this.content}),this.on("change:numberOfPanels",((e,t,s,o)=>{s>o?this._addPanels(s-o):this._removePanels(o-s),this.updatePosition()}))}_addPanels(e){for(;e--;){const e=new r.Z;e.setTemplate({tag:"div"}),this.content.add(e),this.registerChild(e)}}_removePanels(e){for(;e--;){const e=this.content.last;this.content.remove(e),this.deregisterChild(e),e.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:e,left:t}=this._balloonPanelView,{width:s,height:o}=new d.Z(this._balloonPanelView.element);Object.assign(this,{top:e,left:t,width:s,height:o})}}}},"./packages/ckeditor5-ui/src/template.ts":(e,t,s)=>{"use strict";s.d(t,{ZP:()=>h});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/emittermixin.ts"),r=s("./packages/ckeditor5-ui/src/view.ts"),n=s("./packages/ckeditor5-ui/src/viewcollection.ts"),a=s("./packages/ckeditor5-utils/src/dom/isnode.ts"),c=s("./node_modules/lodash-es/cloneDeepWith.js"),l=s("./node_modules/lodash-es/isObject.js"),d=s("./packages/ckeditor5-utils/src/toarray.ts");class h extends i.Q5{constructor(e){super(),Object.assign(this,v(w(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData={children:[],bindings:[],attributes:{}},this._renderNode({node:e,intoFragment:!1,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new o.ZP("ui-template-revert-not-applied",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(t){if(t.children)for(const s of t.children)A(s)?yield s:C(s)&&(yield*e(s))}(this)}static bind(e,t){return{to:(s,o)=>new p({eventNameOrFunction:s,attribute:s,observable:e,emitter:t,callback:o}),if:(s,o,i)=>new g({observable:e,emitter:t,attribute:s,valueIfTrue:o,callback:i})}}static extend(e,t){if(e._isRendered)throw new o.ZP("template-extend-render",[this,e]);x(e,v(w(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new o.ZP("ui-template-wrong-syntax",this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(""),f(this.text)?this._bindToObservable({schema:this.text,updater:k(t),data:e}):t.textContent=this.text.join(""),t}_renderAttributes(e){if(!this.attributes)return;const t=e.node,s=e.revertData;for(const o in this.attributes){const i=t.getAttribute(o),r=this.attributes[o];s&&(s.attributes[o]=i);const n=S(r)?r[0].ns:null;if(f(r)){const a=S(r)?r[0].value:r;s&&O(o)&&a.unshift(i),this._bindToObservable({schema:a,updater:b(t,o,n),data:e})}else if("style"==o&&"string"!=typeof r[0])this._renderStyleAttribute(r[0],e);else{s&&i&&O(o)&&r.unshift(i);const e=r.map((e=>e&&e.value||e)).reduce(((e,t)=>e.concat(t)),[]).reduce(Z,"");T(e)||t.setAttributeNS(n,o,e)}}}_renderStyleAttribute(e,t){const s=t.node;for(const o in e){const i=e[o];f(i)?this._bindToObservable({schema:[i],updater:_(s,o),data:t}):s.style[o]=i}}_renderElementChildren(e){const t=e.node,s=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let i=0;for(const r of this.children)if(E(r)){if(!o){r.setParent(t);for(const e of r)s.appendChild(e.element)}}else if(A(r))o||(r.isRendered||r.render(),s.appendChild(r.element));else if((0,a.Z)(r))s.appendChild(r);else if(o){const t={children:[],bindings:[],attributes:{}};e.revertData.children.push(t),r._renderNode({intoFragment:!1,node:s.childNodes[i++],isApplying:!0,revertData:t})}else s.appendChild(r.render());e.intoFragment&&t.appendChild(s)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const s=this.eventListeners[t].map((s=>{const[o,i]=t.split("@");return s.activateDomEventListener(o,i,e)}));e.revertData&&e.revertData.bindings.push(s)}}_bindToObservable({schema:e,updater:t,data:s}){const o=s.revertData;m(e,t,s);const i=e.filter((e=>!T(e))).filter((e=>e.observable)).map((o=>o.activateAttributeListener(e,t,s)));o&&o.bindings.push(i)}_revertTemplateFromNode(e,t){for(const e of t.bindings)for(const t of e)t();if(t.text)return void(e.textContent=t.text);const s=e;for(const e in t.attributes){const o=t.attributes[e];null===o?s.removeAttribute(e):s.setAttribute(e,o)}for(let e=0;em(e,t,s);return this.emitter.listenTo(this.observable,`change:${this.attribute}`,o),()=>{this.emitter.stopListening(this.observable,`change:${this.attribute}`,o)}}}class p extends u{constructor(e){super(e),this.eventNameOrFunction=e.eventNameOrFunction}activateDomEventListener(e,t,s){const o=(e,s)=>{t&&!s.target.matches(t)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(s):this.observable.fire(this.eventNameOrFunction,s))};return this.emitter.listenTo(s.node,e,o),()=>{this.emitter.stopListening(s.node,e,o)}}}class g extends u{constructor(e){super(e),this.valueIfTrue=e.valueIfTrue}getValue(e){return!T(super.getValue(e))&&(this.valueIfTrue||!0)}}function f(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(f):e instanceof u)}function m(e,t,{node:s}){const o=function(e,t){return e.map((e=>e instanceof u?e.getValue(t):e))}(e,s);let i;i=1==e.length&&e[0]instanceof g?o[0]:o.reduce(Z,""),T(i)?t.remove():t.set(i)}function k(e){return{set(t){e.textContent=t},remove(){e.textContent=""}}}function b(e,t,s){return{set(o){e.setAttributeNS(s,t,o)},remove(){e.removeAttributeNS(s,t)}}}function _(e,t){return{set(s){e.style[t]=s},remove(){e.style[t]=null}}}function w(e){return(0,c.Z)(e,(e=>{if(e&&(e instanceof u||C(e)||A(e)||E(e)))return e}))}function v(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){e.text=(0,d.Z)(e.text)}(e),e.on&&(e.eventListeners=function(e){for(const t in e)y(e,t);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const t in e)e[t].value&&(e[t].value=(0,d.Z)(e[t].value)),y(e,t)}(e.attributes);const t=[];if(e.children)if(E(e.children))t.push(e.children);else for(const s of e.children)C(s)||A(s)||(0,a.Z)(s)?t.push(s):t.push(new h(s));e.children=t}return e}function y(e,t){e[t]=(0,d.Z)(e[t])}function Z(e,t){return T(t)?e:T(e)?t:`${e} ${t}`}function P(e,t){for(const s in t)e[s]?e[s].push(...t[s]):e[s]=t[s]}function x(e,t){if(t.attributes&&(e.attributes||(e.attributes={}),P(e.attributes,t.attributes)),t.eventListeners&&(e.eventListeners||(e.eventListeners={}),P(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new o.ZP("ui-template-extend-children-mismatch",e);let s=0;for(const o of t.children)x(e.children[s++],o)}}function T(e){return!e&&0!==e}function A(e){return e instanceof r.Z}function C(e){return e instanceof h}function E(e){return e instanceof n.Z}function S(e){return(0,l.Z)(e[0])&&e[0].ns}function O(e){return"class"==e||"style"==e}},"./packages/ckeditor5-ui/src/toolbar/normalizetoolbarconfig.ts":(e,t,s)=>{"use strict";function o(e){return Array.isArray(e)?{items:e,removeItems:[]}:e?Object.assign({items:[],removeItems:[]},e):{items:[],removeItems:[]}}s.d(t,{Z:()=>o})},"./packages/ckeditor5-ui/src/toolbar/toolbarseparatorview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-ui/src/view.ts");class i extends o.Z{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}},"./packages/ckeditor5-ui/src/toolbar/toolbarview.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>x});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-utils/src/focustracker.ts"),r=s("./packages/ckeditor5-ui/src/focuscycler.ts"),n=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),a=s("./packages/ckeditor5-ui/src/toolbar/toolbarseparatorview.ts");class c extends o.Z{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__line-break"]}})}}var l=s("./packages/ckeditor5-utils/src/dom/resizeobserver.ts");function d(e){return e.bindTemplate.to((t=>{t.target===e.element&&t.preventDefault()}))}var h=s("./packages/ckeditor5-utils/src/dom/rect.ts"),u=s("./packages/ckeditor5-utils/src/dom/isvisible.ts"),p=s("./packages/ckeditor5-utils/src/dom/global.ts"),g=s("./packages/ckeditor5-ui/src/dropdown/utils.ts"),f=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),m=s("./packages/ckeditor5-ui/src/toolbar/normalizetoolbarconfig.ts"),k=s("./node_modules/lodash-es/isObject.js"),b=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_=s.n(b),w=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/toolbar.css"),v={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};_()(w.Z,v);w.Z.locals;var y=s("./packages/ckeditor5-core/src/index.ts");const{threeVerticalDots:Z}=y.ci,P={alignLeft:y.ci.alignLeft,bold:y.ci.bold,importExport:y.ci.importExport,paragraph:y.ci.paragraph,plus:y.ci.plus,text:y.ci.text,threeVerticalDots:y.ci.threeVerticalDots};class x extends o.Z{constructor(e,t){super(e);const s=this.bindTemplate,o=this.t;this.options=t||{},this.set("ariaLabel",o("Editor toolbar")),this.set("maxWidth","auto"),this.items=this.createCollection(),this.focusTracker=new i.Z,this.keystrokes=new n.Z,this.set("class",void 0),this.set("isCompact",!1),this.itemsView=new T(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection();const a="rtl"===e.uiLanguageDirection;this._focusCycler=new r.Z({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:[a?"arrowright":"arrowleft","arrowup"],focusNext:[a?"arrowleft":"arrowright","arrowdown"]}});const c=["ck","ck-toolbar",s.to("class"),s.if("isCompact","ck-toolbar_compact")];this.options.shouldGroupWhenFull&&this.options.isFloating&&c.push("ck-toolbar_floating"),this.setTemplate({tag:"div",attributes:{class:c,role:"toolbar","aria-label":s.to("ariaLabel"),style:{maxWidth:s.to("maxWidth")}},children:this.children,on:{mousedown:d(this)}}),this._behavior=this.options.shouldGroupWhenFull?new C(this):new A(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,t,s){const o=(0,m.Z)(e),i=s||o.removeItems,r=this._cleanItemsConfiguration(o.items,t,i).map((e=>(0,k.Z)(e)?this._createNestedToolbarDropdown(e,t,i):"|"===e?new a.Z:"-"===e?new c:t.create(e))).filter((e=>!!e));this.items.addMany(r)}_cleanItemsConfiguration(e,t,s){const o=e.filter(((e,o,i)=>"|"===e||-1===s.indexOf(e)&&("-"===e?!this.options.shouldGroupWhenFull||((0,f.KE)("toolbarview-line-break-ignored-when-grouping-items",i),!1):!(!(0,k.Z)(e)&&!t.has(e))||((0,f.KE)("toolbarview-item-unavailable",{item:e}),!1))));return this._cleanSeparatorsAndLineBreaks(o)}_cleanSeparatorsAndLineBreaks(e){const t=e=>"-"!==e&&"|"!==e,s=e.length,o=e.findIndex(t);if(-1===o)return[];const i=s-e.slice().reverse().findIndex(t);return e.slice(o,i).filter(((e,s,o)=>{if(t(e))return!0;return!(s>0&&o[s-1]===e)}))}_createNestedToolbarDropdown(e,t,s){let{label:o,icon:i,items:r,tooltip:n=!0,withText:a=!1}=e;if(r=this._cleanItemsConfiguration(r,t,s),!r.length)return null;const c=this.locale,l=(0,g.t9)(c);return o||(0,f.KE)("toolbarview-nested-toolbar-dropdown-missing-label",e),l.class="ck-toolbar__nested-toolbar-dropdown",l.buttonView.set({label:o,tooltip:n,withText:!!a}),!1!==i?l.buttonView.icon=P[i]||i||Z:l.buttonView.withText=!0,(0,g.up)(l,[]),l.toolbarView.fillFromConfig(r,t,s),l}}class T extends o.Z{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class A{constructor(e){const t=e.bindTemplate;e.set("isVertical",!1),e.itemsView.children.bindTo(e.items).using((e=>e)),e.focusables.bindTo(e.items).using((e=>e)),e.extendTemplate({attributes:{class:[t.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class C{constructor(e){this.view=e,this.viewChildren=e.children,this.viewFocusables=e.focusables,this.viewItemsView=e.itemsView,this.viewFocusTracker=e.focusTracker,this.viewLocale=e.locale,this.ungroupedItems=e.createCollection(),this.groupedItems=e.createCollection(),this.groupedItemsDropdown=this._createGroupedItemsDropdown(),this.resizeObserver=null,this.cachedPadding=null,this.shouldUpdateGroupingOnNextResize=!1,e.itemsView.children.bindTo(this.ungroupedItems).using((e=>e)),this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this)),this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this)),e.children.on("add",this._updateFocusCycleableItems.bind(this)),e.children.on("remove",this._updateFocusCycleableItems.bind(this)),e.items.on("change",((e,t)=>{const s=t.index,o=Array.from(t.added);for(const e of t.removed)s>=this.ungroupedItems.length?this.groupedItems.remove(e):this.ungroupedItems.remove(e);for(let e=s;ethis.ungroupedItems.length?this.groupedItems.add(t,e-this.ungroupedItems.length):this.ungroupedItems.add(t,e)}this._updateGrouping()})),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize(),this._enableGroupingOnMaxWidthChange(e)}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;if(!(0,u.Z)(this.viewElement))return void(this.shouldUpdateGroupingOnNextResize=!0);const e=this.groupedItems.length;let t;for(;this._areItemsOverflowing;)this._groupLastItem(),t=!0;if(!t&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}this.groupedItems.length!==e&&this.view.fire("groupedItemsUpdate")}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,t=this.viewLocale.uiLanguageDirection,s=new h.Z(e.lastChild),o=new h.Z(e);if(!this.cachedPadding){const s=p.Z.window.getComputedStyle(e),o="ltr"===t?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(s[o])}return"ltr"===t?s.right>o.right-this.cachedPadding:s.left{e&&e===t.contentRect.width&&!this.shouldUpdateGroupingOnNextResize||(this.shouldUpdateGroupingOnNextResize=!1,this._updateGrouping(),e=t.contentRect.width)})),this._updateGrouping()}_enableGroupingOnMaxWidthChange(e){e.on("change:maxWidth",(()=>{this._updateGrouping()}))}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new a.Z),this.viewChildren.add(this.groupedItemsDropdown),this.viewFocusTracker.add(this.groupedItemsDropdown.element)),this.groupedItems.add(this.ungroupedItems.remove(this.ungroupedItems.last),0)}_ungroupFirstItem(){this.ungroupedItems.add(this.groupedItems.remove(this.groupedItems.first)),this.groupedItems.length||(this.viewChildren.remove(this.groupedItemsDropdown),this.viewChildren.remove(this.viewChildren.last),this.viewFocusTracker.remove(this.groupedItemsDropdown.element))}_createGroupedItemsDropdown(){const e=this.viewLocale,t=e.t,s=(0,g.t9)(e);return s.class="ck-toolbar__grouped-dropdown",s.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",(0,g.up)(s,[]),s.buttonView.set({label:t("Show more items"),tooltip:!0,tooltipPosition:"rtl"===e.uiLanguageDirection?"se":"sw",icon:Z}),s.toolbarView.items.bindTo(this.groupedItems).using((e=>e)),s}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map((e=>{this.viewFocusables.add(e)})),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}},"./packages/ckeditor5-ui/src/tooltipmanager.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-ui/src/view.ts"),i=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts"),r=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),n=s("./packages/ckeditor5-utils/src/index.ts"),a=s("./node_modules/lodash-es/debounce.js"),c=s("./node_modules/lodash-es/isElement.js"),l=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),d=s.n(l),h=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/tooltip/tooltip.css"),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};d()(h.Z,u);h.Z.locals;const p="ck-tooltip";class g extends r.Q{constructor(e){if(super(),g._editors.add(e),g._instance)return g._instance;g._instance=this,this.tooltipTextView=new o.Z(e.locale),this.tooltipTextView.set("text",""),this.tooltipTextView.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:this.tooltipTextView.bindTemplate.to("text")}]}),this.balloonPanelView=new i.Z(e.locale),this.balloonPanelView.class=p,this.balloonPanelView.content.add(this.tooltipTextView),this._resizeObserver=null,this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._pinTooltipDebounced=(0,a.Z)(this._pinTooltip,600),this.listenTo(n.CO.document,"mouseenter",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"mouseleave",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"focus",this._onEnterOrFocus.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"blur",this._onLeaveOrBlur.bind(this),{useCapture:!0}),this.listenTo(n.CO.document,"scroll",this._onScroll.bind(this),{useCapture:!0}),this._watchdogExcluded=!0}destroy(e){const t=e.ui.view&&e.ui.view.body;g._editors.delete(e),this.stopListening(e.ui),t&&t.has(this.balloonPanelView)&&t.remove(this.balloonPanelView),g._editors.size||(this._unpinTooltip(),this.balloonPanelView.destroy(),this.stopListening(),g._instance=null)}static getPositioningFunctions(e){const t=g.defaultBalloonPositions;return{s:[t.southArrowNorth,t.southArrowNorthEast,t.southArrowNorthWest],n:[t.northArrowSouth],e:[t.eastArrowWest],w:[t.westArrowEast],sw:[t.southArrowNorthEast],se:[t.southArrowNorthWest]}[e]}_onEnterOrFocus(e,{target:t}){const s=f(t);var o;s&&(s!==this._currentElementWithTooltip&&(this._unpinTooltip(),this._pinTooltipDebounced(s,{text:(o=s).dataset.ckeTooltipText,position:o.dataset.ckeTooltipPosition||"s",cssClass:o.dataset.ckeTooltipClass||""})))}_onLeaveOrBlur(e,{target:t,relatedTarget:s}){if("mouseleave"===e.name){if(!(0,c.Z)(t))return;if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;const e=f(t),o=f(s);e&&e!==o&&this._unpinTooltip()}else{if(this._currentElementWithTooltip&&t!==this._currentElementWithTooltip)return;this._unpinTooltip()}}_onScroll(e,{target:t}){this._currentElementWithTooltip&&(t.contains(this.balloonPanelView.element)&&t.contains(this._currentElementWithTooltip)||this._unpinTooltip())}_pinTooltip(e,{text:t,position:s,cssClass:o}){const i=(0,n.Ps)(g._editors.values()).ui.view.body;i.has(this.balloonPanelView)||i.add(this.balloonPanelView),this.tooltipTextView.text=t,this.balloonPanelView.pin({target:e,positions:g.getPositioningFunctions(s)}),this._resizeObserver=new n.do(e,(()=>{(0,n.pn)(e)||this._unpinTooltip()})),this.balloonPanelView.class=[p,o].filter((e=>e)).join(" ");for(const e of g._editors)this.listenTo(e.ui,"update",this._updateTooltipPosition.bind(this),{priority:"low"});this._currentElementWithTooltip=e,this._currentTooltipPosition=s}_unpinTooltip(){this._pinTooltipDebounced.cancel(),this.balloonPanelView.unpin();for(const e of g._editors)this.stopListening(e.ui,"update");this._currentElementWithTooltip=null,this._currentTooltipPosition=null,this._resizeObserver&&this._resizeObserver.destroy()}_updateTooltipPosition(){(0,n.pn)(this._currentElementWithTooltip)?this.balloonPanelView.pin({target:this._currentElementWithTooltip,positions:g.getPositioningFunctions(this._currentTooltipPosition)}):this._unpinTooltip()}}function f(e){return(0,c.Z)(e)?e.closest("[data-cke-tooltip-text]:not([data-cke-tooltip-disabled])"):null}g.defaultBalloonPositions=(0,i.M)({heightOffset:5,sideOffset:13}),g._editors=new Set,g._instance=null},"./packages/ckeditor5-ui/src/view.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>g});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-ui/src/viewcollection.ts"),r=s("./packages/ckeditor5-ui/src/template.ts"),n=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),a=s("./packages/ckeditor5-utils/src/observablemixin.ts"),c=s("./packages/ckeditor5-utils/src/collection.ts"),l=s("./packages/ckeditor5-utils/src/isiterable.ts"),d=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),h=s.n(d),u=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/globals/globals.css"),p={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(u.Z,p);u.Z.locals;class g extends((0,n.Z)(a.y)){constructor(e){super(),this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new c.Z,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",((t,s)=>{s.locale=e,s.t=e&&e.t})),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=r.ZP.bind(this,this)}createCollection(e){const t=new i.Z(e);return this._viewCollections.add(t),t}registerChild(e){(0,l.Z)(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChild(e){(0,l.Z)(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new r.ZP(e)}extendTemplate(e){r.ZP.extend(this.template,e)}render(){if(this.isRendered)throw new o.ZP("ui-view-render-already-rendered",this);this.template&&(this.element=this.template.render(),this.registerChild(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e=>e.destroy())),this.template&&this.template._revertData&&this.template.revert(this.element)}}},"./packages/ckeditor5-ui/src/viewcollection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/collection.ts");class r extends i.Z{constructor(e=[]){super(e,{idProperty:"viewUid"}),this.on("add",((e,t,s)=>{this._renderViewIntoCollectionParent(t,s)})),this.on("remove",((e,t)=>{t.element&&this._parentElement&&t.element.remove()})),this._parentElement=null}destroy(){this.map((e=>e.destroy()))}setParent(e){this._parentElement=e;for(const e of this)this._renderViewIntoCollectionParent(e)}delegate(...e){if(!e.length||!e.every((e=>"string"==typeof e)))throw new o.ZP("ui-viewcollection-delegate-wrong-events",this);return{to:t=>{for(const s of this)for(const o of e)s.delegate(o).to(t);this.on("add",((s,o)=>{for(const s of e)o.delegate(s).to(t)})),this.on("remove",((s,o)=>{for(const s of e)o.stopDelegating(s,t)}))}}}_renderViewIntoCollectionParent(e,t){e.isRendered||e.render(),e.element&&this._parentElement&&this._parentElement.insertBefore(e.element,this._parentElement.children[t])}}},"./packages/ckeditor5-utils/src/ckeditorerror.ts":(e,t,s)=>{"use strict";s.d(t,{H:()=>r,KE:()=>i,ZP:()=>o});class o extends Error{constructor(e,t,s){super(function(e,t){const s=new WeakSet,o=(e,t)=>{if("object"==typeof t&&null!==t){if(s.has(t))return`[object ${t.constructor.name}]`;s.add(t)}return t},i=t?` ${JSON.stringify(t,o)}`:"",r=n(e);return e+i+r}(e,s)),this.name="CKEditorError",this.context=t,this.data=s}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,t){if(e.is&&e.is("CKEditorError"))throw e;const s=new o(e.message,t);throw s.stack=e.stack,s}}function i(e,t){console.warn(...a(e,t))}function r(e,t){console.error(...a(e,t))}function n(e){return`\nRead more: https://ckeditor.com/docs/ckeditor5/latest/support/error-codes.html#error-${e}`}function a(e,t){const s=n(e);return t?[e,t,s]:[e,s]}},"./packages/ckeditor5-utils/src/collection.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./packages/ckeditor5-utils/src/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/uid.ts"),n=s("./packages/ckeditor5-utils/src/isiterable.ts");class a extends o.Q5{constructor(e={},t={}){super();const s=(0,n.Z)(e);if(s||(t=e),this._items=[],this._itemMap=new Map,this._idProperty=t.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[],s)for(const t of e)this._items.push(t),this._itemMap.set(this._getItemIdBeforeAdding(t),t)}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){return this.addMany([e],t)}addMany(e,t){if(void 0===t)t=this._items.length;else if(t>this._items.length||t<0)throw new i.ZP("collection-add-item-invalid-index",this);let s=0;for(const o of e){const e=this._getItemIdBeforeAdding(o),i=t+s;this._items.splice(i,0,o),this._itemMap.set(e,o),this.fire("add",o,i),s++}return this.fire("change",{added:e,removed:[],index:t}),this}get(e){let t;if("string"==typeof e)t=this._itemMap.get(e);else{if("number"!=typeof e)throw new i.ZP("collection-get-invalid-arg",this);t=this._items[e]}return t||null}has(e){if("string"==typeof e)return this._itemMap.has(e);{const t=e[this._idProperty];return t&&this._itemMap.has(t)}}getIndex(e){let t;return t="string"==typeof e?this._itemMap.get(e):e,t?this._items.indexOf(t):-1}remove(e){const[t,s]=this._remove(e);return this.fire("change",{added:[],removed:[t],index:s}),t}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);const e=Array.from(this._items);for(;this.length;)this._remove(0);this.fire("change",{added:[],removed:e,index:0})}bindTo(e){if(this._bindToCollection)throw new i.ZP("collection-bind-to-rebind",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding((t=>new e(t)))},using:e=>{"function"==typeof e?this._setUpBindToBinding(e):this._setUpBindToBinding((t=>t[e]))}}}_setUpBindToBinding(e){const t=this._bindToCollection,s=(s,o,i)=>{const r=t._bindToCollection==this,n=t._bindToInternalToExternalMap.get(o);if(r&&n)this._bindToExternalToInternalMap.set(o,n),this._bindToInternalToExternalMap.set(n,o);else{const s=e(o);if(!s)return void this._skippedIndexesFromExternal.push(i);let r=i;for(const e of this._skippedIndexesFromExternal)i>e&&r--;for(const e of t._skippedIndexesFromExternal)r>=e&&r++;this._bindToExternalToInternalMap.set(o,s),this._bindToInternalToExternalMap.set(s,o),this.add(s,r);for(let e=0;e{const o=this._bindToExternalToInternalMap.get(t);o&&this.remove(o),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce(((e,t)=>(st&&e.push(t),e)),[])}))}_getItemIdBeforeAdding(e){const t=this._idProperty;let s;if(t in e){if(s=e[t],"string"!=typeof s)throw new i.ZP("collection-add-invalid-id",this);if(this.get(s))throw new i.ZP("collection-add-item-already-exists",this)}else e[t]=s=(0,r.Z)();return s}_remove(e){let t,s,o,r=!1;const n=this._idProperty;if("string"==typeof e?(s=e,o=this._itemMap.get(s),r=!o,o&&(t=this._items.indexOf(o))):"number"==typeof e?(t=e,o=this._items[t],r=!o,o&&(s=o[n])):(o=e,s=o[n],t=this._items.indexOf(o),r=-1==t||!this._itemMap.get(s)),r)throw new i.ZP("collection-remove-404",this);this._items.splice(t,1),this._itemMap.delete(s);const a=this._bindToInternalToExternalMap.get(o);return this._bindToInternalToExternalMap.delete(o),this._bindToExternalToInternalMap.delete(a),this.fire("remove",o,t),[o,t]}[Symbol.iterator](){return this._items[Symbol.iterator]()}}},"./packages/ckeditor5-utils/src/comparearrays.ts":(e,t,s)=>{"use strict";function o(e,t){const s=Math.min(e.length,t.length);for(let o=0;oo})},"./packages/ckeditor5-utils/src/count.ts":(e,t,s)=>{"use strict";function o(e){let t=0;for(const s of e)t++;return t}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/diff.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/fastdiff.ts");function i(e,t,s){s=s||function(e,t){return e===t};const o=e.length,r=t.length;if(o>200||r>200||o+r>300)return i.fastDiff(e,t,s,!0);let n,a;if(rr?-1:1;h[o+d]&&(h[o]=h[o+d].slice(0)),h[o]||(h[o]=[]),h[o].push(i>r?n:a);let p=Math.max(i,r),g=p-o;for(;gd;g--)u[g]=p(g);u[d]=p(d),f++}while(u[d]!==l);return h[d].slice(1)}i.fastDiff=o.Z},"./packages/ckeditor5-utils/src/dom/createelement.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-utils/src/isiterable.ts"),i=s("./node_modules/lodash-es/_baseGetTag.js"),r=s("./node_modules/lodash-es/isArray.js"),n=s("./node_modules/lodash-es/isObjectLike.js");const a=function(e){return"string"==typeof e||!(0,r.Z)(e)&&(0,n.Z)(e)&&"[object String]"==(0,i.Z)(e)};function c(e,t,s={},i=[]){const r=s&&s.xmlns,n=r?e.createElementNS(r,t):e.createElement(t);for(const e in s)n.setAttribute(e,s[e]);!a(i)&&(0,o.Z)(i)||(i=[i]);for(let t of i)a(t)&&(t=e.createTextNode(t)),n.appendChild(t);return n}},"./packages/ckeditor5-utils/src/dom/emittermixin.ts":(e,t,s)=>{"use strict";s.d(t,{Q:()=>c,Z:()=>a});var o=s("./packages/ckeditor5-utils/src/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/uid.ts"),r=s("./packages/ckeditor5-utils/src/dom/isnode.ts"),n=s("./packages/ckeditor5-utils/src/dom/iswindow.ts");function a(e){return class extends e{listenTo(e,t,s,i={}){if((0,r.Z)(e)||(0,n.Z)(e)){const o={capture:!!i.useCapture,passive:!!i.usePassive},r=this._getProxyEmitter(e,o)||new l(e,o);this.listenTo(r,t,s,i)}else o.Q5.prototype.listenTo.call(this,e,t,s,i)}stopListening(e,t,s){if((0,r.Z)(e)||(0,n.Z)(e)){const o=this._getAllProxyEmitters(e);for(const e of o)this.stopListening(e,t,s)}else o.Q5.prototype.stopListening.call(this,e,t,s)}_getProxyEmitter(e,t){return(0,o.Rl)(this,d(e,t))}_getAllProxyEmitters(e){return[{capture:!1,passive:!1},{capture:!1,passive:!0},{capture:!0,passive:!1},{capture:!0,passive:!0}].map((t=>this._getProxyEmitter(e,t))).filter((e=>!!e))}}}const c=a(o.Q5);["_getProxyEmitter","_getAllProxyEmitters","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{a[e]=c.prototype[e]}));class l extends o.Q5{constructor(e,t){super(),(0,o.Hv)(this,d(e,t)),this._domNode=e,this._options=t}attach(e){if(this._domListeners&&this._domListeners[e])return;const t=this._createDomListener(e);this._domNode.addEventListener(e,t,this._options),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}detach(e){let t;!this._domListeners[e]||(t=this._events[e])&&t.callbacks.length||this._domListeners[e].removeListener()}_addEventListener(e,t,s){this.attach(e),o.Q5.prototype._addEventListener.call(this,e,t,s)}_removeEventListener(e,t){o.Q5.prototype._removeEventListener.call(this,e,t),this.detach(e)}_createDomListener(e){const t=t=>{this.fire(e,t)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,this._options),delete this._domListeners[e]},t}}function d(e,t){let s=function(e){return e["data-ck-expando"]||(e["data-ck-expando"]=(0,i.Z)())}(e);for(const e of Object.keys(t).sort())t[e]&&(s+="-"+e);return s}},"./packages/ckeditor5-utils/src/dom/getborderwidths.ts":(e,t,s)=>{"use strict";function o(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/global.ts":(e,t,s)=>{"use strict";let o;s.d(t,{Z:()=>i});try{o={window,document}}catch(e){o={window:{},document:{}}}const i=o},"./packages/ckeditor5-utils/src/dom/iscomment.ts":(e,t,s)=>{"use strict";function o(e){return e&&e.nodeType===Node.COMMENT_NODE}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/isnode.ts":(e,t,s)=>{"use strict";function o(e){if(e){if(e.defaultView)return e instanceof e.defaultView.Document;if(e.ownerDocument&&e.ownerDocument.defaultView)return e instanceof e.ownerDocument.defaultView.Node}return!1}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/isrange.ts":(e,t,s)=>{"use strict";function o(e){return"[object Range]"==Object.prototype.toString.apply(e)}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/istext.ts":(e,t,s)=>{"use strict";function o(e){return"[object Text]"==Object.prototype.toString.call(e)}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/isvisible.ts":(e,t,s)=>{"use strict";function o(e){return!!(e&&e.getClientRects&&e.getClientRects().length)}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/iswindow.ts":(e,t,s)=>{"use strict";function o(e){const t=Object.prototype.toString.apply(e);return"[object Window]"==t||"[object global]"==t}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/position.ts":(e,t,s)=>{"use strict";s.d(t,{x:()=>a});var o=s("./packages/ckeditor5-utils/src/dom/global.ts"),i=s("./packages/ckeditor5-utils/src/dom/rect.ts");var r=s("./packages/ckeditor5-utils/src/dom/getborderwidths.ts"),n=s("./node_modules/lodash-es/isFunction.js");function a({element:e,target:t,positions:s,limiter:r,fitInViewport:a,viewportOffsetConfig:c}){(0,n.Z)(t)&&(t=t()),(0,n.Z)(r)&&(r=r());const d=function(e){return e&&e.parentNode?e.offsetParent===o.Z.document.body?null:e.offsetParent:null}(e),h=new i.Z(e),u=new i.Z(t);let p;const g=a&&function(e){e=Object.assign({top:0,bottom:0,left:0,right:0},e);const t=new i.Z(o.Z.window);return t.top+=e.top,t.height-=e.top,t.bottom-=e.bottom,t.height-=e.bottom,t}(c)||null,f={targetRect:u,elementRect:h,positionedElementAncestor:d,viewportRect:g};if(r||a){const e=r&&new i.Z(r).getVisible();Object.assign(f,{limiterRect:e,viewportRect:g}),p=function(e,t){const{elementRect:s}=t,o=s.getArea(),i=e.map((e=>new l(e,t))).filter((e=>!!e.name));let r=0,n=null;for(const e of i){const{limiterIntersectionArea:t,viewportIntersectionArea:s}=e;if(t===o)return e;const i=s**2+t**2;i>r&&(r=i,n=e)}return n}(s,f)||new l(s[0],f)}else p=new l(s[0],f);return p}function c(e){const{scrollX:t,scrollY:s}=o.Z.window;return e.clone().moveBy(t,s)}class l{constructor(e,t){const s=e(t.targetRect,t.elementRect,t.viewportRect);if(!s)return;const{left:o,top:i,name:r,config:n}=s;this.name=r,this.config=n,this._positioningFunctionCorrdinates={left:o,top:i},this._options=t}get left(){return this._absoluteRect.left}get top(){return this._absoluteRect.top}get limiterIntersectionArea(){const e=this._options.limiterRect;if(e){const t=this._options.viewportRect;if(!t)return e.getIntersectionArea(this._rect);{const s=e.getIntersection(t);if(s)return s.getIntersectionArea(this._rect)}}return 0}get viewportIntersectionArea(){const e=this._options.viewportRect;return e?e.getIntersectionArea(this._rect):0}get _rect(){return this._cachedRect||(this._cachedRect=this._options.elementRect.clone().moveTo(this._positioningFunctionCorrdinates.left,this._positioningFunctionCorrdinates.top)),this._cachedRect}get _absoluteRect(){return this._cachedAbsoluteRect||(this._cachedAbsoluteRect=c(this._rect),this._options.positionedElementAncestor&&function(e,t){const s=c(new i.Z(t)),o=(0,r.Z)(t);let n=0,a=0;n-=s.left,a-=s.top,n+=t.scrollLeft,a+=t.scrollTop,n-=o.left,a-=o.top,e.moveBy(n,a)}(this._cachedAbsoluteRect,this._options.positionedElementAncestor)),this._cachedAbsoluteRect}}},"./packages/ckeditor5-utils/src/dom/rect.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-utils/src/dom/isrange.ts"),i=s("./packages/ckeditor5-utils/src/dom/iswindow.ts"),r=s("./packages/ckeditor5-utils/src/dom/getborderwidths.ts"),n=s("./packages/ckeditor5-utils/src/dom/istext.ts");const a=["top","right","bottom","left","width","height"];class c{constructor(e){const t=(0,o.Z)(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),h(e)||t)if(t){const t=c.getDomRangeRects(e);l(this,c.getBoundingRect(t))}else l(this,e.getBoundingClientRect());else if((0,i.Z)(e)){const{innerWidth:t,innerHeight:s}=e;l(this,{top:0,right:t,bottom:s,left:0,width:t,height:s})}else l(this,e)}clone(){return new c(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:Math.max(this.top,e.top),right:Math.min(this.right,e.right),bottom:Math.min(this.bottom,e.bottom),left:Math.max(this.left,e.left),width:0,height:0};return t.width=t.right-t.left,t.height=t.bottom-t.top,t.width<0||t.height<0?null:new c(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!d(e)){let s=e.parentNode||e.commonAncestorContainer;for(;s&&!d(s);){const e=new c(s),o=t.getIntersection(e);if(!o)return null;o.getArea(){"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/dom/global.ts");class i{constructor(e,t){i._observerInstance||i._createObserver(),this._element=e,this._callback=t,i._addElementCallback(e,t),i._observerInstance.observe(e)}destroy(){i._deleteElementCallback(this._element,this._callback)}static _addElementCallback(e,t){i._elementCallbacks||(i._elementCallbacks=new Map);let s=i._elementCallbacks.get(e);s||(s=new Set,i._elementCallbacks.set(e,s)),s.add(t)}static _deleteElementCallback(e,t){const s=i._getElementCallbacks(e);s&&(s.delete(t),s.size||(i._elementCallbacks.delete(e),i._observerInstance.unobserve(e))),i._elementCallbacks&&!i._elementCallbacks.size&&(i._observerInstance=null,i._elementCallbacks=null)}static _getElementCallbacks(e){return i._elementCallbacks?i._elementCallbacks.get(e):null}static _createObserver(){i._observerInstance=new o.Z.window.ResizeObserver((e=>{for(const t of e){const e=i._getElementCallbacks(t.target);if(e)for(const s of e)s(t)}}))}}i._observerInstance=null,i._elementCallbacks=null},"./packages/ckeditor5-utils/src/dom/scroll.ts":(e,t,s)=>{"use strict";s.d(t,{F:()=>a,m:()=>n});var o=s("./packages/ckeditor5-utils/src/dom/isrange.ts"),i=s("./packages/ckeditor5-utils/src/dom/rect.ts"),r=s("./packages/ckeditor5-utils/src/dom/istext.ts");function n({target:e,viewportOffset:t=0}){const s=g(e);let o=s,i=null;for(;o;){let r;r=f(o==s?e:i),l(r,(()=>m(e,o)));const n=m(e,o);if(c(o,n,t),o.parent!=o){if(i=o.frameElement,o=o.parent,!i)return}else o=null}}function a(e){l(f(e),(()=>new i.Z(e)))}function c(e,t,s){const o=t.clone().moveBy(0,s),r=t.clone().moveBy(0,-s),n=new i.Z(e).excludeScrollbarsAndBorders();if(![r,o].every((e=>n.contains(e)))){let{scrollX:i,scrollY:a}=e;h(r,n)?a-=n.top-t.top+s:d(o,n)&&(a+=t.bottom-n.bottom+s),u(t,n)?i-=n.left-t.left+s:p(t,n)&&(i+=t.right-n.right+s),e.scrollTo(i,a)}}function l(e,t){const s=g(e);let o,r;for(;e!=s.document.body;)r=t(),o=new i.Z(e).excludeScrollbarsAndBorders(),o.contains(r)||(h(r,o)?e.scrollTop-=o.top-r.top:d(r,o)&&(e.scrollTop+=r.bottom-o.bottom),u(r,o)?e.scrollLeft-=o.left-r.left:p(r,o)&&(e.scrollLeft+=r.right-o.right)),e=e.parentNode}function d(e,t){return e.bottom>t.bottom}function h(e,t){return e.topt.right}function g(e){return(0,o.Z)(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function f(e){if((0,o.Z)(e)){let t=e.commonAncestorContainer;return(0,r.Z)(t)&&(t=t.parentNode),t}return e.parentNode}function m(e,t){const s=g(e),o=new i.Z(e);if(s===t)return o;{let e=s;for(;e!=t;){const t=e.frameElement,s=new i.Z(t).excludeScrollbarsAndBorders();o.moveBy(s.left,s.top),e=e.parent}}return o}},"./packages/ckeditor5-utils/src/dom/setdatainelement.ts":(e,t,s)=>{"use strict";function o(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/dom/tounit.ts":(e,t,s)=>{"use strict";function o(e){return t=>t+e}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/emittermixin.ts":(e,t,s)=>{"use strict";s.d(t,{Hv:()=>g,Q5:()=>u,Rl:()=>p,ZP:()=>h});var o=s("./packages/ckeditor5-utils/src/eventinfo.ts"),i=s("./packages/ckeditor5-utils/src/uid.ts"),r=s("./packages/ckeditor5-utils/src/priorities.ts"),n=s("./packages/ckeditor5-utils/src/inserttopriorityarray.ts"),a=(s("./packages/ckeditor5-utils/src/version.ts"),s("./packages/ckeditor5-utils/src/ckeditorerror.ts"));const c=Symbol("listeningTo"),l=Symbol("emitterId"),d=Symbol("delegations");function h(e){return class extends e{on(e,t,s){this.listenTo(this,e,t,s)}once(e,t,s){let o=!1;this.listenTo(this,e,((e,...s)=>{o||(o=!0,e.off(),t.call(this,e,...s))}),s)}off(e,t){this.stopListening(this,e,t)}listenTo(e,t,s,o={}){let i,r;this[c]||(this[c]={});const n=this[c];f(e)||g(e);const a=f(e);(i=n[a])||(i=n[a]={emitter:e,callbacks:{}}),(r=i.callbacks[t])||(r=i.callbacks[t]=[]),r.push(s),function(e,t,s,o,i){t._addEventListener?t._addEventListener(s,o,i):e._addEventListener.call(t,s,o,i)}(this,e,t,s,o)}stopListening(e,t,s){const o=this[c];let i=e&&f(e);const r=o&&i?o[i]:void 0,n=r&&t?r.callbacks[t]:void 0;if(!(!o||e&&!r||t&&!n))if(s){w(this,e,t,s);-1!==n.indexOf(s)&&(1===n.length?delete r.callbacks[t]:w(this,e,t,s))}else if(n){for(;s=n.pop();)w(this,e,t,s);delete r.callbacks[t]}else if(r){for(t in r.callbacks)this.stopListening(e,t);delete o[i]}else{for(i in o)this.stopListening(o[i].emitter);delete this[c]}}fire(e,...t){try{const s=e instanceof o.Z?e:new o.Z(this,e),i=s.name;let r=b(this,i);if(s.path.push(this),r){const e=[s,...t];r=Array.from(r);for(let t=0;t{this[d]||(this[d]=new Map),e.forEach((e=>{const o=this[d].get(e);o?o.set(t,s):this[d].set(e,new Map([[t,s]]))}))}}}stopDelegating(e,t){if(this[d])if(e)if(t){const s=this[d].get(e);s&&s.delete(t)}else this[d].delete(e);else this[d].clear()}_addEventListener(e,t,s){!function(e,t){const s=m(e);if(s[t])return;let o=t,i=null;const r=[];for(;""!==o&&!s[o];)s[o]={callbacks:[],childEvents:[]},r.push(s[o]),i&&s[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(":"));if(""!==o){for(const e of r)e.callbacks=s[o].callbacks.slice();s[o].childEvents.push(i)}}(this,e);const o=k(this,e),i={callback:t,priority:r.Z.get(s.priority)};for(const e of o)(0,n.Z)(e,i)}_removeEventListener(e,t){const s=k(this,e);for(const e of s)for(let s=0;s-1?b(e,t.substr(0,t.lastIndexOf(":"))):null}function _(e,t,s){for(let[i,r]of e){r?"function"==typeof r&&(r=r(t.name)):r=t.name;const e=new o.Z(t.source,r);e.path=[...t.path],i.fire(e,...s)}}function w(e,t,s,o){t._removeEventListener?t._removeEventListener(s,o):e._removeEventListener.call(t,s,o)}["on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{h[e]=u.prototype[e]}))},"./packages/ckeditor5-utils/src/env.ts":(e,t,s)=>{"use strict";s.d(t,{ZP:()=>r});const o=function(){try{return navigator.userAgent.toLowerCase()}catch(e){return""}}(),i={isMac:n(o),isWindows:function(e){return e.indexOf("windows")>-1}(o),isGecko:function(e){return!!e.match(/gecko\/\d+/)}(o),isSafari:function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(o),isiOS:function(e){return!!e.match(/iphone|ipad/i)||n(e)&&navigator.maxTouchPoints>0}(o),isAndroid:function(e){return e.indexOf("android")>-1}(o),isBlink:function(e){return e.indexOf("chrome/")>-1&&e.indexOf("edge/")<0}(o),features:{isRegExpUnicodePropertySupported:function(){let e=!1;try{e=0==="ć".search(new RegExp("[\\p{L}]","u"))}catch(e){}return e}()}},r=i;function n(e){return e.indexOf("macintosh")>-1}},"./packages/ckeditor5-utils/src/eventinfo.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const o=function(){return function e(){e.called=!0}};class i{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=o(),this.off=o()}}},"./packages/ckeditor5-utils/src/fastdiff.ts":(e,t,s)=>{"use strict";function o(e,t,s,o=!1){s=s||function(e,t){return e===t};const n=Array.isArray(e)?e:Array.prototype.slice.call(e),a=Array.isArray(t)?t:Array.prototype.slice.call(t),c=function(e,t,s){const o=i(e,t,s);if(-1===o)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const n=r(e,o),a=r(t,o),c=i(n,a,s),l=e.length-c,d=t.length-c;return{firstIndex:o,lastIndexOld:l,lastIndexNew:d}}(n,a,s);return o?function(e,t){const{firstIndex:s,lastIndexOld:o,lastIndexNew:i}=e;if(-1===s)return Array(t).fill("equal");let r=[];s>0&&(r=r.concat(Array(s).fill("equal")));i-s>0&&(r=r.concat(Array(i-s).fill("insert")));o-s>0&&(r=r.concat(Array(o-s).fill("delete")));i0&&s.push({index:o,type:"insert",values:e.slice(o,r)});i-o>0&&s.push({index:o+(r-o),type:"delete",howMany:i-o});return s}(a,c)}function i(e,t,s){for(let o=0;oo})},"./packages/ckeditor5-utils/src/first.ts":(e,t,s)=>{"use strict";function o(e){const t=e.next();return t.done?null:t.value}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/focustracker.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/observablemixin.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class n extends((0,o.Z)(i.y)){constructor(){super(),this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new r.ZP("focustracker-add-element-already-exist",this);this.listenTo(e,"focus",(()=>this._focus(e)),{useCapture:!0}),this.listenTo(e,"blur",(()=>this._blur()),{useCapture:!0}),this._elements.add(e)}remove(e){e===this.focusedElement&&this._blur(),this._elements.has(e)&&(this.stopListening(e),this._elements.delete(e))}destroy(){this.stopListening()}_focus(e){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=e,this.isFocused=!0}_blur(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout((()=>{this.focusedElement=null,this.isFocused=!1}),0)}}},"./packages/ckeditor5-utils/src/index.ts":(e,t,s)=>{"use strict";s.d(t,{Bb:()=>c.ZP,FE:()=>Z.Z,Xu:()=>h.Z,a6:()=>l,ln:()=>n.ZP,Rh:()=>x.Z,VD:()=>T.Z,go:()=>y.Z,Re:()=>a.Z,UL:()=>g.Z,do:()=>f.Z,az:()=>d.Z,Hg:()=>i.Z,OB:()=>o.ZP,Ps:()=>P.Z,Cq:()=>w.Cq,yy:()=>p,XU:()=>w.XU,j9:()=>v.j,mA:()=>w.mA,CO:()=>u.Z,VG:()=>S.Z,dj:()=>w.dj,Zt:()=>w.Zt,pn:()=>b.Z,Do:()=>w.Do,H:()=>c.H,KE:()=>c.KE,CD:()=>r,Zz:()=>w.Zz,tA:()=>E.Z,F0:()=>_.F,mR:()=>_.m,jS:()=>m.Z,qo:()=>A.Z,qL:()=>C.Z,nn:()=>k.Z,hQ:()=>O.Z,i8:()=>R.Z});var o=s("./packages/ckeditor5-utils/src/env.ts"),i=s("./packages/ckeditor5-utils/src/diff.ts");function r(e,...t){t.forEach((t=>{const s=Object.getOwnPropertyNames(t),o=Object.getOwnPropertySymbols(t);s.concat(o).forEach((s=>{if(s in e.prototype)return;if("function"==typeof t&&("length"==s||"name"==s||"prototype"==s))return;const o=Object.getOwnPropertyDescriptor(t,s);o.enumerable=!1,Object.defineProperty(e.prototype,s,o)}))}))}var n=s("./packages/ckeditor5-utils/src/emittermixin.ts"),a=s("./packages/ckeditor5-utils/src/observablemixin.ts"),c=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class l{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display="none",t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach((({element:e,newElement:t})=>{e.style.display="",t&&t.remove()})),this._replacedElements=[]}}var d=s("./packages/ckeditor5-utils/src/dom/createelement.ts"),h=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),u=s("./packages/ckeditor5-utils/src/dom/global.ts");function p(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}var g=s("./packages/ckeditor5-utils/src/dom/rect.ts"),f=s("./packages/ckeditor5-utils/src/dom/resizeobserver.ts"),m=s("./packages/ckeditor5-utils/src/dom/setdatainelement.ts"),k=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),b=s("./packages/ckeditor5-utils/src/dom/isvisible.ts"),_=s("./packages/ckeditor5-utils/src/dom/scroll.ts"),w=s("./packages/ckeditor5-utils/src/keyboard.ts"),v=s("./packages/ckeditor5-utils/src/language.ts"),y=s("./packages/ckeditor5-utils/src/locale.ts"),Z=s("./packages/ckeditor5-utils/src/collection.ts"),P=s("./packages/ckeditor5-utils/src/first.ts"),x=s("./packages/ckeditor5-utils/src/focustracker.ts"),T=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),A=s("./packages/ckeditor5-utils/src/toarray.ts"),C=s("./packages/ckeditor5-utils/src/tomap.ts"),E=s("./packages/ckeditor5-utils/src/priorities.ts"),S=s("./packages/ckeditor5-utils/src/inserttopriorityarray.ts"),O=s("./packages/ckeditor5-utils/src/uid.ts"),R=s("./packages/ckeditor5-utils/src/version.ts")},"./packages/ckeditor5-utils/src/inserttopriorityarray.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/priorities.ts");function i(e,t){const s=o.Z.get(t.priority);for(let i=0;i{"use strict";function o(e){return!(!e||!e[Symbol.iterator])}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/keyboard.ts":(e,t,s)=>{"use strict";s.d(t,{Cq:()=>l,Do:()=>a,XU:()=>h,Zt:()=>g,Zz:()=>d,dj:()=>u,mA:()=>p});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/env.ts");const r={ctrl:"⌃",cmd:"⌘",alt:"⌥",shift:"⇧"},n={ctrl:"Ctrl+",alt:"Alt+",shift:"Shift+"},a=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,shift:2228224,alt:4456448,cmd:8912896};for(let t=65;t<=90;t++){const s=String.fromCharCode(t);e[s.toLowerCase()]=t}for(let t=48;t<=57;t++)e[t-48]=t;for(let t=112;t<=123;t++)e["f"+(t-111)]=t;for(const t of"`-=[];',./\\")e[t]=t.charCodeAt(0);return e}(),c=Object.fromEntries(Object.entries(a).map((([e,t])=>[t,e.charAt(0).toUpperCase()+e.slice(1)])));function l(e){let t;if("string"==typeof e){if(t=a[e.toLowerCase()],!t)throw new o.ZP("keyboard-unknown-key",null,{key:e})}else t=e.keyCode+(e.altKey?a.alt:0)+(e.ctrlKey?a.ctrl:0)+(e.shiftKey?a.shift:0)+(e.metaKey?a.cmd:0);return t}function d(e){return"string"==typeof e&&(e=function(e){return e.split("+").map((e=>e.trim()))}(e)),e.map((e=>"string"==typeof e?function(e){if(e.endsWith("!"))return l(e.slice(0,-1));const t=l(e);return i.ZP.isMac&&t==a.ctrl?a.cmd:t}(e):e)).reduce(((e,t)=>t+e),0)}function h(e){let t=d(e);return Object.entries(i.ZP.isMac?r:n).reduce(((e,[s,o])=>(0!=(t&a[s])&&(t&=~a[s],e+=o),e)),"")+(t?c[t]:"")}function u(e){return e==a.arrowright||e==a.arrowleft||e==a.arrowup||e==a.arrowdown}function p(e,t){const s="ltr"===t;switch(e){case a.arrowleft:return s?"left":"right";case a.arrowright:return s?"right":"left";case a.arrowup:return"up";case a.arrowdown:return"down"}}function g(e,t){const s=p(e,t);return"down"===s||"right"===s}},"./packages/ckeditor5-utils/src/keystrokehandler.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/keyboard.ts");class r{constructor(){this._listener=new o.Q}listenTo(e){this._listener.listenTo(e,"keydown",((e,t)=>{this._listener.fire("_keydown:"+(0,i.Cq)(t),t)}))}set(e,t,s={}){const o=(0,i.Zz)(e),r=s.priority;this._listener.listenTo(this._listener,"_keydown:"+o,((e,s)=>{t(s,(()=>{s.preventDefault(),s.stopPropagation(),e.stop()})),e.return=!0}),{priority:r})}press(e){return!!this._listener.fire("_keydown:"+(0,i.Cq)(e),e)}destroy(){this._listener.stopListening()}}},"./packages/ckeditor5-utils/src/language.ts":(e,t,s)=>{"use strict";s.d(t,{j:()=>i});const o=["ar","ara","fa","per","fas","he","heb","ku","kur","ug","uig"];function i(e){return o.includes(e)?"rtl":"ltr"}},"./packages/ckeditor5-utils/src/locale.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./packages/ckeditor5-utils/src/toarray.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./packages/ckeditor5-utils/src/dom/global.ts");function n(e,t,s=1){if("number"!=typeof s)throw new i.ZP("translation-service-quantity-not-a-number",null,{quantity:s});const o=Object.keys(r.Z.window.CKEDITOR_TRANSLATIONS).length;1===o&&(e=Object.keys(r.Z.window.CKEDITOR_TRANSLATIONS)[0]);const n=t.id||t.string;if(0===o||!function(e,t){return!!r.Z.window.CKEDITOR_TRANSLATIONS[e]&&!!r.Z.window.CKEDITOR_TRANSLATIONS[e].dictionary[t]}(e,n))return 1!==s?t.plural:t.string;const a=r.Z.window.CKEDITOR_TRANSLATIONS[e].dictionary,c=r.Z.window.CKEDITOR_TRANSLATIONS[e].getPluralForm||(e=>1===e?0:1),l=a[n];if("string"==typeof l)return l;return l[Number(c(s))]}r.Z.window.CKEDITOR_TRANSLATIONS||(r.Z.window.CKEDITOR_TRANSLATIONS={});var a=s("./packages/ckeditor5-utils/src/language.ts");class c{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=(0,a.j)(this.uiLanguage),this.contentLanguageDirection=(0,a.j)(this.contentLanguage),this.t=(e,t)=>this._t(e,t)}get language(){return console.warn("locale-deprecated-language-property: The Locale#language property has been deprecated and will be removed in the near future. Please use #uiLanguage and #contentLanguage properties instead."),this.uiLanguage}_t(e,t=[]){t=(0,o.Z)(t),"string"==typeof e&&(e={string:e});const s=!!e.plural?t[0]:1;return function(e,t){return e.replace(/%(\d+)/g,((e,s)=>s{"use strict";s.d(t,{Z:()=>h,y:()=>u});var o=s("./packages/ckeditor5-utils/src/emittermixin.ts"),i=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),r=s("./node_modules/lodash-es/isObject.js");const n=Symbol("observableProperties"),a=Symbol("boundObservables"),c=Symbol("boundProperties"),l=Symbol("decoratedMethods"),d=Symbol("decoratedOriginal");function h(e){return class extends e{set(e,t){if((0,r.Z)(e))return void Object.keys(e).forEach((t=>{this.set(t,e[t])}),this);p(this);const s=this[n];if(e in this&&!s.has(e))throw new i.ZP("observable-set-cannot-override",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>s.get(e),set(t){const o=s.get(e);let i=this.fire(`set:${e}`,e,t,o);void 0===i&&(i=t),o===i&&s.has(e)||(s.set(e,i),this.fire(`change:${e}`,e,i,o))}}),this[e]=t}bind(...e){if(!e.length||!m(e))throw new i.ZP("observable-bind-wrong-properties",this);if(new Set(e).size!==e.length)throw new i.ZP("observable-bind-duplicate-properties",this);p(this);const t=this[c];e.forEach((e=>{if(t.has(e))throw new i.ZP("observable-bind-rebind",this)}));const s=new Map;return e.forEach((e=>{const o={property:e,to:[]};t.set(e,o),s.set(e,o)})),{to:g,toMany:f,_observable:this,_bindProperties:e,_to:[],_bindings:s}}unbind(...e){if(!this[n])return;const t=this[c],s=this[a];if(e.length){if(!m(e))throw new i.ZP("observable-unbind-wrong-properties",this);e.forEach((e=>{const o=t.get(e);o&&(o.to.forEach((([e,t])=>{const i=s.get(e),r=i[t];r.delete(o),r.size||delete i[t],Object.keys(i).length||(s.delete(e),this.stopListening(e,"change"))})),t.delete(e))}))}else s.forEach(((e,t)=>{this.stopListening(t,"change")})),s.clear(),t.clear()}decorate(e){p(this);const t=this[e];if(!t)throw new i.ZP("observablemixin-cannot-decorate-undefined",this,{object:this,methodName:e});this.on(e,((e,s)=>{e.return=t.apply(this,s)})),this[e]=function(...t){return this.fire(e,t)},this[e][d]=t,this[l]||(this[l]=[]),this[l].push(e)}stopListening(e,t,s){if(!e&&this[l]){for(const e of this[l])this[e]=this[e][d];delete this[l]}o.Q5.prototype.stopListening.call(this,e,t,s)}}}const u=h(o.Q5);function p(e){e[n]||(Object.defineProperty(e,n,{value:new Map}),Object.defineProperty(e,a,{value:new Map}),Object.defineProperty(e,c,{value:new Map}))}function g(...e){const t=function(...e){if(!e.length)throw new i.ZP("observable-bind-to-parse-error",null);const t={to:[]};let s;"function"==typeof e[e.length-1]&&(t.callback=e.pop());return e.forEach((e=>{if("string"==typeof e)s.properties.push(e);else{if("object"!=typeof e)throw new i.ZP("observable-bind-to-parse-error",null);s={observable:e,properties:[]},t.to.push(s)}})),t}(...e),s=Array.from(this._bindings.keys()),o=s.length;if(!t.callback&&t.to.length>1)throw new i.ZP("observable-bind-to-no-callback",this);if(o>1&&t.callback)throw new i.ZP("observable-bind-to-extra-callback",this);var r;t.to.forEach((e=>{if(e.properties.length&&e.properties.length!==o)throw new i.ZP("observable-bind-to-properties-length",this);e.properties.length||(e.properties=this._bindProperties)})),this._to=t.to,t.callback&&(this._bindings.get(s[0]).callback=t.callback),r=this._observable,this._to.forEach((e=>{const t=r[a];let s;t.get(e.observable)||r.listenTo(e.observable,"change",((o,i)=>{s=t.get(e.observable)[i],s&&s.forEach((e=>{k(r,e.property)}))}))})),function(e){let t;e._bindings.forEach(((s,o)=>{e._to.forEach((i=>{t=i.properties[s.callback?0:e._bindProperties.indexOf(o)],s.to.push([i.observable,t]),function(e,t,s,o){const i=e[a],r=i.get(s),n=r||{};n[o]||(n[o]=new Set);n[o].add(t),r||i.set(s,n)}(e._observable,s,i.observable,t)}))}))}(this),this._bindProperties.forEach((e=>{k(this._observable,e)}))}function f(e,t,s){if(this._bindings.size>1)throw new i.ZP("observable-bind-to-many-not-one-binding",this);this.to(...function(e,t){const s=e.map((e=>[e,t]));return Array.prototype.concat.apply([],s)}(e,t),s)}function m(e){return e.every((e=>"string"==typeof e))}function k(e,t){const s=e[c].get(t);let o;s.callback?o=s.callback.apply(e,s.to.map((e=>e[0][e[1]]))):(o=s.to[0],o=o[0][o[1]]),Object.prototype.hasOwnProperty.call(e,t)?e[t]=o:e.set(t,o)}["set","bind","unbind","decorate","on","once","off","listenTo","stopListening","fire","delegate","stopDelegating","_addEventListener","_removeEventListener"].forEach((e=>{h[e]=u.prototype[e]}))},"./packages/ckeditor5-utils/src/priorities.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o={get(e="normal"){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5}},"./packages/ckeditor5-utils/src/toarray.ts":(e,t,s)=>{"use strict";function o(e){return Array.isArray(e)?e:[e]}s.d(t,{Z:()=>o})},"./packages/ckeditor5-utils/src/tomap.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./packages/ckeditor5-utils/src/isiterable.ts");function i(e){return(0,o.Z)(e)?new Map(e):function(e){const t=new Map;for(const s in e)t.set(s,e[s]);return t}(e)}},"./packages/ckeditor5-utils/src/uid.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});const o=new Array(256).fill("").map(((e,t)=>("0"+t.toString(16)).slice(-2)));function i(){const e=4294967296*Math.random()>>>0,t=4294967296*Math.random()>>>0,s=4294967296*Math.random()>>>0,i=4294967296*Math.random()>>>0;return"e"+o[e>>0&255]+o[e>>8&255]+o[e>>16&255]+o[e>>24&255]+o[t>>0&255]+o[t>>8&255]+o[t>>16&255]+o[t>>24&255]+o[s>>0&255]+o[s>>8&255]+o[s>>16&255]+o[s>>24&255]+o[i>>0&255]+o[i>>8&255]+o[i>>16&255]+o[i>>24&255]}},"./packages/ckeditor5-utils/src/version.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");const i="35.3.0",r=i,n="object"==typeof window?window:s.g;if(n.CKEDITOR_VERSION)throw new o.ZP("ckeditor-duplicated-modules",null);n.CKEDITOR_VERSION=i},"./packages/ckeditor5-widget/src/utils.ts":(e,t,s)=>{"use strict";s.d(t,{s4:()=>g,Uo:()=>f,KT:()=>P,id:()=>y,Qd:()=>m,em:()=>w,l6:()=>v,XC:()=>k,sC:()=>Z,$n:()=>x});var o=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),i=s("./packages/ckeditor5-utils/src/toarray.ts"),r=s("./packages/ckeditor5-engine/src/model/utils/findoptimalinsertionrange.ts"),n=s("./packages/ckeditor5-utils/src/emittermixin.ts");class a extends n.Q5{constructor(){super(),this._stack=[]}add(e,t){const s=this._stack,o=s[0];this._insertDescriptor(e);const i=s[0];o===i||c(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:t})}remove(e,t){const s=this._stack,o=s[0];this._removeDescriptor(e);const i=s[0];o===i||c(o,i)||this.fire("change:top",{oldDescriptor:o,newDescriptor:i,writer:t})}_insertDescriptor(e){const t=this._stack,s=t.findIndex((t=>t.id===e.id));if(c(e,t[s]))return;s>-1&&t.splice(s,1);let o=0;for(;t[o]&&l(t[o],e);)o++;t.splice(o,0,e)}_removeDescriptor(e){const t=this._stack,s=t.findIndex((t=>t.id===e));s>-1&&t.splice(s,1)}}function c(e,t){return e&&t&&e.priority==t.priority&&d(e.classes)==d(t.classes)}function l(e,t){return e.priority>t.priority||!(e.priorityd(t.classes)}function d(e){return Array.isArray(e)?e.sort().join(","):e}var h=s("./packages/ckeditor5-widget/src/widgettypearound/utils.ts"),u=s("./packages/ckeditor5-ui/src/icon/iconview.ts");const p='',g="ck-widget",f="ck-widget_selected";function m(e){return!!e.is("element")&&!!e.getCustomProperty("widget")}function k(e,t,s={}){if(!e.is("containerElement"))throw new o.ZP("widget-to-widget-wrong-element-type",null,{element:e});return t.setAttribute("contenteditable","false",e),t.addClass(g,e),t.setCustomProperty("widget",!0,e),e.getFillerOffset=T,s.label&&v(e,s.label,t),s.hasSelectionHandle&&function(e,t){const s=t.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(e){const t=this.toDomElement(e),s=new u.Z;return s.set("content",p),s.render(),t.appendChild(s.element),t}));t.insert(t.createPositionAt(e,0),s),t.addClass(["ck-widget_with-selection-handle"],e)}(e,t),w(e,t),e}function b(e,t,s){if(t.classes&&s.addClass((0,i.Z)(t.classes),e),t.attributes)for(const o in t.attributes)s.setAttribute(o,t.attributes[o],e)}function _(e,t,s){if(t.classes&&s.removeClass((0,i.Z)(t.classes),e),t.attributes)for(const o in t.attributes)s.removeAttribute(o,e)}function w(e,t,s=b,o=_){const i=new a;i.on("change:top",((t,i)=>{i.oldDescriptor&&o(e,i.oldDescriptor,i.writer),i.newDescriptor&&s(e,i.newDescriptor,i.writer)}));t.setCustomProperty("addHighlight",((e,t,s)=>i.add(t,s)),e),t.setCustomProperty("removeHighlight",((e,t,s)=>i.remove(t,s)),e)}function v(e,t,s){s.setCustomProperty("widgetLabel",t,e)}function y(e){const t=e.getCustomProperty("widgetLabel");return t?"function"==typeof t?t():t:""}function Z(e,t,s={}){return t.addClass(["ck-editor__editable","ck-editor__nested-editable"],e),t.setAttribute("role","textbox",e),s.label&&t.setAttribute("aria-label",s.label,e),t.setAttribute("contenteditable",e.isReadOnly?"false":"true",e),e.on("change:isReadOnly",((s,o,i)=>{t.setAttribute("contenteditable",i?"false":"true",e)})),e.on("change:isFocused",((s,o,i)=>{i?t.addClass("ck-editor__nested-editable_focused",e):t.removeClass("ck-editor__nested-editable_focused",e)})),w(e,t),e}function P(e,t){const s=e.getSelectedElement();if(s){const o=(0,h.tB)(e);if(o)return t.createRange(t.createPositionAt(s,o))}return(0,r.K)(e,t)}function x(e,t){return(s,o)=>{const{mapper:i,viewPosition:r}=o,n=i.findMappedViewAncestor(r);if(!t(n))return;const a=i.toModelElement(n);o.modelPosition=e.createPositionAt(a,r.isAtStart?"before":"after")}}function T(){return null}},"./packages/ckeditor5-widget/src/widget.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),r=s("./packages/ckeditor5-widget/src/widgettypearound/widgettypearound.ts"),n=s("./packages/ckeditor5-typing/src/delete.ts"),a=s("./packages/ckeditor5-utils/src/env.ts"),c=s("./packages/ckeditor5-utils/src/keyboard.ts"),l=s("./packages/ckeditor5-utils/src/dom/rect.ts");function d(e){const t=e.model;return(s,o)=>{const i=o.keyCode==c.Do.arrowup,r=o.keyCode==c.Do.arrowdown,n=o.shiftKey,a=t.document.selection;if(!i&&!r)return;const d=r;if(n&&function(e,t){return!e.isCollapsed&&e.isBackward==t}(a,d))return;const p=function(e,t,s){const o=e.model;if(s){const e=t.isCollapsed?t.focus:t.getLastPosition(),s=h(o,e,"forward");if(!s)return null;const i=o.createRange(e,s),r=u(o.schema,i,"backward");return r?o.createRange(e,r):null}{const e=t.isCollapsed?t.focus:t.getFirstPosition(),s=h(o,e,"backward");if(!s)return null;const i=o.createRange(s,e),r=u(o.schema,i,"forward");return r?o.createRange(r,e):null}}(e,a,d);if(p){if(p.isCollapsed){if(a.isCollapsed)return;if(n)return}(p.isCollapsed||function(e,t,s){const o=e.model,i=e.view.domConverter;if(s){const e=o.createSelection(t.start);o.modifySelection(e),e.focus.isAtEnd||t.start.isEqual(e.focus)||(t=o.createRange(e.focus,t.end))}const r=e.mapper.toViewRange(t),n=i.viewRangeToDom(r),a=l.Z.getDomRangeRects(n);let c;for(const e of a)if(void 0!==c){if(Math.round(e.top)>=c)return!1;c=Math.max(c,Math.round(e.bottom))}else c=Math.round(e.bottom);return!0}(e,p,d))&&(t.change((e=>{const s=d?p.end:p.start;if(n){const o=t.createSelection(a.anchor);o.setFocus(s),e.setSelection(o)}else e.setSelection(s)})),s.stop(),o.preventDefault(),o.stopPropagation())}}}function h(e,t,s){const o=e.schema,i=e.createRangeIn(t.root),r="forward"==s?"elementStart":"elementEnd";for(const{previousPosition:e,item:n,type:a}of i.getWalker({startPosition:t,direction:s})){if(o.isLimit(n)&&!o.isInline(n))return e;if(a==r&&o.isBlock(n))return null}return null}function u(e,t,s){const o="backward"==s?t.end:t.start;if(e.checkChild(o,"$text"))return o;for(const{nextPosition:o}of t.getWalker({direction:s}))if(e.checkChild(o,"$text"))return o;return null}var p=s("./packages/ckeditor5-widget/src/utils.ts"),g=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),f=s.n(g),m=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widget.css"),k={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};f()(m.Z,k);m.Z.locals;class b extends o.Z{static get pluginName(){return"Widget"}static get requires(){return[r.Z,n.Z]}init(){const e=this.editor,t=e.editing.view,s=t.document;this._previouslySelected=new Set,this.editor.editing.downcastDispatcher.on("selection",((t,s,o)=>{const i=o.writer,r=s.selection;if(r.isCollapsed)return;const n=r.getSelectedElement();if(!n)return;const a=e.editing.mapper.toViewElement(n);(0,p.Qd)(a)&&o.consumable.consume(r,"selection")&&i.setSelection(i.createRangeOn(a),{fake:!0,label:(0,p.id)(a)})})),this.editor.editing.downcastDispatcher.on("selection",((e,t,s)=>{this._clearPreviouslySelectedWidgets(s.writer);const o=s.writer,i=o.document.selection;let r=null;for(const e of i.getRanges())for(const t of e){const e=t.item;(0,p.Qd)(e)&&!_(e,r)&&(o.addClass(p.Uo,e),this._previouslySelected.add(e),r=e)}}),{priority:"low"}),t.addObserver(i.Z),this.listenTo(s,"mousedown",((...e)=>this._onMousedown(...e))),this.listenTo(s,"arrowKey",((...e)=>{this._handleSelectionChangeOnArrowKeyPress(...e)}),{context:[p.Qd,"$text"]}),this.listenTo(s,"arrowKey",((...e)=>{this._preventDefaultOnArrowKeyPress(...e)}),{context:"$root"}),this.listenTo(s,"arrowKey",d(this.editor.editing),{context:"$text"}),this.listenTo(s,"delete",((e,t)=>{this._handleDelete("forward"==t.direction)&&(t.preventDefault(),e.stop())}),{context:"$root"})}_onMousedown(e,t){const s=this.editor,o=s.editing.view,i=o.document;let r=t.target;if(function(e){let t=e;for(;t;){if(t.is("editableElement")&&!t.is("rootElement"))return!0;if((0,p.Qd)(t))return!1;t=t.parent}return!1}(r)){if((a.ZP.isSafari||a.ZP.isGecko)&&t.domEvent.detail>=3){const e=s.editing.mapper,o=r.is("attributeElement")?r.findAncestor((e=>!e.is("attributeElement"))):r,i=e.toModelElement(o);t.preventDefault(),this.editor.model.change((e=>{e.setSelection(i,"in")}))}return}if(!(0,p.Qd)(r)&&(r=r.findAncestor(p.Qd),!r))return;a.ZP.isAndroid&&t.preventDefault(),i.isFocused||o.focus();const n=s.editing.mapper.toModelElement(r);this._setSelectionOverElement(n)}_handleSelectionChangeOnArrowKeyPress(e,t){const s=t.keyCode,o=this.editor.model,i=o.schema,r=o.document.selection,n=r.getSelectedElement(),a=(0,c.mA)(s,this.editor.locale.contentLanguageDirection),l="down"==a||"right"==a,d="up"==a||"down"==a;if(n&&i.isObject(n)){const s=l?r.getLastPosition():r.getFirstPosition(),n=i.getNearestSelectionRange(s,l?"forward":"backward");return void(n&&(o.change((e=>{e.setSelection(n)})),t.preventDefault(),e.stop()))}if(!r.isCollapsed&&!t.shiftKey){const s=r.getFirstPosition(),n=r.getLastPosition(),a=s.nodeAfter,c=n.nodeBefore;return void((a&&i.isObject(a)||c&&i.isObject(c))&&(o.change((e=>{e.setSelection(l?n:s)})),t.preventDefault(),e.stop()))}if(!r.isCollapsed)return;const h=this._getObjectElementNextToSelection(l);if(h&&i.isObject(h)){if(i.isInline(h)&&d)return;this._setSelectionOverElement(h),t.preventDefault(),e.stop()}}_preventDefaultOnArrowKeyPress(e,t){const s=this.editor.model,o=s.schema,i=s.document.selection.getSelectedElement();i&&o.isObject(i)&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.model.document.selection;if(!t.isCollapsed)return;const s=this._getObjectElementNextToSelection(e);return s?(this.editor.model.change((e=>{let o=t.anchor.parent;for(;o.isEmpty;){const t=o;o=t.parent,e.remove(t)}this._setSelectionOverElement(s)})),!0):void 0}_setSelectionOverElement(e){this.editor.model.change((t=>{t.setSelection(t.createRangeOn(e))}))}_getObjectElementNextToSelection(e){const t=this.editor.model,s=t.schema,o=t.document.selection,i=t.createSelection(o);if(t.modifySelection(i,{direction:e?"forward":"backward"}),i.isEqual(o))return null;const r=e?i.focus.nodeBefore:i.focus.nodeAfter;return r&&s.isObject(r)?r:null}_clearPreviouslySelectedWidgets(e){for(const t of this._previouslySelected)e.removeClass(p.Uo,t);this._previouslySelected.clear()}}function _(e,t){return!!t&&Array.from(e.getAncestors()).includes(t)}},"./packages/ckeditor5-widget/src/widgettypearound/utils.ts":(e,t,s)=>{"use strict";s.d(t,{Xr:()=>n,_m:()=>r,aU:()=>a,bi:()=>i,t:()=>c,tB:()=>l});var o=s("./packages/ckeditor5-widget/src/utils.ts");const i="widget-type-around";function r(e,t,s){return!!e&&(0,o.Qd)(e)&&!s.isInline(t)}function n(e){return e.closest(".ck-widget__type-around__button")}function a(e){return e.classList.contains("ck-widget__type-around__button_before")?"before":"after"}function c(e,t){const s=e.closest(".ck-widget");return t.mapDomToView(s)}function l(e){return e.getAttribute(i)}},"./packages/ckeditor5-widget/src/widgettypearound/widgettypearound.ts":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-ui/src/template.ts"),r=s("./packages/ckeditor5-enter/src/enter.ts"),n=s("./packages/ckeditor5-typing/src/delete.ts"),a=s("./packages/ckeditor5-utils/src/keyboard.ts"),c=s("./packages/ckeditor5-widget/src/widgettypearound/utils.ts"),l=s("./packages/ckeditor5-widget/src/utils.ts");var d=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),h=s.n(d),u=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgettypearound.css"),p={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};h()(u.Z,p);u.Z.locals;var g=s("./packages/ckeditor5-utils/src/env.ts");const f=["before","after"],m=(new DOMParser).parseFromString('',"image/svg+xml").firstChild,k="ck-widget__type-around_disabled";class b extends o.Z{constructor(e){super(e),this._currentFakeCaretModelElement=null}static get pluginName(){return"WidgetTypeAround"}static get requires(){return[r.Z,n.Z]}init(){const e=this.editor,t=e.editing.view;this.on("change:isEnabled",((s,o,i)=>{t.change((e=>{for(const s of t.document.roots)i?e.removeClass(k,s):e.addClass(k,s)})),i||e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))})),this._enableTypeAroundUIInjection(),this._enableInsertingParagraphsOnButtonClick(),this._enableInsertingParagraphsOnEnterKeypress(),this._enableInsertingParagraphsOnTypingKeystroke(),this._enableTypeAroundFakeCaretActivationUsingKeyboardArrows(),this._enableDeleteIntegration(),this._enableInsertContentIntegration(),this._enableInsertObjectIntegration(),this._enableDeleteContentIntegration()}destroy(){super.destroy(),this._currentFakeCaretModelElement=null}_insertParagraph(e,t){const s=this.editor,o=s.editing.view,i=s.model.schema.getAttributesWithProperty(e,"copyOnReplace",!0);s.execute("insertParagraph",{position:s.model.createPositionAt(e,t),attributes:i}),o.focus(),o.scrollToTheSelection()}_listenToIfEnabled(e,t,s,o){this.listenTo(e,t,((...e)=>{this.isEnabled&&s(...e)}),o)}_insertParagraphAccordingToFakeCaretPosition(){const e=this.editor.model.document.selection,t=(0,c.tB)(e);if(!t)return!1;const s=e.getSelectedElement();return this._insertParagraph(s,t),!0}_enableTypeAroundUIInjection(){const e=this.editor,t=e.model.schema,s=e.locale.t,o={before:s("Insert paragraph before block"),after:s("Insert paragraph after block")};e.editing.downcastDispatcher.on("insert",((e,s,r)=>{const n=r.mapper.toViewElement(s.item);(0,c._m)(n,s.item,t)&&function(e,t,s){const o=e.createUIElement("div",{class:"ck ck-reset_all ck-widget__type-around"},(function(e){const s=this.toDomElement(e);return function(e,t){for(const s of f){const o=new i.ZP({tag:"div",attributes:{class:["ck","ck-widget__type-around__button",`ck-widget__type-around__button_${s}`],title:t[s]},children:[e.ownerDocument.importNode(m,!0)]});e.appendChild(o.render())}}(s,t),function(e){const t=new i.ZP({tag:"div",attributes:{class:["ck","ck-widget__type-around__fake-caret"]}});e.appendChild(t.render())}(s),s}));e.insert(e.createPositionAt(s,"end"),o)}(r.writer,o,n)}),{priority:"low"})}_enableTypeAroundFakeCaretActivationUsingKeyboardArrows(){const e=this.editor,t=e.model,s=t.document.selection,o=t.schema,i=e.editing.view;function r(e){return`ck-widget_type-around_show-fake-caret_${e}`}this._listenToIfEnabled(i.document,"arrowKey",((e,t)=>{this._handleArrowKeyPress(e,t)}),{context:[l.Qd,"$text"],priority:"high"}),this._listenToIfEnabled(s,"change:range",((t,s)=>{s.directChange&&e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))})),this._listenToIfEnabled(t.document,"change:data",(()=>{const t=s.getSelectedElement();if(t){const s=e.editing.mapper.toViewElement(t);if((0,c._m)(s,t,o))return}e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))})),this._listenToIfEnabled(e.editing.downcastDispatcher,"selection",((e,t,s)=>{const i=s.writer;if(this._currentFakeCaretModelElement){const e=s.mapper.toViewElement(this._currentFakeCaretModelElement);e&&(i.removeClass(f.map(r),e),this._currentFakeCaretModelElement=null)}const n=t.selection.getSelectedElement();if(!n)return;const a=s.mapper.toViewElement(n);if(!(0,c._m)(a,n,o))return;const l=(0,c.tB)(t.selection);l&&(i.addClass(r(l),a),this._currentFakeCaretModelElement=n)})),this._listenToIfEnabled(e.ui.focusTracker,"change:isFocused",((t,s,o)=>{o||e.model.change((e=>{e.removeSelectionAttribute(c.bi)}))}))}_handleArrowKeyPress(e,t){const s=this.editor,o=s.model,i=o.document.selection,r=o.schema,n=s.editing.view,l=t.keyCode,d=(0,a.Zt)(l,s.locale.contentLanguageDirection),h=n.document.selection.getSelectedElement(),u=s.editing.mapper.toModelElement(h);let p;(0,c._m)(h,u,r)?p=this._handleArrowKeyPressOnSelectedWidget(d):i.isCollapsed?p=this._handleArrowKeyPressWhenSelectionNextToAWidget(d):t.shiftKey||(p=this._handleArrowKeyPressWhenNonCollapsedSelection(d)),p&&(t.preventDefault(),e.stop())}_handleArrowKeyPressOnSelectedWidget(e){const t=this.editor.model,s=t.document.selection,o=(0,c.tB)(s);return t.change((t=>{if(!o)return t.setSelectionAttribute(c.bi,e?"after":"before"),!0;if(!(o===(e?"after":"before")))return t.removeSelectionAttribute(c.bi),!0;return!1}))}_handleArrowKeyPressWhenSelectionNextToAWidget(e){const t=this.editor,s=t.model,o=s.schema,i=t.plugins.get("Widget"),r=i._getObjectElementNextToSelection(e),n=t.editing.mapper.toViewElement(r);return!!(0,c._m)(n,r,o)&&(s.change((t=>{i._setSelectionOverElement(r),t.setSelectionAttribute(c.bi,e?"before":"after")})),!0)}_handleArrowKeyPressWhenNonCollapsedSelection(e){const t=this.editor,s=t.model,o=s.schema,i=t.editing.mapper,r=s.document.selection,n=e?r.getLastPosition().nodeBefore:r.getFirstPosition().nodeAfter,a=i.toViewElement(n);return!!(0,c._m)(a,n,o)&&(s.change((t=>{t.setSelection(n,"on"),t.setSelectionAttribute(c.bi,e?"after":"before")})),!0)}_enableInsertingParagraphsOnButtonClick(){const e=this.editor,t=e.editing.view;this._listenToIfEnabled(t.document,"mousedown",((s,o)=>{const i=(0,c.Xr)(o.domTarget);if(!i)return;const r=(0,c.aU)(i),n=(0,c.t)(i,t.domConverter),a=e.editing.mapper.toModelElement(n);this._insertParagraph(a,r),o.preventDefault(),s.stop()}))}_enableInsertingParagraphsOnEnterKeypress(){const e=this.editor,t=e.model.document.selection,s=e.editing.view;this._listenToIfEnabled(s.document,"enter",((s,o)=>{if("atTarget"!=s.eventPhase)return;const i=t.getSelectedElement(),r=e.editing.mapper.toViewElement(i),n=e.model.schema;let a;this._insertParagraphAccordingToFakeCaretPosition()?a=!0:(0,c._m)(r,i,n)&&(this._insertParagraph(i,o.isSoft?"before":"after"),a=!0),a&&(o.preventDefault(),s.stop())}),{context:l.Qd})}_enableInsertingParagraphsOnTypingKeystroke(){const e=this.editor.editing.view.document;this._listenToIfEnabled(e,"insertText",((t,s)=>{this._insertParagraphAccordingToFakeCaretPosition()&&(s.selection=e.selection)}),{priority:"high"}),g.ZP.isAndroid?this._listenToIfEnabled(e,"keydown",((e,t)=>{229==t.keyCode&&this._insertParagraphAccordingToFakeCaretPosition()})):this._listenToIfEnabled(e,"compositionstart",(()=>{this._insertParagraphAccordingToFakeCaretPosition()}),{priority:"high"})}_enableDeleteIntegration(){const e=this.editor,t=e.editing.view,s=e.model,o=s.schema;this._listenToIfEnabled(t.document,"delete",((t,i)=>{if("atTarget"!=t.eventPhase)return;const r=(0,c.tB)(s.document.selection);if(!r)return;const n=i.direction,a=s.document.selection.getSelectedElement(),l="forward"==n;if("before"===r===l)e.execute("delete",{selection:s.createSelection(a,"on")});else{const t=o.getNearestSelectionRange(s.createPositionAt(a,r),n);if(t)if(t.isCollapsed){const i=s.createSelection(t.start);if(s.modifySelection(i,{direction:n}),i.focus.isEqual(t.start)){const e=function(e,t){let s=t;for(const o of t.getAncestors({parentFirst:!0})){if(o.childCount>1||e.isLimit(o))break;s=o}return s}(o,t.start.parent);s.deleteContent(s.createSelection(e,"on"),{doNotAutoparagraph:!0})}else s.change((s=>{s.setSelection(t),e.execute(l?"deleteForward":"delete")}))}else s.change((s=>{s.setSelection(t),e.execute(l?"deleteForward":"delete")}))}i.preventDefault(),t.stop()}),{context:l.Qd})}_enableInsertContentIntegration(){const e=this.editor,t=this.editor.model,s=t.document.selection;this._listenToIfEnabled(e.model,"insertContent",((e,[o,i])=>{if(i&&!i.is("documentSelection"))return;const r=(0,c.tB)(s);return r?(e.stop(),t.change((e=>{const i=s.getSelectedElement(),n=t.createPositionAt(i,r),a=e.createSelection(n),c=t.insertContent(o,a);return e.setSelection(a),c}))):void 0}),{priority:"high"})}_enableInsertObjectIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"insertObject",((e,s)=>{const[,o,,i={}]=s;if(o&&!o.is("documentSelection"))return;const r=(0,c.tB)(t);r&&(i.findOptimalPosition=r,s[3]=i)}),{priority:"high"})}_enableDeleteContentIntegration(){const e=this.editor,t=this.editor.model.document.selection;this._listenToIfEnabled(e.model,"deleteContent",((e,[s])=>{if(s&&!s.is("documentSelection"))return;(0,c.tB)(t)&&e.stop()}),{priority:"high"})}}},"./src/clipboard.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Clipboard:()=>C,ClipboardPipeline:()=>d,DragDrop:()=>y,PastePlainText:()=>A});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-utils/src/eventinfo.ts"),r=s("./packages/ckeditor5-engine/src/view/observer/domeventobserver.ts"),n=s("./packages/ckeditor5-engine/src/view/datatransfer.ts");class a extends r.Z{constructor(e){super(e);const t=this.document;function s(e){return(s,o)=>{o.preventDefault();const r=o.dropRange?[o.dropRange]:null,n=new i.Z(t,e);t.fire(n,{dataTransfer:o.dataTransfer,method:s.name,targetRanges:r,target:o.target}),n.stop.called&&o.stopPropagation()}}this.domEventType=["paste","copy","cut","drop","dragover","dragstart","dragend","dragenter","dragleave"],this.listenTo(t,"paste",s("clipboardInput"),{priority:"low"}),this.listenTo(t,"drop",s("clipboardInput"),{priority:"low"}),this.listenTo(t,"dragover",s("dragging"),{priority:"low"})}onDomEvent(e){const t={dataTransfer:new n.Z("clipboardData"in e?e.clipboardData:e.dataTransfer)};"drop"!=e.type&&"dragover"!=e.type||(t.dropRange=function(e,t){const s=t.target.ownerDocument,o=t.clientX,i=t.clientY;let r;s.caretRangeFromPoint&&s.caretRangeFromPoint(o,i)?r=s.caretRangeFromPoint(o,i):t.rangeParent&&(r=s.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0));if(r)return e.domConverter.domRangeToView(r);return null}(this.view,e)),this.fire(e.type,e,t)}}const c=["figcaption","li"];function l(e){let t="";if(e.is("$text")||e.is("$textProxy"))t=e.data;else if(e.is("element","img")&&e.hasAttribute("alt"))t=e.getAttribute("alt");else if(e.is("element","br"))t="\n";else{let s=null;for(const o of e.getChildren()){const e=l(o);s&&(s.is("containerElement")||o.is("containerElement"))&&(c.includes(s.name)||c.includes(o.name)?t+="\n":t+="\n\n"),t+=e,s=o}}return t}class d extends o.Z{static get pluginName(){return"ClipboardPipeline"}init(){this.editor.editing.view.addObserver(a),this._setupPasteDrop(),this._setupCopyCut()}_setupPasteDrop(){const e=this.editor,t=e.model,s=e.editing.view,o=s.document;this.listenTo(o,"clipboardInput",(t=>{e.isReadOnly&&t.stop()}),{priority:"highest"}),this.listenTo(o,"clipboardInput",((e,t)=>{const o=t.dataTransfer;let r;if(t.content)r=t.content;else{let e="";o.getData("text/html")?e=function(e){return e.replace(/(\s+)<\/span>/g,((e,t)=>1==t.length?" ":t)).replace(//g,"")}(o.getData("text/html")):o.getData("text/plain")&&(((n=(n=o.getData("text/plain")).replace(//g,">").replace(/\r?\n\r?\n/g,"

").replace(/\r?\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g,"  ")).includes("

")||n.includes("
"))&&(n=`

${n}

`),e=n),r=this.editor.data.htmlProcessor.toView(e)}var n;const a=new i.Z(this,"inputTransformation");this.fire(a,{content:r,dataTransfer:o,targetRanges:t.targetRanges,method:t.method}),a.stop.called&&e.stop(),s.scrollToTheSelection()}),{priority:"low"}),this.listenTo(this,"inputTransformation",((e,s)=>{if(s.content.isEmpty)return;const o=this.editor.data.toModel(s.content,"$clipboardHolder");0!=o.childCount&&(e.stop(),t.change((()=>{this.fire("contentInsertion",{content:o,method:s.method,dataTransfer:s.dataTransfer,targetRanges:s.targetRanges})})))}),{priority:"low"}),this.listenTo(this,"contentInsertion",((e,s)=>{s.resultRange=t.insertContent(s.content)}),{priority:"low"})}_setupCopyCut(){const e=this.editor,t=e.model.document,s=e.editing.view.document,o=(o,i)=>{const r=i.dataTransfer;i.preventDefault();const n=e.data.toView(e.model.getSelectedContent(t.selection));s.fire("clipboardOutput",{dataTransfer:r,content:n,method:o.name})};this.listenTo(s,"copy",o,{priority:"low"}),this.listenTo(s,"cut",((t,s)=>{e.isReadOnly?s.preventDefault():o(t,s)}),{priority:"low"}),this.listenTo(s,"clipboardOutput",((s,o)=>{o.content.isEmpty||(o.dataTransfer.setData("text/html",this.editor.data.htmlProcessor.toData(o.content)),o.dataTransfer.setData("text/plain",l(o.content))),"cut"==o.method&&e.model.deleteContent(t.selection)}),{priority:"low"})}}var h=s("./packages/ckeditor5-engine/src/model/liverange.ts"),u=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),p=s("./packages/ckeditor5-widget/src/widget.ts"),g=s("./packages/ckeditor5-utils/src/uid.ts"),f=s("./packages/ckeditor5-utils/src/env.ts"),m=s("./packages/ckeditor5-widget/src/utils.ts"),k=s("./node_modules/lodash-es/throttle.js"),b=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),_=s.n(b),w=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-clipboard/theme/clipboard.css"),v={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};_()(w.Z,v);w.Z.locals;class y extends o.Z{static get pluginName(){return"DragDrop"}static get requires(){return[d,p.Z]}init(){const e=this.editor,t=e.editing.view;this._draggedRange=null,this._draggingUid="",this._draggableElement=null,this._updateDropMarkerThrottled=(0,k.Z)((e=>this._updateDropMarker(e)),40),this._removeDropMarkerDelayed=x((()=>this._removeDropMarker()),40),this._clearDraggableAttributesDelayed=x((()=>this._clearDraggableAttributes()),40),t.addObserver(a),t.addObserver(u.Z),this._setupDragging(),this._setupContentInsertionIntegration(),this._setupClipboardInputIntegration(),this._setupDropMarker(),this._setupDraggableAttributeHandling(),this.listenTo(e,"change:isReadOnly",((e,t,s)=>{s?this.forceDisabled("readOnlyMode"):this.clearForceDisabled("readOnlyMode")})),this.on("change:isEnabled",((e,t,s)=>{s||this._finalizeDragging(!1)})),f.ZP.isAndroid&&this.forceDisabled("noAndroidSupport")}destroy(){return this._draggedRange&&(this._draggedRange.detach(),this._draggedRange=null),this._updateDropMarkerThrottled.cancel(),this._removeDropMarkerDelayed.cancel(),this._clearDraggableAttributesDelayed.cancel(),super.destroy()}_setupDragging(){const e=this.editor,t=e.model,s=t.document,o=e.editing.view,i=o.document;this.listenTo(i,"dragstart",((o,r)=>{const n=s.selection;if(r.target&&r.target.is("editableElement"))return void r.preventDefault();const a=r.target?T(r.target):null;if(a){const s=e.editing.mapper.toModelElement(a);this._draggedRange=h.Z.fromRange(t.createRangeOn(s)),e.plugins.has("WidgetToolbarRepository")&&e.plugins.get("WidgetToolbarRepository").forceDisabled("dragDrop")}else if(!i.selection.isCollapsed){const e=i.selection.getSelectedElement();e&&(0,m.Qd)(e)||(this._draggedRange=h.Z.fromRange(n.getFirstRange()))}if(!this._draggedRange)return void r.preventDefault();this._draggingUid=(0,g.Z)(),r.dataTransfer.effectAllowed=this.isEnabled?"copyMove":"copy",r.dataTransfer.setData("application/ckeditor5-dragging-uid",this._draggingUid);const c=t.createSelection(this._draggedRange.toRange()),l=e.data.toView(t.getSelectedContent(c));i.fire("clipboardOutput",{dataTransfer:r.dataTransfer,content:l,method:"dragstart"}),this.isEnabled||(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="")}),{priority:"low"}),this.listenTo(i,"dragend",((e,t)=>{this._finalizeDragging(!t.dataTransfer.isCanceled&&"move"==t.dataTransfer.dropEffect)}),{priority:"low"}),this.listenTo(i,"dragenter",(()=>{this.isEnabled&&o.focus()})),this.listenTo(i,"dragleave",(()=>{this._removeDropMarkerDelayed()})),this.listenTo(i,"dragging",((t,s)=>{if(!this.isEnabled)return void(s.dataTransfer.dropEffect="none");this._removeDropMarkerDelayed.cancel();const o=Z(e,s.targetRanges,s.target);this._draggedRange||(s.dataTransfer.dropEffect="copy"),f.ZP.isGecko||("copy"==s.dataTransfer.effectAllowed?s.dataTransfer.dropEffect="copy":["all","copyMove"].includes(s.dataTransfer.effectAllowed)&&(s.dataTransfer.dropEffect="move")),o&&this._updateDropMarkerThrottled(o)}),{priority:"low"})}_setupClipboardInputIntegration(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"clipboardInput",((t,s)=>{if("drop"!=s.method)return;const o=Z(e,s.targetRanges,s.target);if(this._removeDropMarker(),!o)return this._finalizeDragging(!1),void t.stop();this._draggedRange&&this._draggingUid!=s.dataTransfer.getData("application/ckeditor5-dragging-uid")&&(this._draggedRange.detach(),this._draggedRange=null,this._draggingUid="");if("move"==P(s.dataTransfer)&&this._draggedRange&&this._draggedRange.containsRange(o,!0))return this._finalizeDragging(!1),void t.stop();s.targetRanges=[e.editing.mapper.toViewRange(o)]}),{priority:"high"})}_setupContentInsertionIntegration(){const e=this.editor.plugins.get(d);e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const s=t.targetRanges.map((e=>this.editor.editing.mapper.toModelRange(e)));this.editor.model.change((e=>e.setSelection(s)))}),{priority:"high"}),e.on("contentInsertion",((e,t)=>{if(!this.isEnabled||"drop"!==t.method)return;const s="move"==P(t.dataTransfer),o=!t.resultRange||!t.resultRange.isCollapsed;this._finalizeDragging(o&&s)}),{priority:"lowest"})}_setupDraggableAttributeHandling(){const e=this.editor,t=e.editing.view,s=t.document;this.listenTo(s,"mousedown",((o,i)=>{if(f.ZP.isAndroid||!i)return;this._clearDraggableAttributesDelayed.cancel();let r=T(i.target);if(f.ZP.isBlink&&!e.isReadOnly&&!r&&!s.selection.isCollapsed){const e=s.selection.getSelectedElement();e&&(0,m.Qd)(e)||(r=s.selection.editableElement)}r&&(t.change((e=>{e.setAttribute("draggable","true",r)})),this._draggableElement=e.editing.mapper.toModelElement(r))})),this.listenTo(s,"mouseup",(()=>{f.ZP.isAndroid||this._clearDraggableAttributesDelayed()}))}_clearDraggableAttributes(){const e=this.editor.editing;e.view.change((t=>{this._draggableElement&&"$graveyard"!=this._draggableElement.root.rootName&&t.removeAttribute("draggable",e.mapper.toViewElement(this._draggableElement)),this._draggableElement=null}))}_setupDropMarker(){const e=this.editor;e.conversion.for("editingDowncast").markerToHighlight({model:"drop-target",view:{classes:["ck-clipboard-drop-target-range"]}}),e.conversion.for("editingDowncast").markerToElement({model:"drop-target",view:(t,{writer:s})=>{if(e.model.schema.checkChild(t.markerRange.start,"$text"))return s.createUIElement("span",{class:"ck ck-clipboard-drop-target-position"},(function(e){const t=this.toDomElement(e);return t.append("⁠",e.createElement("span"),"⁠"),t}))}})}_updateDropMarker(e){const t=this.editor,s=t.model.markers;t.model.change((t=>{s.has("drop-target")?s.get("drop-target").getRange().isEqual(e)||t.updateMarker("drop-target",{range:e}):t.addMarker("drop-target",{range:e,usingOperation:!1,affectsData:!1})}))}_removeDropMarker(){const e=this.editor.model;this._removeDropMarkerDelayed.cancel(),this._updateDropMarkerThrottled.cancel(),e.markers.has("drop-target")&&e.change((e=>{e.removeMarker("drop-target")}))}_finalizeDragging(e){const t=this.editor,s=t.model;this._removeDropMarker(),this._clearDraggableAttributes(),t.plugins.has("WidgetToolbarRepository")&&t.plugins.get("WidgetToolbarRepository").clearForceDisabled("dragDrop"),this._draggingUid="",this._draggedRange&&(e&&this.isEnabled&&s.deleteContent(s.createSelection(this._draggedRange),{doNotAutoparagraph:!0}),this._draggedRange.detach(),this._draggedRange=null)}}function Z(e,t,s){const o=e.model,i=e.editing.mapper;let r=null;const n=t?t[0].start:null;if(s.is("uiElement")&&(s=s.parent),r=function(e,t){const s=e.model,o=e.editing.mapper;if((0,m.Qd)(t))return s.createRangeOn(o.toModelElement(t));if(!t.is("editableElement")){const e=t.findAncestor((e=>(0,m.Qd)(e)||e.is("editableElement")));if((0,m.Qd)(e))return s.createRangeOn(o.toModelElement(e))}return null}(e,s),r)return r;const a=function(e,t){const s=e.editing.mapper,o=e.editing.view,i=s.toModelElement(t);if(i)return i;const r=o.createPositionBefore(t),n=s.findMappedViewAncestor(r);return s.toModelElement(n)}(e,s),c=n?i.toModelPosition(n):null;return c?(r=function(e,t,s){const o=e.model;if(!o.schema.checkChild(s,"$block"))return null;const i=o.createPositionAt(s,0),r=t.path.slice(0,i.path.length),n=o.createPositionFromPath(t.root,r).nodeAfter;if(n&&o.schema.isObject(n))return o.createRangeOn(n);return null}(e,c,a),r||(r=o.schema.getNearestSelectionRange(c,f.ZP.isGecko?"forward":"backward"),r||function(e,t){const s=e.model;let o=t;for(;o;){if(s.schema.isObject(o))return s.createRangeOn(o);o=o.parent}return null}(e,c.parent))):function(e,t){const s=e.model,o=s.schema,i=s.createPositionAt(t,0);return o.getNearestSelectionRange(i,"forward")}(e,a)}function P(e){return f.ZP.isGecko?e.dropEffect:["all","copyMove"].includes(e.effectAllowed)?"move":"copy"}function x(e,t){let s;function o(...i){o.cancel(),s=setTimeout((()=>e(...i)),t)}return o.cancel=()=>{clearTimeout(s)},o}function T(e){if(e.is("editableElement"))return null;if(e.hasClass("ck-widget__selection-handle"))return e.findAncestor(m.Qd);if((0,m.Qd)(e))return e;const t=e.findAncestor((e=>(0,m.Qd)(e)||e.is("editableElement")));return(0,m.Qd)(t)?t:null}class A extends o.Z{static get pluginName(){return"PastePlainText"}static get requires(){return[d]}init(){const e=this.editor,t=e.model,s=e.editing.view,o=s.document,i=t.document.selection;let r=!1;s.addObserver(a),this.listenTo(o,"keydown",((e,t)=>{r=t.shiftKey})),e.plugins.get(d).on("contentInsertion",((e,s)=>{(r||function(e,t){if(e.childCount>1)return!1;const s=e.getChild(0);if(t.isObject(s))return!1;return 0==Array.from(s.getAttributeKeys()).length}(s.content,t.schema))&&t.change((e=>{const o=Array.from(i.getAttributes()).filter((([e])=>t.schema.getAttributeProperties(e).isFormatting));i.isCollapsed||t.deleteContent(i,{doNotAutoparagraph:!0}),o.push(...i.getAttributes());const r=e.createRangeIn(s.content);for(const t of r.getItems())t.is("$textProxy")&&e.setAttributes(o,t)}))}))}}class C extends o.Z{static get pluginName(){return"Clipboard"}static get requires(){return[d,y,A]}}},"./src/core.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Command:()=>o.mY,Context:()=>o._y,ContextPlugin:()=>o.eO,DataApiMixin:()=>o.W9,Editor:()=>o.ML,EditorUI:()=>o.S8,ElementApiMixin:()=>o.xK,MultiCommand:()=>o.AJ,PendingActions:()=>o.lR,Plugin:()=>o.Sy,attachToForm:()=>o.P$,icons:()=>o.ci,secureSourceElement:()=>o.Nu});var o=s("./packages/ckeditor5-core/src/index.ts")},"./src/engine.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{ClickObserver:()=>o.KU,Conversion:()=>o.uz,DataController:()=>o.Yc,DocumentFragment:()=>o.f4,DocumentSelection:()=>o.uj,DomConverter:()=>o.pG,DomEventData:()=>o.dK,DomEventObserver:()=>o.qZ,DowncastWriter:()=>o.qD,EditingController:()=>o.jH,Element:()=>o.W_,History:()=>o.Ay,HtmlDataProcessor:()=>o.X5,InsertOperation:()=>o.IZ,LivePosition:()=>o.jP,LiveRange:()=>o.iE,MarkerOperation:()=>o.zj,Matcher:()=>o.xO,Model:()=>o.Hn,MouseObserver:()=>o.dM,Observer:()=>o.Qj,OperationFactory:()=>o.Bz,Position:()=>o.Ly,Range:()=>o.e6,Renderer:()=>o.Th,Schema:()=>o.V_,Selection:()=>o.Y1,StylesProcessor:()=>o.A_,Text:()=>o.xv,TreeWalker:()=>o.Po,UpcastWriter:()=>o.yj,View:()=>o.G7,ViewAttributeElement:()=>o.m1,ViewContainerElement:()=>o.By,ViewDocument:()=>o.Ux,ViewDocumentFragment:()=>o.y_,ViewElement:()=>o.y9,ViewEmptyElement:()=>o.pc,ViewRawElement:()=>o.wx,ViewText:()=>o.Xj,ViewUIElement:()=>o.dq,addBackgroundRules:()=>o.QR,addBorderRules:()=>o.sI,addMarginRules:()=>o.vt,addPaddingRules:()=>o.J8,disablePlaceholder:()=>o.DA,enablePlaceholder:()=>o.ID,getBoxSidesShorthandValue:()=>o.I8,getBoxSidesValueReducer:()=>o.mq,getBoxSidesValues:()=>o.oz,getFillerOffset:()=>o.YG,getPositionShorthandNormalizer:()=>o.m0,getShorthandValues:()=>o.uT,hidePlaceholder:()=>o.$_,isAttachment:()=>o.SB,isColor:()=>o.D5,isLength:()=>o.G9,isLineStyle:()=>o.IT,isPercentage:()=>o.zz,isPosition:()=>o.WK,isRepeat:()=>o.Zb,isURL:()=>o.PX,needsPlaceholder:()=>o.Q7,showPlaceholder:()=>o.NJ,transformSets:()=>o.Rf});var o=s("./packages/ckeditor5-engine/src/index.ts")},"./src/enter.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Enter:()=>o.Z,ShiftEnter:()=>h});var o=s("./packages/ckeditor5-enter/src/enter.ts"),i=s("./packages/ckeditor5-core/src/command.ts"),r=s("./packages/ckeditor5-enter/src/utils.ts");class n extends i.Z{execute(){const e=this.editor.model,t=e.document;e.change((s=>{!function(e,t,s){const o=s.isCollapsed,i=s.getFirstRange(),n=i.start.parent,c=i.end.parent,l=n==c;if(o){const o=(0,r.G)(e.schema,s.getAttributes());a(e,t,i.end),t.removeSelectionAttribute(s.getAttributeKeys()),t.setSelectionAttribute(o)}else{const o=!(i.start.isAtStart&&i.end.isAtEnd);e.deleteContent(s,{leaveUnmerged:o}),l?a(e,t,s.focus):o&&t.setSelection(c,0)}}(e,s,t.selection),this.fire("afterExecute",{writer:s})}))}refresh(){const e=this.editor.model,t=e.document;this.isEnabled=function(e,t){if(t.rangeCount>1)return!1;const s=t.anchor;if(!s||!e.checkChild(s,"softBreak"))return!1;const o=t.getFirstRange(),i=o.start.parent,r=o.end.parent;if((c(i,e)||c(r,e))&&i!==r)return!1;return!0}(e.schema,t.selection)}}function a(e,t,s){const o=t.createElement("softBreak");e.insertContent(o,s),t.setSelection(o,"after")}function c(e,t){return!e.is("rootElement")&&(t.isLimit(e)||c(e.parent,t))}var l=s("./packages/ckeditor5-enter/src/enterobserver.ts"),d=s("./packages/ckeditor5-core/src/plugin.ts");class h extends d.Z{static get pluginName(){return"ShiftEnter"}init(){const e=this.editor,t=e.model.schema,s=e.conversion,o=e.editing.view,i=o.document;t.register("softBreak",{allowWhere:"$text",isInline:!0}),s.for("upcast").elementToElement({model:"softBreak",view:"br"}),s.for("downcast").elementToElement({model:"softBreak",view:(e,{writer:t})=>t.createEmptyElement("br")}),o.addObserver(l.Z),e.commands.add("shiftEnter",new n(e)),this.listenTo(i,"enter",((t,s)=>{i.isComposing||s.preventDefault(),s.isSoft&&(e.execute("shiftEnter"),o.scrollToTheSelection())}),{priority:"low"})}}},"./src/paragraph.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Paragraph:()=>l,ParagraphButtonUI:()=>u});var o=s("./packages/ckeditor5-core/src/command.ts"),i=s("./packages/ckeditor5-utils/src/first.ts");class r extends o.Z{refresh(){const e=this.editor.model,t=e.document,s=(0,i.Z)(t.selection.getSelectedBlocks());this.value=!!s&&s.is("element","paragraph"),this.isEnabled=!!s&&n(s,e.schema)}execute(e={}){const t=this.editor.model,s=t.document;t.change((o=>{const i=(e.selection||s.selection).getSelectedBlocks();for(const e of i)!e.is("element","paragraph")&&n(e,t.schema)&&o.rename(e,"paragraph")}))}}function n(e,t){return t.checkChild(e.parent,"paragraph")&&!t.isObject(e)}class a extends o.Z{execute(e){const t=this.editor.model,s=e.attributes;let o=e.position;t.change((e=>{const i=e.createElement("paragraph");if(s&&t.schema.setAllowedAttributes(i,s,e),!t.schema.checkChild(o.parent,i)){const s=t.schema.findAllowedParent(o,i);if(!s)return;o=e.split(o,s).position}t.insertContent(i,o),e.setSelection(i,"in")}))}}var c=s("./packages/ckeditor5-core/src/plugin.ts");class l extends c.Z{static get pluginName(){return"Paragraph"}init(){const e=this.editor,t=e.model;e.commands.add("paragraph",new r(e)),e.commands.add("insertParagraph",new a(e)),t.schema.register("paragraph",{inheritAllFrom:"$block"}),e.conversion.elementToElement({model:"paragraph",view:"p"}),e.conversion.for("upcast").elementToElement({model:(e,{writer:t})=>l.paragraphLikeElements.has(e.name)?e.isEmpty?null:t.createElement("paragraph"):null,view:/.+/,converterPriority:"low"})}}l.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td","th"]);var d=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),h=s("./packages/ckeditor5-core/theme/icons/paragraph.svg");class u extends c.Z{init(){const e=this.editor,t=e.t;e.ui.componentFactory.add("paragraph",(s=>{const o=new d.Z(s),i=e.commands.get("paragraph");return o.label=t("Paragraph"),o.icon=h.Z,o.tooltip=!0,o.isToggleable=!0,o.bind("isEnabled").to(i),o.bind("isOn").to(i,"value"),o.on("execute",(()=>{e.execute("paragraph")})),o}))}}},"./src/select-all.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{SelectAll:()=>u,SelectAllEditing:()=>l,SelectAllUI:()=>h});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-utils/src/keyboard.ts"),r=s("./packages/ckeditor5-core/src/command.ts");class n extends r.Z{constructor(e){super(e),this.affectsData=!1}execute(){const e=this.editor.model,t=e.document.selection;let s=e.schema.getLimitElement(t);if(t.containsEntireContent(s)||!a(e.schema,s))do{if(s=s.parent,!s)return}while(!a(e.schema,s));e.change((e=>{e.setSelection(s,"in")}))}}function a(e,t){return e.isLimit(t)&&(e.checkChild(t,"$text")||e.checkChild(t,"paragraph"))}const c=(0,i.Zz)("Ctrl+A");class l extends o.Z{static get pluginName(){return"SelectAllEditing"}init(){const e=this.editor,t=e.editing.view.document;e.commands.add("selectAll",new n(e)),this.listenTo(t,"keydown",((t,s)=>{(0,i.Cq)(s)===c&&(e.execute("selectAll"),s.preventDefault())}))}}var d=s("./packages/ckeditor5-ui/src/button/buttonview.ts");class h extends o.Z{static get pluginName(){return"SelectAllUI"}init(){const e=this.editor;e.ui.componentFactory.add("selectAll",(t=>{const s=e.commands.get("selectAll"),o=new d.Z(t),i=t.t;return o.set({label:i("Select all"),icon:'',keystroke:"Ctrl+A",tooltip:!0}),o.bind("isEnabled").to(s,"isEnabled"),this.listenTo(o,"execute",(()=>{e.execute("selectAll"),e.editing.view.focus()})),o}))}}class u extends o.Z{static get requires(){return[l,h]}static get pluginName(){return"SelectAll"}}},"./src/typing.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Delete:()=>f.Z,Input:()=>p,TextTransformation:()=>j,TextWatcher:()=>_,TwoStepCaretMovement:()=>v,Typing:()=>m,findAttributeRange:()=>D,getLastTextLine:()=>b,inlineHighlight:()=>B});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-core/src/command.ts"),r=s("./packages/ckeditor5-typing/src/utils/changebuffer.ts");class n extends i.Z{constructor(e,t){super(e),this._buffer=new r.Z(e.model,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.model,s=t.document,o=e.text||"",i=o.length;let r=s.selection;e.selection?r=e.selection:e.range&&(r=t.createSelection(e.range));const n=e.resultRange;t.enqueueChange(this._buffer.batch,(e=>{this._buffer.lock(),t.deleteContent(r),o&&t.insertContent(e.createText(o,s.selection.getAttributes()),r),n?e.setSelection(n):r.is("documentSelection")||e.setSelection(r),this._buffer.unlock(),this._buffer.input(i)}))}}var a=s("./packages/ckeditor5-engine/src/view/observer/domeventdata.ts"),c=s("./packages/ckeditor5-engine/src/view/observer/observer.ts"),l=s("./packages/ckeditor5-utils/src/eventinfo.ts"),d=s("./packages/ckeditor5-utils/src/env.ts");const h=["insertText","insertReplacementText"];class u extends c.Z{constructor(e){super(e),d.ZP.isAndroid&&h.push("insertCompositionText");const t=e.document;t.on("beforeinput",((s,o)=>{if(!this.isEnabled)return;const{data:i,targetRanges:r,inputType:n,domEvent:c}=o;if(!h.includes(n))return;const d=new l.Z(t,"insertText");t.fire(d,new a.Z(e,c,{text:i,selection:e.createSelection(r)})),d.stop.called&&s.stop()})),t.on("compositionend",((s,{data:o,domEvent:i})=>{this.isEnabled&&!d.ZP.isAndroid&&o&&t.fire("insertText",new a.Z(e,i,{text:o,selection:t.selection}))}),{priority:"lowest"})}observe(){}}class p extends o.Z{static get pluginName(){return"Input"}init(){const e=this.editor,t=e.model,s=e.editing.view,o=t.document.selection;s.addObserver(u);const i=new n(e,e.config.get("typing.undoStep")||20);e.commands.add("insertText",i),e.commands.add("input",i),this.listenTo(s.document,"insertText",((o,i)=>{s.document.isComposing||i.preventDefault();const{text:r,selection:n,resultRange:a}=i,c=Array.from(n.getRanges()).map((t=>e.editing.mapper.toModelRange(t)));let l=r;if(d.ZP.isAndroid){const e=Array.from(c[0].getItems()).reduce(((e,t)=>e+(t.is("$textProxy")?t.data:"")),"");e&&(e.length<=l.length?l.startsWith(e)&&(l=l.substring(e.length),c[0].start=c[0].start.getShiftedBy(e.length)):e.startsWith(l)&&(c[0].start=c[0].start.getShiftedBy(l.length),l=""))}const h={text:l,selection:t.createSelection(c)};a&&(h.resultRange=e.editing.mapper.toModelRange(a)),e.execute("insertText",h)})),d.ZP.isAndroid?this.listenTo(s.document,"keydown",((e,r)=>{!o.isCollapsed&&229==r.keyCode&&s.document.isComposing&&g(t,i)})):this.listenTo(s.document,"compositionstart",(()=>{o.isCollapsed||g(t,i)}))}}function g(e,t){if(!t.isEnabled)return;const s=t.buffer;s.lock(),e.enqueueChange(s.batch,(()=>{e.deleteContent(e.document.selection)})),s.unlock()}var f=s("./packages/ckeditor5-typing/src/delete.ts");class m extends o.Z{static get requires(){return[p,f.Z]}static get pluginName(){return"Typing"}}var k=s("./packages/ckeditor5-utils/src/observablemixin.ts");function b(e,t){let s=e.start;return{text:Array.from(e.getItems()).reduce(((e,o)=>o.is("$text")||o.is("$textProxy")?e+o.data:(s=t.createPositionAfter(o),"")),""),range:t.createRange(s,e.end)}}class _ extends k.y{constructor(e,t){super(),this.model=e,this.testCallback=t,this._hasMatch=!1,this.set("isEnabled",!0),this.on("change:isEnabled",(()=>{this.isEnabled?this._startListening():(this.stopListening(e.document.selection),this.stopListening(e.document))})),this._startListening()}get hasMatch(){return this._hasMatch}_startListening(){const e=this.model.document;this.listenTo(e.selection,"change:range",((t,{directChange:s})=>{s&&(e.selection.isCollapsed?this._evaluateTextBeforeSelection("selection"):this.hasMatch&&(this.fire("unmatched"),this._hasMatch=!1))})),this.listenTo(e,"change:data",((e,t)=>{!t.isUndo&&t.isLocal&&this._evaluateTextBeforeSelection("data",{batch:t})}))}_evaluateTextBeforeSelection(e,t={}){const s=this.model,o=s.document.selection,i=s.createRange(s.createPositionAt(o.focus.parent,0),o.focus),{text:r,range:n}=b(i,s),a=this.testCallback(r);if(!a&&this.hasMatch&&this.fire("unmatched"),this._hasMatch=!!a,a){const s=Object.assign(t,{text:r,range:n});"object"==typeof a&&Object.assign(s,a),this.fire(`matched:${e}`,s)}}}var w=s("./packages/ckeditor5-utils/src/keyboard.ts");class v extends o.Z{constructor(e){super(e),this.attributes=new Set,this._overrideUid=null}static get pluginName(){return"TwoStepCaretMovement"}init(){const e=this.editor,t=e.model,s=e.editing.view,o=e.locale,i=t.document.selection;this.listenTo(s.document,"arrowKey",((e,t)=>{if(!i.isCollapsed)return;if(t.shiftKey||t.altKey||t.ctrlKey)return;const s=t.keyCode==w.Do.arrowright,r=t.keyCode==w.Do.arrowleft;if(!s&&!r)return;const n=o.contentLanguageDirection;let a=!1;a="ltr"===n&&s||"rtl"===n&&r?this._handleForwardMovement(t):this._handleBackwardMovement(t),!0===a&&e.stop()}),{context:"$text",priority:"highest"}),this._isNextGravityRestorationSkipped=!1,this.listenTo(i,"change:range",((e,t)=>{this._isNextGravityRestorationSkipped?this._isNextGravityRestorationSkipped=!1:this._isGravityOverridden&&(!t.directChange&&x(i.getFirstPosition(),this.attributes)||this._restoreGravity())}))}registerAttribute(e){this.attributes.add(e)}_handleForwardMovement(e){const t=this.attributes,s=this.editor.model.document.selection,o=s.getFirstPosition();return!this._isGravityOverridden&&((!o.isAtStart||!y(s,t))&&(!!x(o,t)&&(P(e),this._overrideGravity(),!0)))}_handleBackwardMovement(e){const t=this.attributes,s=this.editor.model,o=s.document.selection,i=o.getFirstPosition();return this._isGravityOverridden?(P(e),this._restoreGravity(),Z(s,t,i),!0):i.isAtStart?!!y(o,t)&&(P(e),Z(s,t,i),!0):!!function(e,t){return x(e.getShiftedBy(-1),t)}(i,t)&&(i.isAtEnd&&!y(o,t)&&x(i,t)?(P(e),Z(s,t,i),!0):(this._isNextGravityRestorationSkipped=!0,this._overrideGravity(),!1))}get _isGravityOverridden(){return!!this._overrideUid}_overrideGravity(){this._overrideUid=this.editor.model.change((e=>e.overrideSelectionGravity()))}_restoreGravity(){this.editor.model.change((e=>{e.restoreSelectionGravity(this._overrideUid),this._overrideUid=null}))}}function y(e,t){for(const s of t)if(e.hasAttribute(s))return!0;return!1}function Z(e,t,s){const o=s.nodeBefore;e.change((e=>{o?e.setSelectionAttribute(o.getAttributes()):e.removeSelectionAttribute(t)}))}function P(e){e.preventDefault()}function x(e,t){const{nodeBefore:s,nodeAfter:o}=e;for(const e of t){const t=s?s.getAttribute(e):void 0;if((o?o.getAttribute(e):void 0)!==t)return!0}return!1}var T=s("./node_modules/lodash-es/toString.js"),A=/[\\^$.*+?()[\]{}|]/g,C=RegExp(A.source);const E=function(e){return(e=(0,T.Z)(e))&&C.test(e)?e.replace(A,"\\$&"):e},S={copyright:{from:"(c)",to:"©"},registeredTrademark:{from:"(r)",to:"®"},trademark:{from:"(tm)",to:"™"},oneHalf:{from:/(^|[^/a-z0-9])(1\/2)([^/a-z0-9])$/i,to:[null,"½",null]},oneThird:{from:/(^|[^/a-z0-9])(1\/3)([^/a-z0-9])$/i,to:[null,"⅓",null]},twoThirds:{from:/(^|[^/a-z0-9])(2\/3)([^/a-z0-9])$/i,to:[null,"⅔",null]},oneForth:{from:/(^|[^/a-z0-9])(1\/4)([^/a-z0-9])$/i,to:[null,"¼",null]},threeQuarters:{from:/(^|[^/a-z0-9])(3\/4)([^/a-z0-9])$/i,to:[null,"¾",null]},lessThanOrEqual:{from:"<=",to:"≤"},greaterThanOrEqual:{from:">=",to:"≥"},notEqual:{from:"!=",to:"≠"},arrowLeft:{from:"<-",to:"←"},arrowRight:{from:"->",to:"→"},horizontalEllipsis:{from:"...",to:"…"},enDash:{from:/(^| )(--)( )$/,to:[null,"–",null]},emDash:{from:/(^| )(---)( )$/,to:[null,"—",null]},quotesPrimary:{from:I('"'),to:[null,"“",null,"”"]},quotesSecondary:{from:I("'"),to:[null,"‘",null,"’"]},quotesPrimaryEnGb:{from:I("'"),to:[null,"‘",null,"’"]},quotesSecondaryEnGb:{from:I('"'),to:[null,"“",null,"”"]},quotesPrimaryPl:{from:I('"'),to:[null,"„",null,"”"]},quotesSecondaryPl:{from:I("'"),to:[null,"‚",null,"’"]}},O={symbols:["copyright","registeredTrademark","trademark"],mathematical:["oneHalf","oneThird","twoThirds","oneForth","threeQuarters","lessThanOrEqual","greaterThanOrEqual","notEqual","arrowLeft","arrowRight"],typography:["horizontalEllipsis","enDash","emDash"],quotes:["quotesPrimary","quotesSecondary"]},R=["symbols","mathematical","typography","quotes"];class j extends o.Z{static get requires(){return["Delete","Input"]}static get pluginName(){return"TextTransformation"}constructor(e){super(e),e.config.define("typing",{transformations:{include:R}})}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTransformationWatchers()}_enableTransformationWatchers(){const e=this.editor,t=e.model,s=e.plugins.get("Delete"),o=function(e){const t=e.extra||[],s=e.remove||[],o=e=>!s.includes(e);return function(e){const t=new Set;for(const s of e)if("string"==typeof s&&O[s])for(const e of O[s])t.add(e);else t.add(s);return Array.from(t)}(e.include.concat(t).filter(o)).filter(o).map((e=>"string"==typeof e&&S[e]?S[e]:e)).filter((e=>"object"==typeof e)).map((e=>({from:M(e.from),to:N(e.to)})))}(e.config.get("typing.transformations")),i=new _(e.model,(e=>{for(const t of o){if(t.from.test(e))return{normalizedTransformation:t}}}));i.on("matched:data",((e,o)=>{if(!o.batch.isTyping)return;const{from:i,to:r}=o.normalizedTransformation,n=i.exec(o.text),a=r(n.slice(1)),c=o.range;let l=n.index;t.enqueueChange((e=>{for(let s=1;s{s.requestUndoOnBackspace()}))}))})),i.bind("isEnabled").to(this)}}function M(e){return"string"==typeof e?new RegExp(`(${E(e)})$`):e}function N(e){return"string"==typeof e?()=>[e]:e instanceof Array?()=>e:e}function V(e){return(e.textNode?e.textNode:e.nodeAfter).getAttributes()}function I(e){return new RegExp(`(^|\\s)(${e})([^${e}]*)(${e})$`)}function D(e,t,s,o){return o.createRange(z(e,t,s,!0,o),z(e,t,s,!1,o))}function z(e,t,s,o,i){let r=e.textNode||(o?e.nodeBefore:e.nodeAfter),n=null;for(;r&&r.getAttribute(t)==s;)n=r,r=o?r.previousSibling:r.nextSibling;return n?i.createPositionAt(n,o?"before":"after"):e}function B(e,t,s,o){const i=e.editing.view,r=new Set;i.document.registerPostFixer((i=>{const n=e.model.document.selection;let a=!1;if(n.hasAttribute(t)){const c=D(n.getFirstPosition(),t,n.getAttribute(t),e.model),l=e.editing.mapper.toViewRange(c);for(const e of l.getItems())e.is("element",s)&&!e.hasClass(o)&&(i.addClass(o,e),r.add(e),a=!0)}return a})),e.conversion.for("editingDowncast").add((e=>{function t(){i.change((e=>{for(const t of r.values())e.removeClass(o,t),r.delete(t)}))}e.on("insert",t,{priority:"highest"}),e.on("remove",t,{priority:"highest"}),e.on("attribute",t,{priority:"highest"}),e.on("selection",t,{priority:"highest"})}))}},"./src/ui.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{BalloonPanelView:()=>ce.Z,BalloonToolbar:()=>Te,BlockToolbar:()=>Ne,BodyCollection:()=>d,BoxedEditorUIView:()=>N,ButtonView:()=>h.Z,ColorGridView:()=>P,ColorTileView:()=>k,ContextualBalloon:()=>le.Z,DropdownButtonView:()=>x.Z,EditorUIView:()=>S,FocusCycler:()=>F.Z,FormHeaderView:()=>B,IconView:()=>L.Z,IframeView:()=>K,InlineEditableUIView:()=>I,InputNumberView:()=>U,InputTextView:()=>q,InputView:()=>H,LabelView:()=>M,LabeledFieldView:()=>Q,ListItemView:()=>te.Z,ListView:()=>se.Z,Model:()=>ae,Notification:()=>ie,SplitButtonView:()=>T.Z,StickyPanelView:()=>fe,SwitchButtonView:()=>u.Z,Template:()=>a.ZP,ToolbarSeparatorView:()=>be.Z,ToolbarView:()=>ke.Z,TooltipManager:()=>me.Z,View:()=>m.Z,ViewCollection:()=>c.Z,addKeyboardHandlingForGrid:()=>n,addListToDropdown:()=>A.Pm,addToolbarToDropdown:()=>A.up,clickOutsideHandler:()=>o.Z,createDropdown:()=>A.t9,createLabeledDropdown:()=>ee,createLabeledInputNumber:()=>Y,createLabeledInputText:()=>X,focusChildOnDropdownOpen:()=>A.Mh,getLocalizedColorOptions:()=>p,injectCssTransitionDisabler:()=>i,normalizeColorOptions:()=>g,normalizeSingleColorDefinition:()=>f,normalizeToolbarConfig:()=>_e.Z,submitHandler:()=>r});var o=s("./packages/ckeditor5-ui/src/bindings/clickoutsidehandler.ts");function i(e){const t=e;t.set("_isCssTransitionsDisabled",!1),t.disableCssTransitions=()=>{t._isCssTransitionsDisabled=!0},t.enableCssTransitions=()=>{t._isCssTransitionsDisabled=!1},t.extendTemplate({attributes:{class:[t.bindTemplate.if("_isCssTransitionsDisabled","ck-transitions-disabled")]}})}function r({view:e}){e.listenTo(e.element,"submit",((t,s)=>{s.preventDefault(),e.fire("submit")}),{useCapture:!0})}function n({keystrokeHandler:e,focusTracker:t,gridItems:s,numberOfColumns:o}){const i="number"==typeof o?()=>o:o;function r(e){return o=>{const i=s.find((e=>e.element===t.focusedElement)),r=s.getIndex(i),n=e(r,s);s.get(n).focus(),o.stopPropagation(),o.preventDefault()}}e.set("arrowright",r(((e,t)=>e===t.length-1?0:e+1))),e.set("arrowleft",r(((e,t)=>0===e?t.length-1:e-1))),e.set("arrowup",r(((e,t)=>{let s=e-i();return s<0&&(s=e+i()*Math.floor(t.length/i()),s>t.length-1&&(s-=i())),s}))),e.set("arrowdown",r(((e,t)=>{let s=e+i();return s>t.length-1&&(s=e%i()),s})))}var a=s("./packages/ckeditor5-ui/src/template.ts"),c=s("./packages/ckeditor5-ui/src/viewcollection.ts"),l=s("./packages/ckeditor5-utils/src/dom/createelement.ts");class d extends c.Z{constructor(e,t=[]){super(t),this.locale=e}attachToDom(){this._bodyCollectionContainer=new a.ZP({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let e=document.querySelector(".ck-body-wrapper");e||(e=(0,l.Z)(document,"div",{class:"ck-body-wrapper"}),document.body.appendChild(e)),e.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy(),this._bodyCollectionContainer&&this._bodyCollectionContainer.remove();const e=document.querySelector(".ck-body-wrapper");e&&0==e.childElementCount&&e.remove()}}var h=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),u=s("./packages/ckeditor5-ui/src/button/switchbuttonview.ts");function p(e,t){const s=e.t,o={Black:s("Black"),"Dim grey":s("Dim grey"),Grey:s("Grey"),"Light grey":s("Light grey"),White:s("White"),Red:s("Red"),Orange:s("Orange"),Yellow:s("Yellow"),"Light green":s("Light green"),Green:s("Green"),Aquamarine:s("Aquamarine"),Turquoise:s("Turquoise"),"Light blue":s("Light blue"),Blue:s("Blue"),Purple:s("Purple")};return t.map((e=>{const t=o[e.label];return t&&t!=e.label&&(e.label=t),e}))}function g(e){return e.map(f).filter((e=>!!e))}function f(e){return"string"==typeof e?{model:e,label:e,hasBorder:!1,view:{name:"span",styles:{color:e}}}:{model:e.color,label:e.label||e.color,hasBorder:void 0!==e.hasBorder&&e.hasBorder,view:{name:"span",styles:{color:`${e.color}`}}}}var m=s("./packages/ckeditor5-ui/src/view.ts");class k extends h.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("color",void 0),this.set("hasBorder",!1),this.icon='',this.extendTemplate({attributes:{style:{backgroundColor:t.to("color")},class:["ck","ck-color-grid__tile",t.if("hasBorder","ck-color-table__color-tile_bordered")]}})}render(){super.render(),this.iconView.fillColor="hsl(0, 0%, 100%)"}}var b=s("./packages/ckeditor5-utils/src/focustracker.ts"),_=s("./packages/ckeditor5-utils/src/keystrokehandler.ts"),w=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),v=s.n(w),y=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/colorgrid/colorgrid.css"),Z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(y.Z,Z);y.Z.locals;class P extends m.Z{constructor(e,t){super(e);const s=t&&t.colorDefinitions||[];this.columns=t&&t.columns?t.columns:5;const o={gridTemplateColumns:`repeat( ${this.columns}, 1fr)`};this.set("selectedColor",void 0),this.items=this.createCollection(),this.focusTracker=new b.Z,this.keystrokes=new _.Z,this.items.on("add",((e,t)=>{t.isOn=t.color===this.selectedColor})),s.forEach((e=>{const t=new k;t.set({color:e.color,label:e.label,tooltip:!0,hasBorder:e.options.hasBorder}),t.on("execute",(()=>{this.fire("execute",{value:e.color,hasBorder:e.options.hasBorder,label:e.label})})),this.items.add(t)})),this.setTemplate({tag:"div",children:this.items,attributes:{class:["ck","ck-color-grid"],style:o}}),this.on("change:selectedColor",((e,t,s)=>{for(const e of this.items)e.isOn=e.color===s}))}focus(){this.items.length&&this.items.first.focus()}focusLast(){this.items.length&&this.items.last.focus()}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",((e,t)=>{this.focusTracker.add(t.element)})),this.items.on("remove",((e,t)=>{this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element),n({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:this.columns})}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}}var x=s("./packages/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.ts"),T=s("./packages/ckeditor5-ui/src/dropdown/button/splitbuttonview.ts"),A=s("./packages/ckeditor5-ui/src/dropdown/utils.ts"),C=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/editorui/editorui.css"),E={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(C.Z,E);C.Z.locals;class S extends m.Z{constructor(e){super(e),this.body=new d(e)}render(){super.render(),this.body.attachToDom()}destroy(){return this.body.detachFromDom(),super.destroy()}}var O=s("./packages/ckeditor5-utils/src/uid.ts"),R=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/label/label.css"),j={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(R.Z,j);R.Z.locals;class M extends m.Z{constructor(e){super(e),this.set("text",void 0),this.set("for",void 0),this.id=`ck-editor__label_${(0,O.Z)()}`;const t=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:t.to("for")},children:[{text:t.to("text")}]})}}class N extends S{constructor(e){super(e),this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const e=this.t,t=new M;return t.text=e("Rich Text Editor"),t.extendTemplate({attributes:{class:"ck-voice-label"}}),t}}class V extends m.Z{constructor(e,t,s){super(e),this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:e.contentLanguage,dir:e.contentLanguageDirection}}),this.name=null,this.set("isFocused",!1),this._editableElement=s,this._hasExternalElement=!!this._editableElement,this._editingView=t}render(){super.render(),this._hasExternalElement?this.template.apply(this.element=this._editableElement):this._editableElement=this.element,this.on("change:isFocused",(()=>this._updateIsFocusedClasses())),this._updateIsFocusedClasses()}destroy(){this._hasExternalElement&&this.template.revert(this._editableElement),super.destroy()}_updateIsFocusedClasses(){const e=this._editingView;function t(t){e.change((s=>{const o=e.document.getRoot(t.name);s.addClass(t.isFocused?"ck-focused":"ck-blurred",o),s.removeClass(t.isFocused?"ck-blurred":"ck-focused",o)}))}e.isRenderingInProgress?function s(o){e.once("change:isRenderingInProgress",((e,i,r)=>{r?s(o):t(o)}))}(this):t(this)}}class I extends V{constructor(e,t,s,o={}){super(e,t,s);const i=e.t;this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}}),this._generateLabel=o.label||(()=>i("Editor editing area: %0",this.name))}render(){super.render();const e=this._editingView;e.change((t=>{const s=e.document.getRoot(this.name);t.setAttribute("aria-label",this._generateLabel(this),s)}))}}var D=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/formheader/formheader.css"),z={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(D.Z,z);D.Z.locals;class B extends m.Z{constructor(e,t={}){super(e);const s=this.bindTemplate;this.set("label",t.label||""),this.set("class",t.class||null),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__header",s.to("class")]},children:this.children});const o=new m.Z(e);o.setTemplate({tag:"span",attributes:{class:["ck","ck-form__header__label"]},children:[{text:s.to("label")}]}),this.children.add(o)}}var F=s("./packages/ckeditor5-ui/src/focuscycler.ts"),L=s("./packages/ckeditor5-ui/src/icon/iconview.ts"),W=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/input/input.css"),$={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(W.Z,$);W.Z.locals;class H extends m.Z{constructor(e){super(e),this.set("value",void 0),this.set("id",void 0),this.set("placeholder",void 0),this.set("isReadOnly",!1),this.set("hasError",!1),this.set("ariaDescribedById",void 0),this.focusTracker=new b.Z,this.bind("isFocused").to(this.focusTracker),this.set("isEmpty",!0),this.set("inputMode","text");const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck","ck-input",t.if("isFocused","ck-input_focused"),t.if("isEmpty","ck-input-text_empty"),t.if("hasError","ck-error")],id:t.to("id"),placeholder:t.to("placeholder"),readonly:t.to("isReadOnly"),inputmode:t.to("inputMode"),"aria-invalid":t.if("hasError",!0),"aria-describedby":t.to("ariaDescribedById")},on:{input:t.to(((...e)=>{this.fire("input",...e),this._updateIsEmpty()})),change:t.to(this._updateIsEmpty.bind(this))}})}render(){super.render(),this.focusTracker.add(this.element),this._setDomElementValue(this.value),this._updateIsEmpty(),this.on("change:value",((e,t,s)=>{this._setDomElementValue(s),this._updateIsEmpty()}))}destroy(){super.destroy(),this.focusTracker.destroy()}select(){this.element.select()}focus(){this.element.focus()}_updateIsEmpty(){this.isEmpty=!this.element.value}_setDomElementValue(e){this.element.value=e||0===e?e:""}}class q extends H{constructor(e){super(e),this.extendTemplate({attributes:{type:"text",class:["ck-input-text"]}})}}class U extends H{constructor(e,{min:t,max:s,step:o}={}){super(e);const i=this.bindTemplate;this.set("min",t),this.set("max",s),this.set("step",o),this.extendTemplate({attributes:{type:"number",class:["ck-input-number"],min:i.to("min"),max:i.to("max"),step:i.to("step")}})}}class K extends m.Z{constructor(e){super(e);const t=this.bindTemplate;this.setTemplate({tag:"iframe",attributes:{class:["ck","ck-reset_all"],sandbox:"allow-same-origin allow-scripts"},on:{load:t.to("loaded")}})}render(){return new Promise((e=>(this.on("loaded",e),super.render())))}}var G=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/labeledfield/labeledfieldview.css"),J={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(G.Z,J);G.Z.locals;class Q extends m.Z{constructor(e,t){super(e);const s=`ck-labeled-field-view-${(0,O.Z)()}`,o=`ck-labeled-field-view-status-${(0,O.Z)()}`;this.fieldView=t(this,s,o),this.set("label",void 0),this.set("isEnabled",!0),this.set("isEmpty",!0),this.set("isFocused",!1),this.set("errorText",null),this.set("infoText",null),this.set("class",void 0),this.set("placeholder",void 0),this.labelView=this._createLabelView(s),this.statusView=this._createStatusView(o),this.fieldWrapperChildren=this.createCollection([this.fieldView,this.labelView]),this.bind("_statusText").to(this,"errorText",this,"infoText",((e,t)=>e||t));const i=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view",i.to("class"),i.if("isEnabled","ck-disabled",(e=>!e)),i.if("isEmpty","ck-labeled-field-view_empty"),i.if("isFocused","ck-labeled-field-view_focused"),i.if("placeholder","ck-labeled-field-view_placeholder"),i.if("errorText","ck-error")]},children:[{tag:"div",attributes:{class:["ck","ck-labeled-field-view__input-wrapper"]},children:this.fieldWrapperChildren},this.statusView]})}_createLabelView(e){const t=new M(this.locale);return t.for=e,t.bind("text").to(this,"label"),t}_createStatusView(e){const t=new m.Z(this.locale),s=this.bindTemplate;return t.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-field-view__status",s.if("errorText","ck-labeled-field-view__status_error"),s.if("_statusText","ck-hidden",(e=>!e))],id:e,role:s.if("errorText","alert")},children:[{text:s.to("_statusText")}]}),t}focus(){this.fieldView.focus()}}function X(e,t,s){const o=new q(e.locale);return o.set({id:t,ariaDescribedById:s}),o.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),o.bind("hasError").to(e,"errorText",(e=>!!e)),o.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(o),o}function Y(e,t,s){const o=new U(e.locale);return o.set({id:t,ariaDescribedById:s,inputMode:"numeric"}),o.bind("isReadOnly").to(e,"isEnabled",(e=>!e)),o.bind("hasError").to(e,"errorText",(e=>!!e)),o.on("input",(()=>{e.errorText=null})),e.bind("isEmpty","isFocused","placeholder").to(o),o}function ee(e,t,s){const o=(0,A.t9)(e.locale);return o.set({id:t,ariaDescribedById:s}),o.bind("isEnabled").to(e),o}var te=s("./packages/ckeditor5-ui/src/list/listitemview.ts"),se=s("./packages/ckeditor5-ui/src/list/listview.ts"),oe=s("./packages/ckeditor5-core/src/contextplugin.ts");class ie extends oe.Z{static get pluginName(){return"Notification"}init(){this.on("show:warning",((e,t)=>{window.alert(t.message)}),{priority:"lowest"})}showSuccess(e,t={}){this._showNotification({message:e,type:"success",namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:"info",namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:"warning",namespace:t.namespace,title:t.title})}_showNotification(e){const t=e.namespace?`show:${e.type}:${e.namespace}`:`show:${e.type}`;this.fire(t,{message:e.message,type:e.type,title:e.title||""})}}var re=s("./packages/ckeditor5-utils/src/observablemixin.ts"),ne=s("./node_modules/lodash-es/assignIn.js");class ae extends re.y{constructor(e,t){super(),t&&(0,ne.Z)(this,t),e&&this.set(e)}}var ce=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts"),le=s("./packages/ckeditor5-ui/src/panel/balloon/contextualballoon.ts"),de=s("./packages/ckeditor5-utils/src/dom/global.ts"),he=s("./packages/ckeditor5-utils/src/dom/tounit.ts"),ue=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/panel/stickypanel.css"),pe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(ue.Z,pe);ue.Z.locals;const ge=(0,he.Z)("px");class fe extends m.Z{constructor(e){super(e);const t=this.bindTemplate;this.set("isActive",!1),this.set("isSticky",!1),this.set("limiterElement",null),this.set("limiterBottomOffset",50),this.set("viewportTopOffset",0),this.set("_marginLeft",null),this.set("_isStickyToTheLimiter",!1),this.set("_hasViewportTopOffset",!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new a.ZP({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:t.to("isSticky",(e=>e?"block":"none")),height:t.to("isSticky",(e=>e?ge(this._panelRect.height):null))}}}).render(),this._contentPanel=new a.ZP({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",t.if("isSticky","ck-sticky-panel__content_sticky"),t.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:t.to("isSticky",(e=>e?ge(this._contentPanelPlaceholder.getBoundingClientRect().width):null)),top:t.to("_hasViewportTopOffset",(e=>e?ge(this.viewportTopOffset):null)),bottom:t.to("_isStickyToTheLimiter",(e=>e?ge(this.limiterBottomOffset):null)),marginLeft:t.to("_marginLeft")}},children:this.content}).render(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-sticky-panel"]},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(de.Z.window,"scroll",(()=>{this._checkIfShouldBeSticky()})),this.listenTo(this,"change:isActive",(()=>{this._checkIfShouldBeSticky()}))}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{this.focusTracker.add(e.ui.getEditableElement()),this.focusTracker.add(this.toolbarView.element)})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this.show(!0),afterBlur:()=>this.hide(),isContextual:!0}),this._resizeObserver=null,this._balloon=e.plugins.get(le.Z),this._fireSelectionChangeDebounced=(0,ye.Z)((()=>this.fire("_selectionChangeDebounced")),200),this.decorate("show")}static get pluginName(){return"BalloonToolbar"}static get requires(){return[le.Z]}init(){const e=this.editor,t=e.model.document.selection;this.listenTo(this.focusTracker,"change:isFocused",((e,t,s)=>{const o=this._balloon.visibleView===this.toolbarView;!s&&o?this.hide():s&&this.show()})),this.listenTo(t,"change:range",((e,s)=>{(s.directChange||t.isCollapsed)&&this.hide(),this._fireSelectionChangeDebounced()})),this.listenTo(this,"_selectionChangeDebounced",(()=>{this.editor.editing.view.document.isFocused&&this.show()})),this._balloonConfig.shouldNotGroupWhenFull||this.listenTo(e,"ready",(()=>{const t=e.ui.view.editable.element;this._resizeObserver=new Ze.Z(t,(()=>{this.toolbarView.maxWidth=xe(.9*new ve.Z(t).width)}))})),this.listenTo(this.toolbarView,"groupedItemsUpdate",(()=>{this._updatePosition()}))}afterInit(){const e=this.editor.ui.componentFactory;this.toolbarView.fillFromConfig(this._balloonConfig,e)}_createToolbarView(){const e=this.editor.locale.t,t=!this._balloonConfig.shouldNotGroupWhenFull,s=new ke.Z(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return s.ariaLabel=e("Editor contextual toolbar"),s.render(),s}show(e=!1){const t=this.editor,s=t.model.document.selection,o=t.model.schema;this._balloon.hasView(this.toolbarView)||s.isCollapsed&&!e||function(e,t){if(1===e.rangeCount)return!1;return[...e.getRanges()].every((e=>{const s=e.getContainedElement();return s&&t.isSelectable(s)}))}(s,o)||Array.from(this.toolbarView.items).every((e=>void 0!==e.isEnabled&&!e.isEnabled))||(this.listenTo(this.editor.ui,"update",(()=>{this._updatePosition()})),this._balloon.add({view:this.toolbarView,position:this._getBalloonPositionData(),balloonClassName:"ck-toolbar-container"}))}hide(){this._balloon.hasView(this.toolbarView)&&(this.stopListening(this.editor.ui,"update"),this._balloon.remove(this.toolbarView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=e.document,s=t.selection,o=t.selection.isBackward;return{target:()=>{const t=o?s.getFirstRange():s.getLastRange(),i=ve.Z.getDomRangeRects(e.domConverter.viewRangeToDom(t));return o?i[0]:(i.length>1&&0===i[i.length-1].width&&i.pop(),i[i.length-1])},positions:this._getBalloonPositions(o)}}_updatePosition(){this._balloon.updatePosition(this._getBalloonPositionData())}destroy(){super.destroy(),this.stopListening(),this._fireSelectionChangeDebounced.cancel(),this.toolbarView.destroy(),this.focusTracker.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_getBalloonPositions(e){const t=Pe.OB.isSafari&&Pe.OB.isiOS?(0,ce.M)({heightOffset:Math.max(ce.Z.arrowHeightOffset,Math.round(20/Pe.CO.window.visualViewport.scale))}):ce.Z.defaultPositions;return e?[t.northWestArrowSouth,t.northWestArrowSouthWest,t.northWestArrowSouthEast,t.northWestArrowSouthMiddleEast,t.northWestArrowSouthMiddleWest,t.southWestArrowNorth,t.southWestArrowNorthWest,t.southWestArrowNorthEast,t.southWestArrowNorthMiddleWest,t.southWestArrowNorthMiddleEast]:[t.southEastArrowNorth,t.southEastArrowNorthEast,t.southEastArrowNorthWest,t.southEastArrowNorthMiddleEast,t.southEastArrowNorthMiddleWest,t.northEastArrowSouth,t.northEastArrowSouthEast,t.northEastArrowSouthWest,t.northEastArrowSouthMiddleEast,t.northEastArrowSouthMiddleWest]}}var Ae=s("./packages/ckeditor5-core/theme/icons/pilcrow.svg"),Ce=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-ui/theme/components/toolbar/blocktoolbar.css"),Ee={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};v()(Ce.Z,Ee);Ce.Z.locals;const Se=(0,he.Z)("px");class Oe extends h.Z{constructor(e){super(e);const t=this.bindTemplate;this.isVisible=!1,this.isToggleable=!0,this.set("top",0),this.set("left",0),this.extendTemplate({attributes:{class:"ck-block-toolbar-button",style:{top:t.to("top",(e=>Se(e))),left:t.to("left",(e=>Se(e)))}}})}}var Re=s("./packages/ckeditor5-utils/src/dom/position.ts"),je=s("./packages/ckeditor5-utils/src/env.ts");const Me=(0,he.Z)("px");class Ne extends we.Z{constructor(e){super(e),this._blockToolbarConfig=(0,_e.Z)(this.editor.config.get("blockToolbar")),this.toolbarView=this._createToolbarView(),this.panelView=this._createPanelView(),this.buttonView=this._createButtonView(),this._resizeObserver=null,(0,o.Z)({emitter:this.panelView,contextElements:[this.panelView.element,this.buttonView.element],activator:()=>this.panelView.isVisible,callback:()=>this._hidePanel()})}static get pluginName(){return"BlockToolbar"}init(){const e=this.editor;this.listenTo(e.model.document.selection,"change:range",((e,t)=>{t.directChange&&this._hidePanel()})),this.listenTo(e.ui,"update",(()=>this._updateButton())),this.listenTo(e,"change:isReadOnly",(()=>this._updateButton()),{priority:"low"}),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>this._updateButton())),this.listenTo(this.buttonView,"change:isVisible",((e,t,s)=>{s?this.buttonView.listenTo(window,"resize",(()=>this._updateButton())):(this.buttonView.stopListening(window,"resize"),this._hidePanel())})),e.ui.addToolbar(this.toolbarView,{beforeFocus:()=>this._showPanel(),afterBlur:()=>this._hidePanel()})}afterInit(){const e=this.editor.ui.componentFactory,t=this._blockToolbarConfig;this.toolbarView.fillFromConfig(t,e);for(const e of this.toolbarView.items)e.on("execute",(()=>this._hidePanel(!0)),{priority:"high"});t.shouldNotGroupWhenFull||this.listenTo(this.editor,"ready",(()=>{const e=this.editor.ui.view.editable.element;this._resizeObserver=new Ze.Z(e,(()=>{this.toolbarView.maxWidth=this._getToolbarMaxWidth()}))}))}destroy(){super.destroy(),this.panelView.destroy(),this.buttonView.destroy(),this.toolbarView.destroy(),this._resizeObserver&&this._resizeObserver.destroy()}_createToolbarView(){const e=this.editor.locale.t,t=!this._blockToolbarConfig.shouldNotGroupWhenFull,s=new ke.Z(this.editor.locale,{shouldGroupWhenFull:t,isFloating:!0});return s.ariaLabel=e("Editor block content toolbar"),s.focusTracker.on("change:isFocused",((e,t,s)=>{s||this._hidePanel()})),s}_createPanelView(){const e=this.editor,t=new ce.Z(e.locale);return t.content.add(this.toolbarView),t.class="ck-toolbar-container",e.ui.view.body.add(t),e.ui.focusTracker.add(t.element),this.toolbarView.keystrokes.set("Esc",((e,t)=>{this._hidePanel(!0),t()})),t}_createButtonView(){const e=this.editor,t=e.t,s=new Oe(e.locale),o=s.bindTemplate;return s.set({label:t("Edit block"),icon:Ae.Z,withText:!1}),s.extendTemplate({on:{mousedown:o.to((e=>{je.ZP.isSafari&&this.panelView.isVisible&&this.toolbarView.focus(),e.preventDefault()}))}}),s.bind("isOn").to(this.panelView,"isVisible"),s.bind("tooltip").to(this.panelView,"isVisible",(e=>!e)),this.listenTo(s,"execute",(()=>{this.panelView.isVisible?this._hidePanel(!0):this._showPanel()})),e.ui.view.body.add(s),e.ui.focusTracker.add(s.element),s}_updateButton(){const e=this.editor,t=e.model,s=e.editing.view;if(!e.ui.focusTracker.isFocused)return void this._hideButton();if(e.isReadOnly)return void this._hideButton();const o=Array.from(t.document.selection.getSelectedBlocks())[0];if(!o||Array.from(this.toolbarView.items).every((e=>!e.isEnabled)))return void this._hideButton();const i=s.domConverter.mapViewToDom(e.editing.mapper.toViewElement(o));this.buttonView.isVisible=!0,this._attachButtonToElement(i),this.panelView.isVisible&&this._showPanel()}_hideButton(){this.buttonView.isVisible=!1}_showPanel(){if(!this.buttonView.isVisible)return;const e=this.panelView.isVisible;this.panelView.show(),this.toolbarView.maxWidth=this._getToolbarMaxWidth(),this.panelView.pin({target:this.buttonView.element,limiter:this.editor.ui.getEditableElement()}),e||this.toolbarView.items.get(0).focus()}_hidePanel(e){this.panelView.isVisible=!1,e&&this.editor.editing.view.focus()}_attachButtonToElement(e){const t=window.getComputedStyle(e),s=new ve.Z(this.editor.ui.getEditableElement()),o=parseInt(t.paddingTop,10),i=parseInt(t.lineHeight,10)||1.2*parseInt(t.fontSize,10),r=(0,Re.x)({element:this.buttonView.element,target:e,positions:[(e,t)=>{let r;return r="ltr"===this.editor.locale.uiLanguageDirection?s.left-t.width:s.right,{top:e.top+o+(i-t.height)/2,left:r}}]});this.buttonView.top=r.top,this.buttonView.left=r.left}_getToolbarMaxWidth(){const e=this.editor.ui.view.editable.element,t=new ve.Z(e),s=new ve.Z(this.buttonView.element),o="rtl"===this.editor.locale.uiLanguageDirection?s.left-t.right+s.width:t.left-s.left;return Me(t.width+o)}}},"./src/undo.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Undo:()=>m,UndoEditing:()=>h,UndoUi:()=>f});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-core/src/command.ts"),r=s("./packages/ckeditor5-engine/src/model/operation/transform.ts");class n extends i.Z{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh(),this.listenTo(e.data,"set",((e,t)=>{t[1]={...t[1]};const s=t[1];s.batchType||(s.batchType={isUndoable:!1})}),{priority:"high"}),this.listenTo(e.data,"set",((e,t)=>{t[1].batchType.isUndoable||this.clearStack()}))}refresh(){this.isEnabled=this._stack.length>0}addBatch(e){const t=this.editor.model.document.selection,s={ranges:t.hasOwnRange?Array.from(t.getRanges()):[],isBackward:t.isBackward};this._stack.push({batch:e,selection:s}),this.refresh()}clearStack(){this._stack=[],this.refresh()}_restoreSelection(e,t,s){const o=this.editor.model,i=o.document,r=[],n=e.map((e=>e.getTransformedByOperations(s))),l=n.flat();for(const e of n){const t=e.filter((e=>e.root!=i.graveyard)).filter((e=>!c(e,l)));t.length&&(a(t),r.push(t[0]))}r.length&&o.change((e=>{e.setSelection(r,{backward:t})}))}_undo(e,t){const s=this.editor.model,o=s.document;this._createdBatches.add(t);const i=e.operations.slice().filter((e=>e.isDocumentOperation));i.reverse();for(const e of i){const i=e.baseVersion+1,n=Array.from(o.history.getOperations(i)),a=(0,r.R)([e.getReversed()],n,{useRelations:!0,document:this.editor.model.document,padWithNoOps:!1,forceWeakRemove:!0}).operationsA;for(const i of a)t.addOperation(i),s.applyOperation(i),o.history.setOperationAsUndone(e,i)}}}function a(e){e.sort(((e,t)=>e.start.isBefore(t.start)?-1:1));for(let t=1;tt!==e&&t.containsRange(e,!0)))}class l extends n{execute(e=null){const t=e?this._stack.findIndex((t=>t.batch==e)):this._stack.length-1,s=this._stack.splice(t,1)[0],o=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(o,(()=>{this._undo(s.batch,o);const e=this.editor.model.document.history.getOperations(s.batch.baseVersion);this._restoreSelection(s.selection.ranges,s.selection.isBackward,e),this.fire("revert",s.batch,o)})),this.refresh()}}class d extends n{execute(){const e=this._stack.pop(),t=this.editor.model.createBatch({isUndo:!0});this.editor.model.enqueueChange(t,(()=>{const s=e.batch.operations[e.batch.operations.length-1].baseVersion+1,o=this.editor.model.document.history.getOperations(s);this._restoreSelection(e.selection.ranges,e.selection.isBackward,o),this._undo(e.batch,t)})),this.refresh()}}class h extends o.Z{constructor(e){super(e),this._batchRegistry=new WeakSet}static get pluginName(){return"UndoEditing"}init(){const e=this.editor;this._undoCommand=new l(e),this._redoCommand=new d(e),e.commands.add("undo",this._undoCommand),e.commands.add("redo",this._redoCommand),this.listenTo(e.model,"applyOperation",((e,t)=>{const s=t[0];if(!s.isDocumentOperation)return;const o=s.batch,i=this._redoCommand._createdBatches.has(o),r=this._undoCommand._createdBatches.has(o);this._batchRegistry.has(o)||(this._batchRegistry.add(o),o.isUndoable&&(i?this._undoCommand.addBatch(o):r||(this._undoCommand.addBatch(o),this._redoCommand.clearStack())))}),{priority:"highest"}),this.listenTo(this._undoCommand,"revert",((e,t,s)=>{this._redoCommand.addBatch(s)})),e.keystrokes.set("CTRL+Z","undo"),e.keystrokes.set("CTRL+Y","redo"),e.keystrokes.set("CTRL+SHIFT+Z","redo")}}var u=s("./packages/ckeditor5-ui/src/button/buttonview.ts");const p='',g='';class f extends o.Z{static get pluginName(){return"UndoUI"}init(){const e=this.editor,t=e.locale,s=e.t,o="ltr"==t.uiLanguageDirection?p:g,i="ltr"==t.uiLanguageDirection?g:p;this._addButton("undo",s("Undo"),"CTRL+Z",o),this._addButton("redo",s("Redo"),"CTRL+Y",i)}_addButton(e,t,s,o){const i=this.editor;i.ui.componentFactory.add(e,(r=>{const n=i.commands.get(e),a=new u.Z(r);return a.set({label:t,icon:o,keystroke:s,tooltip:!0}),a.bind("isEnabled").to(n,"isEnabled"),this.listenTo(a,"execute",(()=>{i.execute(e),i.editing.view.focus()})),a}))}}class m extends o.Z{static get requires(){return[h,f]}static get pluginName(){return"Undo"}}},"./src/upload.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{Base64UploadAdapter:()=>m,FileDialogButtonView:()=>g,FileRepository:()=>d,SimpleUploadAdapter:()=>b});var o=s("./packages/ckeditor5-core/src/plugin.ts"),i=s("./packages/ckeditor5-core/src/pendingactions.ts"),r=s("./packages/ckeditor5-utils/src/ckeditorerror.ts"),n=s("./packages/ckeditor5-utils/src/observablemixin.ts"),a=s("./packages/ckeditor5-utils/src/collection.ts");class c extends n.y{constructor(){super();const e=new window.FileReader;this._reader=e,this._data=void 0,this.set("loaded",0),e.onprogress=e=>{this.loaded=e.loaded}}get error(){return this._reader.error}get data(){return this._data}read(e){const t=this._reader;return this.total=e.size,new Promise(((s,o)=>{t.onload=()=>{const e=t.result;this._data=e,s(e)},t.onerror=()=>{o("error")},t.onabort=()=>{o("aborted")},this._reader.readAsDataURL(e)}))}abort(){this._reader.abort()}}var l=s("./packages/ckeditor5-utils/src/uid.ts");class d extends o.Z{static get pluginName(){return"FileRepository"}static get requires(){return[i.Z]}init(){this.loaders=new a.Z,this.loaders.on("change",(()=>this._updatePendingAction())),this._loadersMap=new Map,this._pendingAction=null,this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0))}getLoader(e){return this._loadersMap.get(e)||null}createLoader(e){if(!this.createUploadAdapter)return(0,r.KE)("filerepository-no-upload-adapter"),null;const t=new h(Promise.resolve(e),this.createUploadAdapter);return this.loaders.add(t),this._loadersMap.set(e,t),e instanceof Promise&&t.file.then((e=>{this._loadersMap.set(e,t)})).catch((()=>{})),t.on("change:uploaded",(()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e})),t.on("change:uploadTotal",(()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e})),t}destroyLoader(e){const t=e instanceof h?e:this.getLoader(e);t._destroy(),this.loaders.remove(t),this._loadersMap.forEach(((e,s)=>{e===t&&this._loadersMap.delete(s)}))}_updatePendingAction(){const e=this.editor.plugins.get(i.Z);if(this.loaders.length){if(!this._pendingAction){const t=this.editor.t,s=e=>`${t("Upload in progress")} ${parseInt(e)}%.`;this._pendingAction=e.add(s(this.uploadedPercent)),this._pendingAction.bind("message").to(this,"uploadedPercent",s)}}else e.remove(this._pendingAction),this._pendingAction=null}}class h extends n.y{constructor(e,t){super(),this.id=(0,l.Z)(),this._filePromiseWrapper=this._createFilePromiseWrapper(e),this._adapter=t(this),this._reader=new c,this.set("status","idle"),this.set("uploaded",0),this.set("uploadTotal",null),this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",((e,t)=>t?e/t*100:0)),this.set("uploadResponse",null)}get file(){return this._filePromiseWrapper?this._filePromiseWrapper.promise.then((e=>this._filePromiseWrapper?e:null)):Promise.resolve(null)}get data(){return this._reader.data}read(){if("idle"!=this.status)throw new r.ZP("filerepository-read-wrong-status",this);return this.status="reading",this.file.then((e=>this._reader.read(e))).then((e=>{if("reading"!==this.status)throw this.status;return this.status="idle",e})).catch((e=>{if("aborted"===e)throw this.status="aborted","aborted";throw this.status="error",this._reader.error?this._reader.error:e}))}upload(){if("idle"!=this.status)throw new r.ZP("filerepository-upload-wrong-status",this);return this.status="uploading",this.file.then((()=>this._adapter.upload())).then((e=>(this.uploadResponse=e,this.status="idle",e))).catch((e=>{if("aborted"===this.status)throw"aborted";throw this.status="error",e}))}abort(){const e=this.status;this.status="aborted",this._filePromiseWrapper.isFulfilled?"reading"==e?this._reader.abort():"uploading"==e&&this._adapter.abort&&this._adapter.abort():(this._filePromiseWrapper.promise.catch((()=>{})),this._filePromiseWrapper.rejecter("aborted")),this._destroy()}_destroy(){this._filePromiseWrapper=void 0,this._reader=void 0,this._adapter=void 0,this.uploadResponse=void 0}_createFilePromiseWrapper(e){const t={};return t.promise=new Promise(((s,o)=>{t.rejecter=o,t.isFulfilled=!1,e.then((e=>{t.isFulfilled=!0,s(e)})).catch((e=>{t.isFulfilled=!0,o(e)}))})),t}}var u=s("./packages/ckeditor5-ui/src/button/buttonview.ts"),p=s("./packages/ckeditor5-ui/src/view.ts");class g extends p.Z{constructor(e){super(e),this.buttonView=new u.Z(e),this._fileInputView=new f(e),this._fileInputView.bind("acceptedType").to(this),this._fileInputView.bind("allowMultipleFiles").to(this),this._fileInputView.delegate("done").to(this),this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]}),this.buttonView.on("execute",(()=>{this._fileInputView.open()}))}focus(){this.buttonView.focus()}}class f extends p.Z{constructor(e){super(e),this.set("acceptedType",void 0),this.set("allowMultipleFiles",!1);const t=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:t.to("acceptedType"),multiple:t.to("allowMultipleFiles")},on:{change:t.to((()=>{this.element&&this.element.files&&this.element.files.length&&this.fire("done",this.element.files),this.element.value=""}))}})}open(){this.element.click()}}class m extends o.Z{static get requires(){return[d]}static get pluginName(){return"Base64UploadAdapter"}init(){this.editor.plugins.get(d).createUploadAdapter=e=>new k(e)}}class k{constructor(e){this.loader=e}upload(){return new Promise(((e,t)=>{const s=this.reader=new window.FileReader;s.addEventListener("load",(()=>{e({default:s.result})})),s.addEventListener("error",(e=>{t(e)})),s.addEventListener("abort",(()=>{t()})),this.loader.file.then((e=>{s.readAsDataURL(e)}))}))}abort(){this.reader.abort()}}class b extends o.Z{static get requires(){return[d]}static get pluginName(){return"SimpleUploadAdapter"}init(){const e=this.editor.config.get("simpleUpload");e&&(e.uploadUrl?this.editor.plugins.get(d).createUploadAdapter=t=>new _(t,e):(0,r.KE)("simple-upload-adapter-missing-uploadurl"))}}class _{constructor(e,t){this.loader=e,this.options=t}upload(){return this.loader.file.then((e=>new Promise(((t,s)=>{this._initRequest(),this._initListeners(t,s,e),this._sendRequest(e)}))))}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open("POST",this.options.uploadUrl,!0),e.responseType="json"}_initListeners(e,t,s){const o=this.xhr,i=this.loader,r=`Couldn't upload file: ${s.name}.`;o.addEventListener("error",(()=>t(r))),o.addEventListener("abort",(()=>t())),o.addEventListener("load",(()=>{const s=o.response;if(!s||s.error)return t(s&&s.error&&s.error.message?s.error.message:r);const i=s.url?{default:s.url}:s.urls;e({...s,urls:i})})),o.upload&&o.upload.addEventListener("progress",(e=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)}))}_sendRequest(e){const t=this.options.headers||{},s=this.options.withCredentials||!1;for(const e of Object.keys(t))this.xhr.setRequestHeader(e,t[e]);this.xhr.withCredentials=s;const o=new FormData;o.append("upload",e),this.xhr.send(o)}}},"./src/utils.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{CKEditorError:()=>o.Bb,Collection:()=>o.FE,DomEmitterMixin:()=>o.Xu,ElementReplacer:()=>o.a6,EmitterMixin:()=>o.ln,FocusTracker:()=>o.Rh,KeystrokeHandler:()=>o.VD,Locale:()=>o.go,ObservableMixin:()=>o.Re,Rect:()=>o.UL,ResizeObserver:()=>o.do,createElement:()=>o.az,diff:()=>o.Hg,env:()=>o.OB,first:()=>o.Ps,getCode:()=>o.Cq,getDataFromElement:()=>o.yy,getEnvKeystrokeText:()=>o.XU,getLanguageDirection:()=>o.j9,getLocalizedArrowKeyCodeDirection:()=>o.mA,global:()=>o.CO,insertToPriorityArray:()=>o.VG,isArrowKeyCode:()=>o.dj,isForwardArrowKeyCode:()=>o.Zt,isVisible:()=>o.pn,keyCodes:()=>o.Do,logError:()=>o.H,logWarning:()=>o.KE,mix:()=>o.CD,parseKeystroke:()=>o.Zz,priorities:()=>o.tA,scrollAncestorsToShowTarget:()=>o.F0,scrollViewportToShowTarget:()=>o.mR,setDataInElement:()=>o.jS,toArray:()=>o.qo,toMap:()=>o.qL,toUnit:()=>o.nn,uid:()=>o.hQ,version:()=>o.i8});var o=s("./packages/ckeditor5-utils/src/index.ts")},"./src/widget.js":(e,t,s)=>{"use strict";s.r(t),s.d(t,{WIDGET_CLASS_NAME:()=>c.s4,WIDGET_SELECTED_CLASS_NAME:()=>c.Uo,Widget:()=>o.Z,WidgetResize:()=>S,WidgetToolbarRepository:()=>d,WidgetTypeAround:()=>O.Z,findOptimalInsertionRange:()=>c.KT,getLabel:()=>c.id,isWidget:()=>c.Qd,setHighlightHandling:()=>c.em,setLabel:()=>c.l6,toWidget:()=>c.XC,toWidgetEditable:()=>c.sC,viewToModelPositionOutsideModelElement:()=>c.$n});var o=s("./packages/ckeditor5-widget/src/widget.ts"),i=s("./packages/ckeditor5-core/src/plugin.ts"),r=s("./packages/ckeditor5-ui/src/panel/balloon/contextualballoon.ts"),n=s("./packages/ckeditor5-ui/src/toolbar/toolbarview.ts"),a=s("./packages/ckeditor5-ui/src/panel/balloon/balloonpanelview.ts"),c=s("./packages/ckeditor5-widget/src/utils.ts"),l=s("./packages/ckeditor5-utils/src/ckeditorerror.ts");class d extends i.Z{static get requires(){return[r.Z]}static get pluginName(){return"WidgetToolbarRepository"}init(){const e=this.editor;if(e.plugins.has("BalloonToolbar")){const t=e.plugins.get("BalloonToolbar");this.listenTo(t,"show",(t=>{(function(e){const t=e.getSelectedElement();return!(!t||!(0,c.Qd)(t))})(e.editing.view.document.selection)&&t.stop()}),{priority:"high"})}this._toolbarDefinitions=new Map,this._balloon=this.editor.plugins.get("ContextualBalloon"),this.on("change:isEnabled",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui,"update",(()=>{this._updateToolbarsVisibility()})),this.listenTo(e.ui.focusTracker,"change:isFocused",(()=>{this._updateToolbarsVisibility()}),{priority:"low"})}destroy(){super.destroy();for(const e of this._toolbarDefinitions.values())e.view.destroy()}register(e,{ariaLabel:t,items:s,getRelatedElement:o,balloonClassName:i="ck-toolbar-container"}){if(!s.length)return void(0,l.KE)("widget-toolbar-no-items",{toolbarId:e});const r=this.editor,a=r.t,c=new n.Z(r.locale);if(c.ariaLabel=t||a("Widget toolbar"),this._toolbarDefinitions.has(e))throw new l.ZP("widget-toolbar-duplicated",this,{toolbarId:e});c.fillFromConfig(s,r.ui.componentFactory);const d={view:c,getRelatedElement:o,balloonClassName:i};r.ui.addToolbar(c,{isContextual:!0,beforeFocus:()=>{const e=o(r.editing.view.document.selection);e&&this._showToolbar(d,e)},afterBlur:()=>{this._hideToolbar(d)}}),this._toolbarDefinitions.set(e,d)}_updateToolbarsVisibility(){let e=0,t=null,s=null;for(const o of this._toolbarDefinitions.values()){const i=o.getRelatedElement(this.editor.editing.view.document.selection);if(this.isEnabled&&i)if(this.editor.ui.focusTracker.isFocused){const r=i.getAncestors().length;r>e&&(e=r,t=i,s=o)}else this._isToolbarVisible(o)&&this._hideToolbar(o);else this._isToolbarInBalloon(o)&&this._hideToolbar(o)}s&&this._showToolbar(s,t)}_hideToolbar(e){this._balloon.remove(e.view),this.stopListening(this._balloon,"change:visibleView")}_showToolbar(e,t){this._isToolbarVisible(e)?h(this.editor,t):this._isToolbarInBalloon(e)||(this._balloon.add({view:e.view,position:u(this.editor,t),balloonClassName:e.balloonClassName}),this.listenTo(this._balloon,"change:visibleView",(()=>{for(const e of this._toolbarDefinitions.values())if(this._isToolbarVisible(e)){const t=e.getRelatedElement(this.editor.editing.view.document.selection);h(this.editor,t)}})))}_isToolbarVisible(e){return this._balloon.visibleView===e.view}_isToolbarInBalloon(e){return this._balloon.hasView(e.view)}}function h(e,t){const s=e.plugins.get("ContextualBalloon"),o=u(e,t);s.updatePosition(o)}function u(e,t){const s=e.editing.view,o=a.Z.defaultPositions;return{target:s.domConverter.mapViewToDom(t),positions:[o.northArrowSouth,o.northArrowSouthWest,o.northArrowSouthEast,o.southArrowNorth,o.southArrowNorthWest,o.southArrowNorthEast,o.viewportStickyNorth]}}var p=s("./packages/ckeditor5-ui/src/template.ts"),g=s("./packages/ckeditor5-utils/src/dom/rect.ts"),f=s("./packages/ckeditor5-utils/src/comparearrays.ts"),m=s("./packages/ckeditor5-utils/src/observablemixin.ts");class k extends m.y{constructor(e){super(),this.set("activeHandlePosition",null),this.set("proposedWidthPercents",null),this.set("proposedWidth",null),this.set("proposedHeight",null),this.set("proposedHandleHostWidth",null),this.set("proposedHandleHostHeight",null),this._options=e,this._referenceCoordinates=null}get originalWidth(){return this._originalWidth}get originalHeight(){return this._originalHeight}get originalWidthPercents(){return this._originalWidthPercents}get aspectRatio(){return this._aspectRatio}begin(e,t,s){const o=new g.Z(t);this.activeHandlePosition=function(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const s of t)if(e.classList.contains(b(s)))return s}(e),this._referenceCoordinates=function(e,t){const s=new g.Z(e),o=t.split("-"),i={x:"right"==o[1]?s.right:s.left,y:"bottom"==o[0]?s.bottom:s.top};return i.x+=e.ownerDocument.defaultView.scrollX,i.y+=e.ownerDocument.defaultView.scrollY,i}(t,function(e){const t=e.split("-"),s={top:"bottom",bottom:"top",left:"right",right:"left"};return`${s[t[0]]}-${s[t[1]]}`}(this.activeHandlePosition)),this._originalWidth=o.width,this._originalHeight=o.height,this._aspectRatio=o.width/o.height;const i=s.style.width;i&&i.match(/^\d+(\.\d*)?%$/)?this._originalWidthPercents=parseFloat(i):this._originalWidthPercents=function(e,t){const s=e.parentElement,o=parseFloat(s.ownerDocument.defaultView.getComputedStyle(s).width);return t.width/o*100}(s,o)}update(e){this.proposedWidth=e.width,this.proposedHeight=e.height,this.proposedWidthPercents=e.widthPercents,this.proposedHandleHostWidth=e.handleHostWidth,this.proposedHandleHostHeight=e.handleHostHeight}}function b(e){return`ck-widget__resizer__handle-${e}`}var _=s("./packages/ckeditor5-ui/src/view.ts");class w extends _.Z{constructor(){super();const e=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-size-view",e.to("_viewPosition",(e=>e?`ck-orientation-${e}`:""))],style:{display:e.if("_isVisible","none",(e=>!e))}},children:[{text:e.to("_label")}]})}_bindToState(e,t){this.bind("_isVisible").to(t,"proposedWidth",t,"proposedHeight",((e,t)=>null!==e&&null!==t)),this.bind("_label").to(t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",t,"proposedWidthPercents",((t,s,o)=>"px"===e.unit?`${t}×${s}`:`${o}%`)),this.bind("_viewPosition").to(t,"activeHandlePosition",t,"proposedHandleHostWidth",t,"proposedHandleHostHeight",((e,t,s)=>t<50||s<50?"above-center":e))}_dismiss(){this.unbind(),this._isVisible=!1}}class v extends m.y{constructor(e){super(),this._options=e,this._viewResizerWrapper=null,this.set("isEnabled",!0),this.set("isSelected",!1),this.bind("isVisible").to(this,"isEnabled",this,"isSelected",((e,t)=>e&&t)),this.decorate("begin"),this.decorate("cancel"),this.decorate("commit"),this.decorate("updateSize"),this.on("commit",(e=>{this.state.proposedWidth||this.state.proposedWidthPercents||(this._cleanup(),e.stop())}),{priority:"high"})}get state(){return this._state}show(){this._options.editor.editing.view.change((e=>{e.removeClass("ck-hidden",this._viewResizerWrapper)}))}hide(){this._options.editor.editing.view.change((e=>{e.addClass("ck-hidden",this._viewResizerWrapper)}))}attach(){const e=this,t=this._options.viewElement;this._options.editor.editing.view.change((s=>{const o=s.createUIElement("div",{class:"ck ck-reset_all ck-widget__resizer"},(function(t){const s=this.toDomElement(t);return e._appendHandles(s),e._appendSizeUI(s),s}));s.insert(s.createPositionAt(t,"end"),o),s.addClass("ck-widget_with-resizer",t),this._viewResizerWrapper=o,this.isVisible||this.hide()})),this.on("change:isVisible",(()=>{this.isVisible?(this.show(),this.redraw()):this.hide()}))}begin(e){this._state=new k(this._options),this._sizeView._bindToState(this._options,this.state),this._initialViewWidth=this._options.viewElement.getStyle("width"),this.state.begin(e,this._getHandleHost(),this._getResizeHost())}updateSize(e){const t=this._proposeNewSize(e);this._options.editor.editing.view.change((e=>{const s=this._options.unit||"%",o=("%"===s?t.widthPercents:t.width)+s;e.setStyle("width",o,this._options.viewElement)}));const s=this._getHandleHost(),o=new g.Z(s),i=Math.round(o.width),r=Math.round(o.height),n=new g.Z(s);t.width=Math.round(n.width),t.height=Math.round(n.height),this.redraw(o),this.state.update({...t,handleHostWidth:i,handleHostHeight:r})}commit(){const e=this._options.unit||"%",t=("%"===e?this.state.proposedWidthPercents:this.state.proposedWidth)+e;this._options.editor.editing.view.change((()=>{this._cleanup(),this._options.onCommit(t)}))}cancel(){this._cleanup()}destroy(){this.cancel()}redraw(e){const t=this._domResizerWrapper;if(!((s=t)&&s.ownerDocument&&s.ownerDocument.contains(s)))return;var s;const o=t.parentElement,i=this._getHandleHost(),r=this._viewResizerWrapper,n=[r.getStyle("width"),r.getStyle("height"),r.getStyle("left"),r.getStyle("top")];let a;if(o.isSameNode(i)){const t=e||new g.Z(i);a=[t.width+"px",t.height+"px",void 0,void 0]}else a=[i.offsetWidth+"px",i.offsetHeight+"px",i.offsetLeft+"px",i.offsetTop+"px"];"same"!==(0,f.Z)(n,a)&&this._options.editor.editing.view.change((e=>{e.setStyle({width:a[0],height:a[1],left:a[2],top:a[3]},r)}))}containsHandle(e){return this._domResizerWrapper.contains(e)}static isResizeHandle(e){return e.classList.contains("ck-widget__resizer__handle")}_cleanup(){this._sizeView._dismiss();this._options.editor.editing.view.change((e=>{e.setStyle("width",this._initialViewWidth,this._options.viewElement)}))}_proposeNewSize(e){const t=this.state,s={x:(o=e).pageX,y:o.pageY};var o;const i=!this._options.isCentered||this._options.isCentered(this),r={x:t._referenceCoordinates.x-(s.x+t.originalWidth),y:s.y-t.originalHeight-t._referenceCoordinates.y};i&&t.activeHandlePosition.endsWith("-right")&&(r.x=s.x-(t._referenceCoordinates.x+t.originalWidth)),i&&(r.x*=2);let n=Math.abs(t.originalWidth+r.x),a=Math.abs(t.originalHeight+r.y);return"width"==(n/t.aspectRatio>a?"width":"height")?a=n/t.aspectRatio:n=a*t.aspectRatio,{width:Math.round(n),height:Math.round(a),widthPercents:Math.min(Math.round(t.originalWidthPercents/t.originalWidth*n*100)/100,100)}}_getResizeHost(){const e=this._domResizerWrapper.parentElement;return this._options.getResizeHost(e)}_getHandleHost(){const e=this._domResizerWrapper.parentElement;return this._options.getHandleHost(e)}get _domResizerWrapper(){return this._options.editor.editing.view.domConverter.mapViewToDom(this._viewResizerWrapper)}_appendHandles(e){const t=["top-left","top-right","bottom-right","bottom-left"];for(const o of t)e.appendChild(new p.ZP({tag:"div",attributes:{class:"ck-widget__resizer__handle "+(s=o,`ck-widget__resizer__handle-${s}`)}}).render());var s}_appendSizeUI(e){this._sizeView=new w,this._sizeView.render(),e.appendChild(this._sizeView.element)}}var y=s("./packages/ckeditor5-utils/src/dom/emittermixin.ts"),Z=s("./packages/ckeditor5-utils/src/dom/global.ts"),P=s("./packages/ckeditor5-engine/src/view/observer/mouseobserver.ts"),x=s("./node_modules/lodash-es/throttle.js"),T=s("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),A=s.n(T),C=s("./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??ruleSet[1].rules[1].use[2]!./packages/ckeditor5-widget/theme/widgetresize.css"),E={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};A()(C.Z,E);C.Z.locals;class S extends i.Z{static get pluginName(){return"WidgetResize"}init(){const e=this.editor.editing,t=Z.Z.window.document;this.set("selectedResizer",null),this.set("_activeResizer",null),this._resizers=new Map,e.view.addObserver(P.Z),this._observer=new y.Q,this.listenTo(e.view.document,"mousedown",this._mouseDownListener.bind(this),{priority:"high"}),this._observer.listenTo(t,"mousemove",this._mouseMoveListener.bind(this)),this._observer.listenTo(t,"mouseup",this._mouseUpListener.bind(this)),this._redrawSelectedResizerThrottled=(0,x.Z)((()=>this.redrawSelectedResizer()),200),this.editor.ui.on("update",this._redrawSelectedResizerThrottled),this.editor.model.document.on("change",(()=>{for(const[e,t]of this._resizers)e.isAttached()||(this._resizers.delete(e),t.destroy())}),{priority:"lowest"}),this._observer.listenTo(Z.Z.window,"resize",this._redrawSelectedResizerThrottled);const s=this.editor.editing.view.document.selection;s.on("change",(()=>{const e=s.getSelectedElement(),t=this.getResizerByViewElement(e)||null;t?this.select(t):this.deselect()}))}redrawSelectedResizer(){this.selectedResizer&&this.selectedResizer.isVisible&&this.selectedResizer.redraw()}destroy(){super.destroy(),this._observer.stopListening();for(const e of this._resizers.values())e.destroy();this._redrawSelectedResizerThrottled.cancel()}select(e){this.deselect(),this.selectedResizer=e,this.selectedResizer.isSelected=!0}deselect(){this.selectedResizer&&(this.selectedResizer.isSelected=!1),this.selectedResizer=null}attachTo(e){const t=new v(e),s=this.editor.plugins;if(t.attach(),s.has("WidgetToolbarRepository")){const e=s.get("WidgetToolbarRepository");t.on("begin",(()=>{e.forceDisabled("resize")}),{priority:"lowest"}),t.on("cancel",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"}),t.on("commit",(()=>{e.clearForceDisabled("resize")}),{priority:"highest"})}this._resizers.set(e.viewElement,t);const o=this.editor.editing.view.document.selection.getSelectedElement();return this.getResizerByViewElement(o)==t&&this.select(t),t}getResizerByViewElement(e){return this._resizers.get(e)}_getResizerByHandle(e){for(const t of this._resizers.values())if(t.containsHandle(e))return t}_mouseDownListener(e,t){const s=t.domTarget;v.isResizeHandle(s)&&(this._activeResizer=this._getResizerByHandle(s)||null,this._activeResizer&&(this._activeResizer.begin(s),e.stop(),t.preventDefault()))}_mouseMoveListener(e,t){this._activeResizer&&this._activeResizer.updateSize(t)}_mouseUpListener(){this._activeResizer&&(this._activeResizer.commit(),this._activeResizer=null)}}var O=s("./packages/ckeditor5-widget/src/widgettypearound/widgettypearound.ts")},"?7cdd":(e,t,s)=>{e.exports=s},"./node_modules/lodash-es/_ListCache.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});const o=function(){this.__data__=[],this.size=0};var i=s("./node_modules/lodash-es/eq.js");const r=function(e,t){for(var s=e.length;s--;)if((0,i.Z)(e[s][0],t))return s;return-1};var n=Array.prototype.splice;const a=function(e){var t=this.__data__,s=r(t,e);return!(s<0)&&(s==t.length-1?t.pop():n.call(t,s,1),--this.size,!0)};const c=function(e){var t=this.__data__,s=r(t,e);return s<0?void 0:t[s][1]};const l=function(e){return r(this.__data__,e)>-1};const d=function(e,t){var s=this.__data__,o=r(s,e);return o<0?(++this.size,s.push([e,t])):s[o][1]=t,this};function h(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_getNative.js"),i=s("./node_modules/lodash-es/_root.js");const r=(0,o.Z)(i.Z,"Map")},"./node_modules/lodash-es/_MapCache.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>Z});const o=(0,s("./node_modules/lodash-es/_getNative.js").Z)(Object,"create");const i=function(){this.__data__=o?o(null):{},this.size=0};const r=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t};var n=Object.prototype.hasOwnProperty;const a=function(e){var t=this.__data__;if(o){var s=t[e];return"__lodash_hash_undefined__"===s?void 0:s}return n.call(t,e)?t[e]:void 0};var c=Object.prototype.hasOwnProperty;const l=function(e){var t=this.__data__;return o?void 0!==t[e]:c.call(t,e)};const d=function(e,t){var s=this.__data__;return this.size+=this.has(e)?0:1,s[e]=o&&void 0===t?"__lodash_hash_undefined__":t,this};function h(e){var t=-1,s=null==e?0:e.length;for(this.clear();++t{"use strict";s.d(t,{Z:()=>u});var o=s("./node_modules/lodash-es/_ListCache.js");const i=function(){this.__data__=new o.Z,this.size=0};const r=function(e){var t=this.__data__,s=t.delete(e);return this.size=t.size,s};const n=function(e){return this.__data__.get(e)};const a=function(e){return this.__data__.has(e)};var c=s("./node_modules/lodash-es/_Map.js"),l=s("./node_modules/lodash-es/_MapCache.js");const d=function(e,t){var s=this.__data__;if(s instanceof o.Z){var i=s.__data__;if(!c.Z||i.length<199)return i.push([e,t]),this.size=++s.size,this;s=this.__data__=new l.Z(i)}return s.set(e,t),this.size=s.size,this};function h(e){var t=this.__data__=new o.Z(e);this.size=t.size}h.prototype.clear=i,h.prototype.delete=r,h.prototype.get=n,h.prototype.has=a,h.prototype.set=d;const u=h},"./node_modules/lodash-es/_Symbol.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=s("./node_modules/lodash-es/_root.js").Z.Symbol},"./node_modules/lodash-es/_Uint8Array.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=s("./node_modules/lodash-es/_root.js").Z.Uint8Array},"./node_modules/lodash-es/_arrayLikeKeys.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});const o=function(e,t){for(var s=-1,o=Array(e);++s{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){for(var s=-1,o=t.length,i=e.length;++s{"use strict";s.d(t,{Z:()=>n});var o=s("./node_modules/lodash-es/_baseAssignValue.js"),i=s("./node_modules/lodash-es/eq.js"),r=Object.prototype.hasOwnProperty;const n=function(e,t,s){var n=e[t];r.call(e,t)&&(0,i.Z)(n,s)&&(void 0!==s||t in e)||(0,o.Z)(e,t,s)}},"./node_modules/lodash-es/_baseAssignValue.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_defineProperty.js");const i=function(e,t,s){"__proto__"==t&&o.Z?(0,o.Z)(e,t,{configurable:!0,enumerable:!0,value:s,writable:!0}):e[t]=s}},"./node_modules/lodash-es/_baseClone.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>Y});var o=s("./node_modules/lodash-es/_Stack.js");const i=function(e,t){for(var s=-1,o=null==e?0:e.length;++s{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_arrayPush.js"),i=s("./node_modules/lodash-es/isArray.js");const r=function(e,t,s){var r=t(e);return(0,i.Z)(e)?r:(0,o.Z)(r,s(e))}},"./node_modules/lodash-es/_baseGetTag.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>u});var o=s("./node_modules/lodash-es/_Symbol.js"),i=Object.prototype,r=i.hasOwnProperty,n=i.toString,a=o.Z?o.Z.toStringTag:void 0;const c=function(e){var t=r.call(e,a),s=e[a];try{e[a]=void 0;var o=!0}catch(e){}var i=n.call(e);return o&&(t?e[a]=s:delete e[a]),i};var l=Object.prototype.toString;const d=function(e){return l.call(e)};var h=o.Z?o.Z.toStringTag:void 0;const u=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?c(e):d(e)}},"./node_modules/lodash-es/_baseIsEqual.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>j});var o=s("./node_modules/lodash-es/_Stack.js"),i=s("./node_modules/lodash-es/_MapCache.js");const r=function(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this};const n=function(e){return this.__data__.has(e)};function a(e){var t=-1,s=null==e?0:e.length;for(this.__data__=new i.Z;++ta))return!1;var u=r.get(e),p=r.get(t);if(u&&p)return u==t&&p==e;var g=-1,f=!0,m=2&s?new c:void 0;for(r.set(e,t),r.set(t,e);++g{"use strict";s.d(t,{Z:()=>o});const o=function(e){return function(t){return e(t)}}},"./node_modules/lodash-es/_cloneArrayBuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_Uint8Array.js");const i=function(e){var t=new e.constructor(e.byteLength);return new o.Z(t).set(new o.Z(e)),t}},"./node_modules/lodash-es/_cloneBuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./node_modules/lodash-es/_root.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=i&&"object"==typeof module&&module&&!module.nodeType&&module,n=r&&r.exports===i?o.Z.Buffer:void 0,a=n?n.allocUnsafe:void 0;const c=function(e,t){if(t)return e.slice();var s=e.length,o=a?a(s):new e.constructor(s);return e.copy(o),o}},"./node_modules/lodash-es/_cloneTypedArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_cloneArrayBuffer.js");const i=function(e,t){var s=t?(0,o.Z)(e.buffer):e.buffer;return new e.constructor(s,e.byteOffset,e.length)}},"./node_modules/lodash-es/_copyArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){var s=-1,o=e.length;for(t||(t=Array(o));++s{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_assignValue.js"),i=s("./node_modules/lodash-es/_baseAssignValue.js");const r=function(e,t,s,r){var n=!s;s||(s={});for(var a=-1,c=t.length;++a{"use strict";s.d(t,{Z:()=>b});const o=function(e){return e};const i=function(e,t,s){switch(s.length){case 0:return e.call(t);case 1:return e.call(t,s[0]);case 2:return e.call(t,s[0],s[1]);case 3:return e.call(t,s[0],s[1],s[2])}return e.apply(t,s)};var r=Math.max;const n=function(e,t,s){return t=r(void 0===t?e.length-1:t,0),function(){for(var o=arguments,n=-1,a=r(o.length-t,0),c=Array(a);++n0){if(++t>=800)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}(l);const u=function(e,t){return h(n(e,t,o),e+"")};var p=s("./node_modules/lodash-es/eq.js"),g=s("./node_modules/lodash-es/isArrayLike.js"),f=s("./node_modules/lodash-es/_isIndex.js"),m=s("./node_modules/lodash-es/isObject.js");const k=function(e,t,s){if(!(0,m.Z)(s))return!1;var o=typeof t;return!!("number"==o?(0,g.Z)(s)&&(0,f.Z)(t,s.length):"string"==o&&t in s)&&(0,p.Z)(s[t],e)};const b=function(e){return u((function(t,s){var o=-1,i=s.length,r=i>1?s[i-1]:void 0,n=i>2?s[2]:void 0;for(r=e.length>3&&"function"==typeof r?(i--,r):void 0,n&&k(s[0],s[1],n)&&(r=i<3?void 0:r,i=1),t=Object(t);++o{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_getNative.js");const i=function(){try{var e=(0,o.Z)(Object,"defineProperty");return e({},"",{}),e}catch(e){}}()},"./node_modules/lodash-es/_freeGlobal.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o="object"==typeof global&&global&&global.Object===Object&&global},"./node_modules/lodash-es/_getAllKeys.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./node_modules/lodash-es/_baseGetAllKeys.js"),i=s("./node_modules/lodash-es/_getSymbols.js"),r=s("./node_modules/lodash-es/keys.js");const n=function(e){return(0,o.Z)(e,r.Z,i.Z)}},"./node_modules/lodash-es/_getNative.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./node_modules/lodash-es/isFunction.js");const i=s("./node_modules/lodash-es/_root.js").Z["__core-js_shared__"];var r,n=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";const a=function(e){return!!n&&n in e};var c=s("./node_modules/lodash-es/isObject.js"),l=s("./node_modules/lodash-es/_toSource.js"),d=/^\[object .+?Constructor\]$/,h=Function.prototype,u=Object.prototype,p=h.toString,g=u.hasOwnProperty,f=RegExp("^"+p.call(g).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const m=function(e){return!(!(0,c.Z)(e)||a(e))&&((0,o.Z)(e)?f:d).test((0,l.Z)(e))};const k=function(e,t){return null==e?void 0:e[t]};const b=function(e,t){var s=k(e,t);return m(s)?s:void 0}},"./node_modules/lodash-es/_getPrototype.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=(0,s("./node_modules/lodash-es/_overArg.js").Z)(Object.getPrototypeOf,Object)},"./node_modules/lodash-es/_getSymbols.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});const o=function(e,t){for(var s=-1,o=null==e?0:e.length,i=0,r=[];++s{"use strict";s.d(t,{Z:()=>Z});var o=s("./node_modules/lodash-es/_getNative.js"),i=s("./node_modules/lodash-es/_root.js");const r=(0,o.Z)(i.Z,"DataView");var n=s("./node_modules/lodash-es/_Map.js");const a=(0,o.Z)(i.Z,"Promise");const c=(0,o.Z)(i.Z,"Set");const l=(0,o.Z)(i.Z,"WeakMap");var d=s("./node_modules/lodash-es/_baseGetTag.js"),h=s("./node_modules/lodash-es/_toSource.js"),u="[object Map]",p="[object Promise]",g="[object Set]",f="[object WeakMap]",m="[object DataView]",k=(0,h.Z)(r),b=(0,h.Z)(n.Z),_=(0,h.Z)(a),w=(0,h.Z)(c),v=(0,h.Z)(l),y=d.Z;(r&&y(new r(new ArrayBuffer(1)))!=m||n.Z&&y(new n.Z)!=u||a&&y(a.resolve())!=p||c&&y(new c)!=g||l&&y(new l)!=f)&&(y=function(e){var t=(0,d.Z)(e),s="[object Object]"==t?e.constructor:void 0,o=s?(0,h.Z)(s):"";if(o)switch(o){case k:return m;case b:return u;case _:return p;case w:return g;case v:return f}return t});const Z=y},"./node_modules/lodash-es/_initCloneObject.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./node_modules/lodash-es/isObject.js"),i=Object.create;const r=function(){function e(){}return function(t){if(!(0,o.Z)(t))return{};if(i)return i(t);e.prototype=t;var s=new e;return e.prototype=void 0,s}}();var n=s("./node_modules/lodash-es/_getPrototype.js"),a=s("./node_modules/lodash-es/_isPrototype.js");const c=function(e){return"function"!=typeof e.constructor||(0,a.Z)(e)?{}:r((0,n.Z)(e))}},"./node_modules/lodash-es/_isIndex.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=/^(?:0|[1-9]\d*)$/;const i=function(e,t){var s=typeof e;return!!(t=null==t?9007199254740991:t)&&("number"==s||"symbol"!=s&&o.test(e))&&e>-1&&e%1==0&&e{"use strict";s.d(t,{Z:()=>i});var o=Object.prototype;const i=function(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||o)}},"./node_modules/lodash-es/_nodeUtil.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>a});var o=s("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof exports&&exports&&!exports.nodeType&&exports,r=i&&"object"==typeof module&&module&&!module.nodeType&&module,n=r&&r.exports===i&&o.Z.process;const a=function(){try{var e=r&&r.require&&r.require("util").types;return e||n&&n.binding&&n.binding("util")}catch(e){}}()},"./node_modules/lodash-es/_overArg.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){return function(s){return e(t(s))}}},"./node_modules/lodash-es/_root.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_freeGlobal.js"),i="object"==typeof self&&self&&self.Object===Object&&self;const r=o.Z||i||Function("return this")()},"./node_modules/lodash-es/_toSource.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=Function.prototype.toString;const i=function(e){if(null!=e){try{return o.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},"./node_modules/lodash-es/assignIn.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>n});var o=s("./node_modules/lodash-es/_copyObject.js"),i=s("./node_modules/lodash-es/_createAssigner.js"),r=s("./node_modules/lodash-es/keysIn.js");const n=(0,i.Z)((function(e,t){(0,o.Z)(t,(0,r.Z)(t),e)}))},"./node_modules/lodash-es/clone.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_baseClone.js");const i=function(e){return(0,o.Z)(e,4)}},"./node_modules/lodash-es/cloneDeep.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_baseClone.js");const i=function(e){return(0,o.Z)(e,5)}},"./node_modules/lodash-es/cloneDeepWith.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>i});var o=s("./node_modules/lodash-es/_baseClone.js");const i=function(e,t){return t="function"==typeof t?t:void 0,(0,o.Z)(e,5,t)}},"./node_modules/lodash-es/debounce.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>b});var o=s("./node_modules/lodash-es/isObject.js"),i=s("./node_modules/lodash-es/_root.js");const r=function(){return i.Z.Date.now()};var n=/\s/;const a=function(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t};var c=/^\s+/;const l=function(e){return e?e.slice(0,a(e)+1).replace(c,""):e};var d=s("./node_modules/lodash-es/isSymbol.js"),h=/^[-+]0x[0-9a-f]+$/i,u=/^0b[01]+$/i,p=/^0o[0-7]+$/i,g=parseInt;const f=function(e){if("number"==typeof e)return e;if((0,d.Z)(e))return NaN;if((0,o.Z)(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=(0,o.Z)(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=l(e);var s=u.test(e);return s||p.test(e)?g(e.slice(2),s?2:8):h.test(e)?NaN:+e};var m=Math.max,k=Math.min;const b=function(e,t,s){var i,n,a,c,l,d,h=0,u=!1,p=!1,g=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var s=i,o=n;return i=n=void 0,h=t,c=e.apply(o,s)}function _(e){return h=e,l=setTimeout(v,t),u?b(e):c}function w(e){var s=e-d;return void 0===d||s>=t||s<0||p&&e-h>=a}function v(){var e=r();if(w(e))return y(e);l=setTimeout(v,function(e){var s=t-(e-d);return p?k(s,a-(e-h)):s}(e))}function y(e){return l=void 0,g&&i?b(e):(i=n=void 0,c)}function Z(){var e=r(),s=w(e);if(i=arguments,n=this,d=e,s){if(void 0===l)return _(d);if(p)return clearTimeout(l),l=setTimeout(v,t),b(d)}return void 0===l&&(l=setTimeout(v,t)),c}return t=f(t)||0,(0,o.Z)(s)&&(u=!!s.leading,a=(p="maxWait"in s)?m(f(s.maxWait)||0,t):a,g="trailing"in s?!!s.trailing:g),Z.cancel=function(){void 0!==l&&clearTimeout(l),h=0,i=d=n=l=void 0},Z.flush=function(){return void 0===l?c:y(r())},Z}},"./node_modules/lodash-es/eq.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e,t){return e===t||e!=e&&t!=t}},"./node_modules/lodash-es/isArguments.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isObjectLike.js");const r=function(e){return(0,i.Z)(e)&&"[object Arguments]"==(0,o.Z)(e)};var n=Object.prototype,a=n.hasOwnProperty,c=n.propertyIsEnumerable;const l=r(function(){return arguments}())?r:function(e){return(0,i.Z)(e)&&a.call(e,"callee")&&!c.call(e,"callee")}},"./node_modules/lodash-es/isArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=Array.isArray},"./node_modules/lodash-es/isArrayLike.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/isFunction.js"),i=s("./node_modules/lodash-es/isLength.js");const r=function(e){return null!=e&&(0,i.Z)(e.length)&&!(0,o.Z)(e)}},"./node_modules/lodash-es/isBuffer.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>c});var o=s("./node_modules/lodash-es/_root.js");const i=function(){return!1};var r="object"==typeof exports&&exports&&!exports.nodeType&&exports,n=r&&"object"==typeof module&&module&&!module.nodeType&&module,a=n&&n.exports===r?o.Z.Buffer:void 0;const c=(a?a.isBuffer:void 0)||i},"./node_modules/lodash-es/isElement.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/isObjectLike.js"),i=s("./node_modules/lodash-es/isPlainObject.js");const r=function(e){return(0,o.Z)(e)&&1===e.nodeType&&!(0,i.Z)(e)}},"./node_modules/lodash-es/isFunction.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isObject.js");const r=function(e){if(!(0,i.Z)(e))return!1;var t=(0,o.Z)(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},"./node_modules/lodash-es/isLength.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},"./node_modules/lodash-es/isObject.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},"./node_modules/lodash-es/isObjectLike.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(e){return null!=e&&"object"==typeof e}},"./node_modules/lodash-es/isPlainObject.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/_getPrototype.js"),r=s("./node_modules/lodash-es/isObjectLike.js"),n=Function.prototype,a=Object.prototype,c=n.toString,l=a.hasOwnProperty,d=c.call(Object);const h=function(e){if(!(0,r.Z)(e)||"[object Object]"!=(0,o.Z)(e))return!1;var t=(0,i.Z)(e);if(null===t)return!0;var s=l.call(t,"constructor")&&t.constructor;return"function"==typeof s&&s instanceof s&&c.call(s)==d}},"./node_modules/lodash-es/isSymbol.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isObjectLike.js");const r=function(e){return"symbol"==typeof e||(0,i.Z)(e)&&"[object Symbol]"==(0,o.Z)(e)}},"./node_modules/lodash-es/isTypedArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>h});var o=s("./node_modules/lodash-es/_baseGetTag.js"),i=s("./node_modules/lodash-es/isLength.js"),r=s("./node_modules/lodash-es/isObjectLike.js"),n={};n["[object Float32Array]"]=n["[object Float64Array]"]=n["[object Int8Array]"]=n["[object Int16Array]"]=n["[object Int32Array]"]=n["[object Uint8Array]"]=n["[object Uint8ClampedArray]"]=n["[object Uint16Array]"]=n["[object Uint32Array]"]=!0,n["[object Arguments]"]=n["[object Array]"]=n["[object ArrayBuffer]"]=n["[object Boolean]"]=n["[object DataView]"]=n["[object Date]"]=n["[object Error]"]=n["[object Function]"]=n["[object Map]"]=n["[object Number]"]=n["[object Object]"]=n["[object RegExp]"]=n["[object Set]"]=n["[object String]"]=n["[object WeakMap]"]=!1;const a=function(e){return(0,r.Z)(e)&&(0,i.Z)(e.length)&&!!n[(0,o.Z)(e)]};var c=s("./node_modules/lodash-es/_baseUnary.js"),l=s("./node_modules/lodash-es/_nodeUtil.js"),d=l.Z&&l.Z.isTypedArray;const h=d?(0,c.Z)(d):a},"./node_modules/lodash-es/keys.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>l});var o=s("./node_modules/lodash-es/_arrayLikeKeys.js"),i=s("./node_modules/lodash-es/_isPrototype.js");const r=(0,s("./node_modules/lodash-es/_overArg.js").Z)(Object.keys,Object);var n=Object.prototype.hasOwnProperty;const a=function(e){if(!(0,i.Z)(e))return r(e);var t=[];for(var s in Object(e))n.call(e,s)&&"constructor"!=s&&t.push(s);return t};var c=s("./node_modules/lodash-es/isArrayLike.js");const l=function(e){return(0,c.Z)(e)?(0,o.Z)(e):a(e)}},"./node_modules/lodash-es/keysIn.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./node_modules/lodash-es/_arrayLikeKeys.js"),i=s("./node_modules/lodash-es/isObject.js"),r=s("./node_modules/lodash-es/_isPrototype.js");const n=function(e){var t=[];if(null!=e)for(var s in Object(e))t.push(s);return t};var a=Object.prototype.hasOwnProperty;const c=function(e){if(!(0,i.Z)(e))return n(e);var t=(0,r.Z)(e),s=[];for(var o in e)("constructor"!=o||!t&&a.call(e,o))&&s.push(o);return s};var l=s("./node_modules/lodash-es/isArrayLike.js");const d=function(e){return(0,l.Z)(e)?(0,o.Z)(e,!0):c(e)}},"./node_modules/lodash-es/stubArray.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>o});const o=function(){return[]}},"./node_modules/lodash-es/throttle.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>r});var o=s("./node_modules/lodash-es/debounce.js"),i=s("./node_modules/lodash-es/isObject.js");const r=function(e,t,s){var r=!0,n=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return(0,i.Z)(s)&&(r="leading"in s?!!s.leading:r,n="trailing"in s?!!s.trailing:n),(0,o.Z)(e,t,{leading:r,maxWait:t,trailing:n})}},"./node_modules/lodash-es/toString.js":(e,t,s)=>{"use strict";s.d(t,{Z:()=>d});var o=s("./node_modules/lodash-es/_Symbol.js");const i=function(e,t){for(var s=-1,o=null==e?0:e.length,i=Array(o);++s{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},s.d=(e,t)=>{for(var o in t)s.o(t,o)&&!s.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.nc=void 0;var o=s("?7cdd");(window.CKEditor5=window.CKEditor5||{}).dll=o})(),function(e){e.CKEditor5=e.CKEditor5||{};const t=["utils","core","engine","ui","clipboard","enter","paragraph","select-all","typing","undo","upload","widget"];for(const s of t){const t=s.replace(/-([a-z])/g,((e,t)=>t.toUpperCase()));e.CKEditor5[t]=e.CKEditor5.dll(`./src/${s}.js`)}}(window); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/editor-classic/editor-classic.js b/core/assets/vendor/ckeditor5/editor-classic/editor-classic.js index d093371447..2c43311852 100644 --- a/core/assets/vendor/ckeditor5/editor-classic/editor-classic.js +++ b/core/assets/vendor/ckeditor5/editor-classic/editor-classic.js @@ -1,4 +1,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={655:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var o=r(609),n=r.n(o)()((function(e){return e[1]}));n.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const i=n},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,o){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(o)for(var i=0;i{"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),c=[];function a(e){for(var t=-1,r=0;r{e.exports=r(79)("./src/core.js")},492:(e,t,r)=>{e.exports=r(79)("./src/engine.js")},273:(e,t,r)=>{e.exports=r(79)("./src/ui.js")},209:(e,t,r)=>{e.exports=r(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={id:o,exports:{}};return e[o](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 o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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})},r.nc=void 0;var o={};(()=>{"use strict";r.r(o),r.d(o,{ClassicEditor:()=>R});var e=r(704),t=r(209);const n=function(e){return null!=e&&"object"==typeof e};const i="object"==typeof global&&global&&global.Object===Object&&global;var c="object"==typeof self&&self&&self.Object===Object&&self;const a=(i||c||Function("return this")()).Symbol;var s=Object.prototype,l=s.hasOwnProperty,d=s.toString,u=a?a.toStringTag:void 0;const p=function(e){var t=l.call(e,u),r=e[u];try{e[u]=void 0;var o=!0}catch(e){}var n=d.call(e);return o&&(t?e[u]=r:delete e[u]),n};var f=Object.prototype.toString;const b=function(e){return f.call(e)};var h=a?a.toStringTag:void 0;const k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?p(e):b(e)};const v=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var m=Function.prototype,y=Object.prototype,g=m.toString,_=y.hasOwnProperty,w=g.call(Object);const j=function(e){if(!n(e)||"[object Object]"!=k(e))return!1;var t=v(e);if(null===t)return!0;var r=_.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&g.call(r)==w};const x=function(e){return n(e)&&1===e.nodeType&&!j(e)};var O=r(273),E=r(492);class T extends e.EditorUI{constructor(e,r){super(e),this.view=r,this._toolbarConfig=(0,O.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer}get element(){return this.view.element}init(e){const t=this.editor,r=this.view,o=t.editing.view,n=r.editable,i=o.document.getRoot();n.name=i.rootName,r.render();const c=n.element;this.setEditableElement(n.name,c),r.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(c),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,r=t.document.getRoot(),o=e.sourceElement,n=e.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");n&&(0,E.enablePlaceholder)({view:t,element:r,text:n,isDirectHost:!1,keepOnFocus:!0})}}var S=r(62),C=r.n(S),P=r(655),F={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};C()(P.Z,F);P.Z.locals;class M extends O.BoxedEditorUIView{constructor(e,t,r={}){super(e),this.stickyPanel=new O.StickyPanelView(e),this.toolbar=new O.ToolbarView(e,{shouldGroupWhenFull:r.shouldToolbarGroupWhenFull}),this.editable=new O.InlineEditableUIView(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class R extends e.Editor{constructor(r,o={}){if(!x(r)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return x(e)?(0,t.getDataFromElement)(e):e}(r)),x(r)&&(this.sourceElement=r),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=new M(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n});this.ui=new T(this,i),(0,e.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((r=>{const o=new this(e,t);r(o.initPlugins().then((()=>o.ui.init(x(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}(0,t.mix)(R,e.DataApiMixin),(0,t.mix)(R,e.ElementApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=o})(); \ No newline at end of file + */(()=>{var e={655:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});var o=r(609),n=r.n(o)()((function(e){return e[1]}));n.push([e.id,".ck.ck-editor{position:relative}.ck.ck-editor .ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:var(--ck-z-modal)}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck.ck-editor__top .ck-sticky-panel .ck-toolbar{border-bottom-width:0}.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px;border-radius:0}.ck-rounded-corners .ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar,.ck.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners{border-radius:var(--ck-border-radius);border-radius:0}.ck.ck-editor__main>.ck-editor__editable{background:var(--ck-color-base-background);border-radius:0}.ck-rounded-corners .ck.ck-editor__main>.ck-editor__editable,.ck.ck-editor__main>.ck-editor__editable.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0;border-top-right-radius:0}.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){border-color:var(--ck-color-base-border)}",""]);const i=n},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var r=e(t);return t[2]?"@media ".concat(t[2]," {").concat(r,"}"):r})).join("")},t.i=function(e,r,o){"string"==typeof e&&(e=[[null,e,""]]);var n={};if(o)for(var i=0;i{"use strict";var o,n=function(){return void 0===o&&(o=Boolean(window&&document&&document.all&&!window.atob)),o},i=function(){var e={};return function(t){if(void 0===e[t]){var r=document.querySelector(t);if(window.HTMLIFrameElement&&r instanceof window.HTMLIFrameElement)try{r=r.contentDocument.head}catch(e){r=null}e[t]=r}return e[t]}}(),c=[];function a(e){for(var t=-1,r=0;r{e.exports=r(79)("./src/core.js")},492:(e,t,r)=>{e.exports=r(79)("./src/engine.js")},273:(e,t,r)=>{e.exports=r(79)("./src/ui.js")},209:(e,t,r)=>{e.exports=r(79)("./src/utils.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function r(o){var n=t[o];if(void 0!==n)return n.exports;var i=t[o]={id:o,exports:{}};return e[o](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 o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},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})},r.nc=void 0;var o={};(()=>{"use strict";r.r(o),r.d(o,{ClassicEditor:()=>R});var e=r(704),t=r(209);const n=function(e){return null!=e&&"object"==typeof e};const i="object"==typeof global&&global&&global.Object===Object&&global;var c="object"==typeof self&&self&&self.Object===Object&&self;const a=(i||c||Function("return this")()).Symbol;var s=Object.prototype,l=s.hasOwnProperty,d=s.toString,u=a?a.toStringTag:void 0;const p=function(e){var t=l.call(e,u),r=e[u];try{e[u]=void 0;var o=!0}catch(e){}var n=d.call(e);return o&&(t?e[u]=r:delete e[u]),n};var f=Object.prototype.toString;const b=function(e){return f.call(e)};var h=a?a.toStringTag:void 0;const k=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":h&&h in Object(e)?p(e):b(e)};const v=function(e,t){return function(r){return e(t(r))}}(Object.getPrototypeOf,Object);var m=Function.prototype,y=Object.prototype,g=m.toString,_=y.hasOwnProperty,w=g.call(Object);const j=function(e){if(!n(e)||"[object Object]"!=k(e))return!1;var t=v(e);if(null===t)return!0;var r=_.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&g.call(r)==w};const x=function(e){return n(e)&&1===e.nodeType&&!j(e)};var O=r(273),E=r(492);class T extends e.EditorUI{constructor(e,r){super(e),this.view=r,this._toolbarConfig=(0,O.normalizeToolbarConfig)(e.config.get("toolbar")),this._elementReplacer=new t.ElementReplacer}get element(){return this.view.element}init(e){const t=this.editor,r=this.view,o=t.editing.view,n=r.editable,i=o.document.getRoot();n.name=i.rootName,r.render();const c=n.element;this.setEditableElement(n.name,c),r.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(c),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const e=this.view,t=this.editor.editing.view;this._elementReplacer.restore(),t.detachDomRoot(e.editable.name),e.destroy()}_initToolbar(){const e=this.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),e.stickyPanel.limiterElement=e.element,e.stickyPanel.bind("viewportTopOffset").to(this,"viewportOffset",(({top:e})=>e)),e.toolbar.fillFromConfig(this._toolbarConfig,this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const e=this.editor,t=e.editing.view,r=t.document.getRoot(),o=e.sourceElement,n=e.config.get("placeholder")||o&&"textarea"===o.tagName.toLowerCase()&&o.getAttribute("placeholder");n&&(0,E.enablePlaceholder)({view:t,element:r,text:n,isDirectHost:!1,keepOnFocus:!0})}}var S=r(62),C=r.n(S),P=r(655),F={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};C()(P.Z,F);P.Z.locals;class M extends O.BoxedEditorUIView{constructor(e,t,r={}){super(e),this.stickyPanel=new O.StickyPanelView(e),this.toolbar=new O.ToolbarView(e,{shouldGroupWhenFull:r.shouldToolbarGroupWhenFull}),this.editable=new O.InlineEditableUIView(e,t)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class R extends e.Editor{constructor(r,o={}){if(!x(r)&&void 0!==o.initialData)throw new t.CKEditorError("editor-create-initial-data",null);super(o),void 0===this.config.get("initialData")&&this.config.set("initialData",function(e){return x(e)?(0,t.getDataFromElement)(e):e}(r)),x(r)&&(this.sourceElement=r),this.model.document.createRoot();const n=!this.config.get("toolbar.shouldNotGroupWhenFull"),i=new M(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:n});this.ui=new T(this,i),(0,e.attachToForm)(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,t={}){return new Promise((r=>{const o=new this(e,t);r(o.initPlugins().then((()=>o.ui.init(x(e)?e:null))).then((()=>o.data.init(o.config.get("initialData")))).then((()=>o.fire("ready"))).then((()=>o)))}))}}(0,t.mix)(R,e.DataApiMixin),(0,t.mix)(R,e.ElementApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorClassic=o})(); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js b/core/assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js index 480d112315..a082bec10c 100644 --- a/core/assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js +++ b/core/assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js @@ -1,4 +1,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var t={704:(t,e,o)=>{t.exports=o(79)("./src/core.js")},492:(t,e,o)=>{t.exports=o(79)("./src/engine.js")},273:(t,e,o)=>{t.exports=o(79)("./src/ui.js")},209:(t,e,o)=>{t.exports=o(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r),o.d(r,{DecoupledEditor:()=>F});var t=o(704),e=o(209);const i=function(t){return null!=t&&"object"==typeof t};const n="object"==typeof global&&global&&global.Object===Object&&global;var s="object"==typeof self&&self&&self.Object===Object&&self;const l=(n||s||Function("return this")()).Symbol;var a=Object.prototype,c=a.hasOwnProperty,d=a.toString,u=l?l.toStringTag:void 0;const h=function(t){var e=c.call(t,u),o=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=d.call(t);return r&&(e?t[u]=o:delete t[u]),i};var b=Object.prototype.toString;const p=function(t){return b.call(t)};var g=l?l.toStringTag:void 0;const f=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":g&&g in Object(t)?h(t):p(t)};const m=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object);var v=Function.prototype,y=Object.prototype,w=v.toString,E=y.hasOwnProperty,j=w.call(Object);const O=function(t){if(!i(t)||"[object Object]"!=f(t))return!1;var e=m(t);if(null===e)return!0;var o=E.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&w.call(o)==j};const x=function(t){return i(t)&&1===t.nodeType&&!O(t)};var T=o(492);class D extends t.EditorUI{constructor(t,e){super(t),this.view=e}init(){const t=this.editor,e=this.view,o=t.editing.view,r=e.editable,i=o.document.getRoot();e.editable.name=i.rootName,e.render();const n=r.element;this.setEditableElement(r.name,n),e.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(n),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy(),super.destroy()}_initToolbar(){const t=this.editor,e=this.view;e.toolbar.fillFromConfig(t.config.get("toolbar"),this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),r=t.sourceElement,i=t.config.get("placeholder")||r&&"textarea"===r.tagName.toLowerCase()&&r.getAttribute("placeholder");i&&(0,T.enablePlaceholder)({view:e,element:o,text:i,isDirectHost:!1,keepOnFocus:!0})}}var S=o(273);class P extends S.EditorUIView{constructor(t,e,o={}){super(t);const r=t.t;this.toolbar=new S.ToolbarView(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.editable=new S.InlineEditableUIView(t,e,o.editableElement,{label:t=>r("Rich Text Editor. Editing area: %0",t.name)}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.toolbar,this.editable])}}class F extends t.Editor{constructor(o,r={}){if(!x(o)&&void 0!==r.initialData)throw new e.CKEditorError("editor-create-initial-data",null);super(r),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return x(t)?(0,e.getDataFromElement)(t):t}(o)),x(o)&&(this.sourceElement=o,(0,t.secureSourceElement)(this)),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new P(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:i});this.ui=new D(this,n)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,o={}){return new Promise((r=>{if(x(t)&&"TEXTAREA"===t.tagName)throw new e.CKEditorError("editor-wrong-element",null);const i=new this(t,o);r(i.initPlugins().then((()=>i.ui.init())).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}(0,e.mix)(F,t.ElementApiMixin),(0,e.mix)(F,t.DataApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorDecoupled=r})(); \ No newline at end of file + */(()=>{var t={704:(t,e,o)=>{t.exports=o(79)("./src/core.js")},492:(t,e,o)=>{t.exports=o(79)("./src/engine.js")},273:(t,e,o)=>{t.exports=o(79)("./src/ui.js")},209:(t,e,o)=>{t.exports=o(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function o(r){var i=e[r];if(void 0!==i)return i.exports;var n=e[r]={exports:{}};return t[r](n,n.exports,o),n.exports}o.d=(t,e)=>{for(var r in e)o.o(e,r)&&!o.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},o.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};(()=>{"use strict";o.r(r),o.d(r,{DecoupledEditor:()=>F});var t=o(704),e=o(209);const i=function(t){return null!=t&&"object"==typeof t};const n="object"==typeof global&&global&&global.Object===Object&&global;var s="object"==typeof self&&self&&self.Object===Object&&self;const l=(n||s||Function("return this")()).Symbol;var a=Object.prototype,c=a.hasOwnProperty,d=a.toString,u=l?l.toStringTag:void 0;const h=function(t){var e=c.call(t,u),o=t[u];try{t[u]=void 0;var r=!0}catch(t){}var i=d.call(t);return r&&(e?t[u]=o:delete t[u]),i};var b=Object.prototype.toString;const p=function(t){return b.call(t)};var g=l?l.toStringTag:void 0;const f=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":g&&g in Object(t)?h(t):p(t)};const m=function(t,e){return function(o){return t(e(o))}}(Object.getPrototypeOf,Object);var v=Function.prototype,y=Object.prototype,w=v.toString,E=y.hasOwnProperty,j=w.call(Object);const O=function(t){if(!i(t)||"[object Object]"!=f(t))return!1;var e=m(t);if(null===e)return!0;var o=E.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&w.call(o)==j};const x=function(t){return i(t)&&1===t.nodeType&&!O(t)};var T=o(492);class D extends t.EditorUI{constructor(t,e){super(t),this.view=e}init(){const t=this.editor,e=this.view,o=t.editing.view,r=e.editable,i=o.document.getRoot();e.editable.name=i.rootName,e.render();const n=r.element;this.setEditableElement(r.name,n),e.editable.bind("isFocused").to(this.focusTracker),o.attachDomRoot(n),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){super.destroy();const t=this.view;this.editor.editing.view.detachDomRoot(t.editable.name),t.destroy()}_initToolbar(){const t=this.editor,e=this.view;e.toolbar.fillFromConfig(t.config.get("toolbar"),this.componentFactory),this.addToolbar(e.toolbar)}_initPlaceholder(){const t=this.editor,e=t.editing.view,o=e.document.getRoot(),r=t.sourceElement,i=t.config.get("placeholder")||r&&"textarea"===r.tagName.toLowerCase()&&r.getAttribute("placeholder");i&&(0,T.enablePlaceholder)({view:e,element:o,text:i,isDirectHost:!1,keepOnFocus:!0})}}var S=o(273);class P extends S.EditorUIView{constructor(t,e,o={}){super(t);const r=t.t;this.toolbar=new S.ToolbarView(t,{shouldGroupWhenFull:o.shouldToolbarGroupWhenFull}),this.editable=new S.InlineEditableUIView(t,e,o.editableElement,{label:t=>r("Rich Text Editor. Editing area: %0",t.name)}),this.toolbar.extendTemplate({attributes:{class:["ck-reset_all","ck-rounded-corners"],dir:t.uiLanguageDirection}})}render(){super.render(),this.registerChild([this.toolbar,this.editable])}}class F extends t.Editor{constructor(o,r={}){if(!x(o)&&void 0!==r.initialData)throw new e.CKEditorError("editor-create-initial-data",null);super(r),void 0===this.config.get("initialData")&&this.config.set("initialData",function(t){return x(t)?(0,e.getDataFromElement)(t):t}(o)),x(o)&&(this.sourceElement=o,(0,t.secureSourceElement)(this)),this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull"),n=new P(this.locale,this.editing.view,{editableElement:this.sourceElement,shouldToolbarGroupWhenFull:i});this.ui=new D(this,n)}destroy(){const t=this.getData();return this.ui.destroy(),super.destroy().then((()=>{this.sourceElement&&this.updateSourceElement(t)}))}static create(t,o={}){return new Promise((r=>{if(x(t)&&"TEXTAREA"===t.tagName)throw new e.CKEditorError("editor-wrong-element",null);const i=new this(t,o);r(i.initPlugins().then((()=>i.ui.init())).then((()=>i.data.init(i.config.get("initialData")))).then((()=>i.fire("ready"))).then((()=>i)))}))}}(0,e.mix)(F,t.ElementApiMixin),(0,e.mix)(F,t.DataApiMixin)})(),(window.CKEditor5=window.CKEditor5||{}).editorDecoupled=r})(); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/link/link.js b/core/assets/vendor/ckeditor5/link/link.js index 5a37be9844..ebbb521392 100644 --- a/core/assets/vendor/ckeditor5/link/link.js +++ b/core/assets/vendor/ckeditor5/link/link.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={23:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const r=o},952:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}",""]);const r=o},871:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}",""]);const r=o},269:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,'.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',""]);const r=o},764:(e,t,i)=>{"use strict";i.d(t,{Z:()=>r});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const r=o},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var r=0;r{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),s=[];function a(e){for(var t=-1,i=0;i{e.exports=i(79)("./src/clipboard.js")},704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},492:(e,t,i)=>{e.exports=i(79)("./src/engine.js")},181:(e,t,i)=>{e.exports=i(79)("./src/typing.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},995:(e,t,i)=>{e.exports=i(79)("./src/widget.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var r=t[n]={id:n,exports:{}};return e[n](r,r.exports,i),r.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{AutoLink:()=>De,Link:()=>je,LinkEditing:()=>he,LinkImage:()=>Fe,LinkImageEditing:()=>Be,LinkImageUI:()=>Oe,LinkUI:()=>Ve});var e=i(704),t=i(492),o=i(181),r=i(945),s=i(209);class a{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const n=i.writer,o=n.document.selection;for(const e of this._definitions){const r=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,r);for(const t in e.styles)n.setStyle(t,e.styles[t],r);n.setCustomProperty("link",!0,r),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(o.getFirstRange(),r):n.wrap(i.mapper.toViewRange(t.range),r):n.unwrap(i.mapper.toViewRange(t.range),r)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:i,mapper:n})=>{const o=n.toViewElement(t.item),r=Array.from(o.getChildren()).find((e=>"a"===e.name));for(const e of this._definitions){const n=(0,s.toMap)(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?i.addClass(t,r):i.setAttribute(e,t,r);e.classes&&i.addClass(e.classes,r);for(const t in e.styles)i.setStyle(t,e.styles[t],r)}else{for(const[e,t]of n)"class"===e?i.removeClass(t,r):i.removeAttribute(e,r);e.classes&&i.removeClass(e.classes,r);for(const t in e.styles)i.removeStyle(t,r)}}}))}}}const c=function(e,t,i){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(i=i>o?o:i)<0&&(i+=o),o=t>i?0:i-t>>>0,t>>>=0;for(var r=Array(o);++n=n?e:c(e,t,i)};var u=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const d=function(e){return u.test(e)};const k=function(e){return e.split("")};var h="[\\ud800-\\udfff]",f="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",m="\\ud83c[\\udffb-\\udfff]",g="[^\\ud800-\\udfff]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",w="(?:"+f+"|"+m+")"+"?",v="[\\ufe0e\\ufe0f]?",_=v+w+("(?:\\u200d(?:"+[g,b,p].join("|")+")"+v+w+")*"),y="(?:"+[g+f+"?",f,b,p,h].join("|")+")",A=RegExp(m+"(?="+m+")|"+y+_,"g");const x=function(e){return e.match(A)||[]};const I=function(e){return d(e)?x(e):k(e)};const S="object"==typeof global&&global&&global.Object===Object&&global;var T="object"==typeof self&&self&&self.Object===Object&&self;const E=(S||T||Function("return this")()).Symbol;const V=function(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++i{if(n.isCollapsed){const c=n.getFirstPosition();if(n.hasAttribute("linkHref")){const s=(0,o.findAttributeRange)(c,"linkHref",n.getAttribute("linkHref"),i);t.setAttribute("linkHref",e,s),r.forEach((e=>{t.setAttribute(e,!0,s)})),a.forEach((e=>{t.removeAttribute(e,s)})),t.setSelection(t.createPositionAfter(s.end.nodeBefore))}else if(""!==e){const o=(0,s.toMap)(n.getAttributes());o.set("linkHref",e),r.forEach((e=>{o.set(e,!0)}));const{end:a}=i.insertContent(t.createText(e,o),c);t.setSelection(a)}["linkHref",...r,...a].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const o=i.schema.getValidRanges(n.getRanges(),"linkHref"),s=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&s.push(t.createRangeOn(e));const c=s.slice();for(const e of o)this._isRangeToUpdate(e,s)&&c.push(e);for(const i of c)t.setAttribute("linkHref",e,i),r.forEach((e=>{t.setAttribute(e,!0,i)})),a.forEach((e=>{t.removeAttribute(e,i)}))}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,n=i.getSelectedElement();return ee(n,t.schema)?n.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}}class re extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();ee(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change((e=>{const r=i.isCollapsed?[(0,o.findAttributeRange)(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of r)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)}))}}class se{constructor({id:e,label:t,attributes:i,classes:n,styles:o,defaultValue:r}){this.id=e,this.set("value"),this.defaultValue=r,this.label=t,this.attributes=i,this.classes=n,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}(0,s.mix)(se,s.ObservableMixin);var ae=i(62),ce=i.n(ae),le=i(23),ue={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(le.Z,ue);le.Z.locals;const de="automatic",ke=/^(https?:)?\/\//;class he extends e.Plugin{static get pluginName(){return"LinkEditing"}static get requires(){return[o.TwoStepCaretMovement,o.Input,r.ClipboardPipeline]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:J}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>J(X(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new oe(e)),e.commands.add("unlink",new re(e));const t=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>(e.label&&i[e.label]&&(e.label=i[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${K(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===de))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode)));e.plugins.get(o.TwoStepCaretMovement).registerAttribute("linkHref"),(0,o.inlineHighlight)(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:de,callback:e=>ke.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),e=new se(e),i.add(e),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:i,schema:n},{item:o})=>{if((o.is("selection")||n.isInline(o))&&t){const t=i.createAttributeElement("a",e.attributes,{priority:5});e.classes&&i.addClass(e.classes,t);for(const n in e.styles)i.setStyle(n,e.styles[n],t);return i.setCustomProperty("link",!0,t),t}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...e._createPattern()},model:{key:e.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document,i=e.model.document;this.listenTo(t,"click",((e,t)=>{if(!(s.env.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const n=i.getAttribute("href");n&&(e.stop(),t.preventDefault(),ne(n))}),{context:"$capture"}),this.listenTo(t,"enter",((e,t)=>{const n=i.selection,o=n.getSelectedElement(),r=o?o.getAttribute("linkHref"):n.getAttribute("linkHref");r&&t.domEvent.altKey&&(e.stop(),ne(r))}),{context:"a"})}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",(()=>{const i=t.anchor.nodeBefore,n=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&i&&i.hasAttribute("linkHref")&&(n&&n.hasAttribute("linkHref")||e.change((t=>{fe(t,ge(e.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,i=e.model;e.editing.view.addObserver(t.MouseObserver);let n=!1;this.listenTo(e.editing.view.document,"mousedown",(()=>{n=!0})),this.listenTo(e.editing.view.document,"selectionChange",(()=>{if(!n)return;n=!1;const e=i.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const t=e.getFirstPosition(),r=(0,o.findAttributeRange)(t,"linkHref",e.getAttribute("linkHref"),i);(t.isTouching(r.start)||t.isTouching(r.end))&&i.change((e=>{fe(e,ge(i.schema))}))}))}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let i,n;this.listenTo(t.document,"delete",(()=>{n=!0}),{priority:"high"}),this.listenTo(e.model,"deleteContent",(()=>{const t=e.model.document.selection;t.isCollapsed||(n?n=!1:me(e)&&function(e){const t=e.document.selection,i=t.getFirstPosition(),n=t.getLastPosition(),r=i.nodeAfter;if(!r)return!1;if(!r.is("$text"))return!1;if(!r.hasAttribute("linkHref"))return!1;const s=n.textNode||n.nodeBefore;if(r===s)return!0;return(0,o.findAttributeRange)(i,"linkHref",r.getAttribute("linkHref"),e).containsRange(e.createRange(i,n),!0)}(e.model)&&(i=t.getAttributes()))}),{priority:"high"}),this.listenTo(e.model,"insertContent",((t,[o])=>{n=!1,me(e)&&i&&(e.model.change((e=>{for(const[t,n]of i)e.setAttribute(t,n,o)})),i=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view;let r=!1,a=!1;this.listenTo(n.document,"delete",((e,t)=>{a=t.domEvent.keyCode===s.keyCodes.backspace}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{r=!1;const e=i.getFirstPosition(),n=i.getAttribute("linkHref");if(!n)return;const s=(0,o.findAttributeRange)(e,"linkHref",n,t);r=s.containsPosition(e)||s.end.isEqual(e)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{a&&(a=!1,r||e.model.enqueueChange((e=>{fe(e,ge(t.schema))})))}),{priority:"low"})}}function fe(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i)}function me(e){return e.model.change((e=>e.batch)).isTyping}function ge(e){return e.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))}var be=i(273),pe=i(995),we=i(764),ve={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(we.Z,ve);we.Z.locals;var _e=i(871),ye={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(_e.Z,ye);_e.Z.locals;class Ae extends be.View{constructor(t,i){super(t);const n=t.t;this.focusTracker=new s.FocusTracker,this.keystrokes=new s.KeystrokeHandler,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),e.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),e.icons.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(i),this.children=this._createFormChildren(i.manualDecorators),this._focusables=new be.ViewCollection,this._focusCycler=new be.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];i.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children}),(0,be.injectCssTransitionDisabler)(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),(0,be.submitHandler)({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new be.LabeledFieldView(this.locale,be.createLabeledInputText);return t.label=e("Link URL"),t}_createButton(e,t,i,n){const o=new be.ButtonView(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new be.SwitchButtonView(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",((e,t)=>void 0===t&&void 0===e?i.defaultValue:e)),n.on("execute",(()=>{i.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new be.View;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var xe=i(952),Ie={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(xe.Z,Ie);xe.Z.locals;class Se extends be.View{constructor(t){super(t);const i=t.t;this.focusTracker=new s.FocusTracker,this.keystrokes=new s.KeystrokeHandler,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(i("Unlink"),'',"unlink"),this.editButtonView=this._createButton(i("Edit link"),e.icons.pencil,"edit"),this.set("href"),this._focusables=new be.ViewCollection,this._focusCycler=new be.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const n=new be.ButtonView(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new be.ButtonView(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&X(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||i("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const Te='',Ee="link-ui";class Ve extends e.Plugin{static get requires(){return[be.ContextualBalloon]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(t.ClickObserver),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(be.ContextualBalloon),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:Ee,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Ee,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new Se(e.locale),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(G,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),n=new Ae(e.locale,t);return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",(()=>{const{value:t}=n.urlInputView.fieldView.element,o=te(t,i);e.execute("link",o,n.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(n,"cancel",(()=>{this._closeFormView()})),n.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.keystrokes.set(G,((e,i)=>{i(),t.isEnabled&&this._showUI(!0)})),e.ui.componentFactory.add("link",(e=>{const n=new be.ButtonView(e);return n.isEnabled=!0,n.label=i("Link"),n.icon=Te,n.keystroke=G,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),(0,be.clickOutsideHandler)({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=r();const o=()=>{const e=this._getSelectedLinkElement(),t=r();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function r(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let n=null;if(t.markers.has(Ee)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(Ee)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(i)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&(0,pe.isWidget)(i))return Le(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=Le(i.start),o=Le(i.end);return n&&n==o&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(Ee))t.updateMarker(Ee,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(Ee,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(Ee,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Ee)&&e.change((e=>{e.removeMarker(Ee)}))}}function Le(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))}const Ce=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class De extends e.Plugin{static get requires(){return[o.Delete]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new o.TextWatcher(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Me(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,i)=>{const{batch:n,range:o,url:r}=i;if(!n.isTyping)return;const s=o.end.getShiftedBy(-1),a=s.getShiftedBy(-r.length),c=e.model.createRange(a,s);this._applyAutoLink(r,c)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(i)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:n}=(0,o.getLastTextLine)(e,t),r=Me(i);if(r){const e=t.createRange(n.end.getShiftedBy(-r.length),n.end);this._applyAutoLink(r,e)}}_applyAutoLink(e,t){const i=this.editor.model,n=te(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&ie(n)&&!function(e){const t=e.start.nodeAfter;return t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const i=this.editor.model,n=this.editor.plugins.get("Delete");i.enqueueChange((o=>{o.setAttribute("linkHref",e,t),i.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function Me(e){const t=Ce.exec(e);return t?t[2]:null}class je extends e.Plugin{static get requires(){return[he,Ve,De]}static get pluginName(){return"Link"}}class Be extends e.Plugin{static get requires(){return["ImageEditing","ImageUtils",he]}static get pluginName(){return"LinkImageEditing"}init(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,n,o)=>{const r=n.viewItem,s=i.findViewImgElement(r);if(!s)return;const a=s.findAncestor((e=>i.isBlockImageView(e)));if(t&&!a)return;const c={attributes:["href"]};if(!o.consumable.consume(r,c))return;const l=r.getAttribute("href");if(!l)return;let u=n.modelCursor.parent;if(!u.is("element","imageBlock")){const e=o.convertItem(s,n.modelCursor);n.modelRange=e.modelRange,n.modelCursor=e.modelCursor,u=n.modelCursor.nodeBefore}u&&u.is("element","imageBlock")&&o.writer.setAttribute("linkHref",l,u)}),{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",((e,i,n)=>{if(!n.consumable.consume(i.item,e.name))return;const o=n.mapper.toViewElement(i.item),r=n.writer,s=Array.from(o.getChildren()).find((e=>"a"===e.name)),a=t.findViewImgElement(o),c=a.parent.is("element","picture")?a.parent:a;if(s)i.attributeNewValue?r.setAttribute("href",i.attributeNewValue,s):(r.move(r.createRangeOn(c),r.createPositionAt(o,0)),r.remove(s));else{const e=r.createContainerElement("a",{href:i.attributeNewValue});r.insert(r.createPositionAt(o,0),e),r.move(r.createRangeOn(c),r.createPositionAt(e,0))}}),{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(Ne(i)),e.conversion.for("upcast").add(He(e,i))}}function Ne(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,((t,i,n)=>{const o=n.mapper.toViewElement(i.item),r=Array.from(o.getChildren()).find((e=>"a"===e.name));if(r){for(const[t,i]of(0,s.toMap)(e.attributes))n.writer.setAttribute(t,i,r);e.classes&&n.writer.addClass(e.classes,r);for(const t in e.styles)n.writer.setStyle(t,e.styles[t],r)}}))}}function He(e,i){const n=e.plugins.has("ImageInlineEditing"),o=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,r,s)=>{const a=r.viewItem,c=o.findViewImgElement(a);if(!c)return;const l=c.findAncestor((e=>o.isBlockImageView(e)));if(n&&!l)return;const u=new t.Matcher(i._createPattern()).match(a);if(!u)return;if(!s.consumable.consume(a,u.match))return;const d=r.modelCursor.nodeBefore||r.modelCursor.parent;s.writer.setAttribute(i.id,!0,d)}),{priority:"high"})}}class Oe extends e.Plugin{static get requires(){return[he,Ve,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((t,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),t.stop())}),{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",(i=>{const n=new be.ButtonView(i),o=e.plugins.get("LinkUI"),r=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:Te,keystroke:G,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(r,"isEnabled"),n.bind("isOn").to(r,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?o._addActionsView():o._showUI(!0)})),n}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}var Ue=i(269),Pe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(Ue.Z,Pe);Ue.Z.locals;class Fe extends e.Plugin{static get requires(){return[Be,Oe]}static get pluginName(){return"LinkImage"}}})(),(window.CKEditor5=window.CKEditor5||{}).link=n})(); \ No newline at end of file + */(()=>{var e={23:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}.ck .ck-link_selected span.image-inline{outline:var(--ck-widget-outline-thickness) solid var(--ck-color-link-selected-background)}.ck .ck-fake-link-selection{background:var(--ck-color-link-fake-selection)}.ck .ck-fake-link-selection_collapsed{border-right:1px solid var(--ck-color-base-text);height:100%;margin-right:-1px;outline:1px solid hsla(0,0%,100%,.5)}",""]);const s=o},952:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".ck.ck-link-actions{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-link-actions .ck-link-actions__preview{display:inline-block}.ck.ck-link-actions .ck-link-actions__preview .ck-button__label{overflow:hidden}@media screen and (max-width:600px){.ck.ck-link-actions{flex-wrap:wrap}.ck.ck-link-actions .ck-link-actions__preview{flex-basis:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){flex-basis:50%}}.ck.ck-link-actions .ck-button.ck-link-actions__preview{padding-left:0;padding-right:0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{color:var(--ck-color-link-default);cursor:pointer;max-width:var(--ck-input-width);min-width:3em;padding:0 var(--ck-spacing-medium);text-align:center;text-overflow:ellipsis}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions .ck-button.ck-link-actions__preview,.ck.ck-link-actions .ck-button.ck-link-actions__preview:active,.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus,.ck.ck-link-actions .ck-button.ck-link-actions__preview:hover{background:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:active{box-shadow:none}.ck.ck-link-actions .ck-button.ck-link-actions__preview:focus .ck-button__label{text-decoration:underline}[dir=ltr] .ck.ck-link-actions .ck-button:not(:first-child),[dir=rtl] .ck.ck-link-actions .ck-button:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-actions .ck-button.ck-link-actions__preview{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{max-width:100%;min-width:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview),[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}}",""]);const s=o},871:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,".ck.ck-link-form{display:flex}.ck.ck-link-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-link-form{flex-wrap:wrap}.ck.ck-link-form .ck-labeled-field-view{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form_layout-vertical .ck-button.ck-button-cancel,.ck.ck-link-form_layout-vertical .ck-button.ck-button-save{margin-top:var(--ck-spacing-medium)}.ck.ck-link-form_layout-vertical{min-width:var(--ck-input-width);padding:0}.ck.ck-link-form_layout-vertical .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical>.ck-button{border-radius:0;margin:0;padding:var(--ck-spacing-standard);width:50%}.ck.ck-link-form_layout-vertical>.ck-button:not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form_layout-vertical>.ck-button,[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form_layout-vertical>.ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}.ck.ck-link-form_layout-vertical .ck.ck-list{margin:var(--ck-spacing-standard) var(--ck-spacing-large)}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{padding:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}",""]);const s=o},269:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,'.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{display:block;position:absolute}:root{--ck-link-image-indicator-icon-size:20;--ck-link-image-indicator-icon-is-visible:clamp(0px,100% - 50px,1px)}.ck.ck-editor__editable a span.image-inline:after,.ck.ck-editor__editable figure.image>a:after{background-color:rgba(0,0,0,.4);background-image:url("data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+");background-position:50%;background-repeat:no-repeat;background-size:14px;border-radius:100%;content:"";height:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size));overflow:hidden;right:min(var(--ck-spacing-medium),6%);top:min(var(--ck-spacing-medium),6%);width:calc(var(--ck-link-image-indicator-icon-is-visible)*var(--ck-link-image-indicator-icon-size))}',""]);const s=o},764:(e,t,i)=>{"use strict";i.d(t,{Z:()=>s});var n=i(609),o=i.n(n)()((function(e){return e[1]}));o.push([e.id,'.ck-vertical-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck-vertical-form .ck-button:focus:after{display:none}@media screen and (max-width:600px){.ck.ck-responsive-form .ck-button:after{bottom:-1px;content:"";position:absolute;right:-1px;top:-1px;width:0;z-index:1}.ck.ck-responsive-form .ck-button:focus:after{display:none}}.ck-vertical-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form{padding:var(--ck-spacing-large)}.ck.ck-responsive-form:focus{outline:none}[dir=ltr] .ck.ck-responsive-form>:not(:first-child),[dir=rtl] .ck.ck-responsive-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-responsive-form{padding:0;width:calc(var(--ck-input-width)*.8)}.ck.ck-responsive-form .ck-labeled-field-view{margin:var(--ck-spacing-large) var(--ck-spacing-large) 0}.ck.ck-responsive-form .ck-labeled-field-view .ck-input-text{min-width:0;width:100%}.ck.ck-responsive-form .ck-labeled-field-view .ck-labeled-field-view__error{white-space:normal}.ck.ck-responsive-form>.ck-button:nth-last-child(2):after{border-right:1px solid var(--ck-color-base-border)}.ck.ck-responsive-form>.ck-button:last-child,.ck.ck-responsive-form>.ck-button:nth-last-child(2){border-radius:0;margin-top:var(--ck-spacing-large);padding:var(--ck-spacing-standard)}.ck.ck-responsive-form>.ck-button:last-child:not(:focus),.ck.ck-responsive-form>.ck-button:nth-last-child(2):not(:focus){border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-responsive-form>.ck-button:last-child,[dir=ltr] .ck.ck-responsive-form>.ck-button:nth-last-child(2),[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2){margin-left:0}[dir=rtl] .ck.ck-responsive-form>.ck-button:last-child:last-of-type,[dir=rtl] .ck.ck-responsive-form>.ck-button:nth-last-child(2):last-of-type{border-right:1px solid var(--ck-color-base-border)}}',""]);const s=o},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i=e(t);return t[2]?"@media ".concat(t[2]," {").concat(i,"}"):i})).join("")},t.i=function(e,i,n){"string"==typeof e&&(e=[[null,e,""]]);var o={};if(n)for(var s=0;s{"use strict";var n,o=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},s=function(){var e={};return function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}e[t]=i}return e[t]}}(),r=[];function a(e){for(var t=-1,i=0;i{e.exports=i(79)("./src/clipboard.js")},704:(e,t,i)=>{e.exports=i(79)("./src/core.js")},492:(e,t,i)=>{e.exports=i(79)("./src/engine.js")},181:(e,t,i)=>{e.exports=i(79)("./src/typing.js")},273:(e,t,i)=>{e.exports=i(79)("./src/ui.js")},209:(e,t,i)=>{e.exports=i(79)("./src/utils.js")},995:(e,t,i)=>{e.exports=i(79)("./src/widget.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function i(n){var o=t[n];if(void 0!==o)return o.exports;var s=t[n]={id:n,exports:{}};return e[n](s,s.exports,i),s.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{AutoLink:()=>De,Link:()=>je,LinkEditing:()=>he,LinkImage:()=>Fe,LinkImageEditing:()=>Be,LinkImageUI:()=>He,LinkUI:()=>Ee});var e=i(704),t=i(492),o=i(181),s=i(945),r=i(209);class a{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(e){Array.isArray(e)?e.forEach((e=>this._definitions.add(e))):this._definitions.add(e)}getDispatcher(){return e=>{e.on("attribute:linkHref",((e,t,i)=>{if(!i.consumable.test(t.item,"attribute:linkHref"))return;if(!t.item.is("selection")&&!i.schema.isInline(t.item))return;const n=i.writer,o=n.document.selection;for(const e of this._definitions){const s=n.createAttributeElement("a",e.attributes,{priority:5});e.classes&&n.addClass(e.classes,s);for(const t in e.styles)n.setStyle(t,e.styles[t],s);n.setCustomProperty("link",!0,s),e.callback(t.attributeNewValue)?t.item.is("selection")?n.wrap(o.getFirstRange(),s):n.wrap(i.mapper.toViewRange(t.range),s):n.unwrap(i.mapper.toViewRange(t.range),s)}}),{priority:"high"})}}getDispatcherForLinkedImage(){return e=>{e.on("attribute:linkHref:imageBlock",((e,t,{writer:i,mapper:n})=>{const o=n.toViewElement(t.item),s=Array.from(o.getChildren()).find((e=>"a"===e.name));for(const e of this._definitions){const n=(0,r.toMap)(e.attributes);if(e.callback(t.attributeNewValue)){for(const[e,t]of n)"class"===e?i.addClass(t,s):i.setAttribute(e,t,s);e.classes&&i.addClass(e.classes,s);for(const t in e.styles)i.setStyle(t,e.styles[t],s)}else{for(const[e,t]of n)"class"===e?i.removeClass(t,s):i.removeAttribute(e,s);e.classes&&i.removeClass(e.classes,s);for(const t in e.styles)i.removeStyle(t,s)}}}))}}}const c=function(e,t,i){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),(i=i>o?o:i)<0&&(i+=o),o=t>i?0:i-t>>>0,t>>>=0;for(var s=Array(o);++n=n?e:c(e,t,i)};var u=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");const d=function(e){return u.test(e)};const k=function(e){return e.split("")};var h="[\\ud800-\\udfff]",f="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",m="\\ud83c[\\udffb-\\udfff]",g="[^\\ud800-\\udfff]",b="(?:\\ud83c[\\udde6-\\uddff]){2}",p="[\\ud800-\\udbff][\\udc00-\\udfff]",w="(?:"+f+"|"+m+")"+"?",v="[\\ufe0e\\ufe0f]?",_=v+w+("(?:\\u200d(?:"+[g,b,p].join("|")+")"+v+w+")*"),y="(?:"+[g+f+"?",f,b,p,h].join("|")+")",A=RegExp(m+"(?="+m+")|"+y+_,"g");const x=function(e){return e.match(A)||[]};const I=function(e){return d(e)?x(e):k(e)};const S="object"==typeof global&&global&&global.Object===Object&&global;var T="object"==typeof self&&self&&self.Object===Object&&self;const V=(S||T||Function("return this")()).Symbol;const E=function(e,t){for(var i=-1,n=null==e?0:e.length,o=Array(n);++i{if(n.isCollapsed){const c=n.getFirstPosition();if(n.hasAttribute("linkHref")){const r=(0,o.findAttributeRange)(c,"linkHref",n.getAttribute("linkHref"),i);t.setAttribute("linkHref",e,r),s.forEach((e=>{t.setAttribute(e,!0,r)})),a.forEach((e=>{t.removeAttribute(e,r)})),t.setSelection(t.createPositionAfter(r.end.nodeBefore))}else if(""!==e){const o=(0,r.toMap)(n.getAttributes());o.set("linkHref",e),s.forEach((e=>{o.set(e,!0)}));const{end:a}=i.insertContent(t.createText(e,o),c);t.setSelection(a)}["linkHref",...s,...a].forEach((e=>{t.removeSelectionAttribute(e)}))}else{const o=i.schema.getValidRanges(n.getRanges(),"linkHref"),r=[];for(const e of n.getSelectedBlocks())i.schema.checkAttribute(e,"linkHref")&&r.push(t.createRangeOn(e));const c=r.slice();for(const e of o)this._isRangeToUpdate(e,r)&&c.push(e);for(const i of c)t.setAttribute("linkHref",e,i),s.forEach((e=>{t.setAttribute(e,!0,i)})),a.forEach((e=>{t.removeAttribute(e,i)}))}}))}_getDecoratorStateFromModel(e){const t=this.editor.model,i=t.document.selection,n=i.getSelectedElement();return ee(n,t.schema)?n.getAttribute(e):i.getAttribute(e)}_isRangeToUpdate(e,t){for(const i of t)if(i.containsRange(e))return!1;return!0}}class se extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,i=t.getSelectedElement();ee(i,e.schema)?this.isEnabled=e.schema.checkAttribute(i,"linkHref"):this.isEnabled=e.schema.checkAttributeInSelection(t,"linkHref")}execute(){const e=this.editor,t=this.editor.model,i=t.document.selection,n=e.commands.get("link");t.change((e=>{const s=i.isCollapsed?[(0,o.findAttributeRange)(i.getFirstPosition(),"linkHref",i.getAttribute("linkHref"),t)]:t.schema.getValidRanges(i.getRanges(),"linkHref");for(const t of s)if(e.removeAttribute("linkHref",t),n)for(const i of n.manualDecorators)e.removeAttribute(i.id,t)}))}}class re{constructor({id:e,label:t,attributes:i,classes:n,styles:o,defaultValue:s}){this.id=e,this.set("value"),this.defaultValue=s,this.label=t,this.attributes=i,this.classes=n,this.styles=o}_createPattern(){return{attributes:this.attributes,classes:this.classes,styles:this.styles}}}(0,r.mix)(re,r.ObservableMixin);var ae=i(62),ce=i.n(ae),le=i(23),ue={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(le.Z,ue);le.Z.locals;const de="automatic",ke=/^(https?:)?\/\//;class he extends e.Plugin{static get pluginName(){return"LinkEditing"}static get requires(){return[o.TwoStepCaretMovement,o.Input,s.ClipboardPipeline]}constructor(e){super(e),e.config.define("link",{addTargetToExternalLinks:!1})}init(){const e=this.editor;e.model.schema.extend("$text",{allowAttributes:"linkHref"}),e.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:J}),e.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(e,t)=>J(X(e),t)}),e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:!0}},model:{key:"linkHref",value:e=>e.getAttribute("href")}}),e.commands.add("link",new oe(e)),e.commands.add("unlink",new se(e));const t=function(e,t){const i={"Open in a new tab":e("Open in a new tab"),Downloadable:e("Downloadable")};return t.forEach((e=>(e.label&&i[e.label]&&(e.label=i[e.label]),e))),t}(e.t,function(e){const t=[];if(e)for(const[i,n]of Object.entries(e)){const e=Object.assign({},n,{id:`link${K(i)}`});t.push(e)}return t}(e.config.get("link.decorators")));this._enableAutomaticDecorators(t.filter((e=>e.mode===de))),this._enableManualDecorators(t.filter((e=>"manual"===e.mode)));e.plugins.get(o.TwoStepCaretMovement).registerAttribute("linkHref"),(0,o.inlineHighlight)(e,"linkHref","a","ck-link_selected"),this._enableLinkOpen(),this._enableInsertContentSelectionAttributesFixer(),this._enableClickingAfterLink(),this._enableTypingOverLink(),this._handleDeleteContentAfterLink()}_enableAutomaticDecorators(e){const t=this.editor,i=t.commands.get("link").automaticDecorators;t.config.get("link.addTargetToExternalLinks")&&i.add({id:"linkIsExternal",mode:de,callback:e=>ke.test(e),attributes:{target:"_blank",rel:"noopener noreferrer"}}),i.add(e),i.length&&t.conversion.for("downcast").add(i.getDispatcher())}_enableManualDecorators(e){if(!e.length)return;const t=this.editor,i=t.commands.get("link").manualDecorators;e.forEach((e=>{t.model.schema.extend("$text",{allowAttributes:e.id}),e=new re(e),i.add(e),t.conversion.for("downcast").attributeToElement({model:e.id,view:(t,{writer:i,schema:n},{item:o})=>{if((o.is("selection")||n.isInline(o))&&t){const t=i.createAttributeElement("a",e.attributes,{priority:5});e.classes&&i.addClass(e.classes,t);for(const n in e.styles)i.setStyle(n,e.styles[n],t);return i.setCustomProperty("link",!0,t),t}}}),t.conversion.for("upcast").elementToAttribute({view:{name:"a",...e._createPattern()},model:{key:e.id}})}))}_enableLinkOpen(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((e,t)=>{if(!(r.env.isMac?t.domEvent.metaKey:t.domEvent.ctrlKey))return;let i=t.domTarget;if("a"!=i.tagName.toLowerCase()&&(i=i.closest("a")),!i)return;const n=i.getAttribute("href");n&&(e.stop(),t.preventDefault(),ne(n))}),{context:"$capture"}),this.listenTo(t,"keydown",((t,i)=>{const n=e.commands.get("link").value;n&&i.keyCode===r.keyCodes.enter&&i.altKey&&(t.stop(),ne(n))}))}_enableInsertContentSelectionAttributesFixer(){const e=this.editor.model,t=e.document.selection;this.listenTo(e,"insertContent",(()=>{const i=t.anchor.nodeBefore,n=t.anchor.nodeAfter;t.hasAttribute("linkHref")&&i&&i.hasAttribute("linkHref")&&(n&&n.hasAttribute("linkHref")||e.change((t=>{fe(t,ge(e.schema))})))}),{priority:"low"})}_enableClickingAfterLink(){const e=this.editor,i=e.model;e.editing.view.addObserver(t.MouseObserver);let n=!1;this.listenTo(e.editing.view.document,"mousedown",(()=>{n=!0})),this.listenTo(e.editing.view.document,"selectionChange",(()=>{if(!n)return;n=!1;const e=i.document.selection;if(!e.isCollapsed)return;if(!e.hasAttribute("linkHref"))return;const t=e.getFirstPosition(),s=(0,o.findAttributeRange)(t,"linkHref",e.getAttribute("linkHref"),i);(t.isTouching(s.start)||t.isTouching(s.end))&&i.change((e=>{fe(e,ge(i.schema))}))}))}_enableTypingOverLink(){const e=this.editor,t=e.editing.view;let i,n;this.listenTo(t.document,"delete",(()=>{n=!0}),{priority:"high"}),this.listenTo(e.model,"deleteContent",(()=>{const t=e.model.document.selection;t.isCollapsed||(n?n=!1:me(e)&&function(e){const t=e.document.selection,i=t.getFirstPosition(),n=t.getLastPosition(),s=i.nodeAfter;if(!s)return!1;if(!s.is("$text"))return!1;if(!s.hasAttribute("linkHref"))return!1;const r=n.textNode||n.nodeBefore;if(s===r)return!0;return(0,o.findAttributeRange)(i,"linkHref",s.getAttribute("linkHref"),e).containsRange(e.createRange(i,n),!0)}(e.model)&&(i=t.getAttributes()))}),{priority:"high"}),this.listenTo(e.model,"insertContent",((t,[o])=>{n=!1,me(e)&&i&&(e.model.change((e=>{for(const[t,n]of i)e.setAttribute(t,n,o)})),i=null)}),{priority:"high"})}_handleDeleteContentAfterLink(){const e=this.editor,t=e.model,i=t.document.selection,n=e.editing.view;let s=!1,r=!1;this.listenTo(n.document,"delete",((e,t)=>{r="backward"===t.direction}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{s=!1;const e=i.getFirstPosition(),n=i.getAttribute("linkHref");if(!n)return;const r=(0,o.findAttributeRange)(e,"linkHref",n,t);s=r.containsPosition(e)||r.end.isEqual(e)}),{priority:"high"}),this.listenTo(t,"deleteContent",(()=>{r&&(r=!1,s||e.model.enqueueChange((e=>{fe(e,ge(t.schema))})))}),{priority:"low"})}}function fe(e,t){e.removeSelectionAttribute("linkHref");for(const i of t)e.removeSelectionAttribute(i)}function me(e){return e.model.change((e=>e.batch)).isTyping}function ge(e){return e.getDefinition("$text").allowAttributes.filter((e=>e.startsWith("link")))}var be=i(273),pe=i(995),we=i(764),ve={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(we.Z,ve);we.Z.locals;var _e=i(871),ye={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(_e.Z,ye);_e.Z.locals;class Ae extends be.View{constructor(t,i){super(t);const n=t.t;this.focusTracker=new r.FocusTracker,this.keystrokes=new r.KeystrokeHandler,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(n("Save"),e.icons.check,"ck-button-save"),this.saveButtonView.type="submit",this.cancelButtonView=this._createButton(n("Cancel"),e.icons.cancel,"ck-button-cancel","cancel"),this._manualDecoratorSwitches=this._createManualDecoratorSwitches(i),this.children=this._createFormChildren(i.manualDecorators),this._focusables=new be.ViewCollection,this._focusCycler=new be.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const o=["ck","ck-link-form","ck-responsive-form"];i.manualDecorators.length&&o.push("ck-link-form_layout-vertical","ck-vertical-form"),this.setTemplate({tag:"form",attributes:{class:o,tabindex:"-1"},children:this.children}),(0,be.injectCssTransitionDisabler)(this)}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce(((e,t)=>(e[t.name]=t.isOn,e)),{})}render(){super.render(),(0,be.submitHandler)({view:this});[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new be.LabeledFieldView(this.locale,be.createLabeledInputText);return t.label=e("Link URL"),t}_createButton(e,t,i,n){const o=new be.ButtonView(this.locale);return o.set({label:e,icon:t,tooltip:!0}),o.extendTemplate({attributes:{class:i}}),n&&o.delegate("execute").to(this,n),o}_createManualDecoratorSwitches(e){const t=this.createCollection();for(const i of e.manualDecorators){const n=new be.SwitchButtonView(this.locale);n.set({name:i.id,label:i.label,withText:!0}),n.bind("isOn").toMany([i,e],"value",((e,t)=>void 0===t&&void 0===e?i.defaultValue:e)),n.on("execute",(()=>{i.set("value",!n.isOn)})),t.add(n)}return t}_createFormChildren(e){const t=this.createCollection();if(t.add(this.urlInputView),e.length){const e=new be.View;e.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map((e=>({tag:"li",children:[e],attributes:{class:["ck","ck-list__item"]}}))),attributes:{class:["ck","ck-reset","ck-list"]}}),t.add(e)}return t.add(this.saveButtonView),t.add(this.cancelButtonView),t}}var xe=i(952),Ie={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(xe.Z,Ie);xe.Z.locals;class Se extends be.View{constructor(t){super(t);const i=t.t;this.focusTracker=new r.FocusTracker,this.keystrokes=new r.KeystrokeHandler,this.previewButtonView=this._createPreviewButton(),this.unlinkButtonView=this._createButton(i("Unlink"),'',"unlink"),this.editButtonView=this._createButton(i("Edit link"),e.icons.pencil,"edit"),this.set("href"),this._focusables=new be.ViewCollection,this._focusCycler=new be.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions","ck-responsive-form"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();[this.previewButtonView,this.editButtonView,this.unlinkButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createButton(e,t,i){const n=new be.ButtonView(this.locale);return n.set({label:e,icon:t,tooltip:!0}),n.delegate("execute").to(this,i),n}_createPreviewButton(){const e=new be.ButtonView(this.locale),t=this.bindTemplate,i=this.t;return e.set({withText:!0,tooltip:i("Open link in new tab")}),e.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:t.to("href",(e=>e&&X(e))),target:"_blank",rel:"noopener noreferrer"}}),e.bind("label").to(this,"href",(e=>e||i("This link has no URL"))),e.bind("isEnabled").to(this,"href",(e=>!!e)),e.template.tag="a",e.template.eventListeners={},e}}const Te='',Ve="link-ui";class Ee extends e.Plugin{static get requires(){return[be.ContextualBalloon]}static get pluginName(){return"LinkUI"}init(){const e=this.editor;e.editing.view.addObserver(t.ClickObserver),this.actionsView=this._createActionsView(),this.formView=this._createFormView(),this._balloon=e.plugins.get(be.ContextualBalloon),this._createToolbarLinkButton(),this._enableUserBalloonInteractions(),e.conversion.for("editingDowncast").markerToHighlight({model:Ve,view:{classes:["ck-fake-link-selection"]}}),e.conversion.for("editingDowncast").markerToElement({model:Ve,view:{name:"span",classes:["ck-fake-link-selection","ck-fake-link-selection_collapsed"]}})}destroy(){super.destroy(),this.formView.destroy()}_createActionsView(){const e=this.editor,t=new Se(e.locale),i=e.commands.get("link"),n=e.commands.get("unlink");return t.bind("href").to(i,"value"),t.editButtonView.bind("isEnabled").to(i),t.unlinkButtonView.bind("isEnabled").to(n),this.listenTo(t,"edit",(()=>{this._addFormView()})),this.listenTo(t,"unlink",(()=>{e.execute("unlink"),this._hideUI()})),t.keystrokes.set("Esc",((e,t)=>{this._hideUI(),t()})),t.keystrokes.set(G,((e,t)=>{this._addFormView(),t()})),t}_createFormView(){const e=this.editor,t=e.commands.get("link"),i=e.config.get("link.defaultProtocol"),n=new Ae(e.locale,t);return n.urlInputView.fieldView.bind("value").to(t,"value"),n.urlInputView.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),n.saveButtonView.bind("isEnabled").to(t),this.listenTo(n,"submit",(()=>{const{value:t}=n.urlInputView.fieldView.element,o=te(t,i);e.execute("link",o,n.getDecoratorSwitchesState()),this._closeFormView()})),this.listenTo(n,"cancel",(()=>{this._closeFormView()})),n.keystrokes.set("Esc",((e,t)=>{this._closeFormView(),t()})),n}_createToolbarLinkButton(){const e=this.editor,t=e.commands.get("link"),i=e.t;e.keystrokes.set(G,((e,i)=>{i(),t.isEnabled&&this._showUI(!0)})),e.ui.componentFactory.add("link",(e=>{const n=new be.ButtonView(e);return n.isEnabled=!0,n.label=i("Link"),n.icon=Te,n.keystroke=G,n.tooltip=!0,n.isToggleable=!0,n.bind("isEnabled").to(t,"isEnabled"),n.bind("isOn").to(t,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>this._showUI(!0))),n}))}_enableUserBalloonInteractions(){const e=this.editor.editing.view.document;this.listenTo(e,"click",(()=>{this._getSelectedLinkElement()&&this._showUI()})),this.editor.keystrokes.set("Tab",((e,t)=>{this._areActionsVisible&&!this.actionsView.focusTracker.isFocused&&(this.actionsView.focus(),t())}),{priority:"high"}),this.editor.keystrokes.set("Esc",((e,t)=>{this._isUIVisible&&(this._hideUI(),t())})),(0,be.clickOutsideHandler)({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){this._areActionsInPanel||this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel)return;const e=this.editor.commands.get("link");this.formView.disableCssTransitions(),this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),this._balloon.visibleView===this.formView&&this.formView.urlInputView.fieldView.select(),this.formView.enableCssTransitions(),this.formView.urlInputView.fieldView.element.value=e.value||""}_closeFormView(){const e=this.editor.commands.get("link");e.restoreManualDecoratorStates(),void 0!==e.value?this._removeFormView():this._hideUI()}_removeFormView(){this._isFormInPanel&&(this.formView.saveButtonView.focus(),this._balloon.remove(this.formView),this.editor.editing.view.focus(),this._hideFakeVisualSelection())}_showUI(e=!1){this._getSelectedLinkElement()?(this._areActionsVisible?this._addFormView():this._addActionsView(),e&&this._balloon.showStack("main")):(this._showFakeVisualSelection(),this._addActionsView(),e&&this._balloon.showStack("main"),this._addFormView()),this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel)return;const e=this.editor;this.stopListening(e.ui,"update"),this.stopListening(this._balloon,"change:visibleView"),e.editing.view.focus(),this._removeFormView(),this._balloon.remove(this.actionsView),this._hideFakeVisualSelection()}_startUpdatingUI(){const e=this.editor,t=e.editing.view.document;let i=this._getSelectedLinkElement(),n=s();const o=()=>{const e=this._getSelectedLinkElement(),t=s();i&&!e||!i&&t!==n?this._hideUI():this._isUIVisible&&this._balloon.updatePosition(this._getBalloonPositionData()),i=e,n=t};function s(){return t.selection.focus.getAncestors().reverse().find((e=>e.is("element")))}this.listenTo(e.ui,"update",o),this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){return this._balloon.visibleView==this.formView||this._areActionsVisible}_getBalloonPositionData(){const e=this.editor.editing.view,t=this.editor.model,i=e.document;let n=null;if(t.markers.has(Ve)){const t=Array.from(this.editor.editing.mapper.markerNameToElements(Ve)),i=e.createRange(e.createPositionBefore(t[0]),e.createPositionAfter(t[t.length-1]));n=e.domConverter.viewRangeToDom(i)}else n=()=>{const t=this._getSelectedLinkElement();return t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(i.selection.getFirstRange())};return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view,t=e.document.selection,i=t.getSelectedElement();if(t.isCollapsed||i&&(0,pe.isWidget)(i))return Le(t.getFirstPosition());{const i=t.getFirstRange().getTrimmed(),n=Le(i.start),o=Le(i.end);return n&&n==o&&e.createRangeIn(n).getTrimmed().isEqual(i)?n:null}}_showFakeVisualSelection(){const e=this.editor.model;e.change((t=>{const i=e.document.selection.getFirstRange();if(e.markers.has(Ve))t.updateMarker(Ve,{range:i});else if(i.start.isAtEnd){const n=i.start.getLastMatchingPosition((({item:t})=>!e.schema.isContent(t)),{boundaries:i});t.addMarker(Ve,{usingOperation:!1,affectsData:!1,range:t.createRange(n,i.end)})}else t.addMarker(Ve,{usingOperation:!1,affectsData:!1,range:i})}))}_hideFakeVisualSelection(){const e=this.editor.model;e.markers.has(Ve)&&e.change((e=>{e.removeMarker(Ve)}))}}function Le(e){return e.getAncestors().find((e=>{return(t=e).is("attributeElement")&&!!t.getCustomProperty("link");var t}))}const Ce=new RegExp("(^|\\s)(((?:(?:(?:https?|ftp):)?\\/\\/)(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(((?!www\\.)|(www\\.))(?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.)+(?:[a-z\\u00a1-\\uffff]{2,63})))(?::\\d{2,5})?(?:[/?#]\\S*)?)|((www.|(\\S+@))((?![-_])(?:[-_a-z0-9\\u00a1-\\uffff]{1,63}\\.))+(?:[a-z\\u00a1-\\uffff]{2,63})))$","i");class De extends e.Plugin{static get requires(){return[o.Delete]}static get pluginName(){return"AutoLink"}init(){const e=this.editor.model.document.selection;e.on("change:range",(()=>{this.isEnabled=!e.anchor.parent.is("element","codeBlock")})),this._enableTypingHandling()}afterInit(){this._enableEnterHandling(),this._enableShiftEnterHandling()}_enableTypingHandling(){const e=this.editor,t=new o.TextWatcher(e.model,(e=>{if(!function(e){return e.length>4&&" "===e[e.length-1]&&" "!==e[e.length-2]}(e))return;const t=Me(e.substr(0,e.length-1));return t?{url:t}:void 0}));t.on("matched:data",((t,i)=>{const{batch:n,range:o,url:s}=i;if(!n.isTyping)return;const r=o.end.getShiftedBy(-1),a=r.getShiftedBy(-s.length),c=e.model.createRange(a,r);this._applyAutoLink(s,c)})),t.bind("isEnabled").to(this)}_enableEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("enter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition();if(!e.parent.previousSibling)return;const i=t.createRangeIn(e.parent.previousSibling);this._checkAndApplyAutoLinkOnRange(i)}))}_enableShiftEnterHandling(){const e=this.editor,t=e.model,i=e.commands.get("shiftEnter");i&&i.on("execute",(()=>{const e=t.document.selection.getFirstPosition(),i=t.createRange(t.createPositionAt(e.parent,0),e.getShiftedBy(-1));this._checkAndApplyAutoLinkOnRange(i)}))}_checkAndApplyAutoLinkOnRange(e){const t=this.editor.model,{text:i,range:n}=(0,o.getLastTextLine)(e,t),s=Me(i);if(s){const e=t.createRange(n.end.getShiftedBy(-s.length),n.end);this._applyAutoLink(s,e)}}_applyAutoLink(e,t){const i=this.editor.model,n=te(e,this.editor.config.get("link.defaultProtocol"));this.isEnabled&&function(e,t){return t.schema.checkAttributeInSelection(t.createSelection(e),"linkHref")}(t,i)&&ie(n)&&!function(e){const t=e.start.nodeAfter;return t&&t.hasAttribute("linkHref")}(t)&&this._persistAutoLink(n,t)}_persistAutoLink(e,t){const i=this.editor.model,n=this.editor.plugins.get("Delete");i.enqueueChange((o=>{o.setAttribute("linkHref",e,t),i.enqueueChange((()=>{n.requestUndoOnBackspace()}))}))}}function Me(e){const t=Ce.exec(e);return t?t[2]:null}class je extends e.Plugin{static get requires(){return[he,Ee,De]}static get pluginName(){return"Link"}}class Be extends e.Plugin{static get requires(){return["ImageEditing","ImageUtils",he]}static get pluginName(){return"LinkImageEditing"}init(){const e=this.editor,t=e.model.schema;e.plugins.has("ImageBlockEditing")&&t.extend("imageBlock",{allowAttributes:["linkHref"]}),e.conversion.for("upcast").add(function(e){const t=e.plugins.has("ImageInlineEditing"),i=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,n,o)=>{const s=n.viewItem,r=i.findViewImgElement(s);if(!r)return;const a=r.findAncestor((e=>i.isBlockImageView(e)));if(t&&!a)return;const c={attributes:["href"]};if(!o.consumable.consume(s,c))return;const l=s.getAttribute("href");if(!l)return;let u=n.modelCursor.parent;if(!u.is("element","imageBlock")){const e=o.convertItem(r,n.modelCursor);n.modelRange=e.modelRange,n.modelCursor=e.modelCursor,u=n.modelCursor.nodeBefore}u&&u.is("element","imageBlock")&&o.writer.setAttribute("linkHref",l,u)}),{priority:"high"})}}(e)),e.conversion.for("downcast").add(function(e){const t=e.plugins.get("ImageUtils");return e=>{e.on("attribute:linkHref:imageBlock",((e,i,n)=>{if(!n.consumable.consume(i.item,e.name))return;const o=n.mapper.toViewElement(i.item),s=n.writer,r=Array.from(o.getChildren()).find((e=>"a"===e.name)),a=t.findViewImgElement(o),c=a.parent.is("element","picture")?a.parent:a;if(r)i.attributeNewValue?s.setAttribute("href",i.attributeNewValue,r):(s.move(s.createRangeOn(c),s.createPositionAt(o,0)),s.remove(r));else{const e=s.createContainerElement("a",{href:i.attributeNewValue});s.insert(s.createPositionAt(o,0),e),s.move(s.createRangeOn(c),s.createPositionAt(e,0))}}),{priority:"high"})}}(e)),this._enableAutomaticDecorators(),this._enableManualDecorators()}_enableAutomaticDecorators(){const e=this.editor,t=e.commands.get("link").automaticDecorators;t.length&&e.conversion.for("downcast").add(t.getDispatcherForLinkedImage())}_enableManualDecorators(){const e=this.editor,t=e.commands.get("link");for(const i of t.manualDecorators)e.plugins.has("ImageBlockEditing")&&e.model.schema.extend("imageBlock",{allowAttributes:i.id}),e.plugins.has("ImageInlineEditing")&&e.model.schema.extend("imageInline",{allowAttributes:i.id}),e.conversion.for("downcast").add(Ne(i)),e.conversion.for("upcast").add(Oe(e,i))}}function Ne(e){return t=>{t.on(`attribute:${e.id}:imageBlock`,((t,i,n)=>{const o=n.mapper.toViewElement(i.item),s=Array.from(o.getChildren()).find((e=>"a"===e.name));if(s){for(const[t,i]of(0,r.toMap)(e.attributes))n.writer.setAttribute(t,i,s);e.classes&&n.writer.addClass(e.classes,s);for(const t in e.styles)n.writer.setStyle(t,e.styles[t],s)}}))}}function Oe(e,i){const n=e.plugins.has("ImageInlineEditing"),o=e.plugins.get("ImageUtils");return e=>{e.on("element:a",((e,s,r)=>{const a=s.viewItem,c=o.findViewImgElement(a);if(!c)return;const l=c.findAncestor((e=>o.isBlockImageView(e)));if(n&&!l)return;const u=new t.Matcher(i._createPattern()).match(a);if(!u)return;if(!r.consumable.consume(a,u.match))return;const d=s.modelCursor.nodeBefore||s.modelCursor.parent;r.writer.setAttribute(i.id,!0,d)}),{priority:"high"})}}class He extends e.Plugin{static get requires(){return[he,Ee,"ImageBlockEditing"]}static get pluginName(){return"LinkImageUI"}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"click",((t,i)=>{this._isSelectedLinkedImage(e.model.document.selection)&&(i.preventDefault(),t.stop())}),{priority:"high"}),this._createToolbarLinkImageButton()}_createToolbarLinkImageButton(){const e=this.editor,t=e.t;e.ui.componentFactory.add("linkImage",(i=>{const n=new be.ButtonView(i),o=e.plugins.get("LinkUI"),s=e.commands.get("link");return n.set({isEnabled:!0,label:t("Link image"),icon:Te,keystroke:G,tooltip:!0,isToggleable:!0}),n.bind("isEnabled").to(s,"isEnabled"),n.bind("isOn").to(s,"value",(e=>!!e)),this.listenTo(n,"execute",(()=>{this._isSelectedLinkedImage(e.model.document.selection)?o._addActionsView():o._showUI(!0)})),n}))}_isSelectedLinkedImage(e){const t=e.getSelectedElement();return this.editor.plugins.get("ImageUtils").isImage(t)&&t.hasAttribute("linkHref")}}var Ue=i(269),Pe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};ce()(Ue.Z,Pe);Ue.Z.locals;class Fe extends e.Plugin{static get requires(){return[Be,He]}static get pluginName(){return"LinkImage"}}})(),(window.CKEditor5=window.CKEditor5||{}).link=n})(); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/list/list.js b/core/assets/vendor/ckeditor5/list/list.js index a58c2997c2..1d2ed93470 100644 --- a/core/assets/vendor/ckeditor5/list/list.js +++ b/core/assets/vendor/ckeditor5/list/list.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var t={389:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}",""]);const r=s},78:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}",""]);const r=s},543:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}",""]);const r=s},657:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck.ck-list-styles-list{display:grid}.ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:circle}.ck-content ul ul{list-style-type:disc}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}",""]);const r=s},250:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',""]);const r=s},609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(n)for(var r=0;r{"use strict";var n,s=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),o=[];function l(t){for(var e=-1,i=0;i{t.exports=i(79)("./src/core.js")},492:(t,e,i)=>{t.exports=i(79)("./src/engine.js")},331:(t,e,i)=>{t.exports=i(79)("./src/enter.js")},181:(t,e,i)=>{t.exports=i(79)("./src/typing.js")},273:(t,e,i)=>{t.exports=i(79)("./src/ui.js")},209:(t,e,i)=>{t.exports=i(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{DocumentList:()=>pt,DocumentListEditing:()=>G,DocumentListProperties:()=>Mt,DocumentListPropertiesEditing:()=>Tt,List:()=>ie,ListEditing:()=>te,ListProperties:()=>pe,ListPropertiesEditing:()=>le,ListPropertiesUI:()=>Bt,ListUI:()=>mt,TodoList:()=>Te,TodoListEditing:()=>Ae,TodoListUI:()=>Ie});var t=i(704),e=i(331),s=i(181),r=i(209);class o{constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=(0,r.toArray)(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){const i=new this(t,e)[Symbol.iterator]();return(0,r.first)(i)}*[Symbol.iterator](){const t=[];for(const{node:e}of l(this._getStartNode(),this._isForward?"forward":"backward")){const i=e.getAttribute("listIndent");if(ithis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some((t=>e.getAttribute(t)!==this._startElement.getAttribute(t))))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*l(t,e="forward"){const i="forward"==e;let n=null;for(;d(t);)yield{node:t,previous:n},n=t,t=i?t.nextSibling:t.previousSibling}class a{constructor(t){this._listHead=t}[Symbol.iterator](){return l(this._listHead,"forward")}}class c{static next(){return(0,r.uid)()}}function d(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function u(t,e={}){return[...m(t,{...e,direction:"backward"}),...m(t,{...e,direction:"forward"})]}function m(t,e={}){const i="forward"==e.direction,n=Array.from(new o(t,{...e,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?n:n.reverse()}function p(t){const e=new o(t,{sameIndent:!0,sameAttributes:"listType"}),i=new o(t,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"});return[...Array.from(e).reverse(),...i]}function h(t){return!o.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function f(t){return!o.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function b(t,e={}){t=(0,r.toArray)(t);const i=!1!==e.withNested,n=new Set;for(const e of t)for(const t of u(e,{higherIndent:i}))n.add(t);return k(n)}function g(t){t=(0,r.toArray)(t);const e=new Set;for(const i of t)for(const t of p(i))e.add(t);return k(e)}function y(t,e){const i=m(t,{direction:"forward"}),n=c.next();for(const t of i)e.setAttribute("listItemId",n,t);return i}function v(t,e,i){const n={};for(const[t,i]of e.getAttributes())t.startsWith("list")&&(n[t]=i);const s=m(t,{direction:"forward"});for(const t of s)i.setAttributes(n,t);return s}function w(t,e,{expand:i,indentBy:n=1}={}){t=(0,r.toArray)(t);const s=i?b(t):t;for(const t of s){const i=t.getAttribute("listIndent")+n;i<0?A(t,e):e.setAttribute("listIndent",i,t)}return s}function A(t,e){t=(0,r.toArray)(t);for(const i of t)for(const t of i.getAttributeKeys())t.startsWith("list")&&e.removeAttribute(t,i);return t}function I(t){if(!t.length)return!1;const e=t[0].getAttribute("listItemId");return!!e&&!t.some((t=>t.getAttribute("listItemId")!=e))}function k(t){return Array.from(t).filter((t=>"$graveyard"!==t.root.rootName)).sort(((t,e)=>t.index-e.index))}function x(t){const e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function T(t,e,i){return m(e,{direction:"forward"}).pop().index>t.index?v(t,e,i):[]}class S extends t.Command{constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=_(t.document.selection);t.change((t=>{const i=[];I(e)&&!h(e[0])?("forward"==this._direction&&i.push(...w(e,t)),i.push(...y(e[0],t))):"forward"==this._direction?i.push(...w(e,t,{expand:!0})):i.push(...function(t,e){const i=b(t=(0,r.toArray)(t)),n=new Set,s=Math.min(...i.map((t=>t.getAttribute("listIndent")))),l=new Map;for(const t of i)l.set(t,o.first(t,{lowerIndent:!0}));for(const t of i){if(n.has(t))continue;n.add(t);const i=t.getAttribute("listIndent")-1;if(i<0)A(t,e);else{if(t.getAttribute("listIndent")==s){const i=T(t,l.get(t),e);for(const t of i)n.add(t);if(i.length)continue}e.setAttribute("listIndent",i,t)}}return k(n)}(e,t));for(const e of i){if(!e.hasAttribute("listType"))continue;const i=o.first(e,{sameIndent:!0});i&&t.setAttribute("listType",i.getAttribute("listType"),e)}this._fireAfterExecute(i)}))}_fireAfterExecute(t){this.fire("afterExecute",k(new Set(t)))}_checkEnabled(){let t=_(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction)return!0;if(I(t)&&!h(t[0]))return!0;t=b(t),e=t[0];const i=o.first(e,{sameIndent:!0});return!!i&&i.getAttribute("listType")==e.getAttribute("listType")}}function _(t){const e=Array.from(t.getSelectedBlocks()),i=e.findIndex((t=>!d(t)));return-1!=i&&(e.length=i),e}class C extends t.Command{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=x(e),s=Array.from(i.selection.getSelectedBlocks()).filter((t=>e.schema.checkAttribute(t,"listType"))),r=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(r){const e=s[s.length-1],i=m(e,{direction:"forward"}),n=[];i.length>1&&n.push(...y(i[1],t)),n.push(...A(s,t)),n.push(...function(t,e){const i=[];let n=Number.POSITIVE_INFINITY;for(const{node:s}of l(t.nextSibling,"forward")){const t=s.getAttribute("listIndent");if(0==t)break;t{const{firstElement:r,lastElement:l}=this._getMergeSubjectElements(i,t),a=r.getAttribute("listIndent")||0,c=l.getAttribute("listIndent"),d=l.getAttribute("listItemId");if(a!=c){const t=(u=l,Array.from(new o(u,{direction:"forward",higherIndent:!0})));n.push(...w([l,...t],s,{indentBy:a-c,expand:a{const e=y(this._getStartBlock(),t);this._fireAfterExecute(e)}))}_fireAfterExecute(t){this.fire("afterExecute",k(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&d(e)&&!h(e)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}function E(t){return t.is("element","ol")||t.is("element","ul")}function P(t){return t.is("element","li")}function z(t){let e=0,i=t.parent;for(;i;){if(P(i))e++;else{const t=i.previousSibling;t&&P(t)&&e++}i=i.parent}return e}function B(t,e,i,n=R(i,e)){return t.createAttributeElement(M(i),null,{priority:2*e/100-100,id:n})}function N(t,e,i){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:i})}function M(t){return"numbered"==t?"ol":"ul"}function R(t,e){return`list-${t}-${e}`}function O(t,e){const i=t.nodeBefore;if(d(i)){let t=i;for({node:t}of l(t,"backward"))if(e.has(t))return;e.set(i,t)}else{const i=t.nodeAfter;d(i)&&e.set(i,i)}}var H=i(492);function F(){return(t,e,i)=>{if(!i.consumable.test(e.viewItem,{name:!0}))return;const n=new H.UpcastWriter(e.viewItem.document);for(const t of Array.from(e.viewItem.getChildren()))P(t)||E(t)||n.remove(t)}}function D(t,e,i){const n=function(t){return(e,i)=>{const n=[];for(const i of t)e.hasAttribute(i)&&n.push(`attribute:${i}`);return!!n.every((t=>!1!==i.test(e,t)))&&(n.forEach((t=>i.consume(e,t))),!0)}}(t);return(s,r,l)=>{const{writer:a,mapper:c,consumable:d}=l,u=r.item;if(!t.includes(r.attributeKey))return;if(!n(u,d))return;const m=function(t,e,i){const n=i.createRangeOn(t);return e.toViewRange(n).getTrimmed().getContainedElement()}(u,c,i);!function(t,e){let i=t.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const n=i.parent;e.unwrap(e.createRangeOn(t),i),i=n}}(m,a),function(t,e,i,n){if(!t.hasAttribute("listIndent"))return;const s=t.getAttribute("listIndent");let r=t;for(let t=s;t>=0;t--){const s=N(n,t,r.getAttribute("listItemId")),l=B(n,t,r.getAttribute("listType"));for(const t of i)r.hasAttribute(t.attributeName)&&t.setAttributeOnDowncast(n,r.getAttribute(t.attributeName),"list"==t.scope?l:s);if(e=n.wrap(e,s),e=n.wrap(e,l),0==t)break;if(r=o.first(r,{lowerIndent:!0}),!r)break}}(u,a.createRangeOn(m),e,a)}}function j(t,{dataPipeline:e}={}){return(i,{writer:n})=>{if(!U(i,t))return;const s=n.createContainerElement("span",{class:"ck-list-bogus-paragraph"});return e&&n.setCustomProperty("dataPipeline:transparentRendering",!0,s),s}}function U(t,e,i=u(t)){if(!d(t))return!1;for(const i of t.getAttributeKeys())if(!i.startsWith("selection:")&&!e.includes(i))return!1;return i.length<2}var q=i(62),K=i.n(q),Z=i(78),$={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(Z.Z,$);Z.Z.locals;const W=["listType","listIndent","listItemId"];class G extends t.Plugin{static get pluginName(){return"DocumentListEditing"}static get requires(){return[e.Enter,s.Delete]}constructor(t){super(t),this._downcastStrategies=[]}init(){const t=this.editor,e=t.model;if(t.plugins.has("ListEditing"))throw new r.CKEditorError("document-list-feature-conflict",this,{conflictPlugin:"ListEditing"});e.schema.extend("$container",{allowAttributes:W}),e.schema.extend("$block",{allowAttributes:W}),e.schema.extend("$blockObject",{allowAttributes:W});for(const t of W)e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new C(t,"numbered")),t.commands.add("bulletedList",new C(t,"bulleted")),t.commands.add("indentList",new S(t,"forward")),t.commands.add("outdentList",new S(t,"backward")),t.commands.add("mergeListItemBackward",new V(t,"backward")),t.commands.add("mergeListItemForward",new V(t,"forward")),t.commands.add("splitListItemBefore",new L(t,"before")),t.commands.add("splitListItemAfter",new L(t,"after")),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration()}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}_getListAttributeNames(){return[...W,...this._downcastStrategies.map((t=>t.attributeName))]}_setupDeleteIntegration(){const t=this.editor,e=t.commands.get("mergeListItemBackward"),i=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",((n,s)=>{const r=t.model.document.selection;x(t.model)||t.model.change((()=>{const l=r.getFirstPosition();if(r.isCollapsed&&"backward"==s.direction){if(!l.isAtStart)return;const i=l.parent;if(!d(i))return;if(o.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:Y(t.model,"backward")})}else f(i)||t.execute("splitListItemAfter"),t.execute("outdentList");s.preventDefault(),n.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:Y(t.model,"forward")}),s.preventDefault(),n.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const t=this.editor,e=t.model,i=t.commands,n=i.get("enter");this.listenTo(t.editing.view.document,"enter",((i,n)=>{const s=e.document,r=s.selection.getFirstPosition().parent;if(s.selection.isCollapsed&&d(r)&&r.isEmpty&&!n.isSoft){const e=h(r),s=f(r);e&&s?(t.execute("outdentList"),n.preventDefault(),i.stop()):e&&!s?(t.execute("splitListItemAfter"),n.preventDefault(),i.stop()):s&&(t.execute("splitListItemBefore"),n.preventDefault(),i.stop())}}),{context:"li"}),this.listenTo(n,"afterExecute",(()=>{const e=i.get("splitListItemBefore");if(e.refresh(),!e.isEnabled)return;2===u(t.model.document.selection.getLastPosition().parent).length&&e.execute()}))}_setupTabIntegration(){const t=this.editor;this.listenTo(t.editing.view.document,"tab",((e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())}),{context:"li"})}_setupConversion(){const t=this.editor,e=t.model,i=this._getListAttributeNames();t.conversion.for("upcast").elementToElement({view:"li",model:"paragraph"}).add((t=>{t.on("element:li",((t,e,i)=>{const{writer:n,schema:s}=i;if(!e.modelRange)return;const r=Array.from(e.modelRange.getItems({shallow:!0})).filter((t=>s.checkAttribute(t,"listItemId")));if(!r.length)return;const o={listItemId:c.next(),listIndent:z(e.viewItem),listType:e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted"};for(const t of r)d(t)||n.setAttributes(o,t);r.length>1&&r[1].getAttribute("listItemId")!=o.listItemId&&i.keepEmptyElement(r[0])})),t.on("element:ul",F(),{priority:"high"}),t.on("element:ol",F(),{priority:"high"})})),t.conversion.for("editingDowncast").elementToElement({model:"paragraph",view:j(i),converterPriority:"high"}),t.conversion.for("dataDowncast").elementToElement({model:"paragraph",view:j(i,{dataPipeline:!0}),converterPriority:"high"}),t.conversion.for("downcast").add((t=>{t.on("attribute",D(i,this._downcastStrategies,e))})),this.listenTo(e.document,"change:data",function(t,e,i,n){return()=>{const n=t.document.differ.getChanges(),o=[],l=new Map,a=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name)O(t.position,l),t.attributes.has("listItemId")?a.add(t.position.nodeAfter):O(t.position.getShiftedBy(t.length),l);else if("remove"==t.type&&t.attributes.has("listItemId"))O(t.position,l);else if("attribute"==t.type){const e=t.range.start.nodeAfter;i.includes(t.attributeKey)?(O(t.range.start,l),null===t.attributeNewValue?(O(t.range.start.getShiftedBy(1),l),r(e)&&o.push(e)):a.add(e)):d(e)&&r(e)&&o.push(e)}for(const t of l.values())o.push(...s(t,a));for(const t of new Set(o))e.reconvertItem(t)};function s(t,e){const n=[],s=new Set,a=[];for(const{node:c,previous:d}of l(t,"forward")){if(s.has(c))continue;const t=c.getAttribute("listIndent");d&&ti.includes(t))));const l=m(c,{direction:"forward"});for(const t of l)s.add(t),(r(t,l)||o(t,a,e))&&n.push(t)}return n}function r(t,n){if(!t.is("element","paragraph"))return!1;const s=e.mapper.toViewElement(t);if(!s)return!1;const r=U(t,i,n);return!(!r||!s.is("element","p"))||!(r||!s.is("element","span"))}function o(t,i,s){if(s.has(t))return!1;const r=e.mapper.toViewElement(t);let o=i.length-1;for(let t=r.parent;!t.is("editableElement");t=t.parent){const e=P(t),s=E(t);if(!s&&!e)continue;const r="checkAttributes:"+(e?"item":"list");if(n.fire(r,{viewElement:t,modelAttributes:i[o]}))break;if(s&&(o--,o<0))return!1}return!0}}(e,t.editing,i,this)),this.on("checkAttributes:item",((t,{viewElement:e,modelAttributes:i})=>{e.id!=i.listItemId&&(t.return=!0,t.stop())})),this.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:i})=>{e.name==M(i.listType)&&e.id==R(i.listType,i.listIndent)||(t.return=!0,t.stop())}))}_setupModelPostFixing(){const t=this.editor.model,e=this._getListAttributeNames();t.document.registerPostFixer((i=>function(t,e,i,n){const s=t.document.differ.getChanges(),r=new Map;let o=!1;for(const n of s)if("insert"==n.type&&"$text"!=n.name){const s=n.position.nodeAfter;if(!t.schema.checkAttribute(s,"listItemId"))for(const t of Array.from(s.getAttributeKeys()))i.includes(t)&&(e.removeAttribute(t,s),o=!0);O(n.position,r),n.attributes.has("listItemId")||O(n.position.getShiftedBy(n.length),r);for(const{item:e,previousPosition:i}of t.createRangeIn(s))d(e)&&O(i,r)}else"remove"==n.type?O(n.position,r):"attribute"==n.type&&i.includes(n.attributeKey)&&(O(n.range.start,r),null===n.attributeNewValue&&O(n.range.start.getShiftedBy(1),r));const l=new Set;for(const t of r.values())o=n.fire("postFixer",{listNodes:new a(t),listHead:t,writer:e,seenIds:l})||o;return o}(t,i,e,this))),this.on("postFixer",((t,{listNodes:e,writer:i})=>{t.return=function(t,e){let i=0,n=-1,s=null,r=!1;for(const{node:o}of t){const t=o.getAttribute("listIndent");if(t>i){let l;null===s?(s=t-i,l=i):(s>t&&(s=t),l=t-s),l>n+1&&(l=n+1),e.setAttribute("listIndent",l,o),r=!0,n=l}else s=null,i=t+1,n=t}return r}(e,i)||t.return}),{priority:"high"}),this.on("postFixer",((t,{listNodes:e,writer:i,seenIds:n})=>{t.return=function(t,e,i){const n=new Set;let s=!1;for(const{node:r}of t){if(n.has(r))continue;let t=r.getAttribute("listType"),o=r.getAttribute("listItemId");e.has(o)&&(o=c.next()),e.add(o);for(const e of m(r,{direction:"forward"}))n.add(e),e.getAttribute("listType")!=t&&(o=c.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=o&&(i.setAttribute("listItemId",o,e),s=!0)}return s}(e,n,i)||t.return}),{priority:"high"})}_setupClipboardIntegration(){const t=this.editor.model;this.listenTo(t,"insertContent",function(t){return(e,[i,n])=>{const s=i.is("documentFragment")?i.getChild(0):i;if(!d(s))return;let r;r=n?t.createSelection(n):t.document.selection;const o=r.getFirstPosition();let a=null;if(d(o.parent)?a=o.parent:d(o.nodeBefore)&&(a=o.nodeBefore),!a)return;const c=a.getAttribute("listIndent")-s.getAttribute("listIndent");c<=0||t.change((t=>{for(const{node:e}of l(s,"forward"))t.setAttribute("listIndent",e.getAttribute("listIndent")+c,e)}))}}(t),{priority:"high"}),this.listenTo(t,"getSelectedContent",((e,[i])=>{I(Array.from(i.getSelectedBlocks()))&&t.change((t=>A(Array.from(e.return.getChildren()),t)))}))}}function Y(t,e){const i=t.document.selection;if(!i.isCollapsed)return!x(t);if("forward"===e)return!0;const n=i.getFirstPosition().parent,s=n.previousSibling;return!t.schema.isObject(s)&&(!!s.isEmpty||I([n,s]))}var J=i(273);function Q(t,e){const i=e.mapper,n=e.writer,s="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=ct,e}(n),o=n.createContainerElement(s,null);return n.insert(n.createPositionAt(o,0),r),i.bindElements(t,r),r}function X(t,e,i,n){const s=e.parent,r=i.mapper,o=i.writer;let l=r.toViewPosition(n.createPositionBefore(t));const a=it(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(a&&a.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(a);l=o.breakContainer(o.createPositionAfter(t))}else if(c&&"listItem"==c.name){l=r.toViewPosition(n.createPositionAt(c,"end"));const t=r.findMappedViewAncestor(l),e=st(t);l=e?o.createPositionBefore(e):o.createPositionAt(t,"end")}else l=r.toViewPosition(n.createPositionBefore(t));if(l=et(l),o.insert(l,s),c&&"listItem"==c.name){const t=r.toViewElement(c),i=o.createRange(o.createPositionAt(t,0),l).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is("element","li")){const n=o.breakContainer(o.createPositionBefore(t.item)),s=t.item.parent,r=o.createPositionAt(e,"end");tt(o,r.nodeBefore,r.nodeAfter),o.move(o.createRangeOn(s),r),i.position=n}}else{const i=s.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const e of i.getChildren()){const i=r.toModelElement(e);if(!(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")))break;n=e}n&&(o.breakContainer(o.createPositionAfter(n)),o.move(o.createRangeOn(n.parent),o.createPositionAt(e,"end")))}}tt(o,s,s.nextSibling),tt(o,s.previousSibling,s)}function tt(t,e,i){return!e||!i||"ul"!=e.name&&"ol"!=e.name||e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function et(t){return t.getLastMatchingPosition((t=>t.item.is("uiElement")))}function it(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,s=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(i&&s==t||n&&s>t)return r;r="forward"===e.direction?r.nextSibling:r.previousSibling}return null}function nt(t,e,i,n){t.ui.componentFactory.add(e,(s=>{const r=t.commands.get(e),o=new J.ButtonView(s);return o.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),o.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),o}))}function st(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function rt(t,e){const i=[],n=t.parent,s={ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e},r=n.getAttribute("listIndent"),o=[...new H.TreeWalker(s)].filter((t=>t.item.is("element"))).map((t=>t.item));for(const t of o){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")r)){if(t.getAttribute("listType")!==n.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===e?i.unshift(t):i.push(t)}}return i}function ot(t){let e=[...t.document.selection.getSelectedBlocks()].filter((t=>t.is("element","listItem"))).map((e=>{const i=t.change((t=>t.createPositionAt(e,0)));return[...rt(i,"backward"),...rt(i,"forward")]})).flat();return e=[...new Set(e)],e}const lt=["disc","circle","square"],at=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function ct(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:H.getFillerOffset.call(this)}const dt='',ut='';class mt extends t.Plugin{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;nt(this.editor,"numberedList",t("Numbered List"),dt),nt(this.editor,"bulletedList",t("Bulleted List"),ut)}}class pt extends t.Plugin{static get requires(){return[G,mt]}static get pluginName(){return"DocumentList"}}class ht extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=e.document;let n=Array.from(i.selection.getSelectedBlocks()).filter((t=>d(t)&&"numbered"==t.getAttribute("listType")));n=g(n),e.change((e=>{for(const i of n)e.setAttribute("listStart",t.startIndex||1,i)}))}_getValue(){const t=this.editor.model.document,e=(0,r.first)(t.selection.getSelectedBlocks());return e&&d(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const ft={},bt={},gt={},yt=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:t,typeAttribute:e,listType:i}of yt)ft[t]=i,bt[t]=e,e&&(gt[e]=t);function vt(t){return ft[t]||null}function wt(t){return bt[t]||null}class At extends t.Command{constructor(t,e,i){super(t),this._defaultType=e,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document;e.change((e=>{this._tryToConvertItemsToList(t);let n=Array.from(i.selection.getSelectedBlocks()).filter((t=>t.hasAttribute("listType")));if(n.length){n=g(n);for(const i of n)e.setAttribute("listStyle",t.type||this._defaultType,i)}}))}isStyleTypeSupported(t){return!this._supportedTypes||this._supportedTypes.includes(t)}_getValue(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());return d(t)?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=vt(t.type);if(!e)return;const i=this.editor,n=e+"List";i.commands.get(n).value||i.execute(n)}}class It extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=e.document;let n=Array.from(i.selection.getSelectedBlocks()).filter((t=>d(t)&&"numbered"==t.getAttribute("listType")));n=g(n),e.change((e=>{for(const i of n)e.setAttribute("listReversed",!!t.reversed,i)}))}_getValue(){const t=this.editor.model.document,e=(0,r.first)(t.selection.getSelectedBlocks());return d(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}function kt(t){return(e,i,n)=>{const{writer:s,schema:r,consumable:o}=n;if(!1===o.test(i.viewItem,t.viewConsumables))return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));let l=!1;for(const e of i.modelRange.getItems({shallow:!0}))r.checkAttribute(e,t.attributeName)&&t.appliesToListItem(e)&&(e.hasAttribute(t.attributeName)||(s.setAttribute(t.attributeName,t.getAttributeOnUpcast(i.viewItem),e),l=!0));l&&o.consume(i.viewItem,t.viewConsumables)}}const xt="default";class Tt extends t.Plugin{static get requires(){return[G]}static get pluginName(){return"DocumentListPropertiesEditing"}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,i=t.plugins.get(G),n=function(t){const e=[];if(t.styles){const i="object"==typeof t.styles&&t.styles.useAttribute;e.push({attributeName:"listStyle",defaultValue:xt,viewConsumables:{styles:"list-style-type"},addCommand(t){let e=yt.map((t=>t.listStyle));i&&(e=e.filter((t=>!!wt(t)))),t.commands.add("listStyle",new At(t,xt,e))},appliesToListItem:()=>!0,hasValidAttribute(t){if(!t.hasAttribute("listStyle"))return!1;const e=t.getAttribute("listStyle");return e==xt||vt(e)==t.getAttribute("listType")},setAttributeOnDowncast(t,e,n){if(e&&e!==xt){if(!i)return void t.setStyle("list-style-type",e,n);{const i=wt(e);if(i)return void t.setAttribute("type",i,n)}}t.removeStyle("list-style-type",n),t.removeAttribute("type",n)},getAttributeOnUpcast(t){const e=t.getStyle("list-style-type");if(e)return e;const i=t.getAttribute("type");return i?gt[i]||null:xt}})}t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(t){t.commands.add("listReversed",new It(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listReversed")},setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(t){t.commands.add("listStart",new ht(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listStart")},setAttributeOnDowncast(t,e,i){e&&e>1?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast:t=>t.getAttribute("start")||1});return e}(t.config.get("list.properties"));for(const s of n)s.addCommand(t),e.schema.extend("$container",{allowAttributes:s.attributeName}),e.schema.extend("$block",{allowAttributes:s.attributeName}),e.schema.extend("$blockObject",{allowAttributes:s.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:s.attributeName,setAttributeOnDowncast(t,e,i){s.setAttributeOnDowncast(t,e,i)}});t.conversion.for("upcast").add((t=>{for(const e of n)t.on("element:ol",kt(e)),t.on("element:ul",kt(e))})),i.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:i})=>{for(const s of n)s.getAttributeOnUpcast(e)!=i[s.attributeName]&&(t.return=!0,t.stop())})),this.listenTo(t.commands.get("indentList"),"afterExecute",((t,i)=>{e.change((t=>{for(const e of i)for(const i of n)i.appliesToListItem(e)&&t.setAttribute(i.attributeName,i.defaultValue,e)}))})),i.on("postFixer",((t,{listNodes:e,writer:i})=>{for(const{node:s}of e)for(const e of n)e.hasValidAttribute(s)||(e.appliesToListItem(s)?i.setAttribute(e.attributeName,e.defaultValue,s):i.removeAttribute(e.attributeName,s),t.return=!0)})),i.on("postFixer",((t,{listNodes:e,writer:i})=>{const s=[];for(const{node:r,previous:o}of e){if(!o)continue;const e=r.getAttribute("listIndent"),l=o.getAttribute("listIndent");let a=null;if(e>l?s[l]=o:e'}),t.extendTemplate({attributes:{"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("label").to(this),t.bind("isOn").to(this,"isCollapsed",(t=>!t)),t.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),t}}var Vt=i(543),Lt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(Vt.Z,Lt);Vt.Z.locals;class Et extends J.View{constructor(t,{enabledProperties:e,styleButtonViews:i,styleGridAriaLabel:n}){super(t);const s=["ck","ck-list-properties"];this.children=this.createCollection(),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new r.FocusTracker,this.keystrokes=new r.KeystrokeHandler,this.focusables=new J.ViewCollection,this.focusCycler=new J.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),e.styles?(this.stylesView=this._createStylesView(i,n),this.children.add(this.stylesView)):s.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e,i),s.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:s},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,J.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>r.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element),this.listenTo(this.startIndexFieldView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"});const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const i=new J.View(this.locale);return i.children=i.createCollection(this.locale),i.children.addMany(t),i.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new r.FocusTracker,i.keystrokes=new r.KeystrokeHandler,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(t){const e=this.locale.t,i=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),t.styles?(this.additionalPropertiesCollapsibleView=new Ct(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((t,e,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const t=this.locale.t,e=new J.LabeledFieldView(this.locale,J.createLabeledInputNumber);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:1,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",(()=>{const i=e.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)||(i.checkValidity()?this.fire("listStart",{startIndex:n}):e.errorText=t("Start index must be greater than 0."))})),e}_createReversedSwitchButton(){const t=this.locale.t,e=new J.SwitchButtonView(this.locale);return e.set({withText:!0,label:t("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),e.delegate("execute").to(this,"listReversed"),e}}var Pt=i(657),zt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(Pt.Z,zt);Pt.Z.locals;class Bt extends t.Plugin{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,e=t.locale.t,i=t.config.get("list.properties");i.styles&&t.ui.componentFactory.add("bulletedList",Nt({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:ut,styleGridAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:''},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:''},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:''}]})),(i.styles||i.startIndex||i.reversed)&&t.ui.componentFactory.add("numberedList",Nt({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:dt,styleGridAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:''},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:''},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:''},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:''},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:''},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:''}]}))}}function Nt({editor:t,parentCommandName:e,buttonLabel:i,buttonIcon:n,styleGridAriaLabel:s,styleDefinitions:r}){const o=t.commands.get(e);return l=>{const a=(0,J.createDropdown)(l,J.SplitButtonView),c=a.buttonView;a.bind("isEnabled").to(o),a.class="ck-list-styles-dropdown",c.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),c.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(o,"value",(t=>!!t));const d=function({editor:t,dropdownView:e,parentCommandName:i,styleDefinitions:n,styleGridAriaLabel:s}){const r=t.locale,o=t.config.get("list.properties");let l;"numberedList"!=i&&(o.startIndex=!1,o.reversed=!1);if(o.styles){const e=t.commands.get("listStyle"),s=function({editor:t,listStyleCommand:e,parentCommandName:i}){const n=t.locale,s=t.commands.get(i);return({label:i,type:r,icon:o,tooltip:l})=>{const a=new J.ButtonView(n);return a.set({label:i,icon:o,tooltip:l}),e.on("change:value",(()=>{a.isOn=e.value===r})),a.on("execute",(()=>{s.value?e.value!==r?t.execute("listStyle",{type:r}):t.execute("listStyle",{type:e._defaultType}):t.model.change((()=>{t.execute("listStyle",{type:r})}))})),a}}({editor:t,parentCommandName:i,listStyleCommand:e}),r="function"==typeof e.isStyleTypeSupported?t=>e.isStyleTypeSupported(t.type):()=>!0;l=n.filter(r).map(s)}const a=new Et(r,{styleGridAriaLabel:s,enabledProperties:o,styleButtonViews:l});o.styles&&(0,J.focusChildOnDropdownOpen)(e,(()=>a.stylesView.children.find((t=>t.isOn))));if(o.startIndex){const e=t.commands.get("listStart");a.startIndexFieldView.bind("isEnabled").to(e),a.startIndexFieldView.fieldView.bind("value").to(e),a.on("listStart",((e,i)=>t.execute("listStart",i)))}if(o.reversed){const e=t.commands.get("listReversed");a.reversedSwitchButtonView.bind("isEnabled").to(e),a.reversedSwitchButtonView.bind("isOn").to(e,"value"),a.on("listReversed",(()=>{const i=e.value;t.execute("listReversed",{reversed:!i})}))}return a.delegate("execute").to(e),a}({editor:t,dropdownView:a,parentCommandName:e,styleGridAriaLabel:s,styleDefinitions:r});return a.panelView.children.add(d),a.on("execute",(()=>{t.editing.view.focus()})),a}}class Mt extends t.Plugin{static get requires(){return[Tt,Bt]}static get pluginName(){return"DocumentListProperties"}}class Rt extends t.Command{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=Array.from(i.selection.getSelectedBlocks()).filter((t=>Ht(t,e.schema))),s=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(s){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,s=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t=i;)r>s.getAttribute("listIndent")&&(r=s.getAttribute("listIndent")),s.getAttribute("listIndent")==r&&t[e?"unshift":"push"](s),s=s[e?"previousSibling":"nextSibling"]}}function Ht(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class Ft extends t.Command{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change((t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>e.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;i<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",i,e)}this.fire("_executeCleanup",i)}))}_checkEnabled(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),i=t.getAttribute("listType");let n=t.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=e;){if(n.getAttribute("listIndent")==e)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function Dt(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;s.consume(i.item,"insert"),s.consume(i.item,"attribute:listType"),s.consume(i.item,"attribute:listIndent");const r=i.item;X(r,Q(r,n),n,t)}}function jt(t,e,i){if(!i.consumable.test(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer;s.breakContainer(s.createPositionBefore(n)),s.breakContainer(s.createPositionAfter(n));const r=n.parent,o="numbered"==e.attributeNewValue?"ol":"ul";s.rename(o,r)}function Ut(t,e,i){i.consumable.consume(e.item,t.name);const n=i.mapper.toViewElement(e.item).parent,s=i.writer;tt(s,n,n.nextSibling),tt(s,n.previousSibling,n)}function qt(t,e,i){if(i.consumable.test(e.item,t.name)&&"listItem"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,s=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=n.breakContainer(t),"li"==t.parent.name);){const e=t,i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));s.push(t)}t=n.createPositionAfter(t.parent)}if(s.length>0){for(let e=0;e0){const e=tt(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}tt(n,t.nodeBefore,t.nodeAfter)}}}function Kt(t,e,i){const n=i.mapper.toViewPosition(e.position),s=n.nodeBefore,r=n.nodeAfter;tt(i.writer,s,r)}function Zt(t,e,i){if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement("listItem"),s=function(t){let e=0,i=t.parent;for(;i;){if(i.is("element","li"))e++;else{const t=i.previousSibling;t&&t.is("element","li")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute("listIndent",s,n);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",r,n),!i.safeInsert(n,e.modelCursor))return;const o=function(t,e,i){const{writer:n,schema:s}=i;let r=n.createPositionAfter(t);for(const o of e)if("ul"==o.name||"ol"==o.name)r=i.convertItem(o,r).modelCursor;else{const e=i.convertItem(o,n.createPositionAt(t,"end")),l=e.modelRange.start.nodeAfter;l&&l.is("element")&&!s.checkChild(t,l.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:Jt(e.modelCursor),r=n.createPositionAfter(t))}return r}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,o),i.updateConversionResult(n,e)}}function $t(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||Xt(e))&&e._remove()}}}function Wt(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1;for(const e of t)i&&!Xt(e)&&e._remove(),Xt(e)&&(i=!0)}}function Gt(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const e=i.mapper.toViewElement(n),s=e.getAncestors().find(Xt),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("element","li")){i.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==s){i.viewPosition=t.nextPosition;break}}}}}function Yt(t,[e,i]){let n,s=e.is("documentFragment")?e.getChild(0):e;if(n=i?this.createSelection(i):this.document.selection,s&&s.is("element","listItem")){const t=n.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;s&&s.is("element","listItem");)s._setAttribute("listIndent",s.getAttribute("listIndent")+t),s=s.nextSibling}}}function Jt(t){const e=new H.TreeWalker({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function Qt(t,e,i,n,s,r){const o=it(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),l=s.mapper,a=s.writer,c=o?o.getAttribute("listIndent"):null;let d;if(o)if(c==t){const t=l.toViewElement(o).parent;d=a.createPositionAfter(t)}else{const t=r.createPositionAt(o,"end");d=l.toViewPosition(t)}else d=i;d=et(d);for(const t of[...n.getChildren()])Xt(t)&&(d=a.move(a.createRangeOn(t),d).end,tt(a,t,t.nextSibling),tt(a,t.previousSibling,t))}function Xt(t){return t.is("element","ol")||t.is("element","ul")}class te extends t.Plugin{static get pluginName(){return"ListEditing"}static get requires(){return[e.Enter,s.Delete]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,i=t.editing;var n;t.model.document.registerPostFixer((e=>function(t,e){const i=t.document.differ.getChanges(),n=new Map;let s=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)r(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",i),s=!0),i.hasAttribute("listType")&&(e.removeAttribute("listType",i),s=!0),i.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",i),s=!0),i.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",i),s=!0),i.hasAttribute("listStart")&&(e.removeAttribute("listStart",i),s=!0);for(const e of Array.from(t.createRangeIn(i)).filter((t=>t.item.is("element","listItem"))))r(e.previousPosition)}r(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?r(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&r(n.range.start);for(const t of n.values())o(t),l(t);return s;function r(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(n.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,n.has(t))return;n.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&n.set(e,e)}}function o(t){let i=0,n=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(r>i){let o;null===n?(n=r-i,o=i):(n>r&&(n=r),o=r-n),e.setAttribute("listIndent",o,t),s=!0}else n=null,i=t.getAttribute("listIndent")+1;t=t.nextSibling}}function l(t){let i=[],n=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const n=i[r];t.getAttribute("listType")!=n&&(e.setAttribute("listType",n,t),s=!0)}else i[r]=t.getAttribute("listType");n=t,t=t.nextSibling}}}(t.model,e))),i.mapper.registerViewToModelLength("li",ee),e.mapper.registerViewToModelLength("li",ee),i.mapper.on("modelToViewPosition",Gt(i.view)),i.mapper.on("viewToModelPosition",(n=t.model,(t,e)=>{const i=e.viewPosition,s=i.parent,r=e.mapper;if("ul"==s.name||"ol"==s.name){if(i.isAtEnd){const t=r.toModelElement(i.nodeBefore),s=r.getModelLength(i.nodeBefore);e.modelPosition=n.createPositionBefore(t).getShiftedBy(s)}else{const t=r.toModelElement(i.nodeAfter);e.modelPosition=n.createPositionBefore(t)}t.stop()}else if("li"==s.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const o=r.toModelElement(s);let l=1,a=i.nodeBefore;for(;a&&Xt(a);)l+=r.getModelLength(a),a=a.previousSibling;e.modelPosition=n.createPositionBefore(o).getShiftedBy(l),t.stop()}})),e.mapper.on("modelToViewPosition",Gt(i.view)),t.conversion.for("editingDowncast").add((e=>{e.on("insert",qt,{priority:"high"}),e.on("insert:listItem",Dt(t.model)),e.on("attribute:listType:listItem",jt,{priority:"high"}),e.on("attribute:listType:listItem",Ut,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const s=n.mapper.toViewElement(i.item),r=n.writer;r.breakContainer(r.createPositionBefore(s)),r.breakContainer(r.createPositionAfter(s));const o=s.parent,l=o.previousSibling,a=r.createRangeOn(o);r.remove(a),l&&l.nextSibling&&tt(r,l,l.nextSibling),Qt(i.attributeOldValue+1,i.range.start,a.start,s,n,t),X(i.item,s,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,i,n)=>{const s=n.mapper.toViewPosition(i.position).getLastMatchingPosition((t=>!t.item.is("element","li"))).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(s)),r.breakContainer(r.createPositionAfter(s));const o=s.parent,l=o.previousSibling,a=r.createRangeOn(o),c=r.remove(a);l&&l.nextSibling&&tt(r,l,l.nextSibling),Qt(n.mapper.toModelElement(s).getAttribute("listIndent")+1,i.position,a.start,s,n,t);for(const t of r.createRangeIn(c).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",Kt,{priority:"low"})})),t.conversion.for("dataDowncast").add((e=>{e.on("insert",qt,{priority:"high"}),e.on("insert:listItem",Dt(t.model))})),t.conversion.for("upcast").add((t=>{t.on("element:ul",$t,{priority:"high"}),t.on("element:ol",$t,{priority:"high"}),t.on("element:li",Wt,{priority:"high"}),t.on("element:li",Zt)})),t.model.on("insertContent",Yt,{priority:"high"}),t.commands.add("numberedList",new Rt(t,"numbered")),t.commands.add("bulletedList",new Rt(t,"bulleted")),t.commands.add("indentList",new Ft(t,"forward")),t.commands.add("outdentList",new Ft(t,"backward"));const s=i.view.document;this.listenTo(s,"enter",((t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(s,"delete",((t,e)=>{if("backward"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const s=n.parent;if("listItem"!==s.name)return;s.previousSibling&&"listItem"===s.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(t.editing.view.document,"tab",((e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())}),{context:"li"})}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),i&&i.registerChildCommand(t.get("outdentList"))}}function ee(t){let e=1;for(const i of t.getChildren())if("ul"==i.name||"ol"==i.name)for(const t of i.getChildren())e+=ee(t);return e}class ie extends t.Plugin{static get requires(){return[te,mt]}static get pluginName(){return"List"}}class ne extends t.Command{constructor(t,e){super(t),this._defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){this._tryToConvertItemsToList(t);const e=this.editor.model,i=ot(e);i.length&&e.change((e=>{for(const n of i)e.setAttribute("listStyle",t.type||this._defaultType,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=(i=t.type,lt.includes(i)?"bulleted":at.includes(i)?"numbered":null);var i;if(!e)return;const n=this.editor,s=e+"List";n.commands.get(s).value||n.execute(s)}}class se extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=ot(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const n of i)e.setAttribute("listReversed",!!t.reversed,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}class re extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=ot(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const n of i)e.setAttribute("listStart",t.startIndex||1,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const oe="default";class le extends t.Plugin{static get requires(){return[te]}static get pluginName(){return"ListPropertiesEditing"}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,i=function(t){const e=[];t.styles&&e.push({attributeName:"listStyle",defaultValue:oe,addCommand(t){t.commands.add("listStyle",new ne(t,oe))},appliesToListItem:()=>!0,setAttributeOnDowncast(t,e,i){e&&e!==oe?t.setStyle("list-style-type",e,i):t.removeStyle("list-style-type",i)},getAttributeOnUpcast:t=>t.getStyle("list-style-type")||oe});t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,addCommand(t){t.commands.add("listReversed",new se(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,addCommand(t){t.commands.add("listStart",new re(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){1!=e?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast:t=>t.getAttribute("start")||1});return e}(t.config.get("list.properties"));e.schema.extend("listItem",{allowAttributes:i.map((t=>t.attributeName))});for(const e of i)e.addCommand(t);var n;this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t,e){return(i,n)=>{const s=n[0],r=s.getAttribute("listIndent"),o=n.filter((t=>t.getAttribute("listIndent")===r));let l=null;s.previousSibling.getAttribute("listIndent")+1!==r&&(l=it(s.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),t.model.change((t=>{for(const i of o)for(const n of e)if(n.appliesToListItem(i)){const e=null==l?n.defaultValue:l.getAttribute(n.attributeName);t.setAttribute(n.attributeName,e,i)}}))}}(t,i)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t,e){return(i,n)=>{if(!(n=n.reverse().filter((t=>t.is("element","listItem")))).length)return;const s=n[0].getAttribute("listIndent"),r=n[0].getAttribute("listType");let o=n[0].previousSibling;if(o.is("element","listItem"))for(;o.getAttribute("listIndent")!==s;)o=o.previousSibling;else o=null;o||(o=n[n.length-1].nextSibling),o&&o.is("element","listItem")&&o.getAttribute("listType")===r&&t.model.change((t=>{const i=n.filter((t=>t.getAttribute("listIndent")===s));for(const n of i)for(const i of e)if(i.appliesToListItem(n)){const e=i.attributeName,s=o.getAttribute(e);t.setAttribute(e,s,n)}}))}}(t,i)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",de(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",de(t)),e.document.registerPostFixer(function(t,e){return i=>{let n=!1;const s=ue(t.model.document.differ.getChanges()).filter((t=>"todo"!==t.getAttribute("listType")));if(!s.length)return n;let r=s[s.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=s[0].previousSibling,r)){const t=s[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==t&&(r=r.previousSibling,r););}for(const t of e){const e=t.attributeName;for(const o of s)if(t.appliesToListItem(o))if(o.hasAttribute(e)){const s=o.previousSibling;ce(s,o,t.attributeName)&&(i.setAttribute(e,s.getAttribute(e),o),n=!0)}else ae(r,o,t)?i.setAttribute(e,r.getAttribute(e),o):i.setAttribute(e,t.defaultValue,o),n=!0;else i.removeAttribute(e,o)}return n}}(t,i)),t.conversion.for("upcast").add((n=i,t=>{t.on("element:li",((t,e,i)=>{const s=e.viewItem.parent;if(!s)return;const r=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;for(const t of n)if(t.appliesToListItem(r)){const e=t.getAttributeOnUpcast(s);i.writer.setAttribute(t.attributeName,e,r)}}),{priority:"low"})})),t.conversion.for("downcast").add(function(t){return i=>{for(const n of t)i.on(`attribute:${n.attributeName}:listItem`,((t,i,s)=>{const r=s.writer,o=i.item,l=it(o.previousSibling,{sameIndent:!0,listIndent:o.getAttribute("listIndent"),direction:"backward"}),a=s.mapper.toViewElement(o);e(o,l)||r.breakContainer(r.createPositionBefore(a)),n.setAttributeOnDowncast(r,i.attributeNewValue,a.parent)}),{priority:"low"})};function e(t,e){return e&&t.getAttribute("listType")===e.getAttribute("listType")&&t.getAttribute("listIndent")===e.getAttribute("listIndent")&&t.getAttribute("listStyle")===e.getAttribute("listStyle")&&t.getAttribute("listReversed")===e.getAttribute("listReversed")&&t.getAttribute("listStart")===e.getAttribute("listStart")}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const i=ue(t.model.document.differ.getChanges()).filter((t=>"todo"===t.getAttribute("listType")&&(t.hasAttribute("listStyle")||t.hasAttribute("listReversed")||t.hasAttribute("listStart"))));if(!i.length)return!1;for(const t of i)e.removeAttribute("listStyle",t),e.removeAttribute("listReversed",t),e.removeAttribute("listStart",t);return!0}}(t))}_mergeListAttributesWhileMergingLists(t){const e=this.editor.model;let i;this.listenTo(e,"deleteContent",((t,[e])=>{const n=e.getFirstPosition(),s=e.getLastPosition();if(n.parent===s.parent)return;if(!n.parent.is("element","listItem"))return;const r=s.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const o=it(n.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});o&&o.getAttribute("listType")===r.getAttribute("listType")&&(i=o)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i&&(e.change((e=>{const n=it(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!n)return void(i=null);const s=[n,...rt(e.createPositionAt(n,0),"forward")];for(const n of s)for(const s of t)if(s.appliesToListItem(n)){const t=s.attributeName,r=i.getAttribute(t);e.setAttribute(t,r,n)}})),i=null)}),{priority:"low"})}}function ae(t,e,i){if(!t)return!1;const n=t.getAttribute(i.attributeName);return!!n&&(n!=i.defaultValue&&t.getAttribute("listType")===e.getAttribute("listType"))}function ce(t,e,i){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const n=t.getAttribute("listIndent");if(n<1||n!==e.getAttribute("listIndent"))return!1;const s=t.getAttribute(i);return!(!s||s===e.getAttribute(i))}function de(t){return(e,i)=>{i=i.filter((t=>t.is("element","listItem"))),t.model.change((t=>{for(const e of i)t.removeAttribute("listStyle",e)}))}}function ue(t){const e=[];for(const i of t){const t=me(i);t&&t.is("element","listItem")&&e.push(t)}return e}function me(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}class pe extends t.Plugin{static get requires(){return[le,Bt]}static get pluginName(){return"ListProperties"}}const he="todoListChecked";class fe extends t.Command{constructor(t){super(t),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((t=>!!t.getAttribute("todoListChecked"))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),n=i.start.parent,s=[];e.checkAttribute(n,he)&&s.push(n);for(const t of i.getItems())e.checkAttribute(t,he)&&!s.includes(t)&&s.push(t);return s}execute(t={}){this.editor.model.change((e=>{for(const i of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute(he,!0,i):e.removeAttribute(he,i)}}))}}function be(t,e,i){const n=e.modelCursor,s=n.parent,r=e.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=s.name||!n.isAtStart)return;if(!i.consumable.consume(r,{name:!0}))return;const o=i.writer;o.setAttribute("listType","todo",s),e.viewItem.hasAttribute("checked")&&o.setAttribute("todoListChecked",!0,s),e.modelRange=o.createRange(n)}function ge(t){return(e,i)=>{const n=i.modelPosition,s=n.parent;if(!s.is("element","listItem")||"todo"!=s.getAttribute("listType"))return;const r=ve(i.mapper.toViewElement(s),t);r&&(i.viewPosition=i.mapper.findPositionIn(r,n.offset))}}function ye(t,e,i,n){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(e){const s=(0,r.createElement)(document,"input",{type:"checkbox",tabindex:-1});i&&s.setAttribute("checked","checked"),s.addEventListener("change",(()=>n(t)));const o=this.toDomElement(e);return o.appendChild(s),o}))}function ve(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const we=(0,r.parseKeystroke)("Ctrl+Enter");class Ae extends t.Plugin{static get pluginName(){return"TodoListEditing"}static get requires(){return[te]}init(){const t=this.editor,{editing:e,data:i,model:n}=t;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck(((t,e)=>{const i=t.last;if("todoListChecked"==e&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1})),t.commands.add("todoList",new Rt(t,"todo"));const s=new fe(t);var o,l;t.commands.add("checkTodoList",s),t.commands.add("todoListCheck",s),i.downcastDispatcher.on("insert:listItem",function(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const r=i.item;s.consume(r,"insert"),s.consume(r,"attribute:listType"),s.consume(r,"attribute:listIndent"),s.consume(r,"attribute:todoListChecked");const o=n.writer,l=Q(r,n);o.addClass("todo-list",l.parent);const a=o.createContainerElement("label",{class:"todo-list__label"}),c=o.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=o.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&o.setAttribute("checked","checked",c),o.insert(o.createPositionAt(l,0),a),o.insert(o.createPositionAt(a,0),c),o.insert(o.createPositionAfter(c),d),X(r,l,n,t)}}(n),{priority:"high"}),i.upcastDispatcher.on("element:input",be,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(i,n,s)=>{const r=s.consumable;if(!r.test(n.item,"insert")||!r.test(n.item,"attribute:listType")||!r.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const o=n.item;r.consume(o,"insert"),r.consume(o,"attribute:listType"),r.consume(o,"attribute:listIndent"),r.consume(o,"attribute:todoListChecked");const l=s.writer,a=Q(o,s),c=!!o.getAttribute("todoListChecked"),d=ye(o,l,c,e),u=l.createContainerElement("span",{class:"todo-list__label__description"});l.addClass("todo-list",a.parent),l.insert(l.createPositionAt(a,0),d),l.insert(l.createPositionAfter(d),u),X(o,a,s,t)}}(n,(t=>this._handleCheckmarkChange(t))),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(o=t=>this._handleCheckmarkChange(t),l=e.view,(t,e,i)=>{if(!i.consumable.consume(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer,r=function(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("uiElement","label"))return t.item}(n,l);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),i=ye(e.item,s,t,o),r=s.createContainerElement("span",{class:"todo-list__label__description"}),l=s.createRangeIn(n),a=st(n),c=et(l.start),d=a?s.createPositionBefore(a):l.end,u=s.createRange(c,d);s.addClass("todo-list",n.parent),s.move(u,s.createPositionAt(r,0)),s.insert(s.createPositionAt(n,0),i),s.insert(s.createPositionAfter(i),r)}else if("todo"==e.attributeOldValue){const t=ve(n,l);s.removeClass("todo-list",n.parent),s.remove(r),s.move(s.createRangeIn(t),s.createPositionBefore(t)),s.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,i,n)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!n.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:s,writer:r}=n,o=!!i.item.getAttribute("todoListChecked"),l=s.toViewElement(i.item).getChild(0),a=ye(i.item,r,o,t);r.insert(r.createPositionAfter(l),a),r.remove(l)}}((t=>this._handleCheckmarkChange(t)))),e.mapper.on("modelToViewPosition",ge(e.view)),i.mapper.on("modelToViewPosition",ge(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(i,n)=>{if("left"!=(0,r.getLocalizedArrowKeyCodeDirection)(n.keyCode,e.contentLanguageDirection))return;const s=t.schema,o=t.document.selection;if(!o.isCollapsed)return;const l=o.getFirstPosition(),a=l.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&l.isAtStart){const e=s.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change((t=>t.setSelection(e))),n.preventDefault(),n.stopPropagation(),i.stop()}}}(n,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",((e,i)=>{(0,r.getCode)(i)===we&&(t.execute("checkTodoList"),e.stop())}),{priority:"high"});const a=new Set;this.listenTo(n,"applyOperation",((t,e)=>{const i=e[0];if("rename"==i.type&&"listItem"==i.oldName){const t=i.position.nodeAfter;t.hasAttribute("todoListChecked")&&a.add(t)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const t of i.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&a.add(t)})),n.document.registerPostFixer((t=>{let e=!1;for(const i of a)t.removeAttribute("todoListChecked",i),e=!0;return a.clear(),e}))}_handleCheckmarkChange(t){const e=this.editor,i=e.model,n=Array.from(i.document.selection.getRanges());i.change((i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(n)}))}}class Ie extends t.Plugin{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;nt(this.editor,"todoList",t("To-do List"),'')}}var ke=i(250),xe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(ke.Z,xe);ke.Z.locals;class Te extends t.Plugin{static get requires(){return[Ae,Ie]}static get pluginName(){return"TodoList"}}})(),(window.CKEditor5=window.CKEditor5||{}).list=n})(); \ No newline at end of file + */(()=>{var t={389:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck.ck-collapsible.ck-collapsible_collapsed>.ck-collapsible__children{display:none}:root{--ck-collapsible-arrow-size:calc(var(--ck-icon-size)*0.5)}.ck.ck-collapsible>.ck.ck-button{border-radius:0;color:inherit;font-weight:700;padding:var(--ck-spacing-medium) var(--ck-spacing-large);width:100%}.ck.ck-collapsible>.ck.ck-button:focus{background:transparent}.ck.ck-collapsible>.ck.ck-button:active,.ck.ck-collapsible>.ck.ck-button:hover:not(:focus),.ck.ck-collapsible>.ck.ck-button:not(:focus){background:transparent;border-color:transparent;box-shadow:none}.ck.ck-collapsible>.ck.ck-button>.ck-icon{margin-right:var(--ck-spacing-medium);width:var(--ck-collapsible-arrow-size)}.ck.ck-collapsible>.ck-collapsible__children{padding:0 var(--ck-spacing-large) var(--ck-spacing-large)}.ck.ck-collapsible.ck-collapsible_collapsed>.ck.ck-button .ck-icon{transform:rotate(-90deg)}",""]);const r=s},78:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck-editor__editable .ck-list-bogus-paragraph{display:block}",""]);const r=s},543:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck.ck-list-properties.ck-list-properties_without-styles{padding:var(--ck-spacing-large)}.ck.ck-list-properties.ck-list-properties_without-styles>*{min-width:14em}.ck.ck-list-properties.ck-list-properties_without-styles>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-list-styles-list{grid-template-columns:repeat(4,auto)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible{border-top:1px solid var(--ck-color-base-border)}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*{width:100%}.ck.ck-list-properties.ck-list-properties_with-numbered-properties>.ck-collapsible>.ck-collapsible__children>*+*{margin-top:var(--ck-spacing-standard)}.ck.ck-list-properties .ck.ck-numbered-list-properties__start-index .ck-input{min-width:auto;width:100%}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order{background:transparent;margin-bottom:calc(var(--ck-spacing-tiny)*-1);padding-left:0;padding-right:0}.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:active,.ck.ck-list-properties .ck.ck-numbered-list-properties__reversed-order:hover{background:none;border-color:transparent;box-shadow:none}",""]);const r=s},657:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,".ck.ck-list-styles-list{display:grid}.ck-content ol{list-style-type:decimal}.ck-content ol ol{list-style-type:lower-latin}.ck-content ol ol ol{list-style-type:lower-roman}.ck-content ol ol ol ol{list-style-type:upper-latin}.ck-content ol ol ol ol ol{list-style-type:upper-roman}.ck-content ul{list-style-type:circle}.ck-content ul ul{list-style-type:disc}.ck-content ul ul ul,.ck-content ul ul ul ul{list-style-type:square}:root{--ck-list-style-button-size:44px}.ck.ck-list-styles-list{column-gap:var(--ck-spacing-medium);grid-template-columns:repeat(3,auto);padding:var(--ck-spacing-large);row-gap:var(--ck-spacing-medium)}.ck.ck-list-styles-list .ck-button{box-sizing:content-box;margin:0;padding:0}.ck.ck-list-styles-list .ck-button,.ck.ck-list-styles-list .ck-button .ck-icon{height:var(--ck-list-style-button-size);width:var(--ck-list-style-button-size)}",""]);const r=s},250:(t,e,i)=>{"use strict";i.d(e,{Z:()=>r});var n=i(609),s=i.n(n)()((function(t){return t[1]}));s.push([t.id,':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;border:0;display:inline-block;height:var(--ck-todo-list-checkmark-size);left:-25px;margin-left:0;margin-right:-15px;position:relative;right:0;vertical-align:middle;width:var(--ck-todo-list-checkmark-size)}.ck-content .todo-list .todo-list__label>input:before{border:1px solid #333;border-radius:2px;box-sizing:border-box;content:"";display:block;height:100%;position:absolute;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out;width:100%}.ck-content .todo-list .todo-list__label>input:after{border-color:transparent;border-style:solid;border-width:0 calc(var(--ck-todo-list-checkmark-size)/8) calc(var(--ck-todo-list-checkmark-size)/8) 0;box-sizing:content-box;content:"";display:block;height:calc(var(--ck-todo-list-checkmark-size)/2.6);left:calc(var(--ck-todo-list-checkmark-size)/3);pointer-events:none;position:absolute;top:calc(var(--ck-todo-list-checkmark-size)/5.3);transform:rotate(45deg);width:calc(var(--ck-todo-list-checkmark-size)/5.3)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-left:-15px;margin-right:0;right:-25px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}',""]);const r=s},609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i=t(e);return e[2]?"@media ".concat(e[2]," {").concat(i,"}"):i})).join("")},e.i=function(t,i,n){"string"==typeof t&&(t=[[null,t,""]]);var s={};if(n)for(var r=0;r{"use strict";var n,s=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},r=function(){var t={};return function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}t[e]=i}return t[e]}}(),o=[];function l(t){for(var e=-1,i=0;i{t.exports=i(79)("./src/core.js")},492:(t,e,i)=>{t.exports=i(79)("./src/engine.js")},331:(t,e,i)=>{t.exports=i(79)("./src/enter.js")},181:(t,e,i)=>{t.exports=i(79)("./src/typing.js")},273:(t,e,i)=>{t.exports=i(79)("./src/ui.js")},209:(t,e,i)=>{t.exports=i(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function i(n){var s=e[n];if(void 0!==s)return s.exports;var r=e[n]={id:n,exports:{}};return t[n](r,r.exports,i),r.exports}i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.nc=void 0;var n={};(()=>{"use strict";i.r(n),i.d(n,{DocumentList:()=>pt,DocumentListEditing:()=>G,DocumentListProperties:()=>Mt,DocumentListPropertiesEditing:()=>Tt,List:()=>ie,ListEditing:()=>te,ListProperties:()=>pe,ListPropertiesEditing:()=>le,ListPropertiesUI:()=>Bt,ListUI:()=>mt,TodoList:()=>Te,TodoListEditing:()=>Ae,TodoListUI:()=>Ie});var t=i(704),e=i(331),s=i(181),r=i(209);class o{constructor(t,e){this._startElement=t,this._referenceIndent=t.getAttribute("listIndent"),this._isForward="forward"==e.direction,this._includeSelf=!!e.includeSelf,this._sameAttributes=(0,r.toArray)(e.sameAttributes||[]),this._sameIndent=!!e.sameIndent,this._lowerIndent=!!e.lowerIndent,this._higherIndent=!!e.higherIndent}static first(t,e){const i=new this(t,e)[Symbol.iterator]();return(0,r.first)(i)}*[Symbol.iterator](){const t=[];for(const{node:e}of l(this._getStartNode(),this._isForward?"forward":"backward")){const i=e.getAttribute("listIndent");if(ithis._referenceIndent){if(!this._higherIndent)continue;if(!this._isForward){t.push(e);continue}}else{if(!this._sameIndent){if(this._higherIndent){t.length&&(yield*t,t.length=0);break}continue}if(this._sameAttributes.some((t=>e.getAttribute(t)!==this._startElement.getAttribute(t))))break}t.length&&(yield*t,t.length=0),yield e}}_getStartNode(){return this._includeSelf?this._startElement:this._isForward?this._startElement.nextSibling:this._startElement.previousSibling}}function*l(t,e="forward"){const i="forward"==e;let n=null;for(;d(t);)yield{node:t,previous:n},n=t,t=i?t.nextSibling:t.previousSibling}class a{constructor(t){this._listHead=t}[Symbol.iterator](){return l(this._listHead,"forward")}}class c{static next(){return(0,r.uid)()}}function d(t){return!!t&&t.is("element")&&t.hasAttribute("listItemId")}function u(t,e={}){return[...m(t,{...e,direction:"backward"}),...m(t,{...e,direction:"forward"})]}function m(t,e={}){const i="forward"==e.direction,n=Array.from(new o(t,{...e,includeSelf:i,sameIndent:!0,sameAttributes:"listItemId"}));return i?n:n.reverse()}function p(t){const e=new o(t,{sameIndent:!0,sameAttributes:"listType"}),i=new o(t,{sameIndent:!0,sameAttributes:"listType",includeSelf:!0,direction:"forward"});return[...Array.from(e).reverse(),...i]}function h(t){return!o.first(t,{sameIndent:!0,sameAttributes:"listItemId"})}function f(t){return!o.first(t,{direction:"forward",sameIndent:!0,sameAttributes:"listItemId"})}function b(t,e={}){t=(0,r.toArray)(t);const i=!1!==e.withNested,n=new Set;for(const e of t)for(const t of u(e,{higherIndent:i}))n.add(t);return k(n)}function g(t){t=(0,r.toArray)(t);const e=new Set;for(const i of t)for(const t of p(i))e.add(t);return k(e)}function y(t,e){const i=m(t,{direction:"forward"}),n=c.next();for(const t of i)e.setAttribute("listItemId",n,t);return i}function v(t,e,i){const n={};for(const[t,i]of e.getAttributes())t.startsWith("list")&&(n[t]=i);const s=m(t,{direction:"forward"});for(const t of s)i.setAttributes(n,t);return s}function w(t,e,{expand:i,indentBy:n=1}={}){t=(0,r.toArray)(t);const s=i?b(t):t;for(const t of s){const i=t.getAttribute("listIndent")+n;i<0?A(t,e):e.setAttribute("listIndent",i,t)}return s}function A(t,e){t=(0,r.toArray)(t);for(const i of t)for(const t of i.getAttributeKeys())t.startsWith("list")&&e.removeAttribute(t,i);return t}function I(t){if(!t.length)return!1;const e=t[0].getAttribute("listItemId");return!!e&&!t.some((t=>t.getAttribute("listItemId")!=e))}function k(t){return Array.from(t).filter((t=>"$graveyard"!==t.root.rootName)).sort(((t,e)=>t.index-e.index))}function x(t){const e=t.document.selection.getSelectedElement();return e&&t.schema.isObject(e)&&t.schema.isBlock(e)?e:null}function T(t,e,i){return m(e,{direction:"forward"}).pop().index>t.index?v(t,e,i):[]}class S extends t.Command{constructor(t,e){super(t),this._direction=e}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=_(t.document.selection);t.change((t=>{const i=[];I(e)&&!h(e[0])?("forward"==this._direction&&i.push(...w(e,t)),i.push(...y(e[0],t))):"forward"==this._direction?i.push(...w(e,t,{expand:!0})):i.push(...function(t,e){const i=b(t=(0,r.toArray)(t)),n=new Set,s=Math.min(...i.map((t=>t.getAttribute("listIndent")))),l=new Map;for(const t of i)l.set(t,o.first(t,{lowerIndent:!0}));for(const t of i){if(n.has(t))continue;n.add(t);const i=t.getAttribute("listIndent")-1;if(i<0)A(t,e);else{if(t.getAttribute("listIndent")==s){const i=T(t,l.get(t),e);for(const t of i)n.add(t);if(i.length)continue}e.setAttribute("listIndent",i,t)}}return k(n)}(e,t));for(const e of i){if(!e.hasAttribute("listType"))continue;const i=o.first(e,{sameIndent:!0});i&&t.setAttribute("listType",i.getAttribute("listType"),e)}this._fireAfterExecute(i)}))}_fireAfterExecute(t){this.fire("afterExecute",k(new Set(t)))}_checkEnabled(){let t=_(this.editor.model.document.selection),e=t[0];if(!e)return!1;if("backward"==this._direction)return!0;if(I(t)&&!h(t[0]))return!0;t=b(t),e=t[0];const i=o.first(e,{sameIndent:!0});return!!i&&i.getAttribute("listType")==e.getAttribute("listType")}}function _(t){const e=Array.from(t.getSelectedBlocks()),i=e.findIndex((t=>!d(t)));return-1!=i&&(e.length=i),e}class C extends t.Command{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=x(e),s=Array.from(i.selection.getSelectedBlocks()).filter((t=>e.schema.checkAttribute(t,"listType"))),r=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(r){const e=s[s.length-1],i=m(e,{direction:"forward"}),n=[];i.length>1&&n.push(...y(i[1],t)),n.push(...A(s,t)),n.push(...function(t,e){const i=[];let n=Number.POSITIVE_INFINITY;for(const{node:s}of l(t.nextSibling,"forward")){const t=s.getAttribute("listIndent");if(0==t)break;t{const{firstElement:r,lastElement:l}=this._getMergeSubjectElements(i,t),a=r.getAttribute("listIndent")||0,c=l.getAttribute("listIndent"),d=l.getAttribute("listItemId");if(a!=c){const t=(u=l,Array.from(new o(u,{direction:"forward",higherIndent:!0})));n.push(...w([l,...t],s,{indentBy:a-c,expand:a{const e=y(this._getStartBlock(),t);this._fireAfterExecute(e)}))}_fireAfterExecute(t){this.fire("afterExecute",k(new Set(t)))}_checkEnabled(){const t=this.editor.model.document.selection,e=this._getStartBlock();return t.isCollapsed&&d(e)&&!h(e)}_getStartBlock(){const t=this.editor.model.document.selection.getFirstPosition().parent;return"before"==this._direction?t:t.nextSibling}}function E(t){return t.is("element","ol")||t.is("element","ul")}function P(t){return t.is("element","li")}function z(t){let e=0,i=t.parent;for(;i;){if(P(i))e++;else{const t=i.previousSibling;t&&P(t)&&e++}i=i.parent}return e}function B(t,e,i,n=R(i,e)){return t.createAttributeElement(M(i),null,{priority:2*e/100-100,id:n})}function N(t,e,i){return t.createAttributeElement("li",null,{priority:(2*e+1)/100-100,id:i})}function M(t){return"numbered"==t?"ol":"ul"}function R(t,e){return`list-${t}-${e}`}function O(t,e){const i=t.nodeBefore;if(d(i)){let t=i;for({node:t}of l(t,"backward"))if(e.has(t))return;e.set(i,t)}else{const i=t.nodeAfter;d(i)&&e.set(i,i)}}var H=i(492);function F(){return(t,e,i)=>{if(!i.consumable.test(e.viewItem,{name:!0}))return;const n=new H.UpcastWriter(e.viewItem.document);for(const t of Array.from(e.viewItem.getChildren()))P(t)||E(t)||n.remove(t)}}function D(t,e,i){const n=function(t){return(e,i)=>{const n=[];for(const i of t)e.hasAttribute(i)&&n.push(`attribute:${i}`);return!!n.every((t=>!1!==i.test(e,t)))&&(n.forEach((t=>i.consume(e,t))),!0)}}(t);return(s,r,l)=>{const{writer:a,mapper:c,consumable:d}=l,u=r.item;if(!t.includes(r.attributeKey))return;if(!n(u,d))return;const m=function(t,e,i){const n=i.createRangeOn(t);return e.toViewRange(n).getTrimmed().getContainedElement()}(u,c,i);!function(t,e){let i=t.parent;for(;i.is("attributeElement")&&["ul","ol","li"].includes(i.name);){const n=i.parent;e.unwrap(e.createRangeOn(t),i),i=n}}(m,a),function(t,e,i,n){if(!t.hasAttribute("listIndent"))return;const s=t.getAttribute("listIndent");let r=t;for(let t=s;t>=0;t--){const s=N(n,t,r.getAttribute("listItemId")),l=B(n,t,r.getAttribute("listType"));for(const t of i)r.hasAttribute(t.attributeName)&&t.setAttributeOnDowncast(n,r.getAttribute(t.attributeName),"list"==t.scope?l:s);if(e=n.wrap(e,s),e=n.wrap(e,l),0==t)break;if(r=o.first(r,{lowerIndent:!0}),!r)break}}(u,a.createRangeOn(m),e,a)}}function j(t,{dataPipeline:e}={}){return(i,{writer:n})=>{if(!U(i,t))return;const s=n.createContainerElement("span",{class:"ck-list-bogus-paragraph"});return e&&n.setCustomProperty("dataPipeline:transparentRendering",!0,s),s}}function U(t,e,i=u(t)){if(!d(t))return!1;for(const i of t.getAttributeKeys())if(!i.startsWith("selection:")&&!e.includes(i))return!1;return i.length<2}var q=i(62),K=i.n(q),Z=i(78),$={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(Z.Z,$);Z.Z.locals;const W=["listType","listIndent","listItemId"];class G extends t.Plugin{static get pluginName(){return"DocumentListEditing"}static get requires(){return[e.Enter,s.Delete]}constructor(t){super(t),this._downcastStrategies=[]}init(){const t=this.editor,e=t.model;if(t.plugins.has("ListEditing"))throw new r.CKEditorError("document-list-feature-conflict",this,{conflictPlugin:"ListEditing"});e.schema.extend("$container",{allowAttributes:W}),e.schema.extend("$block",{allowAttributes:W}),e.schema.extend("$blockObject",{allowAttributes:W});for(const t of W)e.schema.setAttributeProperties(t,{copyOnReplace:!0});t.commands.add("numberedList",new C(t,"numbered")),t.commands.add("bulletedList",new C(t,"bulleted")),t.commands.add("indentList",new S(t,"forward")),t.commands.add("outdentList",new S(t,"backward")),t.commands.add("mergeListItemBackward",new V(t,"backward")),t.commands.add("mergeListItemForward",new V(t,"forward")),t.commands.add("splitListItemBefore",new L(t,"before")),t.commands.add("splitListItemAfter",new L(t,"after")),this._setupDeleteIntegration(),this._setupEnterIntegration(),this._setupTabIntegration(),this._setupClipboardIntegration()}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList"),{priority:"high"}),i&&i.registerChildCommand(t.get("outdentList"),{priority:"lowest"}),this._setupModelPostFixing(),this._setupConversion()}registerDowncastStrategy(t){this._downcastStrategies.push(t)}_getListAttributeNames(){return[...W,...this._downcastStrategies.map((t=>t.attributeName))]}_setupDeleteIntegration(){const t=this.editor,e=t.commands.get("mergeListItemBackward"),i=t.commands.get("mergeListItemForward");this.listenTo(t.editing.view.document,"delete",((n,s)=>{const r=t.model.document.selection;x(t.model)||t.model.change((()=>{const l=r.getFirstPosition();if(r.isCollapsed&&"backward"==s.direction){if(!l.isAtStart)return;const i=l.parent;if(!d(i))return;if(o.first(i,{sameAttributes:"listType",sameIndent:!0})||0!==i.getAttribute("listIndent")){if(!e.isEnabled)return;e.execute({shouldMergeOnBlocksContentLevel:Y(t.model,"backward")})}else f(i)||t.execute("splitListItemAfter"),t.execute("outdentList");s.preventDefault(),n.stop()}else{if(r.isCollapsed&&!r.getLastPosition().isAtEnd)return;if(!i.isEnabled)return;i.execute({shouldMergeOnBlocksContentLevel:Y(t.model,"forward")}),s.preventDefault(),n.stop()}}))}),{context:"li"})}_setupEnterIntegration(){const t=this.editor,e=t.model,i=t.commands,n=i.get("enter");this.listenTo(t.editing.view.document,"enter",((i,n)=>{const s=e.document,r=s.selection.getFirstPosition().parent;if(s.selection.isCollapsed&&d(r)&&r.isEmpty&&!n.isSoft){const e=h(r),s=f(r);e&&s?(t.execute("outdentList"),n.preventDefault(),i.stop()):e&&!s?(t.execute("splitListItemAfter"),n.preventDefault(),i.stop()):s&&(t.execute("splitListItemBefore"),n.preventDefault(),i.stop())}}),{context:"li"}),this.listenTo(n,"afterExecute",(()=>{const e=i.get("splitListItemBefore");if(e.refresh(),!e.isEnabled)return;2===u(t.model.document.selection.getLastPosition().parent).length&&e.execute()}))}_setupTabIntegration(){const t=this.editor;this.listenTo(t.editing.view.document,"tab",((e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())}),{context:"li"})}_setupConversion(){const t=this.editor,e=t.model,i=this._getListAttributeNames();t.conversion.for("upcast").elementToElement({view:"li",model:"paragraph"}).add((t=>{t.on("element:li",((t,e,i)=>{const{writer:n,schema:s}=i;if(!e.modelRange)return;const r=Array.from(e.modelRange.getItems({shallow:!0})).filter((t=>s.checkAttribute(t,"listItemId")));if(!r.length)return;const o={listItemId:c.next(),listIndent:z(e.viewItem),listType:e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted"};for(const t of r)d(t)||n.setAttributes(o,t);r.length>1&&r[1].getAttribute("listItemId")!=o.listItemId&&i.keepEmptyElement(r[0])})),t.on("element:ul",F(),{priority:"high"}),t.on("element:ol",F(),{priority:"high"})})),t.conversion.for("editingDowncast").elementToElement({model:"paragraph",view:j(i),converterPriority:"high"}),t.conversion.for("dataDowncast").elementToElement({model:"paragraph",view:j(i,{dataPipeline:!0}),converterPriority:"high"}),t.conversion.for("downcast").add((t=>{t.on("attribute",D(i,this._downcastStrategies,e))})),this.listenTo(e.document,"change:data",function(t,e,i,n){return()=>{const n=t.document.differ.getChanges(),o=[],l=new Map,a=new Set;for(const t of n)if("insert"==t.type&&"$text"!=t.name)O(t.position,l),t.attributes.has("listItemId")?a.add(t.position.nodeAfter):O(t.position.getShiftedBy(t.length),l);else if("remove"==t.type&&t.attributes.has("listItemId"))O(t.position,l);else if("attribute"==t.type){const e=t.range.start.nodeAfter;i.includes(t.attributeKey)?(O(t.range.start,l),null===t.attributeNewValue?(O(t.range.start.getShiftedBy(1),l),r(e)&&o.push(e)):a.add(e)):d(e)&&r(e)&&o.push(e)}for(const t of l.values())o.push(...s(t,a));for(const t of new Set(o))e.reconvertItem(t)};function s(t,e){const n=[],s=new Set,a=[];for(const{node:c,previous:d}of l(t,"forward")){if(s.has(c))continue;const t=c.getAttribute("listIndent");d&&ti.includes(t))));const l=m(c,{direction:"forward"});for(const t of l)s.add(t),(r(t,l)||o(t,a,e))&&n.push(t)}return n}function r(t,n){if(!t.is("element","paragraph"))return!1;const s=e.mapper.toViewElement(t);if(!s)return!1;const r=U(t,i,n);return!(!r||!s.is("element","p"))||!(r||!s.is("element","span"))}function o(t,i,s){if(s.has(t))return!1;const r=e.mapper.toViewElement(t);let o=i.length-1;for(let t=r.parent;!t.is("editableElement");t=t.parent){const e=P(t),s=E(t);if(!s&&!e)continue;const r="checkAttributes:"+(e?"item":"list");if(n.fire(r,{viewElement:t,modelAttributes:i[o]}))break;if(s&&(o--,o<0))return!1}return!0}}(e,t.editing,i,this)),this.on("checkAttributes:item",((t,{viewElement:e,modelAttributes:i})=>{e.id!=i.listItemId&&(t.return=!0,t.stop())})),this.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:i})=>{e.name==M(i.listType)&&e.id==R(i.listType,i.listIndent)||(t.return=!0,t.stop())}))}_setupModelPostFixing(){const t=this.editor.model,e=this._getListAttributeNames();t.document.registerPostFixer((i=>function(t,e,i,n){const s=t.document.differ.getChanges(),r=new Map;let o=!1;for(const n of s)if("insert"==n.type&&"$text"!=n.name){const s=n.position.nodeAfter;if(!t.schema.checkAttribute(s,"listItemId"))for(const t of Array.from(s.getAttributeKeys()))i.includes(t)&&(e.removeAttribute(t,s),o=!0);O(n.position,r),n.attributes.has("listItemId")||O(n.position.getShiftedBy(n.length),r);for(const{item:e,previousPosition:i}of t.createRangeIn(s))d(e)&&O(i,r)}else"remove"==n.type?O(n.position,r):"attribute"==n.type&&i.includes(n.attributeKey)&&(O(n.range.start,r),null===n.attributeNewValue&&O(n.range.start.getShiftedBy(1),r));const l=new Set;for(const t of r.values())o=n.fire("postFixer",{listNodes:new a(t),listHead:t,writer:e,seenIds:l})||o;return o}(t,i,e,this))),this.on("postFixer",((t,{listNodes:e,writer:i})=>{t.return=function(t,e){let i=0,n=-1,s=null,r=!1;for(const{node:o}of t){const t=o.getAttribute("listIndent");if(t>i){let l;null===s?(s=t-i,l=i):(s>t&&(s=t),l=t-s),l>n+1&&(l=n+1),e.setAttribute("listIndent",l,o),r=!0,n=l}else s=null,i=t+1,n=t}return r}(e,i)||t.return}),{priority:"high"}),this.on("postFixer",((t,{listNodes:e,writer:i,seenIds:n})=>{t.return=function(t,e,i){const n=new Set;let s=!1;for(const{node:r}of t){if(n.has(r))continue;let t=r.getAttribute("listType"),o=r.getAttribute("listItemId");e.has(o)&&(o=c.next()),e.add(o);for(const e of m(r,{direction:"forward"}))n.add(e),e.getAttribute("listType")!=t&&(o=c.next(),t=e.getAttribute("listType")),e.getAttribute("listItemId")!=o&&(i.setAttribute("listItemId",o,e),s=!0)}return s}(e,n,i)||t.return}),{priority:"high"})}_setupClipboardIntegration(){const t=this.editor.model;this.listenTo(t,"insertContent",function(t){return(e,[i,n])=>{const s=i.is("documentFragment")?i.getChild(0):i;if(!d(s))return;let r;r=n?t.createSelection(n):t.document.selection;const o=r.getFirstPosition();let a=null;if(d(o.parent)?a=o.parent:d(o.nodeBefore)&&(a=o.nodeBefore),!a)return;const c=a.getAttribute("listIndent")-s.getAttribute("listIndent");c<=0||t.change((t=>{for(const{node:e}of l(s,"forward"))t.setAttribute("listIndent",e.getAttribute("listIndent")+c,e)}))}}(t),{priority:"high"}),this.listenTo(t,"getSelectedContent",((e,[i])=>{I(Array.from(i.getSelectedBlocks()))&&t.change((t=>A(Array.from(e.return.getChildren()),t)))}))}}function Y(t,e){const i=t.document.selection;if(!i.isCollapsed)return!x(t);if("forward"===e)return!0;const n=i.getFirstPosition().parent,s=n.previousSibling;return!t.schema.isObject(s)&&(!!s.isEmpty||I([n,s]))}var J=i(273);function Q(t,e){const i=e.mapper,n=e.writer,s="numbered"==t.getAttribute("listType")?"ol":"ul",r=function(t){const e=t.createContainerElement("li");return e.getFillerOffset=ct,e}(n),o=n.createContainerElement(s,null);return n.insert(n.createPositionAt(o,0),r),i.bindElements(t,r),r}function X(t,e,i,n){const s=e.parent,r=i.mapper,o=i.writer;let l=r.toViewPosition(n.createPositionBefore(t));const a=it(t.previousSibling,{sameIndent:!0,smallerIndent:!0,listIndent:t.getAttribute("listIndent")}),c=t.previousSibling;if(a&&a.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(a);l=o.breakContainer(o.createPositionAfter(t))}else if(c&&"listItem"==c.name){l=r.toViewPosition(n.createPositionAt(c,"end"));const t=r.findMappedViewAncestor(l),e=st(t);l=e?o.createPositionBefore(e):o.createPositionAt(t,"end")}else l=r.toViewPosition(n.createPositionBefore(t));if(l=et(l),o.insert(l,s),c&&"listItem"==c.name){const t=r.toViewElement(c),i=o.createRange(o.createPositionAt(t,0),l).getWalker({ignoreElementEnd:!0});for(const t of i)if(t.item.is("element","li")){const n=o.breakContainer(o.createPositionBefore(t.item)),s=t.item.parent,r=o.createPositionAt(e,"end");tt(o,r.nodeBefore,r.nodeAfter),o.move(o.createRangeOn(s),r),i.position=n}}else{const i=s.nextSibling;if(i&&(i.is("element","ul")||i.is("element","ol"))){let n=null;for(const e of i.getChildren()){const i=r.toModelElement(e);if(!(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")))break;n=e}n&&(o.breakContainer(o.createPositionAfter(n)),o.move(o.createRangeOn(n.parent),o.createPositionAt(e,"end")))}}tt(o,s,s.nextSibling),tt(o,s.previousSibling,s)}function tt(t,e,i){return!e||!i||"ul"!=e.name&&"ol"!=e.name||e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")?null:t.mergeContainers(t.createPositionAfter(e))}function et(t){return t.getLastMatchingPosition((t=>t.item.is("uiElement")))}function it(t,e){const i=!!e.sameIndent,n=!!e.smallerIndent,s=e.listIndent;let r=t;for(;r&&"listItem"==r.name;){const t=r.getAttribute("listIndent");if(i&&s==t||n&&s>t)return r;r="forward"===e.direction?r.nextSibling:r.previousSibling}return null}function nt(t,e,i,n){t.ui.componentFactory.add(e,(s=>{const r=t.commands.get(e),o=new J.ButtonView(s);return o.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),o.bind("isOn","isEnabled").to(r,"value","isEnabled"),o.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),o}))}function st(t){for(const e of t.getChildren())if("ul"==e.name||"ol"==e.name)return e;return null}function rt(t,e){const i=[],n=t.parent,s={ignoreElementEnd:!1,startPosition:t,shallow:!0,direction:e},r=n.getAttribute("listIndent"),o=[...new H.TreeWalker(s)].filter((t=>t.item.is("element"))).map((t=>t.item));for(const t of o){if(!t.is("element","listItem"))break;if(t.getAttribute("listIndent")r)){if(t.getAttribute("listType")!==n.getAttribute("listType"))break;if(t.getAttribute("listStyle")!==n.getAttribute("listStyle"))break;if(t.getAttribute("listReversed")!==n.getAttribute("listReversed"))break;if(t.getAttribute("listStart")!==n.getAttribute("listStart"))break;"backward"===e?i.unshift(t):i.push(t)}}return i}function ot(t){let e=[...t.document.selection.getSelectedBlocks()].filter((t=>t.is("element","listItem"))).map((e=>{const i=t.change((t=>t.createPositionAt(e,0)));return[...rt(i,"backward"),...rt(i,"forward")]})).flat();return e=[...new Set(e)],e}const lt=["disc","circle","square"],at=["decimal","decimal-leading-zero","lower-roman","upper-roman","lower-latin","upper-latin"];function ct(){const t=!this.isEmpty&&("ul"==this.getChild(0).name||"ol"==this.getChild(0).name);return this.isEmpty||t?0:H.getFillerOffset.call(this)}const dt='',ut='';class mt extends t.Plugin{static get pluginName(){return"ListUI"}init(){const t=this.editor.t;nt(this.editor,"numberedList",t("Numbered List"),dt),nt(this.editor,"bulletedList",t("Bulleted List"),ut)}}class pt extends t.Plugin{static get requires(){return[G,mt]}static get pluginName(){return"DocumentList"}}class ht extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=e.document;let n=Array.from(i.selection.getSelectedBlocks()).filter((t=>d(t)&&"numbered"==t.getAttribute("listType")));n=g(n),e.change((e=>{for(const i of n)e.setAttribute("listStart",t.startIndex||1,i)}))}_getValue(){const t=this.editor.model.document,e=(0,r.first)(t.selection.getSelectedBlocks());return e&&d(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listStart"):null}}const ft={},bt={},gt={},yt=[{listStyle:"disc",typeAttribute:"disc",listType:"bulleted"},{listStyle:"circle",typeAttribute:"circle",listType:"bulleted"},{listStyle:"square",typeAttribute:"square",listType:"bulleted"},{listStyle:"decimal",typeAttribute:"1",listType:"numbered"},{listStyle:"decimal-leading-zero",typeAttribute:null,listType:"numbered"},{listStyle:"lower-roman",typeAttribute:"i",listType:"numbered"},{listStyle:"upper-roman",typeAttribute:"I",listType:"numbered"},{listStyle:"lower-alpha",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-alpha",typeAttribute:"A",listType:"numbered"},{listStyle:"lower-latin",typeAttribute:"a",listType:"numbered"},{listStyle:"upper-latin",typeAttribute:"A",listType:"numbered"}];for(const{listStyle:t,typeAttribute:e,listType:i}of yt)ft[t]=i,bt[t]=e,e&&(gt[e]=t);function vt(t){return ft[t]||null}function wt(t){return bt[t]||null}class At extends t.Command{constructor(t,e,i){super(t),this._defaultType=e,this._supportedTypes=i}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document;e.change((e=>{this._tryToConvertItemsToList(t);let n=Array.from(i.selection.getSelectedBlocks()).filter((t=>t.hasAttribute("listType")));if(n.length){n=g(n);for(const i of n)e.setAttribute("listStyle",t.type||this._defaultType,i)}}))}isStyleTypeSupported(t){return!this._supportedTypes||this._supportedTypes.includes(t)}_getValue(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());return d(t)?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=vt(t.type);if(!e)return;const i=this.editor,n=e+"List";i.commands.get(n).value||i.execute(n)}}class It extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=e.document;let n=Array.from(i.selection.getSelectedBlocks()).filter((t=>d(t)&&"numbered"==t.getAttribute("listType")));n=g(n),e.change((e=>{for(const i of n)e.setAttribute("listReversed",!!t.reversed,i)}))}_getValue(){const t=this.editor.model.document,e=(0,r.first)(t.selection.getSelectedBlocks());return d(e)&&"numbered"==e.getAttribute("listType")?e.getAttribute("listReversed"):null}}function kt(t){return(e,i,n)=>{const{writer:s,schema:r,consumable:o}=n;if(!1===o.test(i.viewItem,t.viewConsumables))return;i.modelRange||Object.assign(i,n.convertChildren(i.viewItem,i.modelCursor));let l=!1;for(const e of i.modelRange.getItems({shallow:!0}))r.checkAttribute(e,t.attributeName)&&t.appliesToListItem(e)&&(e.hasAttribute(t.attributeName)||(s.setAttribute(t.attributeName,t.getAttributeOnUpcast(i.viewItem),e),l=!0));l&&o.consume(i.viewItem,t.viewConsumables)}}const xt="default";class Tt extends t.Plugin{static get requires(){return[G]}static get pluginName(){return"DocumentListPropertiesEditing"}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,i=t.plugins.get(G),n=function(t){const e=[];if(t.styles){const i="object"==typeof t.styles&&t.styles.useAttribute;e.push({attributeName:"listStyle",defaultValue:xt,viewConsumables:{styles:"list-style-type"},addCommand(t){let e=yt.map((t=>t.listStyle));i&&(e=e.filter((t=>!!wt(t)))),t.commands.add("listStyle",new At(t,xt,e))},appliesToListItem:()=>!0,hasValidAttribute(t){if(!t.hasAttribute("listStyle"))return!1;const e=t.getAttribute("listStyle");return e==xt||vt(e)==t.getAttribute("listType")},setAttributeOnDowncast(t,e,n){if(e&&e!==xt){if(!i)return void t.setStyle("list-style-type",e,n);{const i=wt(e);if(i)return void t.setAttribute("type",i,n)}}t.removeStyle("list-style-type",n),t.removeAttribute("type",n)},getAttributeOnUpcast(t){const e=t.getStyle("list-style-type");if(e)return e;const i=t.getAttribute("type");return i?gt[i]||null:xt}})}t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,viewConsumables:{attributes:"reversed"},addCommand(t){t.commands.add("listReversed",new It(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listReversed")},setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,viewConsumables:{attributes:"start"},addCommand(t){t.commands.add("listStart",new ht(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),hasValidAttribute(t){return this.appliesToListItem(t)==t.hasAttribute("listStart")},setAttributeOnDowncast(t,e,i){e&&e>1?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast:t=>t.getAttribute("start")||1});return e}(t.config.get("list.properties"));for(const s of n)s.addCommand(t),e.schema.extend("$container",{allowAttributes:s.attributeName}),e.schema.extend("$block",{allowAttributes:s.attributeName}),e.schema.extend("$blockObject",{allowAttributes:s.attributeName}),i.registerDowncastStrategy({scope:"list",attributeName:s.attributeName,setAttributeOnDowncast(t,e,i){s.setAttributeOnDowncast(t,e,i)}});t.conversion.for("upcast").add((t=>{for(const e of n)t.on("element:ol",kt(e)),t.on("element:ul",kt(e))})),i.on("checkAttributes:list",((t,{viewElement:e,modelAttributes:i})=>{for(const s of n)s.getAttributeOnUpcast(e)!=i[s.attributeName]&&(t.return=!0,t.stop())})),this.listenTo(t.commands.get("indentList"),"afterExecute",((t,i)=>{e.change((t=>{for(const e of i)for(const i of n)i.appliesToListItem(e)&&t.setAttribute(i.attributeName,i.defaultValue,e)}))})),i.on("postFixer",((t,{listNodes:e,writer:i})=>{for(const{node:s}of e)for(const e of n)e.hasValidAttribute(s)||(e.appliesToListItem(s)?i.setAttribute(e.attributeName,e.defaultValue,s):i.removeAttribute(e.attributeName,s),t.return=!0)})),i.on("postFixer",((t,{listNodes:e,writer:i})=>{const s=[];for(const{node:r,previous:o}of e){if(!o)continue;const e=r.getAttribute("listIndent"),l=o.getAttribute("listIndent");let a=null;if(e>l?s[l]=o:e'}),t.extendTemplate({attributes:{"aria-expanded":e.to("isOn",(t=>String(t)))}}),t.bind("label").to(this),t.bind("isOn").to(this,"isCollapsed",(t=>!t)),t.on("execute",(()=>{this.isCollapsed=!this.isCollapsed})),t}}var Vt=i(543),Lt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(Vt.Z,Lt);Vt.Z.locals;class Et extends J.View{constructor(t,{enabledProperties:e,styleButtonViews:i,styleGridAriaLabel:n}){super(t);const s=["ck","ck-list-properties"];this.children=this.createCollection(),this.stylesView=null,this.additionalPropertiesCollapsibleView=null,this.startIndexFieldView=null,this.reversedSwitchButtonView=null,this.focusTracker=new r.FocusTracker,this.keystrokes=new r.KeystrokeHandler,this.focusables=new J.ViewCollection,this.focusCycler=new J.FocusCycler({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),e.styles?(this.stylesView=this._createStylesView(i,n),this.children.add(this.stylesView)):s.push("ck-list-properties_without-styles"),(e.startIndex||e.reversed)&&(this._addNumberedListPropertyViews(e,i),s.push("ck-list-properties_with-numbered-properties")),this.setTemplate({tag:"div",attributes:{class:s},children:this.children})}render(){if(super.render(),this.stylesView){this.focusables.add(this.stylesView),this.focusTracker.add(this.stylesView.element),(this.startIndexFieldView||this.reversedSwitchButtonView)&&(this.focusables.add(this.children.last.buttonView),this.focusTracker.add(this.children.last.buttonView.element));for(const t of this.stylesView.children)this.stylesView.focusTracker.add(t.element);(0,J.addKeyboardHandlingForGrid)({keystrokeHandler:this.stylesView.keystrokes,focusTracker:this.stylesView.focusTracker,gridItems:this.stylesView.children,numberOfColumns:()=>r.global.window.getComputedStyle(this.stylesView.element).getPropertyValue("grid-template-columns").split(" ").length})}if(this.startIndexFieldView){this.focusables.add(this.startIndexFieldView),this.focusTracker.add(this.startIndexFieldView.element),this.listenTo(this.startIndexFieldView.element,"selectstart",((t,e)=>{e.stopPropagation()}),{priority:"high"});const t=t=>t.stopPropagation();this.keystrokes.set("arrowright",t),this.keystrokes.set("arrowleft",t),this.keystrokes.set("arrowup",t),this.keystrokes.set("arrowdown",t)}this.reversedSwitchButtonView&&(this.focusables.add(this.reversedSwitchButtonView),this.focusTracker.add(this.reversedSwitchButtonView.element)),this.keystrokes.listenTo(this.element)}focus(){this.focusCycler.focusFirst()}focusLast(){this.focusCycler.focusLast()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createStylesView(t,e){const i=new J.View(this.locale);return i.children=i.createCollection(this.locale),i.children.addMany(t),i.setTemplate({tag:"div",attributes:{"aria-label":e,class:["ck","ck-list-styles-list"]},children:i.children}),i.children.delegate("execute").to(this),i.focus=function(){this.children.first.focus()},i.focusTracker=new r.FocusTracker,i.keystrokes=new r.KeystrokeHandler,i.render(),i.keystrokes.listenTo(i.element),i}_addNumberedListPropertyViews(t){const e=this.locale.t,i=[];t.startIndex&&(this.startIndexFieldView=this._createStartIndexField(),i.push(this.startIndexFieldView)),t.reversed&&(this.reversedSwitchButtonView=this._createReversedSwitchButton(),i.push(this.reversedSwitchButtonView)),t.styles?(this.additionalPropertiesCollapsibleView=new Ct(this.locale,i),this.additionalPropertiesCollapsibleView.set({label:e("List properties"),isCollapsed:!0}),this.additionalPropertiesCollapsibleView.buttonView.bind("isEnabled").toMany(i,"isEnabled",((...t)=>t.some((t=>t)))),this.additionalPropertiesCollapsibleView.buttonView.on("change:isEnabled",((t,e,i)=>{i||(this.additionalPropertiesCollapsibleView.isCollapsed=!0)})),this.children.add(this.additionalPropertiesCollapsibleView)):this.children.addMany(i)}_createStartIndexField(){const t=this.locale.t,e=new J.LabeledFieldView(this.locale,J.createLabeledInputNumber);return e.set({label:t("Start at"),class:"ck-numbered-list-properties__start-index"}),e.fieldView.set({min:1,step:1,value:1,inputMode:"numeric"}),e.fieldView.on("input",(()=>{const i=e.fieldView.element,n=i.valueAsNumber;Number.isNaN(n)||(i.checkValidity()?this.fire("listStart",{startIndex:n}):e.errorText=t("Start index must be greater than 0."))})),e}_createReversedSwitchButton(){const t=this.locale.t,e=new J.SwitchButtonView(this.locale);return e.set({withText:!0,label:t("Reversed order"),class:"ck-numbered-list-properties__reversed-order"}),e.delegate("execute").to(this,"listReversed"),e}}var Pt=i(657),zt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(Pt.Z,zt);Pt.Z.locals;class Bt extends t.Plugin{static get pluginName(){return"ListPropertiesUI"}init(){const t=this.editor,e=t.locale.t,i=t.config.get("list.properties");i.styles&&t.ui.componentFactory.add("bulletedList",Nt({editor:t,parentCommandName:"bulletedList",buttonLabel:e("Bulleted List"),buttonIcon:ut,styleGridAriaLabel:e("Bulleted list styles toolbar"),styleDefinitions:[{label:e("Toggle the disc list style"),tooltip:e("Disc"),type:"disc",icon:''},{label:e("Toggle the circle list style"),tooltip:e("Circle"),type:"circle",icon:''},{label:e("Toggle the square list style"),tooltip:e("Square"),type:"square",icon:''}]})),(i.styles||i.startIndex||i.reversed)&&t.ui.componentFactory.add("numberedList",Nt({editor:t,parentCommandName:"numberedList",buttonLabel:e("Numbered List"),buttonIcon:dt,styleGridAriaLabel:e("Numbered list styles toolbar"),styleDefinitions:[{label:e("Toggle the decimal list style"),tooltip:e("Decimal"),type:"decimal",icon:''},{label:e("Toggle the decimal with leading zero list style"),tooltip:e("Decimal with leading zero"),type:"decimal-leading-zero",icon:''},{label:e("Toggle the lower–roman list style"),tooltip:e("Lower–roman"),type:"lower-roman",icon:''},{label:e("Toggle the upper–roman list style"),tooltip:e("Upper-roman"),type:"upper-roman",icon:''},{label:e("Toggle the lower–latin list style"),tooltip:e("Lower-latin"),type:"lower-latin",icon:''},{label:e("Toggle the upper–latin list style"),tooltip:e("Upper-latin"),type:"upper-latin",icon:''}]}))}}function Nt({editor:t,parentCommandName:e,buttonLabel:i,buttonIcon:n,styleGridAriaLabel:s,styleDefinitions:r}){const o=t.commands.get(e);return l=>{const a=(0,J.createDropdown)(l,J.SplitButtonView),c=a.buttonView;a.bind("isEnabled").to(o),a.class="ck-list-styles-dropdown",c.on("execute",(()=>{t.execute(e),t.editing.view.focus()})),c.set({label:i,icon:n,tooltip:!0,isToggleable:!0}),c.bind("isOn").to(o,"value",(t=>!!t));const d=function({editor:t,dropdownView:e,parentCommandName:i,styleDefinitions:n,styleGridAriaLabel:s}){const r=t.locale,o=t.config.get("list.properties");let l;"numberedList"!=i&&(o.startIndex=!1,o.reversed=!1);if(o.styles){const e=t.commands.get("listStyle"),s=function({editor:t,listStyleCommand:e,parentCommandName:i}){const n=t.locale,s=t.commands.get(i);return({label:i,type:r,icon:o,tooltip:l})=>{const a=new J.ButtonView(n);return a.set({label:i,icon:o,tooltip:l}),e.on("change:value",(()=>{a.isOn=e.value===r})),a.on("execute",(()=>{s.value?e.value!==r?t.execute("listStyle",{type:r}):t.execute("listStyle",{type:e._defaultType}):t.model.change((()=>{t.execute("listStyle",{type:r})}))})),a}}({editor:t,parentCommandName:i,listStyleCommand:e}),r="function"==typeof e.isStyleTypeSupported?t=>e.isStyleTypeSupported(t.type):()=>!0;l=n.filter(r).map(s)}const a=new Et(r,{styleGridAriaLabel:s,enabledProperties:o,styleButtonViews:l});o.styles&&(0,J.focusChildOnDropdownOpen)(e,(()=>a.stylesView.children.find((t=>t.isOn))));if(o.startIndex){const e=t.commands.get("listStart");a.startIndexFieldView.bind("isEnabled").to(e),a.startIndexFieldView.fieldView.bind("value").to(e),a.on("listStart",((e,i)=>t.execute("listStart",i)))}if(o.reversed){const e=t.commands.get("listReversed");a.reversedSwitchButtonView.bind("isEnabled").to(e),a.reversedSwitchButtonView.bind("isOn").to(e,"value"),a.on("listReversed",(()=>{const i=e.value;t.execute("listReversed",{reversed:!i})}))}return a.delegate("execute").to(e),a}({editor:t,dropdownView:a,parentCommandName:e,styleGridAriaLabel:s,styleDefinitions:r});return a.panelView.children.add(d),a.on("execute",(()=>{t.editing.view.focus()})),a}}class Mt extends t.Plugin{static get requires(){return[Tt,Bt]}static get pluginName(){return"DocumentListProperties"}}class Rt extends t.Command{constructor(t,e){super(t),this.type=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model,i=e.document,n=Array.from(i.selection.getSelectedBlocks()).filter((t=>Ht(t,e.schema))),s=void 0!==t.forceValue?!t.forceValue:this.value;e.change((t=>{if(s){let e=n[n.length-1].nextSibling,i=Number.POSITIVE_INFINITY,s=[];for(;e&&"listItem"==e.name&&0!==e.getAttribute("listIndent");){const t=e.getAttribute("listIndent");t=i;)r>s.getAttribute("listIndent")&&(r=s.getAttribute("listIndent")),s.getAttribute("listIndent")==r&&t[e?"unshift":"push"](s),s=s[e?"previousSibling":"nextSibling"]}}function Ht(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class Ft extends t.Command{constructor(t,e){super(t),this._indentBy="forward"==e?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model,e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change((t=>{const e=i[i.length-1];let n=e.nextSibling;for(;n&&"listItem"==n.name&&n.getAttribute("listIndent")>e.getAttribute("listIndent");)i.push(n),n=n.nextSibling;this._indentBy<0&&(i=i.reverse());for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;i<0?t.rename(e,"paragraph"):t.setAttribute("listIndent",i,e)}this.fire("_executeCleanup",i)}))}_checkEnabled(){const t=(0,r.first)(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("element","listItem"))return!1;if(this._indentBy>0){const e=t.getAttribute("listIndent"),i=t.getAttribute("listType");let n=t.previousSibling;for(;n&&n.is("element","listItem")&&n.getAttribute("listIndent")>=e;){if(n.getAttribute("listIndent")==e)return n.getAttribute("listType")==i;n=n.previousSibling}return!1}return!0}}function Dt(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;s.consume(i.item,"insert"),s.consume(i.item,"attribute:listType"),s.consume(i.item,"attribute:listIndent");const r=i.item;X(r,Q(r,n),n,t)}}function jt(t,e,i){if(!i.consumable.test(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer;s.breakContainer(s.createPositionBefore(n)),s.breakContainer(s.createPositionAfter(n));const r=n.parent,o="numbered"==e.attributeNewValue?"ol":"ul";s.rename(o,r)}function Ut(t,e,i){i.consumable.consume(e.item,t.name);const n=i.mapper.toViewElement(e.item).parent,s=i.writer;tt(s,n,n.nextSibling),tt(s,n.previousSibling,n)}function qt(t,e,i){if(i.consumable.test(e.item,t.name)&&"listItem"!=e.item.name){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer,s=[];for(;("ul"==t.parent.name||"ol"==t.parent.name)&&(t=n.breakContainer(t),"li"==t.parent.name);){const e=t,i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));s.push(t)}t=n.createPositionAfter(t.parent)}if(s.length>0){for(let e=0;e0){const e=tt(n,i,i.nextSibling);e&&e.parent==i&&t.offset--}}tt(n,t.nodeBefore,t.nodeAfter)}}}function Kt(t,e,i){const n=i.mapper.toViewPosition(e.position),s=n.nodeBefore,r=n.nodeAfter;tt(i.writer,s,r)}function Zt(t,e,i){if(i.consumable.consume(e.viewItem,{name:!0})){const t=i.writer,n=t.createElement("listItem"),s=function(t){let e=0,i=t.parent;for(;i;){if(i.is("element","li"))e++;else{const t=i.previousSibling;t&&t.is("element","li")&&e++}i=i.parent}return e}(e.viewItem);t.setAttribute("listIndent",s,n);const r=e.viewItem.parent&&"ol"==e.viewItem.parent.name?"numbered":"bulleted";if(t.setAttribute("listType",r,n),!i.safeInsert(n,e.modelCursor))return;const o=function(t,e,i){const{writer:n,schema:s}=i;let r=n.createPositionAfter(t);for(const o of e)if("ul"==o.name||"ol"==o.name)r=i.convertItem(o,r).modelCursor;else{const e=i.convertItem(o,n.createPositionAt(t,"end")),l=e.modelRange.start.nodeAfter;l&&l.is("element")&&!s.checkChild(t,l.name)&&(t=e.modelCursor.parent.is("element","listItem")?e.modelCursor.parent:Jt(e.modelCursor),r=n.createPositionAfter(t))}return r}(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,o),i.updateConversionResult(n,e)}}function $t(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){const t=Array.from(e.viewItem.getChildren());for(const e of t){!(e.is("element","li")||Xt(e))&&e._remove()}}}function Wt(t,e,i){if(i.consumable.test(e.viewItem,{name:!0})){if(0===e.viewItem.childCount)return;const t=[...e.viewItem.getChildren()];let i=!1;for(const e of t)i&&!Xt(e)&&e._remove(),Xt(e)&&(i=!0)}}function Gt(t){return(e,i)=>{if(i.isPhantom)return;const n=i.modelPosition.nodeBefore;if(n&&n.is("element","listItem")){const e=i.mapper.toViewElement(n),s=e.getAncestors().find(Xt),r=t.createPositionAt(e,0).getWalker();for(const t of r){if("elementStart"==t.type&&t.item.is("element","li")){i.viewPosition=t.previousPosition;break}if("elementEnd"==t.type&&t.item==s){i.viewPosition=t.nextPosition;break}}}}}function Yt(t,[e,i,n]){let s,r=e.is("documentFragment")?e.getChild(0):e;if(s=i?this.createSelection(i,n):this.document.selection,r&&r.is("element","listItem")){const t=s.getFirstPosition();let e=null;if(t.parent.is("element","listItem")?e=t.parent:t.nodeBefore&&t.nodeBefore.is("element","listItem")&&(e=t.nodeBefore),e){const t=e.getAttribute("listIndent");if(t>0)for(;r&&r.is("element","listItem");)r._setAttribute("listIndent",r.getAttribute("listIndent")+t),r=r.nextSibling}}}function Jt(t){const e=new H.TreeWalker({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("element","listItem"));return i.value.item}function Qt(t,e,i,n,s,r){const o=it(e.nodeBefore,{sameIndent:!0,smallerIndent:!0,listIndent:t,foo:"b"}),l=s.mapper,a=s.writer,c=o?o.getAttribute("listIndent"):null;let d;if(o)if(c==t){const t=l.toViewElement(o).parent;d=a.createPositionAfter(t)}else{const t=r.createPositionAt(o,"end");d=l.toViewPosition(t)}else d=i;d=et(d);for(const t of[...n.getChildren()])Xt(t)&&(d=a.move(a.createRangeOn(t),d).end,tt(a,t,t.nextSibling),tt(a,t.previousSibling,t))}function Xt(t){return t.is("element","ol")||t.is("element","ul")}class te extends t.Plugin{static get pluginName(){return"ListEditing"}static get requires(){return[e.Enter,s.Delete]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data,i=t.editing;var n;t.model.document.registerPostFixer((e=>function(t,e){const i=t.document.differ.getChanges(),n=new Map;let s=!1;for(const n of i)if("insert"==n.type&&"listItem"==n.name)r(n.position);else if("insert"==n.type&&"listItem"!=n.name){if("$text"!=n.name){const i=n.position.nodeAfter;i.hasAttribute("listIndent")&&(e.removeAttribute("listIndent",i),s=!0),i.hasAttribute("listType")&&(e.removeAttribute("listType",i),s=!0),i.hasAttribute("listStyle")&&(e.removeAttribute("listStyle",i),s=!0),i.hasAttribute("listReversed")&&(e.removeAttribute("listReversed",i),s=!0),i.hasAttribute("listStart")&&(e.removeAttribute("listStart",i),s=!0);for(const e of Array.from(t.createRangeIn(i)).filter((t=>t.item.is("element","listItem"))))r(e.previousPosition)}r(n.position.getShiftedBy(n.length))}else"remove"==n.type&&"listItem"==n.name?r(n.position):("attribute"==n.type&&"listIndent"==n.attributeKey||"attribute"==n.type&&"listType"==n.attributeKey)&&r(n.range.start);for(const t of n.values())o(t),l(t);return s;function r(t){const e=t.nodeBefore;if(e&&e.is("element","listItem")){let t=e;if(n.has(t))return;for(let e=t.previousSibling;e&&e.is("element","listItem");e=t.previousSibling)if(t=e,n.has(t))return;n.set(e,t)}else{const e=t.nodeAfter;e&&e.is("element","listItem")&&n.set(e,e)}}function o(t){let i=0,n=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(r>i){let o;null===n?(n=r-i,o=i):(n>r&&(n=r),o=r-n),e.setAttribute("listIndent",o,t),s=!0}else n=null,i=t.getAttribute("listIndent")+1;t=t.nextSibling}}function l(t){let i=[],n=null;for(;t&&t.is("element","listItem");){const r=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>r&&(i=i.slice(0,r+1)),0!=r)if(i[r]){const n=i[r];t.getAttribute("listType")!=n&&(e.setAttribute("listType",n,t),s=!0)}else i[r]=t.getAttribute("listType");n=t,t=t.nextSibling}}}(t.model,e))),i.mapper.registerViewToModelLength("li",ee),e.mapper.registerViewToModelLength("li",ee),i.mapper.on("modelToViewPosition",Gt(i.view)),i.mapper.on("viewToModelPosition",(n=t.model,(t,e)=>{const i=e.viewPosition,s=i.parent,r=e.mapper;if("ul"==s.name||"ol"==s.name){if(i.isAtEnd){const t=r.toModelElement(i.nodeBefore),s=r.getModelLength(i.nodeBefore);e.modelPosition=n.createPositionBefore(t).getShiftedBy(s)}else{const t=r.toModelElement(i.nodeAfter);e.modelPosition=n.createPositionBefore(t)}t.stop()}else if("li"==s.name&&i.nodeBefore&&("ul"==i.nodeBefore.name||"ol"==i.nodeBefore.name)){const o=r.toModelElement(s);let l=1,a=i.nodeBefore;for(;a&&Xt(a);)l+=r.getModelLength(a),a=a.previousSibling;e.modelPosition=n.createPositionBefore(o).getShiftedBy(l),t.stop()}})),e.mapper.on("modelToViewPosition",Gt(i.view)),t.conversion.for("editingDowncast").add((e=>{e.on("insert",qt,{priority:"high"}),e.on("insert:listItem",Dt(t.model)),e.on("attribute:listType:listItem",jt,{priority:"high"}),e.on("attribute:listType:listItem",Ut,{priority:"low"}),e.on("attribute:listIndent:listItem",function(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent"))return;const s=n.mapper.toViewElement(i.item),r=n.writer;r.breakContainer(r.createPositionBefore(s)),r.breakContainer(r.createPositionAfter(s));const o=s.parent,l=o.previousSibling,a=r.createRangeOn(o);r.remove(a),l&&l.nextSibling&&tt(r,l,l.nextSibling),Qt(i.attributeOldValue+1,i.range.start,a.start,s,n,t),X(i.item,s,n,t);for(const t of i.item.getChildren())n.consumable.consume(t,"insert")}}(t.model)),e.on("remove:listItem",function(t){return(e,i,n)=>{const s=n.mapper.toViewPosition(i.position).getLastMatchingPosition((t=>!t.item.is("element","li"))).nodeAfter,r=n.writer;r.breakContainer(r.createPositionBefore(s)),r.breakContainer(r.createPositionAfter(s));const o=s.parent,l=o.previousSibling,a=r.createRangeOn(o),c=r.remove(a);l&&l.nextSibling&&tt(r,l,l.nextSibling),Qt(n.mapper.toModelElement(s).getAttribute("listIndent")+1,i.position,a.start,s,n,t);for(const t of r.createRangeIn(c).getItems())n.mapper.unbindViewElement(t);e.stop()}}(t.model)),e.on("remove",Kt,{priority:"low"})})),t.conversion.for("dataDowncast").add((e=>{e.on("insert",qt,{priority:"high"}),e.on("insert:listItem",Dt(t.model))})),t.conversion.for("upcast").add((t=>{t.on("element:ul",$t,{priority:"high"}),t.on("element:ol",$t,{priority:"high"}),t.on("element:li",Wt,{priority:"high"}),t.on("element:li",Zt)})),t.model.on("insertContent",Yt,{priority:"high"}),t.commands.add("numberedList",new Rt(t,"numbered")),t.commands.add("bulletedList",new Rt(t,"bulleted")),t.commands.add("indentList",new Ft(t,"forward")),t.commands.add("outdentList",new Ft(t,"backward"));const s=i.view.document;this.listenTo(s,"enter",((t,e)=>{const i=this.editor.model.document,n=i.selection.getLastPosition().parent;i.selection.isCollapsed&&"listItem"==n.name&&n.isEmpty&&(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(s,"delete",((t,e)=>{if("backward"!==e.direction)return;const i=this.editor.model.document.selection;if(!i.isCollapsed)return;const n=i.getFirstPosition();if(!n.isAtStart)return;const s=n.parent;if("listItem"!==s.name)return;s.previousSibling&&"listItem"===s.previousSibling.name||(this.editor.execute("outdentList"),e.preventDefault(),t.stop())}),{context:"li"}),this.listenTo(t.editing.view.document,"tab",((e,i)=>{const n=i.shiftKey?"outdentList":"indentList";this.editor.commands.get(n).isEnabled&&(t.execute(n),i.stopPropagation(),i.preventDefault(),e.stop())}),{context:"li"})}afterInit(){const t=this.editor.commands,e=t.get("indent"),i=t.get("outdent");e&&e.registerChildCommand(t.get("indentList")),i&&i.registerChildCommand(t.get("outdentList"))}}function ee(t){let e=1;for(const i of t.getChildren())if("ul"==i.name||"ol"==i.name)for(const t of i.getChildren())e+=ee(t);return e}class ie extends t.Plugin{static get requires(){return[te,mt]}static get pluginName(){return"List"}}class ne extends t.Command{constructor(t,e){super(t),this._defaultType=e}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){this._tryToConvertItemsToList(t);const e=this.editor.model,i=ot(e);i.length&&e.change((e=>{for(const n of i)e.setAttribute("listStyle",t.type||this._defaultType,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")?t.getAttribute("listStyle"):null}_checkEnabled(){const t=this.editor,e=t.commands.get("numberedList"),i=t.commands.get("bulletedList");return e.isEnabled||i.isEnabled}_tryToConvertItemsToList(t){if(!t.type)return;const e=(i=t.type,lt.includes(i)?"bulleted":at.includes(i)?"numbered":null);var i;if(!e)return;const n=this.editor,s=e+"List";n.commands.get(s).value||n.execute(s)}}class se extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=ot(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const n of i)e.setAttribute("listReversed",!!t.reversed,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listReversed"):null}}class re extends t.Command{refresh(){const t=this._getValue();this.value=t,this.isEnabled=null!=t}execute(t={}){const e=this.editor.model,i=ot(e).filter((t=>"numbered"==t.getAttribute("listType")));e.change((e=>{for(const n of i)e.setAttribute("listStart",t.startIndex||1,n)}))}_getValue(){const t=this.editor.model.document.selection.getFirstPosition().parent;return t&&t.is("element","listItem")&&"numbered"==t.getAttribute("listType")?t.getAttribute("listStart"):null}}const oe="default";class le extends t.Plugin{static get requires(){return[te]}static get pluginName(){return"ListPropertiesEditing"}constructor(t){super(t),t.config.define("list",{properties:{styles:!0,startIndex:!1,reversed:!1}})}init(){const t=this.editor,e=t.model,i=function(t){const e=[];t.styles&&e.push({attributeName:"listStyle",defaultValue:oe,addCommand(t){t.commands.add("listStyle",new ne(t,oe))},appliesToListItem:()=>!0,setAttributeOnDowncast(t,e,i){e&&e!==oe?t.setStyle("list-style-type",e,i):t.removeStyle("list-style-type",i)},getAttributeOnUpcast:t=>t.getStyle("list-style-type")||oe});t.reversed&&e.push({attributeName:"listReversed",defaultValue:!1,addCommand(t){t.commands.add("listReversed",new se(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){e?t.setAttribute("reversed","reversed",i):t.removeAttribute("reversed",i)},getAttributeOnUpcast:t=>t.hasAttribute("reversed")});t.startIndex&&e.push({attributeName:"listStart",defaultValue:1,addCommand(t){t.commands.add("listStart",new re(t))},appliesToListItem:t=>"numbered"==t.getAttribute("listType"),setAttributeOnDowncast(t,e,i){1!=e?t.setAttribute("start",e,i):t.removeAttribute("start",i)},getAttributeOnUpcast:t=>t.getAttribute("start")||1});return e}(t.config.get("list.properties"));e.schema.extend("listItem",{allowAttributes:i.map((t=>t.attributeName))});for(const e of i)e.addCommand(t);var n;this.listenTo(t.commands.get("indentList"),"_executeCleanup",function(t,e){return(i,n)=>{const s=n[0],r=s.getAttribute("listIndent"),o=n.filter((t=>t.getAttribute("listIndent")===r));let l=null;s.previousSibling.getAttribute("listIndent")+1!==r&&(l=it(s.previousSibling,{sameIndent:!0,direction:"backward",listIndent:r})),t.model.change((t=>{for(const i of o)for(const n of e)if(n.appliesToListItem(i)){const e=null==l?n.defaultValue:l.getAttribute(n.attributeName);t.setAttribute(n.attributeName,e,i)}}))}}(t,i)),this.listenTo(t.commands.get("outdentList"),"_executeCleanup",function(t,e){return(i,n)=>{if(!(n=n.reverse().filter((t=>t.is("element","listItem")))).length)return;const s=n[0].getAttribute("listIndent"),r=n[0].getAttribute("listType");let o=n[0].previousSibling;if(o.is("element","listItem"))for(;o.getAttribute("listIndent")!==s;)o=o.previousSibling;else o=null;o||(o=n[n.length-1].nextSibling),o&&o.is("element","listItem")&&o.getAttribute("listType")===r&&t.model.change((t=>{const i=n.filter((t=>t.getAttribute("listIndent")===s));for(const n of i)for(const i of e)if(i.appliesToListItem(n)){const e=i.attributeName,s=o.getAttribute(e);t.setAttribute(e,s,n)}}))}}(t,i)),this.listenTo(t.commands.get("bulletedList"),"_executeCleanup",de(t)),this.listenTo(t.commands.get("numberedList"),"_executeCleanup",de(t)),e.document.registerPostFixer(function(t,e){return i=>{let n=!1;const s=ue(t.model.document.differ.getChanges()).filter((t=>"todo"!==t.getAttribute("listType")));if(!s.length)return n;let r=s[s.length-1].nextSibling;if((!r||!r.is("element","listItem"))&&(r=s[0].previousSibling,r)){const t=s[0].getAttribute("listIndent");for(;r.is("element","listItem")&&r.getAttribute("listIndent")!==t&&(r=r.previousSibling,r););}for(const t of e){const e=t.attributeName;for(const o of s)if(t.appliesToListItem(o))if(o.hasAttribute(e)){const s=o.previousSibling;ce(s,o,t.attributeName)&&(i.setAttribute(e,s.getAttribute(e),o),n=!0)}else ae(r,o,t)?i.setAttribute(e,r.getAttribute(e),o):i.setAttribute(e,t.defaultValue,o),n=!0;else i.removeAttribute(e,o)}return n}}(t,i)),t.conversion.for("upcast").add((n=i,t=>{t.on("element:li",((t,e,i)=>{const s=e.viewItem.parent,r=e.modelRange.start.nodeAfter||e.modelRange.end.nodeBefore;for(const t of n)if(t.appliesToListItem(r)){const e=t.getAttributeOnUpcast(s);i.writer.setAttribute(t.attributeName,e,r)}}),{priority:"low"})})),t.conversion.for("downcast").add(function(t){return i=>{for(const n of t)i.on(`attribute:${n.attributeName}:listItem`,((t,i,s)=>{const r=s.writer,o=i.item,l=it(o.previousSibling,{sameIndent:!0,listIndent:o.getAttribute("listIndent"),direction:"backward"}),a=s.mapper.toViewElement(o);e(o,l)||r.breakContainer(r.createPositionBefore(a)),n.setAttributeOnDowncast(r,i.attributeNewValue,a.parent)}),{priority:"low"})};function e(t,e){return e&&t.getAttribute("listType")===e.getAttribute("listType")&&t.getAttribute("listIndent")===e.getAttribute("listIndent")&&t.getAttribute("listStyle")===e.getAttribute("listStyle")&&t.getAttribute("listReversed")===e.getAttribute("listReversed")&&t.getAttribute("listStart")===e.getAttribute("listStart")}}(i)),this._mergeListAttributesWhileMergingLists(i)}afterInit(){const t=this.editor;t.commands.get("todoList")&&t.model.document.registerPostFixer(function(t){return e=>{const i=ue(t.model.document.differ.getChanges()).filter((t=>"todo"===t.getAttribute("listType")&&(t.hasAttribute("listStyle")||t.hasAttribute("listReversed")||t.hasAttribute("listStart"))));if(!i.length)return!1;for(const t of i)e.removeAttribute("listStyle",t),e.removeAttribute("listReversed",t),e.removeAttribute("listStart",t);return!0}}(t))}_mergeListAttributesWhileMergingLists(t){const e=this.editor.model;let i;this.listenTo(e,"deleteContent",((t,[e])=>{const n=e.getFirstPosition(),s=e.getLastPosition();if(n.parent===s.parent)return;if(!n.parent.is("element","listItem"))return;const r=s.parent.nextSibling;if(!r||!r.is("element","listItem"))return;const o=it(n.parent,{sameIndent:!0,listIndent:r.getAttribute("listIndent")});o&&o.getAttribute("listType")===r.getAttribute("listType")&&(i=o)}),{priority:"high"}),this.listenTo(e,"deleteContent",(()=>{i&&(e.change((e=>{const n=it(i.nextSibling,{sameIndent:!0,listIndent:i.getAttribute("listIndent"),direction:"forward"});if(!n)return void(i=null);const s=[n,...rt(e.createPositionAt(n,0),"forward")];for(const n of s)for(const s of t)if(s.appliesToListItem(n)){const t=s.attributeName,r=i.getAttribute(t);e.setAttribute(t,r,n)}})),i=null)}),{priority:"low"})}}function ae(t,e,i){if(!t)return!1;const n=t.getAttribute(i.attributeName);return!!n&&(n!=i.defaultValue&&t.getAttribute("listType")===e.getAttribute("listType"))}function ce(t,e,i){if(!t||!t.is("element","listItem"))return!1;if(e.getAttribute("listType")!==t.getAttribute("listType"))return!1;const n=t.getAttribute("listIndent");if(n<1||n!==e.getAttribute("listIndent"))return!1;const s=t.getAttribute(i);return!(!s||s===e.getAttribute(i))}function de(t){return(e,i)=>{i=i.filter((t=>t.is("element","listItem"))),t.model.change((t=>{for(const e of i)t.removeAttribute("listStyle",e)}))}}function ue(t){const e=[];for(const i of t){const t=me(i);t&&t.is("element","listItem")&&e.push(t)}return e}function me(t){return"attribute"===t.type?t.range.start.nodeAfter:"insert"===t.type?t.position.nodeAfter:null}class pe extends t.Plugin{static get requires(){return[le,Bt]}static get pluginName(){return"ListProperties"}}const he="todoListChecked";class fe extends t.Command{constructor(t){super(t),this._selectedElements=[],this.on("execute",(()=>{this.refresh()}),{priority:"highest"})}refresh(){this._selectedElements=this._getSelectedItems(),this.value=this._selectedElements.every((t=>!!t.getAttribute("todoListChecked"))),this.isEnabled=!!this._selectedElements.length}_getSelectedItems(){const t=this.editor.model,e=t.schema,i=t.document.selection.getFirstRange(),n=i.start.parent,s=[];e.checkAttribute(n,he)&&s.push(n);for(const t of i.getItems())e.checkAttribute(t,he)&&!s.includes(t)&&s.push(t);return s}execute(t={}){this.editor.model.change((e=>{for(const i of this._selectedElements){(void 0===t.forceValue?!this.value:t.forceValue)?e.setAttribute(he,!0,i):e.removeAttribute(he,i)}}))}}function be(t,e,i){const n=e.modelCursor,s=n.parent,r=e.viewItem;if("checkbox"!=r.getAttribute("type")||"listItem"!=s.name||!n.isAtStart)return;if(!i.consumable.consume(r,{name:!0}))return;const o=i.writer;o.setAttribute("listType","todo",s),e.viewItem.hasAttribute("checked")&&o.setAttribute("todoListChecked",!0,s),e.modelRange=o.createRange(n)}function ge(t){return(e,i)=>{const n=i.modelPosition,s=n.parent;if(!s.is("element","listItem")||"todo"!=s.getAttribute("listType"))return;const r=ve(i.mapper.toViewElement(s),t);r&&(i.viewPosition=i.mapper.findPositionIn(r,n.offset))}}function ye(t,e,i,n){return e.createUIElement("label",{class:"todo-list__label",contenteditable:!1},(function(e){const s=(0,r.createElement)(document,"input",{type:"checkbox",tabindex:-1});i&&s.setAttribute("checked","checked"),s.addEventListener("change",(()=>n(t)));const o=this.toDomElement(e);return o.appendChild(s),o}))}function ve(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("containerElement","span")&&t.item.hasClass("todo-list__label__description"))return t.item}const we=(0,r.parseKeystroke)("Ctrl+Enter");class Ae extends t.Plugin{static get pluginName(){return"TodoListEditing"}static get requires(){return[te]}init(){const t=this.editor,{editing:e,data:i,model:n}=t;n.schema.extend("listItem",{allowAttributes:["todoListChecked"]}),n.schema.addAttributeCheck(((t,e)=>{const i=t.last;if("todoListChecked"==e&&"listItem"==i.name&&"todo"!=i.getAttribute("listType"))return!1})),t.commands.add("todoList",new Rt(t,"todo"));const s=new fe(t);var o,l;t.commands.add("checkTodoList",s),t.commands.add("todoListCheck",s),i.downcastDispatcher.on("insert:listItem",function(t){return(e,i,n)=>{const s=n.consumable;if(!s.test(i.item,"insert")||!s.test(i.item,"attribute:listType")||!s.test(i.item,"attribute:listIndent"))return;if("todo"!=i.item.getAttribute("listType"))return;const r=i.item;s.consume(r,"insert"),s.consume(r,"attribute:listType"),s.consume(r,"attribute:listIndent"),s.consume(r,"attribute:todoListChecked");const o=n.writer,l=Q(r,n);o.addClass("todo-list",l.parent);const a=o.createContainerElement("label",{class:"todo-list__label"}),c=o.createEmptyElement("input",{type:"checkbox",disabled:"disabled"}),d=o.createContainerElement("span",{class:"todo-list__label__description"});r.getAttribute("todoListChecked")&&o.setAttribute("checked","checked",c),o.insert(o.createPositionAt(l,0),a),o.insert(o.createPositionAt(a,0),c),o.insert(o.createPositionAfter(c),d),X(r,l,n,t)}}(n),{priority:"high"}),i.upcastDispatcher.on("element:input",be,{priority:"high"}),e.downcastDispatcher.on("insert:listItem",function(t,e){return(i,n,s)=>{const r=s.consumable;if(!r.test(n.item,"insert")||!r.test(n.item,"attribute:listType")||!r.test(n.item,"attribute:listIndent"))return;if("todo"!=n.item.getAttribute("listType"))return;const o=n.item;r.consume(o,"insert"),r.consume(o,"attribute:listType"),r.consume(o,"attribute:listIndent"),r.consume(o,"attribute:todoListChecked");const l=s.writer,a=Q(o,s),c=!!o.getAttribute("todoListChecked"),d=ye(o,l,c,e),u=l.createContainerElement("span",{class:"todo-list__label__description"});l.addClass("todo-list",a.parent),l.insert(l.createPositionAt(a,0),d),l.insert(l.createPositionAfter(d),u),X(o,a,s,t)}}(n,(t=>this._handleCheckmarkChange(t))),{priority:"high"}),e.downcastDispatcher.on("attribute:listType:listItem",(o=t=>this._handleCheckmarkChange(t),l=e.view,(t,e,i)=>{if(!i.consumable.consume(e.item,t.name))return;const n=i.mapper.toViewElement(e.item),s=i.writer,r=function(t,e){const i=e.createRangeIn(t);for(const t of i)if(t.item.is("uiElement","label"))return t.item}(n,l);if("todo"==e.attributeNewValue){const t=!!e.item.getAttribute("todoListChecked"),i=ye(e.item,s,t,o),r=s.createContainerElement("span",{class:"todo-list__label__description"}),l=s.createRangeIn(n),a=st(n),c=et(l.start),d=a?s.createPositionBefore(a):l.end,u=s.createRange(c,d);s.addClass("todo-list",n.parent),s.move(u,s.createPositionAt(r,0)),s.insert(s.createPositionAt(n,0),i),s.insert(s.createPositionAfter(i),r)}else if("todo"==e.attributeOldValue){const t=ve(n,l);s.removeClass("todo-list",n.parent),s.remove(r),s.move(s.createRangeIn(t),s.createPositionBefore(t)),s.remove(t)}})),e.downcastDispatcher.on("attribute:todoListChecked:listItem",function(t){return(e,i,n)=>{if("todo"!=i.item.getAttribute("listType"))return;if(!n.consumable.consume(i.item,"attribute:todoListChecked"))return;const{mapper:s,writer:r}=n,o=!!i.item.getAttribute("todoListChecked"),l=s.toViewElement(i.item).getChild(0),a=ye(i.item,r,o,t);r.insert(r.createPositionAfter(l),a),r.remove(l)}}((t=>this._handleCheckmarkChange(t)))),e.mapper.on("modelToViewPosition",ge(e.view)),i.mapper.on("modelToViewPosition",ge(e.view)),this.listenTo(e.view.document,"arrowKey",function(t,e){return(i,n)=>{if("left"!=(0,r.getLocalizedArrowKeyCodeDirection)(n.keyCode,e.contentLanguageDirection))return;const s=t.schema,o=t.document.selection;if(!o.isCollapsed)return;const l=o.getFirstPosition(),a=l.parent;if("listItem"===a.name&&"todo"==a.getAttribute("listType")&&l.isAtStart){const e=s.getNearestSelectionRange(t.createPositionBefore(a),"backward");e&&t.change((t=>t.setSelection(e))),n.preventDefault(),n.stopPropagation(),i.stop()}}}(n,t.locale),{context:"li"}),this.listenTo(e.view.document,"keydown",((e,i)=>{(0,r.getCode)(i)===we&&(t.execute("checkTodoList"),e.stop())}),{priority:"high"});const a=new Set;this.listenTo(n,"applyOperation",((t,e)=>{const i=e[0];if("rename"==i.type&&"listItem"==i.oldName){const t=i.position.nodeAfter;t.hasAttribute("todoListChecked")&&a.add(t)}else if("changeAttribute"==i.type&&"listType"==i.key&&"todo"===i.oldValue)for(const t of i.range.getItems())t.hasAttribute("todoListChecked")&&"todo"!==t.getAttribute("listType")&&a.add(t)})),n.document.registerPostFixer((t=>{let e=!1;for(const i of a)t.removeAttribute("todoListChecked",i),e=!0;return a.clear(),e}))}_handleCheckmarkChange(t){const e=this.editor,i=e.model,n=Array.from(i.document.selection.getRanges());i.change((i=>{i.setSelection(t,"end"),e.execute("checkTodoList"),i.setSelection(n)}))}}class Ie extends t.Plugin{static get pluginName(){return"TodoListUI"}init(){const t=this.editor.t;nt(this.editor,"todoList",t("To-do List"),'')}}var ke=i(250),xe={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};K()(ke.Z,xe);ke.Z.locals;class Te extends t.Plugin{static get requires(){return[Ae,Ie]}static get pluginName(){return"TodoList"}}})(),(window.CKEditor5=window.CKEditor5||{}).list=n})(); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/special-characters/special-characters.js b/core/assets/vendor/ckeditor5/special-characters/special-characters.js index 46dc89cd86..55f677614e 100644 --- a/core/assets/vendor/ckeditor5/special-characters/special-characters.js +++ b/core/assets/vendor/ckeditor5/special-characters/special-characters.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var t={395:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid .ck-character-grid__tiles{display:grid}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{max-height:200px;overflow-x:hidden;overflow-y:auto;width:350px}@media screen and (max-width:600px){.ck.ck-character-grid{width:190px}}.ck.ck-character-grid .ck-character-grid__tiles{grid-gap:var(--ck-spacing-standard);grid-template-columns:repeat(10,1fr);margin:var(--ck-spacing-standard) var(--ck-spacing-large)}@media screen and (max-width:600px){.ck.ck-character-grid .ck-character-grid__tiles{grid-template-columns:repeat(5,1fr)}}.ck.ck-character-grid .ck-character-grid__tile{border:0;font-size:1.2em;height:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-character-grid-tile-size)}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);text-align:center;width:100%}",""]);const l=r},198:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-info{border-top:1px solid var(--ck-color-base-border);display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-character-info>*{font-size:var(--ck-font-size-small);text-transform:uppercase}.ck.ck-character-info .ck-character-info__name{max-width:280px;overflow:hidden;text-overflow:ellipsis}.ck.ck-character-info .ck-character-info__code{opacity:.6}@media screen and (max-width:600px){.ck.ck-character-info{max-width:190px}}",""]);const l=r},454:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-special-characters-navigation>.ck-label{max-width:160px;overflow:hidden;text-overflow:ellipsis}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}@media screen and (max-width:600px){.ck.ck-special-characters-navigation{max-width:190px}.ck.ck-special-characters-navigation>.ck-form__header__label{overflow:hidden;text-overflow:ellipsis}}",""]);const l=r},609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var a=t(e);return e[2]?"@media ".concat(e[2]," {").concat(a,"}"):a})).join("")},e.i=function(t,a,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var l=0;l{"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},l=function(){var t={};return function(e){if(void 0===t[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}t[e]=a}return t[e]}}(),c=[];function n(t){for(var e=-1,a=0;a{t.exports=a(79)("./src/core.js")},181:(t,e,a)=>{t.exports=a(79)("./src/typing.js")},273:(t,e,a)=>{t.exports=a(79)("./src/ui.js")},209:(t,e,a)=>{t.exports=a(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function a(i){var r=e[i];if(void 0!==r)return r.exports;var l=e[i]={id:i,exports:{}};return t[i](l,l.exports,a),l.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nc=void 0;var i={};(()=>{"use strict";a.r(i),a.d(i,{SpecialCharacters:()=>b,SpecialCharactersArrows:()=>v,SpecialCharactersCurrency:()=>T,SpecialCharactersEssentials:()=>q,SpecialCharactersLatin:()=>C,SpecialCharactersMathematical:()=>y,SpecialCharactersText:()=>x});var t=a(704),e=a(181),r=a(273),l=a(209);class c extends r.FormHeaderView{constructor(t,e){super(t);const a=t.t;this.set("class","ck-special-characters-navigation"),this.groupDropdownView=this._createGroupDropdown(e),this.groupDropdownView.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",this.label=a("Special characters"),this.children.add(this.groupDropdownView)}get currentGroupName(){return this.groupDropdownView.value}focus(){this.groupDropdownView.focus()}_createGroupDropdown(t){const e=this.locale,a=e.t,i=(0,r.createDropdown)(e),l=this._getCharacterGroupListItemDefinitions(i,t);return i.set("value",l.first.model.label),i.buttonView.bind("label").to(i,"value"),i.buttonView.set({isOn:!1,withText:!0,tooltip:a("Character categories"),class:["ck-dropdown__button_label-width_auto"]}),i.on("execute",(t=>{i.value=t.source.label})),i.delegate("execute").to(this),(0,r.addListToDropdown)(i,l),i}_getCharacterGroupListItemDefinitions(t,e){const a=new l.Collection;for(const i of e){const e={type:"button",model:new r.Model({label:i,withText:!0})};e.model.bind("isOn").to(t,"value",(t=>t===e.model.label)),a.add(e)}return a}}var n=a(62),o=a.n(n),s=a(395),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(s.Z,h);s.Z.locals;class w extends r.View{constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,(0,r.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>l.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length})}createTile(t,e){const a=new r.ButtonView(this.locale);return a.set({label:t,withText:!0,class:"ck-character-grid__tile"}),a.extendTemplate({attributes:{title:e},on:{mouseover:a.bindTemplate.to("mouseover")}}),a.on("mouseover",(()=>{this.fire("tileHover",{name:e,character:t})})),a.on("execute",(()=>{this.fire("execute",{name:e,character:t})})),a}render(){super.render();for(const t of this.tiles)this.focusTracker.add(t.element);this.tiles.on("change",((t,{added:e,removed:a})=>{if(e.length>0)for(const t of e)this.focusTracker.add(t.element);if(a.length>0)for(const t of a)this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.get(0).focus()}}var d=a(198),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(d.Z,u);d.Z.locals;class g extends r.View{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",m),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",(t=>t||"​"))}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function m(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}class p extends r.View{constructor(t,e,a,i){super(t),this.items=this.createCollection(),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,this._focusCycler=new r.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.navigationView=e,this.gridView=a,this.infoView=i,this.setTemplate({tag:"div",children:[this.navigationView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.navigationView.groupDropdownView.buttonView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.navigationView.groupDropdownView.buttonView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.navigationView.focus()}}var L=a(454),f={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(L.Z,f);L.Z.locals;const k="All";class b extends t.Plugin{static get requires(){return[e.Typing]}static get pluginName(){return"SpecialCharacters"}constructor(t){super(t),this._characters=new Map,this._groups=new Map}init(){const t=this.editor,e=t.t,a=t.commands.get("input");t.ui.componentFactory.add("specialCharacters",(i=>{const l=(0,r.createDropdown)(i);let c;return l.buttonView.set({label:e("Special characters"),icon:'',tooltip:!0}),l.bind("isEnabled").to(a),l.on("execute",((e,a)=>{t.execute("input",{text:a.character}),t.editing.view.focus()})),l.on("change:isOpen",(()=>{if(!c){c=this._createDropdownPanelContent(i,l);const t=new p(i,c.navigationView,c.gridView,c.infoView);l.panelView.children.add(t)}c.infoView.set({character:null,name:null})})),l}))}addItems(t,e){if(t===k)throw new l.CKEditorError('special-character-invalid-group-name: The name "All" is reserved and cannot be used.');const a=this._getGroup(t);for(const t of e)a.add(t.title),this._characters.set(t.title,t.character)}getGroups(){return this._groups.keys()}getCharactersForGroup(t){return t===k?new Set(this._characters.keys()):this._groups.get(t)}getCharacter(t){return this._characters.get(t)}_getGroup(t){return this._groups.has(t)||this._groups.set(t,new Set),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const a=this.getCharactersForGroup(t);for(const t of a){const a=this.getCharacter(t);e.tiles.add(e.createTile(a,t))}}_createDropdownPanelContent(t,e){const a=[...this.getGroups()];a.unshift(k);const i=new c(t,a),r=new w(t),l=new g(t);return r.delegate("execute").to(e),r.on("tileHover",((t,e)=>{l.set(e)})),i.on("execute",(()=>{this._updateGrid(i.currentGroupName,r)})),this._updateGrid(i.currentGroupName,r),{navigationView:i,gridView:r,infoView:l}}}class v extends t.Plugin{static get pluginName(){return"SpecialCharactersArrows"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Arrows",[{title:e("leftwards simple arrow"),character:"←"},{title:e("rightwards simple arrow"),character:"→"},{title:e("upwards simple arrow"),character:"↑"},{title:e("downwards simple arrow"),character:"↓"},{title:e("leftwards double arrow"),character:"⇐"},{title:e("rightwards double arrow"),character:"⇒"},{title:e("upwards double arrow"),character:"⇑"},{title:e("downwards double arrow"),character:"⇓"},{title:e("leftwards dashed arrow"),character:"⇠"},{title:e("rightwards dashed arrow"),character:"⇢"},{title:e("upwards dashed arrow"),character:"⇡"},{title:e("downwards dashed arrow"),character:"⇣"},{title:e("leftwards arrow to bar"),character:"⇤"},{title:e("rightwards arrow to bar"),character:"⇥"},{title:e("upwards arrow to bar"),character:"⤒"},{title:e("downwards arrow to bar"),character:"⤓"},{title:e("up down arrow with base"),character:"↨"},{title:e("back with leftwards arrow above"),character:"🔙"},{title:e("end with leftwards arrow above"),character:"🔚"},{title:e("on with exclamation mark with left right arrow above"),character:"🔛"},{title:e("soon with rightwards arrow above"),character:"🔜"},{title:e("top with upwards arrow above"),character:"🔝"}])}}class x extends t.Plugin{static get pluginName(){return"SpecialCharactersText"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:e("Single left-pointing angle quotation mark")},{character:"›",title:e("Single right-pointing angle quotation mark")},{character:"«",title:e("Left-pointing double angle quotation mark")},{character:"»",title:e("Right-pointing double angle quotation mark")},{character:"‘",title:e("Left single quotation mark")},{character:"’",title:e("Right single quotation mark")},{character:"“",title:e("Left double quotation mark")},{character:"”",title:e("Right double quotation mark")},{character:"‚",title:e("Single low-9 quotation mark")},{character:"„",title:e("Double low-9 quotation mark")},{character:"¡",title:e("Inverted exclamation mark")},{character:"¿",title:e("Inverted question mark")},{character:"‥",title:e("Two dot leader")},{character:"…",title:e("Horizontal ellipsis")},{character:"‡",title:e("Double dagger")},{character:"‰",title:e("Per mille sign")},{character:"‱",title:e("Per ten thousand sign")},{character:"‼",title:e("Double exclamation mark")},{character:"⁈",title:e("Question exclamation mark")},{character:"⁉",title:e("Exclamation question mark")},{character:"⁇",title:e("Double question mark")},{character:"©",title:e("Copyright sign")},{character:"®",title:e("Registered sign")},{character:"™",title:e("Trade mark sign")},{character:"§",title:e("Section sign")},{character:"¶",title:e("Paragraph sign")},{character:"⁋",title:e("Reversed paragraph sign")}])}}class y extends t.Plugin{static get pluginName(){return"SpecialCharactersMathematical"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:e("Less-than sign")},{character:">",title:e("Greater-than sign")},{character:"≤",title:e("Less-than or equal to")},{character:"≥",title:e("Greater-than or equal to")},{character:"–",title:e("En dash")},{character:"—",title:e("Em dash")},{character:"¯",title:e("Macron")},{character:"‾",title:e("Overline")},{character:"°",title:e("Degree sign")},{character:"−",title:e("Minus sign")},{character:"±",title:e("Plus-minus sign")},{character:"÷",title:e("Division sign")},{character:"⁄",title:e("Fraction slash")},{character:"×",title:e("Multiplication sign")},{character:"ƒ",title:e("Latin small letter f with hook")},{character:"∫",title:e("Integral")},{character:"∑",title:e("N-ary summation")},{character:"∞",title:e("Infinity")},{character:"√",title:e("Square root")},{character:"∼",title:e("Tilde operator")},{character:"≅",title:e("Approximately equal to")},{character:"≈",title:e("Almost equal to")},{character:"≠",title:e("Not equal to")},{character:"≡",title:e("Identical to")},{character:"∈",title:e("Element of")},{character:"∉",title:e("Not an element of")},{character:"∋",title:e("Contains as member")},{character:"∏",title:e("N-ary product")},{character:"∧",title:e("Logical and")},{character:"∨",title:e("Logical or")},{character:"¬",title:e("Not sign")},{character:"∩",title:e("Intersection")},{character:"∪",title:e("Union")},{character:"∂",title:e("Partial differential")},{character:"∀",title:e("For all")},{character:"∃",title:e("There exists")},{character:"∅",title:e("Empty set")},{character:"∇",title:e("Nabla")},{character:"∗",title:e("Asterisk operator")},{character:"∝",title:e("Proportional to")},{character:"∠",title:e("Angle")},{character:"¼",title:e("Vulgar fraction one quarter")},{character:"½",title:e("Vulgar fraction one half")},{character:"¾",title:e("Vulgar fraction three quarters")}])}}class C extends t.Plugin{static get pluginName(){return"SpecialCharactersLatin"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:e("Latin capital letter a with macron")},{character:"ā",title:e("Latin small letter a with macron")},{character:"Ă",title:e("Latin capital letter a with breve")},{character:"ă",title:e("Latin small letter a with breve")},{character:"Ą",title:e("Latin capital letter a with ogonek")},{character:"ą",title:e("Latin small letter a with ogonek")},{character:"Ć",title:e("Latin capital letter c with acute")},{character:"ć",title:e("Latin small letter c with acute")},{character:"Ĉ",title:e("Latin capital letter c with circumflex")},{character:"ĉ",title:e("Latin small letter c with circumflex")},{character:"Ċ",title:e("Latin capital letter c with dot above")},{character:"ċ",title:e("Latin small letter c with dot above")},{character:"Č",title:e("Latin capital letter c with caron")},{character:"č",title:e("Latin small letter c with caron")},{character:"Ď",title:e("Latin capital letter d with caron")},{character:"ď",title:e("Latin small letter d with caron")},{character:"Đ",title:e("Latin capital letter d with stroke")},{character:"đ",title:e("Latin small letter d with stroke")},{character:"Ē",title:e("Latin capital letter e with macron")},{character:"ē",title:e("Latin small letter e with macron")},{character:"Ĕ",title:e("Latin capital letter e with breve")},{character:"ĕ",title:e("Latin small letter e with breve")},{character:"Ė",title:e("Latin capital letter e with dot above")},{character:"ė",title:e("Latin small letter e with dot above")},{character:"Ę",title:e("Latin capital letter e with ogonek")},{character:"ę",title:e("Latin small letter e with ogonek")},{character:"Ě",title:e("Latin capital letter e with caron")},{character:"ě",title:e("Latin small letter e with caron")},{character:"Ĝ",title:e("Latin capital letter g with circumflex")},{character:"ĝ",title:e("Latin small letter g with circumflex")},{character:"Ğ",title:e("Latin capital letter g with breve")},{character:"ğ",title:e("Latin small letter g with breve")},{character:"Ġ",title:e("Latin capital letter g with dot above")},{character:"ġ",title:e("Latin small letter g with dot above")},{character:"Ģ",title:e("Latin capital letter g with cedilla")},{character:"ģ",title:e("Latin small letter g with cedilla")},{character:"Ĥ",title:e("Latin capital letter h with circumflex")},{character:"ĥ",title:e("Latin small letter h with circumflex")},{character:"Ħ",title:e("Latin capital letter h with stroke")},{character:"ħ",title:e("Latin small letter h with stroke")},{character:"Ĩ",title:e("Latin capital letter i with tilde")},{character:"ĩ",title:e("Latin small letter i with tilde")},{character:"Ī",title:e("Latin capital letter i with macron")},{character:"ī",title:e("Latin small letter i with macron")},{character:"Ĭ",title:e("Latin capital letter i with breve")},{character:"ĭ",title:e("Latin small letter i with breve")},{character:"Į",title:e("Latin capital letter i with ogonek")},{character:"į",title:e("Latin small letter i with ogonek")},{character:"İ",title:e("Latin capital letter i with dot above")},{character:"ı",title:e("Latin small letter dotless i")},{character:"IJ",title:e("Latin capital ligature ij")},{character:"ij",title:e("Latin small ligature ij")},{character:"Ĵ",title:e("Latin capital letter j with circumflex")},{character:"ĵ",title:e("Latin small letter j with circumflex")},{character:"Ķ",title:e("Latin capital letter k with cedilla")},{character:"ķ",title:e("Latin small letter k with cedilla")},{character:"ĸ",title:e("Latin small letter kra")},{character:"Ĺ",title:e("Latin capital letter l with acute")},{character:"ĺ",title:e("Latin small letter l with acute")},{character:"Ļ",title:e("Latin capital letter l with cedilla")},{character:"ļ",title:e("Latin small letter l with cedilla")},{character:"Ľ",title:e("Latin capital letter l with caron")},{character:"ľ",title:e("Latin small letter l with caron")},{character:"Ŀ",title:e("Latin capital letter l with middle dot")},{character:"ŀ",title:e("Latin small letter l with middle dot")},{character:"Ł",title:e("Latin capital letter l with stroke")},{character:"ł",title:e("Latin small letter l with stroke")},{character:"Ń",title:e("Latin capital letter n with acute")},{character:"ń",title:e("Latin small letter n with acute")},{character:"Ņ",title:e("Latin capital letter n with cedilla")},{character:"ņ",title:e("Latin small letter n with cedilla")},{character:"Ň",title:e("Latin capital letter n with caron")},{character:"ň",title:e("Latin small letter n with caron")},{character:"ʼn",title:e("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:e("Latin capital letter eng")},{character:"ŋ",title:e("Latin small letter eng")},{character:"Ō",title:e("Latin capital letter o with macron")},{character:"ō",title:e("Latin small letter o with macron")},{character:"Ŏ",title:e("Latin capital letter o with breve")},{character:"ŏ",title:e("Latin small letter o with breve")},{character:"Ő",title:e("Latin capital letter o with double acute")},{character:"ő",title:e("Latin small letter o with double acute")},{character:"Œ",title:e("Latin capital ligature oe")},{character:"œ",title:e("Latin small ligature oe")},{character:"Ŕ",title:e("Latin capital letter r with acute")},{character:"ŕ",title:e("Latin small letter r with acute")},{character:"Ŗ",title:e("Latin capital letter r with cedilla")},{character:"ŗ",title:e("Latin small letter r with cedilla")},{character:"Ř",title:e("Latin capital letter r with caron")},{character:"ř",title:e("Latin small letter r with caron")},{character:"Ś",title:e("Latin capital letter s with acute")},{character:"ś",title:e("Latin small letter s with acute")},{character:"Ŝ",title:e("Latin capital letter s with circumflex")},{character:"ŝ",title:e("Latin small letter s with circumflex")},{character:"Ş",title:e("Latin capital letter s with cedilla")},{character:"ş",title:e("Latin small letter s with cedilla")},{character:"Š",title:e("Latin capital letter s with caron")},{character:"š",title:e("Latin small letter s with caron")},{character:"Ţ",title:e("Latin capital letter t with cedilla")},{character:"ţ",title:e("Latin small letter t with cedilla")},{character:"Ť",title:e("Latin capital letter t with caron")},{character:"ť",title:e("Latin small letter t with caron")},{character:"Ŧ",title:e("Latin capital letter t with stroke")},{character:"ŧ",title:e("Latin small letter t with stroke")},{character:"Ũ",title:e("Latin capital letter u with tilde")},{character:"ũ",title:e("Latin small letter u with tilde")},{character:"Ū",title:e("Latin capital letter u with macron")},{character:"ū",title:e("Latin small letter u with macron")},{character:"Ŭ",title:e("Latin capital letter u with breve")},{character:"ŭ",title:e("Latin small letter u with breve")},{character:"Ů",title:e("Latin capital letter u with ring above")},{character:"ů",title:e("Latin small letter u with ring above")},{character:"Ű",title:e("Latin capital letter u with double acute")},{character:"ű",title:e("Latin small letter u with double acute")},{character:"Ų",title:e("Latin capital letter u with ogonek")},{character:"ų",title:e("Latin small letter u with ogonek")},{character:"Ŵ",title:e("Latin capital letter w with circumflex")},{character:"ŵ",title:e("Latin small letter w with circumflex")},{character:"Ŷ",title:e("Latin capital letter y with circumflex")},{character:"ŷ",title:e("Latin small letter y with circumflex")},{character:"Ÿ",title:e("Latin capital letter y with diaeresis")},{character:"Ź",title:e("Latin capital letter z with acute")},{character:"ź",title:e("Latin small letter z with acute")},{character:"Ż",title:e("Latin capital letter z with dot above")},{character:"ż",title:e("Latin small letter z with dot above")},{character:"Ž",title:e("Latin capital letter z with caron")},{character:"ž",title:e("Latin small letter z with caron")},{character:"ſ",title:e("Latin small letter long s")}])}}class T extends t.Plugin{static get pluginName(){return"SpecialCharactersCurrency"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:e("Dollar sign")},{character:"€",title:e("Euro sign")},{character:"¥",title:e("Yen sign")},{character:"£",title:e("Pound sign")},{character:"¢",title:e("Cent sign")},{character:"₠",title:e("Euro-currency sign")},{character:"₡",title:e("Colon sign")},{character:"₢",title:e("Cruzeiro sign")},{character:"₣",title:e("French franc sign")},{character:"₤",title:e("Lira sign")},{character:"¤",title:e("Currency sign")},{character:"₿",title:e("Bitcoin sign")},{character:"₥",title:e("Mill sign")},{character:"₦",title:e("Naira sign")},{character:"₧",title:e("Peseta sign")},{character:"₨",title:e("Rupee sign")},{character:"₩",title:e("Won sign")},{character:"₪",title:e("New sheqel sign")},{character:"₫",title:e("Dong sign")},{character:"₭",title:e("Kip sign")},{character:"₮",title:e("Tugrik sign")},{character:"₯",title:e("Drachma sign")},{character:"₰",title:e("German penny sign")},{character:"₱",title:e("Peso sign")},{character:"₲",title:e("Guarani sign")},{character:"₳",title:e("Austral sign")},{character:"₴",title:e("Hryvnia sign")},{character:"₵",title:e("Cedi sign")},{character:"₶",title:e("Livre tournois sign")},{character:"₷",title:e("Spesmilo sign")},{character:"₸",title:e("Tenge sign")},{character:"₹",title:e("Indian rupee sign")},{character:"₺",title:e("Turkish lira sign")},{character:"₻",title:e("Nordic mark sign")},{character:"₼",title:e("Manat sign")},{character:"₽",title:e("Ruble sign")}])}}class q extends t.Plugin{static get requires(){return[T,x,y,v,C]}}})(),(window.CKEditor5=window.CKEditor5||{}).specialCharacters=i})(); \ No newline at end of file + */(()=>{var t={395:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-grid{max-width:100%}.ck.ck-character-grid .ck-character-grid__tiles{display:grid}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{max-height:200px;overflow-x:hidden;overflow-y:auto;width:350px}@media screen and (max-width:600px){.ck.ck-character-grid{width:190px}}.ck.ck-character-grid .ck-character-grid__tiles{grid-gap:var(--ck-spacing-standard);grid-template-columns:repeat(10,1fr);margin:var(--ck-spacing-standard) var(--ck-spacing-large)}@media screen and (max-width:600px){.ck.ck-character-grid .ck-character-grid__tiles{grid-template-columns:repeat(5,1fr)}}.ck.ck-character-grid .ck-character-grid__tile{border:0;font-size:1.2em;height:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);padding:0;transition:box-shadow .2s ease;width:var(--ck-character-grid-tile-size)}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);text-align:center;width:100%}",""]);const l=r},198:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-character-info{border-top:1px solid var(--ck-color-base-border);display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-large)}.ck.ck-character-info>*{font-size:var(--ck-font-size-small);text-transform:uppercase}.ck.ck-character-info .ck-character-info__name{max-width:280px;overflow:hidden;text-overflow:ellipsis}.ck.ck-character-info .ck-character-info__code{opacity:.6}@media screen and (max-width:600px){.ck.ck-character-info{max-width:190px}}",""]);const l=r},454:(t,e,a)=>{"use strict";a.d(e,{Z:()=>l});var i=a(609),r=a.n(i)()((function(t){return t[1]}));r.push([t.id,".ck.ck-special-characters-navigation>.ck-label{max-width:160px;overflow:hidden;text-overflow:ellipsis}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-x:hidden;overflow-y:auto}@media screen and (max-width:600px){.ck.ck-special-characters-navigation{max-width:190px}.ck.ck-special-characters-navigation>.ck-form__header__label{overflow:hidden;text-overflow:ellipsis}}",""]);const l=r},609:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var a=t(e);return e[2]?"@media ".concat(e[2]," {").concat(a,"}"):a})).join("")},e.i=function(t,a,i){"string"==typeof t&&(t=[[null,t,""]]);var r={};if(i)for(var l=0;l{"use strict";var i,r=function(){return void 0===i&&(i=Boolean(window&&document&&document.all&&!window.atob)),i},l=function(){var t={};return function(e){if(void 0===t[e]){var a=document.querySelector(e);if(window.HTMLIFrameElement&&a instanceof window.HTMLIFrameElement)try{a=a.contentDocument.head}catch(t){a=null}t[e]=a}return t[e]}}(),c=[];function n(t){for(var e=-1,a=0;a{t.exports=a(79)("./src/core.js")},181:(t,e,a)=>{t.exports=a(79)("./src/typing.js")},273:(t,e,a)=>{t.exports=a(79)("./src/ui.js")},209:(t,e,a)=>{t.exports=a(79)("./src/utils.js")},79:t=>{"use strict";t.exports=CKEditor5.dll}},e={};function a(i){var r=e[i];if(void 0!==r)return r.exports;var l=e[i]={id:i,exports:{}};return t[i](l,l.exports,a),l.exports}a.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return a.d(e,{a:e}),e},a.d=(t,e)=>{for(var i in e)a.o(e,i)&&!a.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},a.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),a.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.nc=void 0;var i={};(()=>{"use strict";a.r(i),a.d(i,{SpecialCharacters:()=>b,SpecialCharactersArrows:()=>v,SpecialCharactersCurrency:()=>T,SpecialCharactersEssentials:()=>q,SpecialCharactersLatin:()=>C,SpecialCharactersMathematical:()=>y,SpecialCharactersText:()=>x});var t=a(704),e=a(181),r=a(273),l=a(209);class c extends r.FormHeaderView{constructor(t,e){super(t);const a=t.t;this.set("class","ck-special-characters-navigation"),this.groupDropdownView=this._createGroupDropdown(e),this.groupDropdownView.panelPosition="rtl"===t.uiLanguageDirection?"se":"sw",this.label=a("Special characters"),this.children.add(this.groupDropdownView)}get currentGroupName(){return this.groupDropdownView.value}focus(){this.groupDropdownView.focus()}_createGroupDropdown(t){const e=this.locale,a=e.t,i=(0,r.createDropdown)(e),l=this._getCharacterGroupListItemDefinitions(i,t);return i.set("value",l.first.model.label),i.buttonView.bind("label").to(i,"value"),i.buttonView.set({isOn:!1,withText:!0,tooltip:a("Character categories"),class:["ck-dropdown__button_label-width_auto"]}),i.on("execute",(t=>{i.value=t.source.label})),i.delegate("execute").to(this),(0,r.addListToDropdown)(i,l),i}_getCharacterGroupListItemDefinitions(t,e){const a=new l.Collection;for(const i of e){const e={type:"button",model:new r.Model({label:i,withText:!0})};e.model.bind("isOn").to(t,"value",(t=>t===e.model.label)),a.add(e)}return a}}var n=a(62),o=a.n(n),s=a(395),h={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(s.Z,h);s.Z.locals;class w extends r.View{constructor(t){super(t),this.tiles=this.createCollection(),this.setTemplate({tag:"div",children:[{tag:"div",attributes:{class:["ck","ck-character-grid__tiles"]},children:this.tiles}],attributes:{class:["ck","ck-character-grid"]}}),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,(0,r.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.tiles,numberOfColumns:()=>l.global.window.getComputedStyle(this.element.firstChild).getPropertyValue("grid-template-columns").split(" ").length})}createTile(t,e){const a=new r.ButtonView(this.locale);return a.set({label:t,withText:!0,class:"ck-character-grid__tile"}),a.extendTemplate({attributes:{title:e},on:{mouseover:a.bindTemplate.to("mouseover")}}),a.on("mouseover",(()=>{this.fire("tileHover",{name:e,character:t})})),a.on("execute",(()=>{this.fire("execute",{name:e,character:t})})),a}render(){super.render();for(const t of this.tiles)this.focusTracker.add(t.element);this.tiles.on("change",((t,{added:e,removed:a})=>{if(e.length>0)for(const t of e)this.focusTracker.add(t.element);if(a.length>0)for(const t of a)this.focusTracker.remove(t.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.keystrokes.destroy()}focus(){this.tiles.get(0).focus()}}var d=a(198),u={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(d.Z,u);d.Z.locals;class g extends r.View{constructor(t){super(t);const e=this.bindTemplate;this.set("character",null),this.set("name",null),this.bind("code").to(this,"character",m),this.setTemplate({tag:"div",children:[{tag:"span",attributes:{class:["ck-character-info__name"]},children:[{text:e.to("name",(t=>t||"​"))}]},{tag:"span",attributes:{class:["ck-character-info__code"]},children:[{text:e.to("code")}]}],attributes:{class:["ck","ck-character-info"]}})}}function m(t){if(null===t)return"";return"U+"+("0000"+t.codePointAt(0).toString(16)).slice(-4)}class p extends r.View{constructor(t,e,a,i){super(t),this.items=this.createCollection(),this.focusTracker=new l.FocusTracker,this.keystrokes=new l.KeystrokeHandler,this._focusCycler=new r.FocusCycler({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.navigationView=e,this.gridView=a,this.infoView=i,this.setTemplate({tag:"div",children:[this.navigationView,this.gridView,this.infoView],attributes:{tabindex:"-1"}}),this.items.add(this.navigationView.groupDropdownView.buttonView),this.items.add(this.gridView)}render(){super.render(),this.focusTracker.add(this.navigationView.groupDropdownView.buttonView.element),this.focusTracker.add(this.gridView.element),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this.navigationView.focus()}}var L=a(454),f={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};o()(L.Z,f);L.Z.locals;const k="All";class b extends t.Plugin{static get requires(){return[e.Typing]}static get pluginName(){return"SpecialCharacters"}constructor(t){super(t),this._characters=new Map,this._groups=new Map}init(){const t=this.editor,e=t.t,a=t.commands.get("input");t.ui.componentFactory.add("specialCharacters",(i=>{const l=(0,r.createDropdown)(i);let c;return l.buttonView.set({label:e("Special characters"),icon:'',tooltip:!0}),l.bind("isEnabled").to(a),l.on("execute",((e,a)=>{t.execute("insertText",{text:a.character}),t.editing.view.focus()})),l.on("change:isOpen",(()=>{if(!c){c=this._createDropdownPanelContent(i,l);const t=new p(i,c.navigationView,c.gridView,c.infoView);l.panelView.children.add(t)}c.infoView.set({character:null,name:null})})),l}))}addItems(t,e){if(t===k)throw new l.CKEditorError('special-character-invalid-group-name: The name "All" is reserved and cannot be used.');const a=this._getGroup(t);for(const t of e)a.add(t.title),this._characters.set(t.title,t.character)}getGroups(){return this._groups.keys()}getCharactersForGroup(t){return t===k?new Set(this._characters.keys()):this._groups.get(t)}getCharacter(t){return this._characters.get(t)}_getGroup(t){return this._groups.has(t)||this._groups.set(t,new Set),this._groups.get(t)}_updateGrid(t,e){e.tiles.clear();const a=this.getCharactersForGroup(t);for(const t of a){const a=this.getCharacter(t);e.tiles.add(e.createTile(a,t))}}_createDropdownPanelContent(t,e){const a=[...this.getGroups()];a.unshift(k);const i=new c(t,a),r=new w(t),l=new g(t);return r.delegate("execute").to(e),r.on("tileHover",((t,e)=>{l.set(e)})),i.on("execute",(()=>{this._updateGrid(i.currentGroupName,r)})),this._updateGrid(i.currentGroupName,r),{navigationView:i,gridView:r,infoView:l}}}class v extends t.Plugin{static get pluginName(){return"SpecialCharactersArrows"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Arrows",[{title:e("leftwards simple arrow"),character:"←"},{title:e("rightwards simple arrow"),character:"→"},{title:e("upwards simple arrow"),character:"↑"},{title:e("downwards simple arrow"),character:"↓"},{title:e("leftwards double arrow"),character:"⇐"},{title:e("rightwards double arrow"),character:"⇒"},{title:e("upwards double arrow"),character:"⇑"},{title:e("downwards double arrow"),character:"⇓"},{title:e("leftwards dashed arrow"),character:"⇠"},{title:e("rightwards dashed arrow"),character:"⇢"},{title:e("upwards dashed arrow"),character:"⇡"},{title:e("downwards dashed arrow"),character:"⇣"},{title:e("leftwards arrow to bar"),character:"⇤"},{title:e("rightwards arrow to bar"),character:"⇥"},{title:e("upwards arrow to bar"),character:"⤒"},{title:e("downwards arrow to bar"),character:"⤓"},{title:e("up down arrow with base"),character:"↨"},{title:e("back with leftwards arrow above"),character:"🔙"},{title:e("end with leftwards arrow above"),character:"🔚"},{title:e("on with exclamation mark with left right arrow above"),character:"🔛"},{title:e("soon with rightwards arrow above"),character:"🔜"},{title:e("top with upwards arrow above"),character:"🔝"}])}}class x extends t.Plugin{static get pluginName(){return"SpecialCharactersText"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Text",[{character:"‹",title:e("Single left-pointing angle quotation mark")},{character:"›",title:e("Single right-pointing angle quotation mark")},{character:"«",title:e("Left-pointing double angle quotation mark")},{character:"»",title:e("Right-pointing double angle quotation mark")},{character:"‘",title:e("Left single quotation mark")},{character:"’",title:e("Right single quotation mark")},{character:"“",title:e("Left double quotation mark")},{character:"”",title:e("Right double quotation mark")},{character:"‚",title:e("Single low-9 quotation mark")},{character:"„",title:e("Double low-9 quotation mark")},{character:"¡",title:e("Inverted exclamation mark")},{character:"¿",title:e("Inverted question mark")},{character:"‥",title:e("Two dot leader")},{character:"…",title:e("Horizontal ellipsis")},{character:"‡",title:e("Double dagger")},{character:"‰",title:e("Per mille sign")},{character:"‱",title:e("Per ten thousand sign")},{character:"‼",title:e("Double exclamation mark")},{character:"⁈",title:e("Question exclamation mark")},{character:"⁉",title:e("Exclamation question mark")},{character:"⁇",title:e("Double question mark")},{character:"©",title:e("Copyright sign")},{character:"®",title:e("Registered sign")},{character:"™",title:e("Trade mark sign")},{character:"§",title:e("Section sign")},{character:"¶",title:e("Paragraph sign")},{character:"⁋",title:e("Reversed paragraph sign")}])}}class y extends t.Plugin{static get pluginName(){return"SpecialCharactersMathematical"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Mathematical",[{character:"<",title:e("Less-than sign")},{character:">",title:e("Greater-than sign")},{character:"≤",title:e("Less-than or equal to")},{character:"≥",title:e("Greater-than or equal to")},{character:"–",title:e("En dash")},{character:"—",title:e("Em dash")},{character:"¯",title:e("Macron")},{character:"‾",title:e("Overline")},{character:"°",title:e("Degree sign")},{character:"−",title:e("Minus sign")},{character:"±",title:e("Plus-minus sign")},{character:"÷",title:e("Division sign")},{character:"⁄",title:e("Fraction slash")},{character:"×",title:e("Multiplication sign")},{character:"ƒ",title:e("Latin small letter f with hook")},{character:"∫",title:e("Integral")},{character:"∑",title:e("N-ary summation")},{character:"∞",title:e("Infinity")},{character:"√",title:e("Square root")},{character:"∼",title:e("Tilde operator")},{character:"≅",title:e("Approximately equal to")},{character:"≈",title:e("Almost equal to")},{character:"≠",title:e("Not equal to")},{character:"≡",title:e("Identical to")},{character:"∈",title:e("Element of")},{character:"∉",title:e("Not an element of")},{character:"∋",title:e("Contains as member")},{character:"∏",title:e("N-ary product")},{character:"∧",title:e("Logical and")},{character:"∨",title:e("Logical or")},{character:"¬",title:e("Not sign")},{character:"∩",title:e("Intersection")},{character:"∪",title:e("Union")},{character:"∂",title:e("Partial differential")},{character:"∀",title:e("For all")},{character:"∃",title:e("There exists")},{character:"∅",title:e("Empty set")},{character:"∇",title:e("Nabla")},{character:"∗",title:e("Asterisk operator")},{character:"∝",title:e("Proportional to")},{character:"∠",title:e("Angle")},{character:"¼",title:e("Vulgar fraction one quarter")},{character:"½",title:e("Vulgar fraction one half")},{character:"¾",title:e("Vulgar fraction three quarters")}])}}class C extends t.Plugin{static get pluginName(){return"SpecialCharactersLatin"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Latin",[{character:"Ā",title:e("Latin capital letter a with macron")},{character:"ā",title:e("Latin small letter a with macron")},{character:"Ă",title:e("Latin capital letter a with breve")},{character:"ă",title:e("Latin small letter a with breve")},{character:"Ą",title:e("Latin capital letter a with ogonek")},{character:"ą",title:e("Latin small letter a with ogonek")},{character:"Ć",title:e("Latin capital letter c with acute")},{character:"ć",title:e("Latin small letter c with acute")},{character:"Ĉ",title:e("Latin capital letter c with circumflex")},{character:"ĉ",title:e("Latin small letter c with circumflex")},{character:"Ċ",title:e("Latin capital letter c with dot above")},{character:"ċ",title:e("Latin small letter c with dot above")},{character:"Č",title:e("Latin capital letter c with caron")},{character:"č",title:e("Latin small letter c with caron")},{character:"Ď",title:e("Latin capital letter d with caron")},{character:"ď",title:e("Latin small letter d with caron")},{character:"Đ",title:e("Latin capital letter d with stroke")},{character:"đ",title:e("Latin small letter d with stroke")},{character:"Ē",title:e("Latin capital letter e with macron")},{character:"ē",title:e("Latin small letter e with macron")},{character:"Ĕ",title:e("Latin capital letter e with breve")},{character:"ĕ",title:e("Latin small letter e with breve")},{character:"Ė",title:e("Latin capital letter e with dot above")},{character:"ė",title:e("Latin small letter e with dot above")},{character:"Ę",title:e("Latin capital letter e with ogonek")},{character:"ę",title:e("Latin small letter e with ogonek")},{character:"Ě",title:e("Latin capital letter e with caron")},{character:"ě",title:e("Latin small letter e with caron")},{character:"Ĝ",title:e("Latin capital letter g with circumflex")},{character:"ĝ",title:e("Latin small letter g with circumflex")},{character:"Ğ",title:e("Latin capital letter g with breve")},{character:"ğ",title:e("Latin small letter g with breve")},{character:"Ġ",title:e("Latin capital letter g with dot above")},{character:"ġ",title:e("Latin small letter g with dot above")},{character:"Ģ",title:e("Latin capital letter g with cedilla")},{character:"ģ",title:e("Latin small letter g with cedilla")},{character:"Ĥ",title:e("Latin capital letter h with circumflex")},{character:"ĥ",title:e("Latin small letter h with circumflex")},{character:"Ħ",title:e("Latin capital letter h with stroke")},{character:"ħ",title:e("Latin small letter h with stroke")},{character:"Ĩ",title:e("Latin capital letter i with tilde")},{character:"ĩ",title:e("Latin small letter i with tilde")},{character:"Ī",title:e("Latin capital letter i with macron")},{character:"ī",title:e("Latin small letter i with macron")},{character:"Ĭ",title:e("Latin capital letter i with breve")},{character:"ĭ",title:e("Latin small letter i with breve")},{character:"Į",title:e("Latin capital letter i with ogonek")},{character:"į",title:e("Latin small letter i with ogonek")},{character:"İ",title:e("Latin capital letter i with dot above")},{character:"ı",title:e("Latin small letter dotless i")},{character:"IJ",title:e("Latin capital ligature ij")},{character:"ij",title:e("Latin small ligature ij")},{character:"Ĵ",title:e("Latin capital letter j with circumflex")},{character:"ĵ",title:e("Latin small letter j with circumflex")},{character:"Ķ",title:e("Latin capital letter k with cedilla")},{character:"ķ",title:e("Latin small letter k with cedilla")},{character:"ĸ",title:e("Latin small letter kra")},{character:"Ĺ",title:e("Latin capital letter l with acute")},{character:"ĺ",title:e("Latin small letter l with acute")},{character:"Ļ",title:e("Latin capital letter l with cedilla")},{character:"ļ",title:e("Latin small letter l with cedilla")},{character:"Ľ",title:e("Latin capital letter l with caron")},{character:"ľ",title:e("Latin small letter l with caron")},{character:"Ŀ",title:e("Latin capital letter l with middle dot")},{character:"ŀ",title:e("Latin small letter l with middle dot")},{character:"Ł",title:e("Latin capital letter l with stroke")},{character:"ł",title:e("Latin small letter l with stroke")},{character:"Ń",title:e("Latin capital letter n with acute")},{character:"ń",title:e("Latin small letter n with acute")},{character:"Ņ",title:e("Latin capital letter n with cedilla")},{character:"ņ",title:e("Latin small letter n with cedilla")},{character:"Ň",title:e("Latin capital letter n with caron")},{character:"ň",title:e("Latin small letter n with caron")},{character:"ʼn",title:e("Latin small letter n preceded by apostrophe")},{character:"Ŋ",title:e("Latin capital letter eng")},{character:"ŋ",title:e("Latin small letter eng")},{character:"Ō",title:e("Latin capital letter o with macron")},{character:"ō",title:e("Latin small letter o with macron")},{character:"Ŏ",title:e("Latin capital letter o with breve")},{character:"ŏ",title:e("Latin small letter o with breve")},{character:"Ő",title:e("Latin capital letter o with double acute")},{character:"ő",title:e("Latin small letter o with double acute")},{character:"Œ",title:e("Latin capital ligature oe")},{character:"œ",title:e("Latin small ligature oe")},{character:"Ŕ",title:e("Latin capital letter r with acute")},{character:"ŕ",title:e("Latin small letter r with acute")},{character:"Ŗ",title:e("Latin capital letter r with cedilla")},{character:"ŗ",title:e("Latin small letter r with cedilla")},{character:"Ř",title:e("Latin capital letter r with caron")},{character:"ř",title:e("Latin small letter r with caron")},{character:"Ś",title:e("Latin capital letter s with acute")},{character:"ś",title:e("Latin small letter s with acute")},{character:"Ŝ",title:e("Latin capital letter s with circumflex")},{character:"ŝ",title:e("Latin small letter s with circumflex")},{character:"Ş",title:e("Latin capital letter s with cedilla")},{character:"ş",title:e("Latin small letter s with cedilla")},{character:"Š",title:e("Latin capital letter s with caron")},{character:"š",title:e("Latin small letter s with caron")},{character:"Ţ",title:e("Latin capital letter t with cedilla")},{character:"ţ",title:e("Latin small letter t with cedilla")},{character:"Ť",title:e("Latin capital letter t with caron")},{character:"ť",title:e("Latin small letter t with caron")},{character:"Ŧ",title:e("Latin capital letter t with stroke")},{character:"ŧ",title:e("Latin small letter t with stroke")},{character:"Ũ",title:e("Latin capital letter u with tilde")},{character:"ũ",title:e("Latin small letter u with tilde")},{character:"Ū",title:e("Latin capital letter u with macron")},{character:"ū",title:e("Latin small letter u with macron")},{character:"Ŭ",title:e("Latin capital letter u with breve")},{character:"ŭ",title:e("Latin small letter u with breve")},{character:"Ů",title:e("Latin capital letter u with ring above")},{character:"ů",title:e("Latin small letter u with ring above")},{character:"Ű",title:e("Latin capital letter u with double acute")},{character:"ű",title:e("Latin small letter u with double acute")},{character:"Ų",title:e("Latin capital letter u with ogonek")},{character:"ų",title:e("Latin small letter u with ogonek")},{character:"Ŵ",title:e("Latin capital letter w with circumflex")},{character:"ŵ",title:e("Latin small letter w with circumflex")},{character:"Ŷ",title:e("Latin capital letter y with circumflex")},{character:"ŷ",title:e("Latin small letter y with circumflex")},{character:"Ÿ",title:e("Latin capital letter y with diaeresis")},{character:"Ź",title:e("Latin capital letter z with acute")},{character:"ź",title:e("Latin small letter z with acute")},{character:"Ż",title:e("Latin capital letter z with dot above")},{character:"ż",title:e("Latin small letter z with dot above")},{character:"Ž",title:e("Latin capital letter z with caron")},{character:"ž",title:e("Latin small letter z with caron")},{character:"ſ",title:e("Latin small letter long s")}])}}class T extends t.Plugin{static get pluginName(){return"SpecialCharactersCurrency"}init(){const t=this.editor,e=t.t;t.plugins.get("SpecialCharacters").addItems("Currency",[{character:"$",title:e("Dollar sign")},{character:"€",title:e("Euro sign")},{character:"¥",title:e("Yen sign")},{character:"£",title:e("Pound sign")},{character:"¢",title:e("Cent sign")},{character:"₠",title:e("Euro-currency sign")},{character:"₡",title:e("Colon sign")},{character:"₢",title:e("Cruzeiro sign")},{character:"₣",title:e("French franc sign")},{character:"₤",title:e("Lira sign")},{character:"¤",title:e("Currency sign")},{character:"₿",title:e("Bitcoin sign")},{character:"₥",title:e("Mill sign")},{character:"₦",title:e("Naira sign")},{character:"₧",title:e("Peseta sign")},{character:"₨",title:e("Rupee sign")},{character:"₩",title:e("Won sign")},{character:"₪",title:e("New sheqel sign")},{character:"₫",title:e("Dong sign")},{character:"₭",title:e("Kip sign")},{character:"₮",title:e("Tugrik sign")},{character:"₯",title:e("Drachma sign")},{character:"₰",title:e("German penny sign")},{character:"₱",title:e("Peso sign")},{character:"₲",title:e("Guarani sign")},{character:"₳",title:e("Austral sign")},{character:"₴",title:e("Hryvnia sign")},{character:"₵",title:e("Cedi sign")},{character:"₶",title:e("Livre tournois sign")},{character:"₷",title:e("Spesmilo sign")},{character:"₸",title:e("Tenge sign")},{character:"₹",title:e("Indian rupee sign")},{character:"₺",title:e("Turkish lira sign")},{character:"₻",title:e("Nordic mark sign")},{character:"₼",title:e("Manat sign")},{character:"₽",title:e("Ruble sign")}])}}class q extends t.Plugin{static get requires(){return[T,x,y,v,C]}}})(),(window.CKEditor5=window.CKEditor5||{}).specialCharacters=i})(); \ No newline at end of file diff --git a/core/assets/vendor/ckeditor5/table/table.js b/core/assets/vendor/ckeditor5/table/table.js index e81c76e1c3..00e651726d 100644 --- a/core/assets/vendor/ckeditor5/table/table.js +++ b/core/assets/vendor/ckeditor5/table/table.js @@ -2,4 +2,4 @@ /*! * @license Copyright (c) 2003-2022, CKSource Holding sp. z o.o. All rights reserved. * For licensing, see LICENSE.md. - */(()=>{var e={252:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const l=i},934:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]);const l=i},333:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const l=i},272:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const l=i},660:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const l=i},665:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}",""]);const l=i},773:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const l=i},975:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const l=i},482:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]);const l=i},686:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const l=i},99:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const l=i},475:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const l=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var l=0;l{"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},l=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),r=[];function s(e){for(var t=-1,o=0;o{e.exports=o(79)("./src/core.js")},492:(e,t,o)=>{e.exports=o(79)("./src/engine.js")},273:(e,t,o)=>{e.exports=o(79)("./src/ui.js")},209:(e,t,o)=>{e.exports=o(79)("./src/utils.js")},995:(e,t,o)=>{e.exports=o(79)("./src/widget.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var l=t[n]={id:n,exports:{}};return e[n](l,l.exports,o),l.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};(()=>{"use strict";o.r(n),o.d(n,{PlainTableOutput:()=>He,Table:()=>Fe,TableCaption:()=>Xo,TableCaptionEditing:()=>Ko,TableCaptionUI:()=>qo,TableCellProperties:()=>_o,TableCellPropertiesEditing:()=>ko,TableCellPropertiesUI:()=>io,TableCellWidthEditing:()=>so,TableClipboard:()=>xe,TableColumnResize:()=>gn,TableColumnResizeEditing:()=>hn,TableEditing:()=>ge,TableKeyboard:()=>Pe,TableMouse:()=>Be,TableProperties:()=>Do,TablePropertiesEditing:()=>Po,TablePropertiesUI:()=>Ho,TableSelection:()=>Ae,TableToolbar:()=>Ue,TableUI:()=>ve,TableUtils:()=>U});var e=o(704),t=o(995);function i(e,t){const{viewElement:o,defaultValue:n,modelAttribute:i,styleName:l,reduceBoxSides:r=!1}=t;e.for("upcast").attributeToAttribute({view:{name:o,styles:{[l]:/[\s\S]+/}},model:{key:i,value:e=>{const t=e.getNormalizedStyle(l),o=r?a(t):t;if(n!==o)return o}}})}function l(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,i)=>{if(!t.modelRange)return;const l=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!l.length)return;const r={styles:l};if(!i.consumable.test(t.viewItem,r))return;const s=[...t.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(t.viewItem,r);const c={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},d={style:a(c.style),color:a(c.color),width:a(c.width)};d.style!==n.style&&i.writer.setAttribute(o.style,d.style,s),d.color!==n.color&&i.writer.setAttribute(o.color,d.color,s),d.width!==n.width&&i.writer.setAttribute(o.width,d.width,s)}))))}function r(e,{modelElement:t,modelAttribute:o,styleName:n}){e.for("downcast").attributeToAttribute({model:{name:t,key:o},view:e=>({key:"style",value:{[n]:e}})})}function s(e,{modelAttribute:t,styleName:o}){e.for("downcast").add((e=>e.on(`attribute:${t}:table`,((e,t,n)=>{const{item:i,attributeNewValue:l}=t,{mapper:r,writer:s}=n;if(!n.consumable.consume(t.item,e.name))return;const a=[...r.toViewElement(i).getChildren()].find((e=>e.is("element","table")));l?s.setStyle(o,l,a):s.removeStyle(o,a)}))))}function a(e){if(!e)return;return["top","right","bottom","left"].map((t=>e[t])).reduce(((e,t)=>e==t?e:null))||e}function c(e,t,o,n,i=1){t>i?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function d(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function u(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||0),{column:i}=e.getCellLocation(t);return!!n&&i{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:i,headingRows:l,headingColumns:r}=function(e){const t={headingRows:0,headingColumns:0},o=[],n=[];let i;for(const l of Array.from(e.getChildren()))if("tbody"===l.name||"thead"===l.name||"tfoot"===l.name){"thead"!==l.name||i||(i=l);const e=Array.from(l.getChildren()).filter((e=>e.is("element","tr")));for(const l of e)if("thead"===l.parent.name&&l.parent===i)t.headingRows++,o.push(l);else{n.push(l);const e=p(l);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...o,...n],t}(n),s={};r&&(s.headingColumns=r),l&&(s.headingRows=l);const a=o.writer.createElement("table",s);if(o.safeInsert(a,t.modelCursor)){if(o.consumable.consume(n,{name:!0}),i.forEach((e=>o.convertItem(e,o.writer.createPositionAt(a,"end")))),o.convertChildren(n,o.writer.createPositionAt(a,"end")),a.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(a,"end")),d(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(a,t)}}))}}function g(e){return t=>{t.on(`element:${e}`,((e,t,o)=>{if(t.modelRange&&t.viewItem.isEmpty){const e=t.modelRange.start.nodeAfter,n=o.writer.createPositionAt(e,0);o.writer.insertElement("paragraph",n)}}),{priority:"low"})}}function p(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||i>1)&&this._recordSpans(o,i,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new w(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e{const l=n.getAttribute("headingRows")||0,r=[];l>0&&r.push(i.createContainerElement("thead",null,i.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=l))));const s=i.createContainerElement("figure",{class:"table"},[i.createContainerElement("table",null,r),i.createSlot((e=>!e.is("element","tableRow")))]);return o.asWidget?function(e,o){return o.setCustomProperty("table",!0,e),(0,t.toWidget)(e,o,{hasSelectionHandle:!0})}(s,i):s}}function _(e={}){return(o,{writer:n})=>{const i=o.parent,l=i.parent,r=l.getChildIndex(i),s=new f(l,{row:r}),a=l.getAttribute("headingRows")||0,c=l.getAttribute("headingColumns")||0;for(const i of s)if(i.cell==o){const o=i.row{if(t.parent.is("element","tableCell")&&C(t))return e.asWidget?o.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):(n.consume(t,"insert"),void i.bindElements(t,i.toViewElement(t.parent)))}}function C(e){return 1==e.parent.childCount&&![...e.getAttributeKeys()].length}class y extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor.model,o=this.editor.plugins.get("TableUtils"),n=this.editor.config.get("table"),i=n.defaultHeadings.rows,l=n.defaultHeadings.columns;void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&l&&(e.headingColumns=l),t.change((n=>{const i=o.createTable(n,e);t.insertObject(i,null,null,{findOptimalPosition:"auto"}),n.setSelection(n.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class T extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,i=o.getSelectionAffectedTableCells(t),l=o.getRowIndexes(i),r=n?l.first:l.last,s=i[0].findAncestor("table");o.insertRows(s,{at:n?r:r+1,copyStructureFromAbove:!n})}}class A extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,i=o.getSelectionAffectedTableCells(t),l=o.getColumnIndexes(i),r=n?l.first:l.last,s=i[0].findAncestor("table");o.insertColumns(s,{columns:1,at:n?r:r+1})}}class x extends e.Command{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function V(e,t,o){const{startRow:n,startColumn:i,endRow:l,endColumn:r}=t,s=o.createElement("table"),a=l-n+1;for(let e=0;e0){c("headingRows",l-o,e,i,0)}const r=parseInt(t.getAttribute("headingColumns")||0);if(r>0){c("headingColumns",r-n,e,i,0)}}(s,e,n,i,o),s}function S(e,t,o=0){const n=[],i=new f(e,{startRow:o,endRow:t-1});for(const e of i){const{row:o,cellHeight:i}=e,l=o+i-1;o1&&(s.rowspan=a);const u=parseInt(e.getAttribute("colspan")||1);u>1&&(s.colspan=u);const h=l+r,b=[...new f(i,{startRow:l,endRow:h,includeAllSlots:!0})];let m,g=null;for(const t of b){const{row:n,column:i,cell:l}=t;l===e&&void 0===m&&(m=i),void 0!==m&&m===i&&n===h&&(g=d(o,t.getPositionBefore(),s))}return c("rowspan",r,e,o),g}function I(e,t){const o=[],n=new f(e);for(const e of n){const{column:n,cellWidth:i}=e,l=n+i-1;n1&&(l.colspan=r);const s=parseInt(e.getAttribute("rowspan")||1);s>1&&(l.rowspan=s);const a=d(n,n.createPositionAfter(e),l);return c("colspan",i,e,n),a}function E(e,t,o,n,i,l){const r=parseInt(e.getAttribute("colspan")||1),s=parseInt(e.getAttribute("rowspan")||1);if(o+r-1>i){c("colspan",i-o+1,e,l,1)}if(t+s-1>n){c("rowspan",n-t+1,e,l,1)}}function z(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new f(e))n[t]++;const i=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(i.length>0){const o=i[i.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function B(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function W(e,t){z(e,t)||B(e,t)}function L(e,t){const o=Array.from(new f(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function N(e,t){const o=Array.from(new f(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class F extends e.Command{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,i=this.direction;e.change((e=>{const t="right"==i||"down"==i,l=t?o:n,r=t?n:o,s=r.parent;!function(e,t,o){H(e)||(H(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(r,l,e);const a=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(a)||1),d=parseInt(n.getAttribute(a)||1);e.setAttribute(a,c+d,l),e.setSelection(e.createRangeIn(l));const u=this.editor.plugins.get("TableUtils");W(s.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent.parent,i="right"==t?e.nextSibling:e.previousSibling,l=(n.getAttribute("headingColumns")||0)>0;if(!i)return;const r="right"==t?e:i,s="right"==t?i:e,{column:a}=o.getCellLocation(r),{column:c}=o.getCellLocation(s),d=parseInt(r.getAttribute("colspan")||1),h=u(o,r),b=u(o,s);if(l&&h!=b)return;return a+d===c?i:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,i=n.parent,l=i.getChildIndex(n);if("down"==t&&l===o.getRows(i)-1||"up"==t&&0===l)return;const r=parseInt(e.getAttribute("rowspan")||1),s=i.getAttribute("headingRows")||0,a="down"==t&&l+r===s,c="up"==t&&l===s;if(s&&(a||c))return;const d=parseInt(e.getAttribute("rowspan")||1),u="down"==t?l+d:l,h=[...new f(i,{endRow:u})],b=h.find((t=>t.cell===e)).column,m=h.find((({row:e,cellHeight:o,column:n})=>n===b&&("down"==t?e===u:u===e+o)));return m&&m.cell}(o,this.direction,t);if(!n)return;const i=this.isHorizontal?"rowspan":"colspan",l=parseInt(o.getAttribute(i)||1);return parseInt(n.getAttribute(i)||1)===l?n:void 0}}function H(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}class D extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getRows(n)-1,l=e.getRowIndexes(t),r=0===l.first&&l.last===i;this.isEnabled=!r}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0],l=i.findAncestor("table"),r=t.getCellLocation(i).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(l,{at:n.first,rows:o});const i=function(e,t,o,n){const i=e.getChild(Math.min(t,n-1));let l=i.getChild(0),r=0;for(const e of i.getChildren()){if(r>o)return l;l=e,r+=parseInt(e.getAttribute("colspan")||1)}return l}(l,n.first,r,t.getRows(l));e.setSelection(e.createPositionAt(i,0))}))}}class M extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getColumns(n),{first:l,last:r}=e.getColumnIndexes(t);this.isEnabled=r-le.cell===t)).column,last:i.find((e=>e.cell===o)).column},r=function(e,t,o,n){return parseInt(o.getAttribute("colspan")||1)>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(i,t,o,l);this.editor.model.change((e=>{const t=l.last-l.first+1;this.editor.plugins.get("TableUtils").removeColumns(n,{at:l.first,columns:t}),e.setSelection(e.createPositionAt(r,0))}))}}class O extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:l,last:r}=t.getRowIndexes(n),s=this.value?l:r+1,a=i.getAttribute("headingRows")||0;o.change((e=>{if(s){const t=S(i,s,s>a?a:0);for(const{cell:o}of t)R(o,s,e)}c("headingRows",s,i,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||0);return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>u(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:l,last:r}=t.getColumnIndexes(n),s=this.value?l:r+1;o.change((e=>{if(s){const t=I(i,s);for(const{cell:o,column:n}of t)P(o,n,s,e)}c("headingColumns",s,i,e,0)}))}}class U extends e.Plugin{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),i=new f(o,{row:n});for(const{cell:t,row:o,column:n}of i)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=parseInt(t.rows)||2,i=parseInt(t.columns)||2;return $(e,o,0,n,i),t.headingRows&&c("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&c("headingColumns",Math.min(t.headingColumns,i),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,i=t.rows||1,l=void 0!==t.copyStructureFromAbove,r=t.copyStructureFromAbove?n-1:n,s=this.getRows(e),a=this.getColumns(e);if(n>s)throw new b.CKEditorError("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&c("headingRows",o+i,e,t,0),!l&&(0===n||n===s))return void $(t,e,n,i,a);const u=l?Math.max(n,r):n,h=new f(e,{endRow:u}),b=new Array(a).fill(1);for(const{row:e,column:o,cellHeight:s,cellWidth:a,cell:c}of h){const d=e+s-1,u=e<=r&&r<=d;e0&&d(t,i,n>1?{colspan:n}:null),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,i=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");ni-1)throw new b.CKEditorError("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const{cellsToMove:o,cellsToTrim:n}=function(e,t,o){const n=new Map,i=[];for(const{row:l,column:r,cellHeight:s,cell:a}of new f(e,{endRow:o})){const e=l+s-1;if(l>=t&&l<=o&&e>o){const e=s-(o-l+1);n.set(r,{cell:a,rowspan:e})}if(l=t){let n;n=e>=o?o-t+1:e-t+1,i.push({cell:a,rowspan:s-n})}}return{cellsToMove:n,cellsToTrim:i}}(e,l,r);if(o.size){!function(e,t,o,n){const i=[...new f(e,{includeAllSlots:!0,row:t})],l=e.getChild(t);let r;for(const{column:e,cell:t,isAnchor:s}of i)if(o.has(e)){const{cell:t,rowspan:i}=o.get(e),s=r?n.createPositionAfter(r):n.createPositionAt(l,0);n.move(n.createRangeOn(t),s),c("rowspan",i,t,n),r=t}else s&&(r=t)}(e,r+1,o,t)}for(let o=r;o>=l;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of n)c("rowspan",e,o,t);!function(e,t,o,n){const i=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;o--)for(const{cell:n,column:i,cellWidth:l}of[...new f(e)])i<=o&&l>1&&i+l>o?c("colspan",l-1,n,t):i===o&&t.remove(n);B(e,this)||z(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||1),l=parseInt(e.getAttribute("colspan")||1);o.change((o=>{if(l>1){const{newCellsSpan:n,updatedSpan:r}=K(l,t);c("colspan",r,e,o);const s={};n>1&&(s.colspan=n),i>1&&(s.rowspan=i);Z(l>t?t-1:l-1,o,o.createPositionAfter(e),s)}if(lt===e)),d=s.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===a||na));for(const{cell:e,cellWidth:t}of d)o.setAttribute("colspan",t+r,e);const u={};i>1&&(u.rowspan=i),Z(r,o,o.createPositionAfter(e),u);const h=n.getAttribute("headingColumns")||0;h>a&&c("headingColumns",h+r,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,i=n.parent,l=i.getChildIndex(n),r=parseInt(e.getAttribute("rowspan")||1),s=parseInt(e.getAttribute("colspan")||1);o.change((o=>{if(r>1){const n=[...new f(i,{startRow:l,endRow:l+r-1,includeAllSlots:!0})],{newCellsSpan:a,updatedSpan:d}=K(r,t);c("rowspan",d,e,o);const{column:u}=n.find((({cell:t})=>t===e)),h={};a>1&&(h.rowspan=a),s>1&&(h.colspan=s);for(const e of n){const{column:t,row:n}=e,i=t===u,r=(n+l+d)%a==0;n>=l+d&&i&&r&&Z(1,o,e.getPositionBefore(),h)}}if(rl){const e=i+n;o.setAttribute("rowspan",e,t)}const d={};s>1&&(d.colspan=s),$(o,i,l+1,n,1,d);const u=i.getAttribute("headingRows")||0;u>l&&c("headingRows",u+n,i,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||1)),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new f(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new f(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const i of e){const{row:e,column:l}=this.getCellLocation(i),r=parseInt(i.getAttribute("rowspan")||1),s=parseInt(i.getAttribute("colspan")||1);t.add(e),o.add(l),r>1&&t.add(e+r-1),s>1&&o.add(l+s-1),n+=r*s}const i=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),i=Math.max(...o),l=Math.min(...o),r=Math.max(...n),s=Math.min(...n);return(i-l+1)*(r-s+1)}(t,o);return i==n}sortRanges(e){return Array.from(e).sort(q)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows")||0);if(!this._areIndexesInSameSection(o,n))return!1;const i=parseInt(t.getAttribute("headingColumns")||0),l=this.getColumnIndexes(e);return this._areIndexesInSameSection(l,i)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),i=n.shift(),{mergeWidth:l,mergeHeight:r}=function(e,t,o){let n=0,i=0;for(const e of t){const{row:t,column:l}=o.getCellLocation(e);n=Y(e,l,n,"colspan"),i=Y(e,t,i,"rowspan")}const{row:l,column:r}=o.getCellLocation(e);return{mergeWidth:n-r,mergeHeight:i-l}}(i,n,t);c("colspan",l,i,o),c("rowspan",r,i,o);for(const e of n)J(e,i,o);W(i.findAncestor("table"),t),o.setSelection(i,"in")}))}}function J(e,t,o){X(e)||(X(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function X(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function Y(e,t,o,n){const i=parseInt(e.getAttribute(n)||1);return Math.max(o,t+i)}class Q extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0].findAncestor("table"),l=[];for(let t=n.first;t<=n.last;t++)for(const o of i.getChild(t).getChildren())l.push(e.createRangeOn(o));e.change((e=>{e.setSelection(l)}))}}class ee extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],i=o.pop(),l=n.findAncestor("table"),r=e.getCellLocation(n),s=e.getCellLocation(i),a=Math.min(r.column,s.column),c=Math.max(r.column,s.column),d=[];for(const e of new f(l,{startColumn:a,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function te(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const i=new Set;for(const t of o){let o;"table"==t.name&&"insert"==t.type&&(o=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),ie(t)&&(o=t.range.start.findAncestor("table")),o&&!i.has(o)&&(n=oe(o,e)||n,n=ne(o,e)||n,i.add(o))}return n}(t,e)))}function oe(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||0),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:i,cell:l,cellHeight:r}of new f(e)){if(r<2)continue;const e=ie){const t=e-i;n.push({cell:l,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)c("rowspan",e.rowspan,e.cell,t,1)}return o}function ne(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new f(e,{includeAllSlots:!0}))t[o]++;return t}(e),i=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){o=!0;for(const o of i.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const l=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),r=l[0];if(!l.every((e=>e===r))){const n=l.reduce(((e,t)=>t>e?t:e),0);for(const[i,r]of l.entries()){const l=n-r;if(l){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=re(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=se(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=ae(t.position.nodeAfter,e)||n),ce(t)&&(n=ae(t.position.parent,e)||n);return n}(t,e)))}function re(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=se(n,t)||o);return o}function se(e,t){let o=!1;for(const n of e.getChildren())o=ae(n,t)||o;return o}function ae(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function ce(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function de(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&C(e)!==o.is("element","span")}var ue=o(62),he=o.n(ue),be=o(482),me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(be.Z,me);be.Z.locals;class ge extends e.Plugin{static get pluginName(){return"TableEditing"}static get requires(){return[U]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,i=e.plugins.get(U);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const i=o.convertItem(n,t.modelCursor),l=(0,b.first)(i.modelRange.getItems());l?(o.convertChildren(t.viewItem,o.writer.createPositionAt(l,"end")),o.updateConversionResult(l,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(m()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i,{asWidget:!0})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i)}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(g("td")),n.for("upcast").add(g("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:_({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:_()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:v({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:v(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:pe("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:pe("rowspan")},view:"rowspan"}),e.data.mapper.on("modelToViewPosition",((e,t)=>{const o=t.modelPosition.parent,n=t.modelPosition.nodeBefore;if(!o.is("element","tableCell"))return;if(!n||!n.is("element","paragraph"))return;const i=t.mapper.toViewElement(n),l=t.mapper.toViewElement(o);i===l&&(t.viewPosition=t.mapper.findPositionIn(l,n.maxOffset))})),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new y(e)),e.commands.add("insertTableRowAbove",new T(e,{order:"above"})),e.commands.add("insertTableRowBelow",new T(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new A(e,{order:"left"})),e.commands.add("insertTableColumnRight",new A(e,{order:"right"})),e.commands.add("removeTableRow",new D(e)),e.commands.add("removeTableColumn",new M(e)),e.commands.add("splitTableCellVertically",new x(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new x(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new G(e)),e.commands.add("mergeTableCellRight",new F(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new F(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new F(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new F(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new j(e)),e.commands.add("setTableRowHeader",new O(e)),e.commands.add("selectTableRow",new Q(e)),e.commands.add("selectTableColumn",new ee(e)),te(t),le(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const i=o.getAttribute("headingRows")||0,l=o.getAttribute("headingColumns")||0,r=new f(o);for(const e of r){const o=e.rowde(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}}function pe(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var fe=o(273),we=o(272),ke={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(we.Z,ke);we.Z.locals;class _e extends fe.View{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new b.KeystrokeHandler,this.focusTracker=new b.FocusTracker,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:i}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(i)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),(0,fe.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const i=Math.floor(n/10){const n=e.commands.get("insertTable"),i=(0,fe.createDropdown)(o);let l;return i.bind("isEnabled").to(n),i.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),i.on("change:isOpen",(()=>{l||(l=new _e(o),i.panelView.children.add(l),l.delegate("execute").to(i),i.on("execute",(()=>{e.execute("insertTable",{rows:l.rows,columns:l.columns}),e.editing.view.focus()})))})),i})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',o,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',n,e)}))}_prepareDropdown(e,t,o,n){const i=this.editor,l=(0,fe.createDropdown)(n),r=this._fillDropdownWithListOptions(l,o);return l.buttonView.set({label:e,icon:t,tooltip:!0}),l.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(l,"execute",(e=>{i.execute(e.source.commandName),e.source instanceof fe.SwitchButtonView||i.editing.view.focus()})),l}_prepareMergeSplitButtonDropdown(e,t,o,n){const i=this.editor,l=(0,fe.createDropdown)(n,fe.SplitButtonView),r="mergeTableCells",s=i.commands.get(r),a=this._fillDropdownWithListOptions(l,o);return l.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),l.bind("isEnabled").toMany([s,...a],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(l.buttonView,"execute",(()=>{i.execute(r),i.editing.view.focus()})),this.listenTo(l,"execute",(e=>{i.execute(e.source.commandName),i.editing.view.focus()})),l}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],i=new b.Collection;for(const e of t)Ce(e,o,n,i);return(0,fe.addListToDropdown)(e,i,o.ui.componentFactory),n}}function Ce(e,t,o,n){const i=e.model=new fe.Model(e.model),{commandName:l,bindIsOn:r}=e.model;if("button"===e.type||"switchbutton"===e.type){const e=t.commands.get(l);o.push(e),i.set({commandName:l}),i.bind("isEnabled").to(e),r&&i.bind("isOn").to(e,"value")}i.set({withText:!0}),n.add(e)}var ye=o(475),Te={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(ye.Z,Te);ye.Z.locals;class Ae extends e.Plugin{static get pluginName(){return"TableSelection"}static get requires(){return[U,U]}init(){const e=this.editor.model;this.listenTo(e,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(U),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(U),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:i,last:l}=e.getColumnIndexes(t),{first:r,last:s}=e.getRowIndexes(t),a=t[0].findAncestor("table");let c=s,d=l;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:l,firstRow:r,lastRow:s};c=L(a,e),d=N(a,e)}const u=V(a,{startRow:r,startColumn:i,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=this.editor.model.document.selection,t=(0,b.first)(e.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const i=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(i);const l=this.getSelectedTableCells();if(!l)return;for(const e of l){const o=n.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",o),t.add(o)}const r=n.mapper.toViewElement(l[l.length-1]);i.setSelection(r,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(n);o.setSelection(i)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(U),[n,i]=t,l=this.editor.model,r=!i||"backward"==i.direction,s=o.getSelectedTableCells(n);s.length&&(e.stop(),l.change((e=>{const t=s[r?s.length-1:0];l.change((e=>{for(const t of s)l.deleteContent(e.createSelection(t,"in"))}));const o=l.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),i=o.getCellLocation(t),l=Math.min(n.row,i.row),r=Math.max(n.row,i.row),s=Math.min(n.column,i.column),a=Math.max(n.column,i.column),c=new Array(r-l+1).fill(null).map((()=>[])),d={startRow:l,endRow:r,startColumn:s,endColumn:a};for(const{row:t,cell:o}of new f(e.findAncestor("table"),d))c[t-l].push(o);const u=i.rowe.reverse())),{cells:c.flat(),backward:u||h}}}class xe extends e.Plugin{static get pluginName(){return"TableClipboard"}static get requires(){return[Ae,U]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,t)=>this._onInsertContent(e,...t)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.plugins.get(Ae);if(!o.getSelectedTableCells())return;if("cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();const n=this.editor.data,i=this.editor.editing.view.document,l=n.toView(o.getSelectionAsFragment());i.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:l,method:e.name})}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,i=this.editor.plugins.get(U);let l=Ve(t,n);if(!l)return;const r=i.getSelectionAffectedTableCells(n.document.selection);r.length?(e.stop(),n.change((e=>{const t={width:i.getColumns(l),height:i.getRows(l)},o=function(e,t,o,n){const i=e[0].findAncestor("table"),l=n.getColumnIndexes(e),r=n.getRowIndexes(e),s={firstColumn:l.first,lastColumn:l.last,firstRow:r.first,lastRow:r.last},a=1===e.length;a&&(s.lastRow+=t.height-1,s.lastColumn+=t.width-1,function(e,t,o,n){const i=n.getColumns(e),l=n.getRows(e);o>i&&n.insertColumns(e,{at:i,columns:o-i});t>l&&n.insertRows(e,{at:l,rows:t-l})}(i,s.lastRow+1,s.lastColumn+1,n));a||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:i,firstColumn:l,lastColumn:r}=t,s={first:n,last:i},a={first:l,last:r};Re(e,l,s,o),Re(e,r+1,s,o),Se(e,n,a,o),Se(e,i+1,a,o,n)}(i,s,o):(s.lastRow=L(i,s),s.lastColumn=N(i,s));return s}(r,t,e,i),n=o.lastRow-o.firstRow+1,s=o.lastColumn-o.firstColumn+1,a={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(s,t.width)-1};l=V(l,a,e);const c=r[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(l,t,c,o,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=i.sortRanges(d.map((t=>e.createRangeOn(t))));e.setSelection(t)}else e.setSelection(d[0],0)}))):W(l,i)}_replaceSelectedCellsWithPasted(e,t,o,n,i){const{width:l,height:r}=t,s=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:i}of new f(e))n[o][t]=i;return n}(e,l,r),a=[...new f(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of a){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const a=t-n.firstRow,u=o-n.firstColumn,h=s[a%r][u%l],b=h?i.cloneElement(h):null,m=this._replaceTableSlotCell(e,b,d,i);m&&(E(m,t,o,n.lastRow,n.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const u=parseInt(o.getAttribute("headingRows")||0),h=parseInt(o.getAttribute("headingColumns")||0),b=n.firstRowIe(e,t,o))).map((({cell:e})=>R(e,t,n)))}function Re(e,t,o,n){if(t<1)return;return I(e,t).filter((({row:e,cellHeight:t})=>Ie(e,t,o))).map((({cell:e,column:o})=>P(e,o,t,n)))}function Ie(e,t,o){const n=e+t-1,{first:i,last:l}=o;return e>=i&&e<=l||e=i}class Pe extends e.Plugin{static get pluginName(){return"TableKeyboard"}static get requires(){return[Ae,U]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(e,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(e,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(U),i=o.model.document.selection,l=!t.shiftKey;let r=n.getTableCellsContainingSelection(i)[0];if(r||(r=this.editor.plugins.get("TableSelection").getFocusCell()),!r)return;t.preventDefault(),t.stopPropagation(),e.stop();const s=r.parent,a=s.parent,c=a.getChildIndex(s),d=s.getChildIndex(r),u=0===d;if(!l&&u&&0===c)return void o.model.change((e=>{e.setSelection(e.createRangeOn(a))}));const h=d===s.childCount-1,b=c===n.getRows(a)-1;if(l&&b&&h&&(o.execute("insertTableRowBelow"),c===n.getRows(a)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(a))}));let m;if(l&&h){const e=a.getChild(c+1);m=e.getChild(0)}else if(!l&&u){const e=a.getChild(c-1);m=e.getChild(e.childCount-1)}else m=s.getChild(d+(l?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(m))}))}_onArrowKey(e,t){const o=this.editor,n=t.keyCode,i=(0,b.getLocalizedArrowKeyCodeDirection)(n,o.locale.contentLanguageDirection);this._handleArrowKeys(i,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(U),n=this.editor.model,i=n.document.selection,l=["right","down"].includes(e),r=o.getSelectedTableCells(i);if(r.length){let o;return o=t?this.editor.plugins.get("TableSelection").getFocusCell():l?r[r.length-1]:r[0],this._navigateFromCellInDirection(o,e,t),!0}const s=i.focus.findAncestor("tableCell");if(!s)return!1;if(!i.isCollapsed)if(t){if(i.isBackward==l&&!i.containsEntireContent(s))return!1}else{const e=i.getSelectedElement();if(!e||!n.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(i,s,l)&&(this._navigateFromCellInDirection(s,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,i=this.editor.model.schema,l=o?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(l).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(l)}const r=n.createSelection(l);return n.modifySelection(r,{direction:o?"forward":"backward"}),l.isEqual(r.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,i=e.findAncestor("table"),l=[...new f(i,{includeAllSlots:!0})],{row:r,column:s}=l[l.length-1],a=l.find((({cell:t})=>t==e));let{row:c,column:d}=a;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=a.cellWidth;break;case"down":c+=a.cellHeight}if(c<0||c>r||d<0&&c<=0||d>s&&c>=r)return void n.change((e=>{e.setSelection(e.createRangeOn(i))}));d<0?(d=o?0:s,c--):d>s&&(d=o?s:0,c++);const u=l.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),b=this.editor.plugins.get("TableSelection");if(o&&b.isEnabled){const t=b.getAnchorCell()||e;b.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}var Ee=o(492);class ze extends Ee.DomEventObserver{constructor(e){super(e),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class Be extends e.Plugin{static get pluginName(){return"TableMouse"}static get requires(){return[Ae,U]}init(){this.editor.editing.view.addObserver(ze),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(U);let o=!1;const n=e.plugins.get(Ae);this.listenTo(e.editing.view.document,"mousedown",((i,l)=>{const r=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!l.domEvent.shiftKey)return;const s=n.getAnchorCell()||t.getTableCellsContainingSelection(r)[0];if(!s)return;const a=this._getModelTableCellFromDomEvent(l);a&&We(s,a)&&(o=!0,n.setCellSelection(s,a),l.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,i=!1;const l=e.plugins.get(Ae);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&l.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,r)=>{if(!r.domEvent.buttons)return;if(!t)return;const s=this._getModelTableCellFromDomEvent(r);s&&We(t,s)&&(o=s,n||o==t||(n=!0)),n&&(i=!0,l.setCellSelection(t,o),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,i=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function We(e,t){return e.parent.parent==t.parent.parent}var Le=o(660),Ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(Le.Z,Ne);Le.Z.locals;class Fe extends e.Plugin{static get requires(){return[ge,ve,Ae,Be,Pe,xe,t.Widget]}static get pluginName(){return"Table"}}class He extends e.Plugin{static get pluginName(){return"PlainTableOutput"}static get requires(){return[Fe]}init(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:De,converterPriority:"high"}),e.plugins.has("TableCaption")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if("table"===e.parent.name)return t.createContainerElement("caption")},converterPriority:"high"}),e.plugins.has("TableProperties")&&function(e){const t={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[o,n]of Object.entries(t))e.conversion.for("dataDowncast").add((e=>e.on(`attribute:${n}:table`,((e,t,n)=>{const{item:i,attributeNewValue:l}=t,{mapper:r,writer:s}=n;if(!n.consumable.consume(i,e.name))return;const a=r.toViewElement(i);l?s.setStyle(o,l,a):s.removeStyle(o,a)}),{priority:"high"})))}(e)}}function De(e,{writer:t}){const o=e.getAttribute("headingRows")||0,n=t.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=o)),l=t.createSlot((e=>!e.is("element","tableRow"))),r=t.createContainerElement("thead",null,n),s=t.createContainerElement("tbody",null,i),a=[];return o&&a.push(r),othis._setInputValue(o)))}render(){super.render(),this.keystrokes.listenTo(this.dropdownView.panelView.element)}focus(){this.inputView.focus()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorGrid(e),i=(0,fe.createDropdown)(e),l=new fe.View,r=this._createRemoveColorButton();return l.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(l),i.buttonView.label=t("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(r),i.panelView.children.add(n),i.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),this._focusables.add(r),this._focusables.add(n),this.focusTracker.add(r.element),this.focusTracker.add(n.element),i}_createInputTextView(){const e=this.locale,t=new fe.InputTextView(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createRemoveColorButton(){const t=this.locale,o=t.t,n=new fe.ButtonView(t),i=this.options.defaultColorValue||"",l=o(i?"Restore default":"Remove color");return n.class="ck-input-color__remove-color",n.withText=!0,n.icon=e.icons.eraser,n.label=l,n.on("execute",(()=>{this.value=i,this.dropdownView.isOpen=!1,this.fire("input")})),n}_createColorGrid(e){const t=new fe.ColorGridView(e,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return t.on("execute",((e,t)=>{this.value=t.value,this.dropdownView.isOpen=!1,this.fire("input")})),t.bind("selectedColor").to(this,"value"),t}_setInputValue(e){if(!this._stillTyping){const t=qe(e),o=this.options.colorDefinitions.find((e=>t===qe(e.color)));this.inputView.value=o?o.label:e||""}}}function qe(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Ge=e=>""===e;function Je(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function Xe(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Ye(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function Qe(e){return e=e.trim(),Ge(e)||(0,Ee.isColor)(e)}function et(e){return e=e.trim(),Ge(e)||rt(e)||(0,Ee.isLength)(e)||(0,Ee.isPercentage)(e)}function tt(e){return e=e.trim(),Ge(e)||rt(e)||(0,Ee.isLength)(e)}function ot(e,t){const o=new b.Collection,n=Je(e.t);for(const i in n){const l={type:"button",model:new fe.Model({_borderStyleValue:i,label:n[i],withText:!0})};"none"===i?l.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===i)):l.model.bind("isOn").to(e,"borderStyle",(e=>e===i)),o.add(l)}return o}function nt(e){const{view:t,icons:o,toolbar:n,labels:i,propertyName:l,nameToValue:r,defaultValue:s}=e;for(const e in i){const a=new fe.ButtonView(t.locale);a.set({label:i[e],icon:o[e],tooltip:i[e]});const c=r?r(e):e;a.bind("isOn").to(t,l,(e=>{let t=e;return""===e&&s&&(t=s),c===t})),a.on("execute",(()=>{t[l]=c})),n.items.add(a)}}const it=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function lt(e){return(t,o,n)=>{const i=new Ke(t.locale,{colorDefinitions:(l=e.colorConfig,l.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue});var l;return i.inputView.set({id:o,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),i.bind("hasError").to(t,"errorText",(e=>!!e)),i.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(i),i}}function rt(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var st=o(333),at={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(st.Z,at);st.Z.locals;class ct extends fe.View{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var dt=o(934),ut={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(dt.Z,ut);dt.Z.locals;var ht=o(686),bt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(ht.Z,bt);ht.Z.locals;var mt=o(773),gt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(mt.Z,gt);mt.Z.locals;const pt={left:e.icons.alignLeft,center:e.icons.alignCenter,right:e.icons.alignRight,justify:e.icons.alignJustify,top:e.icons.alignTop,middle:e.icons.alignMiddle,bottom:e.icons.alignBottom};class ft extends fe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:l}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:m,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new b.FocusTracker,this.keystrokes=new b.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.paddingInput=this._createPaddingField(),this.widthInput=a,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=m;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new fe.ViewCollection,this._focusCycler=new fe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new fe.FormHeaderView(e,{label:this.t("Cell properties")})),this.children.add(new ct(e,{labelView:l,children:[l,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new ct(e,{labelView:r,children:[r,s],class:"ck-table-form__background-row"})),this.children.add(new ct(e,{children:[new ct(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new ct(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new ct(e,{labelView:g,children:[g,h,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new ct(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,fe.submitHandler)({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=lt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,i=this.t,l=new fe.LabelView(n);l.text=i("Border");const r=Je(i),s=new fe.LabeledFieldView(n,fe.createLabeledDropdown);s.set({label:i("Style"),class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>r[e||"none"])),s.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),s.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,fe.addListToDropdown)(s.fieldView,ot(this,t.style));const a=new fe.LabeledFieldView(n,fe.createLabeledInputText);a.set({label:i("Width"),class:"ck-table-form__border-width"}),a.fieldView.bind("value").to(this,"borderWidth"),a.bind("isEnabled").to(this,"borderStyle",wt),a.fieldView.on("input",(()=>{this.borderWidth=a.fieldView.element.value}));const c=new fe.LabeledFieldView(n,o);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",wt),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{wt(n)||(this.borderColor="",this.borderWidth=""),wt(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:s,borderColorInput:c,borderWidthInput:a}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Background");const n=lt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),i=new fe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Dimensions");const n=new fe.LabeledFieldView(e,fe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new fe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const l=new fe.LabeledFieldView(e,fe.createLabeledInputText);return l.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),l.fieldView.bind("value").to(this,"height"),l.fieldView.on("input",(()=>{this.height=l.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:l}}_createPaddingField(){const e=this.locale,t=this.t,o=new fe.LabeledFieldView(e,fe.createLabeledInputText);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Table cell text alignment");const n=new fe.ToolbarView(e),i="rtl"===this.locale.contentLanguageDirection;n.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),nt({view:this,icons:pt,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(i){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const l=new fe.ToolbarView(e);return l.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),nt({view:this,icons:pt,toolbar:l,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:l,alignmentLabel:o}}_createActionButtons(){const t=this.locale,o=this.t,n=new fe.ButtonView(t),i=new fe.ButtonView(t),l=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(l,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),i=t("Align cell text to the right"),l=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o,justify:l}:{left:o,center:n,right:i,justify:l}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function wt(e){return"none"!==e}const kt=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const _t="object"==typeof global&&global&&global.Object===Object&&global;var vt="object"==typeof self&&self&&self.Object===Object&&self;const Ct=_t||vt||Function("return this")();const yt=function(){return Ct.Date.now()};var Tt=/\s/;const At=function(e){for(var t=e.length;t--&&Tt.test(e.charAt(t)););return t};var xt=/^\s+/;const Vt=function(e){return e?e.slice(0,At(e)+1).replace(xt,""):e};const St=Ct.Symbol;var Rt=Object.prototype,It=Rt.hasOwnProperty,Pt=Rt.toString,Et=St?St.toStringTag:void 0;const zt=function(e){var t=It.call(e,Et),o=e[Et];try{e[Et]=void 0;var n=!0}catch(e){}var i=Pt.call(e);return n&&(t?e[Et]=o:delete e[Et]),i};var Bt=Object.prototype.toString;const Wt=function(e){return Bt.call(e)};var Lt=St?St.toStringTag:void 0;const Nt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Lt&&Lt in Object(e)?zt(e):Wt(e)};const Ft=function(e){return null!=e&&"object"==typeof e};const Ht=function(e){return"symbol"==typeof e||Ft(e)&&"[object Symbol]"==Nt(e)};var Dt=/^[-+]0x[0-9a-f]+$/i,Mt=/^0b[01]+$/i,Ot=/^0o[0-7]+$/i,jt=parseInt;const Ut=function(e){if("number"==typeof e)return e;if(Ht(e))return NaN;if(kt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=kt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vt(e);var o=Mt.test(e);return o||Ot.test(e)?jt(e.slice(2),o?2:8):Dt.test(e)?NaN:+e};var $t=Math.max,Zt=Math.min;const Kt=function(e,t,o){var n,i,l,r,s,a,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=n,l=i;return n=i=void 0,c=t,r=e.apply(l,o)}function m(e){return c=e,s=setTimeout(p,t),d?b(e):r}function g(e){var o=e-a;return void 0===a||o>=t||o<0||u&&e-c>=l}function p(){var e=yt();if(g(e))return f(e);s=setTimeout(p,function(e){var o=t-(e-a);return u?Zt(o,l-(e-c)):o}(e))}function f(e){return s=void 0,h&&n?b(e):(n=i=void 0,r)}function w(){var e=yt(),o=g(e);if(n=arguments,i=this,a=e,o){if(void 0===s)return m(a);if(u)return clearTimeout(s),s=setTimeout(p,t),b(a)}return void 0===s&&(s=setTimeout(p,t)),r}return t=Ut(t)||0,kt(o)&&(d=!!o.leading,l=(u="maxWait"in o)?$t(Ut(o.maxWait)||0,t):l,h="trailing"in o?!!o.trailing:h),w.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=a=i=s=void 0},w.flush=function(){return void 0===s?r:f(yt())},w},qt=fe.BalloonPanelView.defaultPositions,Gt=[qt.northArrowSouth,qt.northArrowSouthWest,qt.northArrowSouthEast,qt.southArrowNorth,qt.southArrowNorthWest,qt.southArrowNorthEast,qt.viewportStickyNorth];function Jt(e,t){const o=e.plugins.get("ContextualBalloon");if(Oe(e.editing.view.document.selection)){let n;n="cell"===t?Yt(e):Xt(e),o.updatePosition(n)}}function Xt(e){const t=e.model.document.selection.getFirstPosition().findAncestor("table"),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:Gt}}function Yt(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,i=Array.from(e).map((e=>{const t=Qt(e.start),i=o.toViewElement(t);return new b.Rect(n.mapViewToDom(i))}));return b.Rect.getBoundingRect(i)}(n.getRanges(),e),positions:Gt};const i=Qt(n.getFirstPosition()),l=t.toViewElement(i);return{target:o.mapViewToDom(l),positions:Gt}}function Qt(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function eo(e){if(!e||!kt(e))return e;const{top:t,right:o,bottom:n,left:i}=e;return t==o&&o==n&&n==i?t:void 0}function to(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function oo(e,t={}){const o=Object.assign({borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:""},e);return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const no={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class io extends e.Plugin{static get requires(){return[fe.ContextualBalloon]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:it,backgroundColors:it})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=oo(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(fe.ContextualBalloon),this.view=this._createPropertiesView(),this._undoStepBatch=null,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new fe.ButtonView(o);n.set({label:t("Cell properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(no).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.editing.view.document,o=e.config.get("table.tableCellProperties"),n=(0,fe.normalizeColorOptions)(o.borderColors),i=(0,fe.getLocalizedColorOptions)(e.locale,n),l=(0,fe.normalizeColorOptions)(o.backgroundColors),r=(0,fe.getLocalizedColorOptions)(e.locale,l),s=new ft(e.locale,{borderColors:i,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),this.listenTo(e.ui,"update",(()=>{Oe(t.selection)?this._isViewVisible&&Jt(e,"cell"):this._hideView()})),(0,fe.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=Xe(a),d=Ye(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle",this._defaultTableCellProperties.borderStyle)),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:Qe,defaultValue:this._defaultTableCellProperties.borderColor})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:tt,defaultValue:this._defaultTableCellProperties.borderWidth})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:d,validator:et,defaultValue:this._defaultTableCellProperties.padding})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:d,validator:et,defaultValue:this._defaultTableCellProperties.width})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:d,validator:et,defaultValue:this._defaultTableCellProperties.height})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:Qe,defaultValue:this._defaultTableCellProperties.backgroundColor})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment",this._defaultTableCellProperties.horizontalAlignment)),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment",this._defaultTableCellProperties.verticalAlignment)),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(no).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}))}_showView(){const e=this.editor;this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:Yt(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){if(!this._isViewInBalloon)return;const e=this.editor;this.stopListening(e.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(e,t){return(o,n,i,l)=>{(l||t!==i)&&this.editor.execute(e,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i,defaultValue:l}=e,r=Kt((()=>{o.errorText=i}),500);return(e,i,s,a)=>{r.cancel(),(a||l!==s)&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):r())}}}class lo extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),l=this._getValueToSet(t);n.enqueueChange(o,(e=>{l?i.forEach((t=>e.setAttribute(this.attributeName,l,t))):i.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class ro extends lo{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class so extends e.Plugin{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[ge]}init(){const e=this.editor,t=oo(e.config.get("table.tableCellProperties.defaultProperties"));h(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ro(e,t.width))}}class ao extends lo{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class co extends lo{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){return(e=to(e,"px"))===this._defaultValue?null:e}}class uo extends lo{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class ho extends lo{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class bo extends lo{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class mo extends lo{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class go extends lo{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class po extends lo{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}const fo=/^(top|middle|bottom)$/,wo=/^(left|center|right|justify)$/;class ko extends e.Plugin{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[ge,so]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=oo(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Ee.addBorderRules),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),l(t,"td",n,o),l(t,"th",n,o),r(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),r(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),r(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new mo(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new go(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new po(e,n.borderWidth)),h(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new co(e,n.height)),e.data.addStyleProcessorRules(Ee.addPaddingRules),h(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new ao(e,n.padding)),e.data.addStyleProcessorRules(Ee.addBackgroundRules),h(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new uo(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":wo}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:wo}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new bo(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":fo}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:fo}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new ho(e,n.verticalAlignment))}}class _o extends e.Plugin{static get pluginName(){return"TableCellProperties"}static get requires(){return[ko,io]}}class vo extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:i}=e,l=o.getFirstPosition().findAncestor("table"),r=this._getValueToSet(n);t.enqueueChange(i,(e=>{r?e.setAttribute(this.attributeName,r,l):e.removeAttribute(this.attributeName,l)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class Co extends vo{constructor(e,t){super(e,"tableBackgroundColor",t)}}class yo extends vo{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class To extends vo{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Ao extends vo{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class xo extends vo{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class Vo extends vo{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){return(e=to(e,"px"))===this._defaultValue?null:e}}class So extends vo{constructor(e,t){super(e,"tableAlignment",t)}}const Ro=/^(left|center|right)$/,Io=/^(left|none|right)$/;class Po extends e.Plugin{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[ge]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=oo(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Ee.addBorderRules),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),l(t,"table",n,o),s(t,{modelAttribute:n.color,styleName:"border-color"}),s(t,{modelAttribute:n.style,styleName:"border-style"}),s(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new yo(e,n.borderColor)),e.commands.add("tableBorderStyle",new To(e,n.borderStyle)),e.commands.add("tableBorderWidth",new Ao(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Io}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:Ro}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new So(e,n.alignment)),Eo(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new xo(e,n.width)),Eo(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new Vo(e,n.height)),e.data.addStyleProcessorRules(Ee.addBackgroundRules),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:"table",...o}),s(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new Co(e,n.backgroundColor))}}function Eo(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:/^(table|figure)$/,...o}),r(t,{modelElement:"table",...o})}var zo=o(99),Bo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(zo.Z,Bo);zo.Z.locals;const Wo={left:e.icons.objectLeft,center:e.icons.objectCenter,right:e.icons.objectRight};class Lo extends fe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:l}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new b.FocusTracker,this.keystrokes=new b.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.widthInput=a,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=p,this._focusables=new fe.ViewCollection,this._focusCycler=new fe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new fe.FormHeaderView(e,{label:this.t("Table properties")})),this.children.add(new ct(e,{labelView:l,children:[l,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new ct(e,{labelView:r,children:[r,s],class:"ck-table-form__background-row"})),this.children.add(new ct(e,{children:[new ct(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new ct(e,{labelView:m,children:[m,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new ct(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,fe.submitHandler)({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=lt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,i=this.t,l=new fe.LabelView(n);l.text=i("Border");const r=Je(this.t),s=new fe.LabeledFieldView(n,fe.createLabeledDropdown);s.set({label:i("Style"),class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>r[e||"none"])),s.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),s.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,fe.addListToDropdown)(s.fieldView,ot(this,t.style));const a=new fe.LabeledFieldView(n,fe.createLabeledInputText);a.set({label:i("Width"),class:"ck-table-form__border-width"}),a.fieldView.bind("value").to(this,"borderWidth"),a.bind("isEnabled").to(this,"borderStyle",No),a.fieldView.on("input",(()=>{this.borderWidth=a.fieldView.element.value}));const c=new fe.LabeledFieldView(n,o);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",No),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{No(n)||(this.borderColor="",this.borderWidth=""),No(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:s,borderColorInput:c,borderWidthInput:a}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Background");const n=lt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),i=new fe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Dimensions");const n=new fe.LabeledFieldView(e,fe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new fe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const l=new fe.LabeledFieldView(e,fe.createLabeledInputText);return l.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),l.fieldView.bind("value").to(this,"height"),l.fieldView.on("input",(()=>{this.height=l.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:l}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Alignment");const n=new fe.ToolbarView(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),nt({view:this,icons:Wo,toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:n}}_createActionButtons(){const t=this.locale,o=this.t,n=new fe.ButtonView(t),i=new fe.ButtonView(t),l=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(l,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o}:{left:o,center:n,right:i}}}function No(e){return"none"!==e}const Fo={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Ho extends e.Plugin{static get requires(){return[fe.ContextualBalloon]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:it,backgroundColors:it})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=oo(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(fe.ContextualBalloon),this.view=this._createPropertiesView(),this._undoStepBatch=null,e.ui.componentFactory.add("tableProperties",(o=>{const n=new fe.ButtonView(o);n.set({label:t("Table properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(Fo).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=(0,fe.normalizeColorOptions)(t.borderColors),n=(0,fe.getLocalizedColorOptions)(e.locale,o),i=(0,fe.normalizeColorOptions)(t.backgroundColors),l=(0,fe.getLocalizedColorOptions)(e.locale,i),r=new Lo(e.locale,{borderColors:n,backgroundColors:l,defaultTableProperties:this._defaultTableProperties}),s=e.t;r.render(),this.listenTo(r,"submit",(()=>{this._hideView()})),this.listenTo(r,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),r.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),(0,fe.clickOutsideHandler)({emitter:r,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const a=Xe(s),c=Ye(s);return r.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle",this._defaultTableProperties.borderStyle)),r.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:r.borderColorInput,commandName:"tableBorderColor",errorText:a,validator:Qe,defaultValue:this._defaultTableProperties.borderColor})),r.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:r.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:tt,defaultValue:this._defaultTableProperties.borderWidth})),r.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:r.backgroundInput,commandName:"tableBackgroundColor",errorText:a,validator:Qe,defaultValue:this._defaultTableProperties.backgroundColor})),r.on("change:width",this._getValidatedPropertyChangeCallback({viewField:r.widthInput,commandName:"tableWidth",errorText:c,validator:et,defaultValue:this._defaultTableProperties.width})),r.on("change:height",this._getValidatedPropertyChangeCallback({viewField:r.heightInput,commandName:"tableHeight",errorText:c,validator:et,defaultValue:this._defaultTableProperties.height})),r.on("change:alignment",this._getPropertyChangeCallback("tableAlignment",this._defaultTableProperties.alignment)),r}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(Fo).map((([t,o])=>{const n=this._defaultTableProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}))}_showView(){const e=this.editor;this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:Xt(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Oe(e.editing.view.document.selection)?this._isViewVisible&&Jt(e,"table"):this._hideView()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(e,t){return(o,n,i,l)=>{(l||t!==i)&&this.editor.execute(e,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i,defaultValue:l}=e,r=Kt((()=>{o.errorText=i}),500);return(e,i,s,a)=>{r.cancel(),(a||l!==s)&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):r())}}}class Do extends e.Plugin{static get pluginName(){return"TableProperties"}static get requires(){return[Po,Ho]}}function Mo(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o){if("insert"!=t.type)continue;if(t.position.parent.is("element","table")||"table"==t.name){const o="table"==t.name?t.position.nodeAfter:t.position.parent,i=Array.from(o.getChildren()).filter((e=>e.is("element","caption"))),l=i.shift();if(!l)continue;for(const t of i)e.move(e.createRangeIn(t),l,"end"),e.remove(t);l.nextSibling&&(e.move(e.createRangeOn(l),o,"end"),n=!0),n=!!i.length||n}}return n}(t,e)))}function Oo(e){return!!e&&e.is("element","table")}function jo(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function Uo(e){const t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("table")||"caption"==e.name&&t&&"table"==t.name?{name:!0}:null}function $o(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}class Zo extends e.Command{refresh(){const e=$o(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!jo(e):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideTableCaption(e):this._showTableCaption(e,t)}))}_showTableCaption(e,t){const o=$o(this.editor.model.document.selection),n=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(o)||e.createElement("caption");e.append(n,o),t&&e.setSelection(n,"in")}_hideTableCaption(e){const t=$o(this.editor.model.document.selection),o=this.editor.plugins.get("TableCaptionEditing"),n=jo(t);o._saveCaption(t,n),e.setSelection(e.createRangeIn(t.getChild(0).getChild(0))),e.remove(n)}}class Ko extends e.Plugin{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,o=e.model.schema,n=e.editing.view,i=e.t;o.isRegistered("caption")?o.extend("caption",{allowIn:"table"}):o.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new Zo(this.editor)),e.conversion.for("upcast").elementToElement({view:Uo,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>Oo(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!Oo(e.parent))return null;const l=o.createEditableElement("figcaption");return o.setCustomProperty("tableCaption",!0,l),(0,Ee.enablePlaceholder)({view:n,element:l,text:i("Enter table caption"),keepOnFocus:!0}),(0,t.toWidgetEditable)(l,o)}}),Mo(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Ee.Element.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class qo extends e.Plugin{static get pluginName(){return"TableCaptionUI"}init(){const t=this.editor,o=t.editing.view,n=t.t;t.ui.componentFactory.add("toggleTableCaption",(i=>{const l=t.commands.get("toggleTableCaption"),r=new fe.ButtonView(i);return r.set({icon:e.icons.caption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(l,"value","isEnabled"),r.bind("label").to(l,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(r,"execute",(()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),l.value){const e=function(e){const t=$o(e);return t?jo(t):null}(t.model.document.selection),n=t.editing.mapper.toViewElement(e);if(!n)return;o.scrollToTheSelection(),o.change((e=>{e.addClass("table__caption_highlighted",n)}))}t.editing.view.focus()})),r}))}}var Go=o(665),Jo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(Go.Z,Jo);Go.Z.locals;class Xo extends e.Plugin{static get pluginName(){return"TableCaption"}static get requires(){return[Ko,qo]}}const Yo=function(e,t,o){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return kt(o)&&(n="leading"in o?!!o.leading:n,i="trailing"in o?!!o.trailing:i),Kt(e,t,{leading:n,maxWait:t,trailing:i})};class Qo extends vo{constructor(e,t){super(e,"tableWidth",t)}refresh(){this.isEnabled=!0}execute(e={}){const t=this.editor.model,o=e.table||t.document.selection.getSelectedElement(),{tableWidth:n,columnWidths:i}=e;t.change((e=>{n?(e.setAttribute(this.attributeName,n,o),e.setAttribute("columnWidths",i,o)):e.removeAttribute(this.attributeName,o)}))}}class en extends vo{constructor(e,t){super(e,"columnWidths",t)}refresh(){this.isEnabled=!0}execute(e={}){const t=this.editor.model,o=e.table||t.document.selection.getSelectedElement(),{columnWidths:n}=e;t.change((e=>{n?e.setAttribute(this.attributeName,n,o):e.removeAttribute(this.attributeName,o)}))}}function tn(e,t){return 4e3/on(e,t)}function on(e,t){const o=nn(e,"tbody",t)||nn(e,"thead",t);return ln(t.editing.view.domConverter.mapViewToDom(o))}function nn(e,t,o){return[...[...o.editing.mapper.toViewElement(e).getChildren()].find((e=>e.is("element","table"))).getChildren()].find((e=>e.is("element",t)))}function ln(e){const t=b.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function rn(e){const t=Math.pow(10,2),o=parseFloat(e);return Math.round(o*t)/t}function sn(e){return e.map((e=>parseFloat(e))).filter((e=>!Number.isNaN(e))).reduce(((e,t)=>e+t),0)}function an(e){e=function(e){const t=e.filter((e=>"auto"===e)).length;if(0===t)return e.map((e=>rn(e)));const o=sn(e),n=Math.max((100-o)/t,5);return e.map((e=>"auto"===e?n:e)).map((e=>rn(e)))}(e);const t=sn(e);return 100===t?e:e.map((e=>rn(100*e/t))).map(((e,t,o)=>{if(!(t===o.length-1))return e;return rn(e+100-sn(o))}))}function cn(e,t){let o=[...t.getChildren()].find((e=>e.hasClass("ck-table-column-resizer")));o||(o=e.createUIElement("div",{class:"ck-table-column-resizer"}),e.insert(e.createPositionAt(t,"end"),o))}function dn(e){const t=b.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function un(){return e=>e.on("attribute:columnWidths:table",((e,t,o)=>{const n=o.writer,i=t.item,l=[...o.mapper.toViewElement(i).getChildren()].find((e=>e.is("element","table")));t.attributeNewValue?(!function(e,t,o){const n=o.split(",");let i=[...t.getChildren()].find((e=>e.is("element","colgroup")));if(i)for(const t of[...i.getChildren()])e.remove(t);else i=e.createContainerElement("colgroup");for(const t of Array(n.length).keys()){const o=e.createEmptyElement("col");e.setStyle("width",n[t],o),e.insert(e.createPositionAt(i,"end"),o)}e.insert(e.createPositionAt(t,"start"),i)}(n,l,t.attributeNewValue),n.addClass("ck-table-resized",l)):(!function(e,t){const o=[...t.getChildren()].find((e=>e.is("element","colgroup")));e.remove(o)}(n,l),n.removeClass("ck-table-resized",l))}))}class hn extends e.Plugin{static get requires(){return[ge,U]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=Object.create(b.DomEmitterMixin),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",((t,o,n)=>{e.editing.view.change((t=>{t[n?"removeClass":"addClass"]("ck-column-resize_disabled",e.editing.view.document.getRoot())}))}))}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerColgroupFixer(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.commands.add("resizeTableWidth",new Qo(e)),e.commands.add("resizeColumnWidths",new en(e));const o=e.commands.get("resizeTableWidth"),n=e.commands.get("resizeColumnWidths");this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",o,"isEnabled",n,"isEnabled",((e,t,o,n)=>!e&&t&&o&&n))}destroy(){this._domEmitter.stopListening(),super.destroy()}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth","columnWidths"]})}_registerPostFixer(){const e=this.editor.model;function t(e,t,o){const n=o._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return;const i=function(e,t){const o=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))o.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&o.add(e)}return o}(o.editor.model.document.differ,t);for(const r of i){const i=n-e.length;if(0===i)continue;const s=i>0,a=o._tableUtilsPlugin.getCellLocation(r).column;if(s){const n=tn(t,o.editor),r=(l=n,Array(i).fill(l));e.splice(a,0,...r)}else{const t=e.splice(a,Math.abs(i));e[a]+=sn(t)}}var l}e.document.registerPostFixer((o=>{let n=!1;for(const i of function(e){const t=new Set;for(const o of e.document.differ.getChanges()){let n=null;switch(o.type){case"insert":n=["table","tableRow","tableCell"].includes(o.name)?o.position:null;break;case"remove":n=["tableRow","tableCell"].includes(o.name)?o.position:null;break;case"attribute":o.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(o.range.start.nodeAfter.name)?o.range.start:null)}if(!n)continue;const i=n.nodeAfter&&"table"===n.nodeAfter.name?n.nodeAfter:n.findAncestor("table");for(const o of e.createRangeOn(i).getItems())o.is("element")&&"table"===o.name&&o.hasAttribute("columnWidths")&&t.add(o)}return t}(e)){const e=an(i.getAttribute("columnWidths").split(","));t(e,i,this);const l=e.map((e=>`${e}%`)).join(",");i.getAttribute("columnWidths")!==l&&(o.setAttribute("columnWidths",l,i),n=!0)}return n}))}_registerConverters(){const e=this.editor.conversion;var t;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>e.getStyle("width")}}),e.for("upcast").add((t=this._tableUtilsPlugin,e=>e.on("element:colgroup",((e,o,n)=>{const i=o.viewItem;if(!n.consumable.test(i,{name:!0}))return;n.consumable.consume(i,{name:!0});const l=o.modelCursor.findAncestor("table"),r=t.getColumns(l);let s=[...Array(r).keys()].map((e=>{const t=i.getChild(e);if(!t||!t.is("element","col"))return"auto";const o=t.getStyle("width");return o&&o.endsWith("%")?o:"auto"}));s.includes("auto")&&(s=an(s).map((e=>e+"%"))),n.writer.setAttribute("columnWidths",s.join(","),l)})))),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),e.for("downcast").add(un())}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(ze),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(b.global.window.document,"mousemove",Yo(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(b.global.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const o=t.target;if(!o.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;t.preventDefault(),e.stop();const n=this.editor,i=function(e,t,o){const n=Array(t.getColumns(e)),i=new f(e);for(const e of i){const t=o.editing.mapper.toViewElement(e.cell),i=dn(o.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||ie.is("element","colgroup")))||r.change((e=>{!function(e,t,o){const n=e.createContainerElement("colgroup");for(let o=0;ofunction(e,t,o){const n=o.widths.viewFigureWidth/o.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",o.elements.viewResizer),e.setStyle("width",`${rn(100*n)}%`,t.findAncestor("figure"))}(e,l,this._resizingData)))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:o,flags:{isRightEdge:n,isTableCentered:i,isLtrContent:l},elements:{viewFigure:r,viewLeftColumn:s,viewRightColumn:a},widths:{viewFigureParentWidth:c,tableWidth:d,leftColumnWidth:u,rightColumnWidth:h}}=this._resizingData,b=40-u,m=n?c-d:h-40,g=(l?1:-1)*(n&&i?2:1),p=(f=(t.clientX-o)*g,w=Math.min(b,0),k=Math.max(m,0),rn(f<=w?w:f>=k?k:f));var f,w,k;0!==p&&this.editor.editing.view.change((e=>{const t=rn(100*(u+p)/d);if(e.setStyle("width",`${t}%`,s),n){const t=rn(100*(d+p)/c);e.setStyle("width",`${t}%`,r)}else{const t=rn(100*(h-p)/d);e.setStyle("width",`${t}%`,a)}}))}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:o,viewColgroup:n}=this._resizingData.elements,i=this.editor,l=i.editing.view,r=t.getAttribute("columnWidths"),s=[...n.getChildren()].map((e=>e.getStyle("width"))).join(","),a=r!==s,c=t.getAttribute("tableWidth"),d=o.getStyle("width"),u=c!==d;(a||u)&&(this._isResizingAllowed?u?i.execute("resizeTableWidth",{table:t,tableWidth:`${rn(d)}%`,columnWidths:s}):i.execute("resizeColumnWidths",{columnWidths:s,table:t}):l.change((e=>{if(r){const t=r.split(",");for(const o of n.getChildren())e.setStyle("width",t.shift(),o)}else e.remove(n);u&&(c?e.setStyle("width",c,o):e.removeStyle("width",o)),r||c||e.removeClass("ck-table-resized",[...o.getChildren()].find((e=>"table"===e.name)))}))),l.change((t=>{t.removeClass("ck-table-column-resizer__active",e)})),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const o=this.editor,n=e.domEvent.clientX,i=e.target,l=i.findAncestor("td")||i.findAncestor("th"),r=o.editing.mapper.toModelElement(l),s=r.findAncestor("table"),a=function(e,t){const o=t.getCellLocation(e).column;return{leftEdge:o,rightEdge:o+(e.getAttribute("colspan")||1)-1}}(r,this._tableUtilsPlugin).rightEdge,c=a===this._tableUtilsPlugin.getColumns(s)-1,d=!s.hasAttribute("tableAlignment"),u="rtl"!==o.locale.contentLanguageDirection,h=l.findAncestor("table"),b=h.findAncestor("figure"),m=[...h.getChildren()].find((e=>e.is("element","colgroup"))),g=m.getChild(a),p=c?void 0:m.getChild(a+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:d,isLtrContent:u},elements:{viewResizer:i,modelTable:s,viewFigure:b,viewColgroup:m,viewLeftColumn:g,viewRightColumn:p},widths:{viewFigureParentWidth:ln(o.editing.view.domConverter.mapViewToDom(b.parent)),viewFigureWidth:ln(o.editing.view.domConverter.mapViewToDom(b)),tableWidth:on(s,o),leftColumnWidth:t[a],rightColumnWidth:c?void 0:t[a+1]}}}_registerColgroupFixer(){const e=this.editor;this.listenTo(e.editing.view.document,"layoutChanged",(()=>{const t=e.editing.view.document.selection.getFirstPosition().getAncestors().reverse().find((e=>"table"===e.name)),o=t&&[...t.getChildren()].find((e=>e.is("element","colgroup"))),n=e.model.document.selection.getFirstPosition().findAncestor("table");n&&n.hasAttribute("columnWidths")&&t&&!o&&e.editing.reconvertItem(n)}),{priority:"low"})}_registerResizerInserter(){const e=this.editor.editing.view;e.on("render",(()=>{for(const t of e.createRangeIn(e.document.getRoot()))["td","th"].includes(t.item.name)&&e.change((e=>{cn(e,t.item)}))}),{priority:"lowest"})}}var bn=o(975),mn={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(bn.Z,mn);bn.Z.locals;class gn extends e.Plugin{static get requires(){return[hn,so]}static get pluginName(){return"TableColumnResize"}}})(),(window.CKEditor5=window.CKEditor5||{}).table=n})(); \ No newline at end of file + */(()=>{var e={252:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-input-color{display:flex;flex-direction:row-reverse;width:100%}.ck.ck-input-color>input.ck.ck-input-text{flex-grow:1;min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button{display:flex}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{overflow:hidden;position:relative}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{display:block;position:absolute}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-bottom-left-radius:0;border-top-left-radius:0}.ck.ck-input-color>.ck.ck-input-text:focus{z-index:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-left-radius:0;border-top-left-radius:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-left:1px solid transparent}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button{border-bottom-right-radius:0;border-top-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button:not(:focus){border-right:1px solid transparent}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview{border:1px solid var(--ck-color-input-border);height:20px;width:20px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-button.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{background:red;border-radius:2px;height:150%;left:50%;top:-30%;transform:rotate(45deg);transform-origin:50%;width:8%}.ck.ck-input-color .ck.ck-input-color__remove-color{border-bottom-left-radius:0;border-bottom-right-radius:0;padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);width:100%}.ck.ck-input-color .ck.ck-input-color__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-input-border)}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard);margin-right:0}",""]);const l=i},934:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}",""]);const l=i},333:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{min-width:100%;width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}",""]);const l=i},272:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0;width:calc(var(--ck-insert-table-dropdown-box-width)*10 + var(--ck-insert-table-dropdown-box-margin)*20 + var(--ck-insert-table-dropdown-padding)*2)}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{border:1px solid var(--ck-color-base-border);border-radius:1px;margin:var(--ck-insert-table-dropdown-box-margin);min-height:var(--ck-insert-table-dropdown-box-height);min-width:var(--ck-insert-table-dropdown-box-width);outline:none;transition:none}.ck .ck-insert-table-dropdown-grid-box:focus{box-shadow:none}.ck .ck-insert-table-dropdown-grid-box.ck-on{background:var(--ck-color-focus-outer-shadow);border-color:var(--ck-color-focus-border)}",""]);const l=i},660:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck-content .table{display:table;margin:.9em auto}.ck-content .table table{border:1px double #b3b3b3;border-collapse:collapse;border-spacing:0;height:100%;width:100%}.ck-content .table table td,.ck-content .table table th{border:1px solid #bfbfbf;min-width:2em;padding:.4em}.ck-content .table table th{background:rgba(0,0,0,.05);font-weight:700}.ck-content[dir=rtl] .table th{text-align:right}.ck-content[dir=ltr] .table th{text-align:left}.ck-editor__editable .ck-table-bogus-paragraph{display:inline-block;width:100%}",""]);const l=i},665:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-table-caption-background:#f7f7f7;--ck-color-table-caption-text:#333;--ck-color-table-caption-highlighted-background:#fd0}.ck-content .table>figcaption{background-color:var(--ck-color-table-caption-background);caption-side:top;color:var(--ck-color-table-caption-text);display:table-caption;font-size:.75em;outline-offset:-1px;padding:.6em;text-align:center;word-break:break-word}.ck.ck-editor__editable .table>figcaption.table__caption_highlighted{animation:ck-table-caption-highlight .6s ease-out}.ck.ck-editor__editable .table>figcaption.ck-placeholder:before{overflow:hidden;padding-left:inherit;padding-right:inherit;text-overflow:ellipsis;white-space:nowrap}@keyframes ck-table-caption-highlight{0%{background-color:var(--ck-color-table-caption-highlighted-background)}to{background-color:var(--ck-color-table-caption-background)}}",""]);const l=i},773:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:first-of-type{flex-grow:0.57}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar:last-of-type{flex-grow:0.43}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar .ck-button{flex-grow:1}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{align-self:flex-end;padding:0;width:25%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}",""]);const l=i},975:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-table-column-resizer-hover:var(--ck-color-base-active);--ck-table-column-resizer-width:7px;--ck-table-column-resizer-position-offset:calc(var(--ck-table-column-resizer-width)*-0.5 - 0.5px)}.ck-content .table .ck-table-resized{table-layout:fixed}.ck-content .table table{overflow:hidden}.ck-content .table td,.ck-content .table th{position:relative}.ck.ck-editor__editable .table .ck-table-column-resizer{bottom:-999999px;cursor:col-resize;position:absolute;right:var(--ck-table-column-resizer-position-offset);top:-999999px;user-select:none;width:var(--ck-table-column-resizer-width);z-index:var(--ck-z-default)}.ck.ck-editor__editable .table[draggable] .ck-table-column-resizer,.ck.ck-editor__editable.ck-column-resize_disabled .table .ck-table-column-resizer{display:none}.ck.ck-editor__editable .table .ck-table-column-resizer:hover,.ck.ck-editor__editable .table .ck-table-column-resizer__active{background-color:var(--ck-color-table-column-resizer-hover);opacity:.25}.ck.ck-editor__editable[dir=rtl] .table .ck-table-column-resizer{left:var(--ck-table-column-resizer-position-offset);right:unset}",""]);const l=i},482:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,":root{--ck-color-table-focused-cell-background:rgba(158,201,250,.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}",""]);const l=i},686:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,'.ck.ck-table-form .ck-form__row.ck-table-form__background-row,.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{align-items:center;flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view{align-items:center;display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-field-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-field-view{position:relative}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{bottom:calc(var(--ck-table-properties-error-arrow-size)*-1);left:50%;position:absolute;transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{content:"";left:50%;position:absolute;top:calc(var(--ck-table-properties-error-arrow-size)*-1);transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-field-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{max-width:80px;min-width:80px;width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:flex-end;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-field-view{padding-top:var(--ck-spacing-standard)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status,.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);min-width:var(--ck-table-properties-min-error-width);padding:var(--ck-spacing-small) var(--ck-spacing-medium);text-align:center}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status:after{border-color:transparent transparent var(--ck-color-base-error) transparent;border-style:solid;border-width:0 var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size) var(--ck-table-properties-error-arrow-size)}.ck.ck-table-form .ck.ck-labeled-field-view .ck.ck-labeled-field-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-field-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-field-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}',""]);const l=i},99:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-content:baseline;flex-basis:0;flex-wrap:wrap}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{align-self:flex-end;padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none;margin-top:var(--ck-spacing-standard)}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}",""]);const l=i},475:(e,t,o)=>{"use strict";o.d(t,{Z:()=>l});var n=o(609),i=o.n(n)()((function(e){return e[1]}));i.push([e.id,':root{--ck-table-selected-cell-background:rgba(158,207,250,.3)}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{box-shadow:unset;caret-color:transparent;outline:unset;position:relative}.ck.ck-editor__editable .table table td.ck-editor__editable_selected:after,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:after{background-color:var(--ck-table-selected-cell-background);bottom:0;content:"";left:0;pointer-events:none;position:absolute;right:0;top:0}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table td.ck-editor__editable_selected:focus,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected:focus{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget{outline:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget>.ck-widget__selection-handle{display:none}',""]);const l=i},609:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var o=e(t);return t[2]?"@media ".concat(t[2]," {").concat(o,"}"):o})).join("")},t.i=function(e,o,n){"string"==typeof e&&(e=[[null,e,""]]);var i={};if(n)for(var l=0;l{"use strict";var n,i=function(){return void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n},l=function(){var e={};return function(t){if(void 0===e[t]){var o=document.querySelector(t);if(window.HTMLIFrameElement&&o instanceof window.HTMLIFrameElement)try{o=o.contentDocument.head}catch(e){o=null}e[t]=o}return e[t]}}(),r=[];function s(e){for(var t=-1,o=0;o{e.exports=o(79)("./src/core.js")},492:(e,t,o)=>{e.exports=o(79)("./src/engine.js")},273:(e,t,o)=>{e.exports=o(79)("./src/ui.js")},209:(e,t,o)=>{e.exports=o(79)("./src/utils.js")},995:(e,t,o)=>{e.exports=o(79)("./src/widget.js")},79:e=>{"use strict";e.exports=CKEditor5.dll}},t={};function o(n){var i=t[n];if(void 0!==i)return i.exports;var l=t[n]={id:n,exports:{}};return e[n](l,l.exports,o),l.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var n in t)o.o(t,n)&&!o.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},o.nc=void 0;var n={};(()=>{"use strict";o.r(n),o.d(n,{PlainTableOutput:()=>He,Table:()=>Fe,TableCaption:()=>Xo,TableCaptionEditing:()=>Ko,TableCaptionUI:()=>qo,TableCellProperties:()=>_o,TableCellPropertiesEditing:()=>ko,TableCellPropertiesUI:()=>io,TableCellWidthEditing:()=>so,TableClipboard:()=>xe,TableColumnResize:()=>gn,TableColumnResizeEditing:()=>hn,TableEditing:()=>ge,TableKeyboard:()=>Pe,TableMouse:()=>Be,TableProperties:()=>Do,TablePropertiesEditing:()=>Po,TablePropertiesUI:()=>Ho,TableSelection:()=>Ae,TableToolbar:()=>Ue,TableUI:()=>ve,TableUtils:()=>U});var e=o(704),t=o(995);function i(e,t){const{viewElement:o,defaultValue:n,modelAttribute:i,styleName:l,reduceBoxSides:r=!1}=t;e.for("upcast").attributeToAttribute({view:{name:o,styles:{[l]:/[\s\S]+/}},model:{key:i,value:e=>{const t=e.getNormalizedStyle(l),o=r?a(t):t;if(n!==o)return o}}})}function l(e,t,o,n){e.for("upcast").add((e=>e.on("element:"+t,((e,t,i)=>{if(!t.modelRange)return;const l=["border-top-width","border-top-color","border-top-style","border-bottom-width","border-bottom-color","border-bottom-style","border-right-width","border-right-color","border-right-style","border-left-width","border-left-color","border-left-style"].filter((e=>t.viewItem.hasStyle(e)));if(!l.length)return;const r={styles:l};if(!i.consumable.test(t.viewItem,r))return;const s=[...t.modelRange.getItems({shallow:!0})].pop();i.consumable.consume(t.viewItem,r);const c={style:t.viewItem.getNormalizedStyle("border-style"),color:t.viewItem.getNormalizedStyle("border-color"),width:t.viewItem.getNormalizedStyle("border-width")},d={style:a(c.style),color:a(c.color),width:a(c.width)};d.style!==n.style&&i.writer.setAttribute(o.style,d.style,s),d.color!==n.color&&i.writer.setAttribute(o.color,d.color,s),d.width!==n.width&&i.writer.setAttribute(o.width,d.width,s)}))))}function r(e,{modelElement:t,modelAttribute:o,styleName:n}){e.for("downcast").attributeToAttribute({model:{name:t,key:o},view:e=>({key:"style",value:{[n]:e}})})}function s(e,{modelAttribute:t,styleName:o}){e.for("downcast").add((e=>e.on(`attribute:${t}:table`,((e,t,n)=>{const{item:i,attributeNewValue:l}=t,{mapper:r,writer:s}=n;if(!n.consumable.consume(t.item,e.name))return;const a=[...r.toViewElement(i).getChildren()].find((e=>e.is("element","table")));l?s.setStyle(o,l,a):s.removeStyle(o,a)}))))}function a(e){if(!e)return;return["top","right","bottom","left"].map((t=>e[t])).reduce(((e,t)=>e==t?e:null))||e}function c(e,t,o,n,i=1){t>i?n.setAttribute(e,t,o):n.removeAttribute(e,o)}function d(e,t,o={}){const n=e.createElement("tableCell",o);return e.insertElement("paragraph",n),e.insert(n,t),n}function u(e,t){const o=t.parent.parent,n=parseInt(o.getAttribute("headingColumns")||0),{column:i}=e.getCellLocation(t);return!!n&&i{e.on("element:table",((e,t,o)=>{const n=t.viewItem;if(!o.consumable.test(n,{name:!0}))return;const{rows:i,headingRows:l,headingColumns:r}=function(e){const t={headingRows:0,headingColumns:0},o=[],n=[];let i;for(const l of Array.from(e.getChildren()))if("tbody"===l.name||"thead"===l.name||"tfoot"===l.name){"thead"!==l.name||i||(i=l);const e=Array.from(l.getChildren()).filter((e=>e.is("element","tr")));for(const l of e)if("thead"===l.parent.name&&l.parent===i)t.headingRows++,o.push(l);else{n.push(l);const e=p(l);e>t.headingColumns&&(t.headingColumns=e)}}return t.rows=[...o,...n],t}(n),s={};r&&(s.headingColumns=r),l&&(s.headingRows=l);const a=o.writer.createElement("table",s);if(o.safeInsert(a,t.modelCursor)){if(o.consumable.consume(n,{name:!0}),i.forEach((e=>o.convertItem(e,o.writer.createPositionAt(a,"end")))),o.convertChildren(n,o.writer.createPositionAt(a,"end")),a.isEmpty){const e=o.writer.createElement("tableRow");o.writer.insert(e,o.writer.createPositionAt(a,"end")),d(o.writer,o.writer.createPositionAt(e,"end"))}o.updateConversionResult(a,t)}}))}}function g(e){return t=>{t.on(`element:${e}`,((e,t,o)=>{if(t.modelRange&&t.viewItem.isEmpty){const e=t.modelRange.start.nodeAfter,n=o.writer.createPositionAt(e,0);o.writer.insertElement("paragraph",n)}}),{priority:"low"})}}function p(e){let t=0,o=0;const n=Array.from(e.getChildren()).filter((e=>"th"===e.name||"td"===e.name));for(;o1||i>1)&&this._recordSpans(o,i,n),this._shouldSkipSlot()||(t=this._formatOutValue(o)),this._nextCellAtColumn=this._column+n}return this._column++,this._column==this._nextCellAtColumn&&this._cellIndex++,t||this.next()}skipRow(e){this._skipRows.add(e)}_advanceToNextRow(){return this._row++,this._rowIndex++,this._column=0,this._cellIndex=0,this._nextCellAtColumn=-1,this.next()}_isOverEndRow(){return void 0!==this._endRow&&this._row>this._endRow}_isOverEndColumn(){return void 0!==this._endColumn&&this._column>this._endColumn}_formatOutValue(e,t=this._row,o=this._column){return{done:!1,value:new w(this,e,t,o)}}_shouldSkipSlot(){const e=this._skipRows.has(this._row),t=this._rowthis._endColumn;return e||t||o||n}_getSpanned(){const e=this._spannedCells.get(this._row);return e&&e.get(this._column)||null}_recordSpans(e,t,o){const n={cell:e,row:this._row,column:this._column};for(let e=this._row;e{const l=n.getAttribute("headingRows")||0,r=[];l>0&&r.push(i.createContainerElement("thead",null,i.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=l))));const s=i.createContainerElement("figure",{class:"table"},[i.createContainerElement("table",null,r),i.createSlot((e=>!e.is("element","tableRow")))]);return o.asWidget?function(e,o){return o.setCustomProperty("table",!0,e),(0,t.toWidget)(e,o,{hasSelectionHandle:!0})}(s,i):s}}function _(e={}){return(o,{writer:n})=>{const i=o.parent,l=i.parent,r=l.getChildIndex(i),s=new f(l,{row:r}),a=l.getAttribute("headingRows")||0,c=l.getAttribute("headingColumns")||0;for(const i of s)if(i.cell==o){const o=i.row{if(t.parent.is("element","tableCell")&&C(t))return e.asWidget?o.createContainerElement("span",{class:"ck-table-bogus-paragraph"}):(n.consume(t,"insert"),void i.bindElements(t,i.toViewElement(t.parent)))}}function C(e){return 1==e.parent.childCount&&![...e.getAttributeKeys()].length}class y extends e.Command{refresh(){const e=this.editor.model,t=e.document.selection,o=e.schema;this.isEnabled=function(e,t){const o=e.getFirstPosition().parent,n=o===o.root?o:o.parent;return t.checkChild(n,"table")}(t,o)}execute(e={}){const t=this.editor.model,o=this.editor.plugins.get("TableUtils"),n=this.editor.config.get("table"),i=n.defaultHeadings.rows,l=n.defaultHeadings.columns;void 0===e.headingRows&&i&&(e.headingRows=i),void 0===e.headingColumns&&l&&(e.headingColumns=l),t.change((n=>{const i=o.createTable(n,e);t.insertObject(i,null,null,{findOptimalPosition:"auto"}),n.setSelection(n.createPositionAt(i.getNodeByPath([0,0,0]),0))}))}}class T extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"below"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="above"===this.order,i=o.getSelectionAffectedTableCells(t),l=o.getRowIndexes(i),r=n?l.first:l.last,s=i[0].findAncestor("table");o.insertRows(s,{at:n?r:r+1,copyStructureFromAbove:!n})}}class A extends e.Command{constructor(e,t={}){super(e),this.order=t.order||"right"}refresh(){const e=this.editor.model.document.selection,t=!!this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e).length;this.isEnabled=t}execute(){const e=this.editor,t=e.model.document.selection,o=e.plugins.get("TableUtils"),n="left"===this.order,i=o.getSelectionAffectedTableCells(t),l=o.getColumnIndexes(i),r=n?l.first:l.last,s=i[0].findAncestor("table");o.insertColumns(s,{columns:1,at:n?r:r+1})}}class x extends e.Command{constructor(e,t={}){super(e),this.direction=t.direction||"horizontally"}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=1===e.length}execute(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection)[0];"horizontally"===this.direction?e.splitCellHorizontally(t,2):e.splitCellVertically(t,2)}}function V(e,t,o){const{startRow:n,startColumn:i,endRow:l,endColumn:r}=t,s=o.createElement("table"),a=l-n+1;for(let e=0;e0){c("headingRows",l-o,e,i,0)}const r=parseInt(t.getAttribute("headingColumns")||0);if(r>0){c("headingColumns",r-n,e,i,0)}}(s,e,n,i,o),s}function S(e,t,o=0){const n=[],i=new f(e,{startRow:o,endRow:t-1});for(const e of i){const{row:o,cellHeight:i}=e,l=o+i-1;o1&&(s.rowspan=a);const u=parseInt(e.getAttribute("colspan")||1);u>1&&(s.colspan=u);const h=l+r,b=[...new f(i,{startRow:l,endRow:h,includeAllSlots:!0})];let m,g=null;for(const t of b){const{row:n,column:i,cell:l}=t;l===e&&void 0===m&&(m=i),void 0!==m&&m===i&&n===h&&(g=d(o,t.getPositionBefore(),s))}return c("rowspan",r,e,o),g}function I(e,t){const o=[],n=new f(e);for(const e of n){const{column:n,cellWidth:i}=e,l=n+i-1;n1&&(l.colspan=r);const s=parseInt(e.getAttribute("rowspan")||1);s>1&&(l.rowspan=s);const a=d(n,n.createPositionAfter(e),l);return c("colspan",i,e,n),a}function E(e,t,o,n,i,l){const r=parseInt(e.getAttribute("colspan")||1),s=parseInt(e.getAttribute("rowspan")||1);if(o+r-1>i){c("colspan",i-o+1,e,l,1)}if(t+s-1>n){c("rowspan",n-t+1,e,l,1)}}function z(e,t){const o=t.getColumns(e),n=new Array(o).fill(0);for(const{column:t}of new f(e))n[t]++;const i=n.reduce(((e,t,o)=>t?e:[...e,o]),[]);if(i.length>0){const o=i[i.length-1];return t.removeColumns(e,{at:o}),!0}return!1}function B(e,t){const o=[],n=t.getRows(e);for(let t=0;t0){const n=o[o.length-1];return t.removeRows(e,{at:n}),!0}return!1}function W(e,t){z(e,t)||B(e,t)}function L(e,t){const o=Array.from(new f(e,{startColumn:t.firstColumn,endColumn:t.lastColumn,row:t.lastRow}));if(o.every((({cellHeight:e})=>1===e)))return t.lastRow;const n=o[0].cellHeight-1;return t.lastRow+n}function N(e,t){const o=Array.from(new f(e,{startRow:t.firstRow,endRow:t.lastRow,column:t.lastColumn}));if(o.every((({cellWidth:e})=>1===e)))return t.lastColumn;const n=o[0].cellWidth-1;return t.lastColumn+n}class F extends e.Command{constructor(e,t){super(e),this.direction=t.direction,this.isHorizontal="right"==this.direction||"left"==this.direction}refresh(){const e=this._getMergeableCell();this.value=e,this.isEnabled=!!e}execute(){const e=this.editor.model,t=e.document,o=this.editor.plugins.get("TableUtils").getTableCellsContainingSelection(t.selection)[0],n=this.value,i=this.direction;e.change((e=>{const t="right"==i||"down"==i,l=t?o:n,r=t?n:o,s=r.parent;!function(e,t,o){H(e)||(H(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end")));o.remove(e)}(r,l,e);const a=this.isHorizontal?"colspan":"rowspan",c=parseInt(o.getAttribute(a)||1),d=parseInt(n.getAttribute(a)||1);e.setAttribute(a,c+d,l),e.setSelection(e.createRangeIn(l));const u=this.editor.plugins.get("TableUtils");W(s.findAncestor("table"),u)}))}_getMergeableCell(){const e=this.editor.model.document,t=this.editor.plugins.get("TableUtils"),o=t.getTableCellsContainingSelection(e.selection)[0];if(!o)return;const n=this.isHorizontal?function(e,t,o){const n=e.parent.parent,i="right"==t?e.nextSibling:e.previousSibling,l=(n.getAttribute("headingColumns")||0)>0;if(!i)return;const r="right"==t?e:i,s="right"==t?i:e,{column:a}=o.getCellLocation(r),{column:c}=o.getCellLocation(s),d=parseInt(r.getAttribute("colspan")||1),h=u(o,r),b=u(o,s);if(l&&h!=b)return;return a+d===c?i:void 0}(o,this.direction,t):function(e,t,o){const n=e.parent,i=n.parent,l=i.getChildIndex(n);if("down"==t&&l===o.getRows(i)-1||"up"==t&&0===l)return;const r=parseInt(e.getAttribute("rowspan")||1),s=i.getAttribute("headingRows")||0,a="down"==t&&l+r===s,c="up"==t&&l===s;if(s&&(a||c))return;const d=parseInt(e.getAttribute("rowspan")||1),u="down"==t?l+d:l,h=[...new f(i,{endRow:u})],b=h.find((t=>t.cell===e)).column,m=h.find((({row:e,cellHeight:o,column:n})=>n===b&&("down"==t?e===u:u===e+o)));return m&&m.cell}(o,this.direction,t);if(!n)return;const i=this.isHorizontal?"rowspan":"colspan",l=parseInt(o.getAttribute(i)||1);return parseInt(n.getAttribute(i)||1)===l?n:void 0}}function H(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}class D extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=this.editor.plugins.get("TableUtils").getRows(n)-1,l=e.getRowIndexes(t),r=0===l.first&&l.last===i;this.isEnabled=!r}else this.isEnabled=!1}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0],l=i.findAncestor("table"),r=t.getCellLocation(i).column;e.change((e=>{const o=n.last-n.first+1;t.removeRows(l,{at:n.first,rows:o});const i=function(e,t,o,n){const i=e.getChild(Math.min(t,n-1));let l=i.getChild(0),r=0;for(const e of i.getChildren()){if(r>o)return l;l=e,r+=parseInt(e.getAttribute("colspan")||1)}return l}(l,n.first,r,t.getRows(l));e.setSelection(e.createPositionAt(i,0))}))}}class M extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=e.getSelectionAffectedTableCells(this.editor.model.document.selection),o=t[0];if(o){const n=o.findAncestor("table"),i=e.getColumns(n),{first:l,last:r}=e.getColumnIndexes(t);this.isEnabled=r-le.cell===t)).column,last:i.find((e=>e.cell===o)).column},r=function(e,t,o,n){return parseInt(o.getAttribute("colspan")||1)>1?o:t.previousSibling||o.nextSibling?o.nextSibling||t.previousSibling:n.first?e.reverse().find((({column:e})=>ee>n.last)).cell}(i,t,o,l);this.editor.model.change((e=>{const t=l.last-l.first+1;this.editor.plugins.get("TableUtils").removeColumns(n,{at:l.first,columns:t}),e.setSelection(e.createPositionAt(r,0))}))}}class O extends e.Command{refresh(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o.length>0;this.isEnabled=n,this.value=n&&o.every((e=>this._isInHeading(e,e.parent.parent)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:l,last:r}=t.getRowIndexes(n),s=this.value?l:r+1,a=i.getAttribute("headingRows")||0;o.change((e=>{if(s){const t=S(i,s,s>a?a:0);for(const{cell:o}of t)R(o,s,e)}c("headingRows",s,i,e,0)}))}_isInHeading(e,t){const o=parseInt(t.getAttribute("headingRows")||0);return!!o&&e.parent.index0;this.isEnabled=n,this.value=n&&o.every((e=>u(t,e)))}execute(e={}){if(e.forceValue===this.value)return;const t=this.editor.plugins.get("TableUtils"),o=this.editor.model,n=t.getSelectionAffectedTableCells(o.document.selection),i=n[0].findAncestor("table"),{first:l,last:r}=t.getColumnIndexes(n),s=this.value?l:r+1;o.change((e=>{if(s){const t=I(i,s);for(const{cell:o,column:n}of t)P(o,n,s,e)}c("headingColumns",s,i,e,0)}))}}class U extends e.Plugin{static get pluginName(){return"TableUtils"}init(){this.decorate("insertColumns"),this.decorate("insertRows")}getCellLocation(e){const t=e.parent,o=t.parent,n=o.getChildIndex(t),i=new f(o,{row:n});for(const{cell:t,row:o,column:n}of i)if(t===e)return{row:o,column:n}}createTable(e,t){const o=e.createElement("table"),n=parseInt(t.rows)||2,i=parseInt(t.columns)||2;return $(e,o,0,n,i),t.headingRows&&c("headingRows",Math.min(t.headingRows,n),o,e,0),t.headingColumns&&c("headingColumns",Math.min(t.headingColumns,i),o,e,0),o}insertRows(e,t={}){const o=this.editor.model,n=t.at||0,i=t.rows||1,l=void 0!==t.copyStructureFromAbove,r=t.copyStructureFromAbove?n-1:n,s=this.getRows(e),a=this.getColumns(e);if(n>s)throw new b.CKEditorError("tableutils-insertrows-insert-out-of-range",this,{options:t});o.change((t=>{const o=e.getAttribute("headingRows")||0;if(o>n&&c("headingRows",o+i,e,t,0),!l&&(0===n||n===s))return void $(t,e,n,i,a);const u=l?Math.max(n,r):n,h=new f(e,{endRow:u}),b=new Array(a).fill(1);for(const{row:e,column:o,cellHeight:s,cellWidth:a,cell:c}of h){const d=e+s-1,u=e<=r&&r<=d;e0&&d(t,i,n>1?{colspan:n}:null),e+=Math.abs(n)-1}}}))}insertColumns(e,t={}){const o=this.editor.model,n=t.at||0,i=t.columns||1;o.change((t=>{const o=e.getAttribute("headingColumns");ni-1)throw new b.CKEditorError("tableutils-removerows-row-index-out-of-range",this,{table:e,options:t});o.change((t=>{const{cellsToMove:o,cellsToTrim:n}=function(e,t,o){const n=new Map,i=[];for(const{row:l,column:r,cellHeight:s,cell:a}of new f(e,{endRow:o})){const e=l+s-1;if(l>=t&&l<=o&&e>o){const e=s-(o-l+1);n.set(r,{cell:a,rowspan:e})}if(l=t){let n;n=e>=o?o-t+1:e-t+1,i.push({cell:a,rowspan:s-n})}}return{cellsToMove:n,cellsToTrim:i}}(e,l,r);if(o.size){!function(e,t,o,n){const i=[...new f(e,{includeAllSlots:!0,row:t})],l=e.getChild(t);let r;for(const{column:e,cell:t,isAnchor:s}of i)if(o.has(e)){const{cell:t,rowspan:i}=o.get(e),s=r?n.createPositionAfter(r):n.createPositionAt(l,0);n.move(n.createRangeOn(t),s),c("rowspan",i,t,n),r=t}else s&&(r=t)}(e,r+1,o,t)}for(let o=r;o>=l;o--)t.remove(e.getChild(o));for(const{rowspan:e,cell:o}of n)c("rowspan",e,o,t);!function(e,t,o,n){const i=e.getAttribute("headingRows")||0;if(t{!function(e,t,o){const n=e.getAttribute("headingColumns")||0;if(n&&t.first=n;o--)for(const{cell:n,column:i,cellWidth:l}of[...new f(e)])i<=o&&l>1&&i+l>o?c("colspan",l-1,n,t):i===o&&t.remove(n);B(e,this)||z(e,this)}))}splitCellVertically(e,t=2){const o=this.editor.model,n=e.parent.parent,i=parseInt(e.getAttribute("rowspan")||1),l=parseInt(e.getAttribute("colspan")||1);o.change((o=>{if(l>1){const{newCellsSpan:n,updatedSpan:r}=K(l,t);c("colspan",r,e,o);const s={};n>1&&(s.colspan=n),i>1&&(s.rowspan=i);Z(l>t?t-1:l-1,o,o.createPositionAfter(e),s)}if(lt===e)),d=s.filter((({cell:t,cellWidth:o,column:n})=>t!==e&&n===a||na));for(const{cell:e,cellWidth:t}of d)o.setAttribute("colspan",t+r,e);const u={};i>1&&(u.rowspan=i),Z(r,o,o.createPositionAfter(e),u);const h=n.getAttribute("headingColumns")||0;h>a&&c("headingColumns",h+r,n,o)}}))}splitCellHorizontally(e,t=2){const o=this.editor.model,n=e.parent,i=n.parent,l=i.getChildIndex(n),r=parseInt(e.getAttribute("rowspan")||1),s=parseInt(e.getAttribute("colspan")||1);o.change((o=>{if(r>1){const n=[...new f(i,{startRow:l,endRow:l+r-1,includeAllSlots:!0})],{newCellsSpan:a,updatedSpan:d}=K(r,t);c("rowspan",d,e,o);const{column:u}=n.find((({cell:t})=>t===e)),h={};a>1&&(h.rowspan=a),s>1&&(h.colspan=s);for(const e of n){const{column:t,row:n}=e,i=t===u,r=(n+l+d)%a==0;n>=l+d&&i&&r&&Z(1,o,e.getPositionBefore(),h)}}if(rl){const e=i+n;o.setAttribute("rowspan",e,t)}const d={};s>1&&(d.colspan=s),$(o,i,l+1,n,1,d);const u=i.getAttribute("headingRows")||0;u>l&&c("headingRows",u+n,i,o)}}))}getColumns(e){return[...e.getChild(0).getChildren()].reduce(((e,t)=>e+parseInt(t.getAttribute("colspan")||1)),0)}getRows(e){return Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0)}createTableWalker(e,t={}){return new f(e,t)}getSelectedTableCells(e){const t=[];for(const o of this.sortRanges(e.getRanges())){const e=o.getContainedElement();e&&e.is("element","tableCell")&&t.push(e)}return t}getTableCellsContainingSelection(e){const t=[];for(const o of e.getRanges()){const e=o.start.findAncestor("tableCell");e&&t.push(e)}return t}getSelectionAffectedTableCells(e){const t=this.getSelectedTableCells(e);return t.length?t:this.getTableCellsContainingSelection(e)}getRowIndexes(e){const t=e.map((e=>e.parent.index));return this._getFirstLastIndexesObject(t)}getColumnIndexes(e){const t=e[0].findAncestor("table"),o=[...new f(t)].filter((t=>e.includes(t.cell))).map((e=>e.column));return this._getFirstLastIndexesObject(o)}isSelectionRectangular(e){if(e.length<2||!this._areCellInTheSameTableSection(e))return!1;const t=new Set,o=new Set;let n=0;for(const i of e){const{row:e,column:l}=this.getCellLocation(i),r=parseInt(i.getAttribute("rowspan")||1),s=parseInt(i.getAttribute("colspan")||1);t.add(e),o.add(l),r>1&&t.add(e+r-1),s>1&&o.add(l+s-1),n+=r*s}const i=function(e,t){const o=Array.from(e.values()),n=Array.from(t.values()),i=Math.max(...o),l=Math.min(...o),r=Math.max(...n),s=Math.min(...n);return(i-l+1)*(r-s+1)}(t,o);return i==n}sortRanges(e){return Array.from(e).sort(q)}_getFirstLastIndexesObject(e){const t=e.sort(((e,t)=>e-t));return{first:t[0],last:t[t.length-1]}}_areCellInTheSameTableSection(e){const t=e[0].findAncestor("table"),o=this.getRowIndexes(e),n=parseInt(t.getAttribute("headingRows")||0);if(!this._areIndexesInSameSection(o,n))return!1;const i=parseInt(t.getAttribute("headingColumns")||0),l=this.getColumnIndexes(e);return this._areIndexesInSameSection(l,i)}_areIndexesInSameSection({first:e,last:t},o){return e{const n=t.getSelectedTableCells(e.document.selection),i=n.shift(),{mergeWidth:l,mergeHeight:r}=function(e,t,o){let n=0,i=0;for(const e of t){const{row:t,column:l}=o.getCellLocation(e);n=Y(e,l,n,"colspan"),i=Y(e,t,i,"rowspan")}const{row:l,column:r}=o.getCellLocation(e);return{mergeWidth:n-r,mergeHeight:i-l}}(i,n,t);c("colspan",l,i,o),c("rowspan",r,i,o);for(const e of n)J(e,i,o);W(i.findAncestor("table"),t),o.setSelection(i,"in")}))}}function J(e,t,o){X(e)||(X(t)&&o.remove(o.createRangeIn(t)),o.move(o.createRangeIn(e),o.createPositionAt(t,"end"))),o.remove(e)}function X(e){return 1==e.childCount&&e.getChild(0).is("element","paragraph")&&e.getChild(0).isEmpty}function Y(e,t,o,n){const i=parseInt(e.getAttribute(n)||1);return Math.max(o,t+i)}class Q extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.model,t=this.editor.plugins.get("TableUtils"),o=t.getSelectionAffectedTableCells(e.document.selection),n=t.getRowIndexes(o),i=o[0].findAncestor("table"),l=[];for(let t=n.first;t<=n.last;t++)for(const o of i.getChild(t).getChildren())l.push(e.createRangeOn(o));e.change((e=>{e.setSelection(l)}))}}class ee extends e.Command{constructor(e){super(e),this.affectsData=!1}refresh(){const e=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(this.editor.model.document.selection);this.isEnabled=e.length>0}execute(){const e=this.editor.plugins.get("TableUtils"),t=this.editor.model,o=e.getSelectionAffectedTableCells(t.document.selection),n=o[0],i=o.pop(),l=n.findAncestor("table"),r=e.getCellLocation(n),s=e.getCellLocation(i),a=Math.min(r.column,s.column),c=Math.max(r.column,s.column),d=[];for(const e of new f(l,{startColumn:a,endColumn:c}))d.push(t.createRangeOn(e.cell));t.change((e=>{e.setSelection(d)}))}}function te(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;const i=new Set;for(const t of o){let o;"table"==t.name&&"insert"==t.type&&(o=t.position.nodeAfter),"tableRow"!=t.name&&"tableCell"!=t.name||(o=t.position.findAncestor("table")),ie(t)&&(o=t.range.start.findAncestor("table")),o&&!i.has(o)&&(n=oe(o,e)||n,n=ne(o,e)||n,i.add(o))}return n}(t,e)))}function oe(e,t){let o=!1;const n=function(e){const t=parseInt(e.getAttribute("headingRows")||0),o=Array.from(e.getChildren()).reduce(((e,t)=>t.is("element","tableRow")?e+1:e),0),n=[];for(const{row:i,cell:l,cellHeight:r}of new f(e)){if(r<2)continue;const e=ie){const t=e-i;n.push({cell:l,rowspan:t})}}return n}(e);if(n.length){o=!0;for(const e of n)c("rowspan",e.rowspan,e.cell,t,1)}return o}function ne(e,t){let o=!1;const n=function(e){const t=new Array(e.childCount).fill(0);for(const{rowIndex:o}of new f(e,{includeAllSlots:!0}))t[o]++;return t}(e),i=[];for(const[t,o]of n.entries())!o&&e.getChild(t).is("element","tableRow")&&i.push(t);if(i.length){o=!0;for(const o of i.reverse())t.remove(e.getChild(o)),n.splice(o,1)}const l=n.filter(((t,o)=>e.getChild(o).is("element","tableRow"))),r=l[0];if(!l.every((e=>e===r))){const n=l.reduce(((e,t)=>t>e?t:e),0);for(const[i,r]of l.entries()){const l=n-r;if(l){for(let o=0;ofunction(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o)"insert"==t.type&&"table"==t.name&&(n=re(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableRow"==t.name&&(n=se(t.position.nodeAfter,e)||n),"insert"==t.type&&"tableCell"==t.name&&(n=ae(t.position.nodeAfter,e)||n),ce(t)&&(n=ae(t.position.parent,e)||n);return n}(t,e)))}function re(e,t){let o=!1;for(const n of e.getChildren())n.is("element","tableRow")&&(o=se(n,t)||o);return o}function se(e,t){let o=!1;for(const n of e.getChildren())o=ae(n,t)||o;return o}function ae(e,t){if(0==e.childCount)return t.insertElement("paragraph",e),!0;const o=Array.from(e.getChildren()).filter((e=>e.is("$text")));for(const e of o)t.wrap(t.createRangeOn(e),"paragraph");return!!o.length}function ce(e){return!(!e.position||!e.position.parent.is("element","tableCell"))&&("insert"==e.type&&"$text"==e.name||"remove"==e.type)}function de(e,t){if(!e.is("element","paragraph"))return!1;const o=t.toViewElement(e);return!!o&&C(e)!==o.is("element","span")}var ue=o(62),he=o.n(ue),be=o(482),me={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(be.Z,me);be.Z.locals;class ge extends e.Plugin{static get pluginName(){return"TableEditing"}static get requires(){return[U]}init(){const e=this.editor,t=e.model,o=t.schema,n=e.conversion,i=e.plugins.get(U);o.register("table",{inheritAllFrom:"$blockObject",allowAttributes:["headingRows","headingColumns"]}),o.register("tableRow",{allowIn:"table",isLimit:!0}),o.register("tableCell",{allowContentOf:"$container",allowIn:"tableRow",allowAttributes:["colspan","rowspan"],isLimit:!0,isSelectable:!0}),n.for("upcast").add((e=>{e.on("element:figure",((e,t,o)=>{if(!o.consumable.test(t.viewItem,{name:!0,classes:"table"}))return;const n=function(e){for(const t of e.getChildren())if(t.is("element","table"))return t}(t.viewItem);if(!n||!o.consumable.test(n,{name:!0}))return;o.consumable.consume(t.viewItem,{name:!0,classes:"table"});const i=o.convertItem(n,t.modelCursor),l=(0,b.first)(i.modelRange.getItems());l?(o.convertChildren(t.viewItem,o.writer.createPositionAt(l,"end")),o.updateConversionResult(l,t)):o.consumable.revert(t.viewItem,{name:!0,classes:"table"})}))})),n.for("upcast").add(m()),n.for("editingDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i,{asWidget:!0})}),n.for("dataDowncast").elementToStructure({model:{name:"table",attributes:["headingRows"]},view:k(i)}),n.for("upcast").elementToElement({model:"tableRow",view:"tr"}),n.for("upcast").add((e=>{e.on("element:tr",((e,t)=>{t.viewItem.isEmpty&&0==t.modelCursor.index&&e.stop()}),{priority:"high"})})),n.for("downcast").elementToElement({model:"tableRow",view:(e,{writer:t})=>e.isEmpty?t.createEmptyElement("tr"):t.createContainerElement("tr")}),n.for("upcast").elementToElement({model:"tableCell",view:"td"}),n.for("upcast").elementToElement({model:"tableCell",view:"th"}),n.for("upcast").add(g("td")),n.for("upcast").add(g("th")),n.for("editingDowncast").elementToElement({model:"tableCell",view:_({asWidget:!0})}),n.for("dataDowncast").elementToElement({model:"tableCell",view:_()}),n.for("editingDowncast").elementToElement({model:"paragraph",view:v({asWidget:!0}),converterPriority:"high"}),n.for("dataDowncast").elementToElement({model:"paragraph",view:v(),converterPriority:"high"}),n.for("downcast").attributeToAttribute({model:"colspan",view:"colspan"}),n.for("upcast").attributeToAttribute({model:{key:"colspan",value:pe("colspan")},view:"colspan"}),n.for("downcast").attributeToAttribute({model:"rowspan",view:"rowspan"}),n.for("upcast").attributeToAttribute({model:{key:"rowspan",value:pe("rowspan")},view:"rowspan"}),e.data.mapper.on("modelToViewPosition",((e,t)=>{const o=t.modelPosition.parent,n=t.modelPosition.nodeBefore;if(!o.is("element","tableCell"))return;if(!n||!n.is("element","paragraph"))return;const i=t.mapper.toViewElement(n),l=t.mapper.toViewElement(o);i===l&&(t.viewPosition=t.mapper.findPositionIn(l,n.maxOffset))})),e.config.define("table.defaultHeadings.rows",0),e.config.define("table.defaultHeadings.columns",0),e.commands.add("insertTable",new y(e)),e.commands.add("insertTableRowAbove",new T(e,{order:"above"})),e.commands.add("insertTableRowBelow",new T(e,{order:"below"})),e.commands.add("insertTableColumnLeft",new A(e,{order:"left"})),e.commands.add("insertTableColumnRight",new A(e,{order:"right"})),e.commands.add("removeTableRow",new D(e)),e.commands.add("removeTableColumn",new M(e)),e.commands.add("splitTableCellVertically",new x(e,{direction:"vertically"})),e.commands.add("splitTableCellHorizontally",new x(e,{direction:"horizontally"})),e.commands.add("mergeTableCells",new G(e)),e.commands.add("mergeTableCellRight",new F(e,{direction:"right"})),e.commands.add("mergeTableCellLeft",new F(e,{direction:"left"})),e.commands.add("mergeTableCellDown",new F(e,{direction:"down"})),e.commands.add("mergeTableCellUp",new F(e,{direction:"up"})),e.commands.add("setTableColumnHeader",new j(e)),e.commands.add("setTableRowHeader",new O(e)),e.commands.add("selectTableRow",new Q(e)),e.commands.add("selectTableColumn",new ee(e)),te(t),le(t),this.listenTo(t.document,"change:data",(()=>{!function(e,t){const o=e.document.differ;for(const e of o.getChanges()){let o,n=!1;if("attribute"==e.type){const t=e.range.start.nodeAfter;if(!t||!t.is("element","table"))continue;if("headingRows"!=e.attributeKey&&"headingColumns"!=e.attributeKey)continue;o=t,n="headingRows"==e.attributeKey}else"tableRow"!=e.name&&"tableCell"!=e.name||(o=e.position.findAncestor("table"),n="tableRow"==e.name);if(!o)continue;const i=o.getAttribute("headingRows")||0,l=o.getAttribute("headingColumns")||0,r=new f(o);for(const e of r){const o=e.rowde(e,t.mapper)));for(const e of o)t.reconvertItem(e)}}(t,e.editing)}))}}function pe(e){return t=>{const o=parseInt(t.getAttribute(e));return Number.isNaN(o)||o<=0?null:o}}var fe=o(273),we=o(272),ke={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(we.Z,ke);we.Z.locals;class _e extends fe.View{constructor(e){super(e);const t=this.bindTemplate;this.items=this._createGridCollection(),this.keystrokes=new b.KeystrokeHandler,this.focusTracker=new b.FocusTracker,this.set("rows",0),this.set("columns",0),this.bind("label").to(this,"columns",this,"rows",((e,t)=>`${t} × ${e}`)),this.setTemplate({tag:"div",attributes:{class:["ck"]},children:[{tag:"div",attributes:{class:["ck-insert-table-dropdown__grid"]},on:{"mouseover@.ck-insert-table-dropdown-grid-box":t.to("boxover")},children:this.items},{tag:"div",attributes:{class:["ck","ck-insert-table-dropdown__label"],"aria-hidden":!0},children:[{text:t.to("label")}]}],on:{mousedown:t.to((e=>{e.preventDefault()})),click:t.to((()=>{this.fire("execute")}))}}),this.on("boxover",((e,t)=>{const{row:o,column:n}=t.target.dataset;this.items.get(10*(parseInt(o,10)-1)+(parseInt(n,10)-1)).focus()})),this.focusTracker.on("change:focusedElement",((e,t,o)=>{if(!o)return;const{row:n,column:i}=o.dataset;this.set({rows:parseInt(n),columns:parseInt(i)})})),this.on("change:columns",(()=>this._highlightGridBoxes())),this.on("change:rows",(()=>this._highlightGridBoxes()))}render(){super.render(),(0,fe.addKeyboardHandlingForGrid)({keystrokeHandler:this.keystrokes,focusTracker:this.focusTracker,gridItems:this.items,numberOfColumns:10});for(const e of this.items)this.focusTracker.add(e.element);this.keystrokes.listenTo(this.element)}focus(){this.items.get(0).focus()}focusLast(){this.items.get(0).focus()}_highlightGridBoxes(){const e=this.rows,t=this.columns;this.items.map(((o,n)=>{const i=Math.floor(n/10){const n=e.commands.get("insertTable"),i=(0,fe.createDropdown)(o);let l;return i.bind("isEnabled").to(n),i.buttonView.set({icon:'',label:t("Insert table"),tooltip:!0}),i.on("change:isOpen",(()=>{l||(l=new _e(o),i.panelView.children.add(l),l.delegate("execute").to(i),i.on("execute",(()=>{e.execute("insertTable",{rows:l.rows,columns:l.columns}),e.editing.view.focus()})))})),i})),e.ui.componentFactory.add("tableColumn",(e=>{const n=[{type:"switchbutton",model:{commandName:"setTableColumnHeader",label:t("Header column"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:o?"insertTableColumnLeft":"insertTableColumnRight",label:t("Insert column left")}},{type:"button",model:{commandName:o?"insertTableColumnRight":"insertTableColumnLeft",label:t("Insert column right")}},{type:"button",model:{commandName:"removeTableColumn",label:t("Delete column")}},{type:"button",model:{commandName:"selectTableColumn",label:t("Select column")}}];return this._prepareDropdown(t("Column"),'',n,e)})),e.ui.componentFactory.add("tableRow",(e=>{const o=[{type:"switchbutton",model:{commandName:"setTableRowHeader",label:t("Header row"),bindIsOn:!0}},{type:"separator"},{type:"button",model:{commandName:"insertTableRowAbove",label:t("Insert row above")}},{type:"button",model:{commandName:"insertTableRowBelow",label:t("Insert row below")}},{type:"button",model:{commandName:"removeTableRow",label:t("Delete row")}},{type:"button",model:{commandName:"selectTableRow",label:t("Select row")}}];return this._prepareDropdown(t("Row"),'',o,e)})),e.ui.componentFactory.add("mergeTableCells",(e=>{const n=[{type:"button",model:{commandName:"mergeTableCellUp",label:t("Merge cell up")}},{type:"button",model:{commandName:o?"mergeTableCellRight":"mergeTableCellLeft",label:t("Merge cell right")}},{type:"button",model:{commandName:"mergeTableCellDown",label:t("Merge cell down")}},{type:"button",model:{commandName:o?"mergeTableCellLeft":"mergeTableCellRight",label:t("Merge cell left")}},{type:"separator"},{type:"button",model:{commandName:"splitTableCellVertically",label:t("Split cell vertically")}},{type:"button",model:{commandName:"splitTableCellHorizontally",label:t("Split cell horizontally")}}];return this._prepareMergeSplitButtonDropdown(t("Merge cells"),'',n,e)}))}_prepareDropdown(e,t,o,n){const i=this.editor,l=(0,fe.createDropdown)(n),r=this._fillDropdownWithListOptions(l,o);return l.buttonView.set({label:e,icon:t,tooltip:!0}),l.bind("isEnabled").toMany(r,"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(l,"execute",(e=>{i.execute(e.source.commandName),e.source instanceof fe.SwitchButtonView||i.editing.view.focus()})),l}_prepareMergeSplitButtonDropdown(e,t,o,n){const i=this.editor,l=(0,fe.createDropdown)(n,fe.SplitButtonView),r="mergeTableCells",s=i.commands.get(r),a=this._fillDropdownWithListOptions(l,o);return l.buttonView.set({label:e,icon:t,tooltip:!0,isEnabled:!0}),l.bind("isEnabled").toMany([s,...a],"isEnabled",((...e)=>e.some((e=>e)))),this.listenTo(l.buttonView,"execute",(()=>{i.execute(r),i.editing.view.focus()})),this.listenTo(l,"execute",(e=>{i.execute(e.source.commandName),i.editing.view.focus()})),l}_fillDropdownWithListOptions(e,t){const o=this.editor,n=[],i=new b.Collection;for(const e of t)Ce(e,o,n,i);return(0,fe.addListToDropdown)(e,i,o.ui.componentFactory),n}}function Ce(e,t,o,n){const i=e.model=new fe.Model(e.model),{commandName:l,bindIsOn:r}=e.model;if("button"===e.type||"switchbutton"===e.type){const e=t.commands.get(l);o.push(e),i.set({commandName:l}),i.bind("isEnabled").to(e),r&&i.bind("isOn").to(e,"value")}i.set({withText:!0}),n.add(e)}var ye=o(475),Te={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(ye.Z,Te);ye.Z.locals;class Ae extends e.Plugin{static get pluginName(){return"TableSelection"}static get requires(){return[U,U]}init(){const e=this.editor,t=e.model,o=e.editing.view;this.listenTo(t,"deleteContent",((e,t)=>this._handleDeleteContent(e,t)),{priority:"high"}),this.listenTo(o.document,"insertText",((e,t)=>this._handleInsertTextEvent(e,t)),{priority:"high"}),this._defineSelectionConverter(),this._enablePluginDisabling()}getSelectedTableCells(){const e=this.editor.plugins.get(U),t=this.editor.model.document.selection,o=e.getSelectedTableCells(t);return 0==o.length?null:o}getSelectionAsFragment(){const e=this.editor.plugins.get(U),t=this.getSelectedTableCells();return t?this.editor.model.change((o=>{const n=o.createDocumentFragment(),{first:i,last:l}=e.getColumnIndexes(t),{first:r,last:s}=e.getRowIndexes(t),a=t[0].findAncestor("table");let c=s,d=l;if(e.isSelectionRectangular(t)){const e={firstColumn:i,lastColumn:l,firstRow:r,lastRow:s};c=L(a,e),d=N(a,e)}const u=V(a,{startRow:r,startColumn:i,endRow:c,endColumn:d},o);return o.insert(u,n,0),n})):null}setCellSelection(e,t){const o=this._getCellsToSelect(e,t);this.editor.model.change((e=>{e.setSelection(o.cells.map((t=>e.createRangeOn(t))),{backward:o.backward})}))}getFocusCell(){const e=[...this.editor.model.document.selection.getRanges()].pop().getContainedElement();return e&&e.is("element","tableCell")?e:null}getAnchorCell(){const e=this.editor.model.document.selection,t=(0,b.first)(e.getRanges()).getContainedElement();return t&&t.is("element","tableCell")?t:null}_defineSelectionConverter(){const e=this.editor,t=new Set;e.conversion.for("editingDowncast").add((e=>e.on("selection",((e,o,n)=>{const i=n.writer;!function(e){for(const o of t)e.removeClass("ck-editor__editable_selected",o);t.clear()}(i);const l=this.getSelectedTableCells();if(!l)return;for(const e of l){const o=n.mapper.toViewElement(e);i.addClass("ck-editor__editable_selected",o),t.add(o)}const r=n.mapper.toViewElement(l[l.length-1]);i.setSelection(r,0)}),{priority:"lowest"})))}_enablePluginDisabling(){const e=this.editor;this.on("change:isEnabled",(()=>{if(!this.isEnabled){const t=this.getSelectedTableCells();if(!t)return;e.model.change((o=>{const n=o.createPositionAt(t[0],0),i=e.model.schema.getNearestSelectionRange(n);o.setSelection(i)}))}}))}_handleDeleteContent(e,t){const o=this.editor.plugins.get(U),[n,i]=t,l=this.editor.model,r=!i||"backward"==i.direction,s=o.getSelectedTableCells(n);s.length&&(e.stop(),l.change((e=>{const t=s[r?s.length-1:0];l.change((e=>{for(const t of s)l.deleteContent(e.createSelection(t,"in"))}));const o=l.schema.getNearestSelectionRange(e.createPositionAt(t,0));n.is("documentSelection")?e.setSelection(o):n.setTo(o)})))}_handleInsertTextEvent(e,t){const o=this.editor,n=o.model.document.selection,i=this.getSelectedTableCells(n);if(!i)return;const l=o.editing.view,r=o.editing.mapper,s=i.map((e=>l.createRangeOn(r.toViewElement(e))));t.selection=l.createSelection(s)}_getCellsToSelect(e,t){const o=this.editor.plugins.get("TableUtils"),n=o.getCellLocation(e),i=o.getCellLocation(t),l=Math.min(n.row,i.row),r=Math.max(n.row,i.row),s=Math.min(n.column,i.column),a=Math.max(n.column,i.column),c=new Array(r-l+1).fill(null).map((()=>[])),d={startRow:l,endRow:r,startColumn:s,endColumn:a};for(const{row:t,cell:o}of new f(e.findAncestor("table"),d))c[t-l].push(o);const u=i.rowe.reverse())),{cells:c.flat(),backward:u||h}}}class xe extends e.Plugin{static get pluginName(){return"TableClipboard"}static get requires(){return[Ae,U]}init(){const e=this.editor,t=e.editing.view.document;this.listenTo(t,"copy",((e,t)=>this._onCopyCut(e,t))),this.listenTo(t,"cut",((e,t)=>this._onCopyCut(e,t))),this.listenTo(e.model,"insertContent",((e,t)=>this._onInsertContent(e,...t)),{priority:"high"}),this.decorate("_replaceTableSlotCell")}_onCopyCut(e,t){const o=this.editor.plugins.get(Ae);if(!o.getSelectedTableCells())return;if("cut"==e.name&&this.editor.isReadOnly)return;t.preventDefault(),e.stop();const n=this.editor.data,i=this.editor.editing.view.document,l=n.toView(o.getSelectionAsFragment());i.fire("clipboardOutput",{dataTransfer:t.dataTransfer,content:l,method:e.name})}_onInsertContent(e,t,o){if(o&&!o.is("documentSelection"))return;const n=this.editor.model,i=this.editor.plugins.get(U);let l=Ve(t,n);if(!l)return;const r=i.getSelectionAffectedTableCells(n.document.selection);r.length?(e.stop(),n.change((e=>{const t={width:i.getColumns(l),height:i.getRows(l)},o=function(e,t,o,n){const i=e[0].findAncestor("table"),l=n.getColumnIndexes(e),r=n.getRowIndexes(e),s={firstColumn:l.first,lastColumn:l.last,firstRow:r.first,lastRow:r.last},a=1===e.length;a&&(s.lastRow+=t.height-1,s.lastColumn+=t.width-1,function(e,t,o,n){const i=n.getColumns(e),l=n.getRows(e);o>i&&n.insertColumns(e,{at:i,columns:o-i});t>l&&n.insertRows(e,{at:l,rows:t-l})}(i,s.lastRow+1,s.lastColumn+1,n));a||!n.isSelectionRectangular(e)?function(e,t,o){const{firstRow:n,lastRow:i,firstColumn:l,lastColumn:r}=t,s={first:n,last:i},a={first:l,last:r};Re(e,l,s,o),Re(e,r+1,s,o),Se(e,n,a,o),Se(e,i+1,a,o,n)}(i,s,o):(s.lastRow=L(i,s),s.lastColumn=N(i,s));return s}(r,t,e,i),n=o.lastRow-o.firstRow+1,s=o.lastColumn-o.firstColumn+1,a={startRow:0,startColumn:0,endRow:Math.min(n,t.height)-1,endColumn:Math.min(s,t.width)-1};l=V(l,a,e);const c=r[0].findAncestor("table"),d=this._replaceSelectedCellsWithPasted(l,t,c,o,e);if(this.editor.plugins.get("TableSelection").isEnabled){const t=i.sortRanges(d.map((t=>e.createRangeOn(t))));e.setSelection(t)}else e.setSelection(d[0],0)}))):W(l,i)}_replaceSelectedCellsWithPasted(e,t,o,n,i){const{width:l,height:r}=t,s=function(e,t,o){const n=new Array(o).fill(null).map((()=>new Array(t).fill(null)));for(const{column:t,row:o,cell:i}of new f(e))n[o][t]=i;return n}(e,l,r),a=[...new f(o,{startRow:n.firstRow,endRow:n.lastRow,startColumn:n.firstColumn,endColumn:n.lastColumn,includeAllSlots:!0})],c=[];let d;for(const e of a){const{row:t,column:o}=e;o===n.firstColumn&&(d=e.getPositionBefore());const a=t-n.firstRow,u=o-n.firstColumn,h=s[a%r][u%l],b=h?i.cloneElement(h):null,m=this._replaceTableSlotCell(e,b,d,i);m&&(E(m,t,o,n.lastRow,n.lastColumn,i),c.push(m),d=i.createPositionAfter(m))}const u=parseInt(o.getAttribute("headingRows")||0),h=parseInt(o.getAttribute("headingColumns")||0),b=n.firstRowIe(e,t,o))).map((({cell:e})=>R(e,t,n)))}function Re(e,t,o,n){if(t<1)return;return I(e,t).filter((({row:e,cellHeight:t})=>Ie(e,t,o))).map((({cell:e,column:o})=>P(e,o,t,n)))}function Ie(e,t,o){const n=e+t-1,{first:i,last:l}=o;return e>=i&&e<=l||e=i}class Pe extends e.Plugin{static get pluginName(){return"TableKeyboard"}static get requires(){return[Ae,U]}init(){const e=this.editor.editing.view.document;this.listenTo(e,"arrowKey",((...e)=>this._onArrowKey(...e)),{context:"table"}),this.listenTo(e,"tab",((...e)=>this._handleTabOnSelectedTable(...e)),{context:"figure"}),this.listenTo(e,"tab",((...e)=>this._handleTab(...e)),{context:["th","td"]})}_handleTabOnSelectedTable(e,t){const o=this.editor,n=o.model.document.selection.getSelectedElement();n&&n.is("element","table")&&(t.preventDefault(),t.stopPropagation(),e.stop(),o.model.change((e=>{e.setSelection(e.createRangeIn(n.getChild(0).getChild(0)))})))}_handleTab(e,t){const o=this.editor,n=this.editor.plugins.get(U),i=o.model.document.selection,l=!t.shiftKey;let r=n.getTableCellsContainingSelection(i)[0];if(r||(r=this.editor.plugins.get("TableSelection").getFocusCell()),!r)return;t.preventDefault(),t.stopPropagation(),e.stop();const s=r.parent,a=s.parent,c=a.getChildIndex(s),d=s.getChildIndex(r),u=0===d;if(!l&&u&&0===c)return void o.model.change((e=>{e.setSelection(e.createRangeOn(a))}));const h=d===s.childCount-1,b=c===n.getRows(a)-1;if(l&&b&&h&&(o.execute("insertTableRowBelow"),c===n.getRows(a)-1))return void o.model.change((e=>{e.setSelection(e.createRangeOn(a))}));let m;if(l&&h){const e=a.getChild(c+1);m=e.getChild(0)}else if(!l&&u){const e=a.getChild(c-1);m=e.getChild(e.childCount-1)}else m=s.getChild(d+(l?1:-1));o.model.change((e=>{e.setSelection(e.createRangeIn(m))}))}_onArrowKey(e,t){const o=this.editor,n=t.keyCode,i=(0,b.getLocalizedArrowKeyCodeDirection)(n,o.locale.contentLanguageDirection);this._handleArrowKeys(i,t.shiftKey)&&(t.preventDefault(),t.stopPropagation(),e.stop())}_handleArrowKeys(e,t){const o=this.editor.plugins.get(U),n=this.editor.model,i=n.document.selection,l=["right","down"].includes(e),r=o.getSelectedTableCells(i);if(r.length){let o;return o=t?this.editor.plugins.get("TableSelection").getFocusCell():l?r[r.length-1]:r[0],this._navigateFromCellInDirection(o,e,t),!0}const s=i.focus.findAncestor("tableCell");if(!s)return!1;if(!i.isCollapsed)if(t){if(i.isBackward==l&&!i.containsEntireContent(s))return!1}else{const e=i.getSelectedElement();if(!e||!n.schema.isObject(e))return!1}return!!this._isSelectionAtCellEdge(i,s,l)&&(this._navigateFromCellInDirection(s,e,t),!0)}_isSelectionAtCellEdge(e,t,o){const n=this.editor.model,i=this.editor.model.schema,l=o?e.getLastPosition():e.getFirstPosition();if(!i.getLimitElement(l).is("element","tableCell")){return n.createPositionAt(t,o?"end":0).isTouching(l)}const r=n.createSelection(l);return n.modifySelection(r,{direction:o?"forward":"backward"}),l.isEqual(r.focus)}_navigateFromCellInDirection(e,t,o=!1){const n=this.editor.model,i=e.findAncestor("table"),l=[...new f(i,{includeAllSlots:!0})],{row:r,column:s}=l[l.length-1],a=l.find((({cell:t})=>t==e));let{row:c,column:d}=a;switch(t){case"left":d--;break;case"up":c--;break;case"right":d+=a.cellWidth;break;case"down":c+=a.cellHeight}if(c<0||c>r||d<0&&c<=0||d>s&&c>=r)return void n.change((e=>{e.setSelection(e.createRangeOn(i))}));d<0?(d=o?0:s,c--):d>s&&(d=o?s:0,c++);const u=l.find((e=>e.row==c&&e.column==d)).cell,h=["right","down"].includes(t),b=this.editor.plugins.get("TableSelection");if(o&&b.isEnabled){const t=b.getAnchorCell()||e;b.setCellSelection(t,u)}else{const e=n.createPositionAt(u,h?0:"end");n.change((t=>{t.setSelection(e)}))}}}var Ee=o(492);class ze extends Ee.DomEventObserver{constructor(e){super(e),this.domEventType=["mousemove","mouseleave"]}onDomEvent(e){this.fire(e.type,e)}}class Be extends e.Plugin{static get pluginName(){return"TableMouse"}static get requires(){return[Ae,U]}init(){this.editor.editing.view.addObserver(ze),this._enableShiftClickSelection(),this._enableMouseDragSelection()}_enableShiftClickSelection(){const e=this.editor,t=e.plugins.get(U);let o=!1;const n=e.plugins.get(Ae);this.listenTo(e.editing.view.document,"mousedown",((i,l)=>{const r=e.model.document.selection;if(!this.isEnabled||!n.isEnabled)return;if(!l.domEvent.shiftKey)return;const s=n.getAnchorCell()||t.getTableCellsContainingSelection(r)[0];if(!s)return;const a=this._getModelTableCellFromDomEvent(l);a&&We(s,a)&&(o=!0,n.setCellSelection(s,a),l.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{o=!1})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{o&&e.stop()}),{priority:"highest"})}_enableMouseDragSelection(){const e=this.editor;let t,o,n=!1,i=!1;const l=e.plugins.get(Ae);this.listenTo(e.editing.view.document,"mousedown",((e,o)=>{this.isEnabled&&l.isEnabled&&(o.domEvent.shiftKey||o.domEvent.ctrlKey||o.domEvent.altKey||(t=this._getModelTableCellFromDomEvent(o)))})),this.listenTo(e.editing.view.document,"mousemove",((e,r)=>{if(!r.domEvent.buttons)return;if(!t)return;const s=this._getModelTableCellFromDomEvent(r);s&&We(t,s)&&(o=s,n||o==t||(n=!0)),n&&(i=!0,l.setCellSelection(t,o),r.preventDefault())})),this.listenTo(e.editing.view.document,"mouseup",(()=>{n=!1,i=!1,t=null,o=null})),this.listenTo(e.editing.view.document,"selectionChange",(e=>{i&&e.stop()}),{priority:"highest"})}_getModelTableCellFromDomEvent(e){const t=e.target,o=this.editor.editing.view.createPositionAt(t,0);return this.editor.editing.mapper.toModelPosition(o).parent.findAncestor("tableCell",{includeSelf:!0})}}function We(e,t){return e.parent.parent==t.parent.parent}var Le=o(660),Ne={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(Le.Z,Ne);Le.Z.locals;class Fe extends e.Plugin{static get requires(){return[ge,ve,Ae,Be,Pe,xe,t.Widget]}static get pluginName(){return"Table"}}class He extends e.Plugin{static get pluginName(){return"PlainTableOutput"}static get requires(){return[Fe]}init(){const e=this.editor;e.conversion.for("dataDowncast").elementToStructure({model:"table",view:De,converterPriority:"high"}),e.plugins.has("TableCaption")&&e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>{if("table"===e.parent.name)return t.createContainerElement("caption")},converterPriority:"high"}),e.plugins.has("TableProperties")&&function(e){const t={"border-width":"tableBorderWidth","border-color":"tableBorderColor","border-style":"tableBorderStyle","background-color":"tableBackgroundColor"};for(const[o,n]of Object.entries(t))e.conversion.for("dataDowncast").add((e=>e.on(`attribute:${n}:table`,((e,t,n)=>{const{item:i,attributeNewValue:l}=t,{mapper:r,writer:s}=n;if(!n.consumable.consume(i,e.name))return;const a=r.toViewElement(i);l?s.setStyle(o,l,a):s.removeStyle(o,a)}),{priority:"high"})))}(e)}}function De(e,{writer:t}){const o=e.getAttribute("headingRows")||0,n=t.createSlot((e=>e.is("element","tableRow")&&e.indexe.is("element","tableRow")&&e.index>=o)),l=t.createSlot((e=>!e.is("element","tableRow"))),r=t.createContainerElement("thead",null,n),s=t.createContainerElement("tbody",null,i),a=[];return o&&a.push(r),othis._setInputValue(o)))}render(){super.render(),this.keystrokes.listenTo(this.dropdownView.panelView.element)}focus(){this.inputView.focus()}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}_createDropdownView(){const e=this.locale,t=e.t,o=this.bindTemplate,n=this._createColorGrid(e),i=(0,fe.createDropdown)(e),l=new fe.View,r=this._createRemoveColorButton();return l.setTemplate({tag:"span",attributes:{class:["ck","ck-input-color__button__preview"],style:{backgroundColor:o.to("value")}},children:[{tag:"span",attributes:{class:["ck","ck-input-color__button__preview__no-color-indicator",o.if("value","ck-hidden",(e=>""!=e))]}}]}),i.buttonView.extendTemplate({attributes:{class:"ck-input-color__button"}}),i.buttonView.children.add(l),i.buttonView.label=t("Color picker"),i.buttonView.tooltip=!0,i.panelPosition="rtl"===e.uiLanguageDirection?"se":"sw",i.panelView.children.add(r),i.panelView.children.add(n),i.bind("isEnabled").to(this,"isReadOnly",(e=>!e)),this._focusables.add(r),this._focusables.add(n),this.focusTracker.add(r.element),this.focusTracker.add(n.element),i}_createInputTextView(){const e=this.locale,t=new fe.InputTextView(e);return t.extendTemplate({on:{blur:t.bindTemplate.to("blur")}}),t.value=this.value,t.bind("isReadOnly","hasError").to(this),this.bind("isFocused","isEmpty").to(t),t.on("input",(()=>{const e=t.element.value,o=this.options.colorDefinitions.find((t=>e===t.label));this._stillTyping=!0,this.value=o&&o.color||e})),t.on("blur",(()=>{this._stillTyping=!1,this._setInputValue(t.element.value)})),t.delegate("input").to(this),t}_createRemoveColorButton(){const t=this.locale,o=t.t,n=new fe.ButtonView(t),i=this.options.defaultColorValue||"",l=o(i?"Restore default":"Remove color");return n.class="ck-input-color__remove-color",n.withText=!0,n.icon=e.icons.eraser,n.label=l,n.on("execute",(()=>{this.value=i,this.dropdownView.isOpen=!1,this.fire("input")})),n}_createColorGrid(e){const t=new fe.ColorGridView(e,{colorDefinitions:this.options.colorDefinitions,columns:this.options.columns});return t.on("execute",((e,t)=>{this.value=t.value,this.dropdownView.isOpen=!1,this.fire("input")})),t.bind("selectedColor").to(this,"value"),t}_setInputValue(e){if(!this._stillTyping){const t=qe(e),o=this.options.colorDefinitions.find((e=>t===qe(e.color)));this.inputView.value=o?o.label:e||""}}}function qe(e){return e.replace(/([(,])\s+/g,"$1").replace(/^\s+|\s+(?=[),\s]|$)/g,"").replace(/,|\s/g," ")}const Ge=e=>""===e;function Je(e){return{none:e("None"),solid:e("Solid"),dotted:e("Dotted"),dashed:e("Dashed"),double:e("Double"),groove:e("Groove"),ridge:e("Ridge"),inset:e("Inset"),outset:e("Outset")}}function Xe(e){return e('The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".')}function Ye(e){return e('The value is invalid. Try "10px" or "2em" or simply "2".')}function Qe(e){return e=e.trim(),Ge(e)||(0,Ee.isColor)(e)}function et(e){return e=e.trim(),Ge(e)||rt(e)||(0,Ee.isLength)(e)||(0,Ee.isPercentage)(e)}function tt(e){return e=e.trim(),Ge(e)||rt(e)||(0,Ee.isLength)(e)}function ot(e,t){const o=new b.Collection,n=Je(e.t);for(const i in n){const l={type:"button",model:new fe.Model({_borderStyleValue:i,label:n[i],withText:!0})};"none"===i?l.model.bind("isOn").to(e,"borderStyle",(e=>"none"===t?!e:e===i)):l.model.bind("isOn").to(e,"borderStyle",(e=>e===i)),o.add(l)}return o}function nt(e){const{view:t,icons:o,toolbar:n,labels:i,propertyName:l,nameToValue:r,defaultValue:s}=e;for(const e in i){const a=new fe.ButtonView(t.locale);a.set({label:i[e],icon:o[e],tooltip:i[e]});const c=r?r(e):e;a.bind("isOn").to(t,l,(e=>{let t=e;return""===e&&s&&(t=s),c===t})),a.on("execute",(()=>{t[l]=c})),n.items.add(a)}}const it=[{color:"hsl(0, 0%, 0%)",label:"Black"},{color:"hsl(0, 0%, 30%)",label:"Dim grey"},{color:"hsl(0, 0%, 60%)",label:"Grey"},{color:"hsl(0, 0%, 90%)",label:"Light grey"},{color:"hsl(0, 0%, 100%)",label:"White",hasBorder:!0},{color:"hsl(0, 75%, 60%)",label:"Red"},{color:"hsl(30, 75%, 60%)",label:"Orange"},{color:"hsl(60, 75%, 60%)",label:"Yellow"},{color:"hsl(90, 75%, 60%)",label:"Light green"},{color:"hsl(120, 75%, 60%)",label:"Green"},{color:"hsl(150, 75%, 60%)",label:"Aquamarine"},{color:"hsl(180, 75%, 60%)",label:"Turquoise"},{color:"hsl(210, 75%, 60%)",label:"Light blue"},{color:"hsl(240, 75%, 60%)",label:"Blue"},{color:"hsl(270, 75%, 60%)",label:"Purple"}];function lt(e){return(t,o,n)=>{const i=new Ke(t.locale,{colorDefinitions:(l=e.colorConfig,l.map((e=>({color:e.model,label:e.label,options:{hasBorder:e.hasBorder}})))),columns:e.columns,defaultColorValue:e.defaultColorValue});var l;return i.inputView.set({id:o,ariaDescribedById:n}),i.bind("isReadOnly").to(t,"isEnabled",(e=>!e)),i.bind("hasError").to(t,"errorText",(e=>!!e)),i.on("input",(()=>{t.errorText=null})),t.bind("isEmpty","isFocused").to(i),i}}function rt(e){const t=parseFloat(e);return!Number.isNaN(t)&&e===String(t)}var st=o(333),at={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(st.Z,at);st.Z.locals;class ct extends fe.View{constructor(e,t={}){super(e);const o=this.bindTemplate;this.set("class",t.class||null),this.children=this.createCollection(),t.children&&t.children.forEach((e=>this.children.add(e))),this.set("_role",null),this.set("_ariaLabelledBy",null),t.labelView&&this.set({_role:"group",_ariaLabelledBy:t.labelView.id}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-form__row",o.to("class")],role:o.to("_role"),"aria-labelledby":o.to("_ariaLabelledBy")},children:this.children})}}var dt=o(934),ut={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(dt.Z,ut);dt.Z.locals;var ht=o(686),bt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(ht.Z,bt);ht.Z.locals;var mt=o(773),gt={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(mt.Z,gt);mt.Z.locals;const pt={left:e.icons.alignLeft,center:e.icons.alignCenter,right:e.icons.alignRight,justify:e.icons.alignJustify,top:e.icons.alignTop,middle:e.icons.alignMiddle,bottom:e.icons.alignBottom};class ft extends fe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",padding:"",backgroundColor:"",width:"",height:"",horizontalAlignment:"",verticalAlignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:l}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{horizontalAlignmentToolbar:h,verticalAlignmentToolbar:m,alignmentLabel:g}=this._createAlignmentFields();this.focusTracker=new b.FocusTracker,this.keystrokes=new b.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.paddingInput=this._createPaddingField(),this.widthInput=a,this.heightInput=d,this.horizontalAlignmentToolbar=h,this.verticalAlignmentToolbar=m;const{saveButtonView:p,cancelButtonView:f}=this._createActionButtons();this.saveButtonView=p,this.cancelButtonView=f,this._focusables=new fe.ViewCollection,this._focusCycler=new fe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new fe.FormHeaderView(e,{label:this.t("Cell properties")})),this.children.add(new ct(e,{labelView:l,children:[l,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new ct(e,{labelView:r,children:[r,s],class:"ck-table-form__background-row"})),this.children.add(new ct(e,{children:[new ct(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new ct(e,{children:[this.paddingInput],class:"ck-table-cell-properties-form__padding-row"})]})),this.children.add(new ct(e,{labelView:g,children:[g,h,m],class:"ck-table-cell-properties-form__alignment-row"})),this.children.add(new ct(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-cell-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,fe.submitHandler)({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.paddingInput,this.horizontalAlignmentToolbar,this.verticalAlignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableCellProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=lt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,i=this.t,l=new fe.LabelView(n);l.text=i("Border");const r=Je(i),s=new fe.LabeledFieldView(n,fe.createLabeledDropdown);s.set({label:i("Style"),class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>r[e||"none"])),s.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),s.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,fe.addListToDropdown)(s.fieldView,ot(this,t.style));const a=new fe.LabeledFieldView(n,fe.createLabeledInputText);a.set({label:i("Width"),class:"ck-table-form__border-width"}),a.fieldView.bind("value").to(this,"borderWidth"),a.bind("isEnabled").to(this,"borderStyle",wt),a.fieldView.on("input",(()=>{this.borderWidth=a.fieldView.element.value}));const c=new fe.LabeledFieldView(n,o);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",wt),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{wt(n)||(this.borderColor="",this.borderWidth=""),wt(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:s,borderColorInput:c,borderWidthInput:a}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Background");const n=lt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableCellProperties.backgroundColor}),i=new fe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-cell-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Dimensions");const n=new fe.LabeledFieldView(e,fe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new fe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const l=new fe.LabeledFieldView(e,fe.createLabeledInputText);return l.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),l.fieldView.bind("value").to(this,"height"),l.fieldView.on("input",(()=>{this.height=l.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:l}}_createPaddingField(){const e=this.locale,t=this.t,o=new fe.LabeledFieldView(e,fe.createLabeledInputText);return o.set({label:t("Padding"),class:"ck-table-cell-properties-form__padding"}),o.fieldView.bind("value").to(this,"padding"),o.fieldView.on("input",(()=>{this.padding=o.fieldView.element.value})),o}_createAlignmentFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Table cell text alignment");const n=new fe.ToolbarView(e),i="rtl"===this.locale.contentLanguageDirection;n.set({isCompact:!0,ariaLabel:t("Horizontal text alignment toolbar")}),nt({view:this,icons:pt,toolbar:n,labels:this._horizontalAlignmentLabels,propertyName:"horizontalAlignment",nameToValue:e=>{if(i){if("left"===e)return"right";if("right"===e)return"left"}return e},defaultValue:this.options.defaultTableCellProperties.horizontalAlignment});const l=new fe.ToolbarView(e);return l.set({isCompact:!0,ariaLabel:t("Vertical text alignment toolbar")}),nt({view:this,icons:pt,toolbar:l,labels:this._verticalAlignmentLabels,propertyName:"verticalAlignment",defaultValue:this.options.defaultTableCellProperties.verticalAlignment}),{horizontalAlignmentToolbar:n,verticalAlignmentToolbar:l,alignmentLabel:o}}_createActionButtons(){const t=this.locale,o=this.t,n=new fe.ButtonView(t),i=new fe.ButtonView(t),l=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.paddingInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(l,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _horizontalAlignmentLabels(){const e=this.locale,t=this.t,o=t("Align cell text to the left"),n=t("Align cell text to the center"),i=t("Align cell text to the right"),l=t("Justify cell text");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o,justify:l}:{left:o,center:n,right:i,justify:l}}get _verticalAlignmentLabels(){const e=this.t;return{top:e("Align cell text to the top"),middle:e("Align cell text to the middle"),bottom:e("Align cell text to the bottom")}}}function wt(e){return"none"!==e}const kt=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)};const _t="object"==typeof global&&global&&global.Object===Object&&global;var vt="object"==typeof self&&self&&self.Object===Object&&self;const Ct=_t||vt||Function("return this")();const yt=function(){return Ct.Date.now()};var Tt=/\s/;const At=function(e){for(var t=e.length;t--&&Tt.test(e.charAt(t)););return t};var xt=/^\s+/;const Vt=function(e){return e?e.slice(0,At(e)+1).replace(xt,""):e};const St=Ct.Symbol;var Rt=Object.prototype,It=Rt.hasOwnProperty,Pt=Rt.toString,Et=St?St.toStringTag:void 0;const zt=function(e){var t=It.call(e,Et),o=e[Et];try{e[Et]=void 0;var n=!0}catch(e){}var i=Pt.call(e);return n&&(t?e[Et]=o:delete e[Et]),i};var Bt=Object.prototype.toString;const Wt=function(e){return Bt.call(e)};var Lt=St?St.toStringTag:void 0;const Nt=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":Lt&&Lt in Object(e)?zt(e):Wt(e)};const Ft=function(e){return null!=e&&"object"==typeof e};const Ht=function(e){return"symbol"==typeof e||Ft(e)&&"[object Symbol]"==Nt(e)};var Dt=/^[-+]0x[0-9a-f]+$/i,Mt=/^0b[01]+$/i,Ot=/^0o[0-7]+$/i,jt=parseInt;const Ut=function(e){if("number"==typeof e)return e;if(Ht(e))return NaN;if(kt(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=kt(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=Vt(e);var o=Mt.test(e);return o||Ot.test(e)?jt(e.slice(2),o?2:8):Dt.test(e)?NaN:+e};var $t=Math.max,Zt=Math.min;const Kt=function(e,t,o){var n,i,l,r,s,a,c=0,d=!1,u=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function b(t){var o=n,l=i;return n=i=void 0,c=t,r=e.apply(l,o)}function m(e){return c=e,s=setTimeout(p,t),d?b(e):r}function g(e){var o=e-a;return void 0===a||o>=t||o<0||u&&e-c>=l}function p(){var e=yt();if(g(e))return f(e);s=setTimeout(p,function(e){var o=t-(e-a);return u?Zt(o,l-(e-c)):o}(e))}function f(e){return s=void 0,h&&n?b(e):(n=i=void 0,r)}function w(){var e=yt(),o=g(e);if(n=arguments,i=this,a=e,o){if(void 0===s)return m(a);if(u)return clearTimeout(s),s=setTimeout(p,t),b(a)}return void 0===s&&(s=setTimeout(p,t)),r}return t=Ut(t)||0,kt(o)&&(d=!!o.leading,l=(u="maxWait"in o)?$t(Ut(o.maxWait)||0,t):l,h="trailing"in o?!!o.trailing:h),w.cancel=function(){void 0!==s&&clearTimeout(s),c=0,n=a=i=s=void 0},w.flush=function(){return void 0===s?r:f(yt())},w},qt=fe.BalloonPanelView.defaultPositions,Gt=[qt.northArrowSouth,qt.northArrowSouthWest,qt.northArrowSouthEast,qt.southArrowNorth,qt.southArrowNorthWest,qt.southArrowNorthEast,qt.viewportStickyNorth];function Jt(e,t){const o=e.plugins.get("ContextualBalloon");if(Oe(e.editing.view.document.selection)){let n;n="cell"===t?Yt(e):Xt(e),o.updatePosition(n)}}function Xt(e){const t=e.model.document.selection.getFirstPosition().findAncestor("table"),o=e.editing.mapper.toViewElement(t);return{target:e.editing.view.domConverter.mapViewToDom(o),positions:Gt}}function Yt(e){const t=e.editing.mapper,o=e.editing.view.domConverter,n=e.model.document.selection;if(n.rangeCount>1)return{target:()=>function(e,t){const o=t.editing.mapper,n=t.editing.view.domConverter,i=Array.from(e).map((e=>{const t=Qt(e.start),i=o.toViewElement(t);return new b.Rect(n.mapViewToDom(i))}));return b.Rect.getBoundingRect(i)}(n.getRanges(),e),positions:Gt};const i=Qt(n.getFirstPosition()),l=t.toViewElement(i);return{target:o.mapViewToDom(l),positions:Gt}}function Qt(e){return e.nodeAfter&&e.nodeAfter.is("element","tableCell")?e.nodeAfter:e.findAncestor("tableCell")}function eo(e){if(!e||!kt(e))return e;const{top:t,right:o,bottom:n,left:i}=e;return t==o&&o==n&&n==i?t:void 0}function to(e,t){const o=parseFloat(e);return Number.isNaN(o)||String(o)!==String(e)?e:`${o}${t}`}function oo(e,t={}){const o=Object.assign({borderStyle:"none",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:""},e);return t.includeAlignmentProperty&&!o.alignment&&(o.alignment="center"),t.includePaddingProperty&&!o.padding&&(o.padding=""),t.includeVerticalAlignmentProperty&&!o.verticalAlignment&&(o.verticalAlignment="middle"),t.includeHorizontalAlignmentProperty&&!o.horizontalAlignment&&(o.horizontalAlignment=t.isRightToLeftContent?"right":"left"),o}const no={borderStyle:"tableCellBorderStyle",borderColor:"tableCellBorderColor",borderWidth:"tableCellBorderWidth",height:"tableCellHeight",width:"tableCellWidth",padding:"tableCellPadding",backgroundColor:"tableCellBackgroundColor",horizontalAlignment:"tableCellHorizontalAlignment",verticalAlignment:"tableCellVerticalAlignment"};class io extends e.Plugin{static get requires(){return[fe.ContextualBalloon]}static get pluginName(){return"TableCellPropertiesUI"}constructor(e){super(e),e.config.define("table.tableCellProperties",{borderColors:it,backgroundColors:it})}init(){const e=this.editor,t=e.t;this._defaultTableCellProperties=oo(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection}),this._balloon=e.plugins.get(fe.ContextualBalloon),this.view=this._createPropertiesView(),this._undoStepBatch=null,e.ui.componentFactory.add("tableCellProperties",(o=>{const n=new fe.ButtonView(o);n.set({label:t("Cell properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(no).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.editing.view.document,o=e.config.get("table.tableCellProperties"),n=(0,fe.normalizeColorOptions)(o.borderColors),i=(0,fe.getLocalizedColorOptions)(e.locale,n),l=(0,fe.normalizeColorOptions)(o.backgroundColors),r=(0,fe.getLocalizedColorOptions)(e.locale,l),s=new ft(e.locale,{borderColors:i,backgroundColors:r,defaultTableCellProperties:this._defaultTableCellProperties}),a=e.t;s.render(),this.listenTo(s,"submit",(()=>{this._hideView()})),this.listenTo(s,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),s.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),this.listenTo(e.ui,"update",(()=>{Oe(t.selection)?this._isViewVisible&&Jt(e,"cell"):this._hideView()})),(0,fe.clickOutsideHandler)({emitter:s,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const c=Xe(a),d=Ye(a);return s.on("change:borderStyle",this._getPropertyChangeCallback("tableCellBorderStyle",this._defaultTableCellProperties.borderStyle)),s.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:s.borderColorInput,commandName:"tableCellBorderColor",errorText:c,validator:Qe,defaultValue:this._defaultTableCellProperties.borderColor})),s.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:s.borderWidthInput,commandName:"tableCellBorderWidth",errorText:d,validator:tt,defaultValue:this._defaultTableCellProperties.borderWidth})),s.on("change:padding",this._getValidatedPropertyChangeCallback({viewField:s.paddingInput,commandName:"tableCellPadding",errorText:d,validator:et,defaultValue:this._defaultTableCellProperties.padding})),s.on("change:width",this._getValidatedPropertyChangeCallback({viewField:s.widthInput,commandName:"tableCellWidth",errorText:d,validator:et,defaultValue:this._defaultTableCellProperties.width})),s.on("change:height",this._getValidatedPropertyChangeCallback({viewField:s.heightInput,commandName:"tableCellHeight",errorText:d,validator:et,defaultValue:this._defaultTableCellProperties.height})),s.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:s.backgroundInput,commandName:"tableCellBackgroundColor",errorText:c,validator:Qe,defaultValue:this._defaultTableCellProperties.backgroundColor})),s.on("change:horizontalAlignment",this._getPropertyChangeCallback("tableCellHorizontalAlignment",this._defaultTableCellProperties.horizontalAlignment)),s.on("change:verticalAlignment",this._getPropertyChangeCallback("tableCellVerticalAlignment",this._defaultTableCellProperties.verticalAlignment)),s}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableCellBorderStyle");Object.entries(no).map((([t,o])=>{const n=this._defaultTableCellProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}))}_showView(){const e=this.editor;this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:Yt(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){if(!this._isViewInBalloon)return;const e=this.editor;this.stopListening(e.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(e,t){return(o,n,i,l)=>{(l||t!==i)&&this.editor.execute(e,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i,defaultValue:l}=e,r=Kt((()=>{o.errorText=i}),500);return(e,i,s,a)=>{r.cancel(),(a||l!==s)&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):r())}}}class lo extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor,t=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(e.model.document.selection);this.isEnabled=!!t.length,this.value=this._getSingleValue(t)}execute(e={}){const{value:t,batch:o}=e,n=this.editor.model,i=this.editor.plugins.get("TableUtils").getSelectionAffectedTableCells(n.document.selection),l=this._getValueToSet(t);n.enqueueChange(o,(e=>{l?i.forEach((t=>e.setAttribute(this.attributeName,l,t))):i.forEach((t=>e.removeAttribute(this.attributeName,t)))}))}_getAttribute(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}_getSingleValue(e){const t=this._getAttribute(e[0]);return e.every((e=>this._getAttribute(e)===t))?t:void 0}}class ro extends lo{constructor(e,t){super(e,"tableCellWidth",t)}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class so extends e.Plugin{static get pluginName(){return"TableCellWidthEditing"}static get requires(){return[ge]}init(){const e=this.editor,t=oo(e.config.get("table.tableCellProperties.defaultProperties"));h(e.model.schema,e.conversion,{modelAttribute:"tableCellWidth",styleName:"width",defaultValue:t.width}),e.commands.add("tableCellWidth",new ro(e,t.width))}}class ao extends lo{constructor(e,t){super(e,"tableCellPadding",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class co extends lo{constructor(e,t){super(e,"tableCellHeight",t)}_getValueToSet(e){return(e=to(e,"px"))===this._defaultValue?null:e}}class uo extends lo{constructor(e,t){super(e,"tableCellBackgroundColor",t)}}class ho extends lo{constructor(e,t){super(e,"tableCellVerticalAlignment",t)}}class bo extends lo{constructor(e,t){super(e,"tableCellHorizontalAlignment",t)}}class mo extends lo{constructor(e,t){super(e,"tableCellBorderStyle",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class go extends lo{constructor(e,t){super(e,"tableCellBorderColor",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class po extends lo{constructor(e,t){super(e,"tableCellBorderWidth",t)}_getAttribute(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}const fo=/^(top|middle|bottom)$/,wo=/^(left|center|right|justify)$/;class ko extends e.Plugin{static get pluginName(){return"TableCellPropertiesEditing"}static get requires(){return[ge,so]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableCellProperties.defaultProperties",{});const n=oo(e.config.get("table.tableCellProperties.defaultProperties"),{includeVerticalAlignmentProperty:!0,includeHorizontalAlignmentProperty:!0,includePaddingProperty:!0,isRightToLeftContent:"rtl"===e.locale.contentLanguageDirection});e.data.addStyleProcessorRules(Ee.addBorderRules),function(e,t,o){const n={width:"tableCellBorderWidth",color:"tableCellBorderColor",style:"tableCellBorderStyle"};e.extend("tableCell",{allowAttributes:Object.values(n)}),l(t,"td",n,o),l(t,"th",n,o),r(t,{modelElement:"tableCell",modelAttribute:n.style,styleName:"border-style"}),r(t,{modelElement:"tableCell",modelAttribute:n.color,styleName:"border-color"}),r(t,{modelElement:"tableCell",modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableCellBorderStyle",new mo(e,n.borderStyle)),e.commands.add("tableCellBorderColor",new go(e,n.borderColor)),e.commands.add("tableCellBorderWidth",new po(e,n.borderWidth)),h(t,o,{modelAttribute:"tableCellHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableCellHeight",new co(e,n.height)),e.data.addStyleProcessorRules(Ee.addPaddingRules),h(t,o,{modelAttribute:"tableCellPadding",styleName:"padding",reduceBoxSides:!0,defaultValue:n.padding}),e.commands.add("tableCellPadding",new ao(e,n.padding)),e.data.addStyleProcessorRules(Ee.addBackgroundRules),h(t,o,{modelAttribute:"tableCellBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableCellBackgroundColor",new uo(e,n.backgroundColor)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellHorizontalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellHorizontalAlignment"},view:e=>({key:"style",value:{"text-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"text-align":wo}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getStyle("text-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{align:wo}},model:{key:"tableCellHorizontalAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.horizontalAlignment),e.commands.add("tableCellHorizontalAlignment",new bo(e,n.horizontalAlignment)),function(e,t,o){e.extend("tableCell",{allowAttributes:["tableCellVerticalAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"tableCell",key:"tableCellVerticalAlignment"},view:e=>({key:"style",value:{"vertical-align":e}})}),t.for("upcast").attributeToAttribute({view:{name:/^(td|th)$/,styles:{"vertical-align":fo}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getStyle("vertical-align");return t===o?null:t}}}).attributeToAttribute({view:{name:/^(td|th)$/,attributes:{valign:fo}},model:{key:"tableCellVerticalAlignment",value:e=>{const t=e.getAttribute("valign");return t===o?null:t}}})}(t,o,n.verticalAlignment),e.commands.add("tableCellVerticalAlignment",new ho(e,n.verticalAlignment))}}class _o extends e.Plugin{static get pluginName(){return"TableCellProperties"}static get requires(){return[ko,io]}}class vo extends e.Command{constructor(e,t,o){super(e),this.attributeName=t,this._defaultValue=o}refresh(){const e=this.editor.model.document.selection.getFirstPosition().findAncestor("table");this.isEnabled=!!e,this.value=this._getValue(e)}execute(e={}){const t=this.editor.model,o=t.document.selection,{value:n,batch:i}=e,l=o.getFirstPosition().findAncestor("table"),r=this._getValueToSet(n);t.enqueueChange(i,(e=>{r?e.setAttribute(this.attributeName,r,l):e.removeAttribute(this.attributeName,l)}))}_getValue(e){if(!e)return;const t=e.getAttribute(this.attributeName);return t!==this._defaultValue?t:void 0}_getValueToSet(e){if(e!==this._defaultValue)return e}}class Co extends vo{constructor(e,t){super(e,"tableBackgroundColor",t)}}class yo extends vo{constructor(e,t){super(e,"tableBorderColor",t)}_getValue(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class To extends vo{constructor(e,t){super(e,"tableBorderStyle",t)}_getValue(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}}class Ao extends vo{constructor(e,t){super(e,"tableBorderWidth",t)}_getValue(e){if(!e)return;const t=eo(e.getAttribute(this.attributeName));return t!==this._defaultValue?t:void 0}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class xo extends vo{constructor(e,t){super(e,"tableWidth",t)}_getValueToSet(e){if((e=to(e,"px"))!==this._defaultValue)return e}}class Vo extends vo{constructor(e,t){super(e,"tableHeight",t)}_getValueToSet(e){return(e=to(e,"px"))===this._defaultValue?null:e}}class So extends vo{constructor(e,t){super(e,"tableAlignment",t)}}const Ro=/^(left|center|right)$/,Io=/^(left|none|right)$/;class Po extends e.Plugin{static get pluginName(){return"TablePropertiesEditing"}static get requires(){return[ge]}init(){const e=this.editor,t=e.model.schema,o=e.conversion;e.config.define("table.tableProperties.defaultProperties",{});const n=oo(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0});e.data.addStyleProcessorRules(Ee.addBorderRules),function(e,t,o){const n={width:"tableBorderWidth",color:"tableBorderColor",style:"tableBorderStyle"};e.extend("table",{allowAttributes:Object.values(n)}),l(t,"table",n,o),s(t,{modelAttribute:n.color,styleName:"border-color"}),s(t,{modelAttribute:n.style,styleName:"border-style"}),s(t,{modelAttribute:n.width,styleName:"border-width"})}(t,o,{color:n.borderColor,style:n.borderStyle,width:n.borderWidth}),e.commands.add("tableBorderColor",new yo(e,n.borderColor)),e.commands.add("tableBorderStyle",new To(e,n.borderStyle)),e.commands.add("tableBorderWidth",new Ao(e,n.borderWidth)),function(e,t,o){e.extend("table",{allowAttributes:["tableAlignment"]}),t.for("downcast").attributeToAttribute({model:{name:"table",key:"tableAlignment"},view:e=>({key:"style",value:{float:"center"===e?"none":e}}),converterPriority:"high"}),t.for("upcast").attributeToAttribute({view:{name:/^(table|figure)$/,styles:{float:Io}},model:{key:"tableAlignment",value:e=>{let t=e.getStyle("float");return"none"===t&&(t="center"),t===o?null:t}}}).attributeToAttribute({view:{attributes:{align:Ro}},model:{name:"table",key:"tableAlignment",value:e=>{const t=e.getAttribute("align");return t===o?null:t}}})}(t,o,n.alignment),e.commands.add("tableAlignment",new So(e,n.alignment)),Eo(t,o,{modelAttribute:"tableWidth",styleName:"width",defaultValue:n.width}),e.commands.add("tableWidth",new xo(e,n.width)),Eo(t,o,{modelAttribute:"tableHeight",styleName:"height",defaultValue:n.height}),e.commands.add("tableHeight",new Vo(e,n.height)),e.data.addStyleProcessorRules(Ee.addBackgroundRules),function(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:"table",...o}),s(t,o)}(t,o,{modelAttribute:"tableBackgroundColor",styleName:"background-color",defaultValue:n.backgroundColor}),e.commands.add("tableBackgroundColor",new Co(e,n.backgroundColor))}}function Eo(e,t,o){const{modelAttribute:n}=o;e.extend("table",{allowAttributes:[n]}),i(t,{viewElement:/^(table|figure)$/,...o}),r(t,{modelElement:"table",...o})}var zo=o(99),Bo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(zo.Z,Bo);zo.Z.locals;const Wo={left:e.icons.objectLeft,center:e.icons.objectCenter,right:e.icons.objectRight};class Lo extends fe.View{constructor(e,t){super(e),this.set({borderStyle:"",borderWidth:"",borderColor:"",backgroundColor:"",width:"",height:"",alignment:""}),this.options=t;const{borderStyleDropdown:o,borderWidthInput:n,borderColorInput:i,borderRowLabel:l}=this._createBorderFields(),{backgroundRowLabel:r,backgroundInput:s}=this._createBackgroundFields(),{widthInput:a,operatorLabel:c,heightInput:d,dimensionsLabel:u}=this._createDimensionFields(),{alignmentToolbar:h,alignmentLabel:m}=this._createAlignmentFields();this.focusTracker=new b.FocusTracker,this.keystrokes=new b.KeystrokeHandler,this.children=this.createCollection(),this.borderStyleDropdown=o,this.borderWidthInput=n,this.borderColorInput=i,this.backgroundInput=s,this.widthInput=a,this.heightInput=d,this.alignmentToolbar=h;const{saveButtonView:g,cancelButtonView:p}=this._createActionButtons();this.saveButtonView=g,this.cancelButtonView=p,this._focusables=new fe.ViewCollection,this._focusCycler=new fe.FocusCycler({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}}),this.children.add(new fe.FormHeaderView(e,{label:this.t("Table properties")})),this.children.add(new ct(e,{labelView:l,children:[l,o,i,n],class:"ck-table-form__border-row"})),this.children.add(new ct(e,{labelView:r,children:[r,s],class:"ck-table-form__background-row"})),this.children.add(new ct(e,{children:[new ct(e,{labelView:u,children:[u,a,c,d],class:"ck-table-form__dimensions-row"}),new ct(e,{labelView:m,children:[m,h],class:"ck-table-properties-form__alignment-row"})]})),this.children.add(new ct(e,{children:[this.saveButtonView,this.cancelButtonView],class:"ck-table-form__action-row"})),this.setTemplate({tag:"form",attributes:{class:["ck","ck-form","ck-table-form","ck-table-properties-form"],tabindex:"-1"},children:this.children})}render(){super.render(),(0,fe.submitHandler)({view:this}),[this.borderStyleDropdown,this.borderColorInput,this.borderColorInput.fieldView.dropdownView.buttonView,this.borderWidthInput,this.backgroundInput,this.backgroundInput.fieldView.dropdownView.buttonView,this.widthInput,this.heightInput,this.alignmentToolbar,this.saveButtonView,this.cancelButtonView].forEach((e=>{this._focusables.add(e),this.focusTracker.add(e.element)})),this.keystrokes.listenTo(this.element)}destroy(){super.destroy(),this.focusTracker.destroy(),this.keystrokes.destroy()}focus(){this._focusCycler.focusFirst()}_createBorderFields(){const e=this.options.defaultTableProperties,t={style:e.borderStyle,width:e.borderWidth,color:e.borderColor},o=lt({colorConfig:this.options.borderColors,columns:5,defaultColorValue:t.color}),n=this.locale,i=this.t,l=new fe.LabelView(n);l.text=i("Border");const r=Je(this.t),s=new fe.LabeledFieldView(n,fe.createLabeledDropdown);s.set({label:i("Style"),class:"ck-table-form__border-style"}),s.fieldView.buttonView.set({isOn:!1,withText:!0,tooltip:i("Style")}),s.fieldView.buttonView.bind("label").to(this,"borderStyle",(e=>r[e||"none"])),s.fieldView.on("execute",(e=>{this.borderStyle=e.source._borderStyleValue})),s.bind("isEmpty").to(this,"borderStyle",(e=>!e)),(0,fe.addListToDropdown)(s.fieldView,ot(this,t.style));const a=new fe.LabeledFieldView(n,fe.createLabeledInputText);a.set({label:i("Width"),class:"ck-table-form__border-width"}),a.fieldView.bind("value").to(this,"borderWidth"),a.bind("isEnabled").to(this,"borderStyle",No),a.fieldView.on("input",(()=>{this.borderWidth=a.fieldView.element.value}));const c=new fe.LabeledFieldView(n,o);return c.set({label:i("Color"),class:"ck-table-form__border-color"}),c.fieldView.bind("value").to(this,"borderColor"),c.bind("isEnabled").to(this,"borderStyle",No),c.fieldView.on("input",(()=>{this.borderColor=c.fieldView.value})),this.on("change:borderStyle",((e,o,n,i)=>{No(n)||(this.borderColor="",this.borderWidth=""),No(i)||(this.borderColor=t.color,this.borderWidth=t.width)})),{borderRowLabel:l,borderStyleDropdown:s,borderColorInput:c,borderWidthInput:a}}_createBackgroundFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Background");const n=lt({colorConfig:this.options.backgroundColors,columns:5,defaultColorValue:this.options.defaultTableProperties.backgroundColor}),i=new fe.LabeledFieldView(e,n);return i.set({label:t("Color"),class:"ck-table-properties-form__background"}),i.fieldView.bind("value").to(this,"backgroundColor"),i.fieldView.on("input",(()=>{this.backgroundColor=i.fieldView.value})),{backgroundRowLabel:o,backgroundInput:i}}_createDimensionFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Dimensions");const n=new fe.LabeledFieldView(e,fe.createLabeledInputText);n.set({label:t("Width"),class:"ck-table-form__dimensions-row__width"}),n.fieldView.bind("value").to(this,"width"),n.fieldView.on("input",(()=>{this.width=n.fieldView.element.value}));const i=new fe.View(e);i.setTemplate({tag:"span",attributes:{class:["ck-table-form__dimension-operator"]},children:[{text:"×"}]});const l=new fe.LabeledFieldView(e,fe.createLabeledInputText);return l.set({label:t("Height"),class:"ck-table-form__dimensions-row__height"}),l.fieldView.bind("value").to(this,"height"),l.fieldView.on("input",(()=>{this.height=l.fieldView.element.value})),{dimensionsLabel:o,widthInput:n,operatorLabel:i,heightInput:l}}_createAlignmentFields(){const e=this.locale,t=this.t,o=new fe.LabelView(e);o.text=t("Alignment");const n=new fe.ToolbarView(e);return n.set({isCompact:!0,ariaLabel:t("Table alignment toolbar")}),nt({view:this,icons:Wo,toolbar:n,labels:this._alignmentLabels,propertyName:"alignment",defaultValue:this.options.defaultTableProperties.alignment}),{alignmentLabel:o,alignmentToolbar:n}}_createActionButtons(){const t=this.locale,o=this.t,n=new fe.ButtonView(t),i=new fe.ButtonView(t),l=[this.borderWidthInput,this.borderColorInput,this.backgroundInput,this.widthInput,this.heightInput];return n.set({label:o("Save"),icon:e.icons.check,class:"ck-button-save",type:"submit",withText:!0}),n.bind("isEnabled").toMany(l,"errorText",((...e)=>e.every((e=>!e)))),i.set({label:o("Cancel"),icon:e.icons.cancel,class:"ck-button-cancel",withText:!0}),i.delegate("execute").to(this,"cancel"),{saveButtonView:n,cancelButtonView:i}}get _alignmentLabels(){const e=this.locale,t=this.t,o=t("Align table to the left"),n=t("Center table"),i=t("Align table to the right");return"rtl"===e.uiLanguageDirection?{right:i,center:n,left:o}:{left:o,center:n,right:i}}}function No(e){return"none"!==e}const Fo={borderStyle:"tableBorderStyle",borderColor:"tableBorderColor",borderWidth:"tableBorderWidth",backgroundColor:"tableBackgroundColor",width:"tableWidth",height:"tableHeight",alignment:"tableAlignment"};class Ho extends e.Plugin{static get requires(){return[fe.ContextualBalloon]}static get pluginName(){return"TablePropertiesUI"}constructor(e){super(e),e.config.define("table.tableProperties",{borderColors:it,backgroundColors:it})}init(){const e=this.editor,t=e.t;this._defaultTableProperties=oo(e.config.get("table.tableProperties.defaultProperties"),{includeAlignmentProperty:!0}),this._balloon=e.plugins.get(fe.ContextualBalloon),this.view=this._createPropertiesView(),this._undoStepBatch=null,e.ui.componentFactory.add("tableProperties",(o=>{const n=new fe.ButtonView(o);n.set({label:t("Table properties"),icon:'',tooltip:!0}),this.listenTo(n,"execute",(()=>this._showView()));const i=Object.values(Fo).map((t=>e.commands.get(t)));return n.bind("isEnabled").toMany(i,"isEnabled",((...e)=>e.some((e=>e)))),n}))}destroy(){super.destroy(),this.view.destroy()}_createPropertiesView(){const e=this.editor,t=e.config.get("table.tableProperties"),o=(0,fe.normalizeColorOptions)(t.borderColors),n=(0,fe.getLocalizedColorOptions)(e.locale,o),i=(0,fe.normalizeColorOptions)(t.backgroundColors),l=(0,fe.getLocalizedColorOptions)(e.locale,i),r=new Lo(e.locale,{borderColors:n,backgroundColors:l,defaultTableProperties:this._defaultTableProperties}),s=e.t;r.render(),this.listenTo(r,"submit",(()=>{this._hideView()})),this.listenTo(r,"cancel",(()=>{this._undoStepBatch.operations.length&&e.execute("undo",this._undoStepBatch),this._hideView()})),r.keystrokes.set("Esc",((e,t)=>{this._hideView(),t()})),(0,fe.clickOutsideHandler)({emitter:r,activator:()=>this._isViewInBalloon,contextElements:[this._balloon.view.element],callback:()=>this._hideView()});const a=Xe(s),c=Ye(s);return r.on("change:borderStyle",this._getPropertyChangeCallback("tableBorderStyle",this._defaultTableProperties.borderStyle)),r.on("change:borderColor",this._getValidatedPropertyChangeCallback({viewField:r.borderColorInput,commandName:"tableBorderColor",errorText:a,validator:Qe,defaultValue:this._defaultTableProperties.borderColor})),r.on("change:borderWidth",this._getValidatedPropertyChangeCallback({viewField:r.borderWidthInput,commandName:"tableBorderWidth",errorText:c,validator:tt,defaultValue:this._defaultTableProperties.borderWidth})),r.on("change:backgroundColor",this._getValidatedPropertyChangeCallback({viewField:r.backgroundInput,commandName:"tableBackgroundColor",errorText:a,validator:Qe,defaultValue:this._defaultTableProperties.backgroundColor})),r.on("change:width",this._getValidatedPropertyChangeCallback({viewField:r.widthInput,commandName:"tableWidth",errorText:c,validator:et,defaultValue:this._defaultTableProperties.width})),r.on("change:height",this._getValidatedPropertyChangeCallback({viewField:r.heightInput,commandName:"tableHeight",errorText:c,validator:et,defaultValue:this._defaultTableProperties.height})),r.on("change:alignment",this._getPropertyChangeCallback("tableAlignment",this._defaultTableProperties.alignment)),r}_fillViewFormFromCommandValues(){const e=this.editor.commands,t=e.get("tableBorderStyle");Object.entries(Fo).map((([t,o])=>{const n=this._defaultTableProperties[t]||"";return[t,e.get(o).value||n]})).forEach((([e,o])=>{("borderColor"!==e&&"borderWidth"!==e||"none"!==t.value)&&this.view.set(e,o)}))}_showView(){const e=this.editor;this.listenTo(e.ui,"update",(()=>{this._updateView()})),this._fillViewFormFromCommandValues(),this._balloon.add({view:this.view,position:Xt(e)}),this._undoStepBatch=e.model.createBatch(),this.view.focus()}_hideView(){const e=this.editor;this.stopListening(e.ui,"update"),this.view.saveButtonView.focus(),this._balloon.remove(this.view),this.editor.editing.view.focus()}_updateView(){const e=this.editor;Oe(e.editing.view.document.selection)?this._isViewVisible&&Jt(e,"table"):this._hideView()}get _isViewVisible(){return this._balloon.visibleView===this.view}get _isViewInBalloon(){return this._balloon.hasView(this.view)}_getPropertyChangeCallback(e,t){return(o,n,i,l)=>{(l||t!==i)&&this.editor.execute(e,{value:i,batch:this._undoStepBatch})}}_getValidatedPropertyChangeCallback(e){const{commandName:t,viewField:o,validator:n,errorText:i,defaultValue:l}=e,r=Kt((()=>{o.errorText=i}),500);return(e,i,s,a)=>{r.cancel(),(a||l!==s)&&(n(s)?(this.editor.execute(t,{value:s,batch:this._undoStepBatch}),o.errorText=null):r())}}}class Do extends e.Plugin{static get pluginName(){return"TableProperties"}static get requires(){return[Po,Ho]}}function Mo(e){e.document.registerPostFixer((t=>function(e,t){const o=t.document.differ.getChanges();let n=!1;for(const t of o){if("insert"!=t.type)continue;if(t.position.parent.is("element","table")||"table"==t.name){const o="table"==t.name?t.position.nodeAfter:t.position.parent,i=Array.from(o.getChildren()).filter((e=>e.is("element","caption"))),l=i.shift();if(!l)continue;for(const t of i)e.move(e.createRangeIn(t),l,"end"),e.remove(t);l.nextSibling&&(e.move(e.createRangeOn(l),o,"end"),n=!0),n=!!i.length||n}}return n}(t,e)))}function Oo(e){return!!e&&e.is("element","table")}function jo(e){for(const t of e.getChildren())if(t.is("element","caption"))return t;return null}function Uo(e){const t=e.parent;return"figcaption"==e.name&&t&&"figure"==t.name&&t.hasClass("table")||"caption"==e.name&&t&&"table"==t.name?{name:!0}:null}function $o(e){const t=e.getSelectedElement();return t&&t.is("element","table")?t:e.getFirstPosition().findAncestor("table")}class Zo extends e.Command{refresh(){const e=$o(this.editor.model.document.selection);this.isEnabled=!!e,this.isEnabled?this.value=!!jo(e):this.value=!1}execute(e={}){const{focusCaptionOnShow:t}=e;this.editor.model.change((e=>{this.value?this._hideTableCaption(e):this._showTableCaption(e,t)}))}_showTableCaption(e,t){const o=this.editor.model,n=$o(o.document.selection),i=this.editor.plugins.get("TableCaptionEditing")._getSavedCaption(n)||e.createElement("caption");o.insertContent(i,n,"end"),t&&e.setSelection(i,"in")}_hideTableCaption(e){const t=this.editor.model,o=$o(t.document.selection),n=this.editor.plugins.get("TableCaptionEditing"),i=jo(o);n._saveCaption(o,i),t.deleteContent(e.createSelection(i,"on"))}}class Ko extends e.Plugin{static get pluginName(){return"TableCaptionEditing"}constructor(e){super(e),this._savedCaptionsMap=new WeakMap}init(){const e=this.editor,o=e.model.schema,n=e.editing.view,i=e.t;o.isRegistered("caption")?o.extend("caption",{allowIn:"table"}):o.register("caption",{allowIn:"table",allowContentOf:"$block",isLimit:!0}),e.commands.add("toggleTableCaption",new Zo(this.editor)),e.conversion.for("upcast").elementToElement({view:Uo,model:"caption"}),e.conversion.for("dataDowncast").elementToElement({model:"caption",view:(e,{writer:t})=>Oo(e.parent)?t.createContainerElement("figcaption"):null}),e.conversion.for("editingDowncast").elementToElement({model:"caption",view:(e,{writer:o})=>{if(!Oo(e.parent))return null;const l=o.createEditableElement("figcaption");return o.setCustomProperty("tableCaption",!0,l),(0,Ee.enablePlaceholder)({view:n,element:l,text:i("Enter table caption"),keepOnFocus:!0}),(0,t.toWidgetEditable)(l,o)}}),Mo(e.model)}_getSavedCaption(e){const t=this._savedCaptionsMap.get(e);return t?Ee.Element.fromJSON(t):null}_saveCaption(e,t){this._savedCaptionsMap.set(e,t.toJSON())}}class qo extends e.Plugin{static get pluginName(){return"TableCaptionUI"}init(){const t=this.editor,o=t.editing.view,n=t.t;t.ui.componentFactory.add("toggleTableCaption",(i=>{const l=t.commands.get("toggleTableCaption"),r=new fe.ButtonView(i);return r.set({icon:e.icons.caption,tooltip:!0,isToggleable:!0}),r.bind("isOn","isEnabled").to(l,"value","isEnabled"),r.bind("label").to(l,"value",(e=>n(e?"Toggle caption off":"Toggle caption on"))),this.listenTo(r,"execute",(()=>{if(t.execute("toggleTableCaption",{focusCaptionOnShow:!0}),l.value){const e=function(e){const t=$o(e);return t?jo(t):null}(t.model.document.selection),n=t.editing.mapper.toViewElement(e);if(!n)return;o.scrollToTheSelection(),o.change((e=>{e.addClass("table__caption_highlighted",n)}))}t.editing.view.focus()})),r}))}}var Go=o(665),Jo={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(Go.Z,Jo);Go.Z.locals;class Xo extends e.Plugin{static get pluginName(){return"TableCaption"}static get requires(){return[Ko,qo]}}const Yo=function(e,t,o){var n=!0,i=!0;if("function"!=typeof e)throw new TypeError("Expected a function");return kt(o)&&(n="leading"in o?!!o.leading:n,i="trailing"in o?!!o.trailing:i),Kt(e,t,{leading:n,maxWait:t,trailing:i})};class Qo extends vo{constructor(e,t){super(e,"tableWidth",t)}refresh(){this.isEnabled=!0}execute(e={}){const t=this.editor.model,o=e.table||t.document.selection.getSelectedElement(),{tableWidth:n,columnWidths:i}=e;t.change((e=>{n?(e.setAttribute(this.attributeName,n,o),e.setAttribute("columnWidths",i,o)):e.removeAttribute(this.attributeName,o)}))}}class en extends vo{constructor(e,t){super(e,"columnWidths",t)}refresh(){this.isEnabled=!0}execute(e={}){const t=this.editor.model,o=e.table||t.document.selection.getSelectedElement(),{columnWidths:n}=e;t.change((e=>{n?e.setAttribute(this.attributeName,n,o):e.removeAttribute(this.attributeName,o)}))}}function tn(e,t){return 4e3/on(e,t)}function on(e,t){const o=nn(e,"tbody",t)||nn(e,"thead",t);return ln(t.editing.view.domConverter.mapViewToDom(o))}function nn(e,t,o){return[...[...o.editing.mapper.toViewElement(e).getChildren()].find((e=>e.is("element","table"))).getChildren()].find((e=>e.is("element",t)))}function ln(e){const t=b.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseFloat(t.width)-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight)-parseFloat(t.borderLeftWidth)-parseFloat(t.borderRightWidth):parseFloat(t.width)}function rn(e){const t=Math.pow(10,2),o=parseFloat(e);return Math.round(o*t)/t}function sn(e){return e.map((e=>parseFloat(e))).filter((e=>!Number.isNaN(e))).reduce(((e,t)=>e+t),0)}function an(e){e=function(e){const t=e.filter((e=>"auto"===e)).length;if(0===t)return e.map((e=>rn(e)));const o=sn(e),n=Math.max((100-o)/t,5);return e.map((e=>"auto"===e?n:e)).map((e=>rn(e)))}(e);const t=sn(e);return 100===t?e:e.map((e=>rn(100*e/t))).map(((e,t,o)=>{if(!(t===o.length-1))return e;return rn(e+100-sn(o))}))}function cn(e,t){let o=[...t.getChildren()].find((e=>e.hasClass("ck-table-column-resizer")));o||(o=e.createUIElement("div",{class:"ck-table-column-resizer"}),e.insert(e.createPositionAt(t,"end"),o))}function dn(e){const t=b.global.window.getComputedStyle(e);return"border-box"===t.boxSizing?parseInt(t.width):parseFloat(t.width)+parseFloat(t.paddingLeft)+parseFloat(t.paddingRight)+parseFloat(t.borderWidth)}function un(){return e=>e.on("attribute:columnWidths:table",((e,t,o)=>{const n=o.writer,i=t.item,l=[...o.mapper.toViewElement(i).getChildren()].find((e=>e.is("element","table")));t.attributeNewValue?(!function(e,t,o){const n=o.split(",");let i=[...t.getChildren()].find((e=>e.is("element","colgroup")));if(i)for(const t of[...i.getChildren()])e.remove(t);else i=e.createContainerElement("colgroup");for(const t of Array(n.length).keys()){const o=e.createEmptyElement("col");e.setStyle("width",n[t],o),e.insert(e.createPositionAt(i,"end"),o)}e.insert(e.createPositionAt(t,"start"),i)}(n,l,t.attributeNewValue),n.addClass("ck-table-resized",l)):(!function(e,t){const o=[...t.getChildren()].find((e=>e.is("element","colgroup")));e.remove(o)}(n,l),n.removeClass("ck-table-resized",l))}))}class hn extends e.Plugin{static get requires(){return[ge,U]}static get pluginName(){return"TableColumnResizeEditing"}constructor(e){super(e),this._isResizingActive=!1,this.set("_isResizingAllowed",!0),this._resizingData=null,this._domEmitter=Object.create(b.DomEmitterMixin),this._tableUtilsPlugin=e.plugins.get("TableUtils"),this.on("change:_isResizingAllowed",((t,o,n)=>{e.editing.view.change((t=>{t[n?"removeClass":"addClass"]("ck-column-resize_disabled",e.editing.view.document.getRoot())}))}))}init(){this._extendSchema(),this._registerPostFixer(),this._registerConverters(),this._registerResizingListeners(),this._registerColgroupFixer(),this._registerResizerInserter();const e=this.editor,t=e.plugins.get("TableColumnResize");e.commands.add("resizeTableWidth",new Qo(e)),e.commands.add("resizeColumnWidths",new en(e));const o=e.commands.get("resizeTableWidth"),n=e.commands.get("resizeColumnWidths");this.bind("_isResizingAllowed").to(e,"isReadOnly",t,"isEnabled",o,"isEnabled",n,"isEnabled",((e,t,o,n)=>!e&&t&&o&&n))}destroy(){this._domEmitter.stopListening(),super.destroy()}_extendSchema(){this.editor.model.schema.extend("table",{allowAttributes:["tableWidth","columnWidths"]})}_registerPostFixer(){const e=this.editor.model;function t(e,t,o){const n=o._tableUtilsPlugin.getColumns(t);if(0===n-e.length)return;const i=function(e,t){const o=new Set;for(const n of e.getChanges())if("insert"==n.type&&n.position.nodeAfter&&"tableCell"==n.position.nodeAfter.name&&n.position.nodeAfter.getAncestors().includes(t))o.add(n.position.nodeAfter);else if("remove"==n.type){const e=n.position.nodeBefore||n.position.nodeAfter;"tableCell"==e.name&&e.getAncestors().includes(t)&&o.add(e)}return o}(o.editor.model.document.differ,t);for(const r of i){const i=n-e.length;if(0===i)continue;const s=i>0,a=o._tableUtilsPlugin.getCellLocation(r).column;if(s){const n=tn(t,o.editor),r=(l=n,Array(i).fill(l));e.splice(a,0,...r)}else{const t=e.splice(a,Math.abs(i));e[a]+=sn(t)}}var l}e.document.registerPostFixer((o=>{let n=!1;for(const i of function(e){const t=new Set;for(const o of e.document.differ.getChanges()){let n=null;switch(o.type){case"insert":n=["table","tableRow","tableCell"].includes(o.name)?o.position:null;break;case"remove":n=["tableRow","tableCell"].includes(o.name)?o.position:null;break;case"attribute":o.range.start.nodeAfter&&(n=["table","tableRow","tableCell"].includes(o.range.start.nodeAfter.name)?o.range.start:null)}if(!n)continue;const i=n.nodeAfter&&"table"===n.nodeAfter.name?n.nodeAfter:n.findAncestor("table");for(const o of e.createRangeOn(i).getItems())o.is("element")&&"table"===o.name&&o.hasAttribute("columnWidths")&&t.add(o)}return t}(e)){const e=an(i.getAttribute("columnWidths").split(","));t(e,i,this);const l=e.map((e=>`${e}%`)).join(",");i.getAttribute("columnWidths")!==l&&(o.setAttribute("columnWidths",l,i),n=!0)}return n}))}_registerConverters(){const e=this.editor.conversion;var t;e.for("upcast").attributeToAttribute({view:{name:"figure",key:"style",value:{width:/[\s\S]+/}},model:{name:"table",key:"tableWidth",value:e=>e.getStyle("width")}}),e.for("upcast").add((t=this._tableUtilsPlugin,e=>e.on("element:colgroup",((e,o,n)=>{const i=o.viewItem;if(!n.consumable.test(i,{name:!0}))return;n.consumable.consume(i,{name:!0});const l=o.modelCursor.findAncestor("table"),r=t.getColumns(l);let s=[...Array(r).keys()].map((e=>{const t=i.getChild(e);if(!t||!t.is("element","col"))return"auto";const o=t.getStyle("width");return o&&o.endsWith("%")?o:"auto"}));s.includes("auto")&&(s=an(s).map((e=>e+"%"))),n.writer.setAttribute("columnWidths",s.join(","),l)})))),e.for("downcast").attributeToAttribute({model:{name:"table",key:"tableWidth"},view:e=>({name:"figure",key:"style",value:{width:e}})}),e.for("downcast").add(un())}_registerResizingListeners(){const e=this.editor.editing.view;e.addObserver(ze),e.document.on("mousedown",this._onMouseDownHandler.bind(this),{priority:"high"}),this._domEmitter.listenTo(b.global.window.document,"mousemove",Yo(this._onMouseMoveHandler.bind(this),50)),this._domEmitter.listenTo(b.global.window.document,"mouseup",this._onMouseUpHandler.bind(this))}_onMouseDownHandler(e,t){const o=t.target;if(!o.hasClass("ck-table-column-resizer"))return;if(!this._isResizingAllowed)return;t.preventDefault(),e.stop();const n=this.editor,i=function(e,t,o){const n=Array(t.getColumns(e)),i=new f(e);for(const e of i){const t=o.editing.mapper.toViewElement(e.cell),i=dn(o.editing.view.domConverter.mapViewToDom(t));(!n[e.column]||ie.is("element","colgroup")))||r.change((e=>{!function(e,t,o){const n=e.createContainerElement("colgroup");for(let o=0;ofunction(e,t,o){const n=o.widths.viewFigureWidth/o.widths.viewFigureParentWidth;e.addClass("ck-table-resized",t),e.addClass("ck-table-column-resizer__active",o.elements.viewResizer),e.setStyle("width",`${rn(100*n)}%`,t.findAncestor("figure"))}(e,l,this._resizingData)))}_onMouseMoveHandler(e,t){if(!this._isResizingActive)return;if(!this._isResizingAllowed)return void this._onMouseUpHandler();const{columnPosition:o,flags:{isRightEdge:n,isTableCentered:i,isLtrContent:l},elements:{viewFigure:r,viewLeftColumn:s,viewRightColumn:a},widths:{viewFigureParentWidth:c,tableWidth:d,leftColumnWidth:u,rightColumnWidth:h}}=this._resizingData,b=40-u,m=n?c-d:h-40,g=(l?1:-1)*(n&&i?2:1),p=(f=(t.clientX-o)*g,w=Math.min(b,0),k=Math.max(m,0),rn(f<=w?w:f>=k?k:f));var f,w,k;0!==p&&this.editor.editing.view.change((e=>{const t=rn(100*(u+p)/d);if(e.setStyle("width",`${t}%`,s),n){const t=rn(100*(d+p)/c);e.setStyle("width",`${t}%`,r)}else{const t=rn(100*(h-p)/d);e.setStyle("width",`${t}%`,a)}}))}_onMouseUpHandler(){if(!this._isResizingActive)return;const{viewResizer:e,modelTable:t,viewFigure:o,viewColgroup:n}=this._resizingData.elements,i=this.editor,l=i.editing.view,r=t.getAttribute("columnWidths"),s=[...n.getChildren()].map((e=>e.getStyle("width"))).join(","),a=r!==s,c=t.getAttribute("tableWidth"),d=o.getStyle("width"),u=c!==d;(a||u)&&(this._isResizingAllowed?u?i.execute("resizeTableWidth",{table:t,tableWidth:`${rn(d)}%`,columnWidths:s}):i.execute("resizeColumnWidths",{columnWidths:s,table:t}):l.change((e=>{if(r){const t=r.split(",");for(const o of n.getChildren())e.setStyle("width",t.shift(),o)}else e.remove(n);u&&(c?e.setStyle("width",c,o):e.removeStyle("width",o)),r||c||e.removeClass("ck-table-resized",[...o.getChildren()].find((e=>"table"===e.name)))}))),l.change((t=>{t.removeClass("ck-table-column-resizer__active",e)})),this._isResizingActive=!1,this._resizingData=null}_getResizingData(e,t){const o=this.editor,n=e.domEvent.clientX,i=e.target,l=i.findAncestor("td")||i.findAncestor("th"),r=o.editing.mapper.toModelElement(l),s=r.findAncestor("table"),a=function(e,t){const o=t.getCellLocation(e).column;return{leftEdge:o,rightEdge:o+(e.getAttribute("colspan")||1)-1}}(r,this._tableUtilsPlugin).rightEdge,c=a===this._tableUtilsPlugin.getColumns(s)-1,d=!s.hasAttribute("tableAlignment"),u="rtl"!==o.locale.contentLanguageDirection,h=l.findAncestor("table"),b=h.findAncestor("figure"),m=[...h.getChildren()].find((e=>e.is("element","colgroup"))),g=m.getChild(a),p=c?void 0:m.getChild(a+1);return{columnPosition:n,flags:{isRightEdge:c,isTableCentered:d,isLtrContent:u},elements:{viewResizer:i,modelTable:s,viewFigure:b,viewColgroup:m,viewLeftColumn:g,viewRightColumn:p},widths:{viewFigureParentWidth:ln(o.editing.view.domConverter.mapViewToDom(b.parent)),viewFigureWidth:ln(o.editing.view.domConverter.mapViewToDom(b)),tableWidth:on(s,o),leftColumnWidth:t[a],rightColumnWidth:c?void 0:t[a+1]}}}_registerColgroupFixer(){const e=this.editor;this.listenTo(e.editing.view.document,"layoutChanged",(()=>{const t=e.editing.view.document.selection.getFirstPosition().getAncestors().reverse().find((e=>"table"===e.name)),o=t&&[...t.getChildren()].find((e=>e.is("element","colgroup"))),n=e.model.document.selection.getFirstPosition().findAncestor("table");n&&n.hasAttribute("columnWidths")&&t&&!o&&e.editing.reconvertItem(n)}),{priority:"low"})}_registerResizerInserter(){const e=this.editor.editing.view;e.on("render",(()=>{for(const t of e.createRangeIn(e.document.getRoot()))["td","th"].includes(t.item.name)&&e.change((e=>{cn(e,t.item)}))}),{priority:"lowest"})}}var bn=o(975),mn={injectType:"singletonStyleTag",attributes:{"data-cke":!0},insert:"head",singleton:!0};he()(bn.Z,mn);bn.Z.locals;class gn extends e.Plugin{static get requires(){return[hn,so]}static get pluginName(){return"TableColumnResize"}}})(),(window.CKEditor5=window.CKEditor5||{}).table=n})(); \ No newline at end of file diff --git a/core/core.libraries.yml b/core/core.libraries.yml index 549f0c6d2a..bbfc2b4e17 100644 --- a/core/core.libraries.yml +++ b/core/core.libraries.yml @@ -19,10 +19,10 @@ internal.backbone: ckeditor5: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: # This file is not aggregated to force the creation of a new aggregate file @@ -36,10 +36,10 @@ ckeditor5: ckeditor5.editorClassic: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/editor-classic/editor-classic.js: { minified: true } @@ -48,10 +48,10 @@ ckeditor5.editorClassic: ckeditor5.editorDecoupled: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/editor-decoupled/editor-decoupled.js: { minified: true } @@ -74,10 +74,10 @@ ckeditor5.essentials: ckeditor5.heading: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/heading/heading.js: { minified: true } @@ -87,10 +87,10 @@ ckeditor5.heading: ckeditor5.basic: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/basic-styles/basic-styles.js: { minified: true } @@ -100,10 +100,10 @@ ckeditor5.basic: ckeditor5.specialCharacters: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/special-characters/special-characters.js: { minified: true } @@ -113,10 +113,10 @@ ckeditor5.specialCharacters: ckeditor5.blockquote: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/block-quote/block-quote.js: { minified: true } @@ -126,10 +126,10 @@ ckeditor5.blockquote: ckeditor5.image: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/image/image.js: { minified: true } @@ -139,10 +139,10 @@ ckeditor5.image: ckeditor5.link: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/link/link.js: { minified: true } @@ -152,10 +152,10 @@ ckeditor5.link: ckeditor5.list: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/list/list.js: { minified: true } @@ -165,10 +165,10 @@ ckeditor5.list: ckeditor5.horizontalLine: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/horizontal-line/horizontal-line.js: { minified: true } @@ -178,10 +178,10 @@ ckeditor5.horizontalLine: ckeditor5.htmlSupport: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/html-support/html-support.js: { minified: true } @@ -191,10 +191,10 @@ ckeditor5.htmlSupport: ckeditor5.alignment: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/alignment/alignment.js: { minified: true } @@ -204,10 +204,10 @@ ckeditor5.alignment: ckeditor5.removeFormat: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/remove-format/remove-format.js: { minified: true } @@ -217,10 +217,10 @@ ckeditor5.removeFormat: ckeditor5.pasteFromOffice: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/paste-from-office/paste-from-office.js: { minified: true } @@ -229,10 +229,10 @@ ckeditor5.pasteFromOffice: ckeditor5.indent: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/indent/indent.js: { minified: true } @@ -242,10 +242,10 @@ ckeditor5.indent: ckeditor5.sourceEditing: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/source-editing/source-editing.js: { minified: true } @@ -255,10 +255,10 @@ ckeditor5.sourceEditing: ckeditor5.table: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/table/table.js: { minified: true } @@ -268,10 +268,10 @@ ckeditor5.table: ckeditor5.language: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/language/language.js: { minified: true } @@ -281,10 +281,10 @@ ckeditor5.language: ckeditor5.codeBlock: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/code-block/code-block.js: { minified: true } @@ -294,10 +294,10 @@ ckeditor5.codeBlock: ckeditor5.style: remote: https://github.com/ckeditor/ckeditor5 - version: "35.2.1" + version: "35.3.0" license: name: GNU-GPL-2.0-or-later - url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.2.1/LICENSE.md + url: https://raw.githubusercontent.com/ckeditor/ckeditor5/v35.3.0/LICENSE.md gpl-compatible: true js: assets/vendor/ckeditor5/style/style.js: { minified: true } diff --git a/core/modules/ckeditor5/js/build/ckeditor5.types.jsdoc b/core/modules/ckeditor5/js/build/ckeditor5.types.jsdoc index f826f9446e..7020d9ee62 100644 --- a/core/modules/ckeditor5/js/build/ckeditor5.types.jsdoc +++ b/core/modules/ckeditor5/js/build/ckeditor5.types.jsdoc @@ -196,12 +196,6 @@ * @typedef {module:clipboard/clipboardpipeline} module:clipboard/clipboardpipeline~ClipboardPipeline */ -/** - * Declared in file @ckeditor/ckeditor5-clipboard/src/datatransfer.js - * - * @typedef {module:clipboard/datatransfer} module:clipboard/datatransfer~DataTransfer - */ - /** * Declared in file @ckeditor/ckeditor5-clipboard/src/dragdrop.js * @@ -226,12 +220,6 @@ * @typedef {module:clipboard/utils/plaintexttohtml} module:clipboard/utils/plaintexttohtml~plainTextToHtml */ -/** - * Declared in file @ckeditor/ckeditor5-clipboard/src/utils/viewtoplaintext.js - * - * @typedef {module:clipboard/utils/viewtoplaintext} module:clipboard/utils/viewtoplaintext~viewToPlainText - */ - /** * Declared in file @ckeditor/ckeditor5-code-block/src/codeblock.js * @@ -268,12 +256,6 @@ * @typedef {module:code-block/outdentcodeblockcommand} module:code-block/outdentcodeblockcommand~OutdentCodeBlockCommand */ -/** - * Declared in file @ckeditor/ckeditor5-core/src/command.js - * - * @typedef {module:core/command} module:core/command~Command - */ - /** * Declared in file @ckeditor/ckeditor5-core/src/commandcollection.js * @@ -304,24 +286,6 @@ * @typedef {module:core/editor/editor} module:core/editor/editor~Editor */ -/** - * Declared in file @ckeditor/ckeditor5-core/src/editor/editorconfig.jsdoc - * - * @typedef {module:core/editor/editorconfig} module:core/editor/editorconfig~EditorConfig - */ - -/** - * Declared in file @ckeditor/ckeditor5-core/src/editor/editorui.js - * - * @typedef {module:core/editor/editorui} module:core/editor/editorui~EditorUI - */ - -/** - * Declared in file @ckeditor/ckeditor5-core/src/editor/editorwithui.jsdoc - * - * @typedef {module:core/editor/editorwithui} module:core/editor/editorwithui~EditorWithUI - */ - /** * Declared in file @ckeditor/ckeditor5-core/src/editor/utils/attachtoform.js * @@ -886,12 +850,6 @@ * @typedef {module:engine/view/observer/selectionobserver} module:engine/view/observer/selectionobserver~SelectionObserver */ -/** - * Declared in file @ckeditor/ckeditor5-engine/src/view/observer/tabobserver.js - * - * @typedef {module:engine/view/observer/tabobserver} module:engine/view/observer/tabobserver~TabObserver - */ - /** * Declared in file @ckeditor/ckeditor5-engine/src/view/position.js * @@ -2393,9 +2351,15 @@ */ /** - * Declared in file @ckeditor/ckeditor5-typing/src/inputcommand.js + * Declared in file @ckeditor/ckeditor5-typing/src/inserttextcommand.js + * + * @typedef {module:typing/inserttextcommand} module:typing/inserttextcommand~InsertTextCommand + */ + +/** + * Declared in file @ckeditor/ckeditor5-typing/src/inserttextobserver.js * - * @typedef {module:typing/inputcommand} module:typing/inputcommand~InputCommand + * @typedef {module:typing/inserttextobserver} module:typing/inserttextobserver~InsertTextObserver */ /** @@ -2422,36 +2386,6 @@ * @typedef {module:typing/typing} module:typing/typing~Typing */ -/** - * Declared in file @ckeditor/ckeditor5-typing/src/utils/changebuffer.js - * - * @typedef {module:typing/utils/changebuffer} module:typing/utils/changebuffer~ChangeBuffer - */ - -/** - * Declared in file @ckeditor/ckeditor5-typing/src/utils/findattributerange.js - * - * @typedef {module:typing/utils/findattributerange} module:typing/utils/findattributerange~findAttributeRange - */ - -/** - * Declared in file @ckeditor/ckeditor5-typing/src/utils/getlasttextline.js - * - * @typedef {module:typing/utils/getlasttextline} module:typing/utils/getlasttextline~getLastTextLine - */ - -/** - * Declared in file @ckeditor/ckeditor5-typing/src/utils/injecttypingmutationshandling.js - * - * @typedef {module:typing/utils/injecttypingmutationshandling} module:typing/utils/injecttypingmutationshandling~injectTypingMutationsHandling - */ - -/** - * Declared in file @ckeditor/ckeditor5-typing/src/utils/injectunsafekeystrokeshandling.js - * - * @typedef {module:typing/utils/injectunsafekeystrokeshandling} module:typing/utils/injectunsafekeystrokeshandling~injectUnsafeKeystrokesHandling - */ - /** * Declared in file @ckeditor/ckeditor5-typing/src/utils/inlinehighlight.js * @@ -2488,12 +2422,6 @@ * @typedef {module:ui/bindings/submithandler} module:ui/bindings/submithandler~submitHandler */ -/** - * Declared in file @ckeditor/ckeditor5-ui/src/button/button.jsdoc - * - * @typedef {module:ui/button/button} module:ui/button/button~Button - */ - /** * Declared in file @ckeditor/ckeditor5-ui/src/button/buttonview.js * @@ -2524,12 +2452,6 @@ * @typedef {module:ui/componentfactory} module:ui/componentfactory~ComponentFactory */ -/** - * Declared in file @ckeditor/ckeditor5-ui/src/dropdown/button/dropdownbutton.jsdoc - * - * @typedef {module:ui/dropdown/button/dropdownbutton} module:ui/dropdown/button/dropdownbutton~DropdownButton - */ - /** * Declared in file @ckeditor/ckeditor5-ui/src/dropdown/button/dropdownbuttonview.js * @@ -2542,12 +2464,6 @@ * @typedef {module:ui/dropdown/button/splitbuttonview} module:ui/dropdown/button/splitbuttonview~SplitButtonView */ -/** - * Declared in file @ckeditor/ckeditor5-ui/src/dropdown/dropdownpanelfocusable.jsdoc - * - * @typedef {module:ui/dropdown/dropdownpanelfocusable} module:ui/dropdown/dropdownpanelfocusable~DropdownPanelFocusable - */ - /** * Declared in file @ckeditor/ckeditor5-ui/src/dropdown/dropdownpanelview.js * @@ -2560,12 +2476,6 @@ * @typedef {module:ui/dropdown/dropdownview} module:ui/dropdown/dropdownview~DropdownView */ -/** - * Declared in file @ckeditor/ckeditor5-ui/src/dropdown/utils.js - * - * @typedef {module:ui/dropdown/utils} module:ui/dropdown/utils~ListDropdownItemDefinition - */ - /** * Declared in file @ckeditor/ckeditor5-ui/src/editableui/editableuiview.js * diff --git a/core/package.json b/core/package.json index 11f2c5954e..433afe4164 100644 --- a/core/package.json +++ b/core/package.json @@ -32,32 +32,32 @@ "watch:ckeditor5-dev": "yarn watch:ckeditor5 --mode=development" }, "devDependencies": { - "@ckeditor/ckeditor5-alignment": "~35.2.0", - "@ckeditor/ckeditor5-basic-styles": "~35.2.0", - "@ckeditor/ckeditor5-block-quote": "~35.2.0", - "@ckeditor/ckeditor5-code-block": "~35.2.0", - "@ckeditor/ckeditor5-editor-classic": "~35.2.0", - "@ckeditor/ckeditor5-editor-decoupled": "~35.2.0", - "@ckeditor/ckeditor5-essentials": "~35.2.0", - "@ckeditor/ckeditor5-heading": "~35.2.0", - "@ckeditor/ckeditor5-horizontal-line": "~35.2.0", - "@ckeditor/ckeditor5-html-support": "~35.2.0", - "@ckeditor/ckeditor5-image": "~35.2.0", - "@ckeditor/ckeditor5-indent": "~35.2.0", - "@ckeditor/ckeditor5-language": "~35.2.0", - "@ckeditor/ckeditor5-link": "~35.2.0", - "@ckeditor/ckeditor5-list": "~35.2.0", - "@ckeditor/ckeditor5-paste-from-office": "~35.2.0", - "@ckeditor/ckeditor5-remove-format": "~35.2.0", - "@ckeditor/ckeditor5-source-editing": "~35.2.0", - "@ckeditor/ckeditor5-special-characters": "~35.2.0", - "@ckeditor/ckeditor5-style": "~35.2.0", - "@ckeditor/ckeditor5-table": "~35.2.0", + "@ckeditor/ckeditor5-alignment": "~35.3.0", + "@ckeditor/ckeditor5-basic-styles": "~35.3.0", + "@ckeditor/ckeditor5-block-quote": "~35.3.0", + "@ckeditor/ckeditor5-code-block": "~35.3.0", + "@ckeditor/ckeditor5-editor-classic": "~35.3.0", + "@ckeditor/ckeditor5-editor-decoupled": "~35.3.0", + "@ckeditor/ckeditor5-essentials": "~35.3.0", + "@ckeditor/ckeditor5-heading": "~35.3.0", + "@ckeditor/ckeditor5-horizontal-line": "~35.3.0", + "@ckeditor/ckeditor5-html-support": "~35.3.0", + "@ckeditor/ckeditor5-image": "~35.3.0", + "@ckeditor/ckeditor5-indent": "~35.3.0", + "@ckeditor/ckeditor5-language": "~35.3.0", + "@ckeditor/ckeditor5-link": "~35.3.0", + "@ckeditor/ckeditor5-list": "~35.3.0", + "@ckeditor/ckeditor5-paste-from-office": "~35.3.0", + "@ckeditor/ckeditor5-remove-format": "~35.3.0", + "@ckeditor/ckeditor5-source-editing": "~35.3.0", + "@ckeditor/ckeditor5-special-characters": "~35.3.0", + "@ckeditor/ckeditor5-style": "~35.3.0", + "@ckeditor/ckeditor5-table": "~35.3.0", "@drupal/once": "1.0.x", "backbone": "1.4.x", "chokidar": "^3.3.1", "chromedriver": "^106", - "ckeditor5": "~35.2.0", + "ckeditor5": "~35.3.0", "cspell": "^6.0.0", "dotenv-safe": "^8.2.0", "eslint": "^8.9.0", diff --git a/core/yarn.lock b/core/yarn.lock index 538ad9657d..aa3cb13ed6 100644 --- a/core/yarn.lock +++ b/core/yarn.lock @@ -23,281 +23,280 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@ckeditor/ckeditor5-alignment@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-alignment/-/ckeditor5-alignment-35.2.1.tgz#05e66614a97fbea4b72410def51f9fc2cedefbb1" - integrity sha512-0wfEb6femCLyCrjn0napDq+pB3xqhYtJTExTAsyWqZrdZ5AQCqTWnMZFLUUjvHQWbCAUyd56XuXac6EZ6ZWD5Q== +"@ckeditor/ckeditor5-alignment@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-alignment/-/ckeditor5-alignment-35.3.0.tgz#47dfb938c0827837220fd54e2fddb72106a60b2b" + integrity sha512-j/6GrvPtaEJlx3T3rAh2oFoBz3mLQqgNql0c1jWNXwRapBVaXGDCbQVKbnGs1ESbArY4BUNZU/QIxHF/4slfOw== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-basic-styles@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-35.2.1.tgz#77f0e78df233348b89ed4fae58beb892a12be3b8" - integrity sha512-Z2qeofjPWTV44fsTcAxXGFA2u0tH0f6NtVasBaU/WvsQgc37v8mnwGviyqaPL+LQ7DRorii0jTPzccj8ep8ICQ== +"@ckeditor/ckeditor5-basic-styles@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-basic-styles/-/ckeditor5-basic-styles-35.3.0.tgz#f6424ac51b1b1399fff385d65cf31c72487d1756" + integrity sha512-tEqD61vcU33XOt+KaRE6qZqNaG4VN8O7vgEx4sA6OOgx+bFu6D21Djt8V1WV/+HmQ9ssl5oLmYmP7Or4RrXzgg== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-block-quote@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-block-quote/-/ckeditor5-block-quote-35.2.1.tgz#4040ffbc101eae1b910d361354008e233e0d1652" - integrity sha512-iKIytERhUaHdQ0zLuPk0q9BgZ0RJlTnRhHEAz5dfkZuiJ9uBnPkC/wAYundVcB9vRicJqUxkemJAWm8bTgKaow== +"@ckeditor/ckeditor5-block-quote@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-block-quote/-/ckeditor5-block-quote-35.3.0.tgz#fdf179b0c0dcf37c16170191ecdea457b173fb91" + integrity sha512-iBBTwRJihX0/rj1C9jfrJ9drCYvcuj5q9BZ435z/XR0emQkOsNWq4aayUtKBuZedjn+B0jhNfF7lVTdxgYuRKA== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-clipboard@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-35.2.1.tgz#c5a184f7bfc1d11604ad4e4d2aae36233b844253" - integrity sha512-oHtU4ViXAPwvDKw4QoeQY0v4sdPLvJ4IjCS0MEkGQdspV/osvqPIyxUP2aqISbBPMRA7vz6VTeUqqeVZGH2Hrg== +"@ckeditor/ckeditor5-clipboard@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-clipboard/-/ckeditor5-clipboard-35.3.0.tgz#7a594498d315ae64bcee69e69d6664094623204c" + integrity sha512-4bdMY4FvFSVe3LduZw2nPyoD40tTUl4MxX/iumtuvzt1Vk6fp2CTswbsv7VJaKVmTE79G7a4giI3ijI+SLyDmg== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" - "@ckeditor/ckeditor5-widget" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-engine" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" + "@ckeditor/ckeditor5-widget" "^35.3.0" lodash-es "^4.17.11" -"@ckeditor/ckeditor5-code-block@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-code-block/-/ckeditor5-code-block-35.2.1.tgz#6ca75afee83c9b75b5071c31d3ba565bac84eea7" - integrity sha512-MCjwUVJANE47QxXE3JZN4hVxNASk8rWiCreKnqDe1aS0LRUFKvC3orEBV+qh3AnbtTe+5PfDFgFN6BnV+oBzzg== +"@ckeditor/ckeditor5-code-block@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-code-block/-/ckeditor5-code-block-35.3.0.tgz#5d246453d635f7ee3966453fd402062400ee87a0" + integrity sha512-JT8u64vQSB9G4Ad8lg2FrIx5f929IwQ8mqEu1pJc+Ea9SpJYGtTSJP23PokPtl1Tt20/l6LHW45XmV34JfnPRw== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-core@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-35.2.1.tgz#10f22ae64a82d63e29b3c364f6691d155a44d18f" - integrity sha512-52A/rS3DamiWGPVB3Jd6Z14Hv9yCwcTGdLNWStDyrMjybjXOc7O6xrEiB8v1ySzTaleD4wfZ7vGlq1ZKF2dqDg== +"@ckeditor/ckeditor5-core@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-core/-/ckeditor5-core-35.3.0.tgz#cf595976217af4344d80c7cff3b8191c2a1c1bf2" + integrity sha512-LK6G9tZkGXFeb21fXZTgu1Usq3ICOACPeSW9L7EfDA1hUroXjkTwsq7aPAvi9+0kZfYWO11sG2nxGdRX5gg2XA== dependencies: - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-engine" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-editor-classic@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-35.2.1.tgz#efa9dd3dcb87eb5bfe720f1c65003cb785d7c3c7" - integrity sha512-K1X5dNamkeEBia+luXMWeuweB7G09AVYSgp+yVUfyn/fV1RUu75OhQQ2f2G5e6WCgkWCk8uQV3ChH8eXAykcTA== +"@ckeditor/ckeditor5-editor-classic@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-classic/-/ckeditor5-editor-classic-35.3.0.tgz#ec47b29977e6af1c263d2d9ee0ba1da316c177ed" + integrity sha512-nTlqNL+JtTOCkm60E9TjpB4c7bJFUC12r7ehc32lbgMQKKTY+NhikaRG8rmL/zSi5D9AfLA7JpocvDzxd5wj1Q== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-editor-decoupled@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-decoupled/-/ckeditor5-editor-decoupled-35.2.1.tgz#d247bd8e87b55b30d385951f46960f4d9bdbdfe1" - integrity sha512-i2TlqW27U1ZKNbDl6KAbBq97B+O1VnBkLzkTTJzmoDrEyfsni4Ad2FNP+KCIovxHeoNDUcmgLy0WyGT0whRFoA== +"@ckeditor/ckeditor5-editor-decoupled@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-editor-decoupled/-/ckeditor5-editor-decoupled-35.3.0.tgz#897353f017f3f85b14d5a92079e48971b44f4ecf" + integrity sha512-SIU0/GMClAhhcK+1jhCllamvSC8ql5TFX7BIHQa8wyCp/lbU5LuhzcKkyZp5jnkBOmXwcFXwObXZl/FkbKB6YQ== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-engine@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-35.2.1.tgz#f1374717ab6d01ca5f2b16d3b8be93cce05323fb" - integrity sha512-7cVYYNBm3VJ2jhwgbSnzHBn1tDeRiTQ4X/TI3S7/C+hOCVxsB8bns8GV/AOTuAromrbwpME4QXTY+Z6okcHyLA== +"@ckeditor/ckeditor5-engine@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-engine/-/ckeditor5-engine-35.3.0.tgz#1dcdde6a38970b9642cd5c2e0900fd6eb39c72b9" + integrity sha512-7vQLl66k0mv0UIjwXKmqidyIt5FDabKTOzwES+8hYVvYTW+pVkM5Y72ZHmo0OIVLj1oaQo15sLxlquSjUTbPWA== dependencies: - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-utils" "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-enter@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-35.2.1.tgz#60fd1f54064221d9d2871158f21a91e0afeeeada" - integrity sha512-B336nVuVhG0HO8cymCuJd45yo9W3CZfsAtuaEshAdx9HAHrDMpQZ3FGPH08vhJ3qTjsO9nwXUTmlPpsMnDZSdA== +"@ckeditor/ckeditor5-enter@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-enter/-/ckeditor5-enter-35.3.0.tgz#a84610f6f48206e99c3f5565973e583d9efdacb2" + integrity sha512-bPikoNAoFhN2Nh/NHTq46VQu0n7+pFnYSgRcR/Vlp/1DoXi7L5z1Qrcm/W5WUvwMXEFT2C0llJoaFA0OJv1a1w== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-engine" "^35.3.0" -"@ckeditor/ckeditor5-essentials@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-35.2.1.tgz#d68bf01877331cbe2f2dbcc2e1245e85dd8451a8" - integrity sha512-qU/vVqBuTp+mY/86s31a0Ay2xmMH+GSkzRdeUVfyGDiQZznCjkaKfAwMXtauorgx/C6YXGF/6xYG4C6C7R99Fw== +"@ckeditor/ckeditor5-essentials@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-essentials/-/ckeditor5-essentials-35.3.0.tgz#bbe647e2c18bdd5f24c41075efca2ad650c00bdc" + integrity sha512-wXTssnSQgzcjPLFqqZ1tokwZptz20/UTyD/JPITIm4gj+iVXTw9Ga9ofAc4z5E7+oKplxhPA341sgQv8vSrTNg== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-heading@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-heading/-/ckeditor5-heading-35.2.1.tgz#bf0b02139d251e3e6c583245b5d839b29c04e4fc" - integrity sha512-OkF8mXb62BIcP06uEYs+jBqbMkDU/pRPRfV0jpvwAQslu7mS2FukM1Bknlr7BXldDlWznxISyVP+l1rgcUVCNg== +"@ckeditor/ckeditor5-heading@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-heading/-/ckeditor5-heading-35.3.0.tgz#8ebcac4262a6b96a4e6f2c8e50389e789aae1be8" + integrity sha512-YFJtsax9UV3HmjexOBdhWuxubwPH+RCTC5j0OeCaj1gsGr4DMAJrs2ofmO1Voe9zIbCStoZP6cmIGZZ/ga2QNQ== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-horizontal-line@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-horizontal-line/-/ckeditor5-horizontal-line-35.2.1.tgz#263d06921dbb3b7522e12218f35d38ed2141a32c" - integrity sha512-zB/M0wF/gd8w1ZVyTXifnCSH164dOI05gjZ3coKbKmyX4xcheZcZoqLH/FacNQE8OZCJ06VSMrTlba49ipUPbA== +"@ckeditor/ckeditor5-horizontal-line@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-horizontal-line/-/ckeditor5-horizontal-line-35.3.0.tgz#3de7ec77cea7abcc2d3b8211a5ff22e69f255fd6" + integrity sha512-eNlBZxOLAV5hz0YzG5ozuInCqMVqVKOvFdA30EH8vnwjq3ehfvOYTHsRLJZbBiCw515X+Gy+3Avo1E2aoR6PeQ== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-html-support@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-support/-/ckeditor5-html-support-35.2.1.tgz#c7d4f7537c967adef6291bd4c193a890ac86ed1e" - integrity sha512-AxVm+LDQYGK1vEfRPwoUq7ov3q/Ev9A2/Wi3d2FGe2BbwRqOzRWxog4exWi9qByED3+ltcxhNq7cY2OHYBzFnw== +"@ckeditor/ckeditor5-html-support@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-html-support/-/ckeditor5-html-support-35.3.0.tgz#fe57f289e6666b58694cc58e38a7cfa529346983" + integrity sha512-VPQkMDXMCHJ1G9AW2UzX17AUf03h+KCSyzteZhyb6z7mV542Z+yZ0rG8MnRu12z3vwbKNHScXxPTRW6XAI325Q== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-image@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-image/-/ckeditor5-image-35.2.1.tgz#f41a386759da64f671e0d7385b7d3b59f99e08df" - integrity sha512-8SaB6yhpLHEtn1Kdkh33Dg4HCYsM0Gyj8ptBKXv+QXOPMilU+atrdecbUAiPGLBDLRkfrK62HTWm737ziZ+HIQ== +"@ckeditor/ckeditor5-image@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-image/-/ckeditor5-image-35.3.0.tgz#54f86461c03afad1e47c6b5ebe15eac4fa16c14d" + integrity sha512-9Va5LSh0G7ixGbWSZOofP9zIWJDCNeSJPXHYiiGkAjRARn92Z/wNCa5znWmIiJJxLmOiG/2gqSUNvPyE1LJ0oQ== dependencies: - "@ckeditor/ckeditor5-ui" "^35.2.1" - ckeditor5 "^35.2.1" + "@ckeditor/ckeditor5-ui" "^35.3.0" + ckeditor5 "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-indent@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-indent/-/ckeditor5-indent-35.2.1.tgz#bc7041f5ec35d2babf14875ffbced2fe19f2228e" - integrity sha512-SOj5AJf0GoIaLMIP5YermhvxLyhtqehxGYqJ59AzBzLhVQgfH2tHfpgpRKaZguDkN4NgpALTQFe53GIuBnGCMQ== +"@ckeditor/ckeditor5-indent@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-indent/-/ckeditor5-indent-35.3.0.tgz#d429c12c5ffa8ff39a5056026c8a6e9e984bb1ef" + integrity sha512-rMPD/z4nbfTd4oL07/2D1wVF4GI+maOmgHmVzeqcxCL8w3/7cz4/ShA883YINnVF5yE82TbH+8FE7P2Ok2U0QQ== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-language@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-language/-/ckeditor5-language-35.2.1.tgz#c43096e7d6e55b7d644ba3dda19d476f6aa5e661" - integrity sha512-u12lUK3FhE1IGZMpQRBGPLRqd9GoOrXkJ1+65g8/WuM0xWx0/dcEXiUdsQZNFI1N5lhMStb0xTGlVZfYlTsuoQ== +"@ckeditor/ckeditor5-language@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-language/-/ckeditor5-language-35.3.0.tgz#fdd1ea29b79f922633bb30efc430f2bb3b1ca2fd" + integrity sha512-XCvTNGr+l+ZtZEXQzzgeHqWC5mUzO9xGk0hRP00H9a/EKMN1JttKpfX279wDzPx+ECYrL9oy6lHTPnytJ/mKOw== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-link@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-link/-/ckeditor5-link-35.2.1.tgz#f908a0040280f7ac7d59c742dfb30f1e88145a08" - integrity sha512-eie6C8pYttBeTpXVNSrRUE8LQ091CJVWUOESo0bgjFG9+/1H6lXWcfGy/ZyQiWpEDzaQ+qJrOrWhkiU6TAmxaA== +"@ckeditor/ckeditor5-link@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-link/-/ckeditor5-link-35.3.0.tgz#4bff3e209d51acca8096c5f229f7218f62e91df8" + integrity sha512-2y62z/JZmRADb/5eYcbhWLN6OtKURoL/C1Rn/u0rfDFHPFEC98ZW07uVJnIYN1KyohXqkCg/+8JzB5y03UoWUw== dependencies: - "@ckeditor/ckeditor5-ui" "^35.2.1" - ckeditor5 "^35.2.1" + "@ckeditor/ckeditor5-ui" "^35.3.0" + ckeditor5 "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-list@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-list/-/ckeditor5-list-35.2.1.tgz#46b51bd8e860dd28955efc43b3a082a8d3a97543" - integrity sha512-PtrPItlPwjlqwkH+jC6/Fen1EHzl1HZbs7SKSyZhBlSTX4vMtBSAjz+tzNfYk/6CVtFpNY1vXc3MGXL9fFnXJw== +"@ckeditor/ckeditor5-list@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-list/-/ckeditor5-list-35.3.0.tgz#44175335ddf76d93d35e889d18428803fca5cfa3" + integrity sha512-UFw6AP+EVHuC4Xr5zkcQO9a3ndSD+2FdFr1rSi2V/f2iz+Il1LQPol8lKbRXkR1K5C2Bw7vR6d/1QnNkBSFzgQ== dependencies: - "@ckeditor/ckeditor5-ui" "^35.2.1" - ckeditor5 "^35.2.1" + "@ckeditor/ckeditor5-ui" "^35.3.0" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-paragraph@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-35.2.1.tgz#7dcd314be57a0a995faffdbbf509acceaf6a6829" - integrity sha512-8p1dkwGnrPC/7H6uNmiH8l8KU9GV2DyFA9wR3Sur9/QFupdXJ6ovuchqo00aWb431a6W/PZpOhCYr01KT7/0EA== +"@ckeditor/ckeditor5-paragraph@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paragraph/-/ckeditor5-paragraph-35.3.0.tgz#e7d47db5fc5489562d5f10a48db2f1d03223b578" + integrity sha512-7NRQTbEZvXLOtHRZ+xo3NRm9OCJ50BkhgIw6O4HlvQqlvwu82vx5F/ROmhvFLiCJZX8FdDP9MdBmzgEqRIpmPw== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" -"@ckeditor/ckeditor5-paste-from-office@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paste-from-office/-/ckeditor5-paste-from-office-35.2.1.tgz#58d7a83b730cfb5ab40a4164ada0325787d740f9" - integrity sha512-cpcHNpnm3Pd9eIK8omMPg/u5a0Xq8HWMAwjf7oMC0VvrGAFZ5gOkWBduN31O7lfxMvtollDxt6wM1+cpMCA1sg== +"@ckeditor/ckeditor5-paste-from-office@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-paste-from-office/-/ckeditor5-paste-from-office-35.3.0.tgz#431a4563b827f2d649d6dd3a7b8704134d7f7490" + integrity sha512-JLz6IFMRW1fyrTW8o8WdNJWhrfgD3NEqqi3aLWe47osymHvaTAIce+n2vRP/pDstaMOhiLGolfVg7O39dnEm9w== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-remove-format@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-remove-format/-/ckeditor5-remove-format-35.2.1.tgz#039caec305873d6c89b3e776315ea6a4a5797d43" - integrity sha512-/FPKN5RrSYGumAIumKa9hipdQN1cu+IE05POQzzvIbb6q59FINi4LHNrZdbXQouZh+3a4bgeUpUGdBJGkk3XgA== +"@ckeditor/ckeditor5-remove-format@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-remove-format/-/ckeditor5-remove-format-35.3.0.tgz#c74838793aefb30ff33c00894cbe7c1a0cd1db8e" + integrity sha512-6MYwRbQTEFi88idltnu42ninHtnjiJAbrZfK9aoyJHlFk+Kjdu6rrwPqcK5d9amasIlm/bNkU/J+WU55vFmf0g== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-select-all@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-35.2.1.tgz#28183da6540df51578f42724d181c5fc865c76b7" - integrity sha512-kPiNjFlzqtWUAU27urs1t9PH27evUWz19bUvmvtOUuz/Gb5jIpriacUmcA9YpFyPdX1UWkdhthzvqEx9Poui5A== +"@ckeditor/ckeditor5-select-all@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-select-all/-/ckeditor5-select-all-35.3.0.tgz#8b51296bf151ef38c6088dd08b5a4ccc17ada02b" + integrity sha512-1cjvI1BQ7g8n5TGtMKpcA1TGASxPnIT77BRYuZ89eDIWjxOevrsVtNo1H4dpQYY4cjNnLwtfNY3AprW8aYZQJQ== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" -"@ckeditor/ckeditor5-source-editing@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-source-editing/-/ckeditor5-source-editing-35.2.1.tgz#996b4f35b6087696c7329f02fba2f2bb7e93bce7" - integrity sha512-2hfJAXH9ZiMiP9Tae9CXJddJHWs6U8c3fJJgDx6gJc09Zypvn+TH/g58RSu8Yl3XOiisezVTDF1UyZChn1rg5Q== +"@ckeditor/ckeditor5-source-editing@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-source-editing/-/ckeditor5-source-editing-35.3.0.tgz#6a575b08d981da430ecf586a8cfed509b7b5e972" + integrity sha512-QwE+c/J59evqvBe/INOiQ7kox4xg4QKpGMZDqXFd3jzqsxhlgM0esZVFB8ra1koGcE0QnTebdIWzfmrGnkwwWg== dependencies: - "@ckeditor/ckeditor5-theme-lark" "^35.2.1" - ckeditor5 "^35.2.1" + "@ckeditor/ckeditor5-theme-lark" "^35.3.0" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-special-characters@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-special-characters/-/ckeditor5-special-characters-35.2.1.tgz#3e311f1ef1baacc54f1423133bffbfe69684b59a" - integrity sha512-Q8+IFiSIJ/FgmZtEASvicKUAwZyFOgCcrtS+ku/nisgDAuqJWyZSBYZjWEPghGRI5X9qFvIR3cX7hh9jQ33T1A== +"@ckeditor/ckeditor5-special-characters@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-special-characters/-/ckeditor5-special-characters-35.3.0.tgz#4ac214a0f4a6e3340506dbb30a0572a6e8ab05ba" + integrity sha512-kaJB+touKPQKOEOh1XpcN1Y8Du36kSh2B/z8QEwLXXb23x++ry286kOYDRoijc2xu11PVkspJ8eNjgvgnpbvLw== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-style@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-style/-/ckeditor5-style-35.2.1.tgz#3e5d066048534aed34f0ffd09fc407392fd00255" - integrity sha512-j8jOKzlCBJBUszw+ZyrcKGPS1QfpHtekCc3qVL+uNCwEKVj8Ke5zTE9HvWro7aSmTEO4yPjOtjgc5knhoIERzQ== +"@ckeditor/ckeditor5-style@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-style/-/ckeditor5-style-35.3.0.tgz#022d086c38b869b1913c569b38a028c31a1c8738" + integrity sha512-xsp5gQrGGE7JwsKaqy5qycwmThBEWRfLWZoptRUJSav/fWbDkEY+bdkorozoFUebUYy4KrIfHMmgMoq+oU3YSA== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" -"@ckeditor/ckeditor5-table@~35.2.0": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-table/-/ckeditor5-table-35.2.1.tgz#bed88fa36d3de0e3aa0218ed48bafd3cd4cd6b8e" - integrity sha512-JqpGqRS42CcZz/5nxqR3zk6tK3zhiyax+/J9PeHAi9vlb6T4RTTvxxZh+KFioC/mikxhvYseVhzMYz17Jn/vVQ== +"@ckeditor/ckeditor5-table@~35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-table/-/ckeditor5-table-35.3.0.tgz#a7a9989895aa602c62faf4d1ab5c062c8b804cbe" + integrity sha512-qMCQ4RlrQyedzJGHR2QnHtqxqzHj7wxt8yxz5hmS6tt2vcn6yQKvKE3PMyYTEp6Zz3VUtIw+jCEMPmB0Q23elA== dependencies: - ckeditor5 "^35.2.1" + ckeditor5 "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-theme-lark@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-35.2.1.tgz#f1a32697751102364cce3809fca7ccf7a4ab9cb5" - integrity sha512-W24mTOlY7wmwMf6n9p3cC3ME+xi24nWMImicgwOPXF2cMxUzrNQcQp5jIXEUKZ9F7Ts59Rfg38iBZzk2UX/TpA== +"@ckeditor/ckeditor5-theme-lark@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-theme-lark/-/ckeditor5-theme-lark-35.3.0.tgz#b06e2f48d6b33f9a6f840991fcb2c5e967d3f54b" + integrity sha512-c/ejug43nkE21Qa59qkAOAAUKWi7uBcsEIxBCWNFC24V/bvnbCgeHk7R+fOYgKzQ1tGndFcfN1V50AiIW0YpLA== dependencies: - "@ckeditor/ckeditor5-ui" "^35.2.1" + "@ckeditor/ckeditor5-ui" "^35.3.0" -"@ckeditor/ckeditor5-typing@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-35.2.1.tgz#0b41e19a9b112f1828f183fd8c100c5ce5e55ab5" - integrity sha512-PYzBj9F5f8HpGJEuUxxy9WVsMOZnFi/z9wDF/bJ9aoZw+SkXqKQC1HKz94u70imcPiOIzFKc1HI9VX5yQ77TaA== +"@ckeditor/ckeditor5-typing@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-typing/-/ckeditor5-typing-35.3.0.tgz#143af2516caf3595072bd11debd8762f29696a2b" + integrity sha512-ZY3UHVVq92Z2lVdgKuWbWC0blg+k3i+Np/DE44gDCFPiXPk0Fl2JK0wmtc3HYAvcn1IAgaMYwsEglFO4SHSnNQ== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-engine" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-ui@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-35.2.1.tgz#9ac5b87dc5e78a5e1a9b66a33b208fac0aa92387" - integrity sha512-D1M8Us0Ss97yc1MbjvqjjuOY4v2u7eYXZbqxCwvAp4/RM0uVQWUQR2UbRLyidP2Ea9JWp7VuMTZ8NvpX9UnXUg== +"@ckeditor/ckeditor5-ui@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-ui/-/ckeditor5-ui-35.3.0.tgz#1b61568c02757406dabce21824be816462ac7446" + integrity sha512-8RQJUSdVJTx8/PxHRHU8mbnJCZJ4BblWVDirtvLfzqGn+ECnM8wa1mQM2OvFTjS+rkvhVL2FkdXTw8Qy7oltKA== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" lodash-es "^4.17.15" -"@ckeditor/ckeditor5-undo@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-35.2.1.tgz#03b871e28d894496984e3686d033622cb3b8e85a" - integrity sha512-6nw3BXZU7XcBdeCWK5SI35AwMWu1OI5fGvIQbzuCcuMmicna4DJIwzcCBjY0hODMhxfU3BDLOj9FxSmk4Mju5g== +"@ckeditor/ckeditor5-undo@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-undo/-/ckeditor5-undo-35.3.0.tgz#e26c87db67b19f4ec81d14a62093d6b8eabde9ce" + integrity sha512-Ma423T/zZxlOVLDzKgti+Lfuc+l64UkahAarn2Hph85d4oV+u94NRcLQkwQczk9iQ1fUyC6SL/KpELo1kQWZsA== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-engine" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" -"@ckeditor/ckeditor5-upload@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-35.2.1.tgz#57f11daf399e64cb788e9cb5ff9ee52c8bd6f604" - integrity sha512-FR3yioqHCV/WmRzNnf01bPa28H8O+dfd4ZBZnAEHWNAMK8wBxf3UY2TwMeamTaaGfFoqUBz6004opqXeOUCcng== +"@ckeditor/ckeditor5-upload@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-upload/-/ckeditor5-upload-35.3.0.tgz#d4ba17fd47160451541fbc9bb11386dcec49b48e" + integrity sha512-AniyS3PtO0e47CjLFOlSL97ddxVdM40xgDZ/3QWQfZkUn5oPJeuBu6tRhCDEJHQFk3cPY7mK0TC4ozUu/KSR6Q== dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" -"@ckeditor/ckeditor5-utils@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-35.2.1.tgz#15b17d5c71c673c33754c0597107d3ac88d6d633" - integrity sha512-6sseGcA+am4bfuWybTVsLi1R2DRJE3lyKfAv5+UgSWpZwVWHRE/ZOCGkRrkWjA+0Rfwxx8XdU8KC+l7iq73iwQ== +"@ckeditor/ckeditor5-utils@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-utils/-/ckeditor5-utils-35.3.0.tgz#ee465fc5c97a377e793219790307a4401c68541a" + integrity sha512-kS6CsTbyDlSnWRUytH7c8rCkVRmO5ZXCX+uJIOYpa+CvKoVCECdfHKx3w5PmsYgRvbbnX+kVtaI5e5ujRCknfA== dependencies: lodash-es "^4.17.15" -"@ckeditor/ckeditor5-widget@^35.2.1": - version "35.2.1" - resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-35.2.1.tgz#f9284d7dba3fa37a2476fcdd5eaaf41d7680c1c1" - integrity sha512-DdEr13R7wFZKnSwDDOvdaeU4zjV3BSggx79ApgWh2UH1zZuZeDIEAOoBd59OXGUg3mElAgIe/QH8brA5au+Owg== - dependencies: - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-enter" "^35.2.1" - "@ckeditor/ckeditor5-typing" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" +"@ckeditor/ckeditor5-widget@^35.3.0": + version "35.3.0" + resolved "https://registry.yarnpkg.com/@ckeditor/ckeditor5-widget/-/ckeditor5-widget-35.3.0.tgz#50d3e240f030d7a266f927b59b3c06fc95c4321e" + integrity sha512-KBqEHtrCgb9QOirCJKLUjnMVSiYMq8yGFbczKyZd/XdPFTWo8HuBm0i+A1eONrhIP8pFiTsBgsSizsoII0h5Ww== + dependencies: + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-engine" "^35.3.0" + "@ckeditor/ckeditor5-enter" "^35.3.0" + "@ckeditor/ckeditor5-typing" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" lodash-es "^4.17.15" "@colors/colors@1.5.0": @@ -1465,23 +1464,23 @@ ci-info@3.3.0: resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.3.0.tgz#b4ed1fb6818dea4803a55c623041f9165d2066b2" integrity sha512-riT/3vI5YpVH6/qomlDnJow6TBee2PBKSEpx3O32EGPYbWGIRsIlGRms3Sm74wYE1JMo8RnO04Hb12+v1J5ICw== -ckeditor5@^35.2.1, ckeditor5@~35.2.0: - version "35.2.1" - resolved "https://registry.yarnpkg.com/ckeditor5/-/ckeditor5-35.2.1.tgz#38f9169f9bd871cf15d99983aaf62d7213ee77dc" - integrity sha512-AoYaw5ud6M+mDkyu4RYo0YkhJt92hQtyWe9j0ByrLr2XslDDIgzf5x3XZK0FE3ouJQpk5fm6y7qN4kfeaFEJwg== - dependencies: - "@ckeditor/ckeditor5-clipboard" "^35.2.1" - "@ckeditor/ckeditor5-core" "^35.2.1" - "@ckeditor/ckeditor5-engine" "^35.2.1" - "@ckeditor/ckeditor5-enter" "^35.2.1" - "@ckeditor/ckeditor5-paragraph" "^35.2.1" - "@ckeditor/ckeditor5-select-all" "^35.2.1" - "@ckeditor/ckeditor5-typing" "^35.2.1" - "@ckeditor/ckeditor5-ui" "^35.2.1" - "@ckeditor/ckeditor5-undo" "^35.2.1" - "@ckeditor/ckeditor5-upload" "^35.2.1" - "@ckeditor/ckeditor5-utils" "^35.2.1" - "@ckeditor/ckeditor5-widget" "^35.2.1" +ckeditor5@^35.3.0, ckeditor5@~35.3.0: + version "35.3.0" + resolved "https://registry.yarnpkg.com/ckeditor5/-/ckeditor5-35.3.0.tgz#957b717217c524d32f9f18e6e0df5128d0e8b25b" + integrity sha512-37/BmyZbBG29PZuZIhnQ6ju6LEPuD0ptNjXQzxTwkcUBS9cSaDN4r3p+xVdXrOYIF5mKUZrSGKA0/wyo0j6p0w== + dependencies: + "@ckeditor/ckeditor5-clipboard" "^35.3.0" + "@ckeditor/ckeditor5-core" "^35.3.0" + "@ckeditor/ckeditor5-engine" "^35.3.0" + "@ckeditor/ckeditor5-enter" "^35.3.0" + "@ckeditor/ckeditor5-paragraph" "^35.3.0" + "@ckeditor/ckeditor5-select-all" "^35.3.0" + "@ckeditor/ckeditor5-typing" "^35.3.0" + "@ckeditor/ckeditor5-ui" "^35.3.0" + "@ckeditor/ckeditor5-undo" "^35.3.0" + "@ckeditor/ckeditor5-upload" "^35.3.0" + "@ckeditor/ckeditor5-utils" "^35.3.0" + "@ckeditor/ckeditor5-widget" "^35.3.0" clean-stack@^2.0.0: version "2.2.0"