/*!
* @license Copyright (c) 2003-2020, CKSource - Frederico Knabben. All rights reserved.
* For licensing, see LICENSE.md.
*/
(function(t){t["en"]=Object.assign(t["en"]||{},{a:"Image toolbar",b:"Media toolbar",c:"Table toolbar",d:"Special characters",e:"leftwards double arrow",f:"rightwards double arrow",g:"upwards double arrow",h:"downwards double arrow",i:"leftwards dashed arrow",j:"rightwards dashed arrow",k:"upwards dashed arrow",l:"downwards dashed arrow",m:"leftwards arrow to bar",n:"rightwards arrow to bar",o:"upwards arrow to bar",p:"downwards arrow to bar",q:"up down arrow with base",r:"back with leftwards arrow above",s:"end with leftwards arrow above",t:"on with exclamation mark with left right arrow above",u:"soon with rightwards arrow above",v:"top with upwards arrow above",w:"Dollar sign",x:"Euro sign",y:"Yen sign",z:"Pound sign",aa:"Cent sign",ab:"Euro-currency sign",ac:"Colon sign",ad:"Cruzeiro sign",ae:"French franc sign",af:"Lira sign",ag:"Currency sign",ah:"Bitcoin sign",ai:"Mill sign",aj:"Naira sign",ak:"Peseta sign",al:"Rupee sign",am:"Won sign",an:"New sheqel sign",ao:"Dong sign",ap:"Kip sign",aq:"Tugrik sign",ar:"Drachma sign",as:"German penny sign",at:"Peso sign",au:"Guarani sign",av:"Austral sign",aw:"Hryvnia sign",ax:"Cedi sign",ay:"Livre tournois sign",az:"Spesmilo sign",ba:"Tenge sign",bb:"Indian rupee sign",bc:"Turkish lira sign",bd:"Nordic mark sign",be:"Manat sign",bf:"Ruble sign",bg:"Latin capital letter a with macron",bh:"Latin small letter a with macron",bi:"Latin capital letter a with breve",bj:"Latin small letter a with breve",bk:"Latin capital letter a with ogonek",bl:"Latin small letter a with ogonek",bm:"Latin capital letter c with acute",bn:"Latin small letter c with acute",bo:"Latin capital letter c with circumflex",bp:"Latin small letter c with circumflex",bq:"Latin capital letter c with dot above",br:"Latin small letter c with dot above",bs:"Latin capital letter c with caron",bt:"Latin small letter c with caron",bu:"Latin capital letter d with caron",bv:"Latin small letter d with caron",bw:"Latin capital letter d with stroke",bx:"Latin small letter d with stroke",by:"Latin capital letter e with macron",bz:"Latin small letter e with macron",ca:"Latin capital letter e with breve",cb:"Latin small letter e with breve",cc:"Latin capital letter e with dot above",cd:"Latin small letter e with dot above",ce:"Latin capital letter e with ogonek",cf:"Latin small letter e with ogonek",cg:"Latin capital letter e with caron",ch:"Latin small letter e with caron",ci:"Latin capital letter g with circumflex",cj:"Latin small letter g with circumflex",ck:"Latin capital letter g with breve",cl:"Latin small letter g with breve",cm:"Latin capital letter g with dot above",cn:"Latin small letter g with dot above",co:"Latin capital letter g with cedilla",cp:"Latin small letter g with cedilla",cq:"Latin capital letter h with circumflex",cr:"Latin small letter h with circumflex",cs:"Latin capital letter h with stroke",ct:"Latin small letter h with stroke",cu:"Latin capital letter i with tilde",cv:"Latin small letter i with tilde",cw:"Latin capital letter i with macron",cx:"Latin small letter i with macron",cy:"Latin capital letter i with breve",cz:"Latin small letter i with breve",da:"Latin capital letter i with ogonek",db:"Latin small letter i with ogonek",dc:"Latin capital letter i with dot above",dd:"Latin small letter dotless i",de:"Latin capital ligature ij",df:"Latin small ligature ij",dg:"Latin capital letter j with circumflex",dh:"Latin small letter j with circumflex",di:"Latin capital letter k with cedilla",dj:"Latin small letter k with cedilla",dk:"Latin small letter kra",dl:"Latin capital letter l with acute",dm:"Latin small letter l with acute",dn:"Latin capital letter l with cedilla",do:"Latin small letter l with cedilla",dp:"Latin capital letter l with caron",dq:"Latin small letter l with caron",dr:"Latin capital letter l with middle dot",ds:"Latin small letter l with middle dot",dt:"Latin capital letter l with stroke",du:"Latin small letter l with stroke",dv:"Latin capital letter n with acute",dw:"Latin small letter n with acute",dx:"Latin capital letter n with cedilla",dy:"Latin small letter n with cedilla",dz:"Latin capital letter n with caron",ea:"Latin small letter n with caron",eb:"Latin small letter n preceded by apostrophe",ec:"Latin capital letter eng",ed:"Latin small letter eng",ee:"Latin capital letter o with macron",ef:"Latin small letter o with macron",eg:"Latin capital letter o with breve",eh:"Latin small letter o with breve",ei:"Latin capital letter o with double acute",ej:"Latin small letter o with double acute",ek:"Latin capital ligature oe",el:"Latin small ligature oe",em:"Latin capital letter r with acute",en:"Latin small letter r with acute",eo:"Latin capital letter r with cedilla",ep:"Latin small letter r with cedilla",eq:"Latin capital letter r with caron",er:"Latin small letter r with caron",es:"Latin capital letter s with acute",et:"Latin small letter s with acute",eu:"Latin capital letter s with circumflex",ev:"Latin small letter s with circumflex",ew:"Latin capital letter s with cedilla",ex:"Latin small letter s with cedilla",ey:"Latin capital letter s with caron",ez:"Latin small letter s with caron",fa:"Latin capital letter t with cedilla",fb:"Latin small letter t with cedilla",fc:"Latin capital letter t with caron",fd:"Latin small letter t with caron",fe:"Latin capital letter t with stroke",ff:"Latin small letter t with stroke",fg:"Latin capital letter u with tilde",fh:"Latin small letter u with tilde",fi:"Latin capital letter u with macron",fj:"Latin small letter u with macron",fk:"Latin capital letter u with breve",fl:"Latin small letter u with breve",fm:"Latin capital letter u with ring above",fn:"Latin small letter u with ring above",fo:"Latin capital letter u with double acute",fp:"Latin small letter u with double acute",fq:"Latin capital letter u with ogonek",fr:"Latin small letter u with ogonek",fs:"Latin capital letter w with circumflex",ft:"Latin small letter w with circumflex",fu:"Latin capital letter y with circumflex",fv:"Latin small letter y with circumflex",fw:"Latin capital letter y with diaeresis",fx:"Latin capital letter z with acute",fy:"Latin small letter z with acute",fz:"Latin capital letter z with dot above",ga:"Latin small letter z with dot above",gb:"Latin capital letter z with caron",gc:"Latin small letter z with caron",gd:"Latin small letter long s",ge:"Less-than sign",gf:"Greater-than sign",gg:"Less-than or equal to",gh:"Greater-than or equal to",gi:"En dash",gj:"Em dash",gk:"Macron",gl:"Overline",gm:"Degree sign",gn:"Minus sign",go:"Plus-minus sign",gp:"Division sign",gq:"Fraction slash",gr:"Multiplication sign",gs:"Latin small letter f with hook",gt:"Integral",gu:"N-ary summation",gv:"Infinity",gw:"Square root",gx:"Tilde operator",gy:"Approximately equal to",gz:"Almost equal to",ha:"Not equal to",hb:"Identical to",hc:"Element of",hd:"Not an element of",he:"Contains as member",hf:"N-ary product",hg:"Logical and",hh:"Logical or",hi:"Not sign",hj:"Intersection",hk:"Union",hl:"Partial differential",hm:"For all",hn:"There exists",ho:"Empty set",hp:"Nabla",hq:"Asterisk operator",hr:"Proportional to",hs:"Angle",ht:"Vulgar fraction one quarter",hu:"Vulgar fraction one half",hv:"Vulgar fraction three quarters",hw:"Single left-pointing angle quotation mark",hx:"Single right-pointing angle quotation mark",hy:"Left-pointing double angle quotation mark",hz:"Right-pointing double angle quotation mark",ia:"Left single quotation mark",ib:"Right single quotation mark",ic:"Left double quotation mark",id:"Right double quotation mark",ie:"Single low-9 quotation mark",if:"Double low-9 quotation mark",ig:"Inverted exclamation mark",ih:"Inverted question mark",ii:"Two dot leader",ij:"Horizontal ellipsis",ik:"Double dagger",il:"Per mille sign",im:"Per ten thousand sign",in:"Double exclamation mark",io:"Question exclamation mark",ip:"Exclamation question mark",iq:"Double question mark",ir:"Copyright sign",is:"Registered sign",it:"Trade mark sign",iu:"Section sign",iv:"Paragraph sign",iw:"Reversed paragraph sign",ix:"Words: %0",iy:"Characters: %0",iz:"Block quote",ja:"Choose heading",jb:"Heading",jc:"media widget",jd:"Bold",je:"Italic",jf:"Code",jg:"Strikethrough",jh:"Subscript",ji:"Superscript",jj:"Underline",jk:"image widget",jl:"Enter image caption",jm:"Full size image",jn:"Side image",jo:"Left aligned image",jp:"Centered image",jq:"Right aligned image",jr:"Insert image",js:"Upload failed",jt:"Widget toolbar",ju:"Table properties",jv:"Cell properties",jw:"To-do List",jx:"Remove Format",jy:"Page break",jz:"Horizontal line",ka:"Yellow marker",kb:"Green marker",kc:"Pink marker",kd:"Blue marker",ke:"Red pen",kf:"Green pen",kg:"Remove highlight",kh:"Highlight",ki:"Text highlight toolbar",kj:"Upload in progress",kk:"Character categories",kl:"Font Family",km:"Default",kn:"Font Size",ko:"Tiny",kp:"Small",kq:"Big",kr:"Huge",ks:"Change image text alternative",kt:"Dropdown toolbar",ku:"Rich Text Editor",kv:"None",kw:"Solid",kx:"Dotted",ky:"Dashed",kz:"Double",la:"Groove",lb:"Ridge",lc:"Inset",ld:"Outset",le:'The color is invalid. Try "#FF0000" or "rgb(255,0,0)" or "red".',lf:'The value is invalid. Try "10px" or "2em" or simply "2".',lg:"Black",lh:"Dim grey",li:"Grey",lj:"Light grey",lk:"White",ll:"Red",lm:"Orange",ln:"Yellow",lo:"Light green",lp:"Green",lq:"Aquamarine",lr:"Turquoise",ls:"Light blue",lt:"Blue",lu:"Purple",lv:"Save",lw:"Cancel",lx:"Text alternative",ly:"Editor toolbar",lz:"Show more items",ma:"%0 of %1",mb:"Previous",mc:"Next",md:"Undo",me:"Redo",mf:"Border",mg:"Style",mh:"Width",mi:"Color",mj:"Background",mk:"Dimensions",ml:"Height",mm:"Padding",mn:"Table cell text alignment",mo:"Horizontal text alignment toolbar",mp:"Vertical text alignment toolbar",mq:"Align cell text to the left",mr:"Align cell text to the center",ms:"Align cell text to the right",mt:"Justify cell text",mu:"Align cell text to the top",mv:"Align cell text to the middle",mw:"Align cell text to the bottom",mx:"Remove color",my:"Alignment",mz:"Table alignment toolbar",na:"Align table to the left",nb:"Center table",nc:"Align table to the right",nd:"Paragraph",ne:"Heading 1",nf:"Heading 2",ng:"Heading 3",nh:"Heading 4",ni:"Heading 5",nj:"Heading 6",nk:"Rich Text Editor, %0",nl:"Font Color",nm:"Font Background Color",nn:"Insert code block",no:"Align left",np:"Align right",nq:"Align center",nr:"Justify",ns:"Text alignment",nt:"Text alignment toolbar",nu:"Insert table",nv:"Header column",nw:"Insert column left",nx:"Insert column right",ny:"Delete column",nz:"Column",oa:"Header row",ob:"Insert row below",oc:"Insert row above",od:"Delete row",oe:"Row",of:"Merge cell up",og:"Merge cell right",oh:"Merge cell down",oi:"Merge cell left",oj:"Split cell vertically",ok:"Split cell horizontally",ol:"Merge cells",om:"Insert media",on:"The URL must not be empty.",oo:"This media URL is not supported.",op:"Numbered List",oq:"Bulleted List",or:"Link",os:"Increase indent",ot:"Decrease indent",ou:"Document colors",ov:"Plain text",ow:"Open in a new tab",ox:"Downloadable",oy:"Unlink",oz:"Edit link",pa:"Open link in new tab",pb:"This link has no URL",pc:"Link URL",pd:"Paste the media URL in the input.",pe:"Tip: Paste the URL into the content to embed faster.",pf:"Media URL"})})(window.CKEDITOR_TRANSLATIONS||(window.CKEDITOR_TRANSLATIONS={}));(function t(e,i){if(typeof exports==="object"&&typeof module==="object")module.exports=i();else if(typeof define==="function"&&define.amd)define([],i);else if(typeof exports==="object")exports["ClassicEditor"]=i();else e["ClassicEditor"]=i()})(window,(function(){return function(t){var e={};function i(n){if(e[n]){return e[n].exports}var o=e[n]={i:n,l:false,exports:{}};t[n].call(o.exports,o,o.exports,i);o.l=true;return o.exports}i.m=t;i.c=e;i.d=function(t,e,n){if(!i.o(t,e)){Object.defineProperty(t,e,{enumerable:true,get:n})}};i.r=function(t){if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})};i.t=function(t,e){if(e&1)t=i(t);if(e&8)return t;if(e&4&&typeof t==="object"&&t&&t.__esModule)return t;var n=Object.create(null);i.r(n);Object.defineProperty(n,"default",{enumerable:true,value:t});if(e&2&&typeof t!="string")for(var o in t)i.d(n,o,function(e){return t[e]}.bind(null,o));return n};i.n=function(t){var e=t&&t.__esModule?function e(){return t["default"]}:function e(){return t};i.d(e,"a",e);return e};i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)};i.p="";return i(i.s=142)}([function(t,e,i){"use strict";i.d(e,"b",(function(){return o}));i.d(e,"a",(function(){return r}));const n="https://ckeditor.com/docs/ckeditor5/latest/framework/guides/support/error-codes.html";class o extends Error{constructor(t,e,i){t=r(t);if(i){t+=" "+JSON.stringify(i)}super(t);this.name="CKEditorError";this.context=e;this.data=i}is(t){return t==="CKEditorError"}static rethrowUnexpectedError(t,e){if(t.is&&t.is("CKEditorError")){throw t}const i=new o(t.message,e);i.stack=t.stack;throw i}}function r(t){const e=t.match(/^([^:]+):/);if(!e){return t}return t+` Read more: ${n}#error-${e[1]}\n`}},function(t,e,i){"use strict";var n=function t(){var e;return function t(){if(typeof e==="undefined"){e=Boolean(window&&document&&document.all&&!window.atob)}return e}}();var o=function t(){var e={};return function t(i){if(typeof e[i]==="undefined"){var n=document.querySelector(i);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement){try{n=n.contentDocument.head}catch(t){n=null}}e[i]=n}return e[i]}}();var r=[];function s(t){var e=-1;for(var 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(t,e,i){var n=i(1);var o=i(24);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-label{display:block}.ck.ck-voice-label{display:none}.ck.ck-label{font-weight:700}"},function(t,e,i){var n=i(1);var o=i(26);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(28);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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}.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{top:100%;bottom:auto}.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-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.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__panel{border-radius:0}.ck-rounded-corners .ck.ck-dropdown__panel,.ck.ck-dropdown__panel.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-dropdown__panel{box-shadow:var(--ck-drop-shadow),0 0;background:var(--ck-color-dropdown-panel-background);border:1px solid var(--ck-color-dropdown-panel-border);bottom:0;min-width:100%}.ck.ck-dropdown__panel.ck-dropdown__panel_se{border-top-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_sw{border-top-right-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_ne{border-bottom-left-radius:0}.ck.ck-dropdown__panel.ck-dropdown__panel_nw{border-bottom-right-radius:0}"},function(t,e,i){var n=i(1);var o=i(30);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(32);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports='.ck.ck-tooltip,.ck.ck-tooltip .ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:var(--ck-z-modal)}.ck.ck-tooltip .ck-tooltip__text{display:inline-block}.ck.ck-tooltip .ck-tooltip__text:after{content:"";width:0;height:0}:root{--ck-tooltip-arrow-size:5px}.ck.ck-tooltip{left:50%;top:0;transition:opacity .2s ease-in-out .2s}.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{transition:opacity .2s ease-in-out .2s;border-style:solid;left:50%}.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)}'},function(t,e,i){var n=i(1);var o=i(34);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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__label,a.ck.ck-button .ck-button__label{display:none}.ck.ck-button.ck-button_with-text .ck-button__label,a.ck.ck-button.ck-button_with-text .ck-button__label{display:inline-block}.ck.ck-button:not(.ck-button_with-text),a.ck.ck-button:not(.ck-button_with-text){justify-content:center}.ck.ck-button:hover .ck-tooltip,a.ck.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck.ck-button:focus:not(:hover) .ck-tooltip,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,border .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}.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 .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{color:inherit}[dir=ltr] .ck.ck-button .ck-button__keystroke,[dir=ltr] a.ck.ck-button .ck-button__keystroke{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-button .ck-button__keystroke,[dir=rtl] a.ck.ck-button .ck-button__keystroke{margin-right:var(--ck-spacing-large)}.ck.ck-button .ck-button__keystroke,a.ck.ck-button .ck-button__keystroke{font-weight:700;opacity:.7}.ck.ck-button.ck-disabled:active,.ck.ck-button.ck-disabled:focus,a.ck.ck-button.ck-disabled:active,a.ck.ck-button.ck-disabled:focus{box-shadow:var(--ck-focus-disabled-outer-shadow),0 0}.ck.ck-button.ck-disabled .ck-button__icon,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-disabled .ck-button__keystroke,a.ck.ck-button.ck-disabled .ck-button__keystroke{opacity:.3}.ck.ck-button.ck-button_with-text,a.ck.ck-button.ck-button_with-text{padding:var(--ck-spacing-tiny) var(--ck-spacing-standard)}[dir=ltr] .ck.ck-button.ck-button_with-text .ck-button__icon,[dir=ltr] a.ck.ck-button.ck-button_with-text .ck-button__icon{margin-left:calc(-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-button_with-keystroke .ck-button__label,a.ck.ck-button.ck-button_with-keystroke .ck-button__label{flex-grow:1}.ck.ck-button.ck-on,a.ck.ck-button.ck-on{background:var(--ck-color-button-on-background)}.ck.ck-button.ck-on:not(.ck-disabled):hover,a.ck.ck-button.ck-on:not(.ck-disabled):hover{background:var(--ck-color-button-on-hover-background)}.ck.ck-button.ck-on:not(.ck-disabled):active,a.ck.ck-button.ck-on:not(.ck-disabled):active{background:var(--ck-color-button-on-active-background);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-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(t,e,i){var n=i(1);var o=i(36);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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;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:active{box-shadow:none}.ck.ck-list__item .ck-button.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-on-background-focus)}.ck.ck-list__item .ck-button.ck-on:focus:not(.ck-disabled){border-color:var(--ck-color-base-background)}.ck.ck-list__item .ck-button:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background)}.ck.ck-list__item .ck-switchbutton.ck-on{background:var(--ck-color-list-background);color:inherit}.ck.ck-list__item .ck-switchbutton.ck-on:hover:not(.ck-disabled){background:var(--ck-color-list-button-hover-background);color:inherit}.ck.ck-list__separator{height:1px;width:100%;background:var(--ck-color-base-border)}"},function(t,e,i){var n=i(1);var o=i(38);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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-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 .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-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-disabled .ck-button__toggle{opacity:var(--ck-disabled-opacity)}.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(t,e,i){var n=i(1);var o=i(40);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(42);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(44);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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.ck-toolbar__separator{align-self:stretch;width:1px;min-width:1px;margin-top:0;margin-bottom:0;background: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__items:empty+.ck.ck-toolbar__separator{display:none}.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-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_compact{padding:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>*{margin:0}.ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>:not(:first-child):not(:last-child){border-radius:0}.ck.ck-toolbar>.ck.ck-toolbar__grouped-dropdown>.ck.ck-button.ck-dropdown__button{padding-left:var(--ck-spacing-tiny)}.ck-toolbar-container .ck.ck-toolbar{border:0}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck{margin-right:0}.ck.ck-toolbar[dir=rtl]:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck,[dir=rtl] .ck.ck-toolbar:not(.ck-toolbar_compact)>.ck-toolbar__items>.ck{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl]>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-left:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=rtl].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=rtl] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=rtl]>.ck.ck-toolbar__separator,[dir=rtl] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=rtl].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=rtl] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-left:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr]>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar>.ck-toolbar__items>.ck:last-child{margin-right:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:first-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:first-child{border-top-right-radius:0;border-bottom-right-radius:0}.ck.ck-toolbar[dir=ltr].ck-toolbar_compact>.ck-toolbar__items>.ck:last-child,[dir=ltr] .ck.ck-toolbar.ck-toolbar_compact>.ck-toolbar__items>.ck:last-child{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-toolbar[dir=ltr]>.ck.ck-toolbar__separator,[dir=ltr] .ck.ck-toolbar>.ck.ck-toolbar__separator{margin-right:var(--ck-spacing-small)}.ck.ck-toolbar[dir=ltr].ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child),[dir=ltr] .ck.ck-toolbar.ck-toolbar_grouping>.ck-toolbar__items:not(:empty):not(:only-child){margin-right:var(--ck-spacing-small)}"},function(t,e,i){var n=i(1);var o=i(46);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(48);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e){t.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(t,e,i){var n=i(1);var o=i(51);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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 .ck-widget__selection-handle{position:absolute}.ck .ck-widget.ck-widget_with-selection-handle .ck-widget__selection-handle .ck-icon{display:block}.ck .ck-widget.ck-widget_with-selection-handle.ck-widget_selected .ck-widget__selection-handle,.ck .ck-widget.ck-widget_with-selection-handle:hover .ck-widget__selection-handle{visibility:visible}.ck .ck-size-view{background:var(--ck-color-resizer-tooltip-background);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 .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 .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__selection-handle:hover .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 .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-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[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_with-selection-handle .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected.ck-widget_with-selection-handle .ck-widget__selection-handle:hover,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .ck-widget__selection-handle,.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected:hover.ck-widget_with-selection-handle .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(t,e,i){var n=i(1);var o=i(53);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(55);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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:box-shadow .2s ease-in-out,border .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(t,e,i){var n=i(1);var o=i(57);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(59);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_sme:before{right:25%;margin-right:calc(2*var(--ck-balloon-arrow-half-width));bottom:calc(-1*var(--ck-balloon-arrow-height))}.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_smw:before{left:25%;margin-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_nme:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nme:before{right:25%;margin-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_nmw:after,.ck.ck-balloon-panel.ck-balloon-panel_arrow_nmw:before{left:25%;margin-left:calc(2*var(--ck-balloon-arrow-half-width));top:calc(-1*var(--ck-balloon-arrow-height))}'},function(t,e,i){var n=i(1);var o=i(61);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(63);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(65);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(67);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(69);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(71);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(73);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(75);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(77);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck .ck-link_selected{background:var(--ck-color-link-selected-background)}"},function(t,e,i){var n=i(1);var o=i(79);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(81);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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-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 .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: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(t,e,i){var n=i(1);var o=i(83);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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__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__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*="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}.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}'},function(t,e,i){var n=i(1);var o=i(85);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.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(t,e,i){var n=i(1);var o=i(87);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck-content .media{clear:both;margin:1em 0;display:block;min-width:15em}"},function(t,e,i){var n=i(1);var o=i(89);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=":root{--ck-color-table-focused-cell-background:rgba(158,207,250,0.3)}.ck-widget.table td.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table td.ck-editor__nested-editable:focus,.ck-widget.table th.ck-editor__nested-editable.ck-editor__nested-editable_focused,.ck-widget.table th.ck-editor__nested-editable:focus{background:var(--ck-color-table-focused-cell-background);border-style:none;outline:1px solid var(--ck-color-focus-border);outline-offset:-1px}"},function(t,e,i){var n=i(1);var o=i(91);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck .ck-insert-table-dropdown__grid{display:flex;flex-direction:row;flex-wrap:wrap}:root{--ck-insert-table-dropdown-padding:10px;--ck-insert-table-dropdown-box-height:11px;--ck-insert-table-dropdown-box-width:12px;--ck-insert-table-dropdown-box-margin:1px}.ck .ck-insert-table-dropdown__grid{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-color-base-border);border-radius:1px}.ck .ck-insert-table-dropdown-grid-box.ck-on{border-color:var(--ck-color-focus-border);background:var(--ck-color-focus-outer-shadow)}"},function(t,e,i){var n=i(1);var o=i(93);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=":root{--ck-table-selected-cell-background:#cee5fd}.ck.ck-editor__editable .table table td.ck-editor__editable_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected{background-color:var(--ck-table-selected-cell-background)!important;caret-color:transparent;outline:unset;box-shadow:unset}.ck.ck-editor__editable .table table td.ck-editor__editable_selected ::selection,.ck.ck-editor__editable .table table th.ck-editor__editable_selected ::selection{background-color:transparent}.ck.ck-editor__editable .table table td.ck-editor__editable_selected .ck-widget_selected,.ck.ck-editor__editable .table table th.ck-editor__editable_selected .ck-widget_selected{outline:unset}"},function(t,e,i){var n=i(1);var o=i(95);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck-content .table{margin:1em auto;display:table}.ck-content .table table{border-collapse:collapse;border-spacing:0;width:100%;height:100%;border:1px double #b3b3b3}.ck-content .table table td,.ck-content .table table th{min-width:2em;padding:.4em;border-color:#bfbfbf}.ck-content .table table th{font-weight:700;background:hsla(0,0%,0%,5%)}"},function(t,e){t.exports=".ck-content code{background-color:hsla(0,0%,78%,.3);padding:.15em;border-radius:2px}"},function(t,e,i){var n=i(1);var o=i(98);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-splitbutton{font-size:inherit}.ck.ck-splitbutton .ck-splitbutton__action:focus{z-index:calc(var(--ck-z-default) + 1)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button .ck-tooltip{display:none}:root{--ck-color-split-button-hover-background:#ebebeb;--ck-color-split-button-hover-border:#b3b3b3}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-right-radius:unset;border-bottom-right-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__action{border-top-left-radius:unset;border-bottom-left-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow{min-width:unset}[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-radius:0}.ck-rounded-corners [dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow,[dir=ltr] .ck.ck-splitbutton>.ck-splitbutton__arrow.ck-rounded-corners{border-radius:var(--ck-border-radius);border-top-left-radius:unset;border-bottom-left-radius:unset}[dir=rtl] .ck.ck-splitbutton>.ck-splitbutton__arrow{border-top-right-radius:unset;border-bottom-right-radius:unset}.ck.ck-splitbutton>.ck-splitbutton__arrow svg{width:var(--ck-dropdown-arrow-size)}.ck.ck-splitbutton.ck-splitbutton_open>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover),.ck.ck-splitbutton:hover>.ck-button:not(.ck-on):not(.ck-disabled):not(:hover){background:var(--ck-color-split-button-hover-background)}[dir=ltr] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=ltr] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-left-color:var(--ck-color-split-button-hover-border)}[dir=rtl] .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow:not(.ck-disabled),[dir=rtl] .ck.ck-splitbutton:hover>.ck-splitbutton__arrow:not(.ck-disabled){border-right-color:var(--ck-color-split-button-hover-border)}.ck.ck-splitbutton.ck-splitbutton_open{border-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__action,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__action{border-bottom-left-radius:0}.ck-rounded-corners .ck.ck-splitbutton.ck-splitbutton_open>.ck-splitbutton__arrow,.ck.ck-splitbutton.ck-splitbutton_open.ck-rounded-corners>.ck-splitbutton__arrow{border-bottom-right-radius:0}"},function(t,e,i){var n=i(1);var o=i(100);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck-content pre{padding:1em;color:#353535;background:hsla(0,0%,78%,.3);border:1px solid #c4c4c4;border-radius:2px;text-align:left;direction:ltr;tab-size:4;white-space:pre-wrap;font-style:normal;min-width:200px}.ck-content pre code{background:unset;padding:0;border-radius:0}.ck.ck-editor__editable pre{position:relative}.ck.ck-editor__editable pre[data-language]:after{content:attr(data-language);position:absolute}:root{--ck-color-code-block-label-background:#757575}.ck.ck-editor__editable pre[data-language]:after{top:-1px;right:10px;background:var(--ck-color-code-block-label-background);font-size:10px;font-family:var(--ck-font-face);line-height:16px;padding:var(--ck-spacing-tiny) var(--ck-spacing-medium);color:#fff;white-space:nowrap}.ck.ck-code-block-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}"},function(t,e,i){var n=i(1);var o=i(102);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-color-grid{display:grid}:root{--ck-color-grid-tile-size:24px;--ck-color-color-grid-check-icon:#000}.ck.ck-color-grid{grid-gap:5px;padding:8px}.ck.ck-color-grid__tile{width:var(--ck-color-grid-tile-size);height:var(--ck-color-grid-tile-size);min-width:var(--ck-color-grid-tile-size);min-height:var(--ck-color-grid-tile-size);padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-color-grid__tile.ck-disabled{cursor:unset;transition:unset}.ck.ck-color-grid__tile.ck-color-table__color-tile_bordered{box-shadow:0 0 0 1px var(--ck-color-base-border)}.ck.ck-color-grid__tile .ck.ck-icon{display:none;color:var(--ck-color-color-grid-check-icon)}.ck.ck-color-grid__tile.ck-on{box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-base-text)}.ck.ck-color-grid__tile.ck-on .ck.ck-icon{display:block}.ck.ck-color-grid__tile.ck-on,.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){border:0}.ck.ck-color-grid__tile:focus:not(.ck-disabled),.ck.ck-color-grid__tile:hover:not(.ck-disabled){box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-color-grid__label{padding:0 var(--ck-spacing-standard)}"},function(t,e,i){var n=i(1);var o=i(104);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck .ck-button.ck-color-table__remove-color{display:flex;align-items:center;width:100%}label.ck.ck-color-grid__label{font-weight:unset}.ck .ck-button.ck-color-table__remove-color{padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}.ck .ck-button.ck-color-table__remove-color:not(:focus){border-bottom:1px solid var(--ck-color-base-border)}[dir=ltr] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck .ck-button.ck-color-table__remove-color .ck.ck-icon{margin-left:var(--ck-spacing-standard)}"},function(t,e,i){var n=i(1);var o=i(106);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".text-tiny{font-size:.7em}.text-small{font-size:.85em}.text-big{font-size:1.4em}.text-huge{font-size:1.8em}"},function(t,e,i){var n=i(1);var o=i(108);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=":root{--ck-highlight-marker-yellow:#fdfd77;--ck-highlight-marker-green:#63f963;--ck-highlight-marker-pink:#fc7999;--ck-highlight-marker-blue:#72cdfd;--ck-highlight-pen-red:#e91313;--ck-highlight-pen-green:#180}.ck-content .marker-yellow{background-color:var(--ck-highlight-marker-yellow)}.ck-content .marker-green{background-color:var(--ck-highlight-marker-green)}.ck-content .marker-pink{background-color:var(--ck-highlight-marker-pink)}.ck-content .marker-blue{background-color:var(--ck-highlight-marker-blue)}.ck-content .pen-red{color:var(--ck-highlight-pen-red);background-color:transparent}.ck-content .pen-green{color:var(--ck-highlight-pen-green);background-color:transparent}"},function(t,e,i){var n=i(1);var o=i(110);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck-editor__editable .ck-horizontal-line{overflow:hidden}.ck-content hr{border:solid #5e5e5e;border-width:1px 0 0;margin:0}.ck-editor__editable .ck-horizontal-line{padding:5px 0}"},function(t,e,i){var n=i(1);var o=i(112);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck .ck-widget_with-resizer{position:relative}.ck .ck-widget__resizer{display:none;position:absolute;pointer-events:none;left:0;top:0;outline:1px solid var(--ck-color-resizer)}.ck-focused .ck-widget_with-resizer.ck-widget_selected>.ck-widget__resizer{display:block}.ck .ck-widget__resizer__handle{position:absolute;pointer-events:all;width:var(--ck-resizer-size);height:var(--ck-resizer-size);background:var(--ck-color-focus-border);border:var(--ck-resizer-border-width) solid #fff;border-radius:var(--ck-resizer-border-radius)}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-left{top:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-top-right{top:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nesw-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-right{bottom:var(--ck-resizer-offset);right:var(--ck-resizer-offset);cursor:nwse-resize}.ck .ck-widget__resizer__handle.ck-widget__resizer__handle-bottom-left{bottom:var(--ck-resizer-offset);left:var(--ck-resizer-offset);cursor:nesw-resize}"},function(t,e,i){var n=i(1);var o=i(114);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck-content .image.image_resized{max-width:100%;display:block;box-sizing:border-box}.ck-content .image.image_resized img{width:100%}.ck-content .image.image_resized>figcaption{display:block}"},function(module,__webpack_exports__,__webpack_require__){"use strict";var md5;var _unused_webpack_default_export=md5;(function(){var HxOverrides=function(){};HxOverrides.__name__=true;HxOverrides.dateStr=function(t){var e=t.getMonth()+1;var i=t.getDate();var n=t.getHours();var o=t.getMinutes();var r=t.getSeconds();return t.getFullYear()+"-"+(e<10?"0"+e:""+e)+"-"+(i<10?"0"+i:""+i)+" "+(n<10?"0"+n:""+n)+":"+(o<10?"0"+o:""+o)+":"+(r<10?"0"+r:""+r)};HxOverrides.strDate=function(t){switch(t.length){case 8:var e=t.split(":");var i=new Date;i.setTime(0);i.setUTCHours(e[0]);i.setUTCMinutes(e[1]);i.setUTCSeconds(e[2]);return i;case 10:var e=t.split("-");return new Date(e[0],e[1]-1,e[2],0,0,0);case 19:var e=t.split(" ");var n=e[0].split("-");var o=e[1].split(":");return new Date(n[0],n[1]-1,n[2],o[0],o[1],o[2]);default:throw"Invalid date format : "+t}};HxOverrides.cca=function(t,e){var i=t.charCodeAt(e);if(i!=i)return undefined;return i};HxOverrides.substr=function(t,e,i){if(e!=null&&e!=0&&i!=null&&i<0)return"";if(i==null)i=t.length;if(e<0){e=t.length+e;if(e<0)e=0}else if(i<0)i=t.length+i-e;return t.substr(e,i)};HxOverrides.remove=function(t,e){var i=0;var n=t.length;while(i>>32-e},str2blks:function(t){var e=(t.length+8>>6)+1;var i=new Array;var n=0,o=e*16;while(n>2]|=HxOverrides.cca(t,r)<<(t.length*8+r)%4*8;r++}i[r>>2]|=128<<(t.length*8+r)%4*8;var s=t.length*8;var a=e*16-2;i[a]=s&255;i[a]|=(s>>>8&255)<<8;i[a]|=(s>>>16&255)<<16;i[a]|=(s>>>24&255)<<24;return i},rhex:function(t){var e="";var i="0123456789abcdef";var n=0;while(n<4){var o=n++;e+=i.charAt(t>>o*8+4&15)+i.charAt(t>>o*8&15)}return e},addme:function(t,e){var i=(t&65535)+(e&65535);var n=(t>>16)+(e>>16)+(i>>16);return n<<16|i&65535},bitAND:function(t,e){var i=t&1&(e&1);var n=t>>>1&e>>>1;return n<<1|i},bitXOR:function(t,e){var i=t&1^e&1;var n=t>>>1^e>>>1;return n<<1|i},bitOR:function(t,e){var i=t&1|e&1;var n=t>>>1|e>>>1;return n<<1|i},__class__:haxe.Md5};haxe.Timer=function(t){var e=this;this.id=window.setInterval((function(){e.run()}),t)};haxe.Timer.__name__=true;haxe.Timer.delay=function(t,e){var i=new haxe.Timer(e);i.run=function(){i.stop();t()};return i};haxe.Timer.measure=function(t,e){var i=haxe.Timer.stamp();var n=t();haxe.Log.trace(haxe.Timer.stamp()-i+"s",e);return n};haxe.Timer.stamp=function(){return(new Date).getTime()/1e3};haxe.Timer.prototype={run:function(){},stop:function(){if(this.id==null)return;window.clearInterval(this.id);this.id=null},__class__:haxe.Timer};var js=js||{};js.Boot=function(){};js.Boot.__name__=true;js.Boot.__unhtml=function(t){return t.split("&").join("&").split("<").join("<").split(">").join(">")};js.Boot.__trace=function(t,e){var i=e!=null?e.fileName+":"+e.lineNumber+": ":"";i+=js.Boot.__string_rec(t,"");var n;if(typeof document!="undefined"&&(n=document.getElementById("haxe:trace"))!=null)n.innerHTML+=js.Boot.__unhtml(i)+"
";else if(typeof console!="undefined"&&console.log!=null)console.log(i)};js.Boot.__clear_trace=function(){var t=document.getElementById("haxe:trace");if(t!=null)t.innerHTML=""};js.Boot.isClass=function(t){return t.__name__};js.Boot.isEnum=function(t){return t.__ename__};js.Boot.getClass=function(t){return t.__class__};js.Boot.__string_rec=function(t,e){if(t==null)return"null";if(e.length>=5)return"<...>";var i=typeof t;if(i=="function"&&(t.__name__||t.__ename__))i="object";switch(i){case"object":if(t instanceof Array){if(t.__enum__){if(t.length==2)return t[0];var n=t[0]+"(";e+="\t";var o=2,r=t.length;while(o0?",":"")+js.Boot.__string_rec(t[c],e)}n+="]";return n}var l;try{l=t.toString}catch(t){return"???"}if(l!=null&&l!=Object.toString){var d=t.toString();if(d!="[object Object]")return d}var u=null;var n="{\n";e+="\t";var h=t.hasOwnProperty!=null;for(var u in t){if(h&&!t.hasOwnProperty(u)){continue}if(u=="prototype"||u=="__class__"||u=="__super__"||u=="__interfaces__"||u=="__properties__"){continue}if(n.length!=2)n+=", \n";n+=e+u+" : "+js.Boot.__string_rec(t[u],e)}e=e.substring(1);n+="\n"+e+"}";return n;case"function":return"";case"string":return t;default:return String(t)}};js.Boot.__interfLoop=function(t,e){if(t==null)return false;if(t==e)return true;var i=t.__interfaces__;if(i!=null){var n=0,o=i.length;while(n>>32-e},str2blks:function(t){var e=(t.length+8>>6)+1;var i=new Array;var n=0,o=e*16;while(n>2]|=HxOverrides.cca(t,r)<<(t.length*8+r)%4*8;r++}i[r>>2]|=128<<(t.length*8+r)%4*8;var s=t.length*8;var a=e*16-2;i[a]=s&255;i[a]|=(s>>>8&255)<<8;i[a]|=(s>>>16&255)<<16;i[a]|=(s>>>24&255)<<24;return i},rhex:function(t){var e="";var i="0123456789abcdef";var n=0;while(n<4){var o=n++;e+=i.charAt(t>>o*8+4&15)+i.charAt(t>>o*8&15)}return e},addme:function(t,e){var i=(t&65535)+(e&65535);var n=(t>>16)+(e>>16)+(i>>16);return n<<16|i&65535},bitAND:function(t,e){var i=t&1&(e&1);var n=t>>>1&e>>>1;return n<<1|i},bitXOR:function(t,e){var i=t&1^e&1;var n=t>>>1^e>>>1;return n<<1|i},bitOR:function(t,e){var i=t&1|e&1;var n=t>>>1|e>>>1;return n<<1|i},__class__:haxe.Md5};haxe.Timer=function(t){var e=this;this.id=window.setInterval((function(){e.run()}),t)};haxe.Timer.__name__=true;haxe.Timer.delay=function(t,e){var i=new haxe.Timer(e);i.run=function(){i.stop();t()};return i};haxe.Timer.measure=function(t,e){var i=haxe.Timer.stamp();var n=t();haxe.Log.trace(haxe.Timer.stamp()-i+"s",e);return n};haxe.Timer.stamp=function(){return(new Date).getTime()/1e3};haxe.Timer.prototype={run:function(){},stop:function(){if(this.id==null)return;window.clearInterval(this.id);this.id=null},__class__:haxe.Timer};var js=js||{};js.Boot=function(){};js.Boot.__name__=true;js.Boot.__unhtml=function(t){return t.split("&").join("&").split("<").join("<").split(">").join(">")};js.Boot.__trace=function(t,e){var i=e!=null?e.fileName+":"+e.lineNumber+": ":"";i+=js.Boot.__string_rec(t,"");var n;if(typeof document!="undefined"&&(n=document.getElementById("haxe:trace"))!=null)n.innerHTML+=js.Boot.__unhtml(i)+"
";else if(typeof console!="undefined"&&console.log!=null)console.log(i)};js.Boot.__clear_trace=function(){var t=document.getElementById("haxe:trace");if(t!=null)t.innerHTML=""};js.Boot.isClass=function(t){return t.__name__};js.Boot.isEnum=function(t){return t.__ename__};js.Boot.getClass=function(t){return t.__class__};js.Boot.__string_rec=function(t,e){if(t==null)return"null";if(e.length>=5)return"<...>";var i=typeof t;if(i=="function"&&(t.__name__||t.__ename__))i="object";switch(i){case"object":if(t instanceof Array){if(t.__enum__){if(t.length==2)return t[0];var n=t[0]+"(";e+="\t";var o=2,r=t.length;while(o0?",":"")+js.Boot.__string_rec(t[c],e)}n+="]";return n}var l;try{l=t.toString}catch(t){return"???"}if(l!=null&&l!=Object.toString){var d=t.toString();if(d!="[object Object]")return d}var u=null;var n="{\n";e+="\t";var h=t.hasOwnProperty!=null;for(var u in t){if(h&&!t.hasOwnProperty(u)){continue}if(u=="prototype"||u=="__class__"||u=="__super__"||u=="__interfaces__"||u=="__properties__"){continue}if(n.length!=2)n+=", \n";n+=e+u+" : "+js.Boot.__string_rec(t[u],e)}e=e.substring(1);n+="\n"+e+"}";return n;case"function":return"";case"string":return t;default:return String(t)}};js.Boot.__interfLoop=function(t,e){if(t==null)return false;if(t==e)return true;var i=t.__interfaces__;if(i!=null){var n=0,o=i.length;while(ndiv:first-child,.wrs_content_container.wrs_modal_desktop>div:first-child,.wrs_content_container.wrs_modal_ios>div:first-child{flex-grow:1}.wrs_modal_wrapper.wrs_modal_android{margin:auto;display:flex;flex-direction:column;height:100%;width:100%}.wrs_content_container.wrs_modal_desktop,.wrs_content_container.wrs_modal_ios{width:100%;flex-grow:1;display:flex;flex-direction:column}.wrs_modal_wrapper.wrs_modal_ios{margin:auto;display:flex;flex-direction:column;height:100%;width:100%}.wrs_virtual_keyboard{height:100%;width:100%;top:0;left:50%;transform:translate(-50%)}@media (orientation:portrait){.wrs_modal_dialogContainer.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto;border-width:0}.wrs_modal_wrapper.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto}}@media (orientation:landscape){.wrs_modal_dialogContainer.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto;border-width:0}.wrs_modal_wrapper.wrs_modal_mobile{width:100vmin;height:100vmin;margin:auto}}.wrs_modal_dialogContainer.wrs_modal_badStock,.wrs_modal_wrapper.wrs_modal_badStock{width:100%;height:280px;margin:0 auto;border-width:0}.wrs_noselect{-khtml-user-select:none}.wrs_bottom_right_resizer,.wrs_noselect{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;user-select:none}.wrs_bottom_right_resizer{width:10px;height:10px;color:#778e9a;position:absolute;right:4px;bottom:8px;cursor:se-resize}.wrs_bottom_left_resizer{width:15px;height:15px;color:#778e9a;position:absolute;left:0;top:0;cursor:se-resize}.wrs_modal_controls{height:42px;margin:3px 0;overflow:hidden;line-height:normal}.wrs_modal_links{margin:10px auto 0;font-family:arial,sans-serif;padding:6px;display:inline;float:right;text-align:right}.wrs_modal_links>a{text-decoration:none;color:#778e9a;font-size:16px}.wrs_modal_button_cancel,.wrs_modal_button_cancel:active,.wrs_modal_button_cancel:focus,.wrs_modal_button_cancel:hover,.wrs_modal_button_cancel:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px auto 0 5px;cursor:pointer;font-family:arial,sans-serif;background-color:#ddd;height:32px}.wrs_modal_button_accept,.wrs_modal_button_accept:active,.wrs_modal_button_accept:focus,.wrs_modal_button_accept:hover,.wrs_modal_button_accept:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px 5px 0 auto;color:#fff;background:#778e9a;cursor:pointer;font-family:arial,sans-serif;height:32px}.wrs_editor_vertical_bar{height:20px;float:right;background:none;width:20px;cursor:pointer}.wrs_modal_buttons_container{display:inline;float:left}.wrs_modal_buttons_container.wrs_modalAndroid{padding-left:6px}.wrs_modal_buttons_container.wrs_modalDesktop{padding-left:0}.wrs_modal_buttons_container>button{line-height:normal;background-image:none}.wrs_modal_wrapper{margin:6px;display:flex;flex-direction:column}.wrs_modal_wrapper.wrs_modal_desktop.wrs_minimized{display:none}@media only screen and (max-device-width:480px) and (orientation:portrait){#wrs_modal_wrapper{width:140%}}.wrs_popupmessage_overlay_envolture{display:none;width:100%}.wrs_popupmessage_overlay{position:absolute;width:100%;height:100%;top:0;left:0;right:0;bottom:0;background-color:rgba(0,0,0,.5);z-index:4;cursor:pointer}.wrs_popupmessage_panel{top:50%;left:50%;transform:translate(-50%,-50%);position:absolute;background:#fff;max-width:500px;width:75%;border-radius:2px;padding:20px;font-family:sans-serif;font-size:15px;text-align:left;color:#2e2e2e;z-index:5;max-height:75%;overflow:auto}.wrs_popupmessage_button_area{margin:10px 0 0}.wrs_panelContainer *{border:0}.wrs_button_cancel,.wrs_button_cancel:active,.wrs_button_cancel:focus,.wrs_button_cancel:hover,.wrs_button_cancel:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px auto 0 5px;cursor:pointer;font-family:arial,sans-serif;background-color:#ddd;background-image:none;height:32px}.wrs_button_accept,.wrs_button_accept:active,.wrs_button_accept:focus,.wrs_button_accept:hover,.wrs_button_accept:visited{min-width:80px;font-size:14px;border-radius:3px;border:1px solid #778e9a;padding:6px 8px;margin:10px 5px 0 auto;color:#fff;background:#778e9a;cursor:pointer;font-family:arial,sans-serif;height:32px}.wrs_editor button{box-shadow:none}.wrs_editor .wrs_header button{border-bottom:none;border-bottom-left-radius:0;border-bottom-right-radius:0}.wrs_modal_overlay.wrs_modal_desktop.wrs_stack.wrs_overlay_active{display:block}.wrs_toolbar tr:focus,.wrs_toolbar tr:hover{background:none}.wrs_modal_rtl .wrs_modal_button_cancel{margin-right:5px;margin-left:0}.wrs_modal_rtl .wrs_modal_button_accept{margin-right:0;margin-left:5px}.wrs_modal_rtl .wrs_button_cancel{margin-right:5px;margin-left:0}.wrs_modal_rtl .wrs_button_accept{margin-right:0;margin-left:5px}"},function(t,e,i){var n=i(1);var o=i(119);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports='.ck-content .page-break{position:relative;clear:both;padding:5px 0;display:flex;align-items:center;justify-content:center}.ck-content .page-break:after{content:"";position:absolute;border-bottom:2px dashed #c4c4c4;width:100%}.ck-content .page-break__label{position:relative;z-index:1;padding:.3em .6em;display:block;text-transform:uppercase;border:1px solid #c4c4c4;border-radius:2px;font-family:Helvetica,Arial,Tahoma,Verdana,Sans-Serif;font-size:.75em;font-weight:700;color:#333;background:#fff;box-shadow:2px 2px 1px rgba(0,0,0,.15);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}@media print{.ck-content .page-break{padding:0}.ck-content .page-break:after{display:none}}'},function(t,e,i){var n=i(1);var o=i(121);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-character-grid .ck-character-grid__tiles{display:grid;grid-template-columns:repeat(10,1fr)}:root{--ck-character-grid-tile-size:24px}.ck.ck-character-grid{overflow-y:auto;overflow-x:hidden;width:350px;max-height:200px}.ck.ck-character-grid .ck-character-grid__tiles{margin:var(--ck-spacing-standard);grid-gap:var(--ck-spacing-standard)}.ck.ck-character-grid .ck-character-grid__tile{width:var(--ck-character-grid-tile-size);height:var(--ck-character-grid-tile-size);min-width:var(--ck-character-grid-tile-size);min-height:var(--ck-character-grid-tile-size);font-size:1.2em;padding:0;transition:box-shadow .2s ease;border:0}.ck.ck-character-grid .ck-character-grid__tile:focus:not(.ck-disabled),.ck.ck-character-grid .ck-character-grid__tile:hover:not(.ck-disabled){border:0;box-shadow:inset 0 0 0 1px var(--ck-color-base-background),0 0 0 2px var(--ck-color-focus-border)}.ck.ck-character-grid .ck-character-grid__tile .ck-button__label{line-height:var(--ck-character-grid-tile-size);width:100%;text-align:center}"},function(t,e,i){var n=i(1);var o=i(123);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-character-info{display:flex;justify-content:space-between;padding:var(--ck-spacing-small) var(--ck-spacing-standard);border-top:1px solid var(--ck-color-base-border)}.ck.ck-character-info>*{text-transform:uppercase;font-size:var(--ck-font-size-small)}.ck.ck-character-info .ck-character-info__name{max-width:280px;text-overflow:ellipsis;overflow:hidden}.ck.ck-character-info .ck-character-info__code{opacity:.6}"},function(t,e,i){var n=i(1);var o=i(125);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-special-characters-navigation{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ck-color-base-border);padding:var(--ck-spacing-standard)}[dir=ltr] .ck.ck-special-characters-navigation{padding-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-special-characters-navigation{padding-right:var(--ck-spacing-large)}.ck.ck-special-characters-navigation>.ck-label{max-width:160px;text-overflow:ellipsis;overflow:hidden}.ck.ck-special-characters-navigation>.ck-dropdown .ck-dropdown__panel{max-height:250px;overflow-y:auto;overflow-x:hidden}"},function(t,e,i){var n=i(1);var o=i(127);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-labeled-view .ck-labeled-view__status{font-size:var(--ck-font-size-small);margin-top:var(--ck-spacing-small);white-space:normal}.ck.ck-labeled-view .ck-labeled-view__status_error{color:var(--ck-color-base-error)}.ck.ck-labeled-view>.ck.ck-label{width:100%;text-overflow:ellipsis;overflow:hidden}"},function(t,e,i){var n=i(1);var o=i(129);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-input-color{width:100%;display:flex}.ck.ck-input-color>input.ck.ck-input-text{min-width:auto;flex-grow:1}.ck.ck-input-color>input.ck.ck-input-text:active,.ck.ck-input-color>input.ck.ck-input-text:focus{z-index:var(--ck-z-default)}.ck.ck-input-color>div.ck.ck-dropdown{min-width:auto}.ck.ck-input-color>div.ck.ck-dropdown>.ck-input-color__button .ck-dropdown__arrow{display:none}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview{position:relative;overflow:hidden}.ck.ck-input-color .ck.ck-input-color__button .ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{position:absolute;display:block}[dir=ltr] .ck.ck-input-color>.ck.ck-input-text{border-top-right-radius:0;border-bottom-right-radius:0}[dir=rtl] .ck.ck-input-color>.ck.ck-input-text{border-top-left-radius:0;border-bottom-left-radius:0}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button{padding:0}[dir=ltr] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button{border-top-left-radius:0;border-bottom-left-radius:0;margin-left:-1px}[dir=rtl] .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button{border-top-right-radius:0;border-bottom-right-radius:0;margin-right:-1px}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button.ck-disabled{background:var(--ck-color-input-disabled-background)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview{border-radius:0}.ck-rounded-corners .ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview,.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview{width:20px;height:20px;border:1px solid var(--ck-color-input-border)}.ck.ck-input-color>.ck.ck-dropdown>.ck.ck-input-color__button>.ck.ck-input-color__button__preview>.ck.ck-input-color__button__preview__no-color-indicator{top:-30%;left:50%;height:150%;width:8%;background:red;border-radius:2px;transform:rotate(45deg);transform-origin:50%}.ck.ck-input-color .ck.ck-input-color__remove-color{width:100%;border-bottom:1px solid var(--ck-color-input-border);padding:calc(var(--ck-spacing-standard)/2) var(--ck-spacing-standard);border-bottom-left-radius:0;border-bottom-right-radius:0}[dir=ltr] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-right-radius:0}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color{border-top-left-radius:0}.ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:var(--ck-spacing-standard)}[dir=rtl] .ck.ck-input-color .ck.ck-input-color__remove-color .ck.ck-icon{margin-right:0;margin-left:var(--ck-spacing-standard)}"},function(t,e,i){var n=i(1);var o=i(131);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-form__row{display:flex;flex-direction:row;flex-wrap:nowrap;justify-content:space-between}.ck.ck-form__row>:not(.ck-label){flex-grow:1}.ck.ck-form__row.ck-table-form__action-row .ck-button-cancel,.ck.ck-form__row.ck-table-form__action-row .ck-button-save{justify-content:center}.ck.ck-form__row{padding:var(--ck-spacing-standard) var(--ck-spacing-large) 0}[dir=ltr] .ck.ck-form__row>:not(.ck-label)+*{margin-left:var(--ck-spacing-large)}[dir=rtl] .ck.ck-form__row>:not(.ck-label)+*{margin-right:var(--ck-spacing-large)}.ck.ck-form__row>.ck-label{width:100%;min-width:100%}.ck.ck-form__row.ck-table-form__action-row{margin-top:var(--ck-spacing-large)}.ck.ck-form__row.ck-table-form__action-row .ck-button .ck-button__label{color:var(--ck-color-text)}"},function(t,e,i){var n=i(1);var o=i(133);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=":root{--ck-table-form-header-height:38px}.ck.ck-form__header{padding:0 var(--ck-spacing-large);height:var(--ck-table-form-header-height);line-height:var(--ck-table-form-header-height);border-bottom:1px solid var(--ck-color-base-border)}.ck.ck-form__header .ck-form__header__label{font-weight:700}"},function(t,e){t.exports=".ck.ck-form{padding:0 0 var(--ck-spacing-large)}.ck.ck-form:focus{outline:none}.ck.ck-form .ck.ck-input-text{min-width:100%;width:0}.ck.ck-form .ck.ck-dropdown{min-width:100%}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button:not(:focus){border:1px solid var(--ck-color-base-border)}.ck.ck-form .ck.ck-dropdown .ck-dropdown__button .ck-button__label{width:100%}"},function(t,e){t.exports='.ck.ck-table-form .ck-form__row.ck-table-form__border-row{flex-wrap:wrap}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-view{display:flex;flex-direction:column-reverse}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style,.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{flex-grow:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{flex-wrap:wrap;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-view{display:flex;flex-direction:column-reverse;align-items:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-view .ck.ck-dropdown,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{flex-grow:0}.ck.ck-table-form .ck.ck-labeled-view{position:relative}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{position:absolute;left:50%;bottom:calc(-1*var(--ck-table-properties-error-arrow-size));transform:translate(-50%,100%);z-index:1}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status:after{content:"";position:absolute;top:calc(-1*var(--ck-table-properties-error-arrow-size));left:50%;transform:translateX(-50%)}:root{--ck-table-properties-error-arrow-size:6px;--ck-table-properties-min-error-width:150px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-labeled-view>.ck-label{font-size:var(--ck-font-size-tiny);text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-style{width:80px;min-width:80px}.ck.ck-table-form .ck-form__row.ck-table-form__border-row .ck-table-form__border-width{width:50px;min-width:50px}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row{padding:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-labeled-view>.ck-label{font-size:10px;text-align:center}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__height,.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimensions-row__width{margin:0}.ck.ck-table-form .ck-form__row.ck-table-form__dimensions-row .ck-table-form__dimension-operator{align-self:start;display:inline-block;height:var(--ck-ui-component-min-height);line-height:var(--ck-ui-component-min-height);margin:0 var(--ck-spacing-small)}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{border-radius:0}.ck-rounded-corners .ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status,.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status.ck-rounded-corners{border-radius:var(--ck-border-radius)}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{background:var(--ck-color-base-error);color:var(--ck-color-base-background);padding:var(--ck-spacing-small) var(--ck-spacing-medium);min-width:var(--ck-table-properties-min-error-width);text-align:center}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status:after{border-left:var(--ck-table-properties-error-arrow-size) solid transparent;border-bottom:var(--ck-table-properties-error-arrow-size) solid var(--ck-color-base-error);border-right:var(--ck-table-properties-error-arrow-size) solid transparent;border-top:0 solid transparent}.ck.ck-table-form .ck.ck-labeled-view .ck.ck-labeled-view__status{animation:ck-table-form-labeled-view-status-appear .15s ease both}.ck.ck-table-form .ck.ck-labeled-view .ck-input.ck-error:not(:focus)+.ck.ck-labeled-view__status{display:none}@keyframes ck-table-form-labeled-view-status-appear{0%{opacity:0}to{opacity:1}}'},function(t,e,i){var n=i(1);var o=i(137);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row{flex-wrap:wrap}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{flex-grow:0}.ck.ck-table-cell-properties-form{width:320px}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__padding-row{padding:0;width:35%}.ck.ck-table-cell-properties-form .ck-form__row.ck-table-cell-properties-form__alignment-row .ck.ck-toolbar{background:none}"},function(t,e,i){var n=i(1);var o=i(139);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=".ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{flex-wrap:wrap;flex-basis:0;align-content:baseline}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items{flex-wrap:nowrap}.ck.ck-table-properties-form{width:320px}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row{padding:0}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar{background:none}.ck.ck-table-properties-form .ck-form__row.ck-table-properties-form__alignment-row .ck.ck-toolbar .ck-toolbar__items>*{width:40px}"},function(t,e,i){var n=i(1);var o=i(141);o=o.__esModule?o.default:o;if(typeof o==="string"){o=[[t.i,o,""]]}var r={injectType:"singletonStyleTag"};r.insert="head";r.singleton=true;var s=n(o,r);var a=o.locals?o.locals:{};t.exports=a},function(t,e){t.exports=':root{--ck-todo-list-checkmark-size:16px}.ck-content .todo-list{list-style:none}.ck-content .todo-list li{margin-bottom:5px}.ck-content .todo-list li .todo-list{margin-top:5px}.ck-content .todo-list .todo-list__label>input{-webkit-appearance:none;display:inline-block;position:relative;width:var(--ck-todo-list-checkmark-size);height:var(--ck-todo-list-checkmark-size);vertical-align:middle;border:0;left:-25px;margin-right:-15px;right:0;margin-left:0}.ck-content .todo-list .todo-list__label>input:before{display:block;position:absolute;box-sizing:border-box;content:"";width:100%;height:100%;border:1px solid #333;border-radius:2px;transition:box-shadow .25s ease-in-out,background .25s ease-in-out,border .25s ease-in-out}.ck-content .todo-list .todo-list__label>input:after{display:block;position:absolute;box-sizing:content-box;pointer-events:none;content:"";left:calc(var(--ck-todo-list-checkmark-size)/3);top:calc(var(--ck-todo-list-checkmark-size)/5.3);width:calc(var(--ck-todo-list-checkmark-size)/5.3);height:calc(var(--ck-todo-list-checkmark-size)/2.6);border-left:0 solid transparent;border-bottom:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-right:calc(var(--ck-todo-list-checkmark-size)/8) solid transparent;border-top:0 solid transparent;transform:rotate(45deg)}.ck-content .todo-list .todo-list__label>input[checked]:before{background:#26ab33;border-color:#26ab33}.ck-content .todo-list .todo-list__label>input[checked]:after{border-color:#fff}.ck-content .todo-list .todo-list__label .todo-list__label__description{vertical-align:middle}[dir=rtl] .todo-list .todo-list__label>input{left:0;margin-right:0;right:-25px;margin-left:-15px}.ck-editor__editable .todo-list .todo-list__label>input{cursor:pointer}.ck-editor__editable .todo-list .todo-list__label>input:hover:before{box-shadow:0 0 0 5px rgba(0,0,0,.1)}'},function(t,e,i){"use strict";i.r(e);i.d(e,"default",(function(){return eR}));var n=i(3);var o=n["a"].Symbol;var r=o;var s=Object.prototype;var a=s.hasOwnProperty;var c=s.toString;var l=r?r.toStringTag:undefined;function d(t){var e=a.call(t,l),i=t[l];try{t[l]=undefined;var n=true}catch(t){}var o=c.call(t);if(n){if(e){t[l]=i}else{delete t[l]}}return o}var u=d;var h=Object.prototype;var f=h.toString;function m(t){return f.call(t)}var g=m;var p="[object Null]",b="[object Undefined]";var w=r?r.toStringTag:undefined;function _(t){if(t==null){return t===undefined?b:p}return w&&w in Object(t)?u(t):g(t)}var k=_;function v(t,e){return function(i){return t(e(i))}}var y=v;var x=y(Object.getPrototypeOf,Object);var A=x;function C(t){return t!=null&&typeof t=="object"}var T=C;var E="[object Object]";var M=Function.prototype,P=Object.prototype;var S=M.toString;var I=P.hasOwnProperty;var N=S.call(Object);function O(t){if(!T(t)||k(t)!=E){return false}var e=A(t);if(e===null){return true}var i=I.call(e,"constructor")&&e.constructor;return typeof i=="function"&&i instanceof i&&S.call(i)==N}var L=O;function z(){this.__data__=[];this.size=0}var R=z;function j(t,e){return t===e||t!==t&&e!==e}var D=j;function B(t,e){var i=t.length;while(i--){if(D(t[i][0],e)){return i}}return-1}var V=B;var F=Array.prototype;var H=F.splice;function W(t){var e=this.__data__,i=V(e,t);if(i<0){return false}var n=e.length-1;if(i==n){e.pop()}else{H.call(e,i,1)}--this.size;return true}var U=W;function q(t){var e=this.__data__,i=V(e,t);return i<0?undefined:e[i][1]}var $=q;function Y(t){return V(this.__data__,t)>-1}var G=Y;function J(t,e){var i=this.__data__,n=V(i,t);if(n<0){++this.size;i.push([t,e])}else{i[n][1]=e}return this}var X=J;function Q(t){var e=-1,i=t==null?0:t.length;this.clear();while(++e-1&&t%1==0&&t-1&&t%1==0&&t<=ei}var ni=ii;var oi="[object Arguments]",ri="[object Array]",si="[object Boolean]",ai="[object Date]",ci="[object Error]",li="[object Function]",di="[object Map]",ui="[object Number]",hi="[object Object]",fi="[object RegExp]",mi="[object Set]",gi="[object String]",pi="[object WeakMap]";var bi="[object ArrayBuffer]",wi="[object DataView]",_i="[object Float32Array]",ki="[object Float64Array]",vi="[object Int8Array]",yi="[object Int16Array]",xi="[object Int32Array]",Ai="[object Uint8Array]",Ci="[object Uint8ClampedArray]",Ti="[object Uint16Array]",Ei="[object Uint32Array]";var Mi={};Mi[_i]=Mi[ki]=Mi[vi]=Mi[yi]=Mi[xi]=Mi[Ai]=Mi[Ci]=Mi[Ti]=Mi[Ei]=true;Mi[oi]=Mi[ri]=Mi[bi]=Mi[si]=Mi[wi]=Mi[ai]=Mi[ci]=Mi[li]=Mi[di]=Mi[ui]=Mi[hi]=Mi[fi]=Mi[mi]=Mi[gi]=Mi[pi]=false;function Pi(t){return T(t)&&ni(t.length)&&!!Mi[k(t)]}var Si=Pi;function Ii(t){return function(e){return t(e)}}var Ni=Ii;var Oi=i(5);var Li=Oi["a"]&&Oi["a"].isTypedArray;var zi=Li?Ni(Li):Si;var Ri=zi;var ji=Object.prototype;var Di=ji.hasOwnProperty;function Bi(t,e){var i=Je(t),n=!i&&Ye(t),o=!i&&!n&&Object(Xe["a"])(t),r=!i&&!n&&!o&&Ri(t),s=i||n||o||r,a=s?Be(t.length,String):[],c=a.length;for(var l in t){if((e||Di.call(t,l))&&!(s&&(l=="length"||o&&(l=="offset"||l=="parent")||r&&(l=="buffer"||l=="byteLength"||l=="byteOffset")||ti(l,c)))){a.push(l)}}return a}var Vi=Bi;var Fi=Object.prototype;function Hi(t){var e=t&&t.constructor,i=typeof e=="function"&&e.prototype||Fi;return t===i}var Wi=Hi;var Ui=y(Object.keys,Object);var qi=Ui;var $i=Object.prototype;var Yi=$i.hasOwnProperty;function Gi(t){if(!Wi(t)){return qi(t)}var e=[];for(var i in Object(t)){if(Yi.call(t,i)&&i!="constructor"){e.push(i)}}return e}var Ji=Gi;function Xi(t){return t!=null&&ni(t.length)&&!mt(t)}var Qi=Xi;function Ki(t){return Qi(t)?Vi(t):Ji(t)}var Zi=Ki;function tn(t,e){return t&&je(e,Zi(e),t)}var en=tn;function nn(t){var e=[];if(t!=null){for(var i in Object(t)){e.push(i)}}return e}var on=nn;var rn=Object.prototype;var sn=rn.hasOwnProperty;function an(t){if(!ct(t)){return on(t)}var e=Wi(t),i=[];for(var n in t){if(!(n=="constructor"&&(e||!sn.call(t,n)))){i.push(n)}}return i}var cn=an;function ln(t){return Qi(t)?Vi(t,true):cn(t)}var dn=ln;function un(t,e){return t&&je(e,dn(e),t)}var hn=un;var fn=i(8);function mn(t,e){var i=-1,n=t.length;e||(e=Array(n));while(++i{this._setToTarget(t,n,e[n],i)})}}function Xr(t){return $r(t,Qr)}function Qr(t){return Gr(t)?t:undefined}function Kr(){return function t(){t.called=true}}var Zr=Kr;class ts{constructor(t,e){this.source=t;this.name=e;this.path=[];this.stop=Zr();this.off=Zr()}}const es=new Array(256).fill().map((t,e)=>("0"+e.toString(16)).slice(-2));function is(){const t=Math.random()*4294967296>>>0;const e=Math.random()*4294967296>>>0;const i=Math.random()*4294967296>>>0;const n=Math.random()*4294967296>>>0;return"e"+es[t>>0&255]+es[t>>8&255]+es[t>>16&255]+es[t>>24&255]+es[e>>0&255]+es[e>>8&255]+es[e>>16&255]+es[e>>24&255]+es[i>>0&255]+es[i>>8&255]+es[i>>16&255]+es[i>>24&255]+es[n>>0&255]+es[n>>8&255]+es[n>>16&255]+es[n>>24&255]}const ns={get(t){if(typeof t!="number"){return this[t]||this.normal}else{return t}},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};var os=ns;var rs=i(6);var ss=i(0);const as=Symbol("listeningTo");const cs=Symbol("emitterId");const ls={on(t,e,i={}){this.listenTo(this,t,e,i)},once(t,e,i){let n=false;const o=function(t,...i){if(!n){n=true;t.off();e.call(this,t,...i)}};this.listenTo(this,t,o,i)},off(t,e){this.stopListening(this,t,e)},listenTo(t,e,i,n={}){let o,r;if(!this[as]){this[as]={}}const s=this[as];if(!fs(t)){hs(t)}const a=fs(t);if(!(o=s[a])){o=s[a]={emitter:t,callbacks:{}}}if(!(r=o.callbacks[e])){r=o.callbacks[e]=[]}r.push(i);ps(t,e);const c=bs(t,e);const l=os.get(n.priority);const d={callback:i,priority:l};for(const t of c){let e=false;for(let i=0;i{if(!this._delegations){this._delegations=new Map}t.forEach(t=>{const n=this._delegations.get(t);if(!n){this._delegations.set(t,new Map([[e,i]]))}else{n.set(e,i)}})}}},stopDelegating(t,e){if(!this._delegations){return}if(!t){this._delegations.clear()}else if(!e){this._delegations.delete(t)}else{const i=this._delegations.get(t);if(i){i.delete(e)}}}};var ds=ls;function us(t,e){if(t[as]&&t[as][e]){return t[as][e].emitter}return null}function hs(t,e){if(!t[cs]){t[cs]=e||is()}}function fs(t){return t[cs]}function ms(t){if(!t._events){Object.defineProperty(t,"_events",{value:{}})}return t._events}function gs(){return{callbacks:[],childEvents:[]}}function ps(t,e){const i=ms(t);if(i[e]){return}let n=e;let o=null;const r=[];while(n!==""){if(i[n]){break}i[n]=gs();r.push(i[n]);if(o){i[n].childEvents.push(o)}o=n;n=n.substr(0,n.lastIndexOf(":"))}if(n!==""){for(const t of r){t.callbacks=i[n].callbacks.slice()}i[n].childEvents.push(o)}}function bs(t,e){const i=ms(t)[e];if(!i){return[]}let n=[i.callbacks];for(let e=0;e-1){return ws(t,e.substr(0,e.lastIndexOf(":")))}else{return null}}return i.callbacks}function _s(t,e,i){for(let[n,o]of t){if(!o){o=e.name}else if(typeof o=="function"){o=o(e.name)}const t=new ts(e.source,o);t.path=[...e.path];n.fire(t,...i)}}function ks(t,e,i){const n=bs(t,e);for(const t of n){for(let e=0;e{Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e)).forEach(i=>{if(i in t.prototype){return}const n=Object.getOwnPropertyDescriptor(e,i);n.enumerable=false;Object.defineProperty(t.prototype,i,n)})})}class ys{constructor(t={}){this._items=[];this._itemMap=new Map;this._idProperty=t.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(t,e){let i;const n=this._idProperty;if(n in t){i=t[n];if(typeof i!="string"){throw new ss["b"]("collection-add-invalid-id",this)}if(this.get(i)){throw new ss["b"]("collection-add-item-already-exists",this)}}else{t[n]=i=is()}if(e===undefined){e=this._items.length}else if(e>this._items.length||e<0){throw new ss["b"]("collection-add-item-invalid-index",this)}this._items.splice(e,0,t);this._itemMap.set(i,t);this.fire("add",t,e);return this}get(t){let e;if(typeof t=="string"){e=this._itemMap.get(t)}else if(typeof t=="number"){e=this._items[t]}else{throw new ss["b"]("collection-get-invalid-arg: Index or id must be given.",this)}return e||null}has(t){if(typeof t=="string"){return this._itemMap.has(t)}else{const e=this._idProperty;const i=t[e];return this._itemMap.has(i)}}getIndex(t){let e;if(typeof t=="string"){e=this._itemMap.get(t)}else{e=t}return this._items.indexOf(e)}remove(t){let e,i,n;let o=false;const r=this._idProperty;if(typeof t=="string"){i=t;n=this._itemMap.get(i);o=!n;if(n){e=this._items.indexOf(n)}}else if(typeof t=="number"){e=t;n=this._items[e];o=!n;if(n){i=n[r]}}else{n=t;i=n[r];e=this._items.indexOf(n);o=e==-1||!this._itemMap.get(i)}if(o){throw new ss["b"]("collection-remove-404: Item not found.",this)}this._items.splice(e,1);this._itemMap.delete(i);const s=this._bindToInternalToExternalMap.get(n);this._bindToInternalToExternalMap.delete(n);this._bindToExternalToInternalMap.delete(s);this.fire("remove",n,e);return n}map(t,e){return this._items.map(t,e)}find(t,e){return this._items.find(t,e)}filter(t,e){return this._items.filter(t,e)}clear(){if(this._bindToCollection){this.stopListening(this._bindToCollection);this._bindToCollection=null}while(this.length){this.remove(0)}}bindTo(t){if(this._bindToCollection){throw new ss["b"]("collection-bind-to-rebind: The collection cannot be bound more than once.",this)}this._bindToCollection=t;return{as:t=>{this._setUpBindToBinding(e=>new t(e))},using:t=>{if(typeof t=="function"){this._setUpBindToBinding(e=>t(e))}else{this._setUpBindToBinding(e=>e[t])}}}}_setUpBindToBinding(t){const e=this._bindToCollection;const i=(i,n,o)=>{const r=e._bindToCollection==this;const s=e._bindToInternalToExternalMap.get(n);if(r&&s){this._bindToExternalToInternalMap.set(n,s);this._bindToInternalToExternalMap.set(s,n)}else{const i=t(n);if(!i){this._skippedIndexesFromExternal.push(o);return}let r=o;for(const t of this._skippedIndexesFromExternal){if(o>t){r--}}for(const t of e._skippedIndexesFromExternal){if(r>=t){r++}}this._bindToExternalToInternalMap.set(n,i);this._bindToInternalToExternalMap.set(i,n);this.add(i,r);for(let t=0;t{const n=this._bindToExternalToInternalMap.get(e);if(n){this.remove(n)}this._skippedIndexesFromExternal=this._skippedIndexesFromExternal.reduce((t,e)=>{if(ie){t.push(e)}return t},[])})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}vs(ys,ds);class xs{constructor(t,e=[],i=[]){this._context=t;this._plugins=new Map;this._availablePlugins=new Map;for(const t of e){if(t.pluginName){this._availablePlugins.set(t.pluginName,t)}}this._contextPlugins=new Map;for(const[t,e]of i){this._contextPlugins.set(t,e);this._contextPlugins.set(e,t);if(t.pluginName){this._availablePlugins.set(t.pluginName,t)}}}*[Symbol.iterator](){for(const t of this._plugins){if(typeof t[0]=="function"){yield t}}}get(t){const e=this._plugins.get(t);if(!e){const e="plugincollection-plugin-not-loaded: The requested plugin is not loaded.";let i=t;if(typeof t=="function"){i=t.pluginName||t.name}throw new ss["b"](e,this._context,{plugin:i})}return e}has(t){return this._plugins.has(t)}init(t,e=[]){const i=this;const n=this._context;const o=new Set;const r=[];const s=m(t);const a=m(e);const c=f(t);if(c){const t="plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.";console.error(Object(ss["a"])(t),{plugins:c});return Promise.reject(new ss["b"](t,n,{plugins:c}))}return Promise.all(s.map(l)).then(()=>d(r,"init")).then(()=>d(r,"afterInit")).then(()=>r);function l(t){if(a.includes(t)){return}if(i._plugins.has(t)||o.has(t)){return}return u(t).catch(e=>{console.error(Object(ss["a"])("plugincollection-load: It was not possible to load the plugin."),{plugin:t});throw e})}function d(t,e){return t.reduce((t,n)=>{if(!n[e]){return t}if(i._contextPlugins.has(n)){return t}return t.then(n[e].bind(n))},Promise.resolve())}function u(t){return new Promise(s=>{o.add(t);if(t.requires){t.requires.forEach(i=>{const o=h(i);if(t.isContextPlugin&&!o.isContextPlugin){throw new ss["b"]("plugincollection-context-required: Context plugin can not require plugin which is not a context plugin",null,{plugin:o.name,requiredBy:t.name})}if(e.includes(o)){throw new ss["b"]("plugincollection-required: Cannot load a plugin because one of its dependencies is listed in"+"the `removePlugins` option.",n,{plugin:o.name,requiredBy:t.name})}l(o)})}const a=i._contextPlugins.get(t)||new t(n);i._add(t,a);r.push(a);s()})}function h(t){if(typeof t=="function"){return t}return i._availablePlugins.get(t)}function f(t){const e=[];for(const i of t){if(!h(i)){e.push(i)}}return e.length?e:null}function m(t){return t.map(t=>h(t)).filter(t=>!!t)}}destroy(){const t=[];for(const[,e]of this){if(typeof e.destroy=="function"&&!this._contextPlugins.has(e)){t.push(e.destroy())}}return Promise.all(t)}_add(t,e){this._plugins.set(t,e);const i=t.pluginName;if(!i){return}if(this._plugins.has(i)){throw new ss["b"]("plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.",null,{pluginName:i,plugin1:this._plugins.get(i).constructor,plugin2:t})}this._plugins.set(i,e)}}vs(xs,ds);if(!window.CKEDITOR_TRANSLATIONS){window.CKEDITOR_TRANSLATIONS={}}function As(t,e){const i=window.CKEDITOR_TRANSLATIONS[t]||(window.CKEDITOR_TRANSLATIONS[t]={});Object.assign(i,e)}function Cs(t,e){const i=Ms();if(i===1){t=Object.keys(window.CKEDITOR_TRANSLATIONS)[0]}if(i===0||!Es(t,e)){return e.replace(/ \[context: [^\]]+\]$/,"")}const n=window.CKEDITOR_TRANSLATIONS[t];return n[e].replace(/ \[context: [^\]]+\]$/,"")}function Ts(){window.CKEDITOR_TRANSLATIONS={}}function Es(t,e){return t in window.CKEDITOR_TRANSLATIONS&&e in window.CKEDITOR_TRANSLATIONS[t]}function Ms(){return Object.keys(window.CKEDITOR_TRANSLATIONS).length}const Ps=["ar","fa","he","ku","ug"];class Ss{constructor(t={}){this.uiLanguage=t.uiLanguage||"en";this.contentLanguage=t.contentLanguage||this.uiLanguage;this.uiLanguageDirection=Is(this.uiLanguage);this.contentLanguageDirection=Is(this.contentLanguage);this.t=(...t)=>this._t(...t)}get language(){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.");return this.uiLanguage}_t(t,e){let i=Cs(this.uiLanguage,t);if(e){i=i.replace(/%(\d+)/g,(t,i)=>it.destroy())).then(()=>this.plugins.destroy())}_addEditor(t,e){if(this._contextOwner){throw new ss["b"]("context-addEditor-private-context: Cannot add multiple editors to the context which is created by the editor.")}this.editors.add(t);if(e){this._contextOwner=t}}_removeEditor(t){if(this.editors.has(t)){this.editors.remove(t)}if(this._contextOwner===t){return this.destroy()}return Promise.resolve()}_getEditorConfig(){const t={};for(const e of this.config.names()){if(!["plugins","removePlugins","extraPlugins"].includes(e)){t[e]=this.config.get(e)}}return t}static create(t){return new Promise(e=>{const i=new this(t);e(i.initPlugins().then(()=>i))})}}function Os(t,e){const i=Math.min(t.length,e.length);for(let n=0;nt.data.length){throw new ss["b"]("view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this)}if(i<0||e+i>t.data.length){throw new ss["b"]("view-textproxy-wrong-length: Given length value is incorrect.",this)}this.data=t.data.substring(e,e+i);this.offsetInText=e}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(t){return t=="textProxy"||t=="view:textProxy"}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this.textNode:this.parent;while(i!==null){e[t.parentFirst?"push":"unshift"](i);i=i.parent}return e}}function Vs(t){const e=new Map;for(const i in t){e.set(i,t[i])}return e}function Fs(t){return!!(t&&t[Symbol.iterator])}function Hs(t){if(Fs(t)){return new Map(t)}else{return Vs(t)}}class Ws{constructor(...t){this._patterns=[];this.add(...t)}add(...t){for(let e of t){if(typeof e=="string"||e instanceof RegExp){e={name:e}}if(e.classes&&(typeof e.classes=="string"||e.classes instanceof RegExp)){e.classes=[e.classes]}this._patterns.push(e)}}match(...t){for(const e of t){for(const t of this._patterns){const i=Us(e,t);if(i){return{element:e,pattern:t,match:i}}}}return null}matchAll(...t){const e=[];for(const i of t){for(const t of this._patterns){const n=Us(i,t);if(n){e.push({element:i,pattern:t,match:n})}}}return e.length>0?e:null}getElementName(){if(this._patterns.length!==1){return null}const t=this._patterns[0];const e=t.name;return typeof t!="function"&&e&&!(e instanceof RegExp)?e:null}}function Us(t,e){if(typeof e=="function"){return e(t)}const i={};if(e.name){i.name=qs(e.name,t.name);if(!i.name){return null}}if(e.attributes){i.attributes=$s(e.attributes,t);if(!i.attributes){return null}}if(e.classes){i.classes=Ys(e.classes,t);if(!i.classes){return false}}if(e.styles){i.styles=Gs(e.styles,t);if(!i.styles){return false}}return i}function qs(t,e){if(t instanceof RegExp){return t.test(e)}return t===e}function $s(t,e){const i=[];for(const n in t){const o=t[n];if(e.hasAttribute(n)){const t=e.getAttribute(n);if(o===true){i.push(n)}else if(o instanceof RegExp){if(o.test(t)){i.push(n)}else{return null}}else if(t===o){i.push(n)}else{return null}}else{return null}}return i}function Ys(t,e){const i=[];for(const n of t){if(n instanceof RegExp){const t=e.getClassNames();for(const e of t){if(n.test(e)){i.push(e)}}if(i.length===0){return null}}else if(e.hasClass(n)){i.push(n)}else{return null}}return i}function Gs(t,e){const i=[];for(const n in t){const o=t[n];if(e.hasStyle(n)){const t=e.getStyle(n);if(o instanceof RegExp){if(o.test(t)){i.push(n)}else{return null}}else if(t===o){i.push(n)}else{return null}}else{return null}}return i}var Js="[object Symbol]";function Xs(t){return typeof t=="symbol"||T(t)&&k(t)==Js}var Qs=Xs;var Ks=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Zs=/^\w*$/;function ta(t,e){if(Je(t)){return false}var i=typeof t;if(i=="number"||i=="symbol"||i=="boolean"||t==null||Qs(t)){return true}return Zs.test(t)||!Ks.test(t)||e!=null&&t in Object(e)}var ea=ta;var ia="Expected a function";function na(t,e){if(typeof t!="function"||e!=null&&typeof e!="function"){throw new TypeError(ia)}var i=function(){var n=arguments,o=e?e.apply(this,n):n[0],r=i.cache;if(r.has(o)){return r.get(o)}var s=t.apply(this,n);i.cache=r.set(o,s)||r;return s};i.cache=new(na.Cache||ke);return i}na.Cache=ke;var oa=na;var ra=500;function sa(t){var e=oa(t,(function(t){if(i.size===ra){i.clear()}return t}));var i=e.cache;return e}var aa=sa;var ca=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g;var la=/\\(\\)?/g;var da=aa((function(t){var e=[];if(t.charCodeAt(0)===46){e.push("")}t.replace(ca,(function(t,i,n,o){e.push(n?o.replace(la,"$1"):i||t)}));return e}));var ua=da;function ha(t,e){var i=-1,n=t==null?0:t.length,o=Array(n);while(++io?0:o+e}i=i>o?o:i;if(i<0){i+=o}o=e>i?0:i-e>>>0;e>>>=0;var r=Array(o);while(++n0){if(++e>=fc){return arguments[0]}}else{e=0}return t.apply(undefined,arguments)}}var bc=pc;var wc=bc(hc);var _c=wc;function kc(t,e){return _c(cc(t,e,nc),t+"")}var vc=kc;function yc(t,e,i){if(!ct(i)){return false}var n=typeof e;if(n=="number"?Qi(i)&&ti(e,i.length):n=="string"&&e in i){return D(i[e],t)}return false}var xc=yc;function Ac(t){return vc((function(e,i){var n=-1,o=i.length,r=o>1?i[o-1]:undefined,s=o>2?i[2]:undefined;r=t.length>3&&typeof r=="function"?(o--,r):undefined;if(s&&xc(i[0],i[1],s)){r=o<3?undefined:r;o=1}e=Object(e);while(++ne===t);return Array.isArray(i)}set(t,e){if(ct(t)){for(const[e,i]of Object.entries(t)){this._styleProcessor.toNormalizedForm(e,i,this._styles)}}else{this._styleProcessor.toNormalizedForm(t,e,this._styles)}}remove(t){const e=zc(t);ja(this._styles,e);delete this._styles[t];this._cleanEmptyObjectsOnPath(e)}getNormalized(t){return this._styleProcessor.getNormalized(t,this._styles)}toString(){if(this.isEmpty){return""}return this._getStylesEntries().map(t=>t.join(":")).sort().join(";")+";"}getAsString(t){if(this.isEmpty){return}if(this._styles[t]&&!ct(this._styles[t])){return this._styles[t]}const e=this._styleProcessor.getReducedForm(t,this._styles);const i=e.find(([e])=>e===t);if(Array.isArray(i)){return i[1]}}getStyleNames(){if(this.isEmpty){return[]}const t=this._getStylesEntries();return t.map(([t])=>t)}clear(){this._styles={}}_getStylesEntries(){const t=[];const e=Object.keys(this._styles);for(const i of e){t.push(...this._styleProcessor.getReducedForm(i,this._styles))}return t}_cleanEmptyObjectsOnPath(t){const e=t.split(".");const i=e.length>1;if(!i){return}const n=e.splice(0,e.length-1).join(".");const o=Ba(this._styles,n);if(!o){return}const r=!Array.from(Object.keys(o)).length;if(r){this.remove(n)}}}class Oc{constructor(){this._normalizers=new Map;this._extractors=new Map;this._reducers=new Map;this._consumables=new Map}toNormalizedForm(t,e,i){if(ct(e)){Rc(i,zc(t),e);return}if(this._normalizers.has(t)){const n=this._normalizers.get(t);const{path:o,value:r}=n(e);Rc(i,o,r)}else{Rc(i,t,e)}}getNormalized(t,e){if(!t){return Ec({},e)}if(e[t]!==undefined){return e[t]}if(this._extractors.has(t)){const i=this._extractors.get(t);if(typeof i==="string"){return Ba(e,i)}const n=i(t,e);if(n){return n}}return Ba(e,zc(t))}getReducedForm(t,e){const i=this.getNormalized(t,e);if(i===undefined){return[]}if(this._reducers.has(t)){const e=this._reducers.get(t);return e(i)}return[[t,i]]}getRelatedStyles(t){return this._consumables.get(t)||[]}setNormalizer(t,e){this._normalizers.set(t,e)}setExtractor(t,e){this._extractors.set(t,e)}setReducer(t,e){this._reducers.set(t,e)}setStyleRelation(t,e){this._mapStyleNames(t,e);for(const i of e){this._mapStyleNames(i,[t])}}_mapStyleNames(t,e){if(!this._consumables.has(t)){this._consumables.set(t,[])}this._consumables.get(t).push(...e)}}function Lc(t){let e=null;let i=0;let n=0;let o=null;const r=new Map;if(t===""){return r}if(t.charAt(t.length-1)!=";"){t=t+";"}for(let s=0;s0){yield"class"}if(!this._styles.isEmpty){yield"style"}yield*this._attrs.keys()}*getAttributes(){yield*this._attrs.entries();if(this._classes.size>0){yield["class",this.getAttribute("class")]}if(!this._styles.isEmpty){yield["style",this.getAttribute("style")]}}getAttribute(t){if(t=="class"){if(this._classes.size>0){return[...this._classes].join(" ")}return undefined}if(t=="style"){const t=this._styles.toString();return t==""?undefined:t}return this._attrs.get(t)}hasAttribute(t){if(t=="class"){return this._classes.size>0}if(t=="style"){return!this._styles.isEmpty}return this._attrs.has(t)}isSimilar(t){if(!(t instanceof jc)){return false}if(this===t){return true}if(this.name!=t.name){return false}if(this._attrs.size!==t._attrs.size||this._classes.size!==t._classes.size||this._styles.size!==t._styles.size){return false}for(const[e,i]of this._attrs){if(!t._attrs.has(e)||t._attrs.get(e)!==i){return false}}for(const e of this._classes){if(!t._classes.has(e)){return false}}for(const e of this._styles.getStyleNames()){if(!t._styles.has(e)||t._styles.getAsString(e)!==this._styles.getAsString(e)){return false}}return true}hasClass(...t){for(const e of t){if(!this._classes.has(e)){return false}}return true}getClassNames(){return this._classes.keys()}getStyle(t){return this._styles.getAsString(t)}getNormalizedStyle(t){return this._styles.getNormalized(t)}getStyleNames(){return this._styles.getStyleNames()}hasStyle(...t){for(const e of t){if(!this._styles.has(e)){return false}}return true}findAncestor(...t){const e=new Ws(...t);let i=this.parent;while(i){if(e.match(i)){return i}i=i.parent}return null}getCustomProperty(t){return this._customProperties.get(t)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const t=Array.from(this._classes).sort().join(",");const e=this._styles.toString();const i=Array.from(this._attrs).map(t=>`${t[0]}="${t[1]}"`).sort().join(" ");return this.name+(t==""?"":` class="${t}"`)+(!e?"":` style="${e}"`)+(i==""?"":` ${i}`)}_clone(t=false){const e=[];if(t){for(const i of this.getChildren()){e.push(i._clone(t))}}const i=new this.constructor(this.document,this.name,this._attrs,e);i._classes=new Set(this._classes);i._styles.set(this._styles.getNormalized());i._customProperties=new Map(this._customProperties);i.getFillerOffset=this.getFillerOffset;return i}_appendChild(t){return this._insertChild(this.childCount,t)}_insertChild(t,e){this._fireChange("children",this);let i=0;const n=Vc(this.document,e);for(const e of n){if(e.parent!==null){e._remove()}e.parent=this;e.document=this.document;this._children.splice(t,0,e);t++;i++}return i}_removeChildren(t,e=1){this._fireChange("children",this);for(let i=t;i0){this._classes.clear();return true}return false}if(t=="style"){if(!this._styles.isEmpty){this._styles.clear();return true}return false}return this._attrs.delete(t)}_addClass(t){this._fireChange("attributes",this);t=Array.isArray(t)?t:[t];t.forEach(t=>this._classes.add(t))}_removeClass(t){this._fireChange("attributes",this);t=Array.isArray(t)?t:[t];t.forEach(t=>this._classes.delete(t))}_setStyle(t,e){this._fireChange("attributes",this);this._styles.set(t,e)}_removeStyle(t){this._fireChange("attributes",this);t=Array.isArray(t)?t:[t];t.forEach(t=>this._styles.remove(t))}_setCustomProperty(t,e){this._customProperties.set(t,e)}_removeCustomProperty(t){return this._customProperties.delete(t)}}function Dc(t){t=Hs(t);for(const[e,i]of t){if(i===null){t.delete(e)}else if(typeof i!="string"){t.set(e,String(i))}}return t}function Bc(t,e){const i=e.split(/\s+/);t.clear();i.forEach(e=>t.add(e))}function Vc(t,e){if(typeof e=="string"){return[new Ds(t,e)]}if(!Fs(e)){e=[e]}return Array.from(e).map(e=>{if(typeof e=="string"){return new Ds(t,e)}if(e instanceof Bs){return new Ds(t,e.data)}return e})}class Fc extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=Hc}is(t,e=null){const i=t&&t.replace(/^view:/,"");if(!e){return i=="containerElement"||super.is(t)}else{return i=="containerElement"&&e==this.name||super.is(t,e)}}}function Hc(){const t=[...this.getChildren()];const e=t[this.childCount-1];if(e&&e.is("element","br")){return this.childCount}for(const e of t){if(!e.is("uiElement")){return null}}return this.childCount}var Wc=Cc((function(t,e){je(e,dn(e),t)}));var Uc=Wc;const qc=Symbol("observableProperties");const $c=Symbol("boundObservables");const Yc=Symbol("boundProperties");const Gc={set(t,e){if(ct(t)){Object.keys(t).forEach(e=>{this.set(e,t[e])},this);return}Xc(this);const i=this[qc];if(t in this&&!i.has(t)){throw new ss["b"]("observable-set-cannot-override: Cannot override an existing property.",this)}Object.defineProperty(this,t,{enumerable:true,configurable:true,get(){return i.get(t)},set(e){const n=i.get(t);let o=this.fire("set:"+t,t,e,n);if(o===undefined){o=e}if(n!==o||!i.has(t)){i.set(t,o);this.fire("change:"+t,t,o,n)}}});this[t]=e},bind(...t){if(!t.length||!tl(t)){throw new ss["b"]("observable-bind-wrong-properties: All properties must be strings.",this)}if(new Set(t).size!==t.length){throw new ss["b"]("observable-bind-duplicate-properties: Properties must be unique.",this)}Xc(this);const e=this[Yc];t.forEach(t=>{if(e.has(t)){throw new ss["b"]("observable-bind-rebind: Cannot bind the same property more than once.",this)}});const i=new Map;t.forEach(t=>{const n={property:t,to:[]};e.set(t,n);i.set(t,n)});return{to:Qc,toMany:Kc,_observable:this,_bindProperties:t,_to:[],_bindings:i}},unbind(...t){if(!(qc in this)){return}const e=this[Yc];const i=this[$c];if(t.length){if(!tl(t)){throw new ss["b"]("observable-unbind-wrong-properties: Properties must be strings.",this)}t.forEach(t=>{const n=e.get(t);if(!n){return}let o,r,s,a;n.to.forEach(t=>{o=t[0];r=t[1];s=i.get(o);a=s[r];a.delete(n);if(!a.size){delete s[r]}if(!Object.keys(s).length){i.delete(o);this.stopListening(o,"change")}});e.delete(t)})}else{i.forEach((t,e)=>{this.stopListening(e,"change")});i.clear();e.clear()}},decorate(t){const e=this[t];if(!e){throw new ss["b"]("observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.",this,{object:this,methodName:t})}this.on(t,(t,i)=>{t.return=e.apply(this,i)});this[t]=function(...e){return this.fire(t,e)}}};Uc(Gc,ds);var Jc=Gc;function Xc(t){if(qc in t){return}Object.defineProperty(t,qc,{value:new Map});Object.defineProperty(t,$c,{value:new Map});Object.defineProperty(t,Yc,{value:new Map})}function Qc(...t){const e=el(...t);const i=Array.from(this._bindings.keys());const n=i.length;if(!e.callback&&e.to.length>1){throw new ss["b"]("observable-bind-to-no-callback: Binding multiple observables only possible with callback.",this)}if(n>1&&e.callback){throw new ss["b"]("observable-bind-to-extra-callback: Cannot bind multiple properties and use a callback in one binding.",this)}e.to.forEach(t=>{if(t.properties.length&&t.properties.length!==n){throw new ss["b"]("observable-bind-to-properties-length: The number of properties must match.",this)}if(!t.properties.length){t.properties=this._bindProperties}});this._to=e.to;if(e.callback){this._bindings.get(i[0]).callback=e.callback}rl(this._observable,this._to);nl(this);this._bindProperties.forEach(t=>{ol(this._observable,t)})}function Kc(t,e,i){if(this._bindings.size>1){throw new ss["b"]("observable-bind-to-many-not-one-binding: Cannot bind multiple properties with toMany().",this)}this.to(...Zc(t,e),i)}function Zc(t,e){const i=t.map(t=>[t,e]);return Array.prototype.concat.apply([],i)}function tl(t){return t.every(t=>typeof t=="string")}function el(...t){if(!t.length){throw new ss["b"]("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null)}const e={to:[]};let i;if(typeof t[t.length-1]=="function"){e.callback=t.pop()}t.forEach(t=>{if(typeof t=="string"){i.properties.push(t)}else if(typeof t=="object"){i={observable:t,properties:[]};e.to.push(i)}else{throw new ss["b"]("observable-bind-to-parse-error: Invalid argument syntax in `to()`.",null)}});return e}function il(t,e,i,n){const o=t[$c];const r=o.get(i);const s=r||{};if(!s[n]){s[n]=new Set}s[n].add(e);if(!r){o.set(i,s)}}function nl(t){let e;t._bindings.forEach((i,n)=>{t._to.forEach(o=>{e=o.properties[i.callback?0:t._bindProperties.indexOf(n)];i.to.push([o.observable,e]);il(t._observable,i,o.observable,e)})})}function ol(t,e){const i=t[Yc];const n=i.get(e);let o;if(n.callback){o=n.callback.apply(t,n.to.map(t=>t[0][t[1]]))}else{o=n.to[0];o=o[0][o[1]]}if(t.hasOwnProperty(e)){t[e]=o}else{t.set(e,o)}}function rl(t,e){e.forEach(e=>{const i=t[$c];let n;if(!i.get(e.observable)){t.listenTo(e.observable,"change",(o,r)=>{n=i.get(e.observable)[r];if(n){n.forEach(e=>{ol(t,e.property)})}})}})}class sl extends Fc{constructor(t,e,i,n){super(t,e,i,n);this.set("isReadOnly",false);this.set("isFocused",false);this.bind("isReadOnly").to(t);this.bind("isFocused").to(t,"isFocused",e=>e&&t.selection.editableElement==this);this.listenTo(t.selection,"change",()=>{this.isFocused=t.isFocused&&t.selection.editableElement==this})}is(t,e=null){const i=t&&t.replace(/^view:/,"");if(!e){return i=="editableElement"||super.is(t)}else{return i=="editableElement"&&e==this.name||super.is(t,e)}}destroy(){this.stopListening()}}vs(sl,Jc);const al=Symbol("rootName");class cl extends sl{constructor(t,e){super(t,e);this.rootName="main"}is(t,e=null){const i=t.replace(/^view:/,"");if(!e){return i=="rootElement"||super.is(t)}else{return i=="rootElement"&&e==this.name||super.is(t,e)}}get rootName(){return this.getCustomProperty(al)}set rootName(t){this._setCustomProperty(al,t)}set _name(t){this.name=t}}class ll{constructor(t={}){if(!t.boundaries&&!t.startPosition){throw new ss["b"]("view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null)}if(t.direction&&t.direction!="forward"&&t.direction!="backward"){throw new ss["b"]("view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t.startPosition,{direction:t.direction})}this.boundaries=t.boundaries||null;if(t.startPosition){this.position=dl._createAt(t.startPosition)}else{this.position=dl._createAt(t.boundaries[t.direction=="backward"?"end":"start"])}this.direction=t.direction||"forward";this.singleCharacters=!!t.singleCharacters;this.shallow=!!t.shallow;this.ignoreElementEnd=!!t.ignoreElementEnd;this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null;this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(t){let e,i,n;do{n=this.position;({done:e,value:i}=this.next())}while(!e&&t(i));if(!e){this.position=n}}next(){if(this.direction=="forward"){return this._next()}else{return this._previous()}}_next(){let t=this.position.clone();const e=this.position;const i=t.parent;if(i.parent===null&&t.offset===i.childCount){return{done:true}}if(i===this._boundaryEndParent&&t.offset==this.boundaries.end.offset){return{done:true}}let n;if(i instanceof Ds){if(t.isAtEnd){this.position=dl._createAfter(i);return this._next()}n=i.data[t.offset]}else{n=i.getChild(t.offset)}if(n instanceof jc){if(!this.shallow){t=new dl(n,0)}else{t.offset++}this.position=t;return this._formatReturnValue("elementStart",n,e,t,1)}else if(n instanceof Ds){if(this.singleCharacters){t=new dl(n,0);this.position=t;return this._next()}else{let i=n.data.length;let o;if(n==this._boundaryEndParent){i=this.boundaries.end.offset;o=new Bs(n,0,i);t=dl._createAfter(o)}else{o=new Bs(n,0,n.data.length);t.offset++}this.position=t;return this._formatReturnValue("text",o,e,t,i)}}else if(typeof n=="string"){let n;if(this.singleCharacters){n=1}else{const e=i===this._boundaryEndParent?this.boundaries.end.offset:i.data.length;n=e-t.offset}const o=new Bs(i,t.offset,n);t.offset+=n;this.position=t;return this._formatReturnValue("text",o,e,t,n)}else{t=dl._createAfter(i);this.position=t;if(this.ignoreElementEnd){return this._next()}else{return this._formatReturnValue("elementEnd",i,e,t)}}}_previous(){let t=this.position.clone();const e=this.position;const i=t.parent;if(i.parent===null&&t.offset===0){return{done:true}}if(i==this._boundaryStartParent&&t.offset==this.boundaries.start.offset){return{done:true}}let n;if(i instanceof Ds){if(t.isAtStart){this.position=dl._createBefore(i);return this._previous()}n=i.data[t.offset-1]}else{n=i.getChild(t.offset-1)}if(n instanceof jc){if(!this.shallow){t=new dl(n,n.childCount);this.position=t;if(this.ignoreElementEnd){return this._previous()}else{return this._formatReturnValue("elementEnd",n,e,t)}}else{t.offset--;this.position=t;return this._formatReturnValue("elementStart",n,e,t,1)}}else if(n instanceof Ds){if(this.singleCharacters){t=new dl(n,n.data.length);this.position=t;return this._previous()}else{let i=n.data.length;let o;if(n==this._boundaryStartParent){const e=this.boundaries.start.offset;o=new Bs(n,e,n.data.length-e);i=o.data.length;t=dl._createBefore(o)}else{o=new Bs(n,0,n.data.length);t.offset--}this.position=t;return this._formatReturnValue("text",o,e,t,i)}}else if(typeof n=="string"){let n;if(!this.singleCharacters){const e=i===this._boundaryStartParent?this.boundaries.start.offset:0;n=t.offset-e}else{n=1}t.offset-=n;const o=new Bs(i,t.offset,n);this.position=t;return this._formatReturnValue("text",o,e,t,n)}else{t=dl._createBefore(i);this.position=t;return this._formatReturnValue("elementStart",i,e,t,1)}}_formatReturnValue(t,e,i,n,o){if(e instanceof Bs){if(e.offsetInText+e.data.length==e.textNode.data.length){if(this.direction=="forward"&&!(this.boundaries&&this.boundaries.end.isEqual(this.position))){n=dl._createAfter(e.textNode);this.position=n}else{i=dl._createAfter(e.textNode)}}if(e.offsetInText===0){if(this.direction=="backward"&&!(this.boundaries&&this.boundaries.start.isEqual(this.position))){n=dl._createBefore(e.textNode);this.position=n}else{i=dl._createBefore(e.textNode)}}}return{done:false,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:o}}}}class dl{constructor(t,e){this.parent=t;this.offset=e}get nodeAfter(){if(this.parent.is("text")){return null}return this.parent.getChild(this.offset)||null}get nodeBefore(){if(this.parent.is("text")){return null}return this.parent.getChild(this.offset-1)||null}get isAtStart(){return this.offset===0}get isAtEnd(){const t=this.parent.is("text")?this.parent.data.length:this.parent.childCount;return this.offset===t}get root(){return this.parent.root}get editableElement(){let t=this.parent;while(!(t instanceof sl)){if(t.parent){t=t.parent}else{return null}}return t}getShiftedBy(t){const e=dl._createAt(this);const i=e.offset+t;e.offset=i<0?0:i;return e}getLastMatchingPosition(t,e={}){e.startPosition=this;const i=new ll(e);i.skip(t);return i.position}getAncestors(){if(this.parent.is("documentFragment")){return[this.parent]}else{return this.parent.getAncestors({includeSelf:true})}}getCommonAncestor(t){const e=this.getAncestors();const i=t.getAncestors();let n=0;while(e[n]==i[n]&&e[n]){n++}return n===0?null:e[n-1]}is(t){return t=="position"||t=="view:position"}isEqual(t){return this.parent==t.parent&&this.offset==t.offset}isBefore(t){return this.compareWith(t)=="before"}isAfter(t){return this.compareWith(t)=="after"}compareWith(t){if(this.root!==t.root){return"different"}if(this.isEqual(t)){return"same"}const e=this.parent.is("node")?this.parent.getPath():[];const i=t.parent.is("node")?t.parent.getPath():[];e.push(this.offset);i.push(t.offset);const n=Os(e,i);switch(n){case"prefix":return"before";case"extension":return"after";default:return e[n]0?new this(i,n):new this(n,i)}static _createIn(t){return this._createFromParentsAndOffsets(t,0,t,t.childCount)}static _createOn(t){const e=t.is("textProxy")?t.offsetSize:1;return this._createFromPositionAndShift(dl._createBefore(t),e)}}function hl(t){if(t.item.is("attributeElement")||t.item.is("uiElement")){return true}return false}function fl(t){let e=0;for(const i of t){e++}return e}class ml{constructor(t=null,e,i){this._ranges=[];this._lastRangeBackward=false;this._isFake=false;this._fakeSelectionLabel="";this.setTo(t,e,i)}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length){return null}const t=this._ranges[this._ranges.length-1];const e=this._lastRangeBackward?t.end:t.start;return e.clone()}get focus(){if(!this._ranges.length){return null}const t=this._ranges[this._ranges.length-1];const e=this._lastRangeBackward?t.start:t.end;return e.clone()}get isCollapsed(){return this.rangeCount===1&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){if(this.anchor){return this.anchor.editableElement}return null}*getRanges(){for(const t of this._ranges){yield t.clone()}}getFirstRange(){let t=null;for(const e of this._ranges){if(!t||e.start.isBefore(t.start)){t=e}}return t?t.clone():null}getLastRange(){let t=null;for(const e of this._ranges){if(!t||e.end.isAfter(t.end)){t=e}}return t?t.clone():null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}isEqual(t){if(this.isFake!=t.isFake){return false}if(this.isFake&&this.fakeSelectionLabel!=t.fakeSelectionLabel){return false}if(this.rangeCount!=t.rangeCount){return false}else if(this.rangeCount===0){return true}if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus)){return false}for(const e of this._ranges){let i=false;for(const n of t._ranges){if(e.isEqual(n)){i=true;break}}if(!i){return false}}return true}isSimilar(t){if(this.isBackward!=t.isBackward){return false}const e=fl(this.getRanges());const i=fl(t.getRanges());if(e!=i){return false}if(e==0){return true}for(let e of this.getRanges()){e=e.getTrimmed();let i=false;for(let n of t.getRanges()){n=n.getTrimmed();if(e.start.isEqual(n.start)&&e.end.isEqual(n.end)){i=true;break}}if(!i){return false}}return true}getSelectedElement(){if(this.rangeCount!==1){return null}return this.getFirstRange().getContainedElement()}setTo(t,e,i){if(t===null){this._setRanges([]);this._setFakeOptions(e)}else if(t instanceof ml||t instanceof gl){this._setRanges(t.getRanges(),t.isBackward);this._setFakeOptions({fake:t.isFake,label:t.fakeSelectionLabel})}else if(t instanceof ul){this._setRanges([t],e&&e.backward);this._setFakeOptions(e)}else if(t instanceof dl){this._setRanges([new ul(t)]);this._setFakeOptions(e)}else if(t instanceof js){const n=!!i&&!!i.backward;let o;if(e===undefined){throw new ss["b"]("view-selection-setTo-required-second-parameter: "+"selection.setTo requires the second parameter when the first parameter is a node.",this)}else if(e=="in"){o=ul._createIn(t)}else if(e=="on"){o=ul._createOn(t)}else{o=new ul(dl._createAt(t,e))}this._setRanges([o],n);this._setFakeOptions(i)}else if(Fs(t)){this._setRanges(t,e&&e.backward);this._setFakeOptions(e)}else{throw new ss["b"]("view-selection-setTo-not-selectable: Cannot set selection to given place.",this)}this.fire("change")}setFocus(t,e){if(this.anchor===null){throw new ss["b"]("view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",this)}const i=dl._createAt(t,e);if(i.compareWith(this.focus)=="same"){return}const n=this.anchor;this._ranges.pop();if(i.compareWith(n)=="before"){this._addRange(new ul(i,n),true)}else{this._addRange(new ul(n,i))}this.fire("change")}is(t){return t=="selection"||t=="view:selection"}_setRanges(t,e=false){t=Array.from(t);this._ranges=[];for(const e of t){this._addRange(e)}this._lastRangeBackward=!!e}_setFakeOptions(t={}){this._isFake=!!t.fake;this._fakeSelectionLabel=t.fake?t.label||"":""}_addRange(t,e=false){if(!(t instanceof ul)){throw new ss["b"]("view-selection-add-range-not-range: "+"Selection range set to an object that is not an instance of view.Range",this)}this._pushRange(t);this._lastRangeBackward=!!e}_pushRange(t){for(const e of this._ranges){if(t.isIntersecting(e)){throw new ss["b"]("view-selection-range-intersects: Trying to add a range that intersects with another range from selection.",this,{addedRange:t,intersectingRange:e})}}this._ranges.push(new ul(t.start,t.end))}}vs(ml,ds);class gl{constructor(t=null,e,i){this._selection=new ml;this._selection.delegate("change").to(this);this._selection.setTo(t,e,i)}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(t){return this._selection.isEqual(t)}isSimilar(t){return this._selection.isSimilar(t)}is(t){return t=="selection"||t=="documentSelection"||t=="view:selection"||t=="view:documentSelection"}_setTo(t,e,i){this._selection.setTo(t,e,i)}_setFocus(t,e){this._selection.setFocus(t,e)}}vs(gl,ds);class pl{constructor(t){this.selection=new gl;this.roots=new ys({idProperty:"rootName"});this.stylesProcessor=t;this.set("isReadOnly",false);this.set("isFocused",false);this.set("isComposing",false);this._postFixers=new Set}getRoot(t="main"){return this.roots.get(t)}registerPostFixer(t){this._postFixers.add(t)}destroy(){this.roots.map(t=>t.destroy());this.stopListening()}_callPostFixers(t){let e=false;do{for(const i of this._postFixers){e=i(t);if(e){break}}}while(e)}}vs(pl,Jc);const bl=10;class wl extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=_l;this._priority=bl;this._id=null;this._clonesGroup=null}get priority(){return this._priority}get id(){return this._id}getElementsWithSameId(){if(this.id===null){throw new ss["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(t,e=null){const i=t&&t.replace(/^view:/,"");if(!e){return i=="attributeElement"||super.is(t)}else{return i=="attributeElement"&&e==this.name||super.is(t,e)}}isSimilar(t){if(this.id!==null||t.id!==null){return this.id===t.id}return super.isSimilar(t)&&this.priority==t.priority}_clone(t){const e=super._clone(t);e._priority=this._priority;e._id=this._id;return e}}wl.DEFAULT_PRIORITY=bl;function _l(){if(kl(this)){return null}let t=this.parent;while(t&&t.is("attributeElement")){if(kl(t)>1){return null}t=t.parent}if(!t||kl(t)>1){return null}return this.childCount}function kl(t){return Array.from(t.getChildren()).filter(t=>!t.is("uiElement")).length}class vl extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=yl}is(t,e=null){const i=t.replace(/^view:/,"");if(!e){return i=="emptyElement"||super.is(t)}else{return i=="emptyElement"&&e==this.name||super.is(t,e)}}_insertChild(t,e){if(e&&(e instanceof js||Array.from(e).length>0)){throw new ss["b"]("view-emptyelement-cannot-add: Cannot add child nodes to EmptyElement instance.",[this,e])}}}function yl(){return null}const xl=navigator.userAgent.toLowerCase();const Al={isMac:Tl(xl),isEdge:El(xl),isGecko:Ml(xl),isSafari:Pl(xl),isAndroid:Sl(xl),features:{isRegExpUnicodePropertySupported:Il()}};var Cl=Al;function Tl(t){return t.indexOf("macintosh")>-1}function El(t){return!!t.match(/edge\/(\d+.?\d*)/)}function Ml(t){return!!t.match(/gecko\/\d+/)}function Pl(t){return t.indexOf(" applewebkit/")>-1&&t.indexOf("chrome")===-1}function Sl(t){return t.indexOf("android")>-1}function Il(){let t=false;try{t="ć".search(new RegExp("[\\p{L}]","u"))===0}catch(t){}return t}const Nl={"⌘":"ctrl","⇧":"shift","⌥":"alt"};const Ol={ctrl:"⌘",shift:"⇧",alt:"⌥"};const Ll=Dl();function zl(t){let e;if(typeof t=="string"){e=Ll[t.toLowerCase()];if(!e){throw new ss["b"]("keyboard-unknown-key: Unknown key name.",null,{key:t})}}else{e=t.keyCode+(t.altKey?Ll.alt:0)+(t.ctrlKey?Ll.ctrl:0)+(t.shiftKey?Ll.shift:0)}return e}function Rl(t){if(typeof t=="string"){t=Bl(t)}return t.map(t=>typeof t=="string"?zl(t):t).reduce((t,e)=>e+t,0)}function jl(t){if(!Cl.isMac){return t}return Bl(t).map(t=>Ol[t.toLowerCase()]||t).reduce((t,e)=>{if(t.slice(-1)in Nl){return t+e}else{return t+"+"+e}})}function Dl(){const t={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 e=65;e<=90;e++){const i=String.fromCharCode(e);t[i.toLowerCase()]=e}for(let e=48;e<=57;e++){t[e-48]=e}for(let e=112;e<=123;e++){t["f"+(e-111)]=e}return t}function Bl(t){return t.split(/\s*\+\s*/)}class Vl extends jc{constructor(t,e,i,n){super(t,e,i,n);this.getFillerOffset=Hl}is(t,e=null){const i=t.replace(/^view:/,"");if(!e){return i=="uiElement"||super.is(t)}else{return i=="uiElement"&&e==this.name||super.is(t,e)}}_insertChild(t,e){if(e&&(e instanceof js||Array.from(e).length>0)){throw new ss["b"]("view-uielement-cannot-add: Cannot add child nodes to UIElement instance.",this)}}render(t){return this.toDomElement(t)}toDomElement(t){const e=t.createElement(this.name);for(const t of this.getAttributeKeys()){e.setAttribute(t,this.getAttribute(t))}return e}}function Fl(t){t.document.on("keydown",(e,i)=>Wl(e,i,t.domConverter))}function Hl(){return null}function Wl(t,e,i){if(e.keyCode==Ll.arrowright){const t=e.domTarget.ownerDocument.defaultView.getSelection();const n=t.rangeCount==1&&t.getRangeAt(0).collapsed;if(n||e.shiftKey){const e=t.focusNode;const o=t.focusOffset;const r=i.domPositionToView(e,o);if(r===null){return}let s=false;const a=r.getLastMatchingPosition(t=>{if(t.item.is("uiElement")){s=true}if(t.item.is("uiElement")||t.item.is("attributeElement")){return true}return false});if(s){const e=i.viewPositionToDom(a);if(n){t.collapse(e.parent,e.offset)}else{t.extend(e.parent,e.offset)}}}}}class Ul{constructor(t,e){this.document=t;this._children=[];if(e){this._insertChild(0,e)}}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return this.childCount===0}get root(){return this}get parent(){return null}is(t){return t=="documentFragment"||t=="view:documentFragment"}_appendChild(t){return this._insertChild(this.childCount,t)}getChild(t){return this._children[t]}getChildIndex(t){return this._children.indexOf(t)}getChildren(){return this._children[Symbol.iterator]()}_insertChild(t,e){this._fireChange("children",this);let i=0;const n=ql(this.document,e);for(const e of n){if(e.parent!==null){e._remove()}e.parent=this;this._children.splice(t,0,e);t++;i++}return i}_removeChildren(t,e=1){this._fireChange("children",this);for(let i=t;i{if(typeof e=="string"){return new Ds(t,e)}if(e instanceof Bs){return new Ds(t,e.data)}return e})}class $l{constructor(t){this.document=t;this._cloneGroups=new Map}setSelection(t,e,i){this.document.selection._setTo(t,e,i)}setSelectionFocus(t,e){this.document.selection._setFocus(t,e)}createText(t){return new Ds(this.document,t)}createAttributeElement(t,e,i={}){const n=new wl(this.document,t,e);if(i.priority){n._priority=i.priority}if(i.id){n._id=i.id}return n}createContainerElement(t,e){return new Fc(this.document,t,e)}createEditableElement(t,e){const i=new sl(this.document,t,e);i._document=this.document;return i}createEmptyElement(t,e){return new vl(this.document,t,e)}createUIElement(t,e,i){const n=new Vl(this.document,t,e);if(i){n.render=i}return n}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){if(L(t)&&i===undefined){i=e}i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}breakAttributes(t){if(t instanceof dl){return this._breakAttributes(t)}else{return this._breakAttributesRange(t)}}breakContainer(t){const e=t.parent;if(!e.is("containerElement")){throw new ss["b"]("view-writer-break-non-container-element: Trying to break an element which is not a container element.",this.document)}if(!e.parent){throw new ss["b"]("view-writer-break-root: Trying to break root element.",this.document)}if(t.isAtStart){return dl._createBefore(e)}else if(!t.isAtEnd){const i=e._clone(false);this.insert(dl._createAfter(e),i);const n=new ul(t,dl._createAt(e,"end"));const o=new dl(i,0);this.move(n,o)}return dl._createAfter(e)}mergeAttributes(t){const e=t.offset;const i=t.parent;if(i.is("text")){return t}if(i.is("attributeElement")&&i.childCount===0){const t=i.parent;const e=i.index;i._remove();this._removeFromClonedElementsGroup(i);return this.mergeAttributes(new dl(t,e))}const n=i.getChild(e-1);const o=i.getChild(e);if(!n||!o){return t}if(n.is("text")&&o.is("text")){return Kl(n,o)}else if(n.is("attributeElement")&&o.is("attributeElement")&&n.isSimilar(o)){const t=n.childCount;n._appendChild(o.getChildren());o._remove();this._removeFromClonedElementsGroup(o);return this.mergeAttributes(new dl(n,t))}return t}mergeContainers(t){const e=t.nodeBefore;const i=t.nodeAfter;if(!e||!i||!e.is("containerElement")||!i.is("containerElement")){throw new ss["b"]("view-writer-merge-containers-invalid-position: "+"Element before and after given position cannot be merged.",this.document)}const n=e.getChild(e.childCount-1);const o=n instanceof Ds?dl._createAt(n,"end"):dl._createAt(e,"end");this.move(ul._createIn(i),dl._createAt(e,"end"));this.remove(ul._createOn(i));return o}insert(t,e){e=Fs(e)?[...e]:[e];Zl(e,this.document);const i=Gl(t);if(!i){throw new ss["b"]("view-writer-invalid-position-container",this.document)}const n=this._breakAttributes(t,true);const o=i._insertChild(n.offset,e);for(const t of e){this._addToClonedElementsGroup(t)}const r=n.getShiftedBy(o);const s=this.mergeAttributes(n);if(o===0){return new ul(s,s)}else{if(!s.isEqual(n)){r.offset--}const t=this.mergeAttributes(r);return new ul(s,t)}}remove(t){const e=t instanceof ul?t:ul._createOn(t);id(e,this.document);if(e.isCollapsed){return new Ul(this.document)}const{start:i,end:n}=this._breakAttributesRange(e,true);const o=i.parent;const r=n.offset-i.offset;const s=o._removeChildren(i.offset,r);for(const t of s){this._removeFromClonedElementsGroup(t)}const a=this.mergeAttributes(i);e.start=a;e.end=a.clone();return new Ul(this.document,s)}clear(t,e){id(t,this.document);const i=t.getWalker({direction:"backward",ignoreElementEnd:true});for(const n of i){const i=n.item;let o;if(i.is("element")&&e.isSimilar(i)){o=ul._createOn(i)}else if(!n.nextPosition.isAfter(t.start)&&i.is("textProxy")){const t=i.getAncestors().find(t=>t.is("element")&&e.isSimilar(t));if(t){o=ul._createIn(t)}}if(o){if(o.end.isAfter(t.end)){o.end=t.end}if(o.start.isBefore(t.start)){o.start=t.start}this.remove(o)}}}move(t,e){let i;if(e.isAfter(t.end)){e=this._breakAttributes(e,true);const n=e.parent;const o=n.childCount;t=this._breakAttributesRange(t,true);i=this.remove(t);e.offset+=n.childCount-o}else{i=this.remove(t)}return this.insert(e,i)}wrap(t,e){if(!(e instanceof wl)){throw new ss["b"]("view-writer-wrap-invalid-attribute",this.document)}id(t,this.document);if(!t.isCollapsed){return this._wrapRange(t,e)}else{let i=t.start;if(i.parent.is("element")&&!Yl(i.parent)){i=i.getLastMatchingPosition(t=>t.item.is("uiElement"))}i=this._wrapPosition(i,e);const n=this.document.selection;if(n.isCollapsed&&n.getFirstPosition().isEqual(t.start)){this.setSelection(i)}return new ul(i)}}unwrap(t,e){if(!(e instanceof wl)){throw new ss["b"]("view-writer-unwrap-invalid-attribute",this.document)}id(t,this.document);if(t.isCollapsed){return t}const{start:i,end:n}=this._breakAttributesRange(t,true);const o=i.parent;const r=this._unwrapChildren(o,i.offset,n.offset,e);const s=this.mergeAttributes(r.start);if(!s.isEqual(r.start)){r.end.offset--}const a=this.mergeAttributes(r.end);return new ul(s,a)}rename(t,e){const i=new Fc(this.document,t,e.getAttributes());this.insert(dl._createAfter(e),i);this.move(ul._createIn(e),dl._createAt(i,0));this.remove(ul._createOn(e));return i}clearClonedElementsGroup(t){this._cloneGroups.delete(t)}createPositionAt(t,e){return dl._createAt(t,e)}createPositionAfter(t){return dl._createAfter(t)}createPositionBefore(t){return dl._createBefore(t)}createRange(t,e){return new ul(t,e)}createRangeOn(t){return ul._createOn(t)}createRangeIn(t){return ul._createIn(t)}createSelection(t,e,i){return new ml(t,e,i)}_wrapChildren(t,e,i,n){let o=e;const r=[];while(ofalse;t.parent._insertChild(t.offset,i);const n=new ul(t,t.getShiftedBy(1));this.wrap(n,e);const o=new dl(i.parent,i.index);i._remove();const r=o.nodeBefore;const s=o.nodeAfter;if(r instanceof Ds&&s instanceof Ds){return Kl(r,s)}return Xl(o)}_wrapAttributeElement(t,e){if(!nd(t,e)){return false}if(t.name!==e.name||t.priority!==e.priority){return false}for(const i of t.getAttributeKeys()){if(i==="class"||i==="style"){continue}if(e.hasAttribute(i)&&e.getAttribute(i)!==t.getAttribute(i)){return false}}for(const i of t.getStyleNames()){if(e.hasStyle(i)&&e.getStyle(i)!==t.getStyle(i)){return false}}for(const i of t.getAttributeKeys()){if(i==="class"||i==="style"){continue}if(!e.hasAttribute(i)){this.setAttribute(i,t.getAttribute(i),e)}}for(const i of t.getStyleNames()){if(!e.hasStyle(i)){this.setStyle(i,t.getStyle(i),e)}}for(const i of t.getClassNames()){if(!e.hasClass(i)){this.addClass(i,e)}}return true}_unwrapAttributeElement(t,e){if(!nd(t,e)){return false}if(t.name!==e.name||t.priority!==e.priority){return false}for(const i of t.getAttributeKeys()){if(i==="class"||i==="style"){continue}if(!e.hasAttribute(i)||e.getAttribute(i)!==t.getAttribute(i)){return false}}if(!e.hasClass(...t.getClassNames())){return false}for(const i of t.getStyleNames()){if(!e.hasStyle(i)||e.getStyle(i)!==t.getStyle(i)){return false}}for(const i of t.getAttributeKeys()){if(i==="class"||i==="style"){continue}this.removeAttribute(i,e)}this.removeClass(Array.from(t.getClassNames()),e);this.removeStyle(Array.from(t.getStyleNames()),e);return true}_breakAttributesRange(t,e=false){const i=t.start;const n=t.end;id(t,this.document);if(t.isCollapsed){const i=this._breakAttributes(t.start,e);return new ul(i,i)}const o=this._breakAttributes(n,e);const r=o.parent.childCount;const s=this._breakAttributes(i,e);o.offset+=o.parent.childCount-r;return new ul(s,o)}_breakAttributes(t,e=false){const i=t.offset;const n=t.parent;if(t.parent.is("emptyElement")){throw new ss["b"]("view-writer-cannot-break-empty-element",this.document)}if(t.parent.is("uiElement")){throw new ss["b"]("view-writer-cannot-break-ui-element",this.document)}if(!e&&n.is("text")&&ed(n.parent)){return t.clone()}if(ed(n)){return t.clone()}if(n.is("text")){return this._breakAttributes(Ql(t),e)}const o=n.childCount;if(i==o){const t=new dl(n.parent,n.index+1);return this._breakAttributes(t,e)}else{if(i===0){const t=new dl(n.parent,n.index);return this._breakAttributes(t,e)}else{const t=n.index+1;const o=n._clone();n.parent._insertChild(t,o);this._addToClonedElementsGroup(o);const r=n.childCount-i;const s=n._removeChildren(i,r);o._appendChild(s);const a=new dl(n.parent,t);return this._breakAttributes(a,e)}}}_addToClonedElementsGroup(t){if(!t.root.is("rootElement")){return}if(t.is("element")){for(const e of t.getChildren()){this._addToClonedElementsGroup(e)}}const e=t.id;if(!e){return}let i=this._cloneGroups.get(e);if(!i){i=new Set;this._cloneGroups.set(e,i)}i.add(t);t._clonesGroup=i}_removeFromClonedElementsGroup(t){if(t.is("element")){for(const e of t.getChildren()){this._removeFromClonedElementsGroup(e)}}const e=t.id;if(!e){return}const i=this._cloneGroups.get(e);if(!i){return}i.delete(t)}}function Yl(t){return Array.from(t.getChildren()).some(t=>!t.is("uiElement"))}function Gl(t){let e=t.parent;while(!ed(e)){if(!e){return undefined}e=e.parent}return e}function Jl(t,e){if(t.prioritye.priority){return false}return t.getIdentity()i instanceof t)){throw new ss["b"]("view-writer-insert-invalid-node",e)}if(!i.is("text")){Zl(i.getChildren(),e)}}}const td=[Ds,wl,Fc,vl,Vl];function ed(t){return t&&(t.is("containerElement")||t.is("documentFragment"))}function id(t,e){const i=Gl(t.start);const n=Gl(t.end);if(!i||!n||i!==n){throw new ss["b"]("view-writer-invalid-range-container",e)}}function nd(t,e){return t.id===null&&e.id===null}function od(t){return Object.prototype.toString.call(t)=="[object Text]"}const rd=t=>t.createTextNode(" ");const sd=t=>{const e=t.createElement("br");e.dataset.ckeFiller=true;return e};const ad=7;const cd=(()=>{let t="";for(let e=0;e0){i.push({index:n,type:"insert",values:t.slice(n,r)})}if(o-n>0){i.push({index:n+(r-n),type:"delete",howMany:o-n})}return i}function _d(t,e){const{firstIndex:i,lastIndexOld:n,lastIndexNew:o}=t;if(i===-1){return Array(e).fill("equal")}let r=[];if(i>0){r=r.concat(Array(i).fill("equal"))}if(o-i>0){r=r.concat(Array(o-i).fill("insert"))}if(n-i>0){r=r.concat(Array(n-i).fill("delete"))}if(o200||o>200||n+o>300){return kd.fastDiff(t,e,i,true)}let r,s;if(ol?-1:1;if(d[n+h]){d[n]=d[n+h].slice(0)}if(!d[n]){d[n]=[]}d[n].push(o>l?r:s);let f=Math.max(o,l);let m=f-n;while(ml;m--){u[m]=h(m)}u[l]=h(l);f++}while(u[l]!==c);return d[l].slice(1)}kd.fastDiff=md;function vd(t,e,i){t.insertBefore(i,t.childNodes[e]||null)}function yd(t){const e=t.parentNode;if(e){e.removeChild(t)}}function xd(t){if(t){if(t.defaultView){return t instanceof t.defaultView.Document}else if(t.ownerDocument&&t.ownerDocument.defaultView){return t instanceof t.ownerDocument.defaultView.Node}}return false}class Ad{constructor(t,e){this.domDocuments=new Set;this.domConverter=t;this.markedAttributes=new Set;this.markedChildren=new Set;this.markedTexts=new Set;this.selection=e;this.isFocused=false;this._inlineFiller=null;this._fakeSelectionContainer=null}markToSync(t,e){if(t==="text"){if(this.domConverter.mapViewToDom(e.parent)){this.markedTexts.add(e)}}else{if(!this.domConverter.mapViewToDom(e)){return}if(t==="attributes"){this.markedAttributes.add(e)}else if(t==="children"){this.markedChildren.add(e)}else{throw new ss["b"]("view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.",this)}}}render(){let t;for(const t of this.markedChildren){this._updateChildrenMappings(t)}if(this._inlineFiller&&!this._isSelectionInInlineFiller()){this._removeInlineFiller()}if(this._inlineFiller){t=this._getInlineFillerPosition()}else if(this._needsInlineFillerAtSelection()){t=this.selection.getFirstPosition();this.markedChildren.add(t.parent)}for(const t of this.markedAttributes){this._updateAttrs(t)}for(const e of this.markedChildren){this._updateChildren(e,{inlineFillerPosition:t})}for(const e of this.markedTexts){if(!this.markedChildren.has(e.parent)&&this.domConverter.mapViewToDom(e.parent)){this._updateText(e,{inlineFillerPosition:t})}}if(t){const e=this.domConverter.viewPositionToDom(t);const i=e.parent.ownerDocument;if(!ld(e.parent)){this._inlineFiller=Td(i,e.parent,e.offset)}else{this._inlineFiller=e.parent}}else{this._inlineFiller=null}this._updateSelection();this._updateFocus();this.markedTexts.clear();this.markedAttributes.clear();this.markedChildren.clear()}_updateChildrenMappings(t){const e=this.domConverter.mapViewToDom(t);if(!e){return}const i=this.domConverter.mapViewToDom(t).childNodes;const n=Array.from(this.domConverter.viewChildrenToDom(t,e.ownerDocument,{withChildren:false}));const o=this._diffNodeLists(i,n);const r=this._findReplaceActions(o,i,n);if(r.indexOf("replace")!==-1){const e={equal:0,insert:0,delete:0};for(const o of r){if(o==="replace"){const o=e.equal+e.insert;const r=e.equal+e.delete;const s=t.getChild(o);if(s&&!s.is("uiElement")){this._updateElementMappings(s,i[r])}yd(n[o]);e.equal++}else{e[o]++}}}}_updateElementMappings(t,e){this.domConverter.unbindDomElement(e);this.domConverter.bindElements(e,t);this.markedChildren.add(t);this.markedAttributes.add(t)}_getInlineFillerPosition(){const t=this.selection.getFirstPosition();if(t.parent.is("text")){return dl._createBefore(this.selection.getFirstPosition().parent)}else{return t}}_isSelectionInInlineFiller(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed){return false}const t=this.selection.getFirstPosition();const e=this.domConverter.viewPositionToDom(t);if(e&&od(e.parent)&&ld(e.parent)){return true}return false}_removeInlineFiller(){const t=this._inlineFiller;if(!ld(t)){throw new ss["b"]("view-renderer-filler-was-lost: The inline filler node was lost.",this)}if(dd(t)){t.parentNode.removeChild(t)}else{t.data=t.data.substr(ad)}this._inlineFiller=null}_needsInlineFillerAtSelection(){if(this.selection.rangeCount!=1||!this.selection.isCollapsed){return false}const t=this.selection.getFirstPosition();const e=t.parent;const i=t.offset;if(!this.domConverter.mapViewToDom(e.root)){return false}if(!e.is("element")){return false}if(!Cd(e)){return false}if(i===e.getFillerOffset()){return false}const n=t.nodeBefore;const o=t.nodeAfter;if(n instanceof Ds||o instanceof Ds){return false}return true}_updateText(t,e){const i=this.domConverter.findCorrespondingDomText(t);const n=this.domConverter.viewToDom(t,i.ownerDocument);const o=i.data;let r=n.data;const s=e.inlineFillerPosition;if(s&&s.parent==t.parent&&s.offset==t.index){r=cd+r}if(o!=r){const t=md(o,r);for(const e of t){if(e.type==="insert"){i.insertData(e.index,e.values.join(""))}else{i.deleteData(e.index,e.howMany)}}}}_updateAttrs(t){const e=this.domConverter.mapViewToDom(t);if(!e){return}const i=Array.from(e.attributes).map(t=>t.name);const n=t.getAttributeKeys();for(const i of n){e.setAttribute(i,t.getAttribute(i))}for(const n of i){if(!t.hasAttribute(n)){e.removeAttribute(n)}}}_updateChildren(t,e){const i=this.domConverter.mapViewToDom(t);if(!i){return}const n=e.inlineFillerPosition;const o=this.domConverter.mapViewToDom(t).childNodes;const r=Array.from(this.domConverter.viewChildrenToDom(t,i.ownerDocument,{bind:true,inlineFillerPosition:n}));if(n&&n.parent===t){Td(i.ownerDocument,r,n.offset)}const s=this._diffNodeLists(o,r);let a=0;const c=new Set;for(const t of s){if(t==="delete"){c.add(o[a]);yd(o[a])}else if(t==="equal"){a++}}a=0;for(const t of s){if(t==="insert"){vd(i,a,r[a]);a++}else if(t==="equal"){this._markDescendantTextToSync(this.domConverter.domToView(r[a]));a++}}for(const t of c){if(!t.parentNode){this.domConverter.unbindDomElement(t)}}}_diffNodeLists(t,e){t=Sd(t,this._fakeSelectionContainer);return kd(t,e,Md.bind(null,this.domConverter))}_findReplaceActions(t,e,i){if(t.indexOf("insert")===-1||t.indexOf("delete")===-1){return t}let n=[];let o=[];let r=[];const s={equal:0,insert:0,delete:0};for(const a of t){if(a==="insert"){r.push(i[s.equal+s.insert])}else if(a==="delete"){o.push(e[s.equal+s.delete])}else{n=n.concat(kd(o,r,Ed).map(t=>t==="equal"?"replace":t));n.push("equal");o=[];r=[]}s[a]++}return n.concat(kd(o,r,Ed).map(t=>t==="equal"?"replace":t))}_markDescendantTextToSync(t){if(!t){return}if(t.is("text")){this.markedTexts.add(t)}else if(t.is("element")){for(const e of t.getChildren()){this._markDescendantTextToSync(e)}}}_updateSelection(){if(this.selection.rangeCount===0){this._removeDomSelection();this._removeFakeSelection();return}const t=this.domConverter.mapViewToDom(this.selection.editableElement);if(!this.isFocused||!t){return}if(this.selection.isFake){this._updateFakeSelection(t)}else{this._removeFakeSelection();this._updateDomSelection(t)}}_updateFakeSelection(t){const e=t.ownerDocument;if(!this._fakeSelectionContainer){this._fakeSelectionContainer=Id(e)}const i=this._fakeSelectionContainer;this.domConverter.bindFakeSelection(i,this.selection);if(!this._fakeSelectionNeedsUpdate(t)){return}if(!i.parentElement||i.parentElement!=t){t.appendChild(i)}i.textContent=this.selection.fakeSelectionLabel||" ";const n=e.getSelection();const o=e.createRange();n.removeAllRanges();o.selectNodeContents(i);n.addRange(o)}_updateDomSelection(t){const e=t.ownerDocument.defaultView.getSelection();if(!this._domSelectionNeedsUpdate(e)){return}const i=this.domConverter.viewPositionToDom(this.selection.anchor);const n=this.domConverter.viewPositionToDom(this.selection.focus);t.focus();e.collapse(i.parent,i.offset);e.extend(n.parent,n.offset);if(Cl.isGecko){Pd(n,e)}}_domSelectionNeedsUpdate(t){if(!this.domConverter.isDomSelectionCorrect(t)){return true}const e=t&&this.domConverter.domSelectionToView(t);if(e&&this.selection.isEqual(e)){return false}if(!this.selection.isCollapsed&&this.selection.isSimilar(e)){return false}return true}_fakeSelectionNeedsUpdate(t){const e=this._fakeSelectionContainer;const i=t.ownerDocument.getSelection();if(!e||e.parentElement!==t){return true}if(i.anchorNode!==e&&!e.contains(i.anchorNode)){return true}return e.textContent!==this.selection.fakeSelectionLabel}_removeDomSelection(){for(const t of this.domDocuments){const e=t.getSelection();if(e.rangeCount){const e=t.activeElement;const i=this.domConverter.mapDomToView(e);if(e&&i){t.getSelection().removeAllRanges()}}}}_removeFakeSelection(){const t=this._fakeSelectionContainer;if(t){t.remove()}}_updateFocus(){if(this.isFocused){const t=this.selection.editableElement;if(t){this.domConverter.focus(t)}}}}vs(Ad,Jc);function Cd(t){if(t.getAttribute("contenteditable")=="false"){return false}const e=t.findAncestor(t=>t.hasAttribute("contenteditable"));return!e||e.getAttribute("contenteditable")=="true"}function Td(t,e,i){const n=e instanceof Array?e:e.childNodes;const o=n[i];if(od(o)){o.data=cd+o.data;return o}else{const o=t.createTextNode(cd);if(Array.isArray(e)){n.splice(i,0,o)}else{vd(e,i,o)}return o}}function Ed(t,e){return xd(t)&&xd(e)&&!od(t)&&!od(e)&&t.tagName.toLowerCase()===e.tagName.toLowerCase()}function Md(t,e,i){if(e===i){return true}else if(od(e)&&od(i)){return e.data===i.data}else if(t.isBlockFiller(e)&&t.isBlockFiller(i)){return true}return false}function Pd(t,e){const i=t.parent;if(i.nodeType!=Node.ELEMENT_NODE||t.offset!=i.childNodes.length-1){return}const n=i.childNodes[t.offset];if(n&&n.tagName=="BR"){e.addRange(e.getRangeAt(0))}}function Sd(t,e){const i=Array.from(t);if(i.length==0||!e){return i}const n=i[i.length-1];if(n==e){i.pop()}return i}function Id(t){const e=t.createElement("div");Object.assign(e.style,{position:"fixed",top:0,left:"-9999px",width:"42px"});e.textContent=" ";return e}var Nd={window:window,document:document};function Od(t){let e=0;while(t.previousSibling){t=t.previousSibling;e++}return e}function Ld(t){const e=[];while(t&&t.nodeType!=Node.DOCUMENT_NODE){e.unshift(t);t=t.parentNode}return e}function zd(t,e){const i=Ld(t);const n=Ld(e);let o=0;while(i[o]==n[o]&&i[o]){o++}return o===0?null:i[o-1]}const Rd=sd(document);class jd{constructor(t,e={}){this.document=t;this.blockFillerMode=e.blockFillerMode||"br";this.preElements=["pre"];this.blockElements=["p","div","h1","h2","h3","h4","h5","h6","li","dd","dt","figcaption"];this._blockFiller=this.blockFillerMode=="br"?sd:rd;this._domToViewMapping=new WeakMap;this._viewToDomMapping=new WeakMap;this._fakeSelectionMapping=new WeakMap}bindFakeSelection(t,e){this._fakeSelectionMapping.set(t,new ml(e))}fakeSelectionToView(t){return this._fakeSelectionMapping.get(t)}bindElements(t,e){this._domToViewMapping.set(t,e);this._viewToDomMapping.set(e,t)}unbindDomElement(t){const e=this._domToViewMapping.get(t);if(e){this._domToViewMapping.delete(t);this._viewToDomMapping.delete(e);for(const e of Array.from(t.childNodes)){this.unbindDomElement(e)}}}bindDocumentFragments(t,e){this._domToViewMapping.set(t,e);this._viewToDomMapping.set(e,t)}viewToDom(t,e,i={}){if(t.is("text")){const i=this._processDataFromViewText(t);return e.createTextNode(i)}else{if(this.mapViewToDom(t)){return this.mapViewToDom(t)}let n;if(t.is("documentFragment")){n=e.createDocumentFragment();if(i.bind){this.bindDocumentFragments(n,t)}}else if(t.is("uiElement")){n=t.render(e);if(i.bind){this.bindElements(n,t)}return n}else{if(t.hasAttribute("xmlns")){n=e.createElementNS(t.getAttribute("xmlns"),t.name)}else{n=e.createElement(t.name)}if(i.bind){this.bindElements(n,t)}for(const e of t.getAttributeKeys()){n.setAttribute(e,t.getAttribute(e))}}if(i.withChildren||i.withChildren===undefined){for(const o of this.viewChildrenToDom(t,e,i)){n.appendChild(o)}}return n}}*viewChildrenToDom(t,e,i={}){const n=t.getFillerOffset&&t.getFillerOffset();let o=0;for(const r of t.getChildren()){if(n===o){yield this._blockFiller(e)}yield this.viewToDom(r,e,i);o++}if(n===o){yield this._blockFiller(e)}}viewRangeToDom(t){const e=this.viewPositionToDom(t.start);const i=this.viewPositionToDom(t.end);const n=document.createRange();n.setStart(e.parent,e.offset);n.setEnd(i.parent,i.offset);return n}viewPositionToDom(t){const e=t.parent;if(e.is("text")){const i=this.findCorrespondingDomText(e);if(!i){return null}let n=t.offset;if(ld(i)){n+=ad}return{parent:i,offset:n}}else{let i,n,o;if(t.offset===0){i=this.mapViewToDom(e);if(!i){return null}o=i.childNodes[0]}else{const e=t.nodeBefore;n=e.is("text")?this.findCorrespondingDomText(e):this.mapViewToDom(t.nodeBefore);if(!n){return null}i=n.parentNode;o=n.nextSibling}if(od(o)&&ld(o)){return{parent:o,offset:ad}}const r=n?Od(n)+1:0;return{parent:i,offset:r}}}domToView(t,e={}){if(this.isBlockFiller(t,this.blockFillerMode)){return null}const i=this.getParentUIElement(t,this._domToViewMapping);if(i){return i}if(od(t)){if(dd(t)){return null}else{const e=this._processDataFromDomText(t);return e===""?null:new Ds(this.document,e)}}else if(this.isComment(t)){return null}else{if(this.mapDomToView(t)){return this.mapDomToView(t)}let i;if(this.isDocumentFragment(t)){i=new Ul(this.document);if(e.bind){this.bindDocumentFragments(t,i)}}else{const n=e.keepOriginalCase?t.tagName:t.tagName.toLowerCase();i=new jc(this.document,n);if(e.bind){this.bindElements(t,i)}const o=t.attributes;for(let t=o.length-1;t>=0;t--){i._setAttribute(o[t].name,o[t].value)}}if(e.withChildren||e.withChildren===undefined){for(const n of this.domChildrenToView(t,e)){i._appendChild(n)}}return i}}*domChildrenToView(t,e={}){for(let i=0;i{const{scrollLeft:e,scrollTop:i}=t;n.push([e,i])});e.focus();Bd(e,t=>{const[e,i]=n.shift();t.scrollLeft=e;t.scrollTop=i});Nd.window.scrollTo(t,i)}}isElement(t){return t&&t.nodeType==Node.ELEMENT_NODE}isDocumentFragment(t){return t&&t.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(t){return t&&t.nodeType==Node.COMMENT_NODE}isBlockFiller(t){if(this.blockFillerMode=="br"){return t.isEqualNode(Rd)}if(t.tagName==="BR"&&Fd(t,this.blockElements)&&t.parentNode.childNodes.length===1){return true}return Vd(t,this.blockElements)}isDomSelectionBackward(t){if(t.isCollapsed){return false}const e=document.createRange();e.setStart(t.anchorNode,t.anchorOffset);e.setEnd(t.focusNode,t.focusOffset);const i=e.collapsed;e.detach();return i}getParentUIElement(t){const e=Ld(t);e.pop();while(e.length){const t=e.pop();const i=this._domToViewMapping.get(t);if(i&&i.is("uiElement")){return i}}return null}isDomSelectionCorrect(t){return this._isDomSelectionPositionCorrect(t.anchorNode,t.anchorOffset)&&this._isDomSelectionPositionCorrect(t.focusNode,t.focusOffset)}_isDomSelectionPositionCorrect(t,e){if(od(t)&&ld(t)&ðis.preElements.includes(t.name))){return e}if(e.charAt(0)==" "){const i=this._getTouchingViewTextNode(t,false);const n=i&&this._nodeEndsWithSpace(i);if(n||!i){e=" "+e.substr(1)}}if(e.charAt(e.length-1)==" "){const i=this._getTouchingViewTextNode(t,true);if(e.charAt(e.length-2)==" "||!i||i.data.charAt(0)==" "){e=e.substr(0,e.length-1)+" "}}return e.replace(/ {2}/g," ")}_nodeEndsWithSpace(t){if(t.getAncestors().some(t=>this.preElements.includes(t.name))){return false}const e=this._processDataFromViewText(t);return e.charAt(e.length-1)==" "}_processDataFromDomText(t){let e=t.data;if(Dd(t,this.preElements)){return ud(t)}e=e.replace(/[ \n\t\r]{1,}/g," ");const i=this._getTouchingInlineDomNode(t,false);const n=this._getTouchingInlineDomNode(t,true);const o=this._checkShouldLeftTrimDomText(i);const r=this._checkShouldRightTrimDomText(t,n);if(o){e=e.replace(/^ /,"")}if(r){e=e.replace(/ $/,"")}e=ud(new Text(e));e=e.replace(/ \u00A0/g," ");if(/( |\u00A0)\u00A0$/.test(e)||!n||n.data&&n.data.charAt(0)==" "){e=e.replace(/\u00A0$/," ")}if(o){e=e.replace(/^\u00A0/," ")}return e}_checkShouldLeftTrimDomText(t){if(!t){return true}if(Gr(t)){return true}return/[^\S\u00A0]/.test(t.data.charAt(t.data.length-1))}_checkShouldRightTrimDomText(t,e){if(e){return false}return!ld(t)}_getTouchingViewTextNode(t,e){const i=new ll({startPosition:e?dl._createAfter(t):dl._createBefore(t),direction:e?"forward":"backward"});for(const t of i){if(t.item.is("containerElement")){return null}else if(t.item.is("br")){return null}else if(t.item.is("textProxy")){return t.item}}return null}_getTouchingInlineDomNode(t,e){if(!t.parentNode){return null}const i=e?"nextNode":"previousNode";const n=t.ownerDocument;const o=Ld(t)[0];const r=n.createTreeWalker(o,NodeFilter.SHOW_TEXT|NodeFilter.SHOW_ELEMENT,{acceptNode(t){if(od(t)){return NodeFilter.FILTER_ACCEPT}if(t.tagName=="BR"){return NodeFilter.FILTER_ACCEPT}return NodeFilter.FILTER_SKIP}});r.currentNode=t;const s=r[i]();if(s!==null){const e=zd(t,s);if(e&&!Dd(t,this.blockElements,e)&&!Dd(s,this.blockElements,e)){return s}}return null}}function Dd(t,e,i){let n=Ld(t);if(i){n=n.slice(n.indexOf(i)+1)}return n.some(t=>t.tagName&&e.includes(t.tagName.toLowerCase()))}function Bd(t,e){while(t&&t!=Nd.document){e(t);t=t.parentNode}}function Vd(t,e){const i=od(t)&&t.data==" ";return i&&Fd(t,e)&&t.parentNode.childNodes.length===1}function Fd(t,e){const i=t.parentNode;return i&&i.tagName&&e.includes(i.tagName.toLowerCase())}function Hd(t){const e=Object.prototype.toString.apply(t);if(e=="[object Window]"){return true}if(e=="[object global]"){return true}return false}const Wd=Uc({},ds,{listenTo(t,...e){if(xd(t)||Hd(t)){const i=this._getProxyEmitter(t)||new qd(t);i.attach(...e);t=i}ds.listenTo.call(this,t,...e)},stopListening(t,e,i){if(xd(t)||Hd(t)){const e=this._getProxyEmitter(t);if(!e){return}t=e}ds.stopListening.call(this,t,e,i);if(t instanceof qd){t.detach(e)}},_getProxyEmitter(t){return us(this,$d(t))}});var Ud=Wd;class qd{constructor(t){hs(this,$d(t));this._domNode=t}}Uc(qd.prototype,ds,{attach(t,e,i={}){if(this._domListeners&&this._domListeners[t]){return}const n=this._createDomListener(t,!!i.useCapture);this._domNode.addEventListener(t,n,!!i.useCapture);if(!this._domListeners){this._domListeners={}}this._domListeners[t]=n},detach(t){let e;if(this._domListeners[t]&&(!(e=this._events[t])||!e.callbacks.length)){this._domListeners[t].removeListener()}},_createDomListener(t,e){const i=e=>{this.fire(t,e)};i.removeListener=()=>{this._domNode.removeEventListener(t,i,e);delete this._domListeners[t]};return i}});function $d(t){return t["data-ck-expando"]||(t["data-ck-expando"]=is())}class Yd{constructor(t){this.view=t;this.document=t.document;this.isEnabled=false}enable(){this.isEnabled=true}disable(){this.isEnabled=false}destroy(){this.disable();this.stopListening()}}vs(Yd,Ud);var Gd="__lodash_hash_undefined__";function Jd(t){this.__data__.set(t,Gd);return this}var Xd=Jd;function Qd(t){return this.__data__.has(t)}var Kd=Qd;function Zd(t){var e=-1,i=t==null?0:t.length;this.__data__=new ke;while(++ea)){return false}var l=r.get(t);if(l&&r.get(e)){return l==e}var d=-1,u=true,h=i&su?new tu:undefined;r.set(t,e);r.set(e,t);while(++d{this.listenTo(t,e,(t,e)=>{if(this.isEnabled){this.onDomEvent(e)}},{useCapture:this.useCapture})})}fire(t,e,i){if(this.isEnabled){this.document.fire(t,new Gu(this.view,e,i))}}}class Xu extends Ju{constructor(t){super(t);this.domEventType=["keydown","keyup"]}onDomEvent(t){this.fire(t.type,t,{keyCode:t.keyCode,altKey:t.altKey,ctrlKey:t.ctrlKey||t.metaKey,shiftKey:t.shiftKey,get keystroke(){return zl(this)}})}}var Qu=function(){return n["a"].Date.now()};var Ku=Qu;var Zu=0/0;var th=/^\s+|\s+$/g;var eh=/^[-+]0x[0-9a-f]+$/i;var ih=/^0b[01]+$/i;var nh=/^0o[0-7]+$/i;var oh=parseInt;function rh(t){if(typeof t=="number"){return t}if(Qs(t)){return Zu}if(ct(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=ct(e)?e+"":e}if(typeof t!="string"){return t===0?t:+t}t=t.replace(th,"");var i=ih.test(t);return i||nh.test(t)?oh(t.slice(2),i?2:8):eh.test(t)?Zu:+t}var sh=rh;var ah="Expected a function";var ch=Math.max,lh=Math.min;function dh(t,e,i){var n,o,r,s,a,c,l=0,d=false,u=false,h=true;if(typeof t!="function"){throw new TypeError(ah)}e=sh(e)||0;if(ct(i)){d=!!i.leading;u="maxWait"in i;r=u?ch(sh(i.maxWait)||0,e):r;h="trailing"in i?!!i.trailing:h}function f(e){var i=n,r=o;n=o=undefined;l=e;s=t.apply(r,i);return s}function m(t){l=t;a=setTimeout(b,e);return d?f(t):s}function g(t){var i=t-c,n=t-l,o=e-i;return u?lh(o,r-n):o}function p(t){var i=t-c,n=t-l;return c===undefined||i>=e||i<0||u&&n>=r}function b(){var t=Ku();if(p(t)){return w(t)}a=setTimeout(b,g(t))}function w(t){a=undefined;if(h&&n){return f(t)}n=o=undefined;return s}function _(){if(a!==undefined){clearTimeout(a)}l=0;n=c=o=a=undefined}function k(){return a===undefined?s:w(Ku())}function v(){var t=Ku(),i=p(t);n=arguments;o=this;c=t;if(i){if(a===undefined){return m(c)}if(u){clearTimeout(a);a=setTimeout(b,e);return f(c)}}if(a===undefined){a=setTimeout(b,e)}return s}v.cancel=_;v.flush=k;return v}var uh=dh;class hh extends Yd{constructor(t){super(t);this._fireSelectionChangeDoneDebounced=uh(t=>this.document.fire("selectionChangeDone",t),200)}observe(){const t=this.document;t.on("keydown",(e,i)=>{const n=t.selection;if(n.isFake&&fh(i.keyCode)&&this.isEnabled){i.preventDefault();this._handleSelectionMove(i.keyCode)}},{priority:"lowest"})}destroy(){super.destroy();this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(t){const e=this.document.selection;const i=new ml(e.getRanges(),{backward:e.isBackward,fake:false});if(t==Ll.arrowleft||t==Ll.arrowup){i.setTo(i.getFirstPosition())}if(t==Ll.arrowright||t==Ll.arrowdown){i.setTo(i.getLastPosition())}const n={oldSelection:e,newSelection:i,domSelection:null};this.document.fire("selectionChange",n);this._fireSelectionChangeDoneDebounced(n)}}function fh(t){return t==Ll.arrowright||t==Ll.arrowleft||t==Ll.arrowup||t==Ll.arrowdown}class mh extends Yd{constructor(t){super(t);this.mutationObserver=t.getObserver(Yu);this.selection=this.document.selection;this.domConverter=t.domConverter;this._documents=new WeakSet;this._fireSelectionChangeDoneDebounced=uh(t=>this.document.fire("selectionChangeDone",t),200);this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3);this._loopbackCounter=0}observe(t){const e=t.ownerDocument;if(this._documents.has(e)){return}this.listenTo(e,"selectionchange",()=>{this._handleSelectionChange(e)});this._documents.add(e)}destroy(){super.destroy();clearInterval(this._clearInfiniteLoopInterval);this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(t){if(!this.isEnabled){return}this.mutationObserver.flush();const e=t.defaultView.getSelection();const i=this.domConverter.domSelectionToView(e);if(i.rangeCount==0){return}if(this.selection.isEqual(i)&&this.domConverter.isDomSelectionCorrect(e)){return}if(++this._loopbackCounter>60){return}if(this.selection.isSimilar(i)){this.view.forceRender()}else{const t={oldSelection:this.selection,newSelection:i,domSelection:e};this.document.fire("selectionChange",t);this._fireSelectionChangeDoneDebounced(t)}}_clearInfiniteLoop(){this._loopbackCounter=0}}class gh extends Ju{constructor(t){super(t);this.domEventType=["focus","blur"];this.useCapture=true;const e=this.document;e.on("focus",()=>{e.isFocused=true;this._renderTimeoutId=setTimeout(()=>t.forceRender(),50)});e.on("blur",(i,n)=>{const o=e.selection.editableElement;if(o===null||o===n.target){e.isFocused=false;t.forceRender()}})}onDomEvent(t){this.fire(t.type,t)}destroy(){if(this._renderTimeoutId){clearTimeout(this._renderTimeoutId)}super.destroy()}}class ph extends Ju{constructor(t){super(t);this.domEventType=["compositionstart","compositionupdate","compositionend"];const e=this.document;e.on("compositionstart",()=>{e.isComposing=true});e.on("compositionend",()=>{e.isComposing=false})}onDomEvent(t){this.fire(t.type,t)}}class bh extends Ju{constructor(t){super(t);this.domEventType=["beforeinput"]}onDomEvent(t){this.fire(t.type,t)}}function wh(t){return Object.prototype.toString.apply(t)=="[object Range]"}function _h(t){const e=t.ownerDocument.defaultView.getComputedStyle(t);return{top:parseInt(e.borderTopWidth,10),right:parseInt(e.borderRightWidth,10),bottom:parseInt(e.borderBottomWidth,10),left:parseInt(e.borderLeftWidth,10)}}const kh=["top","right","bottom","left","width","height"];class vh{constructor(t){const e=wh(t);Object.defineProperty(this,"_source",{value:t._source||t,writable:true,enumerable:false});if(Gr(t)||e){if(e){yh(this,vh.getDomRangeRects(t)[0])}else{yh(this,t.getBoundingClientRect())}}else if(Hd(t)){const{innerWidth:e,innerHeight:i}=t;yh(this,{top:0,right:e,bottom:i,left:0,width:e,height:i})}else{yh(this,t)}}clone(){return new vh(this)}moveTo(t,e){this.top=e;this.right=t+this.width;this.bottom=e+this.height;this.left=t;return this}moveBy(t,e){this.top+=e;this.right+=t;this.left+=t;this.bottom+=e;return this}getIntersection(t){const e={top:Math.max(this.top,t.top),right:Math.min(this.right,t.right),bottom:Math.min(this.bottom,t.bottom),left:Math.max(this.left,t.left)};e.width=e.right-e.left;e.height=e.bottom-e.top;if(e.width<0||e.height<0){return null}else{return new vh(e)}}getIntersectionArea(t){const e=this.getIntersection(t);if(e){return e.getArea()}else{return 0}}getArea(){return this.width*this.height}getVisible(){const t=this._source;let e=this.clone();if(!xh(t)){let i=t.parentNode||t.commonAncestorContainer;while(i&&!xh(i)){const t=new vh(i);const n=e.getIntersection(t);if(n){if(n.getArea()zh(t,n));const s=zh(t,n);Eh(n,s,e);if(n.parent!=n){o=n.frameElement;n=n.parent;if(!o){return}}else{n=null}}}function Th(t){const e=Lh(t);Mh(e,()=>new vh(t))}Object.assign(Ah,{scrollViewportToShowTarget:Ch,scrollAncestorsToShowTarget:Th});function Eh(t,e,i){const n=e.clone().moveBy(0,i);const o=e.clone().moveBy(0,-i);const r=new vh(t).excludeScrollbarsAndBorders();const s=[o,n];if(!s.every(t=>r.contains(t))){let{scrollX:s,scrollY:a}=t;if(Sh(o,r)){a-=r.top-e.top+i}else if(Ph(n,r)){a+=e.bottom-r.bottom+i}if(Ih(e,r)){s-=r.left-e.left+i}else if(Nh(e,r)){s+=e.right-r.right+i}t.scrollTo(s,a)}}function Mh(t,e){const i=Oh(t);let n,o;while(t!=i.document.body){o=e();n=new vh(t).excludeScrollbarsAndBorders();if(!n.contains(o)){if(Sh(o,n)){t.scrollTop-=n.top-o.top}else if(Ph(o,n)){t.scrollTop+=o.bottom-n.bottom}if(Ih(o,n)){t.scrollLeft-=n.left-o.left}else if(Nh(o,n)){t.scrollLeft+=o.right-n.right}}t=t.parentNode}}function Ph(t,e){return t.bottom>e.bottom}function Sh(t,e){return t.tope.right}function Oh(t){if(wh(t)){return t.startContainer.ownerDocument.defaultView}else{return t.ownerDocument.defaultView}}function Lh(t){if(wh(t)){let e=t.commonAncestorContainer;if(od(e)){e=e.parentNode}return e}else{return t.parentNode}}function zh(t,e){const i=Oh(t);const n=new vh(t);if(i===e){return n}else{let t=i;while(t!=e){const e=t.frameElement;const i=new vh(e).excludeScrollbarsAndBorders();n.moveBy(i.left,i.top);t=t.parent}}return n}class Rh{constructor(t){this.document=new pl(t);this.domConverter=new jd(this.document);this.domRoots=new Map;this.set("isRenderingInProgress",false);this._renderer=new Ad(this.domConverter,this.document.selection);this._renderer.bind("isFocused").to(this.document);this._initialDomRootAttributes=new WeakMap;this._observers=new Map;this._ongoingChange=false;this._postFixersInProgress=false;this._renderingDisabled=false;this._hasChangedSinceTheLastRendering=false;this._writer=new $l(this.document);this.addObserver(Yu);this.addObserver(mh);this.addObserver(gh);this.addObserver(Xu);this.addObserver(hh);this.addObserver(ph);if(Cl.isAndroid){this.addObserver(bh)}hd(this);Fl(this);this.on("render",()=>{this._render();this.document.fire("layoutChanged");this._hasChangedSinceTheLastRendering=false});this.listenTo(this.document.selection,"change",()=>{this._hasChangedSinceTheLastRendering=true})}attachDomRoot(t,e="main"){const i=this.document.getRoot(e);i._name=t.tagName.toLowerCase();const n={};for(const{name:e,value:o}of Array.from(t.attributes)){n[e]=o;if(e==="class"){this._writer.addClass(o.split(" "),i)}else{this._writer.setAttribute(e,o,i)}}this._initialDomRootAttributes.set(t,n);const o=()=>{this._writer.setAttribute("contenteditable",!i.isReadOnly,i);if(i.isReadOnly){this._writer.addClass("ck-read-only",i)}else{this._writer.removeClass("ck-read-only",i)}};o();this.domRoots.set(e,t);this.domConverter.bindElements(t,i);this._renderer.markToSync("children",i);this._renderer.markToSync("attributes",i);this._renderer.domDocuments.add(t.ownerDocument);i.on("change:children",(t,e)=>this._renderer.markToSync("children",e));i.on("change:attributes",(t,e)=>this._renderer.markToSync("attributes",e));i.on("change:text",(t,e)=>this._renderer.markToSync("text",e));i.on("change:isReadOnly",()=>this.change(o));i.on("change",()=>{this._hasChangedSinceTheLastRendering=true});for(const i of this._observers.values()){i.observe(t,e)}}detachDomRoot(t){const e=this.domRoots.get(t);Array.from(e.attributes).forEach(({name:t})=>e.removeAttribute(t));const i=this._initialDomRootAttributes.get(e);for(const t in i){e.setAttribute(t,i[t])}this.domRoots.delete(t);this.domConverter.unbindDomElement(e)}getDomRoot(t="main"){return this.domRoots.get(t)}addObserver(t){let e=this._observers.get(t);if(e){return e}e=new t(this);this._observers.set(t,e);for(const[t,i]of this.domRoots){e.observe(i,t)}e.enable();return e}getObserver(t){return this._observers.get(t)}disableObservers(){for(const t of this._observers.values()){t.disable()}}enableObservers(){for(const t of this._observers.values()){t.enable()}}scrollToTheSelection(){const t=this.document.selection.getFirstRange();if(t){Ch({target:this.domConverter.viewRangeToDom(t),viewportOffset:20})}}focus(){if(!this.document.isFocused){const t=this.document.selection.editableElement;if(t){this.domConverter.focus(t);this.forceRender()}else{}}}change(t){if(this.isRenderingInProgress||this._postFixersInProgress){throw new ss["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 t(this._writer)}this._ongoingChange=true;const e=t(this._writer);this._ongoingChange=false;if(!this._renderingDisabled&&this._hasChangedSinceTheLastRendering){this._postFixersInProgress=true;this.document._callPostFixers(this._writer);this._postFixersInProgress=false;this.fire("render")}return e}catch(t){ss["b"].rethrowUnexpectedError(t,this)}}forceRender(){this._hasChangedSinceTheLastRendering=true;this.change(()=>{})}destroy(){for(const t of this._observers.values()){t.destroy()}this.document.destroy();this.stopListening()}createPositionAt(t,e){return dl._createAt(t,e)}createPositionAfter(t){return dl._createAfter(t)}createPositionBefore(t){return dl._createBefore(t)}createRange(t,e){return new ul(t,e)}createRangeOn(t){return ul._createOn(t)}createRangeIn(t){return ul._createIn(t)}createSelection(t,e,i){return new ml(t,e,i)}_disableRendering(t){this._renderingDisabled=t;if(t==false){this.change(()=>{})}}_render(){this.isRenderingInProgress=true;this.disableObservers();this._renderer.render();this.enableObservers();this.isRenderingInProgress=false}}vs(Rh,Jc);class jh{constructor(t){this.parent=null;this._attrs=Hs(t)}get index(){let t;if(!this.parent){return null}if((t=this.parent.getChildIndex(this))===null){throw new ss["b"]("model-node-not-found-in-parent: The node's parent does not contain this node.",this)}return t}get startOffset(){let t;if(!this.parent){return null}if((t=this.parent.getChildStartOffset(this))===null){throw new ss["b"]("model-node-not-found-in-parent: The node's parent does not contain this node.",this)}return t}get offsetSize(){return 1}get endOffset(){if(!this.parent){return null}return this.startOffset+this.offsetSize}get nextSibling(){const t=this.index;return t!==null&&this.parent.getChild(t+1)||null}get previousSibling(){const t=this.index;return t!==null&&this.parent.getChild(t-1)||null}get root(){let t=this;while(t.parent){t=t.parent}return t}isAttached(){return this.root.is("rootElement")}getPath(){const t=[];let e=this;while(e.parent){t.unshift(e.startOffset);e=e.parent}return t}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this:this.parent;while(i){e[t.parentFirst?"push":"unshift"](i);i=i.parent}return e}getCommonAncestor(t,e={}){const i=this.getAncestors(e);const n=t.getAncestors(e);let o=0;while(i[o]==n[o]&&i[o]){o++}return o===0?null:i[o-1]}isBefore(t){if(this==t){return false}if(this.root!==t.root){return false}const e=this.getPath();const i=t.getPath();const n=Os(e,i);switch(n){case"prefix":return true;case"extension":return false;default:return e[n]{t[e[0]]=e[1];return t},{})}return t}is(t){return t=="node"||t=="model:node"}_clone(){return new jh(this._attrs)}_remove(){this.parent._removeChildren(this.index)}_setAttribute(t,e){this._attrs.set(t,e)}_setAttributesTo(t){this._attrs=Hs(t)}_removeAttribute(t){return this._attrs.delete(t)}_clearAttributes(){this._attrs.clear()}}class Dh extends jh{constructor(t,e){super(e);this._data=t||""}get offsetSize(){return this.data.length}get data(){return this._data}is(t){return t=="text"||t=="model:text"||super.is(t)}toJSON(){const t=super.toJSON();t.data=this.data;return t}_clone(){return new Dh(this.data,this.getAttributes())}static fromJSON(t){return new Dh(t.data,t.attributes)}}class Bh{constructor(t,e,i){this.textNode=t;if(e<0||e>t.offsetSize){throw new ss["b"]("model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.",this)}if(i<0||e+i>t.offsetSize){throw new ss["b"]("model-textproxy-wrong-length: Given length value is incorrect.",this)}this.data=t.data.substring(e,e+i);this.offsetInText=e}get startOffset(){return this.textNode.startOffset!==null?this.textNode.startOffset+this.offsetInText:null}get offsetSize(){return this.data.length}get endOffset(){return this.startOffset!==null?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}is(t){return t=="textProxy"||t=="model:textProxy"}getPath(){const t=this.textNode.getPath();if(t.length>0){t[t.length-1]+=this.offsetInText}return t}getAncestors(t={includeSelf:false,parentFirst:false}){const e=[];let i=t.includeSelf?this:this.parent;while(i){e[t.parentFirst?"push":"unshift"](i);i=i.parent}return e}hasAttribute(t){return this.textNode.hasAttribute(t)}getAttribute(t){return this.textNode.getAttribute(t)}getAttributes(){return this.textNode.getAttributes()}getAttributeKeys(){return this.textNode.getAttributeKeys()}}class Vh{constructor(t){this._nodes=[];if(t){this._insertNodes(0,t)}}[Symbol.iterator](){return this._nodes[Symbol.iterator]()}get length(){return this._nodes.length}get maxOffset(){return this._nodes.reduce((t,e)=>t+e.offsetSize,0)}getNode(t){return this._nodes[t]||null}getNodeIndex(t){const e=this._nodes.indexOf(t);return e==-1?null:e}getNodeStartOffset(t){const e=this.getNodeIndex(t);return e===null?null:this._nodes.slice(0,e).reduce((t,e)=>t+e.offsetSize,0)}indexToOffset(t){if(t==this._nodes.length){return this.maxOffset}const e=this._nodes[t];if(!e){throw new ss["b"]("model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.",this)}return this.getNodeStartOffset(e)}offsetToIndex(t){let e=0;for(const i of this._nodes){if(t>=e&&tt.toJSON())}}class Fh extends jh{constructor(t,e,i){super(e);this.name=t;this._children=new Vh;if(i){this._insertChild(0,i)}}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}is(t,e=null){const i=t.replace(/^model:/,"");if(!e){return i=="element"||i==this.name||super.is(t)}else{return i=="element"&&e==this.name}}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}offsetToIndex(t){return this._children.offsetToIndex(t)}getNodeByPath(t){let e=this;for(const i of t){e=e.getChild(e.offsetToIndex(i))}return e}toJSON(){const t=super.toJSON();t.name=this.name;if(this._children.length>0){t.children=[];for(const e of this._children){t.children.push(e.toJSON())}}return t}_clone(t=false){const e=t?Array.from(this._children).map(t=>t._clone(true)):null;return new Fh(this.name,this.getAttributes(),e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=Hh(e);for(const t of i){if(t.parent!==null){t._remove()}t.parent=this}this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i){t.parent=null}return i}static fromJSON(t){let e=null;if(t.children){e=[];for(const i of t.children){if(i.name){e.push(Fh.fromJSON(i))}else{e.push(Dh.fromJSON(i))}}}return new Fh(t.name,t.attributes,e)}}function Hh(t){if(typeof t=="string"){return[new Dh(t)]}if(!Fs(t)){t=[t]}return Array.from(t).map(t=>{if(typeof t=="string"){return new Dh(t)}if(t instanceof Bh){return new Dh(t.data,t.getAttributes())}return t})}class Wh{constructor(t={}){if(!t.boundaries&&!t.startPosition){throw new ss["b"]("model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.",null)}const e=t.direction||"forward";if(e!="forward"&&e!="backward"){throw new ss["b"]("model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.",t,{direction:e})}this.direction=e;this.boundaries=t.boundaries||null;if(t.startPosition){this.position=t.startPosition.clone()}else{this.position=qh._createAt(this.boundaries[this.direction=="backward"?"end":"start"])}this.position.stickiness="toNone";this.singleCharacters=!!t.singleCharacters;this.shallow=!!t.shallow;this.ignoreElementEnd=!!t.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(t){let e,i,n,o;do{n=this.position;o=this._visitedParent;({done:e,value:i}=this.next())}while(!e&&t(i));if(!e){this.position=n;this._visitedParent=o}}next(){if(this.direction=="forward"){return this._next()}else{return this._previous()}}_next(){const t=this.position;const e=this.position.clone();const i=this._visitedParent;if(i.parent===null&&e.offset===i.maxOffset){return{done:true}}if(i===this._boundaryEndParent&&e.offset==this.boundaries.end.offset){return{done:true}}const n=e.textNode?e.textNode:e.nodeAfter;if(n instanceof Fh){if(!this.shallow){e.path.push(0);this._visitedParent=n}else{e.offset++}this.position=e;return Uh("elementStart",n,t,e,1)}else if(n instanceof Dh){let o;if(this.singleCharacters){o=1}else{let t=n.endOffset;if(this._boundaryEndParent==i&&this.boundaries.end.offsett){t=this.boundaries.start.offset}o=e.offset-t}const r=e.offset-n.startOffset;const s=new Bh(n,r-o,o);e.offset-=o;this.position=e;return Uh("text",s,t,e,o)}else{e.path.pop();this.position=e;this._visitedParent=i.parent;return Uh("elementStart",i,t,e,1)}}}function Uh(t,e,i,n,o){return{done:false,value:{type:t,item:e,previousPosition:i,nextPosition:n,length:o}}}class qh{constructor(t,e,i="toNone"){if(!t.is("element")&&!t.is("documentFragment")){throw new ss["b"]("model-position-root-invalid: Position root invalid.",t)}if(!(e instanceof Array)||e.length===0){throw new ss["b"]("model-position-path-incorrect-format: Position path must be an array with at least one item.",t,{path:e})}e=t.getPath().concat(e);t=t.root;this.root=t;this.path=e;this.stickiness=i}get offset(){return Aa(this.path)}set offset(t){this.path[this.path.length-1]=t}get parent(){let t=this.root;for(let e=0;ei.path.length){if(e.offset!==o.maxOffset){return false}e.path=e.path.slice(0,-1);o=o.parent;e.offset++}else{if(i.offset!==0){return false}i.path=i.path.slice(0,-1)}}}is(t){return t=="position"||t=="model:position"}hasSameParentAs(t){if(this.root!==t.root){return false}const e=this.getParentPath();const i=t.getParentPath();return Os(e,i)=="same"}getTransformedByOperation(t){let e;switch(t.type){case"insert":e=this._getTransformedByInsertOperation(t);break;case"move":case"remove":case"reinsert":e=this._getTransformedByMoveOperation(t);break;case"split":e=this._getTransformedBySplitOperation(t);break;case"merge":e=this._getTransformedByMergeOperation(t);break;default:e=qh._createAt(this);break}return e}_getTransformedByInsertOperation(t){return this._getTransformedByInsertion(t.position,t.howMany)}_getTransformedByMoveOperation(t){return this._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany)}_getTransformedBySplitOperation(t){const e=t.movedRange;const i=e.containsPosition(this)||e.start.isEqual(this)&&this.stickiness=="toNext";if(i){return this._getCombined(t.splitPosition,t.moveTargetPosition)}else{if(t.graveyardPosition){return this._getTransformedByMove(t.graveyardPosition,t.insertionPosition,1)}else{return this._getTransformedByInsertion(t.insertionPosition,1)}}}_getTransformedByMergeOperation(t){const e=t.movedRange;const i=e.containsPosition(this)||e.start.isEqual(this);let n;if(i){n=this._getCombined(t.sourcePosition,t.targetPosition);if(t.sourcePosition.isBefore(t.targetPosition)){n=n._getTransformedByDeletion(t.deletionPosition,1)}}else if(this.isEqual(t.deletionPosition)){n=qh._createAt(t.deletionPosition)}else{n=this._getTransformedByMove(t.deletionPosition,t.graveyardPosition,1)}return n}_getTransformedByDeletion(t,e){const i=qh._createAt(this);if(this.root!=t.root){return i}if(Os(t.getParentPath(),this.getParentPath())=="same"){if(t.offsetthis.offset){return null}else{i.offset-=e}}}else if(Os(t.getParentPath(),this.getParentPath())=="prefix"){const n=t.path.length-1;if(t.offset<=this.path[n]){if(t.offset+e>this.path[n]){return null}else{i.path[n]-=e}}}return i}_getTransformedByInsertion(t,e){const i=qh._createAt(this);if(this.root!=t.root){return i}if(Os(t.getParentPath(),this.getParentPath())=="same"){if(t.offsete+1){const e=n.maxOffset-i.offset;if(e!==0){t.push(new $h(i,i.getShiftedBy(e)))}i.path=i.path.slice(0,-1);i.offset++;n=n.parent}while(i.path.length<=this.end.path.length){const e=this.end.path[i.path.length-1];const n=e-i.offset;if(n!==0){t.push(new $h(i,i.getShiftedBy(n)))}i.offset=e;i.path.push(0)}return t}getWalker(t={}){t.boundaries=this;return new Wh(t)}*getItems(t={}){t.boundaries=this;t.ignoreElementEnd=true;const e=new Wh(t);for(const t of e){yield t.item}}*getPositions(t={}){t.boundaries=this;const e=new Wh(t);yield e.position;for(const t of e){yield t.nextPosition}}getTransformedByOperation(t){switch(t.type){case"insert":return this._getTransformedByInsertOperation(t);case"move":case"remove":case"reinsert":return this._getTransformedByMoveOperation(t);case"split":return[this._getTransformedBySplitOperation(t)];case"merge":return[this._getTransformedByMergeOperation(t)]}return[new $h(this.start,this.end)]}getTransformedByOperations(t){const e=[new $h(this.start,this.end)];for(const i of t){for(let t=0;t0?new this(i,n):new this(n,i)}static _createIn(t){return new this(qh._createAt(t,0),qh._createAt(t,t.maxOffset))}static _createOn(t){return this._createFromPositionAndShift(qh._createBefore(t),t.offsetSize)}static _createFromRanges(t){if(t.length===0){throw new ss["b"]("range-create-from-ranges-empty-array: At least one range has to be passed.",null)}else if(t.length==1){return t[0].clone()}const e=t[0];t.sort((t,e)=>t.start.isAfter(e.start)?1:-1);const i=t.indexOf(e);const n=new this(e.start,e.end);if(i>0){for(let e=i-1;true;e++){if(t[e].end.isEqual(n.start)){n.start=qh._createAt(t[e].start)}else{break}}}for(let e=i+1;e{if(e.viewPosition){return}const i=this._modelToViewMapping.get(e.modelPosition.parent);e.viewPosition=this._findPositionIn(i,e.modelPosition.offset)},{priority:"low"});this.on("viewToModelPosition",(t,e)=>{if(e.modelPosition){return}const i=this.findMappedViewAncestor(e.viewPosition);const n=this._viewToModelMapping.get(i);const o=this._toModelOffset(e.viewPosition.parent,e.viewPosition.offset,i);e.modelPosition=qh._createAt(n,o)},{priority:"low"})}bindElements(t,e){this._modelToViewMapping.set(t,e);this._viewToModelMapping.set(e,t)}unbindViewElement(t){const e=this.toModelElement(t);this._viewToModelMapping.delete(t);if(this._elementToMarkerNames.has(t)){for(const e of this._elementToMarkerNames.get(t)){this._unboundMarkerNames.add(e)}}if(this._modelToViewMapping.get(e)==t){this._modelToViewMapping.delete(e)}}unbindModelElement(t){const e=this.toViewElement(t);this._modelToViewMapping.delete(t);if(this._viewToModelMapping.get(e)==t){this._viewToModelMapping.delete(e)}}bindElementToMarker(t,e){const i=this._markerNameToElements.get(e)||new Set;i.add(t);const n=this._elementToMarkerNames.get(t)||new Set;n.add(e);this._markerNameToElements.set(e,i);this._elementToMarkerNames.set(t,n)}unbindElementFromMarkerName(t,e){const i=this._markerNameToElements.get(e);if(i){i.delete(t);if(i.size==0){this._markerNameToElements.delete(e)}}const n=this._elementToMarkerNames.get(t);if(n){n.delete(e);if(n.size==0){this._elementToMarkerNames.delete(t)}}}flushUnboundMarkerNames(){const t=Array.from(this._unboundMarkerNames);this._unboundMarkerNames.clear();return t}clearBindings(){this._modelToViewMapping=new WeakMap;this._viewToModelMapping=new WeakMap;this._markerNameToElements=new Map;this._elementToMarkerNames=new Map;this._unboundMarkerNames=new Set}toModelElement(t){return this._viewToModelMapping.get(t)}toViewElement(t){return this._modelToViewMapping.get(t)}toModelRange(t){return new $h(this.toModelPosition(t.start),this.toModelPosition(t.end))}toViewRange(t){return new ul(this.toViewPosition(t.start),this.toViewPosition(t.end))}toModelPosition(t){const e={viewPosition:t,mapper:this};this.fire("viewToModelPosition",e);return e.modelPosition}toViewPosition(t,e={isPhantom:false}){const i={modelPosition:t,mapper:this,isPhantom:e.isPhantom};this.fire("modelToViewPosition",i);return i.viewPosition}markerNameToElements(t){const e=this._markerNameToElements.get(t);if(!e){return null}const i=new Set;for(const t of e){if(t.is("attributeElement")){for(const e of t.getElementsWithSameId()){i.add(e)}}else{i.add(t)}}return i}registerViewToModelLength(t,e){this._viewToModelLengthCallbacks.set(t,e)}findMappedViewAncestor(t){let e=t.parent;while(!this._viewToModelMapping.has(e)){e=e.parent}return e}_toModelOffset(t,e,i){if(i!=t){const n=this._toModelOffset(t.parent,t.index,i);const o=this._toModelOffset(t,e,t);return n+o}if(t.is("text")){return e}let n=0;for(let i=0;i1?e[0]+":"+e[1]:e[0]}class Xh{constructor(t){this.conversionApi=Uc({dispatcher:this},t)}convertChanges(t,e,i){for(const e of t.getMarkersToRemove()){this.convertMarkerRemove(e.name,e.range,i)}for(const e of t.getChanges()){if(e.type=="insert"){this.convertInsert($h._createFromPositionAndShift(e.position,e.length),i)}else if(e.type=="remove"){this.convertRemove(e.position,e.length,e.name,i)}else{this.convertAttribute(e.range,e.attributeKey,e.attributeOldValue,e.attributeNewValue,i)}}for(const t of this.conversionApi.mapper.flushUnboundMarkerNames()){const n=e.get(t).getRange();this.convertMarkerRemove(t,n,i);this.convertMarkerAdd(t,n,i)}for(const e of t.getMarkersToAdd()){this.convertMarkerAdd(e.name,e.range,i)}}convertInsert(t,e){this.conversionApi.writer=e;this.conversionApi.consumable=this._createInsertConsumable(t);for(const e of t){const t=e.item;const i=$h._createFromPositionAndShift(e.previousPosition,e.length);const n={item:t,range:i};this._testAndFire("insert",n);for(const e of t.getAttributeKeys()){n.attributeKey=e;n.attributeOldValue=null;n.attributeNewValue=t.getAttribute(e);this._testAndFire(`attribute:${e}`,n)}}this._clearConversionApi()}convertRemove(t,e,i,n){this.conversionApi.writer=n;this.fire("remove:"+i,{position:t,length:e},this.conversionApi);this._clearConversionApi()}convertAttribute(t,e,i,n,o){this.conversionApi.writer=o;this.conversionApi.consumable=this._createConsumableForRange(t,`attribute:${e}`);for(const o of t){const t=o.item;const r=$h._createFromPositionAndShift(o.previousPosition,o.length);const s={item:t,range:r,attributeKey:e,attributeOldValue:i,attributeNewValue:n};this._testAndFire(`attribute:${e}`,s)}this._clearConversionApi()}convertSelection(t,e,i){const n=Array.from(e.getMarkersAtPosition(t.getFirstPosition()));this.conversionApi.writer=i;this.conversionApi.consumable=this._createSelectionConsumable(t,n);this.fire("selection",{selection:t},this.conversionApi);if(!t.isCollapsed){return}for(const e of n){const i=e.getRange();if(!Qh(t.getFirstPosition(),e,this.conversionApi.mapper)){continue}const n={item:t,markerName:e.name,markerRange:i};if(this.conversionApi.consumable.test(t,"addMarker:"+e.name)){this.fire("addMarker:"+e.name,n,this.conversionApi)}}for(const e of t.getAttributeKeys()){const i={item:t,range:t.getFirstRange(),attributeKey:e,attributeOldValue:null,attributeNewValue:t.getAttribute(e)};if(this.conversionApi.consumable.test(t,"attribute:"+i.attributeKey)){this.fire("attribute:"+i.attributeKey+":$text",i,this.conversionApi)}}this._clearConversionApi()}convertMarkerAdd(t,e,i){if(!e.root.document||e.root.rootName=="$graveyard"){return}this.conversionApi.writer=i;const n="addMarker:"+t;const o=new Gh;o.add(e,n);this.conversionApi.consumable=o;this.fire(n,{markerName:t,markerRange:e},this.conversionApi);if(!o.test(e,n)){return}this.conversionApi.consumable=this._createConsumableForRange(e,n);for(const i of e.getItems()){if(!this.conversionApi.consumable.test(i,n)){continue}const o={item:i,range:$h._createOn(i),markerName:t,markerRange:e};this.fire(n,o,this.conversionApi)}this._clearConversionApi()}convertMarkerRemove(t,e,i){if(!e.root.document||e.root.rootName=="$graveyard"){return}this.conversionApi.writer=i;this.fire("removeMarker:"+t,{markerName:t,markerRange:e},this.conversionApi);this._clearConversionApi()}_createInsertConsumable(t){const e=new Gh;for(const i of t){const t=i.item;e.add(t,"insert");for(const i of t.getAttributeKeys()){e.add(t,"attribute:"+i)}}return e}_createConsumableForRange(t,e){const i=new Gh;for(const n of t.getItems()){i.add(n,e)}return i}_createSelectionConsumable(t,e){const i=new Gh;i.add(t,"selection");for(const n of e){i.add(t,"addMarker:"+n.name)}for(const e of t.getAttributeKeys()){i.add(t,"attribute:"+e)}return i}_testAndFire(t,e){if(!this.conversionApi.consumable.test(e.item,t)){return}const i=e.item.name||"$text";this.fire(t+":"+i,e,this.conversionApi)}_clearConversionApi(){delete this.conversionApi.writer;delete this.conversionApi.consumable}}vs(Xh,ds);function Qh(t,e,i){const n=e.getRange();const o=Array.from(t.getAncestors());o.shift();o.reverse();const r=o.some(t=>{if(n.containsItem(t)){const e=i.toViewElement(t);return!!e.getCustomProperty("addHighlight")}});return!r}class Kh{constructor(t,e,i){this._lastRangeBackward=false;this._ranges=[];this._attrs=new Map;if(t){this.setTo(t,e,i)}}get anchor(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.end:t.start}return null}get focus(){if(this._ranges.length>0){const t=this._ranges[this._ranges.length-1];return this._lastRangeBackward?t.start:t.end}return null}get isCollapsed(){const t=this._ranges.length;if(t===1){return this._ranges[0].isCollapsed}else{return false}}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}isEqual(t){if(this.rangeCount!=t.rangeCount){return false}else if(this.rangeCount===0){return true}if(!this.anchor.isEqual(t.anchor)||!this.focus.isEqual(t.focus)){return false}for(const e of this._ranges){let i=false;for(const n of t._ranges){if(e.isEqual(n)){i=true;break}}if(!i){return false}}return true}*getRanges(){for(const t of this._ranges){yield new $h(t.start,t.end)}}getFirstRange(){let t=null;for(const e of this._ranges){if(!t||e.start.isBefore(t.start)){t=e}}return t?new $h(t.start,t.end):null}getLastRange(){let t=null;for(const e of this._ranges){if(!t||e.end.isAfter(t.end)){t=e}}return t?new $h(t.start,t.end):null}getFirstPosition(){const t=this.getFirstRange();return t?t.start.clone():null}getLastPosition(){const t=this.getLastRange();return t?t.end.clone():null}setTo(t,e,i){if(t===null){this._setRanges([])}else if(t instanceof Kh){this._setRanges(t.getRanges(),t.isBackward)}else if(t&&typeof t.getRanges=="function"){this._setRanges(t.getRanges(),t.isBackward)}else if(t instanceof $h){this._setRanges([t],!!e&&!!e.backward)}else if(t instanceof qh){this._setRanges([new $h(t)])}else if(t instanceof jh){const n=!!i&&!!i.backward;let o;if(e=="in"){o=$h._createIn(t)}else if(e=="on"){o=$h._createOn(t)}else if(e!==undefined){o=new $h(qh._createAt(t,e))}else{throw new ss["b"]("model-selection-setTo-required-second-parameter: "+"selection.setTo requires the second parameter when the first parameter is a node.",[this,t])}this._setRanges([o],n)}else if(Fs(t)){this._setRanges(t,e&&!!e.backward)}else{throw new ss["b"]("model-selection-setTo-not-selectable: Cannot set the selection to the given place.",[this,t])}}_setRanges(t,e=false){t=Array.from(t);const i=t.some(e=>{if(!(e instanceof $h)){throw new ss["b"]("model-selection-set-ranges-not-range: "+"Selection range set to an object that is not an instance of model.Range.",[this,t])}return this._ranges.every(t=>!t.isEqual(e))});if(t.length===this._ranges.length&&!i){return}this._removeAllRanges();for(const e of t){this._pushRange(e)}this._lastRangeBackward=!!e;this.fire("change:range",{directChange:true})}setFocus(t,e){if(this.anchor===null){throw new ss["b"]("model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.",[this,t])}const i=qh._createAt(t,e);if(i.compareWith(this.focus)=="same"){return}const n=this.anchor;if(this._ranges.length){this._popRange()}if(i.compareWith(n)=="before"){this._pushRange(new $h(i,n));this._lastRangeBackward=true}else{this._pushRange(new $h(n,i));this._lastRangeBackward=false}this.fire("change:range",{directChange:true})}getAttribute(t){return this._attrs.get(t)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(t){return this._attrs.has(t)}removeAttribute(t){if(this.hasAttribute(t)){this._attrs.delete(t);this.fire("change:attribute",{attributeKeys:[t],directChange:true})}}setAttribute(t,e){if(this.getAttribute(t)!==e){this._attrs.set(t,e);this.fire("change:attribute",{attributeKeys:[t],directChange:true})}}getSelectedElement(){if(this.rangeCount!==1){return null}return this.getFirstRange().getContainedElement()}is(t){return t=="selection"||t=="model:selection"}*getSelectedBlocks(){const t=new WeakSet;for(const e of this.getRanges()){const i=ef(e.start,t);if(i&&nf(i,e)){yield i}for(const i of e.getWalker()){const n=i.item;if(i.type=="elementEnd"&&tf(n,t,e)){yield n}}const n=ef(e.end,t);if(n&&!e.end.isTouching(qh._createAt(n,0))&&nf(n,e)){yield n}}}containsEntireContent(t=this.anchor.root){const e=qh._createAt(t,0);const i=qh._createAt(t,"end");return e.isTouching(this.getFirstPosition())&&i.isTouching(this.getLastPosition())}_pushRange(t){this._checkRange(t);this._ranges.push(new $h(t.start,t.end))}_checkRange(t){for(let e=0;e0){this._popRange()}}_popRange(){this._ranges.pop()}}vs(Kh,ds);function Zh(t,e){if(e.has(t)){return false}e.add(t);return t.root.document.model.schema.isBlock(t)&&t.parent}function tf(t,e,i){return Zh(t,e)&&nf(t,i)}function ef(t,e){const i=t.parent;const n=i.root.document.model.schema;const o=t.parent.getAncestors({parentFirst:true,includeSelf:true});let r=false;const s=o.find(t=>{if(r){return false}r=n.isLimit(t);return!r&&Zh(t,e)});o.forEach(t=>e.add(t));return s}function nf(t,e){const i=of(t);if(!i){return true}const n=e.containsRange($h._createOn(i),true);return!n}function of(t){const e=t.root.document.model.schema;let i=t.parent;while(i){if(e.isBlock(i)){return i}i=i.parent}}class rf extends $h{constructor(t,e){super(t,e);sf.call(this)}detach(){this.stopListening()}is(t){return t=="liveRange"||t=="model:liveRange"||super.is(t)}toRange(){return new $h(this.start,this.end)}static fromRange(t){return new rf(t.start,t.end)}}function sf(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const i=e[0];if(!i.isDocumentOperation){return}af.call(this,i)},{priority:"low"})}function af(t){const e=this.getTransformedByOperation(t);const i=$h._createFromRanges(e);const n=!i.isEqual(this);const o=cf(this,t);let r=null;if(n){if(i.root.rootName=="$graveyard"){if(t.type=="remove"){r=t.sourcePosition}else{r=t.deletionPosition}}const e=this.toRange();this.start=i.start;this.end=i.end;this.fire("change:range",e,{deletionPosition:r})}else if(o){this.fire("change:content",this.toRange(),{deletionPosition:r})}}function cf(t,e){switch(e.type){case"insert":return t.containsPosition(e.position);case"move":case"remove":case"reinsert":case"merge":return t.containsPosition(e.sourcePosition)||t.start.isEqual(e.sourcePosition)||t.containsPosition(e.targetPosition);case"split":return t.containsPosition(e.splitPosition)||t.containsPosition(e.insertionPosition)}return false}vs(rf,ds);const lf="selection:";class df{constructor(t){this._selection=new uf(t);this._selection.delegate("change:range").to(this);this._selection.delegate("change:attribute").to(this);this._selection.delegate("change:marker").to(this)}get isCollapsed(){return this._selection.isCollapsed}get anchor(){return this._selection.anchor}get focus(){return this._selection.focus}get rangeCount(){return this._selection.rangeCount}get hasOwnRange(){return this._selection.hasOwnRange}get isBackward(){return this._selection.isBackward}get isGravityOverridden(){return this._selection.isGravityOverridden}get markers(){return this._selection.markers}get _ranges(){return this._selection._ranges}getRanges(){return this._selection.getRanges()}getFirstPosition(){return this._selection.getFirstPosition()}getLastPosition(){return this._selection.getLastPosition()}getFirstRange(){return this._selection.getFirstRange()}getLastRange(){return this._selection.getLastRange()}getSelectedBlocks(){return this._selection.getSelectedBlocks()}getSelectedElement(){return this._selection.getSelectedElement()}containsEntireContent(t){return this._selection.containsEntireContent(t)}destroy(){this._selection.destroy()}getAttributeKeys(){return this._selection.getAttributeKeys()}getAttributes(){return this._selection.getAttributes()}getAttribute(t){return this._selection.getAttribute(t)}hasAttribute(t){return this._selection.hasAttribute(t)}refresh(){this._selection._updateMarkers();this._selection._updateAttributes(false)}is(t){return t=="selection"||t=="model:selection"||t=="documentSelection"||t=="model:documentSelection"}_setFocus(t,e){this._selection.setFocus(t,e)}_setTo(t,e,i){this._selection.setTo(t,e,i)}_setAttribute(t,e){this._selection.setAttribute(t,e)}_removeAttribute(t){this._selection.removeAttribute(t)}_getStoredAttributes(){return this._selection._getStoredAttributes()}_overrideGravity(){return this._selection.overrideGravity()}_restoreGravity(t){this._selection.restoreGravity(t)}static _getStoreAttributeKey(t){return lf+t}static _isStoreAttributeKey(t){return t.startsWith(lf)}}vs(df,ds);class uf extends Kh{constructor(t){super();this.markers=new ys({idProperty:"name"});this._model=t.model;this._document=t;this._attributePriority=new Map;this._fixGraveyardRangesData=[];this._hasChangedRange=false;this._overriddenGravityRegister=new Set;this.listenTo(this._model,"applyOperation",(t,e)=>{const i=e[0];if(!i.isDocumentOperation||i.type=="marker"||i.type=="rename"||i.type=="noop"){return}while(this._fixGraveyardRangesData.length){const{liveRange:t,sourcePosition:e}=this._fixGraveyardRangesData.shift();this._fixGraveyardSelection(t,e)}if(this._hasChangedRange){this._hasChangedRange=false;this.fire("change:range",{directChange:false})}},{priority:"lowest"});this.on("change:range",()=>{for(const t of this.getRanges()){if(!this._document._validateSelectionRange(t)){throw new ss["b"]("document-selection-wrong-position: Range from document selection starts or ends at incorrect position.",this,{range:t})}}});this.listenTo(this._model.markers,"update",()=>this._updateMarkers());this.listenTo(this._document,"change",(t,e)=>{ff(this._model,e)})}get isCollapsed(){const t=this._ranges.length;return t===0?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 t=0;t{this._hasChangedRange=true;if(e.root==this._document.graveyard){this._fixGraveyardRangesData.push({liveRange:e,sourcePosition:n.deletionPosition})}});return e}_updateMarkers(){const t=[];let e=false;for(const e of this._model.markers){const i=e.getRange();for(const n of this.getRanges()){if(i.containsRange(n,!n.isCollapsed)){t.push(e)}}}const i=Array.from(this.markers);for(const i of t){if(!this.markers.has(i)){this.markers.add(i);e=true}}for(const i of Array.from(this.markers)){if(!t.includes(i)){this.markers.remove(i);e=true}}if(e){this.fire("change:marker",{oldMarkers:i,directChange:false})}}_updateAttributes(t){const e=Hs(this._getSurroundingAttributes());const i=Hs(this.getAttributes());if(t){this._attributePriority=new Map;this._attrs=new Map}else{for(const[t,e]of this._attributePriority){if(e=="low"){this._attrs.delete(t);this._attributePriority.delete(t)}}}this._setAttributesTo(e);const n=[];for(const[t,e]of this.getAttributes()){if(!i.has(t)||i.get(t)!==e){n.push(t)}}for(const[t]of i){if(!this.hasAttribute(t)){n.push(t)}}if(n.length>0){this.fire("change:attribute",{attributeKeys:n,directChange:false})}}_setAttribute(t,e,i=true){const n=i?"normal":"low";if(n=="low"&&this._attributePriority.get(t)=="normal"){return false}const o=super.getAttribute(t);if(o===e){return false}this._attrs.set(t,e);this._attributePriority.set(t,n);return true}_removeAttribute(t,e=true){const i=e?"normal":"low";if(i=="low"&&this._attributePriority.get(t)=="normal"){return false}this._attributePriority.set(t,i);if(!super.hasAttribute(t)){return false}this._attrs.delete(t);return true}_setAttributesTo(t){const e=new Set;for(const[e,i]of this.getAttributes()){if(t.get(e)===i){continue}this._removeAttribute(e,false)}for(const[i,n]of t){const t=this._setAttribute(i,n,false);if(t){e.add(i)}}return e}*_getStoredAttributes(){const t=this.getFirstPosition().parent;if(this.isCollapsed&&t.isEmpty){for(const e of t.getAttributeKeys()){if(e.startsWith(lf)){const i=e.substr(lf.length);yield[i,t.getAttribute(e)]}}}}_getSurroundingAttributes(){const t=this.getFirstPosition();const e=this._model.schema;let i=null;if(!this.isCollapsed){const t=this.getFirstRange();for(const n of t){if(n.item.is("element")&&e.isObject(n.item)){break}if(n.type=="text"){i=n.item.getAttributes();break}}}else{const e=t.textNode?t.textNode:t.nodeBefore;const n=t.textNode?t.textNode:t.nodeAfter;if(!this.isGravityOverridden){i=hf(e)}if(!i){i=hf(n)}if(!this.isGravityOverridden&&!i){let t=e;while(t&&!i){t=t.previousSibling;i=hf(t)}}if(!i){let t=n;while(t&&!i){t=t.nextSibling;i=hf(t)}}if(!i){i=this._getStoredAttributes()}}return i}_fixGraveyardSelection(t,e){const i=e.clone();const n=this._model.schema.getNearestSelectionRange(i);const o=this._ranges.indexOf(t);this._ranges.splice(o,1);t.detach();if(n){const t=this._prepareRange(n);this._ranges.splice(o,0,t)}}}function hf(t){if(t instanceof Bh||t instanceof Dh){return t.getAttributes()}return null}function ff(t,e){const i=t.document.differ;for(const n of i.getChanges()){if(n.type!="insert"){continue}const i=n.position.parent;const o=n.length===i.maxOffset;if(o){t.enqueueChange(e,t=>{const e=Array.from(i.getAttributeKeys()).filter(t=>t.startsWith(lf));for(const n of e){t.removeAttribute(n,i)}})}}}class mf{constructor(t){this._dispatchers=t}add(t){for(const e of this._dispatchers){t(e)}return this}}var gf=1,pf=4;function bf(t){return Hr(t,gf|pf)}var wf=bf;class _f extends mf{elementToElement(t){return this.add(Lf(t))}attributeToElement(t){return this.add(zf(t))}attributeToAttribute(t){return this.add(Rf(t))}markerToElement(t){return this.add(jf(t))}markerToHighlight(t){return this.add(Df(t))}}function kf(){return(t,e,i)=>{if(!i.consumable.consume(e.item,"insert")){return}const n=i.writer;const o=i.mapper.toViewPosition(e.range.start);const r=n.createText(e.item.data);n.insert(o,r)}}function vf(){return(t,e,i)=>{const n=i.mapper.toViewPosition(e.position);const o=e.position.getShiftedBy(e.length);const r=i.mapper.toViewPosition(o,{isPhantom:true});const s=i.writer.createRange(n,r);const a=i.writer.remove(s.getTrimmed());for(const t of i.writer.createRangeIn(a).getItems()){i.mapper.unbindViewElement(t)}}}function yf(t,e){const i=t.createAttributeElement("span",e.attributes);if(e.classes){i._addClass(e.classes)}if(e.priority){i._priority=e.priority}i._id=e.id;return i}function xf(){return(t,e,i)=>{const n=e.selection;if(n.isCollapsed){return}if(!i.consumable.consume(n,"selection")){return}const o=[];for(const t of n.getRanges()){const e=i.mapper.toViewRange(t);o.push(e)}i.writer.setSelection(o,{backward:n.isBackward})}}function Af(){return(t,e,i)=>{const n=e.selection;if(!n.isCollapsed){return}if(!i.consumable.consume(n,"selection")){return}const o=i.writer;const r=n.getFirstPosition();const s=i.mapper.toViewPosition(r);const a=o.breakAttributes(s);o.setSelection(a)}}function Cf(){return(t,e,i)=>{const n=i.writer;const o=n.document.selection;for(const t of o.getRanges()){if(t.isCollapsed){if(t.end.parent.isAttached()){i.writer.mergeAttributes(t.start)}}}n.setSelection(null)}}function Tf(t){return(e,i,n)=>{const o=t(i.attributeOldValue,n.writer);const r=t(i.attributeNewValue,n.writer);if(!o&&!r){return}if(!n.consumable.consume(i.item,e.name)){return}const s=n.writer;const a=s.document.selection;if(i.item instanceof Kh||i.item instanceof df){s.wrap(a.getFirstRange(),r)}else{let t=n.mapper.toViewRange(i.range);if(i.attributeOldValue!==null&&o){t=s.unwrap(t,o)}if(i.attributeNewValue!==null&&r){s.wrap(t,r)}}}}function Ef(t){return(e,i,n)=>{const o=t(i.item,n.writer);if(!o){return}if(!n.consumable.consume(i.item,"insert")){return}const r=n.mapper.toViewPosition(i.range.start);n.mapper.bindElements(i.item,o);n.writer.insert(r,o)}}function Mf(t){return(e,i,n)=>{i.isOpening=true;const o=t(i,n.writer);i.isOpening=false;const r=t(i,n.writer);if(!o||!r){return}const s=i.markerRange;if(s.isCollapsed&&!n.consumable.consume(s,e.name)){return}for(const t of s){if(!n.consumable.consume(t.item,e.name)){return}}const a=n.mapper;const c=n.writer;c.insert(a.toViewPosition(s.start),o);n.mapper.bindElementToMarker(o,i.markerName);if(!s.isCollapsed){c.insert(a.toViewPosition(s.end),r);n.mapper.bindElementToMarker(r,i.markerName)}e.stop()}}function Pf(){return(t,e,i)=>{const n=i.mapper.markerNameToElements(e.markerName);if(!n){return}for(const t of n){i.mapper.unbindElementFromMarkerName(t,e.markerName);i.writer.clear(i.writer.createRangeOn(t),t)}i.writer.clearClonedElementsGroup(e.markerName);t.stop()}}function Sf(t){return(e,i,n)=>{const o=t(i.attributeOldValue,i);const r=t(i.attributeNewValue,i);if(!o&&!r){return}if(!n.consumable.consume(i.item,e.name)){return}const s=n.mapper.toViewElement(i.item);const a=n.writer;if(!s){throw new ss["b"]("conversion-attribute-to-attribute-on-text: "+"Trying to convert text node's attribute with attribute-to-attribute converter.",[i,n])}if(i.attributeOldValue!==null&&o){if(o.key=="class"){const t=Array.isArray(o.value)?o.value:[o.value];for(const e of t){a.removeClass(e,s)}}else if(o.key=="style"){const t=Object.keys(o.value);for(const e of t){a.removeStyle(e,s)}}else{a.removeAttribute(o.key,s)}}if(i.attributeNewValue!==null&&r){if(r.key=="class"){const t=Array.isArray(r.value)?r.value:[r.value];for(const e of t){a.addClass(e,s)}}else if(r.key=="style"){const t=Object.keys(r.value);for(const e of t){a.setStyle(e,r.value[e],s)}}else{a.setAttribute(r.key,r.value,s)}}}}function If(t){return(e,i,n)=>{if(!i.item){return}if(!(i.item instanceof Kh||i.item instanceof df)&&!i.item.is("textProxy")){return}const o=Wf(t,i,n);if(!o){return}if(!n.consumable.consume(i.item,e.name)){return}const r=n.writer;const s=yf(r,o);const a=r.document.selection;if(i.item instanceof Kh||i.item instanceof df){r.wrap(a.getFirstRange(),s,a)}else{const t=n.mapper.toViewRange(i.range);const e=r.wrap(t,s);for(const t of e.getItems()){if(t.is("attributeElement")&&t.isSimilar(s)){n.mapper.bindElementToMarker(t,i.markerName);break}}}}}function Nf(t){return(e,i,n)=>{if(!i.item){return}if(!(i.item instanceof Fh)){return}const o=Wf(t,i,n);if(!o){return}if(!n.consumable.test(i.item,e.name)){return}const r=n.mapper.toViewElement(i.item);if(r&&r.getCustomProperty("addHighlight")){n.consumable.consume(i.item,e.name);for(const t of $h._createIn(i.item)){n.consumable.consume(t.item,e.name)}r.getCustomProperty("addHighlight")(r,o,n.writer);n.mapper.bindElementToMarker(r,i.markerName)}}}function Of(t){return(e,i,n)=>{if(i.markerRange.isCollapsed){return}const o=Wf(t,i,n);if(!o){return}const r=yf(n.writer,o);const s=n.mapper.markerNameToElements(i.markerName);if(!s){return}for(const t of s){n.mapper.unbindElementFromMarkerName(t,i.markerName);if(t.is("attributeElement")){n.writer.unwrap(n.writer.createRangeOn(t),r)}else{t.getCustomProperty("removeHighlight")(t,o.id,n.writer)}}n.writer.clearClonedElementsGroup(i.markerName);e.stop()}}function Lf(t){t=wf(t);t.view=Bf(t.view,"container");return e=>{e.on("insert:"+t.model,Ef(t.view),{priority:t.converterPriority||"normal"})}}function zf(t){t=wf(t);const e=t.model.key?t.model.key:t.model;let i="attribute:"+e;if(t.model.name){i+=":"+t.model.name}if(t.model.values){for(const e of t.model.values){t.view[e]=Bf(t.view[e],"attribute")}}else{t.view=Bf(t.view,"attribute")}const n=Ff(t);return e=>{e.on(i,Tf(n),{priority:t.converterPriority||"normal"})}}function Rf(t){t=wf(t);const e=t.model.key?t.model.key:t.model;let i="attribute:"+e;if(t.model.name){i+=":"+t.model.name}if(t.model.values){for(const e of t.model.values){t.view[e]=Hf(t.view[e])}}else{t.view=Hf(t.view)}const n=Ff(t);return e=>{e.on(i,Sf(n),{priority:t.converterPriority||"normal"})}}function jf(t){t=wf(t);t.view=Bf(t.view,"ui");return e=>{e.on("addMarker:"+t.model,Mf(t.view),{priority:t.converterPriority||"normal"});e.on("removeMarker:"+t.model,Pf(t.view),{priority:t.converterPriority||"normal"})}}function Df(t){return e=>{e.on("addMarker:"+t.model,If(t.view),{priority:t.converterPriority||"normal"});e.on("addMarker:"+t.model,Nf(t.view),{priority:t.converterPriority||"normal"});e.on("removeMarker:"+t.model,Of(t.view),{priority:t.converterPriority||"normal"})}}function Bf(t,e){if(typeof t=="function"){return t}return(i,n)=>Vf(t,n,e)}function Vf(t,e,i){if(typeof t=="string"){t={name:t}}let n;const o=Object.assign({},t.attributes);if(i=="container"){n=e.createContainerElement(t.name,o)}else if(i=="attribute"){const i={priority:t.priority||wl.DEFAULT_PRIORITY};n=e.createAttributeElement(t.name,o,i)}else{n=e.createUIElement(t.name,o)}if(t.styles){const i=Object.keys(t.styles);for(const o of i){e.setStyle(o,t.styles[o],n)}}if(t.classes){const i=t.classes;if(typeof i=="string"){e.addClass(i,n)}else{for(const t of i){e.addClass(t,n)}}}return n}function Ff(t){if(t.model.values){return(e,i)=>{const n=t.view[e];if(n){return n(e,i)}return null}}else{return t.view}}function Hf(t){if(typeof t=="string"){return e=>({key:t,value:e})}else if(typeof t=="object"){if(t.value){return()=>t}else{return e=>({key:t.key,value:e})}}else{return t}}function Wf(t,e,i){const n=typeof t=="function"?t(e,i):t;if(!n){return null}if(!n.priority){n.priority=10}if(!n.id){n.id=e.markerName}return n}class Uf extends mf{elementToElement(t){return this.add(Gf(t))}elementToAttribute(t){return this.add(Jf(t))}attributeToAttribute(t){return this.add(Xf(t))}elementToMarker(t){return this.add(Qf(t))}}function qf(){return(t,e,i)=>{if(!e.modelRange&&i.consumable.consume(e.viewItem,{name:true})){const{modelRange:t,modelCursor:n}=i.convertChildren(e.viewItem,e.modelCursor);e.modelRange=t;e.modelCursor=n}}}function $f(){return(t,e,i)=>{if(i.schema.checkChild(e.modelCursor,"$text")){if(i.consumable.consume(e.viewItem)){const t=i.writer.createText(e.viewItem.data);i.writer.insert(t,e.modelCursor);e.modelRange=$h._createFromPositionAndShift(e.modelCursor,t.offsetSize);e.modelCursor=e.modelRange.end}}}}function Yf(t,e){return(i,n)=>{const o=n.newSelection;const r=new Kh;const s=[];for(const t of o.getRanges()){s.push(e.toModelRange(t))}r.setTo(s,{backward:o.isBackward});if(!r.isEqual(t.document.selection)){t.change(t=>{t.setSelection(r)})}}}function Gf(t){t=wf(t);const e=Zf(t);const i=Kf(t.view);const n=i?"element:"+i:"element";return i=>{i.on(n,e,{priority:t.converterPriority||"normal"})}}function Jf(t){t=wf(t);im(t);const e=nm(t,false);const i=Kf(t.view);const n=i?"element:"+i:"element";return i=>{i.on(n,e,{priority:t.converterPriority||"low"})}}function Xf(t){t=wf(t);let e=null;if(typeof t.view=="string"||t.view.key){e=em(t)}im(t,e);const i=nm(t,true);return e=>{e.on("element",i,{priority:t.converterPriority||"low"})}}function Qf(t){t=wf(t);sm(t);return Gf(t)}function Kf(t){if(typeof t=="string"){return t}if(typeof t=="object"&&typeof t.name=="string"){return t.name}return null}function Zf(t){const e=t.view?new Ws(t.view):null;return(i,n,o)=>{let r={};if(e){const t=e.match(n.viewItem);if(!t){return}r=t.match}r.name=true;const s=tm(t.model,n.viewItem,o.writer);if(!s){return}if(!o.consumable.test(n.viewItem,r)){return}const a=o.splitToAllowedParent(s,n.modelCursor);if(!a){return}o.writer.insert(s,a.position);o.convertChildren(n.viewItem,o.writer.createPositionAt(s,0));o.consumable.consume(n.viewItem,r);const c=o.getSplitParts(s);n.modelRange=new $h(o.writer.createPositionBefore(s),o.writer.createPositionAfter(c[c.length-1]));if(a.cursorParent){n.modelCursor=o.writer.createPositionAt(a.cursorParent,0)}else{n.modelCursor=n.modelRange.end}}}function tm(t,e,i){if(t instanceof Function){return t(e,i)}else{return i.createElement(t)}}function em(t){if(typeof t.view=="string"){t.view={key:t.view}}const e=t.view.key;let i;if(e=="class"||e=="style"){const n=e=="class"?"classes":"styles";i={[n]:t.view.value}}else{const n=typeof t.view.value=="undefined"?/[\s\S]*/:t.view.value;i={attributes:{[e]:n}}}if(t.view.name){i.name=t.view.name}t.view=i;return e}function im(t,e=null){const i=e===null?true:t=>t.getAttribute(e);const n=typeof t.model!="object"?t.model:t.model.key;const o=typeof t.model!="object"||typeof t.model.value=="undefined"?i:t.model.value;t.model={key:n,value:o}}function nm(t,e){const i=new Ws(t.view);return(n,o,r)=>{const s=i.match(o.viewItem);if(!s){return}const a=t.model.key;const c=typeof t.model.value=="function"?t.model.value(o.viewItem):t.model.value;if(c===null){return}if(om(t.view,o.viewItem)){s.match.name=true}else{delete s.match.name}if(!r.consumable.test(o.viewItem,s.match)){return}if(!o.modelRange){o=Object.assign(o,r.convertChildren(o.viewItem,o.modelCursor))}const l=rm(o.modelRange,{key:a,value:c},e,r);if(l){r.consumable.consume(o.viewItem,s.match)}}}function om(t,e){const i=typeof t=="function"?t(e):t;if(typeof i=="object"&&!Kf(i)){return false}return!i.classes&&!i.attributes&&!i.styles}function rm(t,e,i,n){let o=false;for(const r of Array.from(t.getItems({shallow:i}))){if(n.schema.checkAttribute(r,e.key)){n.writer.setAttribute(e.key,e.value,r);o=true}}return o}function sm(t){const e=t.model;t.model=(t,i)=>{const n=typeof e=="string"?e:e(t);return i.createElement("$marker",{"data-name":n})}}class am{constructor(t,e){this.model=t;this.view=new Rh(e);this.mapper=new Yh;this.downcastDispatcher=new Xh({mapper:this.mapper});const i=this.model.document;const n=i.selection;const o=this.model.markers;this.listenTo(this.model,"_beforeChanges",()=>{this.view._disableRendering(true)},{priority:"highest"});this.listenTo(this.model,"_afterChanges",()=>{this.view._disableRendering(false)},{priority:"lowest"});this.listenTo(i,"change",()=>{this.view.change(t=>{this.downcastDispatcher.convertChanges(i.differ,o,t);this.downcastDispatcher.convertSelection(n,o,t)})},{priority:"low"});this.listenTo(this.view.document,"selectionChange",Yf(this.model,this.mapper));this.downcastDispatcher.on("insert:$text",kf(),{priority:"lowest"});this.downcastDispatcher.on("remove",vf(),{priority:"low"});this.downcastDispatcher.on("selection",Cf(),{priority:"low"});this.downcastDispatcher.on("selection",xf(),{priority:"low"});this.downcastDispatcher.on("selection",Af(),{priority:"low"});this.view.document.roots.bindTo(this.model.document.roots).using(t=>{if(t.rootName=="$graveyard"){return null}const e=new cl(this.view.document,t.name);e.rootName=t.rootName;this.mapper.bindElements(t,e);return e})}destroy(){this.view.destroy();this.stopListening()}}vs(am,Jc);class cm{constructor(){this._commands=new Map}add(t,e){this._commands.set(t,e)}get(t){return this._commands.get(t)}execute(t,...e){const i=this.get(t);if(!i){throw new ss["b"]("commandcollection-command-not-found: Command does not exist.",this,{commandName:t})}i.execute(...e)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const t of this.commands()){t.destroy()}}}class lm{constructor(){this._consumables=new Map}add(t,e){let i;if(t.is("text")||t.is("documentFragment")){this._consumables.set(t,true);return}if(!this._consumables.has(t)){i=new dm(t);this._consumables.set(t,i)}else{i=this._consumables.get(t)}i.add(e)}test(t,e){const i=this._consumables.get(t);if(i===undefined){return null}if(t.is("text")||t.is("documentFragment")){return i}return i.test(e)}consume(t,e){if(this.test(t,e)){if(t.is("text")||t.is("documentFragment")){this._consumables.set(t,false)}else{this._consumables.get(t).consume(e)}return true}return false}revert(t,e){const i=this._consumables.get(t);if(i!==undefined){if(t.is("text")||t.is("documentFragment")){this._consumables.set(t,true)}else{i.revert(e)}}}static consumablesFromElement(t){const e={element:t,name:true,attributes:[],classes:[],styles:[]};const i=t.getAttributeKeys();for(const t of i){if(t=="style"||t=="class"){continue}e.attributes.push(t)}const n=t.getClassNames();for(const t of n){e.classes.push(t)}const o=t.getStyleNames();for(const t of o){e.styles.push(t)}return e}static createFrom(t,e){if(!e){e=new lm(t)}if(t.is("text")){e.add(t);return e}if(t.is("element")){e.add(t,lm.consumablesFromElement(t))}if(t.is("documentFragment")){e.add(t)}for(const i of t.getChildren()){e=lm.createFrom(i,e)}return e}}class dm{constructor(t){this.element=t;this._canConsumeName=null;this._consumables={attributes:new Map,styles:new Map,classes:new Map}}add(t){if(t.name){this._canConsumeName=true}for(const e in this._consumables){if(e in t){this._add(e,t[e])}}}test(t){if(t.name&&!this._canConsumeName){return this._canConsumeName}for(const e in this._consumables){if(e in t){const i=this._test(e,t[e]);if(i!==true){return i}}}return true}consume(t){if(t.name){this._canConsumeName=false}for(const e in this._consumables){if(e in t){this._consume(e,t[e])}}}revert(t){if(t.name){this._canConsumeName=true}for(const e in this._consumables){if(e in t){this._revert(e,t[e])}}}_add(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t==="attributes"&&(e==="class"||e==="style")){throw new ss["b"]("viewconsumable-invalid-attribute: Classes and styles should be handled separately.",this)}n.set(e,true);if(t==="styles"){for(const t of this.element.document.stylesProcessor.getRelatedStyles(e)){n.set(t,true)}}}}_test(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t==="attributes"&&(e==="class"||e==="style")){const t=e=="class"?"classes":"styles";const i=this._test(t,[...this._consumables[t].keys()]);if(i!==true){return i}}else{const t=n.get(e);if(t===undefined){return null}if(!t){return false}}}return true}_consume(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t==="attributes"&&(e==="class"||e==="style")){const t=e=="class"?"classes":"styles";this._consume(t,[...this._consumables[t].keys()])}else{n.set(e,false);if(t=="styles"){for(const t of this.element.document.stylesProcessor.getRelatedStyles(e)){n.set(t,false)}}}}}_revert(t,e){const i=Je(e)?e:[e];const n=this._consumables[t];for(const e of i){if(t==="attributes"&&(e==="class"||e==="style")){const t=e=="class"?"classes":"styles";this._revert(t,[...this._consumables[t].keys()])}else{const t=n.get(e);if(t===false){n.set(e,true)}}}}}class um{constructor(){this._sourceDefinitions={};this._attributeProperties={};this.decorate("checkChild");this.decorate("checkAttribute");this.on("checkAttribute",(t,e)=>{e[0]=new hm(e[0])},{priority:"highest"});this.on("checkChild",(t,e)=>{e[0]=new hm(e[0]);e[1]=this.getDefinition(e[1])},{priority:"highest"})}register(t,e){if(this._sourceDefinitions[t]){throw new ss["b"]("schema-cannot-register-item-twice: A single item cannot be registered twice in the schema.",this,{itemName:t})}this._sourceDefinitions[t]=[Object.assign({},e)];this._clearCache()}extend(t,e){if(!this._sourceDefinitions[t]){throw new ss["b"]("schema-cannot-extend-missing-item: Cannot extend an item which was not registered yet.",this,{itemName:t})}this._sourceDefinitions[t].push(Object.assign({},e));this._clearCache()}getDefinitions(){if(!this._compiledDefinitions){this._compile()}return this._compiledDefinitions}getDefinition(t){let e;if(typeof t=="string"){e=t}else if(t.is&&(t.is("text")||t.is("textProxy"))){e="$text"}else{e=t.name}return this.getDefinitions()[e]}isRegistered(t){return!!this.getDefinition(t)}isBlock(t){const e=this.getDefinition(t);return!!(e&&e.isBlock)}isLimit(t){const e=this.getDefinition(t);if(!e){return false}return!!(e.isLimit||e.isObject)}isObject(t){const e=this.getDefinition(t);return!!(e&&e.isObject)}isInline(t){const e=this.getDefinition(t);return!!(e&&e.isInline)}checkChild(t,e){if(!e){return false}return this._checkContextMatch(e,t)}checkAttribute(t,e){const i=this.getDefinition(t.last);if(!i){return false}return i.allowAttributes.includes(e)}checkMerge(t,e=null){if(t instanceof qh){const e=t.nodeBefore;const i=t.nodeAfter;if(!(e instanceof Fh)){throw new ss["b"]("schema-check-merge-no-element-before: The node before the merge position must be an element.",this)}if(!(i instanceof Fh)){throw new ss["b"]("schema-check-merge-no-element-after: The node after the merge position must be an element.",this)}return this.checkMerge(e,i)}for(const i of e.getChildren()){if(!this.checkChild(t,i)){return false}}return true}addChildCheck(t){this.on("checkChild",(e,[i,n])=>{if(!n){return}const o=t(i,n);if(typeof o=="boolean"){e.stop();e.return=o}},{priority:"high"})}addAttributeCheck(t){this.on("checkAttribute",(e,[i,n])=>{const o=t(i,n);if(typeof o=="boolean"){e.stop();e.return=o}},{priority:"high"})}setAttributeProperties(t,e){this._attributeProperties[t]=Object.assign(this.getAttributeProperties(t),e)}getAttributeProperties(t){return this._attributeProperties[t]||{}}getLimitElement(t){let e;if(t instanceof qh){e=t.parent}else{const i=t instanceof $h?[t]:Array.from(t.getRanges());e=i.reduce((t,e)=>{const i=e.getCommonAncestor();if(!t){return i}return t.getCommonAncestor(i,{includeSelf:true})},null)}while(!this.isLimit(e)){if(e.parent){e=e.parent}else{break}}return e}checkAttributeInSelection(t,e){if(t.isCollapsed){const i=t.getFirstPosition();const n=[...i.getAncestors(),new Dh("",t.getAttributes())];return this.checkAttribute(n,e)}else{const i=t.getRanges();for(const t of i){for(const i of t){if(this.checkAttribute(i.item,e)){return true}}}}return false}*getValidRanges(t,e){t=Em(t);for(const i of t){yield*this._getValidRangesForRange(i,e)}}getNearestSelectionRange(t,e="both"){if(this.checkChild(t,"$text")){return new $h(t)}let i,n;const o=t.getAncestors().reverse().find(t=>this.isLimit(t))||t.root;if(e=="both"||e=="backward"){i=new Wh({boundaries:$h._createIn(o),startPosition:t,direction:"backward"})}if(e=="both"||e=="forward"){n=new Wh({boundaries:$h._createIn(o),startPosition:t})}for(const t of Tm(i,n)){const e=t.walker==i?"elementEnd":"elementStart";const n=t.value;if(n.type==e&&this.isObject(n.item)){return $h._createOn(n.item)}if(this.checkChild(n.nextPosition,"$text")){return new $h(n.nextPosition)}}return null}findAllowedParent(t,e){let i=t.parent;while(i){if(this.checkChild(i,e)){return i}if(this.isLimit(i)){return null}i=i.parent}return null}removeDisallowedAttributes(t,e){for(const i of t){if(i.is("text")){Mm(this,i,e)}else{const t=$h._createIn(i);const n=t.getPositions();for(const t of n){const i=t.nodeBefore||t.parent;Mm(this,i,e)}}}}createContext(t){return new hm(t)}_clearCache(){this._compiledDefinitions=null}_compile(){const t={};const e=this._sourceDefinitions;const i=Object.keys(e);for(const n of i){t[n]=fm(e[n],n)}for(const e of i){mm(t,e)}for(const e of i){gm(t,e)}for(const e of i){pm(t,e);bm(t,e)}for(const e of i){wm(t,e);_m(t,e)}this._compiledDefinitions=t}_checkContextMatch(t,e,i=e.length-1){const n=e.getItem(i);if(t.allowIn.includes(n.name)){if(i==0){return true}else{const t=this.getDefinition(n);return this._checkContextMatch(t,e,i-1)}}else{return false}}*_getValidRangesForRange(t,e){let i=t.start;let n=t.start;for(const o of t.getItems({shallow:true})){if(o.is("element")){yield*this._getValidRangesForRange($h._createIn(o),e)}if(!this.checkAttribute(o,e)){if(!i.isEqual(n)){yield new $h(i,n)}i=qh._createAfter(o)}n=qh._createAfter(o)}if(!i.isEqual(n)){yield new $h(i,n)}}}vs(um,Jc);class hm{constructor(t){if(t instanceof hm){return t}if(typeof t=="string"){t=[t]}else if(!Array.isArray(t)){t=t.getAncestors({includeSelf:true})}if(t[0]&&typeof t[0]!="string"&&t[0].is("documentFragment")){t.shift()}this._items=t.map(Cm)}get length(){return this._items.length}get last(){return this._items[this._items.length-1]}[Symbol.iterator](){return this._items[Symbol.iterator]()}push(t){const e=new hm([t]);e._items=[...this._items,...e._items];return e}getItem(t){return this._items[t]}*getNames(){yield*this._items.map(t=>t.name)}endsWith(t){return Array.from(this.getNames()).join(" ").endsWith(t)}startsWith(t){return Array.from(this.getNames()).join(" ").startsWith(t)}}function fm(t,e){const i={name:e,allowIn:[],allowContentOf:[],allowWhere:[],allowAttributes:[],allowAttributesOf:[],inheritTypesFrom:[]};km(t,i);vm(t,i,"allowIn");vm(t,i,"allowContentOf");vm(t,i,"allowWhere");vm(t,i,"allowAttributes");vm(t,i,"allowAttributesOf");vm(t,i,"inheritTypesFrom");ym(t,i);return i}function mm(t,e){for(const i of t[e].allowContentOf){if(t[i]){const n=xm(t,i);n.forEach(t=>{t.allowIn.push(e)})}}delete t[e].allowContentOf}function gm(t,e){for(const i of t[e].allowWhere){const n=t[i];if(n){const i=n.allowIn;t[e].allowIn.push(...i)}}delete t[e].allowWhere}function pm(t,e){for(const i of t[e].allowAttributesOf){const n=t[i];if(n){const i=n.allowAttributes;t[e].allowAttributes.push(...i)}}delete t[e].allowAttributesOf}function bm(t,e){const i=t[e];for(const e of i.inheritTypesFrom){const n=t[e];if(n){const t=Object.keys(n).filter(t=>t.startsWith("is"));for(const e of t){if(!(e in i)){i[e]=n[e]}}}}delete i.inheritTypesFrom}function wm(t,e){const i=t[e];const n=i.allowIn.filter(e=>t[e]);i.allowIn=Array.from(new Set(n))}function _m(t,e){const i=t[e];i.allowAttributes=Array.from(new Set(i.allowAttributes))}function km(t,e){for(const i of t){const t=Object.keys(i).filter(t=>t.startsWith("is"));for(const n of t){e[n]=i[n]}}}function vm(t,e,i){for(const n of t){if(typeof n[i]=="string"){e[i].push(n[i])}else if(Array.isArray(n[i])){e[i].push(...n[i])}}}function ym(t,e){for(const i of t){const t=i.inheritAllFrom;if(t){e.allowContentOf.push(t);e.allowWhere.push(t);e.allowAttributesOf.push(t);e.inheritTypesFrom.push(t)}}}function xm(t,e){const i=t[e];return Am(t).filter(t=>t.allowIn.includes(i.name))}function Am(t){return Object.keys(t).map(e=>t[e])}function Cm(t){if(typeof t=="string"){return{name:t,*getAttributeKeys(){},getAttribute(){}}}else{return{name:t.is("element")?t.name:"$text",*getAttributeKeys(){yield*t.getAttributeKeys()},getAttribute(e){return t.getAttribute(e)}}}}function*Tm(t,e){let i=false;while(!i){i=true;if(t){const e=t.next();if(!e.done){i=false;yield{walker:t,value:e.value}}}if(e){const t=e.next();if(!t.done){i=false;yield{walker:e,value:t.value}}}}}function*Em(t){for(const e of t){yield*e.getMinimalFlatRanges()}}function Mm(t,e,i){for(const n of e.getAttributeKeys()){if(!t.checkAttribute(e,n)){i.removeAttribute(n,e)}}}class Pm{constructor(t={}){this._splitParts=new Map;this._modelCursor=null;this.conversionApi=Object.assign({},t);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(t,e,i=["$root"]){this.fire("viewCleanup",t);this._modelCursor=Im(i,e);this.conversionApi.writer=e;this.conversionApi.consumable=lm.createFrom(t);this.conversionApi.store={};const{modelRange:n}=this._convertItem(t,this._modelCursor);const o=e.createDocumentFragment();if(n){this._removeEmptyElements();for(const t of Array.from(this._modelCursor.parent.getChildren())){e.append(t,o)}o.markers=Sm(o,e)}this._modelCursor=null;this._splitParts.clear();this.conversionApi.writer=null;this.conversionApi.store=null;return o}_convertItem(t,e){const i=Object.assign({viewItem:t,modelCursor:e,modelRange:null});if(t.is("element")){this.fire("element:"+t.name,i,this.conversionApi)}else if(t.is("text")){this.fire("text",i,this.conversionApi)}else{this.fire("documentFragment",i,this.conversionApi)}if(i.modelRange&&!(i.modelRange instanceof $h)){throw new ss["b"]("view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.",this)}return{modelRange:i.modelRange,modelCursor:i.modelCursor}}_convertChildren(t,e){const i=new $h(e);let n=e;for(const e of Array.from(t.getChildren())){const t=this._convertItem(e,n);if(t.modelRange instanceof $h){i.end=t.modelRange.end;n=t.modelCursor}}return{modelRange:i,modelCursor:n}}_splitToAllowedParent(t,e){const i=this.conversionApi.schema.findAllowedParent(e,t);if(!i){return null}if(i===e.parent){return{position:e}}if(this._modelCursor.parent.getAncestors().includes(i)){return null}const n=this.conversionApi.writer.split(e,i);const o=[];for(const t of n.range.getWalker()){if(t.type=="elementEnd"){o.push(t.item)}else{const e=o.pop();const i=t.item;this._registerSplitPair(e,i)}}return{position:n.position,cursorParent:n.range.end.parent}}_registerSplitPair(t,e){if(!this._splitParts.has(t)){this._splitParts.set(t,[t])}const i=this._splitParts.get(t);this._splitParts.set(e,i);i.push(e)}_getSplitParts(t){let e;if(!this._splitParts.has(t)){e=[t]}else{e=this._splitParts.get(t)}return e}_removeEmptyElements(){let t=false;for(const e of this._splitParts.keys()){if(e.isEmpty){this.conversionApi.writer.remove(e);this._splitParts.delete(e);t=true}}if(t){this._removeEmptyElements()}}}vs(Pm,ds);function Sm(t,e){const i=new Set;const n=new Map;const o=$h._createIn(t).getItems();for(const t of o){if(t.name=="$marker"){i.add(t)}}for(const t of i){const i=t.getAttribute("data-name");const o=e.createPositionBefore(t);if(!n.has(i)){n.set(i,new $h(o.clone()))}else{n.get(i).end=o.clone()}e.remove(t)}return n}function Im(t,e){let i;for(const n of new hm(t)){const t={};for(const e of n.getAttributeKeys()){t[e]=n.getAttribute(e)}const o=e.createElement(n.name,t);if(i){e.append(o,i)}i=qh._createAt(o,0)}return i}class Nm{constructor(t,e){this.model=t;this.stylesProcessor=e;this.processor;this.mapper=new Yh;this.downcastDispatcher=new Xh({mapper:this.mapper});this.downcastDispatcher.on("insert:$text",kf(),{priority:"lowest"});this.upcastDispatcher=new Pm({schema:t.schema});this.viewDocument=new pl(e);this._viewWriter=new $l(this.viewDocument);this.upcastDispatcher.on("text",$f(),{priority:"lowest"});this.upcastDispatcher.on("element",qf(),{priority:"lowest"});this.upcastDispatcher.on("documentFragment",qf(),{priority:"lowest"});this.decorate("init");this.on("init",()=>{this.fire("ready")},{priority:"lowest"})}get(t){const{rootName:e="main",trim:i="empty"}=t||{};if(!this._checkIfRootsExists([e])){throw new ss["b"]("datacontroller-get-non-existent-root: Attempting to get data from a non-existing root.",this)}const n=this.model.document.getRoot(e);if(i==="empty"&&!this.model.hasContent(n,{ignoreWhitespaces:true})){return""}return this.stringify(n)}stringify(t){const e=this.toView(t);return this.processor.toData(e)}toView(t){const e=this.viewDocument;const i=this._viewWriter;this.mapper.clearBindings();const n=$h._createIn(t);const o=new Ul(e);this.mapper.bindElements(t,o);this.downcastDispatcher.convertInsert(n,i);if(!t.is("documentFragment")){const e=Om(t);for(const[t,n]of e){this.downcastDispatcher.convertMarkerAdd(t,n,i)}}return o}init(t){if(this.model.document.version){throw new ss["b"]("datacontroller-init-document-not-empty: Trying to set initial data to not empty document.",this)}let e={};if(typeof t==="string"){e.main=t}else{e=t}if(!this._checkIfRootsExists(Object.keys(e))){throw new ss["b"]("datacontroller-init-non-existent-root: Attempting to init data on a non-existing root.",this)}this.model.enqueueChange("transparent",t=>{for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.insert(this.parse(e[i],n),n,0)}});return Promise.resolve()}set(t){let e={};if(typeof t==="string"){e.main=t}else{e=t}if(!this._checkIfRootsExists(Object.keys(e))){throw new ss["b"]("datacontroller-set-non-existent-root: Attempting to set data on a non-existing root.",this)}this.model.enqueueChange("transparent",t=>{t.setSelection(null);t.removeSelectionAttribute(this.model.document.selection.getAttributeKeys());for(const i of Object.keys(e)){const n=this.model.document.getRoot(i);t.remove(t.createRangeIn(n));t.insert(this.parse(e[i],n),n,0)}})}parse(t,e="$root"){const i=this.processor.toView(t);return this.toModel(i,e)}toModel(t,e="$root"){return this.model.change(i=>this.upcastDispatcher.convert(t,i,e))}addStyleProcessorRules(t){t(this.stylesProcessor)}destroy(){this.stopListening()}_checkIfRootsExists(t){for(const e of t){if(!this.model.document.getRootNames().includes(e)){return false}}return true}}vs(Nm,Jc);function Om(t){const e=[];const i=t.root.document;if(!i){return[]}const n=$h._createIn(t);for(const t of i.model.markers){const i=n.getIntersection(t.getRange());if(i){e.push([t.name,i])}}return e}class Lm{constructor(t,e){this._helpers=new Map;this._downcast=Array.isArray(t)?t:[t];this._createConversionHelpers({name:"downcast",dispatchers:this._downcast,isDowncast:true});this._upcast=Array.isArray(e)?e:[e];this._createConversionHelpers({name:"upcast",dispatchers:this._upcast,isDowncast:false})}addAlias(t,e){const i=this._downcast.includes(e);const n=this._upcast.includes(e);if(!n&&!i){throw new ss["b"]("conversion-add-alias-dispatcher-not-registered: "+"Trying to register and alias for a dispatcher that nas not been registered.",this)}this._createConversionHelpers({name:t,dispatchers:[e],isDowncast:i})}for(t){if(!this._helpers.has(t)){throw new ss["b"]("conversion-for-unknown-group: Trying to add a converter to an unknown dispatchers group.",this)}return this._helpers.get(t)}elementToElement(t){this.for("downcast").elementToElement(t);for(const{model:e,view:i}of zm(t)){this.for("upcast").elementToElement({model:e,view:i,converterPriority:t.converterPriority})}}attributeToElement(t){this.for("downcast").attributeToElement(t);for(const{model:e,view:i}of zm(t)){this.for("upcast").elementToAttribute({view:i,model:e,converterPriority:t.converterPriority})}}attributeToAttribute(t){this.for("downcast").attributeToAttribute(t);for(const{model:e,view:i}of zm(t)){this.for("upcast").attributeToAttribute({view:i,model:e})}}_createConversionHelpers({name:t,dispatchers:e,isDowncast:i}){if(this._helpers.has(t)){throw new ss["b"]("conversion-group-exists: Trying to register a group name that has already been registered.",this)}const n=i?new _f(e):new Uf(e);this._helpers.set(t,n)}}function*zm(t){if(t.model.values){for(const e of t.model.values){const i={key:t.model.key,value:e};const n=t.view[e];const o=t.upcastAlso?t.upcastAlso[e]:undefined;yield*Rm(i,n,o)}}else{yield*Rm(t.model,t.view,t.upcastAlso)}}function*Rm(t,e,i){yield{model:t,view:e};if(i){i=Array.isArray(i)?i:[i];for(const e of i){yield{model:t,view:e}}}}class jm{constructor(t="default"){this.operations=[];this.type=t}get baseVersion(){for(const t of this.operations){if(t.baseVersion!==null){return t.baseVersion}}return null}addOperation(t){t.batch=this;this.operations.push(t);return t}}class Dm{constructor(t){this.baseVersion=t;this.isDocumentOperation=this.baseVersion!==null;this.batch=null}_validate(){}toJSON(){const t=Object.assign({},this);t.__className=this.constructor.className;delete t.batch;delete t.isDocumentOperation;return t}static get className(){return"Operation"}static fromJSON(t){return new this(t.baseVersion)}}class Bm{constructor(t){this.markers=new Map;this._children=new Vh;if(t){this._insertChild(0,t)}}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return this.childCount===0}get root(){return this}get parent(){return null}is(t){return t=="documentFragment"||t=="model:documentFragment"}getChild(t){return this._children.getNode(t)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(t){return this._children.getNodeIndex(t)}getChildStartOffset(t){return this._children.getNodeStartOffset(t)}getPath(){return[]}getNodeByPath(t){let e=this;for(const i of t){e=e.getChild(e.offsetToIndex(i))}return e}offsetToIndex(t){return this._children.offsetToIndex(t)}toJSON(){const t=[];for(const e of this._children){t.push(e.toJSON())}return t}static fromJSON(t){const e=[];for(const i of t){if(i.name){e.push(Fh.fromJSON(i))}else{e.push(Dh.fromJSON(i))}}return new Bm(e)}_appendChild(t){this._insertChild(this.childCount,t)}_insertChild(t,e){const i=Vm(e);for(const t of i){if(t.parent!==null){t._remove()}t.parent=this}this._children._insertNodes(t,i)}_removeChildren(t,e=1){const i=this._children._removeNodes(t,e);for(const t of i){t.parent=null}return i}}function Vm(t){if(typeof t=="string"){return[new Dh(t)]}if(!Fs(t)){t=[t]}return Array.from(t).map(t=>{if(typeof t=="string"){return new Dh(t)}if(t instanceof Bh){return new Dh(t.data,t.getAttributes())}return t})}function Fm(t,e){e=qm(e);const i=e.reduce((t,e)=>t+e.offsetSize,0);const n=t.parent;Ym(t);const o=t.index;n._insertChild(o,e);$m(n,o+e.length);$m(n,o);return new $h(t,t.getShiftedBy(i))}function Hm(t){if(!t.isFlat){throw new ss["b"]("operation-utils-remove-range-not-flat: "+"Trying to remove a range which starts and ends in different element.",this)}const e=t.start.parent;Ym(t.start);Ym(t.end);const i=e._removeChildren(t.start.index,t.end.index-t.start.index);$m(e,t.start.index);return i}function Wm(t,e){if(!t.isFlat){throw new ss["b"]("operation-utils-move-range-not-flat: "+"Trying to move a range which starts and ends in different element.",this)}const i=Hm(t);e=e._getTransformedByDeletion(t.start,t.end.offset-t.start.offset);return Fm(e,i)}function Um(t,e,i){Ym(t.start);Ym(t.end);for(const n of t.getItems({shallow:true})){const t=n.is("textProxy")?n.textNode:n;if(i!==null){t._setAttribute(e,i)}else{t._removeAttribute(e)}$m(t.parent,t.index)}$m(t.end.parent,t.end.index)}function qm(t){const e=[];if(!(t instanceof Array)){t=[t]}for(let i=0;it.maxOffset){throw new ss["b"]("move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.",this)}else if(t===e&&i=i&&this.targetPosition.path[t]t._clone(true)));const e=new tg(this.position,t,this.baseVersion);e.shouldReceiveAttributes=this.shouldReceiveAttributes;return e}getReversed(){const t=this.position.root.document.graveyard;const e=new qh(t,[0]);return new Zm(this.position,this.nodes.maxOffset,e,this.baseVersion+1)}_validate(){const t=this.position.parent;if(!t||t.maxOffsett._clone(true)));Fm(this.position,t)}toJSON(){const t=super.toJSON();t.position=this.position.toJSON();t.nodes=this.nodes.toJSON();return t}static get className(){return"InsertOperation"}static fromJSON(t,e){const i=[];for(const e of t.nodes){if(e.name){i.push(Fh.fromJSON(e))}else{i.push(Dh.fromJSON(e))}}const n=new tg(qh.fromJSON(t.position,e),i,t.baseVersion);n.shouldReceiveAttributes=t.shouldReceiveAttributes;return n}}class eg extends Dm{constructor(t,e,i,n,o,r){super(r);this.name=t;this.oldRange=e?e.clone():null;this.newRange=i?i.clone():null;this.affectsData=o;this._markers=n}get type(){return"marker"}clone(){return new eg(this.name,this.oldRange,this.newRange,this._markers,this.affectsData,this.baseVersion)}getReversed(){return new eg(this.name,this.newRange,this.oldRange,this._markers,this.affectsData,this.baseVersion+1)}_execute(){const t=this.newRange?"_set":"_remove";this._markers[t](this.name,this.newRange,true,this.affectsData)}toJSON(){const t=super.toJSON();if(this.oldRange){t.oldRange=this.oldRange.toJSON()}if(this.newRange){t.newRange=this.newRange.toJSON()}delete t._markers;return t}static get className(){return"MarkerOperation"}static fromJSON(t,e){return new eg(t.name,t.oldRange?$h.fromJSON(t.oldRange,e):null,t.newRange?$h.fromJSON(t.newRange,e):null,e.model.markers,t.affectsData,t.baseVersion)}}class ig extends Dm{constructor(t,e,i,n){super(n);this.position=t;this.position.stickiness="toNext";this.oldName=e;this.newName=i}get type(){return"rename"}clone(){return new ig(this.position.clone(),this.oldName,this.newName,this.baseVersion)}getReversed(){return new ig(this.position.clone(),this.newName,this.oldName,this.baseVersion+1)}_validate(){const t=this.position.nodeAfter;if(!(t instanceof Fh)){throw new ss["b"]("rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.",this)}else if(t.name!==this.oldName){throw new ss["b"]("rename-operation-wrong-name: Element to change has different name than operation's old name.",this)}}_execute(){const t=this.position.nodeAfter;t.name=this.newName}toJSON(){const t=super.toJSON();t.position=this.position.toJSON();return t}static get className(){return"RenameOperation"}static fromJSON(t,e){return new ig(qh.fromJSON(t.position,e),t.oldName,t.newName,t.baseVersion)}}class ng extends Dm{constructor(t,e,i,n,o){super(o);this.root=t;this.key=e;this.oldValue=i;this.newValue=n}get type(){if(this.oldValue===null){return"addRootAttribute"}else if(this.newValue===null){return"removeRootAttribute"}else{return"changeRootAttribute"}}clone(){return new ng(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new ng(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_validate(){if(this.root!=this.root.root||this.root.is("documentFragment")){throw new ss["b"]("rootattribute-operation-not-a-root: The element to change is not a root element.",this,{root:this.root,key:this.key})}if(this.oldValue!==null&&this.root.getAttribute(this.key)!==this.oldValue){throw new ss["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(this.oldValue===null&&this.newValue!==null&&this.root.hasAttribute(this.key)){throw new ss["b"]("rootattribute-operation-attribute-exists: The attribute with given key already exists.",this,{root:this.root,key:this.key})}}_execute(){if(this.newValue!==null){this.root._setAttribute(this.key,this.newValue)}else{this.root._removeAttribute(this.key)}}toJSON(){const t=super.toJSON();t.root=this.root.toJSON();return t}static get className(){return"RootAttributeOperation"}static fromJSON(t,e){if(!e.getRoot(t.root)){throw new ss["b"]("rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.",this,{rootName:t.root})}return new ng(e.getRoot(t.root),t.key,t.oldValue,t.newValue,t.baseVersion)}}class og extends Dm{constructor(t,e,i,n,o){super(o);this.sourcePosition=t.clone();this.sourcePosition.stickiness="toPrevious";this.howMany=e;this.targetPosition=i.clone();this.targetPosition.stickiness="toNext";this.graveyardPosition=n.clone()}get type(){return"merge"}get deletionPosition(){return new qh(this.sourcePosition.root,this.sourcePosition.path.slice(0,-1))}get movedRange(){const t=this.sourcePosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $h(this.sourcePosition,t)}clone(){return new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.graveyardPosition,this.baseVersion)}getReversed(){const t=this.targetPosition._getTransformedByMergeOperation(this);const e=this.sourcePosition.path.slice(0,-1);const i=new qh(this.sourcePosition.root,e)._getTransformedByMergeOperation(this);const n=new rg(t,this.howMany,this.graveyardPosition,this.baseVersion+1);n.insertionPosition=i;return n}_validate(){const t=this.sourcePosition.parent;const e=this.targetPosition.parent;if(!t.parent){throw new ss["b"]("merge-operation-source-position-invalid: Merge source position is invalid.",this)}else if(!e.parent){throw new ss["b"]("merge-operation-target-position-invalid: Merge target position is invalid.",this)}else if(this.howMany!=t.maxOffset){throw new ss["b"]("merge-operation-how-many-invalid: Merge operation specifies wrong number of nodes to move.",this)}}_execute(){const t=this.sourcePosition.parent;const e=$h._createIn(t);Wm(e,this.targetPosition);Wm($h._createOn(t),this.graveyardPosition)}toJSON(){const t=super.toJSON();t.sourcePosition=t.sourcePosition.toJSON();t.targetPosition=t.targetPosition.toJSON();t.graveyardPosition=t.graveyardPosition.toJSON();return t}static get className(){return"MergeOperation"}static fromJSON(t,e){const i=qh.fromJSON(t.sourcePosition,e);const n=qh.fromJSON(t.targetPosition,e);const o=qh.fromJSON(t.graveyardPosition,e);return new this(i,t.howMany,n,o,t.baseVersion)}}class rg extends Dm{constructor(t,e,i,n){super(n);this.splitPosition=t.clone();this.splitPosition.stickiness="toNext";this.howMany=e;this.insertionPosition=rg.getInsertionPosition(t);this.insertionPosition.stickiness="toNone";this.graveyardPosition=i?i.clone():null;if(this.graveyardPosition){this.graveyardPosition.stickiness="toNext"}}get type(){return"split"}get moveTargetPosition(){const t=this.insertionPosition.path.slice();t.push(0);return new qh(this.insertionPosition.root,t)}get movedRange(){const t=this.splitPosition.getShiftedBy(Number.POSITIVE_INFINITY);return new $h(this.splitPosition,t)}clone(){const t=new this.constructor(this.splitPosition,this.howMany,this.graveyardPosition,this.baseVersion);t.insertionPosition=this.insertionPosition;return t}getReversed(){const t=this.splitPosition.root.document.graveyard;const e=new qh(t,[0]);return new og(this.moveTargetPosition,this.howMany,this.splitPosition,e,this.baseVersion+1)}_validate(){const t=this.splitPosition.parent;const e=this.splitPosition.offset;if(!t||t.maxOffset{for(const e of t.getAttributeKeys()){this.removeAttribute(e,t)}};if(!(t instanceof $h)){e(t)}else{for(const i of t.getItems()){e(i)}}}move(t,e,i){this._assertWriterUsedCorrectly();if(!(t instanceof $h)){throw new ss["b"]("writer-move-invalid-range: Invalid range to move.",this)}if(!t.isFlat){throw new ss["b"]("writer-move-range-not-flat: Range to move is not flat.",this)}const n=qh._createAt(e,i);if(n.isEqual(t.start)){return}this._addOperationForAffectedMarkers("move",t);if(!hg(t.root,n.root)){throw new ss["b"]("writer-move-different-document: Range is going to be moved between different documents.",this)}const o=t.root.document?t.root.document.version:null;const r=new Zm(t.start,t.end.offset-t.start.offset,n,o);this.batch.addOperation(r);this.model.applyOperation(r)}remove(t){this._assertWriterUsedCorrectly();const e=t instanceof $h?t:$h._createOn(t);const i=e.getMinimalFlatRanges().reverse();for(const t of i){this._addOperationForAffectedMarkers("move",t);ug(t.start,t.end.offset-t.start.offset,this.batch,this.model)}}merge(t){this._assertWriterUsedCorrectly();const e=t.nodeBefore;const i=t.nodeAfter;this._addOperationForAffectedMarkers("merge",t);if(!(e instanceof Fh)){throw new ss["b"]("writer-merge-no-element-before: Node before merge position must be an element.",this)}if(!(i instanceof Fh)){throw new ss["b"]("writer-merge-no-element-after: Node after merge position must be an element.",this)}if(!t.root.document){this._mergeDetached(t)}else{this._merge(t)}}createPositionFromPath(t,e,i){return this.model.createPositionFromPath(t,e,i)}createPositionAt(t,e){return this.model.createPositionAt(t,e)}createPositionAfter(t){return this.model.createPositionAfter(t)}createPositionBefore(t){return this.model.createPositionBefore(t)}createRange(t,e){return this.model.createRange(t,e)}createRangeIn(t){return this.model.createRangeIn(t)}createRangeOn(t){return this.model.createRangeOn(t)}createSelection(t,e,i){return this.model.createSelection(t,e,i)}_mergeDetached(t){const e=t.nodeBefore;const i=t.nodeAfter;this.move($h._createIn(i),qh._createAt(e,"end"));this.remove(i)}_merge(t){const e=qh._createAt(t.nodeBefore,"end");const i=qh._createAt(t.nodeAfter,0);const n=t.root.document.graveyard;const o=new qh(n,[0]);const r=t.root.document.version;const s=new og(i,t.nodeAfter.maxOffset,e,o,r);this.batch.addOperation(s);this.model.applyOperation(s)}rename(t,e){this._assertWriterUsedCorrectly();if(!(t instanceof Fh)){throw new ss["b"]("writer-rename-not-element-instance: Trying to rename an object which is not an instance of Element.",this)}const i=t.root.document?t.root.document.version:null;const n=new ig(qh._createBefore(t),t.name,e,i);this.batch.addOperation(n);this.model.applyOperation(n)}split(t,e){this._assertWriterUsedCorrectly();let i=t.parent;if(!i.parent){throw new ss["b"]("writer-split-element-no-parent: Element with no parent can not be split.",this)}if(!e){e=i.parent}if(!t.parent.getAncestors({includeSelf:true}).includes(e)){throw new ss["b"]("writer-split-invalid-limit-element: Limit element is not a position ancestor.",this)}let n,o;do{const e=i.root.document?i.root.document.version:null;const r=i.maxOffset-t.offset;const s=new rg(t,r,null,e);this.batch.addOperation(s);this.model.applyOperation(s);if(!n&&!o){n=i;o=t.parent.nextSibling}t=this.createPositionAfter(t.parent);i=t.parent}while(i!==e);return{position:t,range:new $h(qh._createAt(n,"end"),qh._createAt(o,0))}}wrap(t,e){this._assertWriterUsedCorrectly();if(!t.isFlat){throw new ss["b"]("writer-wrap-range-not-flat: Range to wrap is not flat.",this)}const i=e instanceof Fh?e:new Fh(e);if(i.childCount>0){throw new ss["b"]("writer-wrap-element-not-empty: Element to wrap with is not empty.",this)}if(i.parent!==null){throw new ss["b"]("writer-wrap-element-attached: Element to wrap with is already attached to tree model.",this)}this.insert(i,t.start);const n=new $h(t.start.getShiftedBy(1),t.end.getShiftedBy(1));this.move(n,qh._createAt(i,0))}unwrap(t){this._assertWriterUsedCorrectly();if(t.parent===null){throw new ss["b"]("writer-unwrap-element-no-parent: Trying to unwrap an element which has no parent.",this)}this.move($h._createIn(t),this.createPositionAfter(t));this.remove(t)}addMarker(t,e){this._assertWriterUsedCorrectly();if(!e||typeof e.usingOperation!="boolean"){throw new ss["b"]("writer-addMarker-no-usingOperation: The options.usingOperation parameter is required when adding a new marker.",this)}const i=e.usingOperation;const n=e.range;const o=e.affectsData===undefined?false:e.affectsData;if(this.model.markers.has(t)){throw new ss["b"]("writer-addMarker-marker-exists: Marker with provided name already exists.",this)}if(!n){throw new ss["b"]("writer-addMarker-no-range: Range parameter is required when adding a new marker.",this)}if(!i){return this.model.markers._set(t,n,i,o)}dg(this,t,null,n,o);return this.model.markers.get(t)}updateMarker(t,e){this._assertWriterUsedCorrectly();const i=typeof t=="string"?t:t.name;const n=this.model.markers.get(i);if(!n){throw new ss["b"]("writer-updateMarker-marker-not-exists: Marker with provided name does not exists.",this)}if(!e){this.model.markers._refresh(n);return}const o=typeof e.usingOperation=="boolean";const r=typeof e.affectsData=="boolean";const s=r?e.affectsData:n.affectsData;if(!o&&!e.range&&!r){throw new ss["b"]("writer-updateMarker-wrong-options: One of the options is required - provide range, usingOperations or affectsData.",this)}const a=n.getRange();const c=e.range?e.range:a;if(o&&e.usingOperation!==n.managedUsingOperations){if(e.usingOperation){dg(this,i,null,c,s)}else{dg(this,i,a,null,s);this.model.markers._set(i,c,undefined,s)}return}if(n.managedUsingOperations){dg(this,i,a,c,s)}else{this.model.markers._set(i,c,undefined,s)}}removeMarker(t){this._assertWriterUsedCorrectly();const e=typeof t=="string"?t:t.name;if(!this.model.markers.has(e)){throw new ss["b"]("writer-removeMarker-no-marker: Trying to remove marker which does not exist.",this)}const i=this.model.markers.get(e);if(!i.managedUsingOperations){this.model.markers._remove(e);return}const n=i.getRange();dg(this,e,n,null,i.affectsData)}setSelection(t,e,i){this._assertWriterUsedCorrectly();this.model.document.selection._setTo(t,e,i)}setSelectionFocus(t,e){this._assertWriterUsedCorrectly();this.model.document.selection._setFocus(t,e)}setSelectionAttribute(t,e){this._assertWriterUsedCorrectly();if(typeof t==="string"){this._setSelectionAttribute(t,e)}else{for(const[e,i]of Hs(t)){this._setSelectionAttribute(e,i)}}}removeSelectionAttribute(t){this._assertWriterUsedCorrectly();if(typeof t==="string"){this._removeSelectionAttribute(t)}else{for(const e of t){this._removeSelectionAttribute(e)}}}overrideSelectionGravity(){return this.model.document.selection._overrideGravity()}restoreSelectionGravity(t){this.model.document.selection._restoreGravity(t)}_setSelectionAttribute(t,e){const i=this.model.document.selection;if(i.isCollapsed&&i.anchor.parent.isEmpty){const n=df._getStoreAttributeKey(t);this.setAttribute(n,e,i.anchor.parent)}i._setAttribute(t,e)}_removeSelectionAttribute(t){const e=this.model.document.selection;if(e.isCollapsed&&e.anchor.parent.isEmpty){const i=df._getStoreAttributeKey(t);this.removeAttribute(i,e.anchor.parent)}e._removeAttribute(t)}_assertWriterUsedCorrectly(){if(this.model._currentWriter!==this){throw new ss["b"]("writer-incorrect-use: Trying to use a writer outside the change() block.",this)}}_addOperationForAffectedMarkers(t,e){for(const i of this.model.markers){if(!i.managedUsingOperations){continue}const n=i.getRange();let o=false;if(t=="move"){o=e.containsPosition(n.start)||e.start.isEqual(n.start)||e.containsPosition(n.end)||e.end.isEqual(n.end)}else{const t=e.nodeBefore;const i=e.nodeAfter;const r=n.start.parent==t&&n.start.isAtEnd;const s=n.end.parent==i&&n.end.offset==0;const a=n.end.nodeAfter==i;const c=n.start.nodeAfter==i;o=r||s||a||c}if(o){this.updateMarker(i.name,{range:n})}}}}function cg(t,e,i,n){const o=t.model;const r=o.document;let s=n.start;let a;let c;let l;for(const t of n.getWalker({shallow:true})){l=t.item.getAttribute(e);if(a&&c!=l){if(c!=i){d()}s=a}a=t.nextPosition;c=l}if(a instanceof qh&&a!=s&&c!=i){d()}function d(){const n=new $h(s,a);const l=n.root.document?r.version:null;const d=new Qm(n,e,c,i,l);t.batch.addOperation(d);o.applyOperation(d)}}function lg(t,e,i,n){const o=t.model;const r=o.document;const s=n.getAttribute(e);let a,c;if(s!=i){const l=n.root===n;if(l){const t=n.document?r.version:null;c=new ng(n,e,s,i,t)}else{a=new $h(qh._createBefore(n),t.createPositionAfter(n));const o=a.root.document?r.version:null;c=new Qm(a,e,s,i,o)}t.batch.addOperation(c);o.applyOperation(c)}}function dg(t,e,i,n,o){const r=t.model;const s=r.document;const a=new eg(e,i,n,r.markers,o,s.version);t.batch.addOperation(a);r.applyOperation(a)}function ug(t,e,i,n){let o;if(t.root.document){const i=n.document;const r=new qh(i.graveyard,[0]);o=new Zm(t,e,r,i.version)}else{o=new Km(t,e)}i.addOperation(o);n.applyOperation(o)}function hg(t,e){if(t===e){return true}if(t instanceof sg&&e instanceof sg){return true}return false}class fg{constructor(t){this._markerCollection=t;this._changesInElement=new Map;this._elementSnapshots=new Map;this._changedMarkers=new Map;this._changeCount=0;this._cachedChanges=null;this._cachedChangesWithGraveyard=null}get isEmpty(){return this._changesInElement.size==0&&this._changedMarkers.size==0}refreshItem(t){if(this._isInInsertedElement(t.parent)){return}this._markRemove(t.parent,t.startOffset,t.offsetSize);this._markInsert(t.parent,t.startOffset,t.offsetSize);const e=$h._createOn(t);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}this._cachedChanges=null}bufferOperation(t){switch(t.type){case"insert":{if(this._isInInsertedElement(t.position.parent)){return}this._markInsert(t.position.parent,t.position.offset,t.nodes.maxOffset);break}case"addAttribute":case"removeAttribute":case"changeAttribute":{for(const e of t.range.getItems({shallow:true})){if(this._isInInsertedElement(e.parent)){continue}this._markAttribute(e)}break}case"remove":case"move":case"reinsert":{if(t.sourcePosition.isEqual(t.targetPosition)||t.sourcePosition.getShiftedBy(t.howMany).isEqual(t.targetPosition)){return}const e=this._isInInsertedElement(t.sourcePosition.parent);const i=this._isInInsertedElement(t.targetPosition.parent);if(!e){this._markRemove(t.sourcePosition.parent,t.sourcePosition.offset,t.howMany)}if(!i){this._markInsert(t.targetPosition.parent,t.getMovedRangeStart().offset,t.howMany)}break}case"rename":{if(this._isInInsertedElement(t.position.parent)){return}this._markRemove(t.position.parent,t.position.offset,1);this._markInsert(t.position.parent,t.position.offset,1);const e=$h._createFromPositionAndShift(t.position,1);for(const t of this._markerCollection.getMarkersIntersectingRange(e)){const e=t.getRange();this.bufferMarkerChange(t.name,e,e,t.affectsData)}break}case"split":{const e=t.splitPosition.parent;if(!this._isInInsertedElement(e)){this._markRemove(e,t.splitPosition.offset,t.howMany)}if(!this._isInInsertedElement(t.insertionPosition.parent)){this._markInsert(t.insertionPosition.parent,t.insertionPosition.offset,1)}if(t.graveyardPosition){this._markRemove(t.graveyardPosition.parent,t.graveyardPosition.offset,1)}break}case"merge":{const e=t.sourcePosition.parent;if(!this._isInInsertedElement(e.parent)){this._markRemove(e.parent,e.startOffset,1)}const i=t.graveyardPosition.parent;this._markInsert(i,t.graveyardPosition.offset,1);const n=t.targetPosition.parent;if(!this._isInInsertedElement(n)){this._markInsert(n,t.targetPosition.offset,e.maxOffset)}break}}this._cachedChanges=null}bufferMarkerChange(t,e,i,n){const o=this._changedMarkers.get(t);if(!o){this._changedMarkers.set(t,{oldRange:e,newRange:i,affectsData:n})}else{o.newRange=i;o.affectsData=n;if(o.oldRange==null&&o.newRange==null){this._changedMarkers.delete(t)}}}getMarkersToRemove(){const t=[];for(const[e,i]of this._changedMarkers){if(i.oldRange!=null){t.push({name:e,range:i.oldRange})}}return t}getMarkersToAdd(){const t=[];for(const[e,i]of this._changedMarkers){if(i.newRange!=null){t.push({name:e,range:i.newRange})}}return t}getChangedMarkers(){return Array.from(this._changedMarkers).map(t=>({name:t[0],data:{oldRange:t[1].oldRange,newRange:t[1].newRange}}))}hasDataChanges(){for(const[,t]of this._changedMarkers){if(t.affectsData){return true}}return this._changesInElement.size>0}getChanges(t={includeChangesInGraveyard:false}){if(this._cachedChanges){if(t.includeChangesInGraveyard){return this._cachedChangesWithGraveyard.slice()}else{return this._cachedChanges.slice()}}const e=[];for(const t of this._changesInElement.keys()){const i=this._changesInElement.get(t).sort((t,e)=>{if(t.offset===e.offset){if(t.type!=e.type){return t.type=="remove"?-1:1}return 0}return t.offset{if(t.position.root!=e.position.root){return t.position.root.rootNamei.offset){if(n>o){const t={type:"attribute",offset:o,howMany:n-o,count:this._changeCount++};this._handleChange(t,e);e.push(t)}t.nodesToHandle=i.offset-t.offset;t.howMany=t.nodesToHandle}else if(t.offset>=i.offset&&t.offseto){t.nodesToHandle=n-o;t.offset=o}else{t.nodesToHandle=0}}}if(i.type=="remove"){if(t.offseti.offset){const o={type:"attribute",offset:i.offset,howMany:n-i.offset,count:this._changeCount++};this._handleChange(o,e);e.push(o);t.nodesToHandle=i.offset-t.offset;t.howMany=t.nodesToHandle}}if(i.type=="attribute"){if(t.offset>=i.offset&&n<=o){t.nodesToHandle=0;t.howMany=0;t.offset=0}else if(t.offset<=i.offset&&n>=o){i.howMany=0}}}}t.howMany=t.nodesToHandle;delete t.nodesToHandle}_getInsertDiff(t,e,i){return{type:"insert",position:qh._createAt(t,e),name:i,length:1,changeCount:this._changeCount++}}_getRemoveDiff(t,e,i){return{type:"remove",position:qh._createAt(t,e),name:i,length:1,changeCount:this._changeCount++}}_getAttributesDiff(t,e,i){const n=[];i=new Map(i);for(const[o,r]of e){const e=i.has(o)?i.get(o):null;if(e!==r){n.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:o,attributeOldValue:r,attributeNewValue:e,changeCount:this._changeCount++})}i.delete(o)}for(const[e,o]of i){n.push({type:"attribute",position:t.start,range:t.clone(),length:1,attributeKey:e,attributeOldValue:null,attributeNewValue:o,changeCount:this._changeCount++})}return n}_isInInsertedElement(t){const e=t.parent;if(!e){return false}const i=this._changesInElement.get(e);const n=t.startOffset;if(i){for(const t of i){if(t.type=="insert"&&n>=t.offset&&nn){for(let e=0;e{const i=e[0];if(i.isDocumentOperation&&i.baseVersion!==this.version){throw new ss["b"]("model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.",this,{operation:i})}},{priority:"highest"});this.listenTo(t,"applyOperation",(t,e)=>{const i=e[0];if(i.isDocumentOperation){this.differ.bufferOperation(i)}},{priority:"high"});this.listenTo(t,"applyOperation",(t,e)=>{const i=e[0];if(i.isDocumentOperation){this.version++;this.history.addOperation(i)}},{priority:"low"});this.listenTo(this.selection,"change",()=>{this._hasSelectionChangedFromTheLastChangeBlock=true});this.listenTo(t.markers,"update",(t,e,i,n)=>{this.differ.bufferMarkerChange(e.name,i,n,e.affectsData);if(i===null){e.on("change",(t,i)=>{this.differ.bufferMarkerChange(e.name,i,e.getRange(),e.affectsData)})}})}get graveyard(){return this.getRoot(xg)}createRoot(t="$root",e="main"){if(this.roots.get(e)){throw new ss["b"]("model-document-createRoot-name-exists: Root with specified name already exists.",this,{name:e})}const i=new sg(this,t,e);this.roots.add(i);return i}destroy(){this.selection.destroy();this.stopListening()}getRoot(t="main"){return this.roots.get(t)}getRootNames(){return Array.from(this.roots,t=>t.rootName).filter(t=>t!=xg)}registerPostFixer(t){this._postFixers.add(t)}toJSON(){const t=Rs(this);t.selection="[engine.model.DocumentSelection]";t.model="[engine.model.Model]";return t}_handleChangeBlock(t){if(this._hasDocumentChangedFromTheLastChangeBlock()){this._callPostFixers(t);this.selection.refresh();if(this.differ.hasDataChanges()){this.fire("change:data",t.batch)}else{this.fire("change",t.batch)}this.selection.refresh();this.differ.reset()}this._hasSelectionChangedFromTheLastChangeBlock=false}_hasDocumentChangedFromTheLastChangeBlock(){return!this.differ.isEmpty||this._hasSelectionChangedFromTheLastChangeBlock}_getDefaultRoot(){for(const t of this.roots){if(t!==this.graveyard){return t}}return this.graveyard}_getDefaultRange(){const t=this._getDefaultRoot();const e=this.model;const i=e.schema;const n=e.createPositionFromPath(t,[0]);const o=i.getNearestSelectionRange(n);return o||e.createRange(n)}_validateSelectionRange(t){return Cg(t.start)&&Cg(t.end)}_callPostFixers(t){let e=false;do{for(const i of this._postFixers){this.selection.refresh();e=i(t);if(e){break}}}while(e)}}vs(Ag,ds);function Cg(t){const e=t.textNode;if(e){const i=e.data;const n=t.offset-e.startOffset;return!vg(i,n)&&!yg(i,n)}return true}class Tg{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(t){return this._markers.has(t)}get(t){return this._markers.get(t)||null}_set(t,e,i=false,n=false){const o=t instanceof Eg?t.name:t;const r=this._markers.get(o);if(r){const t=r.getRange();let s=false;if(!t.isEqual(e)){r._attachLiveRange(rf.fromRange(e));s=true}if(i!=r.managedUsingOperations){r._managedUsingOperations=i;s=true}if(typeof n==="boolean"&&n!=r.affectsData){r._affectsData=n;s=true}if(s){this.fire("update:"+o,r,t,e)}return r}const s=rf.fromRange(e);const a=new Eg(o,s,i,n);this._markers.set(o,a);this.fire("update:"+o,a,null,e);return a}_remove(t){const e=t instanceof Eg?t.name:t;const i=this._markers.get(e);if(i){this._markers.delete(e);this.fire("update:"+e,i,i.getRange(),null);this._destroyMarker(i);return true}return false}_refresh(t){const e=t instanceof Eg?t.name:t;const i=this._markers.get(e);if(!i){throw new ss["b"]("markercollection-refresh-marker-not-exists: Marker with provided name does not exists.",this)}const n=i.getRange();this.fire("update:"+e,i,n,n,i.managedUsingOperations,i.affectsData)}*getMarkersAtPosition(t){for(const e of this){if(e.getRange().containsPosition(t)){yield e}}}*getMarkersIntersectingRange(t){for(const e of this){if(e.getRange().getIntersection(t)!==null){yield e}}}destroy(){for(const t of this._markers.values()){this._destroyMarker(t)}this._markers=null;this.stopListening()}*getMarkersGroup(t){for(const e of this._markers.values()){if(e.name.startsWith(t+":")){yield e}}}_destroyMarker(t){t.stopListening();t._detachLiveRange()}}vs(Tg,ds);class Eg{constructor(t,e,i,n){this.name=t;this._liveRange=this._attachLiveRange(e);this._managedUsingOperations=i;this._affectsData=n}get managedUsingOperations(){if(!this._liveRange){throw new ss["b"]("marker-destroyed: Cannot use a destroyed marker instance.",this)}return this._managedUsingOperations}get affectsData(){if(!this._liveRange){throw new ss["b"]("marker-destroyed: Cannot use a destroyed marker instance.",this)}return this._affectsData}getStart(){if(!this._liveRange){throw new ss["b"]("marker-destroyed: Cannot use a destroyed marker instance.",this)}return this._liveRange.start.clone()}getEnd(){if(!this._liveRange){throw new ss["b"]("marker-destroyed: Cannot use a destroyed marker instance.",this)}return this._liveRange.end.clone()}getRange(){if(!this._liveRange){throw new ss["b"]("marker-destroyed: Cannot use a destroyed marker instance.",this)}return this._liveRange.toRange()}is(t){return t=="marker"||t=="model:marker"}_attachLiveRange(t){if(this._liveRange){this._detachLiveRange()}t.delegate("change:range").to(this);t.delegate("change:content").to(this);this._liveRange=t;return t}_detachLiveRange(){this._liveRange.stopDelegating("change:range",this);this._liveRange.stopDelegating("change:content",this);this._liveRange.detach();this._liveRange=null}}vs(Eg,ds);class Mg extends Dm{get type(){return"noop"}clone(){return new Mg(this.baseVersion)}getReversed(){return new Mg(this.baseVersion+1)}_execute(){}static get className(){return"NoOperation"}}const Pg={};Pg[Qm.className]=Qm;Pg[tg.className]=tg;Pg[eg.className]=eg;Pg[Zm.className]=Zm;Pg[Mg.className]=Mg;Pg[Dm.className]=Dm;Pg[ig.className]=ig;Pg[ng.className]=ng;Pg[rg.className]=rg;Pg[og.className]=og;class Sg{static fromJSON(t,e){return Pg[t.__className].fromJSON(t,e)}}class Ig extends qh{constructor(t,e,i="toNone"){super(t,e,i);if(!this.root.is("rootElement")){throw new ss["b"]("model-liveposition-root-not-rootelement: LivePosition's root has to be an instance of RootElement.",t)}Ng.call(this)}detach(){this.stopListening()}is(t){return t=="livePosition"||t=="model:livePosition"||super.is(t)}toPosition(){return new qh(this.root,this.path.slice(),this.stickiness)}static fromPosition(t,e){return new this(t.root,t.path.slice(),e?e:t.stickiness)}}function Ng(){this.listenTo(this.root.document.model,"applyOperation",(t,e)=>{const i=e[0];if(!i.isDocumentOperation){return}Og.call(this,i)},{priority:"low"})}function Og(t){const e=this.getTransformedByOperation(t);if(!this.isEqual(e)){const t=this.toPosition();this.path=e.path;this.root=e.root;this.fire("change",t)}}vs(Ig,ds);function Lg(t,e,i,n){return t.change(o=>{let r;if(!i){r=t.document.selection}else if(i instanceof Kh||i instanceof df){r=i}else{r=o.createSelection(i,n)}if(!r.isCollapsed){t.deleteContent(r,{doNotAutoparagraph:true})}const s=new zg(t,o,r.anchor);let a;if(e.is("documentFragment")){a=e.getChildren()}else{a=[e]}s.handleNodes(a,{isFirst:true,isLast:true});const c=s.getSelectionRange();if(c){if(r instanceof df){o.setSelection(c)}else{r.setTo(c)}}else{}const l=s.getAffectedRange()||t.createRange(r.anchor);s.destroy();return l})}class zg{constructor(t,e,i){this.model=t;this.writer=e;this.position=i;this.canMergeWith=new Set([this.position.parent]);this.schema=t.schema;this._filterAttributesOf=[];this._affectedStart=null;this._affectedEnd=null}handleNodes(t,e){t=Array.from(t);for(let i=0;i{if(!i.doNotResetEntireContent&&Hg(o,e)){Fg(t,e,o);return}const r=n.start;const s=Ig.fromPosition(n.end,"toNext");if(!n.start.isTouching(n.end)){t.remove(n)}if(!i.leaveUnmerged){jg(t,r,s);o.removeDisallowedAttributes(r.parent.getChildren(),t)}Wg(t,e,r);if(!i.doNotAutoparagraph&&Dg(o,r)){Vg(t,r,e)}s.detach()})}function jg(t,e,i){const n=e.parent;const o=i.parent;if(n==o){return}if(t.model.schema.isLimit(n)||t.model.schema.isLimit(o)){return}if(!Bg(e,i,t.model.schema)){return}e=t.createPositionAfter(n);i=t.createPositionBefore(o);if(!i.isEqual(e)){t.insert(o,e)}t.merge(e);while(i.parent.isEmpty){const e=i.parent;i=t.createPositionBefore(e);t.remove(e)}jg(t,e,i)}function Dg(t,e){const i=t.checkChild(e,"$text");const n=t.checkChild(e,"paragraph");return!i&&n}function Bg(t,e,i){const n=new $h(t,e);for(const t of n.getWalker()){if(i.isLimit(t.item)){return false}}return true}function Vg(t,e,i){const n=t.createElement("paragraph");t.insert(n,e);Wg(t,i,t.createPositionAt(n,0))}function Fg(t,e){const i=t.model.schema.getLimitElement(e);t.remove(t.createRangeIn(i));Vg(t,t.createPositionAt(i,0),e)}function Hg(t,e){const i=t.getLimitElement(e);if(!e.containsEntireContent(i)){return false}const n=e.getFirstRange();if(n.start.parent==n.end.parent){return false}return t.checkChild(i,"paragraph")}function Wg(t,e,i){if(e instanceof df){t.setSelection(i)}else{e.setTo(i)}}const Ug=' ,.?!:;"-()';function qg(t,e,i={}){const n=t.schema;const o=i.direction!="backward";const r=i.unit?i.unit:"character";const s=e.focus;const a=new Wh({boundaries:Jg(s,o),singleCharacters:true,direction:o?"forward":"backward"});const c={walker:a,schema:n,isForward:o,unit:r};let l;while(l=a.next()){if(l.done){return}const i=$g(c,l.value);if(i){if(e instanceof df){t.change(t=>{t.setSelectionFocus(i)})}else{e.setFocus(i)}return}}}function $g(t,e){if(e.type=="text"){if(t.unit==="word"){return Gg(t.walker,t.isForward)}return Yg(t.walker,t.unit,t.isForward)}if(e.type==(t.isForward?"elementStart":"elementEnd")){if(t.schema.isObject(e.item)){return qh._createAt(e.item,t.isForward?"after":"before")}if(t.schema.checkChild(e.nextPosition,"$text")){return e.nextPosition}}else{if(t.schema.isLimit(e.item)){t.walker.skip(()=>true);return}if(t.schema.checkChild(e.nextPosition,"$text")){return e.nextPosition}}}function Yg(t,e){const i=t.position.textNode;if(i){const n=i.data;let o=t.position.offset-i.startOffset;while(vg(n,o)||e=="character"&&yg(n,o)){t.next();o=t.position.offset-i.startOffset}}return t.position}function Gg(t,e){let i=t.position.textNode;if(i){let n=t.position.offset-i.startOffset;while(!Xg(i.data,n,e)&&!Qg(i,n,e)){t.next();const o=e?t.position.nodeAfter:t.position.nodeBefore;if(o&&o.is("text")){const n=o.data.charAt(e?0:o.data.length-1);if(!Ug.includes(n)){t.next();i=t.position.textNode}}n=t.position.offset-i.startOffset}}return t.position}function Jg(t,e){const i=t.root;const n=qh._createAt(i,e?"end":0);if(e){return new $h(t,n)}else{return new $h(n,t)}}function Xg(t,e,i){const n=e+(i?0:-1);return Ug.includes(t.charAt(n))}function Qg(t,e,i){return e===(i?t.endOffset:0)}function Kg(t,e){return t.change(t=>{const i=t.createDocumentFragment();const n=e.getFirstRange();if(!n||n.isCollapsed){return i}const o=n.start.root;const r=n.start.getCommonPath(n.end);const s=o.getNodeByPath(r);let a;if(n.start.parent==n.end.parent){a=n}else{a=t.createRange(t.createPositionAt(s,n.start.path[r.length]),t.createPositionAt(s,n.end.path[r.length]+1))}const c=a.end.offset-a.start.offset;for(const e of a.getItems({shallow:true})){if(e.is("textProxy")){t.appendText(e.data,e.getAttributes(),i)}else{t.append(e._clone(true),i)}}if(a!=n){const e=n._getTransformedByMove(a.start,t.createPositionAt(i,0),c)[0];const o=t.createRange(t.createPositionAt(i,0),e.start);const r=t.createRange(e.end,t.createPositionAt(i,"end"));Zg(r,t);Zg(o,t)}return i})}function Zg(t,e){const i=[];Array.from(t.getItems({direction:"backward"})).map(t=>e.createRangeOn(t)).filter(e=>{const i=(e.start.isAfter(t.start)||e.start.isEqual(t.start))&&(e.end.isBefore(t.end)||e.end.isEqual(t.end));return i}).forEach(t=>{i.push(t.start.parent);e.remove(t)});i.forEach(t=>{let i=t;while(i.parent&&i.isEmpty){const t=e.createRangeOn(i);i=i.parent;e.remove(t)}})}function tp(t){t.document.registerPostFixer(e=>ep(e,t))}function ep(t,e){const i=e.document.selection;const n=e.schema;const o=[];let r=false;for(const t of i.getRanges()){const e=ip(t,n);if(e){o.push(e);r=true}else{o.push(t)}}if(r){t.setSelection(ap(o),{backward:i.isBackward})}}function ip(t,e){if(t.isCollapsed){return np(t,e)}return op(t,e)}function np(t,e){const i=t.start;const n=e.getNearestSelectionRange(i);if(!n){return null}if(!n.isCollapsed){return n}const o=n.start;if(i.isEqual(o)){return null}return new $h(o)}function op(t,e){const i=t.start;const n=t.end;const o=e.checkChild(i,"$text");const r=e.checkChild(n,"$text");const s=e.getLimitElement(i);const a=e.getLimitElement(n);if(s===a){if(o&&r){return null}if(sp(i,n,e)){const t=i.nodeAfter&&e.isObject(i.nodeAfter);const o=t?null:e.getNearestSelectionRange(i,"forward");const r=n.nodeBefore&&e.isObject(n.nodeBefore);const s=r?null:e.getNearestSelectionRange(n,"backward");const a=o?o.start:i;const c=s?s.start:n;return new $h(a,c)}}const c=s&&!s.is("rootElement");const l=a&&!a.is("rootElement");if(c||l){const t=i.nodeAfter&&n.nodeBefore&&i.nodeAfter.parent===n.nodeBefore.parent;const o=c&&(!t||!cp(i.nodeAfter,e));const r=l&&(!t||!cp(n.nodeBefore,e));let d=i;let u=n;if(o){d=qh._createBefore(rp(s,e))}if(r){u=qh._createAfter(rp(a,e))}return new $h(d,u)}return null}function rp(t,e){let i=t;let n=i;while(e.isLimit(n)&&n.parent){i=n;n=n.parent}return i}function sp(t,e,i){const n=t.nodeAfter&&!i.isLimit(t.nodeAfter)||i.checkChild(t,"$text");const o=e.nodeBefore&&!i.isLimit(e.nodeBefore)||i.checkChild(e,"$text");return n||o}function ap(t){const e=[];e.push(t.shift());for(const i of t){const t=e.pop();if(i.isIntersecting(t)){const n=t.start.isAfter(i.start)?i.start:t.start;const o=t.end.isAfter(i.end)?t.end:i.end;const r=new $h(n,o);e.push(r)}else{e.push(t);e.push(i)}}return e}function cp(t,e){return t&&e.isObject(t)}class lp{constructor(){this.markers=new Tg;this.document=new Ag(this);this.schema=new um;this._pendingChanges=[];this._currentWriter=null;["insertContent","deleteContent","modifySelection","getSelectedContent","applyOperation"].forEach(t=>this.decorate(t));this.on("applyOperation",(t,e)=>{const i=e[0];i._validate()},{priority:"highest"});this.schema.register("$root",{isLimit:true});this.schema.register("$block",{allowIn:"$root",isBlock:true});this.schema.register("$text",{allowIn:"$block",isInline:true});this.schema.register("$clipboardHolder",{allowContentOf:"$root",isLimit:true});this.schema.extend("$text",{allowIn:"$clipboardHolder"});this.schema.register("$marker");this.schema.addChildCheck((t,e)=>{if(e.name==="$marker"){return true}});tp(this)}change(t){try{if(this._pendingChanges.length===0){this._pendingChanges.push({batch:new jm,callback:t});return this._runPendingChanges()[0]}else{return t(this._currentWriter)}}catch(t){ss["b"].rethrowUnexpectedError(t,this)}}enqueueChange(t,e){try{if(typeof t==="string"){t=new jm(t)}else if(typeof t=="function"){e=t;t=new jm}this._pendingChanges.push({batch:t,callback:e});if(this._pendingChanges.length==1){this._runPendingChanges()}}catch(t){ss["b"].rethrowUnexpectedError(t,this)}}applyOperation(t){t._execute()}insertContent(t,e,i){return Lg(this,t,e,i)}deleteContent(t,e){Rg(this,t,e)}modifySelection(t,e){qg(this,t,e)}getSelectedContent(t){return Kg(this,t)}hasContent(t,e){const i=t instanceof Fh?$h._createIn(t):t;if(i.isCollapsed){return false}for(const t of this.markers.getMarkersIntersectingRange(i)){if(t.affectsData){return true}}const{ignoreWhitespaces:n=false}=e||{};for(const t of i.getItems()){if(t.is("textProxy")){if(!n){return true}else if(t.data.search(/\S/)!==-1){return true}}else if(this.schema.isObject(t)){return true}}return false}createPositionFromPath(t,e,i){return new qh(t,e,i)}createPositionAt(t,e){return qh._createAt(t,e)}createPositionAfter(t){return qh._createAfter(t)}createPositionBefore(t){return qh._createBefore(t)}createRange(t,e){return new $h(t,e)}createRangeIn(t){return $h._createIn(t)}createRangeOn(t){return $h._createOn(t)}createSelection(t,e,i){return new Kh(t,e,i)}createBatch(t){return new jm(t)}createOperationFromJSON(t){return Sg.fromJSON(t,this.document)}destroy(){this.document.destroy();this.stopListening()}_runPendingChanges(){const t=[];this.fire("_beforeChanges");while(this._pendingChanges.length){const e=this._pendingChanges[0].batch;this._currentWriter=new ag(this,e);const i=this._pendingChanges[0].callback(this._currentWriter);t.push(i);this.document._handleChangeBlock(this._currentWriter);this._pendingChanges.shift();this._currentWriter=null}this.fire("_afterChanges");return t}}vs(lp,Jc);class dp{constructor(){this._listener=Object.create(Ud)}listenTo(t){this._listener.listenTo(t,"keydown",(t,e)=>{this._listener.fire("_keydown:"+zl(e),e)})}set(t,e,i={}){const n=Rl(t);const o=i.priority;this._listener.listenTo(this._listener,"_keydown:"+n,(t,i)=>{e(i,()=>{i.preventDefault();i.stopPropagation();t.stop()});t.return=true},{priority:o})}press(t){return!!this._listener.fire("_keydown:"+zl(t),t)}destroy(){this._listener.stopListening()}}class up extends dp{constructor(t){super();this.editor=t}set(t,e,i={}){if(typeof e=="string"){const t=e;e=(e,i)=>{this.editor.execute(t);i()}}super.set(t,e,i)}}class hp{constructor(t={}){this._context=t.context||new Ns({language:t.language});this._context._addEditor(this,!t.context);const e=Array.from(this.constructor.builtinPlugins||[]);this.config=new Jr(t,this.constructor.defaultConfig);this.config.define("plugins",e);this.config.define(this._context._getEditorConfig());this.plugins=new xs(this,e,this._context.plugins);this.locale=this._context.locale;this.t=this.locale.t;this.commands=new cm;this.set("state","initializing");this.once("ready",()=>this.state="ready",{priority:"high"});this.once("destroy",()=>this.state="destroyed",{priority:"high"});this.set("isReadOnly",false);this.model=new lp;const i=new Oc;this.data=new Nm(this.model,i);this.editing=new am(this.model,i);this.editing.view.document.bind("isReadOnly").to(this);this.conversion=new Lm([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 up(this);this.keystrokes.listenTo(this.editing.view.document)}initPlugins(){const t=this.config;const e=t.get("plugins");const i=t.get("removePlugins")||[];const n=t.get("extraPlugins")||[];return this.plugins.init(e.concat(n),i)}destroy(){let t=Promise.resolve();if(this.state=="initializing"){t=new Promise(t=>this.once("ready",t))}return t.then(()=>{this.fire("destroy");this.stopListening();this.commands.destroy()}).then(()=>this.plugins.destroy()).then(()=>{this.model.destroy();this.data.destroy();this.editing.destroy();this.keystrokes.destroy()}).then(()=>this._context._removeEditor(this))}execute(...t){try{this.commands.execute(...t)}catch(t){ss["b"].rethrowUnexpectedError(t,this)}}}vs(hp,Jc);const fp={setData(t){this.data.set(t)},getData(t){return this.data.get(t)}};var mp=fp;function gp(t,e){if(t instanceof HTMLTextAreaElement){t.value=e}t.innerHTML=e}const pp={updateSourceElement(){if(!this.sourceElement){throw new ss["b"]("editor-missing-sourceelement: Cannot update the source element of a detached editor.",this)}gp(this.sourceElement,this.data.get())}};var bp=pp;function wp(t){if(!mt(t.updateSourceElement)){throw new ss["b"]("attachtoform-missing-elementapi-interface: Editor passed to attachToForm() must implement ElementApi.",t)}const e=t.sourceElement;if(e&&e.tagName.toLowerCase()==="textarea"&&e.form){let i;const n=e.form;const o=()=>t.updateSourceElement();if(mt(n.submit)){i=n.submit;n.submit=()=>{o();i.apply(n)}}n.addEventListener("submit",o);t.on("destroy",()=>{n.removeEventListener("submit",o);if(i){n.submit=i}})}}class _p{getHtml(t){const e=document.implementation.createHTMLDocument("");const i=e.createElement("div");i.appendChild(t);return i.innerHTML}}class kp{constructor(t){this._domParser=new DOMParser;this._domConverter=new jd(t,{blockFillerMode:"nbsp"});this._htmlWriter=new _p}toData(t){const e=this._domConverter.viewToDom(t,document);return this._htmlWriter.getHtml(e)}toView(t){const e=this._toDom(t);return this._domConverter.domToView(e)}_toDom(t){const e=this._domParser.parseFromString(t,"text/html");const i=e.createDocumentFragment();const n=e.body.childNodes;while(n.length>0){i.appendChild(n[0])}return i}}class vp{constructor(t){this.editor=t;this._components=new Map}*names(){for(const t of this._components.values()){yield t.originalName}}add(t,e){if(this.has(t)){throw new ss["b"]("componentfactory-item-exists: The item already exists in the component factory.",this,{name:t})}this._components.set(yp(t),{callback:e,originalName:t})}create(t){if(!this.has(t)){throw new ss["b"]("componentfactory-item-missing: The required component is not registered in the factory.",this,{name:t})}return this._components.get(yp(t)).callback(this.editor.locale)}has(t){return this._components.has(yp(t))}}function yp(t){return String(t).toLowerCase()}class xp{constructor(){this.set("isFocused",false);this.set("focusedElement",null);this._elements=new Set;this._nextEventLoopTimeout=null}add(t){if(this._elements.has(t)){throw new ss["b"]("focusTracker-add-element-already-exist",this)}this.listenTo(t,"focus",()=>this._focus(t),{useCapture:true});this.listenTo(t,"blur",()=>this._blur(),{useCapture:true});this._elements.add(t)}remove(t){if(t===this.focusedElement){this._blur(t)}if(this._elements.has(t)){this.stopListening(t);this._elements.delete(t)}}destroy(){this.stopListening()}_focus(t){clearTimeout(this._nextEventLoopTimeout);this.focusedElement=t;this.isFocused=true}_blur(){clearTimeout(this._nextEventLoopTimeout);this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null;this.isFocused=false},0)}}vs(xp,Ud);vs(xp,Jc);class Ap{constructor(t){this.editor=t;this.componentFactory=new vp(t);this.focusTracker=new xp;this._editableElementsMap=new Map;this.listenTo(t.editing.view.document,"layoutChanged",()=>this.update())}get element(){return null}update(){this.fire("update")}destroy(){this.stopListening();this.focusTracker.destroy();for(const t of this._editableElementsMap.values()){t.ckeditorInstance=null}this._editableElementsMap=new Map}setEditableElement(t,e){this._editableElementsMap.set(t,e);if(!e.ckeditorInstance){e.ckeditorInstance=this.editor}}getEditableElement(t="main"){return this._editableElementsMap.get(t)}getEditableElementsNames(){return this._editableElementsMap.keys()}get _editableElements(){console.warn("editor-ui-deprecated-editable-elements: "+"The EditorUI#_editableElements property has been deprecated and will be removed in the near future.",{editorUI:this});return this._editableElementsMap}}vs(Ap,ds);function Cp({origin:t,originKeystrokeHandler:e,originFocusTracker:i,toolbar:n,beforeFocus:o,afterBlur:r}){i.add(n.element);e.set("Alt+F10",(t,e)=>{if(i.isFocused&&!n.focusTracker.isFocused){if(o){o()}n.focus();e()}});n.keystrokes.set("Esc",(e,i)=>{if(n.focusTracker.isFocused){t.focus();if(r){r()}i()}})}function Tp(t){if(Array.isArray(t)){return{items:t}}if(!t){return{items:[]}}return Object.assign({items:[]},t)}var Ep=i(17);const Mp=new WeakMap;function Pp(t){const{view:e,element:i,text:n,isDirectHost:o=true}=t;const r=e.document;if(!Mp.has(r)){Mp.set(r,new Map);r.registerPostFixer(t=>Lp(r,t))}Mp.get(r).set(i,{text:n,isDirectHost:o});e.change(t=>Lp(r,t))}function Sp(t,e){const i=e.document;t.change(t=>{if(!Mp.has(i)){return}const n=Mp.get(i);const o=n.get(e);t.removeAttribute("data-placeholder",o.hostElement);Np(t,o.hostElement);n.delete(e)})}function Ip(t,e){if(!e.hasClass("ck-placeholder")){t.addClass("ck-placeholder",e);return true}return false}function Np(t,e){if(e.hasClass("ck-placeholder")){t.removeClass("ck-placeholder",e);return true}return false}function Op(t){if(!t.isAttached()){return false}const e=!Array.from(t.getChildren()).some(t=>!t.is("uiElement"));const i=t.document;if(!i.isFocused&&e){return true}const n=i.selection;const o=n.anchor;if(e&&o&&o.parent!==t){return true}return false}function Lp(t,e){const i=Mp.get(t);let n=false;for(const[t,o]of i){if(zp(e,t,o)){n=true}}return n}function zp(t,e,i){const{text:n,isDirectHost:o}=i;const r=o?e:Rp(e);let s=false;if(!r){return false}i.hostElement=r;if(r.getAttribute("data-placeholder")!==n){t.setAttribute("data-placeholder",n,r);s=true}if(Op(r)){if(Ip(t,r)){s=true}}else if(Np(t,r)){s=true}return s}function Rp(t){if(t.childCount===1){const e=t.getChild(0);if(e.is("element")&&!e.is("uiElement")){return e}}return null}class jp{constructor(){this._replacedElements=[]}replace(t,e){this._replacedElements.push({element:t,newElement:e});t.style.display="none";if(e){t.parentNode.insertBefore(e,t.nextSibling)}}restore(){this._replacedElements.forEach(({element:t,newElement:e})=>{t.style.display="";if(e){e.remove()}});this._replacedElements=[]}}class Dp extends Ap{constructor(t,e){super(t);this.view=e;this._toolbarConfig=Tp(t.config.get("toolbar"));this._elementReplacer=new jp}get element(){return this.view.element}init(t){const e=this.editor;const i=this.view;const n=e.editing.view;const o=i.editable;const r=n.document.getRoot();o.name=r.rootName;i.render();const s=o.element;this.setEditableElement(o.name,s);this.focusTracker.add(s);i.editable.bind("isFocused").to(this.focusTracker);n.attachDomRoot(s);if(t){this._elementReplacer.replace(t,this.element)}this._initPlaceholder();this._initToolbar();this.fire("ready")}destroy(){const t=this.view;const e=this.editor.editing.view;this._elementReplacer.restore();e.detachDomRoot(t.editable.name);t.destroy();super.destroy()}_initToolbar(){const t=this.editor;const e=this.view;const i=t.editing.view;e.stickyPanel.bind("isActive").to(this.focusTracker,"isFocused");e.stickyPanel.limiterElement=e.element;if(this._toolbarConfig.viewportTopOffset){e.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset}e.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory);Cp({origin:i,originFocusTracker:this.focusTracker,originKeystrokeHandler:t.keystrokes,toolbar:e.toolbar})}_initPlaceholder(){const t=this.editor;const e=t.editing.view;const i=e.document.getRoot();const n=t.sourceElement;const o=t.config.get("placeholder")||n&&n.tagName.toLowerCase()==="textarea"&&n.getAttribute("placeholder");if(o){Pp({view:e,element:i,text:o,isDirectHost:false})}}}class Bp extends ys{constructor(t){super({idProperty:"viewUid"});this.on("add",(t,e,i)=>{if(!e.isRendered){e.render()}if(e.element&&this._parentElement){this._parentElement.insertBefore(e.element,this._parentElement.children[i])}});this.on("remove",(t,e)=>{if(e.element&&this._parentElement){e.element.remove()}});this.locale=t;this._parentElement=null}destroy(){this.map(t=>t.destroy())}setParent(t){this._parentElement=t}delegate(...t){if(!t.length||!Vp(t)){throw new ss["b"]("ui-viewcollection-delegate-wrong-events: All event names must be strings.",this)}return{to:e=>{for(const i of this){for(const n of t){i.delegate(n).to(e)}}this.on("add",(i,n)=>{for(const i of t){n.delegate(i).to(e)}});this.on("remove",(i,n)=>{for(const i of t){n.stopDelegating(i,e)}})}}}}function Vp(t){return t.every(t=>typeof t=="string")}const Fp="http://www.w3.org/1999/xhtml";class Hp{constructor(t){Object.assign(this,Zp(Kp(t)));this._isRendered=false;this._revertData=null}render(){const t=this._renderNode({intoFragment:true});this._isRendered=true;return t}apply(t){this._revertData=hb();this._renderNode({node:t,isApplying:true,revertData:this._revertData});return t}revert(t){if(!this._revertData){throw new ss["b"]("ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.",[this,t])}this._revertTemplateFromNode(t,this._revertData)}*getViews(){function*t(e){if(e.children){for(const i of e.children){if(lb(i)){yield i}else if(db(i)){yield*t(i)}}}}yield*t(this)}static bind(t,e){return{to(i,n){return new Up({eventNameOrFunction:i,attribute:i,observable:t,emitter:e,callback:n})},if(i,n,o){return new qp({observable:t,emitter:e,attribute:i,valueIfTrue:n,callback:o})}}}static extend(t,e){if(t._isRendered){throw new ss["b"]("template-extend-render: Attempting to extend a template which has already been rendered.",[this,t])}ab(t,Zp(Kp(e)))}_renderNode(t){let e;if(t.node){e=this.tag&&this.text}else{e=this.tag?this.text:!this.text}if(e){throw new ss["b"]('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.',this)}if(this.text){return this._renderText(t)}else{return this._renderElement(t)}}_renderElement(t){let e=t.node;if(!e){e=t.node=document.createElementNS(this.ns||Fp,this.tag)}this._renderAttributes(t);this._renderElementChildren(t);this._setUpListeners(t);return e}_renderText(t){let e=t.node;if(e){t.revertData.text=e.textContent}else{e=t.node=document.createTextNode("")}if($p(this.text)){this._bindToObservable({schema:this.text,updater:Jp(e),data:t})}else{e.textContent=this.text.join("")}return e}_renderAttributes(t){let e,i,n,o;if(!this.attributes){return}const r=t.node;const s=t.revertData;for(e in this.attributes){n=r.getAttribute(e);i=this.attributes[e];if(s){s.attributes[e]=n}o=ct(i[0])&&i[0].ns?i[0].ns:null;if($p(i)){const a=o?i[0].value:i;if(s&&fb(e)){a.unshift(n)}this._bindToObservable({schema:a,updater:Xp(r,e,o),data:t})}else if(e=="style"&&typeof i[0]!=="string"){this._renderStyleAttribute(i[0],t)}else{if(s&&n&&fb(e)){i.unshift(n)}i=i.map(t=>t?t.value||t:t).reduce((t,e)=>t.concat(e),[]).reduce(rb,"");if(!cb(i)){r.setAttributeNS(o,e,i)}}}}_renderStyleAttribute(t,e){const i=e.node;for(const n in t){const o=t[n];if($p(o)){this._bindToObservable({schema:[o],updater:Qp(i,n),data:e})}else{i.style[n]=o}}}_renderElementChildren(t){const e=t.node;const i=t.intoFragment?document.createDocumentFragment():e;const n=t.isApplying;let o=0;for(const r of this.children){if(ub(r)){if(!n){r.setParent(e);for(const t of r){i.appendChild(t.element)}}}else if(lb(r)){if(!n){if(!r.isRendered){r.render()}i.appendChild(r.element)}}else if(xd(r)){i.appendChild(r)}else{if(n){const e=t.revertData;const n=hb();e.children.push(n);r._renderNode({node:i.childNodes[o++],isApplying:true,revertData:n})}else{i.appendChild(r.render())}}}if(t.intoFragment){e.appendChild(i)}}_setUpListeners(t){if(!this.eventListeners){return}for(const e in this.eventListeners){const i=this.eventListeners[e].map(i=>{const[n,o]=e.split("@");return i.activateDomEventListener(n,o,t)});if(t.revertData){t.revertData.bindings.push(i)}}}_bindToObservable({schema:t,updater:e,data:i}){const n=i.revertData;Gp(t,e,i);const o=t.filter(t=>!cb(t)).filter(t=>t.observable).map(n=>n.activateAttributeListener(t,e,i));if(n){n.bindings.push(o)}}_revertTemplateFromNode(t,e){for(const t of e.bindings){for(const e of t){e()}}if(e.text){t.textContent=e.text;return}for(const i in e.attributes){const n=e.attributes[i];if(n===null){t.removeAttribute(i)}else{t.setAttribute(i,n)}}for(let i=0;iGp(t,e,i);this.emitter.listenTo(this.observable,"change:"+this.attribute,n);return()=>{this.emitter.stopListening(this.observable,"change:"+this.attribute,n)}}}class Up extends Wp{activateDomEventListener(t,e,i){const n=(t,i)=>{if(!e||i.target.matches(e)){if(typeof this.eventNameOrFunction=="function"){this.eventNameOrFunction(i)}else{this.observable.fire(this.eventNameOrFunction,i)}}};this.emitter.listenTo(i.node,t,n);return()=>{this.emitter.stopListening(i.node,t,n)}}}class qp extends Wp{getValue(t){const e=super.getValue(t);return cb(e)?false:this.valueIfTrue||true}}function $p(t){if(!t){return false}if(t.value){t=t.value}if(Array.isArray(t)){return t.some($p)}else if(t instanceof Wp){return true}return false}function Yp(t,e){return t.map(t=>{if(t instanceof Wp){return t.getValue(e)}return t})}function Gp(t,e,{node:i}){let n=Yp(t,i);if(t.length==1&&t[0]instanceof qp){n=n[0]}else{n=n.reduce(rb,"")}if(cb(n)){e.remove()}else{e.set(n)}}function Jp(t){return{set(e){t.textContent=e},remove(){t.textContent=""}}}function Xp(t,e,i){return{set(n){t.setAttributeNS(i,e,n)},remove(){t.removeAttributeNS(i,e)}}}function Qp(t,e){return{set(i){t.style[e]=i},remove(){t.style[e]=null}}}function Kp(t){const e=$r(t,t=>{if(t&&(t instanceof Wp||db(t)||lb(t)||ub(t))){return t}});return e}function Zp(t){if(typeof t=="string"){t=ib(t)}else if(t.text){nb(t)}if(t.on){t.eventListeners=eb(t.on);delete t.on}if(!t.text){if(t.attributes){tb(t.attributes)}const e=[];if(t.children){if(ub(t.children)){e.push(t.children)}else{for(const i of t.children){if(db(i)||lb(i)||xd(i)){e.push(i)}else{e.push(new Hp(i))}}}}t.children=e}return t}function tb(t){for(const e in t){if(t[e].value){t[e].value=[].concat(t[e].value)}ob(t,e)}}function eb(t){for(const e in t){ob(t,e)}return t}function ib(t){return{text:[t]}}function nb(t){if(!Array.isArray(t.text)){t.text=[t.text]}}function ob(t,e){if(!Array.isArray(t[e])){t[e]=[t[e]]}}function rb(t,e){if(cb(e)){return t}else if(cb(t)){return e}else{return`${t} ${e}`}}function sb(t,e){for(const i in e){if(t[i]){t[i].push(...e[i])}else{t[i]=e[i]}}}function ab(t,e){if(e.attributes){if(!t.attributes){t.attributes={}}sb(t.attributes,e.attributes)}if(e.eventListeners){if(!t.eventListeners){t.eventListeners={}}sb(t.eventListeners,e.eventListeners)}if(e.text){t.text.push(...e.text)}if(e.children&&e.children.length){if(t.children.length!=e.children.length){throw new ss["b"]("ui-template-extend-children-mismatch: The number of children in extended definition does not match.",t)}let i=0;for(const n of e.children){ab(t.children[i++],n)}}}function cb(t){return!t&&t!==0}function lb(t){return t instanceof gb}function db(t){return t instanceof Hp}function ub(t){return t instanceof Bp}function hb(){return{children:[],bindings:[],attributes:{}}}function fb(t){return t=="class"||t=="style"}var mb=i(19);class gb{constructor(t){this.element=null;this.isRendered=false;this.locale=t;this.t=t&&t.t;this._viewCollections=new ys;this._unboundChildren=this.createCollection();this._viewCollections.on("add",(e,i)=>{i.locale=t});this.decorate("render")}get bindTemplate(){if(this._bindTemplate){return this._bindTemplate}return this._bindTemplate=Hp.bind(this,this)}createCollection(){const t=new Bp;this._viewCollections.add(t);return t}registerChild(t){if(!Fs(t)){t=[t]}for(const e of t){this._unboundChildren.add(e)}}deregisterChild(t){if(!Fs(t)){t=[t]}for(const e of t){this._unboundChildren.remove(e)}}setTemplate(t){this.template=new Hp(t)}extendTemplate(t){Hp.extend(this.template,t)}render(){if(this.isRendered){throw new ss["b"]("ui-view-render-already-rendered: This View has already been rendered.",this)}if(this.template){this.element=this.template.render();this.registerChild(this.template.getViews())}this.isRendered=true}destroy(){this.stopListening();this._viewCollections.map(t=>t.destroy());if(this.template&&this.template._revertData){this.template.revert(this.element)}}}vs(gb,Ud);vs(gb,Jc);var pb="[object String]";function bb(t){return typeof t=="string"||!Je(t)&&T(t)&&k(t)==pb}var wb=bb;function _b(t,e,i={},n=[]){const o=i&&i.xmlns;const r=o?t.createElementNS(o,e):t.createElement(e);for(const t in i){r.setAttribute(t,i[t])}if(wb(n)||!Fs(n)){n=[n]}for(let e of n){if(wb(e)){e=t.createTextNode(e)}r.appendChild(e)}return r}class kb extends Bp{attachToDom(){this._bodyCollectionContainer=new Hp({tag:"div",attributes:{class:["ck","ck-reset_all","ck-body","ck-rounded-corners"],dir:this.locale.uiLanguageDirection},children:this}).render();let t=document.querySelector(".ck-body-wrapper");if(!t){t=_b(document,"div",{class:"ck-body-wrapper"});document.body.appendChild(t)}t.appendChild(this._bodyCollectionContainer)}detachFromDom(){super.destroy();if(this._bodyCollectionContainer){this._bodyCollectionContainer.remove()}const t=document.querySelector(".ck-body-wrapper");if(t&&t.childElementCount==0){t.remove()}}}var vb=i(21);class yb extends gb{constructor(t){super(t);this.body=new kb(t)}render(){super.render();this.body.attachToDom()}destroy(){this.body.detachFromDom();return super.destroy()}}var xb=i(23);class Ab extends gb{constructor(t){super(t);this.set("text");this.set("for");this.id=`ck-editor__label_${is()}`;const e=this.bindTemplate;this.setTemplate({tag:"label",attributes:{class:["ck","ck-label"],id:this.id,for:e.to("for")},children:[{text:e.to("text")}]})}}class Cb extends yb{constructor(t){super(t);this.top=this.createCollection();this.main=this.createCollection();this._voiceLabelView=this._createVoiceLabel();this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-editor","ck-rounded-corners"],role:"application",dir:t.uiLanguageDirection,lang:t.uiLanguage,"aria-labelledby":this._voiceLabelView.id},children:[this._voiceLabelView,{tag:"div",attributes:{class:["ck","ck-editor__top","ck-reset_all"],role:"presentation"},children:this.top},{tag:"div",attributes:{class:["ck","ck-editor__main"],role:"presentation"},children:this.main}]})}_createVoiceLabel(){const t=this.t;const e=new Ab;e.text=t("ku");e.extendTemplate({attributes:{class:"ck-voice-label"}});return e}}class Tb extends gb{constructor(t,e,i){super(t);this.setTemplate({tag:"div",attributes:{class:["ck","ck-content","ck-editor__editable","ck-rounded-corners"],lang:t.contentLanguage,dir:t.contentLanguageDirection}});this.name=null;this.set("isFocused",false);this._editableElement=i;this._hasExternalElement=!!this._editableElement;this._editingView=e}render(){super.render();if(this._hasExternalElement){this.template.apply(this.element=this._editableElement)}else{this._editableElement=this.element}this.on("change:isFocused",()=>this._updateIsFocusedClasses());this._updateIsFocusedClasses()}destroy(){if(this._hasExternalElement){this.template.revert(this._editableElement)}super.destroy()}_updateIsFocusedClasses(){const t=this._editingView;if(t.isRenderingInProgress){i(this)}else{e(this)}function e(e){t.change(i=>{const n=t.document.getRoot(e.name);i.addClass(e.isFocused?"ck-focused":"ck-blurred",n);i.removeClass(e.isFocused?"ck-blurred":"ck-focused",n)})}function i(n){t.once("change:isRenderingInProgress",(t,o,r)=>{if(!r){e(n)}else{i(n)}})}}}class Eb extends Tb{constructor(t,e,i){super(t,e,i);this.extendTemplate({attributes:{role:"textbox",class:"ck-editor__editable_inline"}})}render(){super.render();const t=this._editingView;const e=this.t;t.change(i=>{const n=t.document.getRoot(this.name);i.setAttribute("aria-label",e("nk",[this.name]),n)})}}function Mb(t){return e=>e+t}var Pb=i(25);const Sb=Mb("px");class Ib extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set("isActive",false);this.set("isSticky",false);this.set("limiterElement",null);this.set("limiterBottomOffset",50);this.set("viewportTopOffset",0);this.set("_marginLeft",null);this.set("_isStickyToTheLimiter",false);this.set("_hasViewportTopOffset",false);this.content=this.createCollection();this._contentPanelPlaceholder=new Hp({tag:"div",attributes:{class:["ck","ck-sticky-panel__placeholder"],style:{display:e.to("isSticky",t=>t?"block":"none"),height:e.to("isSticky",t=>t?Sb(this._panelRect.height):null)}}}).render();this._contentPanel=new Hp({tag:"div",attributes:{class:["ck","ck-sticky-panel__content",e.if("isSticky","ck-sticky-panel__content_sticky"),e.if("_isStickyToTheLimiter","ck-sticky-panel__content_sticky_bottom-limit")],style:{width:e.to("isSticky",t=>t?Sb(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:e.to("_hasViewportTopOffset",t=>t?Sb(this.viewportTopOffset):null),bottom:e.to("_isStickyToTheLimiter",t=>t?Sb(this.limiterBottomOffset):null),marginLeft:e.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(Nd.window,"scroll",()=>{this._checkIfShouldBeSticky()});this.listenTo(this,"change:isActive",()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const t=this._panelRect=this._contentPanel.getBoundingClientRect();let e;if(!this.limiterElement){this.isSticky=false}else{e=this._limiterRect=this.limiterElement.getBoundingClientRect();this.isSticky=this.isActive&&e.top{this[e]();i()})}}}}get first(){return this.focusables.find(Ob)||null}get last(){return this.focusables.filter(Ob).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let t=null;if(this.focusTracker.focusedElement===null){return null}this.focusables.find((e,i)=>{const n=e.element===this.focusTracker.focusedElement;if(n){t=i}return n});return t}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(t){if(t){t.focus()}}_getFocusableItem(t){const e=this.current;const i=this.focusables.length;if(!i){return null}if(e===null){return this[t===1?"first":"last"]}let n=(e+i+t)%i;do{const e=this.focusables.get(n);if(Ob(e)){return e}n=(n+i+t)%i}while(n!==e);return null}}function Ob(t){return!!(t.focus&&Nd.window.getComputedStyle(t.element).display!="none")}class Lb extends gb{constructor(t){super(t);this.setTemplate({tag:"span",attributes:{class:["ck","ck-toolbar__separator"]}})}}const zb=100;class Rb{constructor(t,e){if(!Rb._observerInstance){Rb._createObserver()}this._element=t;this._callback=e;Rb._addElementCallback(t,e);Rb._observerInstance.observe(t)}destroy(){Rb._deleteElementCallback(this._element,this._callback)}static _addElementCallback(t,e){if(!Rb._elementCallbacks){Rb._elementCallbacks=new Map}let i=Rb._elementCallbacks.get(t);if(!i){i=new Set;Rb._elementCallbacks.set(t,i)}i.add(e)}static _deleteElementCallback(t,e){const i=Rb._getElementCallbacks(t);if(i){i.delete(e);if(!i.size){Rb._elementCallbacks.delete(t);Rb._observerInstance.unobserve(t)}}if(Rb._elementCallbacks&&!Rb._elementCallbacks.size){Rb._observerInstance=null;Rb._elementCallbacks=null}}static _getElementCallbacks(t){if(!Rb._elementCallbacks){return null}return Rb._elementCallbacks.get(t)}static _createObserver(){let t;if(typeof Nd.window.ResizeObserver==="function"){t=Nd.window.ResizeObserver}else{t=jb}Rb._observerInstance=new t(t=>{for(const e of t){const t=Rb._getElementCallbacks(e.target);if(t){for(const i of t){i(e)}}}})}}Rb._observerInstance=null;Rb._elementCallbacks=null;class jb{constructor(t){this._callback=t;this._elements=new Set;this._previousRects=new Map;this._periodicCheckTimeout=null}observe(t){this._elements.add(t);this._checkElementRectsAndExecuteCallback();if(this._elements.size===1){this._startPeriodicCheck()}}unobserve(t){this._elements.delete(t);this._previousRects.delete(t);if(!this._elements.size){this._stopPeriodicCheck()}}_startPeriodicCheck(){const t=()=>{this._checkElementRectsAndExecuteCallback();this._periodicCheckTimeout=setTimeout(t,zb)};this.listenTo(Nd.window,"resize",()=>{this._checkElementRectsAndExecuteCallback()});this._periodicCheckTimeout=setTimeout(t,zb)}_stopPeriodicCheck(){clearTimeout(this._periodicCheckTimeout);this.stopListening();this._previousRects.clear()}_checkElementRectsAndExecuteCallback(){const t=[];for(const e of this._elements){if(this._hasRectChanged(e)){t.push({target:e,contentRect:this._previousRects.get(e)})}}if(t.length){this._callback(t)}}_hasRectChanged(t){if(!t.ownerDocument.body.contains(t)){return false}const e=new vh(t);const i=this._previousRects.get(t);const n=!i||!i.isEqual(e);this._previousRects.set(t,e);return n}}vs(jb,Ud);function Db(t){return t.bindTemplate.to(e=>{if(e.target===t.element){e.preventDefault()}})}class Bb extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set("isVisible",false);this.set("position","se");this.children=this.createCollection();this.setTemplate({tag:"div",attributes:{class:["ck","ck-reset","ck-dropdown__panel",e.to("position",t=>`ck-dropdown__panel_${t}`),e.if("isVisible","ck-dropdown__panel-visible")]},children:this.children,on:{selectstart:e.to(t=>t.preventDefault())}})}focus(){if(this.children.length){this.children.first.focus()}}focusLast(){if(this.children.length){const t=this.children.last;if(typeof t.focusLast==="function"){t.focusLast()}else{t.focus()}}}}var Vb=i(27);function Fb(t){while(t&&t.tagName.toLowerCase()!="html"){if(Nd.window.getComputedStyle(t).position!="static"){return t}t=t.parentElement}return null}function Hb({element:t,target:e,positions:i,limiter:n,fitInViewport:o}){if(mt(e)){e=e()}if(mt(n)){n=n()}const r=Fb(t.parentElement);const s=new vh(t);const a=new vh(e);let c;let l;if(!n&&!o){[l,c]=Wb(i[0],a,s)}else{const t=n&&new vh(n).getVisible();const e=o&&new vh(Nd.window);[l,c]=Ub(i,a,s,t,e)||Wb(i[0],a,s)}let{left:d,top:u}=qb(c);if(r){const t=qb(new vh(r));const e=_h(r);d-=t.left;u-=t.top;d+=r.scrollLeft;u+=r.scrollTop;d-=e.left;u-=e.top}return{left:d,top:u,name:l}}function Wb(t,e,i){const{left:n,top:o,name:r}=t(e,i);return[r,i.clone().moveTo(n,o)]}function Ub(t,e,i,n,o){let r=0;let s=0;let a;let c;const l=i.getArea();t.some(t=>{const[d,u]=Wb(t,e,i);let h;let f;if(n){if(o){const t=n.getIntersection(o);if(t){h=t.getIntersectionArea(u)}else{h=0}}else{h=n.getIntersectionArea(u)}}if(o){f=o.getIntersectionArea(u)}if(o&&!n){if(f>s){m()}}else if(!o&&n){if(h>r){m()}}else{if(f>s&&h>=r){m()}else if(f>=s&&h>r){m()}}function m(){s=f;r=h;a=u;c=d}return h===l});return a?[c,a]:null}function qb({left:t,top:e}){const{scrollX:i,scrollY:n}=Nd.window;return{left:t+i,top:e+n}}class $b extends gb{constructor(t,e,i){super(t);const n=this.bindTemplate;this.buttonView=e;this.panelView=i;this.set("isOpen",false);this.set("isEnabled",true);this.set("class");this.set("id");this.set("panelPosition","auto");this.focusTracker=new xp;this.keystrokes=new dp;this.setTemplate({tag:"div",attributes:{class:["ck","ck-dropdown",n.to("class"),n.if("isEnabled","ck-disabled",t=>!t)],id:n.to("id"),"aria-describedby":n.to("ariaDescribedById")},children:[e,i]});e.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",()=>{if(!this.isOpen){return}if(this.panelPosition==="auto"){this.panelView.position=$b._getOptimalPosition({element:this.panelView.element,target:this.buttonView.element,fitInViewport:true,positions:this._panelPositions}).name}else{this.panelView.position=this.panelPosition}});this.keystrokes.listenTo(this.element);this.focusTracker.add(this.element);const t=(t,e)=>{if(this.isOpen){this.buttonView.focus();this.isOpen=false;e()}};this.keystrokes.set("arrowdown",(t,e)=>{if(this.buttonView.isEnabled&&!this.isOpen){this.isOpen=true;e()}});this.keystrokes.set("arrowright",(t,e)=>{if(this.isOpen){e()}});this.keystrokes.set("arrowleft",t);this.keystrokes.set("esc",t)}focus(){this.buttonView.focus()}get _panelPositions(){const{southEast:t,southWest:e,northEast:i,northWest:n}=$b.defaultPanelPositions;if(this.locale.uiLanguageDirection==="ltr"){return[t,e,i,n]}else{return[e,t,n,i]}}}$b.defaultPanelPositions={southEast:t=>({top:t.bottom,left:t.left,name:"se"}),southWest:(t,e)=>({top:t.bottom,left:t.left-e.width+t.width,name:"sw"}),northEast:(t,e)=>({top:t.top-e.height,left:t.left,name:"ne"}),northWest:(t,e)=>({top:t.bottom-e.height,left:t.left-e.width+t.width,name:"nw"})};$b._getOptimalPosition=Hb;var Yb=i(29);class Gb extends gb{constructor(){super();const t=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:t.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 t=(new DOMParser).parseFromString(this.content.trim(),"image/svg+xml");const e=t.querySelector("svg");const i=e.getAttribute("viewBox");if(i){this.viewBox=i}this.element.innerHTML="";while(e.childNodes.length>0){this.element.appendChild(e.childNodes[0])}}}_colorFillPaths(){if(this.fillColor){this.element.querySelectorAll(".ck-icon__fill").forEach(t=>{t.style.fill=this.fillColor})}}}var Jb=i(31);class Xb extends gb{constructor(t){super(t);this.set("text","");this.set("position","s");const e=this.bindTemplate;this.setTemplate({tag:"span",attributes:{class:["ck","ck-tooltip",e.to("position",t=>"ck-tooltip_"+t),e.if("text","ck-hidden",t=>!t.trim())]},children:[{tag:"span",attributes:{class:["ck","ck-tooltip__text"]},children:[{text:e.to("text")}]}]})}}var Qb=i(33);class Kb extends gb{constructor(t){super(t);const e=this.bindTemplate;const i=is();this.set("class");this.set("labelStyle");this.set("icon");this.set("isEnabled",true);this.set("isOn",false);this.set("isVisible",true);this.set("isToggleable",false);this.set("keystroke");this.set("label");this.set("tabindex",-1);this.set("tooltip");this.set("tooltipPosition","s");this.set("type","button");this.set("withText",false);this.set("withKeystroke",false);this.children=this.createCollection();this.tooltipView=this._createTooltipView();this.labelView=this._createLabelView(i);this.iconView=new Gb;this.iconView.extendTemplate({attributes:{class:"ck-button__icon"}});this.keystrokeView=this._createKeystrokeView();this.bind("_tooltipString").to(this,"tooltip",this,"label",this,"keystroke",this._getTooltipString.bind(this));this.setTemplate({tag:"button",attributes:{class:["ck","ck-button",e.to("class"),e.if("isEnabled","ck-disabled",t=>!t),e.if("isVisible","ck-hidden",t=>!t),e.to("isOn",t=>t?"ck-on":"ck-off"),e.if("withText","ck-button_with-text"),e.if("withKeystroke","ck-button_with-keystroke")],type:e.to("type",t=>t?t:"button"),tabindex:e.to("tabindex"),"aria-labelledby":`ck-editor__aria-label_${i}`,"aria-disabled":e.if("isEnabled",true,t=>!t),"aria-pressed":e.to("isOn",t=>this.isToggleable?String(t):false)},children:this.children,on:{mousedown:e.to(t=>{t.preventDefault()}),click:e.to(t=>{if(this.isEnabled){this.fire("execute")}else{t.preventDefault()}})}})}render(){super.render();if(this.icon){this.iconView.bind("content").to(this,"icon");this.children.add(this.iconView)}this.children.add(this.tooltipView);this.children.add(this.labelView);if(this.withKeystroke){this.children.add(this.keystrokeView)}}focus(){this.element.focus()}_createTooltipView(){const t=new Xb;t.bind("text").to(this,"_tooltipString");t.bind("position").to(this,"tooltipPosition");return t}_createLabelView(t){const e=new gb;const i=this.bindTemplate;e.setTemplate({tag:"span",attributes:{class:["ck","ck-button__label"],style:i.to("labelStyle"),id:`ck-editor__aria-label_${t}`},children:[{text:this.bindTemplate.to("label")}]});return e}_createKeystrokeView(){const t=new gb;t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__keystroke"]},children:[{text:this.bindTemplate.to("keystroke",t=>jl(t))}]});return t}_getTooltipString(t,e,i){if(t){if(typeof t=="string"){return t}else{if(i){i=jl(i)}if(t instanceof Function){return t(e,i)}else{return`${e}${i?` (${i})`:""}`}}}return""}}var Zb='';class tw extends Kb{constructor(t){super(t);this.arrowView=this._createArrowView();this.extendTemplate({attributes:{"aria-haspopup":true}});this.delegate("execute").to(this,"open")}render(){super.render();this.children.add(this.arrowView)}_createArrowView(){const t=new Gb;t.content=Zb;t.extendTemplate({attributes:{class:"ck-dropdown__arrow"}});return t}}var ew=i(35);class iw extends gb{constructor(){super();this.items=this.createCollection();this.focusTracker=new xp;this.keystrokes=new dp;this._focusCycler=new Nb({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 t of this.items){this.focusTracker.add(t.element)}this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)});this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class nw extends gb{constructor(t){super(t);this.children=this.createCollection();this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__item"]},children:this.children})}focus(){this.children.first.focus()}}class ow extends gb{constructor(t){super(t);this.setTemplate({tag:"li",attributes:{class:["ck","ck-list__separator"]}})}}var rw=i(37);class sw extends Kb{constructor(t){super(t);this.isToggleable=true;this.toggleSwitchView=this._createToggleView();this.extendTemplate({attributes:{class:"ck-switchbutton"}})}render(){super.render();this.children.add(this.toggleSwitchView)}_createToggleView(){const t=new gb;t.setTemplate({tag:"span",attributes:{class:["ck","ck-button__toggle"]},children:[{tag:"span",attributes:{class:["ck","ck-button__toggle__inner"]}}]});return t}}function aw({emitter:t,activator:e,callback:i,contextElements:n}){t.listenTo(document,"mousedown",(t,{target:o})=>{if(!e()){return}for(const t of n){if(t.contains(o)){return}}i()})}var cw=i(39);var lw=i(41);function dw(t,e=tw){const i=new e(t);const n=new Bb(t);const o=new $b(t,i,n);i.bind("isEnabled").to(o);if(i instanceof tw){i.bind("isOn").to(o,"isOpen")}else{i.arrowView.bind("isOn").to(o,"isOpen")}fw(o);return o}function uw(t,e){const i=t.locale;const n=i.t;const o=t.toolbarView=new _w(i);o.set("ariaLabel",n("kt"));t.extendTemplate({attributes:{class:["ck-toolbar-dropdown"]}});e.map(t=>o.items.add(t));t.panelView.children.add(o);o.items.delegate("execute").to(t)}function hw(t,e){const i=t.locale;const n=t.listView=new iw(i);n.items.bindTo(e).using(({type:t,model:e})=>{if(t==="separator"){return new ow(i)}else if(t==="button"||t==="switchbutton"){const n=new nw(i);let o;if(t==="button"){o=new Kb(i)}else{o=new sw(i)}o.bind(...Object.keys(e)).to(e);o.delegate("execute").to(n);n.children.add(o);return n}});t.panelView.children.add(n);n.items.delegate("execute").to(t)}function fw(t){mw(t);gw(t);pw(t)}function mw(t){t.on("render",()=>{aw({emitter:t,activator:()=>t.isOpen,callback:()=>{t.isOpen=false},contextElements:[t.element]})})}function gw(t){t.on("execute",e=>{if(e.source instanceof sw){return}t.isOpen=false})}function pw(t){t.keystrokes.set("arrowdown",(e,i)=>{if(t.isOpen){t.panelView.focus();i()}});t.keystrokes.set("arrowup",(e,i)=>{if(t.isOpen){t.panelView.focusLast();i()}})}var bw='';var ww=i(43);class _w extends gb{constructor(t,e){super(t);const i=this.bindTemplate;const n=this.t;this.options=e||{};this.set("ariaLabel",n("ly"));this.set("maxWidth","auto");this.items=this.createCollection();this.focusTracker=new xp;this.keystrokes=new dp;this.set("class");this.set("isCompact",false);this.itemsView=new kw(t);this.children=this.createCollection();this.children.add(this.itemsView);this.focusables=this.createCollection();this._focusCycler=new Nb({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",i.to("class"),i.if("isCompact","ck-toolbar_compact")],role:"toolbar","aria-label":i.to("ariaLabel"),style:{maxWidth:i.to("maxWidth")}},children:this.children,on:{mousedown:Db(this)}});this._behavior=this.options.shouldGroupWhenFull?new yw(this):new vw(this)}render(){super.render();for(const t of this.items){this.focusTracker.add(t.element)}this.items.on("add",(t,e)=>{this.focusTracker.add(e.element)});this.items.on("remove",(t,e)=>{this.focusTracker.remove(e.element)});this.keystrokes.listenTo(this.element);this._behavior.render(this)}destroy(){this._behavior.destroy();return super.destroy()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}fillFromConfig(t,e){t.map(t=>{if(t=="|"){this.items.add(new Lb)}else if(e.has(t)){this.items.add(e.create(t))}else{console.warn(Object(ss["a"])("toolbarview-item-unavailable: The requested toolbar item is unavailable."),{name:t})}})}}class kw extends gb{constructor(t){super(t);this.children=this.createCollection();this.setTemplate({tag:"div",attributes:{class:["ck","ck-toolbar__items"]},children:this.children})}}class vw{constructor(t){const e=t.bindTemplate;t.set("isVertical",false);t.itemsView.children.bindTo(t.items).using(t=>t);t.focusables.bindTo(t.items).using(t=>t);t.extendTemplate({attributes:{class:[e.if("isVertical","ck-toolbar_vertical")]}})}render(){}destroy(){}}class yw{constructor(t){this.viewChildren=t.children;this.viewFocusables=t.focusables;this.viewItemsView=t.itemsView;this.viewFocusTracker=t.focusTracker;this.viewLocale=t.locale;this.ungroupedItems=t.createCollection();this.groupedItems=t.createCollection();this.groupedItemsDropdown=this._createGroupedItemsDropdown();this.resizeObserver=null;this.cachedPadding=null;t.itemsView.children.bindTo(this.ungroupedItems).using(t=>t);this.ungroupedItems.on("add",this._updateFocusCycleableItems.bind(this));this.ungroupedItems.on("remove",this._updateFocusCycleableItems.bind(this));t.children.on("add",this._updateFocusCycleableItems.bind(this));t.children.on("remove",this._updateFocusCycleableItems.bind(this));t.items.on("add",(t,e,i)=>{if(i>this.ungroupedItems.length){this.groupedItems.add(e,i-this.ungroupedItems.length)}else{this.ungroupedItems.add(e,i)}this._updateGrouping()});t.items.on("remove",(t,e,i)=>{if(i>this.ungroupedItems.length){this.groupedItems.remove(e)}else{this.ungroupedItems.remove(e)}this._updateGrouping()});t.extendTemplate({attributes:{class:["ck-toolbar_grouping"]}})}render(t){this.viewElement=t.element;this._enableGroupingOnResize();this._enableGroupingOnMaxWidthChange(t)}destroy(){this.groupedItemsDropdown.destroy();this.resizeObserver.destroy()}_updateGrouping(){if(!this.viewElement.ownerDocument.body.contains(this.viewElement)){return}let t;while(this._areItemsOverflowing){this._groupLastItem();t=true}if(!t&&this.groupedItems.length){while(this.groupedItems.length&&!this._areItemsOverflowing){this._ungroupFirstItem()}if(this._areItemsOverflowing){this._groupLastItem()}}}get _areItemsOverflowing(){if(!this.ungroupedItems.length){return false}const t=this.viewElement;const e=this.viewLocale.uiLanguageDirection;const i=new vh(t.lastChild);const n=new vh(t);if(!this.cachedPadding){const i=Nd.window.getComputedStyle(t);const n=e==="ltr"?"paddingRight":"paddingLeft";this.cachedPadding=Number.parseInt(i[n])}if(e==="ltr"){return i.right>n.right-this.cachedPadding}else{return i.left{if(!t||t!==e.contentRect.width){this._updateGrouping();t=e.contentRect.width}});this._updateGrouping()}_enableGroupingOnMaxWidthChange(t){t.on("change:maxWidth",()=>{this._updateGrouping()})}_groupLastItem(){if(!this.groupedItems.length){this.viewChildren.add(new Lb);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));if(!this.groupedItems.length){this.viewChildren.remove(this.groupedItemsDropdown);this.viewChildren.remove(this.viewChildren.last);this.viewFocusTracker.remove(this.groupedItemsDropdown.element)}}_createGroupedItemsDropdown(){const t=this.viewLocale;const e=t.t;const i=dw(t);i.class="ck-toolbar__grouped-dropdown";i.panelPosition=t.uiLanguageDirection==="ltr"?"sw":"se";uw(i,[]);i.buttonView.set({label:e("lz"),tooltip:true,icon:bw});i.toolbarView.items.bindTo(this.groupedItems).using(t=>t);return i}_updateFocusCycleableItems(){this.viewFocusables.clear();this.ungroupedItems.map(t=>{this.viewFocusables.add(t)});if(this.groupedItems.length){this.viewFocusables.add(this.groupedItemsDropdown)}}}var xw=i(45);class Aw extends Cb{constructor(t,e,i={}){super(t);this.stickyPanel=new Ib(t);this.toolbar=new _w(t,{shouldGroupWhenFull:i.shouldToolbarGroupWhenFull});this.editable=new Eb(t,e)}render(){super.render();this.stickyPanel.content.add(this.toolbar);this.top.add(this.stickyPanel);this.main.add(this.editable)}}function Cw(t){if(t instanceof HTMLTextAreaElement){return t.value}return t.innerHTML}class Tw extends hp{constructor(t,e){super(e);if(Gr(t)){this.sourceElement=t}this.data.processor=new kp(this.data.viewDocument);this.model.document.createRoot();const i=!this.config.get("toolbar.shouldNotGroupWhenFull");const n=new Aw(this.locale,this.editing.view,{shouldToolbarGroupWhenFull:i});this.ui=new Dp(this,n);wp(this)}destroy(){if(this.sourceElement){this.updateSourceElement()}this.ui.destroy();return super.destroy()}static create(t,e={}){return new Promise(i=>{const n=new this(t,e);i(n.initPlugins().then(()=>n.ui.init(Gr(t)?t:null)).then(()=>{if(!Gr(t)&&e.initialData){throw new ss["b"]("editor-create-initial-data: "+"The config.initialData option cannot be used together with initial data passed in Editor.create().",null)}const i=e.initialData||Ew(t);return n.data.init(i)}).then(()=>n.fire("ready")).then(()=>n))})}}vs(Tw,mp);vs(Tw,bp);function Ew(t){return Gr(t)?Cw(t):t}class Mw{static get pluginName(){return"BlockAutoformatEditing"}constructor(t,e,i){let n;let o=null;if(typeof i=="function"){n=i}else{o=t.commands.get(i);n=()=>{t.execute(i)}}t.model.document.on("change",(i,r)=>{if(o&&!o.isEnabled){return}if(r.type=="transparent"){return}const s=Array.from(t.model.document.differ.getChanges());const a=s[0];if(s.length!=1||a.type!=="insert"||a.name!="$text"||a.length!=1){return}const c=a.position.parent;if(!c.is("paragraph")||c.childCount!==1){return}const l=e.exec(c.getChild(0).data);if(!l){return}t.model.enqueueChange(t=>{const e=t.createPositionAt(c,0);const i=t.createPositionAt(c,l[0].length);const o=new rf(e,i);const r=n({match:l});if(r!==false){t.remove(o)}o.detach()})})}}function Pw(t,e){let i=t.start;const n=Array.from(t.getItems()).reduce((t,n)=>{if(!(n.is("text")||n.is("textProxy"))){i=e.createPositionAfter(n);return""}return t+n.data},"");return{text:n,range:e.createRange(i,t.end)}}class Sw{static get pluginName(){return"InlineAutoformatEditing"}constructor(t,e,i){let n;let o;let r;let s;if(e instanceof RegExp){n=e}else{r=e}if(typeof i=="string"){o=i}else{s=i}r=r||(t=>{let e;const i=[];const o=[];while((e=n.exec(t))!==null){if(e&&e.length<4){break}let{index:t,1:n,2:r,3:s}=e;const a=n+r+s;t+=e[0].length-a.length;const c=[t,t+n.length];const l=[t+n.length+r.length,t+n.length+r.length+s.length];i.push(c);i.push(l);o.push([t+n.length,t+n.length+r.length])}return{remove:i,format:o}});s=s||((e,i)=>{const n=t.model.schema.getValidRanges(i,o);for(const t of n){e.setAttribute(o,true,t)}e.removeSelectionAttribute(o)});t.model.document.on("change",(e,i)=>{if(i.type=="transparent"){return}const n=t.model;const o=n.document.selection;if(!o.isCollapsed){return}const a=Array.from(n.document.differ.getChanges());const c=a[0];if(a.length!=1||c.type!=="insert"||c.name!="$text"||c.length!=1){return}const l=o.focus;const d=l.parent;const{text:u,range:h}=Pw(n.createRange(n.createPositionAt(d,0),l),n);const f=r(u);const m=Iw(h.start,f.format,n);const g=Iw(h.start,f.remove,n);if(!(m.length&&g.length)){return}n.enqueueChange(t=>{const e=s(t,m);if(e===false){return}for(const e of g.reverse()){t.remove(e)}})})}}function Iw(t,e,i){return e.filter(t=>t[0]!==undefined&&t[1]!==undefined).map(e=>i.createRange(t.getShiftedBy(e[0]),t.getShiftedBy(e[1])))}class Nw{constructor(t){this.editor=t;this.set("isEnabled",true);this._disableStack=new Set}forceDisabled(t){this._disableStack.add(t);if(this._disableStack.size==1){this.on("set:isEnabled",Ow,{priority:"highest"});this.isEnabled=false}}clearForceDisabled(t){this._disableStack.delete(t);if(this._disableStack.size==0){this.off("set:isEnabled",Ow);this.isEnabled=true}}destroy(){this.stopListening()}static get isContextPlugin(){return false}}vs(Nw,Jc);function Ow(t){t.return=false;t.stop()}class Lw extends Nw{static get pluginName(){return"Autoformat"}afterInit(){this._addListAutoformats();this._addBasicStylesAutoformats();this._addHeadingAutoformats();this._addBlockQuoteAutoformats();this._addCodeBlockAutoformats()}_addListAutoformats(){const t=this.editor.commands;if(t.get("bulletedList")){new Mw(this.editor,/^[*-]\s$/,"bulletedList")}if(t.get("numberedList")){new Mw(this.editor,/^1[.|)]\s$/,"numberedList")}}_addBasicStylesAutoformats(){const t=this.editor.commands;if(t.get("bold")){const t=zw(this.editor,"bold");new Sw(this.editor,/(\*\*)([^*]+)(\*\*)$/g,t);new Sw(this.editor,/(__)([^_]+)(__)$/g,t)}if(t.get("italic")){const t=zw(this.editor,"italic");new Sw(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,t);new Sw(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,t)}if(t.get("code")){const t=zw(this.editor,"code");new Sw(this.editor,/(`)([^`]+)(`)$/g,t)}}_addHeadingAutoformats(){const t=this.editor.commands.get("heading");if(t){t.modelElements.filter(t=>t.match(/^heading[1-6]$/)).forEach(e=>{const i=e[7];const n=new RegExp(`^(#{${i}})\\s$`);new Mw(this.editor,n,()=>{if(!t.isEnabled){return false}this.editor.execute("heading",{value:e})})})}}_addBlockQuoteAutoformats(){if(this.editor.commands.get("blockQuote")){new Mw(this.editor,/^>\s$/,"blockQuote")}}_addCodeBlockAutoformats(){if(this.editor.commands.get("codeBlock")){new Mw(this.editor,/^```$/,"codeBlock")}}}function zw(t,e){return(i,n)=>{const o=t.commands.get(e);if(!o.isEnabled){return false}const r=t.model.schema.getValidRanges(n,e);for(const t of r){i.setAttribute(e,true,t)}i.removeSelectionAttribute(e)}}class Rw{constructor(t){this.editor=t;this.set("value",undefined);this.set("isEnabled",false);this._disableStack=new Set;this.decorate("execute");this.listenTo(this.editor.model.document,"change",()=>{this.refresh()});this.on("execute",t=>{if(!this.isEnabled){t.stop()}},{priority:"high"});this.listenTo(t,"change:isReadOnly",(t,e,i)=>{if(i){this.forceDisabled("readOnlyMode")}else{this.clearForceDisabled("readOnlyMode")}})}refresh(){this.isEnabled=true}forceDisabled(t){this._disableStack.add(t);if(this._disableStack.size==1){this.on("set:isEnabled",jw,{priority:"highest"});this.isEnabled=false}}clearForceDisabled(t){this._disableStack.delete(t);if(this._disableStack.size==0){this.off("set:isEnabled",jw);this.refresh()}}execute(){}destroy(){this.stopListening()}}vs(Rw,Jc);function jw(t){t.return=false;t.stop()}function Dw(t){const e=t.next();if(e.done){return null}return e.value}class Bw extends Rw{refresh(){this.value=this._getValue();this.isEnabled=this._checkEnabled()}execute(t={}){const e=this.editor.model;const i=e.schema;const n=e.document.selection;const o=Array.from(n.getSelectedBlocks());const r=t.forceValue===undefined?!this.value:t.forceValue;e.change(t=>{if(!r){this._removeQuote(t,o.filter(Vw))}else{const e=o.filter(t=>Vw(t)||Hw(i,t));this._applyQuote(t,e)}})}_getValue(){const t=this.editor.model.document.selection;const e=Dw(t.getSelectedBlocks());return!!(e&&Vw(e))}_checkEnabled(){if(this.value){return true}const t=this.editor.model.document.selection;const e=this.editor.model.schema;const i=Dw(t.getSelectedBlocks());if(!i){return false}return Hw(e,i)}_removeQuote(t,e){Fw(t,e).reverse().forEach(e=>{if(e.start.isAtStart&&e.end.isAtEnd){t.unwrap(e.start.parent);return}if(e.start.isAtStart){const i=t.createPositionBefore(e.start.parent);t.move(e,i);return}if(!e.end.isAtEnd){t.split(e.end)}const i=t.createPositionAfter(e.end.parent);t.move(e,i)})}_applyQuote(t,e){const i=[];Fw(t,e).reverse().forEach(e=>{let n=Vw(e.start);if(!n){n=t.createElement("blockQuote");t.wrap(e,n)}i.push(n)});i.reverse().reduce((e,i)=>{if(e.nextSibling==i){t.merge(t.createPositionAfter(e));return e}return i})}}function Vw(t){return t.parent.name=="blockQuote"?t.parent:null}function Fw(t,e){let i;let n=0;const o=[];while(n{if(t.endsWith("blockQuote")&&e.name=="blockQuote"){return false}});t.conversion.elementToElement({model:"blockQuote",view:"blockquote"});t.model.document.registerPostFixer(i=>{const n=t.model.document.differ.getChanges();for(const t of n){if(t.type=="insert"){const n=t.position.nodeAfter;if(!n){continue}if(n.is("blockQuote")&&n.isEmpty){i.remove(n);return true}else if(n.is("blockQuote")&&!e.checkChild(t.position,n)){i.unwrap(n);return true}else if(n.is("element")){const t=i.createRangeIn(n);for(const n of t.getItems()){if(n.is("blockQuote")&&!e.checkChild(i.createPositionBefore(n),n)){i.unwrap(n);return true}}}}else if(t.type=="remove"){const e=t.position.parent;if(e.is("blockQuote")&&e.isEmpty){i.remove(e);return true}}}return false})}afterInit(){const t=this.editor;const e=t.commands.get("blockQuote");this.listenTo(this.editor.editing.view.document,"enter",(t,i)=>{const n=this.editor.model.document;const o=n.selection.getLastPosition().parent;if(n.selection.isCollapsed&&o.isEmpty&&e.value){this.editor.execute("blockQuote");this.editor.editing.view.scrollToTheSelection();i.preventDefault();t.stop()}})}}var Uw='';var qw=i(47);class $w extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add("blockQuote",i=>{const n=t.commands.get("blockQuote");const o=new Kb(i);o.set({label:e("iz"),icon:Uw,tooltip:true,isToggleable:true});o.bind("isOn","isEnabled").to(n,"value","isEnabled");this.listenTo(o,"execute",()=>{t.execute("blockQuote");t.editing.view.focus()});return o})}}class Yw extends Nw{static get requires(){return[Ww,$w]}static get pluginName(){return"BlockQuote"}}class Gw extends Rw{constructor(t,e){super(t);this.attributeKey=e}refresh(){const t=this.editor.model;const e=t.document;this.value=this._getValueFromFirstAllowedNode();this.isEnabled=t.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(t={}){const e=this.editor.model;const i=e.document;const n=i.selection;const o=t.forceValue===undefined?!this.value:t.forceValue;e.change(t=>{if(n.isCollapsed){if(o){t.setSelectionAttribute(this.attributeKey,true)}else{t.removeSelectionAttribute(this.attributeKey)}}else{const i=e.schema.getValidRanges(n.getRanges(),this.attributeKey);for(const e of i){if(o){t.setAttribute(this.attributeKey,o,e)}else{t.removeAttribute(this.attributeKey,e)}}}})}_getValueFromFirstAllowedNode(){const t=this.editor.model;const e=t.schema;const i=t.document.selection;if(i.isCollapsed){return i.hasAttribute(this.attributeKey)}for(const t of i.getRanges()){for(const i of t.getItems()){if(e.checkAttribute(i,this.attributeKey)){return i.hasAttribute(this.attributeKey)}}}return false}}const Jw="bold";class Xw extends Nw{static get pluginName(){return"BoldEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:Jw});t.model.schema.setAttributeProperties(Jw,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:Jw,view:"strong",upcastAlso:["b",t=>{const e=t.getStyle("font-weight");if(!e){return null}if(e=="bold"||Number(e)>=600){return{name:true,styles:["font-weight"]}}}]});t.commands.add(Jw,new Gw(t,Jw));t.keystrokes.set("CTRL+B",Jw)}}var Qw='';const Kw="bold";class Zw extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(Kw,i=>{const n=t.commands.get(Kw);const o=new Kb(i);o.set({label:e("jd"),icon:Qw,keystroke:"CTRL+B",tooltip:true,isToggleable:true});o.bind("isOn","isEnabled").to(n,"value","isEnabled");this.listenTo(o,"execute",()=>{t.execute(Kw);t.editing.view.focus()});return o})}}class t_ extends Nw{static get requires(){return[Xw,Zw]}static get pluginName(){return"Bold"}}class e_ extends Rw{refresh(){const t=this.editor.model;const e=t.document;const i=Dw(e.selection.getSelectedBlocks());this.value=!!i&&i.is("paragraph");this.isEnabled=!!i&&i_(i,t.schema)}execute(t={}){const e=this.editor.model;const i=e.document;e.change(n=>{const o=(t.selection||i.selection).getSelectedBlocks();for(const t of o){if(!t.is("paragraph")&&i_(t,e.schema)){n.rename(t,"paragraph")}}})}}function i_(t,e){return e.checkChild(t.parent,"paragraph")&&!e.isObject(t)}class n_ extends Nw{static get pluginName(){return"Paragraph"}init(){const t=this.editor;const e=t.model;const i=t.data;t.commands.add("paragraph",new e_(t));e.schema.register("paragraph",{inheritAllFrom:"$block"});t.conversion.elementToElement({model:"paragraph",view:"p"});t.conversion.for("upcast").elementToElement({model:(t,e)=>{if(!n_.paragraphLikeElements.has(t.name)){return null}if(t.isEmpty){return null}return e.createElement("paragraph")},converterPriority:"low"});i.upcastDispatcher.on("element",(t,e,i)=>{if(!i.consumable.test(e.viewItem,{name:e.viewItem.name})){return}if(r_(e.viewItem,e.modelCursor,i.schema)){Object.assign(e,o_(e.viewItem,e.modelCursor,i))}},{priority:"low"});i.upcastDispatcher.on("text",(t,e,i)=>{if(e.modelRange){return}if(r_(e.viewItem,e.modelCursor,i.schema)){Object.assign(e,o_(e.viewItem,e.modelCursor,i))}},{priority:"lowest"});e.document.registerPostFixer(t=>this._autoparagraphEmptyRoots(t));t.data.on("ready",()=>{e.enqueueChange("transparent",t=>this._autoparagraphEmptyRoots(t))},{priority:"lowest"})}_autoparagraphEmptyRoots(t){const e=this.editor.model;for(const i of e.document.getRootNames()){const n=e.document.getRoot(i);if(n.isEmpty&&n.rootName!="$graveyard"){if(e.schema.checkChild(n,"paragraph")){t.insertElement("paragraph",n);return true}}}}}n_.paragraphLikeElements=new Set(["blockquote","dd","div","dt","h1","h2","h3","h4","h5","h6","li","p","td"]);function o_(t,e,i){const n=i.writer.createElement("paragraph");i.writer.insert(n,e);return i.convertItem(t,i.writer.createPositionAt(n,0))}function r_(t,e,i){const n=i.createContext(e);if(!i.checkChild(n,"paragraph")){return false}if(!i.checkChild(n.push("paragraph"),t)){return false}return true}class s_ extends Rw{constructor(t,e){super(t);this.modelElements=e}refresh(){const t=Dw(this.editor.model.document.selection.getSelectedBlocks());this.value=!!t&&this.modelElements.includes(t.name)&&t.name;this.isEnabled=!!t&&this.modelElements.some(e=>a_(t,e,this.editor.model.schema))}execute(t){const e=this.editor.model;const i=e.document;const n=t.value;e.change(t=>{const o=Array.from(i.selection.getSelectedBlocks()).filter(t=>a_(t,n,e.schema));for(const e of o){if(!e.is(n)){t.rename(e,n)}}})}}function a_(t,e,i){return i.checkChild(t.parent,e)&&!i.isObject(t)}const c_="paragraph";class l_ extends Nw{static get pluginName(){return"HeadingEditing"}constructor(t){super(t);t.config.define("heading",{options:[{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading3"}]})}static get requires(){return[n_]}init(){const t=this.editor;const e=t.config.get("heading.options");const i=[];for(const n of e){if(n.model!==c_){t.model.schema.register(n.model,{inheritAllFrom:"$block"});t.conversion.elementToElement(n);i.push(n.model)}}this._addDefaultH1Conversion(t);t.commands.add("heading",new s_(t,i))}afterInit(){const t=this.editor;const e=t.commands.get("enter");const i=t.config.get("heading.options");if(e){this.listenTo(e,"afterExecute",(e,n)=>{const o=t.model.document.selection.getFirstPosition().parent;const r=i.some(t=>o.is(t.model));if(r&&!o.is(c_)&&o.childCount===0){n.writer.rename(o,c_)}})}}_addDefaultH1Conversion(t){t.conversion.for("upcast").elementToElement({model:"heading1",view:"h1",converterPriority:os.get("low")+1})}}class d_{constructor(t,e){if(e){Uc(this,e)}if(t){this.set(t)}}}vs(d_,Jc);function u_(t){const e=t.t;const i={Paragraph:e("nd"),"Heading 1":e("ne"),"Heading 2":e("nf"),"Heading 3":e("ng"),"Heading 4":e("nh"),"Heading 5":e("ni"),"Heading 6":e("nj")};return t.config.get("heading.options").map(t=>{const e=i[t.title];if(e&&e!=t.title){t.title=e}return t})}var h_=i(11);class f_ extends Nw{init(){const t=this.editor;const e=t.t;const i=u_(t);const n=e("ja");const o=e("jb");t.ui.componentFactory.add("heading",e=>{const r={};const s=new ys;const a=t.commands.get("heading");const c=t.commands.get("paragraph");const l=[a];for(const t of i){const e={type:"button",model:new d_({label:t.title,class:t.class,withText:true})};if(t.model==="paragraph"){e.model.bind("isOn").to(c,"value");e.model.set("commandName","paragraph");l.push(c)}else{e.model.bind("isOn").to(a,"value",e=>e===t.model);e.model.set({commandName:"heading",commandValue:t.model})}s.add(e);r[t.model]=t.title}const d=dw(e);hw(d,s);d.buttonView.set({isOn:false,withText:true,tooltip:o});d.extendTemplate({attributes:{class:["ck-heading-dropdown"]}});d.bind("isEnabled").toMany(l,"isEnabled",(...t)=>t.some(t=>t));d.buttonView.bind("label").to(a,"value",c,"value",(t,e)=>{const i=t||e&&"paragraph";return r[i]?r[i]:n});this.listenTo(d,"execute",e=>{t.execute(e.source.commandName,e.source.commandValue?{value:e.source.commandValue}:undefined);t.editing.view.focus()});return d})}}class m_ extends Nw{static get requires(){return[l_,f_]}static get pluginName(){return"Heading"}}class g_ extends Yd{observe(t){this.listenTo(t,"load",(t,e)=>{const i=e.target;if(i.tagName=="IMG"){this._fireEvents(e)}},{useCapture:true})}_fireEvents(t){if(this.isEnabled){this.document.fire("layoutChanged");this.document.fire("imageLoaded",t)}}}class p_{constructor(){this._stack=[]}add(t,e){const i=this._stack;const n=i[0];this._insertDescriptor(t);const o=i[0];if(n!==o&&!b_(n,o)){this.fire("change:top",{oldDescriptor:n,newDescriptor:o,writer:e})}}remove(t,e){const i=this._stack;const n=i[0];this._removeDescriptor(t);const o=i[0];if(n!==o&&!b_(n,o)){this.fire("change:top",{oldDescriptor:n,newDescriptor:o,writer:e})}}_insertDescriptor(t){const e=this._stack;const i=e.findIndex(e=>e.id===t.id);if(b_(t,e[i])){return}if(i>-1){e.splice(i,1)}let n=0;while(e[n]&&w_(e[n],t)){n++}e.splice(n,0,t)}_removeDescriptor(t){const e=this._stack;const i=e.findIndex(e=>e.id===t);if(i>-1){e.splice(i,1)}}}vs(p_,ds);function b_(t,e){return t&&e&&t.priority==e.priority&&__(t.classes)==__(e.classes)}function w_(t,e){if(t.priority>e.priority){return true}else if(t.priority__(e.classes)}function __(t){return Array.isArray(t)?t.sort().join(","):t}var k_='';const v_="ck-widget";const y_="ck-widget_selected";function x_(t){if(!t.is("element")){return false}return!!t.getCustomProperty("widget")}function A_(t,e,i={}){if(!Cl.isEdge){e.setAttribute("contenteditable","false",t)}e.addClass(v_,t);e.setCustomProperty("widget",true,t);t.getFillerOffset=I_;if(i.label){T_(t,i.label,e)}if(i.hasSelectionHandle){N_(t,e)}C_(t,e,(t,e,i)=>i.addClass(n(e.classes),t),(t,e,i)=>i.removeClass(n(e.classes),t));return t;function n(t){return Array.isArray(t)?t:[t]}}function C_(t,e,i,n){const o=new p_;o.on("change:top",(e,o)=>{if(o.oldDescriptor){n(t,o.oldDescriptor,o.writer)}if(o.newDescriptor){i(t,o.newDescriptor,o.writer)}});e.setCustomProperty("addHighlight",(t,e,i)=>o.add(e,i),t);e.setCustomProperty("removeHighlight",(t,e,i)=>o.remove(e,i),t)}function T_(t,e,i){i.setCustomProperty("widgetLabel",e,t)}function E_(t){const e=t.getCustomProperty("widgetLabel");if(!e){return""}return typeof e=="function"?e():e}function M_(t,e){e.addClass(["ck-editor__editable","ck-editor__nested-editable"],t);if(!Cl.isEdge){e.setAttribute("contenteditable",t.isReadOnly?"false":"true",t);t.on("change:isReadOnly",(i,n,o)=>{e.setAttribute("contenteditable",o?"false":"true",t)})}t.on("change:isFocused",(i,n,o)=>{if(o){e.addClass("ck-editor__nested-editable_focused",t)}else{e.removeClass("ck-editor__nested-editable_focused",t)}});return t}function P_(t,e){const i=t.getSelectedElement();if(i&&e.schema.isBlock(i)){return e.createPositionAfter(i)}const n=t.getSelectedBlocks().next().value;if(n){if(n.isEmpty){return e.createPositionAt(n,0)}const i=e.createPositionAfter(n);if(t.focus.isTouching(i)){return i}return e.createPositionBefore(n)}return t.focus}function S_(t,e){return(i,n)=>{const{mapper:o,viewPosition:r}=n;const s=o.findMappedViewAncestor(r);if(!e(s)){return}const a=o.toModelElement(s);n.modelPosition=t.createPositionAt(a,r.isAtStart?"before":"after")}}function I_(){return null}function N_(t,e){const i=e.createUIElement("div",{class:"ck ck-widget__selection-handle"},(function(t){const e=this.toDomElement(t);const i=new Gb;i.set("content",k_);i.render();e.appendChild(i.element);return e}));e.insert(e.createPositionAt(t,0),i);e.addClass(["ck-widget_with-selection-handle"],t)}function O_(t,e,i){e.setCustomProperty("image",true,t);return A_(t,e,{label:n});function n(){const e=B_(t);const n=e.getAttribute("alt");return n?`${n} ${i}`:i}}function L_(t){return!!t.getCustomProperty("image")&&x_(t)}function z_(t){const e=t.getSelectedElement();if(e&&L_(e)){return e}return null}function R_(t){return!!t&&t.is("image")}function j_(t,e,i={}){const n=t.createElement("image",i);const o=P_(e.document.selection,e);e.insertContent(n,o);if(n.parent){t.setSelection(n,"on")}}function D_(t){const e=t.schema;const i=t.document.selection;return V_(i,e,t)&&!F_(i,e)&&H_(i)}function B_(t){return Array.from(t.getChildren()).find(t=>t.is("img"))}function V_(t,e,i){const n=W_(t,i);return e.checkChild(n,"image")}function F_(t,e){const i=t.getSelectedElement();return i&&e.isObject(i)}function H_(t){return[...t.focus.getAncestors()].every(t=>!t.is("image"))}function W_(t,e){const i=P_(t,e);const n=i.parent;if(n.isEmpty&&!n.is("$root")){return n.parent}return n}function U_(){return e=>{e.on("element:figure",t)};function t(t,e,i){if(!i.consumable.test(e.viewItem,{name:true,classes:"image"})){return}const n=B_(e.viewItem);if(!n||!n.hasAttribute("src")||!i.consumable.test(n,{name:true})){return}const o=i.convertItem(n,e.modelCursor);const r=Dw(o.modelRange.getItems());if(!r){return}i.convertChildren(e.viewItem,i.writer.createPositionAt(r,0));e.modelRange=o.modelRange;e.modelCursor=o.modelCursor}}function q_(){return e=>{e.on("attribute:srcset:image",t)};function t(t,e,i){if(!i.consumable.consume(e.item,t.name)){return}const n=i.writer;const o=i.mapper.toViewElement(e.item);const r=B_(o);if(e.attributeNewValue===null){const t=e.attributeOldValue;if(t.data){n.removeAttribute("srcset",r);n.removeAttribute("sizes",r);if(t.width){n.removeAttribute("width",r)}}}else{const t=e.attributeNewValue;if(t.data){n.setAttribute("srcset",t.data,r);n.setAttribute("sizes","100vw",r);if(t.width){n.setAttribute("width",t.width,r)}}}}}function $_(t){return i=>{i.on(`attribute:${t}:image`,e)};function e(t,e,i){if(!i.consumable.consume(e.item,t.name)){return}const n=i.writer;const o=i.mapper.toViewElement(e.item);const r=B_(o);if(e.attributeNewValue!==null){n.setAttribute(e.attributeKey,e.attributeNewValue,r)}else{n.removeAttribute(e.attributeKey,r)}}}class Y_ extends Rw{refresh(){this.isEnabled=D_(this.editor.model)}execute(t){const e=this.editor.model;e.change(i=>{const n=Array.isArray(t.source)?t.source:[t.source];for(const t of n){j_(i,e,{src:t})}})}}class G_ extends Nw{static get pluginName(){return"ImageEditing"}init(){const t=this.editor;const e=t.model.schema;const i=t.t;const n=t.conversion;t.editing.view.addObserver(g_);e.register("image",{isObject:true,isBlock:true,allowWhere:"$block",allowAttributes:["alt","src","srcset"]});n.for("dataDowncast").elementToElement({model:"image",view:(t,e)=>J_(e)});n.for("editingDowncast").elementToElement({model:"image",view:(t,e)=>O_(J_(e),e,i("jk"))});n.for("downcast").add($_("src")).add($_("alt")).add(q_());n.for("upcast").elementToElement({view:{name:"img",attributes:{src:true}},model:(t,e)=>e.createElement("image",{src:t.getAttribute("src")})}).attributeToAttribute({view:{name:"img",key:"alt"},model:"alt"}).attributeToAttribute({view:{name:"img",key:"srcset"},model:{key:"srcset",value:t=>{const e={data:t.getAttribute("srcset")};if(t.hasAttribute("width")){e.width=t.getAttribute("width")}return e}}}).add(U_());t.commands.add("imageInsert",new Y_(t))}}function J_(t){const e=t.createEmptyElement("img");const i=t.createContainerElement("figure",{class:"image"});t.insert(t.createPositionAt(i,0),e);return i}class X_ extends Ju{constructor(t){super(t);this.domEventType="mousedown"}onDomEvent(t){this.fire(t.type,t)}}var Q_=i(50);const K_=Rl("Ctrl+A");class Z_ extends Nw{static get pluginName(){return"Widget"}init(){const t=this.editor.editing.view;const e=t.document;this._previouslySelected=new Set;this.editor.editing.downcastDispatcher.on("selection",(t,e,i)=>{this._clearPreviouslySelectedWidgets(i.writer);const n=i.writer;const o=n.document.selection;const r=o.getSelectedElement();let s=null;for(const t of o.getRanges()){for(const e of t){const t=e.item;if(x_(t)&&!nk(t,s)){n.addClass(y_,t);this._previouslySelected.add(t);s=t;if(t==r){n.setSelection(o.getRanges(),{fake:true,label:E_(r)})}}}}},{priority:"low"});t.addObserver(X_);this.listenTo(e,"mousedown",(...t)=>this._onMousedown(...t));this.listenTo(e,"keydown",(...t)=>this._onKeydown(...t),{priority:"high"});this.listenTo(e,"delete",(t,e)=>{if(this._handleDelete(e.direction=="forward")){e.preventDefault();t.stop()}},{priority:"high"})}_onMousedown(t,e){const i=this.editor;const n=i.editing.view;const o=n.document;let r=e.target;if(ik(r)){if(Cl.isSafari&&e.domEvent.detail>=3){const t=i.editing.mapper;const n=t.toModelElement(r);this.editor.model.change(t=>{e.preventDefault();t.setSelection(n,"in")})}return}if(!x_(r)){r=r.findAncestor(x_);if(!r){return}}e.preventDefault();if(!o.isFocused){n.focus()}const s=i.editing.mapper.toModelElement(r);this._setSelectionOverElement(s)}_onKeydown(t,e){const i=e.keyCode;const n=this.editor.locale.contentLanguageDirection==="ltr";const o=i==Ll.arrowdown||i==Ll[n?"arrowright":"arrowleft"];let r=false;if(tk(i)){r=this._handleArrowKeys(o)}else if(ek(e)){r=this._selectAllNestedEditableContent()||this._selectAllContent()}else if(i===Ll.enter){r=this._handleEnterKey(e.shiftKey)}if(r){e.preventDefault();t.stop()}}_handleDelete(t){if(this.editor.isReadOnly){return}const e=this.editor.model.document;const i=e.selection;if(!i.isCollapsed){return}const n=this._getObjectElementNextToSelection(t);if(n){this.editor.model.change(t=>{let e=i.anchor.parent;while(e.isEmpty){const i=e;e=i.parent;t.remove(i)}this._setSelectionOverElement(n)});return true}}_handleArrowKeys(t){const e=this.editor.model;const i=e.schema;const n=e.document;const o=n.selection;const r=o.getSelectedElement();if(r&&i.isObject(r)){const n=t?o.getLastPosition():o.getFirstPosition();const r=i.getNearestSelectionRange(n,t?"forward":"backward");if(r){e.change(t=>{t.setSelection(r)})}return true}if(!o.isCollapsed){return}const s=this._getObjectElementNextToSelection(t);if(!!s&&i.isObject(s)){this._setSelectionOverElement(s);return true}}_handleEnterKey(t){const e=this.editor.model;const i=e.document.selection;const n=i.getSelectedElement();if(ok(n,e.schema)){e.change(i=>{let o=i.createPositionAt(n,t?"before":"after");const r=i.createElement("paragraph");if(e.schema.isBlock(n.parent)){const t=e.schema.findAllowedParent(o,r);o=i.split(o,t).position}i.insert(r,o);i.setSelection(r,"in")});return true}}_selectAllNestedEditableContent(){const t=this.editor.model;const e=t.document.selection;const i=t.schema.getLimitElement(e);if(e.getFirstRange().root==i){return false}t.change(t=>{t.setSelection(t.createRangeIn(i))});return true}_selectAllContent(){const t=this.editor.model;const e=this.editor.editing;const i=e.view;const n=i.document;const o=n.selection;const r=o.getSelectedElement();if(r&&x_(r)){const i=e.mapper.toModelElement(r.parent);t.change(t=>{t.setSelection(t.createRangeIn(i))});return true}return false}_setSelectionOverElement(t){this.editor.model.change(e=>{e.setSelection(e.createRangeOn(t))})}_getObjectElementNextToSelection(t){const e=this.editor.model;const i=e.schema;const n=e.document.selection;const o=e.createSelection(n);e.modifySelection(o,{direction:t?"forward":"backward"});const r=t?o.focus.nodeBefore:o.focus.nodeAfter;if(!!r&&i.isObject(r)){return r}return null}_clearPreviouslySelectedWidgets(t){for(const e of this._previouslySelected){t.removeClass(y_,e)}this._previouslySelected.clear()}}function tk(t){return t==Ll.arrowright||t==Ll.arrowleft||t==Ll.arrowup||t==Ll.arrowdown}function ek(t){return zl(t)==K_}function ik(t){while(t){if(t.is("editableElement")&&!t.is("rootElement")){return true}if(x_(t)){return false}t=t.parent}return false}function nk(t,e){if(!e){return false}return Array.from(t.getAncestors()).includes(e)}function ok(t,e){return t&&e.isObject(t)&&!e.isInline(t)}class rk extends Rw{refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=R_(t);if(R_(t)&&t.hasAttribute("alt")){this.value=t.getAttribute("alt")}else{this.value=false}}execute(t){const e=this.editor.model;const i=e.document.selection.getSelectedElement();e.change(e=>{e.setAttribute("alt",t.newValue,i)})}}class sk extends Nw{static get pluginName(){return"ImageTextAlternativeEditing"}init(){this.editor.commands.add("imageTextAlternative",new rk(this.editor))}}var ak=i(52);class ck extends gb{constructor(t,e){super(t);const i=`ck-input-${is()}`;const n=`ck-status-${is()}`;this.set("label");this.set("value");this.set("isReadOnly",false);this.set("errorText",null);this.set("infoText",null);this.labelView=this._createLabelView(i);this.inputView=this._createInputView(e,i,n);this.statusView=this._createStatusView(n);this.bind("_statusText").to(this,"errorText",this,"infoText",(t,e)=>t||e);const o=this.bindTemplate;this.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input",o.if("isReadOnly","ck-disabled")]},children:[this.labelView,this.inputView,this.statusView]})}_createLabelView(t){const e=new Ab(this.locale);e.for=t;e.bind("text").to(this,"label");return e}_createInputView(t,e,i){const n=new t(this.locale,i);n.id=e;n.ariaDescribedById=i;n.bind("value").to(this);n.bind("isReadOnly").to(this);n.bind("hasError").to(this,"errorText",t=>!!t);n.on("input",()=>{this.errorText=null});return n}_createStatusView(t){const e=new gb(this.locale);const i=this.bindTemplate;e.setTemplate({tag:"div",attributes:{class:["ck","ck-labeled-input__status",i.if("errorText","ck-labeled-input__status_error"),i.if("_statusText","ck-hidden",t=>!t)],id:t,role:i.if("errorText","alert")},children:[{text:i.to("_statusText")}]});return e}select(){this.inputView.select()}focus(){this.inputView.focus()}}var lk=i(54);class dk extends gb{constructor(t){super(t);this.set("value");this.set("id");this.set("placeholder");this.set("isReadOnly",false);this.set("hasError",false);this.set("ariaDescribedById");const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{type:"text",class:["ck","ck-input","ck-input-text",e.if("hasError","ck-error")],id:e.to("id"),placeholder:e.to("placeholder"),readonly:e.to("isReadOnly"),"aria-invalid":e.if("hasError",true),"aria-describedby":e.to("ariaDescribedById")},on:{input:e.to("input")}})}render(){super.render();const t=t=>{this.element.value=!t&&t!==0?"":t};t(this.value);this.on("change:value",(e,i,n)=>{t(n)})}select(){this.element.select()}focus(){this.element.focus()}}function uk({view:t}){t.listenTo(t.element,"submit",(e,i)=>{i.preventDefault();t.fire("submit")},{useCapture:true})}var hk='';var fk='';var mk=i(56);class gk extends gb{constructor(t){super(t);const e=this.locale.t;this.focusTracker=new xp;this.keystrokes=new dp;this.labeledInput=this._createLabeledInputView();this.saveButtonView=this._createButton(e("lv"),hk,"ck-button-save");this.saveButtonView.type="submit";this.cancelButtonView=this._createButton(e("lw"),fk,"ck-button-cancel","cancel");this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});this.setTemplate({tag:"form",attributes:{class:["ck","ck-text-alternative-form"],tabindex:"-1"},children:[this.labeledInput,this.saveButtonView,this.cancelButtonView]})}render(){super.render();this.keystrokes.listenTo(this.element);uk({view:this});[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)})}_createButton(t,e,i,n){const o=new Kb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate("execute").to(this,n)}return o}_createLabeledInputView(){const t=this.locale.t;const e=new ck(this.locale,dk);e.label=t("lx");e.inputView.placeholder=t("lx");return e}}var pk=i(58);const bk=Mb("px");const wk=Nd.document.body;class _k extends gb{constructor(t){super(t);const e=this.bindTemplate;this.set("top",0);this.set("left",0);this.set("position","arrow_nw");this.set("isVisible",false);this.set("withArrow",true);this.set("class");this.content=this.createCollection();this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-panel",e.to("position",t=>`ck-balloon-panel_${t}`),e.if("isVisible","ck-balloon-panel_visible"),e.if("withArrow","ck-balloon-panel_with-arrow"),e.to("class")],style:{top:e.to("top",bk),left:e.to("left",bk)}},children:this.content})}show(){this.isVisible=true}hide(){this.isVisible=false}attachTo(t){this.show();const e=_k.defaultPositions;const i=Object.assign({},{element:this.element,positions:[e.southArrowNorth,e.southArrowNorthMiddleWest,e.southArrowNorthMiddleEast,e.southArrowNorthWest,e.southArrowNorthEast,e.northArrowSouth,e.northArrowSouthMiddleWest,e.northArrowSouthMiddleEast,e.northArrowSouthWest,e.northArrowSouthEast],limiter:wk,fitInViewport:true},t);const n=_k._getOptimalPosition(i);const o=parseInt(n.left);const r=parseInt(n.top);const s=n.name;Object.assign(this,{top:r,left:o,position:s})}pin(t){this.unpin();this._pinWhenIsVisibleCallback=()=>{if(this.isVisible){this._startPinning(t)}else{this._stopPinning()}};this._startPinning(t);this.listenTo(this,"change:isVisible",this._pinWhenIsVisibleCallback)}unpin(){if(this._pinWhenIsVisibleCallback){this._stopPinning();this.stopListening(this,"change:isVisible",this._pinWhenIsVisibleCallback);this._pinWhenIsVisibleCallback=null;this.hide()}}_startPinning(t){this.attachTo(t);const e=kk(t.target);const i=t.limiter?kk(t.limiter):wk;this.listenTo(Nd.document,"scroll",(n,o)=>{const r=o.target;const s=e&&r.contains(e);const a=i&&r.contains(i);if(s||a||!e||!i){this.attachTo(t)}},{useCapture:true});this.listenTo(Nd.window,"resize",()=>{this.attachTo(t)})}_stopPinning(){this.stopListening(Nd.document,"scroll");this.stopListening(Nd.window,"resize")}}function kk(t){if(Gr(t)){return t}if(wh(t)){return t.commonAncestorContainer}if(typeof t=="function"){return kk(t())}return null}_k.arrowHorizontalOffset=25;_k.arrowVerticalOffset=10;_k._getOptimalPosition=Hb;_k.defaultPositions={northWestArrowSouthWest:(t,e)=>({top:vk(t,e),left:t.left-_k.arrowHorizontalOffset,name:"arrow_sw"}),northWestArrowSouthMiddleWest:(t,e)=>({top:vk(t,e),left:t.left-e.width*.25-_k.arrowHorizontalOffset,name:"arrow_smw"}),northWestArrowSouth:(t,e)=>({top:vk(t,e),left:t.left-e.width/2,name:"arrow_s"}),northWestArrowSouthMiddleEast:(t,e)=>({top:vk(t,e),left:t.left-e.width*.75+_k.arrowHorizontalOffset,name:"arrow_sme"}),northWestArrowSouthEast:(t,e)=>({top:vk(t,e),left:t.left-e.width+_k.arrowHorizontalOffset,name:"arrow_se"}),northArrowSouthWest:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-_k.arrowHorizontalOffset,name:"arrow_sw"}),northArrowSouthMiddleWest:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width*.25-_k.arrowHorizontalOffset,name:"arrow_smw"}),northArrowSouth:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_s"}),northArrowSouthMiddleEast:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width*.75+_k.arrowHorizontalOffset,name:"arrow_sme"}),northArrowSouthEast:(t,e)=>({top:vk(t,e),left:t.left+t.width/2-e.width+_k.arrowHorizontalOffset,name:"arrow_se"}),northEastArrowSouthWest:(t,e)=>({top:vk(t,e),left:t.right-_k.arrowHorizontalOffset,name:"arrow_sw"}),northEastArrowSouthMiddleWest:(t,e)=>({top:vk(t,e),left:t.right-e.width*.25-_k.arrowHorizontalOffset,name:"arrow_smw"}),northEastArrowSouth:(t,e)=>({top:vk(t,e),left:t.right-e.width/2,name:"arrow_s"}),northEastArrowSouthMiddleEast:(t,e)=>({top:vk(t,e),left:t.right-e.width*.75+_k.arrowHorizontalOffset,name:"arrow_sme"}),northEastArrowSouthEast:(t,e)=>({top:vk(t,e),left:t.right-e.width+_k.arrowHorizontalOffset,name:"arrow_se"}),southWestArrowNorthWest:(t,e)=>({top:yk(t,e),left:t.left-_k.arrowHorizontalOffset,name:"arrow_nw"}),southWestArrowNorthMiddleWest:(t,e)=>({top:yk(t,e),left:t.left-e.width*.25-_k.arrowHorizontalOffset,name:"arrow_nmw"}),southWestArrowNorth:(t,e)=>({top:yk(t,e),left:t.left-e.width/2,name:"arrow_n"}),southWestArrowNorthMiddleEast:(t,e)=>({top:yk(t,e),left:t.left-e.width*.75+_k.arrowHorizontalOffset,name:"arrow_nme"}),southWestArrowNorthEast:(t,e)=>({top:yk(t,e),left:t.left-e.width+_k.arrowHorizontalOffset,name:"arrow_ne"}),southArrowNorthWest:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-_k.arrowHorizontalOffset,name:"arrow_nw"}),southArrowNorthMiddleWest:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width*.25-_k.arrowHorizontalOffset,name:"arrow_nmw"}),southArrowNorth:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width/2,name:"arrow_n"}),southArrowNorthMiddleEast:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width*.75+_k.arrowHorizontalOffset,name:"arrow_nme"}),southArrowNorthEast:(t,e)=>({top:yk(t,e),left:t.left+t.width/2-e.width+_k.arrowHorizontalOffset,name:"arrow_ne"}),southEastArrowNorthWest:(t,e)=>({top:yk(t,e),left:t.right-_k.arrowHorizontalOffset,name:"arrow_nw"}),southEastArrowNorthMiddleWest:(t,e)=>({top:yk(t,e),left:t.right-e.width*.25-_k.arrowHorizontalOffset,name:"arrow_nmw"}),southEastArrowNorth:(t,e)=>({top:yk(t,e),left:t.right-e.width/2,name:"arrow_n"}),southEastArrowNorthMiddleEast:(t,e)=>({top:yk(t,e),left:t.right-e.width*.75+_k.arrowHorizontalOffset,name:"arrow_nme"}),southEastArrowNorthEast:(t,e)=>({top:yk(t,e),left:t.right-e.width+_k.arrowHorizontalOffset,name:"arrow_ne"})};function vk(t,e){return t.top-e.height-_k.arrowVerticalOffset}function yk(t){return t.bottom+_k.arrowVerticalOffset}var xk='';var Ak='';var Ck=i(60);var Tk=i(62);const Ek=Mb("px");class Mk extends Nw{static get pluginName(){return"ContextualBalloon"}constructor(t){super(t);this.positionLimiter=()=>{const t=this.editor.editing.view;const e=t.document;const i=e.selection.editableElement;if(i){return t.domConverter.mapViewToDom(i.root)}return null};this.set("visibleView",null);this.view=new _k(t.locale);t.ui.view.body.add(this.view);t.ui.focusTracker.add(this.view.element);this._viewToStack=new Map;this._idToStack=new Map;this.set("_numberOfStacks",0);this.set("_singleViewMode",false);this._rotatorView=this._createRotatorView();this._fakePanelsView=this._createFakePanelsView()}hasView(t){return Array.from(this._viewToStack.keys()).includes(t)}add(t){if(this.hasView(t.view)){throw new ss["b"]("contextualballoon-add-view-exist: Cannot add configuration of the same view twice.",[this,t])}const e=t.stackId||"main";if(!this._idToStack.has(e)){this._idToStack.set(e,new Map([[t.view,t]]));this._viewToStack.set(t.view,this._idToStack.get(e));this._numberOfStacks=this._idToStack.size;if(!this._visibleStack||t.singleViewMode){this.showStack(e)}return}const i=this._idToStack.get(e);if(t.singleViewMode){this.showStack(e)}i.set(t.view,t);this._viewToStack.set(t.view,i);if(i===this._visibleStack){this._showView(t)}}remove(t){if(!this.hasView(t)){throw new ss["b"]("contextualballoon-remove-view-not-exist: Cannot remove the configuration of a non-existent view.",[this,t])}const e=this._viewToStack.get(t);if(this._singleViewMode&&this.visibleView===t){this._singleViewMode=false}if(this.visibleView===t){if(e.size===1){if(this._idToStack.size>1){this._showNextStack()}else{this.view.hide();this.visibleView=null;this._rotatorView.hideView()}}else{this._showView(Array.from(e.values())[e.size-2])}}if(e.size===1){this._idToStack.delete(this._getStackId(e));this._numberOfStacks=this._idToStack.size}else{e.delete(t)}this._viewToStack.delete(t)}updatePosition(t){if(t){this._visibleStack.get(this.visibleView).position=t}this.view.pin(this._getBalloonPosition());this._fakePanelsView.updatePosition()}showStack(t){this.visibleStack=t;const e=this._idToStack.get(t);if(!e){throw new ss["b"]("contextualballoon-showstack-stack-not-exist: Cannot show a stack that does not exist.",this)}if(this._visibleStack===e){return}this._showView(Array.from(e.values()).pop())}get _visibleStack(){return this._viewToStack.get(this.visibleView)}_getStackId(t){const e=Array.from(this._idToStack.entries()).find(e=>e[1]===t);return e[0]}_showNextStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)+1;if(!t[e]){e=0}this.showStack(this._getStackId(t[e]))}_showPrevStack(){const t=Array.from(this._idToStack.values());let e=t.indexOf(this._visibleStack)-1;if(!t[e]){e=t.length-1}this.showStack(this._getStackId(t[e]))}_createRotatorView(){const t=new Pk(this.editor.locale);const e=this.editor.locale.t;this.view.content.add(t);t.bind("isNavigationVisible").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>!e&&t>1);t.on("change:isNavigationVisible",()=>this.updatePosition(),{priority:"low"});t.bind("counter").to(this,"visibleView",this,"_numberOfStacks",(t,i)=>{if(i<2){return""}const n=Array.from(this._idToStack.values()).indexOf(this._visibleStack)+1;return e("ma",[n,i])});t.buttonNextView.on("execute",()=>{if(t.focusTracker.isFocused){this.editor.editing.view.focus()}this._showNextStack()});t.buttonPrevView.on("execute",()=>{if(t.focusTracker.isFocused){this.editor.editing.view.focus()}this._showPrevStack()});return t}_createFakePanelsView(){const t=new Sk(this.editor.locale,this.view);t.bind("numberOfPanels").to(this,"_numberOfStacks",this,"_singleViewMode",(t,e)=>{const i=!e&&t>=2;return i?Math.min(t-1,2):0});t.listenTo(this.view,"change:top",()=>t.updatePosition());t.listenTo(this.view,"change:left",()=>t.updatePosition());this.editor.ui.view.body.add(t);return t}_showView({view:t,balloonClassName:e="",withArrow:i=true,singleViewMode:n=false}){this.view.class=e;this.view.withArrow=i;this._rotatorView.showView(t);this.visibleView=t;this.view.pin(this._getBalloonPosition());this._fakePanelsView.updatePosition();if(n){this._singleViewMode=true}}_getBalloonPosition(){let t=Array.from(this._visibleStack.values()).pop().position;if(t&&!t.limiter){t=Object.assign({},t,{limiter:this.positionLimiter})}return t}}class Pk extends gb{constructor(t){super(t);const e=t.t;const i=this.bindTemplate;this.set("isNavigationVisible",true);this.focusTracker=new xp;this.buttonPrevView=this._createButtonView(e("mb"),xk);this.buttonNextView=this._createButtonView(e("mc"),Ak);this.content=this.createCollection();this.setTemplate({tag:"div",attributes:{class:["ck","ck-balloon-rotator"],"z-index":"-1"},children:[{tag:"div",attributes:{class:["ck-balloon-rotator__navigation",i.to("isNavigationVisible",t=>t?"":"ck-hidden")]},children:[this.buttonPrevView,{tag:"span",attributes:{class:["ck-balloon-rotator__counter"]},children:[{text:i.to("counter")}]},this.buttonNextView]},{tag:"div",attributes:{class:"ck-balloon-rotator__content"},children:this.content}]})}render(){super.render();this.focusTracker.add(this.element)}showView(t){this.hideView();this.content.add(t)}hideView(){this.content.clear()}_createButtonView(t,e){const i=new Kb(this.locale);i.set({label:t,icon:e,tooltip:true});return i}}class Sk extends gb{constructor(t,e){super(t);const i=this.bindTemplate;this.set("top",0);this.set("left",0);this.set("height",0);this.set("width",0);this.set("numberOfPanels",0);this.content=this.createCollection();this._balloonPanelView=e;this.setTemplate({tag:"div",attributes:{class:["ck-fake-panel",i.to("numberOfPanels",t=>t?"":"ck-hidden")],style:{top:i.to("top",Ek),left:i.to("left",Ek),width:i.to("width",Ek),height:i.to("height",Ek)}},children:this.content});this.on("change:numberOfPanels",(t,e,i,n)=>{if(i>n){this._addPanels(i-n)}else{this._removePanels(n-i)}this.updatePosition()})}_addPanels(t){while(t--){const t=new gb;t.setTemplate({tag:"div"});this.content.add(t);this.registerChild(t)}}_removePanels(t){while(t--){const t=this.content.last;this.content.remove(t);this.deregisterChild(t);t.destroy()}}updatePosition(){if(this.numberOfPanels){const{top:t,left:e}=this._balloonPanelView;const{width:i,height:n}=new vh(this._balloonPanelView.element);Object.assign(this,{top:t,left:e,width:i,height:n})}}}var Ik='';function Nk(t){const e=t.plugins.get("ContextualBalloon");if(z_(t.editing.view.document.selection)){const i=Ok(t);e.updatePosition(i)}}function Ok(t){const e=t.editing.view;const i=_k.defaultPositions;return{target:e.domConverter.viewToDom(e.document.selection.getSelectedElement()),positions:[i.northArrowSouth,i.northArrowSouthWest,i.northArrowSouthEast,i.southArrowNorth,i.southArrowNorthWest,i.southArrowNorthEast]}}class Lk extends Nw{static get requires(){return[Mk]}static get pluginName(){return"ImageTextAlternativeUI"}init(){this._createButton();this._createForm()}destroy(){super.destroy();this._form.destroy()}_createButton(){const t=this.editor;const e=t.t;t.ui.componentFactory.add("imageTextAlternative",i=>{const n=t.commands.get("imageTextAlternative");const o=new Kb(i);o.set({label:e("ks"),icon:Ik,tooltip:true});o.bind("isEnabled").to(n,"isEnabled");this.listenTo(o,"execute",()=>{this._showForm()});return o})}_createForm(){const t=this.editor;const e=t.editing.view;const i=e.document;this._balloon=this.editor.plugins.get("ContextualBalloon");this._form=new gk(t.locale);this._form.render();this.listenTo(this._form,"submit",()=>{t.execute("imageTextAlternative",{newValue:this._form.labeledInput.inputView.element.value});this._hideForm(true)});this.listenTo(this._form,"cancel",()=>{this._hideForm(true)});this._form.keystrokes.set("Esc",(t,e)=>{this._hideForm(true);e()});this.listenTo(t.ui,"update",()=>{if(!z_(i.selection)){this._hideForm(true)}else if(this._isVisible){Nk(t)}});aw({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._balloon.view.element],callback:()=>this._hideForm()})}_showForm(){if(this._isVisible){return}const t=this.editor;const e=t.commands.get("imageTextAlternative");const i=this._form.labeledInput;if(!this._isInBalloon){this._balloon.add({view:this._form,position:Ok(t)})}i.value=i.inputView.element.value=e.value||"";this._form.labeledInput.select()}_hideForm(t){if(!this._isInBalloon){return}if(this._form.focusTracker.isFocused){this._form.saveButtonView.focus()}this._balloon.remove(this._form);if(t){this.editor.editing.view.focus()}}get _isVisible(){return this._balloon.visibleView===this._form}get _isInBalloon(){return this._balloon.hasView(this._form)}}class zk extends Nw{static get requires(){return[sk,Lk]}static get pluginName(){return"ImageTextAlternative"}}var Rk=i(64);class jk extends Nw{static get requires(){return[G_,Z_,zk]}static get pluginName(){return"Image"}}function Dk(t,e){return i=>{const n=i.createEditableElement("figcaption");i.setCustomProperty("imageCaption",true,n);Pp({view:t,element:n,text:e});return M_(n,i)}}function Bk(t){return!!t.getCustomProperty("imageCaption")}function Vk(t){for(const e of t.getChildren()){if(!!e&&e.is("caption")){return e}}return null}function Fk(t){const e=t.parent;if(t.name=="figcaption"&&e&&e.name=="figure"&&e.hasClass("image")){return{name:true}}return null}class Hk extends Nw{static get pluginName(){return"ImageCaptionEditing"}init(){const t=this.editor;const e=t.editing.view;const i=t.model.schema;const n=t.data;const o=t.editing;const r=t.t;i.register("caption",{allowIn:"image",allowContentOf:"$block",isLimit:true});t.model.document.registerPostFixer(t=>this._insertMissingModelCaptionElement(t));t.conversion.for("upcast").elementToElement({view:Fk,model:"caption"});const s=t=>t.createContainerElement("figcaption");n.downcastDispatcher.on("insert:caption",Wk(s,false));const a=Dk(e,r("jl"));o.downcastDispatcher.on("insert:caption",Wk(a));o.downcastDispatcher.on("insert",this._fixCaptionVisibility(t=>t.item),{priority:"high"});o.downcastDispatcher.on("remove",this._fixCaptionVisibility(t=>t.position.parent),{priority:"high"});e.document.registerPostFixer(t=>this._updateCaptionVisibility(t))}_updateCaptionVisibility(t){const e=this.editor.editing.mapper;const i=this._lastSelectedCaption;let n;const o=this.editor.model.document.selection;const r=o.getSelectedElement();if(r&&r.is("image")){const t=Vk(r);n=e.toViewElement(t)}const s=o.getFirstPosition();const a=qk(s.parent);if(a){n=e.toViewElement(a)}if(n){if(i){if(i===n){return Yk(n,t)}else{$k(i,t);this._lastSelectedCaption=n;return Yk(n,t)}}else{this._lastSelectedCaption=n;return Yk(n,t)}}else{if(i){const e=$k(i,t);this._lastSelectedCaption=null;return e}else{return false}}}_fixCaptionVisibility(t){return(e,i,n)=>{const o=t(i);const r=qk(o);const s=this.editor.editing.mapper;const a=n.writer;if(r){const t=s.toViewElement(r);if(t){if(r.childCount){a.removeClass("ck-hidden",t)}else{a.addClass("ck-hidden",t)}}}}}_insertMissingModelCaptionElement(t){const e=this.editor.model;const i=e.document.differ.getChanges();const n=[];for(const t of i){if(t.type=="insert"&&t.name!="$text"){const i=t.position.nodeAfter;if(i.is("image")&&!Vk(i)){n.push(i)}if(!i.is("image")&&i.childCount){for(const t of e.createRangeIn(i).getItems()){if(t.is("image")&&!Vk(t)){n.push(t)}}}}}for(const e of n){t.appendElement("caption",e)}return!!n.length}}function Wk(t,e=true){return(i,n,o)=>{const r=n.item;if(!r.childCount&&!e){return}if(R_(r.parent)){if(!o.consumable.consume(n.item,"insert")){return}const e=o.mapper.toViewElement(n.range.start.parent);const i=t(o.writer);const s=o.writer;if(!r.childCount){s.addClass("ck-hidden",i)}Uk(i,n.item,e,o)}}}function Uk(t,e,i,n){const o=n.writer.createPositionAt(i,"end");n.writer.insert(o,t);n.mapper.bindElements(e,t)}function qk(t){const e=t.getAncestors({includeSelf:true});const i=e.find(t=>t.name=="caption");if(i&&i.parent&&i.parent.name=="image"){return i}return null}function $k(t,e){if(!t.childCount&&!t.hasClass("ck-hidden")){e.addClass("ck-hidden",t);return true}return false}function Yk(t,e){if(t.hasClass("ck-hidden")){e.removeClass("ck-hidden",t);return true}return false}var Gk=i(66);class Jk extends Nw{static get requires(){return[Hk]}static get pluginName(){return"ImageCaption"}}class Xk extends Rw{constructor(t,e){super(t);this.defaultStyle=false;this.styles=e.reduce((t,e)=>{t[e.name]=e;if(e.isDefault){this.defaultStyle=e.name}return t},{})}refresh(){const t=this.editor.model.document.selection.getSelectedElement();this.isEnabled=R_(t);if(!t){this.value=false}else if(t.hasAttribute("imageStyle")){const e=t.getAttribute("imageStyle");this.value=this.styles[e]?e:false}else{this.value=this.defaultStyle}}execute(t){const e=t.value;const i=this.editor.model;const n=i.document.selection.getSelectedElement();i.change(t=>{if(this.styles[e].isDefault){t.removeAttribute("imageStyle",n)}else{t.setAttribute("imageStyle",e,n)}})}}function Qk(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,e.name)){return}const o=Zk(i.attributeNewValue,t);const r=Zk(i.attributeOldValue,t);const s=n.mapper.toViewElement(i.item);const a=n.writer;if(r){a.removeClass(r.className,s)}if(o){a.addClass(o.className,s)}}}function Kk(t){const e=t.filter(t=>!t.isDefault);return(t,i,n)=>{if(!i.modelRange){return}const o=i.viewItem;const r=Dw(i.modelRange.getItems());if(!n.schema.checkAttribute(r,"imageStyle")){return}for(const t of e){if(n.consumable.consume(o,{classes:t.className})){n.writer.setAttribute("imageStyle",t.name,r)}}}}function Zk(t,e){for(const i of e){if(i.name===t){return i}}}var tv='';var ev='';var iv='';var nv='';const ov={full:{name:"full",title:"Full size image",icon:tv,isDefault:true},side:{name:"side",title:"Side image",icon:nv,className:"image-style-side"},alignLeft:{name:"alignLeft",title:"Left aligned image",icon:ev,className:"image-style-align-left"},alignCenter:{name:"alignCenter",title:"Centered image",icon:iv,className:"image-style-align-center"},alignRight:{name:"alignRight",title:"Right aligned image",icon:nv,className:"image-style-align-right"}};const rv={full:tv,left:ev,right:nv,center:iv};function sv(t=[]){return t.map(av)}function av(t){if(typeof t=="string"){const e=t;if(ov[e]){t=Object.assign({},ov[e])}else{console.warn(Object(ss["a"])("image-style-not-found: There is no such image style of given name."),{name:e});t={name:e}}}else if(ov[t.name]){const e=ov[t.name];const i=Object.assign({},t);for(const n in e){if(!t.hasOwnProperty(n)){i[n]=e[n]}}t=i}if(typeof t.icon=="string"&&rv[t.icon]){t.icon=rv[t.icon]}return t}class cv extends Nw{static get pluginName(){return"ImageStyleEditing"}init(){const t=this.editor;const e=t.model.schema;const i=t.data;const n=t.editing;t.config.define("image.styles",["full","side"]);const o=sv(t.config.get("image.styles"));e.extend("image",{allowAttributes:"imageStyle"});const r=Qk(o);n.downcastDispatcher.on("attribute:imageStyle:image",r);i.downcastDispatcher.on("attribute:imageStyle:image",r);i.upcastDispatcher.on("element:figure",Kk(o),{priority:"low"});t.commands.add("imageStyle",new Xk(t,o))}}var lv=i(68);class dv extends Nw{static get pluginName(){return"ImageStyleUI"}get localizedDefaultStylesTitles(){const t=this.editor.t;return{"Full size image":t("jm"),"Side image":t("jn"),"Left aligned image":t("jo"),"Centered image":t("jp"),"Right aligned image":t("jq")}}init(){const t=this.editor;const e=t.config.get("image.styles");const i=uv(sv(e),this.localizedDefaultStylesTitles);for(const t of i){this._createButton(t)}}_createButton(t){const e=this.editor;const i=`imageStyle:${t.name}`;e.ui.componentFactory.add(i,i=>{const n=e.commands.get("imageStyle");const o=new Kb(i);o.set({label:t.title,icon:t.icon,tooltip:true,isToggleable:true});o.bind("isEnabled").to(n,"isEnabled");o.bind("isOn").to(n,"value",e=>e===t.name);this.listenTo(o,"execute",()=>{e.execute("imageStyle",{value:t.name});e.editing.view.focus()});return o})}}function uv(t,e){for(const i of t){if(e[i.title]){i.title=e[i.title]}}return t}class hv extends Nw{static get requires(){return[cv,dv]}static get pluginName(){return"ImageStyle"}}class fv extends Nw{static get requires(){return[Mk]}static get pluginName(){return"WidgetToolbarRepository"}init(){const t=this.editor;if(t.plugins.has("BalloonToolbar")){const e=t.plugins.get("BalloonToolbar");this.listenTo(e,"show",e=>{if(pv(t.editing.view.document.selection)){e.stop()}},{priority:"high"})}this._toolbarDefinitions=new Map;this._balloon=this.editor.plugins.get("ContextualBalloon");this.on("change:isEnabled",()=>{this._updateToolbarsVisibility()});this.listenTo(t.ui,"update",()=>{this._updateToolbarsVisibility()});this.listenTo(t.ui.focusTracker,"change:isFocused",()=>{this._updateToolbarsVisibility()},{priority:"low"})}destroy(){super.destroy();for(const t of this._toolbarDefinitions.values()){t.view.destroy()}}register(t,{ariaLabel:e,items:i,getRelatedElement:n,balloonClassName:o="ck-toolbar-container"}){const r=this.editor;const s=r.t;const a=new _w(r.locale);a.ariaLabel=e||s("jt");if(this._toolbarDefinitions.has(t)){throw new ss["b"]("widget-toolbar-duplicated: Toolbar with the given id was already added.",this,{toolbarId:t})}a.fillFromConfig(i,r.ui.componentFactory);this._toolbarDefinitions.set(t,{view:a,getRelatedElement:n,balloonClassName:o})}_updateToolbarsVisibility(){let t=0;let e=null;let i=null;for(const n of this._toolbarDefinitions.values()){const o=n.getRelatedElement(this.editor.editing.view.document.selection);if(!this.isEnabled||!o){if(this._isToolbarInBalloon(n)){this._hideToolbar(n)}}else if(!this.editor.ui.focusTracker.isFocused){if(this._isToolbarVisible(n)){this._hideToolbar(n)}}else{const r=o.getAncestors().length;if(r>t){t=r;e=o;i=n}}}if(i){this._showToolbar(i,e)}}_hideToolbar(t){this._balloon.remove(t.view);this.stopListening(this._balloon,"change:visibleView")}_showToolbar(t,e){if(this._isToolbarVisible(t)){mv(this.editor,e)}else if(!this._isToolbarInBalloon(t)){this._balloon.add({view:t.view,position:gv(this.editor,e),balloonClassName:t.balloonClassName});this.listenTo(this._balloon,"change:visibleView",()=>{for(const t of this._toolbarDefinitions.values()){if(this._isToolbarVisible(t)){const e=t.getRelatedElement(this.editor.editing.view.document.selection);mv(this.editor,e)}}})}}_isToolbarVisible(t){return this._balloon.visibleView===t.view}_isToolbarInBalloon(t){return this._balloon.hasView(t.view)}}function mv(t,e){const i=t.plugins.get("ContextualBalloon");const n=gv(t,e);i.updatePosition(n)}function gv(t,e){const i=t.editing.view;const n=_k.defaultPositions;return{target:i.domConverter.mapViewToDom(e),positions:[n.northArrowSouth,n.northArrowSouthWest,n.northArrowSouthEast,n.southArrowNorth,n.southArrowNorthWest,n.southArrowNorthEast]}}function pv(t){const e=t.getSelectedElement();return!!(e&&x_(e))}class bv extends Nw{static get requires(){return[fv]}static get pluginName(){return"ImageToolbar"}afterInit(){const t=this.editor;const e=t.t;const i=t.plugins.get(fv);i.register("image",{ariaLabel:e("a"),items:t.config.get("image.toolbar")||[],getRelatedElement:z_})}}class wv extends gb{constructor(t){super(t);this.buttonView=new Kb(t);this._fileInputView=new _v(t);this._fileInputView.bind("acceptedType").to(this);this._fileInputView.bind("allowMultipleFiles").to(this);this._fileInputView.delegate("done").to(this);this.setTemplate({tag:"span",attributes:{class:"ck-file-dialog-button"},children:[this.buttonView,this._fileInputView]});this.buttonView.on("execute",()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class _v extends gb{constructor(t){super(t);this.set("acceptedType");this.set("allowMultipleFiles",false);const e=this.bindTemplate;this.setTemplate({tag:"input",attributes:{class:["ck-hidden"],type:"file",tabindex:"-1",accept:e.to("acceptedType"),multiple:e.to("allowMultipleFiles")},on:{change:e.to(()=>{if(this.element&&this.element.files&&this.element.files.length){this.fire("done",this.element.files)}this.element.value=""})}})}open(){this.element.click()}}var kv='';function vv(t){const e=t.map(t=>t.replace("+","\\+"));return new RegExp(`^image\\/(${e.join("|")})$`)}function yv(t){return new Promise((e,i)=>{const n=t.getAttribute("src");fetch(n).then(t=>t.blob()).then(t=>{const o=Av(t,n);const r=o.replace("image/","");const s=`image.${r}`;const a=Cv(t,s,o);a?e(a):i()}).catch(i)})}function xv(t){if(!t.is("element","img")||!t.getAttribute("src")){return false}return t.getAttribute("src").match(/^data:image\/\w+;base64,/g)||t.getAttribute("src").match(/^blob:/g)}function Av(t,e){if(t.type){return t.type}else if(e.match(/data:(image\/\w+);base64/)){return e.match(/data:(image\/\w+);base64/)[1].toLowerCase()}else{return"image/jpeg"}}function Cv(t,e,i){try{return new File([t],e,{type:i})}catch(t){return null}}class Tv extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add("imageUpload",i=>{const n=new wv(i);const o=t.commands.get("imageUpload");const r=t.config.get("image.upload.types");const s=vv(r);n.set({acceptedType:r.map(t=>`image/${t}`).join(","),allowMultipleFiles:true});n.buttonView.set({label:e("jr"),icon:kv,tooltip:true});n.buttonView.bind("isEnabled").to(o);n.on("done",(e,i)=>{const n=Array.from(i).filter(t=>s.test(t.type));if(n.length){t.execute("imageUpload",{file:n})}});return n})}}class Ev{constructor(t){this.context=t}destroy(){this.stopListening()}static get isContextPlugin(){return true}}vs(Ev,Jc);class Mv extends Ev{static get pluginName(){return"PendingActions"}init(){this.set("hasAny",false);this._actions=new ys({idProperty:"_id"});this._actions.delegate("add","remove").to(this)}add(t){if(typeof t!=="string"){throw new ss["b"]("pendingactions-add-invalid-message: The message must be a string.",this)}const e=Object.create(Jc);e.set("message",t);this._actions.add(e);this.hasAny=true;return e}remove(t){this._actions.remove(t);this.hasAny=!!this._actions.length}get first(){return this._actions.get(0)}[Symbol.iterator](){return this._actions[Symbol.iterator]()}}class Pv{constructor(){const t=new window.FileReader;this._reader=t;this._data=undefined;this.set("loaded",0);t.onprogress=t=>{this.loaded=t.loaded}}get error(){return this._reader.error}get data(){return this._data}read(t){const e=this._reader;this.total=t.size;return new Promise((i,n)=>{e.onload=()=>{const t=e.result;this._data=t;i(t)};e.onerror=()=>{n("error")};e.onabort=()=>{n("aborted")};this._reader.readAsDataURL(t)})}abort(){this._reader.abort()}}vs(Pv,Jc);class Sv extends Nw{static get pluginName(){return"FileRepository"}static get requires(){return[Mv]}init(){this.loaders=new ys;this.loaders.on("add",()=>this._updatePendingAction());this.loaders.on("remove",()=>this._updatePendingAction());this._loadersMap=new Map;this._pendingAction=null;this.set("uploaded",0);this.set("uploadTotal",null);this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,e)=>e?t/e*100:0)}getLoader(t){return this._loadersMap.get(t)||null}createLoader(t){if(!this.createUploadAdapter){console.warn(Object(ss["a"])("filerepository-no-upload-adapter: Upload adapter is not defined."));return null}const e=new Iv(Promise.resolve(t),this.createUploadAdapter);this.loaders.add(e);this._loadersMap.set(t,e);if(t instanceof Promise){e.file.then(t=>{this._loadersMap.set(t,e)}).catch(()=>{})}e.on("change:uploaded",()=>{let t=0;for(const e of this.loaders){t+=e.uploaded}this.uploaded=t});e.on("change:uploadTotal",()=>{let t=0;for(const e of this.loaders){if(e.uploadTotal){t+=e.uploadTotal}}this.uploadTotal=t});return e}destroyLoader(t){const e=t instanceof Iv?t:this.getLoader(t);e._destroy();this.loaders.remove(e);this._loadersMap.forEach((t,i)=>{if(t===e){this._loadersMap.delete(i)}})}_updatePendingAction(){const t=this.editor.plugins.get(Mv);if(this.loaders.length){if(!this._pendingAction){const e=this.editor.t;const i=t=>`${e("kj")} ${parseInt(t)}%.`;this._pendingAction=t.add(i(this.uploadedPercent));this._pendingAction.bind("message").to(this,"uploadedPercent",i)}}else{t.remove(this._pendingAction);this._pendingAction=null}}}vs(Sv,Jc);class Iv{constructor(t,e){this.id=is();this._filePromiseWrapper=this._createFilePromiseWrapper(t);this._adapter=e(this);this._reader=new Pv;this.set("status","idle");this.set("uploaded",0);this.set("uploadTotal",null);this.bind("uploadedPercent").to(this,"uploaded",this,"uploadTotal",(t,e)=>e?t/e*100:0);this.set("uploadResponse",null)}get file(){if(!this._filePromiseWrapper){return Promise.resolve(null)}else{return this._filePromiseWrapper.promise.then(t=>this._filePromiseWrapper?t:null)}}get data(){return this._reader.data}read(){if(this.status!="idle"){throw new ss["b"]("filerepository-read-wrong-status: You cannot call read if the status is different than idle.",this)}this.status="reading";return this.file.then(t=>this._reader.read(t)).then(t=>{this.status="idle";return t}).catch(t=>{if(t==="aborted"){this.status="aborted";throw"aborted"}this.status="error";throw this._reader.error?this._reader.error:t})}upload(){if(this.status!="idle"){throw new ss["b"]("filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.",this)}this.status="uploading";return this.file.then(()=>this._adapter.upload()).then(t=>{this.uploadResponse=t;this.status="idle";return t}).catch(t=>{if(this.status==="aborted"){throw"aborted"}this.status="error";throw t})}abort(){const t=this.status;this.status="aborted";if(!this._filePromiseWrapper.isFulfilled){this._filePromiseWrapper.promise.catch(()=>{});this._filePromiseWrapper.rejecter("aborted")}else if(t=="reading"){this._reader.abort()}else if(t=="uploading"&&this._adapter.abort){this._adapter.abort()}this._destroy()}_destroy(){this._filePromiseWrapper=undefined;this._reader=undefined;this._adapter=undefined;this.uploadResponse=undefined}_createFilePromiseWrapper(t){const e={};e.promise=new Promise((i,n)=>{e.rejecter=n;e.isFulfilled=false;t.then(t=>{e.isFulfilled=true;i(t)}).catch(t=>{e.isFulfilled=true;n(t)})});return e}}vs(Iv,Jc);var Nv='';var Ov=i(70);var Lv=i(72);var zv=i(74);class Rv extends Nw{constructor(t){super(t);this.placeholder="data:image/svg+xml;utf8,"+encodeURIComponent(Nv)}init(){const t=this.editor;t.editing.downcastDispatcher.on("attribute:uploadStatus:image",(...t)=>this.uploadStatusChange(...t))}uploadStatusChange(t,e,i){const n=this.editor;const o=e.item;const r=o.getAttribute("uploadId");if(!i.consumable.consume(e.item,t.name)){return}const s=n.plugins.get(Sv);const a=r?e.attributeNewValue:null;const c=this.placeholder;const l=n.editing.mapper.toViewElement(o);const d=i.writer;if(a=="reading"){jv(l,d);Bv(c,l,d);return}if(a=="uploading"){const t=s.loaders.get(r);jv(l,d);if(!t){Bv(c,l,d)}else{Vv(l,d);Fv(l,d,t,n.editing.view);Gv(l,d,t)}return}if(a=="complete"&&s.loaders.get(r)&&!Cl.isEdge){Wv(l,d,n.editing.view)}Hv(l,d);Vv(l,d);Dv(l,d)}}function jv(t,e){if(!t.hasClass("ck-appear")){e.addClass("ck-appear",t)}}function Dv(t,e){e.removeClass("ck-appear",t)}function Bv(t,e,i){if(!e.hasClass("ck-image-upload-placeholder")){i.addClass("ck-image-upload-placeholder",e)}const n=B_(e);if(n.getAttribute("src")!==t){i.setAttribute("src",t,n)}if(!$v(e,"placeholder")){i.insert(i.createPositionAfter(n),qv(i))}}function Vv(t,e){if(t.hasClass("ck-image-upload-placeholder")){e.removeClass("ck-image-upload-placeholder",t)}Yv(t,e,"placeholder")}function Fv(t,e,i,n){const o=Uv(e);e.insert(e.createPositionAt(t,"end"),o);i.on("change:uploadedPercent",(t,e,i)=>{n.change(t=>{t.setStyle("width",i+"%",o)})})}function Hv(t,e){Yv(t,e,"progressBar")}function Wv(t,e,i){const n=e.createUIElement("div",{class:"ck-image-upload-complete-icon"});e.insert(e.createPositionAt(t,"end"),n);setTimeout(()=>{i.change(t=>t.remove(t.createRangeOn(n)))},3e3)}function Uv(t){const e=t.createUIElement("div",{class:"ck-progress-bar"});t.setCustomProperty("progressBar",true,e);return e}function qv(t){const e=t.createUIElement("div",{class:"ck-upload-placeholder-loader"});t.setCustomProperty("placeholder",true,e);return e}function $v(t,e){for(const i of t.getChildren()){if(i.getCustomProperty(e)){return i}}}function Yv(t,e,i){const n=$v(t,i);if(n){e.remove(e.createRangeOn(n))}}function Gv(t,e,i){if(i.data){const n=B_(t);e.setAttribute("src",i.data,n)}}class Jv extends Ev{static get pluginName(){return"Notification"}init(){this.on("show:warning",(t,e)=>{window.alert(e.message)},{priority:"lowest"})}showSuccess(t,e={}){this._showNotification({message:t,type:"success",namespace:e.namespace,title:e.title})}showInfo(t,e={}){this._showNotification({message:t,type:"info",namespace:e.namespace,title:e.title})}showWarning(t,e={}){this._showNotification({message:t,type:"warning",namespace:e.namespace,title:e.title})}_showNotification(t){const e=`show:${t.type}`+(t.namespace?`:${t.namespace}`:"");this.fire(e,{message:t.message,type:t.type,title:t.title||""})}}class Xv{constructor(t){this.files=Qv(t);this._native=t}get types(){return this._native.types}getData(t){return this._native.getData(t)}setData(t,e){this._native.setData(t,e)}}function Qv(t){const e=t.files?Array.from(t.files):[];const i=t.items?Array.from(t.items):[];if(e.length){return e}return i.filter(t=>t.kind==="file").map(t=>t.getAsFile())}class Kv extends Ju{constructor(t){super(t);const e=this.document;this.domEventType=["paste","copy","cut","drop","dragover"];this.listenTo(e,"paste",i,{priority:"low"});this.listenTo(e,"drop",i,{priority:"low"});function i(t,i){i.preventDefault();const n=i.dropRange?[i.dropRange]:Array.from(e.selection.getRanges());const o=new ts(e,"clipboardInput");e.fire(o,{dataTransfer:i.dataTransfer,targetRanges:n});if(o.stop.called){i.stopPropagation()}}}onDomEvent(t){const e={dataTransfer:new Xv(t.clipboardData?t.clipboardData:t.dataTransfer)};if(t.type=="drop"){e.dropRange=Zv(this.view,t)}this.fire(t.type,t,e)}}function Zv(t,e){const i=e.target.ownerDocument;const n=e.clientX;const o=e.clientY;let r;if(i.caretRangeFromPoint&&i.caretRangeFromPoint(n,o)){r=i.caretRangeFromPoint(n,o)}else if(e.rangeParent){r=i.createRange();r.setStart(e.rangeParent,e.rangeOffset);r.collapse(true)}if(r){return t.domConverter.domRangeToView(r)}else{return t.document.selection.getFirstRange()}}function ty(t){t=t.replace(//g,">").replace(/\n/g,"
").replace(/^\s/," ").replace(/\s$/," ").replace(/\s\s/g," ");if(t.indexOf("
")>-1){t=`
${t}
`}return t}function ey(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>{if(e.length==1){return" "}return e})}const iy=["figcaption","li"];function ny(t){let e="";if(t.is("text")||t.is("textProxy")){e=t.data}else if(t.is("img")&&t.hasAttribute("alt")){e=t.getAttribute("alt")}else{let i=null;for(const n of t.getChildren()){const t=ny(n);if(i&&(i.is("containerElement")||n.is("containerElement"))){if(iy.includes(i.name)||iy.includes(n.name)){e+="\n"}else{e+="\n\n"}}e+=t;i=n}}return e}class oy extends Nw{static get pluginName(){return"Clipboard"}init(){const t=this.editor;const e=t.model.document;const i=t.editing.view;const n=i.document;this._htmlDataProcessor=new kp(n);i.addObserver(Kv);this.listenTo(n,"clipboardInput",e=>{if(t.isReadOnly){e.stop()}},{priority:"highest"});this.listenTo(n,"clipboardInput",(t,e)=>{const n=e.dataTransfer;let o="";if(n.getData("text/html")){o=ey(n.getData("text/html"))}else if(n.getData("text/plain")){o=ty(n.getData("text/plain"))}o=this._htmlDataProcessor.toView(o);this.fire("inputTransformation",{content:o,dataTransfer:n});i.scrollToTheSelection()},{priority:"low"});this.listenTo(this,"inputTransformation",(t,e)=>{if(!e.content.isEmpty){const t=this.editor.data;const i=this.editor.model;const n=t.toModel(e.content,"$clipboardHolder");if(n.childCount==0){return}i.insertContent(n)}},{priority:"low"});function o(i,o){const r=o.dataTransfer;o.preventDefault();const s=t.data.toView(t.model.getSelectedContent(e.selection));n.fire("clipboardOutput",{dataTransfer:r,content:s,method:i.name})}this.listenTo(n,"copy",o,{priority:"low"});this.listenTo(n,"cut",(e,i)=>{if(t.isReadOnly){i.preventDefault()}else{o(e,i)}},{priority:"low"});this.listenTo(n,"clipboardOutput",(i,n)=>{if(!n.content.isEmpty){n.dataTransfer.setData("text/html",this._htmlDataProcessor.toData(n.content));n.dataTransfer.setData("text/plain",ny(n.content))}if(n.method=="cut"){t.model.deleteContent(e.selection)}},{priority:"low"})}}class ry{constructor(t){this.document=t}createDocumentFragment(t){return new Ul(this.document,t)}createElement(t,e,i){return new jc(this.document,t,e,i)}createText(t){return new Ds(this.document,t)}clone(t,e=false){return t._clone(e)}appendChild(t,e){return e._appendChild(t)}insertChild(t,e,i){return i._insertChild(t,e)}removeChildren(t,e,i){return i._removeChildren(t,e)}remove(t){const e=t.parent;if(e){return this.removeChildren(e.getChildIndex(t),1,e)}return[]}replace(t,e){const i=t.parent;if(i){const n=i.getChildIndex(t);this.removeChildren(n,1,i);this.insertChild(n,e,i);return true}return false}unwrapElement(t){const e=t.parent;if(e){const i=e.getChildIndex(t);this.remove(t);this.insertChild(i,t.getChildren(),e)}}rename(t,e){const i=new jc(this.document,t,e.getAttributes(),e.getChildren());return this.replace(e,i)?i:null}setAttribute(t,e,i){i._setAttribute(t,e)}removeAttribute(t,e){e._removeAttribute(t)}addClass(t,e){e._addClass(t)}removeClass(t,e){e._removeClass(t)}setStyle(t,e,i){if(L(t)&&i===undefined){i=e}i._setStyle(t,e)}removeStyle(t,e){e._removeStyle(t)}setCustomProperty(t,e,i){i._setCustomProperty(t,e)}removeCustomProperty(t,e){return e._removeCustomProperty(t)}createPositionAt(t,e){return dl._createAt(t,e)}createPositionAfter(t){return dl._createAfter(t)}createPositionBefore(t){return dl._createBefore(t)}createRange(t,e){return new ul(t,e)}createRangeOn(t){return ul._createOn(t)}createRangeIn(t){return ul._createIn(t)}createSelection(t,e,i){return new ml(t,e,i)}}class sy extends Rw{refresh(){this.isEnabled=D_(this.editor.model)}execute(t){const e=this.editor;const i=e.model;const n=e.plugins.get(Sv);i.change(e=>{const o=Array.isArray(t.file)?t.file:[t.file];for(const t of o){ay(e,i,n,t)}})}}function ay(t,e,i,n){const o=i.createLoader(n);if(!o){return}j_(t,e,{uploadId:o.id})}class cy extends Nw{static get requires(){return[Sv,Jv,oy]}static get pluginName(){return"ImageUploadEditing"}constructor(t){super(t);t.config.define("image",{upload:{types:["jpeg","png","gif","bmp","webp","tiff"]}})}init(){const t=this.editor;const e=t.model.document;const i=t.model.schema;const n=t.conversion;const o=t.plugins.get(Sv);const r=vv(t.config.get("image.upload.types"));i.extend("image",{allowAttributes:["uploadId","uploadStatus"]});t.commands.add("imageUpload",new sy(t));n.for("upcast").attributeToAttribute({view:{name:"img",key:"uploadId"},model:"uploadId"});this.listenTo(t.editing.view.document,"clipboardInput",(e,i)=>{if(ly(i.dataTransfer)){return}const n=Array.from(i.dataTransfer.files).filter(t=>{if(!t){return false}return r.test(t.type)});const o=i.targetRanges.map(e=>t.editing.mapper.toModelRange(e));t.model.change(i=>{i.setSelection(o);if(n.length){e.stop();t.model.enqueueChange("default",()=>{t.execute("imageUpload",{file:n})})}})});this.listenTo(t.plugins.get(oy),"inputTransformation",(e,i)=>{const n=Array.from(t.editing.view.createRangeIn(i.content)).filter(t=>xv(t.item)&&!t.item.getAttribute("uploadProcessed")).map(t=>({promise:yv(t.item),imageElement:t.item}));if(!n.length){return}const r=new ry(t.editing.view.document);for(const t of n){r.setAttribute("uploadProcessed",true,t.imageElement);const e=o.createLoader(t.promise);if(e){r.setAttribute("src","",t.imageElement);r.setAttribute("uploadId",e.id,t.imageElement)}}});t.editing.view.document.on("dragover",(t,e)=>{e.preventDefault()});e.on("change",()=>{const i=e.differ.getChanges({includeChangesInGraveyard:true});for(const e of i){if(e.type=="insert"&&e.name!="$text"){const i=e.position.nodeAfter;const n=e.position.root.rootName=="$graveyard";for(const e of dy(t,i)){const t=e.getAttribute("uploadId");if(!t){continue}const i=o.loaders.get(t);if(!i){continue}if(n){i.abort()}else if(i.status=="idle"){this._readAndUpload(i,e)}}}}})}_readAndUpload(t,e){const i=this.editor;const n=i.model;const o=i.locale.t;const r=i.plugins.get(Sv);const s=i.plugins.get(Jv);n.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","reading",e)});return t.read().then(()=>{const o=t.upload();if(Cl.isSafari){const t=i.editing.mapper.toViewElement(e);const n=B_(t);i.editing.view.once("render",()=>{if(!n.parent){return}const t=i.editing.view.domConverter.mapViewToDom(n.parent);if(!t){return}const e=t.style.display;t.style.display="none";t._ckHack=t.offsetHeight;t.style.display=e})}n.enqueueChange("transparent",t=>{t.setAttribute("uploadStatus","uploading",e)});return o}).then(t=>{n.enqueueChange("transparent",i=>{i.setAttributes({uploadStatus:"complete",src:t.default},e);this._parseAndSetSrcsetAttributeOnImage(t,e,i)});a()}).catch(i=>{if(t.status!=="error"&&t.status!=="aborted"){throw i}if(t.status=="error"&&i){s.showWarning(i,{title:o("js"),namespace:"upload"})}a();n.enqueueChange("transparent",t=>{t.remove(e)})});function a(){n.enqueueChange("transparent",t=>{t.removeAttribute("uploadId",e);t.removeAttribute("uploadStatus",e)});r.destroyLoader(t)}}_parseAndSetSrcsetAttributeOnImage(t,e,i){let n=0;const o=Object.keys(t).filter(t=>{const e=parseInt(t,10);if(!isNaN(e)){n=Math.max(n,e);return true}}).map(e=>`${t[e]} ${e}w`).join(", ");if(o!=""){i.setAttribute("srcset",{data:o,width:n},e)}}}function ly(t){return Array.from(t.types).includes("text/html")&&t.getData("text/html")!==""}function dy(t,e){return Array.from(t.model.createRangeOn(e)).filter(t=>t.item.is("image")).map(t=>t.item)}class uy extends Nw{static get pluginName(){return"ImageUpload"}static get requires(){return[cy,Tv,Rv]}}class hy extends Rw{constructor(t){super(t);this._childCommands=[]}refresh(){}execute(...t){const e=this._getFirstEnabledCommand();e.execute(t)}registerChildCommand(t){this._childCommands.push(t);t.on("change:isEnabled",()=>this._checkEnabled());this._checkEnabled()}_checkEnabled(){this.isEnabled=!!this._getFirstEnabledCommand()}_getFirstEnabledCommand(){return this._childCommands.find(t=>t.isEnabled)}}class fy extends Nw{static get pluginName(){return"IndentEditing"}init(){const t=this.editor;t.commands.add("indent",new hy(t));t.commands.add("outdent",new hy(t))}}var my='';var gy='';class py extends Nw{static get pluginName(){return"IndentUI"}init(){const t=this.editor;const e=t.locale;const i=t.t;const n=e.uiLanguageDirection=="ltr"?my:gy;const o=e.uiLanguageDirection=="ltr"?gy:my;this._defineButton("indent",i("os"),n);this._defineButton("outdent",i("ot"),o)}_defineButton(t,e,i){const n=this.editor;n.ui.componentFactory.add(t,o=>{const r=n.commands.get(t);const s=new Kb(o);s.set({label:e,icon:i,tooltip:true});s.bind("isOn","isEnabled").to(r,"value","isEnabled");this.listenTo(s,"execute",()=>{n.execute(t);n.editing.view.focus()});return s})}}class by extends Nw{static get pluginName(){return"Indent"}static get requires(){return[fy,py]}}const wy="italic";class _y extends Nw{static get pluginName(){return"ItalicEditing"}init(){const t=this.editor;t.model.schema.extend("$text",{allowAttributes:wy});t.model.schema.setAttributeProperties(wy,{isFormatting:true,copyOnEnter:true});t.conversion.attributeToElement({model:wy,view:"i",upcastAlso:["em",{styles:{"font-style":"italic"}}]});t.commands.add(wy,new Gw(t,wy));t.keystrokes.set("CTRL+I",wy)}}var ky='';const vy="italic";class yy extends Nw{init(){const t=this.editor;const e=t.t;t.ui.componentFactory.add(vy,i=>{const n=t.commands.get(vy);const o=new Kb(i);o.set({label:e("je"),icon:ky,keystroke:"CTRL+I",tooltip:true,isToggleable:true});o.bind("isOn","isEnabled").to(n,"value","isEnabled");this.listenTo(o,"execute",()=>{t.execute(vy);t.editing.view.focus()});return o})}}class xy extends Nw{static get requires(){return[_y,yy]}static get pluginName(){return"Italic"}}function Ay(t,e,i){return i.createRange(Cy(t,e,true,i),Cy(t,e,false,i))}function Cy(t,e,i,n){let o=t.textNode||(i?t.nodeBefore:t.nodeAfter);let r=null;while(o&&o.getAttribute("linkHref")==e){r=o;o=i?o.previousSibling:o.nextSibling}return r?n.createPositionAt(r,i?"before":"after"):t}class Ty extends Rw{constructor(t){super(t);this.manualDecorators=new ys}restoreManualDecoratorStates(){for(const t of this.manualDecorators){t.value=this._getDecoratorStateFromModel(t.id)}}refresh(){const t=this.editor.model;const e=t.document;this.value=e.selection.getAttribute("linkHref");for(const t of this.manualDecorators){t.value=this._getDecoratorStateFromModel(t.id)}this.isEnabled=t.schema.checkAttributeInSelection(e.selection,"linkHref")}execute(t,e={}){const i=this.editor.model;const n=i.document.selection;const o=[];const r=[];for(const t in e){if(e[t]){o.push(t)}else{r.push(t)}}i.change(e=>{if(n.isCollapsed){const s=n.getFirstPosition();if(n.hasAttribute("linkHref")){const a=Ay(s,n.getAttribute("linkHref"),i);e.setAttribute("linkHref",t,a);o.forEach(t=>{e.setAttribute(t,true,a)});r.forEach(t=>{e.removeAttribute(t,a)});e.setSelection(a)}else if(t!==""){const r=Hs(n.getAttributes());r.set("linkHref",t);o.forEach(t=>{r.set(t,true)});const a=e.createText(t,r);i.insertContent(a,s);e.setSelection(e.createRangeOn(a))}}else{const s=i.schema.getValidRanges(n.getRanges(),"linkHref");for(const i of s){e.setAttribute("linkHref",t,i);o.forEach(t=>{e.setAttribute(t,true,i)});r.forEach(t=>{e.removeAttribute(t,i)})}}})}_getDecoratorStateFromModel(t){const e=this.editor.model.document;return e.selection.getAttribute(t)||false}}class Ey extends Rw{refresh(){this.isEnabled=this.editor.model.document.selection.hasAttribute("linkHref")}execute(){const t=this.editor;const e=this.editor.model;const i=e.document.selection;const n=t.commands.get("link");e.change(t=>{const o=i.isCollapsed?[Ay(i.getFirstPosition(),i.getAttribute("linkHref"),e)]:i.getRanges();for(const e of o){t.removeAttribute("linkHref",e);if(n){for(const i of n.manualDecorators){t.removeAttribute(i.id,e)}}}})}}function My(t,e,i){var n=t.length;i=i===undefined?n:i;return!e&&i>=n?t:Ia(t,e,i)}var Py=My;var Sy="\\ud800-\\udfff",Iy="\\u0300-\\u036f",Ny="\\ufe20-\\ufe2f",Oy="\\u20d0-\\u20ff",Ly=Iy+Ny+Oy,zy="\\ufe0e\\ufe0f";var Ry="\\u200d";var jy=RegExp("["+Ry+Sy+Ly+zy+"]");function Dy(t){return jy.test(t)}var By=Dy;function Vy(t){return t.split("")}var Fy=Vy;var Hy="\\ud800-\\udfff",Wy="\\u0300-\\u036f",Uy="\\ufe20-\\ufe2f",qy="\\u20d0-\\u20ff",$y=Wy+Uy+qy,Yy="\\ufe0e\\ufe0f";var Gy="["+Hy+"]",Jy="["+$y+"]",Xy="\\ud83c[\\udffb-\\udfff]",Qy="(?:"+Jy+"|"+Xy+")",Ky="[^"+Hy+"]",Zy="(?:\\ud83c[\\udde6-\\uddff]){2}",tx="[\\ud800-\\udbff][\\udc00-\\udfff]",ex="\\u200d";var ix=Qy+"?",nx="["+Yy+"]?",ox="(?:"+ex+"(?:"+[Ky,Zy,tx].join("|")+")"+nx+ix+")*",rx=nx+ix+ox,sx="(?:"+[Ky+Jy+"?",Jy,Zy,tx,Gy].join("|")+")";var ax=RegExp(Xy+"(?="+Xy+")|"+sx+rx,"g");function cx(t){return t.match(ax)||[]}var lx=cx;function dx(t){return By(t)?lx(t):Fy(t)}var ux=dx;function hx(t){return function(e){e=ka(e);var i=By(e)?ux(e):undefined;var n=i?i[0]:e.charAt(0);var o=i?Py(i,1).join(""):e.slice(1);return n[t]()+o}}var fx=hx;var mx=fx("toUpperCase");var gx=mx;const px=/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205f\u3000]/g;const bx=/^(?:(?:https?|ftps?|mailto):|[^a-z]|[a-z+.-]+(?:[^a-z+.:-]|$))/i;function wx(t){return t.is("attributeElement")&&!!t.getCustomProperty("link")}function _x(t,e){const i=e.createAttributeElement("a",{href:t},{priority:5});e.setCustomProperty("link",true,i);return i}function kx(t){t=String(t);return vx(t)?t:"#"}function vx(t){const e=t.replace(px,"");return e.match(bx)}function yx(t,e){const i={"Open in a new tab":t("ow"),Downloadable:t("ox")};e.forEach(t=>{if(t.label&&i[t.label]){t.label=i[t.label]}return t});return e}function xx(t){const e=[];if(t){for(const[i,n]of Object.entries(t)){const t=Object.assign({},n,{id:`link${gx(i)}`});e.push(t)}}return e}class Ax{constructor(){this._definitions=new Set}get length(){return this._definitions.size}add(t){if(Array.isArray(t)){t.forEach(t=>this._definitions.add(t))}else{this._definitions.add(t)}}getDispatcher(){return t=>{t.on("attribute:linkHref",(t,e,i)=>{if(!i.consumable.test(e.item,"attribute:linkHref")){return}const n=i.writer;const o=n.document.selection;for(const t of this._definitions){const r=n.createAttributeElement("a",t.attributes,{priority:5});n.setCustomProperty("link",true,r);if(t.callback(e.attributeNewValue)){if(e.item.is("selection")){n.wrap(o.getFirstRange(),r)}else{n.wrap(i.mapper.toViewRange(e.range),r)}}else{n.unwrap(i.mapper.toViewRange(e.range),r)}}},{priority:"high"})}}}class Cx{constructor({id:t,label:e,attributes:i}){this.id=t;this.set("value");this.label=e;this.attributes=i}}vs(Cx,Jc);function Tx({view:t,model:e,emitter:i,attribute:n,locale:o}){const r=new Ex(e,i,n);const s=e.document.selection;i.listenTo(t.document,"keydown",(t,e)=>{if(!s.isCollapsed){return}if(e.shiftKey||e.altKey||e.ctrlKey){return}const i=e.keyCode==Ll.arrowright;const n=e.keyCode==Ll.arrowleft;if(!i&&!n){return}const a=s.getFirstPosition();const c=o.contentLanguageDirection;let l;if(c==="ltr"&&i||c==="rtl"&&n){l=r.handleForwardMovement(a,e)}else{l=r.handleBackwardMovement(a,e)}if(l){t.stop()}},{priority:os.get("high")+1})}class Ex{constructor(t,e,i){this.model=t;this.attribute=i;this._modelSelection=t.document.selection;this._overrideUid=null;this._isNextGravityRestorationSkipped=false;e.listenTo(this._modelSelection,"change:range",(t,e)=>{if(this._isNextGravityRestorationSkipped){this._isNextGravityRestorationSkipped=false;return}if(!this._isGravityOverridden){return}if(!e.directChange&&Mx(this._modelSelection.getFirstPosition(),i)){return}this._restoreGravity()})}handleForwardMovement(t,e){const i=this.attribute;if(this._isGravityOverridden){return}if(t.isAtStart&&this._hasSelectionAttribute){return}if(Ix(t,i)&&this._hasSelectionAttribute){this._preventCaretMovement(e);this._removeSelectionAttribute();return true}if(Px(t,i)){this._preventCaretMovement(e);this._overrideGravity();return true}if(Sx(t,i)&&this._hasSelectionAttribute){this._preventCaretMovement(e);this._overrideGravity();return true}}handleBackwardMovement(t,e){const i=this.attribute;if(this._isGravityOverridden){if(Ix(t,i)&&this._hasSelectionAttribute){this._preventCaretMovement(e);this._restoreGravity();this._removeSelectionAttribute();return true}else{this._preventCaretMovement(e);this._restoreGravity();if(t.isAtStart){this._removeSelectionAttribute()}return true}}else{if(Ix(t,i)&&!this._hasSelectionAttribute){this._preventCaretMovement(e);this._setSelectionAttributeFromTheNodeBefore(t);return true}if(t.isAtEnd&&Sx(t,i)){if(this._hasSelectionAttribute){if(Nx(t,i)){this._skipNextAutomaticGravityRestoration();this._overrideGravity()}return}else{this._preventCaretMovement(e);this._setSelectionAttributeFromTheNodeBefore(t);return true}}if(t.isAtStart){if(this._hasSelectionAttribute){this._removeSelectionAttribute();this._preventCaretMovement(e);return true}return}if(Nx(t,i)){this._skipNextAutomaticGravityRestoration();this._overrideGravity()}}}get _isGravityOverridden(){return!!this._overrideUid}get _hasSelectionAttribute(){return this._modelSelection.hasAttribute(this.attribute)}_overrideGravity(){this._overrideUid=this.model.change(t=>t.overrideSelectionGravity())}_restoreGravity(){this.model.change(t=>{t.restoreSelectionGravity(this._overrideUid);this._overrideUid=null})}_preventCaretMovement(t){t.preventDefault()}_removeSelectionAttribute(){this.model.change(t=>{t.removeSelectionAttribute(this.attribute)})}_setSelectionAttributeFromTheNodeBefore(t){const e=this.attribute;this.model.change(i=>{i.setSelectionAttribute(this.attribute,t.nodeBefore.getAttribute(e))})}_skipNextAutomaticGravityRestoration(){this._isNextGravityRestorationSkipped=true}}function Mx(t,e){return Px(t,e)||Sx(t,e)}function Px(t,e){const{nodeBefore:i,nodeAfter:n}=t;const o=i?i.hasAttribute(e):false;const r=n?n.hasAttribute(e):false;return r&&(!o||i.getAttribute(e)!==n.getAttribute(e))}function Sx(t,e){const{nodeBefore:i,nodeAfter:n}=t;const o=i?i.hasAttribute(e):false;const r=n?n.hasAttribute(e):false;return o&&(!r||i.getAttribute(e)!==n.getAttribute(e))}function Ix(t,e){const{nodeBefore:i,nodeAfter:n}=t;const o=i?i.hasAttribute(e):false;const r=n?n.hasAttribute(e):false;if(!r||!o){return}return n.getAttribute(e)!==i.getAttribute(e)}function Nx(t,e){return Mx(t.getShiftedBy(-1),e)}var Ox=i(76);const Lx="ck-link_selected";const zx="automatic";const Rx="manual";const jx=/^(https?:)?\/\//;class Dx extends Nw{static get pluginName(){return"LinkEditing"}constructor(t){super(t);t.config.define("link",{addTargetToExternalLinks:false})}init(){const t=this.editor;const e=t.locale;t.model.schema.extend("$text",{allowAttributes:"linkHref"});t.conversion.for("dataDowncast").attributeToElement({model:"linkHref",view:_x});t.conversion.for("editingDowncast").attributeToElement({model:"linkHref",view:(t,e)=>_x(kx(t),e)});t.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:{href:true}},model:{key:"linkHref",value:t=>t.getAttribute("href")}});t.commands.add("link",new Ty(t));t.commands.add("unlink",new Ey(t));const i=yx(t.t,xx(t.config.get("link.decorators")));this._enableAutomaticDecorators(i.filter(t=>t.mode===zx));this._enableManualDecorators(i.filter(t=>t.mode===Rx));Tx({view:t.editing.view,model:t.model,emitter:this,attribute:"linkHref",locale:e});this._setupLinkHighlight()}_enableAutomaticDecorators(t){const e=this.editor;const i=new Ax;if(e.config.get("link.addTargetToExternalLinks")){i.add({id:"linkIsExternal",mode:zx,callback:t=>jx.test(t),attributes:{target:"_blank",rel:"noopener noreferrer"}})}i.add(t);if(i.length){e.conversion.for("downcast").add(i.getDispatcher())}}_enableManualDecorators(t){if(!t.length){return}const e=this.editor;const i=e.commands.get("link");const n=i.manualDecorators;t.forEach(t=>{e.model.schema.extend("$text",{allowAttributes:t.id});n.add(new Cx(t));e.conversion.for("downcast").attributeToElement({model:t.id,view:(e,i)=>{if(e){const e=n.get(t.id).attributes;const o=i.createAttributeElement("a",e,{priority:5});i.setCustomProperty("link",true,o);return o}}});e.conversion.for("upcast").elementToAttribute({view:{name:"a",attributes:n.get(t.id).attributes},model:{key:t.id}})})}_setupLinkHighlight(){const t=this.editor;const e=t.editing.view;const i=new Set;e.document.registerPostFixer(e=>{const n=t.model.document.selection;let o=false;if(n.hasAttribute("linkHref")){const r=Ay(n.getFirstPosition(),n.getAttribute("linkHref"),t.model);const s=t.editing.mapper.toViewRange(r);for(const t of s.getItems()){if(t.is("a")&&!t.hasClass(Lx)){e.addClass(Lx,t);i.add(t);o=true}}}return o});t.conversion.for("editingDowncast").add(t=>{t.on("insert",n,{priority:"highest"});t.on("remove",n,{priority:"highest"});t.on("attribute",n,{priority:"highest"});t.on("selection",n,{priority:"highest"});function n(){e.change(t=>{for(const e of i.values()){t.removeClass(Lx,e);i.delete(e)}})}})}}class Bx extends Ju{constructor(t){super(t);this.domEventType="click"}onDomEvent(t){this.fire(t.type,t)}}var Vx=i(78);class Fx extends gb{constructor(t,e=[]){super(t);const i=t.t;this.focusTracker=new xp;this.keystrokes=new dp;this.urlInputView=this._createUrlInput();this.saveButtonView=this._createButton(i("lv"),hk,"ck-button-save");this.saveButtonView.type="submit";this.cancelButtonView=this._createButton(i("lw"),fk,"ck-button-cancel","cancel");this._manualDecoratorSwitches=this._createManualDecoratorSwitches(e);this.children=this._createFormChildren(e);this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});const n=["ck","ck-link-form"];if(e.length){n.push("ck-link-form_layout-vertical")}this.setTemplate({tag:"form",attributes:{class:n,tabindex:"-1"},children:this.children})}getDecoratorSwitchesState(){return Array.from(this._manualDecoratorSwitches).reduce((t,e)=>{t[e.name]=e.isOn;return t},{})}render(){super.render();uk({view:this});const t=[this.urlInputView,...this._manualDecoratorSwitches,this.saveButtonView,this.cancelButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const t=this.locale.t;const e=new ck(this.locale,dk);e.label=t("pc");e.inputView.placeholder="https://example.com";return e}_createButton(t,e,i,n){const o=new Kb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate("execute").to(this,n)}return o}_createManualDecoratorSwitches(t){const e=this.createCollection();for(const i of t){const t=new sw(this.locale);t.set({name:i.id,label:i.label,withText:true});t.bind("isOn").to(i,"value");t.on("execute",()=>{i.set("value",!t.isOn)});e.add(t)}return e}_createFormChildren(t){const e=this.createCollection();e.add(this.urlInputView);if(t.length){const t=new gb;t.setTemplate({tag:"ul",children:this._manualDecoratorSwitches.map(t=>({tag:"li",children:[t],attributes:{class:["ck","ck-list__item"]}})),attributes:{class:["ck","ck-reset","ck-list"]}});e.add(t)}e.add(this.saveButtonView);e.add(this.cancelButtonView);return e}}var Hx='';var Wx='';var Ux=i(80);class qx extends gb{constructor(t){super(t);const e=t.t;this.focusTracker=new xp;this.keystrokes=new dp;this.previewButtonView=this._createPreviewButton();this.unlinkButtonView=this._createButton(e("oy"),Hx,"unlink");this.editButtonView=this._createButton(e("oz"),Wx,"edit");this.set("href");this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});this.setTemplate({tag:"div",attributes:{class:["ck","ck-link-actions"],tabindex:"-1"},children:[this.previewButtonView,this.editButtonView,this.unlinkButtonView]})}render(){super.render();const t=[this.previewButtonView,this.editButtonView,this.unlinkButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createButton(t,e,i){const n=new Kb(this.locale);n.set({label:t,icon:e,tooltip:true});n.delegate("execute").to(this,i);return n}_createPreviewButton(){const t=new Kb(this.locale);const e=this.bindTemplate;const i=this.t;t.set({withText:true,tooltip:i("pa")});t.extendTemplate({attributes:{class:["ck","ck-link-actions__preview"],href:e.to("href",t=>t&&kx(t)),target:"_blank",rel:"noopener noreferrer"}});t.bind("label").to(this,"href",t=>t||i("pb"));t.bind("isEnabled").to(this,"href",t=>!!t);t.template.tag="a";t.template.eventListeners={};return t}}var $x='';const Yx="Ctrl+K";class Gx extends Nw{static get requires(){return[Mk]}static get pluginName(){return"LinkUI"}init(){const t=this.editor;t.editing.view.addObserver(Bx);this.actionsView=this._createActionsView();this.formView=this._createFormView();this._balloon=t.plugins.get(Mk);this._createToolbarLinkButton();this._enableUserBalloonInteractions()}destroy(){super.destroy();this.formView.destroy()}_createActionsView(){const t=this.editor;const e=new qx(t.locale);const i=t.commands.get("link");const n=t.commands.get("unlink");e.bind("href").to(i,"value");e.editButtonView.bind("isEnabled").to(i);e.unlinkButtonView.bind("isEnabled").to(n);this.listenTo(e,"edit",()=>{this._addFormView()});this.listenTo(e,"unlink",()=>{t.execute("unlink");this._hideUI()});e.keystrokes.set("Esc",(t,e)=>{this._hideUI();e()});e.keystrokes.set(Yx,(t,e)=>{this._addFormView();e()});return e}_createFormView(){const t=this.editor;const e=t.commands.get("link");const i=new Fx(t.locale,e.manualDecorators);i.urlInputView.bind("value").to(e,"value");i.urlInputView.bind("isReadOnly").to(e,"isEnabled",t=>!t);i.saveButtonView.bind("isEnabled").to(e);this.listenTo(i,"submit",()=>{t.execute("link",i.urlInputView.inputView.element.value,i.getDecoratorSwitchesState());this._closeFormView()});this.listenTo(i,"cancel",()=>{this._closeFormView()});i.keystrokes.set("Esc",(t,e)=>{this._closeFormView();e()});return i}_createToolbarLinkButton(){const t=this.editor;const e=t.commands.get("link");const i=t.t;t.keystrokes.set(Yx,(t,e)=>{e();this._showUI(true)});t.ui.componentFactory.add("link",t=>{const n=new Kb(t);n.isEnabled=true;n.label=i("or");n.icon=$x;n.keystroke=Yx;n.tooltip=true;n.isToggleable=true;n.bind("isEnabled").to(e,"isEnabled");n.bind("isOn").to(e,"value",t=>!!t);this.listenTo(n,"execute",()=>this._showUI(true));return n})}_enableUserBalloonInteractions(){const t=this.editor.editing.view.document;this.listenTo(t,"click",()=>{const t=this._getSelectedLinkElement();if(t){this._showUI()}});this.editor.keystrokes.set("Tab",(t,e)=>{if(this._areActionsVisible&&!this.actionsView.focusTracker.isFocused){this.actionsView.focus();e()}},{priority:"high"});this.editor.keystrokes.set("Esc",(t,e)=>{if(this._isUIVisible){this._hideUI();e()}});aw({emitter:this.formView,activator:()=>this._isUIInPanel,contextElements:[this._balloon.view.element],callback:()=>this._hideUI()})}_addActionsView(){if(this._areActionsInPanel){return}this._balloon.add({view:this.actionsView,position:this._getBalloonPositionData()})}_addFormView(){if(this._isFormInPanel){return}const t=this.editor;const e=t.commands.get("link");this._balloon.add({view:this.formView,position:this._getBalloonPositionData()});if(this._balloon.visibleView===this.formView){this.formView.urlInputView.select()}this.formView.urlInputView.inputView.element.value=e.value||""}_closeFormView(){const t=this.editor.commands.get("link");t.restoreManualDecoratorStates();if(t.value!==undefined){this._removeFormView()}else{this._hideUI()}}_removeFormView(){if(this._isFormInPanel){this.formView.saveButtonView.focus();this._balloon.remove(this.formView);this.editor.editing.view.focus()}}_showUI(t=false){if(!this._getSelectedLinkElement()){this._addActionsView();if(t){this._balloon.showStack("main")}this._addFormView()}else{if(this._areActionsVisible){this._addFormView()}else{this._addActionsView()}if(t){this._balloon.showStack("main")}}this._startUpdatingUI()}_hideUI(){if(!this._isUIInPanel){return}const t=this.editor;this.stopListening(t.ui,"update");this.stopListening(this._balloon,"change:visibleView");t.editing.view.focus();this._removeFormView();this._balloon.remove(this.actionsView)}_startUpdatingUI(){const t=this.editor;const e=t.editing.view.document;let i=this._getSelectedLinkElement();let n=r();const o=()=>{const t=this._getSelectedLinkElement();const e=r();if(i&&!t||!i&&e!==n){this._hideUI()}else if(this._isUIVisible){this._balloon.updatePosition(this._getBalloonPositionData())}i=t;n=e};function r(){return e.selection.focus.getAncestors().reverse().find(t=>t.is("element"))}this.listenTo(t.ui,"update",o);this.listenTo(this._balloon,"change:visibleView",o)}get _isFormInPanel(){return this._balloon.hasView(this.formView)}get _areActionsInPanel(){return this._balloon.hasView(this.actionsView)}get _areActionsVisible(){return this._balloon.visibleView===this.actionsView}get _isUIInPanel(){return this._isFormInPanel||this._areActionsInPanel}get _isUIVisible(){const t=this._balloon.visibleView;return t==this.formView||this._areActionsVisible}_getBalloonPositionData(){const t=this.editor.editing.view;const e=t.document;const i=this._getSelectedLinkElement();const n=i?t.domConverter.mapViewToDom(i):t.domConverter.viewRangeToDom(e.selection.getFirstRange());return{target:n}}_getSelectedLinkElement(){const t=this.editor.editing.view;const e=t.document.selection;if(e.isCollapsed){return Jx(e.getFirstPosition())}else{const i=e.getFirstRange().getTrimmed();const n=Jx(i.start);const o=Jx(i.end);if(!n||n!=o){return null}if(t.createRangeIn(n).getTrimmed().isEqual(i)){return n}else{return null}}}}function Jx(t){return t.getAncestors().find(t=>wx(t))}class Xx extends Nw{static get requires(){return[Dx,Gx]}static get pluginName(){return"Link"}}class Qx extends Rw{constructor(t,e){super(t);this.type=e}refresh(){this.value=this._getValue();this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;const e=t.document;const i=Array.from(e.selection.getSelectedBlocks()).filter(e=>Zx(e,t.schema));const n=this.value===true;t.change(t=>{if(n){let e=i[i.length-1].nextSibling;let n=Number.POSITIVE_INFINITY;let o=[];while(e&&e.name=="listItem"&&e.getAttribute("listIndent")!==0){const t=e.getAttribute("listIndent");if(t=i){if(r>o.getAttribute("listIndent")){r=o.getAttribute("listIndent")}if(o.getAttribute("listIndent")==r){t[e?"unshift":"push"](o)}o=o[e?"previousSibling":"nextSibling"]}}}function Zx(t,e){return e.checkChild(t.parent,"listItem")&&!e.isObject(t)}class tA extends Rw{constructor(t,e){super(t);this._indentBy=e=="forward"?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const t=this.editor.model;const e=t.document;let i=Array.from(e.selection.getSelectedBlocks());t.change(t=>{const e=i[i.length-1];let n=e.nextSibling;while(n&&n.name=="listItem"&&n.getAttribute("listIndent")>e.getAttribute("listIndent")){i.push(n);n=n.nextSibling}if(this._indentBy<0){i=i.reverse()}for(const e of i){const i=e.getAttribute("listIndent")+this._indentBy;if(i<0){t.rename(e,"paragraph")}else{t.setAttribute("listIndent",i,e)}}})}_checkEnabled(){const t=Dw(this.editor.model.document.selection.getSelectedBlocks());if(!t||!t.is("listItem")){return false}if(this._indentBy>0){const e=t.getAttribute("listIndent");const i=t.getAttribute("listType");let n=t.previousSibling;while(n&&n.is("listItem")&&n.getAttribute("listIndent")>=e){if(n.getAttribute("listIndent")==e){return n.getAttribute("listType")==i}n=n.previousSibling}return false}return true}}function eA(t){const e=t.createContainerElement("li");e.getFillerOffset=cA;return e}function iA(t,e){const i=e.mapper;const n=e.writer;const o=t.getAttribute("listType")=="numbered"?"ol":"ul";const r=eA(n);const s=n.createContainerElement(o,null);n.insert(n.createPositionAt(s,0),r);i.bindElements(t,r);return r}function nA(t,e,i,n){const o=e.parent;const r=i.mapper;const s=i.writer;let a=r.toViewPosition(n.createPositionBefore(t));const c=sA(t.previousSibling,{sameIndent:true,smallerIndent:true,listIndent:t.getAttribute("listIndent")});const l=t.previousSibling;if(c&&c.getAttribute("listIndent")==t.getAttribute("listIndent")){const t=r.toViewElement(c);a=s.breakContainer(s.createPositionAfter(t))}else{if(l&&l.name=="listItem"){a=r.toViewPosition(n.createPositionAt(l,"end"))}else{a=r.toViewPosition(n.createPositionBefore(t))}}a=rA(a);s.insert(a,o);if(l&&l.name=="listItem"){const t=r.toViewElement(l);const i=s.createRange(s.createPositionAt(t,0),a);const n=i.getWalker({ignoreElementEnd:true});for(const t of n){if(t.item.is("li")){const i=s.breakContainer(s.createPositionBefore(t.item));const o=t.item.parent;const r=s.createPositionAt(e,"end");oA(s,r.nodeBefore,r.nodeAfter);s.move(s.createRangeOn(o),r);n.position=i}}}else{const i=o.nextSibling;if(i&&(i.is("ul")||i.is("ol"))){let n=null;for(const e of i.getChildren()){const i=r.toModelElement(e);if(i&&i.getAttribute("listIndent")>t.getAttribute("listIndent")){n=e}else{break}}if(n){s.breakContainer(s.createPositionAfter(n));s.move(s.createRangeOn(n.parent),s.createPositionAt(e,"end"))}}}oA(s,o,o.nextSibling);oA(s,o.previousSibling,o)}function oA(t,e,i){if(!e||!i||e.name!="ul"&&e.name!="ol"){return null}if(e.name!=i.name||e.getAttribute("class")!==i.getAttribute("class")){return null}return t.mergeContainers(t.createPositionAfter(e))}function rA(t){return t.getLastMatchingPosition(t=>t.item.is("uiElement"))}function sA(t,e){const i=!!e.sameIndent;const n=!!e.smallerIndent;const o=e.listIndent;let r=t;while(r&&r.name=="listItem"){const t=r.getAttribute("listIndent");if(i&&o==t||n&&o>t){return r}r=r.previousSibling}return null}function aA(t,e,i,n){t.ui.componentFactory.add(e,o=>{const r=t.commands.get(e);const s=new Kb(o);s.set({label:i,icon:n,tooltip:true,isToggleable:true});s.bind("isOn","isEnabled").to(r,"value","isEnabled");s.on("execute",()=>{t.execute(e);t.editing.view.focus()});return s})}function cA(){const t=!this.isEmpty&&(this.getChild(0).name=="ul"||this.getChild(0).name=="ol");if(this.isEmpty||t){return 0}return Hc.call(this)}function lA(t){return(e,i,n)=>{const o=n.consumable;if(!o.test(i.item,"insert")||!o.test(i.item,"attribute:listType")||!o.test(i.item,"attribute:listIndent")){return}o.consume(i.item,"insert");o.consume(i.item,"attribute:listType");o.consume(i.item,"attribute:listIndent");const r=i.item;const s=iA(r,n);nA(r,s,n,t)}}function dA(t){return(e,i,n)=>{const o=n.mapper.toViewPosition(i.position).getLastMatchingPosition(t=>!t.item.is("li"));const r=o.nodeAfter;const s=n.writer;s.breakContainer(s.createPositionBefore(r));s.breakContainer(s.createPositionAfter(r));const a=r.parent;const c=a.previousSibling;const l=s.createRangeOn(a);const d=s.remove(l);if(c&&c.nextSibling){oA(s,c,c.nextSibling)}const u=n.mapper.toModelElement(r);CA(u.getAttribute("listIndent")+1,i.position,l.start,r,n,t);for(const t of s.createRangeIn(d).getItems()){n.mapper.unbindViewElement(t)}e.stop()}}function uA(t,e,i){if(!i.consumable.consume(e.item,"attribute:listType")){return}const n=i.mapper.toViewElement(e.item);const o=i.writer;o.breakContainer(o.createPositionBefore(n));o.breakContainer(o.createPositionAfter(n));const r=n.parent;const s=e.attributeNewValue=="numbered"?"ol":"ul";o.rename(s,r)}function hA(t,e,i){const n=i.mapper.toViewElement(e.item);const o=n.parent;const r=i.writer;oA(r,o,o.nextSibling);oA(r,o.previousSibling,o);for(const t of e.item.getChildren()){i.consumable.consume(t,"insert")}}function fA(t){return(e,i,n)=>{if(!n.consumable.consume(i.item,"attribute:listIndent")){return}const o=n.mapper.toViewElement(i.item);const r=n.writer;r.breakContainer(r.createPositionBefore(o));r.breakContainer(r.createPositionAfter(o));const s=o.parent;const a=s.previousSibling;const c=r.createRangeOn(s);r.remove(c);if(a&&a.nextSibling){oA(r,a,a.nextSibling)}CA(i.attributeOldValue+1,i.range.start,c.start,o,n,t);nA(i.item,o,n,t);for(const t of i.item.getChildren()){n.consumable.consume(t,"insert")}}}function mA(t,e,i){if(e.item.name!="listItem"){let t=i.mapper.toViewPosition(e.range.start);const n=i.writer;const o=[];while(t.parent.name=="ul"||t.parent.name=="ol"){t=n.breakContainer(t);if(t.parent.name!="li"){break}const e=t;const i=n.createPositionAt(t.parent,"end");if(!e.isEqual(i)){const t=n.remove(n.createRange(e,i));o.push(t)}t=n.createPositionAfter(t.parent)}if(o.length>0){for(let e=0;e0){const e=oA(n,i,i.nextSibling);if(e&&e.parent==i){t.offset--}}}oA(n,t.nodeBefore,t.nodeAfter)}}}function gA(t,e,i){const n=i.mapper.toViewPosition(e.position);const o=n.nodeBefore;const r=n.nodeAfter;oA(i.writer,o,r)}function pA(t,e,i){if(i.consumable.consume(e.viewItem,{name:true})){const t=i.writer;const n=t.createElement("listItem");const o=EA(e.viewItem);t.setAttribute("listIndent",o,n);const r=e.viewItem.parent&&e.viewItem.parent.name=="ol"?"numbered":"bulleted";t.setAttribute("listType",r,n);const s=i.splitToAllowedParent(n,e.modelCursor);if(!s){return}t.insert(n,s.position);const a=xA(n,e.viewItem.getChildren(),i);e.modelRange=t.createRange(e.modelCursor,a);if(s.cursorParent){e.modelCursor=t.createPositionAt(s.cursorParent,0)}else{e.modelCursor=e.modelRange.end}}}function bA(t,e,i){if(i.consumable.test(e.viewItem,{name:true})){const t=Array.from(e.viewItem.getChildren());for(const e of t){const t=!(e.is("li")||TA(e));if(t){e._remove()}}}}function wA(t,e,i){if(i.consumable.test(e.viewItem,{name:true})){if(e.viewItem.childCount===0){return}const t=[...e.viewItem.getChildren()];let i=false;let n=true;for(const e of t){if(i&&!TA(e)){e._remove()}if(e.is("text")){if(n){e._data=e.data.replace(/^\s+/,"")}if(!e.nextSibling||TA(e.nextSibling)){e._data=e.data.replace(/\s+$/,"")}}else if(TA(e)){i=true}n=false}}}function _A(t){return(e,i)=>{if(i.isPhantom){return}const n=i.modelPosition.nodeBefore;if(n&&n.is("listItem")){const e=i.mapper.toViewElement(n);const o=e.getAncestors().find(TA);const r=t.createPositionAt(e,0).getWalker();for(const t of r){if(t.type=="elementStart"&&t.item.is("li")){i.viewPosition=t.previousPosition;break}else if(t.type=="elementEnd"&&t.item==o){i.viewPosition=t.nextPosition;break}}}}}function kA(t){return(e,i)=>{const n=i.viewPosition;const o=n.parent;const r=i.mapper;if(o.name=="ul"||o.name=="ol"){if(!n.isAtEnd){const e=r.toModelElement(n.nodeAfter);i.modelPosition=t.createPositionBefore(e)}else{const e=r.toModelElement(n.nodeBefore);const o=r.getModelLength(n.nodeBefore);i.modelPosition=t.createPositionBefore(e).getShiftedBy(o)}e.stop()}else if(o.name=="li"&&n.nodeBefore&&(n.nodeBefore.name=="ul"||n.nodeBefore.name=="ol")){const s=r.toModelElement(o);let a=1;let c=n.nodeBefore;while(c&&TA(c)){a+=r.getModelLength(c);c=c.previousSibling}i.modelPosition=t.createPositionBefore(s).getShiftedBy(a);e.stop()}}}function vA(t,e){const i=t.document.differ.getChanges();const n=new Map;let o=false;for(const n of i){if(n.type=="insert"&&n.name=="listItem"){r(n.position)}else if(n.type=="insert"&&n.name!="listItem"){if(n.name!="$text"){const i=n.position.nodeAfter;if(i.hasAttribute("listIndent")){e.removeAttribute("listIndent",i);o=true}if(i.hasAttribute("listType")){e.removeAttribute("listType",i);o=true}for(const e of Array.from(t.createRangeIn(i)).filter(t=>t.item.is("listItem"))){r(e.previousPosition)}}const i=n.position.getShiftedBy(n.length);r(i)}else if(n.type=="remove"&&n.name=="listItem"){r(n.position)}else if(n.type=="attribute"&&n.attributeKey=="listIndent"){r(n.range.start)}else if(n.type=="attribute"&&n.attributeKey=="listType"){r(n.range.start)}}for(const t of n.values()){s(t);a(t)}return o;function r(t){const e=t.nodeBefore;if(!e||!e.is("listItem")){const e=t.nodeAfter;if(e&&e.is("listItem")){n.set(e,e)}}else{let i=e;if(n.has(i)){return}while(i.previousSibling&&i.previousSibling.is("listItem")){i=i.previousSibling;if(n.has(i)){return}}n.set(t.nodeBefore,i)}}function s(t){let i=0;let n=null;while(t&&t.is("listItem")){const r=t.getAttribute("listIndent");if(r>i){let s;if(n===null){n=r-i;s=i}else{if(n>r){n=r}s=r-n}e.setAttribute("listIndent",s,t);o=true}else{n=null;i=t.getAttribute("listIndent")+1}t=t.nextSibling}}function a(t){let i=[];let n=null;while(t&&t.is("listItem")){const r=t.getAttribute("listIndent");if(n&&n.getAttribute("listIndent")>r){i=i.slice(0,r+1)}if(r!=0){if(i[r]){const n=i[r];if(t.getAttribute("listType")!=n){e.setAttribute("listType",n,t);o=true}}else{i[r]=t.getAttribute("listType")}}n=t;t=t.nextSibling}}}function yA(t,[e,i]){let n=e.is("documentFragment")?e.getChild(0):e;let o;if(!i){o=this.document.selection}else{o=this.createSelection(i)}if(n&&n.is("listItem")){const t=o.getFirstPosition();let e=null;if(t.parent.is("listItem")){e=t.parent}else if(t.nodeBefore&&t.nodeBefore.is("listItem")){e=t.nodeBefore}if(e){const t=e.getAttribute("listIndent");if(t>0){while(n&&n.is("listItem")){n._setAttribute("listIndent",n.getAttribute("listIndent")+t);n=n.nextSibling}}}}}function xA(t,e,i){const{writer:n,schema:o}=i;let r=n.createPositionAfter(t);for(const s of e){if(s.name=="ul"||s.name=="ol"){r=i.convertItem(s,r).modelCursor}else{const e=i.convertItem(s,n.createPositionAt(t,"end"));const a=e.modelRange.start.nodeAfter;const c=a&&a.is("element")&&!o.checkChild(t,a.name);if(c){if(e.modelCursor.parent.is("listItem")){t=e.modelCursor.parent}else{t=AA(e.modelCursor)}r=n.createPositionAfter(t)}}}return r}function AA(t){const e=new Wh({startPosition:t});let i;do{i=e.next()}while(!i.value.item.is("listItem"));return i.value.item}function CA(t,e,i,n,o,r){const s=sA(e.nodeBefore,{sameIndent:true,smallerIndent:true,listIndent:t,foo:"b"});const a=o.mapper;const c=o.writer;const l=s?s.getAttribute("listIndent"):null;let d;if(!s){d=i}else if(l==t){const t=a.toViewElement(s).parent;d=c.createPositionAfter(t)}else{const t=r.createPositionAt(s,"end");d=a.toViewPosition(t)}d=rA(d);for(const t of[...n.getChildren()]){if(TA(t)){d=c.move(c.createRangeOn(t),d).end;oA(c,t,t.nextSibling);oA(c,t.previousSibling,t)}}}function TA(t){return t.is("ol")||t.is("ul")}function EA(t){let e=0;let i=t.parent;while(i){if(i.is("li")){e++}else{const t=i.previousSibling;if(t&&t.is("li")){e++}}i=i.parent}return e}class MA extends Nw{static get pluginName(){return"ListEditing"}static get requires(){return[n_]}init(){const t=this.editor;t.model.schema.register("listItem",{inheritAllFrom:"$block",allowAttributes:["listType","listIndent"]});const e=t.data;const i=t.editing;t.model.document.registerPostFixer(e=>vA(t.model,e));i.mapper.registerViewToModelLength("li",PA);e.mapper.registerViewToModelLength("li",PA);i.mapper.on("modelToViewPosition",_A(i.view));i.mapper.on("viewToModelPosition",kA(t.model));e.mapper.on("modelToViewPosition",_A(i.view));t.conversion.for("editingDowncast").add(e=>{e.on("insert",mA,{priority:"high"});e.on("insert:listItem",lA(t.model));e.on("attribute:listType:listItem",uA,{priority:"high"});e.on("attribute:listType:listItem",hA,{priority:"low"});e.on("attribute:listIndent:listItem",fA(t.model));e.on("remove:listItem",dA(t.model));e.on("remove",gA,{priority:"low"})});t.conversion.for("dataDowncast").add(e=>{e.on("insert",mA,{priority:"high"});e.on("insert:listItem",lA(t.model))});t.conversion.for("upcast").add(t=>{t.on("element:ul",bA,{priority:"high"});t.on("element:ol",bA,{priority:"high"});t.on("element:li",wA,{priority:"high"});t.on("element:li",pA)});t.model.on("insertContent",yA,{priority:"high"});t.commands.add("numberedList",new Qx(t,"numbered"));t.commands.add("bulletedList",new Qx(t,"bulleted"));t.commands.add("indentList",new tA(t,"forward"));t.commands.add("outdentList",new tA(t,"backward"));const n=i.view.document;this.listenTo(n,"enter",(t,e)=>{const i=this.editor.model.document;const n=i.selection.getLastPosition().parent;if(i.selection.isCollapsed&&n.name=="listItem"&&n.isEmpty){this.editor.execute("outdentList");e.preventDefault();t.stop()}});this.listenTo(n,"delete",(t,e)=>{if(e.direction!=="backward"){return}const i=this.editor.model.document.selection;if(!i.isCollapsed){return}const n=i.getFirstPosition();if(!n.isAtStart){return}const o=n.parent;if(o.name!=="listItem"){return}const r=o.previousSibling&&o.previousSibling.name==="listItem";if(r){return}this.editor.execute("outdentList");e.preventDefault();t.stop()},{priority:"high"});const o=t=>(e,i)=>{const n=this.editor.commands.get(t);if(n.isEnabled){this.editor.execute(t);i()}};t.keystrokes.set("Tab",o("indentList"));t.keystrokes.set("Shift+Tab",o("outdentList"))}afterInit(){const t=this.editor.commands;const e=t.get("indent");const i=t.get("outdent");if(e){e.registerChildCommand(t.get("indentList"))}if(i){i.registerChildCommand(t.get("outdentList"))}}}function PA(t){let e=1;for(const i of t.getChildren()){if(i.name=="ul"||i.name=="ol"){for(const t of i.getChildren()){e+=PA(t)}}}return e}var SA='';var IA='';class NA extends Nw{init(){const t=this.editor.t;aA(this.editor,"numberedList",t("op"),SA);aA(this.editor,"bulletedList",t("oq"),IA)}}class OA extends Nw{static get requires(){return[MA,NA]}static get pluginName(){return"List"}}function LA(t,e){return t=>{t.on("attribute:url:media",i)};function i(i,n,o){if(!o.consumable.consume(n.item,i.name)){return}const r=n.attributeNewValue;const s=o.writer;const a=o.mapper.toViewElement(n.item);s.remove(s.createRangeIn(a));const c=t.getMediaViewElement(s,r,e);s.insert(s.createPositionAt(a,0),c)}}function zA(t,e,i){e.setCustomProperty("media",true,t);return A_(t,e,{label:i})}function RA(t){const e=t.getSelectedElement();if(e&&jA(e)){return e}return null}function jA(t){return!!t.getCustomProperty("media")&&x_(t)}function DA(t,e,i,n){const o=t.createContainerElement("figure",{class:"media"});o.getFillerOffset=FA;t.insert(t.createPositionAt(o,0),e.getMediaViewElement(t,i,n));return o}function BA(t){const e=t.getSelectedElement();if(e&&e.is("media")){return e}return null}function VA(t,e,i){t.change(n=>{const o=n.createElement("media",{url:e});t.insertContent(o,i);n.setSelection(o,"on")})}function FA(){return null}class HA extends Rw{refresh(){const t=this.editor.model;const e=t.document.selection;const i=t.schema;const n=e.getFirstPosition();const o=BA(e);let r=n.parent;if(r!=r.root){r=r.parent}this.value=o?o.getAttribute("url"):null;this.isEnabled=i.checkChild(r,"media")}execute(t){const e=this.editor.model;const i=e.document.selection;const n=BA(i);if(n){e.change(e=>{e.setAttribute("url",t,n)})}else{const n=P_(i,e);VA(e,t,n)}}}var WA='';const UA="0 0 64 42";class qA{constructor(t,e){const i=e.providers;const n=e.extraProviders||[];const o=new Set(e.removeProviders);const r=i.concat(n).filter(t=>{const e=t.name;if(!e){console.warn(Object(ss["a"])("media-embed-no-provider-name: The configured media provider has no name and cannot be used."),{provider:t});return false}return!o.has(e)});this.locale=t;this.providerDefinitions=r}hasMedia(t){return!!this._getMedia(t)}getMediaViewElement(t,e,i){return this._getMedia(e).getViewElement(t,i)}_getMedia(t){if(!t){return new $A(this.locale)}t=t.trim();for(const e of this.providerDefinitions){const i=e.html;let n=e.url;if(!Array.isArray(n)){n=[n]}for(const e of n){const n=this._getUrlMatches(t,e);if(n){return new $A(this.locale,t,n,i)}}}return null}_getUrlMatches(t,e){let i=t.match(e);if(i){return i}let n=t.replace(/^https?:\/\//,"");i=n.match(e);if(i){return i}n=n.replace(/^www\./,"");i=n.match(e);if(i){return i}return null}}class $A{constructor(t,e,i,n){this.url=this._getValidUrl(e);this._t=t.t;this._match=i;this._previewRenderer=n}getViewElement(t,e){const i={};if(e.renderForEditingView||e.renderMediaPreview&&this.url&&this._previewRenderer){if(this.url){i["data-oembed-url"]=this.url}if(e.renderForEditingView){i.class="ck-media__wrapper"}const n=this._getPreviewHtml(e);return t.createUIElement("div",i,(function(t){const e=this.toDomElement(t);e.innerHTML=n;return e}))}else{if(this.url){i.url=this.url}return t.createEmptyElement("oembed",i)}}_getPreviewHtml(t){if(this._previewRenderer){return this._previewRenderer(this._match)}else{if(this.url&&t.renderForEditingView){return this._getPlaceholderHtml()}return""}}_getPlaceholderHtml(){const t=new Xb;const e=new Gb;t.text=this._t("Open media in new tab");e.content=WA;e.viewBox=UA;const i=new Hp({tag:"div",attributes:{class:"ck ck-reset_all ck-media__placeholder"},children:[{tag:"div",attributes:{class:"ck-media__placeholder__icon"},children:[e]},{tag:"a",attributes:{class:"ck-media__placeholder__url",target:"_blank",rel:"noopener noreferrer",href:this.url},children:[{tag:"span",attributes:{class:"ck-media__placeholder__url__text"},children:[this.url]},t]}]}).render();return i.outerHTML}_getValidUrl(t){if(!t){return null}if(t.match(/^https?/)){return t}return"https://"+t}}var YA=i(82);class GA extends Nw{static get pluginName(){return"MediaEmbedEditing"}constructor(t){super(t);t.config.define("mediaEmbed",{providers:[{name:"dailymotion",url:/^dailymotion\.com\/video\/(\w+)/,html:t=>{const e=t[1];return''+`"+"
"}},{name:"spotify",url:[/^open\.spotify\.com\/(artist\/\w+)/,/^open\.spotify\.com\/(album\/\w+)/,/^open\.spotify\.com\/(track\/\w+)/],html:t=>{const e=t[1];return''+`"+"
"}},{name:"youtube",url:[/^(?:m\.)?youtube\.com\/watch\?v=([\w-]+)/,/^(?:m\.)?youtube\.com\/v\/([\w-]+)/,/^youtube\.com\/embed\/([\w-]+)/,/^youtu\.be\/([\w-]+)/],html:t=>{const e=t[1];return''+`"+"
"}},{name:"vimeo",url:[/^vimeo\.com\/(\d+)/,/^vimeo\.com\/[^/]+\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/album\/[^/]+\/video\/(\d+)/,/^vimeo\.com\/channels\/[^/]+\/(\d+)/,/^vimeo\.com\/groups\/[^/]+\/videos\/(\d+)/,/^vimeo\.com\/ondemand\/[^/]+\/(\d+)/,/^player\.vimeo\.com\/video\/(\d+)/],html:t=>{const e=t[1];return''+`"+"
"}},{name:"instagram",url:/^instagram\.com\/p\/(\w+)/},{name:"twitter",url:/^twitter\.com/},{name:"googleMaps",url:/^google\.com\/maps/},{name:"flickr",url:/^flickr\.com/},{name:"facebook",url:/^facebook\.com/}]});this.registry=new qA(t.locale,t.config.get("mediaEmbed"))}init(){const t=this.editor;const e=t.model.schema;const i=t.t;const n=t.conversion;const o=t.config.get("mediaEmbed.previewsInData");const r=this.registry;t.commands.add("mediaEmbed",new HA(t));e.register("media",{isObject:true,isBlock:true,allowWhere:"$block",allowAttributes:["url"]});n.for("dataDowncast").elementToElement({model:"media",view:(t,e)=>{const i=t.getAttribute("url");return DA(e,r,i,{renderMediaPreview:i&&o})}});n.for("dataDowncast").add(LA(r,{renderMediaPreview:o}));n.for("editingDowncast").elementToElement({model:"media",view:(t,e)=>{const n=t.getAttribute("url");const o=DA(e,r,n,{renderForEditingView:true});return zA(o,e,i("jc"))}});n.for("editingDowncast").add(LA(r,{renderForEditingView:true}));n.for("upcast").elementToElement({view:{name:"oembed",attributes:{url:true}},model:(t,e)=>{const i=t.getAttribute("url");if(r.hasMedia(i)){return e.createElement("media",{url:i})}}}).elementToElement({view:{name:"div",attributes:{"data-oembed-url":true}},model:(t,e)=>{const i=t.getAttribute("data-oembed-url");if(r.hasMedia(i)){return e.createElement("media",{url:i})}}})}}const JA=new Map;function XA(t,e,i){let n=JA.get(t);if(!n){n=new Map;JA.set(t,n)}n.set(e,i)}function QA(t,e){const i=JA.get(t);if(i&&i.has(e)){return i.get(e)}return KA}function KA(t){return[t]}function ZA(t,e,i={}){const n=QA(t.constructor,e.constructor);try{t=t.clone();return n(t,e,i)}catch(t){throw t}}function tC(t,e,i){t=t.slice();e=e.slice();const n=new eC(i.document,i.useRelations,i.forceWeakRemove);n.setOriginalOperations(t);n.setOriginalOperations(e);const o=n.originalOperations;if(t.length==0||e.length==0){return{operationsA:t,operationsB:e,originalOperations:o}}const r=new WeakMap;for(const e of t){r.set(e,0)}const s={nextBaseVersionA:t[t.length-1].baseVersion+1,nextBaseVersionB:e[e.length-1].baseVersion+1,originalOperationsACount:t.length,originalOperationsBCount:e.length};let a=0;while(a{if(t.key===e.key){const n=t.range.getDifference(e.range).map(e=>new Qm(e,t.key,t.oldValue,t.newValue,0));const o=t.range.getIntersection(e.range);if(o){if(i.aIsStrong){n.push(new Qm(o,e.key,e.newValue,t.newValue,0))}}if(n.length==0){return[new Mg(0)]}return n}else{return[t]}});XA(Qm,tg,(t,e)=>{if(t.range.start.hasSameParentAs(e.position)&&t.range.containsPosition(e.position)){const i=t.range._getTransformedByInsertion(e.position,e.howMany,!e.shouldReceiveAttributes);const n=i.map(e=>new Qm(e,t.key,t.oldValue,t.newValue,t.baseVersion));if(e.shouldReceiveAttributes){const i=oC(e,t.key,t.oldValue);if(i){n.unshift(i)}}return n}t.range=t.range._getTransformedByInsertion(e.position,e.howMany,false)[0];return[t]});function oC(t,e,i){const n=t.nodes;const o=n.getNode(0).getAttribute(e);if(o==i){return null}const r=new $h(t.position,t.position.getShiftedBy(t.howMany));return new Qm(r,e,o,i,0)}XA(Qm,og,(t,e)=>{const i=[];if(t.range.start.hasSameParentAs(e.deletionPosition)){if(t.range.containsPosition(e.deletionPosition)||t.range.start.isEqual(e.deletionPosition)){i.push($h._createFromPositionAndShift(e.graveyardPosition,1))}}const n=t.range._getTransformedByMergeOperation(e);if(!n.isCollapsed){i.push(n)}return i.map(e=>new Qm(e,t.key,t.oldValue,t.newValue,t.baseVersion))});XA(Qm,Zm,(t,e)=>{const i=rC(t.range,e);return i.map(e=>new Qm(e,t.key,t.oldValue,t.newValue,t.baseVersion))});function rC(t,e){const i=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);let n=null;let o=[];if(i.containsRange(t,true)){n=t}else if(t.start.hasSameParentAs(i.start)){o=t.getDifference(i);n=t.getIntersection(i)}else{o=[t]}const r=[];for(let t of o){t=t._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=e.getMovedRangeStart();const n=t.start.hasSameParentAs(i);t=t._getTransformedByInsertion(i,e.howMany,n);r.push(...t)}if(n){r.push(n._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany,false)[0])}return r}XA(Qm,rg,(t,e)=>{if(t.range.end.isEqual(e.insertionPosition)){if(!e.graveyardPosition){t.range.end.offset++}return[t]}if(t.range.start.hasSameParentAs(e.splitPosition)&&t.range.containsPosition(e.splitPosition)){const i=t.clone();i.range=new $h(e.moveTargetPosition.clone(),t.range.end._getCombined(e.splitPosition,e.moveTargetPosition));t.range.end=e.splitPosition.clone();t.range.end.stickiness="toPrevious";return[t,i]}t.range=t.range._getTransformedBySplitOperation(e);return[t]});XA(tg,Qm,(t,e)=>{const i=[t];if(t.shouldReceiveAttributes&&t.position.hasSameParentAs(e.range.start)&&e.range.containsPosition(t.position)){const n=oC(t,e.key,e.newValue);if(n){i.push(n)}}return i});XA(tg,tg,(t,e,i)=>{if(t.position.isEqual(e.position)&&i.aIsStrong){return[t]}t.position=t.position._getTransformedByInsertOperation(e);return[t]});XA(tg,Zm,(t,e)=>{t.position=t.position._getTransformedByMoveOperation(e);return[t]});XA(tg,rg,(t,e)=>{t.position=t.position._getTransformedBySplitOperation(e);return[t]});XA(tg,og,(t,e)=>{t.position=t.position._getTransformedByMergeOperation(e);return[t]});XA(eg,tg,(t,e)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedByInsertOperation(e)[0]}if(t.newRange){t.newRange=t.newRange._getTransformedByInsertOperation(e)[0]}return[t]});XA(eg,eg,(t,e,i)=>{if(t.name==e.name){if(i.aIsStrong){t.oldRange=e.newRange?e.newRange.clone():null}else{return[new Mg(0)]}}return[t]});XA(eg,og,(t,e)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedByMergeOperation(e)}if(t.newRange){t.newRange=t.newRange._getTransformedByMergeOperation(e)}return[t]});XA(eg,Zm,(t,e,i)=>{if(t.oldRange){t.oldRange=$h._createFromRanges(t.oldRange._getTransformedByMoveOperation(e))}if(t.newRange){if(i.abRelation){const n=$h._createFromRanges(t.newRange._getTransformedByMoveOperation(e));if(i.abRelation.side=="left"&&e.targetPosition.isEqual(t.newRange.start)){t.newRange.start.path=i.abRelation.path;t.newRange.end=n.end;return[t]}else if(i.abRelation.side=="right"&&e.targetPosition.isEqual(t.newRange.end)){t.newRange.start=n.start;t.newRange.end.path=i.abRelation.path;return[t]}}t.newRange=$h._createFromRanges(t.newRange._getTransformedByMoveOperation(e))}return[t]});XA(eg,rg,(t,e,i)=>{if(t.oldRange){t.oldRange=t.oldRange._getTransformedBySplitOperation(e)}if(t.newRange){if(i.abRelation){const n=t.newRange._getTransformedBySplitOperation(e);if(t.newRange.start.isEqual(e.splitPosition)&&i.abRelation.wasStartBeforeMergedElement){t.newRange.start=qh._createAt(e.insertionPosition)}else if(t.newRange.start.isEqual(e.splitPosition)&&!i.abRelation.wasInLeftElement){t.newRange.start=qh._createAt(e.moveTargetPosition)}if(t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasInRightElement){t.newRange.end=qh._createAt(e.moveTargetPosition)}else if(t.newRange.end.isEqual(e.splitPosition)&&i.abRelation.wasEndBeforeMergedElement){t.newRange.end=qh._createAt(e.insertionPosition)}else{t.newRange.end=n.end}return[t]}t.newRange=t.newRange._getTransformedBySplitOperation(e)}return[t]});XA(og,tg,(t,e)=>{if(t.sourcePosition.hasSameParentAs(e.position)){t.howMany+=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByInsertOperation(e);t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e);return[t]});XA(og,og,(t,e,i)=>{if(t.sourcePosition.isEqual(e.sourcePosition)&&t.targetPosition.isEqual(e.targetPosition)){if(!i.bWasUndone){return[new Mg(0)]}else{const i=e.graveyardPosition.path.slice();i.push(0);t.sourcePosition=new qh(e.graveyardPosition.root,i);t.howMany=0;return[t]}}if(t.sourcePosition.isEqual(e.sourcePosition)&&!t.targetPosition.isEqual(e.targetPosition)&&!i.bWasUndone&&i.abRelation!="splitAtSource"){const n=t.targetPosition.root.rootName=="$graveyard";const o=e.targetPosition.root.rootName=="$graveyard";const r=n&&!o;const s=o&&!n;const a=s||!r&&i.aIsStrong;if(a){const i=e.targetPosition._getTransformedByMergeOperation(e);const n=t.targetPosition._getTransformedByMergeOperation(e);return[new Zm(i,t.howMany,n,0)]}else{return[new Mg(0)]}}if(t.sourcePosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByMergeOperation(e);t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);if(!t.graveyardPosition.isEqual(e.graveyardPosition)||!i.aIsStrong){t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)}return[t]});XA(og,Zm,(t,e,i)=>{const n=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);if(e.type=="remove"&&!i.bWasUndone&&!i.forceWeakRemove){if(t.deletionPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.sourcePosition)){return[new Mg(0)]}}if(t.sourcePosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}if(t.sourcePosition.hasSameParentAs(e.sourcePosition)){t.howMany-=e.howMany}t.sourcePosition=t.sourcePosition._getTransformedByMoveOperation(e);t.targetPosition=t.targetPosition._getTransformedByMoveOperation(e);if(!t.graveyardPosition.isEqual(e.targetPosition)){t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}return[t]});XA(og,rg,(t,e,i)=>{if(e.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedByDeletion(e.graveyardPosition,1);if(t.deletionPosition.isEqual(e.graveyardPosition)){t.howMany=e.howMany}}if(t.targetPosition.isEqual(e.splitPosition)){const n=e.howMany!=0;const o=e.graveyardPosition&&t.deletionPosition.isEqual(e.graveyardPosition);if(n||o||i.abRelation=="mergeTargetNotMoved"){t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e);return[t]}}if(t.sourcePosition.isEqual(e.splitPosition)){if(i.abRelation=="mergeSourceNotMoved"){t.howMany=0;t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]}if(i.abRelation=="mergeSameElement"||t.sourcePosition.offset>0){t.sourcePosition=e.moveTargetPosition.clone();t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]}}if(t.sourcePosition.hasSameParentAs(e.splitPosition)){t.howMany=e.splitPosition.offset}t.sourcePosition=t.sourcePosition._getTransformedBySplitOperation(e);t.targetPosition=t.targetPosition._getTransformedBySplitOperation(e);return[t]});XA(Zm,tg,(t,e)=>{const i=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);const n=i._getTransformedByInsertOperation(e,false)[0];t.sourcePosition=n.start;t.howMany=n.end.offset-n.start.offset;if(!t.targetPosition.isEqual(e.position)){t.targetPosition=t.targetPosition._getTransformedByInsertOperation(e)}return[t]});XA(Zm,Zm,(t,e,i)=>{const n=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);const o=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);let r=i.aIsStrong;let s=!i.aIsStrong;if(i.abRelation=="insertBefore"||i.baRelation=="insertAfter"){s=true}else if(i.abRelation=="insertAfter"||i.baRelation=="insertBefore"){s=false}let a;if(t.targetPosition.isEqual(e.targetPosition)&&s){a=t.targetPosition._getTransformedByDeletion(e.sourcePosition,e.howMany)}else{a=t.targetPosition._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany)}if(sC(t,e)&&sC(e,t)){return[e.getReversed()]}const c=n.containsPosition(e.targetPosition);if(c&&n.containsRange(o,true)){n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);return aC([n],a)}const l=o.containsPosition(t.targetPosition);if(l&&o.containsRange(n,true)){n.start=n.start._getCombined(e.sourcePosition,e.getMovedRangeStart());n.end=n.end._getCombined(e.sourcePosition,e.getMovedRangeStart());return aC([n],a)}const d=Os(t.sourcePosition.getParentPath(),e.sourcePosition.getParentPath());if(d=="prefix"||d=="extension"){n.start=n.start._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);n.end=n.end._getTransformedByMove(e.sourcePosition,e.targetPosition,e.howMany);return aC([n],a)}if(t.type=="remove"&&e.type!="remove"&&!i.aWasUndone&&!i.forceWeakRemove){r=true}else if(t.type!="remove"&&e.type=="remove"&&!i.bWasUndone&&!i.forceWeakRemove){r=false}const u=[];const h=n.getDifference(o);for(const t of h){t.start=t.start._getTransformedByDeletion(e.sourcePosition,e.howMany);t.end=t.end._getTransformedByDeletion(e.sourcePosition,e.howMany);const i=Os(t.start.getParentPath(),e.getMovedRangeStart().getParentPath())=="same";const n=t._getTransformedByInsertion(e.getMovedRangeStart(),e.howMany,i);u.push(...n)}const f=n.getIntersection(o);if(f!==null&&r){f.start=f.start._getCombined(e.sourcePosition,e.getMovedRangeStart());f.end=f.end._getCombined(e.sourcePosition,e.getMovedRangeStart());if(u.length===0){u.push(f)}else if(u.length==1){if(o.start.isBefore(n.start)||o.start.isEqual(n.start)){u.unshift(f)}else{u.push(f)}}else{u.splice(1,0,f)}}if(u.length===0){return[new Mg(t.baseVersion)]}return aC(u,a)});XA(Zm,rg,(t,e,i)=>{let n=t.targetPosition.clone();if(!t.targetPosition.isEqual(e.insertionPosition)||!e.graveyardPosition||i.abRelation=="moveTargetAfter"){n=t.targetPosition._getTransformedBySplitOperation(e)}const o=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);if(o.end.isEqual(e.insertionPosition)){if(!e.graveyardPosition){t.howMany++}t.targetPosition=n;return[t]}if(o.start.hasSameParentAs(e.splitPosition)&&o.containsPosition(e.splitPosition)){let t=new $h(e.splitPosition,o.end);t=t._getTransformedBySplitOperation(e);const i=[new $h(o.start,e.splitPosition),t];return aC(i,n)}if(t.targetPosition.isEqual(e.splitPosition)&&i.abRelation=="insertAtSource"){n=e.moveTargetPosition}if(t.targetPosition.isEqual(e.insertionPosition)&&i.abRelation=="insertBetween"){n=t.targetPosition}const r=o._getTransformedBySplitOperation(e);const s=[r];if(e.graveyardPosition){const n=o.start.isEqual(e.graveyardPosition)||o.containsPosition(e.graveyardPosition);if(t.howMany>1&&n&&!i.aWasUndone){s.push($h._createFromPositionAndShift(e.insertionPosition,1))}}return aC(s,n)});XA(Zm,og,(t,e,i)=>{const n=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);if(e.deletionPosition.hasSameParentAs(t.sourcePosition)&&n.containsPosition(e.sourcePosition)){if(t.type=="remove"&&!i.forceWeakRemove){if(!i.aWasUndone){const i=[];let n=e.graveyardPosition.clone();let o=e.targetPosition._getTransformedByMergeOperation(e);if(t.howMany>1){i.push(new Zm(t.sourcePosition,t.howMany-1,t.targetPosition,0));n=n._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1);o=o._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany-1)}const r=e.deletionPosition._getCombined(t.sourcePosition,t.targetPosition);const s=new Zm(n,1,r,0);const a=s.getMovedRangeStart().path.slice();a.push(0);const c=new qh(s.targetPosition.root,a);o=o._getTransformedByMove(n,r,1);const l=new Zm(o,e.howMany,c,0);i.push(s);i.push(l);return i}}else{if(t.howMany==1){if(!i.bWasUndone){return[new Mg(0)]}else{t.sourcePosition=e.graveyardPosition.clone();t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);return[t]}}}}const o=$h._createFromPositionAndShift(t.sourcePosition,t.howMany);const r=o._getTransformedByMergeOperation(e);t.sourcePosition=r.start;t.howMany=r.end.offset-r.start.offset;t.targetPosition=t.targetPosition._getTransformedByMergeOperation(e);return[t]});XA(ig,tg,(t,e)=>{t.position=t.position._getTransformedByInsertOperation(e);return[t]});XA(ig,og,(t,e)=>{if(t.position.isEqual(e.deletionPosition)){t.position=e.graveyardPosition.clone();t.position.stickiness="toNext";return[t]}t.position=t.position._getTransformedByMergeOperation(e);return[t]});XA(ig,Zm,(t,e)=>{t.position=t.position._getTransformedByMoveOperation(e);return[t]});XA(ig,ig,(t,e,i)=>{if(t.position.isEqual(e.position)){if(i.aIsStrong){t.oldName=e.newName}else{return[new Mg(0)]}}return[t]});XA(ig,rg,(t,e)=>{const i=t.position.path;const n=e.splitPosition.getParentPath();if(Os(i,n)=="same"&&!e.graveyardPosition){const e=new ig(t.position.getShiftedBy(1),t.oldName,t.newName,0);return[t,e]}t.position=t.position._getTransformedBySplitOperation(e);return[t]});XA(ng,ng,(t,e,i)=>{if(t.root===e.root&&t.key===e.key){if(!i.aIsStrong||t.newValue===e.newValue){return[new Mg(0)]}else{t.oldValue=e.newValue}}return[t]});XA(rg,tg,(t,e)=>{if(t.splitPosition.hasSameParentAs(e.position)&&t.splitPosition.offset{if(!t.graveyardPosition&&!i.bWasUndone&&t.splitPosition.hasSameParentAs(e.sourcePosition)){const i=e.graveyardPosition.path.slice();i.push(0);const n=new qh(e.graveyardPosition.root,i);const o=rg.getInsertionPosition(new qh(e.graveyardPosition.root,i));const r=new rg(n,0,null,0);r.insertionPosition=o;t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);t.graveyardPosition=r.insertionPosition.clone();t.graveyardPosition.stickiness="toNext";return[r,t]}if(t.splitPosition.hasSameParentAs(e.deletionPosition)&&!t.splitPosition.isAfter(e.deletionPosition)){t.howMany--}if(t.splitPosition.hasSameParentAs(e.targetPosition)){t.howMany+=e.howMany}t.splitPosition=t.splitPosition._getTransformedByMergeOperation(e);t.insertionPosition=rg.getInsertionPosition(t.splitPosition);if(t.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedByMergeOperation(e)}return[t]});XA(rg,Zm,(t,e,i)=>{const n=$h._createFromPositionAndShift(e.sourcePosition,e.howMany);if(t.graveyardPosition){const o=n.start.isEqual(t.graveyardPosition)||n.containsPosition(t.graveyardPosition);if(!i.bWasUndone&&o){const i=t.splitPosition._getTransformedByMoveOperation(e);const n=t.graveyardPosition._getTransformedByMoveOperation(e);const o=n.path.slice();o.push(0);const r=new qh(n.root,o);const s=new Zm(i,t.howMany,r,0);return[s]}t.graveyardPosition=t.graveyardPosition._getTransformedByMoveOperation(e)}if(t.splitPosition.hasSameParentAs(e.sourcePosition)&&n.containsPosition(t.splitPosition)){const i=e.howMany-(t.splitPosition.offset-e.sourcePosition.offset);t.howMany-=i;if(t.splitPosition.hasSameParentAs(e.targetPosition)&&t.splitPosition.offset{if(t.splitPosition.isEqual(e.splitPosition)){if(!t.graveyardPosition&&!e.graveyardPosition){return[new Mg(0)]}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){return[new Mg(0)]}if(i.abRelation=="splitBefore"){t.howMany=0;t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e);return[t]}}if(t.graveyardPosition&&e.graveyardPosition&&t.graveyardPosition.isEqual(e.graveyardPosition)){const n=t.splitPosition.root.rootName=="$graveyard";const o=e.splitPosition.root.rootName=="$graveyard";const r=n&&!o;const s=o&&!n;const a=s||!r&&i.aIsStrong;if(a){const i=[];if(e.howMany){i.push(new Zm(e.moveTargetPosition,e.howMany,e.splitPosition,0))}if(t.howMany){i.push(new Zm(t.splitPosition,t.howMany,t.moveTargetPosition,0))}return i}else{return[new Mg(0)]}}if(t.graveyardPosition){t.graveyardPosition=t.graveyardPosition._getTransformedBySplitOperation(e)}if(t.splitPosition.isEqual(e.insertionPosition)&&i.abRelation=="splitBefore"){t.howMany++;return[t]}if(e.splitPosition.isEqual(t.insertionPosition)&&i.baRelation=="splitBefore"){const i=e.insertionPosition.path.slice();i.push(0);const n=new qh(e.insertionPosition.root,i);const o=new Zm(t.insertionPosition,1,n,0);return[t,o]}if(t.splitPosition.hasSameParentAs(e.splitPosition)&&t.splitPosition.offset0}addBatch(t){const e=this.editor.model.document.selection;const i={ranges:e.hasOwnRange?Array.from(e.getRanges()):[],isBackward:e.isBackward};this._stack.push({batch:t,selection:i});this.refresh()}clearStack(){this._stack=[];this.refresh()}_restoreSelection(t,e,i){const n=this.editor.model;const o=n.document;const r=[];for(const e of t){const t=lC(e,i);const n=t.find(t=>t.start.root!=o.graveyard);if(n){r.push(n)}}if(r.length){n.change(t=>{t.setSelection(r,{backward:e})})}}_undo(t,e){const i=this.editor.model;const n=i.document;this._createdBatches.add(e);const o=t.operations.slice().filter(t=>t.isDocumentOperation);o.reverse();for(const t of o){const o=t.baseVersion+1;const r=Array.from(n.history.getOperations(o));const s=tC([t.getReversed()],r,{useRelations:true,document:this.editor.model.document,padWithNoOps:false,forceWeakRemove:true});const a=s.operationsA;for(const o of a){e.addOperation(o);i.applyOperation(o);n.history.setOperationAsUndone(t,o)}}}}function lC(t,e){const i=t.getTransformedByOperations(e);i.sort((t,e)=>t.start.isBefore(e.start)?-1:1);for(let t=1;te.batch==t):this._stack.length-1;const i=this._stack.splice(e,1)[0];const n=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(n,()=>{this._undo(i.batch,n);const t=this.editor.model.document.history.getOperations(i.batch.baseVersion);this._restoreSelection(i.selection.ranges,i.selection.isBackward,t);this.fire("revert",i.batch,n)});this.refresh()}}class uC extends cC{execute(){const t=this._stack.pop();const e=this.editor.model.createBatch("transparent");this.editor.model.enqueueChange(e,()=>{const i=t.batch.operations[t.batch.operations.length-1];const n=i.baseVersion+1;const o=this.editor.model.document.history.getOperations(n);this._restoreSelection(t.selection.ranges,t.selection.isBackward,o);this._undo(t.batch,e)});this.refresh()}}class hC extends Nw{static get pluginName(){return"UndoEditing"}constructor(t){super(t);this._batchRegistry=new WeakSet}init(){const t=this.editor;this._undoCommand=new dC(t);this._redoCommand=new uC(t);t.commands.add("undo",this._undoCommand);t.commands.add("redo",this._redoCommand);this.listenTo(t.model,"applyOperation",(t,e)=>{const i=e[0];if(!i.isDocumentOperation){return}const n=i.batch;const o=this._redoCommand._createdBatches.has(n);const r=this._undoCommand._createdBatches.has(n);const s=this._batchRegistry.has(n);if(s||n.type=="transparent"&&!o&&!r){return}else{if(o){this._undoCommand.addBatch(n)}else if(!r){this._undoCommand.addBatch(n);this._redoCommand.clearStack()}}this._batchRegistry.add(n)},{priority:"highest"});this.listenTo(this._undoCommand,"revert",(t,e,i)=>{this._redoCommand.addBatch(i)});t.keystrokes.set("CTRL+Z","undo");t.keystrokes.set("CTRL+Y","redo");t.keystrokes.set("CTRL+SHIFT+Z","redo")}}var fC='';var mC='';class gC extends Nw{init(){const t=this.editor;const e=t.locale;const i=t.t;const n=e.uiLanguageDirection=="ltr"?fC:mC;const o=e.uiLanguageDirection=="ltr"?mC:fC;this._addButton("undo",i("md"),"CTRL+Z",n);this._addButton("redo",i("me"),"CTRL+Y",o)}_addButton(t,e,i,n){const o=this.editor;o.ui.componentFactory.add(t,r=>{const s=o.commands.get(t);const a=new Kb(r);a.set({label:e,icon:n,keystroke:i,tooltip:true});a.bind("isEnabled").to(s,"isEnabled");this.listenTo(a,"execute",()=>{o.execute(t);o.editing.view.focus()});return a})}}class pC extends Nw{static get requires(){return[hC,gC]}static get pluginName(){return"Undo"}}const bC=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w.-]+)+[\w\-._~:/?#[\]@!$&'()*+,;=]+$/;class wC extends Nw{static get requires(){return[oy,pC]}static get pluginName(){return"AutoMediaEmbed"}constructor(t){super(t);this._timeoutId=null;this._positionToInsert=null}init(){const t=this.editor;const e=t.model.document;this.listenTo(t.plugins.get(oy),"inputTransformation",()=>{const t=e.selection.getFirstRange();const i=Ig.fromPosition(t.start);i.stickiness="toPrevious";const n=Ig.fromPosition(t.end);n.stickiness="toNext";e.once("change:data",()=>{this._embedMediaBetweenPositions(i,n);i.detach();n.detach()},{priority:"high"})});t.commands.get("undo").on("execute",()=>{if(this._timeoutId){Nd.window.clearTimeout(this._timeoutId);this._positionToInsert.detach();this._timeoutId=null;this._positionToInsert=null}},{priority:"high"})}_embedMediaBetweenPositions(t,e){const i=this.editor;const n=i.plugins.get(GA).registry;const o=new rf(t,e);const r=o.getWalker({ignoreElementEnd:true});let s="";for(const t of r){if(t.item.is("textProxy")){s+=t.item.data}}s=s.trim();if(!s.match(bC)){return}if(!n.hasMedia(s)){return}const a=i.commands.get("mediaEmbed");if(!a.isEnabled){return}this._positionToInsert=Ig.fromPosition(t);this._timeoutId=Nd.window.setTimeout(()=>{i.model.change(t=>{this._timeoutId=null;t.remove(o);let e;if(this._positionToInsert.root.rootName!=="$graveyard"){e=this._positionToInsert}VA(i.model,s,e);this._positionToInsert.detach();this._positionToInsert=null})},100)}}var _C=i(84);class kC extends gb{constructor(t,e){super(e);const i=e.t;this.focusTracker=new xp;this.keystrokes=new dp;this.urlInputView=this._createUrlInput();this.saveButtonView=this._createButton(i("lv"),hk,"ck-button-save");this.saveButtonView.type="submit";this.cancelButtonView=this._createButton(i("lw"),fk,"ck-button-cancel","cancel");this._focusables=new Bp;this._focusCycler=new Nb({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:"shift + tab",focusNext:"tab"}});this._validators=t;this.setTemplate({tag:"form",attributes:{class:["ck","ck-media-form"],tabindex:"-1"},children:[this.urlInputView,this.saveButtonView,this.cancelButtonView]})}render(){super.render();uk({view:this});const t=[this.urlInputView,this.saveButtonView,this.cancelButtonView];t.forEach(t=>{this._focusables.add(t);this.focusTracker.add(t.element)});this.keystrokes.listenTo(this.element);const e=t=>t.stopPropagation();this.keystrokes.set("arrowright",e);this.keystrokes.set("arrowleft",e);this.keystrokes.set("arrowup",e);this.keystrokes.set("arrowdown",e);this.listenTo(this.urlInputView.element,"selectstart",(t,e)=>{e.stopPropagation()},{priority:"high"})}focus(){this._focusCycler.focusFirst()}get url(){return this.urlInputView.inputView.element.value.trim()}set url(t){this.urlInputView.inputView.element.value=t.trim()}isValid(){this.resetFormStatus();for(const t of this._validators){const e=t(this);if(e){this.urlInputView.errorText=e;return false}}return true}resetFormStatus(){this.urlInputView.errorText=null;this.urlInputView.infoText=this._urlInputViewInfoDefault}_createUrlInput(){const t=this.locale.t;const e=new ck(this.locale,dk);const i=e.inputView;this._urlInputViewInfoDefault=t("pd");this._urlInputViewInfoTip=t("pe");e.label=t("pf");e.infoText=this._urlInputViewInfoDefault;i.placeholder="https://example.com";i.on("input",()=>{e.infoText=i.element.value?this._urlInputViewInfoTip:this._urlInputViewInfoDefault});return e}_createButton(t,e,i,n){const o=new Kb(this.locale);o.set({label:t,icon:e,tooltip:true});o.extendTemplate({attributes:{class:i}});if(n){o.delegate("execute").to(this,n)}return o}}var vC='\n';class yC extends Nw{static get requires(){return[GA]}static get pluginName(){return"MediaEmbedUI"}init(){const t=this.editor;const e=t.commands.get("mediaEmbed");const i=t.plugins.get(GA).registry;this.form=new kC(xC(t.t,i),t.locale);t.ui.componentFactory.add("mediaEmbed",i=>{const n=dw(i);this._setUpDropdown(n,this.form,e,t);this._setUpForm(this.form,n,e);return n})}_setUpDropdown(t,e,i){const n=this.editor;const o=n.t;const r=t.buttonView;t.bind("isEnabled").to(i);t.panelView.children.add(e);r.set({label:o("om"),icon:vC,tooltip:true});r.on("open",()=>{e.url=i.value||"";e.urlInputView.select();e.focus()},{priority:"low"});t.on("submit",()=>{if(e.isValid()){n.execute("mediaEmbed",e.url);s()}});t.on("change:isOpen",()=>e.resetFormStatus());t.on("cancel",()=>s());function s(){n.editing.view.focus();t.isOpen=false}}_setUpForm(t,e,i){t.delegate("submit","cancel").to(e);t.urlInputView.bind("value").to(i,"value");t.urlInputView.bind("isReadOnly").to(i,"isEnabled",t=>!t);t.saveButtonView.bind("isEnabled").to(i)}}function xC(t,e){return[e=>{if(!e.url.length){return t("on")}},i=>{if(!e.hasMedia(i.url)){return t("oo")}}]}var AC=i(86);class CC extends Nw{static get requires(){return[GA,yC,wC,Z_]}static get pluginName(){return"MediaEmbed"}}function TC(t,e){for(const i of t.getChildren()){if(i.is("b")&&i.getStyle("font-weight")==="normal"){const n=t.getChildIndex(i);e.remove(i);e.insertChild(n,i.getChildren(),t)}}}function EC(t,e){if(!t.childCount){return}const i=new ry(t.document);const n=PC(t,i);if(!n.length){return}let o=null;let r=1;n.forEach((t,s)=>{const a=zC(n[s-1],t);const c=a?null:n[s-1];const l=jC(c,t);if(a){o=null;r=1}if(!o||l!==0){const n=SC(t,e);if(!o){o=IC(n,t.element,i)}else if(t.indent>r){const t=o.getChild(o.childCount-1);const e=t.getChild(t.childCount-1);o=IC(n,e,i);r+=1}else if(t.indent[\s]*?)[\r\n]+(\s*<\/span>)/g,"$1$2").replace(/<\/span>/g,"").replace(/ <\//g," ").replace(/ <\/o:p>/g," ").replace(/( |\u00A0)<\/o:p>/g,"").replace(/>(\s*[\r\n]\s*)<")}function HC(t){t.querySelectorAll("span[style*=spacerun]").forEach(t=>{const e=t.childNodes&&t.childNodes[0]&&t.childNodes[0].data&&t.childNodes[0].data.length||0;t.innerHTML=Array(e+1).join(" ").substr(0,e)})}function WC(t){return t.replace(/(\s+)<\/span>/g,(t,e)=>e.length===1?" ":Array(e.length+1).join(" ").substr(0,e.length))}function UC(t){const e=new DOMParser;t=t.replace(/