(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{"+s0g":function(e,n,t){!function(e){"use strict";var n="jan._feb._mrt._apr._mei_jun._jul._aug._sep._okt._nov._dec.".split("_"),t="jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec".split("_"),l=[/^jan/i,/^feb/i,/^maart|mrt.?$/i,/^apr/i,/^mei$/i,/^jun[i.]?$/i,/^jul[i.]?$/i,/^aug/i,/^sep/i,/^okt/i,/^nov/i,/^dec/i],i=/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december|jan\.?|feb\.?|mrt\.?|apr\.?|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i;e.defineLocale("nl",{months:"januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december".split("_"),monthsShort:function(e,l){return e?/-MMM-/.test(l)?t[e.month()]:n[e.month()]:n},monthsRegex:i,monthsShortRegex:i,monthsStrictRegex:/^(januari|februari|maart|april|mei|ju[nl]i|augustus|september|oktober|november|december)/i,monthsShortStrictRegex:/^(jan\.?|feb\.?|mrt\.?|apr\.?|mei|ju[nl]\.?|aug\.?|sep\.?|okt\.?|nov\.?|dec\.?)/i,monthsParse:l,longMonthsParse:l,shortMonthsParse:l,weekdays:"zondag_maandag_dinsdag_woensdag_donderdag_vrijdag_zaterdag".split("_"),weekdaysShort:"zo._ma._di._wo._do._vr._za.".split("_"),weekdaysMin:"zo_ma_di_wo_do_vr_za".split("_"),weekdaysParseExact:!0,longDateFormat:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD-MM-YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},calendar:{sameDay:"[vandaag om] LT",nextDay:"[morgen om] LT",nextWeek:"dddd [om] LT",lastDay:"[gisteren om] LT",lastWeek:"[afgelopen] dddd [om] LT",sameElse:"L"},relativeTime:{future:"over %s",past:"%s geleden",s:"een paar seconden",ss:"%d seconden",m:"\xe9\xe9n minuut",mm:"%d minuten",h:"\xe9\xe9n uur",hh:"%d uur",d:"\xe9\xe9n dag",dd:"%d dagen",w:"\xe9\xe9n week",ww:"%d weken",M:"\xe9\xe9n maand",MM:"%d maanden",y:"\xe9\xe9n jaar",yy:"%d jaar"},dayOfMonthOrdinalParse:/\d{1,2}(ste|de)/,ordinal:function(e){return e+(1===e||8===e||e>=20?"ste":"de")},week:{dow:1,doy:4}})}(t("wd/R"))},"+z1p":function(e,n,t){var l;(l=window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={})).en=Object.assign(l.en||{},{a:"Cannot upload file:",b:"Image toolbar",c:"Table toolbar",d:"Bold",e:"Insert image or file",f:"Choose heading",g:"Heading",h:"Full size image",i:"Side image",j:"Left aligned image",k:"Centered image",l:"Right aligned image",m:"image widget",n:"Block quote",o:"Numbered List",p:"Bulleted List",q:"Increase indent",r:"Decrease indent",s:"Insert image",t:"Insert table",u:"Header column",v:"Insert column left",w:"Insert column right",x:"Delete column",y:"Column",z:"Header row",aa:"Insert row below",ab:"Insert row above",ac:"Delete row",ad:"Row",ae:"Merge cell up",af:"Merge cell right",ag:"Merge cell down",ah:"Merge cell left",ai:"Split cell vertically",aj:"Split cell horizontally",ak:"Merge cells",al:"Italic",am:"Insert media",an:"The URL must not be empty.",ao:"This media URL is not supported.",ap:"media widget",aq:"Upload failed",ar:"Enter image caption",as:"Link",at:"Could not obtain resized image URL.",au:"Selecting resized image failed",av:"Could not insert image at the current position.",aw:"Inserting image failed",ax:"Widget toolbar",ay:"Upload in progress",az:"Open in a new tab",ba:"Downloadable",bb:"Unlink",bc:"Edit link",bd:"Open link in new tab",be:"This link has no URL",bf:"Save",bg:"Cancel",bh:"Link URL",bi:"Rich Text Editor",bj:"Undo",bk:"Redo",bl:"%0 of %1",bm:"Previous",bn:"Next",bo:"Editor toolbar",bp:"Show more items",bq:"Dropdown toolbar",br:"Paste the media URL in the input.",bs:"Tip: Paste the URL into the content to embed faster.",bt:"Media URL",bu:"Rich Text Editor, %0",bv:"Change image text alternative",bw:"Paragraph",bx:"Heading 1",by:"Heading 2",bz:"Heading 3",ca:"Heading 4",cb:"Heading 5",cc:"Heading 6",cd:"Text alternative"}),window,e.exports=function(e){var n={};function t(l){if(n[l])return n[l].exports;var i=n[l]={i:l,l:!1,exports:{}};return e[l].call(i.exports,i,i.exports,t),i.l=!0,i.exports}return t.m=e,t.c=n,t.d=function(e,n,l){t.o(e,n)||Object.defineProperty(e,n,{enumerable:!0,get:l})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,n){if(1&n&&(e=t(e)),8&n)return e;if(4&n&&"object"==typeof e&&e&&e.__esModule)return e;var l=Object.create(null);if(t.r(l),Object.defineProperty(l,"default",{enumerable:!0,value:e}),2&n&&"string"!=typeof e)for(var i in e)t.d(l,i,(function(n){return e[n]}).bind(null,i));return l},t.n=function(e){var n=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(n,"a",n),n},t.o=function(e,n){return Object.prototype.hasOwnProperty.call(e,n)},t.p="",t(t.s=91)}([function(e,n,t){"use strict";t.d(n,"b",(function(){return l})),t.d(n,"a",(function(){return i}));class l extends Error{constructor(e,n,t){e=i(e),t&&(e+=" "+JSON.stringify(t)),super(e),this.name="CKEditorError",this.context=n,this.data=t}is(e){return"CKEditorError"===e}static rethrowUnexpectedError(e,n){if(e.is&&e.is("CKEditorError"))throw e;throw new l("unexpected-error",n,{originalError:{message:e.message,stack:e.stack,name:e.name}})}}function i(e){const n=e.match(/^([^:]+):/);return n?e+` Read more: https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html#error-${n[1]}\n`:e}},function(e,n,t){"use strict";var l={},i=function(){var e;return function(){return void 0===e&&(e=Boolean(window&&document&&document.all&&!window.atob)),e}}(),o=function(){var e={};return function(n){if(void 0===e[n]){var t=document.querySelector(n);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[n]=t}return e[n]}}();function r(e,n){for(var t=[],l={},i=0;i:first-child{margin-top:var(--ck-spacing-large)}.ck.ck-editor__editable_inline>:last-child{margin-bottom:var(--ck-spacing-large)}.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)}"},function(e,n,t){var l=t(21);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(e,n,t){var l=t(23);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:var(--ck-z-modal);position:fixed;top:0}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck.ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:var(--ck-drop-shadow),0 0;border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}"},function(e,n,t){var l=t(25);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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-button.ck-dropdown__button.ck-on .ck-tooltip{display:none}.ck.ck-dropdown .ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:var(--ck-z-modal);position:absolute}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel-visible{display:inline-block;will-change:transform}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_ne,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_nw{bottom:100%}.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_se,.ck.ck-dropdown .ck-dropdown__panel.ck-dropdown__panel_sw{transform:translate3d(0,100%,0)}.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}:root{--ck-dropdown-arrow-size:calc(0.5*var(--ck-icon-size))}.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{right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}[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-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-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:0}.ck.ck-dropdown__panel{background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}"},function(e,n,t){var l=t(27);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-icon{vertical-align:middle}:root{--ck-icon-size:calc(var(--ck-line-height-base)*var(--ck-font-size-normal))}.ck.ck-icon{width:var(--ck-icon-size);height:var(--ck-icon-size);font-size:.8333350694em;will-change:transform}.ck.ck-icon,.ck.ck-icon *{color:inherit;cursor:inherit}.ck.ck-icon :not([fill]){fill:currentColor}"},function(e,n,t){var l=t(29);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck-tooltip .ck-tooltip__text{display:inline-block}.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0}.ck.ck-tooltip.ck-tooltip_s{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(100%)}.ck.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:var(--ck-color-tooltip-background);border-right-color:transparent;border-top-color:transparent;border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:var(--ck-tooltip-arrow-size);border-right-width:var(--ck-tooltip-arrow-size);border-top-width:0}.ck.ck-tooltip.ck-tooltip_n{top:calc(-1*var(--ck-tooltip-arrow-size));transform:translateY(-100%)}.ck.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:calc(-1*var(--ck-tooltip-arrow-size));transform:translateX(-50%);border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent;border-top-color:var(--ck-color-tooltip-background);border-left-width:var(--ck-tooltip-arrow-size);border-bottom-width:0;border-right-width:var(--ck-tooltip-arrow-size);border-top-width:var(--ck-tooltip-arrow-size)}.ck.ck-tooltip .ck-tooltip__text{border-radius:0}.ck-rounded-corners .ck.ck-tooltip .ck-tooltip__text,.ck.ck-tooltip .ck-tooltip__text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-tooltip .ck-tooltip__text{font-size:.9em;line-height:1.5;color:var(--ck-color-tooltip-text);padding:var(--ck-spacing-small) var(--ck-spacing-medium);background:var(--ck-color-tooltip-background);position:relative;left:-50%}.ck.ck-tooltip .ck-tooltip__text:after{border-style:solid;left:50%}.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}'},function(e,n,t){var l=t(31);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-button,a.ck.ck-button{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:block}@media (hover:none){.ck.ck-button .ck-tooltip,a.ck.ck-button .ck-tooltip{display:none}}.ck.ck-button,a.ck.ck-button{position:relative;display:inline-flex;align-items:center;justify-content:left}.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:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button .ck-button__label,.ck.ck-button:focus:not(:hover) .ck-tooltip,a.ck.ck-button .ck-button__label,a.ck.ck-button:focus:not(:hover) .ck-tooltip{display:none}.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);box-shadow:inset 0 2px 2px var(--ck-color-button-default-active-shadow)}.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{white-space:nowrap;cursor:default;vertical-align:middle;padding:var(--ck-spacing-tiny);text-align:center;min-width:var(--ck-ui-component-min-height);min-height:var(--ck-ui-component-min-height);line-height:1;font-size:inherit;border:1px solid transparent;transition:box-shadow .2s ease-in-out;-webkit-appearance:none}.ck.ck-button:active,.ck.ck-button:focus,a.ck.ck-button:active,a.ck.ck-button:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),0 0;border-color:transparent}.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,a.ck.ck-button.ck-disabled .ck-button__icon{opacity:var(--ck-disabled-opacity)}.ck.ck-button.ck-disabled .ck-button__label,a.ck.ck-button.ck-disabled .ck-button__label{opacity:var(--ck-disabled-opacity)}.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(-1*var(--ck-spacing-small));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-right:calc(-1*var(--ck-spacing-small));margin-left:var(--ck-spacing-small)}.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);box-shadow:inset 0 2px 2px var(--ck-color-button-on-active-shadow)}.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-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 .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{font-size:inherit;font-weight:inherit;color:inherit;cursor: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-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);box-shadow:inset 0 2px 2px var(--ck-color-button-action-active-shadow)}.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}"},function(e,n,t){var l=t(33);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-direction:column}.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{list-style-type:none;background:var(--ck-color-list-background)}.ck.ck-list__item{cursor:default;min-width:12em}.ck.ck-list__item .ck-button{min-height:unset;width:100%;text-align:left;border-radius:0;border:0;padding:calc(0.2*var(--ck-line-height-base)*var(--ck-font-size-base)) calc(0.4*var(--ck-line-height-base)*var(--ck-font-size-base))}.ck.ck-list__item .ck-button .ck-button__label{line-height:calc(1.2*var(--ck-line-height-base)*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:hover:not(ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:active{box-shadow:none}.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{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(e,n,t){var l=t(35);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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:1.0769230769em;--ck-switch-button-toggle-spacing:1px;--ck-switch-button-translation:1.3846153847em}[dir=ltr] .ck.ck-button.ck-switchbutton .ck-button__label{margin-right:calc(2*var(--ck-spacing-large))}[dir=rtl] .ck.ck-button.ck-switchbutton .ck-button__label{margin-left:calc(2*var(--ck-spacing-large))}.ck.ck-button.ck-switchbutton.ck-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.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{transition:background .4s ease;width:var(--ck-switch-button-toggle-width);background:var(--ck-color-switch-button-off-background)}.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:0 0 0 5px var(--ck-color-switch-button-inner-shadow)}.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(0.5*var(--ck-border-radius))}.ck.ck-button.ck-switchbutton .ck-button__toggle .ck-button__toggle__inner{margin:var(--ck-switch-button-toggle-spacing);width:var(--ck-switch-button-toggle-inner-size);height:var(--ck-switch-button-toggle-inner-size);background:var(--ck-color-switch-button-inner-background);transition:all .3s ease}.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(-1*var(--ck-switch-button-translation)))}"},function(e,n,t){var l=t(37);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-toolbar-dropdown .ck.ck-toolbar .ck.ck-toolbar__items{flex-wrap:nowrap}.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}"},function(e,n,t){var l=t(39);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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-top-left-radius:0;border-bottom-left-radius:0;border-bottom-right-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}"},function(e,n,t){var l=t(41);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-toolbar{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none;display:flex;flex-flow:row nowrap;align-items:center}.ck.ck-toolbar>.ck-toolbar__items{display:flex;flex-flow:row wrap;align-items:center;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_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);padding:0 var(--ck-spacing-small);border:1px solid var(--ck-color-toolbar-border)}.ck.ck-toolbar>.ck-toolbar__items>*{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small);margin-right:var(--ck-spacing-small)}.ck.ck-toolbar.ck-toolbar_vertical{padding:0}.ck.ck-toolbar.ck-toolbar_vertical>.ck-toolbar__items>.ck{width:100%;margin:0;border-radius:0;border:0}.ck.ck-toolbar>.ck-toolbar__items>*,.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck.ck-toolbar .ck.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;margin-top:0;margin-bottom:0;background:var(--ck-color-toolbar-border)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__grouped-dropdown,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{padding-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__items>:last-child,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__items>:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items,[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__grouped-dropdown,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown{padding-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__items>*,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__items>*{margin-left:var(--ck-spacing-small);margin-right:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__items>:last-child,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__items>:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items,[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items{margin-left:var(--ck-spacing-small)}"},function(e,n,t){var l=t(43);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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)}"},function(e,n,t){var l=t(45);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck-content blockquote{overflow:hidden;padding-right:1.5em;padding-left:1.5em;margin-left:0;margin-right:0;font-style:italic;border-left:5px solid #ccc}.ck-content[dir=rtl] blockquote{border-left:0;border-right:5px solid #ccc}"},function(e,n,t){var l=t(47);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}"},function(e,n,t){var l=t(49);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=":root{--ck-color-resizer:var(--ck-color-focus-border);--ck-resizer-size:10px;--ck-resizer-border-width:1px;--ck-resizer-border-radius:2px;--ck-resizer-offset:calc(var(--ck-resizer-size)/-2 - 2px);--ck-resizer-tooltip-offset:10px;--ck-color-resizer-tooltip-background:#262626;--ck-color-resizer-tooltip-text:#f2f2f2}.ck .ck-widget.ck-widget_with-selection-handle{position:relative}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.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{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);color:var(--ck-color-resizer-tooltip-text);border:1px solid var(--ck-color-resizer-tooltip-text);border-radius:var(--ck-resizer-border-radius);font-size:var(--ck-font-size-tiny);display:block;padding:var(--ck-spacing-small)}.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{top:var(--ck-resizer-tooltip-offset);left:var(--ck-resizer-tooltip-offset)}.ck .ck-size-view.ck-orientation-top-right{top:var(--ck-resizer-tooltip-offset);right: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)}: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-width:var(--ck-widget-outline-thickness);outline-style:solid;outline-color:transparent;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{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-inner-shadow),0 0;background-color:var(--ck-color-widget-editable-focus-background)}.ck-editor__editable>.ck-widget.ck-widget_with-selection-handle:first-child,.ck-editor__editable blockquote>.ck-widget.ck-widget_with-selection-handle:first-child{margin-top:calc(1em + var(--ck-widget-handler-icon-size))}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle{padding:4px;box-sizing:border-box;background-color:transparent;opacity:0;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);border-radius:var(--ck-border-radius) var(--ck-border-radius) 0 0;transform:translateY(-100%);left:calc(0px - var(--ck-widget-outline-thickness))}.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 .ck-widget__selection-handle .ck-icon{width:var(--ck-widget-handler-icon-size);height:var(--ck-widget-handler-icon-size);color:var(--ck-color-widget-drag-handler-icon-color)}.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_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-focus-border)}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator,.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected:hover .ck-widget__selection-handle .ck-icon .ck-icon__selected-indicator{opacity:1}.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{opacity:1;background-color:var(--ck-color-widget-hover-border)}.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-editor__editable.ck-blurred .ck-widget.ck-widget_selected,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover{outline-color:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected .ck-widget__selection-handle:hover,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover .ck-widget__selection-handle:hover{background:var(--ck-color-widget-blurred-border)}.ck-editor__editable.ck-read-only .ck-widget{--ck-widget-outline-thickness:0}"},function(e,n,t){var l=t(51);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-labeled-input .ck-labeled-input__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-input .ck-labeled-input__status_error{color:var(--ck-color-base-error)}"},function(e,n,t){var l=t(53);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=":root{--ck-input-text-width:18em}.ck.ck-input-text{border-radius:0}.ck-rounded-corners .ck.ck-input-text,.ck.ck-input-text.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-text{box-shadow:var(--ck-inner-shadow),0 0;background:var(--ck-color-input-background);border:1px solid var(--ck-color-input-border);padding:var(--ck-spacing-extra-tiny) var(--ck-spacing-medium);min-width:var(--ck-input-text-width);min-height:var(--ck-ui-component-min-height);transition-property:box-shadow,border;transition:.2s ease-in-out}.ck.ck-input-text:focus{outline:none;border:var(--ck-focus-ring);box-shadow:var(--ck-focus-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text[readonly]{border:1px solid var(--ck-color-input-disabled-border);background:var(--ck-color-input-disabled-background);color:var(--ck-color-input-disabled-text)}.ck.ck-input-text[readonly]:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),var(--ck-inner-shadow)}.ck.ck-input-text.ck-error{border-color:var(--ck-color-input-error-border);animation:ck-text-input-shake .3s ease both}.ck.ck-input-text.ck-error:focus{box-shadow:var(--ck-focus-error-outer-shadow),var(--ck-inner-shadow)}@keyframes ck-text-input-shake{20%{transform:translateX(-2px)}40%{transform:translateX(2px)}60%{transform:translateX(-1px)}80%{transform:translateX(1px)}}"},function(e,n,t){var l=t(55);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-text-alternative-form{display:flex;flex-direction:row;flex-wrap:nowrap}.ck.ck-text-alternative-form .ck-labeled-input{display:inline-block}.ck.ck-text-alternative-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-text-alternative-form{flex-wrap:wrap}.ck.ck-text-alternative-form .ck-labeled-input{flex-basis:100%}.ck.ck-text-alternative-form .ck-button{flex-basis:50%}}.ck.ck-text-alternative-form{padding:var(--ck-spacing-standard)}.ck.ck-text-alternative-form:focus{outline:none}[dir=ltr] .ck.ck-text-alternative-form>:not(:first-child),[dir=rtl] .ck.ck-text-alternative-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-text-alternative-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-text-alternative-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-text-alternative-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-text-alternative-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-text-alternative-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-text-alternative-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-text-alternative-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,n,t){var l=t(57);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=':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-arrow-offset:2px;--ck-balloon-arrow-height:10px;--ck-balloon-arrow-half-width:8px}.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{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border)}.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:var(--ck-balloon-arrow-height);border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:0}.ck.ck-balloon-panel[class*=arrow_n]:before{border-bottom-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_n]:after,.ck.ck-balloon-panel[class*=arrow_n]:before{border-left-color:transparent;border-right-color:transparent;border-top-color:transparent}.ck.ck-balloon-panel[class*=arrow_n]:after{border-bottom-color:var(--ck-color-panel-background);margin-top:var(--ck-balloon-arrow-offset)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-width:var(--ck-balloon-arrow-half-width);border-bottom-width:0;border-right-width:var(--ck-balloon-arrow-half-width);border-top-width:var(--ck-balloon-arrow-height)}.ck.ck-balloon-panel[class*=arrow_s]:before{border-top-color:var(--ck-color-panel-border)}.ck.ck-balloon-panel[class*=arrow_s]:after,.ck.ck-balloon-panel[class*=arrow_s]:before{border-left-color:transparent;border-bottom-color:transparent;border-right-color:transparent}.ck.ck-balloon-panel[class*=arrow_s]:after{border-top-color:var(--ck-color-panel-background);margin-bottom:var(--ck-balloon-arrow-offset)}.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(-1*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{right:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:calc(-1*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}'},function(e,n,t){var l=t(59);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck .ck-balloon-rotator__navigation{display:flex;align-items:center;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-right:var(--ck-spacing-small);margin-top:var(--ck-spacing-small);margin-bottom:var(--ck-spacing-small)}.ck .ck-balloon-rotator__navigation .ck-balloon-rotator__counter{margin-right:var(--ck-spacing-standard);margin-left:var(--ck-spacing-small)}.ck .ck-balloon-rotator__content .ck.ck-annotation-wrapper{box-shadow:none}"},function(e,n,t){var l=t(61);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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{box-shadow:var(--ck-drop-shadow),0 0;min-height:15px;background:var(--ck-color-panel-background);border:1px solid var(--ck-color-panel-border);border-radius:var(--ck-border-radius);width:100%;height: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}"},function(e,n,t){var l=t(63);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck-content .image{display:table;clear:both;text-align:center;margin:1em auto}.ck-content .image>img{display:block;margin:0 auto;max-width:100%;min-width:50px}"},function(e,n,t){var l=t(65);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-editor__editable .image{position:relative}.ck.ck-editor__editable .image .ck-progress-bar{position:absolute;top:0;left:0}.ck.ck-editor__editable .image.ck-appear{animation:fadeIn .7s}.ck.ck-editor__editable .image .ck-progress-bar{height:2px;width:0;background:var(--ck-color-upload-bar-background);transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}"},function(e,n,t){var l=t(67);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports='.ck-image-upload-complete-icon{display:block;position:absolute;top:10px;right:10px;border-radius:50%}.ck-image-upload-complete-icon:after{content:"";position:absolute}:root{--ck-color-image-upload-icon:#fff;--ck-color-image-upload-icon-background:#008a00;--ck-image-upload-icon-size:20px;--ck-image-upload-icon-width:2px}.ck-image-upload-complete-icon{width:var(--ck-image-upload-icon-size);height:var(--ck-image-upload-icon-size);opacity:0;background:var(--ck-color-image-upload-icon-background);animation-name:ck-upload-complete-icon-show,ck-upload-complete-icon-hide;animation-fill-mode:forwards,forwards;animation-duration:.5s,.5s;font-size:var(--ck-image-upload-icon-size);animation-delay:0ms,3s}.ck-image-upload-complete-icon:after{left:25%;top:50%;opacity:0;height:0;width:0;transform:scaleX(-1) rotate(135deg);transform-origin:left top;border-top:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);border-right:var(--ck-image-upload-icon-width) solid var(--ck-color-image-upload-icon);animation-name:ck-upload-complete-icon-check;animation-duration:.5s;animation-delay:.5s;animation-fill-mode:forwards;box-sizing:border-box}@keyframes ck-upload-complete-icon-show{0%{opacity:0}to{opacity:1}}@keyframes ck-upload-complete-icon-hide{0%{opacity:1}to{opacity:0}}@keyframes ck-upload-complete-icon-check{0%{opacity:1;width:0;height:0}33%{width:.3em;height:0}to{opacity:1;width:.3em;height:.45em}}'},function(e,n,t){var l=t(69);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports='.ck .ck-upload-placeholder-loader{position:absolute;display:flex;align-items:center;justify-content:center;top:0;left:0}.ck .ck-upload-placeholder-loader:before{content:"";position:relative}:root{--ck-color-upload-placeholder-loader:#b3b3b3;--ck-upload-placeholder-loader-size:32px}.ck .ck-image-upload-placeholder{width:100%;margin:0}.ck .ck-upload-placeholder-loader{width:100%;height:100%}.ck .ck-upload-placeholder-loader:before{width:var(--ck-upload-placeholder-loader-size);height:var(--ck-upload-placeholder-loader-size);border-radius:50%;border-top:3px solid var(--ck-color-upload-placeholder-loader);border-right:2px solid transparent;animation:ck-upload-placeholder-loader 1s linear infinite}@keyframes ck-upload-placeholder-loader{to{transform:rotate(1turn)}}'},function(e,n){e.exports=".ck.ck-heading_heading1{font-size:20px}.ck.ck-heading_heading2{font-size:17px}.ck.ck-heading_heading3{font-size:14px}.ck[class*=ck-heading_heading]{font-weight:700}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}.ck.ck-dropdown.ck-heading-dropdown .ck-dropdown__panel .ck-list__item{min-width:18em}"},function(e,n,t){var l=t(72);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck-content .image>figcaption{display:table-caption;caption-side:bottom;word-break:break-word;color:#333;background-color:#f7f7f7;padding:.6em;font-size:.75em;outline-offset:-1px}"},function(e,n,t){var l=t(74);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=":root{--ck-image-style-spacing:1.5em}.ck-content .image-style-align-center,.ck-content .image-style-align-left,.ck-content .image-style-align-right,.ck-content .image-style-side{max-width:50%}.ck-content .image-style-side{float:right;margin-left:var(--ck-image-style-spacing)}.ck-content .image-style-align-left{float:left;margin-right:var(--ck-image-style-spacing)}.ck-content .image-style-align-center{margin-left:auto;margin-right:auto}.ck-content .image-style-align-right{float:right;margin-left:var(--ck-image-style-spacing)}"},function(e,n,t){var l=t(76);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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-input{flex-basis:100%}.ck.ck-link-form .ck-button{flex-basis:50%}}.ck.ck-link-form_layout-vertical{display:block}.ck.ck-link-form{padding:var(--ck-spacing-standard)}.ck.ck-link-form:focus{outline:none}[dir=ltr] .ck.ck-link-form>:not(:first-child),[dir=rtl] .ck.ck-link-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-link-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-link-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-link-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-link-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}.ck.ck-link-form_layout-vertical{padding:0;min-width:var(--ck-input-text-width)}.ck.ck-link-form_layout-vertical .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) var(--ck-spacing-small)}.ck.ck-link-form_layout-vertical .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-link-form_layout-vertical .ck-button{padding:var(--ck-spacing-standard);margin:0;border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border);width:50%}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button{margin-left:0}[dir=ltr] .ck.ck-link-form_layout-vertical .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[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-left:0}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton{border:0;width:100%}.ck.ck-link-form_layout-vertical .ck.ck-list .ck-button.ck-switchbutton:hover{background:none}"},function(e,n,t){var l=t(78);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".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{padding:var(--ck-spacing-standard)}.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.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}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label{padding:0 var(--ck-spacing-medium);color:var(--ck-color-link-default);text-overflow:ellipsis;cursor:pointer;max-width:var(--ck-input-text-width);min-width:3em;text-align:center}.ck.ck-link-actions .ck-button.ck-link-actions__preview .ck-button__label:hover{text-decoration:underline}.ck.ck-link-actions:focus{outline:none}[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{padding:0;width:calc(0.8*var(--ck-input-text-width))}.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{min-width:0;max-width:100%}.ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=ltr] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview){margin-left:0}[dir=rtl] .ck.ck-link-actions .ck-button:not(.ck-link-actions__preview):last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,n,t){var l=t(80);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports='.ck-media__wrapper .ck-media__placeholder{display:flex;flex-direction:column;align-items:center}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:block}@media (hover:none){.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-tooltip{display:none}}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url{max-width:100%;position:relative}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url:hover .ck-tooltip{visibility:visible;opacity:1}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{overflow:hidden;display:block}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder__icon *,.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck-media__placeholder__icon *{display:none}.ck-editor__editable:not(.ck-read-only) .ck-media__wrapper>:not(.ck-media__placeholder),.ck-editor__editable:not(.ck-read-only) .ck-widget:not(.ck-widget_selected) .ck-media__placeholder{pointer-events:none}:root{--ck-media-embed-placeholder-icon-size:3em;--ck-color-media-embed-placeholder-url-text:#757575;--ck-color-media-embed-placeholder-url-text-hover:var(--ck-color-base-text)}.ck-media__wrapper{margin:0 auto}.ck-media__wrapper .ck-media__placeholder{padding:calc(3*var(--ck-spacing-standard));background:var(--ck-color-base-foreground)}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon{min-width:var(--ck-media-embed-placeholder-icon-size);height:var(--ck-media-embed-placeholder-icon-size);margin-bottom:var(--ck-spacing-large);background-position:50%;background-size:cover}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__icon .ck-icon{width:100%;height:100%}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text{color:var(--ck-color-media-embed-placeholder-url-text);white-space:nowrap;text-align:center;font-style:italic;text-overflow:ellipsis}.ck-media__wrapper .ck-media__placeholder .ck-media__placeholder__url .ck-media__placeholder__url__text:hover{color:var(--ck-color-media-embed-placeholder-url-text-hover);cursor:pointer;text-decoration:underline}.ck-media__wrapper[data-oembed-url*="open.spotify.com"]{max-width:300px;max-height:380px}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder{background:linear-gradient(90deg,#71c6f4,#0d70a5)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgMCA0MDAgNDAwIj48cGF0aCBkPSJNNDAwIDIwMGMwIDExMC41LTg5LjUgMjAwLTIwMCAyMDBTMCAzMTAuNSAwIDIwMCA4OS41IDAgMjAwIDBzMjAwIDg5LjUgMjAwIDIwMHpNMTYzLjQgMzA1LjVjODguNyAwIDEzNy4yLTczLjUgMTM3LjItMTM3LjIgMC0yLjEgMC00LjItLjEtNi4yIDkuNC02LjggMTcuNi0xNS4zIDI0LjEtMjUtOC42IDMuOC0xNy45IDYuNC0yNy43IDcuNiAxMC02IDE3LjYtMTUuNCAyMS4yLTI2LjctOS4zIDUuNS0xOS42IDkuNS0zMC42IDExLjctOC44LTkuNC0yMS4zLTE1LjItMzUuMi0xNS4yLTI2LjYgMC00OC4yIDIxLjYtNDguMiA0OC4yIDAgMy44LjQgNy41IDEuMyAxMS00MC4xLTItNzUuNi0yMS4yLTk5LjQtNTAuNC00LjEgNy4xLTYuNSAxNS40LTYuNSAyNC4yIDAgMTYuNyA4LjUgMzEuNSAyMS41IDQwLjEtNy45LS4yLTE1LjMtMi40LTIxLjgtNnYuNmMwIDIzLjQgMTYuNiA0Mi44IDM4LjcgNDcuMy00IDEuMS04LjMgMS43LTEyLjcgMS43LTMuMSAwLTYuMS0uMy05LjEtLjkgNi4xIDE5LjIgMjMuOSAzMy4xIDQ1IDMzLjUtMTYuNSAxMi45LTM3LjMgMjAuNi01OS45IDIwLjYtMy45IDAtNy43LS4yLTExLjUtLjcgMjEuMSAxMy44IDQ2LjUgMjEuOCA3My43IDIxLjgiIGZpbGw9IiNmZmYiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text{color:#b8e6ff}.ck-media__wrapper[data-oembed-url*="twitter.com"] .ck.ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="google.com/maps"] .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMDAzLjc4IDEuNjFoNDkuNjIxYzEuNjk0IDAgMy4xOS0uNzk4IDQuMTQ2LTIuMDM3eiIgZmlsbD0iIzVjODhjNSIvPjxwYXRoIGQ9Ik0yMjYuNzQyIDIyMi45ODhjLTkuMjY2IDAtMTYuNzc3IDcuMTctMTYuNzc3IDE2LjAxNC4wMDcgMi43NjIuNjYzIDUuNDc0IDIuMDkzIDcuODc1LjQzLjcwMy44MyAxLjQwOCAxLjE5IDIuMTA3LjMzMy41MDIuNjUgMS4wMDUuOTUgMS41MDguMzQzLjQ3Ny42NzMuOTU3Ljk4OCAxLjQ0IDEuMzEgMS43NjkgMi41IDMuNTAyIDMuNjM3IDUuMTY4Ljc5MyAxLjI3NSAxLjY4MyAyLjY0IDIuNDY2IDMuOTkgMi4zNjMgNC4wOTQgNC4wMDcgOC4wOTIgNC42IDEzLjkxNHYuMDEyYy4xODIuNDEyLjUxNi42NjYuODc5LjY2Ny40MDMtLjAwMS43NjgtLjMxNC45My0uNzk5LjYwMy01Ljc1NiAyLjIzOC05LjcyOSA0LjU4NS0xMy43OTQuNzgyLTEuMzUgMS42NzMtMi43MTUgMi40NjUtMy45OSAxLjEzNy0xLjY2NiAyLjMyOC0zLjQgMy42MzgtNS4xNjkuMzE1LS40ODIuNjQ1LS45NjIuOTg4LTEuNDM5LjMtLjUwMy42MTctMS4wMDYuOTUtMS41MDguMzU5LS43Ljc2LTEuNDA0IDEuMTktMi4xMDcgMS40MjYtMi40MDIgMi01LjExNCAyLjAwNC03Ljg3NSAwLTguODQ0LTcuNTExLTE2LjAxNC0xNi43NzYtMTYuMDE0eiIgZmlsbD0iI2RkNGIzZSIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48ZWxsaXBzZSByeT0iNS41NjQiIHJ4PSI1LjgyOCIgY3k9IjIzOS4wMDIiIGN4PSIyMjYuNzQyIiBmaWxsPSIjODAyZDI3IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0xOTAuMzAxIDIzNy4yODNjLTQuNjcgMC04LjQ1NyAzLjg1My04LjQ1NyA4LjYwNnMzLjc4NiA4LjYwNyA4LjQ1NyA4LjYwN2MzLjA0MyAwIDQuODA2LS45NTggNi4zMzctMi41MTYgMS41My0xLjU1NyAyLjA4Ny0zLjkxMyAyLjA4Ny02LjI5IDAtLjM2Mi0uMDIzLS43MjItLjA2NC0xLjA3OWgtOC4yNTd2My4wNDNoNC44NWMtLjE5Ny43NTktLjUzMSAxLjQ1LTEuMDU4IDEuOTg2LS45NDIuOTU4LTIuMDI4IDEuNTQ4LTMuOTAxIDEuNTQ4LTIuODc2IDAtNS4yMDgtMi4zNzItNS4yMDgtNS4yOTkgMC0yLjkyNiAyLjMzMi01LjI5OSA1LjIwOC01LjI5OSAxLjM5OSAwIDIuNjE4LjQwNyAzLjU4NCAxLjI5M2wyLjM4MS0yLjM4YzAtLjAwMi0uMDAzLS4wMDQtLjAwNC0uMDA1LTEuNTg4LTEuNTI0LTMuNjItMi4yMTUtNS45NTUtMi4yMTV6bTQuNDMgNS42NmwuMDAzLjAwNnYtLjAwM3oiIGZpbGw9IiNmZmYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxNS4xODQgMjUxLjkyOWwtNy45OCA3Ljk3OSAyOC40NzcgMjguNDc1YTUuMjMzIDUuMjMzIDAgMDAuNDQ5LTIuMTIzdi0zMS4xNjVjLS40NjkuNjc1LS45MzQgMS4zNDktMS4zODIgMi4wMDUtLjc5MiAxLjI3NS0xLjY4MiAyLjY0LTIuNDY1IDMuOTktMi4zNDcgNC4wNjUtMy45ODIgOC4wMzgtNC41ODUgMTMuNzk0LS4xNjIuNDg1LS41MjcuNzk4LS45My43OTktLjM2My0uMDAxLS42OTctLjI1NS0uODc5LS42Njd2LS4wMTJjLS41OTMtNS44MjItMi4yMzctOS44Mi00LjYtMTMuOTE0LS43ODMtMS4zNS0xLjY3My0yLjcxNS0yLjQ2Ni0zLjk5LTEuMTM3LTEuNjY2LTIuMzI3LTMuNC0zLjYzNy01LjE2OWwtLjAwMi0uMDAzeiIgZmlsbD0iI2MzYzNjMyIvPjxwYXRoIGQ9Ik0yMTIuOTgzIDI0OC40OTVsLTM2Ljk1MiAzNi45NTN2LjgxMmE1LjIyNyA1LjIyNyAwIDAwNS4yMzggNS4yMzhoMS4wMTVsMzUuNjY2LTM1LjY2NmExMzYuMjc1IDEzNi4yNzUgMCAwMC0yLjc2NC0zLjkgMzcuNTc1IDM3LjU3NSAwIDAwLS45ODktMS40NCAzNS4xMjcgMzUuMTI3IDAgMDAtLjk1LTEuNTA4Yy0uMDgzLS4xNjItLjE3Ni0uMzI2LS4yNjQtLjQ4OXoiIGZpbGw9IiNmZGRjNGYiIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTIxMS45OTggMjYxLjA4M2wtNi4xNTIgNi4xNTEgMjQuMjY0IDI0LjI2NGguNzgxYTUuMjI3IDUuMjI3IDAgMDA1LjIzOS01LjIzOHYtMS4wNDV6IiBmaWxsPSIjZmZmIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjwvZz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder{background:#4268b3}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAyNCIgaGVpZ2h0PSIxMDI0IiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik05NjcuNDg0IDBINTYuNTE3QzI1LjMwNCAwIDAgMjUuMzA0IDAgNTYuNTE3djkxMC45NjZDMCA5OTguNjk0IDI1LjI5NyAxMDI0IDU2LjUyMiAxMDI0SDU0N1Y2MjhINDE0VjQ3M2gxMzNWMzU5LjAyOWMwLTEzMi4yNjIgODAuNzczLTIwNC4yODIgMTk4Ljc1Ni0yMDQuMjgyIDU2LjUxMyAwIDEwNS4wODYgNC4yMDggMTE5LjI0NCA2LjA4OVYyOTlsLTgxLjYxNi4wMzdjLTYzLjk5MyAwLTc2LjM4NCAzMC40OTItNzYuMzg0IDc1LjIzNlY0NzNoMTUzLjQ4N2wtMTkuOTg2IDE1NUg3MDd2Mzk2aDI2MC40ODRjMzEuMjEzIDAgNTYuNTE2LTI1LjMwMyA1Ni41MTYtNTYuNTE2VjU2LjUxNUMxMDI0IDI1LjMwMyA5OTguNjk3IDAgOTY3LjQ4NCAwIiBmaWxsPSIjRkZGRkZFIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiLz48L3N2Zz4=)}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#cdf}.ck-media__wrapper[data-oembed-url*="facebook.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder{background:linear-gradient(-135deg,#1400c8,#b900b4,#f50000)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__icon{background-image:url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTA0IiBoZWlnaHQ9IjUwNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+PGRlZnM+PHBhdGggaWQ9ImEiIGQ9Ik0wIC4xNTloNTAzLjg0MVY1MDMuOTRIMHoiLz48L2RlZnM+PGcgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj48bWFzayBpZD0iYiIgZmlsbD0iI2ZmZiI+PHVzZSB4bGluazpocmVmPSIjYSIvPjwvbWFzaz48cGF0aCBkPSJNMjUxLjkyMS4xNTljLTY4LjQxOCAwLTc2Ljk5Ny4yOS0xMDMuODY3IDEuNTE2LTI2LjgxNCAxLjIyMy00NS4xMjcgNS40ODItNjEuMTUxIDExLjcxLTE2LjU2NiA2LjQzNy0zMC42MTUgMTUuMDUxLTQ0LjYyMSAyOS4wNTYtMTQuMDA1IDE0LjAwNi0yMi42MTkgMjguMDU1LTI5LjA1NiA0NC42MjEtNi4yMjggMTYuMDI0LTEwLjQ4NyAzNC4zMzctMTEuNzEgNjEuMTUxQy4yOSAxNzUuMDgzIDAgMTgzLjY2MiAwIDI1Mi4wOGMwIDY4LjQxNy4yOSA3Ni45OTYgMS41MTYgMTAzLjg2NiAxLjIyMyAyNi44MTQgNS40ODIgNDUuMTI3IDExLjcxIDYxLjE1MSA2LjQzNyAxNi41NjYgMTUuMDUxIDMwLjYxNSAyOS4wNTYgNDQuNjIxIDE0LjAwNiAxNC4wMDUgMjguMDU1IDIyLjYxOSA0NC42MjEgMjkuMDU3IDE2LjAyNCA2LjIyNyAzNC4zMzcgMTAuNDg2IDYxLjE1MSAxMS43MDkgMjYuODcgMS4yMjYgMzUuNDQ5IDEuNTE2IDEwMy44NjcgMS41MTYgNjguNDE3IDAgNzYuOTk2LS4yOSAxMDMuODY2LTEuNTE2IDI2LjgxNC0xLjIyMyA0NS4xMjctNS40ODIgNjEuMTUxLTExLjcwOSAxNi41NjYtNi40MzggMzAuNjE1LTE1LjA1MiA0NC42MjEtMjkuMDU3IDE0LjAwNS0xNC4wMDYgMjIuNjE5LTI4LjA1NSAyOS4wNTctNDQuNjIxIDYuMjI3LTE2LjAyNCAxMC40ODYtMzQuMzM3IDExLjcwOS02MS4xNTEgMS4yMjYtMjYuODcgMS41MTYtMzUuNDQ5IDEuNTE2LTEwMy44NjYgMC02OC40MTgtLjI5LTc2Ljk5Ny0xLjUxNi0xMDMuODY3LTEuMjIzLTI2LjgxNC01LjQ4Mi00NS4xMjctMTEuNzA5LTYxLjE1MS02LjQzOC0xNi41NjYtMTUuMDUyLTMwLjYxNS0yOS4wNTctNDQuNjIxLTE0LjAwNi0xNC4wMDUtMjguMDU1LTIyLjYxOS00NC42MjEtMjkuMDU2LTE2LjAyNC02LjIyOC0zNC4zMzctMTAuNDg3LTYxLjE1MS0xMS43MUMzMjguOTE3LjQ0OSAzMjAuMzM4LjE1OSAyNTEuOTIxLjE1OXptMCA0NS4zOTFjNjcuMjY1IDAgNzUuMjMzLjI1NyAxMDEuNzk3IDEuNDY5IDI0LjU2MiAxLjEyIDM3LjkwMSA1LjIyNCA0Ni43NzggOC42NzQgMTEuNzU5IDQuNTcgMjAuMTUxIDEwLjAyOSAyOC45NjYgMTguODQ1IDguODE2IDguODE1IDE0LjI3NSAxNy4yMDcgMTguODQ1IDI4Ljk2NiAzLjQ1IDguODc3IDcuNTU0IDIyLjIxNiA4LjY3NCA0Ni43NzggMS4yMTIgMjYuNTY0IDEuNDY5IDM0LjUzMiAxLjQ2OSAxMDEuNzk4IDAgNjcuMjY1LS4yNTcgNzUuMjMzLTEuNDY5IDEwMS43OTctMS4xMiAyNC41NjItNS4yMjQgMzcuOTAxLTguNjc0IDQ2Ljc3OC00LjU3IDExLjc1OS0xMC4wMjkgMjAuMTUxLTE4Ljg0NSAyOC45NjYtOC44MTUgOC44MTYtMTcuMjA3IDE0LjI3NS0yOC45NjYgMTguODQ1LTguODc3IDMuNDUtMjIuMjE2IDcuNTU0LTQ2Ljc3OCA4LjY3NC0yNi41NiAxLjIxMi0zNC41MjcgMS40NjktMTAxLjc5NyAxLjQ2OS02Ny4yNzEgMC03NS4yMzctLjI1Ny0xMDEuNzk4LTEuNDY5LTI0LjU2Mi0xLjEyLTM3LjkwMS01LjIyNC00Ni43NzgtOC42NzQtMTEuNzU5LTQuNTctMjAuMTUxLTEwLjAyOS0yOC45NjYtMTguODQ1LTguODE1LTguODE1LTE0LjI3NS0xNy4yMDctMTguODQ1LTI4Ljk2Ni0zLjQ1LTguODc3LTcuNTU0LTIyLjIxNi04LjY3NC00Ni43NzgtMS4yMTItMjYuNTY0LTEuNDY5LTM0LjUzMi0xLjQ2OS0xMDEuNzk3IDAtNjcuMjY2LjI1Ny03NS4yMzQgMS40NjktMTAxLjc5OCAxLjEyLTI0LjU2MiA1LjIyNC0zNy45MDEgOC42NzQtNDYuNzc4IDQuNTctMTEuNzU5IDEwLjAyOS0yMC4xNTEgMTguODQ1LTI4Ljk2NiA4LjgxNS04LjgxNiAxNy4yMDctMTQuMjc1IDI4Ljk2Ni0xOC44NDUgOC44NzctMy40NSAyMi4yMTYtNy41NTQgNDYuNzc4LTguNjc0IDI2LjU2NC0xLjIxMiAzNC41MzItMS40NjkgMTAxLjc5OC0xLjQ2OXoiIGZpbGw9IiNGRkYiIG1hc2s9InVybCgjYikiLz48cGF0aCBkPSJNMjUxLjkyMSAzMzYuMDUzYy00Ni4zNzggMC04My45NzQtMzcuNTk2LTgzLjk3NC04My45NzMgMC00Ni4zNzggMzcuNTk2LTgzLjk3NCA4My45NzQtODMuOTc0IDQ2LjM3NyAwIDgzLjk3MyAzNy41OTYgODMuOTczIDgzLjk3NCAwIDQ2LjM3Ny0zNy41OTYgODMuOTczLTgzLjk3MyA4My45NzN6bTAtMjEzLjMzOGMtNzEuNDQ3IDAtMTI5LjM2NSA1Ny45MTgtMTI5LjM2NSAxMjkuMzY1IDAgNzEuNDQ2IDU3LjkxOCAxMjkuMzY0IDEyOS4zNjUgMTI5LjM2NCA3MS40NDYgMCAxMjkuMzY0LTU3LjkxOCAxMjkuMzY0LTEyOS4zNjQgMC03MS40NDctNTcuOTE4LTEyOS4zNjUtMTI5LjM2NC0xMjkuMzY1ek00MTYuNjI3IDExNy42MDRjMCAxNi42OTYtMTMuNTM1IDMwLjIzLTMwLjIzMSAzMC4yMy0xNi42OTUgMC0zMC4yMy0xMy41MzQtMzAuMjMtMzAuMjMgMC0xNi42OTYgMTMuNTM1LTMwLjIzMSAzMC4yMy0zMC4yMzEgMTYuNjk2IDAgMzAuMjMxIDEzLjUzNSAzMC4yMzEgMzAuMjMxIiBmaWxsPSIjRkZGIi8+PC9nPjwvc3ZnPg==)}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text{color:#ffe0fe}.ck-media__wrapper[data-oembed-url*="instagram.com"] .ck-media__placeholder .ck-media__placeholder__url__text:hover{color:#fff}'},function(e,n,t){var l=t(82);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck.ck-media-form{display:flex;align-items:flex-start;flex-direction:row;flex-wrap:nowrap}.ck.ck-media-form .ck-labeled-input{display:inline-block}.ck.ck-media-form .ck-label{display:none}@media screen and (max-width:600px){.ck.ck-media-form{flex-wrap:wrap}.ck.ck-media-form .ck-labeled-input{flex-basis:100%}.ck.ck-media-form .ck-button{flex-basis:50%}}.ck.ck-media-form{padding:var(--ck-spacing-standard)}.ck.ck-media-form:focus{outline:none}[dir=ltr] .ck.ck-media-form>:not(:first-child),[dir=rtl] .ck.ck-media-form>:not(:last-child){margin-left:var(--ck-spacing-standard)}@media screen and (max-width:600px){.ck.ck-media-form{padding:0;width:calc(0.8*var(--ck-input-text-width))}.ck.ck-media-form .ck-labeled-input{margin:var(--ck-spacing-standard) var(--ck-spacing-standard) 0}.ck.ck-media-form .ck-labeled-input .ck-input-text{min-width:0;width:100%}.ck.ck-media-form .ck-labeled-input .ck-labeled-input__error{white-space:normal}.ck.ck-media-form .ck-button{padding:var(--ck-spacing-standard);margin-top:var(--ck-spacing-standard);border-radius:0;border:0;border-top:1px solid var(--ck-color-base-border)}[dir=ltr] .ck.ck-media-form .ck-button{margin-left:0}[dir=ltr] .ck.ck-media-form .ck-button:first-of-type{border-right:1px solid var(--ck-color-base-border)}[dir=rtl] .ck.ck-media-form .ck-button{margin-left:0}[dir=rtl] .ck.ck-media-form .ck-button:last-of-type{border-right:1px solid var(--ck-color-base-border)}}"},function(e,n,t){var l=t(84);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(e,n,t){var l=t(86);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=":root{--ck-color-table-focused-cell-background:#f5fafe}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(e,n,t){var l=t(88);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=":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-insert-table-dropdown-box-border-color:#bfbfbf;--ck-insert-table-dropdown-box-border-active-color:#53a0e4;--ck-insert-table-dropdown-box-active-background:#c7e5ff}.ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap;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);padding:var(--ck-insert-table-dropdown-padding) var(--ck-insert-table-dropdown-padding) 0}.ck .ck-insert-table-dropdown__label{text-align:center}.ck .ck-insert-table-dropdown-grid-box{width:var(--ck-insert-table-dropdown-box-width);height:var(--ck-insert-table-dropdown-box-height);margin:var(--ck-insert-table-dropdown-box-margin);border:1px solid var(--ck-insert-table-dropdown-box-border-color);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-insert-table-dropdown-box-border-active-color);background:var(--ck-insert-table-dropdown-box-active-background)}"},function(e,n,t){var l=t(90);"string"==typeof l&&(l=[[e.i,l,""]]),t(1)(l,{injectType:"singletonStyleTag",insert:"head",singleton:!0}),l.locals&&(e.exports=l.locals)},function(e,n){e.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border-color:#d9d9d9}.ck-content .table table th{font-weight:700;background:#fafafa}"},function(e,n,t){"use strict";t.r(n);var l=t(3),i=l.a.Symbol,o=Object.prototype,r=o.hasOwnProperty,s=o.toString,u=i?i.toStringTag:void 0,a=Object.prototype.toString,c=i?i.toStringTag:void 0,d=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":c&&c in Object(e)?function(e){var n=r.call(e,u),t=e[u];try{e[u]=void 0;var l=!0}catch(e){}var i=s.call(e);return l&&(n?e[u]=t:delete e[u]),i}(e):function(e){return a.call(e)}(e)},h=function(e,n){return function(t){return e(n(t))}},p=h(Object.getPrototypeOf,Object),f=function(e){return null!=e&&"object"==typeof e},m=Function.prototype.toString,g=Object.prototype.hasOwnProperty,v=m.call(Object),_=function(e){if(!f(e)||"[object Object]"!=d(e))return!1;var n=p(e);if(null===n)return!0;var t=g.call(n,"constructor")&&n.constructor;return"function"==typeof t&&t instanceof t&&m.call(t)==v},y=function(e,n){return e===n||e!=e&&n!=n},b=function(e,n){for(var t=e.length;t--;)if(y(e[t][0],n))return t;return-1},w=Array.prototype.splice;function k(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1},k.prototype.set=function(e,n){var t=this.__data__,l=b(t,e);return l<0?(++this.size,t.push([e,n])):t[l][1]=n,this};var M=k,C=function(e){var n=typeof e;return null!=e&&("object"==n||"function"==n)},x=function(e){if(!C(e))return!1;var n=d(e);return"[object Function]"==n||"[object GeneratorFunction]"==n||"[object AsyncFunction]"==n||"[object Proxy]"==n},D=l.a["__core-js_shared__"],S=function(){var e=/[^.]+$/.exec(D&&D.keys&&D.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}(),T=Function.prototype.toString,L=function(e){if(null!=e){try{return T.call(e)}catch(e){}try{return e+""}catch(e){}}return""},P=/^\[object .+?Constructor\]$/,A=RegExp("^"+Function.prototype.toString.call(Object.prototype.hasOwnProperty).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),I=function(e,n){var t=function(e,n){return null==e?void 0:e[n]}(e,n);return function(e){return!(!C(e)||function(e){return!!S&&S in e}(e))&&(x(e)?A:P).test(L(e))}(t)?t:void 0},E=I(l.a,"Map"),O=I(Object,"create"),j=Object.prototype.hasOwnProperty,Y=Object.prototype.hasOwnProperty;function F(e){var n=-1,t=null==e?0:e.length;for(this.clear();++n-1&&e%1==0&&e-1&&e%1==0&&e<=9007199254740991},oe={};oe["[object Float32Array]"]=oe["[object Float64Array]"]=oe["[object Int8Array]"]=oe["[object Int16Array]"]=oe["[object Int32Array]"]=oe["[object Uint8Array]"]=oe["[object Uint8ClampedArray]"]=oe["[object Uint16Array]"]=oe["[object Uint32Array]"]=!0,oe["[object Arguments]"]=oe["[object Array]"]=oe["[object ArrayBuffer]"]=oe["[object Boolean]"]=oe["[object DataView]"]=oe["[object Date]"]=oe["[object Error]"]=oe["[object Function]"]=oe["[object Map]"]=oe["[object Number]"]=oe["[object Object]"]=oe["[object RegExp]"]=oe["[object Set]"]=oe["[object String]"]=oe["[object WeakMap]"]=!1;var re=function(e){return function(n){return e(n)}},se=t(4),ue=se.a&&se.a.isTypedArray,ae=ue?re(ue):function(e){return f(e)&&ie(e.length)&&!!oe[d(e)]},ce=Object.prototype.hasOwnProperty,de=function(e,n){var t=ee(e),l=!t&&X(e),i=!t&&!l&&Object(ne.a)(e),o=!t&&!l&&!i&&ae(e),r=t||l||i||o,s=r?function(e,n){for(var t=-1,l=Array(e);++t{this._setToTarget(e,l,n[l],t)})}}function un(e){return rn(e)?e:void 0}var an=t(0);class cn{constructor(e,n){this.source=e,this.name=n,this.path=[],this.stop=function e(){e.called=!0},this.off=function e(){e.called=!0}}}function dn(){let e="e";for(let n=0;n<8;n++)e+=Math.floor(65536*(1+Math.random())).toString(16).substring(1);return e}var hn={get(e){return"number"!=typeof e?this[e]||this.normal:e},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};t(6);const pn=Symbol("listeningTo"),fn=Symbol("emitterId");var mn={on(e,n,t={}){this.listenTo(this,e,n,t)},once(e,n,t){let l=!1;this.listenTo(this,e,(function(e,...t){l||(l=!0,e.off(),n.call(this,e,...t))}),t)},off(e,n){this.stopListening(this,e,n)},listenTo(e,n,t,l={}){let i,o;this[pn]||(this[pn]={});const r=this[pn];vn(e)||gn(e);const s=vn(e);(i=r[s])||(i=r[s]={emitter:e,callbacks:{}}),(o=i.callbacks[n])||(o=i.callbacks[n]=[]),o.push(t),function(e,n){const t=_n(e);if(t[n])return;let l=n,i=null;const o=[];for(;""!==l&&!t[l];)t[l]={callbacks:[],childEvents:[]},o.push(t[l]),i&&t[l].childEvents.push(i),i=l,l=l.substr(0,l.lastIndexOf(":"));if(""!==l){for(const e of o)e.callbacks=t[l].callbacks.slice();t[l].childEvents.push(i)}}(e,n);const u=yn(e,n),a=hn.get(l.priority),c={callback:t,priority:a};for(const d of u){let e=!1;for(let n=0;n-1?e(n,t.substr(0,t.lastIndexOf(":"))):null}(this,l);if(t.path.push(this),i){const e=[t,...n];i=Array.from(i);for(let n=0;n{this._delegations||(this._delegations=new Map),e.forEach(e=>{const l=this._delegations.get(e);l?l.set(n,t):this._delegations.set(e,new Map([[n,t]]))})}}},stopDelegating(e,n){if(this._delegations)if(e)if(n){const t=this._delegations.get(e);t&&t.delete(n)}else this._delegations.delete(e);else this._delegations.clear()}};function gn(e,n){e[fn]||(e[fn]=n||dn())}function vn(e){return e[fn]}function _n(e){return e._events||Object.defineProperty(e,"_events",{value:{}}),e._events}function yn(e,n){const t=_n(e)[n];if(!t)return[];let l=[t.callbacks];for(let i=0;i{Object.getOwnPropertyNames(n).concat(Object.getOwnPropertySymbols(n)).forEach(t=>{if(t in e.prototype)return;const l=Object.getOwnPropertyDescriptor(n,t);l.enumerable=!1,Object.defineProperty(e.prototype,t,l)})})}function Mn(e,n){const t=Math.min(e.length,n.length);for(let l=0;le.data.length)throw new an.b("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(t<0||n+t>e.data.length)throw new an.b("view-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(n,n+t),this.offsetInText=n}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}is(e){return"textProxy"==e||"view:textProxy"==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const n=[];let t=e.includeSelf?this.textNode:this.parent;for(;null!==t;)n[e.parentFirst?"push":"unshift"](t),t=t.parent;return n}}function Tn(e){const n=new Map;for(const t in e)n.set(t,e[t]);return n}function Ln(e){return!(!e||!e[Symbol.iterator])}class Pn{constructor(...e){this._patterns=[],this.add(...e)}add(...e){for(let n of e)("string"==typeof n||n instanceof RegExp)&&(n={name:n}),n.classes&&("string"==typeof n.classes||n.classes instanceof RegExp)&&(n.classes=[n.classes]),this._patterns.push(n)}match(...e){for(const n of e)for(const e of this._patterns){const t=An(n,e);if(t)return{element:n,pattern:e,match:t}}return null}matchAll(...e){const n=[];for(const t of e)for(const e of this._patterns){const l=An(t,e);l&&n.push({element:t,pattern:e,match:l})}return n.length>0?n:null}getElementName(){if(1!==this._patterns.length)return null;const e=this._patterns[0],n=e.name;return"function"==typeof e||!n||n instanceof RegExp?null:n}}function An(e,n){if("function"==typeof n)return n(e);const t={};return n.name&&(t.name=function(e,n){return e instanceof RegExp?e.test(n):e===n}(n.name,e.name),!t.name)||n.attributes&&(t.attributes=function(e,n){const t=[];for(const l in e){const i=e[l];if(!n.hasAttribute(l))return null;{const e=n.getAttribute(l);if(!0===i)t.push(l);else if(i instanceof RegExp){if(!i.test(e))return null;t.push(l)}else{if(e!==i)return null;t.push(l)}}}return t}(n.attributes,e),!t.attributes)?null:!(n.classes&&(t.classes=function(e,n){const t=[];for(const l of e)if(l instanceof RegExp){const e=n.getClassNames();for(const n of e)l.test(n)&&t.push(n);if(0===t.length)return null}else{if(!n.hasClass(l))return null;t.push(l)}return t}(n.classes,e),!t.classes))&&!(n.styles&&(t.styles=function(e,n){const t=[];for(const l in e){const i=e[l];if(!n.hasStyle(l))return null;{const e=n.getStyle(l);if(i instanceof RegExp){if(!i.test(e))return null;t.push(l)}else{if(e!==i)return null;t.push(l)}}}return t}(n.styles,e),!t.styles))&&t}class In extends xn{constructor(e,n,t){if(super(),this.name=e,this._attrs=function(e){e=_(e)?Tn(e):new Map(e);for(const[n,t]of e)null===t?e.delete(n):"string"!=typeof t&&e.set(n,String(t));return e}(n),this._children=[],t&&this._insertChild(0,t),this._classes=new Set,this._attrs.has("class")){const e=this._attrs.get("class");On(this._classes,e),this._attrs.delete("class")}this._styles=new Map,this._attrs.has("style")&&(En(this._styles,this._attrs.get("style")),this._attrs.delete("style")),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,n=null){const t=e.replace(/^view:/,"");return n?"element"==t&&n==this.name:"element"==t||t==this.name||super.is(e)}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.size>0&&(yield"style"),yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries(),this._classes.size>0&&(yield["class",this.getAttribute("class")]),this._styles.size>0&&(yield["style",this.getAttribute("style")])}getAttribute(e){if("class"==e)return this._classes.size>0?[...this._classes].join(" "):void 0;if("style"!=e)return this._attrs.get(e);if(this._styles.size>0){let e="";for(const[n,t]of this._styles)e+=`${n}:${t};`;return e}}hasAttribute(e){return"class"==e?this._classes.size>0:"style"==e?this._styles.size>0:this._attrs.has(e)}isSimilar(e){if(!(e instanceof In))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[n,t]of this._attrs)if(!e._attrs.has(n)||e._attrs.get(n)!==t)return!1;for(const n of this._classes)if(!e._classes.has(n))return!1;for(const[n,t]of this._styles)if(!e._styles.has(n)||e._styles.get(n)!==t)return!1;return!0}hasClass(...e){for(const n of e)if(!this._classes.has(n))return!1;return!0}getClassNames(){return this._classes.keys()}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const n of e)if(!this._styles.has(n))return!1;return!0}findAncestor(...e){const n=new Pn(...e);let t=this.parent;for(;t;){if(n.match(t))return t;t=t.parent}return null}getCustomProperty(e){return this._customProperties.get(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(","),n=Array.from(this._styles).map(e=>`${e[0]}:${e[1]}`).sort().join(";"),t=Array.from(this._attrs).map(e=>`${e[0]}="${e[1]}"`).sort().join(" ");return this.name+(""==e?"":` class="${e}"`)+(""==n?"":` style="${n}"`)+(""==t?"":" "+t)}_clone(e=!1){const n=[];if(e)for(const l of this.getChildren())n.push(l._clone(e));const t=new this.constructor(this.name,this._attrs,n);return t._classes=new Set(this._classes),t._styles=new Map(this._styles),t._customProperties=new Map(this._customProperties),t.getFillerOffset=this.getFillerOffset,t}_appendChild(e){return this._insertChild(this.childCount,e)}_insertChild(e,n){this._fireChange("children",this);let t=0;const l=function(e){return"string"==typeof e?[new Dn(e)]:(Ln(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Dn(e):e instanceof Sn?new Dn(e.data):e))}(n);for(const i of l)null!==i.parent&&i._remove(),i.parent=this,this._children.splice(e,0,i),e++,t++;return t}_removeChildren(e,n=1){this._fireChange("children",this);for(let t=e;t0&&(this._classes.clear(),!0):"style"==e?this._styles.size>0&&(this._styles.clear(),!0):this._attrs.delete(e)}_addClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.add(e))}_removeClass(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._classes.delete(e))}_setStyle(e,n){if(this._fireChange("attributes",this),_(e)){const n=Object.keys(e);for(const t of n)this._styles.set(t,e[t])}else this._styles.set(e,n)}_removeStyle(e){this._fireChange("attributes",this),(e=Array.isArray(e)?e:[e]).forEach(e=>this._styles.delete(e))}_setCustomProperty(e,n){this._customProperties.set(e,n)}_removeCustomProperty(e){return this._customProperties.delete(e)}}function En(e,n){let t=null,l=0,i=0,o=null;if(e.clear(),""!==n){";"!=n.charAt(n.length-1)&&(n+=";");for(let r=0;re.add(n))}class jn extends In{constructor(e,n,t){super(e,n,t),this.getFillerOffset=Yn}is(e,n=null){const t=e&&e.replace(/^view:/,"");return n?"containerElement"==t&&n==this.name||super.is(e,n):"containerElement"==t||super.is(e)}}function Yn(){const e=[...this.getChildren()],n=e[this.childCount-1];if(n&&n.is("element","br"))return this.childCount;for(const t of e)if(!t.is("uiElement"))return null;return this.childCount}var Fn=function(e){return e},Nn=function(e,n,t){switch(t.length){case 0:return e.call(n);case 1:return e.call(n,t[0]);case 2:return e.call(n,t[0],t[1]);case 3:return e.call(n,t[0],t[1],t[2])}return e.apply(n,t)},Rn=Math.max,Vn=function(e){return function(){return e}},Hn=Date.now,zn=function(e){var n=0,t=0;return function(){var l=Hn(),i=16-(l-t);if(t=l,i>0){if(++n>=800)return arguments[0]}else n=0;return e.apply(void 0,arguments)}}(U?function(e,n){return U(e,"toString",{configurable:!0,enumerable:!1,value:Vn(n),writable:!0})}:Fn),Bn=function(e){return function(e,n){return zn(function(e,n,t){return n=Rn(void 0===n?e.length-1:n,0),function(){for(var l=arguments,i=-1,o=Rn(l.length-n,0),r=Array(o);++i1?t[i-1]:void 0,r=i>2?t[2]:void 0;for(o=e.length>3&&"function"==typeof o?(i--,o):void 0,r&&function(e,n,t){if(!C(t))return!1;var l=typeof n;return!!("number"==l?ge(t)&&le(n,t.length):"string"==l&&n in t)&&y(t[n],e)}(t[0],t[1],r)&&(o=i<3?void 0:o,i=1),n=Object(n);++l{this.set(n,e[n])},this);Kn(this);const t=this[Un];if(e in this&&!t.has(e))throw new an.b("observable-set-cannot-override: Cannot override an existing property.",this);Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get:()=>t.get(e),set(n){const l=t.get(e);let i=this.fire("set:"+e,e,n,l);void 0===i&&(i=n),l===i&&t.has(e)||(t.set(e,i),this.fire("change:"+e,e,i,l))}}),this[e]=n},bind(...e){if(!e.length||!Zn(e))throw new an.b("observable-bind-wrong-properties: All properties must be strings.",this);if(new Set(e).size!==e.length)throw new an.b("observable-bind-duplicate-properties: Properties must be unique.",this);Kn(this);const n=this[qn];e.forEach(e=>{if(n.has(e))throw new an.b("observable-bind-rebind: Cannot bind the same property more that once.",this)});const t=new Map;return e.forEach(e=>{const l={property:e,to:[]};n.set(e,l),t.set(e,l)}),{to:Jn,toMany:Qn,_observable:this,_bindProperties:e,_to:[],_bindings:t}},unbind(...e){if(!(Un in this))return;const n=this[qn],t=this[Wn];if(e.length){if(!Zn(e))throw new an.b("observable-unbind-wrong-properties: Properties must be strings.",this);e.forEach(e=>{const l=n.get(e);if(!l)return;let i,o,r,s;l.to.forEach(e=>{i=e[0],o=e[1],r=t.get(i),(s=r[o]).delete(l),s.size||delete r[o],Object.keys(r).length||(t.delete(i),this.stopListening(i,"change"))}),n.delete(e)})}else t.forEach((e,n)=>{this.stopListening(n,"change")}),t.clear(),n.clear()},decorate(e){const n=this[e];if(!n)throw new an.b("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:e});this.on(e,(e,t)=>{e.return=n.apply(this,t)}),this[e]=function(...n){return this.fire(e,n)}}};Bn($n,mn);var Gn=$n;function Kn(e){Un in e||(Object.defineProperty(e,Un,{value:new Map}),Object.defineProperty(e,Wn,{value:new Map}),Object.defineProperty(e,qn,{value:new Map}))}function Jn(...e){const n=function(...e){if(!e.length)throw new an.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);const n={to:[]};let t;return"function"==typeof e[e.length-1]&&(n.callback=e.pop()),e.forEach(e=>{if("string"==typeof e)t.properties.push(e);else{if("object"!=typeof e)throw new an.b("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null);t={observable:e,properties:[]},n.to.push(t)}}),n}(...e),t=Array.from(this._bindings.keys()),l=t.length;if(!n.callback&&n.to.length>1)throw new an.b("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this);if(l>1&&n.callback)throw new an.b("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this);n.to.forEach(e=>{if(e.properties.length&&e.properties.length!==l)throw new an.b("observable-bind-to-properties-length: The number of properties must match.",this);e.properties.length||(e.properties=this._bindProperties)}),this._to=n.to,n.callback&&(this._bindings.get(t[0]).callback=n.callback),function(e,n){n.forEach(n=>{const t=e[Wn];let l;t.get(n.observable)||e.listenTo(n.observable,"change",(i,o)=>{(l=t.get(n.observable)[o])&&l.forEach(n=>{Xn(e,n.property)})})})}(this._observable,this._to),function(e){let n;e._bindings.forEach((t,l)=>{e._to.forEach(i=>{n=i.properties[t.callback?0:e._bindProperties.indexOf(l)],t.to.push([i.observable,n]),function(e,n,t,l){const i=e[Wn],o=i.get(t),r=o||{};r[l]||(r[l]=new Set),r[l].add(n),o||i.set(t,r)}(e._observable,t,i.observable,n)})})}(this),this._bindProperties.forEach(e=>{Xn(this._observable,e)})}function Qn(e,n,t){if(this._bindings.size>1)throw new an.b("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this);this.to(...function(e,n){const t=e.map(e=>[e,n]);return Array.prototype.concat.apply([],t)}(e,n),t)}function Zn(e){return e.every(e=>"string"==typeof e)}function Xn(e,n){const t=e[qn].get(n);let l;l=t.callback?t.callback.apply(e,t.to.map(e=>e[0][e[1]])):(l=t.to[0])[0][l[1]],e.hasOwnProperty(n)?e[n]=l:e.set(n,l)}const et=Symbol("document");class nt extends jn{constructor(e,n,t){super(e,n,t),this.set("isReadOnly",!1),this.set("isFocused",!1)}is(e,n=null){const t=e&&e.replace(/^view:/,"");return n?"editableElement"==t&&n==this.name||super.is(e,n):"editableElement"==t||super.is(e)}destroy(){this.stopListening()}get document(){return this.getCustomProperty(et)}set _document(e){if(this.getCustomProperty(et))throw new an.b("view-editableelement-document-already-set: View document is already set.",this);this._setCustomProperty(et,e),this.bind("isReadOnly").to(e),this.bind("isFocused").to(e,"isFocused",n=>n&&e.selection.editableElement==this),this.listenTo(e.selection,"change",()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this})}}kn(nt,Gn);const tt=Symbol("rootName");class lt extends nt{constructor(e){super(e),this.rootName="main"}is(e,n=null){const t=e.replace(/^view:/,"");return n?"rootElement"==t&&n==this.name||super.is(e,n):"rootElement"==t||super.is(e)}get rootName(){return this.getCustomProperty(tt)}set rootName(e){this._setCustomProperty(tt,e)}set _name(e){this.name=e}}class it{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new an.b("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);if(e.direction&&"forward"!=e.direction&&"backward"!=e.direction)throw new an.b("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e.startPosition,{direction:e.direction});this.boundaries=e.boundaries||null,this.position=ot._createAt(e.startPosition?e.startPosition: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 n,t,l;do{l=this.position,({done:n,value:t}=this.next())}while(!n&&e(t));n||(this.position=l)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){let e=this.position.clone();const n=this.position,t=e.parent;if(null===t.parent&&e.offset===t.childCount)return{done:!0};if(t===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let l;if(t instanceof Dn){if(e.isAtEnd)return this.position=ot._createAfter(t),this._next();l=t.data[e.offset]}else l=t.getChild(e.offset);if(l instanceof In)return this.shallow?e.offset++:e=new ot(l,0),this.position=e,this._formatReturnValue("elementStart",l,n,e,1);if(l instanceof Dn){if(this.singleCharacters)return e=new ot(l,0),this.position=e,this._next();{let t,i=l.data.length;return l==this._boundaryEndParent?(i=this.boundaries.end.offset,t=new Sn(l,0,i),e=ot._createAfter(t)):(t=new Sn(l,0,l.data.length),e.offset++),this.position=e,this._formatReturnValue("text",t,n,e,i)}}if("string"==typeof l){let l;l=this.singleCharacters?1:(t===this._boundaryEndParent?this.boundaries.end.offset:t.data.length)-e.offset;const i=new Sn(t,e.offset,l);return e.offset+=l,this.position=e,this._formatReturnValue("text",i,n,e,l)}return e=ot._createAfter(t),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue("elementEnd",t,n,e)}_previous(){let e=this.position.clone();const n=this.position,t=e.parent;if(null===t.parent&&0===e.offset)return{done:!0};if(t==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let l;if(t instanceof Dn){if(e.isAtStart)return this.position=ot._createBefore(t),this._previous();l=t.data[e.offset-1]}else l=t.getChild(e.offset-1);if(l instanceof In)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue("elementStart",l,n,e,1)):(e=new ot(l,l.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue("elementEnd",l,n,e));if(l instanceof Dn){if(this.singleCharacters)return e=new ot(l,l.data.length),this.position=e,this._previous();{let t,i=l.data.length;if(l==this._boundaryStartParent){const n=this.boundaries.start.offset;i=(t=new Sn(l,n,l.data.length-n)).data.length,e=ot._createBefore(t)}else t=new Sn(l,0,l.data.length),e.offset--;return this.position=e,this._formatReturnValue("text",t,n,e,i)}}if("string"==typeof l){let l;l=this.singleCharacters?1:e.offset-(t===this._boundaryStartParent?this.boundaries.start.offset:0),e.offset-=l;const i=new Sn(t,e.offset,l);return this.position=e,this._formatReturnValue("text",i,n,e,l)}return e=ot._createBefore(t),this.position=e,this._formatReturnValue("elementStart",t,n,e,1)}_formatReturnValue(e,n,t,l,i){return n instanceof Sn&&(n.offsetInText+n.data.length==n.textNode.data.length&&("forward"!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?t=ot._createAfter(n.textNode):(l=ot._createAfter(n.textNode),this.position=l)),0===n.offsetInText&&("backward"!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?t=ot._createBefore(n.textNode):(l=ot._createBefore(n.textNode),this.position=l))),{done:!1,value:{type:e,item:n,previousPosition:t,nextPosition:l,length:i}}}}class ot{constructor(e,n){this.parent=e,this.offset=n}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 nt);){if(!e.parent)return null;e=e.parent}return e}getShiftedBy(e){const n=ot._createAt(this),t=n.offset+e;return n.offset=t<0?0:t,n}getLastMatchingPosition(e,n={}){n.startPosition=this;const t=new it(n);return t.skip(e),t.position}getAncestors(){return this.parent.is("documentFragment")?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const n=this.getAncestors(),t=e.getAncestors();let l=0;for(;n[l]==t[l]&&n[l];)l++;return 0===l?null:n[l-1]}is(e){return"position"==e||"view:position"==e}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 n=this.parent.is("node")?this.parent.getPath():[],t=e.parent.is("node")?e.parent.getPath():[];n.push(this.offset),t.push(e.offset);const l=Mn(n,t);switch(l){case"prefix":return"before";case"extension":return"after";default:return n[l]0?new this(t,l):new this(l,t)}static _createIn(e){return this._createFromParentsAndOffsets(e,0,e,e.childCount)}static _createOn(e){const n=e.is("textProxy")?e.offsetSize:1;return this._createFromPositionAndShift(ot._createBefore(e),n)}}function st(e){return!(!e.item.is("attributeElement")&&!e.item.is("uiElement"))}function ut(e){let n=0;for(const t of e)n++;return n}class at{constructor(e=null,n,t){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel="",this.setTo(e,n,t)}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 n of this._ranges)e&&!n.start.isBefore(e.start)||(e=n);return e?e.clone():null}getLastRange(){let e=null;for(const n of this._ranges)e&&!n.end.isAfter(e.end)||(e=n);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 n of this._ranges){let t=!1;for(const l of e._ranges)if(n.isEqual(l)){t=!0;break}if(!t)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const n=ut(this.getRanges());if(n!=ut(e.getRanges()))return!1;if(0==n)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let l of e.getRanges())if(l=l.getTrimmed(),t.start.isEqual(l.start)&&t.end.isEqual(l.end)){n=!0;break}if(!n)return!1}return!0}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange();let n=e.start.nodeAfter,t=e.end.nodeBefore;return e.start.parent.is("text")&&e.start.isAtEnd&&e.start.parent.nextSibling&&(n=e.start.parent.nextSibling),e.end.parent.is("text")&&e.end.isAtStart&&e.end.parent.previousSibling&&(t=e.end.parent.previousSibling),n instanceof In&&n==t?n:null}setTo(e,n,t){if(null===e)this._setRanges([]),this._setFakeOptions(n);else if(e instanceof at||e instanceof ct)this._setRanges(e.getRanges(),e.isBackward),this._setFakeOptions({fake:e.isFake,label:e.fakeSelectionLabel});else if(e instanceof rt)this._setRanges([e],n&&n.backward),this._setFakeOptions(n);else if(e instanceof ot)this._setRanges([new rt(e)]),this._setFakeOptions(n);else if(e instanceof xn){const l=!!t&&!!t.backward;let i;if(void 0===n)throw new an.b("view-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",this);i="in"==n?rt._createIn(e):"on"==n?rt._createOn(e):new rt(ot._createAt(e,n)),this._setRanges([i],l),this._setFakeOptions(t)}else{if(!Ln(e))throw new an.b("view-selection-setTo-not-selectable: Cannot set selection to given place.",this);this._setRanges(e,n&&n.backward),this._setFakeOptions(n)}this.fire("change")}setFocus(e,n){if(null===this.anchor)throw new an.b("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this);const t=ot._createAt(e,n);if("same"==t.compareWith(this.focus))return;const l=this.anchor;this._ranges.pop(),"before"==t.compareWith(l)?this._addRange(new rt(t,l),!0):this._addRange(new rt(l,t)),this.fire("change")}is(e){return"selection"==e||"view:selection"==e}_setRanges(e,n=!1){e=Array.from(e),this._ranges=[];for(const t of e)this._addRange(t);this._lastRangeBackward=!!n}_setFakeOptions(e={}){this._isFake=!!e.fake,this._fakeSelectionLabel=e.fake&&e.label||""}_addRange(e,n=!1){if(!(e instanceof rt))throw new an.b("view-selection-add-range-not-range: Selection range set to an object that is not an instance of view.Range",this);this._pushRange(e),this._lastRangeBackward=!!n}_pushRange(e){for(const n of this._ranges)if(e.isIntersecting(n))throw new an.b("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:e,intersectingRange:n});this._ranges.push(new rt(e.start,e.end))}}kn(at,mn);class ct{constructor(e=null,n,t){this._selection=new at,this._selection.delegate("change").to(this),this._selection.setTo(e,n,t)}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)}is(e){return"selection"==e||"documentSelection"==e||"view:selection"==e||"view:documentSelection"==e}_setTo(e,n,t){this._selection.setTo(e,n,t)}_setFocus(e,n){this._selection.setFocus(e,n)}}kn(ct,mn);class dt{constructor(e={}){this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||"id",this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap,this._skippedIndexesFromExternal=[]}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,n){let t;const l=this._idProperty;if(l in e){if("string"!=typeof(t=e[l]))throw new an.b("collection-add-invalid-id",this);if(this.get(t))throw new an.b("collection-add-item-already-exists",this)}else e[l]=t=dn();if(void 0===n)n=this._items.length;else if(n>this._items.length||n<0)throw new an.b("collection-add-item-invalid-index",this);return this._items.splice(n,0,e),this._itemMap.set(t,e),this.fire("add",e,n),this}get(e){let n;if("string"==typeof e)n=this._itemMap.get(e);else{if("number"!=typeof e)throw new an.b("collection-get-invalid-arg: Index or id must be given.",this);n=this._items[e]}return n||null}has(e){return this._itemMap.has("string"==typeof e?e:e[this._idProperty])}getIndex(e){let n;return n="string"==typeof e?this._itemMap.get(e):e,this._items.indexOf(n)}remove(e){let n,t,l,i=!1;const o=this._idProperty;if("string"==typeof e?(t=e,i=!(l=this._itemMap.get(t)),l&&(n=this._items.indexOf(l))):"number"==typeof e?(n=e,i=!(l=this._items[n]),l&&(t=l[o])):(t=(l=e)[o],i=-1==(n=this._items.indexOf(l))||!this._itemMap.get(t)),i)throw new an.b("collection-remove-404: Item not found.",this);this._items.splice(n,1),this._itemMap.delete(t);const r=this._bindToInternalToExternalMap.get(l);return this._bindToInternalToExternalMap.delete(l),this._bindToExternalToInternalMap.delete(r),this.fire("remove",l,n),l}map(e,n){return this._items.map(e,n)}find(e,n){return this._items.find(e,n)}filter(e,n){return this._items.filter(e,n)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new an.b("collection-bind-to-rebind: The collection cannot be bound more than once.",this);return this._bindToCollection=e,{as:e=>{this._setUpBindToBinding(n=>new e(n))},using:e=>{this._setUpBindToBinding("function"==typeof e?n=>e(n):n=>n[e])}}}_setUpBindToBinding(e){const n=this._bindToCollection,t=(t,l,i)=>{const o=n._bindToCollection==this,r=n._bindToInternalToExternalMap.get(l);if(o&&r)this._bindToExternalToInternalMap.set(l,r),this._bindToInternalToExternalMap.set(r,l);else{const t=e(l);if(!t)return void this._skippedIndexesFromExternal.push(i);let o=i;for(const e of this._skippedIndexesFromExternal)i>e&&o--;for(const e of n._skippedIndexesFromExternal)o>=e&&o++;this._bindToExternalToInternalMap.set(l,t),this._bindToInternalToExternalMap.set(t,l),this.add(t,o);for(let e=0;e{const l=this._bindToExternalToInternalMap.get(n);l&&this.remove(l),this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((e,n)=>(tn&&e.push(n),e),[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}kn(dt,mn);class ht{constructor(){this.selection=new ct,this.roots=new dt({idProperty:"rootName"}),this.set("isReadOnly",!1),this.set("isFocused",!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 n=!1;do{for(const t of this._postFixers)if(n=t(e))break}while(n)}}kn(ht,Gn);class pt extends In{constructor(e,n,t){super(e,n,t),this.getFillerOffset=ft,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 an.b("attribute-element-get-elements-with-same-id-no-id: Cannot get elements with the same id for an attribute element without id.",this);return new Set(this._clonesGroup)}is(e,n=null){const t=e&&e.replace(/^view:/,"");return n?"attributeElement"==t&&n==this.name||super.is(e,n):"attributeElement"==t||super.is(e)}isSimilar(e){return null!==this.id||null!==e.id?this.id===e.id:super.isSimilar(e)&&this.priority==e.priority}_clone(e){const n=super._clone(e);return n._priority=this._priority,n._id=this._id,n}}function ft(){if(mt(this))return null;let e=this.parent;for(;e&&e.is("attributeElement");){if(mt(e)>1)return null;e=e.parent}return!e||mt(e)>1?null:this.childCount}function mt(e){return Array.from(e.getChildren()).filter(e=>!e.is("uiElement")).length}pt.DEFAULT_PRIORITY=10;class gt extends In{constructor(e,n,t){super(e,n,t),this.getFillerOffset=vt}is(e,n=null){const t=e.replace(/^view:/,"");return n?"emptyElement"==t&&n==this.name||super.is(e,n):"emptyElement"==t||super.is(e)}_insertChild(e,n){if(n&&(n instanceof xn||Array.from(n).length>0))throw new an.b("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,n])}}function vt(){return null}const _t=navigator.userAgent.toLowerCase();var yt=function(e){return e.indexOf("macintosh")>-1}(_t),bt=function(e){return!!e.match(/edge\/(\d+.?\d*)/)}(_t),wt=function(e){return!!e.match(/gecko\/\d+/)}(_t),kt=function(e){return e.indexOf(" applewebkit/")>-1&&-1===e.indexOf("chrome")}(_t),Mt=function(e){return e.indexOf("android")>-1}(_t);!function(){let e=!1;try{e=0==="\u0107".search(new RegExp("[\\p{L}]","u"))}catch(e){}}();const Ct={"\u2318":"ctrl","\u21e7":"shift","\u2325":"alt"},xt={ctrl:"\u2318",shift:"\u21e7",alt:"\u2325"},Dt=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,cmd:1114112,shift:2228224,alt:4456448};for(let n=65;n<=90;n++)e[String.fromCharCode(n).toLowerCase()]=n;for(let n=48;n<=57;n++)e[n-48]=n;for(let n=112;n<=123;n++)e["f"+(n-111)]=n;return e}();function St(e){let n;if("string"==typeof e){if(!(n=Dt[e.toLowerCase()]))throw new an.b("keyboard-unknown-key: Unknown key name.",null,{key:e})}else n=e.keyCode+(e.altKey?Dt.alt:0)+(e.ctrlKey?Dt.ctrl:0)+(e.shiftKey?Dt.shift:0);return n}function Tt(e){return"string"==typeof e&&(e=Lt(e)),e.map(e=>"string"==typeof e?St(e):e).reduce((e,n)=>n+e,0)}function Lt(e){return e.split(/\s*\+\s*/)}class Pt extends In{constructor(e,n,t){super(e,n,t),this.getFillerOffset=At}is(e,n=null){const t=e.replace(/^view:/,"");return n?"uiElement"==t&&n==this.name||super.is(e,n):"uiElement"==t||super.is(e)}_insertChild(e,n){if(n&&(n instanceof xn||Array.from(n).length>0))throw new an.b("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}render(e){return this.toDomElement(e)}toDomElement(e){const n=e.createElement(this.name);for(const t of this.getAttributeKeys())n.setAttribute(t,this.getAttribute(t));return n}}function At(){return null}class It{constructor(e){this._children=[],e&&this._insertChild(0,e)}[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}is(e){return"documentFragment"==e||"view:documentFragment"==e}_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,n){this._fireChange("children",this);let t=0;const l=function(e){return"string"==typeof e?[new Dn(e)]:(Ln(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new Dn(e):e instanceof Sn?new Dn(e.data):e))}(n);for(const i of l)null!==i.parent&&i._remove(),i.parent=this,this._children.splice(e,0,i),e++,t++;return t}_removeChildren(e,n=1){this._fireChange("children",this);for(let t=e;tl instanceof e))throw new an.b("view-writer-insert-invalid-node",t);l.is("text")||e(l.getChildren(),t)}}(n=Ln(n)?[...n]:[n],this.document);const t=Ot(e);if(!t)throw new an.b("view-writer-invalid-position-container",this.document);const l=this._breakAttributes(e,!0),i=t._insertChild(l.offset,n);for(const s of n)this._addToClonedElementsGroup(s);const o=l.getShiftedBy(i),r=this.mergeAttributes(l);if(0===i)return new rt(r,r);{r.isEqual(l)||o.offset--;const e=this.mergeAttributes(o);return new rt(r,e)}}remove(e){const n=e instanceof rt?e:rt._createOn(e);if(Ht(n,this.document),n.isCollapsed)return new It;const{start:t,end:l}=this._breakAttributesRange(n,!0),i=t.parent._removeChildren(t.offset,l.offset-t.offset);for(const r of i)this._removeFromClonedElementsGroup(r);const o=this.mergeAttributes(t);return n.start=o,n.end=o.clone(),new It(i)}clear(e,n){Ht(e,this.document);const t=e.getWalker({direction:"backward",ignoreElementEnd:!0});for(const l of t){const t=l.item;let i;if(t.is("element")&&n.isSimilar(t))i=rt._createOn(t);else if(!l.nextPosition.isAfter(e.start)&&t.is("textProxy")){const e=t.getAncestors().find(e=>e.is("element")&&n.isSimilar(e));e&&(i=rt._createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),this.remove(i))}}move(e,n){let t;if(n.isAfter(e.end)){const l=(n=this._breakAttributes(n,!0)).parent,i=l.childCount;e=this._breakAttributesRange(e,!0),t=this.remove(e),n.offset+=l.childCount-i}else t=this.remove(e);return this.insert(n,t)}wrap(e,n){if(!(n instanceof pt))throw new an.b("view-writer-wrap-invalid-attribute",this.document);if(Ht(e,this.document),e.isCollapsed){let t=e.start;t.parent.is("element")&&!function(e){return Array.from(e.getChildren()).some(e=>!e.is("uiElement"))}(t.parent)&&(t=t.getLastMatchingPosition(e=>e.item.is("uiElement"))),t=this._wrapPosition(t,n);const l=this.document.selection;return l.isCollapsed&&l.getFirstPosition().isEqual(e.start)&&this.setSelection(t),new rt(t)}return this._wrapRange(e,n)}unwrap(e,n){if(!(n instanceof pt))throw new an.b("view-writer-unwrap-invalid-attribute",this.document);if(Ht(e,this.document),e.isCollapsed)return e;const{start:t,end:l}=this._breakAttributesRange(e,!0),i=this._unwrapChildren(t.parent,t.offset,l.offset,n),o=this.mergeAttributes(i.start);o.isEqual(i.start)||i.end.offset--;const r=this.mergeAttributes(i.end);return new rt(o,r)}rename(e,n){const t=new jn(e,n.getAttributes());return this.insert(ot._createAfter(n),t),this.move(rt._createIn(n),ot._createAt(t,0)),this.remove(rt._createOn(n)),t}clearClonedElementsGroup(e){this._cloneGroups.delete(e)}createPositionAt(e,n){return ot._createAt(e,n)}createPositionAfter(e){return ot._createAfter(e)}createPositionBefore(e){return ot._createBefore(e)}createRange(e,n){return new rt(e,n)}createRangeOn(e){return rt._createOn(e)}createRangeIn(e){return rt._createIn(e)}createSelection(e,n,t){return new at(e,n,t)}_wrapChildren(e,n,t,l){let i=n;const o=[];for(;i!1,e.parent._insertChild(e.offset,t);const l=new rt(e,e.getShiftedBy(1));this.wrap(l,n);const i=new ot(t.parent,t.index);t._remove();const o=i.nodeBefore,r=i.nodeAfter;return o instanceof Dn&&r instanceof Dn?Nt(o,r):Yt(i)}_wrapAttributeElement(e,n){if(!zt(e,n))return!1;if(e.name!==n.name||e.priority!==n.priority)return!1;for(const t of e.getAttributeKeys())if("class"!==t&&"style"!==t&&n.hasAttribute(t)&&n.getAttribute(t)!==e.getAttribute(t))return!1;for(const t of e.getStyleNames())if(n.hasStyle(t)&&n.getStyle(t)!==e.getStyle(t))return!1;for(const t of e.getAttributeKeys())"class"!==t&&"style"!==t&&(n.hasAttribute(t)||this.setAttribute(t,e.getAttribute(t),n));for(const t of e.getStyleNames())n.hasStyle(t)||this.setStyle(t,e.getStyle(t),n);for(const t of e.getClassNames())n.hasClass(t)||this.addClass(t,n);return!0}_unwrapAttributeElement(e,n){if(!zt(e,n))return!1;if(e.name!==n.name||e.priority!==n.priority)return!1;for(const t of e.getAttributeKeys())if("class"!==t&&"style"!==t&&(!n.hasAttribute(t)||n.getAttribute(t)!==e.getAttribute(t)))return!1;if(!n.hasClass(...e.getClassNames()))return!1;for(const t of e.getStyleNames())if(!n.hasStyle(t)||n.getStyle(t)!==e.getStyle(t))return!1;for(const t of e.getAttributeKeys())"class"!==t&&"style"!==t&&this.removeAttribute(t,n);return this.removeClass(Array.from(e.getClassNames()),n),this.removeStyle(Array.from(e.getStyleNames()),n),!0}_breakAttributesRange(e,n=!1){const t=e.start,l=e.end;if(Ht(e,this.document),e.isCollapsed){const t=this._breakAttributes(e.start,n);return new rt(t,t)}const i=this._breakAttributes(l,n),o=i.parent.childCount,r=this._breakAttributes(t,n);return i.offset+=i.parent.childCount-o,new rt(r,i)}_breakAttributes(e,n=!1){const t=e.offset,l=e.parent;if(e.parent.is("emptyElement"))throw new an.b("view-writer-cannot-break-empty-element",this.document);if(e.parent.is("uiElement"))throw new an.b("view-writer-cannot-break-ui-element",this.document);if(!n&&l.is("text")&&Vt(l.parent))return e.clone();if(Vt(l))return e.clone();if(l.is("text"))return this._breakAttributes(Ft(e),n);if(t==l.childCount){const e=new ot(l.parent,l.index+1);return this._breakAttributes(e,n)}if(0===t){const e=new ot(l.parent,l.index);return this._breakAttributes(e,n)}{const e=l.index+1,i=l._clone();l.parent._insertChild(e,i),this._addToClonedElementsGroup(i);const o=l._removeChildren(t,l.childCount-t);i._appendChild(o);const r=new ot(l.parent,e);return this._breakAttributes(r,n)}}_addToClonedElementsGroup(e){if(!e.root.is("rootElement"))return;if(e.is("element"))for(const l of e.getChildren())this._addToClonedElementsGroup(l);const n=e.id;if(!n)return;let t=this._cloneGroups.get(n);t||(t=new Set,this._cloneGroups.set(n,t)),t.add(e),e._clonesGroup=t}_removeFromClonedElementsGroup(e){if(e.is("element"))for(const l of e.getChildren())this._removeFromClonedElementsGroup(l);const n=e.id;if(!n)return;const t=this._cloneGroups.get(n);t&&t.delete(e)}}function Ot(e){let n=e.parent;for(;!Vt(n);){if(!n)return;n=n.parent}return n}function jt(e,n){return e.priorityn.priority)&&e.getIdentity()e.createTextNode("\xa0"),Wt=e=>{const n=e.createElement("br");return n.dataset.ckeFiller=!0,n},qt=(()=>{let e="";for(let n=0;n<7;n++)e+="\u200b";return e})();function $t(e){return Bt(e)&&e.data.substr(0,7)===qt}function Gt(e){return 7==e.data.length&&$t(e)}function Kt(e){return $t(e)?e.data.slice(7):e.data}function Jt(e,n){if(n.keyCode==Dt.arrowleft){const e=n.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const n=e.getRangeAt(0).startContainer,t=e.getRangeAt(0).startOffset;$t(n)&&t<=7&&e.collapse(n,0)}}}function Qt(e,n,t,l=!1){t=t||function(e,n){return e===n},Array.isArray(e)||(e=Array.from(e)),Array.isArray(n)||(n=Array.from(n));const i=function(e,n,t){const l=Zt(e,n,t);if(-1===l)return{firstIndex:-1,lastIndexOld:-1,lastIndexNew:-1};const i=Zt(Xt(e,l),Xt(n,l),t);return{firstIndex:l,lastIndexOld:e.length-i,lastIndexNew:n.length-i}}(e,n,t);return l?function(e,n){const{firstIndex:t,lastIndexOld:l,lastIndexNew:i}=e;if(-1===t)return Array(n).fill("equal");let o=[];return t>0&&(o=o.concat(Array(t).fill("equal"))),i-t>0&&(o=o.concat(Array(i-t).fill("insert"))),l-t>0&&(o=o.concat(Array(l-t).fill("delete"))),i0&&t.push({index:l,type:"insert",values:e.slice(l,o)}),i-l>0&&t.push({index:l+(o-l),type:"delete",howMany:i-l}),t}(n,i)}function Zt(e,n,t){for(let l=0;l200||i>200||l+i>300)return el.fastDiff(e,n,t,!0);let o,r;if(ia?-1:1;c[l+h]&&(c[l]=c[l+h].slice(0)),c[l]||(c[l]=[]),c[l].push(i>a?o:r);let p=Math.max(i,a),f=p-l;for(;fa;p--)d[p]=h(p);d[a]=h(a),f++}while(d[a]!==u);return c[a].slice(1)}function nl(e,n,t){e.insertBefore(t,e.childNodes[n]||null)}function tl(e){const n=e.parentNode;n&&n.removeChild(e)}function ll(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}el.fastDiff=Qt;class il{constructor(e,n){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=n,this.isFocused=!1,this._inlineFiller=null,this._fakeSelectionContainer=null}markToSync(e,n){if("text"===e)this.domConverter.mapViewToDom(n.parent)&&this.markedTexts.add(n);else{if(!this.domConverter.mapViewToDom(n))return;if("attributes"===e)this.markedAttributes.add(n);else{if("children"!==e)throw new an.b("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this);this.markedChildren.add(n)}}}render(){let e;for(const n of this.markedChildren)this._updateChildrenMappings(n);this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const n of this.markedAttributes)this._updateAttrs(n);for(const n of this.markedChildren)this._updateChildren(n,{inlineFillerPosition:e});for(const n of this.markedTexts)!this.markedChildren.has(n.parent)&&this.domConverter.mapViewToDom(n.parent)&&this._updateText(n,{inlineFillerPosition:e});if(e){const n=this.domConverter.viewPositionToDom(e),t=n.parent.ownerDocument;this._inlineFiller=$t(n.parent)?n.parent:ol(t,n.parent,n.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_updateChildrenMappings(e){const n=this.domConverter.mapViewToDom(e);if(!n)return;const t=this.domConverter.mapViewToDom(e).childNodes,l=Array.from(this.domConverter.viewChildrenToDom(e,n.ownerDocument,{withChildren:!1})),i=this._diffNodeLists(t,l),o=this._findReplaceActions(i,t,l);if(-1!==o.indexOf("replace")){const n={equal:0,insert:0,delete:0};for(const i of o)if("replace"===i){const i=n.equal+n.insert,o=n.equal+n.delete,r=e.getChild(i);r&&!r.is("uiElement")&&this._updateElementMappings(r,t[o]),tl(l[i]),n.equal++}else n[i]++}}_updateElementMappings(e,n){this.domConverter.unbindDomElement(n),this.domConverter.bindElements(n,e),this.markedChildren.add(e),this.markedAttributes.add(e)}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is("text")?ot._createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),n=this.domConverter.viewPositionToDom(e);return!!(n&&Bt(n.parent)&&$t(n.parent))}_removeInlineFiller(){const e=this._inlineFiller;if(!$t(e))throw new an.b("view-renderer-filler-was-lost: The inline filler node was lost.",this);Gt(e)?e.parentNode.removeChild(e):e.data=e.data.substr(7),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),n=e.parent,t=e.offset;return!(!this.domConverter.mapViewToDom(n.root)||!n.is("element")||!function(e){if("false"==e.getAttribute("contenteditable"))return!1;const n=e.findAncestor(e=>e.hasAttribute("contenteditable"));return!n||"true"==n.getAttribute("contenteditable")}(n)||t===n.getFillerOffset()||e.nodeBefore instanceof Dn||e.nodeAfter instanceof Dn)}_updateText(e,n){const t=this.domConverter.findCorrespondingDomText(e),l=this.domConverter.viewToDom(e,t.ownerDocument),i=t.data;let o=l.data;const r=n.inlineFillerPosition;if(r&&r.parent==e.parent&&r.offset==e.index&&(o=qt+o),i!=o){const e=Qt(i,o);for(const n of e)"insert"===n.type?t.insertData(n.index,n.values.join("")):t.deleteData(n.index,n.howMany)}}_updateAttrs(e){const n=this.domConverter.mapViewToDom(e);if(!n)return;const t=Array.from(n.attributes).map(e=>e.name),l=e.getAttributeKeys();for(const i of l)n.setAttribute(i,e.getAttribute(i));for(const i of t)e.hasAttribute(i)||n.removeAttribute(i)}_updateChildren(e,n){const t=this.domConverter.mapViewToDom(e);if(!t)return;const l=n.inlineFillerPosition,i=this.domConverter.mapViewToDom(e).childNodes,o=Array.from(this.domConverter.viewChildrenToDom(e,t.ownerDocument,{bind:!0,inlineFillerPosition:l}));l&&l.parent===e&&ol(t.ownerDocument,o,l.offset);const r=this._diffNodeLists(i,o);let s=0;const u=new Set;for(const a of r)"insert"===a?(nl(t,s,o[s]),s++):"delete"===a?(u.add(i[s]),tl(i[s])):(this._markDescendantTextToSync(this.domConverter.domToView(o[s])),s++);for(const a of u)a.parentNode||this.domConverter.unbindDomElement(a)}_diffNodeLists(e,n){return el(e=function(e,n){const t=Array.from(e);return 0!=t.length&&n?(t[t.length-1]==n&&t.pop(),t):t}(e,this._fakeSelectionContainer),n,(function(e,n,t){return n===t||(Bt(n)&&Bt(t)?n.data===t.data:!(!e.isBlockFiller(n)||!e.isBlockFiller(t)))}).bind(null,this.domConverter))}_findReplaceActions(e,n,t){if(-1===e.indexOf("insert")||-1===e.indexOf("delete"))return e;let l=[],i=[],o=[];const r={equal:0,insert:0,delete:0};for(const s of e)"insert"===s?o.push(t[r.equal+r.insert]):"delete"===s?i.push(n[r.equal+r.delete]):((l=l.concat(el(i,o,rl).map(e=>"equal"===e?"replace":e))).push("equal"),i=[],o=[]),r[s]++;return l.concat(el(i,o,rl).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 n of e.getChildren())this._markDescendantTextToSync(n)}_updateSelection(){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 n=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=function(e){const n=e.createElement("div");return Object.assign(n.style,{position:"fixed",top:0,left:"-9999px",width:"42px"}),n.textContent="\xa0",n}(n));const t=this._fakeSelectionContainer;if(this.domConverter.bindFakeSelection(t,this.selection),!this._fakeSelectionNeedsUpdate(e))return;t.parentElement&&t.parentElement==e||e.appendChild(t),t.textContent=this.selection.fakeSelectionLabel||"\xa0";const l=n.getSelection(),i=n.createRange();l.removeAllRanges(),i.selectNodeContents(t),l.addRange(i)}_updateDomSelection(e){const n=e.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(n))return;const t=this.domConverter.viewPositionToDom(this.selection.anchor),l=this.domConverter.viewPositionToDom(this.selection.focus);e.focus(),n.collapse(t.parent,t.offset),n.extend(l.parent,l.offset),wt&&function(e,n){const t=e.parent;if(t.nodeType!=Node.ELEMENT_NODE||e.offset!=t.childNodes.length-1)return;const l=t.childNodes[e.offset];l&&"BR"==l.tagName&&n.addRange(n.getRangeAt(0))}(l,n)}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const n=e&&this.domConverter.domSelectionToView(e);return!(n&&this.selection.isEqual(n)||!this.selection.isCollapsed&&this.selection.isSimilar(n))}_fakeSelectionNeedsUpdate(e){const n=this._fakeSelectionContainer,t=e.ownerDocument.getSelection();return!n||n.parentElement!==e||t.anchorNode!==n&&!n.contains(t.anchorNode)||n.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const e of this.domDocuments)if(e.getSelection().rangeCount){const n=e.activeElement,t=this.domConverter.mapDomToView(n);n&&t&&e.getSelection().removeAllRanges()}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}function ol(e,n,t){const l=n instanceof Array?n:n.childNodes,i=l[t];if(Bt(i))return i.data=qt+i.data,i;{const i=e.createTextNode(qt);return Array.isArray(n)?l.splice(t,0,i):nl(n,t,i),i}}function rl(e,n){return ll(e)&&ll(n)&&!Bt(e)&&!Bt(n)&&e.tagName.toLowerCase()===n.tagName.toLowerCase()}kn(il,Gn);var sl={window:window,document:document};function ul(e){let n=0;for(;e.previousSibling;)e=e.previousSibling,n++;return n}function al(e){const n=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)n.unshift(e),e=e.parentNode;return n}const cl=Wt(document);class dl{constructor(e={}){this.blockFillerMode=e.blockFillerMode||"br",this.preElements=["pre"],this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption"],this._blockFiller="br"==this.blockFillerMode?Wt:Ut,this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(e,n){this._fakeSelectionMapping.set(e,new at(n))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,n){this._domToViewMapping.set(e,n),this._viewToDomMapping.set(n,e)}unbindDomElement(e){const n=this._domToViewMapping.get(e);if(n){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(n);for(const n of Array.from(e.childNodes))this.unbindDomElement(n)}}bindDocumentFragments(e,n){this._domToViewMapping.set(e,n),this._viewToDomMapping.set(n,e)}viewToDom(e,n,t={}){if(e.is("text")){const t=this._processDataFromViewText(e);return n.createTextNode(t)}{if(this.mapViewToDom(e))return this.mapViewToDom(e);let l;if(e.is("documentFragment"))l=n.createDocumentFragment(),t.bind&&this.bindDocumentFragments(l,e);else{if(e.is("uiElement"))return l=e.render(n),t.bind&&this.bindElements(l,e),l;l=e.hasAttribute("xmlns")?n.createElementNS(e.getAttribute("xmlns"),e.name):n.createElement(e.name),t.bind&&this.bindElements(l,e);for(const n of e.getAttributeKeys())l.setAttribute(n,e.getAttribute(n))}if(t.withChildren||void 0===t.withChildren)for(const i of this.viewChildrenToDom(e,n,t))l.appendChild(i);return l}}*viewChildrenToDom(e,n,t={}){const l=e.getFillerOffset&&e.getFillerOffset();let i=0;for(const o of e.getChildren())l===i&&(yield this._blockFiller(n)),yield this.viewToDom(o,n,t),i++;l===i&&(yield this._blockFiller(n))}viewRangeToDom(e){const n=this.viewPositionToDom(e.start),t=this.viewPositionToDom(e.end),l=document.createRange();return l.setStart(n.parent,n.offset),l.setEnd(t.parent,t.offset),l}viewPositionToDom(e){const n=e.parent;if(n.is("text")){const t=this.findCorrespondingDomText(n);if(!t)return null;let l=e.offset;return $t(t)&&(l+=7),{parent:t,offset:l}}{let t,l,i;if(0===e.offset){if(!(t=this.mapViewToDom(n)))return null;i=t.childNodes[0]}else{const n=e.nodeBefore;if(!(l=n.is("text")?this.findCorrespondingDomText(n):this.mapViewToDom(e.nodeBefore)))return null;t=l.parentNode,i=l.nextSibling}return Bt(i)&&$t(i)?{parent:i,offset:7}:{parent:t,offset:l?ul(l)+1:0}}}domToView(e,n={}){if(this.isBlockFiller(e,this.blockFillerMode))return null;const t=this.getParentUIElement(e,this._domToViewMapping);if(t)return t;if(Bt(e)){if(Gt(e))return null;{const n=this._processDataFromDomText(e);return""===n?null:new Dn(n)}}if(this.isComment(e))return null;{if(this.mapDomToView(e))return this.mapDomToView(e);let t;if(this.isDocumentFragment(e))t=new It,n.bind&&this.bindDocumentFragments(e,t);else{const l=n.keepOriginalCase?e.tagName:e.tagName.toLowerCase();t=new In(l),n.bind&&this.bindElements(e,t);const i=e.attributes;for(let e=i.length-1;e>=0;e--)t._setAttribute(i[e].name,i[e].value)}if(n.withChildren||void 0===n.withChildren)for(const l of this.domChildrenToView(e,n))t._appendChild(l);return t}}*domChildrenToView(e,n={}){for(let t=0;t{const{scrollLeft:n,scrollTop:t}=e;l.push([n,t])}),n.focus(),pl(n,e=>{const[n,t]=l.shift();e.scrollLeft=n,e.scrollTop=t}),sl.window.scrollTo(e,t)}}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isBlockFiller(e){return"br"==this.blockFillerMode?e.isEqualNode(cl):function(e,n){return Bt(e)&&"\xa0"==e.data&&function(e,n){const t=e.parentNode;return t&&t.tagName&&n.includes(t.tagName.toLowerCase())}(e,n)&&1===e.parentNode.childNodes.length}(e,this.blockElements)}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const n=document.createRange();n.setStart(e.anchorNode,e.anchorOffset),n.setEnd(e.focusNode,e.focusOffset);const t=n.collapsed;return n.detach(),t}getParentUIElement(e){const n=al(e);for(n.pop();n.length;){const e=n.pop(),t=this._domToViewMapping.get(e);if(t&&t.is("uiElement"))return t}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,n){if(Bt(e)&&$t(e)&&n<7)return!1;if(this.isElement(e)&&$t(e.childNodes[n]))return!1;const t=this.mapDomToView(e);return!t||!t.is("uiElement")}_processDataFromViewText(e){let n=e.data;if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return n;if(" "==n.charAt(0)){const t=this._getTouchingViewTextNode(e,!1);(!t||!this._nodeEndsWithSpace(t))&&t||(n="\xa0"+n.substr(1))}if(" "==n.charAt(n.length-1)){const t=this._getTouchingViewTextNode(e,!0);" "!=n.charAt(n.length-2)&&t&&" "!=t.data.charAt(0)||(n=n.substr(0,n.length-1)+"\xa0")}return n.replace(/ {2}/g," \xa0")}_nodeEndsWithSpace(e){if(e.getAncestors().some(e=>this.preElements.includes(e.name)))return!1;const n=this._processDataFromViewText(e);return" "==n.charAt(n.length-1)}_processDataFromDomText(e){let n=e.data;if(hl(e,this.preElements))return Kt(e);n=n.replace(/[ \n\t\r]{1,}/g," ");const t=this._getTouchingInlineDomNode(e,!1),l=this._getTouchingInlineDomNode(e,!0),i=this._checkShouldLeftTrimDomText(t),o=this._checkShouldRightTrimDomText(e,l);return i&&(n=n.replace(/^ /,"")),o&&(n=n.replace(/ $/,"")),n=(n=Kt(new Text(n))).replace(/ \u00A0/g," "),(/( |\u00A0)\u00A0$/.test(n)||!l||l.data&&" "==l.data.charAt(0))&&(n=n.replace(/\u00A0$/," ")),i&&(n=n.replace(/^\u00A0/," ")),n}_checkShouldLeftTrimDomText(e){return!e||!!rn(e)||/[^\S\u00A0]/.test(e.data.charAt(e.data.length-1))}_checkShouldRightTrimDomText(e,n){return!n&&!$t(e)}_getTouchingViewTextNode(e,n){const t=new it({startPosition:n?ot._createAfter(e):ot._createBefore(e),direction:n?"forward":"backward"});for(const l of t){if(l.item.is("containerElement"))return null;if(l.item.is("br"))return null;if(l.item.is("textProxy"))return l.item}return null}_getTouchingInlineDomNode(e,n){if(!e.parentNode)return null;const t=n?"nextNode":"previousNode",l=e.ownerDocument,i=al(e)[0],o=l.createTreeWalker(i,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode:e=>Bt(e)||"BR"==e.tagName?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});o.currentNode=e;const r=o[t]();if(null!==r){const n=function(e,n){const t=al(e),l=al(n);let i=0;for(;t[i]==l[i]&&t[i];)i++;return 0===i?null:t[i-1]}(e,r);if(n&&!hl(e,this.blockElements,n)&&!hl(r,this.blockElements,n))return r}return null}}function hl(e,n,t){let l=al(e);return t&&(l=l.slice(l.indexOf(t)+1)),l.some(e=>e.tagName&&n.includes(e.tagName.toLowerCase()))}function pl(e,n){for(;e&&e!=sl.document;)n(e),e=e.parentNode}function fl(e){const n=Object.prototype.toString.apply(e);return"[object Window]"==n||"[object global]"==n}var ml=Bn({},mn,{listenTo(e,...n){if(ll(e)||fl(e)){const t=this._getProxyEmitter(e)||new gl(e);t.attach(...n),e=t}mn.listenTo.call(this,e,...n)},stopListening(e,n,t){if(ll(e)||fl(e)){const n=this._getProxyEmitter(e);if(!n)return;e=n}mn.stopListening.call(this,e,n,t),e instanceof gl&&e.detach(n)},_getProxyEmitter(e){return function(e,n){return e[pn]&&e[pn][n]?e[pn][n].emitter:null}(this,vl(e))}});class gl{constructor(e){gn(this,vl(e)),this._domNode=e}}function vl(e){return e["data-ck-expando"]||(e["data-ck-expando"]=dn())}Bn(gl.prototype,mn,{attach(e,n,t={}){if(this._domListeners&&this._domListeners[e])return;const l=this._createDomListener(e,!!t.useCapture);this._domNode.addEventListener(e,l,!!t.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=l},detach(e){let n;!this._domListeners[e]||(n=this._events[e])&&n.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,n){const t=n=>{this.fire(e,n)};return t.removeListener=()=>{this._domNode.removeEventListener(e,t,n),delete this._domListeners[e]},t}});class _l{constructor(e){this.view=e,this.document=e.document,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}function yl(e){var n=-1,t=null==e?0:e.length;for(this.__data__=new H;++ns))return!1;var a=o.get(e);if(a&&o.get(n))return a==n;var c=-1,d=!0,h=2&t?new bl:void 0;for(o.set(e,n),o.set(n,e);++c{this.listenTo(e,n,(e,n)=>{this.isEnabled&&this.onDomEvent(n)},{useCapture:this.useCapture})})}fire(e,n,t){this.isEnabled&&this.document.fire(e,new Yl(this.view,n,t))}}class Nl extends Fl{constructor(e){super(e),this.domEventType=["keydown","keyup"]}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return St(this)}})}}var Rl=function(){return l.a.Date.now()},Vl=function(e){return"symbol"==typeof e||f(e)&&"[object Symbol]"==d(e)},Hl=/^\s+|\s+$/g,zl=/^[-+]0x[0-9a-f]+$/i,Bl=/^0b[01]+$/i,Ul=/^0o[0-7]+$/i,Wl=parseInt,ql=function(e){if("number"==typeof e)return e;if(Vl(e))return NaN;if(C(e)){var n="function"==typeof e.valueOf?e.valueOf():e;e=C(n)?n+"":n}if("string"!=typeof e)return 0===e?e:+e;e=e.replace(Hl,"");var t=Bl.test(e);return t||Ul.test(e)?Wl(e.slice(2),t?2:8):zl.test(e)?NaN:+e},$l=Math.max,Gl=Math.min,Kl=function(e,n,t){var l,i,o,r,s,u,a=0,c=!1,d=!1,h=!0;if("function"!=typeof e)throw new TypeError("Expected a function");function p(n){var t=l,o=i;return l=i=void 0,a=n,r=e.apply(o,t)}function f(e){var t=e-u;return void 0===u||t>=n||t<0||d&&e-a>=o}function m(){var e=Rl();if(f(e))return g(e);s=setTimeout(m,function(e){var t=n-(e-u);return d?Gl(t,o-(e-a)):t}(e))}function g(e){return s=void 0,h&&l?p(e):(l=i=void 0,r)}function v(){var e=Rl(),t=f(e);if(l=arguments,i=this,u=e,t){if(void 0===s)return function(e){return a=e,s=setTimeout(m,n),c?p(e):r}(u);if(d)return clearTimeout(s),s=setTimeout(m,n),p(u)}return void 0===s&&(s=setTimeout(m,n)),r}return n=ql(n)||0,C(t)&&(c=!!t.leading,o=(d="maxWait"in t)?$l(ql(t.maxWait)||0,n):o,h="trailing"in t?!!t.trailing:h),v.cancel=function(){void 0!==s&&clearTimeout(s),a=0,l=u=i=s=void 0},v.flush=function(){return void 0===s?r:g(Rl())},v};class Jl extends _l{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Kl(e=>this.document.fire("selectionChangeDone",e),200)}observe(){const e=this.document;e.on("keydown",(n,t)=>{e.selection.isFake&&function(e){return e==Dt.arrowright||e==Dt.arrowleft||e==Dt.arrowup||e==Dt.arrowdown}(t.keyCode)&&this.isEnabled&&(t.preventDefault(),this._handleSelectionMove(t.keyCode))},{priority:"lowest"})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const n=this.document.selection,t=new at(n.getRanges(),{backward:n.isBackward,fake:!1});e!=Dt.arrowleft&&e!=Dt.arrowup||t.setTo(t.getFirstPosition()),e!=Dt.arrowright&&e!=Dt.arrowdown||t.setTo(t.getLastPosition());const l={oldSelection:n,newSelection:t,domSelection:null};this.document.fire("selectionChange",l),this._fireSelectionChangeDoneDebounced(l)}}class Ql extends _l{constructor(e){super(e),this.mutationObserver=e.getObserver(jl),this.selection=this.document.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Kl(e=>this.document.fire("selectionChangeDone",e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const n=e.ownerDocument;this._documents.has(n)||(this.listenTo(n,"selectionchange",()=>{this._handleSelectionChange(n)}),this._documents.add(n))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(!this.isEnabled||!this.document.isFocused&&!this.document.isReadOnly)return;this.mutationObserver.flush();const n=e.defaultView.getSelection(),t=this.domConverter.domSelectionToView(n);if(!(this.selection.isEqual(t)&&this.domConverter.isDomSelectionCorrect(n)||++this._loopbackCounter>60))if(this.selection.isSimilar(t))this.view.forceRender();else{const e={oldSelection:this.selection,newSelection:t,domSelection:n};this.document.fire("selectionChange",e),this._fireSelectionChangeDoneDebounced(e)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class Zl extends Fl{constructor(e){super(e),this.domEventType=["focus","blur"],this.useCapture=!0;const n=this.document;n.on("focus",()=>{n.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.forceRender(),50)}),n.on("blur",(t,l)=>{const i=n.selection.editableElement;null!==i&&i!==l.target||(n.isFocused=!1,e.forceRender())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class Xl extends Fl{constructor(e){super(e),this.domEventType=["compositionstart","compositionupdate","compositionend"];const n=this.document;n.on("compositionstart",()=>{n.isComposing=!0}),n.on("compositionend",()=>{n.isComposing=!1})}onDomEvent(e){this.fire(e.type,e)}}class ei extends Fl{constructor(e){super(e),this.domEventType=["beforeinput"]}onDomEvent(e){this.fire(e.type,e)}}function ni(e){return"[object Range]"==Object.prototype.toString.apply(e)}function ti(e){const n=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(n.borderTopWidth,10),right:parseInt(n.borderRightWidth,10),bottom:parseInt(n.borderBottomWidth,10),left:parseInt(n.borderLeftWidth,10)}}const li=["top","right","bottom","left","width","height"];class ii{constructor(e){const n=ni(e);if(Object.defineProperty(this,"_source",{value:e._source||e,writable:!0,enumerable:!1}),rn(e)||n)oi(this,n?ii.getDomRangeRects(e)[0]:e.getBoundingClientRect());else if(fl(e)){const{innerWidth:n,innerHeight:t}=e;oi(this,{top:0,right:n,bottom:t,left:0,width:n,height:t})}else oi(this,e)}clone(){return new ii(this)}moveTo(e,n){return this.top=n,this.right=e+this.width,this.bottom=n+this.height,this.left=e,this}moveBy(e,n){return this.top+=n,this.right+=e,this.left+=e,this.bottom+=n,this}getIntersection(e){const n={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)};return n.width=n.right-n.left,n.height=n.bottom-n.top,n.width<0||n.height<0?null:new ii(n)}getIntersectionArea(e){const n=this.getIntersection(e);return n?n.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let n=this.clone();if(!ri(e)){let t=e.parentNode||e.commonAncestorContainer;for(;t&&!ri(t);){const e=new ii(t),l=n.getIntersection(e);if(!l)return null;l.getArea()gi(e,l));const r=gi(e,l);if(ui(l,r,n),l.parent!=l){if(i=l.frameElement,l=l.parent,!i)return}else l=null}}function ui(e,n,t){const l=n.clone().moveBy(0,t),i=n.clone().moveBy(0,-t),o=new ii(e).excludeScrollbarsAndBorders();if(![i,l].every(e=>o.contains(e))){let{scrollX:r,scrollY:s}=e;di(i,o)?s-=o.top-n.top+t:ci(l,o)&&(s+=n.bottom-o.bottom+t),hi(n,o)?r-=o.left-n.left+t:pi(n,o)&&(r+=n.right-o.right+t),e.scrollTo(r,s)}}function ai(e,n){const t=fi(e);let l,i;for(;e!=t.document.body;)i=n(),(l=new ii(e).excludeScrollbarsAndBorders()).contains(i)||(di(i,l)?e.scrollTop-=l.top-i.top:ci(i,l)&&(e.scrollTop+=i.bottom-l.bottom),hi(i,l)?e.scrollLeft-=l.left-i.left:pi(i,l)&&(e.scrollLeft+=i.right-l.right)),e=e.parentNode}function ci(e,n){return e.bottom>n.bottom}function di(e,n){return e.topn.right}function fi(e){return ni(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function mi(e){if(ni(e)){let n=e.commonAncestorContainer;return Bt(n)&&(n=n.parentNode),n}return e.parentNode}function gi(e,n){const t=fi(e),l=new ii(e);if(t===n)return l;{let e=t;for(;e!=n;){const n=new ii(e.frameElement).excludeScrollbarsAndBorders();l.moveBy(n.left,n.top),e=e.parent}}return l}Object.assign({},{scrollViewportToShowTarget:si,scrollAncestorsToShowTarget:function(e){ai(mi(e),()=>new ii(e))}});class vi{constructor(){this.document=new ht,this.domConverter=new dl,this.domRoots=new Map,this.set("isRenderingInProgress",!1),this._renderer=new il(this.domConverter,this.document.selection),this._renderer.bind("isFocused").to(this.document),this._initialDomRootAttributes=new WeakMap,this._observers=new Map,this._ongoingChange=!1,this._postFixersInProgress=!1,this._renderingDisabled=!1,this._hasChangedSinceTheLastRendering=!1,this._writer=new Et(this.document),this.addObserver(jl),this.addObserver(Ql),this.addObserver(Zl),this.addObserver(Nl),this.addObserver(Jl),this.addObserver(Xl),Mt&&this.addObserver(ei),function(e){e.document.on("keydown",Jt)}(this),function(e){e.document.on("keydown",(n,t)=>function(e,n,t){if(n.keyCode==Dt.arrowright){const e=n.domTarget.ownerDocument.defaultView.getSelection(),l=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(l||n.shiftKey){const n=t.domPositionToView(e.focusNode,e.focusOffset);if(null===n)return;let i=!1;const o=n.getLastMatchingPosition(e=>(e.item.is("uiElement")&&(i=!0),!(!e.item.is("uiElement")&&!e.item.is("attributeElement"))));if(i){const n=t.viewPositionToDom(o);l?e.collapse(n.parent,n.offset):e.extend(n.parent,n.offset)}}}}(0,t,e.domConverter))}(this),this.on("render",()=>{this._render(),this.document.fire("layoutChanged"),this._hasChangedSinceTheLastRendering=!1}),this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=!0})}attachDomRoot(e,n="main"){const t=this.document.getRoot(n);t._name=e.tagName.toLowerCase();const l={};for(const{name:o,value:r}of Array.from(e.attributes))l[o]=r,"class"===o?this._writer.addClass(r.split(" "),t):this._writer.setAttribute(o,r,t);this._initialDomRootAttributes.set(e,l);const i=()=>{this._writer.setAttribute("contenteditable",!t.isReadOnly,t),t.isReadOnly?this._writer.addClass("ck-read-only",t):this._writer.removeClass("ck-read-only",t)};i(),this.domRoots.set(n,e),this.domConverter.bindElements(e,t),this._renderer.markToSync("children",t),this._renderer.markToSync("attributes",t),this._renderer.domDocuments.add(e.ownerDocument),t.on("change:children",(e,n)=>this._renderer.markToSync("children",n)),t.on("change:attributes",(e,n)=>this._renderer.markToSync("attributes",n)),t.on("change:text",(e,n)=>this._renderer.markToSync("text",n)),t.on("change:isReadOnly",()=>this.change(i)),t.on("change",()=>{this._hasChangedSinceTheLastRendering=!0});for(const o of this._observers.values())o.observe(e,n)}detachDomRoot(e){const n=this.domRoots.get(e);Array.from(n.attributes).forEach(({name:e})=>n.removeAttribute(e));const t=this._initialDomRootAttributes.get(n);for(const l in t)n.setAttribute(l,t[l]);this.domRoots.delete(e),this.domConverter.unbindDomElement(n)}getDomRoot(e="main"){return this.domRoots.get(e)}addObserver(e){let n=this._observers.get(e);if(n)return n;n=new e(this),this._observers.set(e,n);for(const[t,l]of this.domRoots)n.observe(l,t);return n.enable(),n}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&&si({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 an.b("cannot-change-view-tree: Attempting to make changes to the view when it is in an incorrect state: rendering or post-fixers are in progress. This may cause some unexpected behavior and inconsistency between the DOM and the view.",this);try{if(this._ongoingChange)return e(this._writer);this._ongoingChange=!0;const n=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")),n}catch(e){an.b.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,n){return ot._createAt(e,n)}createPositionAfter(e){return ot._createAfter(e)}createPositionBefore(e){return ot._createBefore(e)}createRange(e,n){return new rt(e,n)}createRangeOn(e){return rt._createOn(e)}createRangeIn(e){return rt._createIn(e)}createSelection(e,n,t){return new at(e,n,t)}_disableRendering(e){this._renderingDisabled=e,0==e&&this.change(()=>{})}_render(){this.isRenderingInProgress=!0,this.disableObservers(),this._renderer.render(),this.enableObservers(),this.isRenderingInProgress=!1}}function _i(e){return _(e)?Tn(e):new Map(e)}kn(vi,Gn);class yi{constructor(e){this.parent=null,this._attrs=_i(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new an.b("model-node-not-found-in-parent: The node's parent does not contain this node.",this);return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new an.b("model-node-not-found-in-parent: The node's parent does not contain this node.",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}get document(){return this.root==this?null:this.root.document||null}getPath(){const e=[];let n=this;for(;n.parent;)e.unshift(n.startOffset),n=n.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const n=[];let t=e.includeSelf?this:this.parent;for(;t;)n[e.parentFirst?"push":"unshift"](t),t=t.parent;return n}getCommonAncestor(e,n={}){const t=this.getAncestors(n),l=e.getAncestors(n);let i=0;for(;t[i]==l[i]&&t[i];)i++;return 0===i?null:t[i-1]}isBefore(e){if(this==e)return!1;if(this.root!==e.root)return!1;const n=this.getPath(),t=e.getPath(),l=Mn(n,t);switch(l){case"prefix":return!0;case"extension":return!1;default:return n[l](e[n[0]]=n[1],e),{})),e}is(e){return"node"==e||"model:node"==e}_clone(){return new yi(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(e,n){this._attrs.set(e,n)}_setAttributesTo(e){this._attrs=_i(e)}_removeAttribute(e){return this._attrs.delete(e)}_clearAttributes(){this._attrs.clear()}}class bi extends yi{constructor(e,n){super(n),this._data=e||""}get offsetSize(){return this.data.length}get data(){return this._data}is(e){return"text"==e||"model:text"==e||super.is(e)}toJSON(){const e=super.toJSON();return e.data=this.data,e}_clone(){return new bi(this.data,this.getAttributes())}static fromJSON(e){return new bi(e.data,e.attributes)}}class wi{constructor(e,n,t){if(this.textNode=e,n<0||n>e.offsetSize)throw new an.b("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this);if(t<0||n+t>e.offsetSize)throw new an.b("model-textproxy-wrong-length: Given length value is incorrect.",this);this.data=e.data.substring(n,n+t),this.offsetInText=n}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}get document(){return this.textNode.document}is(e){return"textProxy"==e||"model:textProxy"==e}getPath(){const e=this.textNode.getPath();return e.length>0&&(e[e.length-1]+=this.offsetInText),e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const n=[];let t=e.includeSelf?this:this.parent;for(;t;)n[e.parentFirst?"push":"unshift"](t),t=t.parent;return n}hasAttribute(e){return this.textNode.hasAttribute(e)}getAttribute(e){return this.textNode.getAttribute(e)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class ki{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,n)=>e+n.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const n=this._nodes.indexOf(e);return-1==n?null:n}getNodeStartOffset(e){const n=this.getNodeIndex(e);return null===n?null:this._nodes.slice(0,n).reduce((e,n)=>e+n.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const n=this._nodes[e];if(!n)throw new an.b("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this);return this.getNodeStartOffset(n)}offsetToIndex(e){let n=0;for(const t of this._nodes){if(e>=n&&ee.toJSON())}}class Mi extends yi{constructor(e,n,t){super(n),this.name=e,this._children=new ki,t&&this._insertChild(0,t)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,n=null){const t=e.replace(/^model:/,"");return n?"element"==t&&n==this.name:"element"==t||t==this.name||super.is(e)}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 n=this;for(const t of e)n=n.getChild(n.offsetToIndex(t));return n}toJSON(){const e=super.toJSON();if(e.name=this.name,this._children.length>0){e.children=[];for(const n of this._children)e.children.push(n.toJSON())}return e}_clone(e=!1){const n=e?Array.from(this._children).map(e=>e._clone(!0)):null;return new Mi(this.name,this.getAttributes(),n)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,n){const t=function(e){return"string"==typeof e?[new bi(e)]:(Ln(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new bi(e):e instanceof wi?new bi(e.data,e.getAttributes()):e))}(n);for(const l of t)null!==l.parent&&l._remove(),l.parent=this;this._children._insertNodes(e,t)}_removeChildren(e,n=1){const t=this._children._removeNodes(e,n);for(const l of t)l.parent=null;return t}static fromJSON(e){let n=null;if(e.children){n=[];for(const t of e.children)n.push(t.name?Mi.fromJSON(t):bi.fromJSON(t))}return new Mi(e.name,e.attributes,n)}}class Ci{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new an.b("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null);const n=e.direction||"forward";if("forward"!=n&&"backward"!=n)throw new an.b("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",e,{direction:n});this.direction=n,this.boundaries=e.boundaries||null,this.position=e.startPosition?e.startPosition.clone():Di._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 n,t,l,i;do{l=this.position,i=this._visitedParent,({done:n,value:t}=this.next())}while(!n&&e(t));n||(this.position=l,this._visitedParent=i)}next(){return"forward"==this.direction?this._next():this._previous()}_next(){const e=this.position,n=this.position.clone(),t=this._visitedParent;if(null===t.parent&&n.offset===t.maxOffset)return{done:!0};if(t===this._boundaryEndParent&&n.offset==this.boundaries.end.offset)return{done:!0};const l=n.textNode?n.textNode:n.nodeAfter;if(l instanceof Mi)return this.shallow?n.offset++:(n.path.push(0),this._visitedParent=l),this.position=n,xi("elementStart",l,e,n,1);if(l instanceof bi){let i;if(this.singleCharacters)i=1;else{let e=l.endOffset;this._boundaryEndParent==t&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),i=n.offset-e}const o=new wi(l,n.offset-l.startOffset-i,i);return n.offset-=i,this.position=n,xi("text",o,e,n,i)}return n.path.pop(),this.position=n,this._visitedParent=t.parent,xi("elementStart",t,e,n,1)}}function xi(e,n,t,l,i){return{done:!1,value:{type:e,item:n,previousPosition:t,nextPosition:l,length:i}}}class Di{constructor(e,n,t="toNone"){if(!e.is("element")&&!e.is("documentFragment"))throw new an.b("model-position-root-invalid: Position root invalid.",e);if(!(n instanceof Array)||0===n.length)throw new an.b("model-position-path-incorrect-format: Position path must be an array with at least one item.",e,{path:n});n=e.getPath().concat(n),this.root=e=e.root,this.path=n,this.stickiness=t}get offset(){return function(e){var n=null==e?0:e.length;return n?e[n-1]:void 0}(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let n=0;nt.path.length){if(n.offset!==l.maxOffset)return!1;n.path=n.path.slice(0,-1),l=l.parent,n.offset++}else{if(0!==t.offset)return!1;t.path=t.path.slice(0,-1)}}}is(e){return"position"==e||"model:position"==e}hasSameParentAs(e){return this.root===e.root&&"same"==Mn(this.getParentPath(),e.getParentPath())}getTransformedByOperation(e){let n;switch(e.type){case"insert":n=this._getTransformedByInsertOperation(e);break;case"move":case"remove":case"reinsert":n=this._getTransformedByMoveOperation(e);break;case"split":n=this._getTransformedBySplitOperation(e);break;case"merge":n=this._getTransformedByMergeOperation(e);break;default:n=Di._createAt(this)}return n}_getTransformedByInsertOperation(e){return this._getTransformedByInsertion(e.position,e.howMany)}_getTransformedByMoveOperation(e){return this._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}_getTransformedBySplitOperation(e){const n=e.movedRange;return n.containsPosition(this)||n.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 n=e.movedRange;let t;return n.containsPosition(this)||n.start.isEqual(this)?(t=this._getCombined(e.sourcePosition,e.targetPosition),e.sourcePosition.isBefore(e.targetPosition)&&(t=t._getTransformedByDeletion(e.deletionPosition,1))):t=this.isEqual(e.deletionPosition)?Di._createAt(e.deletionPosition):this._getTransformedByMove(e.deletionPosition,e.graveyardPosition,1),t}_getTransformedByDeletion(e,n){const t=Di._createAt(this);if(this.root!=e.root)return t;if("same"==Mn(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;t.offset-=n}}else if("prefix"==Mn(e.getParentPath(),this.getParentPath())){const l=e.path.length-1;if(e.offset<=this.path[l]){if(e.offset+n>this.path[l])return null;t.path[l]-=n}}return t}_getTransformedByInsertion(e,n){const t=Di._createAt(this);if(this.root!=e.root)return t;if("same"==Mn(e.getParentPath(),this.getParentPath()))(e.offsetn+1;){const n=l.maxOffset-t.offset;0!==n&&e.push(new Si(t,t.getShiftedBy(n))),t.path=t.path.slice(0,-1),t.offset++,l=l.parent}for(;t.path.length<=this.end.path.length;){const n=this.end.path[t.path.length-1],l=n-t.offset;0!==l&&e.push(new Si(t,t.getShiftedBy(l))),t.offset=n,t.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Ci(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const n=new Ci(e);for(const t of n)yield t.item}*getPositions(e={}){e.boundaries=this;const n=new Ci(e);yield n.position;for(const t of n)yield t.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 Si(this.start,this.end)]}getTransformedByOperations(e){const n=[new Si(this.start,this.end)];for(const t of e)for(let e=0;e0?new this(t,l):new this(l,t)}static _createIn(e){return new this(Di._createAt(e,0),Di._createAt(e,e.maxOffset))}static _createOn(e){return this._createFromPositionAndShift(Di._createBefore(e),e.offsetSize)}static _createFromRanges(e){if(0===e.length)throw new an.b("range-create-from-ranges-empty-array: At least one range has to be passed.",null);if(1==e.length)return e[0].clone();const n=e[0];e.sort((e,n)=>e.start.isAfter(n.start)?1:-1);const t=e.indexOf(n),l=new this(n.start,n.end);if(t>0)for(let i=t-1;e[i].end.isEqual(l.start);i++)l.start=Di._createAt(e[i].start);for(let i=t+1;i{if(n.viewPosition)return;const t=this._modelToViewMapping.get(n.modelPosition.parent);n.viewPosition=this._findPositionIn(t,n.modelPosition.offset)},{priority:"low"}),this.on("viewToModelPosition",(e,n)=>{if(n.modelPosition)return;const t=this.findMappedViewAncestor(n.viewPosition),l=this._viewToModelMapping.get(t),i=this._toModelOffset(n.viewPosition.parent,n.viewPosition.offset,t);n.modelPosition=Di._createAt(l,i)},{priority:"low"})}bindElements(e,n){this._modelToViewMapping.set(e,n),this._viewToModelMapping.set(n,e)}unbindViewElement(e){const n=this.toModelElement(e);if(this._viewToModelMapping.delete(e),this._elementToMarkerNames.has(e))for(const t of this._elementToMarkerNames.get(e))this._unboundMarkerNames.add(t);this._modelToViewMapping.get(n)==e&&this._modelToViewMapping.delete(n)}unbindModelElement(e){const n=this.toViewElement(e);this._modelToViewMapping.delete(e),this._viewToModelMapping.get(n)==e&&this._viewToModelMapping.delete(n)}bindElementToMarker(e,n){const t=this._markerNameToElements.get(n)||new Set;t.add(e);const l=this._elementToMarkerNames.get(e)||new Set;l.add(n),this._markerNameToElements.set(n,t),this._elementToMarkerNames.set(e,l)}unbindElementFromMarkerName(e,n){const t=this._markerNameToElements.get(n);t&&(t.delete(e),0==t.size&&this._markerNameToElements.delete(n));const l=this._elementToMarkerNames.get(e);l&&(l.delete(n),0==l.size&&this._elementToMarkerNames.delete(e))}flushUnboundMarkerNames(){const e=Array.from(this._unboundMarkerNames);return this._unboundMarkerNames.clear(),e}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._markerNameToElements=new Map,this._elementToMarkerNames=new Map,this._unboundMarkerNames=new Set}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new Si(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new rt(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const n={viewPosition:e,mapper:this};return this.fire("viewToModelPosition",n),n.modelPosition}toViewPosition(e,n={isPhantom:!1}){const t={modelPosition:e,mapper:this,isPhantom:n.isPhantom};return this.fire("modelToViewPosition",t),t.viewPosition}markerNameToElements(e){const n=this._markerNameToElements.get(e);if(!n)return null;const t=new Set;for(const l of n)if(l.is("attributeElement"))for(const e of l.getElementsWithSameId())t.add(e);else t.add(l);return t}registerViewToModelLength(e,n){this._viewToModelLengthCallbacks.set(e,n)}findMappedViewAncestor(e){let n=e.parent;for(;!this._viewToModelMapping.has(n);)n=n.parent;return n}_toModelOffset(e,n,t){if(t!=e)return this._toModelOffset(e.parent,e.index,t)+this._toModelOffset(e,n,e);if(e.is("text"))return n;let l=0;for(let i=0;i1?n[0]+":"+n[1]:n[0]}class Ai{constructor(e){this.conversionApi=Bn({dispatcher:this},e)}convertChanges(e,n,t){for(const l of e.getMarkersToRemove())this.convertMarkerRemove(l.name,l.range,t);for(const l of e.getChanges())"insert"==l.type?this.convertInsert(Si._createFromPositionAndShift(l.position,l.length),t):"remove"==l.type?this.convertRemove(l.position,l.length,l.name,t):this.convertAttribute(l.range,l.attributeKey,l.attributeOldValue,l.attributeNewValue,t);for(const l of this.conversionApi.mapper.flushUnboundMarkerNames()){const e=n.get(l).getRange();this.convertMarkerRemove(l,e,t),this.convertMarkerAdd(l,e,t)}for(const l of e.getMarkersToAdd())this.convertMarkerAdd(l.name,l.range,t)}convertInsert(e,n){this.conversionApi.writer=n,this.conversionApi.consumable=this._createInsertConsumable(e);for(const t of e){const e=t.item,n={item:e,range:Si._createFromPositionAndShift(t.previousPosition,t.length)};this._testAndFire("insert",n);for(const t of e.getAttributeKeys())n.attributeKey=t,n.attributeOldValue=null,n.attributeNewValue=e.getAttribute(t),this._testAndFire("attribute:"+t,n)}this._clearConversionApi()}convertRemove(e,n,t,l){this.conversionApi.writer=l,this.fire("remove:"+t,{position:e,length:n},this.conversionApi),this._clearConversionApi()}convertAttribute(e,n,t,l,i){this.conversionApi.writer=i,this.conversionApi.consumable=this._createConsumableForRange(e,"attribute:"+n);for(const o of e){const e={item:o.item,range:Si._createFromPositionAndShift(o.previousPosition,o.length),attributeKey:n,attributeOldValue:t,attributeNewValue:l};this._testAndFire("attribute:"+n,e)}this._clearConversionApi()}convertSelection(e,n,t){const l=Array.from(n.getMarkersAtPosition(e.getFirstPosition()));if(this.conversionApi.writer=t,this.conversionApi.consumable=this._createSelectionConsumable(e,l),this.fire("selection",{selection:e},this.conversionApi),e.isCollapsed){for(const n of l){const t=n.getRange();if(!Ii(e.getFirstPosition(),n,this.conversionApi.mapper))continue;const l={item:e,markerName:n.name,markerRange:t};this.conversionApi.consumable.test(e,"addMarker:"+n.name)&&this.fire("addMarker:"+n.name,l,this.conversionApi)}for(const n of e.getAttributeKeys()){const t={item:e,range:e.getFirstRange(),attributeKey:n,attributeOldValue:null,attributeNewValue:e.getAttribute(n)};this.conversionApi.consumable.test(e,"attribute:"+t.attributeKey)&&this.fire("attribute:"+t.attributeKey+":$text",t,this.conversionApi)}this._clearConversionApi()}}convertMarkerAdd(e,n,t){if(!n.root.document||"$graveyard"==n.root.rootName)return;this.conversionApi.writer=t;const l="addMarker:"+e,i=new Li;if(i.add(n,l),this.conversionApi.consumable=i,this.fire(l,{markerName:e,markerRange:n},this.conversionApi),i.test(n,l)){this.conversionApi.consumable=this._createConsumableForRange(n,l);for(const t of n.getItems()){if(!this.conversionApi.consumable.test(t,l))continue;const i={item:t,range:Si._createOn(t),markerName:e,markerRange:n};this.fire(l,i,this.conversionApi)}this._clearConversionApi()}}convertMarkerRemove(e,n,t){n.root.document&&"$graveyard"!=n.root.rootName&&(this.conversionApi.writer=t,this.fire("removeMarker:"+e,{markerName:e,markerRange:n},this.conversionApi),this._clearConversionApi())}_createInsertConsumable(e){const n=new Li;for(const t of e){const e=t.item;n.add(e,"insert");for(const t of e.getAttributeKeys())n.add(e,"attribute:"+t)}return n}_createConsumableForRange(e,n){const t=new Li;for(const l of e.getItems())t.add(l,n);return t}_createSelectionConsumable(e,n){const t=new Li;t.add(e,"selection");for(const l of n)t.add(e,"addMarker:"+l.name);for(const l of e.getAttributeKeys())t.add(e,"attribute:"+l);return t}_testAndFire(e,n){this.conversionApi.consumable.test(n.item,e)&&this.fire(e+":"+(n.item.name||"$text"),n,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer,delete this.conversionApi.consumable}}function Ii(e,n,t){const l=n.getRange(),i=Array.from(e.getAncestors());return i.shift(),i.reverse(),!i.some(e=>{if(l.containsItem(e))return!!t.toViewElement(e).getCustomProperty("addHighlight")})}kn(Ai,mn);class Ei{constructor(e,n,t){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setTo(e,n,t)}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 n of this._ranges){let t=!1;for(const l of e._ranges)if(n.isEqual(l)){t=!0;break}if(!t)return!1}return!0}*getRanges(){for(const e of this._ranges)yield new Si(e.start,e.end)}getFirstRange(){let e=null;for(const n of this._ranges)e&&!n.start.isBefore(e.start)||(e=n);return e?new Si(e.start,e.end):null}getLastRange(){let e=null;for(const n of this._ranges)e&&!n.end.isAfter(e.end)||(e=n);return e?new Si(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,n,t){if(null===e)this._setRanges([]);else if(e instanceof Ei)this._setRanges(e.getRanges(),e.isBackward);else if(e&&"function"==typeof e.getRanges)this._setRanges(e.getRanges(),e.isBackward);else if(e instanceof Si)this._setRanges([e],!!n&&!!n.backward);else if(e instanceof Di)this._setRanges([new Si(e)]);else if(e instanceof yi){const l=!!t&&!!t.backward;let i;if("in"==n)i=Si._createIn(e);else if("on"==n)i=Si._createOn(e);else{if(void 0===n)throw new an.b("model-selection-setTo-required-second-parameter: selection.setTo requires the second parameter when the first parameter is a node.",[this,e]);i=new Si(Di._createAt(e,n))}this._setRanges([i],l)}else{if(!Ln(e))throw new an.b("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,e]);this._setRanges(e,n&&!!n.backward)}}_setRanges(e,n=!1){const t=(e=Array.from(e)).some(n=>{if(!(n instanceof Si))throw new an.b("model-selection-set-ranges-not-range: Selection range set to an object that is not an instance of model.Range.",[this,e]);return this._ranges.every(e=>!e.isEqual(n))});if(e.length!==this._ranges.length||t){this._removeAllRanges();for(const n of e)this._pushRange(n);this._lastRangeBackward=!!n,this.fire("change:range",{directChange:!0})}}setFocus(e,n){if(null===this.anchor)throw new an.b("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,e]);const t=Di._createAt(e,n);if("same"==t.compareWith(this.focus))return;const l=this.anchor;this._ranges.length&&this._popRange(),"before"==t.compareWith(l)?(this._pushRange(new Si(t,l)),this._lastRangeBackward=!0):(this._pushRange(new Si(l,t)),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,n){this.getAttribute(e)!==n&&(this._attrs.set(e,n),this.fire("change:attribute",{attributeKeys:[e],directChange:!0}))}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),n=e.start.nodeAfter;return n instanceof Mi&&n==e.end.nodeBefore?n:null}is(e){return"selection"==e||"model:selection"==e}*getSelectedBlocks(){const e=new WeakSet;for(const n of this.getRanges()){const t=Yi(n.start,e);t&&Fi(t,n)&&(yield t);for(const i of n.getWalker()){const t=i.item;"elementEnd"==i.type&&ji(t,e,n)&&(yield t)}const l=Yi(n.end,e);l&&!n.end.isTouching(Di._createAt(l,0))&&Fi(l,n)&&(yield l)}}containsEntireContent(e=this.anchor.root){const n=Di._createAt(e,0),t=Di._createAt(e,"end");return n.isTouching(this.getFirstPosition())&&t.isTouching(this.getLastPosition())}_pushRange(e){this._checkRange(e),this._ranges.push(new Si(e.start,e.end))}_checkRange(e){for(let n=0;n0;)this._popRange()}_popRange(){this._ranges.pop()}}function Oi(e,n){return!n.has(e)&&(n.add(e),e.document.model.schema.isBlock(e)&&e.parent)}function ji(e,n,t){return Oi(e,n)&&Fi(e,t)}function Yi(e,n){const t=e.parent.document.model.schema,l=e.parent.getAncestors({parentFirst:!0,includeSelf:!0});let i=!1;const o=l.find(e=>!i&&!(i=t.isLimit(e))&&Oi(e,n));return l.forEach(e=>n.add(e)),o}function Fi(e,n){const t=function(e){const n=e.document.model.schema;let t=e.parent;for(;t;){if(n.isBlock(t))return t;t=t.parent}}(e);return!t||!n.containsRange(Si._createOn(t),!0)}kn(Ei,mn);class Ni extends Si{constructor(e,n){super(e,n),(function(){this.listenTo(this.root.document.model,"applyOperation",(e,n)=>{const t=n[0];t.isDocumentOperation&&(function(e){const n=this.getTransformedByOperation(e),t=Si._createFromRanges(n),l=!t.isEqual(this),i=function(e,n){switch(n.type){case"insert":return e.containsPosition(n.position);case"move":case"remove":case"reinsert":case"merge":return e.containsPosition(n.sourcePosition)||e.start.isEqual(n.sourcePosition)||e.containsPosition(n.targetPosition);case"split":return e.containsPosition(n.splitPosition)||e.containsPosition(n.insertionPosition)}return!1}(this,e);let o=null;if(l){"$graveyard"==t.root.rootName&&(o="remove"==e.type?e.sourcePosition:e.deletionPosition);const n=this.toRange();this.start=t.start,this.end=t.end,this.fire("change:range",n,{deletionPosition:o})}else i&&this.fire("change:content",this.toRange(),{deletionPosition:o})}).call(this,t)},{priority:"low"})}).call(this)}detach(){this.stopListening()}is(e){return"liveRange"==e||"model:liveRange"==e||super.is(e)}toRange(){return new Si(this.start,this.end)}static fromRange(e){return new Ni(e.start,e.end)}}kn(Ni,mn);const Ri="selection:";class Vi{constructor(e){this._selection=new Hi(e),this._selection.delegate("change:range").to(this),this._selection.delegate("change:attribute").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)}is(e){return"selection"==e||"model:selection"==e||"documentSelection"==e||"model:documentSelection"==e}_setFocus(e,n){this._selection.setFocus(e,n)}_setTo(e,n,t){this._selection.setTo(e,n,t)}_setAttribute(e,n){this._selection.setAttribute(e,n)}_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 Ri+e}static _isStoreAttributeKey(e){return e.startsWith(Ri)}}kn(Vi,mn);class Hi extends Ei{constructor(e){super(),this.markers=new dt({idProperty:"name"}),this._model=e.model,this._document=e,this._attributePriority=new Map,this._fixGraveyardRangesData=[],this._hasChangedRange=!1,this._overriddenGravityRegister=new Set,this.listenTo(this._model,"applyOperation",(e,n)=>{const t=n[0];if(t.isDocumentOperation&&"marker"!=t.type&&"rename"!=t.type&&"noop"!=t.type){for(;this._fixGraveyardRangesData.length;){const{liveRange:e,sourcePosition:n}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(e,n)}this._hasChangedRange&&(this._hasChangedRange=!1,this.fire("change:range",{directChange:!1}))}},{priority:"lowest"}),this.on("change:range",()=>{for(const e of this.getRanges())if(!this._document._validateSelectionRange(e))throw new an.b("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:e})}),this.listenTo(this._model.markers,"update",()=>this._updateMarkers()),this.listenTo(this._document,"change",(e,n)=>{!function(e,n){const t=e.document.differ;for(const l of t.getChanges()){if("insert"!=l.type)continue;const t=l.position.parent;l.length===t.maxOffset&&e.enqueueChange(n,e=>{const n=Array.from(t.getAttributeKeys()).filter(e=>e.startsWith(Ri));for(const l of n)e.removeAttribute(l,t)})}}(this._model,n)})}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{this._hasChangedRange=!0,n.root==this._document.graveyard&&this._fixGraveyardRangesData.push({liveRange:n,sourcePosition:l.deletionPosition})}),n}_updateMarkers(){const e=[];for(const n of this._model.markers){const t=n.getRange();for(const l of this.getRanges())t.containsRange(l,!l.isCollapsed)&&e.push(n)}for(const n of e)this.markers.has(n)||this.markers.add(n);for(const n of Array.from(this.markers))e.includes(n)||this.markers.remove(n)}_updateAttributes(e){const n=_i(this._getSurroundingAttributes()),t=_i(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[i,o]of this._attributePriority)"low"==o&&(this._attrs.delete(i),this._attributePriority.delete(i));this._setAttributesTo(n);const l=[];for(const[i,o]of this.getAttributes())t.has(i)&&t.get(i)===o||l.push(i);for(const[i]of t)this.hasAttribute(i)||l.push(i);l.length>0&&this.fire("change:attribute",{attributeKeys:l,directChange:!1})}_setAttribute(e,n,t=!0){const l=t?"normal":"low";return("low"!=l||"normal"!=this._attributePriority.get(e))&&super.getAttribute(e)!==n&&(this._attrs.set(e,n),this._attributePriority.set(e,l),!0)}_removeAttribute(e,n=!0){const t=n?"normal":"low";return!("low"==t&&"normal"==this._attributePriority.get(e)||(this._attributePriority.set(e,t),!super.hasAttribute(e)||(this._attrs.delete(e),0)))}_setAttributesTo(e){const n=new Set;for(const[t,l]of this.getAttributes())e.get(t)!==l&&this._removeAttribute(t,!1);for(const[t,l]of e)this._setAttribute(t,l,!1)&&n.add(t);return n}*_getStoredAttributes(){const e=this.getFirstPosition().parent;if(this.isCollapsed&&e.isEmpty)for(const n of e.getAttributeKeys())n.startsWith(Ri)&&(yield[n.substr(Ri.length),e.getAttribute(n)])}_getSurroundingAttributes(){const e=this.getFirstPosition(),n=this._model.schema;let t=null;if(this.isCollapsed){const n=e.textNode?e.textNode:e.nodeBefore,l=e.textNode?e.textNode:e.nodeAfter;if(this.isGravityOverridden||(t=zi(n)),t||(t=zi(l)),!this.isGravityOverridden&&!t){let e=n;for(;e&&!t;)t=zi(e=e.previousSibling)}if(!t){let e=l;for(;e&&!t;)t=zi(e=e.nextSibling)}t||(t=this._getStoredAttributes())}else{const e=this.getFirstRange();for(const l of e){if(l.item.is("element")&&n.isObject(l.item))break;if("text"==l.type){t=l.item.getAttributes();break}}}return t}_fixGraveyardSelection(e,n){const t=n.clone(),l=this._model.schema.getNearestSelectionRange(t),i=this._ranges.indexOf(e);if(this._ranges.splice(i,1),e.detach(),l){const e=this._prepareRange(l);this._ranges.splice(i,0,e)}}}function zi(e){return e instanceof wi||e instanceof bi?e.getAttributes():null}class Bi{constructor(e){this._dispatchers=e}add(e){for(const n of this._dispatchers)e(n);return this}}var Ui=function(e){return ln(e,5)};class Wi extends Bi{elementToElement(e){return this.add(function(e){return(e=Ui(e)).view=$i(e.view,"container"),n=>{n.on("insert:"+e.model,function(e){return(n,t,l)=>{const i=e(t.item,l.writer);if(!i)return;if(!l.consumable.consume(t.item,"insert"))return;const o=l.mapper.toViewPosition(t.range.start);l.mapper.bindElements(t.item,i),l.writer.insert(o,i)}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}attributeToElement(e){return this.add(function(e){let n="attribute:"+((e=Ui(e)).model.key?e.model.key:e.model);if(e.model.name&&(n+=":"+e.model.name),e.model.values)for(const l of e.model.values)e.view[l]=$i(e.view[l],"attribute");else e.view=$i(e.view,"attribute");const t=Gi(e);return l=>{l.on(n,function(e){return(n,t,l)=>{const i=e(t.attributeOldValue,l.writer),o=e(t.attributeNewValue,l.writer);if(!i&&!o)return;if(!l.consumable.consume(t.item,n.name))return;const r=l.writer;if(t.item instanceof Ei||t.item instanceof Vi)r.wrap(r.document.selection.getFirstRange(),o);else{let e=l.mapper.toViewRange(t.range);null!==t.attributeOldValue&&i&&(e=r.unwrap(e,i)),null!==t.attributeNewValue&&o&&r.wrap(e,o)}}}(t),{priority:e.converterPriority||"normal"})}}(e))}attributeToAttribute(e){return this.add(function(e){let n="attribute:"+((e=Ui(e)).model.key?e.model.key:e.model);if(e.model.name&&(n+=":"+e.model.name),e.model.values)for(const l of e.model.values)e.view[l]=Ki(e.view[l]);else e.view=Ki(e.view);const t=Gi(e);return l=>{l.on(n,function(e){return(n,t,l)=>{const i=e(t.attributeOldValue,t),o=e(t.attributeNewValue,t);if(!i&&!o)return;if(!l.consumable.consume(t.item,n.name))return;const r=l.mapper.toViewElement(t.item),s=l.writer;if(!r)throw new an.b("conversion-attribute-to-attribute-on-text: Trying to convert text node's attribute with attribute-to-attribute converter.",[t,l]);if(null!==t.attributeOldValue&&i)if("class"==i.key){const e=Array.isArray(i.value)?i.value:[i.value];for(const n of e)s.removeClass(n,r)}else if("style"==i.key){const e=Object.keys(i.value);for(const n of e)s.removeStyle(n,r)}else s.removeAttribute(i.key,r);if(null!==t.attributeNewValue&&o)if("class"==o.key){const e=Array.isArray(o.value)?o.value:[o.value];for(const n of e)s.addClass(n,r)}else if("style"==o.key){const e=Object.keys(o.value);for(const n of e)s.setStyle(n,o.value[n],r)}else s.setAttribute(o.key,o.value,r)}}(t),{priority:e.converterPriority||"normal"})}}(e))}markerToElement(e){return this.add(function(e){return(e=Ui(e)).view=$i(e.view,"ui"),n=>{n.on("addMarker:"+e.model,function(e){return(n,t,l)=>{t.isOpening=!0;const i=e(t,l.writer);t.isOpening=!1;const o=e(t,l.writer);if(!i||!o)return;const r=t.markerRange;if(r.isCollapsed&&!l.consumable.consume(r,n.name))return;for(const e of r)if(!l.consumable.consume(e.item,n.name))return;const s=l.mapper,u=l.writer;u.insert(s.toViewPosition(r.start),i),l.mapper.bindElementToMarker(i,t.markerName),r.isCollapsed||(u.insert(s.toViewPosition(r.end),o),l.mapper.bindElementToMarker(o,t.markerName)),n.stop()}}(e.view),{priority:e.converterPriority||"normal"}),n.on("removeMarker:"+e.model,(e,n,t)=>{const l=t.mapper.markerNameToElements(n.markerName);if(l){for(const e of l)t.mapper.unbindElementFromMarkerName(e,n.markerName),t.writer.clear(t.writer.createRangeOn(e),e);t.writer.clearClonedElementsGroup(n.markerName),e.stop()}},{priority:e.converterPriority||"normal"})}}(e))}markerToHighlight(e){return this.add(function(e){return n=>{n.on("addMarker:"+e.model,function(e){return(n,t,l)=>{if(!t.item)return;if(!(t.item instanceof Ei||t.item instanceof Vi||t.item.is("textProxy")))return;const i=Ji(e,t,l);if(!i)return;if(!l.consumable.consume(t.item,n.name))return;const o=qi(i),r=l.writer,s=r.document.selection;if(t.item instanceof Ei||t.item instanceof Vi)r.wrap(s.getFirstRange(),o,s);else{const e=l.mapper.toViewRange(t.range),n=r.wrap(e,o);for(const i of n.getItems())if(i.is("attributeElement")&&i.isSimilar(o)){l.mapper.bindElementToMarker(i,t.markerName);break}}}}(e.view),{priority:e.converterPriority||"normal"}),n.on("addMarker:"+e.model,function(e){return(n,t,l)=>{if(!t.item)return;if(!(t.item instanceof Mi))return;const i=Ji(e,t,l);if(!i)return;if(!l.consumable.test(t.item,n.name))return;const o=l.mapper.toViewElement(t.item);if(o&&o.getCustomProperty("addHighlight")){l.consumable.consume(t.item,n.name);for(const e of Si._createIn(t.item))l.consumable.consume(e.item,n.name);o.getCustomProperty("addHighlight")(o,i,l.writer),l.mapper.bindElementToMarker(o,t.markerName)}}}(e.view),{priority:e.converterPriority||"normal"}),n.on("removeMarker:"+e.model,function(e){return(n,t,l)=>{if(t.markerRange.isCollapsed)return;const i=Ji(e,t,l);if(!i)return;const o=qi(i),r=l.mapper.markerNameToElements(t.markerName);if(r){for(const e of r)l.mapper.unbindElementFromMarkerName(e,t.markerName),e.is("attributeElement")?l.writer.unwrap(l.writer.createRangeOn(e),o):e.getCustomProperty("removeHighlight")(e,i.id,l.writer);l.writer.clearClonedElementsGroup(t.markerName),n.stop()}}}(e.view),{priority:e.converterPriority||"normal"})}}(e))}}function qi(e){const n=new pt("span",e.attributes);return e.classes&&n._addClass(e.classes),e.priority&&(n._priority=e.priority),n._id=e.id,n}function $i(e,n){return"function"==typeof e?e:(t,l)=>function(e,n,t){let l;"string"==typeof e&&(e={name:e});const i=Object.assign({},e.attributes);if(l="container"==t?n.createContainerElement(e.name,i):"attribute"==t?n.createAttributeElement(e.name,i,{priority:e.priority||pt.DEFAULT_PRIORITY}):n.createUIElement(e.name,i),e.styles){const t=Object.keys(e.styles);for(const i of t)n.setStyle(i,e.styles[i],l)}if(e.classes){const t=e.classes;if("string"==typeof t)n.addClass(t,l);else for(const e of t)n.addClass(e,l)}return l}(e,l,n)}function Gi(e){return e.model.values?(n,t)=>{const l=e.view[n];return l?l(n,t):null}:e.view}function Ki(e){return"string"==typeof e?n=>({key:e,value:n}):"object"==typeof e?e.value?()=>e:n=>({key:e.key,value:n}):e}function Ji(e,n,t){const l="function"==typeof e?e(n,t):e;return l?(l.priority||(l.priority=10),l.id||(l.id=n.markerName),l):null}class Qi extends Bi{elementToElement(e){return this.add(Zi(e))}elementToAttribute(e){return this.add(function(e){eo(e=Ui(e));const n=no(e,!1),t=Xi(e.view),l=t?"element:"+t:"element";return t=>{t.on(l,n,{priority:e.converterPriority||"low"})}}(e))}attributeToAttribute(e){return this.add(function(e){let n=null;("string"==typeof(e=Ui(e)).view||e.view.key)&&(n=function(e){"string"==typeof e.view&&(e.view={key:e.view});const n=e.view.key;let t;return t="class"==n||"style"==n?{["class"==n?"classes":"styles"]:e.view.value}:{attributes:{[n]:void 0===e.view.value?/[\s\S]*/:e.view.value}},e.view.name&&(t.name=e.view.name),e.view=t,n}(e)),eo(e,n);const t=no(e,!0);return n=>{n.on("element",t,{priority:e.converterPriority||"low"})}}(e))}elementToMarker(e){return this.add(function(e){return function(e){const n=e.model;e.model=(e,t)=>{const l="string"==typeof n?n:n(e);return t.createElement("$marker",{"data-name":l})}}(e=Ui(e)),Zi(e)}(e))}}function Zi(e){const n=function(e){const n=e.view?new Pn(e.view):null;return(t,l,i)=>{let o={};if(n){const e=n.match(l.viewItem);if(!e)return;o=e.match}o.name=!0;const r=function(e,n,t){return e instanceof Function?e(n,t):t.createElement(e)}(e.model,l.viewItem,i.writer);if(!r)return;if(!i.consumable.test(l.viewItem,o))return;const s=i.splitToAllowedParent(r,l.modelCursor);if(!s)return;i.writer.insert(r,s.position),i.convertChildren(l.viewItem,i.writer.createPositionAt(r,0)),i.consumable.consume(l.viewItem,o);const u=i.getSplitParts(r);l.modelRange=new Si(i.writer.createPositionBefore(r),i.writer.createPositionAfter(u[u.length-1])),l.modelCursor=s.cursorParent?i.writer.createPositionAt(s.cursorParent,0):l.modelRange.end}}(e=Ui(e)),t=Xi(e.view),l=t?"element:"+t:"element";return t=>{t.on(l,n,{priority:e.converterPriority||"normal"})}}function Xi(e){return"string"==typeof e?e:"object"==typeof e&&"string"==typeof e.name?e.name:null}function eo(e,n=null){const t=null===n||(e=>e.getAttribute(n));e.model={key:"object"!=typeof e.model?e.model:e.model.key,value:"object"!=typeof e.model||void 0===e.model.value?t:e.model.value}}function no(e,n){const t=new Pn(e.view);return(l,i,o)=>{const r=t.match(i.viewItem);if(!r)return;const s=e.model.key,u="function"==typeof e.model.value?e.model.value(i.viewItem):e.model.value;null!==u&&(function(e,n){const t="function"==typeof e?e(n):e;return!("object"==typeof t&&!Xi(t)||t.classes||t.attributes||t.styles)}(e.view,i.viewItem)?r.match.name=!0:delete r.match.name,o.consumable.test(i.viewItem,r.match)&&(i.modelRange||(i=Object.assign(i,o.convertChildren(i.viewItem,i.modelCursor))),function(e,n,t,l){let i=!1;for(const o of Array.from(e.getItems({shallow:t})))l.schema.checkAttribute(o,n.key)&&(l.writer.setAttribute(n.key,n.value,o),i=!0);return i}(i.modelRange,{key:s,value:u},n,o)&&o.consumable.consume(i.viewItem,r.match)))}}class to{constructor(e){this.model=e,this.view=new vi,this.mapper=new Ti,this.downcastDispatcher=new Ai({mapper:this.mapper});const n=this.model.document,t=n.selection,l=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(n,"change",()=>{this.view.change(e=>{this.downcastDispatcher.convertChanges(n.differ,l,e),this.downcastDispatcher.convertSelection(t,l,e)})},{priority:"low"}),this.listenTo(this.view.document,"selectionChange",function(e,n){return(t,l)=>{const i=l.newSelection,o=new Ei,r=[];for(const e of i.getRanges())r.push(n.toModelRange(e));o.setTo(r,{backward:i.isBackward}),o.isEqual(e.document.selection)||e.change(e=>{e.setSelection(o)})}}(this.model,this.mapper)),this.downcastDispatcher.on("insert:$text",(e,n,t)=>{if(!t.consumable.consume(n.item,"insert"))return;const l=t.writer,i=t.mapper.toViewPosition(n.range.start),o=l.createText(n.item.data);l.insert(i,o)},{priority:"lowest"}),this.downcastDispatcher.on("remove",(e,n,t)=>{const l=t.mapper.toViewPosition(n.position),i=n.position.getShiftedBy(n.length),o=t.mapper.toViewPosition(i,{isPhantom:!0}),r=t.writer.createRange(l,o),s=t.writer.remove(r.getTrimmed());for(const u of t.writer.createRangeIn(s).getItems())t.mapper.unbindViewElement(u)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,n,t)=>{const l=t.writer,i=l.document.selection;for(const o of i.getRanges())o.isCollapsed&&o.end.parent.document&&t.writer.mergeAttributes(o.start);l.setSelection(null)},{priority:"low"}),this.downcastDispatcher.on("selection",(e,n,t)=>{const l=n.selection;if(l.isCollapsed)return;if(!t.consumable.consume(l,"selection"))return;const i=[];for(const o of l.getRanges()){const e=t.mapper.toViewRange(o);i.push(e)}t.writer.setSelection(i,{backward:l.isBackward})},{priority:"low"}),this.downcastDispatcher.on("selection",(e,n,t)=>{const l=n.selection;if(!l.isCollapsed)return;if(!t.consumable.consume(l,"selection"))return;const i=t.writer,o=l.getFirstPosition(),r=t.mapper.toViewPosition(o),s=i.breakAttributes(r);i.setSelection(s)},{priority:"low"}),this.view.document.roots.bindTo(this.model.document.roots).using(e=>{if("$graveyard"==e.rootName)return null;const n=new lt(e.name);return n.rootName=e.rootName,n._document=this.view.document,this.mapper.bindElements(e,n),n})}destroy(){this.view.destroy(),this.stopListening()}}kn(to,Gn);class lo{constructor(e,n=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const t of n)this._availablePlugins.set(t,t),t.pluginName&&this._availablePlugins.set(t.pluginName,t)}*[Symbol.iterator](){for(const e of this._plugins)"function"==typeof e[0]&&(yield e)}get(e){const n=this._plugins.get(e);if(!n){let n=e;throw"function"==typeof e&&(n=e.pluginName||e.name),new an.b("plugincollection-plugin-not-loaded: The requested plugin is not loaded.",this._editor,{plugin:n})}return n}has(e){return this._plugins.has(e)}init(e,n=[]){const t=this,l=this._editor,i=new Set,o=[],r=d(e),s=d(n),u=function(e){const n=[];for(const t of e)c(t)||n.push(t);return n.length?n:null}(e);if(u){const e="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";return console.error(Object(an.a)(e),{plugins:u}),Promise.reject(new an.b(e,this._editor,{plugins:u}))}return Promise.all(r.map((function e(r){if(!s.includes(r)&&!t._plugins.has(r)&&!i.has(r))return function(r){return new Promise(s=>{i.add(r),r.requires&&r.requires.forEach(t=>{const i=c(t);if(n.includes(i))throw new an.b("plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.",l,{plugin:i,requiredBy:r});e(i)});const u=new r(l);t._add(r,u),o.push(u),s()})}(r).catch(e=>{throw console.error(Object(an.a)("plugincollection-load: It was not possible to load the plugin."),{plugin:r}),e})}))).then(()=>a(o,"init")).then(()=>a(o,"afterInit")).then(()=>o);function a(e,n){return e.reduce((e,t)=>t[n]?e.then(t[n].bind(t)):e,Promise.resolve())}function c(e){return"function"==typeof e?e:t._availablePlugins.get(e)}function d(e){return e.map(e=>c(e)).filter(e=>!!e)}}destroy(){const e=Array.from(this).map(([,e])=>e).filter(e=>"function"==typeof e.destroy).map(e=>e.destroy());return Promise.all(e)}_add(e,n){this._plugins.set(e,n);const t=e.pluginName;if(t){if(this._plugins.has(t))throw new an.b("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:t,plugin1:this._plugins.get(t).constructor,plugin2:e});this._plugins.set(t,n)}}}kn(lo,mn);class io{constructor(){this._commands=new Map}add(e,n){this._commands.set(e,n)}get(e){return this._commands.get(e)}execute(e,...n){const t=this.get(e);if(!t)throw new an.b("commandcollection-command-not-found: Command does not exist.",this,{commandName:e});t.execute(...n)}*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()}}window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={});const oo=["ar","fa","he","ku","ug"];class ro{constructor(e={}){this.uiLanguage=e.uiLanguage||"en",this.contentLanguage=e.contentLanguage||this.uiLanguage,this.uiLanguageDirection=so(this.uiLanguage),this.contentLanguageDirection=so(this.contentLanguage),this.t=(...e)=>this._t(...e)}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,n){let t=function(e,n){const t=Object.keys(window.CKEDITOR_TRANSLATIONS).length;return 1===t&&(e=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]),0!==t&&function(e,n){return e in window.CKEDITOR_TRANSLATIONS&&n in window.CKEDITOR_TRANSLATIONS[e]}(e,n)?window.CKEDITOR_TRANSLATIONS[e][n].replace(/ \[context: [^\]]+\]$/,""):n.replace(/ \[context: [^\]]+\]$/,"")}(this.uiLanguage,e);return n&&(t=t.replace(/%(\d+)/g,(e,t)=>t{n[0]=new ho(n[0])},{priority:"highest"}),this.on("checkChild",(e,n)=>{n[0]=new ho(n[0]),n[1]=this.getDefinition(n[1])},{priority:"highest"})}register(e,n){if(this._sourceDefinitions[e])throw new an.b("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:e});this._sourceDefinitions[e]=[Object.assign({},n)],this._clearCache()}extend(e,n){if(!this._sourceDefinitions[e])throw new an.b("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:e});this._sourceDefinitions[e].push(Object.assign({},n)),this._clearCache()}getDefinitions(){return this._compiledDefinitions||this._compile(),this._compiledDefinitions}getDefinition(e){let n;return n="string"==typeof e?e:e.is&&(e.is("text")||e.is("textProxy"))?"$text":e.name,this.getDefinitions()[n]}isRegistered(e){return!!this.getDefinition(e)}isBlock(e){const n=this.getDefinition(e);return!(!n||!n.isBlock)}isLimit(e){const n=this.getDefinition(e);return!(!n||!n.isLimit&&!n.isObject)}isObject(e){const n=this.getDefinition(e);return!(!n||!n.isObject)}isInline(e){const n=this.getDefinition(e);return!(!n||!n.isInline)}checkChild(e,n){return!!n&&this._checkContextMatch(n,e)}checkAttribute(e,n){const t=this.getDefinition(e.last);return!!t&&t.allowAttributes.includes(n)}checkMerge(e,n=null){if(e instanceof Di){const n=e.nodeBefore,t=e.nodeAfter;if(!(n instanceof Mi))throw new an.b("schema-check-merge-no-element-before: The node before the merge position must be an element.",this);if(!(t instanceof Mi))throw new an.b("schema-check-merge-no-element-after: The node after the merge position must be an element.",this);return this.checkMerge(n,t)}for(const t of n.getChildren())if(!this.checkChild(e,t))return!1;return!0}addChildCheck(e){this.on("checkChild",(n,[t,l])=>{if(!l)return;const i=e(t,l);"boolean"==typeof i&&(n.stop(),n.return=i)},{priority:"high"})}addAttributeCheck(e){this.on("checkAttribute",(n,[t,l])=>{const i=e(t,l);"boolean"==typeof i&&(n.stop(),n.return=i)},{priority:"high"})}setAttributeProperties(e,n){this._attributeProperties[e]=Object.assign(this.getAttributeProperties(e),n)}getAttributeProperties(e){return this._attributeProperties[e]||{}}getLimitElement(e){let n;for(n=e instanceof Di?e.parent:(e instanceof Si?[e]:Array.from(e.getRanges())).reduce((e,n)=>{const t=n.getCommonAncestor();return e?e.getCommonAncestor(t,{includeSelf:!0}):t},null);!this.isLimit(n)&&n.parent;)n=n.parent;return n}checkAttributeInSelection(e,n){if(e.isCollapsed){const t=[...e.getFirstPosition().getAncestors(),new bi("",e.getAttributes())];return this.checkAttribute(t,n)}{const t=e.getRanges();for(const e of t)for(const t of e)if(this.checkAttribute(t.item,n))return!0}return!1}*getValidRanges(e,n){e=function*(e){for(const n of e)yield*n.getMinimalFlatRanges()}(e);for(const t of e)yield*this._getValidRangesForRange(t,n)}getNearestSelectionRange(e,n="both"){if(this.checkChild(e,"$text"))return new Si(e);let t,l;"both"!=n&&"backward"!=n||(t=new Ci({startPosition:e,direction:"backward"})),"both"!=n&&"forward"!=n||(l=new Ci({startPosition:e}));for(const i of function*(e,n){let t=!1;for(;!t;){if(t=!0,e){const n=e.next();n.done||(t=!1,yield{walker:e,value:n.value})}if(n){const e=n.next();e.done||(t=!1,yield{walker:n,value:e.value})}}}(t,l)){const e=i.value;if(e.type==(i.walker==t?"elementEnd":"elementStart")&&this.isObject(e.item))return Si._createOn(e.item);if(this.checkChild(e.nextPosition,"$text"))return new Si(e.nextPosition)}return null}findAllowedParent(e,n){let t=e.parent;for(;t;){if(this.checkChild(t,n))return t;if(this.isLimit(t))return null;t=t.parent}return null}removeDisallowedAttributes(e,n){for(const t of e)if(t.is("text"))Mo(this,t,n);else{const e=Si._createIn(t).getPositions();for(const t of e)Mo(this,t.nodeBefore||t.parent,n)}}createContext(e){return new ho(e)}_clearCache(){this._compiledDefinitions=null}_compile(){const e={},n=this._sourceDefinitions,t=Object.keys(n);for(const l of t)e[l]=po(n[l],l);for(const l of t)fo(e,l);for(const l of t)mo(e,l);for(const l of t)go(e,l),vo(e,l);for(const l of t)_o(e,l),yo(e,l);this._compiledDefinitions=e}_checkContextMatch(e,n,t=n.length-1){const l=n.getItem(t);if(e.allowIn.includes(l.name)){if(0==t)return!0;{const e=this.getDefinition(l);return this._checkContextMatch(e,n,t-1)}}return!1}*_getValidRangesForRange(e,n){let t=e.start,l=e.start;for(const i of e.getItems({shallow:!0}))i.is("element")&&(yield*this._getValidRangesForRange(Si._createIn(i),n)),this.checkAttribute(i,n)||(t.isEqual(l)||(yield new Si(t,l)),t=Di._createAfter(i)),l=Di._createAfter(i);t.isEqual(l)||(yield new Si(t,l))}}kn(co,Gn);class ho{constructor(e){if(e instanceof ho)return e;"string"==typeof e?e=[e]:Array.isArray(e)||(e=e.getAncestors({includeSelf:!0})),e[0]&&"string"!=typeof e[0]&&e[0].is("documentFragment")&&e.shift(),this._items=e.map(ko)}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 n=new ho([e]);return n._items=[...this._items,...n._items],n}getItem(e){return this._items[e]}*getNames(){yield*this._items.map(e=>e.name)}endsWith(e){return Array.from(this.getNames()).join(" ").endsWith(e)}}function po(e,n){const t={name:n,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};return function(e,n){for(const t of e){const e=Object.keys(t).filter(e=>e.startsWith("is"));for(const l of e)n[l]=t[l]}}(e,t),bo(e,t,"allowIn"),bo(e,t,"allowContentOf"),bo(e,t,"allowWhere"),bo(e,t,"allowAttributes"),bo(e,t,"allowAttributesOf"),bo(e,t,"inheritTypesFrom"),function(e,n){for(const t of e){const e=t.inheritAllFrom;e&&(n.allowContentOf.push(e),n.allowWhere.push(e),n.allowAttributesOf.push(e),n.inheritTypesFrom.push(e))}}(e,t),t}function fo(e,n){for(const t of e[n].allowContentOf)e[t]&&wo(e,t).forEach(e=>{e.allowIn.push(n)});delete e[n].allowContentOf}function mo(e,n){for(const t of e[n].allowWhere){const l=e[t];l&&e[n].allowIn.push(...l.allowIn)}delete e[n].allowWhere}function go(e,n){for(const t of e[n].allowAttributesOf){const l=e[t];l&&e[n].allowAttributes.push(...l.allowAttributes)}delete e[n].allowAttributesOf}function vo(e,n){const t=e[n];for(const l of t.inheritTypesFrom){const n=e[l];if(n){const e=Object.keys(n).filter(e=>e.startsWith("is"));for(const l of e)l in t||(t[l]=n[l])}}delete t.inheritTypesFrom}function _o(e,n){const t=e[n],l=t.allowIn.filter(n=>e[n]);t.allowIn=Array.from(new Set(l))}function yo(e,n){const t=e[n];t.allowAttributes=Array.from(new Set(t.allowAttributes))}function bo(e,n,t){for(const l of e)"string"==typeof l[t]?n[t].push(l[t]):Array.isArray(l[t])&&n[t].push(...l[t])}function wo(e,n){const t=e[n];return function(e){return Object.keys(e).map(n=>e[n])}(e).filter(e=>e.allowIn.includes(t.name))}function ko(e){return"string"==typeof e?{name:e,*getAttributeKeys(){},getAttribute(){}}:{name:e.is("element")?e.name:"$text",*getAttributeKeys(){yield*e.getAttributeKeys()},getAttribute:n=>e.getAttribute(n)}}function Mo(e,n,t){for(const l of n.getAttributeKeys())e.checkAttribute(n,l)||t.removeAttribute(l,n)}class Co{constructor(e={}){this._splitParts=new Map,this._modelCursor=null,this.conversionApi=Object.assign({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this),this.conversionApi.splitToAllowedParent=this._splitToAllowedParent.bind(this),this.conversionApi.getSplitParts=this._getSplitParts.bind(this)}convert(e,n,t=["$root"]){this.fire("viewCleanup",e),this._modelCursor=function(e,n){let t;for(const l of new ho(e)){const e={};for(const n of l.getAttributeKeys())e[n]=l.getAttribute(n);const i=n.createElement(l.name,e);t&&n.append(i,t),t=Di._createAt(i,0)}return t}(t,n),this.conversionApi.writer=n,this.conversionApi.consumable=uo.createFrom(e),this.conversionApi.store={};const{modelRange:l}=this._convertItem(e,this._modelCursor),i=n.createDocumentFragment();if(l){this._removeEmptyElements();for(const e of Array.from(this._modelCursor.parent.getChildren()))n.append(e,i);i.markers=function(e,n){const t=new Set,l=new Map,i=Si._createIn(e).getItems();for(const o of i)"$marker"==o.name&&t.add(o);for(const o of t){const e=o.getAttribute("data-name"),t=n.createPositionBefore(o);l.has(e)?l.get(e).end=t.clone():l.set(e,new Si(t.clone())),n.remove(o)}return l}(i,n)}return this._modelCursor=null,this._splitParts.clear(),this.conversionApi.writer=null,this.conversionApi.store=null,i}_convertItem(e,n){const t=Object.assign({viewItem:e,modelCursor:n,modelRange:null});if(e.is("element")?this.fire("element:"+e.name,t,this.conversionApi):e.is("text")?this.fire("text",t,this.conversionApi):this.fire("documentFragment",t,this.conversionApi),t.modelRange&&!(t.modelRange instanceof Si))throw new an.b("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this);return{modelRange:t.modelRange,modelCursor:t.modelCursor}}_convertChildren(e,n){const t=new Si(n);let l=n;for(const i of Array.from(e.getChildren())){const e=this._convertItem(i,l);e.modelRange instanceof Si&&(t.end=e.modelRange.end,l=e.modelCursor)}return{modelRange:t,modelCursor:l}}_splitToAllowedParent(e,n){const t=this.conversionApi.schema.findAllowedParent(n,e);if(!t)return null;if(t===n.parent)return{position:n};if(this._modelCursor.parent.getAncestors().includes(t))return null;const l=this.conversionApi.writer.split(n,t),i=[];for(const o of l.range.getWalker())if("elementEnd"==o.type)i.push(o.item);else{const e=i.pop();this._registerSplitPair(e,o.item)}return{position:l.position,cursorParent:l.range.end.parent}}_registerSplitPair(e,n){this._splitParts.has(e)||this._splitParts.set(e,[e]);const t=this._splitParts.get(e);this._splitParts.set(n,t),t.push(n)}_getSplitParts(e){return this._splitParts.has(e)?this._splitParts.get(e):[e]}_removeEmptyElements(){let e=!1;for(const n of this._splitParts.keys())n.isEmpty&&(this.conversionApi.writer.remove(n),this._splitParts.delete(n),e=!0);e&&this._removeEmptyElements()}}kn(Co,mn);class xo{constructor(e,n){this.model=e,this.processor=n,this.mapper=new Ti,this.downcastDispatcher=new Ai({mapper:this.mapper}),this.downcastDispatcher.on("insert:$text",(e,n,t)=>{if(!t.consumable.consume(n.item,"insert"))return;const l=t.writer,i=t.mapper.toViewPosition(n.range.start),o=l.createText(n.item.data);l.insert(i,o)},{priority:"lowest"}),this.upcastDispatcher=new Co({schema:e.schema}),this.upcastDispatcher.on("text",(e,n,t)=>{if(t.schema.checkChild(n.modelCursor,"$text")&&t.consumable.consume(n.viewItem)){const e=t.writer.createText(n.viewItem.data);t.writer.insert(e,n.modelCursor),n.modelRange=Si._createFromPositionAndShift(n.modelCursor,e.offsetSize),n.modelCursor=n.modelRange.end}},{priority:"lowest"}),this.upcastDispatcher.on("element",(e,n,t)=>{if(!n.modelRange&&t.consumable.consume(n.viewItem,{name:!0})){const{modelRange:e,modelCursor:l}=t.convertChildren(n.viewItem,n.modelCursor);n.modelRange=e,n.modelCursor=l}},{priority:"lowest"}),this.upcastDispatcher.on("documentFragment",(e,n,t)=>{if(!n.modelRange&&t.consumable.consume(n.viewItem,{name:!0})){const{modelRange:e,modelCursor:l}=t.convertChildren(n.viewItem,n.modelCursor);n.modelRange=e,n.modelCursor=l}},{priority:"lowest"}),this.decorate("init"),this.on("init",()=>{this.fire("ready")},{priority:"lowest"})}get(e){const{rootName:n="main",trim:t="empty"}=e||{};if(!this._checkIfRootsExists([n]))throw new an.b("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this);const l=this.model.document.getRoot(n);return"empty"!==t||this.model.hasContent(l,{ignoreWhitespaces:!0})?this.stringify(l):""}stringify(e){const n=this.toView(e);return this.processor.toData(n)}toView(e){this.mapper.clearBindings();const n=Si._createIn(e),t=new It,l=new Et(new ht);if(this.mapper.bindElements(e,t),this.downcastDispatcher.convertInsert(n,l),!e.is("documentFragment")){const n=function(e){const n=[],t=e.root.document;if(!t)return[];const l=Si._createIn(e);for(const i of t.model.markers){const e=l.getIntersection(i.getRange());e&&n.push([i.name,e])}return n}(e);for(const[e,t]of n)this.downcastDispatcher.convertMarkerAdd(e,t,l)}return t}init(e){if(this.model.document.version)throw new an.b("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this);let n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new an.b("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this);return this.model.enqueueChange("transparent",e=>{for(const t of Object.keys(n)){const l=this.model.document.getRoot(t);e.insert(this.parse(n[t],l),l,0)}}),Promise.resolve()}set(e){let n={};if("string"==typeof e?n.main=e:n=e,!this._checkIfRootsExists(Object.keys(n)))throw new an.b("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this);this.model.enqueueChange("transparent",e=>{e.setSelection(null),e.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const t of Object.keys(n)){const l=this.model.document.getRoot(t);e.remove(e.createRangeIn(l)),e.insert(this.parse(n[t],l),l,0)}})}parse(e,n="$root"){const t=this.processor.toView(e);return this.toModel(t,n)}toModel(e,n="$root"){return this.model.change(t=>this.upcastDispatcher.convert(e,t,n))}destroy(){this.stopListening()}_checkIfRootsExists(e){for(const n of e)if(!this.model.document.getRootNames().includes(n))return!1;return!0}}kn(xo,Gn);class Do{constructor(e,n){this._helpers=new Map,this._downcast=Array.isArray(e)?e:[e],this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:!0}),this._upcast=Array.isArray(n)?n:[n],this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:!1})}addAlias(e,n){const t=this._downcast.includes(n);if(!this._upcast.includes(n)&&!t)throw new an.b("conversion-add-alias-dispatcher-not-registered: Trying to register and alias for a dispatcher that nas not been registered.",this);this._createConversionHelpers({name:e,dispatchers:[n],isDowncast:t})}for(e){if(!this._helpers.has(e))throw new an.b("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this);return this._helpers.get(e)}elementToElement(e){this.for("downcast").elementToElement(e);for(const{model:n,view:t}of So(e))this.for("upcast").elementToElement({model:n,view:t,converterPriority:e.converterPriority})}attributeToElement(e){this.for("downcast").attributeToElement(e);for(const{model:n,view:t}of So(e))this.for("upcast").elementToAttribute({view:t,model:n,converterPriority:e.converterPriority})}attributeToAttribute(e){this.for("downcast").attributeToAttribute(e);for(const{model:n,view:t}of So(e))this.for("upcast").attributeToAttribute({view:t,model:n})}_createConversionHelpers({name:e,dispatchers:n,isDowncast:t}){if(this._helpers.has(e))throw new an.b("conversion-group-exists: Trying to register a group name that has already been registered.",this);const l=t?new Wi(n):new Qi(n);this._helpers.set(e,l)}}function*So(e){if(e.model.values)for(const n of e.model.values)yield*To({key:e.model.key,value:n},e.view[n],e.upcastAlso?e.upcastAlso[n]:void 0);else yield*To(e.model,e.view,e.upcastAlso)}function*To(e,n,t){if(yield{model:e,view:n},t){t=Array.isArray(t)?t:[t];for(const n of t)yield{model:e,view:n}}}class Lo{constructor(e="default"){this.operations=[],this.type=e}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}}class Po{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){return new this(e.baseVersion)}}class Ao{constructor(e){this.markers=new Map,this._children=new ki,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 root(){return this}get parent(){return null}is(e){return"documentFragment"==e||"model:documentFragment"==e}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 n=this;for(const t of e)n=n.getChild(n.offsetToIndex(t));return n}offsetToIndex(e){return this._children.offsetToIndex(e)}toJSON(){const e=[];for(const n of this._children)e.push(n.toJSON());return e}static fromJSON(e){const n=[];for(const t of e)n.push(t.name?Mi.fromJSON(t):bi.fromJSON(t));return new Ao(n)}_appendChild(e){this._insertChild(this.childCount,e)}_insertChild(e,n){const t=function(e){return"string"==typeof e?[new bi(e)]:(Ln(e)||(e=[e]),Array.from(e).map(e=>"string"==typeof e?new bi(e):e instanceof wi?new bi(e.data,e.getAttributes()):e))}(n);for(const l of t)null!==l.parent&&l._remove(),l.parent=this;this._children._insertNodes(e,t)}_removeChildren(e,n=1){const t=this._children._removeNodes(e,n);for(const l of t)l.parent=null;return t}}function Io(e,n){const t=(n=jo(n)).reduce((e,n)=>e+n.offsetSize,0),l=e.parent;Fo(e);const i=e.index;return l._insertChild(i,n),Yo(l,i+n.length),Yo(l,i),new Si(e,e.getShiftedBy(t))}function Eo(e){if(!e.isFlat)throw new an.b("operation-utils-remove-range-not-flat: Trying to remove a range which starts and ends in different element.",this);const n=e.start.parent;Fo(e.start),Fo(e.end);const t=n._removeChildren(e.start.index,e.end.index-e.start.index);return Yo(n,e.start.index),t}function Oo(e,n){if(!e.isFlat)throw new an.b("operation-utils-move-range-not-flat: Trying to move a range which starts and ends in different element.",this);const t=Eo(e);return Io(n=n._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),t)}function jo(e){const n=[];e instanceof Array||(e=[e]);for(let t=0;te.maxOffset)throw new an.b("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this);if(e===n&&t=t&&this.targetPosition.path[e]e._clone(!0))),n=new Bo(this.position,e,this.baseVersion);return n.shouldReceiveAttributes=this.shouldReceiveAttributes,n}getReversed(){const e=new Di(this.position.root.document.graveyard,[0]);return new zo(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const e=this.position.parent;if(!e||e.maxOffsete._clone(!0))),Io(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,n){const t=[];for(const i of e.nodes)t.push(i.name?Mi.fromJSON(i):bi.fromJSON(i));const l=new Bo(Di.fromJSON(e.position,n),t,e.baseVersion);return l.shouldReceiveAttributes=e.shouldReceiveAttributes,l}}class Uo extends Po{constructor(e,n,t,l,i,o){super(o),this.name=e,this.oldRange=n?n.clone():null,this.newRange=t?t.clone():null,this.affectsData=i,this._markers=l}get type(){return"marker"}clone(){return new Uo(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new Uo(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){this._markers[this.newRange?"_set":"_remove"](this.name,this.newRange,!0,this.affectsData)}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,n){return new Uo(e.name,e.oldRange?Si.fromJSON(e.oldRange,n):null,e.newRange?Si.fromJSON(e.newRange,n):null,n.model.markers,e.affectsData,e.baseVersion)}}class Wo extends Po{constructor(e,n,t,l){super(l),this.position=e,this.position.stickiness="toNext",this.oldName=n,this.newName=t}get type(){return"rename"}clone(){return new Wo(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Wo(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const e=this.position.nodeAfter;if(!(e instanceof Mi))throw new an.b("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this);if(e.name!==this.oldName)throw new an.b("rename-operation-wrong-name: Element to change has different name than operation's old 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,n){return new Wo(Di.fromJSON(e.position,n),e.oldName,e.newName,e.baseVersion)}}class qo extends Po{constructor(e,n,t,l,i){super(i),this.root=e,this.key=n,this.oldValue=t,this.newValue=l}get type(){return null===this.oldValue?"addRootAttribute":null===this.newValue?"removeRootAttribute":"changeRootAttribute"}clone(){return new qo(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new qo(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment"))throw new an.b("rootattribute-operation-not-a-root: The element to change is not a root element.",this,{root:this.root,key:this.key});if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new an.b("rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation's old attribute value.",this,{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new an.b("rootattribute-operation-attribute-exists: The attribute with given key already 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,n){if(!n.getRoot(e.root))throw new an.b("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:e.root});return new qo(n.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}class $o extends Po{constructor(e,n,t,l,i){super(i),this.sourcePosition=e.clone(),this.sourcePosition.stickiness="toPrevious",this.howMany=n,this.targetPosition=t.clone(),this.targetPosition.stickiness="toNext",this.graveyardPosition=l.clone()}get type(){return"merge"}get deletionPosition(){return new Di(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const e=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Si(this.sourcePosition,e)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const e=this.targetPosition._getTransformedByMergeOperation(this),n=this.sourcePosition.path.slice(0,-1),t=new Di(this.sourcePosition.root,n)._getTransformedByMergeOperation(this),l=new Go(e,this.howMany,this.graveyardPosition,this.baseVersion+1);return l.insertionPosition=t,l}_validate(){const e=this.sourcePosition.parent,n=this.targetPosition.parent;if(!e.parent)throw new an.b("merge-operation-source-position-invalid: Merge source position is invalid.",this);if(!n.parent)throw new an.b("merge-operation-target-position-invalid: Merge target position is invalid.",this);if(this.howMany!=e.maxOffset)throw new an.b("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}_execute(){const e=this.sourcePosition.parent;Oo(Si._createIn(e),this.targetPosition),Oo(Si._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,n){const t=Di.fromJSON(e.sourcePosition,n),l=Di.fromJSON(e.targetPosition,n),i=Di.fromJSON(e.graveyardPosition,n);return new this(t,e.howMany,l,i,e.baseVersion)}}class Go extends Po{constructor(e,n,t,l){super(l),this.splitPosition=e.clone(),this.splitPosition.stickiness="toNext",this.howMany=n,this.insertionPosition=Go.getInsertionPosition(e),this.insertionPosition.stickiness="toNone",this.graveyardPosition=t?t.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 Di(this.insertionPosition.root,e)}get movedRange(){const e=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new Si(this.splitPosition,e)}clone(){const e=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);return e.insertionPosition=this.insertionPosition,e}getReversed(){const e=new Di(this.splitPosition.root.document.graveyard,[0]);return new $o(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const e=this.splitPosition.parent;if(!e||e.maxOffset{for(const n of e.getAttributeKeys())this.removeAttribute(n,e)};if(e instanceof Si)for(const t of e.getItems())n(t);else n(e)}move(e,n,t){if(this._assertWriterUsedCorrectly(),!(e instanceof Si))throw new an.b("writer-move-invalid-range: Invalid range to move.",this);if(!e.isFlat)throw new an.b("writer-move-range-not-flat: Range to move is not flat.",this);const l=Di._createAt(n,t);if(l.isEqual(e.start))return;if(this._addOperationForAffectedMarkers("move",e),!nr(e.root,l.root))throw new an.b("writer-move-different-document: Range is going to be moved between different documents.",this);const i=new zo(e.start,e.end.offset-e.start.offset,l,e.root.document?e.root.document.version:null);this.batch.addOperation(i),this.model.applyOperation(i)}remove(e){this._assertWriterUsedCorrectly();const n=(e instanceof Si?e:Si._createOn(e)).getMinimalFlatRanges().reverse();for(const t of n)this._addOperationForAffectedMarkers("move",t),er(t.start,t.end.offset-t.start.offset,this.batch,this.model)}merge(e){this._assertWriterUsedCorrectly();const n=e.nodeBefore,t=e.nodeAfter;if(this._addOperationForAffectedMarkers("merge",e),!(n instanceof Mi))throw new an.b("writer-merge-no-element-before: Node before merge position must be an element.",this);if(!(t instanceof Mi))throw new an.b("writer-merge-no-element-after: Node after merge position must be an element.",this);e.root.document?this._merge(e):this._mergeDetached(e)}createPositionFromPath(e,n,t){return this.model.createPositionFromPath(e,n,t)}createPositionAt(e,n){return this.model.createPositionAt(e,n)}createPositionAfter(e){return this.model.createPositionAfter(e)}createPositionBefore(e){return this.model.createPositionBefore(e)}createRange(e,n){return this.model.createRange(e,n)}createRangeIn(e){return this.model.createRangeIn(e)}createRangeOn(e){return this.model.createRangeOn(e)}createSelection(e,n,t){return this.model.createSelection(e,n,t)}_mergeDetached(e){const n=e.nodeBefore,t=e.nodeAfter;this.move(Si._createIn(t),Di._createAt(n,"end")),this.remove(t)}_merge(e){const n=Di._createAt(e.nodeBefore,"end"),t=Di._createAt(e.nodeAfter,0),l=new Di(e.root.document.graveyard,[0]),i=new $o(t,e.nodeAfter.maxOffset,n,l,e.root.document.version);this.batch.addOperation(i),this.model.applyOperation(i)}rename(e,n){if(this._assertWriterUsedCorrectly(),!(e instanceof Mi))throw new an.b("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this);const t=e.root.document?e.root.document.version:null,l=new Wo(Di._createBefore(e),e.name,n,t);this.batch.addOperation(l),this.model.applyOperation(l)}split(e,n){this._assertWriterUsedCorrectly();let t,l,i=e.parent;if(!i.parent)throw new an.b("writer-split-element-no-parent: Element with no parent can not be split.",this);if(n||(n=i.parent),!e.parent.getAncestors({includeSelf:!0}).includes(n))throw new an.b("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this);do{const n=new Go(e,i.maxOffset-e.offset,null,i.root.document?i.root.document.version:null);this.batch.addOperation(n),this.model.applyOperation(n),t||l||(t=i,l=e.parent.nextSibling),i=(e=this.createPositionAfter(e.parent)).parent}while(i!==n);return{position:e,range:new Si(Di._createAt(t,"end"),Di._createAt(l,0))}}wrap(e,n){if(this._assertWriterUsedCorrectly(),!e.isFlat)throw new an.b("writer-wrap-range-not-flat: Range to wrap is not flat.",this);const t=n instanceof Mi?n:new Mi(n);if(t.childCount>0)throw new an.b("writer-wrap-element-not-empty: Element to wrap with is not empty.",this);if(null!==t.parent)throw new an.b("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this);this.insert(t,e.start);const l=new Si(e.start.getShiftedBy(1),e.end.getShiftedBy(1));this.move(l,Di._createAt(t,0))}unwrap(e){if(this._assertWriterUsedCorrectly(),null===e.parent)throw new an.b("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this);this.move(Si._createIn(e),this.createPositionAfter(e)),this.remove(e)}addMarker(e,n){if(this._assertWriterUsedCorrectly(),!n||"boolean"!=typeof n.usingOperation)throw new an.b("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this);const t=n.usingOperation,l=n.range,i=void 0!==n.affectsData&&n.affectsData;if(this.model.markers.has(e))throw new an.b("writer-addMarker-marker-exists: Marker with provided name already exists.",this);if(!l)throw new an.b("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this);return t?(Xo(this,e,null,l,i),this.model.markers.get(e)):this.model.markers._set(e,l,t,i)}updateMarker(e,n){this._assertWriterUsedCorrectly();const t="string"==typeof e?e:e.name,l=this.model.markers.get(t);if(!l)throw new an.b("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this);if(!n)return void this.model.markers._refresh(l);const i="boolean"==typeof n.usingOperation,o="boolean"==typeof n.affectsData,r=o?n.affectsData:l.affectsData;if(!i&&!n.range&&!o)throw new an.b("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this);const s=l.getRange(),u=n.range?n.range:s;i&&n.usingOperation!==l.managedUsingOperations?n.usingOperation?Xo(this,t,null,u,r):(Xo(this,t,s,null,r),this.model.markers._set(t,u,void 0,r)):l.managedUsingOperations?Xo(this,t,s,u,r):this.model.markers._set(t,u,void 0,r)}removeMarker(e){this._assertWriterUsedCorrectly();const n="string"==typeof e?e:e.name;if(!this.model.markers.has(n))throw new an.b("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this);const t=this.model.markers.get(n);t.managedUsingOperations?Xo(this,n,t.getRange(),null,t.affectsData):this.model.markers._remove(n)}setSelection(e,n,t){this._assertWriterUsedCorrectly(),this.model.document.selection._setTo(e,n,t)}setSelectionFocus(e,n){this._assertWriterUsedCorrectly(),this.model.document.selection._setFocus(e,n)}setSelectionAttribute(e,n){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._setSelectionAttribute(e,n);else for(const[t,l]of _i(e))this._setSelectionAttribute(t,l)}removeSelectionAttribute(e){if(this._assertWriterUsedCorrectly(),"string"==typeof e)this._removeSelectionAttribute(e);else for(const n of e)this._removeSelectionAttribute(n)}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(e){this.model.document.selection._restoreGravity(e)}_setSelectionAttribute(e,n){const t=this.model.document.selection;if(t.isCollapsed&&t.anchor.parent.isEmpty){const l=Vi._getStoreAttributeKey(e);this.setAttribute(l,n,t.anchor.parent)}t._setAttribute(e,n)}_removeSelectionAttribute(e){const n=this.model.document.selection;if(n.isCollapsed&&n.anchor.parent.isEmpty){const t=Vi._getStoreAttributeKey(e);this.removeAttribute(t,n.anchor.parent)}n._removeAttribute(e)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this)throw new an.b("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}_addOperationForAffectedMarkers(e,n){for(const t of this.model.markers){if(!t.managedUsingOperations)continue;const l=t.getRange();let i=!1;if("move"==e)i=n.containsPosition(l.start)||n.start.isEqual(l.start)||n.containsPosition(l.end)||n.end.isEqual(l.end);else{const e=n.nodeAfter,t=l.end.parent==e&&0==l.end.offset,o=l.end.nodeAfter==e,r=l.start.nodeAfter==e;i=l.start.parent==n.nodeBefore&&l.start.isAtEnd||t||o||r}i&&this.updateMarker(t.name,{range:l})}}}function Qo(e,n,t,l){const i=e.model,o=i.document;let r,s,u,a=l.start;for(const d of l.getWalker({shallow:!0}))u=d.item.getAttribute(n),r&&s!=u&&(s!=t&&c(),a=r),r=d.nextPosition,s=u;function c(){const l=new Si(a,r),u=new Vo(l,n,s,t,l.root.document?o.version:null);e.batch.addOperation(u),i.applyOperation(u)}r instanceof Di&&r!=a&&s!=t&&c()}function Zo(e,n,t,l){const i=e.model,o=i.document,r=l.getAttribute(n);let s,u;if(r!=t){if(l.root===l)u=new qo(l,n,r,t,l.document?o.version:null);else{const i=(s=new Si(Di._createBefore(l),e.createPositionAfter(l))).root.document?o.version:null;u=new Vo(s,n,r,t,i)}e.batch.addOperation(u),i.applyOperation(u)}}function Xo(e,n,t,l,i){const o=e.model,r=new Uo(n,t,l,o.markers,i,o.document.version);e.batch.addOperation(r),o.applyOperation(r)}function er(e,n,t,l){let i;if(e.root.document){const t=l.document,o=new Di(t.graveyard,[0]);i=new zo(e,n,o,t.version)}else i=new Ho(e,n);t.addOperation(i),l.applyOperation(i)}function nr(e,n){return e===n||e instanceof Ko&&n instanceof Ko}class tr{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}get isEmpty(){return 0==this._changesInElement.size&&0==this._changedMarkers.size}refreshItem(e){if(this._isInInsertedElement(e.parent))return;this._markRemove(e.parent,e.startOffset,e.offsetSize),this._markInsert(e.parent,e.startOffset,e.offsetSize);const n=Si._createOn(e);for(const t of this._markerCollection.getMarkersIntersectingRange(n)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(e){switch(e.type){case"insert":if(this._isInInsertedElement(e.position.parent))return;this._markInsert(e.position.parent,e.position.offset,e.nodes.maxOffset);break;case"addAttribute":case"removeAttribute":case"changeAttribute":for(const n of e.range.getItems({shallow:!0}))this._isInInsertedElement(n.parent)||this._markAttribute(n);break;case"remove":case"move":case"reinsert":{if(e.sourcePosition.isEqual(e.targetPosition)||e.sourcePosition.getShiftedBy(e.howMany).isEqual(e.targetPosition))return;const n=this._isInInsertedElement(e.sourcePosition.parent),t=this._isInInsertedElement(e.targetPosition.parent);n||this._markRemove(e.sourcePosition.parent,e.sourcePosition.offset,e.howMany),t||this._markInsert(e.targetPosition.parent,e.getMovedRangeStart().offset,e.howMany);break}case"rename":{if(this._isInInsertedElement(e.position.parent))return;this._markRemove(e.position.parent,e.position.offset,1),this._markInsert(e.position.parent,e.position.offset,1);const n=Si._createFromPositionAndShift(e.position,1);for(const e of this._markerCollection.getMarkersIntersectingRange(n)){const n=e.getRange();this.bufferMarkerChange(e.name,n,n,e.affectsData)}break}case"split":{const n=e.splitPosition.parent;this._isInInsertedElement(n)||this._markRemove(n,e.splitPosition.offset,e.howMany),this._isInInsertedElement(e.insertionPosition.parent)||this._markInsert(e.insertionPosition.parent,e.insertionPosition.offset,1),e.graveyardPosition&&this._markRemove(e.graveyardPosition.parent,e.graveyardPosition.offset,1);break}case"merge":{const n=e.sourcePosition.parent;this._isInInsertedElement(n.parent)||this._markRemove(n.parent,n.startOffset,1),this._markInsert(e.graveyardPosition.parent,e.graveyardPosition.offset,1);const t=e.targetPosition.parent;this._isInInsertedElement(t)||this._markInsert(t,e.targetPosition.offset,n.maxOffset);break}}this._cachedChanges=null}bufferMarkerChange(e,n,t,l){const i=this._changedMarkers.get(e);i?(i.newRange=t,i.affectsData=l,null==i.oldRange&&null==i.newRange&&this._changedMarkers.delete(e)):this._changedMarkers.set(e,{oldRange:n,newRange:t,affectsData:l})}getMarkersToRemove(){const e=[];for(const[n,t]of this._changedMarkers)null!=t.oldRange&&e.push({name:n,range:t.oldRange});return e}getMarkersToAdd(){const e=[];for(const[n,t]of this._changedMarkers)null!=t.newRange&&e.push({name:n,range:t.newRange});return e}getChangedMarkers(){return Array.from(this._changedMarkers).map(e=>({name:e[0],data:{oldRange:e[1].oldRange,newRange:e[1].newRange}}))}hasDataChanges(){for(const[,e]of this._changedMarkers)if(e.affectsData)return!0;return this._changesInElement.size>0}getChanges(e={includeChangesInGraveyard:!1}){if(this._cachedChanges)return e.includeChangesInGraveyard?this._cachedChangesWithGraveyard.slice():this._cachedChanges.slice();const n=[];for(const t of this._changesInElement.keys()){const e=this._changesInElement.get(t).sort((e,n)=>e.offset===n.offset?e.type!=n.type?"remove"==e.type?-1:1:0:e.offsete.position.root!=n.position.root?e.position.root.rootNamet.offset){if(l>i){const e={type:"attribute",offset:i,howMany:l-i,count:this._changeCount++};this._handleChange(e,n),n.push(e)}e.nodesToHandle=t.offset-e.offset,e.howMany=e.nodesToHandle}else e.offset>=t.offset&&e.offseti?(e.nodesToHandle=l-i,e.offset=i):e.nodesToHandle=0);if("remove"==t.type&&e.offsett.offset){const i={type:"attribute",offset:t.offset,howMany:l-t.offset,count:this._changeCount++};this._handleChange(i,n),n.push(i),e.nodesToHandle=t.offset-e.offset,e.howMany=e.nodesToHandle}"attribute"==t.type&&(e.offset>=t.offset&&l<=i?(e.nodesToHandle=0,e.howMany=0,e.offset=0):e.offset<=t.offset&&l>=i&&(t.howMany=0))}}e.howMany=e.nodesToHandle,delete e.nodesToHandle}_getInsertDiff(e,n,t){return{type:"insert",position:Di._createAt(e,n),name:t,length:1,changeCount:this._changeCount++}}_getRemoveDiff(e,n,t){return{type:"remove",position:Di._createAt(e,n),name:t,length:1,changeCount:this._changeCount++}}_getAttributesDiff(e,n,t){const l=[];t=new Map(t);for(const[i,o]of n){const n=t.has(i)?t.get(i):null;n!==o&&l.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:o,attributeNewValue:n,changeCount:this._changeCount++}),t.delete(i)}for(const[i,o]of t)l.push({type:"attribute",position:e.start,range:e.clone(),length:1,attributeKey:i,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++});return l}_isInInsertedElement(e){const n=e.parent;if(!n)return!1;const t=this._changesInElement.get(n),l=e.startOffset;if(t)for(const i of t)if("insert"==i.type&&l>=i.offset&&ll){for(let e=0;e{const t=n[0];if(t.isDocumentOperation&&t.baseVersion!==this.version)throw new an.b("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:t})},{priority:"highest"}),this.listenTo(e,"applyOperation",(e,n)=>{const t=n[0];t.isDocumentOperation&&this.differ.bufferOperation(t)},{priority:"high"}),this.listenTo(e,"applyOperation",(e,n)=>{const t=n[0];t.isDocumentOperation&&(this.version++,this.history.addOperation(t))},{priority:"low"}),this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=!0}),this.listenTo(e.markers,"update",(e,n,t,l)=>{this.differ.bufferMarkerChange(n.name,t,l,n.affectsData),null===t&&n.on("change",(e,t)=>{this.differ.bufferMarkerChange(n.name,t,n.getRange(),n.affectsData)})})}get graveyard(){return this.getRoot(ar)}createRoot(e="$root",n="main"){if(this.roots.get(n))throw new an.b("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:n});const t=new Ko(this,e,n);return this.roots.add(t),t}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!=ar)}registerPostFixer(e){this._postFixers.add(e)}toJSON(){const e=Cn(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(),n=this.model,t=n.schema,l=n.createPositionFromPath(e,[0]);return t.getNearestSelectionRange(l)||n.createRange(l)}_validateSelectionRange(e){return dr(e.start)&&dr(e.end)}_callPostFixers(e){let n=!1;do{for(const t of this._postFixers)if(this.selection.refresh(),n=t(e))break}while(n)}}function dr(e){const n=e.textNode;if(n){const t=n.data,l=e.offset-n.startOffset;return!sr(t,l)&&!ur(t,l)}return!0}kn(cr,mn);class hr{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}_set(e,n,t=!1,l=!1){const i=e instanceof pr?e.name:e,o=this._markers.get(i);if(o){const e=o.getRange();let r=!1;return e.isEqual(n)||(o._attachLiveRange(Ni.fromRange(n)),r=!0),t!=o.managedUsingOperations&&(o._managedUsingOperations=t,r=!0),"boolean"==typeof l&&l!=o.affectsData&&(o._affectsData=l,r=!0),r&&this.fire("update:"+i,o,e,n),o}const r=Ni.fromRange(n),s=new pr(i,r,t,l);return this._markers.set(i,s),this.fire("update:"+i,s,null,n),s}_remove(e){const n=e instanceof pr?e.name:e,t=this._markers.get(n);return!!t&&(this._markers.delete(n),this.fire("update:"+n,t,t.getRange(),null),this._destroyMarker(t),!0)}_refresh(e){const n=e instanceof pr?e.name:e,t=this._markers.get(n);if(!t)throw new an.b("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this);const l=t.getRange();this.fire("update:"+n,t,l,l,t.managedUsingOperations,t.affectsData)}*getMarkersAtPosition(e){for(const n of this)n.getRange().containsPosition(e)&&(yield n)}*getMarkersIntersectingRange(e){for(const n of this)null!==n.getRange().getIntersection(e)&&(yield n)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const n of this._markers.values())n.name.startsWith(e+":")&&(yield n)}_destroyMarker(e){e.stopListening(),e._detachLiveRange()}}kn(hr,mn);class pr{constructor(e,n,t,l){this.name=e,this._liveRange=this._attachLiveRange(n),this._managedUsingOperations=t,this._affectsData=l}get managedUsingOperations(){if(!this._liveRange)throw new an.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._managedUsingOperations}get affectsData(){if(!this._liveRange)throw new an.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._affectsData}getStart(){if(!this._liveRange)throw new an.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.start.clone()}getEnd(){if(!this._liveRange)throw new an.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.end.clone()}getRange(){if(!this._liveRange)throw new an.b("marker-destroyed: Cannot use a destroyed marker instance.",this);return this._liveRange.toRange()}is(e){return"marker"==e||"model:marker"==e}_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}}kn(pr,mn);class fr extends Di{constructor(e,n,t="toNone"){if(super(e,n,t),!this.root.is("rootElement"))throw new an.b("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",e);(function(){this.listenTo(this.root.document.model,"applyOperation",(e,n)=>{const t=n[0];t.isDocumentOperation&&(function(e){const n=this.getTransformedByOperation(e);if(!this.isEqual(n)){const e=this.toPosition();this.path=n.path,this.root=n.root,this.fire("change",e)}}).call(this,t)},{priority:"low"})}).call(this)}detach(){this.stopListening()}is(e){return"livePosition"==e||"model:livePosition"==e||super.is(e)}toPosition(){return new Di(this.root,this.path.slice(),this.stickiness)}static fromPosition(e,n){return new this(e.root,e.path.slice(),n||e.stickiness)}}kn(fr,mn);class mr{constructor(e,n,t){this.model=e,this.writer=n,this.position=t,this.canMergeWith=new Set([this.position.parent]),this.schema=e.schema,this._filterAttributesOf=[],this._affectedStart=null,this._affectedEnd=null}handleNodes(e,n){e=Array.from(e);for(let t=0;t!0);if(e.schema.checkChild(n.nextPosition,"$text"))return n.nextPosition}}function br(e,n,t){return _r.includes(e.charAt(n+(t?0:-1)))}function wr(e,n,t){return n===(t?e.endOffset:0)}function kr(e,n){const t=[];Array.from(e.getItems({direction:"backward"})).map(e=>n.createRangeOn(e)).filter(n=>(n.start.isAfter(e.start)||n.start.isEqual(e.start))&&(n.end.isBefore(e.end)||n.end.isEqual(e.end))).forEach(e=>{t.push(e.start.parent),n.remove(e)}),t.forEach(e=>{let t=e;for(;t.parent&&t.isEmpty;){const e=n.createRangeOn(t);t=t.parent,n.remove(e)}})}function Mr(e,n){return e.isCollapsed?function(e,n){const t=e.start,l=n.getNearestSelectionRange(t);if(!l)return null;const i=l.start;return t.isEqual(i)?null:i.nodeAfter&&n.isLimit(i.nodeAfter)?new Si(i,Di._createAfter(i.nodeAfter)):new Si(i)}(e,n):function(e,n){const t=e.start,l=e.end,i=n.checkChild(t,"$text"),o=n.checkChild(l,"$text"),r=n.getLimitElement(t),s=n.getLimitElement(l);if(r===s){if(i&&o)return null;if(function(e,n,t){const l=e.nodeAfter&&!t.isLimit(e.nodeAfter)||t.checkChild(e,"$text"),i=n.nodeBefore&&!t.isLimit(n.nodeBefore)||t.checkChild(n,"$text");return l||i}(t,l,n)){const e=t.nodeAfter&&n.isObject(t.nodeAfter)?null:n.getNearestSelectionRange(t,"forward"),i=l.nodeBefore&&n.isObject(l.nodeBefore)?null:n.getNearestSelectionRange(l,"backward");return new Si(e?e.start:t,i?i.start:l)}}const u=r&&!r.is("rootElement"),a=s&&!s.is("rootElement");if(u||a){const e=t.nodeAfter&&l.nodeBefore&&t.nodeAfter.parent===l.nodeBefore.parent,i=u&&(!e||!xr(t.nodeAfter,n)),o=a&&(!e||!xr(l.nodeBefore,n));let c=t,d=l;return i&&(c=Di._createBefore(Cr(r,n))),o&&(d=Di._createAfter(Cr(s,n))),new Si(c,d)}return null}(e,n)}function Cr(e,n){let t=e,l=t;for(;n.isLimit(l)&&l.parent;)t=l,l=l.parent;return t}function xr(e,n){return e&&n.isObject(e)}class Dr{constructor(){this.markers=new hr,this.document=new cr(this),this.schema=new co,this._pendingChanges=[],this._currentWriter=null,["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(e=>this.decorate(e)),this.on("applyOperation",(e,n)=>{n[0]._validate()},{priority:"highest"}),this.schema.register("$root",{isLimit:!0}),this.schema.register("$block",{allowIn:"$root",isBlock:!0}),this.schema.register("$text",{allowIn:"$block",isInline:!0}),this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:!0}),this.schema.extend("$text",{allowIn:"$clipboardHolder"}),this.schema.register("$marker"),this.schema.addChildCheck((e,n)=>{if("$marker"===n.name)return!0}),function(e){e.document.registerPostFixer(n=>function(e,n){const t=n.document.selection,l=n.schema,i=[];let o=!1;for(const r of t.getRanges()){const e=Mr(r,l);e?(i.push(e),o=!0):i.push(r)}if(o){let n=i;i.length>1&&(n=[new Si(i[0].start,i[i.length-1].end)]),e.setSelection(n,{backward:t.isBackward})}}(n,e))}(this)}change(e){try{return 0===this._pendingChanges.length?(this._pendingChanges.push({batch:new Lo,callback:e}),this._runPendingChanges()[0]):e(this._currentWriter)}catch(e){an.b.rethrowUnexpectedError(e,this)}}enqueueChange(e,n){try{"string"==typeof e?e=new Lo(e):"function"==typeof e&&(n=e,e=new Lo),this._pendingChanges.push({batch:e,callback:n}),1==this._pendingChanges.length&&this._runPendingChanges()}catch(e){an.b.rethrowUnexpectedError(e,this)}}applyOperation(e){e._execute()}insertContent(e,n,t){return function(e,n,t,l){return e.change(i=>{let o;const r=(o=t?t instanceof Ei||t instanceof Vi?t:i.createSelection(t,l):e.document.selection).getFirstPosition();o.isCollapsed||e.deleteContent(o,{doNotAutoparagraph:!0});const s=new mr(e,i,r);let u;u=n.is("documentFragment")?n.getChildren():[n],s.handleNodes(u,{isFirst:!0,isLast:!0});const a=s.getSelectionRange();a&&(o instanceof Vi?i.setSelection(a):o.setTo(a));const c=s.getAffectedRange()||e.createRange(r);return s.destroy(),c})}(this,e,n,t)}deleteContent(e,n){!function(e,n,t={}){if(n.isCollapsed)return;const l=n.getFirstRange();if("$graveyard"==l.root.rootName)return;const i=e.schema;e.change(e=>{if(!t.doNotResetEntireContent&&function(e,n){const t=e.getLimitElement(n);if(!n.containsEntireContent(t))return!1;const l=n.getFirstRange();return l.start.parent!=l.end.parent&&e.checkChild(t,"paragraph")}(i,n))return void function(e,n){const t=e.model.schema.getLimitElement(n);e.remove(e.createRangeIn(t)),gr(e,e.createPositionAt(t,0),n)}(e,n);const o=l.start,r=fr.fromPosition(l.end,"toNext");if(l.start.isTouching(l.end)||e.remove(l),t.leaveUnmerged||(function e(n,t,l){const i=t.parent,o=l.parent;if(i!=o&&!n.model.schema.isLimit(i)&&!n.model.schema.isLimit(o)&&function(e,n,t){const l=new Si(e,n);for(const i of l.getWalker())if(t.isLimit(i.item))return!1;return!0}(t,l,n.model.schema)){for(t=n.createPositionAfter(i),(l=n.createPositionBefore(o)).isEqual(t)||n.insert(o,t),n.merge(t);l.parent.isEmpty;){const e=l.parent;l=n.createPositionBefore(e),n.remove(e)}e(n,t,l)}}(e,o,r),i.removeDisallowedAttributes(o.parent.getChildren(),e)),vr(e,n,o),function(e,n){const t=e.checkChild(n,"$text"),l=e.checkChild(n,"paragraph");return!t&&l}(i,o)){const l=i.getNearestSelectionRange(o);t.doNotAutoparagraph&&l?vr(e,n,l):gr(e,o,n)}r.detach()})}(this,e,n)}modifySelection(e,n){!function(e,n,t={}){const l=e.schema,i="backward"!=t.direction,o=t.unit?t.unit:"character",r=new Ci({boundaries:function(e,n){const t=Di._createAt(e.root,n?"end":0);return n?new Si(e,t):new Si(t,e)}(n.focus,i),singleCharacters:!0,direction:i?"forward":"backward"}),s={walker:r,schema:l,isForward:i,unit:o};let u;for(;u=r.next();){if(u.done)return;const t=yr(s,u.value);if(t)return void(n instanceof Vi?e.change(e=>{e.setSelectionFocus(t)}):n.setFocus(t))}}(this,e,n)}getSelectedContent(e){return function(e,n){return e.change(e=>{const t=e.createDocumentFragment(),l=n.getFirstRange();if(!l||l.isCollapsed)return t;const i=l.start.root,o=l.start.getCommonPath(l.end),r=i.getNodeByPath(o);let s;const u=(s=l.start.parent==l.end.parent?l:e.createRange(e.createPositionAt(r,l.start.path[o.length]),e.createPositionAt(r,l.end.path[o.length]+1))).end.offset-s.start.offset;for(const n of s.getItems({shallow:!0}))n.is("textProxy")?e.appendText(n.data,n.getAttributes(),t):e.append(n._clone(!0),t);if(s!=l){const n=l._getTransformedByMove(s.start,e.createPositionAt(t,0),u)[0],i=e.createRange(e.createPositionAt(t,0),n.start);kr(e.createRange(n.end,e.createPositionAt(t,"end")),e),kr(i,e)}return t})}(this,e)}hasContent(e,n){const t=e instanceof Mi?Si._createIn(e):e;if(t.isCollapsed)return!1;for(const i of this.markers.getMarkersIntersectingRange(t))if(i.affectsData)return!0;const{ignoreWhitespaces:l=!1}=n||{};for(const i of t.getItems())if(i.is("textProxy")){if(!l)return!0;if(-1!==i.data.search(/\S/))return!0}else if(this.schema.isObject(i))return!0;return!1}createPositionFromPath(e,n,t){return new Di(e,n,t)}createPositionAt(e,n){return Di._createAt(e,n)}createPositionAfter(e){return Di._createAfter(e)}createPositionBefore(e){return Di._createBefore(e)}createRange(e,n){return new Si(e,n)}createRangeIn(e){return Si._createIn(e)}createRangeOn(e){return Si._createOn(e)}createSelection(e,n,t){return new Ei(e,n,t)}createBatch(e){return new Lo(e)}destroy(){this.document.destroy(),this.stopListening()}_runPendingChanges(){const e=[];for(this.fire("_beforeChanges");this._pendingChanges.length;){this._currentWriter=new Jo(this,this._pendingChanges[0].batch);const n=this._pendingChanges[0].callback(this._currentWriter);e.push(n),this.document._handleChangeBlock(this._currentWriter),this._pendingChanges.shift(),this._currentWriter=null}return this.fire("_afterChanges"),e}}kn(Dr,Gn);class Sr{constructor(){this._listener=Object.create(ml)}listenTo(e){this._listener.listenTo(e,"keydown",(e,n)=>{this._listener.fire("_keydown:"+St(n),n)})}set(e,n,t={}){const l=Tt(e);this._listener.listenTo(this._listener,"_keydown:"+l,(e,t)=>{n(t,()=>{t.preventDefault(),t.stopPropagation(),e.stop()}),e.return=!0},{priority:t.priority})}press(e){return!!this._listener.fire("_keydown:"+St(e),e)}destroy(){this._listener.stopListening()}}class Tr extends Sr{constructor(e){super(),this.editor=e}set(e,n,t={}){if("string"==typeof n){const e=n;n=(n,t)=>{this.editor.execute(e),t()}}super.set(e,n,t)}}class Lr{constructor(e){const n=this.constructor.builtinPlugins;this.config=new sn(e,this.constructor.defaultConfig),this.config.define("plugins",n),this.plugins=new lo(this,n),this.commands=new io;const t=this.config.get("language")||{};this.locale=new ro({uiLanguage:"string"==typeof t?t:t.ui,contentLanguage:this.config.get("language.content")}),this.t=this.locale.t,this.set("state","initializing"),this.once("ready",()=>this.state="ready",{priority:"high"}),this.once("destroy",()=>this.state="destroyed",{priority:"high"}),this.set("isReadOnly",!1),this.model=new Dr,this.data=new xo(this.model),this.editing=new to(this.model),this.editing.view.document.bind("isReadOnly").to(this),this.conversion=new Do([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 Tr(this),this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const e=this.config,n=e.get("plugins")||[],t=e.get("removePlugins")||[],l=e.get("extraPlugins")||[];return this.plugins.init(n.concat(l),t)}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()})}execute(...e){try{this.commands.execute(...e)}catch(e){an.b.rethrowUnexpectedError(e,this)}}}kn(Lr,Gn);var Pr={setData(e){this.data.set(e)},getData(e){return this.data.get(e)}},Ar={updateSourceElement(){if(!this.sourceElement)throw new an.b("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this);!function(e,n){e instanceof HTMLTextAreaElement&&(e.value=n),e.innerHTML=n}(this.sourceElement,this.data.get())}};class Ir{getHtml(e){const n=document.implementation.createHTMLDocument("").createElement("div");return n.appendChild(e),n.innerHTML}}class Er{constructor(){this._domParser=new DOMParser,this._domConverter=new dl({blockFillerMode:"nbsp"}),this._htmlWriter=new Ir}toData(e){const n=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(n)}toView(e){const n=this._toDom(e);return this._domConverter.domToView(n)}_toDom(e){const n=this._domParser.parseFromString(e,"text/html"),t=n.createDocumentFragment(),l=n.body.childNodes;for(;l.length>0;)t.appendChild(l[0]);return t}}class Or{constructor(e){this.editor=e,this._components=new Map}*names(){for(const e of this._components.values())yield e.originalName}add(e,n){if(this.has(e))throw new an.b("componentfactory-item-exists: The item already exists in the component factory.",this,{name:e});this._components.set(jr(e),{callback:n,originalName:e})}create(e){if(!this.has(e))throw new an.b("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:e});return this._components.get(jr(e)).callback(this.editor.locale)}has(e){return this._components.has(jr(e))}}function jr(e){return String(e).toLowerCase()}class Yr{constructor(){this.set("isFocused",!1),this.set("focusedElement",null),this._elements=new Set,this._nextEventLoopTimeout=null}add(e){if(this._elements.has(e))throw new an.b("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(e),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)}}kn(Yr,ml),kn(Yr,Gn);class Fr{constructor(e){this.editor=e,this.componentFactory=new Or(e),this.focusTracker=new Yr,this._editableElementsMap=new Map,this.listenTo(e.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening(),this.focusTracker.destroy();for(const e of this._editableElementsMap.values())e.ckeditorInstance=null;this._editableElementsMap=new Map}setEditableElement(e,n){this._editableElementsMap.set(e,n),n.ckeditorInstance||(n.ckeditorInstance=this.editor)}getEditableElement(e="main"){return this._editableElementsMap.get(e)}getEditableElementsNames(){return this._editableElementsMap.keys()}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}}kn(Fr,mn),t(14);const Nr=new WeakMap;function Rr(e){const{view:n,element:t,text:l,isDirectHost:i=!0}=e,o=n.document;Nr.has(o)||(Nr.set(o,new Map),o.registerPostFixer(e=>Vr(o,e))),Nr.get(o).set(t,{text:l,isDirectHost:i}),n.change(e=>Vr(o,e))}function Vr(e,n){const t=Nr.get(e);let l=!1;for(const[i,o]of t)Hr(n,i,o)&&(l=!0);return l}function Hr(e,n,t){const{text:l,isDirectHost:i}=t,o=i?n:function(e){if(1===e.childCount){const n=e.getChild(0);if(n.is("element")&&!n.is("uiElement"))return n}return null}(n);let r=!1;return!!o&&(t.hostElement=o,o.getAttribute("data-placeholder")!==l&&(e.setAttribute("data-placeholder",l,o),r=!0),function(e){const n=e.document;if(!n)return!1;const t=!Array.from(e.getChildren()).some(e=>!e.is("uiElement"));if(!n.isFocused&&t)return!0;const l=n.selection.anchor;return!(!t||!l||l.parent===e)}(o)?function(e,n){return!n.hasClass("ck-placeholder")&&(e.addClass("ck-placeholder",n),!0)}(e,o)&&(r=!0):function(e,n){return!!n.hasClass("ck-placeholder")&&(e.removeClass("ck-placeholder",n),!0)}(e,o)&&(r=!0),r)}class zr{constructor(){this._replacedElements=[]}replace(e,n){this._replacedElements.push({element:e,newElement:n}),e.style.display="none",n&&e.parentNode.insertBefore(n,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:n})=>{e.style.display="",n&&n.remove()}),this._replacedElements=[]}}class Br extends Fr{constructor(e,n){super(e),this.view=n,this._toolbarConfig=function(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}(e.config.get("toolbar")),this._elementReplacer=new zr}get element(){return this.view.element}init(e){const n=this.view,t=this.editor.editing.view,l=n.editable,i=t.document.getRoot();l.name=i.rootName,n.render();const o=l.element;this.setEditableElement(l.name,o),this.focusTracker.add(o),n.editable.bind("isFocused").to(this.focusTracker),t.attachDomRoot(o),e&&this._elementReplacer.replace(e,this.element),this._initPlaceholder(),this._initToolbar(),this.fire("ready")}destroy(){const e=this.view,n=this.editor.editing.view;this._elementReplacer.restore(),n.detachDomRoot(e.editable.name),e.destroy(),super.destroy()}_initToolbar(){const e=this.editor,n=this.view,t=e.editing.view;n.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused"),n.stickyPanel.limiterElement=n.element,this._toolbarConfig.viewportTopOffset&&(n.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset),n.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),function({origin:e,originKeystrokeHandler:n,originFocusTracker:t,toolbar:l,beforeFocus:i,afterBlur:o}){t.add(l.element),n.set("Alt+F10",(e,n)=>{t.isFocused&&!l.focusTracker.isFocused&&(i&&i(),l.focus(),n())}),l.keystrokes.set("Esc",(n,t)=>{l.focusTracker.isFocused&&(e.focus(),o&&o(),t())})}({origin:t,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:n.toolbar})}_initPlaceholder(){const e=this.editor,n=e.editing.view,t=n.document.getRoot(),l=e.sourceElement,i=e.config.get("placeholder")||l&&"textarea"===l.tagName.toLowerCase()&&l.getAttribute("placeholder");i&&Rr({view:n,element:t,text:i,isDirectHost:!1})}}class Ur extends dt{constructor(e){super({idProperty:"viewUid"}),this.on("add",(e,n,t)=>{n.isRendered||n.render(),n.element&&this._parentElement&&this._parentElement.insertBefore(n.element,this._parentElement.children[t])}),this.on("remove",(e,n)=>{n.element&&this._parentElement&&n.element.remove()}),this.locale=e,this._parentElement=null}destroy(){this.map(e=>e.destroy())}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!function(e){return e.every(e=>"string"==typeof e)}(e))throw new an.b("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this);return{to:n=>{for(const t of this)for(const l of e)t.delegate(l).to(n);this.on("add",(t,l)=>{for(const i of e)l.delegate(i).to(n)}),this.on("remove",(t,l)=>{for(const i of e)l.stopDelegating(i,n)})}}}}class Wr{constructor(e){Object.assign(this,es(Xr(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 an.b("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,e]);this._revertTemplateFromNode(e,this._revertData)}*getViews(){yield*function*e(n){if(n.children)for(const t of n.children)os(t)?yield t:rs(t)&&(yield*e(t))}(this)}static bind(e,n){return{to:(t,l)=>new $r({eventNameOrFunction:t,attribute:t,observable:e,emitter:n,callback:l}),if:(t,l,i)=>new Gr({observable:e,emitter:n,attribute:t,valueIfTrue:l,callback:i})}}static extend(e,n){if(e._isRendered)throw new an.b("template-extend-render: Attempting to extend a template which has already been rendered.",[this,e]);!function e(n,t){if(t.attributes&&(n.attributes||(n.attributes={}),ls(n.attributes,t.attributes)),t.eventListeners&&(n.eventListeners||(n.eventListeners={}),ls(n.eventListeners,t.eventListeners)),t.text&&n.text.push(...t.text),t.children&&t.children.length){if(n.children.length!=t.children.length)throw new an.b("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",n);let l=0;for(const i of t.children)e(n.children[l++],i)}}(e,es(Xr(n)))}_renderNode(e){let n;if(n=e.node?this.tag&&this.text:this.tag?this.text:!this.text)throw new an.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this);return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let n=e.node;return n||(n=e.node=document.createElementNS(this.ns||"http://www.w3.org/1999/xhtml",this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),n}_renderText(e){let n=e.node;return n?e.revertData.text=n.textContent:n=e.node=document.createTextNode(""),Kr(this.text)?this._bindToObservable({schema:this.text,updater:function(e){return{set(n){e.textContent=n},remove(){e.textContent=""}}}(n),data:e}):n.textContent=this.text.join(""),n}_renderAttributes(e){let n,t,l,i;if(!this.attributes)return;const o=e.node,r=e.revertData;for(n in this.attributes)if(l=o.getAttribute(n),t=this.attributes[n],r&&(r.attributes[n]=l),i=C(t[0])&&t[0].ns?t[0].ns:null,Kr(t)){const s=i?t[0].value:t;r&&us(n)&&s.unshift(l),this._bindToObservable({schema:s,updater:Qr(o,n,i),data:e})}else"style"==n&&"string"!=typeof t[0]?this._renderStyleAttribute(t[0],e):(r&&l&&us(n)&&t.unshift(l),is(t=t.map(e=>e&&e.value||e).reduce((e,n)=>e.concat(n),[]).reduce(ts,""))||o.setAttributeNS(i,n,t))}_renderStyleAttribute(e,n){const t=n.node;for(const l in e){const i=e[l];Kr(i)?this._bindToObservable({schema:[i],updater:Zr(t,l),data:n}):t.style[l]=i}}_renderElementChildren(e){const n=e.node,t=e.intoFragment?document.createDocumentFragment():n,l=e.isApplying;let i=0;for(const o of this.children)if(ss(o)){if(!l){o.setParent(n);for(const e of o)t.appendChild(e.element)}}else if(os(o))l||(o.isRendered||o.render(),t.appendChild(o.element));else if(ll(o))t.appendChild(o);else if(l){const n={children:[],bindings:[],attributes:{}};e.revertData.children.push(n),o._renderNode({node:t.childNodes[i++],isApplying:!0,revertData:n})}else t.appendChild(o.render());e.intoFragment&&n.appendChild(t)}_setUpListeners(e){if(this.eventListeners)for(const n in this.eventListeners){const t=this.eventListeners[n].map(t=>{const[l,i]=n.split("@");return t.activateDomEventListener(l,i,e)});e.revertData&&e.revertData.bindings.push(t)}}_bindToObservable({schema:e,updater:n,data:t}){const l=t.revertData;Jr(e,n,t);const i=e.filter(e=>!is(e)).filter(e=>e.observable).map(l=>l.activateAttributeListener(e,n,t));l&&l.bindings.push(i)}_revertTemplateFromNode(e,n){for(const t of n.bindings)for(const e of t)e();if(n.text)e.textContent=n.text;else{for(const t in n.attributes){const l=n.attributes[t];null===l?e.removeAttribute(t):e.setAttribute(t,l)}for(let t=0;tJr(e,n,t);return this.emitter.listenTo(this.observable,"change:"+this.attribute,l),()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,l)}}}class $r extends qr{activateDomEventListener(e,n,t){const l=(e,t)=>{n&&!t.target.matches(n)||("function"==typeof this.eventNameOrFunction?this.eventNameOrFunction(t):this.observable.fire(this.eventNameOrFunction,t))};return this.emitter.listenTo(t.node,e,l),()=>{this.emitter.stopListening(t.node,e,l)}}}class Gr extends qr{getValue(e){return!is(super.getValue(e))&&(this.valueIfTrue||!0)}}function Kr(e){return!!e&&(e.value&&(e=e.value),Array.isArray(e)?e.some(Kr):e instanceof qr)}function Jr(e,n,{node:t}){let l=function(e,n){return e.map(e=>e instanceof qr?e.getValue(n):e)}(e,t);is(l=1==e.length&&e[0]instanceof Gr?l[0]:l.reduce(ts,""))?n.remove():n.set(l)}function Qr(e,n,t){return{set(l){e.setAttributeNS(t,n,l)},remove(){e.removeAttributeNS(t,n)}}}function Zr(e,n){return{set(t){e.style[n]=t},remove(){e.style[n]=null}}}function Xr(e){return on(e,e=>{if(e&&(e instanceof qr||rs(e)||os(e)||ss(e)))return e})}function es(e){if("string"==typeof e?e=function(e){return{text:[e]}}(e):e.text&&function(e){Array.isArray(e.text)||(e.text=[e.text])}(e),e.on&&(e.eventListeners=function(e){for(const n in e)ns(e,n);return e}(e.on),delete e.on),!e.text){e.attributes&&function(e){for(const n in e)e[n].value&&(e[n].value=[].concat(e[n].value)),ns(e,n)}(e.attributes);const n=[];if(e.children)if(ss(e.children))n.push(e.children);else for(const t of e.children)rs(t)||os(t)||ll(t)?n.push(t):n.push(new Wr(t));e.children=n}return e}function ns(e,n){Array.isArray(e[n])||(e[n]=[e[n]])}function ts(e,n){return is(n)?e:is(e)?n:`${e} ${n}`}function ls(e,n){for(const t in n)e[t]?e[t].push(...n[t]):e[t]=n[t]}function is(e){return!e&&0!==e}function os(e){return e instanceof as}function rs(e){return e instanceof Wr}function ss(e){return e instanceof Ur}function us(e){return"class"==e||"style"==e}t(16);class as{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new dt,this._unboundChildren=this.createCollection(),this._viewCollections.on("add",(n,t)=>{t.locale=e}),this.decorate("render")}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=Wr.bind(this,this)}createCollection(){const e=new Ur;return this._viewCollections.add(e),e}registerChild(e){Ln(e)||(e=[e]);for(const n of e)this._unboundChildren.add(n)}deregisterChild(e){Ln(e)||(e=[e]);for(const n of e)this._unboundChildren.remove(n)}setTemplate(e){this.template=new Wr(e)}extendTemplate(e){Wr.extend(this.template,e)}render(){if(this.isRendered)throw new an.b("ui-view-render-already-rendered: This View has already been 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)}}kn(as,ml),kn(as,Gn),t(18);class cs extends as{constructor(e){super(e),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const e=this._bodyCollectionContainer=new Wr({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this.body}).render();document.body.appendChild(e)}}t(20);class ds extends as{constructor(e){super(e),this.set("text"),this.set("for");const n=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],for:n.to("for")},children:[{text:n.to("text")}]})}}class hs extends cs{constructor(e){super(e);const n=dn();this.top=this.createCollection(),this.main=this.createCollection(),this._voiceLabelView=this._createVoiceLabel(n),this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:e.uiLanguageDirection,lang:e.uiLanguage,"aria-labelledby":"ck-editor__aria-label_"+n},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(e){const n=this.t,t=new ds;return t.text=n("bi"),t.extendTemplate({attributes:{id:"ck-editor__aria-label_"+e,class:"ck-voice-label"}}),t}}class ps extends as{constructor(e,n,t){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=t,this._hasExternalElement=!!this._editableElement,this._editingView=n}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 n(n){e.change(t=>{const l=e.document.getRoot(n.name);t.addClass(n.isFocused?"ck-focused":"ck-blurred",l),t.removeClass(n.isFocused?"ck-blurred":"ck-focused",l)})}e.isRenderingInProgress?function t(l){e.once("change:isRenderingInProgress",(e,i,o)=>{o?t(l):n(l)})}(this):n(this)}}class fs extends ps{constructor(e,n,t){super(e,n,t),this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const e=this._editingView,n=this.t;e.change(t=>{const l=e.document.getRoot(this.name);t.setAttribute("aria-label",n("bu",[this.name]),l)})}}function ms(e){return n=>n+e}t(22);const gs=ms("px");class vs extends as{constructor(e){super(e);const n=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 Wr({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:n.to("isSticky",e=>e?"block":"none"),height:n.to("isSticky",e=>e?gs(this._panelRect.height):null)}}}).render(),this._contentPanel=new Wr({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",n.if("isSticky","ck-sticky-panel__content_sticky"),n.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:n.to("isSticky",e=>e?gs(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:n.to("_hasViewportTopOffset",e=>e?gs(this.viewportTopOffset):null),bottom:n.to("_isStickyToTheLimiter",e=>e?gs(this.limiterBottomOffset):null),marginLeft:n.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(sl.window,"scroll",()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let n;this.limiterElement?(n=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&n.top{this[n](),t()})}}get first(){return this.focusables.find(ys)||null}get last(){return this.focusables.filter(ys).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((n,t)=>{const l=n.element===this.focusTracker.focusedElement;return l&&(e=t),l}),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 n=this.current,t=this.focusables.length;if(!t)return null;if(null===n)return this[1===e?"first":"last"];let l=(n+t+e)%t;do{const n=this.focusables.get(l);if(ys(n))return n;l=(l+t+e)%t}while(l!==n);return null}}function ys(e){return!(!e.focus||"none"==sl.window.getComputedStyle(e.element).display)}class bs extends as{constructor(e){super(e),this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}class ws{constructor(e){this._callback=e,this._elements=new Set,this._previousRects=new Map,this._periodicCheckTimeout=null}observe(e){this._elements.add(e),1===this._elements.size&&this._startPeriodicCheck()}unobserve(e){this._elements.delete(e),this._previousRects.delete(e),this._elements.size||this._stopPeriodicCheck()}disconnect(){this._elements.forEach(e=>this.unobserve(e))}_startPeriodicCheck(){const e=()=>{this._checkElementRectsAndExecuteCallback(),this._periodicCheckTimeout=setTimeout(e,100)};this.listenTo(sl.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()}),e()}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout),this.stopListening(),this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const e=[];for(const n of this._elements)this._hasRectChanged(n)&&e.push({target:n,contentRect:this._previousRects.get(n)});e.length&&this._callback(e)}_hasRectChanged(e){if(!e.ownerDocument.body.contains(e))return!1;const n=new ii(e),t=this._previousRects.get(e),l=!t||!t.isEqual(n);return this._previousRects.set(e,n),l}}kn(ws,ml);class ks extends as{constructor(e){super(e);const n=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",n.to("position",e=>"ck-dropdown__panel_"+e),n.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:n.to(e=>e.preventDefault())}})}focus(){this.children.length&&this.children.first.focus()}focusLast(){if(this.children.length){const e=this.children.last;"function"==typeof e.focusLast?e.focusLast():e.focus()}}}function Ms({element:e,target:n,positions:t,limiter:l,fitInViewport:i}){x(n)&&(n=n()),x(l)&&(l=l());const o=function(e){for(;e&&"html"!=e.tagName.toLowerCase();){if("static"!=sl.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}(e.parentElement),r=new ii(e),s=new ii(n);let u,a;if(l||i){const e=l&&new ii(l).getVisible(),n=i&&new ii(sl.window);[a,u]=function(e,n,t,l,i){let o,r,s=0,u=0;const a=t.getArea();return e.some(e=>{const[c,d]=Cs(e,n,t);let h,p;if(l)if(i){const e=l.getIntersection(i);h=e?e.getIntersectionArea(d):0}else h=l.getIntersectionArea(d);function f(){u=p,s=h,o=d,r=c}return i&&(p=i.getIntersectionArea(d)),i&&!l?p>u&&f():!i&&l?h>s&&f():(p>u&&h>=s||p>=u&&h>s)&&f(),h===a}),o?[r,o]:null}(t,s,r,e,n)||Cs(t[0],s,r)}else[a,u]=Cs(t[0],s,r);let{left:c,top:d}=xs(u);if(o){const e=xs(new ii(o)),n=ti(o);c-=e.left,d-=e.top,c+=o.scrollLeft,d+=o.scrollTop,c-=n.left,d-=n.top}return{left:c,top:d,name:a}}function Cs(e,n,t){const{left:l,top:i,name:o}=e(n,t);return[o,t.clone().moveTo(l,i)]}function xs({left:e,top:n}){const{scrollX:t,scrollY:l}=sl.window;return{left:e+t,top:n+l}}t(24);class Ds extends as{constructor(e,n,t){super(e);const l=this.bindTemplate;this.buttonView=n,this.panelView=t,this.set("isOpen",!1),this.set("isEnabled",!0),this.set("class"),this.set("panelPosition","auto"),this.focusTracker=new Yr,this.keystrokes=new Sr,this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",l.to("class"),l.if("isEnabled","ck-disabled",e=>!e)]},children:[n,t]}),n.extendTemplate({attributes:{class:["ck-dropdown__button"]}})}render(){super.render(),this.listenTo(this.buttonView,"open",()=>{this.isOpen=!this.isOpen}),this.panelView.bind("isVisible").to(this,"isOpen"),this.on("change:isOpen",()=>{this.isOpen&&(this.panelView.position="auto"===this.panelPosition?Ds._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:!0,positions:this._panelPositions}).name:this.panelPosition)}),this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,n)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,n())};this.keystrokes.set("arrowdown",(e,n)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,n())}),this.keystrokes.set("arrowright",(e,n)=>{this.isOpen&&n()}),this.keystrokes.set("arrowleft",e),this.keystrokes.set("esc",e)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:e,southWest:n,northEast:t,northWest:l}=Ds.defaultPanelPositions;return"ltr"===this.locale.uiLanguageDirection?[e,n,t,l]:[n,e,l,t]}}Ds.defaultPanelPositions={southEast:e=>({top:e.bottom,left:e.left,name:"se"}),southWest:(e,n)=>({top:e.bottom,left:e.left-n.width+e.width,name:"sw"}),northEast:(e,n)=>({top:e.top-n.height,left:e.left,name:"ne"}),northWest:(e,n)=>({top:e.bottom-n.height,left:e.left-n.width+e.width,name:"nw"})},Ds._getOptimalPosition=Ms,t(26);class Ss extends as{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"),n=e.getAttribute("viewBox");for(n&&(this.viewBox=n),this.element.innerHTML="";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})}}t(28);class Ts extends as{constructor(e){super(e),this.set("text",""),this.set("position","s");const n=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",n.to("position",e=>"ck-tooltip_"+e),n.if("text","ck-hidden",e=>!e.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:n.to("text")}]}]})}}t(30);class Ls extends as{constructor(e){super(e);const n=this.bindTemplate,t=dn();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.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(t),this.iconView=new Ss,this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}}),this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this)),this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",n.to("class"),n.if("isEnabled","ck-disabled",e=>!e),n.if("isVisible","ck-hidden",e=>!e),n.to("isOn",e=>e?"ck-on":"ck-off"),n.if("withText","ck-button_with-text")],type:n.to("type",e=>e||"button"),tabindex:n.to("tabindex"),"aria-labelledby":"ck-editor__aria-label_"+t,"aria-disabled":n.if("isEnabled",!0,e=>!e),"aria-pressed":n.to("isOn",e=>!!this.isToggleable&&String(e))},children:this.children,on:{mousedown:n.to(e=>{e.preventDefault()}),click:n.to(e=>{this.isEnabled?this.fire("execute"):e.preventDefault()})}})}render(){super.render(),this.icon&&(this.iconView.bind("content").to(this,"icon"),this.children.add(this.iconView)),this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const e=new Ts;return e.bind("text").to(this,"_tooltipString"),e.bind("position").to(this,"tooltipPosition"),e}_createLabelView(e){const n=new as;return n.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:this.bindTemplate.to("labelStyle"),id:"ck-editor__aria-label_"+e},children:[{text:this.bindTemplate.to("label")}]}),n}_getTooltipString(e,n,t){return e?"string"==typeof e?e:(t&&(t=function(e){return yt?Lt(e).map(e=>xt[e.toLowerCase()]||e).reduce((e,n)=>e.slice(-1)in Ct?e+n:e+"+"+n):e}(t)),e instanceof Function?e(n,t):`${n}${t?` (${t})`:""}`):""}}class Ps extends Ls{constructor(e){super(e),this.arrowView=this._createArrowView(),this.extendTemplate({attributes:{"aria-haspopup":!0}}),this.delegate("execute").to(this,"open")}render(){super.render(),this.children.add(this.arrowView)}_createArrowView(){const e=new Ss;return e.content='',e.extendTemplate({attributes:{class:"ck-dropdown__arrow"}}),e}}t(32);class As extends as{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new Yr,this.keystrokes=new Sr,this._focusCycler=new _s({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,n)=>{this.focusTracker.add(n.element)}),this.items.on("remove",(e,n)=>{this.focusTracker.remove(n.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Is extends as{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class Es extends as{constructor(e){super(e),this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}t(34);class Os extends Ls{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 as;return e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]}),e}}function js({emitter:e,activator:n,callback:t,contextElements:l}){e.listenTo(document,"mousedown",(e,{target:i})=>{if(n()){for(const e of l)if(e.contains(i))return;t()}})}function Ys(e,n=Ps){const t=new n(e),l=new ks(e),i=new Ds(e,t,l);return t.bind("isEnabled").to(i),t instanceof Ps?t.bind("isOn").to(i,"isOpen"):t.arrowView.bind("isOn").to(i,"isOpen"),function(e){(function(e){e.on("render",()=>{js({emitter:e,activator:()=>e.isOpen,callback:()=>{e.isOpen=!1},contextElements:[e.element]})})})(e),function(e){e.on("execute",n=>{n.source instanceof Os||(e.isOpen=!1)})}(e),function(e){e.keystrokes.set("arrowdown",(n,t)=>{e.isOpen&&(e.panelView.focus(),t())}),e.keystrokes.set("arrowup",(n,t)=>{e.isOpen&&(e.panelView.focusLast(),t())})}(e)}(i),i}function Fs(e,n){const t=e.locale,l=e.listView=new As(t);l.items.bindTo(n).using(({type:e,model:n})=>{if("separator"===e)return new Es(t);if("button"===e||"switchbutton"===e){const l=new Is(t);let i;return(i="button"===e?new Ls(t):new Os(t)).bind(...Object.keys(n)).to(n),i.delegate("execute").to(l),l.children.add(i),l}}),e.panelView.children.add(l),l.items.delegate("execute").to(e)}t(36),t(38),t(40);class Ns extends as{constructor(e,n){super(e);const t=this.bindTemplate,l=this.t;this.options=n||{},this.set("ariaLabel",l("bo")),this.items=this.createCollection(),this.focusTracker=new Yr,this.keystrokes=new Sr,this.set("class"),this.itemsView=new Rs(e),this.children=this.createCollection(),this.children.add(this.itemsView),this.focusables=this.createCollection(),this._focusCycler=new _s({focusables:this.focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:["arrowleft","arrowup"],focusNext:["arrowright","arrowdown"]}}),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar",t.to("class")],role:"toolbar","aria-label":t.to("ariaLabel")},children:this.children,on:{mousedown:function(e){return e.bindTemplate.to(n=>{n.target===e.element&&n.preventDefault()})}(this)}}),this._behavior=this.options.shouldGroupWhenFull?new Hs(this):new Vs(this)}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on("add",(e,n)=>{this.focusTracker.add(n.element)}),this.items.on("remove",(e,n)=>{this.focusTracker.remove(n.element)}),this.keystrokes.listenTo(this.element),this._behavior.render(this)}destroy(){return this._behavior.destroy(),super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(e,n){e.map(e=>{"|"==e?this.items.add(new bs):n.has(e)?this.items.add(n.create(e)):console.warn(Object(an.a)("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:e})})}}class Rs extends as{constructor(e){super(e),this.children=this.createCollection(),this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class Vs{constructor(e){const n=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:[n.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class Hs{constructor(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,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("add",(e,n,t)=>{t>this.ungroupedItems.length?this.groupedItems.add(n,t-this.ungroupedItems.length):this.ungroupedItems.add(n,t),this._updateGrouping()}),e.items.on("remove",(e,n,t)=>{t>this.ungroupedItems.length?this.groupedItems.remove(n):this.ungroupedItems.remove(n),this._updateGrouping()}),e.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(e){this.viewElement=e.element,this._enableGroupingOnResize()}destroy(){this.groupedItemsDropdown.destroy(),this.resizeObserver.disconnect()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement))return;let e;for(;this._areItemsOverflowing;)this._groupLastItem(),e=!0;if(!e&&this.groupedItems.length){for(;this.groupedItems.length&&!this._areItemsOverflowing;)this._ungroupFirstItem();this._areItemsOverflowing&&this._groupLastItem()}}get _areItemsOverflowing(){if(!this.ungroupedItems.length)return!1;const e=this.viewElement,n=this.viewLocale.uiLanguageDirection,t=new ii(e.lastChild),l=new ii(e);if(!this.cachedPadding){const t=sl.window.getComputedStyle(e);this.cachedPadding=Number.parseInt(t["ltr"===n?"paddingRight":"paddingLeft"])}return"ltr"===n?t.right>l.right-this.cachedPadding:t.left{e&&e===n.contentRect.width||(this._updateGrouping(),e=n.contentRect.width)}),this.resizeObserver.observe(this.viewElement),this._updateGrouping()}_groupLastItem(){this.groupedItems.length||(this.viewChildren.add(new bs),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,n=e.t,t=Ys(e);return t.class="ck-toolbar__grouped-dropdown",t.panelPosition="ltr"===e.uiLanguageDirection?"sw":"se",function(e,n){const t=e.locale,l=t.t,i=e.toolbarView=new Ns(t);i.set("ariaLabel",l("bq")),e.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}}),[].map(e=>i.items.add(e)),e.panelView.children.add(i),i.items.delegate("execute").to(e)}(t),t.buttonView.set({label:n("bp"),tooltip:!0,icon:'\n'}),t.toolbarView.items.bindTo(this.groupedItems).using(e=>e),t}_updateFocusCycleableItems(){this.viewFocusables.clear(),this.ungroupedItems.map(e=>{this.viewFocusables.add(e)}),this.groupedItems.length&&this.viewFocusables.add(this.groupedItemsDropdown)}}t(42);class zs extends hs{constructor(e,n){super(e),this.stickyPanel=new vs(e),this.toolbar=new Ns(e,{shouldGroupWhenFull:!0}),this.editable=new fs(e,n)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}}class Bs extends Lr{constructor(e,n){super(n),rn(e)&&(this.sourceElement=e),this.data.processor=new Er,this.model.document.createRoot(),this.ui=new Br(this,new zs(this.locale,this.editing.view)),function(e){if(!x(e.updateSourceElement))throw new an.b("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",e);const n=e.sourceElement;if(n&&"textarea"===n.tagName.toLowerCase()&&n.form){let t;const l=n.form,i=()=>e.updateSourceElement();x(l.submit)&&(t=l.submit,l.submit=()=>{i(),t.apply(l)}),l.addEventListener("submit",i),e.on("destroy",()=>{l.removeEventListener("submit",i),t&&(l.submit=t)})}}(this)}destroy(){return this.sourceElement&&this.updateSourceElement(),this.ui.destroy(),super.destroy()}static create(e,n={}){return new Promise(t=>{const l=new this(e,n);t(l.initPlugins().then(()=>l.ui.init(rn(e)?e:null)).then(()=>{if(!rn(e)&&n.initialData)throw new an.b("editor-create-initial-data: The config.initialData option cannot be used together with initial data passed in Editor.create().",null);const t=n.initialData||function(e){return rn(e)?function(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}(e):e}(e);return l.data.init(t)}).then(()=>l.fire("ready")).then(()=>l))})}}kn(Bs,Pr),kn(Bs,Ar);class Us{constructor(e){this.editor=e}destroy(){this.stopListening()}}kn(Us,Gn);class Ws{constructor(e){this.files=function(e){const n=e.files?Array.from(e.files):[],t=e.items?Array.from(e.items):[];return n.length?n:t.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,n){this._native.setData(e,n)}}class qs extends Fl{constructor(e){super(e);const n=this.document;function t(e,t){t.preventDefault();const l=t.dropRange?[t.dropRange]:Array.from(n.selection.getRanges()),i=new cn(n,"clipboardInput");n.fire(i,{dataTransfer:t.dataTransfer,targetRanges:l}),i.stop.called&&t.stopPropagation()}this.domEventType=["paste","copy","cut","drop","dragover"],this.listenTo(n,"paste",t,{priority:"low"}),this.listenTo(n,"drop",t,{priority:"low"})}onDomEvent(e){const n={dataTransfer:new Ws(e.clipboardData?e.clipboardData:e.dataTransfer)};"drop"==e.type&&(n.dropRange=function(e,n){const t=n.target.ownerDocument,l=n.clientX,i=n.clientY;let o;return t.caretRangeFromPoint&&t.caretRangeFromPoint(l,i)?o=t.caretRangeFromPoint(l,i):n.rangeParent&&((o=t.createRange()).setStart(n.rangeParent,n.rangeOffset),o.collapse(!0)),o?e.domConverter.domRangeToView(o):e.document.selection.getFirstRange()}(this.view,e)),this.fire(e.type,e,n)}}const $s=["figcaption","li"];class Gs extends Us{static get pluginName(){return"Clipboard"}init(){const e=this.editor,n=e.model.document,t=e.editing.view,l=t.document;function i(t,i){const o=i.dataTransfer;i.preventDefault();const r=e.data.toView(e.model.getSelectedContent(n.selection));l.fire("clipboardOutput",{dataTransfer:o,content:r,method:t.name})}this._htmlDataProcessor=new Er,t.addObserver(qs),this.listenTo(l,"clipboardInput",n=>{e.isReadOnly&&n.stop()},{priority:"highest"}),this.listenTo(l,"clipboardInput",(e,n)=>{const l=n.dataTransfer;let i="";l.getData("text/html")?i=function(e){return e.replace(/(\s+)<\/span>/g,(e,n)=>1==n.length?" ":n)}(l.getData("text/html")):l.getData("text/plain")&&(i=function(e){return(e=e.replace(//g,">").replace(/\n/g,"