/** * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ var _Mathpow=Math.pow,_NumberPOSITIVE_INFINITY=Number.POSITIVE_INFINITY,_Mathfloor=Math.floor,_StringfromCharCode=String.fromCharCode,_Mathmax=Math.max,_Mathmin=Math.min;(function(u,f){if('object'==typeof exports&&'object'==typeof module)module.exports=f();else if('function'==typeof define&&define.amd)define([],f);else{var h=f();for(var w in h)('object'==typeof exports?exports:u)[w]=h[w]}})(this,function(){return function(r){function u(h){if(f[h])return f[h].exports;var w=f[h]={i:h,l:!1,exports:{}};return r[h].call(w.exports,w,w.exports,u),w.l=!0,w.exports}var f={};return u.m=r,u.c=f,u.i=function(h){return h},u.d=function(h,w,C){u.o(h,w)||Object.defineProperty(h,w,{configurable:!1,enumerable:!0,get:C})},u.n=function(h){var w=h&&h.__esModule?function(){return h['default']}:function(){return h};return u.d(w,'a',w),w},u.o=function(h,w){return Object.prototype.hasOwnProperty.call(h,w)},u.p='',u(u.s=331)}([function(r,u){'use strict';class h extends Error{constructor(w,C){C&&(w+=' '+JSON.stringify(C)),super(w),this.name='CKEditorError',this.data=C}static isCKEditorError(w){return w instanceof h}}u.a=h},function(r,u,f){'use strict';var h=f(37),w=f(19),C=f(65),T=f(0),P=f(24);class E{constructor(S,O){if(!S.is('element')&&!S.is('documentFragment'))throw new T.a('model-position-root-invalid: Position root invalid.');if(!(O instanceof Array)||0===O.length)throw new T.a('model-position-path-incorrect: Position path must be an Array with at least one item.',{path:O});O=S.getPath().concat(O),S=S.root,this.root=S,this.path=O}get offset(){return f.i(w.a)(this.path)}set offset(S){this.path[this.path.length-1]=S}get parent(){let S=this.root;for(let O=0;OR?0:R,O}isAfter(S){return'after'==this.compareWith(S)}isBefore(S){return'before'==this.compareWith(S)}isEqual(S){return'same'==this.compareWith(S)}isTouching(S){let O=null,R=null,V=this.compareWith(S);switch(V){case'same':return!0;case'before':O=E.createFromPosition(this),R=E.createFromPosition(S);break;case'after':O=E.createFromPosition(S),R=E.createFromPosition(this);break;default:return!1;}for(let F=O.parent;O.path.length+R.path.length;){if(O.isEqual(R))return!0;if(O.path.length>R.path.length){if(O.offset!==F.maxOffset)return!1;O.path=O.path.slice(0,-1),F=F.parent,O.offset++}else{if(0!==R.offset)return!1;R.path=R.path.slice(0,-1)}}}_getTransformedByDeletion(S,O){let R=E.createFromPosition(this);if(this.root!=S.root)return R;if('same'==f.i(C.a)(S.getParentPath(),this.getParentPath())){if(S.offsetthis.offset)return null;R.offset-=O}}else if('prefix'==f.i(C.a)(S.getParentPath(),this.getParentPath())){const V=S.path.length-1;if(S.offset<=this.path[V]){if(S.offset+O>this.path[V])return null;R.path[V]-=O}}return R}_getTransformedByInsertion(S,O,R){let V=E.createFromPosition(this);if(this.root!=S.root)return V;if('same'==f.i(C.a)(S.getParentPath(),this.getParentPath()))(S.offsetE+1;){let R=O.maxOffset-S.offset;0!=R&&P.push(new T(S,S.getShiftedBy(R))),S.path=S.path.slice(0,-1),S.offset++,O=O.parent}for(;S.path.length<=this.end.path.length;){let R=this.end.path[S.path.length-1],V=R-S.offset;0!=V&&P.push(new T(S,S.getShiftedBy(V))),S.offset=R,S.path.push(0)}return P}getWalker(P={}){return P.boundaries=this,new w.a(P)}*getItems(P={}){P.boundaries=this,P.ignoreElementEnd=!0;const E=new w.a(P);for(let S of E)yield S.item}*getPositions(P={}){P.boundaries=this;const E=new w.a(P);yield E.position;for(let S of E)yield S.nextPosition}getTransformedByDelta(P){let E=[T.createFromRange(this)];const S=new Set(['insert','move','remove','reinsert']);for(let O of P.operations)if(S.has(O.type))for(let R=0;RR.start.isAfter(V.start)?1:-1);const S=P.indexOf(E),O=new this(E.start,E.end);for(let R=S-1;0<=R&&P[R].end.isEqual(O.start);R++)O.start=h.a.createFromPosition(P[R].start);for(let R=S+1;R{Object.getOwnPropertyNames(T).concat(Object.getOwnPropertySymbols(T)).forEach((P)=>{if(!(P in w.prototype)){const E=Object.getOwnPropertyDescriptor(T,P);E.enumerable=!1,Object.defineProperty(w.prototype,P,E)}})})}},function(r,u,f){'use strict';function h(S){return'string'==typeof S?[new T.a(S)]:(f.i(P.a)(S)||(S=[S]),Array.from(S).map((O)=>'string'==typeof O?new T.a(O):O))}var w=f(59),C=f(74),T=f(24),P=f(48);class E extends w.a{constructor(S,O,R){super(O),this.name=S,this._children=new C.a,R&&this.insertChildren(0,R)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(S,O=null){return O?'element'==S&&O==this.name:'element'==S||S==this.name}getChild(S){return this._children.getNode(S)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(S){return this._children.getNodeIndex(S)}getChildStartOffset(S){return this._children.getNodeStartOffset(S)}clone(S=!1){const O=S?Array.from(this._children).map((R)=>R.clone(!0)):null;return new E(this.name,this.getAttributes(),O)}offsetToIndex(S){return this._children.offsetToIndex(S)}appendChildren(S){this.insertChildren(this.childCount,S)}insertChildren(S,O){O=h(O);for(let R of O)R.parent=this;this._children.insertNodes(S,O)}removeChildren(S,O=1){const R=this._children.removeNodes(S,O);for(let V of R)V.parent=null;return R}getNodeByPath(S){let O=this;for(const R of S)O=O.getChild(R);return O}toJSON(){let S=super.toJSON();if(S.name=this.name,0{return ce instanceof ie?ce.getValue(de):ce})}function C(le,de,{node:ce}){let ue=w(le,ce);ue=1==le.length&&le[0]instanceof se?ue[0]:ue.reduce(M,''),z(ue)?de.remove():de.set(ue)}function T(le){return{set(de){le.textContent=de},remove(){le.textContent=''}}}function P(le,de,ce){return{set(ue){le.setAttributeNS(ce,de,ue)},remove(){le.removeAttributeNS(ce,de)}}}function E(le,de){return{set(ce){le.style[de]=ce},remove(){le.style[de]=null}}}function S(le){const de=f.i(ee.a)(le,(ce)=>{if(ce&&(ce instanceof ie||$(ce)||U(ce)||K(ce)))return ce});return de}function O(le){if('string'==typeof le?le=F(le):le.text&&I(le),le.on&&(le.eventListeners=V(le.on),delete le.on),!le.text){le.attributes&&R(le.attributes);const de=new J.a;if(le.children)if(K(le.children))de.add(le.children);else for(let ce of le.children)$(ce)||U(ce)?de.add(ce):de.add(new oe(ce));le.children=de}return le}function R(le){for(let de in le)le[de].value&&(le[de].value=[].concat(le[de].value)),N(le,de)}function V(le){for(let de in le)N(le,de);return le}function F(le){return{text:[le]}}function I(le){Array.isArray(le.text)||(le.text=[le.text])}function N(le,de){Array.isArray(le[de])||(le[de]=[le[de]])}function M(le,de){return z(de)?le:z(le)?de:`${le} ${de}`}function D(le,de){for(let ce in de)le[ce]?le[ce].push(...de[ce]):le[ce]=de[ce]}function q(le,de){if(de.attributes&&(!le.attributes&&(le.attributes={}),D(le.attributes,de.attributes)),de.eventListeners&&(!le.eventListeners&&(le.eventListeners={}),D(le.eventListeners,de.eventListeners)),de.text&&le.text.push(...de.text),de.children&&de.children.length){if(le.children.length!=de.children.length)throw new Y.a('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let ce=0;for(let ue of de.children)q(le.children.get(ce++),ue)}}function z(le){return!le&&0!==le}function U(le){return le instanceof Q.a}function $(le){return le instanceof oe}function K(le){return le instanceof X.a}function W(){return{children:[],bindings:[],attributes:{}}}function H(le){return'class'==le||'style'==le}var Y=f(0),G=f(4),Z=f(7),J=f(80),Q=f(9),X=f(120),ee=f(524),te=f(14),ae=f(40);class oe{constructor(le){Object.assign(this,O(S(le))),this._isRendered=!1,this._revertData=null}render(){const le=this._renderNode({intoFragment:!0});return this._isRendered=!0,le}apply(le){return this._revertData=W(),this._renderNode({node:le,isApplying:!0,revertData:this._revertData}),le}revert(le){if(!this._revertData)throw new Y.a('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');this._revertTemplateFromNode(le,this._revertData)}static bind(le,de){return{to(ce,ue){return new re({eventNameOrFunction:ce,attribute:ce,observable:le,emitter:de,callback:ue})},if(ce,ue,me){return new se({observable:le,emitter:de,attribute:ce,valueIfTrue:ue,callback:me})}}}static extend(le,de){le._isRendered&&ae.a.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),q(le,O(S(de)))}_renderNode(le){let de;if(de=le.node?this.tag&&this.text:this.tag?this.text:!this.text,de)throw new Y.a('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering new Node.');return this.text?this._renderText(le):this._renderElement(le)}_renderElement(le){let de=le.node;return de||(de=le.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(le),this._renderElementChildren(le),this._setUpListeners(le),de}_renderText(le){let de=le.node;return de?le.revertData.text=de.textContent:de=le.node=document.createTextNode(''),h(this.text)?this._bindToObservable({schema:this.text,updater:T(de),data:le}):de.textContent=this.text.join(''),de}_renderAttributes(le){let de,ce,ue,me;if(this.attributes){const pe=le.node,ge=le.revertData;for(de in this.attributes)if(ue=pe.getAttribute(de),ce=this.attributes[de],ge&&(ge.attributes[de]=ue),me=f.i(te.a)(ce[0])&&ce[0].ns?ce[0].ns:null,h(ce)){const fe=me?ce[0].value:ce;ge&&H(de)&&fe.unshift(ue),this._bindToObservable({schema:fe,updater:P(pe,de,me),data:le})}else'style'==de&&'string'!=typeof ce[0]?this._renderStyleAttribute(ce[0],le):(ge&&ue&&H(de)&&ce.unshift(ue),ce=ce.map((fe)=>fe?fe.value||fe:fe).reduce((fe,he)=>fe.concat(he),[]).reduce(M,''),z(ce)||pe.setAttributeNS(me,de,ce))}}_renderStyleAttribute(le,de){const ce=de.node;for(let ue in le){const me=le[ue];h(me)?this._bindToObservable({schema:[me],updater:E(ce,ue),data:de}):ce.style[ue]=me}}_renderElementChildren(le){const de=le.node,ce=le.intoFragment?document.createDocumentFragment():de,ue=le.isApplying;let me=0;for(let pe of this.children)if(K(pe)){if(!ue){pe.setParent(de);for(let ge of pe)ce.appendChild(ge.element)}}else if(U(pe))ue||ce.appendChild(pe.element);else if(ue){const ge=le.revertData,fe=W();ge.children.push(fe),pe._renderNode({node:ce.childNodes[me++],isApplying:!0,revertData:fe})}else ce.appendChild(pe.render());le.intoFragment&&de.appendChild(ce)}_setUpListeners(le){if(this.eventListeners)for(let de in this.eventListeners){const ce=this.eventListeners[de].map((ue)=>{const[me,pe]=de.split('@');return ue.activateDomEventListener(me,pe,le)});le.revertData&&le.revertData.bindings.push(ce)}}_bindToObservable({schema:le,updater:de,data:ce}){const ue=ce.revertData;C(le,de,ce);const me=le.filter((pe)=>!z(pe)).filter((pe)=>pe.observable).map((pe)=>pe.activateAttributeListener(le,de,ce));ue&&ue.bindings.push(me)}_revertTemplateFromNode(le,de){for(let ce of de.bindings)for(let ue of ce)ue();if(de.text)return void(le.textContent=de.text);for(let ce in de.attributes){const ue=de.attributes[ce];null===ue?le.removeAttribute(ce):le.setAttribute(ce,ue)}for(let ce=0;ceC(le,de,ce);return this.emitter.listenTo(this.observable,'change:'+this.attribute,ue),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,ue)}}}class re extends ie{activateDomEventListener(le,de,ce){const ue=(me,pe)=>{(!de||pe.target.matches(de))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(pe):this.observable.fire(this.eventNameOrFunction,pe))};return this.emitter.listenTo(ce.node,le,ue),()=>{this.emitter.stopListening(ce.node,le,ue)}}}class se extends ie{getValue(le){const de=super.getValue(le);return!z(de)&&(this.valueIfTrue||!0)}}},function(r,u,f){'use strict';function w(q,z){q[M]||(q[M]=z||f.i(F.a)())}function C(q){return q[M]}function T(q){return q._events||Object.defineProperty(q,'_events',{value:{}}),q._events}function P(){return{callbacks:[],childEvents:[]}}function E(q,z){const U=T(q);if(U[z])return;let $=z,K=null;const W=[];for(;''!==$&&!U[$];)U[$]=P(),W.push(U[$]),K&&U[$].childEvents.push(K),K=$,$=$.substr(0,$.lastIndexOf(':'));if(''!==$){for(let H of W)H.callbacks=U[$].callbacks.slice();U[$].childEvents.push(K)}}function S(q,z){const U=T(q)[z];if(!U)return[];let $=[U.callbacks];for(let K=0,W;K{this._delegations||(this._delegations=new Map);for(let $ of q){let K=this._delegations.get($);K?K.set(z,U):this._delegations.set($,new Map([[z,U]]))}}}},stopDelegating(q,z){if(this._delegations)if(!q)this._delegations.clear();else if(!z)this._delegations.delete(q);else{const U=this._delegations.get(q);U&&U.delete(z)}}};u.a=D},function(r,u,f){'use strict';var w=f(197),C=f(15),P=_Mathmax;u.a=function(E,S){if('function'!=typeof E)throw new TypeError('Expected a function');return S=P(void 0===S?E.length-1:f.i(C.a)(S),0),function(){for(var O=arguments,R=-1,V=P(O.length-S,0),F=Array(V);++R{I.locale=V})}get element(){return this._element?this._element:this.template?(this._addTemplateChildren(),this._element=this.template.render()):null}set element(V){this._element=V}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=C.a.bind(this,this)}createCollection(){const V=new w.a;return this._viewCollections.add(V),V}addChildren(V){return f.i(O.a)(V)||(V=[V]),Promise.all(V.map((F)=>this._unboundChildren.add(F)))}init(){if(this.ready)throw new h.a('ui-view-init-reinit: This View has already been initialized.');return Promise.resolve().then(()=>{return Promise.all(this._viewCollections.map((V)=>V.init()))}).then(()=>{this.ready=!0})}destroy(){return this.stopListening(),Promise.all(this._viewCollections.map((V)=>V.destroy())).then(()=>{this._unboundChildren.clear(),this._viewCollections.clear(),this.element=this.template=this.locale=this.t=this._viewCollections=this._unboundChildren=null})}_addTemplateChildren(){const V=(F)=>{if(F.children)for(let I of F.children)I instanceof R?this.addChildren(I):V(I)};V(this.template)}}u.a=R,f.i(S.a)(R,T.a),f.i(S.a)(R,P.a)},function(r,u,f){'use strict';var w=f(464),C=f(465),T=f(231),P=f(12),E=f(534);u.a=function(S){return'function'==typeof S?S:null==S?T.a:'object'==typeof S?f.i(P.a)(S)?f.i(C.a)(S[0],S[1]):f.i(w.a)(S):f.i(E.a)(S)}},function(r,u,f){'use strict';function h(P,E){E.isEnabled=!1}var w=f(33),C=f(4);class T{constructor(P){this.editor=P,this.set('isEnabled',!0),this._checkEnabled&&this.on('refreshState',(E,S)=>{S.isEnabled=this._checkEnabled()})}destroy(){this.stopListening()}refreshState(){const P={isEnabled:!0};this.fire('refreshState',P),this.isEnabled=P.isEnabled}_execute(P){this.isEnabled&&this._doExecute(P)}_disable(){this.on('refreshState',h),this.refreshState()}_enable(){this.off('refreshState',h),this.refreshState()}_doExecute(){}}u.a=T,f.i(C.a)(T,w.a)},function(r,u){'use strict';var h=Array.isArray;u.a=h},function(r,u,f){'use strict';var w=f(97),C=f(51);u.a=function(T){return f.i(C.a)(T)&&f.i(w.a)(T)}},function(r,u){'use strict';u.a=function(w){var C=typeof w;return!!w&&('object'==C||'function'==C)}},function(r,u,f){'use strict';var w=f(536);u.a=function(C){var T=f.i(w.a)(C),P=T%1;return T===T?P?T-P:T:0}},function(r,u,f){'use strict';var w=f(0);u.b=function(T,P){if(C.prototype[T])throw new w.a('model-batch-register-taken: This batch method name is already taken.',{name:T});C.prototype[T]=P};class C{constructor(T,P='default'){this.document=T,this.deltas=[],this.type=P}get baseVersion(){return 0Y+G.offsetSize,0),W=U.parent;O(U);const H=U.index;return W.insertChildren(H,$),S(W,H+$.length),S(W,H),new N.a(U,U.getShiftedBy(K))},remove:w,move:function(U,$){if(!U.isFlat)throw new q.a('model-writer-move-range-not-flat: Trying to move a range that starts and ends in different element.');const K=this.remove(U);return $=$._getTransformedByDeletion(U.start,U.end.offset-U.start.offset),this.insert($,K)},setAttribute:function(U,$,K){O(U.start),O(U.end);for(let W of U.getItems()){let H=W.is('textProxy')?W.textNode:W;null===K?H.removeAttribute($):H.setAttribute($,K),S(H.parent,H.index)}S(U.end.parent,U.end.index)},removeAttribute:function(U,$){this.setAttribute(U,$,null)},normalizeNodes:E}},function(r,u){'use strict';u.a=function(w){var C=w?w.length:0;return C?w[C-1]:void 0}},function(r,u,f){'use strict';var h=f(96),w=f(17);class C{constructor(){this.batch=null,this.operations=[]}get baseVersion(){return 0O?'ck-enabled':'ck-disabled'),S.if('isVisible','ck-hidden',(O)=>!O),S.to('isOn',(O)=>O?'ck-on':'ck-off'),S.if('withText','ck-button_with-text')],type:S.to('type',(O)=>O?O:'button'),'data-ck-tooltip':[S.to('_tooltipString')],tabindex:S.to('tabindex')},children:[{tag:'span',attributes:{class:['ck-button__label']},children:[{text:S.to('label')}]}],on:{mousedown:S.to((O)=>{O.preventDefault()}),click:S.to((O)=>{this.isEnabled?this.fire('execute'):O.preventDefault()})}})}init(){let E=Promise.resolve();if(this.icon&&!this.iconView){const S=this.iconView=new C.a;S.bind('content').to(this,'icon'),this.element.insertBefore(S.element,this.element.firstChild),E=E.then(()=>this.addChildren(S))}return E.then(()=>super.init())}focus(){this.element.focus()}_getTooltipString(E,S,O){if(E){if('string'==typeof E)return E;if(O&&(O=f.i(T.b)(O)),E instanceof Function)return E(S,O);if(!0===E)return`${S}${O?` (${O})`:''}`}return!1}}u.a=P},function(r,u,f){'use strict';function h(R){let V;if('string'!=typeof R)V=R.keyCode+(R.altKey?O.alt:0)+(R.ctrlKey?O.ctrl:0)+(R.shiftKey?O.shift:0);else if(V=O[R.toLowerCase()],!V)throw new E.a('keyboard-unknown-key: Unknown key name.',{key:R});return V}function P(R){return R.split(/\s*\+\s*/)}var E=f(0),S=f(441);u.c=h,u.a=function(R){return'string'==typeof R&&(R=P(R)),R.map((V)=>'string'==typeof V?h(V):V).reduce((V,F)=>F+V,0)},u.b=function(R){const V=P(R);return S.a.mac&&'ctrl'==V[0].toLowerCase()?'\u2318'+(V[1]||''):R};const O=function(){const R={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let V=65;90>=V;V++){const F=_StringfromCharCode(V);R[F.toLowerCase()]=V}for(let V=48;57>=V;V++)R[V-48]=V;for(let V=112;123>=V;V++)R['f'+(V-111)]=V;return R}();u.d=O},function(r,u,f){'use strict';function h(T,P,E,S,O){var R=-1,V=T.length;for(E||(E=C.a),O||(O=[]);++RF.add(M))}function C(F){return'string'==typeof F?[new P.a(F)]:(f.i(S.a)(F)||(F=[F]),Array.from(F).map((I)=>'string'==typeof I?new P.a(I):I))}var T=f(78),P=f(31),E=f(277),S=f(48),O=f(99),R=f(171);class V extends T.a{constructor(F,I,N){if(super(),this.name=F,this._attrs=f.i(O.a)(I)?f.i(E.a)(I):new Map(I),this._children=[],N&&this.insertChildren(0,N),this._classes=new Set,this._attrs.has('class')){const M=this._attrs.get('class');w(this._classes,M),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(h(this._styles,this._attrs.get('style')),this._attrs.delete('style')),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(F,I=null){return I?'element'==F&&I==this.name:'element'==F||F==this.name}clone(F=!1){const I=[];if(F)for(let M of this.getChildren())I.push(M.clone(F));const N=new this.constructor(this.name,this._attrs,I);return N._classes=new Set(this._classes),N._styles=new Map(this._styles),N._customProperties=new Map(this._customProperties),N.getFillerOffset=this.getFillerOffset,N}appendChildren(F){return this.insertChildren(this.childCount,F)}getChild(F){return this._children[F]}getChildIndex(F){return this._children.indexOf(F)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0this._classes.add(I))}removeClass(...F){this._fireChange('attributes',this),F.forEach((I)=>this._classes.delete(I))}hasClass(...F){for(let I of F)if(!this._classes.has(I))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(F,I){if(this._fireChange('attributes',this),f.i(O.a)(F)){const N=Object.keys(F);for(let M of N)this._styles.set(M,F[M])}else this._styles.set(F,I)}getStyle(F){return this._styles.get(F)}getStyleNames(){return this._styles.keys()}hasStyle(...F){for(let I of F)if(!this._styles.has(I))return!1;return!0}removeStyle(...F){this._fireChange('attributes',this),F.forEach((I)=>this._styles.delete(I))}findAncestor(...F){const I=new R.a(...F);for(let N=this.parent;N;){if(I.match(N))return N;N=N.parent}return null}setCustomProperty(F,I){this._customProperties.set(F,I)}getCustomProperty(F){return this._customProperties.get(F)}removeCustomProperty(F){return this._customProperties.delete(F)}*getCustomProperties(){yield*this._customProperties.entries()}}u.a=V},function(r,u,f){'use strict';var h=f(54),w=f(65),C=f(0),T=f(77);class P{constructor(E,S){this.parent=E,this.offset=S}get nodeAfter(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const E=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===E}get root(){return this.parent.root}get editableElement(){let E=this.parent;for(;!(E instanceof T.a);)if(E.parent)E=E.parent;else return null;return E}getShiftedBy(E){let S=P.createFromPosition(this),O=S.offset+E;return S.offset=0>O?0:O,S}getLastMatchingPosition(E,S={}){S.startPosition=this;const O=new h.a(S);return O.skip(E),O.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeNode:!0})}isEqual(E){return this.parent==E.parent&&this.offset==E.offset}isBefore(E){return'before'==this.compareWith(E)}isAfter(E){return'after'==this.compareWith(E)}compareWith(E){if(this.isEqual(E))return'same';if(this.parent===E.parent)return 0>this.offset-E.offset?'before':'after';const S=this.getAncestors(),O=E.getAncestors(),R=f.i(w.a)(S,O);let V;switch(R){case 0:return'different';case'prefix':V=S.length-1;break;case'extension':V=O.length-1;break;default:V=R-1;}const F=S[V],I=S[V+1],N=O[V+1];if(F===this.parent){const D=this.offset-N.index;return 0>=D?'before':'after'}if(F===E.parent){const D=I.index-E.offset;return 0>D?'before':'after'}const M=I.index-N.index;return 0>M?'before':'after'}static createAt(E,S){if(E instanceof P)return this.createFromPosition(E);let O=E;if('end'==S)S=O.is('text')?O.data.length:O.childCount;else{if('before'==S)return this.createBefore(O);if('after'==S)return this.createAfter(O);S||(S=0)}return new P(O,S)}static createAfter(E){if(E.is('textProxy'))return new P(E.textNode,E.offsetInText+E.data.length);if(!E.parent)throw new C.a('view-position-after-root: You can not make position after root.',{root:E});return new P(E.parent,E.index+1)}static createBefore(E){if(E.is('textProxy'))return new P(E.textNode,E.offsetInText);if(!E.parent)throw new C.a('view-position-before-root: You can not make position before root.',{root:E});return new P(E.parent,E.index)}static createFromPosition(E){return new this(E.parent,E.offset)}}u.a=P},function(r,u){'use strict';u.a=function(w,C){for(var T=-1,P=w.length,E=Array(P);++TO.maxOffset)throw new T.a('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(O===R&&V=V&&this.targetPosition.path[N]{if(W.attrs.length&&W.attrs.length!==K)throw new V.a('observable-bind-to-attrs-length: The number of attributes must match.');W.attrs.length||(W.attrs=this._bindAttrs)}),this._to=U.to,U.callback&&(this._bindings.get($[0]).callback=U.callback),O(this._observable,this._to),E(this),this._bindAttrs.forEach((W)=>{S(this._observable,W)})}function C(z){return z.every((U)=>'string'==typeof U)}function T(...z){if(!z.length)throw new V.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const U={to:[]};let $;return'function'==typeof z[z.length-1]&&(U.callback=z.pop()),z.forEach((K)=>{if('string'==typeof K)$.attrs.push(K);else if('object'==typeof K)$={observable:K,attrs:[]},U.to.push($);else throw new V.a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),U}function P(z,U,$,K){const W=z[M],H=W.get($),Y=H||{};Y[K]||(Y[K]=new Set),Y[K].add(U),H||W.set($,Y)}function E(z){let U;z._bindings.forEach(($,K)=>{z._to.forEach((W)=>{U=W.attrs[$.callback?0:z._bindAttrs.indexOf(K)],$.to.push([W.observable,U]),P(z._observable,$,W.observable,U)})})}function S(z,U){const $=z[D],K=$.get(U);let W;K.callback?W=K.callback.apply(z,K.to.map((H)=>H[0][H[1]])):(W=K.to[0],W=W[0][W[1]]),z.hasOwnProperty(U)?z[U]=W:z.set(U,W)}function O(z,U){U.forEach(($)=>{const K=z[M];let W;K.get($.observable)||z.listenTo($.observable,'change',(H,Y)=>{W=K.get($.observable)[Y],W&&W.forEach((G)=>{S(z,G.attr)})})})}var R=f(7),V=f(0),F=f(50),I=f(14);const N=Symbol('attributes'),M=Symbol('boundObservables'),D=Symbol('boundAttributes'),q={set(z,U){if(f.i(I.a)(z))return void Object.keys(z).forEach((K)=>{this.set(K,z[K])},this);h(this);const $=this[N];if(z in this&&!$.has(z))throw new V.a('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,z,{enumerable:!0,configurable:!0,get(){return $.get(z)},set(K){const W=$.get(z);W===K&&$.has(z)||($.set(z,K),this.fire('change:'+z,z,K,W))}}),this[z]=U},bind(...z){if(!z.length||!C(z))throw new V.a('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(z).size!==z.length)throw new V.a('observable-bind-duplicate-attrs: Attributes must be unique.');h(this);const U=this[D];z.forEach((K)=>{if(U.has(K))throw new V.a('observable-bind-rebind: Cannot bind the same attribute more that once.')});const $=new Map;return z.forEach((K)=>{const W={attr:K,to:[]};U.set(K,W),$.set(K,W)}),{to:w,_observable:this,_bindAttrs:z,_to:[],_bindings:$}},unbind(...z){if(!(N in this))return;const U=this[D],$=this[M];if(z.length){if(!C(z))throw new V.a('observable-unbind-wrong-attrs: Attributes must be strings.');z.forEach((K)=>{const W=U.get(K);let H,Y,G,Z;W.to.forEach((J)=>{H=J[0],Y=J[1],G=$.get(H),Z=G[Y],Z.delete(W),Z.size||delete G[Y],Object.keys(G).length||($.delete(H),this.stopListening(H,'change'))}),U.delete(K)})}else $.forEach((K,W)=>{this.stopListening(W,'change')}),$.clear(),U.clear()}};u.a=q,f.i(F.a)(q,R.a)},function(r,u,f){'use strict';function h(V,F,I,N){if(f.i(O.a)(V)){for(let q of V)h(q,F,I,N);return}const M=Array.from(V.getAttributeKeys());M.push(F.key);const D={name:V.name||'$text',attributes:M,inside:I.context};N.schema.check(D)&&V.setAttribute(F.key,F.value)}var C=f(171),T=f(5),P=f(1),E=f(18),S=f(0),O=f(48);u.a=function(){return new R};class R{constructor(){this._dispatchers=[],this._from=[]}for(...V){return this._dispatchers=V,this}fromElement(V){return this.from({name:V})}fromAttribute(V,F=/.*/){let I={};'style'===V||'class'===V?I[V]=F:(I.attribute={},I.attribute[V]=F);const N=new C.a(I);return this._from.push({matcher:N,consume:!1,priority:null,attributeKey:V}),this}from(V){return V instanceof C.a||(V=new C.a(V)),this._from.push({matcher:V,consume:!1,priority:null}),this}consuming(V){let F=this._from[this._from.length-1];return F.consume=V,this}withPriority(V){let F=this._from[this._from.length-1];return F.priority=V,this}toElement(V){this._setCallback(function(I){return(N,M,D,q)=>{let z=I.matcher.matchAll(M.input);if(z)for(let U of z){const $=V instanceof Function?V(M.input):new T.a(V);if(!$)continue;const K=Array.from($.getAttributeKeys());if(!q.schema.check({name:$.name,attributes:K,inside:M.context}))continue;if(!D.consume(M.input,I.consume||U.match))continue;M.context.push($);const W=q.convertChildren(M.input,D,M),H=P.a.createAt($,'end');E.a.insert(H,W),M.context.pop(),M.output=$;break}}},'normal')}toAttribute(V,F){this._setCallback(function(N){return(M,D,q,z)=>{let U=N.matcher.matchAll(D.input);if(U)for(let $ of U){if(!q.consume(D.input,N.consume||$.match))continue;D.output||(D.output=z.convertChildren(D.input,q,D));let K;if(!(V instanceof Function))K={key:V,value:F?F:D.input.getAttribute(N.attributeKey)};else if(K=V(D.input),!K)return;h(D.output,K,D,z);break}}},'low')}toMarker(V){this._setCallback(function(I){return(N,M,D)=>{const q=I.matcher.matchAll(M.input);if(!q)return;let z;if(z=V instanceof Function?V(M.input):new T.a('$marker',{'data-name':M.input.getAttribute('data-name')}),'$marker'!=z.name||'string'!=typeof z.getAttribute('data-name'))throw new S.a('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const U of q)if(D.consume(M.input,I.consume||U.match)){M.output=z;break}}},'normal')}_setCallback(V,F){for(let I of this._from){const N=I.matcher.getElementName(),M=N?'element:'+N:'element',D=V(I),q=null===I.priority?F:I.priority;for(let z of this._dispatchers)z.on(M,D,{priority:q})}}}},function(r,u,f){'use strict';function h(S){return'string'==typeof S?[new T.a(S)]:(f.i(P.a)(S)||(S=[S]),Array.from(S).map((O)=>'string'==typeof O?new T.a(O):O))}var w=f(74),C=f(5),T=f(24),P=f(48);class E{constructor(S){this.markers=new Map,this._children=new w.a,S&&this.insertChildren(0,S)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(S){return'documentFragment'==S}getChild(S){return this._children.getNode(S)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(S){return this._children.getNodeIndex(S)}getChildStartOffset(S){return this._children.getNodeStartOffset(S)}getPath(){return[]}offsetToIndex(S){return this._children.offsetToIndex(S)}appendChildren(S){this.insertChildren(this.childCount,S)}insertChildren(S,O){O=h(O);for(let R of O)R.parent=this;this._children.insertNodes(S,O)}removeChildren(S,O=1){const R=this._children.removeNodes(S,O);for(let V of R)V.parent=null;return R}toJSON(){let S=[];for(let O of this._children)S.push(O.toJSON());return S}static fromJSON(S){let O=[];for(let R of S)R.name?O.push(C.a.fromJSON(R)):O.push(T.a.fromJSON(R));return new E(O)}}u.a=E},function(r,u,f){'use strict';var h=f(96);class w{constructor(C){this.baseVersion=C}toJSON(){const C=f.i(h.a)(this,!0);return C.__className=this.constructor.className,delete C.delta,C}static get className(){return'engine.model.operation.Operation'}static fromJSON(C){return new this(C.baseVersion)}}u.a=w},function(r,u,f){'use strict';function h(O,R,V,F,I){return{done:!1,value:{type:O,item:R,previousPosition:V,nextPosition:F,length:I}}}var w=f(24),C=f(61),T=f(5),P=f(1),E=f(0);class S{constructor(O={}){if(!O.boundaries&&!O.startPosition)throw new E.a('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const R=O.direction||'forward';if('forward'!=R&&'backward'!=R)throw new E.a('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:R});this.direction=R,this.boundaries=O.boundaries||null,this.position=O.startPosition?P.a.createFromPosition(O.startPosition):P.a.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!O.singleCharacters,this.shallow=!!O.shallow,this.ignoreElementEnd=!!O.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(O){let R,V,F,I;do F=this.position,I=this._visitedParent,({done:R,value:V}=this.next());while(!R&&O(V));R||(this.position=F,this._visitedParent=I)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const O=this.position,R=P.a.createFromPosition(this.position),V=this._visitedParent;if(null===V.parent&&R.offset===V.maxOffset)return{done:!0};if(V===this._boundaryEndParent&&R.offset==this.boundaries.end.offset)return{done:!0};const F=R.textNode?R.textNode:R.nodeAfter;if(F instanceof T.a)return this.shallow?R.offset++:(R.path.push(0),this._visitedParent=F),this.position=R,h('elementStart',F,O,R,1);if(F instanceof w.a){let I,N;if(this.singleCharacters)I=1;else{let D=F.endOffset;this._boundaryEndParent==V&&this.boundaries.end.offsetD&&(D=this.boundaries.start.offset),I=R.offset-D}N=R.offset-F.startOffset;const M=new C.a(F,N-I,I);return R.offset-=I,this.position=R,h('text',M,O,R,I)}return R.path.pop(),this.position=R,this._visitedParent=V.parent,h('elementStart',V,O,R,1)}}u.a=S},function(r,u){'use strict';u.a=function(w,C,T){var P=-1,E=w.length;0>C&&(C=-C>E?0:E+C),T=T>E?E:T,0>T&&(T+=E),E=C>T?0:T-C>>>0,C>>>=0;for(var S=Array(E);++PV.clone(!0)));return new O(this.position,R,this.baseVersion)}getReversed(){return new T.a(this.position,this.nodes.maxOffset,this.baseVersion+1)}_execute(){const R=this.nodes;this.nodes=new C.a([...R].map((F)=>F.clone(!0)));const V=P.a.insert(this.position,R);return{range:V}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(R,V){let F=[];for(let I of R.nodes)I.name?F.push(S.a.fromJSON(I)):F.push(E.a.fromJSON(I));return new O(w.a.fromJSON(R.position,V),F,R.baseVersion)}}u.a=O},function(r,u,f){'use strict';var h=f(30),w=f(1),C=f(5),T=f(113);class P extends h.a{constructor(E,S,O){const R=E.root.document.graveyard,V=new w.a(R,[R.maxOffset,0]);super(E,S,V,O),this._needsHolderElement=!0}get type(){return'remove'}get _holderElementOffset(){return this.targetPosition.path[0]}set _holderElementOffset(E){this.targetPosition.path[0]=E}getReversed(){return new T.a(this.targetPosition,this.howMany,this.sourcePosition,this.baseVersion+1)}clone(){let E=new P(this.sourcePosition,this.howMany,this.baseVersion);return E.targetPosition=w.a.createFromPosition(this.targetPosition),E}_execute(){if(this._needsHolderElement){const E=this.targetPosition.root,S=new C.a('$graveyardHolder');E.insertChildren(this._holderElementOffset,S),this.sourcePosition.root==E&&this.sourcePosition.path[0]>=this._holderElementOffset&&this.sourcePosition.path[0]++}return super._execute()}static get className(){return'engine.model.operation.RemoveOperation'}static fromJSON(E,S){let O=w.a.fromJSON(E.sourcePosition,S);const R=new P(O,E.howMany,E.baseVersion);return R.targetPosition=w.a.fromJSON(E.targetPosition,S),R._needsHolderElement=E._needsHolderElement,R}}u.a=P},function(r,u,f){'use strict';function h(){return 0===this.childCount?0:null}var w=f(25);class C extends w.a{constructor(T,P,E){super(T,P,E),this.getFillerOffset=h}is(T,P=null){return P?'containerElement'==T&&P==this.name||super.is(T,P):'containerElement'==T||super.is(T)}}u.a=C},function(r,u,f){'use strict';function h(P){return P.item.is('attributeElement')||P.item.is('uiElement')}var w=f(26),C=f(54);class T{constructor(P,E=null){this.start=w.a.createFromPosition(P),this.end=E?w.a.createFromPosition(E):w.a.createFromPosition(P)}*[Symbol.iterator](){yield*new C.a({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let P=this.start.getLastMatchingPosition(h,{direction:'backward'}),E=this.end.getLastMatchingPosition(h);return P.parent.is('text')&&P.isAtStart&&(P=w.a.createBefore(P.parent)),E.parent.is('text')&&E.isAtEnd&&(E=w.a.createAfter(E.parent)),new T(P,E)}getTrimmed(){let P=this.start.getLastMatchingPosition(h),E=this.end.getLastMatchingPosition(h,{direction:'backward'}),S=P.nodeAfter,O=E.nodeBefore;return S&&S.is('text')&&(P=new w.a(S,0)),O&&O.is('text')&&(E=new w.a(O,O.data.length)),new T(P,E)}isEqual(P){return this==P||this.start.isEqual(P.start)&&this.end.isEqual(P.end)}containsPosition(P){return P.isAfter(this.start)&&P.isBefore(this.end)}containsRange(P){return this.containsPosition(P.start)&&this.containsPosition(P.end)}getDifference(P){const E=[];return this.isIntersecting(P)?(this.containsPosition(P.start)&&E.push(new T(this.start,P.start)),this.containsPosition(P.end)&&E.push(new T(P.end,this.end))):E.push(T.createFromRange(this)),E}getIntersection(P){if(this.isIntersecting(P)){let E=this.start,S=this.end;return this.containsPosition(P.start)&&(E=P.start),this.containsPosition(P.end)&&(S=P.end),new T(E,S)}return null}getWalker(P={}){return P.boundaries=this,new C.a(P)}*getItems(P={}){P.boundaries=this,P.ignoreElementEnd=!0;const E=new C.a(P);for(let S of E)yield S.item}*getPositions(P={}){P.boundaries=this;const E=new C.a(P);yield E.position;for(let S of E)yield S.nextPosition}isIntersecting(P){return this.start.isBefore(P.end)&&this.end.isAfter(P.start)}static createFromParentsAndOffsets(P,E,S,O){return new this(new w.a(P,E),new w.a(S,O))}static createFromRange(P){return new this(P.start,P.end)}static createFromPositionAndShift(P,E){const S=P,O=P.getShiftedBy(E);return 0=200){var U=V?null:f.i(E.a)(R);if(U)return f.i(S.a)(U);D=!1,N=P.a,z=new w.a}else z=V?[]:q;outer:for(;++Ih(q,N));return M.forEach((q)=>N.add(q)),D}var C=f(1),T=f(5),P=f(3),E=f(7),S=f(0),O=f(4),R=f(152),V=f(541);class F{constructor(I,N){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,I&&this.setRanges(I,N)}get anchor(){if(0{if(!(D instanceof P.a))throw new S.a('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((q)=>{return!q.isEqual(D)})});if(I.length!==this._ranges.length||M){this._removeAllRanges();for(let D of I)this._pushRange(D);this._lastRangeBackward=!!N,this.fire('change:range',{directChange:!0})}}setTo(I){this.setRanges(I.getRanges(),I.isBackward)}collapse(I,N){const M=C.a.createAt(I,N),D=new P.a(M,M);this.setRanges([D])}collapseToStart(){const I=this.getFirstPosition();null!==I&&this.setRanges([new P.a(I,I)])}collapseToEnd(){const I=this.getLastPosition();null!==I&&this.setRanges([new P.a(I,I)])}setFocus(I,N){if(null===this.anchor)throw new S.a('model-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const M=C.a.createAt(I,N);if('same'!=M.compareWith(this.focus)){const D=this.anchor;this._ranges.length&&this._popRange(),'before'==M.compareWith(D)?this.addRange(new P.a(M,D),!0):this.addRange(new P.a(D,M))}}getAttribute(I){return this._attrs.get(I)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(I){return this._attrs.has(I)}clearAttributes(){if(0T||T>C.offsetSize)throw new h.a('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>P||T+P>C.offsetSize)throw new h.a('model-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(T,T+P),this.offsetInText=T}get startOffset(){return null===this.textNode.startOffset?null:this.textNode.startOffset+this.offsetInText}get offsetSize(){return this.data.length}get endOffset(){return null===this.startOffset?null:this.startOffset+this.offsetSize}get isPartial(){return this.offsetSize!==this.textNode.offsetSize}get parent(){return this.textNode.parent}get root(){return this.textNode.root}get document(){return this.textNode.document}is(C){return'textProxy'==C}getPath(){const C=this.textNode.getPath();return 0{const M=N.createElement('br');return M.dataset.ckeFiller=!0,M};u.a=(N)=>N.createTextNode('\xA0');const V=7;u.d=V;let F='';for(let N=0;N{this.listenTo(T,E,(S,O)=>{this.isEnabled&&this.onDomEvent(O)},{useCapture:this.useCapture})})}fire(T,P,E){this.isEnabled&&this.document.fire(T,new w.a(this.document,P,E))}}u.a=C},function(r,u,f){'use strict';var h=f(0),w=f(45),C=f(26),T=f(4),P=f(7),E=f(25);class S{constructor(O,R){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',O&&this.setRanges(O,R)}setFake(O=!0,R={}){this._isFake=O,this._fakeSelectionLabel=O?R.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const O=this._ranges[this._ranges.length-1],R=this._lastRangeBackward?O.end:O.start;return C.a.createFromPosition(R)}get focus(){if(!this._ranges.length)return null;const O=this._ranges[this._ranges.length-1],R=this._lastRangeBackward?O.start:O.end;return C.a.createFromPosition(R)}get isCollapsed(){return 1===this.rangeCount&&this._ranges[0].isCollapsed}get rangeCount(){return this._ranges.length}get isBackward(){return!this.isCollapsed&&this._lastRangeBackward}get editableElement(){return this.anchor?this.anchor.editableElement:null}addRange(O,R){if(!(O instanceof w.a))throw new h.a('view-selection-invalid-range: Invalid Range.');this._pushRange(O),this._lastRangeBackward=!!R,this.fire('change')}*getRanges(){for(let O of this._ranges)yield w.a.createFromRange(O)}getFirstRange(){let O=null;for(let R of this._ranges)(!O||R.start.isBefore(O.start))&&(O=R);return O?w.a.createFromRange(O):null}getLastRange(){let O=null;for(let R of this._ranges)(!O||R.end.isAfter(O.end))&&(O=R);return O?w.a.createFromRange(O):null}getFirstPosition(){const O=this.getFirstRange();return O?C.a.createFromPosition(O.start):null}getLastPosition(){const O=this.getLastRange();return O?C.a.createFromPosition(O.end):null}isEqual(O){if(this.isFake!=O.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=O.fakeSelectionLabel)return!1;if(this.rangeCount!=O.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(O.anchor)||!this.focus.isEqual(O.focus))return!1;for(let R of this._ranges){let V=!1;for(let F of O._ranges)if(R.isEqual(F)){V=!0;break}if(!V)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(O,R){this._ranges=[];for(let V of O){if(!(V instanceof w.a))throw new h.a('view-selection-invalid-range: Invalid Range.');this._pushRange(V)}this._lastRangeBackward=!!R,this.fire('change')}setTo(O){this._isFake=O._isFake,this._fakeSelectionLabel=O._fakeSelectionLabel,this.setRanges(O.getRanges(),O.isBackward)}collapse(O,R){const V=C.a.createAt(O,R),F=new w.a(V,V);this.setRanges([F])}collapseToStart(){const O=this.getFirstPosition();null!==O&&this.setRanges([new w.a(O,O)])}collapseToEnd(){const O=this.getLastPosition();null!==O&&this.setRanges([new w.a(O,O)])}setFocus(O,R){if(null===this.anchor)throw new h.a('view-selection-setFocus-no-ranges: Cannot set selection focus if there are no ranges in selection.');const V=C.a.createAt(O,R);if('same'!=V.compareWith(this.focus)){const F=this.anchor;this._ranges.pop(),'before'==V.compareWith(F)?this.addRange(new w.a(V,F),!0):this.addRange(new w.a(F,V))}}getSelectedElement(){if(1!==this.rangeCount)return null;const O=this.getFirstRange(),R=O.start.nodeAfter,V=O.end.nodeBefore;return R instanceof E.a&&R==V?R:null}static createFromSelection(O){const R=new S;return R.setTo(O),R}_pushRange(O){for(let R of this._ranges)if(O.isIntersecting(R))throw new h.a('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:O,intersectingRange:R});this._ranges.push(w.a.createFromRange(O))}}u.a=S,f.i(T.a)(S,P.a)},function(r,u){'use strict';u.a=function(w,C){const T=_Mathmin(w.length,C.length);for(let P=0;Pthis._focus(E),{useCapture:!0}),this.listenTo(E,'blur',()=>this._blur(),{useCapture:!0}),this._elements.add(E)}remove(E){E===this.focusedElement&&this._blur(E),this._elements.has(E)&&(this.stopListening(E),this._elements.delete(E))}_focus(E){clearTimeout(this._nextEventLoopTimeout),this.focusedElement=E,this.isFocused=!0}_blur(){this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}u.a=P,f.i(T.a)(P,h.a),f.i(T.a)(P,w.a)},function(r,u,f){'use strict';var h=f(81),w=f(22);u.a=class{constructor(){this._listener=Object.create(h.a),this._keystrokes=new Map}listenTo(T){this._listener.listenTo(T,'keydown',(P,E)=>{this.press(E)})}set(T,P){const E=f.i(w.a)(T),S=this._keystrokes.get(E);S?S.push(P):this._keystrokes.set(E,[P])}press(T){const P=f.i(w.c)(T),E=this._keystrokes.get(P);if(!E)return!1;for(let S of E)S(T,()=>{T.preventDefault(),T.stopPropagation()});return!0}destroy(){this._keystrokes=new Map,this._listener.stopListening()}}},function(r,u,f){'use strict';var w=f(58),C=Object.prototype,T=C.hasOwnProperty;u.a=function(P,E,S){var O=P[E];T.call(P,E)&&f.i(w.a)(O,S)&&(S!==void 0||E in P)||(P[E]=S)}},function(r,u,f){'use strict';var w=f(83),C=f(125),T=f(126),P=f(27),E=f(134),S=f(136);u.a=function(R,V,F,I){var N=-1,M=C.a,D=!0,q=R.length,z=[],U=V.length;if(!q)return z;F&&(V=f.i(P.a)(V,f.i(E.a)(F))),I?(M=T.a,D=!1):V.length>=200&&(M=S.a,D=!1,V=new w.a(V));outer:for(;++NC;C++)w+=_Mathfloor(65536*(1+Math.random())).toString(16).substring(1);return w}},function(r,u,f){'use strict';function h(M,D,q,z){if(q.test(D.input,{name:D.input.name})&&C(D.input,D.context,z.schema,!1)){D.context.push('paragraph');const U=z.convertItem(D.input,q,D);D.context.pop(),D.output=U}}function w(M,D,q,z){if(!D.output)return;const U=I.paragraphLikeElements.has(D.input.name)&&!D.output.is('element'),$=D.input.is('documentFragment')||D.input.is('element')&&D.output.is('element')||U;if(!$)return;const K=D.output.is('element');K&&D.context.push(D.output);let W=null;for(let H=0;H{D.insert(R.a.createAt(M),new O.a('paragraph'))})}N.clear()}var E=f(399),S=f(2),O=f(5),R=f(1),V=f(41),F=f(34);class I extends S.a{static get pluginName(){return'paragraph/paragraph'}init(){const M=this.editor,D=M.document,q=M.data,z=M.editing;M.commands.set('paragraph',new E.a(M)),D.schema.registerItem('paragraph','$block'),f.i(V.a)().for(q.modelToView,z.modelToView).fromElement('paragraph').toElement('p'),f.i(F.a)().for(q.viewToModel).fromElement('p').toElement('paragraph'),q.viewToModel.on('element',h,{priority:'low'}),q.viewToModel.on('text',h,{priority:'lowest'}),q.viewToModel.on('element',w,{priority:'lowest'}),q.viewToModel.on('documentFragment',w,{priority:'lowest'}),D.on('change',(U,$,K,W)=>T(D,W)),D.on('changesDone',P,{priority:'lowest'}),M.on('dataReady',()=>{T(D,D.batch('transparent')),P()},{priority:'lowest'})}}u.a=I,I.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const N=new Map},function(r,u,f){'use strict';var h=f(59),w=f(0);class C{constructor(T){this._nodes=[],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,P)=>T+P.offsetSize,0)}getNode(T){return this._nodes[T]||null}getNodeIndex(T){const P=this._nodes.indexOf(T);return-1==P?null:P}getNodeStartOffset(T){const P=this.getNodeIndex(T);return null===P?null:this._nodes.slice(0,P).reduce((E,S)=>E+S.offsetSize,0)}indexToOffset(T){if(T==this._nodes.length)return this.maxOffset;const P=this._nodes[T];if(!P)throw new w.a('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(P)}offsetToIndex(T){let P=0;for(let E of this._nodes){if(T>=P&&TT.toJSON())}}u.a=C},function(r,u,f){'use strict';var h=f(36),w=f(3),C=f(0),T=f(18),P=f(528);class E extends h.a{constructor(S,O,R,V,F){super(F),this.range=w.a.createFromRange(S),this.key=O,this.oldValue=R===void 0?null:R,this.newValue=V===void 0?null:V}get type(){return null===this.oldValue?'addAttribute':null===this.newValue?'removeAttribute':'changeAttribute'}clone(){return new E(this.range,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new E(this.range,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){for(let S of this.range.getItems()){if(null!==this.oldValue&&!f.i(P.a)(S.getAttribute(this.key),this.oldValue))throw new C.a('attribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{item:S,key:this.key,value:this.oldValue});if(null===this.oldValue&&null!==this.newValue&&S.hasAttribute(this.key))throw new C.a('attribute-operation-attribute-exists: The attribute with given key already exists.',{node:S,key:this.key});if(f.i(P.a)(this.oldValue,this.newValue))return}return T.a.setAttribute(this.range,this.key,this.newValue),{range:this.range,key:this.key,oldValue:this.oldValue,newValue:this.newValue}}static get className(){return'engine.model.operation.AttributeOperation'}static fromJSON(S,O){return new E(w.a.fromJSON(S.range,O),S.key,S.oldValue,S.newValue,S.baseVersion)}}u.a=E},function(r,u,f){'use strict';var h=f(36);class w extends h.a{clone(){return new w(this.baseVersion)}getReversed(){return new w(this.baseVersion+1)}_execute(){}static get className(){return'engine.model.operation.NoOperation'}}u.a=w},function(r,u,f){'use strict';var h=f(44),w=f(0),C=f(4),T=f(33);const P=Symbol('document');class E extends h.a{constructor(S,O,R){super(S,O,R),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(P)}set document(S){if(this.getCustomProperty(P))throw new w.a('view-editableelement-document-already-set: View document is already set.');this.setCustomProperty(P,S),this.bind('isFocused').to(S,'isFocused',(O)=>O&&S.selection.editableElement==this),this.listenTo(S,'render',()=>{this.isFocused=S.isFocused&&S.selection.editableElement==this},{priority:'high'})}}u.a=E,f.i(C.a)(E,T.a)},function(r,u,f){'use strict';var h=f(0),w=f(7),C=f(4);class T{constructor(){this.parent=null}get index(){let P;if(!this.parent)return null;if(-1==(P=this.parent.getChildIndex(this)))throw new h.a('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return P}get nextSibling(){const P=this.index;return null!==P&&this.parent.getChild(P+1)||null}get previousSibling(){const P=this.index;return null!==P&&this.parent.getChild(P-1)||null}get root(){let P=this;for(;P.parent;)P=P.parent;return P}get document(){return this.parent instanceof T?this.parent.document:null}getAncestors(P={includeNode:!1,parentFirst:!1}){const E=[];for(let S=P.includeNode?this:this.parent;S;)E[P.parentFirst?'push':'unshift'](S),S=S.parent;return E}remove(){this.parent.removeChildren(this.index)}_fireChange(P,E){this.fire('change:'+P,E),this.parent&&this.parent._fireChange(P,E)}}u.a=T,f.i(C.a)(T,w.a)},function(r,u,f){'use strict';function C(me){const pe=me.offset,ge=me.parent;if(ge.is('text'))return me;if(ge.is('attributeElement')&&0===ge.childCount){const be=ge.parent,_e=ge.index;return ge.remove(),C(new X.a(be,_e))}const fe=ge.getChild(pe-1),he=ge.getChild(pe);if(!fe||!he)return me;if(fe.is('text')&&he.is('text'))return W(fe,he);if(fe.is('attributeElement')&&he.is('attributeElement')&&fe.isSimilar(he)){const be=fe.childCount;return fe.appendChildren(he.getChildren()),he.remove(),C(new X.a(fe,be))}return me}function E(me,pe){pe=f.i(de.a)(pe)?[...pe]:[pe],Z(pe);const ge=M(me);if(!ge)throw new se.a('view-writer-invalid-position-container');const fe=q(me,!0),he=ge.insertChildren(fe.offset,pe),be=fe.getShiftedBy(he),_e=C(fe);if(0===he)return new ie.a(_e,_e);_e.isEqual(fe)||be.offset--;const ke=C(be);return new ie.a(_e,ke)}function S(me){if(Q(me),me.isCollapsed)return new le.a;const{start:pe,end:ge}=D(me,!0),fe=pe.parent,he=ge.offset-pe.offset,be=fe.removeChildren(pe.offset,he),_e=C(pe);return me.start=_e,me.end=X.a.createFromPosition(_e),new le.a(be)}function R(me,pe){let ge;if(pe.isAfter(me.end)){pe=q(pe,!0);const fe=pe.parent,he=fe.childCount;me=D(me,!0),ge=S(me),pe.offset+=fe.childCount-he}else ge=S(me);return E(pe,ge)}function V(me,pe){if(!(pe instanceof te.a))throw new se.a('view-writer-wrap-invalid-attribute');if(Q(me),me.isCollapsed)return me;if(me.end.isEqual(me.start.getShiftedBy(1))){const ye=me.start.nodeAfter;if(ye instanceof te.a&&H(pe,ye))return me}if(G(me)&&H(pe,me.start.parent)){const ye=me.start.parent.parent,ve=me.start.parent.index;return ie.a.createFromParentsAndOffsets(ye,ve,ye,ve+1)}const{start:ge,end:fe}=D(me,!0),he=ge.parent,be=z(he,ge.offset,fe.offset,pe),_e=U(he,be.start.offset,be.end.offset,pe),ke=C(_e.start);ke.isEqual(_e.start)||_e.end.offset--;const we=C(_e.end);return new ie.a(ke,we)}function M(me){let pe=me.parent;for(;!J(pe);){if(!pe)return;pe=pe.parent}return pe}function D(me,pe=!1){const ge=me.start,fe=me.end;if(Q(me),me.isCollapsed){const ke=q(me.start,pe);return new ie.a(ke,ke)}const he=q(fe,pe),be=he.parent.childCount,_e=q(ge,pe);return he.offset+=he.parent.childCount-be,new ie.a(_e,he)}function q(me,pe=!1){const ge=me.offset,fe=me.parent;if(me.parent.is('emptyElement'))throw new se.a('view-writer-cannot-break-empty-element');if(me.parent.is('uiElement'))throw new se.a('view-writer-cannot-break-ui-element');if(!pe&&fe.is('text')&&J(fe.parent))return X.a.createFromPosition(me);if(J(fe))return X.a.createFromPosition(me);if(fe.is('text'))return q(K(me),pe);const he=fe.childCount;if(ge==he){const be=new X.a(fe.parent,fe.index+1);return q(be,pe)}if(0===ge){const be=new X.a(fe.parent,fe.index);return q(be,pe)}const be=fe.index+1,_e=fe.clone();fe.parent.insertChildren(be,_e);const ke=fe.childCount-ge,we=fe.removeChildren(ge,ke);_e.appendChildren(we);const ye=new X.a(fe.parent,be);return q(ye,pe)}function z(me,pe,ge,fe){let he=pe;const be=[];for(;hepe instanceof ge))throw new se.a('view-writer-insert-invalid-node');pe.is('text')||Z(pe.getChildren())}}function J(me){return me&&(me.is('containerElement')||me.is('documentFragment'))}function Q(me){const pe=M(me.start),ge=M(me.end);if(!pe||!ge||pe!==ge)throw new se.a('view-writer-invalid-range-container')}var X=f(26),ee=f(44),te=f(116),ae=f(170),ne=f(174),oe=f(31),ie=f(45),re=f(54),se=f(0),le=f(117),de=f(48);u.a={breakAttributes:function(me){return me instanceof X.a?q(me):D(me)},breakContainer:function(me){const pe=me.parent;if(!pe.is('containerElement'))throw new se.a('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!pe.parent)throw new se.a('view-writer-break-root: Trying to break root element.');if(me.isAtStart)return X.a.createBefore(pe);if(!me.isAtEnd){const ge=pe.clone(!1);E(X.a.createAfter(pe),ge);const fe=new ie.a(me,X.a.createAt(pe,'end')),he=new X.a(ge,0);R(fe,he)}return X.a.createAfter(pe)},mergeAttributes:C,mergeContainers:function(me){const pe=me.nodeBefore,ge=me.nodeAfter;if(!pe||!ge||!pe.is('containerElement')||!ge.is('containerElement'))throw new se.a('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const fe=pe.getChild(pe.childCount-1),he=fe instanceof oe.a?X.a.createAt(fe,'end'):X.a.createAt(pe,'end');return R(ie.a.createIn(ge),X.a.createAt(pe,'end')),S(ie.a.createOn(ge)),he},insert:E,remove:S,clear:function(me,pe){Q(me);const ge=me.getWalker({direction:'backward',ignoreElementEnd:!0});for(const fe of ge){const he=fe.item;let be;if(he.is('element')&&pe.isSimilar(he))be=ie.a.createOn(he);else if(!fe.nextPosition.isAfter(me.start)&&(he.is('text')||he.is('textProxy'))){const _e=he.getAncestors().find((ke)=>{return ke.is('element')&&pe.isSimilar(ke)});_e&&(be=ie.a.createIn(_e))}be&&(be.end.isAfter(me.end)&&(be.end=me.end),be.start.isBefore(me.start)&&(be.start=me.start),S(be))}},move:R,wrap:V,wrapPosition:function(me,pe){if(!(pe instanceof te.a))throw new se.a('view-writer-wrap-invalid-attribute');if(pe.isSimilar(me.parent))return $(X.a.createFromPosition(me));me.parent.is('text')&&(me=K(me));const ge=new te.a;ge.priority=_NumberPOSITIVE_INFINITY,ge.isSimilar=()=>!1,me.parent.insertChildren(me.offset,ge);const fe=new ie.a(me,me.getShiftedBy(1));V(fe,pe);const he=new X.a(ge.parent,ge.index);ge.remove();const be=he.nodeBefore,_e=he.nodeAfter;return be instanceof oe.a&&_e instanceof oe.a?W(be,_e):$(he)},unwrap:function(me,pe){if(!(pe instanceof te.a))throw new se.a('view-writer-unwrap-invalid-attribute');if(Q(me),me.isCollapsed)return me;if(me.end.isEqual(me.start.getShiftedBy(1))){const we=me.start.nodeAfter;if(!pe.isSimilar(we)&&we instanceof te.a&&Y(pe,we))return me}const{start:ge,end:fe}=D(me,!0),he=ge.parent,be=z(he,ge.offset,fe.offset,pe),_e=C(be.start);_e.isEqual(be.start)||be.end.offset--;const ke=C(be.end);return new ie.a(_e,ke)},rename:function(me,pe){const ge=new ee.a(pe,me.getAttributes());return E(X.a.createAfter(me),ge),R(ie.a.createIn(me),X.a.createAt(ge)),S(ie.a.createOn(me)),ge},breakViewRangePerContainer:function(me){const pe=[],ge=new re.a({boundaries:me});let fe=me.start;for(let he of ge)he.item.is('containerElement')&&(fe.isEqual(he.previousPosition)||pe.push(new ie.a(fe,he.previousPosition)),fe=he.nextPosition);return pe.push(new ie.a(fe,me.end)),pe}};const ue=[oe.a,te.a,ee.a,ae.a,ne.a]},function(r,u,f){'use strict';var h=f(7),w=f(0),C=f(72),T=f(4);class P{constructor(E){this._items=[],this._itemMap=new Map,this._idProperty=E&&E.idProperty||'id',this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap}get length(){return this._items.length}add(E,S){let O;const R=this._idProperty;if(R in E){if(O=E[R],'string'!=typeof O)throw new w.a('collection-add-invalid-id');if(this.get(O))throw new w.a('collection-add-item-already-exists')}else E[R]=O=f.i(C.a)();if(void 0===S)S=this._items.length;else if(S>this._items.length||0>S)throw new w.a('collection-add-item-invalid-index');return this._items.splice(S,0,E),this._itemMap.set(O,E),this.fire('add',E,S),this}get(E){let S;if('string'==typeof E)S=this._itemMap.get(E);else if('number'==typeof E)S=this._items[E];else throw new w.a('collection-get-invalid-arg: Index or id must be given.');return S||null}getIndex(E){let S;return S='string'==typeof E?this._itemMap.get(E):E,this._items.indexOf(S)}remove(E){let V=!1,S,O,R;const F=this._idProperty;if('string'==typeof E?(O=E,R=this._itemMap.get(O),V=!R,R&&(S=this._items.indexOf(R))):'number'==typeof E?(S=E,R=this._items[S],V=!R,R&&(O=R[F])):(R=E,O=R[F],S=this._items.indexOf(R),V=-1==S||!this._itemMap.get(O)),V)throw new w.a('collection-remove-404: Item not found.');this._items.splice(S,1),this._itemMap.delete(O);const I=this._bindToInternalToExternalMap.get(R);return this._bindToInternalToExternalMap.delete(R),this._bindToExternalToInternalMap.delete(I),this.fire('remove',R),R}map(E,S){return this._items.map(E,S)}find(E,S){return this._items.find(E,S)}filter(E,S){return this._items.filter(E,S)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(E){if(this._bindToCollection)throw new w.a('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=E,{as:(S)=>{this._setUpBindToBinding((O)=>new S(O))},using:(S)=>{'function'==typeof S?this._setUpBindToBinding((O)=>S(O)):this._setUpBindToBinding((O)=>O[S])}}}_setUpBindToBinding(E){const S=this._bindToCollection,O=(R,V,F)=>{const I=S._bindToCollection==this,N=S._bindToInternalToExternalMap.get(V);if(I&&N)this._bindToExternalToInternalMap.set(V,N),this._bindToInternalToExternalMap.set(N,V);else{const M=E(V);this._bindToExternalToInternalMap.set(V,M),this._bindToInternalToExternalMap.set(M,V),this.add(M,F)}};for(let R of S)O(null,R);this.listenTo(S,'add',O),this.listenTo(S,'remove',(R,V)=>{const F=this._bindToExternalToInternalMap.get(V);F&&this.remove(F)})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}u.a=P,f.i(T.a)(P,h.a)},function(r,u,f){'use strict';function h(R){return R['data-ck-expando']||(R['data-ck-expando']=f.i(T.a)())}function w(R){return R&&f.i(E.a)(R.addEventListener)}var C=f(7),T=f(72),P=f(50),E=f(238);const S=f.i(P.a)({},C.a,{listenTo(...R){const V=R[0];w(V)&&(R[0]=this._getProxyEmitter(V)||new O(V)),C.a.listenTo.apply(this,R)},stopListening(...R){const V=R[0];if(w(V)){let F=this._getProxyEmitter(V);if(!F)return;R[0]=F}C.a.stopListening.apply(this,R)},_getProxyEmitter(R){return f.i(C.b)(this,h(R))}});u.a=S;class O{constructor(R){f.i(C.c)(this,h(R)),this._domNode=R}}f.i(P.a)(O.prototype,C.a,{on(R,V,F={}){if(C.a.on.apply(this,arguments),!(this._domListeners&&this._domListeners[R])){const I=this._createDomListener(R,!!F.useCapture);this._domNode.addEventListener(R,I,!!F.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[R]=I}},off(R){C.a.off.apply(this,arguments);let V;!this._domListeners[R]||(V=this._events[R])&&V.callbacks.length||this._domListeners[R].removeListener()},_createDomListener(R,V){const F=(I)=>{this.fire(R,I)};return F.removeListener=()=>{this._domNode.removeEventListener(R,F,V),delete this._domListeners[R]},F}})},function(r,u,f){'use strict';function h(S){var O=-1,R=S?S.length:0;for(this.clear();++O>>1){for(;V>>1,N=S[I];null!==N&&!f.i(T.a)(N)&&(R?N<=O:N{const G=$ instanceof M.a?$.clone(!0):$(W,H,Y);if(G&&H.consume(W.item,'insert')){const Z=Y.mapper.toViewPosition(W.range.start);Y.mapper.bindElements(W.item,G),U.a.insert(Z,G)}}},u.j=function(){return($,K,W,H)=>{if(W.consume(K.item,'insert')){const Y=H.mapper.toViewPosition(K.range.start),G=new D.a(K.item.data);U.a.insert(Y,G)}}},u.f=function($){return(K,W,H,Y)=>{let G,Z;if(($ instanceof M.a?(G=$.clone(!0),Z=$.clone(!0)):(W.isOpening=!0,G=$(W,H,Y),W.isOpening=!1,Z=$(W,H,Y)),G&&Z)&&H.consume(W.range,'addMarker')){const J=Y.mapper;U.a.insert(J.toViewPosition(W.range.start),G),W.range.isCollapsed||U.a.insert(J.toViewPosition(W.range.end),Z)}}},u.h=function($){return $=$||((K,W)=>({value:K,key:W})),(K,W,H,Y)=>{if(H.consume(W.item,N(K.name))){const{key:G,value:Z}=$(W.attributeNewValue,W.attributeKey,W,H,Y);Y.mapper.toViewElement(W.item).setAttribute(G,Z)}}},u.i=function($){return $=$||((K,W)=>({key:W})),(K,W,H,Y)=>{if(H.consume(W.item,N(K.name))){const{key:G}=$(W.attributeOldValue,W.attributeKey,W,H,Y);Y.mapper.toViewElement(W.item).removeAttribute(G)}}},u.b=function($){return(K,W,H,Y)=>{const G=$ instanceof M.a?$.clone(!0):$(W.attributeNewValue,W,H,Y);if(!G)return;if(!H.consume(W.item,N(K.name)))return;let Z=Y.mapper.toViewRange(W.range);if(null!==W.attributeOldValue&&!($ instanceof M.a)){const J=$(W.attributeOldValue,W,H,Y);Z=U.a.unwrap(Z,J)}U.a.wrap(Z,G)}},u.c=function($){return(K,W,H,Y)=>{const G=$ instanceof M.a?$.clone(!0):$(W.attributeOldValue,W,H,Y);if(G&&H.consume(W.item,N(K.name))){const Z=Y.mapper.toViewRange(W.range);U.a.unwrap(Z,G)}}},u.d=function($){return(K,W,H,Y)=>{const G=$ instanceof M.a?$.clone(!0):$(W,H,Y);if(G&&H.consume(W.range,'addMarker')){const Z=Y.mapper.toViewRange(W.range),J=U.a.breakViewRangePerContainer(Z);for(let Q of J)U.a.wrap(Q,G)}}},u.e=function($){return(K,W,H,Y)=>{const G=$ instanceof M.a?$.clone(!0):$(W,H,Y);if(G&&H.consume(W.range,'removeMarker')){const Z=Y.mapper.toViewRange(W.range),J=U.a.breakViewRangePerContainer(Z);for(let Q of J)U.a.unwrap(Q,G)}}},u.k=function(){return($,K,W,H)=>{if(!W.consume(K.item,'remove'))return;const Y=H.mapper.toViewPosition(K.sourcePosition);let G;if(K.item.is('element'))G=q.a.createOn(Y.nodeAfter);else{const Z=F(Y,K.item.offsetSize);G=new q.a(Y,Z)}U.a.remove(G.getTrimmed()),'$graveyard'==K.item.root.rootName&&H.mapper.unbindModelElement(K.item)}},u.g=function($){return(K,W,H,Y)=>{let G,Z;if(($ instanceof M.a?(G=$.clone(!0),Z=$.clone(!0)):(W.isOpening=!0,G=$(W,H,Y),W.isOpening=!1,Z=$(W,H,Y)),G&&Z)&&H.consume(W.range,'removeMarker')){const J=Y.mapper.toViewRange(W.range);U.a.clear(J.getEnlarged(),Z),G.isSimilar(Z)||U.a.clear(J.getEnlarged(),G)}}}},function(r,u,f){'use strict';var h=f(20),w=f(106),C=f(17),T=f(42),P=f(16),E=f(18),S=f(35),O=f(3),R=f(1);class V extends h.a{get type(){return'insert'}get position(){return this._insertOperation?this._insertOperation.position:null}get nodes(){return this._insertOperation?this._insertOperation.nodes:null}get _insertOperation(){return this.operations[0]||null}get _reverseDeltaClass(){return w.a}static get className(){return'engine.model.delta.InsertDelta'}static get _priority(){return 20}}u.a=V,f.i(P.b)('insert',function(F,I){const N=f.i(E.b)(I);if(0===N.length)return this;const M=new V,D=new T.a(F,N,this.document.version);if(this.addDelta(M),M.addOperation(D),this.document.applyOperation(D),I instanceof S.a)for(const[q,z]of I.markers){const U=R.a.createAt(z.root),$=new O.a(z.start._getCombined(U,F),z.end._getCombined(U,F));this.setMarker(q,$)}return this}),C.a.register(V)},function(r,u,f){'use strict';var h=f(20),w=f(17),C=f(107),T=f(16),P=f(1),E=f(5),S=f(43),O=f(30),R=f(0);class V extends h.a{get type(){return'merge'}get position(){return this._removeOperation?this._removeOperation.sourcePosition:null}getReversed(){let F=super.getReversed();return 0q._priority)||!(D._priority{return q+z.operations.length},0)}function R(D,q){const z=D[D.length-1];let U=z.operations.length+z.baseVersion,$=new V.a;for(let K=0;K{S.has(R)&&w.call(this,R,I,V.range,V.sourcePosition)},{priority:'high'})}function w(S,O,R,V){const F=R.end.offset-R.start.offset;let I=R.start;'move'==S&&(I=I._getTransformedByInsertion(V,F));const N=this._getTransformedByDocumentChange(S,O,I,F,V);'move'==S&&3==N.length&&(N[2]=R);const M=C.a.createFromRanges(N);if(!M.isEqual(this)){const D=C.a.createFromRange(this);this.start=M.start,this.end=M.end,this.fire('change',D)}}var C=f(3),T=f(7),P=f(4);class E extends C.a{constructor(S,O){super(S,O),h.call(this)}detach(){this.stopListening()}}u.a=E,f.i(P.a)(E,T.a)},function(r,u,f){'use strict';var h=f(36),w=f(3);class C extends h.a{constructor(T,P,E,S,O){super(O),this.name=T,this.oldRange=P?w.a.createFromRange(P):null,this.newRange=E?w.a.createFromRange(E):null,this._markers=S}get type(){return'marker'}clone(){return new C(this.name,this.oldRange,this.newRange,this._markers,this.baseVersion)}getReversed(){return new C(this.name,this.newRange,this.oldRange,this._markers,this.baseVersion+1)}_execute(){const T=this.newRange?'set':'remove';return this._markers[T](this.name,this.newRange),{name:this.name,type:T}}toJSON(){const T=super.toJSON();return delete T._markers,T}static get className(){return'engine.model.operation.MarkerOperation'}static fromJSON(T,P){return new C(T.name,T.oldRange?w.a.fromJSON(T.oldRange,P):null,T.newRange?w.a.fromJSON(T.newRange,P):null,P.markers,T.baseVersion)}}u.a=C},function(r,u,f){'use strict';var h=f(30),w=f(43);class C extends h.a{get position(){return this.targetPosition}set position(T){this.targetPosition=T}get type(){return'reinsert'}getReversed(){const T=new w.a(this.targetPosition,this.howMany,this.baseVersion+1);return T.targetPosition=this.sourcePosition,T._needsHolderElement=!1,T}static get className(){return'engine.model.operation.ReinsertOperation'}}u.a=C},function(r,u,f){'use strict';var h=f(36),w=f(5),C=f(0),T=f(1);class P extends h.a{constructor(E,S,O,R){super(R),this.position=E,this.oldName=S,this.newName=O}get type(){return'rename'}clone(){return new P(T.a.createFromPosition(this.position),this.oldName,this.newName,this.baseVersion)}getReversed(){return new P(T.a.createFromPosition(this.position),this.newName,this.oldName,this.baseVersion+1)}_execute(){const E=this.position.nodeAfter;if(!(E instanceof w.a))throw new C.a('rename-operation-wrong-position: Given position is invalid or node after it is not an instance of Element.');else if(E.name!==this.oldName)throw new C.a('rename-operation-wrong-name: Element to change has different name than operation\'s old name.');return this.oldName==this.newName?void 0:(E.name=this.newName,{element:E,oldName:this.oldName})}static get className(){return'engine.model.operation.RenameOperation'}static fromJSON(E,S){return new P(T.a.fromJSON(E.position,S),E.oldName,E.newName,E.baseVersion)}}u.a=P},function(r,u,f){'use strict';var h=f(36),w=f(0);class C extends h.a{constructor(T,P,E,S,O){super(O),this.root=T,this.key=P,this.oldValue=E,this.newValue=S}get type(){return null===this.oldValue?'addRootAttribute':null===this.newValue?'removeRootAttribute':'changeRootAttribute'}clone(){return new C(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new C(this.root,this.key,this.newValue,this.oldValue,this.baseVersion+1)}_execute(){if(null!==this.oldValue&&this.root.getAttribute(this.key)!==this.oldValue)throw new w.a('rootattribute-operation-wrong-old-value: Changed node has different attribute value than operation\'s old attribute value.',{root:this.root,key:this.key});if(null===this.oldValue&&null!==this.newValue&&this.root.hasAttribute(this.key))throw new w.a('rootattribute-operation-attribute-exists: The attribute with given key already exists.',{root:this.root,key:this.key});return null===this.newValue?this.root.removeAttribute(this.key):this.root.setAttribute(this.key,this.newValue),{root:this.root,key:this.key,oldValue:this.oldValue,newValue:this.newValue}}static get className(){return'engine.model.operation.RootAttributeOperation'}static fromJSON(T,P){if(!P.hasRoot(T.root))throw new w.a('rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',{rootName:T});return new C(P.getRoot(T.root),T.key,T.oldValue,T.newValue,T.baseVersion)}}u.a=C},function(r,u,f){'use strict';function h(){if(this.childCount)return null;let P=this.parent;for(;P&&P.is('attributeElement');){if(1'string'==typeof O?new w.a(O):O))}var w=f(31),C=f(4),T=f(48),P=f(7);class E{constructor(S){this._children=[],S&&this.insertChildren(0,S)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(S){return'documentFragment'==S}appendChildren(S){return this.insertChildren(this.childCount,S)}getChild(S){return this._children[S]}getChildIndex(S){return this._children.indexOf(S)}getChildren(){return this._children[Symbol.iterator]()}insertChildren(S,O){this._fireChange('children',this);let R=0;O=h(O);for(let V of O)V.parent=this,this._children.splice(S,0,V),S++,R++;return R}removeChildren(S,O=1){this._fireChange('children',this);for(let R=S;R{this[P](),R()})}}get first(){return this.focusables.find(h)||null}get last(){return this.focusables.filter(h).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let T=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((P,E)=>{const S=P.element===this.focusTracker.focusedElement;return S&&(T=E),S}),T)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(T){T&&T.focus()}_getFocusableItem(T){let P=this.current;const E=this.focusables.length;if(!E)return null;if(null===P)return this[1===T?'first':'last'];let S=(P+E+T)%E;do{let O=this.focusables.get(S);if(h(O))return O;S=(S+E+T)%E}while(S!==P);return null}}u.a=C},function(r,u,f){'use strict';function h(S){return S.every((O)=>'string'==typeof O)}var w=f(0),C=f(33),T=f(80),P=f(4);class E extends T.a{constructor(S){super({idProperty:'viewUid'}),this.on('add',(O,R,V)=>{R.element&&this._parentElement&&this._parentElement.insertBefore(R.element,this._parentElement.children[V])}),this.on('remove',(O,R)=>{R.element&&this._parentElement&&R.element.remove()}),this.locale=S,this.set('ready',!1),this._parentElement=null,this._addPromises=new Set}init(){if(this.ready)throw new w.a('ui-viewcollection-init-reinit: This ViewCollection has already been initialized.');return Promise.all(this.map((S)=>S.init())).then(()=>{this.ready=!0})}destroy(){return Promise.all(this._addPromises).then(()=>{return Promise.all(this.map((S)=>S.destroy()))})}add(S,O){super.add(S,O);let R=Promise.resolve();return this.ready&&!S.ready&&(R=R.then(()=>S.init()).then(()=>this._addPromises.delete(R)),this._addPromises.add(R)),R}setParent(S){this._parentElement=S}delegate(...S){if(!S.length||!h(S))throw new w.a('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(O)=>{for(let R of this)for(let V of S)R.delegate(V).to(O);this.on('add',(R,V)=>{for(let F of S)V.delegate(F).to(O)}),this.on('remove',(R,V)=>{for(let F of S)V.stopDelegating(F,O)})}}}}u.a=E,f.i(P.a)(T.a,C.a)},function(r,u,f){'use strict';function h(P,E){let S=w([P],E);S.sort((O,R)=>O.start.isBefore(R.start)?-1:1);for(let O=1;ON.start.root!=O.graveyard);I&&R.push(I)}R.length&&O.selection.setRanges(R,E)}}u.a=T},function(r,u,f){'use strict';function h(S){var O=-1,R=S?S.length:0;for(this.clear();++O=R||0>ae||X&&ne>=H}function D(){var te=f.i(C.a)();return M(te)?q(te):void(G=setTimeout(D,N(te)))}function q(te){return(clearTimeout(G),G=void 0,ee&&K)?F(te):(K=W=void 0,Y)}function $(){var te=f.i(C.a)(),ae=M(te);if(K=arguments,W=this,Z=te,ae){if(void 0===G)return I(Z);if(X)return clearTimeout(G),G=setTimeout(D,R),F(Z)}return void 0===G&&(G=setTimeout(D,R)),Y}var Z=0,J=0,Q=!1,X=!1,ee=!0,K,W,H,Y,G;if('function'!=typeof O)throw new TypeError('Expected a function');return R=f.i(T.a)(R)||0,f.i(w.a)(V)&&(Q=!!V.leading,X='maxWait'in V,H=X?_Mathmax(f.i(T.a)(V.maxWait)||0,R):H,ee='trailing'in V?!!V.trailing:ee),$.cancel=function(){void 0!==G&&clearTimeout(G),Z=J=0,K=W=G=void 0},$.flush=function(){return void 0===G?Y:q(f.i(C.a)())},$}},function(r,u,f){'use strict';var w=f(38),C=f(15);u.a=function(T,P,E){var S=T?T.length:0;return S?(P=E||void 0===P?1:f.i(C.a)(P),f.i(w.a)(T,0>P?0:P,S)):[]}},function(r,u,f){'use strict';var w=f(38),C=f(15);u.a=function(T,P,E){var S=T?T.length:0;return S?(P=E||void 0===P?1:f.i(C.a)(P),P=S-P,f.i(w.a)(T,0,0>P?0:P)):[]}},function(r,u){'use strict';u.a=function(w){return w&&w.length?w[0]:void 0}},function(r,u,f){'use strict';var w=f(13),T=Object.prototype,P=T.hasOwnProperty,E=T.toString,S=T.propertyIsEnumerable;u.a=function(O){return f.i(w.a)(O)&&P.call(O,'callee')&&(!S.call(O,'callee')||E.call(O)=='[object Arguments]')}},function(r,u,f){'use strict';var w=f(14),P=Object.prototype,E=P.toString;u.a=function(S){var O=f.i(w.a)(S)?E.call(S):'';return O=='[object Function]'||O=='[object GeneratorFunction]'}},function(r,u,f){'use strict';var w=f(12),C=f(51),P=Object.prototype,E=P.toString;u.a=function(S){return'string'==typeof S||!f.i(w.a)(S)&&f.i(C.a)(S)&&E.call(S)=='[object String]'}},function(r,u,f){'use strict';var w=f(132);u.a=function(C,T){return C&&C.length&&T&&T.length?f.i(w.a)(C,T):C}},function(r,u,f){'use strict';var w=f(197),C=f(27),T=f(100);u.a=function(P,E){if(!(P&&P.length))return[];var S=f.i(T.a)(P);return null==E?S:f.i(C.a)(S,function(O){return f.i(w.a)(E,void 0,O)})}},function(r,u,f){'use strict';var w=f(99),C=f(277);u.a=function(T){return f.i(w.a)(T)?f.i(C.a)(T):new Map(T)}},function(r,u){'use strict';function C(F,I){F.setCustomProperty(O,I)}function E(){return null}u.b=function(F){return!!F.getCustomProperty(S)},u.a=function(F,I){return I=I||{},F.setAttribute('contenteditable',!1),F.getFillerOffset=E,F.addClass(R),F.setCustomProperty(S,!0),I.label&&C(F,I.label),F},u.e=function(F){const I=F.getCustomProperty(O);return I?'function'==typeof I?I():I:''},u.c=function(F){return F.setAttribute('contenteditable','true'),F.addClass('ck-editable'),F.on('change:isFocused',(I,N,M)=>{M?F.addClass('ck-editable_focused'):F.removeClass('ck-editable_focused')}),F};const S=Symbol('isWidget'),O=Symbol('label'),R='ck-widget';u.d='ck-widget_selected'},function(r,u,f){'use strict';var h=f(6),w=f(2),C=f(188),T=f(46),P=f(177);class E extends w.a{static get pluginName(){return'image/imagetoolbar'}constructor(S){super(S),this.isEnabled=!0}afterInit(){const S=this.editor,O=S.config.get('image.toolbar');if(O&&O.length){const R=this._panel=new P.a(S),V=[],F=new C.a;return h.a.extend(F.template,{attributes:{class:'ck-editor-toolbar'}}),h.a.extend(R.template,{attributes:{class:['ck-toolbar-container']}}),V.push(R.content.add(F)),V.push(F.fillFromConfig(O,S.ui.componentFactory)),V.push(S.ui.view.body.add(R)),this.listenTo(this.editor.editing.view,'render',()=>{this.isEnabled&&this.show()},{priority:'low'}),this.listenTo(S.ui.focusTracker,'change:isFocused',(I,N,M,D)=>{!D&&M&&this.isEnabled&&this.show()}),Promise.all(V)}}show(){const S=this.editor.editing.view.selection.getSelectedElement();S&&f.i(T.a)(S)&&this._panel.attach()}hide(){this._panel.detach()}}u.a=E},function(r){var f=function(){return this}();try{f=f||Function('return this')()||(1,eval)('this')}catch(h){'object'==typeof window&&(f=window)}r.exports=f},function(r){r.exports=function(f){if(!f.webpackPolyfill){var h=Object.create(f);h.children||(h.children=[]),Object.defineProperty(h,'loaded',{enumerable:!0,get:function(){return h.l}}),Object.defineProperty(h,'id',{enumerable:!0,get:function(){return h.i}}),Object.defineProperty(h,'exports',{enumerable:!0}),h.webpackPolyfill=1}return h}},function(r,u,f){'use strict';var h=f(2),w=f(41),C=f(34),T=f(160);const P='bold';class E extends h.a{init(){const S=this.editor,O=S.data,R=S.editing;S.document.schema.allow({name:'$inline',attributes:[P],inside:'$block'}),f.i(w.a)().for(O.modelToView,R.modelToView).fromAttribute(P).toElement('strong'),f.i(C.a)().for(O.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{'font-weight':'bold'}).toAttribute(P,!0),S.commands.set(P,new T.a(S,P))}}u.a=E},function(r,u,f){'use strict';var h=f(2),w=f(41),C=f(34),T=f(160);const P='italic';class E extends h.a{init(){const S=this.editor,O=S.data,R=S.editing;S.document.schema.allow({name:'$inline',attributes:[P],inside:'$block'}),f.i(w.a)().for(O.modelToView,R.modelToView).fromAttribute(P).toElement('em'),f.i(C.a)().for(O.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{'font-style':'italic'}).toAttribute(P,!0),S.commands.set(P,new T.a(S,P))}}u.a=E},function(r,u,f){'use strict';var w=f(37);u.a=function(C,T,P){if(T.isCollapsed)return P.check({name:'$text',inside:T.getFirstPosition(),attributes:C});const E=T.getRanges();for(let S of E){const O=new w.a({boundaries:S,mergeCharacters:!0});for(let R=O.position,V=O.next();!V.done;){const F=V.value.item.name||'$text';if(P.check({name:F,inside:R,attributes:C}))return!0;R=O.position,V=O.next()}}return!1}},function(r,u,f){'use strict';var h=f(11),w=f(101),C=f(159);class T extends h.a{constructor(P,E){super(P),this.attributeKey=E,this.set('value',!1),this.listenTo(this.editor.document.selection,'change:attribute',()=>{this.value=this.editor.document.selection.hasAttribute(this.attributeKey)})}_checkEnabled(){const P=this.editor.document;return f.i(C.a)(this.attributeKey,P.selection,P.schema)}_doExecute(P={}){const E=this.editor.document,S=E.selection,O=P.forceValue===void 0?!this.value:P.forceValue;E.enqueueChanges(()=>{if(S.isCollapsed)O?S.setAttribute(this.attributeKey,!0):S.removeAttribute(this.attributeKey);else{const R=f.i(w.a)(this.attributeKey,S.getRanges(),E.schema),V=P.batch||E.batch();for(let F of R)O?V.setAttribute(F,this.attributeKey,O):V.removeAttribute(F,this.attributeKey)}})}}u.a=T},function(r,u,f){'use strict';var h=f(1),w=f(3),C=f(26),T=f(45),P=f(31),E=f(7),S=f(4);class O{constructor(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap,this._viewToModelLengthCallbacks=new Map,this.on('modelToViewPosition',(R,V)=>{if(!V.viewPosition){let F=this._modelToViewMapping.get(V.modelPosition.parent);V.viewPosition=this._findPositionIn(F,V.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(R,V)=>{if(V.modelPosition)return;let F=V.viewPosition.parent,I=this._viewToModelMapping.get(F);for(;!I;)F=F.parent,I=this._viewToModelMapping.get(F);let N=this._toModelOffset(V.viewPosition.parent,V.viewPosition.offset,F);V.modelPosition=h.a.createFromParentAndOffset(I,N)},{priority:'low'})}bindElements(R,V){this._modelToViewMapping.set(R,V),this._viewToModelMapping.set(V,R)}unbindViewElement(R){const V=this.toModelElement(R);this._unbindElements(V,R)}unbindModelElement(R){const V=this.toViewElement(R);this._unbindElements(R,V)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap}toModelElement(R){return this._viewToModelMapping.get(R)}toViewElement(R){return this._modelToViewMapping.get(R)}toModelRange(R){return new w.a(this.toModelPosition(R.start),this.toModelPosition(R.end))}toViewRange(R){return new T.a(this.toViewPosition(R.start),this.toViewPosition(R.end))}toModelPosition(R){const V={viewPosition:R,mapper:this};return this.fire('viewToModelPosition',V),V.modelPosition}toViewPosition(R){const V={modelPosition:R,mapper:this};return this.fire('modelToViewPosition',V),V.viewPosition}registerViewToModelLength(R,V){this._viewToModelLengthCallbacks.set(R,V)}_toModelOffset(R,V,F){if(F!=R){const N=this._toModelOffset(R.parent,R.index,F),M=this._toModelOffset(R,V,R);return N+M}if(R.is('text'))return V;let I=0;for(let N=0;N{const D=I.selection;if(!D.isCollapsed&&N.consume(D,'selection')){M.viewSelection.removeAllRanges();for(let q of D.getRanges()){const z=M.mapper.toViewRange(q);M.viewSelection.addRange(z,D.isBackward)}}}},u.f=function(){return(F,I,N,M)=>{const D=I.selection;if(D.isCollapsed&&N.consume(D,'selection')){const q=D.getFirstPosition(),z=M.mapper.toViewPosition(q),U=V.a.breakAttributes(z);M.viewSelection.removeAllRanges(),M.viewSelection.addRange(new R.a(U,U))}}},u.a=function(F){return(I,N,M,D)=>{const q=F instanceof O.a?F.clone(!0):F(N.value,N,N.selection,M,D);if(q){const z='selectionAttribute:'+N.key;P(N.selection,D.viewSelection,q,M,z)}}},u.b=function(F){return(I,N,M,D)=>{const q=F instanceof O.a?F.clone(!0):F(N,M,D);if(q){const z='selectionMarker:'+N.name;P(N.selection,D.viewSelection,q,M,z)}}},u.c=function(){return(F,I,N,M)=>{for(let D of M.viewSelection.getRanges())D.isCollapsed&&D.end.parent.document&&V.a.mergeAttributes(D.start);M.viewSelection.removeAllRanges()}},u.d=function(){return(F,I,N,M)=>M.viewSelection.setFake(!1)}},function(r,u,f){'use strict';var h=f(350),w=f(3),C=f(1),T=f(35),P=f(7),E=f(4),S=f(50);class O{constructor(R,V={}){this._modelDocument=R,this.conversionApi=f.i(S.a)({dispatcher:this},V)}convertChange(R,V){'remove'!==R&&V.range&&'$graveyard'==V.range.root.rootName||'remove'==R&&'$graveyard'==V.sourcePosition.root.rootName||'rename'==R&&'$graveyard'==V.element.root.rootName||('insert'==R||'reinsert'==R?this.convertInsertion(V.range):'move'==R?this.convertMove(V.sourcePosition,V.range):'remove'==R?this.convertRemove(V.sourcePosition,V.range):'addAttribute'==R||'removeAttribute'==R||'changeAttribute'==R?this.convertAttribute(R,V.range,V.key,V.oldValue,V.newValue):'rename'==R&&this.convertRename(V.element,V.oldName))}convertInsertion(R){const V=this._createInsertConsumable(R);for(let F of R){const I=F.item,N=w.a.createFromPositionAndShift(F.previousPosition,F.length),M={item:I,range:N};this._testAndFire('insert',M,V);for(let D of I.getAttributeKeys())M.attributeKey=D,M.attributeOldValue=null,M.attributeNewValue=I.getAttribute(D),this._testAndFire(`addAttribute:${D}`,M,V)}for(let F of this._modelDocument.markers){const I=F.getRange();I.containsPosition(R.start)&&this.convertMarker('addMarker',F.name,I.getIntersection(R)),(R.containsRange(I)||R.isEqual(I))&&this.convertMarker('addMarker',F.name,I)}}convertMove(R,V){if(V.start.isBefore(R)){this.convertInsertion(V);const F=R._getTransformedByInsertion(V.start,V.end.offset-V.start.offset);this.convertRemove(F,V)}else this.convertRemove(R,V),this.convertInsertion(V)}convertRemove(R,V){const F=this._createConsumableForRange(V,'remove');for(let I of V.getItems({shallow:!0})){this._testAndFire(`remove`,{sourcePosition:R,item:I},F)}}convertAttribute(R,V,F,I,N){const M=this._createConsumableForRange(V,R+':'+F);for(let D of V){const q=D.item,z=w.a.createFromPositionAndShift(D.previousPosition,D.length);this._testAndFire(`${R}:${F}`,{item:q,range:z,attributeKey:F,attributeOldValue:I,attributeNewValue:N},M)}}convertRename(R,V){const F=R.clone(!0);F.name=V,this.conversionApi.mapper.bindElements(F,this.conversionApi.mapper.toViewElement(R));const I=new T.a;I.appendChildren(F),this.convertRemove(C.a.createBefore(R),w.a.createOn(F)),this.convertInsertion(w.a.createOn(R))}convertSelection(R){const V=Array.from(this._modelDocument.markers.getMarkersAtPosition(R.getFirstPosition())),F=this._createSelectionConsumable(R,V);this.fire('selection',{selection:R},F,this.conversionApi);for(let I of V){const N={selection:R,name:I.name};F.test(R,'selectionMarker:'+I.name)&&this.fire('selectionMarker:'+I.name,N,F,this.conversionApi)}for(let I of R.getAttributeKeys()){const N={selection:R,key:I,value:R.getAttribute(I)};F.test(R,'selectionAttribute:'+N.key)&&this.fire('selectionAttribute:'+N.key,N,F,this.conversionApi)}}convertMarker(R,V,F){if(F.root.document&&'$graveyard'!=F.root.rootName){const I=this._createMarkerConsumable(R,F);this.fire(R+':'+V,{name:V,range:F},I,this.conversionApi)}}_createInsertConsumable(R){const V=new h.a;for(let F of R){const I=F.item;V.add(I,'insert');for(let N of I.getAttributeKeys())V.add(I,'addAttribute:'+N)}return V}_createConsumableForRange(R,V){const F=new h.a;for(let I of R.getItems())F.add(I,V);return F}_createSelectionConsumable(R,V){const F=new h.a;F.add(R,'selection');for(let I of V)F.add(R,'selectionMarker:'+I.name);for(let I of R.getAttributeKeys())F.add(R,'selectionAttribute:'+I);return F}_createMarkerConsumable(R,V){const F=new h.a;return F.add(V,R),F}_testAndFire(R,V,F){if(F.test(V.item,R)){const I=V.item.name||'$text';this.fire(R+':'+I,V,F,this.conversionApi)}}}u.a=O,f.i(E.a)(O,P.a)},function(r,u,f){'use strict';var h=f(355),w=f(169),C=f(62);u.a=class{constructor(){this._domParser=new DOMParser,this._domConverter=new w.a({blockFiller:C.a}),this._htmlWriter=new h.a}toData(P){const E=this._domConverter.viewToDom(P,document);return this._htmlWriter.getHtml(E)}toView(P){const E=this._toDom(P);return this._domConverter.domToView(E)}_toDom(P){const E=this._domParser.parseFromString(P,'text/html'),S=E.createDocumentFragment(),O=E.body.childNodes;for(;0{R.has(F)&&w.call(this,F,I.range,I.sourcePosition)},{priority:'high'})}function w(R,V,F){let I=V.end.offset-V.start.offset,N;switch(R){case'insert':let M='sticksToNext'==this.stickiness;N=this._getTransformedByInsertion(V.start,I,M);break;case'move':case'remove':case'reinsert':let D=T.a.createFromPositionAndShift(F,I),q=D.containsPosition(this)||D.start.isEqual(this)&&'sticksToNext'==this.stickiness||D.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(q)N=this._getCombined(F,V.start);else{let z='sticksToNext'==this.stickiness;N=this._getTransformedByMove(F,V.start,I,z)}}if(!this.isEqual(N)){const M=C.a.createFromPosition(this);this.path=N.path,this.root=N.root,this.fire('change',M)}}var C=f(1),T=f(3),P=f(7),E=f(4),S=f(0);class O extends C.a{constructor(R,V,F){if(super(R,V),!this.root.is('rootElement'))throw new S.a('model-liveposition-root-not-rootelement: LivePosition root has to be an instance of RootElement.');this.stickiness=F||'sticksToNext',h.call(this)}detach(){this.stopListening()}}u.a=O,f.i(E.a)(O,P.a)},function(r,u,f){'use strict';function h(M,D,q){let z=f.i(F.a)(M);return q&&(z=z.slice(z.indexOf(q)+1)),z.some((U)=>U.tagName&&D.includes(U.tagName.toLowerCase()))}var w=f(31),C=f(25),T=f(26),P=f(45),E=f(64),S=f(117),O=f(54),R=f(62),V=f(434),F=f(191),I=f(431);u.a=class{constructor(M={}){this.blockFiller=M.blockFiller||R.b,this.preElements=['pre'],this.blockElements=['p','div','h1','h2','h3','h4','h5','h6'],this._domToViewMapping=new WeakMap,this._viewToDomMapping=new WeakMap,this._fakeSelectionMapping=new WeakMap}bindFakeSelection(M,D){this._fakeSelectionMapping.set(M,E.a.createFromSelection(D))}fakeSelectionToView(M){return this._fakeSelectionMapping.get(M)}bindElements(M,D){this._domToViewMapping.set(M,D),this._viewToDomMapping.set(D,M)}unbindDomElement(M){const D=this._domToViewMapping.get(M);if(D){this._domToViewMapping.delete(M),this._viewToDomMapping.delete(D);for(let q of Array.from(M.childNodes))this.unbindDomElement(q)}}bindDocumentFragments(M,D){this._domToViewMapping.set(M,D),this._viewToDomMapping.set(D,M)}viewToDom(M,D,q={}){if(M.is('text')){const z=this._processDataFromViewText(M);return D.createTextNode(z)}if(this.getCorrespondingDom(M))return this.getCorrespondingDom(M);let z;if(M.is('documentFragment'))z=D.createDocumentFragment(),q.bind&&this.bindDocumentFragments(z,M);else{z=D.createElement(M.name),q.bind&&this.bindElements(z,M);for(let U of M.getAttributeKeys())z.setAttribute(U,M.getAttribute(U))}if(q.withChildren||void 0===q.withChildren)for(let U of this.viewChildrenToDom(M,D,q))z.appendChild(U);return z}*viewChildrenToDom(M,D,q={}){let z=M.getFillerOffset&&M.getFillerOffset(),U=0;for(let $ of M.getChildren())z===U&&(yield this.blockFiller(D)),yield this.viewToDom($,D,q),U++;z===U&&(yield this.blockFiller(D))}viewRangeToDom(M){const D=this.viewPositionToDom(M.start),q=this.viewPositionToDom(M.end),z=document.createRange();return z.setStart(D.parent,D.offset),z.setEnd(q.parent,q.offset),z}viewPositionToDom(M){const D=M.parent;if(D.is('text')){const q=this.getCorrespondingDomText(D);if(!q)return null;let z=M.offset;return f.i(R.c)(q)&&(z+=R.d),{parent:q,offset:z}}let q,z,U;if(0===M.offset){if(q=this.getCorrespondingDom(M.parent),!q)return null;U=q.childNodes[0]}else{if(z=this.getCorrespondingDom(M.nodeBefore),!z)return null;q=z.parentNode,U=z.nextSibling}if(this.isText(U)&&f.i(R.c)(U))return{parent:U,offset:R.d};const $=z?f.i(V.a)(z)+1:0;return{parent:q,offset:$}}domToView(M,D={}){if(f.i(R.e)(M,this.blockFiller))return null;if(this.isText(M)){if(f.i(R.f)(M))return null;const q=this._processDataFromDomText(M);return''===q?null:new w.a(q)}if(this.isComment(M))return null;if(this.getCorrespondingView(M))return this.getCorrespondingView(M);let q;if(this.isDocumentFragment(M))q=new S.a,D.bind&&this.bindDocumentFragments(M,q);else{const z=D.keepOriginalCase?M.tagName:M.tagName.toLowerCase();q=new C.a(z),D.bind&&this.bindElements(M,q);const U=M.attributes;for(let $=U.length-1;0<=$;$--)q.setAttribute(U[$].name,U[$].value)}if(D.withChildren||void 0===D.withChildren)for(let z of this.domChildrenToView(M,D))q.appendChildren(z);return q}*domChildrenToView(M,D={}){for(let q=0;qz?0:z),new T.a(q,z)):null}if(0===D){const q=this.getCorrespondingView(M);if(q)return new T.a(q,0)}else{const q=this.getCorrespondingView(M.childNodes[D-1]);if(q&&q.parent)return new T.a(q.parent,q.index+1)}return null}getCorrespondingView(M){if(this.isElement(M))return this.getCorrespondingViewElement(M);return this.isDocumentFragment(M)?this.getCorrespondingViewDocumentFragment(M):this.isText(M)?this.getCorrespondingViewText(M):null}getCorrespondingViewElement(M){return this._domToViewMapping.get(M)}getCorrespondingViewDocumentFragment(M){return this._domToViewMapping.get(M)}getCorrespondingViewText(M){if(f.i(R.f)(M))return null;const D=M.previousSibling;if(D){if(!this.isElement(D))return null;const q=this.getCorrespondingViewElement(D);if(q){const z=q.nextSibling;return z instanceof w.a?q.nextSibling:null}}else{const q=this.getCorrespondingViewElement(M.parentNode);if(q){const z=q.getChild(0);return z instanceof w.a?z:null}}return null}getCorrespondingDom(M){if(M instanceof C.a)return this.getCorrespondingDomElement(M);return M instanceof S.a?this.getCorrespondingDomDocumentFragment(M):M instanceof w.a?this.getCorrespondingDomText(M):null}getCorrespondingDomElement(M){return this._viewToDomMapping.get(M)}getCorrespondingDomDocumentFragment(M){return this._viewToDomMapping.get(M)}getCorrespondingDomText(M){const D=M.previousSibling;return D&&this.getCorrespondingDom(D)?this.getCorrespondingDom(D).nextSibling:!D&&M.parent&&this.getCorrespondingDom(M.parent)?this.getCorrespondingDom(M.parent).childNodes[0]:null}focus(M){const D=this.getCorrespondingDomElement(M);D&&D.ownerDocument.activeElement!==D&&D.focus()}isText(M){return M&&M.nodeType==Node.TEXT_NODE}isElement(M){return M&&M.nodeType==Node.ELEMENT_NODE}isDocumentFragment(M){return M&&M.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(M){return M&&M.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(M){if(M.isCollapsed)return!1;const D=document.createRange();D.setStart(M.anchorNode,M.anchorOffset),D.setEnd(M.focusNode,M.focusOffset);const q=D.collapsed;return D.detach(),q}_processDataFromViewText(M){let D=M.data;if(M.getAncestors().some((K)=>this.preElements.includes(K.name)))return D;const q=this._getTouchingViewTextNode(M,!1),z=this._getTouchingViewTextNode(M,!0);let U=D.match(/ *$/)[0],$=D.substr(0,D.length-U.length);if(q&&' '!=q.data.charAt(q.data.length-1)||($=$.replace(/^ /,'\xA0')),$=$.replace(/ /g,' \xA0'),0{const N=O.document.selection.getFirstPosition().parent,M=I.batch,D=V.some((q)=>N.is(q.modelElement));D&&!N.is(E)&&0===N.childCount&&M.rename(N,E)})}}u.a=S},function(r,u,f){'use strict';function h(){return new O.a('figure',{class:'image'},new R.a('img'))}var w=f(2),C=f(41),T=f(34),P=f(381),E=f(46),S=f(5),O=f(44),R=f(170);class V extends w.a{init(){const F=this.editor,I=F.document,N=I.schema,M=F.data,D=F.editing,q=F.t;N.registerItem('image'),N.requireAttributes('image',['src']),N.allow({name:'image',attributes:['alt','src'],inside:'$root'}),N.objects.add('image'),f.i(C.a)().for(M.modelToView).fromElement('image').toElement(()=>h()),f.i(C.a)().for(D.modelToView).fromElement('image').toElement(()=>f.i(E.c)(h(),q('image widget'))),f.i(P.a)([D.modelToView,M.modelToView],'src'),f.i(P.a)([D.modelToView,M.modelToView],'alt'),f.i(T.a)().for(M.viewToModel).from({name:'img',attribute:{src:/./}}).toElement((z)=>new S.a('image',{src:z.getAttribute('src')})),M.viewToModel.on('element:img',P.b,{priority:'low'}),M.viewToModel.on('element',P.c,{priority:'low'}),f.i(T.a)().for(M.viewToModel).from({name:'img',attribute:{alt:/./}}).consuming({attribute:['alt']}).toAttribute((z)=>({key:'alt',value:z.getAttribute('alt')})),M.viewToModel.on('element:figure',f.i(P.d)())}}u.a=V},function(r,u,f){'use strict';var h=f(535),w=f(47),C=f(187),T=f(46);class P extends C.a{constructor(E){super(E.locale),this.editor=E;const S=E.editing.view;this.listenTo(E.ui.focusTracker,'change:isFocused',(O,R,V,F)=>{F&&!V&&this.detach()}),E.listenTo(S,'render',()=>{const O=S.selection.getSelectedElement();O&&f.i(T.a)(O)||this.detach()},{priority:'low'}),this._throttledAttach=f.i(h.a)(()=>{this._attach()},100)}init(){return this.editor.ui.focusTracker.add(this.element),super.init()}attach(){this._attach(),this.editor.ui.view.listenTo(w.a.window,'scroll',this._throttledAttach),this.editor.ui.view.listenTo(w.a.window,'resize',this._throttledAttach)}detach(){this.hide(),this.editor.ui.view.stopListening(w.a.window,'scroll',this._throttledAttach),this.editor.ui.view.stopListening(w.a.window,'resize',this._throttledAttach)}_attach(){const E=this.editor.editing.view,S=C.a.defaultPositions;this.attachTo({target:E.domConverter.viewToDom(E.selection.getSelectedElement()),positions:[S.northArrowSouth,S.southArrowNorth]})}}u.a=P},function(r,u,f){'use strict';function w(P,E,S){let O=P.textNode||(S?P.nodeBefore:P.nodeAfter),R=null;for(;O&&O.getAttribute('linkHref')==E;)R=O,O=S?O.previousSibling:O.nextSibling;return R?T.a.createAt(R,S?'before':'after'):P}var C=f(3),T=f(1);u.a=function(P,E){return new C.a(w(P,E,!0),w(P,E,!1))}},function(r,u,f){'use strict';var h=f(116);class w extends h.a{}u.a=w},function(r,u,f){'use strict';function h(O){let R=1;for(let V of O.getChildren())if('ul'==V.name||'ol'==V.name)for(let F of V.getChildren())R+=h(F);return R}var w=f(397),C=f(396),T=f(2),P=f(73),E=f(395);class S extends T.a{static get requires(){return[P.a]}init(){const O=this.editor,R=O.document.schema;R.registerItem('listItem','$block'),R.allow({name:'listItem',inside:'$root',attributes:['type','indent']}),R.requireAttributes('listItem',['type','indent']);const V=O.data,F=O.editing;this.editor.document.on('change',f.i(E.a)(this.editor.document),{priority:'high'}),this.editor.document.on('change',(I,N,M)=>{if('move'==N)for(let D of M.range.getItems())D.is('listItem')&&F.mapper.unbindModelElement(D)},{priority:'high'}),F.mapper.registerViewToModelLength('li',h),V.mapper.registerViewToModelLength('li',h),F.mapper.on('modelToViewPosition',E.b),F.mapper.on('viewToModelPosition',E.c),V.mapper.on('modelToViewPosition',E.b),F.modelToView.on('insert',E.d,{priority:'high'}),F.modelToView.on('insert:listItem',E.e),V.modelToView.on('insert',E.d,{priority:'high'}),V.modelToView.on('insert:listItem',E.e),F.modelToView.on('changeAttribute:type:listItem',E.f),V.modelToView.on('changeAttribute:type:listItem',E.f),F.modelToView.on('remove:listItem',E.g),F.modelToView.on('remove',E.h,{priority:'low'}),V.modelToView.on('remove:listItem',E.g),V.modelToView.on('remove',E.h,{priority:'low'}),F.modelToView.on('changeAttribute:indent:listItem',E.i),V.modelToView.on('changeAttribute:indent:listItem',E.i),V.viewToModel.on('element:ul',E.j,{priority:'high'}),V.viewToModel.on('element:ol',E.j,{priority:'high'}),V.viewToModel.on('element:li',E.k,{priority:'high'}),V.viewToModel.on('element:li',E.l),V.on('insertContent',E.m,{priority:'high'}),O.commands.set('numberedList',new w.a(O,'numbered')),O.commands.set('bulletedList',new w.a(O,'bulleted')),O.commands.set('indentList',new C.a(O,'forward')),O.commands.set('outdentList',new C.a(O,'backward'))}}u.a=S},function(r,u,f){'use strict';var h=f(189);class w{constructor(C,T=20){this.document=C,this.size=0,this.limit=T,this.isLocked=!1,this._changeCallback=(P,E,S,O)=>{this._onBatch(O)},this._selectionChangeCallback=()=>{this._reset()},C.on('change',this._changeCallback),C.selection.on('change:range',this._selectionChangeCallback),C.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(C){this.size+=C,this.size>=this.limit&&this._reset(!0)}lock(){this.isLocked=!0}unlock(){this.isLocked=!1}destroy(){this.document.off('change',this._changeCallback),this.document.selection.off('change:range',this._selectionChangeCallback),this.document.selection.off('change:attribute',this._selectionChangeCallback)}_onBatch(C){'transparent'!=C.type&&C!==this._batch&&1>=f.i(h.a)(C.getOperations())&&this._reset(!0)}_reset(C){(!this.isLocked||C)&&(this._batch=null,this.size=0)}}u.a=w},function(r,u){'use strict';u.a=function({emitter:w,activator:C,callback:T,contextElement:P}){w.listenTo(document,'mouseup',(E,{target:S})=>{C()&&!P.contains(S)&&T()})}},function(r,u){'use strict';u.a=function(w){return w.bindTemplate.to((C)=>{C.target===w.element&&C.preventDefault()})}},function(r,u){'use strict';u.a=function({view:w}){w.listenTo(w.element,'submit',(C,T)=>{T.preventDefault(),w.fire('submit')},{useCapture:!0})}},function(r,u,f){'use strict';var h=f(9),w=f(6);class C extends h.a{constructor(T){super(T),this.set('value'),this.set('id');const P=this.bindTemplate;this.template=new w.a({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:P.to('id')}}),this.on('change:value',(E,S,O)=>this.element.value=O||'')}select(){this.element.select()}focus(){this.element.focus()}}u.a=C},function(r,u,f){'use strict';var h=f(9),w=f(6),C=f(72),T=f(417);class P extends h.a{constructor(E,S){super(E);const O=`ck-input-${f.i(C.a)()}`;this.set('label'),this.set('value'),this.labelView=this._createLabelView(O),this.inputView=this._createInputView(S,O),this.template=new w.a({tag:'div',children:[this.labelView,this.inputView]})}_createLabelView(E){const S=new T.a(this.locale);return S.for=E,S.bind('text').to(this,'label'),S}_createInputView(E,S){const O=new E(this.locale);return O.id=S,O.bind('value').to(this),O}select(){this.inputView.select()}focus(){this.inputView.focus()}}u.a=P},function(r,u,f){'use strict';var h=f(9),w=f(6),C=f(436),T=f(192),P=f(237),E=f(193),S=f(183),O=f(47);const R=f.i(E.a)('px'),V=O.a.document.body;class F extends h.a{constructor(I){super(I);const N=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_ne'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.template=new w.a({tag:'div',attributes:{class:['ck-balloon-panel',N.to('position',(M)=>`ck-balloon-panel_${M}`),N.if('isVisible','ck-balloon-panel_visible'),N.if('withArrow','ck-balloon-panel_with-arrow'),N.to('className')],style:{top:N.to('top',R),left:N.to('left',R),maxWidth:N.to('maxWidth',R)}},children:this.content,on:{mousedown:f.i(S.a)(this)}})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(I){this.show();const N=F.defaultPositions,M=Object.assign({},{element:this.element,positions:[N.southEastArrowNorthEast,N.southWestArrowNorthEast,N.northEastArrowSouthWest,N.northWestArrowSouthEast],limiter:V,fitInViewport:!0},I),{top:D,left:q,name:z}=f.i(C.a)(M);Object.assign(this,{top:D,left:q,position:z})}pin(I){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(I):this._stopPinning()},this._startPinning(I),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(I){this.attachTo(I);const N=I.limiter||V;let M=null;f.i(P.a)(I.target)?M=I.target:f.i(T.a)(I.target)&&(M=I.target.commonAncestorContainer),this.listenTo(O.a.document,'scroll',(D,q)=>{(M&&q.target.contains(M)||q.target.contains(N))&&this.attachTo(I)},{useCapture:!0}),this.listenTo(O.a.window,'resize',()=>{this.attachTo(I)})}_stopPinning(){this.stopListening(O.a.document,'scroll'),this.stopListening(O.a.window,'resize')}}u.a=F,F.arrowHorizontalOffset=30,F.arrowVerticalOffset=15,F.defaultPositions={southEastArrowNorthEast:(I)=>({top:I.bottom+F.arrowVerticalOffset,left:I.left+I.width/2-F.arrowHorizontalOffset,name:'arrow_ne'}),southWestArrowNorthEast:(I,N)=>({top:I.bottom+F.arrowVerticalOffset,left:I.left+I.width/2-N.width+F.arrowHorizontalOffset,name:'arrow_nw'}),northEastArrowSouthWest:(I,N)=>({top:I.top-N.height-F.arrowVerticalOffset,left:I.left+I.width/2-F.arrowHorizontalOffset,name:'arrow_se'}),northWestArrowSouthEast:(I,N)=>({top:I.top-N.height-F.arrowVerticalOffset,left:I.left+I.width/2-N.width+F.arrowHorizontalOffset,name:'arrow_sw'}),southEastArrowNorth:(I,N)=>({top:I.bottom+F.arrowVerticalOffset,left:I.right-N.width/2,name:'arrow_n'}),northEastArrowSouth:(I,N)=>({top:I.top-N.height-F.arrowVerticalOffset,left:I.right-N.width/2,name:'arrow_s'}),northWestArrowSouth:(I,N)=>({top:I.top-N.height-F.arrowVerticalOffset,left:I.left-N.width/2,name:'arrow_s'}),southWestArrowNorth:(I,N)=>({top:I.bottom+F.arrowVerticalOffset,left:I.left-N.width/2,name:'arrow_n'}),southArrowNorth:(I,N)=>({top:I.bottom+F.arrowVerticalOffset,left:I.left+I.width/2-N.width/2,name:'arrow_n'}),northArrowSouth:(I,N)=>({top:I.top-N.height-F.arrowVerticalOffset,left:I.left+I.width/2-N.width/2,name:'arrow_s'})}},function(r,u,f){'use strict';var h=f(9),w=f(6),C=f(67),T=f(119),P=f(68),E=f(424),S=f(183);class O extends h.a{constructor(R){super(R),this.items=this.createCollection(),this.focusTracker=new C.a,this.keystrokes=new P.a,this._focusCycler=new T.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.template=new w.a({tag:'div',attributes:{class:['ck-toolbar']},children:this.items,on:{mousedown:f.i(S.a)(this)}}),this.items.on('add',(V,F)=>{this.focusTracker.add(F.element)}),this.items.on('remove',(V,F)=>{this.focusTracker.remove(F.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}fillFromConfig(R,V){return R?Promise.all(R.map((F)=>{const I='|'==F?new E.a:V.create(F);return this.items.add(I)})):Promise.resolve()}}u.a=O},function(r,u){'use strict';u.a=function(w){let C=0;for(let T of w)C++;return C}},function(r,u){'use strict';u.a=function(w,C,T){function P(D){const q=(I[D-1]===void 0?-1:I[D-1])+1,z=I[D+1]===void 0?-1:I[D+1],U=q>z?-1:1;F[D+U]&&(F[D]=F[D+U].slice(0)),F[D]||(F[D]=[]),F[D].push(q>z?E:S);let $=_Mathmax(q,z),K=$-D;for(;KV;M--)I[M]=P(M);I[V]=P(V),N++}while(I[V]!==R);return F[V].slice(1)}},function(r,u){'use strict';u.a=function(w){const C=[];for(;w&&w.nodeType!=Node.DOCUMENT_NODE;)C.unshift(w),w=w.parentNode;return C}},function(r,u){'use strict';u.a=function(w){return'[object Range]'==Object.prototype.toString.apply(w)}},function(r,u){'use strict';u.a=function(w){return(C)=>C+w}},function(r,u,f){'use strict';var h=f(55),w=f(32),C=f.i(h.a)(w.a,'Map');u.a=C},function(r,u,f){'use strict';var h=f(55),w=f(32),C=f.i(h.a)(w.a,'Set');u.a=C},function(r,u,f){'use strict';var h=f(32),w=h.a.Uint8Array;u.a=w},function(r,u){'use strict';u.a=function(w,C,T){var P=T.length;return 0===P?w.call(C):1===P?w.call(C,T[0]):2===P?w.call(C,T[0],T[1]):3===P?w.call(C,T[0],T[1],T[2]):w.apply(C,T)}},function(r,u){'use strict';u.a=function(w,C,T,P){var E=-1,S=w.length;for(P&&S&&(T=w[++E]);++EN))return!1;var D=F.get(E);if(D)return D==S;var q=-1,z=!0,U=V&1?new w.a:void 0;for(F.set(E,S);++qO)return[];for(var F=0,I=0,N=Array(P(V/O));FS&&(S=_Mathmax(O+S,0)),f.i(w.a)(P,E,S)):-1}},function(r,u,f){'use strict';var w=f(145);u.a=function(C){return f.i(w.a)(C,1)}},function(r,u,f){'use strict';var h=f(27),w=f(129),C=f(137),T=f(8),P=f.i(T.a)(function(E){var S=f.i(h.a)(E,C.a);return S.length&&S[0]===E[0]?f.i(w.a)(S):[]});u.a=P},function(r,u,f){'use strict';var h=f(27),w=f(129),C=f(10),T=f(137),P=f(19),E=f(8),S=f.i(E.a)(function(O){var R=f.i(P.a)(O),V=f.i(h.a)(O,T.a);return R===f.i(P.a)(V)?R=void 0:V.pop(),V.length&&V[0]===O[0]?f.i(w.a)(V,f.i(C.a)(R)):[]});u.a=S},function(r,u,f){'use strict';var h=f(27),w=f(129),C=f(137),T=f(19),P=f(8),E=f.i(P.a)(function(S){var O=f.i(T.a)(S),R=f.i(h.a)(S,C.a);return O===f.i(T.a)(R)?O=void 0:R.pop(),R.length&&R[0]===S[0]?f.i(w.a)(R,void 0,O):[]});u.a=E},function(r,u,f){'use strict';var w=f(51),C=f(99);u.a=function(T){return!!T&&1===T.nodeType&&f.i(w.a)(T)&&!f.i(C.a)(T)}},function(r,u,f){'use strict';var w=f(148),C=f(91),T=f(14),P=f(213),E=/[\\^$.*+?()[\]{}|]/g,S=/^\[object .+?Constructor\]$/,O=Object.prototype,R=Function.prototype.toString,V=O.hasOwnProperty,F=RegExp('^'+R.call(V).replace(E,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$');u.a=function(I){if(!f.i(T.a)(I))return!1;var N=f.i(w.a)(I)||f.i(C.a)(I)?F:S;return N.test(f.i(P.a)(I))}},function(r,u){'use strict';var w=Array.prototype,C=w.join;u.a=function(T,P){return T?C.call(T,P):''}},function(r,u,f){'use strict';var w=f(210),C=f(15);u.a=function(E,S,O){var R=E?E.length:0;if(!R)return-1;var V=R;if(void 0!==O&&(V=f.i(C.a)(O),V=(0>V?_Mathmax(R+V,0):_Mathmin(V,R-1))+1),S!==S)return f.i(w.a)(E,V,!0);for(;V--;)if(E[V]===S)return V;return-1}},function(r,u,f){'use strict';var w=f(466),C=f(15);u.a=function(T,P){return T&&T.length?f.i(w.a)(T,f.i(C.a)(P)):void 0}},function(r,u,f){'use strict';var h=f(150),w=f(8),C=f.i(w.a)(h.a);u.a=C},function(r,u,f){'use strict';var w=f(10),C=f(132);u.a=function(T,P,E){return T&&T.length&&P&&P.length?f.i(C.a)(T,P,f.i(w.a)(E)):T}},function(r,u,f){'use strict';var w=f(132);u.a=function(C,T,P){return C&&C.length&&T&&T.length?f.i(w.a)(C,T,void 0,P):C}},function(r,u,f){'use strict';var h=f(27),w=f(453),C=f(23),T=f(202),P=f(479),E=f(39),S=f(8),O=f.i(S.a)(function(R,V){V=f.i(C.a)(V,1);var F=R?R.length:0,I=f.i(w.a)(R,V);return f.i(T.a)(R,f.i(h.a)(V,function(N){return f.i(E.a)(N,F)?+N:N}).sort(P.a)),I});u.a=O},function(r,u,f){'use strict';var w=f(10),C=f(202);u.a=function(T,P){var E=[];if(!(T&&T.length))return E;var S=-1,O=[],R=T.length;for(P=f.i(w.a)(P,3);++SP?0:P)):[]}},function(r,u,f){'use strict';var w=f(38),C=f(15);u.a=function(T,P,E){var S=T?T.length:0;return S?(P=E||void 0===P?1:f.i(C.a)(P),P=S-P,f.i(w.a)(T,0>P?0:P,S)):[]}},function(r,u,f){'use strict';var w=f(10),C=f(88);u.a=function(T,P){return T&&T.length?f.i(C.a)(T,f.i(w.a)(P,3),!1,!0):[]}},function(r,u,f){'use strict';var w=f(10),C=f(88);u.a=function(T,P){return T&&T.length?f.i(C.a)(T,f.i(w.a)(P,3)):[]}},function(r,u,f){'use strict';var w=f(148),C=f(14),T=f(52),P=0/0,E=/^\s+|\s+$/g,S=/^[-+]0x[0-9a-f]+$/i,O=/^0b[01]+$/i,R=/^0o[0-7]+$/i,V=parseInt;u.a=function(F){if('number'==typeof F)return F;if(f.i(T.a)(F))return P;if(f.i(C.a)(F)){var I=f.i(w.a)(F.valueOf)?F.valueOf():F;F=f.i(C.a)(I)?I+'':I}if('string'!=typeof F)return 0===F?F:+F;F=F.replace(E,'');var N=O.test(F);return N||R.test(F)?V(F.slice(2),N?2:8):S.test(F)?P:+F}},function(r,u,f){'use strict';var h=f(23),w=f(49),C=f(13),T=f(8),P=f.i(T.a)(function(E){return f.i(w.a)(f.i(h.a)(E,1,C.a,!0))});u.a=P},function(r,u,f){'use strict';var h=f(23),w=f(10),C=f(49),T=f(13),P=f(19),E=f(8),S=f.i(E.a)(function(O){var R=f.i(P.a)(O);return f.i(T.a)(R)&&(R=void 0),f.i(C.a)(f.i(h.a)(O,1,T.a,!0),f.i(w.a)(R))});u.a=S},function(r,u,f){'use strict';var h=f(23),w=f(49),C=f(13),T=f(19),P=f(8),E=f.i(P.a)(function(S){var O=f.i(T.a)(S);return f.i(C.a)(O)&&(O=void 0),f.i(w.a)(f.i(h.a)(S,1,C.a,!0),void 0,O)});u.a=E},function(r,u,f){'use strict';var w=f(49);u.a=function(C){return C&&C.length?f.i(w.a)(C):[]}},function(r,u,f){'use strict';var w=f(10),C=f(49);u.a=function(T,P){return T&&T.length?f.i(C.a)(T,f.i(w.a)(P)):[]}},function(r,u,f){'use strict';var w=f(49);u.a=function(C,T){return C&&C.length?f.i(w.a)(C,void 0,T):[]}},function(r,u,f){'use strict';var h=f(70),w=f(13),C=f(8),T=f.i(C.a)(function(P,E){return f.i(w.a)(P)?f.i(h.a)(P,E):[]});u.a=T},function(r,u,f){'use strict';var h=f(84),w=f(135),C=f(13),T=f(8),P=f.i(T.a)(function(E){return f.i(w.a)(f.i(h.a)(E,C.a))});u.a=P},function(r,u,f){'use strict';var h=f(84),w=f(10),C=f(135),T=f(13),P=f(19),E=f(8),S=f.i(E.a)(function(O){var R=f.i(P.a)(O);return f.i(T.a)(R)&&(R=void 0),f.i(C.a)(f.i(h.a)(O,T.a),f.i(w.a)(R))});u.a=S},function(r,u,f){'use strict';var h=f(84),w=f(135),C=f(13),T=f(19),P=f(8),E=f.i(P.a)(function(S){var O=f.i(T.a)(S);return f.i(C.a)(O)&&(O=void 0),f.i(w.a)(f.i(h.a)(S,C.a),void 0,O)});u.a=E},function(r,u,f){'use strict';var h=f(8),w=f(100),C=f.i(h.a)(w.a);u.a=C},function(r,u,f){'use strict';var w=f(69),C=f(205);u.a=function(T,P){return f.i(C.a)(T||[],P||[],w.a)}},function(r,u,f){'use strict';var w=f(468),C=f(205);u.a=function(T,P){return f.i(C.a)(T||[],P||[],w.a)}},function(r,u,f){'use strict';var h=f(8),w=f(151),C=f.i(h.a)(function(T){var P=T.length,E=1{const{batch:V,match:F}=R,I=F[1].length;this.editor.execute(`heading${I}`,{batch:V})})}_addInlineAutoformats(){new w.a(this.editor,/(\*\*)([^\*]+)(\*\*)$/g,'bold'),new w.a(this.editor,/(__)([^_]+)(__)$/g,'bold'),new w.a(this.editor,/(?:^|[^\*])(\*)([^\*_]+)(\*)$/g,'italic'),new w.a(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,'italic')}}u.a=O},function(r,u,f){'use strict';var h=f(2),w=f(157),C=f(21),T=f(305),P=f.n(T);class E extends h.a{static get requires(){return[w.a]}static get pluginName(){return'basic-styles/bold'}init(){const S=this.editor,O=S.t,R=S.commands.get('bold'),V='CTRL+B';S.ui.componentFactory.add('bold',(F)=>{const I=new C.a(F);return I.set({label:O('Bold'),icon:P.a,keystroke:V,tooltip:!0}),I.bind('isOn','isEnabled').to(R,'value','isEnabled'),this.listenTo(I,'execute',()=>S.execute('bold')),I}),S.keystrokes.set(V,'bold')}}u.a=E},function(r,u,f){'use strict';var h=f(2),w=f(158),C=f(21),T=f(306),P=f.n(T);class E extends h.a{static get requires(){return[w.a]}static get pluginName(){return'basic-styles/italic'}init(){const S=this.editor,O=S.t,R=S.commands.get('italic'),V='CTRL+I';S.ui.componentFactory.add('italic',(F)=>{const I=new C.a(F);return I.set({label:O('Italic'),icon:P.a,keystroke:V,tooltip:!0}),I.bind('isOn','isEnabled').to(R,'value','isEnabled'),this.listenTo(I,'execute',()=>S.execute('italic')),I}),S.keystrokes.set(V,'italic')}}u.a=E},function(r,u,f){'use strict';var h=f(2),w=f(330),C=f(21),T=f(310),P=f.n(T),E=f(318),S=f.n(E);class O extends h.a{static get requires(){return[w.a]}static get pluginName(){return'block-quote/blockquote'}init(){const R=this.editor,V=R.t,F=R.commands.get('blockQuote');R.ui.componentFactory.add('blockQuote',(I)=>{const N=new C.a(I);return N.set({label:V('Block quote'),icon:P.a,tooltip:!0}),N.bind('isOn','isEnabled').to(F,'value','isEnabled'),this.listenTo(N,'execute',()=>R.execute('blockQuote')),N})}afterInit(){const R=this.editor,V=R.commands.get('blockQuote');this.listenTo(this.editor.editing.view,'enter',(F,I)=>{const N=this.editor.document,M=N.selection.getLastPosition().parent;N.selection.isCollapsed&&M.isEmpty&&V.value&&(this.editor.execute('blockQuote'),I.preventDefault(),F.stop())})}}u.a=O},function(r){'use strict';r.exports={toolbar:['headings','bold','italic','link','unlink','bulletedList','numberedList','blockQuote','undo','redo'],image:{toolbar:['imageStyleFull','imageStyleSide','|','imageTextAlternative']}}},function(r,u,f){'use strict';var h=f(340),w=f(164),C=f(342),T=f(343),P=f(440),E=f(319),S=f.n(E);class O extends h.a{constructor(R,V){super(R,V),this.document.createRoot(),this.data.processor=new w.a,this.ui=new C.a(this,new T.a(this.locale)),this._elementReplacer=new P.a}destroy(){return this.updateEditorElement(),this._elementReplacer.restore(),this.ui.destroy().then(()=>super.destroy())}static create(R,V){return new Promise((F)=>{const I=new this(R,V);F(I.initPlugins().then(()=>I._elementReplacer.replace(R,I.ui.view.element)).then(()=>I.ui.init()).then(()=>I.fire('uiReady')).then(()=>I.editing.view.attachDomRoot(I.ui.view.editableElement)).then(()=>I.loadDataFromEditorElement()).then(()=>{I.fire('dataReady'),I.fire('ready')}).then(()=>I))})}}u.a=O},function(r,u,f){'use strict';function h(I,N){return Array.prototype.concat(...I.map((M)=>[M,N]))}var w=f(73),C=f(175),T=f(2),P=f(420),E=f(411),S=f(80),O=f(6),R=f(321),V=f.n(R);class F extends T.a{static get requires(){return[w.a,C.a]}static get pluginName(){return'heading/heading'}init(){const I=this.editor,N=new S.a,M=this._getLocalizedOptions(),D=[],q=I.t,z=q('Choose heading'),U=q('Heading');for(let K of M){const W=I.commands.get(K.modelElement),H=new P.a({commandName:K.modelElement,label:K.title,class:K.class});H.bind('isActive').to(W,'value'),N.add(H),D.push(W)}const $=new P.a({withText:!0,items:N,tooltip:U});$.bind('isEnabled').to(...h(D,'isEnabled'),(...K)=>K.some((W)=>W)),$.bind('label').to(...h(D,'value'),(...K)=>{const W=K.findIndex((H)=>H);return M[W]?M[W].title:z}),I.ui.componentFactory.add('headings',(K)=>{const W=f.i(E.a)($,K);return O.a.extend(W.template,{attributes:{class:['ck-heading-dropdown']}}),this.listenTo(W,'execute',(H)=>{I.execute(H.source.commandName),I.editing.view.focus()}),W})}_getLocalizedOptions(){const I=this.editor,N=I.t,M={Paragraph:N('Paragraph'),'Heading 1':N('Heading 1'),'Heading 2':N('Heading 2'),'Heading 3':N('Heading 3')};return I.config.get('heading.options').map((D)=>{const q=M[D.title];return q&&q!=D.title&&(D=Object.assign({},D,{title:q})),D})}}u.a=F},function(r,u,f){'use strict';var h=f(2),w=f(176),C=f(545),T=f(387),P=f(324),E=f.n(P);class S extends h.a{static get requires(){return[w.a,C.a,T.a]}static get pluginName(){return'image/image'}}u.a=S},function(r,u,f){'use strict';var h=f(2),w=f(382),C=f(322),T=f.n(C);class P extends h.a{static get requires(){return[w.a]}static get pluginName(){return'image/imagecaption'}}u.a=P},function(r,u,f){'use strict';var h=f(2),w=f(386),C=f(21);class T extends h.a{static get requires(){return[w.a]}static get pluginName(){return'image/imagestyle'}init(){const P=this.editor.config.get('image.styles');for(let E of P)this._createButton(E)}_createButton(P){const E=this.editor,S=E.commands.get(P.name);E.ui.componentFactory.add(P.name,(O)=>{const R=new C.a(O);return R.set({label:P.title,icon:P.icon,tooltip:!0}),R.bind('isEnabled').to(S,'isEnabled'),R.bind('isOn').to(S,'value'),this.listenTo(R,'execute',()=>E.execute(P.name)),R})}}u.a=T},function(r,u,f){'use strict';var h=f(2),w=f(368),C=f(392),T=f(179),P=f(421),E=f(182),S=f(21),O=f(393),R=f(311),V=f.n(R),F=f(312),I=f.n(F),N=f(325),M=f.n(N);class D extends h.a{static get requires(){return[C.a,P.a]}static get pluginName(){return'link/link'}init(){this.editor.editing.view.addObserver(w.a),this.formView=this._createForm(),this._balloon=this.editor.plugins.get(P.a),this._createToolbarLinkButton(),this._createToolbarUnlinkButton(),this._attachActions()}_createForm(){const q=this.editor,z=new O.a(q.locale);return z.urlInputView.bind('value').to(q.commands.get('link'),'value'),this.listenTo(z,'submit',()=>{q.execute('link',z.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(z,'unlink',()=>{q.execute('unlink'),this._hidePanel(!0)}),this.listenTo(z,'cancel',()=>this._hidePanel(!0)),z.keystrokes.set('Esc',(U,$)=>{this._hidePanel(!0),$()}),z}_createToolbarLinkButton(){const q=this.editor,z=q.commands.get('link'),U=q.t;q.keystrokes.set('CTRL+K',()=>this._showPanel(!0)),q.ui.componentFactory.add('link',($)=>{const K=new S.a($);return K.isEnabled=!0,K.label=U('Link'),K.icon=V.a,K.keystroke='CTRL+K',K.tooltip=!0,K.bind('isEnabled').to(z,'isEnabled'),this.listenTo(K,'execute',()=>this._showPanel(!0)),K})}_createToolbarUnlinkButton(){const q=this.editor,z=q.t,U=q.commands.get('unlink');q.ui.componentFactory.add('unlink',($)=>{const K=new S.a($);return K.isEnabled=!1,K.label=z('Unlink'),K.icon=I.a,K.tooltip=!0,K.bind('isEnabled').to(U,'isEnabled'),this.listenTo(K,'execute',()=>q.execute('unlink')),K})}_attachActions(){const q=this.editor.editing.view;this.listenTo(q,'click',()=>{const z=q.selection,U=this._getSelectedLinkElement();z.isCollapsed&&U&&this._showPanel()}),this.editor.keystrokes.set('Tab',(z,U)=>{this._balloon.visibleView!==this.formView||this.formView.focusTracker.isFocused||(this.formView.focus(),U())}),this.editor.keystrokes.set('Esc',(z,U)=>{this._balloon.visibleView===this.formView&&(this._hidePanel(),U())}),f.i(E.a)({emitter:this.formView,activator:()=>this._balloon.hasView(this.formView),contextElement:this._balloon.view.element,callback:()=>this._hidePanel()})}_showPanel(q){const z=this.editor.editing,U=z.view,$=U.selection.isCollapsed,K=this._getSelectedLinkElement();return this.formView.unlinkButtonView.isVisible=!!K,this.listenTo(U,'render',()=>{const W=this._getSelectedLinkElement(),H=U.selection.isCollapsed;$&&!H||K!==W?this._hidePanel(!0):W?this._balloon.updatePosition():this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.hasView(this.formView)?(q&&this._balloon.visibleView===this.formView&&this.formView.urlInputView.select(),Promise.resolve()):this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}).then(()=>{q&&this.formView.urlInputView.select()})}_hidePanel(q){this.stopListening(this.editor.editing.view,'render');this._balloon.hasView(this.formView)&&(q&&this.editor.editing.view.focus(),this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.formView))}_getBalloonPositionData(){const q=this.editor.editing.view,z=this._getSelectedLinkElement(),U=z?q.domConverter.getCorrespondingDomElement(z):q.domConverter.viewRangeToDom(q.selection.getFirstRange());return{target:U,limiter:q.domConverter.getCorrespondingDomElement(q.selection.editableElement)}}_getSelectedLinkElement(){return this.editor.editing.view.selection.getFirstPosition().parent.getAncestors().find((q)=>q instanceof T.a)}}u.a=D},function(r,u,f){'use strict';var h=f(180),w=f(314),C=f.n(w),T=f(313),P=f.n(T),E=f(2),S=f(22),O=f(21);class R extends E.a{static get requires(){return[h.a]}static get pluginName(){return'list/list'}init(){const V=this.editor.t;this._addButton('numberedList',V('Numbered List'),C.a),this._addButton('bulletedList',V('Bulleted List'),P.a),this.listenTo(this.editor.editing.view,'enter',(F,I)=>{const N=this.editor.document,M=N.selection.getLastPosition().parent;N.selection.isCollapsed&&'listItem'==M.name&&M.isEmpty&&(this.editor.execute('outdentList'),I.preventDefault(),F.stop())}),this.listenTo(this.editor.editing.view,'keydown',(F,I)=>{let N;if(I.keystroke==f.i(S.a)('Tab')?N='indentList':I.keystroke==f.i(S.a)('Shift+Tab')&&(N='outdentList'),N){const M=this.editor.commands.get(N);M.isEnabled&&(this.editor.execute(N),I.preventDefault(),F.stop())}})}_addButton(V,F,I){const N=this.editor,M=N.commands.get(V);N.ui.componentFactory.add(V,(D)=>{const q=new O.a(D);return q.set({label:F,icon:I,tooltip:!0}),q.bind('isOn','isEnabled').to(M,'value','isEnabled'),this.listenTo(q,'execute',()=>N.execute(V)),q})}}u.a=R},function(r,u,f){'use strict';var h=f(2),w=f(332),C=f(377),T=f(405),P=f(426);class E extends h.a{static get requires(){return[w.a,C.a,T.a,P.a]}}u.a=E},function(r,u){'use strict';function h(N){var M=N.length;if(0>18]+S[63&N>>12]+S[63&N>>6]+S[63&N]}function P(N,M,D){for(var z=[],U=M,q;U>16,$[W++]=255&z>>8,$[W++]=255&z;return 2===U?(z=O[N.charCodeAt(M)]<<2|O[N.charCodeAt(M+1)]>>4,$[W++]=255&z):1===U&&(z=O[N.charCodeAt(M)]<<10|O[N.charCodeAt(M+1)]<<4|O[N.charCodeAt(M+2)]>>2,$[W++]=255&z>>8,$[W++]=255&z),$},u.fromByteArray=function(N){for(var D=N.length,q=D%3,z='',U=[],$=16383,K=0,W=D-q,M;KW?W:K+$));return 1==q?(M=N[D-1],z+=S[M>>2],z+=S[63&M<<4],z+='=='):2==q&&(M=(N[D-2]<<8)+N[D-1],z+=S[M>>10],z+=S[63&M>>4],z+=S[63&M<<2],z+='='),U.push(z),U.join('')};for(var S=[],O=[],R='undefined'==typeof Uint8Array?Array:Uint8Array,V='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',F=0,I=V.length;FTe)throw new RangeError('"size" argument must not be negative')}function O(Te,Pe,Ee,Se){return S(Pe),0>=Pe?T(Te,Pe):void 0===Ee?T(Te,Pe):'string'==typeof Se?T(Te,Pe).fill(Ee,Se):T(Te,Pe).fill(Ee)}function R(Te,Pe){if(S(Pe),Te=T(Te,0>Pe?0:0|M(Pe)),!P.TYPED_ARRAY_SUPPORT)for(var Ee=0;EePe.length?0:0|M(Pe.length);Te=T(Te,Ee);for(var Se=0;SeEe||Pe.byteLength=C())throw new RangeError('Attempt to allocate Buffer larger than maximum size: 0x'+C().toString(16)+' bytes');return 0|Te}function q(Te,Pe){if(P.isBuffer(Te))return Te.length;if('undefined'!=typeof ArrayBuffer&&'function'==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(Te)||Te instanceof ArrayBuffer))return Te.byteLength;'string'!=typeof Te&&(Te=''+Te);var Ee=Te.length;if(0===Ee)return 0;for(var Se=!1;;)switch(Pe){case'ascii':case'latin1':case'binary':return Ee;case'utf8':case'utf-8':case void 0:return fe(Te).length;case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return 2*Ee;case'hex':return Ee>>>1;case'base64':return _e(Te).length;default:if(Se)return fe(Te).length;Pe=(''+Pe).toLowerCase(),Se=!0;}}function z(Te,Pe,Ee){var Se=!1;if((void 0===Pe||0>Pe)&&(Pe=0),Pe>this.length)return'';if((void 0===Ee||Ee>this.length)&&(Ee=this.length),0>=Ee)return'';if(Ee>>>=0,Pe>>>=0,Ee<=Pe)return'';for(Te||(Te='utf8');;)switch(Te){case'hex':return ne(this,Pe,Ee);case'utf8':case'utf-8':return X(this,Pe,Ee);case'ascii':return te(this,Pe,Ee);case'latin1':case'binary':return ae(this,Pe,Ee);case'base64':return Q(this,Pe,Ee);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return oe(this,Pe,Ee);default:if(Se)throw new TypeError('Unknown encoding: '+Te);Te=(Te+'').toLowerCase(),Se=!0;}}function U(Te,Pe,Ee){var Se=Te[Pe];Te[Pe]=Te[Ee],Te[Ee]=Se}function $(Te,Pe,Ee,Se,Oe){if(0===Te.length)return-1;if('string'==typeof Ee?(Se=Ee,Ee=0):2147483647Ee&&(Ee=-2147483648),Ee=+Ee,isNaN(Ee)&&(Ee=Oe?0:Te.length-1),0>Ee&&(Ee=Te.length+Ee),Ee>=Te.length){if(Oe)return-1;Ee=Te.length-1}else if(0>Ee)if(Oe)Ee=0;else return-1;if('string'==typeof Pe&&(Pe=P.from(Pe,Se)),P.isBuffer(Pe))return 0===Pe.length?-1:K(Te,Pe,Ee,Se,Oe);if('number'==typeof Pe)return Pe&=255,P.TYPED_ARRAY_SUPPORT&&'function'==typeof Uint8Array.prototype.indexOf?Oe?Uint8Array.prototype.indexOf.call(Te,Pe,Ee):Uint8Array.prototype.lastIndexOf.call(Te,Pe,Ee):K(Te,[Pe],Ee,Se,Oe);throw new TypeError('val must be string, number or Buffer')}function K(Te,Pe,Ee,Se,Oe){function Re(De,je){return 1==Ve?De[je]:De.readUInt16BE(je*Ve)}var Ve=1,Fe=Te.length,Ie=Pe.length;if(void 0!==Se&&(Se=(Se+'').toLowerCase(),'ucs2'===Se||'ucs-2'===Se||'utf16le'===Se||'utf-16le'===Se)){if(2>Te.length||2>Pe.length)return-1;Ve=2,Fe/=2,Ie/=2,Ee/=2}var Be;if(Oe){var Le=-1;for(Be=Ee;BeFe&&(Ee=Fe-Ie),Be=Ee;0<=Be;Be--){for(var Ne=!0,Me=0;MeOe&&(Se=Oe)):Se=Oe;var Re=Pe.length;if(0!=Re%2)throw new TypeError('Invalid hex string');Se>Re/2&&(Se=Re/2);for(var Ve=0,Fe;VeRe&&(Ve=Re):2==Fe?(Ie=Te[Oe+1],128==(192&Ie)&&(Ne=(31&Re)<<6|63&Ie,127Ne||57343Ne&&(Ve=Ne))):void 0}null===Ve?(Ve=65533,Fe=1):65535>>10),Ve=56320|1023&Ve),Se.push(Ve),Oe+=Fe}return ee(Se)}function ee(Te){var Pe=Te.length;if(Pe<=Ce)return _StringfromCharCode.apply(String,Te);for(var Ee='',Se=0;SePe)&&(Pe=0),(!Ee||0>Ee||Ee>Se)&&(Ee=Se);for(var Oe='',Re=Pe;ReTe)throw new RangeError('offset is not uint');if(Te+Pe>Ee)throw new RangeError('Trying to access beyond buffer length')}function re(Te,Pe,Ee,Se,Oe,Re){if(!P.isBuffer(Te))throw new TypeError('"buffer" argument must be a Buffer instance');if(Pe>Oe||PeTe.length)throw new RangeError('Index out of range')}function se(Te,Pe,Ee,Se){0>Pe&&(Pe=65535+Pe+1);for(var Oe=0,Re=_Mathmin(Te.length-Ee,2);Oe>>8*(Se?Oe:1-Oe)}function le(Te,Pe,Ee,Se){0>Pe&&(Pe=4294967295+Pe+1);for(var Oe=0,Re=_Mathmin(Te.length-Ee,4);Oe>>8*(Se?Oe:3-Oe)}function de(Te,Pe,Ee,Se){if(Ee+Se>Te.length)throw new RangeError('Index out of range');if(0>Ee)throw new RangeError('Index out of range')}function ce(Te,Pe,Ee,Se,Oe){return Oe||de(Te,Pe,Ee,4,3.4028234663852886e38,-3.4028234663852886e38),ve.write(Te,Pe,Ee,Se,23,4),Ee+4}function ue(Te,Pe,Ee,Se,Oe){return Oe||de(Te,Pe,Ee,8,1.7976931348623157e308,-1.7976931348623157e308),ve.write(Te,Pe,Ee,Se,52,8),Ee+8}function me(Te){if(Te=pe(Te).replace(Ae,''),2>Te.length)return'';for(;0!=Te.length%4;)Te+='=';return Te}function pe(Te){return Te.trim?Te.trim():Te.replace(/^\s+|\s+$/g,'')}function ge(Te){return 16>Te?'0'+Te.toString(16):Te.toString(16)}function fe(Te,Pe){Pe=Pe||Infinity;for(var Se=Te.length,Oe=null,Re=[],Ve=0,Ee;VeEe){if(!Oe){if(56319Ee){-1<(Pe-=3)&&Re.push(239,191,189),Oe=Ee;continue}Ee=(Oe-55296<<10|Ee-56320)+65536}else Oe&&-1<(Pe-=3)&&Re.push(239,191,189);if(Oe=null,128>Ee){if(0>(Pe-=1))break;Re.push(Ee)}else if(2048>Ee){if(0>(Pe-=2))break;Re.push(192|Ee>>6,128|63&Ee)}else if(65536>Ee){if(0>(Pe-=3))break;Re.push(224|Ee>>12,128|63&Ee>>6,128|63&Ee)}else if(1114112>Ee){if(0>(Pe-=4))break;Re.push(240|Ee>>18,128|63&Ee>>12,128|63&Ee>>6,128|63&Ee)}else throw new Error('Invalid code point')}return Re}function he(Te){for(var Pe=[],Ee=0;Ee(Pe-=2));++Ve)Ee=Te.charCodeAt(Ve),Se=Ee>>8,Oe=Ee%256,Re.push(Oe),Re.push(Se);return Re}function _e(Te){return ye.toByteArray(me(Te))}function ke(Te,Pe,Ee,Se){for(var Oe=0;Oe=Pe.length||Oe>=Te.length);++Oe)Pe[Oe+Ee]=Te[Oe];return Oe}function we(Te){return Te!==Te}var ye=f(292),ve=f(304),xe=f(294);u.Buffer=P,u.SlowBuffer=function(Te){return+Te!=Te&&(Te=0),P.alloc(+Te)},u.INSPECT_MAX_BYTES=50,P.TYPED_ARRAY_SUPPORT=h.TYPED_ARRAY_SUPPORT===void 0?function(){try{var Te=new Uint8Array(1);return Te.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===Te.foo()&&'function'==typeof Te.subarray&&0===Te.subarray(1,1).byteLength}catch(Pe){return!1}}():h.TYPED_ARRAY_SUPPORT,u.kMaxLength=C(),P.poolSize=8192,P._augment=function(Te){return Te.__proto__=P.prototype,Te},P.from=function(Te,Pe,Ee){return E(null,Te,Pe,Ee)},P.TYPED_ARRAY_SUPPORT&&(P.prototype.__proto__=Uint8Array.prototype,P.__proto__=Uint8Array,'undefined'!=typeof Symbol&&Symbol.species&&P[Symbol.species]===P&&Object.defineProperty(P,Symbol.species,{value:null,configurable:!0})),P.alloc=function(Te,Pe,Ee){return O(null,Te,Pe,Ee)},P.allocUnsafe=function(Te){return R(null,Te)},P.allocUnsafeSlow=function(Te){return R(null,Te)},P.isBuffer=function(Pe){return!!(null!=Pe&&Pe._isBuffer)},P.compare=function(Pe,Ee){if(!P.isBuffer(Pe)||!P.isBuffer(Ee))throw new TypeError('Arguments must be Buffers');if(Pe===Ee)return 0;for(var Se=Pe.length,Oe=Ee.length,Re=0,Ve=_Mathmin(Se,Oe);ReEe&&(Pe+=' ... ')),''},P.prototype.compare=function(Pe,Ee,Se,Oe,Re){if(!P.isBuffer(Pe))throw new TypeError('Argument must be a Buffer');if(void 0===Ee&&(Ee=0),void 0===Se&&(Se=Pe?Pe.length:0),void 0===Oe&&(Oe=0),void 0===Re&&(Re=this.length),0>Ee||Se>Pe.length||0>Oe||Re>this.length)throw new RangeError('out of range index');if(Oe>=Re&&Ee>=Se)return 0;if(Oe>=Re)return-1;if(Ee>=Se)return 1;if(Ee>>>=0,Se>>>=0,Oe>>>=0,Re>>>=0,this===Pe)return 0;for(var Ve=Re-Oe,Fe=Se-Ee,Ie=_Mathmin(Ve,Fe),Be=this.slice(Oe,Re),Le=Pe.slice(Ee,Se),Ne=0;NeRe)&&(Se=Re),0Se||0>Ee)||Ee>this.length)throw new RangeError('Attempt to write outside buffer bounds');Oe||(Oe='utf8');for(var Ve=!1;;)switch(Oe){case'hex':return W(this,Pe,Ee,Se);case'utf8':case'utf-8':return H(this,Pe,Ee,Se);case'ascii':return Y(this,Pe,Ee,Se);case'latin1':case'binary':return G(this,Pe,Ee,Se);case'base64':return Z(this,Pe,Ee,Se);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return J(this,Pe,Ee,Se);default:if(Ve)throw new TypeError('Unknown encoding: '+Oe);Oe=(''+Oe).toLowerCase(),Ve=!0;}},P.prototype.toJSON=function(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)}};var Ce=4096;P.prototype.slice=function(Pe,Ee){var Se=this.length;Pe=~~Pe,Ee=Ee===void 0?Se:~~Ee,0>Pe?(Pe+=Se,0>Pe&&(Pe=0)):Pe>Se&&(Pe=Se),0>Ee?(Ee+=Se,0>Ee&&(Ee=0)):Ee>Se&&(Ee=Se),Ee=Re&&(Oe-=_Mathpow(2,8*Ee)),Oe},P.prototype.readIntBE=function(Pe,Ee,Se){Pe|=0,Ee|=0,Se||ie(Pe,Ee,this.length);for(var Oe=Ee,Re=1,Ve=this[Pe+--Oe];0=Re&&(Ve-=_Mathpow(2,8*Ee)),Ve},P.prototype.readInt8=function(Pe,Ee){return Ee||ie(Pe,1,this.length),128&this[Pe]?-1*(255-this[Pe]+1):this[Pe]},P.prototype.readInt16LE=function(Pe,Ee){Ee||ie(Pe,2,this.length);var Se=this[Pe]|this[Pe+1]<<8;return 32768&Se?4294901760|Se:Se},P.prototype.readInt16BE=function(Pe,Ee){Ee||ie(Pe,2,this.length);var Se=this[Pe+1]|this[Pe]<<8;return 32768&Se?4294901760|Se:Se},P.prototype.readInt32LE=function(Pe,Ee){return Ee||ie(Pe,4,this.length),this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16|this[Pe+3]<<24},P.prototype.readInt32BE=function(Pe,Ee){return Ee||ie(Pe,4,this.length),this[Pe]<<24|this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3]},P.prototype.readFloatLE=function(Pe,Ee){return Ee||ie(Pe,4,this.length),ve.read(this,Pe,!0,23,4)},P.prototype.readFloatBE=function(Pe,Ee){return Ee||ie(Pe,4,this.length),ve.read(this,Pe,!1,23,4)},P.prototype.readDoubleLE=function(Pe,Ee){return Ee||ie(Pe,8,this.length),ve.read(this,Pe,!0,52,8)},P.prototype.readDoubleBE=function(Pe,Ee){return Ee||ie(Pe,8,this.length),ve.read(this,Pe,!1,52,8)},P.prototype.writeUIntLE=function(Pe,Ee,Se,Oe){if(Pe=+Pe,Ee|=0,Se|=0,!Oe){var Re=_Mathpow(2,8*Se)-1;re(this,Pe,Ee,Se,Re,0)}var Ve=1,Fe=0;for(this[Ee]=255&Pe;++Fe>>8):se(this,Pe,Ee,!0),Ee+2},P.prototype.writeUInt16BE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,2,65535,0),P.TYPED_ARRAY_SUPPORT?(this[Ee]=Pe>>>8,this[Ee+1]=255&Pe):se(this,Pe,Ee,!1),Ee+2},P.prototype.writeUInt32LE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[Ee+3]=Pe>>>24,this[Ee+2]=Pe>>>16,this[Ee+1]=Pe>>>8,this[Ee]=255&Pe):le(this,Pe,Ee,!0),Ee+4},P.prototype.writeUInt32BE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,4,4294967295,0),P.TYPED_ARRAY_SUPPORT?(this[Ee]=Pe>>>24,this[Ee+1]=Pe>>>16,this[Ee+2]=Pe>>>8,this[Ee+3]=255&Pe):le(this,Pe,Ee,!1),Ee+4},P.prototype.writeIntLE=function(Pe,Ee,Se,Oe){if(Pe=+Pe,Ee|=0,!Oe){var Re=_Mathpow(2,8*Se-1);re(this,Pe,Ee,Se,Re-1,-Re)}var Ve=0,Fe=1,Ie=0;for(this[Ee]=255&Pe;++VePe&&0==Ie&&0!==this[Ee+Ve-1]&&(Ie=1),this[Ee+Ve]=255&(Pe/Fe>>0)-Ie;return Ee+Se},P.prototype.writeIntBE=function(Pe,Ee,Se,Oe){if(Pe=+Pe,Ee|=0,!Oe){var Re=_Mathpow(2,8*Se-1);re(this,Pe,Ee,Se,Re-1,-Re)}var Ve=Se-1,Fe=1,Ie=0;for(this[Ee+Ve]=255&Pe;0<=--Ve&&(Fe*=256);)0>Pe&&0==Ie&&0!==this[Ee+Ve+1]&&(Ie=1),this[Ee+Ve]=255&(Pe/Fe>>0)-Ie;return Ee+Se},P.prototype.writeInt8=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,1,127,-128),P.TYPED_ARRAY_SUPPORT||(Pe=_Mathfloor(Pe)),0>Pe&&(Pe=255+Pe+1),this[Ee]=255&Pe,Ee+1},P.prototype.writeInt16LE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[Ee]=255&Pe,this[Ee+1]=Pe>>>8):se(this,Pe,Ee,!0),Ee+2},P.prototype.writeInt16BE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,2,32767,-32768),P.TYPED_ARRAY_SUPPORT?(this[Ee]=Pe>>>8,this[Ee+1]=255&Pe):se(this,Pe,Ee,!1),Ee+2},P.prototype.writeInt32LE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,4,2147483647,-2147483648),P.TYPED_ARRAY_SUPPORT?(this[Ee]=255&Pe,this[Ee+1]=Pe>>>8,this[Ee+2]=Pe>>>16,this[Ee+3]=Pe>>>24):le(this,Pe,Ee,!0),Ee+4},P.prototype.writeInt32BE=function(Pe,Ee,Se){return Pe=+Pe,Ee|=0,Se||re(this,Pe,Ee,4,2147483647,-2147483648),0>Pe&&(Pe=4294967295+Pe+1),P.TYPED_ARRAY_SUPPORT?(this[Ee]=Pe>>>24,this[Ee+1]=Pe>>>16,this[Ee+2]=Pe>>>8,this[Ee+3]=255&Pe):le(this,Pe,Ee,!1),Ee+4},P.prototype.writeFloatLE=function(Pe,Ee,Se){return ce(this,Pe,Ee,!0,Se)},P.prototype.writeFloatBE=function(Pe,Ee,Se){return ce(this,Pe,Ee,!1,Se)},P.prototype.writeDoubleLE=function(Pe,Ee,Se){return ue(this,Pe,Ee,!0,Se)},P.prototype.writeDoubleBE=function(Pe,Ee,Se){return ue(this,Pe,Ee,!1,Se)},P.prototype.copy=function(Pe,Ee,Se,Oe){if(Se||(Se=0),Oe||0===Oe||(Oe=this.length),Ee>=Pe.length&&(Ee=Pe.length),Ee||(Ee=0),0Ee)throw new RangeError('targetStart out of bounds');if(0>Se||Se>=this.length)throw new RangeError('sourceStart out of bounds');if(0>Oe)throw new RangeError('sourceEnd out of bounds');Oe>this.length&&(Oe=this.length),Pe.length-EeRe||!P.TYPED_ARRAY_SUPPORT)for(Ve=0;VeRe&&(Pe=Re)}if(void 0!==Oe&&'string'!=typeof Oe)throw new TypeError('encoding must be a string');if('string'==typeof Oe&&!P.isEncoding(Oe))throw new TypeError('Unknown encoding: '+Oe)}else'number'==typeof Pe&&(Pe&=255);if(0>Ee||this.length>>=0,Se=Se===void 0?this.length:Se>>>0,Pe||(Pe=0);var Ve;if('number'==typeof Pe)for(Ve=Ee;Ve*{margin-right:.4em}.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck-toolbar{border:0}.ck-dropdown:after{border-style:solid;border-width:.4em .4em 0;border-color:#707070 transparent;right:.8em}.ck-dropdown .ck-button.ck-dropdown__button{padding-right:1.6em}.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck-dropdown__panel{border:1px solid #b9b9b9;bottom:1px;background:#fff;box-shadow:0 1px 2px 0 rgba(0,0,0,.2)}.ck-dropdown__panel.ck-rounded-corners,.ck-rounded-corners .ck-dropdown__panel{border-radius:2px}.ck-list{-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none;list-style-type:none;background:#fff}.ck-list.ck-rounded-corners,.ck-rounded-corners .ck-list{border-radius:2px}.ck-list__item{padding:.64em;cursor:default;min-width:12em}.ck-list__item:focus,.ck-list__item:hover{background:#f7f7f7}.ck-list__item:focus{box-shadow:0 0 3px 2px #9bcdfb;position:relative;z-index:1;outline:none}.ck-list__item:last-of-type{border:none}.ck-list__item_active{background:#1a8bf1;color:#fff}.ck-list__item_active:focus,.ck-list__item_active:hover{background:#0e7ee2}.ck-label{font-weight:700}.ck-input-text{box-shadow:inset 2px 2px 3px #e6e6e6;border:1px solid #b9b9b9;padding:.64em;min-width:250px}.ck-input-text.ck-rounded-corners,.ck-rounded-corners .ck-input-text{border-radius:2px}.ck-input-text:focus{outline:none;border:1px solid #6ab5f9;box-shadow:0 0 3px 2px #9bcdfb,inset 2px 2px 3px #e6e6e6}.ck-balloon-panel{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);min-width:50px;min-height:15px;background:#fff;border:1px solid #b9b9b9}.ck-balloon-panel.ck-rounded-corners,.ck-rounded-corners .ck-balloon-panel{border-radius:2px}.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck-balloon-panel.ck-balloon-panel_with-arrow:before{width:0;height:0;border-style:solid}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_n:before,.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before,.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{border-width:0 10px 15px}.ck-balloon-panel.ck-balloon-panel_arrow_n:before,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{border-color:transparent transparent #b9b9b9}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:after{border-color:transparent transparent #fff;margin-top:2px}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_s:before,.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:before,.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{border-width:15px 10px 0}.ck-balloon-panel.ck-balloon-panel_arrow_s:before,.ck-balloon-panel.ck-balloon-panel_arrow_se:before,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{border-color:#b9b9b9 transparent transparent}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:after{border-color:#fff transparent transparent;margin-bottom:2px}.ck-balloon-panel.ck-balloon-panel_arrow_n:after,.ck-balloon-panel.ck-balloon-panel_arrow_n:before{left:50%;margin-left:-10px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne:before{left:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{right:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_s:after,.ck-balloon-panel.ck-balloon-panel_arrow_s:before{left:50%;margin-left:-10px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:before{left:20px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{right:20px;bottom:-15px}.ck-balloon-panel.ck-toolbar-container_arrow_n:after,.ck-balloon-panel.ck-toolbar-container_arrow_ne:after,.ck-balloon-panel.ck-toolbar-container_arrow_nw:after{border-bottom-color:#f7f7f7}.ck-balloon-panel.ck-toolbar-container_arrow_s:after,.ck-balloon-panel.ck-toolbar-container_arrow_se:after,.ck-balloon-panel.ck-toolbar-container_arrow_sw:after{border-top-color:#f7f7f7}.ck-editor-toolbar{border-radius:0}.ck-editor-toolbar .ck-button{border-width:0}.ck-editor-toolbar .ck-button.ck-disabled,.ck-editor-toolbar .ck-button:not(:hover):not(:focus):not(.ck-on){background:#f7f7f7}.ck-editor-toolbar .ck-button.ck-on{background:#dedede;border-color:#a1a1a1}.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):focus,.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):hover{background:#c6c6c6;border-color:#888}.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):active{background:#b9b9b9;border-color:#7c7c7c;box-shadow:inset 0 2px 2px #a1a1a1}.ck-editor-toolbar .ck-dropdown__button{border-width:1px}.ck-editor-toolbar .ck-dropdown__button:not(:hover):not(:focus):not(.ck-on){background:#fff}.ck-toolbar-container .ck-editor-toolbar{background:#f7f7f7}.ck-editor .ck-toolbar.ck-toolbar_sticky{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);border:1px solid #bfbfbf;border-width:0 0 1px;background:#f7f7f7}.ck-editor{position:relative}.ck-editor.ck-rounded-corners,.ck-rounded-corners .ck-editor{border-radius:2px}.ck-editor .ck-editor__top .ck-toolbar{border-top:0;border-left:0;border-right:0}.ck-editor .ck-editor__main{background:#fff}.ck-editor .ck-editor__bottom{border-bottom:0;border-left:0;border-right:0;padding:.8em}.ck-editor .ck-editor__editable.ck-focused{outline:1px solid #6ab5f9;box-shadow:inset 2px 2px 3px #e6e6e6}.ck-editor .ck-editor__editable_inline{overflow:auto;padding:0 .8em}.ck-editor,.ck-editor-bottom{background:#f7f7f7;border:1px solid #b9b9b9}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.ck-placeholder:before{content:attr(data-placeholder);cursor:text;color:#c2c2c2}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.ck-heading_heading1{font-size:1.5em}.ck-heading_heading2{font-size:1.3em}.ck-heading_heading3{font-size:1.1em}[class*=ck-heading_]{line-height:21.6px;padding:9.6px}[class*=ck-heading_heading]{font-weight:700}.ck-dropdown.ck-heading-dropdown .ck-dropdown__button .ck-button__label{width:8em}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.ck-editor__editable .image>figcaption{background-color:#f7f7f7;padding:.8em;font-size:.75rem;color:#858585;outline-offset:-1px}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.cke-text-alternative-form{padding:1.2em;overflow:hidden}.cke-text-alternative-form .ck-label{margin-bottom:.4em}.cke-text-alternative-form__actions{clear:both;padding-top:1.2em}.cke-text-alternative-form__actions .ck-button{float:right}.cke-text-alternative-form__actions .ck-button+.ck-button{margin-right:.64em}.cke-text-alternative-form__actions .ck-button+.ck-button+.ck-button{float:left}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.ck-editor__editable .image{text-align:center;clear:both}.ck-editor__editable .image.image-style-side{float:right;margin-left:.8em;max-width:50%}.ck-editor__editable .image>img{display:block;margin:0 auto;max-width:100%}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.ck-link-form{padding:1.2em;overflow:hidden}.ck-link-form:focus{outline:none}.ck-link-form .ck-label{margin-bottom:.4em}.ck-link-form__actions{clear:both;padding-top:1.2em}.ck-link-form__actions .ck-button{float:right}.ck-link-form__actions .ck-button+.ck-button{margin-right:.64em}.ck-link-form__actions .ck-button+.ck-button+.ck-button{float:left}',''])},function(r,u,f){u=r.exports=f(28)(void 0),u.push([r.i,'.ck-disabled{opacity:.5}.ck-widget{margin:.8em 0;padding:0}.ck-widget.ck-widget_selected,.ck-widget.ck-widget_selected:hover{outline:3px solid #6ab5f9}.ck-editor__editable.ck-blurred .ck-widget.ck-widget_selected{outline:3px solid #ddd}.ck-widget:hover{outline:3px solid #ffd25c}.ck-widget .ck-editable.ck-editable_focused,.ck-widget .ck-editable:focus{outline:1px solid #6ab5f9;box-shadow:inset 2px 2px 3px #e6e6e6;background-color:#fff}',''])},function(r,u){u.read=function(f,h,w,C,T){var P,E,S=8*T-C-1,O=(1<>1,V=-7,F=w?T-1:0,I=w?-1:1,N=f[h+F];for(F+=I,P=N&(1<<-V)-1,N>>=-V,V+=S;0>=-V,V+=C;0>1,I=23===T?5.960464477539063e-8-6.617444900424222e-24:0,N=C?0:P-1,M=C?1:-1,D=0>h||0===h&&0>1/h?1:0;for(h=Math.abs(h),isNaN(h)||h===Infinity?(S=isNaN(h)?1:0,E=V):(E=_Mathfloor(Math.log(h)/Math.LN2),1>h*(O=_Mathpow(2,-E))&&(E--,O*=2),h+=1<=E+F?I/O:I*_Mathpow(2,1-F),2<=h*O&&(E++,O/=2),E+F>=V?(S=0,E=V):1<=E+F?(S=(h*O-1)*_Mathpow(2,T),E+=F):(S=h*_Mathpow(2,F-1)*_Mathpow(2,T),E=0));8<=T;f[w+N]=255&S,N+=M,S/=256,T-=8);for(E=E<\n\n \n bold\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n italic\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n'},function(r){r.exports='\n\n \n quote\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n link\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n unlink\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n bulletedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n numberedlist\n Created with Sketch.\n \n \n \n \n \n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n redo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports='\n\n \n undo\n Created with Sketch.\n \n \n \n \n \n \n \n \n'},function(r){r.exports=function(f){var h='undefined'!=typeof window&&window.location;if(!h)throw new Error('fixUrls requires window.location');if(!f||'string'!=typeof f)return f;var w=h.protocol+'//'+h.host,C=w+h.pathname.replace(/\/[^\/]*$/,'/'),T=f.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(P,E){var S=E.trim().replace(/^"(.*)"$/,function(R,V){return V}).replace(/^'(.*)'$/,function(R,V){return V});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(S))return P;var O;return O=0===S.indexOf('//')?S:0===S.indexOf('/')?w+S:C+S.replace(/^\.\//,''),'url('+JSON.stringify(O)+')'});return T}},function(r,u,f){var h=f(295);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(296);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(297);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(298);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(299);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(300);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(301);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(302);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){var h=f(303);'string'==typeof h&&(h=[[r.i,h,'']]);f(29)(h,{});h.locals&&(r.exports=h.locals),!1},function(r,u,f){'use strict';var h=f(3),w=f(61);u.a=class{constructor(T,P,E){let S;if('function'==typeof E)S=E;else{S=(R)=>{const{batch:V}=R;T.execute(E,{batch:V})}}T.document.on('change',(O,R,V)=>{if('insert'!=R)return;const F=V.range.getItems().next().value;if(!(F instanceof w.a))return;const I=F.textNode,N=I.data;if('paragraph'!==I.parent.name||!N)return;const M=P.exec(N);M&&T.document.enqueueChanges(()=>{const D=T.document.batch(),q=h.a.createFromParentsAndOffsets(I.parent,0,I.parent,M[0].length);D.remove(q),S({batch:D,match:M})})})}}},function(r,u,f){'use strict';function h(P){return Array.from(P.getChildren()).reduce((E,S)=>E+S.data,'')}var w=f(111),C=f(101);u.a=class{constructor(P,E,S){this.editor=P;let O,R,V,F;E instanceof RegExp?O=E:V=E,'string'==typeof S?R=S:F=S,V=V||((I)=>{let N,M=[],D=[];for(;null!==(N=O.exec(I))&&!(N&&4>N.length);){let{index:q,1:z,2:U,3:$}=N;q+=N[0].length-(z+U+$).length;const W=[q,q+z.length],H=[q+z.length+U.length,q+z.length+U.length+$.length];M.push(W),M.push(H),D.push([q+z.length,q+z.length+U.length])}return{remove:M,format:D}}),F=F||((I,N)=>{for(let M of N)I.setAttribute(M,R,!0)}),P.document.on('change',(I,N)=>{if('insert'!==N)return;const M=this.editor.document.selection;if(!M.isCollapsed||!M.focus||!M.focus.parent)return;const D=M.focus.parent,q=h(D).slice(0,M.focus.offset),z=V(q),U=[];z.format.forEach((W)=>{void 0===W[0]||void 0===W[1]||U.push(w.a.createFromParentsAndOffsets(D,W[0],D,W[1]))});const $=[];if(z.remove.slice().reverse().forEach((W)=>{void 0===W[0]||void 0===W[1]||$.push(w.a.createFromParentsAndOffsets(D,W[0],D,W[1]))}),!(U.length&&$.length))return;const K=P.document.batch();P.document.enqueueChanges(()=>{const W=f.i(C.a)(R,U,P.document.schema);F(K,W);for(let H of $)K.remove(H)})})}}},function(r,u,f){'use strict';function h(R){return'blockQuote'==R.parent.name?R.parent:null}function w(R){let V,F=0;const I=[];for(;F{this.refreshValue(),this.refreshState()})}refreshValue(){const R=f.i(S.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!(R&&h(R))}_doExecute(R={}){const V=this.editor.document,F=R.batch||V.batch(),I=Array.from(V.selection.getSelectedBlocks());V.enqueueChanges(()=>{this.value?this._removeQuote(F,I.filter(h)):this._applyQuote(F,I)})}_checkEnabled(){if(this.value)return!0;const R=this.editor.document.selection,V=this.editor.document.schema,F=f.i(S.a)(R.getSelectedBlocks());if(!F)return!1;const I=V.check({name:'blockQuote',inside:T.a.createBefore(F)}),N=V.check({name:F.name,attributes:Array.from(F.getAttributeKeys()),inside:'blockQuote'});return I&&N}_removeQuote(R,V){w(V).reverse().forEach((F)=>{if(F.start.isAtStart&&F.end.isAtEnd)return void R.unwrap(F.start.parent);if(F.start.isAtStart){const N=T.a.createBefore(F.start.parent);return void R.move(F,N)}F.end.isAtEnd||R.split(F.end);const I=T.a.createAfter(F.end.parent);R.move(F,I)})}_applyQuote(R,V){const F=[];w(V).reverse().forEach((I)=>{let N=h(I.start);N||(N=new P.a('blockQuote'),R.wrap(I,N)),F.push(N)}),F.reverse().reduce((I,N)=>{return I.nextSibling==N?(R.merge(T.a.createAfter(I)),I):N})}}u.a=O},function(r,u,f){'use strict';var h=f(2),w=f(329),C=f(34),T=f(41);class P extends h.a{init(){const E=this.editor,S=E.document.schema;E.commands.set('blockQuote',new w.a(E)),S.registerItem('blockQuote'),S.allow({name:'blockQuote',inside:'$root'}),S.allow({name:'$block',inside:'blockQuote'}),f.i(C.a)().for(E.data.viewToModel).fromElement('blockquote').toElement('blockQuote'),f.i(T.a)().for(E.data.modelToView,E.editing.modelToView).fromElement('blockQuote').toElement('blockquote')}afterInit(){const E=this.editor.document.schema;E.hasItem('listItem')&&E.allow({name:'listItem',inside:'blockQuote',attributes:['type','indent']})}}u.a=P},function(r,u,f){'use strict';Object.defineProperty(u,'__esModule',{value:!0});var h=f(284),w=f(291),C=f(279),T=f(280),P=f(281),E=f(282),S=f(285),O=f(286),R=f(287),V=f(288),F=f(154),I=f(289),N=f(290),M=f(73);class D extends h.a{}u.ClassicEditor=D,D.build={plugins:[w.a,C.a,T.a,P.a,E.a,S.a,O.a,R.a,V.a,F.a,I.a,N.a,M.a],config:f(283)}},function(r,u,f){'use strict';var h=f(2),w=f(333),C=f(336),T=f(335),P=f(337),E=f(164);class S extends h.a{static get pluginName(){return'clipboard/clipboard'}init(){const O=this.editor,R=O.document,V=O.editing.view;this._htmlDataProcessor=new E.a,V.addObserver(w.a),this.listenTo(V,'clipboardInput',(I,N)=>{const M=N.dataTransfer;let D='';M.getData('text/html')?D=f.i(T.a)(M.getData('text/html')):M.getData('text/plain')&&(D=f.i(C.a)(M.getData('text/plain'))),D=this._htmlDataProcessor.toView(D),this.fire('inputTransformation',{content:D})},{priority:'low'}),this.listenTo(this,'inputTransformation',(I,N)=>{if(!N.content.isEmpty){const M=this.editor.data,D=M.toModel(N.content,'$clipboardHolder');R.enqueueChanges(()=>{M.insertContent(D,R.selection)})}},{priority:'low'});const F=(I,N)=>{const M=N.dataTransfer,D=O.data.toView(O.data.getSelectedContent(R.selection));N.preventDefault(),V.fire('clipboardOutput',{dataTransfer:M,content:D,method:I.name})};this.listenTo(V,'copy',F,{priority:'low'}),this.listenTo(V,'cut',F,{priority:'low'}),this.listenTo(V,'clipboardOutput',(I,N)=>{N.content.isEmpty||(N.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(N.content)),N.dataTransfer.setData('text/plain',f.i(P.a)(N.content))),'cut'==N.method&&R.enqueueChanges(()=>{O.data.deleteContent(R.selection,R.batch(),{merge:!0})})},{priority:'low'})}}u.a=S},function(r,u,f){'use strict';var h=f(63),w=f(334);class C extends h.a{constructor(T){function P(E,S){S.preventDefault(),T.fire('clipboardInput',{dataTransfer:S.dataTransfer})}super(T),this.domEventType=['paste','copy','cut','drop'],this.listenTo(T,'paste',P,{priority:'low'}),this.listenTo(T,'drop',P,{priority:'low'})}onDomEvent(T){this.fire(T.type,T,{dataTransfer:new w.a(T.clipboardData?T.clipboardData:T.dataTransfer)})}}u.a=C},function(r,u){'use strict';function h(C){const T=C.files?Array.from(C.files):[],P=C.items?Array.from(C.items):[];return T.length?T:P.filter((E)=>'file'===E.kind).map((E)=>E.getAsFile())}class w{constructor(C){this.files=h(C),this._native=C}get types(){return this._native.types}getData(C){return this._native.getData(C)}setData(C,T){this._native.setData(C,T)}}u.a=w},function(r,u){'use strict';u.a=function(w){return w.replace(/(\s+)<\/span>/g,(C,T)=>{return 1==T.length?' ':T})}},function(r,u){'use strict';u.a=function(w){return w=w.replace(//g,'>').replace(/\n\n/g,'

').replace(/\n/g,' ').replace(/^\s/,' ').replace(/\s$/,' ').replace(/\s\s/g,'  '),-1

')&&(w=`

${w}

`),w}},function(r,u){'use strict';function h(C){let T='';if(C.is('text')||C.is('textProxy'))T=C.data;else if(C.is('img')&&C.hasAttribute('alt'))T=C.getAttribute('alt');else{let P=null;for(let E of C.getChildren()){const S=h(E);P&&(P.is('containerElement')||E.is('containerElement'))&&(w.includes(P.name)||w.includes(E.name)?T+='\n':T+='\n\n'),T+=S,P=E}}return T}u.a=h;const w=['figcaption','li']},function(r,u,f){'use strict';var h=f(68);class w extends h.a{constructor(C){super(),this.editor=C}set(C,T){if('string'==typeof T){const P=T;T=()=>{this.editor.execute(P)}}super.set(C,T)}listenTo(C){this._listener.listenTo(C,'keydown',(T,P)=>{const E=this.press(P);E&&P.preventDefault()})}}u.a=w},function(r,u,f){'use strict';var h=f(7),w=f(429),C=f(341),T=f(540),P=f(344),E=f(359),S=f(0),O=f(4);class R{constructor(V){const F=this.constructor.build&&this.constructor.build.plugins;this.config=new w.a(V,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',F),this.plugins=new C.a(this,F),this.commands=new Map,this.locale=new T.a(this.config.get('lang')),this.t=this.locale.t,this.document=new E.a,this.data=new P.a(this.document)}initPlugins(){function F(M,D){return M.reduce((q,z)=>{return q.then(z[D].bind(z))},Promise.resolve())}const I=this,N=this.config;return function(){const M=N.get('plugins')||[],D=N.get('removePlugins')||[];return I.plugins.load(M,D)}().then((M)=>{return F(M,'init').then(()=>F(M,'afterInit'))}).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),Promise.resolve().then(()=>{this.document.destroy(),this.data.destroy()})}execute(V,F){let I=this.commands.get(V);if(!I)throw new S.a('editor-command-not-found: Specified command has not been added to the editor.');I._execute(F)}static create(V){return new Promise((F)=>{const I=new this(V);F(I.initPlugins().then(()=>{I.fire('dataReady'),I.fire('ready')}).then(()=>I))})}}u.a=R,f.i(O.a)(R,h.a)},function(r,u,f){'use strict';var h=f(339),w=f(338),C=f(346),T=f(432),P=f(439);class E extends h.a{constructor(S,O){super(O),this.element=S,this.editing=new C.a(this.document),this.keystrokes=new w.a(this),this.keystrokes.listenTo(this.editing.view)}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(S){this.data.set(S)}getData(){return this.data.get()}updateEditorElement(){f.i(P.a)(this.element,this.getData())}loadDataFromEditorElement(){this.setData(f.i(T.a)(this.element))}static create(S,O){return new Promise((R)=>{const V=new this(S,O);R(V.initPlugins().then(()=>{V.fire('dataReady'),V.fire('ready')}).then(()=>V))})}}u.a=E},function(r,u,f){'use strict';var h=f(2),w=f(0),C=f(40);class T{constructor(P,E=[]){this._editor=P,this._availablePlugins=new Map,this._plugins=new Map;for(const S of E)this._availablePlugins.set(S,S),S.pluginName&&this._availablePlugins.set(S.pluginName,S)}*[Symbol.iterator](){for(const P of this._plugins)'function'==typeof P[0]&&(yield P)}get(P){return this._plugins.get(P)}load(P,E=[]){function S(K){return U.includes(K)||N.get(K)||D.has(K)?void 0:O(K).catch((W)=>{throw C.a.error('plugincollection-load: It was not possible to load the plugin.',{plugin:K}),W})}function O(K){return new Promise((W)=>{D.add(K),V(K),K.requires&&K.requires.forEach((Y)=>{const G=R(Y);if(E.includes(G))throw new w.a('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:G,requiredBy:K});S(G)});const H=new K(M);N._add(K,H),q.push(H),W()})}function R(K){return'function'==typeof K?K:N._availablePlugins.get(K)}function V(K){if(!(K.prototype instanceof h.a))throw new w.a('plugincollection-instance: The loaded plugin module is not an instance of Plugin.',{plugin:K})}function I(K){return K.map((W)=>R(W)).filter((W)=>!!W)}const N=this,M=this._editor,D=new Set,q=[],z=I(P),U=I(E),$=function(K){const W=[];for(const H of K)R(H)||W.push(H);return W.length?W:null}(P);if($){const K='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return C.a.error(K,{plugins:$}),Promise.reject(new w.a(K,{plugins:$}))}return Promise.all(z.map(S)).then(()=>q)}_add(P,E){this._plugins.set(P,E),P.pluginName&&this._plugins.set(P.pluginName,E)}}u.a=T},function(r,u,f){'use strict';var h=f(407),w=f(67),C=f(422);u.a=class{constructor(P,E){this.editor=P,this.view=E,this.componentFactory=new h.a(P),this.focusTracker=new w.a,E.set('width',P.config.get('ui.width')),E.set('height',P.config.get('ui.height')),E.toolbar.bind('isActive').to(this.focusTracker,'isFocused'),E.toolbar.limiterElement=E.element;const S=P.editing.createRoot('div');E.editable.bind('isReadOnly').to(S),E.editable.bind('isFocused').to(P.editing.view),E.editable.name=S.rootName,this.focusTracker.add(E.editableElement)}init(){const P=this.editor;return this.view.init().then(()=>{return this.view.toolbar.fillFromConfig(P.config.get('toolbar'),this.componentFactory)}).then(()=>{f.i(C.a)({origin:P.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:P.keystrokes,toolbar:this.view.toolbar})})}destroy(){return this.view.destroy()}}},function(r,u,f){'use strict';var h=f(414),w=f(413),C=f(423),T=f(6);class P extends h.a{constructor(E){super(E),this.toolbar=new C.a(E),T.a.extend(this.toolbar.template,{attributes:{class:'ck-editor-toolbar'}}),this.editable=new w.a(E),this.top.add(this.toolbar),this.main.add(this.editable)}get editableElement(){return this.editable.element}}u.a=P},function(r,u,f){'use strict';var h=f(4),w=f(7),C=f(161),T=f(163),P=f(102),E=f(354),S=f(352),O=f(117),R=f(3),V=f(1),F=f(348),I=f(345),N=f(349),M=f(347);class D{constructor(q,z){this.model=q,this.processor=z,this.mapper=new C.a,this.modelToView=new T.a(this.model,{mapper:this.mapper}),this.modelToView.on('insert:$text',f.i(P.j)(),{priority:'lowest'}),this.viewToModel=new E.a({schema:q.schema}),this.viewToModel.on('text',f.i(S.a)(),{priority:'lowest'}),this.viewToModel.on('element',f.i(S.b)(),{priority:'lowest'}),this.viewToModel.on('documentFragment',f.i(S.b)(),{priority:'lowest'}),this.on('insertContent',(U,$)=>f.i(F.a)(this,$.content,$.selection,$.batch)),this.on('deleteContent',(U,$)=>f.i(I.a)($.selection,$.batch,$.options)),this.on('modifySelection',(U,$)=>f.i(N.a)(this,$.selection,$.options)),this.on('getSelectedContent',(U,$)=>{$.content=f.i(M.a)($.selection)})}get(q='main'){return this.stringify(this.model.getRoot(q))}stringify(q){const z=this.toView(q);return this.processor.toData(z)}toView(q){const z=R.a.createIn(q),U=new O.a;return this.mapper.bindElements(q,U),this.modelToView.convertInsertion(z),this.mapper.clearBindings(),U}set(q,z='main'){const U=this.model.getRoot(z);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(R.a.createIn(U)).insert(V.a.createAt(U,0),this.parse(q))})}parse(q,z='$root'){const U=this.processor.toView(q);return this.toModel(U,z)}toModel(q,z='$root'){return this.viewToModel.convert(q,{context:[z]})}destroy(){}insertContent(q,z,U){this.fire('insertContent',{content:q,selection:z,batch:U})}deleteContent(q,z,U){this.fire('deleteContent',{batch:z,selection:q,options:U})}modifySelection(q,z){this.fire('modifySelection',{selection:q,options:z})}getSelectedContent(q){const z={selection:q};return this.fire('getSelectedContent',z),z.content}}u.a=D,f.i(h.a)(D,w.a)},function(r,u,f){'use strict';function w(R,V,F){const I=V.parent,N=F.parent;if(I!=N&&I.parent&&N.parent&&T(V,F)){for(V=E.a.createAfter(I),F=E.a.createBefore(N),N.isEmpty?R.remove(N):(!F.isEqual(V)&&R.move(N,V),R.merge(V));F.parent.isEmpty;){const M=F.parent;F=E.a.createBefore(M),R.remove(M)}w(R,V,F)}}function C(R,V){const F=R.schema.check({name:'$text',inside:V}),I=R.schema.check({name:'paragraph',inside:V});return!F&&I}function T(R,V){const F=R.root.document.schema,I=new S.a(R,V);for(const N of I.getWalker())if(F.objects.has(N.item.name)||F.limits.has(N.item.name))return!1;return!0}var P=f(168),E=f(1),S=f(3),O=f(5);u.a=function(R,V,F={}){if(!R.isCollapsed){const I=R.getFirstRange(),N=I.start,M=P.a.createFromPosition(I.end);if(I.start.isTouching(I.end)||V.remove(I),F.merge&&w(V,N,M),R.collapse(N),C(V.document,N)){const D=new O.a('paragraph');V.insert(N,D),R.collapse(D)}M.detach()}}},function(r,u,f){'use strict';var h=f(367),w=f(161),C=f(163),T=f(102),P=f(351),E=f(162),S=f(7);u.a=class{constructor(R){this.model=R,this.view=new h.a,this.mapper=new w.a,this.modelToView=new C.a(this.model,{mapper:this.mapper,viewSelection:this.view.selection}),this._listener=Object.create(S.a),this._listener.listenTo(this.model,'change',(V,F,I)=>{this.modelToView.convertChange(F,I)},{priority:'low'}),this._listener.listenTo(this.model,'changesDone',()=>{const V=this.model.selection;this.modelToView.convertSelection(V),this.view.render()},{priority:'low'}),this._listener.listenTo(this.model.markers,'add',(V,F)=>{this.modelToView.convertMarker('addMarker',F.name,F.getRange())}),this._listener.listenTo(this.model.markers,'remove',(V,F)=>{this.modelToView.convertMarker('removeMarker',F.name,F.getRange())}),this._listener.listenTo(this.view,'selectionChange',f.i(P.a)(this.model,this.mapper)),this.modelToView.on('insert:$text',f.i(T.j)(),{priority:'lowest'}),this.modelToView.on('remove',f.i(T.k)(),{priority:'low'}),this.modelToView.on('selection',f.i(E.c)(),{priority:'low'}),this.modelToView.on('selection',f.i(E.d)(),{priority:'low'}),this.modelToView.on('selection',f.i(E.e)(),{priority:'low'}),this.modelToView.on('selection',f.i(E.f)(),{priority:'low'})}createRoot(R,V='main'){const F=this.view.createRoot(R,V),I=this.model.getRoot(V);return this.mapper.bindElements(I,F),F}destroy(){this.view.destroy(),this._listener.stopListening()}}},function(r,u,f){'use strict';function w(O){const R=[];Array.from(O.getItems({direction:'backward'})).map((V)=>T.a.createOn(V)).filter((V)=>{const F=(V.start.isAfter(O.start)||V.start.isEqual(O.start))&&(V.end.isBefore(O.end)||V.end.isEqual(O.end));return F}).forEach((V)=>{R.push(V.start.parent),f.i(S.c)(V)}),R.forEach((V)=>{for(let F=V;F.parent&&F.isEmpty;){const I=T.a.createOn(F);F=F.parent,f.i(S.c)(I)}})}var C=f(35),T=f(3),P=f(1),E=f(24),S=f(18);u.a=function(O){const R=new C.a,V=O.getFirstRange();if(!V||V.isCollapsed)return R;const F=V.start.root,I=V.start.getCommonPath(V.end),N=F.getNodeByPath(I);let M=V.start.parent==V.end.parent?V:T.a.createFromParentsAndOffsets(N,V.start.path[I.length],N,V.end.path[I.length]+1);const D=M.end.offset-M.start.offset;for(const q of M.getItems({shallow:!0}))q.is('textProxy')?R.appendChildren(new E.a(q.data,q.getAttributes())):R.appendChildren(q.clone(!0));if(M!=V){const q=V._getTransformedByMove(M.start,P.a.createAt(R,0),D)[0],z=new T.a(P.a.createAt(R),q.start),U=new T.a(q.end,P.a.createAt(R,'end'));w(U),w(z)}return R}},function(r,u,f){'use strict';var w=f(1),C=f(168),T=f(5),P=f(3),E=f(40);u.a=function(O,R,V,F){F||(F=O.model.batch()),V.isCollapsed||O.deleteContent(V,F,{merge:!0});const I=new S(O,F,V.anchor);let N;N=R.is('documentFragment')?R.getChildren():[R],I.handleNodes(N,{isFirst:!0,isLast:!0});const M=I.getSelectionRange();M?V.setRanges([M]):E.a.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')};class S{constructor(O,R,V){this.dataController=O,this.batch=R,this.position=V,this.canMergeWith=new Set([this.position.parent]),this.schema=O.model.schema}handleNodes(O,R){O=Array.from(O);for(let V=0;V!0);if(R.schema.check({name:'$text',inside:V.nextPosition}))return V.nextPosition}}function C(R,V){const F=R.position.textNode;if(F){const I=F.data;for(let N=R.position.offset-F.startOffset;f.i(O.a)(I,N)||'character'==V&&f.i(O.b)(I,N);)R.next(),N=R.position.offset-F.startOffset}return R.position}function T(R,V){const F=R.root,I=P.a.createAt(F,V?'end':0);return V?new S.a(R,I):new S.a(I,R)}var P=f(1),E=f(37),S=f(3),O=f(278);u.a=function(R,V,F={}){const I=R.model.schema,N='backward'!=F.direction,M=F.unit?F.unit:'character',D=V.focus,q=new E.a({boundaries:T(D,N),singleCharacters:!0,direction:N?'forward':'backward'}),z={walker:q,schema:I,isForward:N,unit:M};for(let U;U=q.next();){if(U.done)return;const $=w(z,U.value);if($)return void V.setFocus($)}}},function(r,u,f){'use strict';var h=f(61);u.a=class{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(C,T){C instanceof h.a&&(C=this._getSymbolForTextProxy(C)),this._consumable.has(C)||this._consumable.set(C,new Map),this._consumable.get(C).set(T,!0)}consume(C,T){return C instanceof h.a&&(C=this._getSymbolForTextProxy(C)),!!this.test(C,T)&&(this._consumable.get(C).set(T,!1),!0)}test(C,T){C instanceof h.a&&(C=this._getSymbolForTextProxy(C));const P=this._consumable.get(C);if(P===void 0)return null;const E=P.get(T);return void 0===E?null:E}revert(C,T){C instanceof h.a&&(C=this._getSymbolForTextProxy(C));const P=this.test(C,T);return!1===P?(this._consumable.get(C).set(T,!0),!0):!0!==P&&null}_getSymbolForTextProxy(C){let T=null;const P=this._textProxyRegistry.get(C.startOffset);if(P){const E=P.get(C.endOffset);E&&(T=E.get(C.parent))}return T||(T=this._addSymbolForTextProxy(C.startOffset,C.endOffset,C.parent)),T}_addSymbolForTextProxy(C,T,P){const E=Symbol();let S,O;return S=this._textProxyRegistry.get(C),S||(S=new Map,this._textProxyRegistry.set(C,S)),O=S.get(T),O||(O=new Map,S.set(T,O)),O.set(P,E),E}}},function(r,u,f){'use strict';var w=f(60);u.a=function(C,T){return(P,E)=>{const S=E.newSelection,O=new w.a,R=[];for(let V of S.getRanges())R.push(T.toModelRange(V));O.setRanges(R,S.isBackward),O.isEqual(C.selection)||C.enqueueChanges(()=>{C.selection.setTo(O)})}}},function(r,u,f){'use strict';var C=f(35),T=f(24),P=f(18);u.b=function(){return(E,S,O,R)=>{if(!S.output&&O.consume(S.input,{name:!0})){const V=R.convertChildren(S.input,O,S);S.output=new C.a(f.i(P.b)(V))}}},u.a=function(){return(E,S,O,R)=>{const V={name:'$text',inside:S.context};R.schema.check(V)&&O.consume(S.input)&&(S.output=new T.a(S.input.data))}}},function(r,u,f){'use strict';var h=f(12),w=f(0);class C{constructor(){this._consumables=new Map}add(P,E){let S;return P.is('text')||P.is('documentFragment')?void this._consumables.set(P,!0):void(this._consumables.has(P)?S=this._consumables.get(P):(S=new T,this._consumables.set(P,S)),S.add(E))}test(P,E){const S=this._consumables.get(P);return void 0===S?null:P.is('text')||P.is('documentFragment')?S:S.test(E)}consume(P,E){return!!this.test(P,E)&&(P.is('text')||P.is('documentFragment')?this._consumables.set(P,!1):this._consumables.get(P).consume(E),!0)}revert(P,E){const S=this._consumables.get(P);S!==void 0&&(P.is('text')||P.is('documentFragment')?this._consumables.set(P,!0):S.revert(E))}static consumablesFromElement(P){const E={name:!0,attribute:[],class:[],style:[]},S=P.getAttributeKeys();for(let V of S)'style'!=V&&'class'!=V&&E.attribute.push(V);const O=P.getClassNames();for(let V of O)E.class.push(V);const R=P.getStyleNames();for(let V of R)E.style.push(V);return E}static createFrom(P,E){if(E||(E=new C),P.is('text'))return E.add(P),E;P.is('element')&&E.add(P,C.consumablesFromElement(P)),P.is('documentFragment')&&E.add(P);for(let S of P.getChildren())E=C.createFrom(S,E);return E}}u.a=C;class T{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(P){for(let E in P.name&&(this._canConsumeName=!0),this._consumables)E in P&&this._add(E,P[E])}test(P){if(P.name&&!this._canConsumeName)return this._canConsumeName;for(let E in this._consumables)if(E in P){const S=this._test(E,P[E]);if(!0!==S)return S}return!0}consume(P){for(let E in P.name&&(this._canConsumeName=!1),this._consumables)E in P&&this._consume(E,P[E])}revert(P){for(let E in P.name&&(this._canConsumeName=!0),this._consumables)E in P&&this._revert(E,P[E])}_add(P,E){const S=f.i(h.a)(E)?E:[E],O=this._consumables[P];for(let R of S){if('attribute'===P&&('class'===R||'style'===R))throw new w.a('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');O.set(R,!0)}}_test(P,E){const S=f.i(h.a)(E)?E:[E],O=this._consumables[P];for(let R of S)if('attribute'===P&&('class'===R||'style'===R)){const V=this._test(R,[...this._consumables[R].keys()]);if(!0!==V)return V}else{const V=O.get(R);if(V===void 0)return null;if(!V)return!1}return!0}_consume(P,E){const S=f.i(h.a)(E)?E:[E],O=this._consumables[P];for(let R of S)'attribute'===P&&('class'===R||'style'===R)?this._consume(R,[...this._consumables[R].keys()]):O.set(R,!1)}_revert(P,E){const S=f.i(h.a)(E)?E:[E],O=this._consumables[P];for(let R of S)if('attribute'===P&&('class'===R||'style'===R))this._revert(R,[...this._consumables[R].keys()]);else{const V=O.get(R);!1===V&&O.set(R,!0)}}}},function(r,u,f){'use strict';function h(M){const D=new Set,q=new Map,z=new P.a({startPosition:T.a.createAt(M,0),ignoreElementEnd:!0});for(const U of z)'$marker'==U.item.name&&D.add(U.item);for(const U of D){const $=U.getAttribute('data-name'),K=T.a.createBefore(U);q.has($)?q.get($).end=T.a.createFromPosition(K):q.set($,new C.a(T.a.createFromPosition(K))),f.i(O.c)(C.a.createOn(U))}return q}var w=f(353),C=f(3),T=f(1),P=f(37),E=f(59),S=f(35),O=f(18),R=f(7),V=f(4),F=f(50),I=f(40);class N{constructor(M={}){this.conversionApi=f.i(F.a)({},M),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this)}convert(M,D={}){this.fire('viewCleanup',M);const q=w.a.createFrom(M);let z=this._convertItem(M,q,D);return z?(z.is('documentFragment')||(z=new S.a([z])),z.markers=h(z),z):new S.a}_convertItem(M,D,q={}){const z=f.i(F.a)({},q,{input:M,output:null});return M.is('element')?this.fire('element:'+M.name,z,D,this.conversionApi):M.is('text')?this.fire('text',z,D,this.conversionApi):this.fire('documentFragment',z,D,this.conversionApi),z.output&&!(z.output instanceof E.a||z.output instanceof S.a)?(I.a.warn('view-conversion-dispatcher-incorrect-result: Dropped incorrect conversion result.',[M,z.output]),null):z.output}_convertChildren(M,D,q={}){const z=Array.from(M.getChildren()),U=z.map(($)=>this._convertItem($,D,q)).filter(($)=>$ instanceof E.a||$ instanceof S.a).reduce(($,K)=>{return $.concat(K.is('documentFragment')?Array.from(K.getChildren()):K)},[]);return new S.a(U)}}u.a=N,f.i(V.a)(N,R.a)},function(r,u){'use strict';u.a=class{getHtml(w){const C=document.implementation.createHTMLDocument(''),T=C.createElement('div');return T.appendChild(w),T.innerHTML}}},function(r,u,f){'use strict';var h=f(165),w=f(103),C=f(104),T=f(105),P=f(106),E=f(166),S=f(107),O=f(109),R=f(167),V=f(110)},function(r,u,f){'use strict';function h(G,Z){const J=G.clone(),Q=J.operations[0];return Q.oldRange=Q.oldRange.getTransformedByDelta(Z)[0],Q.newRange=Q.newRange.getTransformedByDelta(Z)[0],[J]}function w(G,Z){function J(){const ne=new P.a(G.position.getShiftedBy(te),G.position.getShiftedBy(ae)),oe=new O.a(ne,Z.key,ee,Z.value,0);Q.addOperation(oe)}const Q=new I.a,X=G.nodes;let ee=X.getNode(0).getAttribute(Z.key),te=0,ae=X.getNode(0).offsetSize;for(let ne=1;ne{const Q=f.i(T.c)(G,Z,J);return G.range.containsPosition(Z.position)&&Q.push(w(Z,G)),Q}),f.i(T.b)(I.a,z.a,(G,Z,J)=>{const Q=new E.a(Z.position.root,Z.position.path.slice(0,-1)),X=f.i(T.c)(G,Z,J);for(let ee of G.operations)if(ee.range.containsPosition(Q)||ee.range.start.isEqual(Q)){const te=new I.a,ae=Q.getShiftedBy(1),ne=E.a.createFromPosition(ae);ne.path.push(0);const oe=Z._cloneOperation.nodes.getNode(0).getAttribute(ee.key);te.addOperation(new O.a(new P.a(ae,ne),ee.key,oe===void 0?null:oe,ee.newValue,0)),X.push(te);break}return X}),f.i(T.b)(N.a,D.a,(G,Z,J)=>{return G.position.isEqual(Z.position)?[Z.getReversed(),G.clone()]:f.i(T.c)(G,Z,J)}),f.i(T.b)(M.a,z.a,h),f.i(T.b)(M.a,D.a,h),f.i(T.b)(M.a,$.a,h),f.i(T.b)(M.a,K.a,h),f.i(T.b)(M.a,q.a,h),f.i(T.b)(M.a,W.a,h),f.i(T.b)(q.a,D.a,(G,Z,J)=>{const Q=G.sourcePosition.root==Z.position.root&&'same'===f.i(Y.a)(G.sourcePosition.getParentPath(),Z.position.getParentPath()),X=G.sourcePosition.offset<=Z.position.offset&&G.sourcePosition.offset+G.howMany>Z.position.offset;return Q&&X?[Z.getReversed(),G.clone()]:f.i(T.c)(G,Z,J)}),f.i(T.b)(D.a,N.a,(G,Z,J)=>{return G.position.isEqual(Z.position)?[C()]:f.i(T.c)(G,Z,J)}),f.i(T.b)(D.a,q.a,(G,Z,J)=>{const Q=G.position.root==Z.sourcePosition.root&&'same'===f.i(Y.a)(G.position.getParentPath(),Z.sourcePosition.getParentPath()),X=Z.sourcePosition.offset<=G.position.offset&&Z.sourcePosition.offset+Z.howMany>G.position.offset;return Q&&X?[C()]:f.i(T.c)(G,Z,J)}),f.i(T.b)(z.a,z.a,(G,Z,J)=>{const Q=G.position.getParentPath(),X=Z.position.getParentPath();if('same'==f.i(Y.a)(Q,X)){if(G.position.offset==Z.position.offset)return[C()];if(G.position.offsetZ._cloneOperation.sourcePosition.offset&&ee._cloneOperation.sourcePosition.offset--,[ee]}const ee=G.clone();return ee._cloneOperation.position.offset++,ee._moveOperation.sourcePosition.path[ee._moveOperation.sourcePosition.path.length-2]++,ee._moveOperation.targetPosition.path[ee._moveOperation.targetPosition.path.length-2]++,ee._moveOperation.sourcePosition.offset=G.position.offset-Z.position.offset,G._cloneOperation instanceof V.a&&Z._cloneOperation instanceof V.a&&G._cloneOperation.sourcePosition.offset>Z._cloneOperation.sourcePosition.offset&&ee._cloneOperation.sourcePosition.offset--,[ee]}return f.i(T.c)(G,Z,J)}),f.i(T.b)(z.a,K.a,(G,Z,J)=>{return'same'===f.i(Y.a)(Z.position.path,G.position.getParentPath())?[C()]:f.i(T.c)(G,Z,J)}),f.i(T.b)(z.a,$.a,(G,Z,J)=>{const Q='same'===f.i(Y.a)(G.position.getParentPath(),Z.range.start.getParentPath()),X=Z.range.start.offset=G.position.offset;if(Q&&X)return[C()];if('same'===f.i(Y.a)(G.position.getParentPath(),Z.range.end.getShiftedBy(-1).path)){const ee=G.clone(),te=E.a.createFromPosition(Z.range.start);te.path.push(Z.howMany-1);const ae=te.getShiftedBy(1);ee._cloneOperation.position=ae;const ne=E.a.createFromPosition(te);ne.path.push(G.position.offset),ee._moveOperation.sourcePosition=ne;const oe=E.a.createFromPosition(ae);return oe.path.push(0),ee._moveOperation.targetPosition=oe,[ee]}return f.i(T.c)(G,Z,J)}),f.i(T.b)(z.a,I.a,(G,Z)=>{G=G.clone();const J=new E.a(G.position.root,G.position.path.slice(0,-1));if(G._cloneOperation instanceof R.a)for(let Q of Z.operations)if(Q.range.containsPosition(J)||Q.range.start.isEqual(J)){null===Q.newValue?G._cloneOperation.nodes.getNode(0).removeAttribute(Q.key):G._cloneOperation.nodes.getNode(0).setAttribute(Q.key,Q.newValue);break}return[G]}),f.i(T.b)(K.a,z.a,(G,Z,J)=>{if('same'===f.i(Y.a)(G.position.path,Z.position.getParentPath())){const Q=[Z.getReversed(),G.clone()];return Q[1].operations[1].targetPosition.path[0]++,Q}return f.i(T.c)(G,Z,J)}),f.i(T.b)(U.a,I.a,(G,Z)=>{const J=[G.clone()];return Z.range.containsPosition(G.position)&&J.push(w(G,Z)),J}),f.i(T.b)($.a,z.a,(G,Z,J)=>{const Q='same'===f.i(Y.a)(G.range.start.getParentPath(),Z.position.getParentPath()),X=G.range.start.offset=Z.position.offset;if(Q&&X)return[Z.getReversed(),G.clone()];if('same'===f.i(Y.a)(Z.position.getParentPath(),G.range.end.getShiftedBy(-1).path)){const ee=G.clone();return ee._insertOperation.position.offset++,ee._moveOperation.howMany++,ee._moveOperation.targetPosition.path[ee._moveOperation.targetPosition.path.length-2]++,[ee]}return f.i(T.c)(G,Z,J)}),f.i(T.b)(W.a,z.a,(G,Z,J)=>{const Q=new E.a(Z.position.root,Z.position.path.slice(0,-1)),X=f.i(T.c)(G,Z,J);if(G.operations[0].position.isEqual(Q)){const ee=G.clone();ee.operations[0].position=G.operations[0].position.getShiftedBy(1),X.push(ee)}return X}),f.i(T.b)(z.a,W.a,(G,Z)=>{G=G.clone();const J=new E.a(G.position.root,G.position.path.slice(0,-1));return G._cloneOperation instanceof R.a&&Z.operations[0].position.isEqual(J)&&(G._cloneOperation.nodes.getNode(0).name=Z.operations[0].newName),[G]}),f.i(T.b)(H.a,z.a,(G,Z,J)=>{const Q=f.i(T.c)(G,Z,J),X=Z._cloneOperation.position;for(let ee of Q)for(let te of ee.operations){const ae=te.sourcePosition.getShiftedBy(te.howMany);ae.isEqual(X)&&(te.howMany+=1)}return Q}),f.i(T.b)(z.a,H.a,(G,Z,J)=>{Z=Z.clone();const Q=G._cloneOperation.position;for(let X of Z.operations){const ee=X.sourcePosition.getShiftedBy(X.howMany);ee.isEqual(Q)&&(X.howMany+=1)}return f.i(T.c)(G,Z,J)})},function(r,u,f){'use strict';function h(O,R,V,F){const I=O.document,N=new S,M=new P.a(R,V,F,I.markers,I.version);O.addDelta(N),N.addOperation(M),I.applyOperation(M)}var w=f(20),C=f(17),T=f(16),P=f(112),E=f(0);class S extends w.a{get type(){return'marker'}get _reverseDeltaClass(){return S}static get className(){return'engine.model.delta.MarkerDelta'}}u.a=S,f.i(T.b)('setMarker',function(O,R){const V='string'==typeof O?O:O.name,F=this.document.markers.get(V);if(!R&&!F)throw new E.a('batch-setMarker-no-range: Range parameter is required when adding a new marker.');const I=F?F.getRange():null;return R?h(this,V,I,R):h(this,V,null,I),this}),f.i(T.b)('removeMarker',function(O){const R='string'==typeof O?O:O.name;if(!this.document.markers.has(R))throw new E.a('batch-removeMarker-no-marker: Trying to remove marker that does not exist.');const V=this.document.markers.get(R).getRange();return h(this,R,V,null),this}),C.a.register(S)},function(r,u,f){'use strict';function h(W){const H=W.textNode;if(H){const Y=H.data,G=W.offset-H.startOffset;return!f.i(U.a)(Y,G)&&!f.i(U.b)(Y,G)}return!0}function*w(W,H){for(let Y=!1;!Y;){if(Y=!0,W){const G=W.next();G.done||(Y=!1,yield{walker:W,value:G.value})}if(H){const G=H.next();G.done||(Y=!1,yield{walker:H,value:G.value})}}}var C=f(356),T=f(357),P=f(3),E=f(1),S=f(365),O=f(16),R=f(360),V=f(361),F=f(366),I=f(37),N=f(362),M=f(96),D=f(7),q=f(0),z=f(4),U=f(278);const $='$graveyard';class K{constructor(){this.version=0,this.schema=new F.a,this.history=new R.a(this),this.markers=new N.a,this.selection=new V.a(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(let W of this.selection.getRanges())if(!this._validateSelectionRange(W))throw new q.a('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:W})}),this.createRoot('$root',$)}get graveyard(){return this.getRoot($)}applyOperation(W){if(W.baseVersion!==this.version)throw new q.a('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:W});let H=W._execute();this.version++,this.history.addDelta(W.delta),H&&this.fire('change',W.type,H,W.delta.batch,W.delta.type)}batch(W){return new O.a(this,W)}createRoot(W='$root',H='main'){if(this.roots.has(H))throw new q.a('model-document-createRoot-name-exists: Root with specified name already exists.',{name:H});const Y=new S.a(this,W,H);return this.roots.set(H,Y),Y}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges(W){if(this._pendingChanges.push(W),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot(W='main'){if(!this.roots.has(W))throw new q.a('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:W});return this.roots.get(W)}hasRoot(W){return this.roots.has(W)}getRootNames(){return Array.from(this.roots.keys()).filter((W)=>W!=$)}getNearestSelectionRange(W,H='both'){if(this.schema.check({name:'$text',inside:W}))return new P.a(W);let Y,G;('both'==H||'backward'==H)&&(Y=new I.a({startPosition:W,direction:'backward'})),('both'==H||'forward'==H)&&(G=new I.a({startPosition:W}));for(let Z of w(Y,G)){const J=Z.walker==Y?'elementEnd':'elementStart',Q=Z.value;if(Q.type==J&&this.schema.objects.has(Q.item.name))return P.a.createOn(Q.item);if(this.schema.check({name:'$text',inside:Q.nextPosition}))return new P.a(Q.nextPosition)}return null}toJSON(){const W=f.i(M.a)(this);return W.selection='[engine.model.LiveSelection]',W}_getDefaultRoot(){for(let W of this.roots.values())if(W!==this.graveyard)return W;return this.graveyard}_getDefaultRange(){const W=this._getDefaultRoot(),H=new E.a(W,[0]),Y=this.getNearestSelectionRange(H);return Y||new P.a(H)}_validateSelectionRange(W){return h(W.start)&&h(W.end)}}u.a=K,f.i(z.a)(K,D.a)},function(r,u,f){'use strict';var h=f(0);u.a=class{constructor(){this._deltas=[],this._historyPoints=new Map}addDelta(C){if(0=T)break;yield E}}}getDelta(C){let T=this._historyPoints.get(C);if(T===void 0)return null;const P=[];for(T;TC&&this._historyPoints.set(S,this._historyPoints.get(S)+E)}}_getIndex(C){let T=this._historyPoints.get(C);if(T===void 0){const P=this._deltas[this._deltas.length-1],E=P.baseVersion+P.operations.length;if(0>C||C>=E)return-1;throw new h.a('model-history-wrong-version: Given base version points to the middle of a delta.')}return T}}},function(r,u,f){'use strict';function h(M){return M instanceof E.a||M instanceof P.a?M.getAttributes():null}var w=f(1),C=f(3),T=f(111),P=f(24),E=f(61),S=f(152),O=f(0),R=f(40),V=f(60);const F='selection:',I=new Set(['addAttribute','removeAttribute','changeAttribute','addRootAttribute','removeRootAttribute','changeRootAttribute']);class N extends V.a{constructor(M){super(),this._document=M,this._attributePriority=new Map,this.listenTo(this._document,'change',(D,q)=>{I.has(q)&&this._updateAttributes(!1)})}get isCollapsed(){const M=this._ranges.length;return!(0!==M)||super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().start}get rangeCount(){return this._ranges.length?this._ranges.length:1}destroy(){for(let M=0;M{D.root==this._document.graveyard&&this._fixGraveyardSelection(D,z),this.fire('change:range',{directChange:!1})}),D}_updateAttributes(M){const D=f.i(S.a)(this._getSurroundingAttributes()),q=f.i(S.a)(this.getAttributes());if(M)this._attributePriority=new Map,this._attrs=new Map;else for(let[U,$]of this._attributePriority)'low'==$&&(this._attrs.delete(U),this._attributePriority.delete(U));this._setAttributesTo(D,!1);const z=[];for(let[U,$]of this.getAttributes())q.has(U)&&q.get(U)===$||z.push(U);for(let[U]of q)this.hasAttribute(U)||z.push(U);0{return new S.a(K,z.key,z.oldValue,z.newValue,z.baseVersion)})},AttributeOperation(z,U,$){if(z.key===U.key){let K=z.range.getDifference(U.range).map((H)=>{return new S.a(H,z.key,z.oldValue,z.newValue,z.baseVersion)});const W=z.range.getIntersection(U.range);return W&&($?K.push(new S.a(W,U.key,U.newValue,z.newValue,z.baseVersion)):0===K.length&&K.push(new N.a(0))),K}return[z.clone()]},RootAttributeOperation:w,RenameOperation:w,MarkerOperation:w,MoveOperation(z,U){const $=M.a.createFromPositionAndShift(U.sourcePosition,U.howMany);let K=[];U instanceof I.a&&U._needsHolderElement&&z.range.root==U.targetPosition.root&&z.range.start.path[0]>=U._holderElementOffset&&(z=z.clone(),z.range.start.path[0]++,z.range.end.path[0]++);const W=P(z.range.getDifference($)),H=z.range.getIntersection($);return null!==W&&(W.start=W.start._getTransformedByDeletion(U.sourcePosition,U.howMany),W.end=W.end._getTransformedByDeletion(U.sourcePosition,U.howMany),K=W._getTransformedByInsertion(U.getMovedRangeStart(),U.howMany,!0,!1).reverse()),null!==H&&(H.start=H.start._getCombined(U.sourcePosition,U.getMovedRangeStart()),H.end=H.end._getCombined(U.sourcePosition,U.getMovedRangeStart()),K.push(H)),K.map((Y)=>{return new S.a(Y,z.key,z.oldValue,z.newValue,z.baseVersion)})}},RootAttributeOperation:{InsertOperation:w,AttributeOperation:w,RootAttributeOperation(z,U,$){return z.root!==U.root||z.key!==U.key||(z.newValue===U.newValue||$)&&z.newValue!==U.newValue?[z.clone()]:[new N.a(z.baseVersion)]},RenameOperation:w,MarkerOperation:w,MoveOperation:w},RenameOperation:{InsertOperation(z,U){const $=z.clone();return $.position=$.position._getTransformedByInsertion(U.position,U.nodes.maxOffset,!0),[$]},AttributeOperation:w,RootAttributeOperation:w,RenameOperation(z,U,$){const K=z.clone();if(z.position.isEqual(U.position))if($)K.oldName=U.newName;else return[new N.a(z.baseVersion)];return[K]},MarkerOperation:w,MoveOperation(z,U){const $=z.clone(),K=$.position.isEqual(U.sourcePosition);return $.position=$.position._getTransformedByMove(U.sourcePosition,U.targetPosition,U.howMany,!0,K),[$]}},MarkerOperation:{InsertOperation(z,U){const $=z.clone();return $.oldRange&&($.oldRange=$.oldRange._getTransformedByInsertion(U.position,U.nodes.maxOffset,!1,!1)[0]),$.newRange&&($.newRange=$.newRange._getTransformedByInsertion(U.position,U.nodes.maxOffset,!1,!1)[0]),[$]},AttributeOperation:w,RootAttributeOperation:w,RenameOperation:w,MarkerOperation(z,U,$){const K=z.clone();if(z.name==U.name)if($)K.oldRange=U.newRange;else return[new N.a(z.baseVersion)];return[K]},MoveOperation(z,U){const $=z.clone();if($.oldRange){const K=$.oldRange._getTransformedByMove(U.sourcePosition,U.targetPosition,U.howMany);$.oldRange=M.a.createFromRanges(K)}if($.newRange){const K=$.newRange._getTransformedByMove(U.sourcePosition,U.targetPosition,U.howMany);$.newRange=M.a.createFromRanges(K)}return[$]}},MoveOperation:{InsertOperation(z,U,$){let K=M.a.createFromPositionAndShift(z.sourcePosition,z.howMany);K=K._getTransformedByInsertion(U.position,U.nodes.maxOffset,!1,z.isSticky)[0];let W=new z.constructor(K.start,K.end.offset-K.start.offset,z instanceof I.a?z.baseVersion:z.targetPosition._getTransformedByInsertion(U.position,U.nodes.maxOffset,!$),z instanceof I.a?void 0:z.baseVersion);return W.isSticky=z.isSticky,z instanceof I.a&&(W._needsHolderElement=z._needsHolderElement,W._holderElementOffset=z._holderElementOffset),[W]},AttributeOperation:w,RootAttributeOperation:w,RenameOperation:w,MarkerOperation:w,MoveOperation(z,U,$){if(T(z,U)&&T(U,z))return[U.getReversed()];if(z instanceof I.a&&U instanceof I.a){const ee=z.targetPosition.path[0],te=U.targetPosition.path[0];(ee>te||ee==te&&$)&&(z=z.clone(),z.targetPosition.path[0]++)}z instanceof I.a&&!(U instanceof I.a)?$=!0:!(z instanceof I.a)&&U instanceof I.a&&($=!1);const K=M.a.createFromPositionAndShift(z.sourcePosition,z.howMany),W=M.a.createFromPositionAndShift(U.sourcePosition,U.howMany);let H=[],Y=P(K.getDifference(W));Y&&(Y.start=Y.start._getTransformedByMove(U.sourcePosition,U.targetPosition,U.howMany,!z.isSticky,!1),Y.end=Y.end._getTransformedByMove(U.sourcePosition,U.targetPosition,U.howMany,z.isSticky,!1),H.push(Y));const G=K.getIntersection(W);let Z=f.i(D.a)(z.sourcePosition.getParentPath(),U.sourcePosition.getParentPath()),J=K.containsPosition(U.targetPosition)||K.start.isEqual(U.targetPosition)&&z.isSticky||K.end.isEqual(U.targetPosition)&&z.isSticky,Q=W.containsRange(K)&&(W.containsPosition(z.targetPosition)||W.start.isEqual(z.targetPosition)||W.end.isEqual(z.targetPosition));if(null!==G&&('extension'===Z||'same'===Z&&$||Q)&&!J&&(G.start=G.start._getCombined(U.sourcePosition,U.getMovedRangeStart()),G.end=G.end._getCombined(U.sourcePosition,U.getMovedRangeStart()),Y&&K.start.isBefore(W.start)?H.push(G):H.unshift(G)),0===H.length)return z instanceof I.a?(z=z.clone(),z.howMany=0,z.sourcePosition=U.targetPosition,[z]):[new N.a(z.baseVersion)];let X=z.targetPosition._getTransformedByMove(U.sourcePosition,U.targetPosition,U.howMany,!$,U.isSticky||Q);return H.reverse().map((ee,te)=>{let ae=new z.constructor(ee.start,ee.end.offset-ee.start.offset,z instanceof I.a?z.baseVersion:X,z instanceof I.a?void 0:z.baseVersion);return ae.isSticky=z.isSticky,z instanceof I.a&&(ae._needsHolderElement=z._needsHolderElement&&0===te,ae._holderElementOffset=z._holderElementOffset),ae})}}}},function(r,u,f){'use strict';var h=f(5);class w extends h.a{constructor(C,T,P='main'){super(T),this._doc=C,this.rootName=P}get document(){return this._doc}is(C,T){return T?'rootElement'==C&&T==this.name||super.is(C,T):'rootElement'==C||super.is(C)}toJSON(){return this.rootName}}u.a=w},function(r,u,f){'use strict';function h(V,F,I){for(let N=I.length-1,M=F.length-1;0<=N&&0<=M;){const D=F[M];if(!V.hasItem(D))return!1;const q=V._extensionChains.get(D);if(q.includes(I[N]))N--,M--;else return!1}return!0}var w=f(1),C=f(5),T=f(96),P=f(12),E=f(149),S=f(0);class O{constructor(){this.objects=new Set,this.limits=new Set,this._items=new Map,this._extensionChains=new Map,this.registerItem('$root'),this.registerItem('$block'),this.registerItem('$inline'),this.registerItem('$text','$inline'),this.allow({name:'$block',inside:'$root'}),this.allow({name:'$inline',inside:'$block'}),this.registerItem('$clipboardHolder','$root'),this.allow({name:'$inline',inside:'$clipboardHolder'})}allow(V){this._getItem(V.name).allow(O._normalizeQueryPath(V.inside),V.attributes)}disallow(V){this._getItem(V.name).disallow(O._normalizeQueryPath(V.inside),V.attributes)}requireAttributes(V,F){this._getItem(V).requireAttributes(F)}check(V){if(!this.hasItem(V.name))return!1;f.i(P.a)(V.attributes)?0===V.attributes.length&&V.attributes.push(void 0):V.attributes=[V.attributes];const F=O._normalizeQueryPath(V.inside),I=this._extensionChains.get(V.name).map((N)=>{return this._getItem(N)});if(!this._getItem(V.name)._checkRequiredAttributes(V.attributes))return!1;for(let N of V.attributes)for(let M of I)if(M._hasMatchingPath('disallow',F,N))return!1;for(let N of V.attributes){let M=!1;for(let D of I)if(D._hasMatchingPath('allow',F,N)){M=!0;break}if(!M)return!1}return!0}hasItem(V){return this._items.has(V)}registerItem(V,F){if(this.hasItem(V))throw new S.a('model-schema-item-exists: Item with specified name already exists in schema.');if(!!F&&!this.hasItem(F))throw new S.a('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(V,new R(this));const I=this.hasItem(F)?this._extensionChains.get(F).concat(V):[V];this._extensionChains.set(V,I)}itemExtends(V,F){if(!this.hasItem(V)||!this.hasItem(F))throw new S.a('model-schema-no-item: Item with specified name does not exist in schema.');const I=this._extensionChains.get(V);return I.some((N)=>N==F)}_getItem(V){if(!this.hasItem(V))throw new S.a('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(V)}static _normalizeQueryPath(V){let F=[];if(f.i(P.a)(V))for(let I of V)I instanceof C.a?F.push(I.name):f.i(E.a)(I)&&F.push(I);else if(V instanceof w.a){for(let I=V.parent;null!==I;)F.push(I.name),I=I.parent;F.reverse()}else f.i(E.a)(V)&&(F=V.split(' '));return F}}u.a=O;class R{constructor(V){this._schema=V,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(V,F){this._addPath('_allowed',V,F)}disallow(V,F){this._addPath('_disallowed',V,F)}requireAttributes(V){this._requiredAttributes.push(V)}_addPath(V,F,I){F=F.slice(),f.i(P.a)(I)||(I=[I]);for(let N of I)this[V].push({path:F,attribute:N})}_getPaths(V,F){const I='allow'===V?this._allowed:this._disallowed,N=[];for(let M of I)M.attribute===F&&N.push(M.path);return N}_checkRequiredAttributes(V){let F=!0;for(let I of this._requiredAttributes){F=!0;for(let N of I)if(-1==V.indexOf(N)){F=!1;break}if(F)break}return F}_hasMatchingPath(V,F,I){const N=this._getPaths(V,I);for(const M of N)if(h(this._schema,F,M))return!0;return!1}toJSON(){const V=f.i(T.a)(this);return V._schema='[model.Schema]',V}}},function(r,u,f){'use strict';var h=f(64),w=f(375),C=f(169),T=f(173),P=f(62),E=f(40),S=f(172),O=f(373),R=f(370),V=f(371),F=f(369),I=f(4),N=f(33);class M{constructor(){this.domRoots=new Map,this.selection=new h.a,this.domConverter=new C.a,this.roots=new Map,this.set('isFocused',!1),this.renderer=new w.a(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this,'isFocused'),this._observers=new Map,this.addObserver(S.a),this.addObserver(O.a),this.addObserver(R.a),this.addObserver(V.a),this.addObserver(F.a),f.i(P.h)(this),this.on('render',()=>{this.disableObservers(),this.renderer.render(),this.enableObservers()})}addObserver(D){let q=this._observers.get(D);if(q)return q;q=new D(this),this._observers.set(D,q);for(let[z,U]of this.domRoots)q.observe(U,z);return q.enable(),q}getObserver(D){return this._observers.get(D)}createRoot(D,q='main'){const z='string'==typeof D?D:D.tagName,U=new T.a(z.toLowerCase(),q);return U.document=this,this.roots.set(q,U),U.on('change:children',($,K)=>this.renderer.markToSync('children',K)),U.on('change:attributes',($,K)=>this.renderer.markToSync('attributes',K)),U.on('change:text',($,K)=>this.renderer.markToSync('text',K)),this.domConverter.isElement(D)&&this.attachDomRoot(D,q),U}attachDomRoot(D,q='main'){const z=this.getRoot(q);this.domRoots.set(q,D),this.domConverter.bindElements(D,z),this.renderer.markToSync('children',z),this.renderer.domDocuments.add(D.ownerDocument);for(let U of this._observers.values())U.observe(D,q)}getRoot(D='main'){return this.roots.get(D)}getDomRoot(D='main'){return this.domRoots.get(D)}render(){this.fire('render')}focus(){if(!this.isFocused){const D=this.selection.editableElement;D?(this.domConverter.focus(D),this.render()):E.a.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}disableObservers(){for(let D of this._observers.values())D.disable()}enableObservers(){for(let D of this._observers.values())D.enable()}destroy(){for(let D of this._observers.values())D.destroy()}}u.a=M,f.i(I.a)(M,N.a)},function(r,u,f){'use strict';var h=f(63);class w extends h.a{constructor(C){super(C),this.domEventType='click'}onDomEvent(C){this.fire(C.type,C)}}u.a=w},function(r,u,f){'use strict';function h(S){return S==T.d.arrowright||S==T.d.arrowleft||S==T.d.arrowup||S==T.d.arrowdown}var w=f(53),C=f(64),T=f(22),P=f(143);class E extends w.a{constructor(S){super(S),this._fireSelectionChangeDoneDebounced=f.i(P.a)((O)=>this.document.fire('selectionChangeDone',O),200)}observe(){const S=this.document;S.on('keydown',(O,R)=>{const V=S.selection;V.isFake&&h(R.keyCode)&&this.isEnabled&&(R.preventDefault(),this._handleSelectionMove(R.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(S){const O=this.document.selection,R=C.a.createFromSelection(O);R.setFake(!1),(S==T.d.arrowleft||S==T.d.arrowup)&&R.collapseToStart(),(S==T.d.arrowright||S==T.d.arrowdown)&&R.collapseToEnd();const V={oldSelection:O,newSelection:R,domSelection:null};this.document.fire('selectionChange',V),this._fireSelectionChangeDoneDebounced(V)}}u.a=E},function(r,u,f){'use strict';var h=f(63);class w extends h.a{constructor(C){super(C),this.domEventType=['focus','blur'],this.useCapture=!0,C.on('focus',()=>{C.isFocused=!0,this._renderTimeoutId=setTimeout(()=>C.render(),0)}),C.on('blur',(T,P)=>{const E=C.selection.editableElement;(null===E||E===P.target)&&(C.isFocused=!1,C.render())})}onDomEvent(C){this.fire(C.type,C)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}u.a=w},function(r,u,f){'use strict';var h=f(63),w=f(22);class C extends h.a{constructor(T){super(T),this.domEventType='keydown'}onDomEvent(T){this.fire('keydown',T,{keyCode:T.keyCode,altKey:T.altKey,ctrlKey:T.ctrlKey||T.metaKey,shiftKey:T.shiftKey,get keystroke(){return f.i(w.c)(this)}})}}u.a=C},function(r,u,f){'use strict';var h=f(63);class w extends h.a{constructor(C){super(C),this.domEventType='mousedown'}onDomEvent(C){this.fire(C.type,C)}}u.a=w},function(r,u,f){'use strict';var h=f(53),w=f(172),C=f(40),T=f(143);class P extends h.a{constructor(E){super(E),this.mutationObserver=E.getObserver(w.a),this.document=E,this.selection=E.selection,this.domConverter=E.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=f.i(T.a)((S)=>this.document.fire('selectionChangeDone',S),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(E){const S=E.ownerDocument;this._documents.has(S)||(this.listenTo(S,'selectionchange',()=>{this._handleSelectionChange(S)}),this._documents.add(S))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(E){if(this.isEnabled&&this.document.isFocused){this.mutationObserver.flush();const S=E.defaultView.getSelection(),O=this.domConverter.domSelectionToView(S);if(!this.selection.isEqual(O)){if(60<++this._loopbackCounter)return void C.a.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');const R={oldSelection:this.selection,newSelection:O,domSelection:S};this.document.fire('selectionChange',R),this._fireSelectionChangeDoneDebounced(R)}}}_clearInfiniteLoop(){this._loopbackCounter=0}}u.a=P},function(r,u,f){'use strict';function w(I){const N=I.document;I.removeClass('ck-placeholder'),I.removeAttribute('data-placeholder'),F.has(N)&&F.get(N).delete(I)}function C(I){const N=F.get(I);for(let[M,D]of N)T(M,D)}function T(I,N){const M=I.document;if(M){const D=M.selection,q=D.anchor;return N&&!N()?void I.removeClass('ck-placeholder'):M.isFocused||I.childCount?void(!I.childCount&&q&&q.parent!==I?I.addClass('ck-placeholder'):I.removeClass('ck-placeholder')):void I.addClass('ck-placeholder')}}var P=f(50),E=f(7),S=f(0),O=f(320),R=f.n(O);u.a=function(I,N,M){const D=I.document;if(!D)throw new S.a('view-placeholder-element-is-detached: Provided element is not placed in document.');w(I),F.has(D)||(F.set(D,new Map),V.listenTo(D,'render',()=>C(D),{priority:'high'})),I.setAttribute('data-placeholder',N),F.get(D).set(I,M),T(I,M)};const V={};f.i(P.a)(V,E.a);const F=new WeakMap},function(r,u,f){'use strict';function h(D,q){return!D.isCollapsed&&w(D).isEqual(w(q))}function w(D){const q=P.a.createFromSelection(D),z=q.getRanges();let U=[];for(let $ of z)U.push($.getTrimmed());return q.setRanges(U,q.isBackward),q}var C=f(31),T=f(26),P=f(64),E=f(62),S=f(4),O=f(190),R=f(435),V=f(438),F=f(40),I=f(33),N=f(0);class M{constructor(D,q){this.domDocuments=new Set,this.domConverter=D,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=q,this._inlineFiller=null,this.isFocused=!1,this._fakeSelectionContainer=null}markToSync(D,q){if('text'===D)this.domConverter.getCorrespondingDom(q.parent)&&this.markedTexts.add(q);else{if(!this.domConverter.getCorrespondingDom(q))return;if('attributes'===D)this.markedAttributes.add(q);else if('children'===D)this.markedChildren.add(q);else throw new N.a('view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.')}}render(){let D;this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?D=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(D=this.selection.getFirstPosition(),this.markedChildren.add(D.parent));for(let q of this.markedTexts)!this.markedChildren.has(q.parent)&&this.domConverter.getCorrespondingDom(q.parent)&&this._updateText(q,{inlineFillerPosition:D});for(let q of this.markedAttributes)this._updateAttrs(q);for(let q of this.markedChildren)this._updateChildren(q,{inlineFillerPosition:D});this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear(),this._inlineFiller=this._getInlineFillerNode(D)}_getInlineFillerNode(D){if(!D)return void(this._inlineFiller=null);const q=this.domConverter.viewPositionToDom(D);if(!q||!f.i(E.c)(q.parent))throw new N.a('view-renderer-cannot-find-filler: Cannot find filler node by its position.');return q.parent}_getInlineFillerPosition(){const D=this.selection.getFirstPosition();return D.parent.is('text')?T.a.createBefore(this.selection.getFirstPosition().parent):D}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const D=this.selection.getFirstPosition(),q=this.domConverter.viewPositionToDom(D);return q&&this.domConverter.isText(q.parent)&&f.i(E.c)(q.parent)}_removeInlineFiller(){const D=this._inlineFiller;if(!f.i(E.c)(D))throw new N.a('view-renderer-filler-was-lost: The inline filler node was lost.');f.i(E.f)(D)?D.parentNode.removeChild(D):D.data=D.data.substr(E.d),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const D=this.selection.getFirstPosition(),q=D.parent,z=D.offset;if(!this.domConverter.getCorrespondingDomElement(q.root))return!1;if(!q.is('element'))return!1;if(z===q.getFillerOffset())return!1;const U=D.nodeBefore,$=D.nodeAfter;return U instanceof C.a||$ instanceof C.a?!1:!0}_updateText(D,q){const z=this.domConverter.getCorrespondingDom(D),U=this.domConverter.viewToDom(D,z.ownerDocument),$=z.data;let K=U.data;const W=q.inlineFillerPosition;W&&W.parent==D.parent&&W.offset==D.index&&(K=E.i+K),$!=K&&(z.data=K)}_updateAttrs(D){const q=this.domConverter.getCorrespondingDom(D),z=Array.from(q.attributes).map(($)=>$.name),U=D.getAttributeKeys();for(let $ of U)q.setAttribute($,D.getAttribute($));for(let $ of z)D.hasAttribute($)||q.removeAttribute($)}_updateChildren(D,q){function z(J,Q){if(J===Q)return!0;return U.isText(J)&&U.isText(Q)?J.data===Q.data:f.i(E.e)(J,U.blockFiller)&&f.i(E.e)(Q,U.blockFiller)}const U=this.domConverter,$=U.getCorrespondingDom(D);if($){const K=$.ownerDocument,W=q.inlineFillerPosition,H=$.childNodes,Y=Array.from(U.viewChildrenToDom(D,K,{bind:!0}));if(W&&W.parent==D){const J=Y[W.offset];this.domConverter.isText(J)?J.data=E.i+J.data:Y.splice(W.offset,0,K.createTextNode(E.i))}const G=f.i(O.a)(H,Y,z);let Z=0;for(let J of G)'insert'===J?(f.i(R.a)($,Z,Y[Z]),Z++):'delete'===J?(this.domConverter.unbindDomElement(H[Z]),f.i(V.a)(H[Z])):Z++}}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const D=this.domConverter.getCorrespondingDomElement(this.selection.editableElement);this.isFocused&&D&&(this.selection.isFake?this._updateFakeSelection(D):(this._removeFakeSelection(),this._updateDomSelection(D)))}_updateFakeSelection(D){const q=D.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=q.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(q.createTextNode('\xA0'))),this._fakeSelectionContainer.parentElement||D.appendChild(this._fakeSelectionContainer);const z=this.selection.fakeSelectionLabel||'\xA0';this._fakeSelectionContainer.firstChild.data=z;const U=q.getSelection();U.removeAllRanges();const $=q.createRange();$.selectNodeContents(this._fakeSelectionContainer),U.addRange($),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(D){const q=D.ownerDocument.defaultView.getSelection(),z=q&&this.domConverter.domSelectionToView(q);if(!(z&&this.selection.isEqual(z))){if(z&&h(z,this.selection)){const K={oldSelection:z,currentSelection:this.selection};return void F.a.warn('renderer-skipped-selection-rendering: The selection was not rendered due to its similarity to the current one.',K)}const U=this.domConverter.viewPositionToDom(this.selection.anchor),$=this.domConverter.viewPositionToDom(this.selection.focus);q.collapse(U.parent,U.offset),q.extend($.parent,$.offset)}}_removeDomSelection(){for(let D of this.domDocuments){const q=D.getSelection();if(q.rangeCount){const z=D.activeElement,U=this.domConverter.getCorrespondingViewElement(z);z&&U&&D.getSelection().removeAllRanges()}}}_removeFakeSelection(){const D=this._fakeSelectionContainer;D&&D.remove()}_updateFocus(){if(this.isFocused){const D=this.selection.editableElement;D&&this.domConverter.focus(D)}}}u.a=M,f.i(S.a)(M,I.a)},function(r,u,f){'use strict';var h=f(0);class w{constructor(C,T,P){if(this.textNode=C,0>T||T>C.data.length)throw new h.a('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>P||T+P>C.data.length)throw new h.a('view-textproxy-wrong-length: Given length value is incorrect.');this.data=C.data.substring(T,T+P),this.offsetInText=T}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(C){return'textProxy'==C}getAncestors(C={includeNode:!1,parentFirst:!1}){const T=[];for(let P=C.includeNode?this.textNode:this.parent;null!==P;)T[C.parentFirst?'push':'unshift'](P),P=P.parent;return T}}u.a=w},function(r,u,f){'use strict';var h=f(2),w=f(378),C=f(379);class T extends h.a{static get pluginName(){return'enter/enter'}init(){const P=this.editor,E=P.editing.view;E.addObserver(C.a),P.commands.set('enter',new w.a(P)),this.listenTo(E,'enter',(S,O)=>{P.execute('enter'),O.preventDefault()},{priority:'low'})}}u.a=T},function(r,u,f){'use strict';function h(E,S,O,R){const V=O.isCollapsed,F=O.getFirstRange(),I=F.start.parent,N=F.end.parent;if(!(R.limits.has(I.name)||R.limits.has(N.name))){if(I.root==I)return void(V||E.deleteContent(O,S));if(V)w(S,O,F.start);else{const M=F.start.isAtStart&&F.end.isAtEnd;E.deleteContent(O,S,{merge:M}),M||(I==N?w(S,O,O.focus):O.collapse(N))}}}function w(E,S,O){if(O.isAtEnd){const R=O.parent,V=new R.constructor(R.name,R.getAttributes());E.insert(T.a.createAfter(O.parent),V)}else E.split(O);S.collapse(O.parent.nextSibling)}var C=f(11),T=f(1);class P extends C.a{_doExecute(){const E=this.editor.document,S=E.batch();E.enqueueChanges(()=>{h(this.editor.data,S,E.selection,E.schema),this.fire('afterExecute',{batch:S})})}}u.a=P},function(r,u,f){'use strict';var h=f(53),w=f(118),C=f(22);class T extends h.a{constructor(P){super(P),P.on('keydown',(E,S)=>{this.isEnabled&&S.keyCode==C.d.enter&&P.fire('enter',new w.a(P,S.domEvent))})}observe(){}}u.a=T},function(r,u,f){'use strict';var h=f(3),w=f(11),C=f(60),T=f(1),P=f(66);class E extends w.a{constructor(S,O){super(S),Object.assign(this,O),this.set('value',!1),this.listenTo(S.document,'changesDone',()=>{this.refreshValue(),this.refreshState()})}_doExecute(S={}){const O=this.editor,R=O.document,V=this.value;R.enqueueChanges(()=>{const F=S.batch||R.batch();for(let I of R.selection.getSelectedBlocks())if(!V)I.is(this.modelElement)||F.rename(I,this.modelElement);else if(I.is(this.modelElement)){const N=new C.a;N.addRange(h.a.createIn(I)),O.execute('paragraph',{selection:N,batch:F})}})}refreshValue(){const S=f.i(P.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!S&&S.is(this.modelElement)}_checkEnabled(){const S=f.i(P.a)(this.editor.document.selection.getSelectedBlocks());return!!S&&this.editor.document.schema.check({name:this.modelElement,inside:T.a.createBefore(S)})}}u.a=E},function(r,u,f){'use strict';function C(F,I,N,M){const D=F.name.split(':'),q=D[0]+':'+D[1];if(N.consume(I.item,q)){const z=M.mapper.toViewElement(I.item),U=z.getChild(0);'removeAttribute'==D[0]?U.removeAttribute(I.attributeKey):U.setAttribute(I.attributeKey,I.attributeNewValue)}}function P(F,I,N){I=I.slice();for(const M={name:F.name,attributes:F.attributes,inside:I};I.length&&!N.check(M);){const D=I.pop(),q='string'==typeof D?D:D.name;if(N.limits.has(q))return null}return I.length?I:null}var S=f(1),O=f(35),R=f(18);u.d=function(){return(F,I,N,M)=>{if(N.test(I.input,{name:!0,class:'image'})&&M.schema.check({name:'image',inside:I.context,attributes:'src'})){const D=Array.from(I.input.getChildren()).find((U)=>U.is('img'));if(D&&D.hasAttribute('src')&&N.test(D,{name:!0})){const q=M.convertItem(D,N,I);I.context.push(q);const z=M.convertChildren(I.input,N,I);I.context.pop(),R.a.insert(S.a.createAt(q),z),I.output=q}}}},u.a=function(F,I){for(let N of F)N.on(`addAttribute:${I}:image`,C),N.on(`changeAttribute:${I}:image`,C),N.on(`removeAttribute:${I}:image`,C)},u.b=function(F,I,N,M){const D=I.input;if(N.test(D,{name:!0,attribute:['src']})){const q=P({name:'image',attributes:['src']},I.context,M.schema);if(q){const z=Object.assign({},I);z.context=q,I.output=M.convertItem(D,N,z),V.add(I.output)}}},u.c=function(F,I){if(I.output&&I.output.is('element')){const N=[];for(let M=I.output.childCount-1;0<=M;M--){const D=I.output.getChild(M);if(V.has(D)){const q=I.output.childCount-M-1;let z=null;0{f.i(D.c)(Y)||K.insert(F.a.createAt(Y,'end'),new S.a('caption'))})}}}function w(z,U=!0){return($,K,W,H)=>{const Y=K.item;if((Y.childCount||U)&&f.i(M.b)(Y.parent)){if(!W.consume(K.item,'insert'))return;const G=H.mapper.toViewElement(K.range.start.parent),Z=z instanceof R.a?z.clone(!0):z();Y.childCount||Z.addClass('ck-hidden'),C(Z,K.item,G,H.mapper)}}}function C(z,U,$,K){const W=I.a.createAt($,'end');V.a.insert(W,z),K.bindElements(U,z)}function T(z){const U=z.getAncestors({includeNode:!0}),$=U.find((K)=>'caption'==K.name);return $&&$.parent&&'image'==$.parent.name?$:null}var P=f(2),E=f(37),S=f(5),O=f(44),R=f(25),V=f(79),F=f(1),I=f(26),N=f(34),M=f(46),D=f(383);class q extends P.a{init(){const z=this.editor,U=z.document,$=z.editing.view,K=U.schema,W=z.data,H=z.editing,Y=z.t;this._createCaption=f.i(D.a)($,Y('Enter image caption')),K.registerItem('caption','$block'),K.allow({name:'$inline',inside:'caption'}),K.allow({name:'caption',inside:'image'}),K.limits.add('caption'),U.on('change',h),f.i(N.a)().for(W.viewToModel).from(D.b).toElement('caption'),W.modelToView.on('insert:caption',w(new O.a('figcaption'),!1)),H.modelToView.on('insert:caption',w(this._createCaption)),H.modelToView.on('insert',(G,Z)=>this._fixCaptionVisibility(Z.item),{priority:'high'}),H.modelToView.on('remove',(G,Z)=>this._fixCaptionVisibility(Z.sourcePosition.parent),{priority:'high'}),this.listenTo($,'render',()=>this._updateCaptionVisibility(),{priority:'high'})}_updateCaptionVisibility(){const z=this.editor.editing.mapper,U=this.editor.editing.view.selection,$=U.getSelectedElement();let K;if(this._lastSelectedCaption&&!this._lastSelectedCaption.childCount&&this._lastSelectedCaption.addClass('ck-hidden'),$&&f.i(M.a)($)){const W=z.toModelElement($),H=f.i(D.c)(W);K=z.toViewElement(H)}f.i(D.d)(U.editableElement)&&(K=U.editableElement),K&&(K.removeClass('ck-hidden'),this._lastSelectedCaption=K)}_fixCaptionVisibility(z){const U=T(z),$=this.editor.editing.mapper;if(U){const K=$.toViewElement(U);K&&(U.childCount?K.removeClass('ck-hidden'):K.addClass('ck-hidden'))}}}u.a=q},function(r,u,f){'use strict';var P=f(5),E=f(77),S=f(374),O=f(153);u.a=function(V,F){return()=>{const I=new E.a('figcaption');return I.document=V,I.setCustomProperty(R,!0),f.i(S.a)(I,F),f.i(O.c)(I)}},u.d=function(V){return!!V.getCustomProperty(R)},u.c=function(V){for(let F of V.getChildren())if(F instanceof P.a&&'caption'==F.name)return F;return null},u.b=function(V){const F=V.parent;return'figcaption'==V.name&&F&&'figure'==F.name&&F.hasClass('image')?{name:!0}:null};const R=Symbol('imageCaption')},function(r,u,f){'use strict';function C(O,R,V,F){const I=R.input,N=R.output;if(V.test(I,{class:O.className})&&f.i(S.b)(N)){const M=[...N.getAttributeKeys(),'imageStyle'];F.schema.check({name:'image',inside:R.context,attributes:M})&&(V.consume(I,{class:O.className}),N.setAttribute('imageStyle',O.value))}}function T(O,R){for(let V of R)if(V.value===O)return V}function P(O,R,V){return R&&('changeAttribute'==O||'removeAttribute'==O)&&(V.removeClass(R.className),!0)}function E(O,R,V){return R&&('addAttribute'==O||'changeAttribute'==O)&&(V.addClass(R.className),!0)}var S=f(46);u.a=function(O){return(R,V,F,I)=>{const N=R.name.split(':')[0],M=N+':imageStyle';if(F.test(V.item,M)){const D=T(V.attributeNewValue,O),q=T(V.attributeOldValue,O),z=I.mapper.toViewElement(V.item);(P(N,q,z)||E(N,D,z))&&F.consume(V.item,M)}}},u.b=function(O){const R=O.filter((V)=>null!==V.value);return(V,F,I,N)=>{for(let M of R)C(M,F,I,N)}}},function(r,u,f){'use strict';var h=f(11),w=f(46);class C extends h.a{constructor(T,P){super(T),this.set('value',!1),this.style=P,this.listenTo(T.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const T=this.editor.document,P=T.selection.getSelectedElement();return P?void(null===this.style.value?this.value=!P.hasAttribute('imageStyle'):this.value=P.getAttribute('imageStyle')==this.style.value):void(this.value=!1)}_checkEnabled(){const T=this.editor.document.selection.getSelectedElement();return f.i(w.b)(T)}_doExecute(T={}){if(this.value)return;const P=this.editor,E=P.document,S=E.selection,O=S.getSelectedElement();E.enqueueChanges(()=>{const R=T.batch||E.batch();R.setAttribute(O,'imageStyle',this.style.value)})}}u.a=C},function(r,u,f){'use strict';var h=f(2),w=f(385),C=f(176),T=f(384),P=f(308),E=f.n(P),S=f(309),O=f.n(S);class R extends h.a{static get requires(){return[C.a]}init(){const V=this.editor,F=V.t,I=V.document,N=I.schema,M=V.data,D=V.editing;V.config.define('image.styles',[{name:'imageStyleFull',title:F('Full size image'),icon:E.a,value:null},{name:'imageStyleSide',title:F('Side image'),icon:O.a,value:'side',className:'image-style-side'}]);const q=V.config.get('image.styles');N.allow({name:'image',attributes:'imageStyle',inside:'$root'});const z=f.i(T.a)(q);D.modelToView.on('addAttribute:imageStyle:image',z),M.modelToView.on('addAttribute:imageStyle:image',z),D.modelToView.on('changeAttribute:imageStyle:image',z),M.modelToView.on('changeAttribute:imageStyle:image',z),D.modelToView.on('removeAttribute:imageStyle:image',z),M.modelToView.on('removeAttribute:imageStyle:image',z),M.viewToModel.on('element:figure',f.i(T.b)(q),{priority:'low'});for(let U of q)V.commands.set(U.name,new w.a(V,U))}}u.a=R},function(r,u,f){'use strict';var h=f(2),w=f(21),C=f(389),T=f(406),P=f(182),E=f(154),S=f(390),O=f(177),R=f(307),V=f.n(R),F=f(323),I=f.n(F);class N extends h.a{static get requires(){return[C.a]}static get pluginName(){return'image/imagetextalternative'}init(){return this._createButton(),this._createBalloonPanel().then((M)=>{this.balloonPanel=M,this.form=M.content.get(0)})}_createButton(){const M=this.editor,D=M.commands.get('imageTextAlternative'),q=M.t;M.ui.componentFactory.add('imageTextAlternative',(z)=>{const U=new w.a(z);return U.set({label:q('Change image text alternative'),icon:V.a,tooltip:!0}),U.bind('isEnabled').to(D,'isEnabled'),this.listenTo(U,'execute',()=>this._showBalloonPanel()),U})}_createBalloonPanel(){const M=this.editor,D=new O.a(M),q=new S.a(M.locale);this.listenTo(q,'submit',()=>{M.execute('imageTextAlternative',{newValue:q.lebeledInput.inputView.element.value}),this._hideBalloonPanel()});const z=M.plugins.get(E.a);return z&&this.listenTo(D,'change:isVisible',()=>{D.isVisible?(z.hide(),z.isEnabled=!1):(z.show(),z.isEnabled=!0)}),this.listenTo(q,'cancel',()=>this._hideBalloonPanel()),f.i(T.a)({emitter:D,activator:()=>D.isVisible,callback:()=>this._hideBalloonPanel()}),f.i(P.a)({emitter:D,activator:()=>D.isVisible,contextElement:D.element,callback:()=>this._hideBalloonPanel()}),Promise.all([D.content.add(q),M.ui.view.body.add(D)]).then(()=>D)}_showBalloonPanel(){const M=this.editor,D=M.commands.get('imageTextAlternative');this.form.lebeledInput.value=D.value||'',this.balloonPanel.attach(),this.form.lebeledInput.select()}_hideBalloonPanel(){const M=this.editor;this.balloonPanel.detach(),M.editing.view.focus()}}u.a=N},function(r,u,f){'use strict';var h=f(11),w=f(46);class C extends h.a{constructor(T){super(T),this.set('value',!1),this.listenTo(T.document,'changesDone',()=>{this._updateValue(),this.refreshState()})}_updateValue(){const T=this.editor.document,P=T.selection.getSelectedElement();this.value=f.i(w.b)(P)&&P.hasAttribute('alt')&&P.getAttribute('alt')}_checkEnabled(){const T=this.editor.document.selection.getSelectedElement();return f.i(w.b)(T)}_doExecute(T){const P=this.editor,E=P.document,S=E.selection.getSelectedElement();E.enqueueChanges(()=>{const O=T.batch||E.batch();O.setAttribute(S,'alt',T.newValue)})}}u.a=C},function(r,u,f){'use strict';var h=f(388),w=f(2);class C extends w.a{init(){this.editor.commands.set('imageTextAlternative',new h.a(this.editor))}}u.a=C},function(r,u,f){'use strict';var h=f(9),w=f(21),C=f(6),T=f(186),P=f(185),E=f(184);class S extends h.a{constructor(O){super(O);const R=this.locale.t;this.lebeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(R('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(R('Cancel'),'cancel'),C.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new C.a({tag:'form',attributes:{class:['cke-text-alternative-form']},children:[this.lebeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]}),f.i(E.a)({view:this})}_createButton(O,R){const V=new w.a(this.locale);return V.label=O,V.withText=!0,R&&V.delegate('execute').to(this,R),V}_createLabeledInputView(){const O=this.locale.t,R=new T.a(this.locale,P.a);return R.label=O('Text alternative'),R}}u.a=S},function(r,u,f){'use strict';var h=f(11),w=f(24),C=f(3),T=f(101),P=f(159),E=f(178);class S extends h.a{constructor(O){super(O),this.set('value',void 0),this.listenTo(this.editor.document.selection,'change:attribute',()=>{this.value=this.editor.document.selection.getAttribute('linkHref')})}_checkEnabled(){const O=this.editor.document;return f.i(P.a)('linkHref',O.selection,O.schema)}_doExecute(O){const R=this.editor.document,V=R.selection;R.enqueueChanges(()=>{const F=R.batch();if(V.isCollapsed){const I=V.getFirstPosition(),N=I.parent;if(V.hasAttribute('linkHref')){const M=f.i(E.a)(V.getFirstPosition(),V.getAttribute('linkHref'));F.setAttribute(M,'linkHref',O),V.setRanges([M])}else if(R.schema.check({name:'$text',attributes:'linkHref',inside:N.name})){const M=new w.a(O,{linkHref:O});F.insert(I,M),V.setRanges([C.a.createOn(M)])}}else{const I=f.i(T.a)('linkHref',V.getRanges(),R.schema);for(let N of I)F.setAttribute(N,'linkHref',O)}})}}u.a=S},function(r,u,f){'use strict';var h=f(2),w=f(41),C=f(34),T=f(179),P=f(391),E=f(394);class S extends h.a{init(){const O=this.editor,R=O.data,V=O.editing;O.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$block'}),f.i(w.a)().for(R.modelToView,V.modelToView).fromAttribute('linkHref').toElement((F)=>new T.a('a',{href:F})),f.i(C.a)().for(R.viewToModel).fromElement('a').toAttribute((F)=>({key:'linkHref',value:F.getAttribute('href')})),O.commands.set('link',new P.a(O)),O.commands.set('unlink',new E.a(O))}}u.a=S},function(r,u,f){'use strict';var h=f(9),w=f(6),C=f(120),T=f(21),P=f(186),E=f(185),S=f(184),O=f(67),R=f(119),V=f(68);class F extends h.a{constructor(I){super(I);const N=I.t;this.focusTracker=new O.a,this.keystrokes=new V.a,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(N('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(N('Cancel'),'cancel'),this.unlinkButtonView=this._createButton(N('Unlink'),'unlink'),this._focusables=new C.a,this._focusCycler=new R.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),w.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new w.a({tag:'form',attributes:{class:['ck-link-form'],tabindex:'-1'},children:[this.urlInputView,{tag:'div',attributes:{class:['ck-link-form__actions']},children:[this.saveButtonView,this.cancelButtonView,this.unlinkButtonView]}]}),f.i(S.a)({view:this});const M=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];M.forEach((D)=>{this._focusables.add(D),this.focusTracker.add(D.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const I=this.locale.t,N=new P.a(this.locale,E.a);return N.label=I('Link URL'),N}_createButton(I,N){const M=new T.a(this.locale);return M.label=I,M.withText=!0,N&&M.delegate('execute').to(this,N),M}}u.a=F},function(r,u,f){'use strict';var h=f(11),w=f(178);class C extends h.a{constructor(T){super(T),this.listenTo(T.document.selection,'change:attribute',()=>this.refreshState())}_doExecute(){const T=this.editor.document,P=T.selection;T.enqueueChanges(()=>{const E=P.isCollapsed?[f.i(w.a)(P.getFirstPosition(),P.getAttribute('linkHref'))]:P.getRanges(),S=T.batch();for(let O of E)S.removeAttribute(O,'linkHref')})}_checkEnabled(){return this.editor.document.selection.hasAttribute('linkHref')}}u.a=C},function(r,u,f){'use strict';function N(ne,oe,ie){let re=ne.nodeAfter;re&&'listItem'==re.name&&oe.enqueueChanges(()=>{const se=re.previousSibling,le=se&&se.is('listItem')?se.getAttribute('indent')+1:0;let de=re.getAttribute('indent')-le;const ce=[];for(;re&&'listItem'==re.name&&re.getAttribute('indent')>le;){de>re.getAttribute('indent')&&(de=re.getAttribute('indent'));const ue=re.getAttribute('indent')-de;ce.push({item:re,indent:ue}),re=re.nextSibling}if(0{const le=W(se,!oe);if(le&&le!=se)for(const de=le.getAttribute('indent'),ce=le.getAttribute('type');se&&se.is('listItem')&&se.getAttribute('indent')>=de;)se.getAttribute('type')!=ce&&se.getAttribute('indent')==de&&re.setAttribute(se,'type',ce),se=se[oe?'previousSibling':'nextSibling']})}function q(ne,oe){const ie='numbered'==ne.getAttribute('type')?'ol':'ul',re=new H.a,se=new Q.a(ie,null);return se.appendChildren(re),oe.bindElements(ne,re),re}function z(ne,oe){const ie=oe.getNext?'nextSibling':'previousSibling',re=oe.getNext?'nodeAfter':'nodeBefore',se=!!oe.checkAllSiblings,le=!!oe.sameIndent,de=!!oe.biggerIndent,ce=!!oe.smallerIndent,ue=!!oe.isMapped,me=ne instanceof G.a?ne.getAttribute('indent'):oe.indent;for(let pe=ne instanceof G.a?ne[ie]:ne[re],ge;pe&&'listItem'==pe.name;){if(ge=pe.getAttribute('indent'),le&&me==ge||de&&mege){if(!ue||oe.mapper.toViewElement(pe))return pe;pe=pe[ie];continue}if(!se)return null;pe=pe[ie]}return null}function U(ne,oe){return ne&&oe&&('ul'==ne.name||'ol'==ne.name)&&ne.name==oe.name?ae.a.mergeContainers(X.a.createAfter(ne)):null}function $(ne,oe,ie,re){const se=oe.parent;let le,de=z(ne,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0});if(de&&de.getAttribute('indent')==ne.getAttribute('indent')){let ue=ie.toViewElement(de);le=ae.a.breakContainer(X.a.createAfter(ue))}else de=ne.previousSibling,le=de&&'listItem'==de.name?de.getAttribute('indent')=ie;)ne=ne[re],ne.getAttribute('indent')==ie&&(se=ne);return se}var H=f(398),Y=f(35),G=f(5),Z=f(1),J=f(18),Q=f(44),X=f(26),ee=f(45),te=f(54),ae=f(79);u.e=function(ne,oe,ie,re){if(ie.test(oe.item,'insert')&&ie.test(oe.item,'addAttribute:type')&&ie.test(oe.item,'addAttribute:indent')){ie.consume(oe.item,'insert'),ie.consume(oe.item,'addAttribute:type'),ie.consume(oe.item,'addAttribute:indent');const se=oe.item,le=q(se,re.mapper),de=re.mapper.toViewPosition(Z.a.createBefore(se));$(se,le,re.mapper,de)}},u.f=function(ne,oe,ie,re){if(!ie.consume(oe.item,'changeAttribute:type'))return;const se=re.mapper.toViewElement(oe.item);ae.a.breakContainer(X.a.createBefore(se)),ae.a.breakContainer(X.a.createAfter(se));let le=se.parent;const de='numbered'==oe.attributeNewValue?'ol':'ul';le=ae.a.rename(le,de),U(le,le.nextSibling),U(le.previousSibling,le)},u.g=function(ne,oe,ie,re){if(ie.consume(oe.item,'remove')){const se=re.mapper.toViewPosition(oe.sourcePosition),le=se.nodeAfter.is('li')?se.nodeAfter:se.nodeAfter.getChild(0);ae.a.breakContainer(X.a.createBefore(le)),ae.a.breakContainer(X.a.createAfter(le));const de=le.parent,ce=de.previousSibling,ue=ee.a.createOn(de);ae.a.remove(ue),ce&&ce.nextSibling&&U(ce,ce.nextSibling),K(oe.item.getAttribute('indent')+1,oe.sourcePosition,ue.start,le,re.mapper),'$graveyard'==oe.item.root.rootName&&re.mapper.unbindModelElement(oe.item)}},u.i=function(ne,oe,ie,re){if(!ie.consume(oe.item,'changeAttribute:indent'))return;const se=re.mapper.toViewElement(oe.item);ae.a.breakContainer(X.a.createBefore(se)),ae.a.breakContainer(X.a.createAfter(se));const le=se.parent,de=le.previousSibling,ce=ee.a.createOn(le);ae.a.remove(ce);let ue;de&&de.nextSibling&&(ue=U(de,de.nextSibling)),ue||(ue=ce.start),K(oe.attributeOldValue+1,oe.range.start,ce.start,se,re.mapper),$(oe.item,se,re.mapper,ue)},u.d=function(ne,oe,ie,re){if('listItem'!=oe.item.name){let se=re.mapper.toViewPosition(oe.range.start);const le=[];for(;('ul'==se.parent.name||'ol'==se.parent.name)&&(se=ae.a.breakContainer(se),'li'==se.parent.name);){const de=se,ce=X.a.createAt(se.parent,'end');if(!de.isEqual(ce)){const ue=ae.a.remove(new ee.a(de,ce));le.push(ue)}se=X.a.createAfter(se.parent)}if(0de.is('ul')||de.is('ol')),le=new te.a({startPosition:X.a.createAt(re,0)});for(let de of le)if('elementStart'==de.type&&de.item.is('li')){oe.viewPosition=de.previousPosition;break}else if('elementEnd'==de.type&&de.item==se){oe.viewPosition=de.nextPosition;break}}},u.c=function(ne,oe){const ie=oe.viewPosition,re=ie.parent,se=oe.mapper;if('ul'==re.name||'ol'==re.name){if(!ie.isAtEnd){const le=se.toModelElement(ie.nodeAfter);oe.modelPosition=Z.a.createBefore(le)}else{const le=se.toModelElement(ie.nodeBefore),de=se.getModelLength(ie.nodeBefore);oe.modelPosition=Z.a.createBefore(le).getShiftedBy(de)}ne.stop()}else if('li'==re.name&&ie.nodeBefore&&('ul'==ie.nodeBefore.name||'ol'==ie.nodeBefore.name)){const le=se.toModelElement(re);let de=1,ce=ie.nodeBefore;for(;ce&&(ce.is('ul')||ce.is('ol'));)de+=se.getModelLength(ce),ce=ce.previousSibling;oe.modelPosition=Z.a.createBefore(le).getShiftedBy(de),ne.stop()}},u.a=function(ne){return(oe,ie,re,se)=>{if('remove'==ie)N(re.sourcePosition,ne,se),M(re.sourcePosition,!1,ne,se);else if('move'==ie)N(re.sourcePosition,ne,se),M(re.sourcePosition,!1,ne,se),N(re.range.start,ne,se),M(re.range.start,!1,ne,se),N(re.range.end,ne,se),M(re.range.end,!0,ne,se);else if('rename'==ie&&'listItem'==re.oldName&&'listItem'!=re.newName){const le=re.element;ne.enqueueChanges(()=>{se.removeAttribute(le,'indent').removeAttribute(le,'type')});const de=Z.a.createAfter(re.element);N(de,ne,se)}else'insert'==ie&&(N(re.range.start,ne,se),M(re.range.start,!1,ne,se),N(re.range.end,ne,se),M(re.range.end,!0,ne,se))}},u.m=function(ne,oe){let ie=oe.content.getChild(0);if(ie.is('listItem')){const re=oe.selection.getFirstPosition();let se=null;if(re.parent.is('listItem')?se=re.parent:re.nodeBefore&&re.nodeBefore.is('listItem')&&(se=re.nodeBefore),se){const le=se.getAttribute('indent');if(0=E.getAttribute('indent');){if(O.getAttribute('indent')==E.getAttribute('indent'))return O;O=O[S?'nextSibling':'previousSibling']}return null}var C=f(11),T=f(66);class P extends C.a{constructor(E,S){super(E),this._indentBy='forward'==S?1:-1,this.listenTo(E.document,'changesDone',()=>{this.refreshState()})}_doExecute(){const E=this.editor.document,S=E.batch();let O=Array.from(E.selection.getSelectedBlocks());E.enqueueChanges(()=>{const R=O[O.length-1];for(let V=R.nextSibling;V&&'listItem'==V.name&&V.getAttribute('indent')>R.getAttribute('indent');)O.push(V),V=V.nextSibling;0>this._indentBy&&(O=O.reverse());for(let F of O){const I=F.getAttribute('indent')+this._indentBy;0>I?S.rename(F,'paragraph'):S.setAttribute(F,'indent',I)}0>this._indentBy&&(O=O.reverse());for(let F of O)h(F,S)})}_checkEnabled(){const E=f.i(T.a)(this.editor.document.selection.getSelectedBlocks());if(!E||!E.is('listItem'))return!1;if(0=S;){if(R.getAttribute('indent')==S)return R.getAttribute('type')==O;R=R.previousSibling}return!1}return!0}}u.a=P},function(r,u,f){'use strict';function h(E,S,O){const R=S?E[0]:E[E.length-1];if(R.is('listItem'))for(let V=R[S?'previousSibling':'nextSibling'],F=R.getAttribute('indent');V&&V.is('listItem')&&V.getAttribute('indent')>=O;)F>V.getAttribute('indent')&&(F=V.getAttribute('indent')),V.getAttribute('indent')==F&&E[S?'unshift':'push'](V),V=V[S?'previousSibling':'nextSibling']}var w=f(11),C=f(1),T=f(66);class P extends w.a{constructor(E,S){super(E),this.type='bulleted'==S?'bulleted':'numbered',this.set('value',!1),this.listenTo(E.document,'changesDone',()=>{this.refreshValue(),this.refreshState()})}refreshValue(){const E=f.i(T.a)(this.editor.document.selection.getSelectedBlocks());this.value=E&&E.is('listItem')&&E.getAttribute('type')==this.type}_doExecute(E={}){const S=this.editor.document,O=Array.from(S.selection.getSelectedBlocks()),R=!0===this.value;S.enqueueChanges(()=>{const V=E.batch||S.batch();if(R){let F=O[O.length-1].nextSibling,I=_NumberPOSITIVE_INFINITY,N=[];for(;F&&'listItem'==F.name&&0!==F.getAttribute('indent');){const M=F.getAttribute('indent');M{this.refreshValue(),this.refreshState()})}_doExecute(P={}){const E=this.editor.document;E.enqueueChanges(()=>{const S=P.batch||E.batch(),O=(P.selection||E.selection).getSelectedBlocks();for(let R of O)R.is('paragraph')||S.rename(R,'paragraph')})}refreshValue(){const P=f.i(C.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!P&&P.is('paragraph')}_checkEnabled(){const P=f.i(C.a)(this.editor.document.selection.getSelectedBlocks());return!!P&&this.editor.document.schema.check({name:'paragraph',inside:w.a.createBefore(P)})}}u.a=T},function(r,u,f){'use strict';var h=f(2),w=f(401),C=f(402);class T extends h.a{static get pluginName(){return'typing/delete'}init(){const P=this.editor,E=P.editing.view;E.addObserver(C.a),P.commands.set('forwardDelete',new w.a(P,'forward')),P.commands.set('delete',new w.a(P,'backward')),this.listenTo(E,'delete',(S,O)=>{P.execute('forward'==O.direction?'forwardDelete':'delete',{unit:O.unit}),O.preventDefault()})}}u.a=T},function(r,u,f){'use strict';var h=f(11),w=f(60),C=f(181),T=f(189);class P extends h.a{constructor(E,S){super(E),this.direction=S,this._buffer=new C.a(E.document,E.config.get('typing.undoStep'))}_doExecute(E={}){const S=this.editor.document,O=this.editor.data;S.enqueueChanges(()=>{this._buffer.lock();const R=w.a.createFromSelection(S.selection);if(R.isCollapsed&&O.modifySelection(R,{direction:this.direction,unit:E.unit}),R.isCollapsed)return;let V=0;R.getFirstRange().getMinimalFlatRanges().forEach((F)=>{V+=f.i(T.a)(F.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),O.deleteContent(R,this._buffer.batch,{merge:!0}),this._buffer.input(V),S.selection.setRanges(R.getRanges(),R.isBackward),this._buffer.unlock()})}}u.a=P},function(r,u,f){'use strict';var h=f(53),w=f(118),C=f(22);class T extends h.a{constructor(P){super(P),P.on('keydown',(E,S)=>{const O={};if(S.keyCode==C.d.delete)O.direction='forward',O.unit='character';else if(S.keyCode==C.d.backspace)O.direction='backward',O.unit='codePoint';else return;O.unit=S.altKey?'word':O.unit,P.fire('delete',new w.a(P,S.domEvent,O))})}observe(){}}u.a=T},function(r,u,f){'use strict';function h(M){return!!M.ctrlKey||N.includes(M.keyCode)}function w(M,D){return M instanceof E.a&&D instanceof E.a?M.data===D.data:M===D}var C=f(2),T=f(3),P=f(26),E=f(31),S=f(190),O=f(430),R=f(22),V=f(404);class F extends C.a{static get pluginName(){return'typing/input'}init(){const M=this.editor,D=M.editing.view,q=new V.a(M,M.config.get('typing.undoStep')||20);M.commands.set('input',q),this.listenTo(D,'keydown',(z,U)=>{this._handleKeydown(U,q.buffer)},{priority:'lowest'}),this.listenTo(D,'mutations',(z,U,$)=>{this._handleMutations(U,$)})}_handleKeydown(M,D){const q=this.editor.document;h(M)||q.selection.isCollapsed||(D.lock(),q.enqueueChanges(()=>{this.editor.data.deleteContent(q.selection,D.batch)}),D.unlock())}_handleMutations(M,D){new I(this.editor).handle(M,D)}}u.a=F;class I{constructor(M){this.editor=M,this.editing=this.editor.editing}handle(M,D){for(let q of M)this._handleTextMutation(q,D),this._handleTextNodeInsertion(q)}_handleTextMutation(M,D){if('text'!=M.type)return;const q=M.newText.replace(/\u00A0/g,' '),z=M.oldText.replace(/\u00A0/g,' '),U=f.i(S.a)(z,q);let $=null,K=null;for(let X=0;X=M;M++)N.push(M)},function(r,u,f){'use strict';var h=f(11),w=f(181);class C extends h.a{constructor(T,P){super(T),this._buffer=new w.a(T.document,P)}destroy(){super.destroy(),this._buffer.destroy(),this._buffer=null}get buffer(){return this._buffer}_doExecute(T={}){const P=this.editor.document,E=T.text||'',S=E.length,O=T.range||P.selection.getFirstRange(),R=T.resultRange;P.enqueueChanges(()=>{const V=O.isCollapsed;this._buffer.lock(),V||this._buffer.batch.remove(O),this._buffer.batch.weakInsert(O.start,E),R?this.editor.data.model.selection.setRanges([R]):V&&this.editor.data.model.selection.collapse(O.start.getShiftedBy(S)),this._buffer.unlock(),this._buffer.input(S)})}}u.a=C},function(r,u,f){'use strict';var h=f(2),w=f(403),C=f(400);class T extends h.a{static get requires(){return[w.a,C.a]}static get pluginName(){return'typing/typing'}}u.a=T},function(r,u,f){'use strict';var w=f(22);u.a=function({emitter:C,activator:T,callback:P}){C.listenTo(document,'keydown',(E,{keyCode:S})=>{S==w.d.esc&&T()&&P()})}},function(r,u,f){'use strict';var h=f(0);u.a=class{constructor(C){this.editor=C,this._components=new Map}add(C,T){if(this._components.get(C))throw new h.a('componentfactory-item-exists: The item already exists in the component factory.',{name:C});this._components.set(C,T)}create(C){const T=this._components.get(C);if(!T)throw new h.a('componentfactory-item-missing: There is no such UI component in the factory.',{name:C});return T(this.editor.locale)}}},function(r,u,f){'use strict';var w=f(21),C=f(410),T=f(409);u.a=function(P,E){const S=new w.a(E);S.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(P);const O=new T.a(E);return new C.a(E,S,O)}},function(r,u,f){'use strict';var h=f(9),w=f(6);class C extends h.a{constructor(T){super(T);const P=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.template=new w.a({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',P.if('isVisible','ck-dropdown__panel-visible')]},children:this.children})}}u.a=C},function(r,u,f){'use strict';var h=f(9),w=f(6),C=f(67),T=f(68);class P extends h.a{constructor(E,S,O){super(E),w.a.extend(S.template,{attributes:{class:['ck-dropdown__button']}}),this.buttonView=S,this.panelView=O,this.set('isOpen',!1),this.focusTracker=new C.a,this.keystrokes=new T.a,this.template=new w.a({tag:'div',attributes:{class:['ck-dropdown']},children:[S,O]}),this.listenTo(S,'execute',()=>this.isOpen=!this.isOpen),O.bind('isVisible').to(this,'isOpen')}init(){this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const E=(S,O)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,O())};return this.keystrokes.set('arrowdown',(S,O)=>{this.isOpen||(this.isOpen=!0,O())}),this.keystrokes.set('arrowright',(S,O)=>{this.isOpen&&O()}),this.keystrokes.set('arrowleft',E),this.keystrokes.set('esc',E),super.init()}focus(){this.buttonView.focus()}}u.a=P},function(r,u,f){'use strict';function w(E){E.listenTo(document,'click',(S,{target:O})=>{E.element==O||E.element.contains(O)||(E.isOpen=!1)})}var C=f(419),T=f(418),P=f(408);u.a=function(E,S){const O=f.i(P.a)(E,S),R=O.listView=new C.a(S);return R.items.bindTo(E.items).using((V)=>{const F=new T.a(S);return F.bind(...Object.keys(V)).to(V),F}),R.items.delegate('execute').to(O),O.panelView.children.add(R),O.on('change:isOpen',(V,F,I)=>{I?w(O):O.stopListening(document)}),O.on('execute',()=>{O.isOpen=!1}),O.keystrokes.set('arrowdown',(V,F)=>{O.isOpen&&(R.focus(),F())}),O.keystrokes.set('arrowup',(V,F)=>{O.isOpen&&(R.focusLast(),F())}),O}},function(r,u,f){'use strict';var h=f(9),w=f(6);class C extends h.a{constructor(T,P){super(T);const E=this.bindTemplate;P&&(this.element=this.editableElement=P),this.template=new w.a({tag:'div',attributes:{class:[E.to('isFocused',(S)=>S?'ck-focused':'ck-blurred'),'ck-editor__editable'],contenteditable:E.to('isReadOnly',(S)=>!S)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=P}init(){return this.externalElement?this.template.apply(this.externalElement):this.editableElement=this.element,super.init()}destroy(){return this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}u.a=C},function(r,u,f){'use strict';var h=f(412),w=f(6);class C extends h.a{constructor(T,P){super(T,P);const E=this.bindTemplate,S=this.t;this.set('name',null);w.a.extend(this.template,{attributes:{role:'textbox','aria-label':E.to('name',(R)=>{return S('Rich Text Editor, %0',[R])}),class:'ck-editor__editable_inline'}})}}u.a=C},function(r,u,f){'use strict';var h=f(415),w=f(72),C=f(6);class T extends h.a{constructor(P){super(P);const E=this.t,S=f.i(w.a)();this.set('width',null),this.set('height',null),this.top=this.createCollection(),this.main=this.createCollection(),this.template=new C.a({tag:'div',attributes:{class:['ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:P.lang,'aria-labelledby':`cke-editor__aria-label_${S}`},children:[{tag:'span',attributes:{id:`cke-editor__aria-label_${S}`,class:'cke-voice-label'},children:[E('Rich Text Editor')]},{tag:'div',attributes:{class:'ck-editor__top ck-reset_all',role:'presentation'},children:this.top},{tag:'div',attributes:{class:'ck-editor__main',role:'presentation'},children:this.main}]})}}u.a=T},function(r,u,f){'use strict';var h=f(9),w=f(6);class C extends h.a{constructor(T){super(T),this.body=this.createCollection()}init(){return Promise.resolve().then(()=>this._renderBodyCollection()).then(()=>super.init())}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const T=this._bodyCollectionContainer=new w.a({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(T)}}u.a=C},function(r,u,f){'use strict';var h=f(9),w=f(6);class C extends h.a{constructor(){super();const T=this.bindTemplate;this.set('content'),this.set('viewBox','0 0 20 20'),this.template=new w.a({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:T.to('viewBox')}}),this.on('change:content',(P,E,S)=>{for(const O=new DOMParser().parseFromString(S.trim(),'image/svg+xml').firstChild;0{this.focusTracker.add(O.element)}),this.items.on('remove',(S,O)=>{this.focusTracker.remove(O.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}u.a=E},function(r,u,f){'use strict';var h=f(50),w=f(4),C=f(33);class T{constructor(P,E){E&&f.i(h.a)(this,E),P&&this.set(P)}}u.a=T,f.i(w.a)(T,C.a)},function(r,u,f){'use strict';var h=f(2),w=f(187),C=f(0);class T extends h.a{static get pluginName(){return'ui/contextualballoon'}init(){return this.view=new w.a,this._stack=new Map,this.editor.ui.focusTracker.add(this.view.element),this.editor.ui.view.body.add(this.view)}get visibleView(){const P=this._stack.get(this.view.content.get(0));return P?P.view:null}hasView(P){return this._stack.has(P)}add(P){if(this.hasView(P.view))throw new C.a('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');return this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(P.view,P),this._show(P)}remove(P){if(!this.hasView(P))throw new C.a('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');let E=Promise.resolve();if(this.visibleView===P){this.view.content.remove(P),this._stack.delete(P);const S=Array.from(this._stack.values()).pop();S?E=this._show(S):this.view.hide()}else this._stack.delete(P);return E}updatePosition(P){P&&(this._stack.values().next().value.position=P),this.view.attachTo(this._getBalloonPosition())}_show({view:P,balloonClassName:E=''}){return this.view.className=E,this.view.content.add(P).then(()=>{this.view.pin(this._getBalloonPosition())})}_getBalloonPosition(){return this._stack.values().next().value.position}destroy(){this.editor.ui.view.body.remove(this.view),this.view.destroy(),this._stack.clear(),super.destroy()}}u.a=T},function(r,u){'use strict';u.a=function({origin:w,originKeystrokeHandler:C,originFocusTracker:T,toolbar:P}){T.add(P.element),C.set('Alt+F10',(E,S)=>{T.isFocused&&!P.focusTracker.isFocused&&(P.focus(),S())}),P.keystrokes.set('Esc',(E,S)=>{P.focusTracker.isFocused&&(w.focus(),S())})}},function(r,u,f){'use strict';var h=f(47),w=f(6),C=f(188),T=f(193);const P=f.i(T.a)('px');class E extends C.a{constructor(S){super(S);const O=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterOffset',50),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),w.a.extend(this.template,{attributes:{class:[O.if('isSticky','ck-toolbar_sticky'),O.if('_isStickyToTheLimiter','ck-toolbar_sticky_bottom-limit')],style:{width:O.to('isSticky',(R)=>{return R?P(this._elementPlaceholder.getBoundingClientRect().width):null}),bottom:O.to('_isStickyToTheLimiter',(R)=>{return R?P(this.limiterOffset):null}),marginLeft:O.to('_marginLeft')}}}),this._elementPlaceholder=new w.a({tag:'div',attributes:{class:['ck-toolbar__placeholder'],style:{display:O.to('isSticky',(R)=>R?'block':'none'),height:O.to('isSticky',(R)=>{return R?P(this._toolbarRect.height):null})}}}).render()}init(){super.init(),this.element.parentNode.insertBefore(this._elementPlaceholder,this.element),this.listenTo(h.a.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}destroy(){return super.destroy().then(()=>{this._elementPlaceholder.remove()})}_checkIfShouldBeSticky(){const S=this._limiterRect=this.limiterElement.getBoundingClientRect(),O=this._toolbarRect=this.element.getBoundingClientRect();this.isSticky=this.isActive&&0>S.top&&this._toolbarRect.height+this.limiterOffset{const P=T.batch.deltas[T.batch.deltas.length-1],E=P.baseVersion+P.operations.length,S=Array.from(this.editor.document.history.getDeltas(E)).filter((O)=>{return!this._createdBatches.has(O.batch)});this._restoreSelection(T.selection.ranges,T.selection.isBackward,S),this._redo(T.batch)}),this.refreshState()}_redo(T){const P=this.editor.document,E=P.batch();this._createdBatches.add(E);const S=T.deltas.slice();S.reverse();for(let O of S){const R=O.baseVersion+O.operations.length;let V=[O.getReversed()];for(let F of P.history.getDeltas(R))this._createdBatches.has(F.batch)||(V=f.i(w.a)(V,[F],!0).deltasA);for(let F of V){F.baseVersion=P.version,E.addDelta(F);for(let I of F.operations)P.applyOperation(I)}}}}u.a=C},function(r,u,f){'use strict';var h=f(2),w=f(428),C=f(21),T=f(316),P=f.n(T),E=f(315),S=f.n(E);class O extends h.a{static get requires(){return[w.a]}static get pluginName(){return'undo/undo'}init(){const R=this.editor,V=R.t;this._addButton('undo',V('Undo'),'CTRL+Z',P.a),this._addButton('redo',V('Redo'),'CTRL+Y',S.a),R.keystrokes.set('CTRL+Z','undo'),R.keystrokes.set('CTRL+Y','redo'),R.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(R,V,F,I){const N=this.editor,M=N.commands.get(R);N.ui.componentFactory.add(R,(D)=>{const q=new C.a(D);return q.set({label:V,icon:I,keystroke:F,tooltip:!0}),q.bind('isEnabled').to(M,'isEnabled'),this.listenTo(q,'execute',()=>N.execute(R)),q})}}u.a=O},function(r,u,f){'use strict';var h=f(121),w=f(108);class C extends h.a{_doExecute(T=null){let P=T?this._stack.findIndex((S)=>S.batch==T):this._stack.length-1;const E=this._stack.splice(P,1)[0];this.editor.document.enqueueChanges(()=>{const S=this._undo(E.batch),O=this.editor.document.history.getDeltas(E.batch.baseVersion);this._restoreSelection(E.selection.ranges,E.selection.isBackward,O),this.fire('revert',E.batch,S)}),this.refreshState()}_getItemIndexFromBaseVersion(T){for(let P=0;P{this._batchRegistry.has(O)||'transparent'==O.type||(this._redoCommand._createdBatches.has(O)?this._undoCommand.addBatch(O):!this._undoCommand._createdBatches.has(O)&&(this._undoCommand.addBatch(O),this._redoCommand.clearStack()),this._batchRegistry.add(O))},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(P,E,S)=>{this._redoCommand.addBatch(S)})}}u.a=T},function(r,u,f){'use strict';var h=f(99);u.a=class{constructor(C,T){this._config={},T&&this.define(T),C&&this._setObjectToTarget(this._config,C)}set(C,T){this._setToTarget(this._config,C,T)}define(C,T){this._setToTarget(this._config,C,T,!0)}get(C){return this._getFromSource(this._config,C)}_setToTarget(C,T,P,E=!1){if(f.i(h.a)(T))return void this._setObjectToTarget(C,T,E);const S=T.split('.');T=S.pop();for(let O of S)f.i(h.a)(C[O])||(C[O]={}),C=C[O];return f.i(h.a)(P)?(f.i(h.a)(C[T])||(C[T]={}),C=C[T],void this._setObjectToTarget(C,P,E)):void(E&&'undefined'!=typeof C[T]||(C[T]=P))}_getFromSource(C,T){const P=T.split('.');T=P.pop();for(let E of P){if(!f.i(h.a)(C[E])){C=null;break}C=C[E]}return C?C[T]:void 0}_setObjectToTarget(C,T,P){Object.keys(T).forEach((E)=>{this._setToTarget(C,E,T[E],P)})}}},function(r,u){'use strict';u.a=function(w,C){function T(){O&&(E.push(O),O=null)}function P(R){return O&&O.type==R}const E=[];let S=0,O;return w.forEach((R)=>{'equal'==R?(T(),S++):'insert'==R?(P('insert')?O.values.push(C[S]):(T(),O={type:'insert',index:S,values:[C[S]]}),S++):P('delete')?O.howMany++:(T(),O={type:'delete',index:S,howMany:1})}),T(),E}},function(r,u,f){'use strict';var w=f(191);u.a=function(C,T){const P=f.i(w.a)(C),E=f.i(w.a)(T);let S=0;for(;P[S]==E[S]&&P[S];)S++;return 0==S?null:P[S-1]}},function(r,u){'use strict';u.a=function(w){return w instanceof HTMLTextAreaElement?w.value:w.innerHTML}},function(r,u,f){'use strict';var w=f(47);u.a=function(C){for(;C&&'html'!=C.tagName.toLowerCase();){if('static'!=w.a.window.getComputedStyle(C).position)return C;C=C.parentElement}return null}},function(r,u){'use strict';u.a=function(w){let C=0;for(;w.previousSibling;)w=w.previousSibling,C++;return C}},function(r,u){'use strict';u.a=function(w,C,T){w.insertBefore(T,w.childNodes[C]||null)}},function(r,u,f){'use strict';function w(O,R,V){const{left:F,top:I,name:N}=O(R,V);return[N,V.clone().moveTo(F,I)]}function C(O,R,V,F,I){let N=0,M=0,D,q;const z=V.getArea();return O.some((U)=>{function $(){M=Y,N=H,D=W,q=K}const[K,W]=w(U,R,V);let H,Y;if(F)if(I){const G=F.getIntersection(I);H=G?G.getIntersectionArea(W):0}else H=F.getIntersectionArea(W);return I&&(Y=I.getIntersectionArea(W)),I&&!F?Y>M&&$():!I&&F?H>N&&$():Y>M&&H>=N?$():Y>=M&&H>N&&$(),H===z}),D?[q,D]:null}function T({left:O,top:R}){const{scrollX:V,scrollY:F}=P.a.window;return{left:O+V,top:R+F}}var P=f(47),E=f(437),S=f(433);u.a=function({element:O,target:R,positions:V,limiter:F,fitInViewport:I}){const N=f.i(S.a)(O.parentElement),M=new E.a(O),D=new E.a(R);let q,z;if(!F&&!I)[z,q]=w(V[0],D,M);else{const K=F&&new E.a(F).getVisible(),W=I&&E.a.getViewportRect();[z,q]=C(V,D,M,K,W)||w(V[0],D,M)}let{left:U,top:$}=T(q);if(N){const K=T(new E.a(N)),W=P.a.window.getComputedStyle(N);U-=K.left,$-=K.top,U+=N.scrollLeft,$+=N.scrollTop,U-=parseInt(W.borderLeftWidth,10),$-=parseInt(W.borderTopWidth,10)}return{left:U,top:$,name:z}}},function(r,u,f){'use strict';var h=f(47),w=f(192),C=f(237);const T=['top','right','bottom','left','width','height'];class P{constructor(E){Object.defineProperty(this,'_source',{value:E._source||E,writable:!1,enumerable:!1}),(f.i(C.a)(E)||f.i(w.a)(E))&&(E=E.getBoundingClientRect()),T.forEach((S)=>this[S]=E[S])}clone(){return new P(this)}moveTo(E,S){return this.top=S,this.right=E+this.width,this.bottom=S+this.height,this.left=E,this}moveBy(E,S){return this.top+=S,this.right+=E,this.left+=E,this.bottom+=S,this}getIntersection(E){const S={top:_Mathmax(this.top,E.top),right:_Mathmin(this.right,E.right),bottom:_Mathmin(this.bottom,E.bottom),left:_Mathmax(this.left,E.left)};return S.width=S.right-S.left,S.height=S.bottom-S.top,0>S.width||0>S.height?null:new P(S)}getIntersectionArea(E){const S=this.getIntersection(E);return S?S.getArea():0}getArea(){return this.width*this.height}getVisible(){const E=this._source;let S=this.clone();if(E!=h.a.document.body)for(let O=E.parentNode||E.commonAncestorContainer;O&&O!=h.a.document.body;){const R=new P(O),V=S.getIntersection(R);if(V)V.getArea(){w.style.display='',C&&C.remove()}),this._replacedElements=[]}}},function(r,u){'use strict';const w=navigator.userAgent.toLowerCase(),C={mac:function(T){return-1=C?w:C)),w}},function(r,u,f){'use strict';var w=f(14),C=Object.create;u.a=function(T){return f.i(w.a)(T)?C(T):{}}},function(r,u,f){'use strict';var w=f(15),C=f(537);u.a=function(T,P,E,S){var O=T.length;for(E=f.i(w.a)(E),0>E&&(E=-E>O?0:O+E),S=void 0===S||S>O?O:f.i(w.a)(S),0>S&&(S+=O),S=E>S?0:f.i(C.a)(S);ET?P:0,f.i(w.a)(T,P)?C[T]:void 0}},function(r,u,f){'use strict';var w=f(127);u.a=function(C){return function(T){return f.i(w.a)(T,C)}}},function(r,u,f){'use strict';var w=f(69),C=f(89),T=f(39),P=f(56),E=f(14),S=f(57);u.a=function(O,R,V,F){R=f.i(P.a)(R,O)?[R]:f.i(C.a)(R);for(var I=-1,N=R.length,D=O,q;null!=D&&++IT||O&&R&&F&&!V&&!I||E&&R&&F||!P&&F||!S)return 1;if(!E&&!O&&!I&&CO?void 0:R,O=1),P=Object(P);++SS)return!1;var O=E.length-1;return S==O?E.pop():T.call(E,S,1),!0}},function(r,u,f){'use strict';var w=f(86);u.a=function(C){var T=this.__data__,P=f.i(w.a)(T,C);return 0>P?void 0:T[P][1]}},function(r,u,f){'use strict';var w=f(86);u.a=function(C){return-1E?P.push([C,T]):P[E][1]=T,this}},function(r,u,f){'use strict';var w=f(444),C=f(82),T=f(194);u.a=function(){this.__data__={hash:new w.a,map:new(T.a||C.a),string:new w.a}}},function(r,u,f){'use strict';var w=f(90);u.a=function(C){return f.i(w.a)(this,C)['delete'](C)}},function(r,u,f){'use strict';var w=f(90);u.a=function(C){return f.i(w.a)(this,C).get(C)}},function(r,u,f){'use strict';var w=f(90);u.a=function(C){return f.i(w.a)(this,C).has(C)}},function(r,u,f){'use strict';var w=f(90);u.a=function(C,T){return f.i(w.a)(this,C).set(C,T),this}},function(r,u,f){'use strict';var w=f(127),C=f(38);u.a=function(T,P){return 1==P.length?T:f.i(w.a)(T,f.i(C.a)(P,0,-1))}},function(r,u){'use strict';u.a=function(C){return this.__data__.set(C,'__lodash_hash_undefined__'),this}},function(r,u){'use strict';u.a=function(w){return this.__data__.has(w)}},function(r,u){'use strict';u.a=function(w){var C=-1,T=Array(w.size);return w.forEach(function(P){T[++C]=[P,P]}),T}},function(r,u,f){'use strict';var w=f(82);u.a=function(){this.__data__=new w.a}},function(r,u){'use strict';u.a=function(w){return this.__data__['delete'](w)}},function(r,u){'use strict';u.a=function(w){return this.__data__.get(w)}},function(r,u){'use strict';u.a=function(w){return this.__data__.has(w)}},function(r,u,f){'use strict';var w=f(82),C=f(122);u.a=function(P,E){var S=this.__data__;return S instanceof w.a&&S.__data__.length==200&&(S=this.__data__=new C.a(S.__data__)),S.set(P,E),this}},function(r,u,f){'use strict';var h=f(531),w=f(539),C=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]/g,T=/\\(\\)?/g,P=f.i(h.a)(function(E){var S=[];return f.i(w.a)(E).replace(C,function(O,R,V,F){S.push(V?F.replace(T,'$1'):R||O)}),S});u.a=P},function(r,u,f){'use strict';var h=f(214),w=f(215),C=f(216),T=f(217),P=f(218),E=f(219),S=f(144),O=f(145),R=f(220),V=f(221),F=f(222),I=f(223),N=f(224),M=f(225),D=f(226),q=f(227),z=f(228),U=f(229),$=f(146),K=f(232),W=f(233),H=f(234),Y=f(235),G=f(236),Z=f(239),J=f(19),Q=f(240),X=f(241),ee=f(242),te=f(150),ae=f(243),ne=f(244),oe=f(245),ie=f(246),re=f(247),se=f(248),le=f(249),de=f(250),ce=f(251),ue=f(252),me=f(253),pe=f(254),ge=f(255),fe=f(256),he=f(257),be=f(258),_e=f(259),ke=f(260),we=f(261),ye=f(263),ve=f(264),xe=f(265),Ce=f(266),Ae=f(267),Te=f(268),Pe=f(100),Ee=f(151),Se=f(269),Oe=f(270),Re=f(271),Ve=f(272),Fe=f(273),Ie=f(274),Be=f(275),Le=f(276);u.a={chunk:h.a,compact:w.a,concat:C.a,difference:T.a,differenceBy:P.a,differenceWith:E.a,drop:S.a,dropRight:O.a,dropRightWhile:R.a,dropWhile:V.a,fill:F.a,findIndex:I.a,findLastIndex:N.a,first:M.a,flatten:D.a,flattenDeep:q.a,flattenDepth:z.a,fromPairs:U.a,head:$.a,indexOf:K.a,initial:W.a,intersection:H.a,intersectionBy:Y.a,intersectionWith:G.a,join:Z.a,last:J.a,lastIndexOf:Q.a,nth:X.a,pull:ee.a,pullAll:te.a,pullAllBy:ae.a,pullAllWith:ne.a,pullAt:oe.a,remove:ie.a,reverse:re.a,slice:se.a,sortedIndex:le.a,sortedIndexBy:de.a,sortedIndexOf:ce.a,sortedLastIndex:ue.a,sortedLastIndexBy:me.a,sortedLastIndexOf:pe.a,sortedUniq:ge.a,sortedUniqBy:fe.a,tail:he.a,take:be.a,takeRight:_e.a,takeRightWhile:ke.a,takeWhile:we.a,union:ye.a,unionBy:ve.a,unionWith:xe.a,uniq:Ce.a,uniqBy:Ae.a,uniqWith:Te.a,unzip:Pe.a,unzipWith:Ee.a,without:Se.a,xor:Oe.a,xorBy:Re.a,xorWith:Ve.a,zip:Fe.a,zipObject:Ie.a,zipObjectDeep:Be.a,zipWith:Le.a}},function(r,u,f){'use strict';var h=f(214),w=f(215),C=f(216),T=f(217),P=f(218),E=f(219),S=f(144),O=f(145),R=f(220),V=f(221),F=f(222),I=f(223),N=f(224),M=f(225),D=f(226),q=f(227),z=f(228),U=f(229),$=f(146),K=f(232),W=f(233),H=f(234),Y=f(235),G=f(236),Z=f(239),J=f(19),Q=f(240),X=f(241),ee=f(242),te=f(150),ae=f(243),ne=f(244),oe=f(245),ie=f(246),re=f(247),se=f(248),le=f(249),de=f(250),ce=f(251),ue=f(252),me=f(253),pe=f(254),ge=f(255),fe=f(256),he=f(257),be=f(258),_e=f(259),ke=f(260),we=f(261),ye=f(263),ve=f(264),xe=f(265),Ce=f(266),Ae=f(267),Te=f(268),Pe=f(100),Ee=f(151),Se=f(269),Oe=f(270),Re=f(271),Ve=f(272),Fe=f(273),Ie=f(274),Be=f(275),Le=f(276),Ne=f(521);f.d(u,'a',function(){return Ne.a})},function(r,u,f){'use strict';var h=f(69),w=f(139),C=f(481),T=f(97),P=f(93),E=f(530),S=Object.prototype,O=S.propertyIsEnumerable,R=!O.call({valueOf:1},'valueOf'),V=f.i(C.a)(function(F,I){if(R||f.i(P.a)(I)||f.i(T.a)(I))return void f.i(w.a)(I,f.i(E.a)(I),F);for(var N in I)f.i(h.a)(F,N,I[N])});u.a=V},function(r,u,f){'use strict';var w=f(199);u.a=function(C,T){return f.i(w.a)(C,!0,!0,T)}},function(r,u){'use strict';u.a=function(w){return function(){return w}}},function(r,u,f){'use strict';var w=f(458),C=f(489);u.a=function(T,P){return null!=T&&f.i(C.a)(T,P,w.a)}},function(r,u,f){'use strict';(function(h){var w=f(525),C=f(32),T={'function':!0,object:!0},P=T[typeof exports]&&exports&&!exports.nodeType?exports:void 0,E=T[typeof h]&&h&&!h.nodeType?h:void 0,S=E&&E.exports===P?P:void 0,O=S?C.a.Buffer:void 0,R=O?function(V){return V instanceof O}:f.i(w.a)(!1);u.a=R}).call(u,f(156)(r))},function(r,u,f){'use strict';var w=f(130);u.a=function(C,T){return f.i(w.a)(C,T)}},function(r,u,f){'use strict';var w=f(98),C=f(51),X={};X['[object Float32Array]']=X['[object Float64Array]']=X['[object Int8Array]']=X['[object Int16Array]']=X['[object Int32Array]']=X['[object Uint8Array]']=X['[object Uint8ClampedArray]']=X['[object Uint16Array]']=X['[object Uint32Array]']=!0,X['[object Arguments]']=X['[object Array]']=X['[object ArrayBuffer]']=X['[object Boolean]']=X['[object DataView]']=X['[object Date]']=X['[object Error]']=X['[object Function]']=X['[object Map]']=X['[object Number]']=X['[object Object]']=X['[object RegExp]']=X['[object Set]']=X['[object String]']=X['[object WeakMap]']=!1;var ee=Object.prototype,te=ee.toString;u.a=function(ae){return f.i(C.a)(ae)&&f.i(w.a)(ae.length)&&!!X[te.call(ae)]}},function(r,u,f){'use strict';var w=f(463),C=f(209),T=f(39),P=f(93),E=Object.prototype,S=E.hasOwnProperty;u.a=function(O){for(var R=-1,V=f.i(P.a)(O),F=f.i(w.a)(O),I=F.length,N=f.i(C.a)(O),D=N||[],q=D.length,z;++RP?-1:1;return E*1.7976931348623157e308}return P===P?P:0}},function(r,u,f){'use strict';var w=f(454),C=f(15);u.a=function(P){return P?f.i(w.a)(f.i(C.a)(P),0,4294967295):0}},function(r,u,f){'use strict';var h=f(483),w=f(71),C=f.i(h.a)(w.a);u.a=C},function(r,u,f){'use strict';var w=f(470);u.a=function(C){return null==C?'':f.i(w.a)(C)}},function(r,u,f){'use strict';var h=f(544);u.a=class{constructor(C){this.lang=C||'en',this.t=(...T)=>this._t(...T)}_t(C,T){let P=f.i(h.a)(this.lang,C);return T&&(P=P.replace(/\%(\d+)/g,(E,S)=>{return S{z&&z.hasClass(F.d)&&z.removeClass(F.d);const H=W.viewSelection,Y=H.getSelectedElement();Y&&f.i(F.b)(Y)&&(H.setFake(!0,{label:f.i(F.e)(Y)}),Y.addClass(F.d),z=Y)},{priority:'low'}),q.addObserver(P.a),this.listenTo(q,'mousedown',(...U)=>this._onMousedown(...U)),this.listenTo(q,'keydown',(...U)=>this._onKeydown(...U),{priority:'high'})}_onMousedown(q,z){const U=this.editor,$=U.editing.view;let K=z.target;if(C(K))return;if(!f.i(F.b)(K)&&(K=K.findAncestor(F.b),!K))return;z.preventDefault(),$.isFocused||$.focus();const W=U.editing.mapper.toModelElement(K);U.document.enqueueChanges(()=>{this._setSelectionOverElement(W)})}_onKeydown(q,z){const U=z.keyCode,$=U==I.d.delete||U==I.d.arrowdown||U==I.d.arrowright;(w(U)&&this._handleDelete($)||h(U)&&this._handleArrowKeys($))&&(z.preventDefault(),q.stop())}_handleDelete(q){const z=this.editor.document,U=z.selection;if(!U.isCollapsed)return;const $=this._getObjectElementNextToSelection(q);if($)return z.enqueueChanges(()=>{const K=U.anchor.parent;if(K.isEmpty){const W=z.batch();W.remove(K)}this._setSelectionOverElement($)}),!0}_handleArrowKeys(q){const z=this.editor.document,U=z.schema,$=z.selection,K=$.getSelectedElement();if(K&&U.objects.has(K.name)){const H=q?$.getLastPosition():$.getFirstPosition(),Y=z.getNearestSelectionRange(H,q?'forward':'backward');return Y&&z.enqueueChanges(()=>{$.setRanges([Y])}),!0}if(!$.isCollapsed)return;const W=this._getObjectElementNextToSelection(q);if(W instanceof O.a&&z.schema.objects.has(W.name))return z.enqueueChanges(()=>{this._setSelectionOverElement(W)}),!0}_setSelectionOverElement(q){this.editor.document.selection.setRanges([E.a.createOn(q)])}_getObjectElementNextToSelection(q){const z=this.editor.document,U=z.schema,$=z.selection,K=this.editor.data,W=S.a.createFromSelection($);K.modifySelection(W,{direction:q?'forward':'backward'});const H=q?W.focus.nodeBefore:W.focus.nodeAfter;return H instanceof O.a&&U.objects.has(H.name)?H:null}}u.a=D}])}); //# sourceMappingURL=ckeditor.js.map