diff --git a/build/ckeditor.js b/build/ckeditor.js index 0c79a0eadb..d760326720 100644 --- a/build/ckeditor.js +++ b/build/ckeditor.js @@ -2,5 +2,5 @@ * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved. * For licensing, see LICENSE.md. */ -(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()})(this,function(){var e=Number.POSITIVE_INFINITY,t=Math.floor,o=Math.max,n=Math.min;return function(e){function t(n){if(a[n])return a[n].exports;var o=a[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var a={};return t.m=e,t.c=a,t.d=function(e,a,n){t.o(e,a)||Object.defineProperty(e,a,{configurable:!1,enumerable:!0,get:n})},t.n=function(e){var a=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(a,'a',a),a},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=279)}([function(e,t){'use strict';function a(e){const t=e.match(/^([^:]+):/);return t?e+` Read more: ${n}#${t[1]}.\n`:e}t.a=a;const n='https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/framework/guides/support/error-codes.html';class o extends Error{constructor(e,t){e=a(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof o}}t.b=o},function(e,t,a){'use strict';var o=a(54),i=a(18),r=a(55),s=a(0),l=a(26);class d{constructor(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new s.b('model-position-root-invalid: Position root invalid.');if(!(t instanceof Array)||0===t.length)throw new s.b('model-position-path-incorrect: Position path must be an array with at least one item.',{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t}get offset(){return Object(i.a)(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;ta?0:a,t}isAfter(e){return'after'==this.compareWith(e)}isBefore(e){return'before'==this.compareWith(e)}isEqual(e){return'same'==this.compareWith(e)}isTouching(e){let t=null,a=null;const n=this.compareWith(e);switch(n){case'same':return!0;case'before':t=d.createFromPosition(this),a=d.createFromPosition(e);break;case'after':t=d.createFromPosition(e),a=d.createFromPosition(this);break;default:return!1;}for(let n=t.parent;t.path.length+a.path.length;){if(t.isEqual(a))return!0;if(t.path.length>a.path.length){if(t.offset!==n.maxOffset)return!1;t.path=t.path.slice(0,-1),n=n.parent,t.offset++}else{if(0!==a.offset)return!1;a.path=a.path.slice(0,-1)}}}_getTransformedByDeletion(e,t){const a=d.createFromPosition(this);if(this.root!=e.root)return a;if('same'==Object(r.a)(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;a.offset-=t}}else if('prefix'==Object(r.a)(e.getParentPath(),this.getParentPath())){const n=e.path.length-1;if(e.offset<=this.path[n]){if(e.offset+t>this.path[n])return null;a.path[n]-=t}}return a}_getTransformedByInsertion(e,t,a){const n=d.createFromPosition(this);if(this.root!=e.root)return n;if('same'==Object(r.a)(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=n.maxOffset-a.offset;0!=t&&e.push(new r(a,a.getShiftedBy(t))),a.path=a.path.slice(0,-1),a.offset++,n=n.parent}for(;a.path.length<=this.end.path.length;){const t=this.end.path[a.path.length-1],n=t-a.offset;0!=n&&e.push(new r(a,a.getShiftedBy(n))),a.offset=t,a.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new o.a(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new o.a(e);for(const a of t)yield a.item}*getPositions(e={}){e.boundaries=this;const t=new o.a(e);yield t.position;for(const a of t)yield a.nextPosition}getTransformedByDelta(e){const t=[r.createFromRange(this)],a=new Set(['insert','move','remove','reinsert']);for(const n of e.operations)if(a.has(n.type))for(let a=0;ae.start.isAfter(t.start)?1:-1);const a=e.indexOf(t),o=new this(t.start,t.end);for(let t=a-1;0<=t&&e[t].end.isEqual(o.start);t++)o.start=n.a.createFromPosition(e[t].start);for(let t=a+1;t{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((a)=>{if(!(a in e.prototype)){const n=Object.getOwnPropertyDescriptor(t,a);n.enumerable=!1,Object.defineProperty(e.prototype,a,n)}})})}},function(e,t,a){'use strict';function n(e){return'string'==typeof e?[new r.a(e)]:(Object(s.a)(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new r.a(e):e))}var o=a(66),i=a(83),r=a(26),s=a(34);class l extends o.a{constructor(e,t,a){super(t),this.name=e,this._children=new i.a,a&&this.insertChildren(0,a)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}clone(e=!1){const t=e?Array.from(this._children).map((e)=>e.clone(!0)):null;return new l(this.name,this.getAttributes(),t)}offsetToIndex(e){return this._children.offsetToIndex(e)}appendChildren(e){this.insertChildren(this.childCount,e)}insertChildren(e,t){t=n(t);for(const a of t)null!==a.parent&&a.remove(),a.parent=this;this._children.insertNodes(e,t)}removeChildren(e,t=1){const a=this._children.removeNodes(e,t);for(const n of a)n.parent=null;return a}getNodeByPath(e){let t=this;for(const a of e)t=t.getChild(t.offsetToIndex(a));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,0e instanceof I?e.getValue(t):e)}function i(e,t,{node:a}){let n=o(e,a);n=1==e.length&&e[0]instanceof B?n[0]:n.reduce(h,''),k(n)?t.remove():t.set(n)}function r(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function s(e,t,a){return{set(n){e.setAttributeNS(a,t,n)},remove(){e.removeAttributeNS(a,t)}}}function l(e,t){return{set(a){e.style[t]=a},remove(){e.style[t]=null}}}function d(e){const t=Object(O.a)(e,(e)=>{if(e&&(e instanceof I||w(e)||y(e)||v(e)))return e});return t}function c(e){if('string'==typeof e?e=p(e):e.text&&g(e),e.on&&(e.eventListeners=u(e.on),delete e.on),!e.text){e.attributes&&m(e.attributes);const t=new S.a;if(e.children)if(v(e.children))t.add(e.children);else for(const a of e.children)w(a)||y(a)?t.add(a):t.add(new F(a));e.children=t}return e}function m(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),f(e,t)}function u(e){for(const t in e)f(e,t);return e}function p(e){return{text:[e]}}function g(e){Array.isArray(e.text)||(e.text=[e.text])}function f(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function h(e,t){return k(t)?e:k(e)?t:`${e} ${t}`}function b(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function _(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),b(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),b(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new C.b('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let a=0;for(const n of t.children)_(e.children.get(a++),n)}}function k(e){return!e&&0!==e}function y(e){return e instanceof E.a}function w(e){return e instanceof F}function v(e){return e instanceof S.a}function x(){return{children:[],bindings:[],attributes:{}}}function A(e){return'class'==e||'style'==e}var C=a(0),T=a(4),P=a(8),E=a(7),S=a(112),O=a(435),V=a(17),R=a(16);class F{constructor(e){Object.assign(this,c(d(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=x(),this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new C.b('ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.');this._revertTemplateFromNode(e,this._revertData)}static bind(e,t){return{to(a,n){return new N({eventNameOrFunction:a,attribute:a,observable:e,emitter:t,callback:n})},if(a,n,o){return new B({observable:e,emitter:t,attribute:a,valueIfTrue:n,callback:o})}}}static extend(e,t){e._isRendered&&R.a.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),_(e,c(d(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new C.b('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering new Node.');return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(''),n(this.text)?this._bindToObservable({schema:this.text,updater:r(t),data:e}):t.textContent=this.text.join(''),t}_renderAttributes(e){let t,a,o,i;if(this.attributes){const r=e.node,l=e.revertData;for(t in this.attributes)if(o=r.getAttribute(t),a=this.attributes[t],l&&(l.attributes[t]=o),i=Object(V.a)(a[0])&&a[0].ns?a[0].ns:null,n(a)){const n=i?a[0].value:a;l&&A(t)&&n.unshift(o),this._bindToObservable({schema:n,updater:s(r,t,i),data:e})}else'style'==t&&'string'!=typeof a[0]?this._renderStyleAttribute(a[0],e):(l&&o&&A(t)&&a.unshift(o),a=a.map((e)=>e?e.value||e:e).reduce((e,t)=>e.concat(t),[]).reduce(h,''),k(a)||r.setAttributeNS(i,t,a))}}_renderStyleAttribute(e,t){const a=t.node;for(const o in e){const i=e[o];n(i)?this._bindToObservable({schema:[i],updater:l(a,o),data:t}):a.style[o]=i}}_renderElementChildren(e){const t=e.node,a=e.intoFragment?document.createDocumentFragment():t,n=e.isApplying;let o=0;for(const i of this.children)if(v(i)){if(!n){i.setParent(t);for(const e of i)a.appendChild(e.element)}}else if(y(i))n||a.appendChild(i.element);else if(n){const t=e.revertData,n=x();t.children.push(n),i._renderNode({node:a.childNodes[o++],isApplying:!0,revertData:n})}else a.appendChild(i.render());e.intoFragment&&t.appendChild(a)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const a=this.eventListeners[t].map((a)=>{const[n,o]=t.split('@');return a.activateDomEventListener(n,o,e)});e.revertData&&e.revertData.bindings.push(a)}}_bindToObservable({schema:e,updater:t,data:a}){const n=a.revertData;i(e,t,a);const o=e.filter((e)=>!k(e)).filter((e)=>e.observable).map((n)=>n.activateAttributeListener(e,t,a));n&&n.bindings.push(o)}_revertTemplateFromNode(e,t){for(const a of t.bindings)for(const e of a)e();if(t.text)return void(e.textContent=t.text);for(const a in t.attributes){const n=t.attributes[a];null===n?e.removeAttribute(a):e.setAttribute(a,n)}for(let a=0;ai(e,t,a);return this.emitter.listenTo(this.observable,'change:'+this.attribute,n),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,n)}}}class N extends I{activateDomEventListener(e,t,a){const n=(e,a)=>{(!t||a.target.matches(t))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(a):this.observable.fire(this.eventNameOrFunction,a))};return this.emitter.listenTo(a.node,e,n),()=>{this.emitter.stopListening(a.node,e,n)}}}class B extends I{getValue(e){const t=super.getValue(e);return!k(t)&&(this.valueIfTrue||!0)}}},function(e,t,a){'use strict';var n=a(0),o=a(112),i=a(6),r=a(110),s=a(12),l=a(113),d=a(4),c=a(34);class m{constructor(e){this.locale=e,this.t=e&&e.t,this.set('ready',!1),this._viewCollections=new l.a,this._unboundChildren=this.createCollection(),this._viewCollections.on('add',(t,a)=>{a.locale=e})}get element(){return this._element?this._element:this.template?(this._addTemplateChildren(),this._element=this.template.render()):null}set element(e){this._element=e}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=i.a.bind(this,this)}createCollection(){const e=new o.a;return this._viewCollections.add(e),e}addChildren(e){Object(c.a)(e)||(e=[e]),e.map((e)=>this._unboundChildren.add(e))}removeChildren(e){Object(c.a)(e)||(e=[e]),e.map((e)=>this._unboundChildren.remove(e))}init(){if(this.ready)throw new n.b('ui-view-init-reinit: This View has already been initialized.');this._viewCollections.map((e)=>e.init()),this.ready=!0}destroy(){this.stopListening(),this._viewCollections.map((e)=>e.destroy())}_addTemplateChildren(){const e=(t)=>{if(t.children)for(const a of t.children)a instanceof m?this.addChildren(a):e(a)};e(this.template)}}t.a=m,Object(d.a)(m,r.a),Object(d.a)(m,s.a)},function(e,t,a){'use strict';function n(e,t){e[f]||(e[f]=t||Object(u.a)())}function o(e){return e[f]}function i(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function r(){return{callbacks:[],childEvents:[]}}function s(e,t){const a=i(e);if(a[t])return;let n=t,o=null;const s=[];for(;''!==n&&!a[n];)a[n]=r(),s.push(a[n]),o&&a[n].childEvents.push(o),o=n,n=n.substr(0,n.lastIndexOf(':'));if(''!==n){for(const e of s)e.callbacks=a[n].callbacks.slice();a[n].childEvents.push(o)}}function l(e,t){const a=i(e)[t];if(!a)return[];let n=[a.callbacks];for(let o=0;o{this._delegations||(this._delegations=new Map);for(const n of e){const e=this._delegations.get(n);e?e.set(t,a):this._delegations.set(n,new Map([[t,a]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const a=this._delegations.get(e);a&&a.delete(t)}}};t.c=h},function(e,t,a){'use strict';var n=a(158),i=a(13),r=o;t.a=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=r(void 0===t?e.length-1:Object(i.a)(t),0),function(){for(var a=arguments,o=-1,i=r(a.length-t,0),s=Array(i);++o{this.refresh()}),this.on('execute',(e)=>{this.isEnabled||e.stop()},{priority:'high'}),this.listenTo(e,'change:isReadOnly',(e,a,n)=>{n?(this.on('change:isEnabled',t,{priority:'lowest'}),this.isEnabled=!1):(this.off('change:isEnabled',t),this.refresh())})}refresh(){this.isEnabled=!0}execute(){}destroy(){this.stopListening()}}t.a=i,Object(o.a)(i,n.a)},function(e,t,a){'use strict';function n(e){f in e||(Object.defineProperty(e,f,{value:new Map}),Object.defineProperty(e,h,{value:new Map}),Object.defineProperty(e,b,{value:new Map}))}function o(...e){const t=r(...e),a=Array.from(this._bindings.keys()),n=a.length;if(!t.callback&&1{if(e.attrs.length&&e.attrs.length!==n)throw new u.b('observable-bind-to-attrs-length: The number of attributes must match.');e.attrs.length||(e.attrs=this._bindAttrs)}),this._to=t.to,t.callback&&(this._bindings.get(a[0]).callback=t.callback),c(this._observable,this._to),l(this),this._bindAttrs.forEach((e)=>{d(this._observable,e)})}function i(e){return e.every((e)=>'string'==typeof e)}function r(...e){if(!e.length)throw new u.b('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.attrs.push(e);else if('object'==typeof e)n={observable:e,attrs:[]},t.to.push(n);else throw new u.b('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function s(e,t,a,n){const o=e[h],i=o.get(a),r=i||{};r[n]||(r[n]=new Set),r[n].add(t),i||o.set(a,r)}function l(e){let t;e._bindings.forEach((a,n)=>{e._to.forEach((o)=>{t=o.attrs[a.callback?0:e._bindAttrs.indexOf(n)],a.to.push([o.observable,t]),s(e._observable,a,o.observable,t)})})}function d(e,t){const a=e[b],n=a.get(t);let o;n.callback?o=n.callback.apply(e,n.to.map((e)=>e[0][e[1]])):(o=n.to[0],o=o[0][o[1]]),e.hasOwnProperty(t)?e[t]=o:e.set(t,o)}function c(e,t){t.forEach((t)=>{const a=e[h];let n;a.get(t.observable)||e.listenTo(t.observable,'change',(o,i)=>{n=a.get(t.observable)[i],n&&n.forEach((t)=>{d(e,t.attr)})})})}var m=a(8),u=a(0),p=a(45),g=a(17);const f=Symbol('attributes'),h=Symbol('boundObservables'),b=Symbol('boundAttributes'),_={set(e,t){if(Object(g.a)(e))return void Object.keys(e).forEach((t)=>{this.set(t,e[t])},this);n(this);const a=this[f];if(e in this&&!a.has(e))throw new u.b('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return a.get(e)},set(t){const n=a.get(e);n===t&&a.has(e)||(a.set(e,t),this.fire('change:'+e,e,t,n))}}),this[e]=t},bind(...e){if(!e.length||!i(e))throw new u.b('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(e).size!==e.length)throw new u.b('observable-bind-duplicate-attrs: Attributes must be unique.');n(this);const t=this[b];e.forEach((e)=>{if(t.has(e))throw new u.b('observable-bind-rebind: Cannot bind the same attribute more that once.')});const r=new Map;return e.forEach((e)=>{const n={attr:e,to:[]};t.set(e,n),r.set(e,n)}),{to:o,_observable:this,_bindAttrs:e,_to:[],_bindings:r}},unbind(...e){if(!(f in this))return;const t=this[b],a=this[h];if(e.length){if(!i(e))throw new u.b('observable-unbind-wrong-attrs: Attributes must be strings.');e.forEach((e)=>{const n=t.get(e);let o,i,r,s;n.to.forEach((e)=>{o=e[0],i=e[1],r=a.get(o),s=r[i],s.delete(n),s.size||delete r[i],Object.keys(r).length||(a.delete(o),this.stopListening(o,'change'))}),t.delete(e)})}else a.forEach((e,t)=>{this.stopListening(t,'change')}),a.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new u.b('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,a)=>{e.return=t.apply(this,a)}),this[e]=function(...t){return this.fire(e,t)}}};t.a=_,Object(p.a)(_,m.c)},function(e,t,a){'use strict';var n=a(295);t.a=function(e){var t=Object(n.a)(e),a=t%1;return t===t?a?t-a:t:0}},function(e,t,a){'use strict';var n=a(80),o=a(44);t.a=function(e){return Object(o.a)(e)&&Object(n.a)(e)}},function(e,t){'use strict';var a=Array.isArray;t.a=a},function(e,t,a){'use strict';var n=a(0);const o={error(e,t){console.error(Object(n.a)(e),t)},warn(e,t){console.warn(Object(n.a)(e),t)}};t.a=o},function(e,t){'use strict';t.a=function(e){var t=typeof e;return!!e&&('object'==t||'function'==t)}},function(e,t){'use strict';t.a=function(e){var t=e?e.length:0;return t?e[t-1]:void 0}},function(e,t,a){'use strict';var n=a(0),o=a(360);const i=new Map;t.a=class{static fromJSON(e,t){if(!i.has(e.__className))throw new n.b('delta-fromjson-no-deserializer: This delta has no defined deserializer',{name:e.__className});const a=i.get(e.__className),r=new a;for(const a of e.operations)r.addOperation(o.a.fromJSON(a,t));for(const a in e)'__className'!=a&&void 0===r[a]&&(r[a]=e[a]);return r}static register(e){i.set(e.className,e)}}},function(e,t,a){'use strict';t.b=function(e,t){if(o.prototype[e])throw new n.b('model-batch-register-taken: This batch method name is already taken.',{name:e});o.prototype[e]=t};var n=a(0);class o{constructor(e,t='default'){this.document=e,this.deltas=[],this.type=t}get baseVersion(){return 0e?'ck-enabled':'ck-disabled'),t.if('isVisible','ck-hidden',(e)=>!e),t.to('isOn',(e)=>e?'ck-on':'ck-off'),t.if('withText','ck-button_with-text')],type:t.to('type',(e)=>e?e:'button'),tabindex:t.to('tabindex')},children:[{tag:'span',attributes:{class:['ck-button__label']},children:[{text:t.to('label')}]},this.tooltipView],on:{mousedown:t.to((e)=>{e.preventDefault()}),click:t.to((e)=>{this.isEnabled?this.fire('execute'):e.preventDefault()})}})}init(){if(this.icon){const e=this.iconView=new i.a;e.bind('content').to(this,'icon'),this.element.insertBefore(e.element,this.element.firstChild),this.addChildren(e)}super.init()}focus(){this.element.focus()}_createTooltipView(){const e=new r.a;return e.bind('text').to(this,'_tooltipString'),e.bind('position').to(this,'tooltipPosition'),e}_getTooltipString(e,t,a){return e?'string'==typeof e?e:(a&&(a=Object(s.b)(a)),e instanceof Function?e(t,a):`${t}${a?` (${a})`:''}`):''}}t.a=l},function(e,t,a){'use strict';var n=a(68),o=a(55),i=a(0),r=a(91);class s{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof r.a);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=s.createFromPosition(this),a=t.offset+e;return t.offset=0>a?0:a,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const a=new n.a(t);return a.skip(e),a.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),a=e.getAncestors();let n=0;for(;t[n]==a[n]&&t[n];)n++;return 0==n?null:t[n-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.isEqual(e))return'same';if(this.parent===e.parent)return 0>this.offset-e.offset?'before':'after';const t=this.getAncestors(),a=e.getAncestors(),n=Object(o.a)(t,a);let i;switch(n){case 0:return'different';case'prefix':i=t.length-1;break;case'extension':i=a.length-1;break;default:i=n-1;}const r=t[i],s=t[i+1],l=a[i+1];if(r===this.parent){const e=this.offset-l.index;return 0>=e?'before':'after'}if(r===e.parent){const t=s.index-e.offset;return 0>t?'before':'after'}const d=s.index-l.index;return 0>d?'before':'after'}static createAt(e,t){if(e instanceof s)return this.createFromPosition(e);else{const a=e;if('end'==t)t=a.is('text')?a.data.length:a.childCount;else{if('before'==t)return this.createBefore(a);if('after'==t)return this.createAfter(a);t||(t=0)}return new s(a,t)}}static createAfter(e){if(e.is('textProxy'))return new s(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new i.b('view-position-after-root: You can not make position after root.',{root:e});return new s(e.parent,e.index+1)}static createBefore(e){if(e.is('textProxy'))return new s(e.textNode,e.offsetInText);if(!e.parent)throw new i.b('view-position-before-root: You can not make position before root.',{root:e});return new s(e.parent,e.index)}static createFromPosition(e){return new this(e.parent,e.offset)}}t.a=s},function(e,t,a){'use strict';function n(e,t){t=i(t);const a=t.reduce((e,t)=>e+t.offsetSize,0),n=e.parent;s(e);const o=e.index;return n.insertChildren(o,t),r(n,o+t.length),r(n,o),new u.a(e,e.getShiftedBy(a))}function o(e){if(!e.isFlat)throw new f.b('model-writer-remove-range-not-flat: Trying to remove a range which starts and ends in different element.');const t=e.start.parent;s(e.start),s(e.end);const a=t.removeChildren(e.start.index,e.end.index-e.start.index);return r(t,e.start.index),a}function i(e){const t=[];e instanceof Array||(e=[e]);for(let a=0;ae.add(t))}function i(e){return'string'==typeof e?[new s.a(e)]:(Object(d.a)(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new s.a(e):e))}var r=a(84),s=a(35),l=a(164),d=a(34),c=a(77),m=a(175);class u extends r.a{constructor(e,t,a){if(super(),this.name=e,this._attrs=Object(c.a)(t)?Object(l.a)(t):new Map(t),this._children=[],a&&this.insertChildren(0,a),this._classes=new Set,this._attrs.has('class')){const e=this._attrs.get('class');o(this._classes,e),this._attrs.delete('class')}this._styles=new Map,this._attrs.has('style')&&(n(this._styles,this._attrs.get('style')),this._attrs.delete('style')),this._customProperties=new Map}get childCount(){return this._children.length}get isEmpty(){return 0===this._children.length}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name}clone(e=!1){const t=[];if(e)for(const a of this.getChildren())t.push(a.clone(e));const a=new this.constructor(this.name,this._attrs,t);return a._classes=new Set(this._classes),a._styles=new Map(this._styles),a._customProperties=new Map(this._customProperties),a.getFillerOffset=this.getFillerOffset,a}appendChildren(e){return this.insertChildren(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}*getAttributeKeys(){0this._classes.add(e))}removeClass(...e){this._fireChange('attributes',this),e.forEach((e)=>this._classes.delete(e))}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(e,t){if(this._fireChange('attributes',this),Object(c.a)(e)){const t=Object.keys(e);for(const a of t)this._styles.set(a,e[a])}else this._styles.set(e,t)}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}removeStyle(...e){this._fireChange('attributes',this),e.forEach((e)=>this._styles.delete(e))}findAncestor(...e){const t=new m.a(...e);for(let a=this.parent;a;){if(t.match(a))return a;a=a.parent}return null}setCustomProperty(e,t){this._customProperties.set(e,t)}getCustomProperty(e){return this._customProperties.get(e)}removeCustomProperty(e){return this._customProperties.delete(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(','),t=Array.from(this._styles).map((e)=>`${e[0]}:${e[1]}`).sort().join(';'),a=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==a?'':` ${a}`)}}t.a=u},function(e,t,a){'use strict';function n(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?s.alt:0)+(e.ctrlKey?s.ctrl:0)+(e.shiftKey?s.shift:0);else if(t=s[e.toLowerCase()],!t)throw new i.b('keyboard-unknown-key: Unknown key name.',{key:e});return t}function o(e){return e.split(/\s*\+\s*/)}t.a=n,t.d=function(e){return'string'==typeof e&&(e=o(e)),e.map((e)=>'string'==typeof e?n(e):e).reduce((e,t)=>t+e,0)},t.b=function(e){const t=o(e);return r.a.mac&&'ctrl'==t[0].toLowerCase()?'\u2318'+(t[1]||''):e};var i=a(0),r=a(350);const s=function(){const e={arrowleft:37,arrowup:38,arrowright:39,arrowdown:40,backspace:8,delete:46,enter:13,space:32,esc:27,tab:9,ctrl:1114112,cmd:1114112,shift:2228224,alt:4456448};for(let t=65;90>=t;t++){const a=String.fromCharCode(t);e[a.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}();t.c=s},function(e,t,a){'use strict';var n=a(40),o=a(1),i=a(3),r=a(0),s=a(55),l=a(23);class d extends n.a{constructor(e,t,a,n){super(n),this.sourcePosition=o.a.createFromPosition(e),this.howMany=t,this.targetPosition=o.a.createFromPosition(a),this.isSticky=!1}get type(){return'move'}clone(){const e=new this.constructor(this.sourcePosition,this.howMany,this.targetPosition,this.baseVersion);return e.isSticky=this.isSticky,e}getMovedRangeStart(){return this.targetPosition._getTransformedByDeletion(this.sourcePosition,this.howMany)}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany),t=new this.constructor(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1);return t.isSticky=this.isSticky,t}_execute(){const e=this.sourcePosition.parent,t=this.targetPosition.parent,a=this.sourcePosition.offset,n=this.targetPosition.offset;if(!e||!t)throw new r.b('move-operation-position-invalid: Source position or target position is invalid.');else if(a+this.howMany>e.maxOffset)throw new r.b('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(e===t&&a=a&&this.targetPosition.path[e]'string'==typeof e?new r.a(e):e))}var o=a(83),i=a(5),r=a(26),s=a(34);class l{constructor(e){this.markers=new Map,this._children=new o.a,e&&this.insertChildren(0,e)}[Symbol.iterator](){return this.getChildren()}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}getPath(){return[]}getNodeByPath(e){let t=this;for(const a of e)t=t.getChild(t.offsetToIndex(a));return t}offsetToIndex(e){return this._children.offsetToIndex(e)}appendChildren(e){this.insertChildren(this.childCount,e)}insertChildren(e,t){t=n(t);for(const a of t)null!==a.parent&&a.remove(),a.parent=this;this._children.insertNodes(e,t)}removeChildren(e,t=1){const a=this._children.removeNodes(e,t);for(const n of a)n.parent=null;return a}toJSON(){const e=[];for(const t of this._children)e.push(t.toJSON());return e}static fromJSON(e){const t=[];for(const a of e)a.name?t.push(i.a.fromJSON(a)):t.push(r.a.fromJSON(a));return new l(t)}}t.a=l},function(e,t,a){'use strict';var n=a(69);class o{constructor(e){this.baseVersion=e}toJSON(){const e=Object(n.a)(this,!0);return e.__className=this.constructor.className,delete e.delta,e}static get className(){return'engine.model.operation.Operation'}static fromJSON(e){return new this(e.baseVersion)}}t.a=o},function(e,t,a){'use strict';var n=a(29),o=a(98);class i extends n.a{get type(){return'remove'}getReversed(){const e=this.sourcePosition._getTransformedByInsertion(this.targetPosition,this.howMany);return new o.a(this.getMovedRangeStart(),this.howMany,e,this.baseVersion+1)}static get className(){return'engine.model.operation.RemoveOperation'}}t.a=i},function(e,t){'use strict';t.a=function(e,t,a){var n=-1,o=e.length;0>t&&(t=-t>o?0:o+t),a=a>o?o:a,0>a&&(a+=o),o=t>a?0:a-t>>>0,t>>>=0;for(var i=Array(o);++n{const d=t.matcher.matchAll(n.input);if(d)for(const a of d){const d=e instanceof Function?e(n.input):new i.a(e);if(!d)continue;const c=Array.from(d.getAttributeKeys());if(!l.schema.check({name:d.name,attributes:c,inside:n.context}))continue;if(!o.consume(n.input,t.consume||a.match))continue;n.context.push(d);const m=l.convertChildren(n.input,o,n),u=r.a.createAt(d,'end');s.a.insert(u,m),n.context.pop(),n.output=d;break}}},'normal')}toAttribute(e,t){this._setCallback(function(a){return(o,i,r,s)=>{const l=a.matcher.matchAll(i.input);if(l)for(const o of l){if(!r.consume(i.input,a.consume||o.match))continue;i.output||(i.output=s.convertChildren(i.input,r,i));let l;if(!(e instanceof Function))l={key:e,value:t?t:i.input.getAttribute(a.attributeKey)};else if(l=e(i.input),!l)return;n(i.output,l,i,s);break}}},'low')}toMarker(e){this._setCallback(function(t){return(a,n,o)=>{const r=t.matcher.matchAll(n.input);if(!r)return;let s;if(s=e instanceof Function?e(n.input):new i.a('$marker',{"data-name":n.input.getAttribute('data-name')}),'$marker'!=s.name||'string'!=typeof s.getAttribute('data-name'))throw new l.b('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const e of r)if(o.consume(n.input,t.consume||e.match)){n.output=s;break}}},'normal')}_setCallback(e,t){for(const a of this._from){const n=a.matcher.getElementName(),o=n?'element:'+n:'element',i=e(a),r=null===a.priority?t:a.priority;for(const e of this._dispatchers)e.on(o,i,{priority:r})}}}},function(e,t){'use strict';t.a=function(e){return!!e&&'object'==typeof e}},function(e,t,a){'use strict';var n=a(292);a.d(t,'a',function(){return n.a})},function(e,t,a){'use strict';var n=a(44),o=Object.prototype,i=o.toString;t.a=function(e){return'symbol'==typeof e||Object(n.a)(e)&&i.call(e)=='[object Symbol]'}},function(e,t,a){'use strict';function n(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}var o=a(27);class i extends o.a{constructor(e,t,a){super(e,t,a),this.getFillerOffset=n}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}t.a=i},function(e,t,a){'use strict';var n=a(40),o=a(1),i=a(83),r=a(41),s=a(23),l=a(26),d=a(5);class c extends n.a{constructor(e,t,a){super(a),this.position=o.a.createFromPosition(e),this.nodes=new i.a(Object(s.c)(t))}get type(){return'insert'}clone(){const e=new i.a([...this.nodes].map((e)=>e.clone(!0)));return new c(this.position,e,this.baseVersion)}getReversed(){const e=this.position.root.document.graveyard,t=new o.a(e,[0]);return new r.a(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_execute(){const e=this.nodes;this.nodes=new i.a([...e].map((e)=>e.clone(!0)));const t=Object(s.b)(this.position,e);return{range:t}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(e,t){const a=[];for(const n of e.nodes)n.name?a.push(d.a.fromJSON(n)):a.push(l.a.fromJSON(n));return new c(o.a.fromJSON(e.position,t),a,e.baseVersion)}}t.a=c},function(e,t,a){'use strict';var n=a(97),o=a(135),i=a(137),r=a(139),s=a(398),l=a(90);t.a=function(e,t,a){var d=-1,c=o.a,m=e.length,u=!0,p=[],g=p;if(a)u=!1,c=i.a;else if(m>=200){var f=t?null:Object(s.a)(e);if(f)return Object(l.a)(f);u=!1,c=r.a,g=new n.a}else g=t?[]:p;outer:for(;++d{this._listener.fire('_keydown:'+Object(o.a)(t),t)})}set(e,t,a={}){const n=Object(o.d)(e),i=a.priority;this._listener.listenTo(this._listener,'_keydown:'+n,(e,a)=>{t(a,()=>{a.preventDefault(),a.stopPropagation(),e.stop()}),e.return=!0},{priority:i})}press(e){return!!this._listener.fire('_keydown:'+Object(o.a)(e),e)}destroy(){this._listener.stopListening()}}},function(e,t,a){'use strict';t.a=function(){return new d};var n=a(71),o=a(259),i=a(92),r=a(47),s=a(94),l=a(0);class d{constructor(){this._dispatchers=[],this._from=null}for(...e){return this._dispatchers=e,this}fromElement(e){return this._from={type:'element',name:e,priority:null},this}fromAttribute(e){return this._from={type:'attribute',key:e,priority:null},this}fromMarker(e){return this._from={type:'marker',name:e,priority:null},this}withPriority(e){return this._from.priority=e,this}toElement(e){const t=null===this._from.priority?'normal':this._from.priority;for(const a of this._dispatchers)if('element'==this._from.type)e='string'==typeof e?new r.a(e):e,a.on('insert:'+this._from.name,Object(n.e)(e),{priority:t});else if('attribute'==this._from.type)e='string'==typeof e?new i.a(e):e,a.on('addAttribute:'+this._from.key,Object(n.m)(e),{priority:t}),a.on('changeAttribute:'+this._from.key,Object(n.m)(e),{priority:t}),a.on('removeAttribute:'+this._from.key,Object(n.l)(e),{priority:t}),a.on('selectionAttribute:'+this._from.key,Object(o.e)(e),{priority:t});else{const t=null===this._from.priority?'normal':this._from.priority;e='string'==typeof e?new s.a(e):e,a.on('addMarker:'+this._from.name,Object(n.g)(e),{priority:t}),a.on('removeMarker:'+this._from.name,Object(n.j)(e),{priority:t})}}toHighlight(e){const t=null===this._from.priority?'normal':this._from.priority;if('marker'!=this._from.type)throw new l.b('build-model-converter-non-marker-to-highlight: Conversion to a highlight is supported only from model markers.');for(const a of this._dispatchers)a.on('addMarker:'+this._from.name,Object(n.d)(e),{priority:t}),a.on('addMarker:'+this._from.name,Object(n.c)(e),{priority:t}),a.on('removeMarker:'+this._from.name,Object(n.d)(e),{priority:t}),a.on('removeMarker:'+this._from.name,Object(n.c)(e),{priority:t}),a.on('selectionMarker:'+this._from.name,Object(o.f)(e),{priority:t})}toAttribute(e,t){if('attribute'!=this._from.type)throw new l.b('build-model-converter-non-attribute-to-attribute: To-attribute conversion is supported only from model attributes.');let a=e?'string'==typeof e?t?function(){return{key:e,value:t}}:function(t){return{key:e,value:t}}:e:void 0;for(const o of this._dispatchers){const e={priority:this._from.priority||'normal'};o.on('addAttribute:'+this._from.key,Object(n.k)(a),e),o.on('changeAttribute:'+this._from.key,Object(n.k)(a),e),o.on('removeAttribute:'+this._from.key,Object(n.i)(a),e)}}}},function(e,a){'use strict';a.a=function(){let e='e';for(let a=0;8>a;a++)e+=t(65536*(1+Math.random())).toString(16).substring(1);return e}},function(e,t){'use strict';t.a=function(e,t){return e===t||e!==e&&t!==t}},function(e,t,a){'use strict';function n(e,t,a,n,o){return{done:!1,value:{type:e,item:t,previousPosition:a,nextPosition:n,length:o}}}var o=a(26),i=a(67),r=a(5),s=a(1),l=a(0);class d{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new l.b('model-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');const t=e.direction||'forward';if('forward'!=t&&'backward'!=t)throw new l.b('model-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:t});this.direction=t,this.boundaries=e.boundaries||null,this.position=e.startPosition?s.a.createFromPosition(e.startPosition):s.a.createFromPosition(this.boundaries['backward'==this.direction?'end':'start']),this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null,this._visitedParent=this.position.parent}[Symbol.iterator](){return this}skip(e){let t,a,n,o;do n=this.position,o=this._visitedParent,({done:t,value:a}=this.next());while(!t&&e(a));t||(this.position=n,this._visitedParent=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){const e=this.position,t=s.a.createFromPosition(this.position),a=this._visitedParent;if(null===a.parent&&t.offset===a.maxOffset)return{done:!0};if(a===this._boundaryEndParent&&t.offset==this.boundaries.end.offset)return{done:!0};const l=t.textNode?t.textNode:t.nodeAfter;if(l instanceof r.a)return this.shallow?t.offset++:(t.path.push(0),this._visitedParent=l),this.position=t,n('elementStart',l,e,t,1);if(l instanceof o.a){let o;if(this.singleCharacters)o=1;else{let e=l.endOffset;this._boundaryEndParent==a&&this.boundaries.end.offsete&&(e=this.boundaries.start.offset),o=t.offset-e}const r=t.offset-l.startOffset,s=new i.a(l,r-o,o);return t.offset-=o,this.position=t,n('text',s,e,t,o)}return t.path.pop(),this.position=t,this._visitedParent=a.parent,n('elementStart',a,e,t,1)}}t.a=d},function(e,t){'use strict';t.a=function(e,t){const a=n(e.length,t.length);for(let n=0;nn(e,t));return a.forEach((e)=>t.add(e)),o}var i=a(1),r=a(5),s=a(3),l=a(8),d=a(0),c=a(4),m=a(121),u=a(405),p=a(34);class g{constructor(e,t){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setRanges(e,t)}get anchor(){if(0{if(!(e instanceof s.a))throw new d.b('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((t)=>!t.isEqual(e))});if(e.length!==this._ranges.length||a){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire('change:range',{directChange:!0})}}setTo(e){e instanceof g?this.setRanges(e.getRanges(),e.isBackward):e instanceof s.a?this.setRanges([e]):Object(p.a)(e)?this.setRanges(e):this.setRanges([new s.a(e)])}setIn(e){this.setRanges([s.a.createIn(e)])}setOn(e){this.setRanges([s.a.createOn(e)])}setCollapsedAt(e,t){const a=i.a.createAt(e,t),n=new s.a(a,a);this.setRanges([n])}collapseToStart(){const e=this.getFirstPosition();null!==e&&this.setRanges([new s.a(e,e)])}collapseToEnd(){const e=this.getLastPosition();null!==e&&this.setRanges([new s.a(e,e)])}moveFocusTo(e,t){if(null===this.anchor)throw new d.b('model-selection-moveFocusTo-no-ranges: Cannot set selection focus if there are no ranges in selection.');const a=i.a.createAt(e,t);if('same'!=a.compareWith(this.focus)){const e=this.anchor;this._ranges.length&&this._popRange(),'before'==a.compareWith(e)?this.addRange(new s.a(a,e),!0):this.addRange(new s.a(e,a))}}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}clearAttributes(){if(0this._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(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}t.a=s,Object(r.a)(s,n.a),Object(r.a)(s,o.a)},function(e,t){'use strict';t.a=function(e){const t=e.next();return t.done?null:t.value}},function(e,t,a){'use strict';var n=a(53),o=Object.prototype,i=o.hasOwnProperty;t.a=function(e,t,a){var o=e[t];i.call(e,t)&&Object(n.a)(o,a)&&(a!==void 0||t in e)||(e[t]=a)}},function(e,t,a){'use strict';var n=a(17),o=Object.prototype,i=o.toString;t.a=function(e){var t=Object(n.a)(e)?i.call(e):'';return t=='[object Function]'||t=='[object GeneratorFunction]'}},function(e,t,a){'use strict';var n=a(121),o=a(0);class i{constructor(e){this.parent=null,this._attrs=Object(n.a)(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new o.b('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new o.b('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.root==this?null:this.root.document||null}clone(){return new i(this._attrs)}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let a=e.includeSelf?this:this.parent;a;)t[e.parentFirst?'push':'unshift'](a),a=a.parent;return t}getCommonAncestor(e,t={}){const a=this.getAncestors(t),n=e.getAncestors(t);let o=0;for(;a[o]==n[o]&&a[o];)o++;return 0==o?null:a[o-1]}remove(){this.parent.removeChildren(this.index)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}setAttribute(e,t){this._attrs.set(e,t)}setAttributesTo(e){this._attrs=Object(n.a)(e)}removeAttribute(e){return this._attrs.delete(e)}clearAttributes(){this._attrs.clear()}toJSON(){const e={};return this._attrs.size&&(e.attributes=[...this._attrs]),e}}t.a=i},function(e,t,a){'use strict';var n=a(0);class o{constructor(e,t,a){if(this.textNode=e,0>t||t>e.offsetSize)throw new n.b('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>a||t+a>e.offsetSize)throw new n.b('model-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+a),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(e){return'textProxy'==e}getPath(){const e=this.textNode.getPath();return 0{const i=e instanceof r.a?e.clone(!0):e(a,n,o);if(i&&n.consume(a.item,'insert')){const e=o.mapper.toViewPosition(a.range.start);o.mapper.bindElements(a.item,i),u.a.insert(e,i)}}},t.f=function(){return(e,t,a,n)=>{if(a.consume(t.item,'insert')){const e=n.mapper.toViewPosition(t.range.start),a=new l.a(t.item.data);u.a.insert(e,a)}}},t.g=function(e){return(t,a,n,o)=>{let i,s;if(e instanceof r.a?(i=e.clone(!0),s=e.clone(!0)):(a.isOpening=!0,i=e(a,n,o),a.isOpening=!1,s=e(a,n,o)),i&&s){const e=a.markerRange,r=t.name;if(!e.isCollapsed||n.consume(e,r)){for(const t of e)if(!n.consume(t.item,r))return;const t=o.mapper;u.a.insert(t.toViewPosition(e.start),i),e.isCollapsed||u.a.insert(t.toViewPosition(e.end),s)}}}},t.k=function(e){return e=e||((e,t)=>({value:e,key:t})),(t,a,o,i)=>{if(o.consume(a.item,n(t.name))){const{key:t,value:n}=e(a.attributeNewValue,a.attributeKey,a,o,i);i.mapper.toViewElement(a.item).setAttribute(t,n)}}},t.i=function(e){return e=e||((e,t)=>({key:t})),(t,a,o,i)=>{if(o.consume(a.item,n(t.name))){const{key:t}=e(a.attributeOldValue,a.attributeKey,a,o,i);i.mapper.toViewElement(a.item).removeAttribute(t)}}},t.m=function(e){return(t,a,o,i)=>{const s=e instanceof r.a?e.clone(!0):e(a.attributeNewValue,a,o,i);if(!s)return;if(!o.consume(a.item,n(t.name)))return;let l=i.mapper.toViewRange(a.range);if(null!==a.attributeOldValue&&!(e instanceof r.a)){const t=e(a.attributeOldValue,a,o,i);l=u.a.unwrap(l,t)}u.a.wrap(l,s)}},t.l=function(e){return(t,a,o,i)=>{const s=e instanceof r.a?e.clone(!0):e(a.attributeOldValue,a,o,i);if(s&&o.consume(a.item,n(t.name))){const e=i.mapper.toViewRange(a.range);u.a.unwrap(e,s)}}},t.h=function(){return(e,t,a,n)=>{if(!a.consume(t.item,'remove'))return;let i=n.mapper.toViewPosition(t.sourcePosition),r;if(t.item.is('element'))i=i.getLastMatchingPosition((e)=>!e.item.is('containerElement')),i.parent.is('text')&&i.isAtEnd&&(i=c.a.createAfter(i.parent)),r=d.a.createOn(i.nodeAfter);else{const e=o(i,t.item.offsetSize);r=new d.a(i,e)}u.a.remove(r.getTrimmed()),'$graveyard'==t.item.root.rootName&&n.mapper.unbindModelElement(t.item)}},t.d=function(e){return(t,a,n,o)=>{const r='function'==typeof e?e(a,n,o):e,s=a.item;if(r&&!a.markerRange.isCollapsed&&s.is('textProxy')&&n.consume(s,t.name)){r.id||(r.id=a.markerName);const e=i(r),n=o.mapper.toViewRange(a.range);'addMarker'==t.name.split(':')[0]?u.a.wrap(n,e):u.a.unwrap(n,e)}}},t.c=function(e){return(t,a,n,o)=>{const i='function'==typeof e?e(a,n,o):e,r=a.item;if(i&&!a.markerRange.isCollapsed&&r.is('element')&&n.test(a.item,t.name)){i.priority||(i.priority=10),i.id||(i.id=a.markerName);const e=o.mapper.toViewElement(r),s='addMarker'==t.name.split(':')[0],l=s?'addHighlight':'removeHighlight';if(e&&e.getCustomProperty(l)){n.consume(a.item,t.name);for(const e of p.a.createIn(r))n.consume(e.item,t.name);e.getCustomProperty(l)(e,i)}}}},t.j=function(e){return(t,a,n,o)=>{let i,s;if(e instanceof r.a?(i=e.clone(!0),s=e.clone(!0)):(a.isOpening=!0,i=e(a,n,o),a.isOpening=!1,s=e(a,n,o)),i&&s){const e=a.markerRange,r=t.name;if(!e.isCollapsed||n.consume(e,r)){for(const t of e)if(!n.consume(t.item,r))return;const t=o.mapper.toViewRange(e);u.a.clear(t.getEnlarged(),s),i.isSimilar(s)||u.a.clear(t.getEnlarged(),i)}}}},t.b=n,t.a=i;var r=a(27),s=a(92),l=a(35),d=a(38),c=a(22),m=a(68),u=a(93),p=a(3);class g extends s.a{isSimilar(e){return!!e.is('attributeElement')&&this.getCustomProperty('highlightDescriptorId')===e.getCustomProperty('highlightDescriptorId')}}},function(e,t,a){'use strict';var n=a(40);class o extends n.a{get type(){return'noop'}clone(){return new o(this.baseVersion)}getReversed(){return new o(this.baseVersion+1)}_execute(){return{}}static get className(){return'engine.model.operation.NoOperation'}}t.a=o},function(e,t,a){'use strict';var n=a(97),o=a(135),i=a(137),r=a(30),s=a(138),l=a(139);t.a=function(e,t,a,d){var c=-1,m=o.a,u=!0,p=e.length,g=[],f=t.length;if(!p)return g;a&&(t=Object(r.a)(t,Object(s.a)(a))),d?(m=i.a,u=!1):t.length>=200&&(m=l.a,u=!1,t=new n.a(t));outer:for(;++c{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t};t.d=(e)=>e.createTextNode('\xA0');const r=7;t.c=r;let s='';for(let n=0;n{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,a){this.isEnabled&&this.document.fire(e,new o.a(this.document,t,a))}}t.a=i},function(e,t,a){'use strict';var n=a(2),o=a(0),i=a(12),r=a(113),s=a(4),l=a(16),d=a(471),c=a(52);class m extends n.a{static get pluginName(){return'FileRepository'}init(){this.loaders=new r.a,this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0)}getLoader(e){for(const t of this.loaders)if(t.file==e)return t;return null}createLoader(e){if(!this.createAdapter)return l.a.error('filerepository-no-adapter: Upload adapter is not defined.'),null;const t=new u(e);return t._adapter=this.createAdapter(t),this.loaders.add(t),t.on('change:uploaded',()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on('change:uploadTotal',()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof u?e:this.getLoader(e);t._destroy(),this.loaders.remove(t)}}t.a=m,Object(s.a)(m,i.a);class u{constructor(e,t){this.id=Object(c.a)(),this.file=e,this._adapter=t,this._reader=new d.a,this.set('status','idle'),this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0),this.set('uploadResponse',null)}read(){if('idle'!=this.status)throw new o.b('filerepository-read-wrong-status: You cannot call read if the status is different than idle.');return this.status='reading',this._reader.read(this.file).then((e)=>(this.status='idle',e)).catch((e)=>{if('aborted'===e)throw this.status='aborted','aborted';throw this.status='error',this._reader.error})}upload(){if('idle'!=this.status)throw new o.b('filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.');return this.status='uploading',this._adapter.upload().then((e)=>(this.uploadResponse=e,this.status='idle',e)).catch((e)=>{if('aborted'===this.status)throw'aborted';throw this.status='error',e})}abort(){const e=this.status;this.status='aborted','reading'==e&&this._reader.abort(),'uploading'==e&&this._adapter.abort&&this._adapter.abort(),this._destroy()}_destroy(){this._reader=void 0,this._adapter=void 0,this.data=void 0,this.uploadResponse=void 0,this.file=void 0}}Object(s.a)(u,i.a)},function(e,t,a){'use strict';var n=a(116),o=a(78),i=a(44),r=Object.prototype,s=Function.prototype.toString,l=r.hasOwnProperty,d=s.call(Object),c=r.toString;t.a=function(e){if(!Object(i.a)(e)||c.call(e)!='[object Object]'||Object(o.a)(e))return!1;var t=Object(n.a)(e);if(null===t)return!0;var a=l.call(t,'constructor')&&t.constructor;return'function'==typeof a&&a instanceof a&&s.call(a)==d}},function(e,t){'use strict';t.a=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t}},function(e,t,a){'use strict';var n=a(53),o=a(80),i=a(37),r=a(17);t.a=function(e,t,a){if(!Object(r.a)(a))return!1;var s=typeof t;return!('number'==s?!(Object(o.a)(a)&&Object(i.a)(t,a.length)):!('string'==s&&t in a))&&Object(n.a)(a[t],e)}},function(e,t,a){'use strict';var n=a(294),o=a(65),i=a(81);t.a=function(e){return null!=e&&Object(i.a)(Object(n.a)(e))&&!Object(o.a)(e)}},function(e,t){'use strict';t.a=function(e){return'number'==typeof e&&-1e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new o.b('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const a of this._nodes){if(e>=t&&ee.toJSON())}}t.a=i},function(e,t,a){'use strict';var n=a(0),o=a(8),i=a(4),r=a(69);class s{constructor(){this.parent=null}get index(){let e;if(!this.parent)return null;if(-1==(e=this.parent.getChildIndex(this)))throw new n.b('view-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.parent instanceof s?this.parent.document:null}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let a=e.includeSelf?this:this.parent;a;)t[e.parentFirst?'push':'unshift'](a),a=a.parent;return t}getCommonAncestor(e,t={}){const a=this.getAncestors(t),n=e.getAncestors(t);let o=0;for(;a[o]==n[o]&&a[o];)o++;return 0==o?null:a[o-1]}remove(){this.parent.removeChildren(this.index)}_fireChange(e,t){this.fire('change:'+e,t),this.parent&&this.parent._fireChange(e,t)}toJSON(){const e=Object(r.a)(this);return delete e.parent,e}}t.a=s,Object(i.a)(s,o.c)},function(e,t,a){'use strict';function n(e){var t=-1,a=e?e.length:0;for(this.clear();++tt&&e.selection.editableElement==this),this.listenTo(e,'render',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this},{priority:'high'})}}t.a=l,Object(i.a)(l,r.a)},function(e,t,a){'use strict';function n(){if(o(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1!e.is('uiElement')).length}var i=a(27);const r=10;class s extends i.a{constructor(e,t,a){super(e,t,a),this.priority=r,this.getFillerOffset=n}is(e,t=null){return t?'attributeElement'==e&&t==this.name||super.is(e,t):'attributeElement'==e||super.is(e)}clone(e){const t=super.clone(e);return t.priority=this.priority,t}isSimilar(e){return super.isSimilar(e)&&this.priority==e.priority}}t.a=s,s.DEFAULT_PRIORITY=r},function(t,a,n){'use strict';function o(e){const t=e.offset,a=e.parent;if(a.is('text'))return e;if(a.is('attributeElement')&&0===a.childCount){const e=a.parent,t=a.index;return a.remove(),o(new A.a(e,t))}const n=a.getChild(t-1),i=a.getChild(t);if(!n||!i)return e;if(n.is('text')&&i.is('text'))return b(n,i);if(n.is('attributeElement')&&i.is('attributeElement')&&n.isSimilar(i)){const e=n.childCount;return n.appendChildren(i.getChildren()),i.remove(),o(new A.a(n,e))}return e}function i(e,t){t=Object(F.a)(t)?[...t]:[t],w(t);const a=d(e);if(!a)throw new V.b('view-writer-invalid-position-container');const n=m(e,!0),i=a.insertChildren(n.offset,t),r=n.getShiftedBy(i),s=o(n);if(0===i)return new O.a(s,s);else{s.isEqual(n)||r.offset--;const e=o(r);return new O.a(s,e)}}function r(e){if(x(e),e.isCollapsed)return new R.a;const{start:t,end:a}=c(e,!0),n=t.parent,i=a.offset-t.offset,r=n.removeChildren(t.offset,i),s=o(t);return e.start=s,e.end=A.a.createFromPosition(s),new R.a(r)}function s(e,t){let a;if(t.isAfter(e.end)){t=m(t,!0);const n=t.parent,o=n.childCount;e=c(e,!0),a=r(e),t.offset+=n.childCount-o}else a=r(e);return i(t,a)}function l(e,t){if(!(t instanceof T.a))throw new V.b('view-writer-wrap-invalid-attribute');if(x(e),e.isCollapsed)return e;if(e.end.isEqual(e.start.getShiftedBy(1))){const a=e.start.nodeAfter;if(a instanceof T.a&&_(t,a))return e}if(y(e)&&_(t,e.start.parent)){const t=e.start.parent.parent,a=e.start.parent.index;return O.a.createFromParentsAndOffsets(t,a,t,a+1)}const{start:a,end:n}=c(e,!0),i=a.parent,r=u(i,a.offset,n.offset,t),s=p(i,r.start.offset,r.end.offset,t),l=o(s.start);l.isEqual(s.start)||s.end.offset--;const d=o(s.end);return new O.a(l,d)}function d(e){let t=e.parent;for(;!v(t);){if(!t)return;t=t.parent}return t}function c(e,t=!1){const a=e.start,n=e.end;if(x(e),e.isCollapsed){const a=m(e.start,t);return new O.a(a,a)}const o=m(n,t),i=o.parent.childCount,r=m(a,t);return o.offset+=o.parent.childCount-i,new O.a(r,o)}function m(e,t=!1){const a=e.offset,n=e.parent;if(e.parent.is('emptyElement'))throw new V.b('view-writer-cannot-break-empty-element');if(e.parent.is('uiElement'))throw new V.b('view-writer-cannot-break-ui-element');if(!t&&n.is('text')&&v(n.parent))return A.a.createFromPosition(e);if(v(n))return A.a.createFromPosition(e);if(n.is('text'))return m(h(e),t);const o=n.childCount;if(a==o){const e=new A.a(n.parent,n.index+1);return m(e,t)}if(0===a){const e=new A.a(n.parent,n.index);return m(e,t)}else{const e=n.index+1,o=n.clone();n.parent.insertChildren(e,o);const i=n.childCount-a,r=n.removeChildren(a,i);o.appendChildren(r);const s=new A.a(n.parent,e);return m(s,t)}}function u(e,t,a,n){let r=t;const i=[];for(;rt.priority)&&e.getIdentity()t instanceof e))throw new V.b('view-writer-insert-invalid-node');t.is('text')||w(t.getChildren())}}function v(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function x(e){const t=d(e.start),a=d(e.end);if(!t||!a||t!==a)throw new V.b('view-writer-invalid-range-container')}var A=n(22),C=n(47),T=n(92),P=n(177),E=n(94),S=n(35),O=n(38),V=n(0),R=n(128),F=n(34);a.a={breakAttributes:function(e){return e instanceof A.a?m(e):c(e)},breakContainer:function(e){const t=e.parent;if(!t.is('containerElement'))throw new V.b('view-writer-break-non-container-element: Trying to break an element which is not a container element.');if(!t.parent)throw new V.b('view-writer-break-root: Trying to break root element.');if(e.isAtStart)return A.a.createBefore(t);if(!e.isAtEnd){const a=t.clone(!1);i(A.a.createAfter(t),a);const n=new O.a(e,A.a.createAt(t,'end')),o=new A.a(a,0);s(n,o)}return A.a.createAfter(t)},mergeAttributes:o,mergeContainers:function(e){const t=e.nodeBefore,a=e.nodeAfter;if(!t||!a||!t.is('containerElement')||!a.is('containerElement'))throw new V.b('view-writer-merge-containers-invalid-position: Element before and after given position cannot be merged.');const n=t.getChild(t.childCount-1),o=n instanceof S.a?A.a.createAt(n,'end'):A.a.createAt(t,'end');return s(O.a.createIn(a),A.a.createAt(t,'end')),r(O.a.createOn(a)),o},insert:i,remove:r,clear:function(e,t){x(e);const a=e.getWalker({direction:'backward',ignoreElementEnd:!0});for(const n of a){const a=n.item;let o;if(a.is('element')&&t.isSimilar(a))o=O.a.createOn(a);else if(!n.nextPosition.isAfter(e.start)&&(a.is('text')||a.is('textProxy'))){const e=a.getAncestors().find((e)=>e.is('element')&&t.isSimilar(e));e&&(o=O.a.createIn(e))}o&&(o.end.isAfter(e.end)&&(o.end=e.end),o.start.isBefore(e.start)&&(o.start=e.start),r(o))}},move:s,wrap:l,wrapPosition:function(t,a){if(!(a instanceof T.a))throw new V.b('view-writer-wrap-invalid-attribute');if(a.isSimilar(t.parent))return f(A.a.createFromPosition(t));t.parent.is('text')&&(t=h(t));const n=new T.a;n.priority=e,n.isSimilar=()=>!1,t.parent.insertChildren(t.offset,n);const o=new O.a(t,t.getShiftedBy(1));l(o,a);const i=new A.a(n.parent,n.index);n.remove();const r=i.nodeBefore,s=i.nodeAfter;return r instanceof S.a&&s instanceof S.a?b(r,s):f(i)},unwrap:function(e,t){if(!(t instanceof T.a))throw new V.b('view-writer-unwrap-invalid-attribute');if(x(e),e.isCollapsed)return e;if(e.end.isEqual(e.start.getShiftedBy(1))){const a=e.start.nodeAfter;if(!t.isSimilar(a)&&a instanceof T.a&&k(t,a))return e}const{start:a,end:n}=c(e,!0),i=a.parent,r=u(i,a.offset,n.offset,t),s=o(r.start);s.isEqual(r.start)||r.end.offset--;const l=o(r.end);return new O.a(s,l)},rename:function(e,t){const a=new C.a(t,e.getAttributes());return i(A.a.createAfter(e),a),s(O.a.createIn(e),A.a.createAt(a)),r(O.a.createOn(e)),a}};const I=[S.a,T.a,C.a,P.a,E.a]},function(e,t,a){'use strict';function n(){return null}function o(e,t,a){if(t.keyCode==l.c.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),n=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(n||t.shiftKey){const t=e.focusNode,o=e.focusOffset,i=a.domPositionToView(t,o);if(null===i)return;let r=!1;const s=i.getLastMatchingPosition((e)=>(e.item.is('uiElement')&&(r=!0),e.item.is('uiElement')||e.item.is('attributeElement')));if(r){const t=a.viewPositionToDom(s);n?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}t.b=function(e){e.on('keydown',(t,a)=>o(t,a,e.domConverter))};var i=a(27),r=a(0),s=a(84),l=a(28);class d extends i.a{constructor(e,t,a){super(e,t,a),this.getFillerOffset=n}is(e,t=null){return t?'uiElement'==e&&t==this.name||super.is(e,t):'uiElement'==e||super.is(e)}insertChildren(e,t){if(t&&(t instanceof s.a||0>>1){for(;r>>1,d=e[l];null!==d&&!Object(i.a)(d)&&(a?d<=t:d{this.fire(e,t)};return a.removeListener=()=>{this._domNode.removeEventListener(e,a,t),delete this._domListeners[e]},a}})},function(e,t,a){'use strict';var n=a(0),o=a(38),i=a(22),r=a(4),s=a(8),l=a(27),d=a(152),c=a(34);class m{constructor(e,t){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',e&&this.setRanges(e,t)}setFake(e=!0,t={}){this._isFake=e,this._fakeSelectionLabel=e?t.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.end:e.start;return i.a.createFromPosition(t)}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.start:e.end;return i.a.createFromPosition(t)}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(e,t){if(!(e instanceof o.a))throw new n.b('view-selection-invalid-range: Invalid Range.');this._pushRange(e),this._lastRangeBackward=!!t,this.fire('change')}*getRanges(){for(const e of this._ranges)yield o.a.createFromRange(e)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?o.a.createFromRange(e):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?o.a.createFromRange(e):null}getFirstPosition(){const e=this.getFirstRange();return e?i.a.createFromPosition(e.start):null}getLastPosition(){const e=this.getLastRange();return e?i.a.createFromPosition(e.end):null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let a=!1;for(const n of e._ranges)if(t.isEqual(n)){a=!0;break}if(!a)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=Object(d.a)(this.getRanges()),a=Object(d.a)(e.getRanges());if(t!=a)return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let a=!1;for(let n of e.getRanges())if(n=n.getTrimmed(),t.start.isEqual(n.start)&&t.end.isEqual(n.end)){a=!0;break}if(!a)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(e,t){this._ranges=[];for(const a of e){if(!(a instanceof o.a))throw new n.b('view-selection-invalid-range: Invalid Range.');this._pushRange(a)}this._lastRangeBackward=!!t,this.fire('change')}setTo(e){e instanceof m?(this._isFake=e._isFake,this._fakeSelectionLabel=e._fakeSelectionLabel,this.setRanges(e.getRanges(),e.isBackward)):e instanceof o.a?this.setRanges([e]):Object(c.a)(e)?this.setRanges(e):this.setRanges([new o.a(e)])}setIn(e){this.setRanges([o.a.createIn(e)])}setOn(e){this.setRanges([o.a.createOn(e)])}setCollapsedAt(e,t){const a=i.a.createAt(e,t),n=new o.a(a,a);this.setRanges([n])}collapseToStart(){const e=this.getFirstPosition();null!==e&&this.setRanges([new o.a(e,e)])}collapseToEnd(){const e=this.getLastPosition();null!==e&&this.setRanges([new o.a(e,e)])}moveFocusTo(e,t){if(null===this.anchor)throw new n.b('view-selection-moveFocusTo-no-ranges: Cannot set selection focus if there are no ranges in selection.');const a=i.a.createAt(e,t);if('same'!=a.compareWith(this.focus)){const e=this.anchor;this._ranges.pop(),'before'==a.compareWith(e)?this.addRange(new o.a(a,e),!0):this.addRange(new o.a(e,a))}}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,a=e.end.nodeBefore;return t instanceof l.a&&t==a?t:null}static createFromSelection(e){const t=new m;return t.setTo(e),t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new n.b('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:e,intersectingRange:t});this._ranges.push(o.a.createFromRange(e))}}t.a=m,Object(r.a)(m,s.c)},function(e,t,a){'use strict';function n(e){return e.every((e)=>'string'==typeof e)}var o=a(0),i=a(12),r=a(113),s=a(4);class l extends r.a{constructor(e){super({idProperty:'viewUid'}),this.on('add',(e,t,a)=>{t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[a])}),this.on('remove',(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this.set('ready',!1),this._parentElement=null}init(){if(this.ready)throw new o.b('ui-viewcollection-init-reinit: This ViewCollection has already been initialized.');this.map((e)=>e.init()),this.ready=!0}destroy(){this.map((e)=>e.destroy())}add(e,t){super.add(e,t),this.ready&&!e.ready&&e.init()}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!n(e))throw new o.b('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(t)=>{for(const a of this)for(const n of e)a.delegate(n).to(t);this.on('add',(a,n)=>{for(const o of e)n.delegate(o).to(t)}),this.on('remove',(a,n)=>{for(const o of e)n.stopDelegating(o,t)})}}}}t.a=l,Object(s.a)(r.a,i.a)},function(e,t,a){'use strict';var n=a(8),o=a(0),i=a(52),r=a(4);class s{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,t){let a;const n=this._idProperty;if(n in e){if(a=e[n],'string'!=typeof a)throw new o.b('collection-add-invalid-id');if(this.get(a))throw new o.b('collection-add-item-already-exists')}else e[n]=a=Object(i.a)();if(void 0===t)t=this._items.length;else if(t>this._items.length||0>t)throw new o.b('collection-add-item-invalid-index');return this._items.splice(t,0,e),this._itemMap.set(a,e),this.fire('add',e,t),this}get(e){let t;if('string'==typeof e)t=this._itemMap.get(e);else if('number'==typeof e)t=this._items[e];else throw new o.b('collection-get-invalid-arg: Index or id must be given.');return t||null}getIndex(e){let t;return t='string'==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t=!1,a,n,i;const r=this._idProperty;if('string'==typeof e?(n=e,i=this._itemMap.get(n),t=!i,i&&(a=this._items.indexOf(i))):'number'==typeof e?(a=e,i=this._items[a],t=!i,i&&(n=i[r])):(i=e,n=i[r],a=this._items.indexOf(i),t=-1==a||!this._itemMap.get(n)),t)throw new o.b('collection-remove-404: Item not found.');this._items.splice(a,1),this._itemMap.delete(n);const s=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(s),this.fire('remove',i),i}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new o.b('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=e,{as:(e)=>{this._setUpBindToBinding((t)=>new e(t))},using:(e)=>{'function'==typeof e?this._setUpBindToBinding((t)=>e(t)):this._setUpBindToBinding((t)=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,a=(a,n,o)=>{const i=t._bindToCollection==this,r=t._bindToInternalToExternalMap.get(n);if(i&&r)this._bindToExternalToInternalMap.set(n,r),this._bindToInternalToExternalMap.set(r,n);else{const t=e(n);this._bindToExternalToInternalMap.set(n,t),this._bindToInternalToExternalMap.set(t,n),this.add(t,o)}};for(const n of t)a(null,n);this.listenTo(t,'add',a),this.listenTo(t,'remove',(e,t)=>{const a=this._bindToExternalToInternalMap.get(t);a&&this.remove(a)})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}t.a=s,Object(r.a)(s,n.c)},function(e,t,a){'use strict';function n(e){return!!(e.focus&&'none'!=o.a.window.getComputedStyle(e.element).display)}var o=a(60);class i{constructor(e){if(Object.assign(this,e),e.actions&&e.keystrokeHandler)for(const t in e.actions){let a=e.actions[t];'string'==typeof a&&(a=[a]);for(const n of a)e.keystrokeHandler.set(n,(e,a)=>{this[t](),a()})}}get first(){return this.focusables.find(n)||null}get last(){return this.focusables.filter(n).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,a)=>{const n=t.element===this.focusTracker.focusedElement;return n&&(e=a),n}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,a=this.focusables.length;if(!a)return null;if(null===t)return this[1===e?'first':'last'];let o=(t+a+e)%a;do{const t=this.focusables.get(o);if(n(t))return t;o=(o+a+e)%a}while(o!==t);return null}}t.a=i},function(e,t,a){'use strict';function n(e,t,a,n){if(a.test(t.input,{name:t.input.name})&&r(t.input,t.context,n.schema,!1)){t.context.push('paragraph');const e=n.convertItem(t.input,a,t);t.context.pop(),t.output=e}}function o(e,t,a,n){if(!t.output)return;const o=g.paragraphLikeElements.has(t.input.name)&&!t.output.is('element'),i=t.input.is('documentFragment')||t.input.is('element')&&t.output.is('element')||o;if(!i)return;const s=t.output.is('element');s&&t.context.push(t.output);let l=null;for(let s=0;s{f.delete(e),t.insert(m.a.createAt(e),new c.a('paragraph'))})}}var l=a(520),d=a(2),c=a(5),m=a(1),u=a(51),p=a(43);class g extends d.a{static get pluginName(){return'Paragraph'}init(){const e=this.editor,t=e.document,a=e.data,r=e.editing;e.commands.add('paragraph',new l.a(e)),t.schema.registerItem('paragraph','$block'),Object(u.a)().for(a.modelToView,r.modelToView).fromElement('paragraph').toElement('p'),Object(p.a)().for(a.viewToModel).fromElement('p').toElement('paragraph'),a.viewToModel.on('element',n,{priority:'low'}),a.viewToModel.on('text',n,{priority:'lowest'}),a.viewToModel.on('element',o,{priority:'lowest'}),a.viewToModel.on('documentFragment',o,{priority:'lowest'}),t.on('change',(e,a,n,o)=>{'transparent'==o.type||i(t,o)}),t.on('changesDone',s,{priority:'lowest'}),e.on('dataReady',()=>{i(t,t.batch('transparent')),s()},{priority:'lowest'})}}t.a=g,g.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const f=new Map},function(e,t){'use strict';var a=Object.getPrototypeOf;t.a=function(e){return a(Object(e))}},function(e,t,a){'use strict';var n=a(64);t.a=function(e,t,a,o){a||(a={});for(var i=-1,r=t.length;++i'string'==typeof e?new o.a(e):e))}var o=a(35),i=a(4),r=a(34),s=a(8);class l{constructor(e){this._children=[],e&&this.insertChildren(0,e)}[Symbol.iterator](){return this._children[Symbol.iterator]()}get childCount(){return this._children.length}get isEmpty(){return 0===this.childCount}get root(){return this}get parent(){return null}is(e){return'documentFragment'==e}appendChildren(e){return this.insertChildren(this.childCount,e)}getChild(e){return this._children[e]}getChildIndex(e){return this._children.indexOf(e)}getChildren(){return this._children[Symbol.iterator]()}insertChildren(e,t){this._fireChange('children',this);let a=0;t=n(t);for(const n of t)null!==n.parent&&n.remove(),n.parent=this,this._children.splice(e,0,n),e++,a++;return a}removeChildren(e,t=1){this._fireChange('children',this);for(let a=e;at?0:t,n)):[]}},function(e,t,a){'use strict';var o=a(42),i=a(13);t.a=function(e,t,a){var n=e?e.length:0;return n?(t=a||void 0===t?1:Object(i.a)(t),t=n-t,Object(o.a)(e,0,0>t?0:t)):[]}},function(e,t){'use strict';t.a=function(e){return e&&e.length?e[0]:void 0}},function(e,t,a){'use strict';var o=a(97),i=a(135),r=a(137),s=a(30),l=a(138),d=a(139);t.a=function(e,t,a){for(var c=a?r.a:i.a,m=e[0].length,u=e.length,p=u,g=Array(u),f=Infinity,h=[];p--;){var b=e[p];p&&t&&(b=Object(s.a)(b,Object(l.a)(t))),f=n(b.length,f),g[p]=!a&&(t||120<=m&&120<=b.length)?new o.a(p&&b):void 0}b=e[0];var _=-1,k=g[0];outer:for(;++_{e.has(a)&&o.call(this,a,r,i,n.range,n.sourcePosition)},{priority:'high'})}function o(e,t,a,n,o){const r=n.end.offset-n.start.offset;let s=n.start;('move'==e||'remove'==e||'reinsert'==e)&&(s=s._getTransformedByInsertion(o,r));const l=this._getTransformedByDocumentChange(e,t,s,r,o);('move'==e||'remove'==e||'reinsert'==e)&&3==l.length&&(l[2]=n);const d=i.a.createFromRanges(l),c=!d.isEqual(this),m=this.containsPosition(s),u=o&&(this.containsPosition(o)||this.start.isEqual(o));if(c){const t=i.a.createFromRange(this);this.start=d.start,this.end=d.end,this.fire('change:range',t,{type:e,batch:a,range:n,sourcePosition:o})}else(m||u)&&this.fire('change:content',i.a.createFromRange(this),{type:e,batch:a,range:n,sourcePosition:o})}var i=a(3),r=a(8),s=a(4);class l extends i.a{constructor(e,t){super(e,t),n.call(this)}detach(){this.stopListening()}}t.a=l,Object(s.a)(l,r.c)},function(e,t){'use strict';function a(e){let t=0;for(const a of e)t++;return t}t.a=a},function(e,t,a){'use strict';function n(e,t,a){let n=Object(f.a)(e);return a&&(n=n.slice(n.indexOf(a)+1)),n.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function o(e,t){for(;e&&e!=p.a.document;)t(e),e=e.parentNode}var i=a(35),r=a(27),s=a(22),l=a(38),d=a(111),c=a(128),m=a(68),u=a(74),p=a(60),g=a(414),f=a(252),h=a(415);t.a=class{constructor(e={}){this.blockFiller=e.blockFiller||u.a,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(e,t){this._fakeSelectionMapping.set(e,d.a.createFromSelection(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,a={}){if(e.is('text')){const a=this._processDataFromViewText(e);return t.createTextNode(a)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let n;if(e.is('documentFragment'))n=t.createDocumentFragment(),a.bind&&this.bindDocumentFragments(n,e);else{if(e.is('uiElement'))return n=e.render(t),a.bind&&this.bindElements(n,e),n;n=t.createElement(e.name),a.bind&&this.bindElements(n,e);for(const t of e.getAttributeKeys())n.setAttribute(t,e.getAttribute(t))}if(a.withChildren||void 0===a.withChildren)for(const o of this.viewChildrenToDom(e,t,a))n.appendChild(o);return n}}*viewChildrenToDom(e,t,a={}){const n=e.getFillerOffset&&e.getFillerOffset();let o=0;for(const i of e.getChildren())n===o&&(yield this.blockFiller(t)),yield this.viewToDom(i,t,a),o++;n===o&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),a=this.viewPositionToDom(e.end),n=document.createRange();return n.setStart(t.parent,t.offset),n.setEnd(a.parent,a.offset),n}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const a=this.findCorrespondingDomText(t);if(!a)return null;let n=e.offset;return Object(u.i)(a)&&(n+=u.c),{parent:a,offset:n}}else{let a,n,o;if(0===e.offset){if(a=this.mapViewToDom(t),!a)return null;o=a.childNodes[0]}else{const t=e.nodeBefore;if(n=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!n)return null;a=n.parentNode,o=n.nextSibling}if(this.isText(o)&&Object(u.i)(o))return{parent:o,offset:u.c};const i=n?Object(g.a)(n)+1:0;return{parent:a,offset:i}}}domToView(e,t={}){if(Object(u.g)(e,this.blockFiller))return null;const a=this.getParentUIElement(e,this._domToViewMapping);if(a)return a;if(this.isText(e)){if(Object(u.h)(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new i.a(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let a;if(this.isDocumentFragment(e))a=new c.a,t.bind&&this.bindDocumentFragments(e,a);else{const n=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();a=new r.a(n),t.bind&&this.bindElements(e,a);const o=e.attributes;for(let e=o.length-1;0<=e;e--)a.setAttribute(o[e].name,o[e].value)}if(t.withChildren||void 0===t.withChildren)for(const n of this.domChildrenToView(e,t))a.appendChildren(n);return a}}*domChildrenToView(e,t={}){for(let a=0;an?0:n),new s.a(a,n)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new s.a(t,0)}else{const a=e.childNodes[t-1],n=this.isText(a)?this.findCorrespondingViewText(a):this.mapDomToView(a);if(n&&n.parent)return new s.a(n.parent,n.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(Object(u.h)(e))return null;const t=this.getParentUIElement(e);if(t)return t;const a=e.previousSibling;if(a){if(!this.isElement(a))return null;const e=this.mapDomToView(a);if(e){const t=e.nextSibling;return t instanceof i.a?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof i.a?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:a}=p.a.window,n=[];o(t,(e)=>{const{scrollLeft:t,scrollTop:a}=e;n.push([t,a])}),t.focus(),o(t,(e)=>{const[t,a]=n.shift();e.scrollLeft=t,e.scrollTop=a}),p.a.window.scrollTo(e,a)}}isText(e){return e&&e.nodeType==Node.TEXT_NODE}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const a=t.collapsed;return t.detach(),a}getParentUIElement(e){const t=Object(f.a)(e);for(t.pop();t.length;){const e=t.pop(),a=this._domToViewMapping.get(e);if(a&&a.is('uiElement'))return a}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(this.isText(e)&&Object(u.i)(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const a=this._getTouchingViewTextNode(e,!1),n=a&&this._nodeEndsWithSpace(a);(n||!a)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const a=this._getTouchingViewTextNode(e,!0);a||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=Object(u.e)(e);if(n(e,this.preElements))return t;t=t.replace(/[ \n\t\r]{1,}/g,' ');const a=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!a||/[^\S\u00A0]/.test(a.data.charAt(a.data.length-1)))&&(t=t.replace(/^ /,'')),o||(t=t.replace(/ $/,'')),t=t.replace(/ \u00A0/g,' '),(!a||/[^\S\u00A0]/.test(a.data.charAt(a.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const a=new m.a({startPosition:t?s.a.createAfter(e):s.a.createBefore(e),direction:t?'forward':'backward'});for(const n of a){if(n.item.is('containerElement'))return null;if(n.item.is('text'))return n.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const a=t?'nextNode':'previousNode',o=e.ownerDocument,i=o.createTreeWalker(o.childNodes[0],NodeFilter.SHOW_TEXT);i.currentNode=e;const r=i[a]();if(null!==r){const t=Object(h.a)(e,r);if(t&&!n(e,this.blockElements,t)&&!n(r,this.blockElements,t))return r}return null}}},function(e,t,a){'use strict';var n=a(45);class o{constructor(e,t,a){this.document=e,this.domEvent=t,this.domTarget=t.target,Object(n.a)(this,a)}get target(){return this.document.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}t.a=o},function(e,t){'use strict';t.a=function(e){return'[object Range]'==Object.prototype.toString.apply(e)}},function(e,t,a){'use strict';function n(e,t,a){const n=new r.a;n.on('change:top',(n,o)=>{o.oldDescriptor&&a(e,o.oldDescriptor),o.newDescriptor&&t(e,o.newDescriptor)}),e.setCustomProperty('addHighlight',(e,t)=>n.add(t)),e.setCustomProperty('removeHighlight',(e,t)=>n.remove(t))}function o(e,t){e.setCustomProperty(l,t)}function i(){return null}t.c=function(e){return!!e.getCustomProperty(s)},t.d=function(e,t={}){function a(e){return Array.isArray(e)?e:[e]}return e.setAttribute('contenteditable',!1),e.getFillerOffset=i,e.addClass(d),e.setCustomProperty(s,!0),t.label&&o(e,t.label),n(e,(e,t)=>e.addClass(...a(t.class)),(e,t)=>e.removeClass(...a(t.class))),e},t.b=function(e){const t=e.getCustomProperty(l);return t?'function'==typeof t?t():t:''},t.e=function(e){return e.addClass('ck-editable'),e.setAttribute('contenteditable',!e.isReadOnly),e.on('change:isReadOnly',(t,a,n)=>{e.setAttribute('contenteditable',!n)}),e.on('change:isFocused',(t,a,n)=>{n?e.addClass('ck-editable_focused'):e.removeClass('ck-editable_focused')}),e};var r=a(493);const s=Symbol('isWidget'),l=Symbol('label'),d='ck-widget';t.a='ck-widget_selected'},function(e,t,a){'use strict';var n=a(2),o=a(272),i=a(0),r=a(63);class s extends n.a{static get pluginName(){return'ContextualBalloon'}init(){this.view=new o.a,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this._stack=new Map,this.editor.ui.focusTracker.add(this.view.element),this.editor.ui.view.body.add(this.view)}get visibleView(){const e=this._stack.get(this.view.content.get(0));return e?e.view:null}hasView(e){return this._stack.has(e)}add(e){if(this.hasView(e.view))throw new i.b('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(e.view,e),this._show(e)}remove(e){if(!this.hasView(e))throw new i.b('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');if(this.visibleView===e){this.view.content.remove(e),this._stack.delete(e);const t=Array.from(this._stack.values()).pop();t?this._show(t):this.view.hide()}else this._stack.delete(e)}updatePosition(e){e&&(this._stack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition())}_show({view:e,balloonClassName:t=''}){this.view.className=t,this.view.content.add(e),this.view.pin(this._getBalloonPosition())}_getBalloonPosition(){let e=Object(r.a)(this._stack.values()).position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}t.a=s},function(e,t){'use strict';t.a=function(e,t,a){var n=a.length;return 0===n?e.call(t):1===n?e.call(t,a[0]):2===n?e.call(t,a[0],a[1]):3===n?e.call(t,a[0],a[1],a[2]):e.apply(t,a)}},function(e,t,a){'use strict';var n=a(65),o=a(17),i=a(46),r=0/0,s=/^\s+|\s+$/g,l=/^[-+]0x[0-9a-f]+$/i,d=/^0b[01]+$/i,c=/^0o[0-7]+$/i,m=parseInt;t.a=function(e){if('number'==typeof e)return e;if(Object(i.a)(e))return r;if(Object(o.a)(e)){var t=Object(n.a)(e.valueOf)?e.valueOf():e;e=Object(o.a)(t)?t+'':t}if('string'!=typeof e)return 0===e?e:+e;e=e.replace(s,'');var a=d.test(e);return a||c.test(e)?m(e.slice(2),a?2:8):l.test(e)?r:+e}},function(e){e.exports=function(e){if(!e.webpackPolyfill){var t=Object.create(e);t.children||(t.children=[]),Object.defineProperty(t,'loaded',{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,'id',{enumerable:!0,get:function(){return t.i}}),Object.defineProperty(t,'exports',{enumerable:!0}),t.webpackPolyfill=1}return t}},function(e,t,a){'use strict';var n=a(162),o=a(119),i=a(15),r=a(81),s=a(120);t.a=function(e){var t=e?e.length:void 0;return Object(r.a)(t)&&(Object(i.a)(e)||Object(s.a)(e)||Object(o.a)(e))?Object(n.a)(t,String):null}},function(e,t){'use strict';t.a=function(e,t){for(var a=-1,n=Array(e);++a{if(!t.viewPosition){const e=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(e,t.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(e,t)=>{if(t.modelPosition)return;let a=t.viewPosition.parent,o=this._viewToModelMapping.get(a);for(;!o;)a=a.parent,o=this._viewToModelMapping.get(a);const i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,a);t.modelPosition=n.a.createFromParentAndOffset(o,i)},{priority:'low'})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);this._unbindElements(t,e)}unbindModelElement(e){const t=this.toViewElement(e);this._unbindElements(e,t)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new o.a(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new r.a(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire('viewToModelPosition',t),t.modelPosition}toViewPosition(e){const t={modelPosition:e,mapper:this};return this.fire('modelToViewPosition',t),t.viewPosition}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}_toModelOffset(e,t,a){if(a!=e){const n=this._toModelOffset(e.parent,e.index,a),o=this._toModelOffset(e,t,e);return n+o}if(e.is('text'))return t;let n=0;for(let o=0;o{if(n.containsItem(e)){const t=a.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!i}var o=a(349),i=a(3),r=a(1),s=a(39),l=a(8),d=a(4),c=a(45);class m{constructor(e,t={}){this._modelDocument=e,this.conversionApi=Object(c.a)({dispatcher:this},t)}convertChange(e,t){'remove'!==e&&t.range&&'$graveyard'==t.range.root.rootName||'remove'==e&&'$graveyard'==t.sourcePosition.root.rootName||'rename'==e&&'$graveyard'==t.element.root.rootName||('insert'==e||'reinsert'==e?this.convertInsertion(t.range):'move'==e?this.convertMove(t.sourcePosition,t.range):'remove'==e?this.convertRemove(t.sourcePosition,t.range):'addAttribute'==e||'removeAttribute'==e||'changeAttribute'==e?this.convertAttribute(e,t.range,t.key,t.oldValue,t.newValue):'rename'==e&&this.convertRename(t.element,t.oldName))}convertInsertion(e){const t=this._createInsertConsumable(e);for(const a of e){const e=a.item,n=i.a.createFromPositionAndShift(a.previousPosition,a.length),o={item:e,range:n};this._testAndFire('insert',o,t);for(const a of e.getAttributeKeys())o.attributeKey=a,o.attributeOldValue=null,o.attributeNewValue=e.getAttribute(a),this._testAndFire(`addAttribute:${a}`,o,t)}for(const t of this._modelDocument.markers){const a=t.getRange(),o=a.getIntersection(e);o&&n(e.start,t,this.conversionApi.mapper)&&this.convertMarker('addMarker',t.name,o)}}convertMove(e,t){if(t.start.isBefore(e)){this.convertInsertion(t);const a=e._getTransformedByInsertion(t.start,t.end.offset-t.start.offset);this.convertRemove(a,t)}else this.convertRemove(e,t),this.convertInsertion(t)}convertRemove(e,t){const a=this._createConsumableForRange(t,'remove');for(const n of t.getItems({shallow:!0})){this._testAndFire('remove',{sourcePosition:e,item:n},a)}}convertAttribute(e,t,a,n,o){if(n!=o){const r=this._createConsumableForRange(t,e+':'+a);for(const s of t){const t=s.item,l=i.a.createFromPositionAndShift(s.previousPosition,s.length);this._testAndFire(`${e}:${a}`,{item:t,range:l,attributeKey:a,attributeOldValue:n,attributeNewValue:o},r)}}}convertRename(e,t){if(e.name!=t){const a=e.clone(!0);a.name=t,this.conversionApi.mapper.bindElements(a,this.conversionApi.mapper.toViewElement(e));const n=new s.a;n.appendChildren(a),this.convertRemove(r.a.createBefore(e),i.a.createOn(a)),this.convertInsertion(i.a.createOn(e))}}convertSelection(e){const t=Array.from(this._modelDocument.markers.getMarkersAtPosition(e.getFirstPosition())),a=this._createSelectionConsumable(e,t);this.fire('selection',{selection:e},a,this.conversionApi);for(const o of t){const t=o.getRange();if(!n(e.getFirstPosition(),o,this.conversionApi.mapper))continue;const i={selection:e,markerName:o.name,markerRange:t};a.test(e,'selectionMarker:'+o.name)&&this.fire('selectionMarker:'+o.name,i,a,this.conversionApi)}for(const t of e.getAttributeKeys()){const n={selection:e,key:t,value:e.getAttribute(t)};a.test(e,'selectionAttribute:'+n.key)&&this.fire('selectionAttribute:'+n.key,n,a,this.conversionApi)}}convertMarker(e,t,a){if(a.root.document&&'$graveyard'!=a.root.rootName){const n=e+':'+t;if(a.isCollapsed){const e=new o.a;return e.add(a,n),void this.fire(n,{markerName:t,markerRange:a},e,this.conversionApi)}const r=this._createConsumableForRange(a,n);for(const e of a){const o=e.item;if(!r.test(o,n))continue;const s={item:o,range:i.a.createFromPositionAndShift(e.previousPosition,e.length),markerName:t,markerRange:a};this.fire(n,s,r,this.conversionApi)}}}_createInsertConsumable(e){const t=new o.a;for(const a of e){const e=a.item;t.add(e,'insert');for(const a of e.getAttributeKeys())t.add(e,'addAttribute:'+a)}return t}_createConsumableForRange(e,t){const a=new o.a;for(const n of e.getItems())a.add(n,t);return a}_createSelectionConsumable(e,t){const a=new o.a;a.add(e,'selection');for(const n of t)a.add(e,'selectionMarker:'+n.name);for(const n of e.getAttributeKeys())a.add(e,'selectionAttribute:'+n);return a}_testAndFire(e,t,a){if(a.test(t.item,e)){const n=t.item.name||'$text';this.fire(e+':'+n,t,a,this.conversionApi)}}}t.a=m,Object(d.a)(m,l.c)},function(e,t,a){'use strict';function n(){return null}var o=a(27),i=a(0),r=a(84);class s extends o.a{constructor(e,t,a){super(e,t,a),this.getFillerOffset=n}is(e,t=null){return t?'emptyElement'==e&&t==this.name||super.is(e,t):'emptyElement'==e||super.is(e)}insertChildren(e,t){if(t&&(t instanceof r.a||0{e.has(a)&&o.call(this,a,n.range,n.sourcePosition)},{priority:'high'})}function o(e,t,a){const n=t.end.offset-t.start.offset;let o;switch(e){case'insert':const i='sticksToNext'==this.stickiness;o=this._getTransformedByInsertion(t.start,n,i);break;case'move':case'remove':case'reinsert':const s=r.a.createFromPositionAndShift(a,n),l=s.containsPosition(this)||s.start.isEqual(this)&&'sticksToNext'==this.stickiness||s.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(l)o=this._getCombined(a,t.start);else{const e='sticksToNext'==this.stickiness;o=this._getTransformedByMove(a,t.start,n,e)}}if(!this.isEqual(o)){const e=i.a.createFromPosition(this);this.path=o.path,this.root=o.root,this.fire('change',e)}}var i=a(1),r=a(3),s=a(8),l=a(4),d=a(0);class c extends i.a{constructor(e,t,a){if(super(e,t),!this.root.is('rootElement'))throw new d.b('model-liveposition-root-not-rootelement: LivePosition\'s root has to be an instance of RootElement.');this.stickiness=a||'sticksToNext',n.call(this)}detach(){this.stopListening()}}t.a=c,Object(l.a)(c,s.c)},function(e,t){'use strict';function a(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function n(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function o(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}t.b=function(e,t){return n(e.charAt(t-1))&&o(e.charAt(t))},t.a=function(e,t){return a(e.charAt(t))}},function(e,t,a){'use strict';var n=a(97),o=a(365);t.a=function(e,t,a,i,r,s){var l=r&2,d=e.length,c=t.length;if(d!=c&&!(l&&c>d))return!1;var m=s.get(e);if(m)return m==t;var u=-1,p=!0,g=r&1?new n.a:void 0;for(s.set(e,t);++ue+t.operations.length,0)}function i(e,t){const a=e[e.length-1];let n=a.operations.length+a.baseVersion;const o=new g.a;for(let a=0;at)return[];for(var d=0,c=0,m=Array(s(l/t));da&&(a=o(r+a,0)),Object(n.a)(e,t,a)):-1}},function(e,t,a){'use strict';var n=a(142);t.a=function(e){return Object(n.a)(e,1)}},function(e,t,a){'use strict';var n=a(30),o=a(144),i=a(145),r=a(9),s=Object(r.a)(function(e){var t=Object(n.a)(e,i.a);return t.length&&t[0]===e[0]?Object(o.a)(t):[]});t.a=s},function(e,t,a){'use strict';var n=a(30),o=a(144),i=a(10),r=a(145),s=a(18),l=a(9),d=Object(l.a)(function(e){var t=Object(s.a)(e),a=Object(n.a)(e,r.a);return t===Object(s.a)(a)?t=void 0:a.pop(),a.length&&a[0]===e[0]?Object(o.a)(a,Object(i.a)(t)):[]});t.a=d},function(e,t,a){'use strict';var n=a(30),o=a(144),i=a(145),r=a(18),s=a(9),l=Object(s.a)(function(e){var t=Object(r.a)(e),a=Object(n.a)(e,i.a);return t===Object(r.a)(a)?t=void 0:a.pop(),a.length&&a[0]===e[0]?Object(o.a)(a,void 0,t):[]});t.a=l},function(e,t){'use strict';var a=Array.prototype,n=a.join;t.a=function(e,t){return e?n.call(e,t):''}},function(e,t,a){'use strict';var i=a(187),r=a(13);t.a=function(e,t,a){var s=e?e.length:0;if(!s)return-1;var l=s;if(void 0!==a&&(l=Object(r.a)(a),l=(0>l?o(s+l,0):n(l,s-1))+1),t!==t)return Object(i.a)(e,l,!0);for(;l--;)if(e[l]===t)return l;return-1}},function(e,t,a){'use strict';var o=a(393),i=a(13);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(i.a)(t)):void 0}},function(e,t,a){'use strict';var n=a(146),o=a(9),i=Object(o.a)(n.a);t.a=i},function(e,t,a){'use strict';var n=a(10),o=a(147);t.a=function(e,t,a){return e&&e.length&&t&&t.length?Object(o.a)(e,t,Object(n.a)(a)):e}},function(e,t,a){'use strict';var n=a(147);t.a=function(e,t,a){return e&&e.length&&t&&t.length?Object(n.a)(e,t,void 0,a):e}},function(e,t,a){'use strict';var n=a(30),o=a(395),i=a(25),r=a(217),s=a(397),l=a(37),d=a(9),c=Object(d.a)(function(e,t){t=Object(i.a)(t,1);var a=e?e.length:0,d=Object(o.a)(e,t);return Object(r.a)(e,Object(n.a)(t,function(e){return Object(l.a)(e,a)?+e:e}).sort(s.a)),d});t.a=c},function(e,t,a){'use strict';var n=a(105),o=a(37),i=a(57),r=a(18),s=a(396),l=a(58),d=Array.prototype,c=d.splice;t.a=function(e,t){for(var a=e?t.length:0,d=a-1;a--;){var m=t[a];if(a==d||m!==u){var u=m;if(Object(o.a)(m))c.call(e,m,1);else if(!Object(i.a)(m,e)){var p=Object(n.a)(m),g=Object(s.a)(e,p);null!=g&&delete g[Object(l.a)(Object(r.a)(p))]}else delete e[Object(l.a)(m)]}}return e}},function(e,t,a){'use strict';var n=a(10),o=a(217);t.a=function(e,t){var a=[];if(!(e&&e.length))return a;var i=-1,r=[],s=e.length;for(t=Object(n.a)(t,3);++it?0:t)):[]}},function(e,t,a){'use strict';var o=a(42),i=a(13);t.a=function(e,t,a){var n=e?e.length:0;return n?(t=a||void 0===t?1:Object(i.a)(t),t=n-t,Object(o.a)(e,0>t?0:t,n)):[]}},function(e,t,a){'use strict';var n=a(10),o=a(106);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(n.a)(t,3),!1,!0):[]}},function(e,t,a){'use strict';var n=a(10),o=a(106);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(n.a)(t,3)):[]}},function(e,t,a){'use strict';var n=a(25),o=a(49),i=a(14),r=a(9),s=Object(r.a)(function(e){return Object(o.a)(Object(n.a)(e,1,i.a,!0))});t.a=s},function(e,t,a){'use strict';var n=a(25),o=a(10),i=a(49),r=a(14),s=a(18),l=a(9),d=Object(l.a)(function(e){var t=Object(s.a)(e);return Object(r.a)(t)&&(t=void 0),Object(i.a)(Object(n.a)(e,1,r.a,!0),Object(o.a)(t))});t.a=d},function(e,t,a){'use strict';var n=a(25),o=a(49),i=a(14),r=a(18),s=a(9),l=Object(s.a)(function(e){var t=Object(r.a)(e);return Object(i.a)(t)&&(t=void 0),Object(o.a)(Object(n.a)(e,1,i.a,!0),void 0,t)});t.a=l},function(e,t,a){'use strict';var n=a(49);t.a=function(e){return e&&e.length?Object(n.a)(e):[]}},function(e,t,a){'use strict';var n=a(10),o=a(49);t.a=function(e,t){return e&&e.length?Object(o.a)(e,Object(n.a)(t)):[]}},function(e,t,a){'use strict';var n=a(49);t.a=function(e,t){return e&&e.length?Object(n.a)(e,void 0,t):[]}},function(e,t,a){'use strict';var n=a(73),o=a(14),i=a(9),r=Object(i.a)(function(e,t){return Object(o.a)(e)?Object(n.a)(e,t):[]});t.a=r},function(e,t,a){'use strict';var n=a(109),o=a(150),i=a(14),r=a(9),s=Object(r.a)(function(e){return Object(o.a)(Object(n.a)(e,i.a))});t.a=s},function(e,t,a){'use strict';var n=a(109),o=a(10),i=a(150),r=a(14),s=a(18),l=a(9),d=Object(l.a)(function(e){var t=Object(s.a)(e);return Object(r.a)(t)&&(t=void 0),Object(i.a)(Object(n.a)(e,r.a),Object(o.a)(t))});t.a=d},function(e,t,a){'use strict';var n=a(109),o=a(150),i=a(14),r=a(18),s=a(9),l=Object(s.a)(function(e){var t=Object(r.a)(e);return Object(i.a)(t)&&(t=void 0),Object(o.a)(Object(n.a)(e,i.a),void 0,t)});t.a=l},function(e,t,a){'use strict';var n=a(9),o=a(108),i=Object(n.a)(o.a);t.a=i},function(e,t,a){'use strict';var n=a(64),o=a(247);t.a=function(e,t){return Object(o.a)(e||[],t||[],n.a)}},function(e,t){'use strict';t.a=function(e,t,a){for(var n=-1,o=e.length,i=t.length,r={};++n{const e=Array.from(n.getAttributeKeys()).filter((e)=>e.startsWith(g));for(const a of e)t.removeAttribute(n,a)})}var i=a(1),r=a(3),s=a(151),l=a(26),d=a(67),c=a(121),m=a(0),u=a(16),p=a(59);const g='selection:',f=new Set(['addAttribute','removeAttribute','changeAttribute','addRootAttribute','removeRootAttribute','changeRootAttribute']);class h extends p.a{constructor(e){super(),this._document=e,this._attributePriority=new Map,this.listenTo(this._document,'change',(e,t,a,n)=>{f.has(t)&&this._updateAttributes(!1),o(a,n,this._document)})}get isCollapsed(){const e=this._ranges.length;return 0===e?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return 0{t.root==this._document.graveyard&&this._fixGraveyardSelection(t,n.sourcePosition),this.fire('change:range',{directChange:!1})}),t}_updateAttributes(e){const t=Object(c.a)(this._getSurroundingAttributes()),a=Object(c.a)(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)'low'==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t,!1);const n=[];for(const[t,o]of this.getAttributes())a.has(t)&&a.get(t)===o||n.push(t);for(const[t]of a)this.hasAttribute(t)||n.push(t);0u?-1:1;c[n+p]&&(c[n]=c[n+p].slice(0)),c[n]||(c[n]=[]),c[n].push(i>u?r:s);let g=o(i,u),f=g-n;for(;fn;g--)m[g]=i(g);m[n]=i(n),u++}while(m[n]!==d);return c[n].slice(1)}},function(e,t){'use strict';t.a=function(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}},function(e,t,a){'use strict';var n=a(91);const o=Symbol('rootName');class i extends n.a{constructor(e){super(e),this.rootName='main'}is(e,t=null){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}get rootName(){return this.getCustomProperty(o)}set rootName(e){this.setCustomProperty(o,e)}}t.a=i},function(e,t,a){'use strict';var n=a(61),o=a(111),i=a(74),r=a(416);class s extends n.a{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e.renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){function t(e,t){if(!Array.isArray(e))return e===t||e.is('text')&&t.is('text')&&e.data===t.data}if(0===e.length)return;const a=this.domConverter,n=new Map,s=new Set;for(const t of e)if('childList'===t.type){const e=a.mapDomToView(t.target);if(e&&e.is('uiElement'))continue;e&&!this._isBogusBrMutation(t)&&s.add(e)}for(const t of e){const e=a.mapDomToView(t.target);if(!(e&&e.is('uiElement'))&&'characterData'===t.type){const e=a.findCorrespondingViewText(t.target);e&&!s.has(e.parent)?n.set(e,{type:'text',oldText:e.data,newText:Object(i.e)(t.target),node:e}):!e&&Object(i.i)(t.target)&&s.add(a.mapDomToView(t.target.parentNode))}}const l=[];for(const t of n.values())this.renderer.markToSync('text',t.node),l.push(t);for(const n of s){const e=a.mapViewToDom(n),o=Array.from(n.getChildren()),i=Array.from(a.domChildrenToView(e));Object(r.a)(o,i,t)||(this.renderer.markToSync('children',n),l.push({type:'children',oldChildren:o,newChildren:i,node:n}))}const d=e[0].target.ownerDocument.getSelection();let c=null;if(d&&d.anchorNode){const e=a.domPositionToView(d.anchorNode,d.anchorOffset),t=a.domPositionToView(d.focusNode,d.focusOffset);e&&t&&(c=new o.a,c.setCollapsedAt(e),c.moveFocusTo(t))}this.document.fire('mutations',l,c),this.document.render()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is('element','br')}}t.a=s},function(e,t,a){'use strict';var i=a(17),r=a(418),s=a(159);t.a=function(e,t,a){function l(t){var a=y,n=w;return y=w=void 0,h=t,x=e.apply(n,a),x}function d(e){return h=e,A=setTimeout(u,t),b?l(e):x}function c(e){var a=e-f,o=e-h,i=t-a;return _?n(i,v-o):i}function m(e){var a=e-f,n=e-h;return!f||a>=t||0>a||_&&n>=v}function u(){var e=Object(r.a)();return m(e)?p(e):void(A=setTimeout(u,c(e)))}function p(e){return(clearTimeout(A),A=void 0,k&&y)?l(e):(y=w=void 0,x)}function g(){var e=Object(r.a)(),a=m(e);if(y=arguments,w=this,f=e,a){if(void 0===A)return d(f);if(_)return clearTimeout(A),A=setTimeout(u,t),l(f)}return void 0===A&&(A=setTimeout(u,t)),x}var f=0,h=0,b=!1,_=!1,k=!0,y,w,v,x,A;if('function'!=typeof e)throw new TypeError('Expected a function');return t=Object(s.a)(t)||0,Object(i.a)(a)&&(b=!!a.leading,_='maxWait'in a,v=_?o(Object(s.a)(a.maxWait)||0,t):v,k='trailing'in a?!!a.trailing:k),g.cancel=function(){void 0!==A&&clearTimeout(A),f=h=0,y=w=A=void 0},g.flush=function(){return void 0===A?x:p(Object(r.a)())},g}},function(e,t,a){'use strict';function i(e,t){for(const a of g)e[a]=t[a]}function r(e){return!!Object(d.a)(e)&&e===e.ownerDocument.body}var s=a(155),l=a(423),d=a(257),c=a(258),m=a(16);class u{constructor(e){const t=Object(s.a)(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),Object(d.a)(e)||t){const a=t?e.startContainer:e;a.ownerDocument&&a.ownerDocument.body.contains(a)||m.a.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?i(this,u.getDomRangeRects(e)[0]):i(this,e.getBoundingClientRect())}else if(Object(l.a)(e)){const{innerWidth:t,innerHeight:a}=e;i(this,{top:0,right:t,bottom:a,left:0,width:t,height:a})}else i(this,e)}clone(){return new u(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:o(this.top,e.top),right:n(this.right,e.right),bottom:n(this.bottom,e.bottom),left:o(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,0>t.width||0>t.height?null:new u(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!r(e))for(let a=e.parentNode||e.commonAncestorContainer;a&&!r(a);){const e=new u(a),n=t.getIntersection(e);if(n)n.getArea()e.item.is('uiElement'))),l=s.a.wrapPosition(l,a),t.removeAllRanges(),t.addRange(new r.a(l,l))}function o(e){if(!e.is('element'))return!1;for(const t of e.getChildren())if(!t.is('uiElement'))return!1;return!0}t.d=function(){return(e,t,a,n)=>{const o=t.selection;if(!o.isCollapsed&&a.consume(o,'selection')){n.viewSelection.removeAllRanges();for(const e of o.getRanges()){const t=n.mapper.toViewRange(e);n.viewSelection.addRange(t,o.isBackward)}}}},t.c=function(){return(e,t,a,n)=>{const o=t.selection;if(o.isCollapsed&&a.consume(o,'selection')){const e=o.getFirstPosition(),t=n.mapper.toViewPosition(e),a=s.a.breakAttributes(t);n.viewSelection.removeAllRanges(),n.viewSelection.addRange(new r.a(a,a))}}},t.e=function(e){return(t,a,o,r)=>{const s=e instanceof i.a?e.clone(!0):e(a.value,a,a.selection,o,r);if(s){const e='selectionAttribute:'+a.key;n(a.selection,r.viewSelection,s,o,e)}}},t.f=function(e){return(t,a,o,i)=>{const r='function'==typeof e?e(a,o,i):e;if(r){r.id||(r.id=a.markerName);const e=Object(l.a)(r),t='selectionMarker:'+a.markerName;n(a.selection,i.viewSelection,e,o,t)}}},t.a=function(){return(e,t,a,n)=>{for(const o of n.viewSelection.getRanges())o.isCollapsed&&o.end.parent.document&&s.a.mergeAttributes(o.start);n.viewSelection.removeAllRanges()}},t.b=function(){return(e,t,a,n)=>n.viewSelection.setFake(!1)};var i=a(27),r=a(38),s=a(93),l=a(71)},function(e,t,a){'use strict';var n=a(427),o=a(153),i=a(74);t.a=class{constructor(){this._domParser=new DOMParser,this._domConverter=new o.a({blockFiller:i.d}),this._htmlWriter=new n.a}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),a=t.createDocumentFragment(),n=t.body.childNodes;for(;0t+e}},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(62),r=a(114),s=a(50),l=a(439),d=a(440),c=a(16);class m extends n.a{constructor(e){super(e),this.items=this.createCollection(),this.focusTracker=new i.a,this.keystrokes=new s.a,this._focusCycler=new r.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.template=new o.a({tag:'div',attributes:{class:['ck-toolbar']},children:this.items,on:{mousedown:Object(d.a)(this)}}),this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)})}init(){this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}fillFromConfig(e,t){e.map((e)=>{'|'==e?this.items.add(new l.a):t.has(e)?this.items.add(t.create(e)):c.a.warn('toolbarview-item-unavailable: The requested toolbar item is unavailable.',{name:e})})}}t.a=m},function(e,t,a){'use strict';var n=a(152);class o{constructor(e,t=20){this.document=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t,a,n)=>{this._onBatch(n)},this._selectionChangeCallback=()=>{this._reset()},e.on('change',this._changeCallback),e.selection.on('change:range',this._selectionChangeCallback),e.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(e){this.size+=e,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(e){'transparent'!=e.type&&e!==this._batch&&1>=Object(n.a)(e.getOperations())&&this._reset(!0)}_reset(e){(!this.isLocked||e)&&(this._batch=null,this.size=0)}}t.a=o},function(e,t,a){'use strict';function n(e,t){const n=o([e],t);n.sort((e,t)=>e.start.isBefore(t.start)?-1:1);for(let o=1;oe.start.root!=o.graveyard);t&&i.push(t)}i.length&&o.selection.setRanges(i,t)}_undo(e){const t=this.editor.document,a=t.batch();this._createdBatches.add(a);const n=e.deltas.slice();n.reverse();for(const o of n){const e=o.baseVersion+o.operations.length,n=Array.from(t.history.getDeltas(e)),i=t.transformDeltas([o.getReversed()],n,!0),r=i.deltasA;for(const e of r){e.baseVersion=t.version,a.addDelta(e);for(const a of e.operations)t.applyOperation(a);t.history.setDeltaAsUndone(o,e)}}return a}}t.a=r},function(e,t,a){'use strict';var n=a(11);class o extends n.a{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.document;this.value=e.selection.hasAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(e={}){const t=this.editor.document,a=t.selection,n=e.forceValue===void 0?!this.value:e.forceValue;t.enqueueChanges(()=>{if(a.isCollapsed)n?a.setAttribute(this.attributeKey,!0):a.removeAttribute(this.attributeKey);else{const o=t.schema.getValidRanges(a.getRanges(),this.attributeKey),i=e.batch||t.batch();for(const e of o)n?i.setAttribute(e,this.attributeKey,n):i.removeAttribute(e,this.attributeKey)}})}}t.a=o},function(e,t,a){'use strict';var n=a(2),o=a(267),i=a(494),r=a(498),s=a(36),l=a(508),d=a.n(l);class c extends n.a{static get requires(){return[o.a,i.a,r.a]}static get pluginName(){return'Image'}init(){const e=this.editor,t=e.plugins.get('ContextualToolbar');t&&this.listenTo(t,'show',(t)=>{Object(s.b)(e.editing.view.selection)&&t.stop()},{priority:'high'})}}t.a=c},function(e,t,a){'use strict';function n(){return new c.a('figure',{class:'image'},new m.a('img'))}var o=a(2),i=a(51),r=a(43),s=a(492),l=a(36),d=a(5),c=a(47),m=a(177);class u extends o.a{init(){const e=this.editor,a=e.document,o=a.schema,c=e.data,m=e.editing,u=e.t;o.registerItem('image'),o.requireAttributes('image',['src']),o.allow({name:'image',attributes:['alt','src','srcset'],inside:'$root'}),o.objects.add('image'),Object(i.a)().for(c.modelToView).fromElement('image').toElement(()=>n()),Object(i.a)().for(m.modelToView).fromElement('image').toElement(()=>Object(l.c)(n(),u('image widget'))),Object(s.b)([m.modelToView,c.modelToView],'src'),Object(s.b)([m.modelToView,c.modelToView],'alt'),Object(s.b)([m.modelToView,c.modelToView],'srcset',s.d),Object(r.a)().for(c.viewToModel).from({name:'img',attribute:{src:/./}}).toElement((e)=>new d.a('image',{src:e.getAttribute('src')})),c.viewToModel.on('element:img',s.a,{priority:'low'}),c.viewToModel.on('element',s.c,{priority:'low'}),Object(r.a)().for(c.viewToModel).from({name:'img',attribute:{alt:/./}}).consuming({attribute:['alt']}).toAttribute((e)=>({key:'alt',value:e.getAttribute('alt')})),Object(r.a)().for(c.viewToModel).from({name:'img',attribute:{srcset:/./}}).consuming({attribute:['srcset']}).toAttribute((e)=>{const t={data:e.getAttribute('srcset')};return e.hasAttribute('width')&&(t.width=e.getAttribute('width')),{key:'srcset',value:t}}),c.viewToModel.on('element:figure',Object(s.e)())}}t.a=u},function(e,t){'use strict';t.a=function({emitter:e,activator:t,callback:a,contextElements:n}){e.listenTo(document,'mousedown',(e,{target:o})=>{if(t()){for(const e of n)if(e.contains(o))return;a()}})}},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(52),r=a(502);class s extends n.a{constructor(e,t){super(e);const a=`ck-input-${Object(i.a)()}`;this.set('label'),this.set('value'),this.set('isReadOnly',!1),this.labelView=this._createLabelView(a),this.inputView=this._createInputView(t,a);const n=this.bindTemplate;this.template=new o.a({tag:'div',attributes:{class:[n.if('isReadOnly','ck-disabled')]},children:[this.labelView,this.inputView]})}_createLabelView(e){const t=new r.a(this.locale);return t.for=e,t.bind('text').to(this,'label'),t}_createInputView(e,t){const a=new e(this.locale);return a.id=t,a.bind('value').to(this),a.bind('isReadOnly').to(this),a}select(){this.inputView.select()}focus(){this.inputView.focus()}}t.a=s},function(e,t,a){'use strict';var n=a(7),o=a(6);class i extends n.a{constructor(e){super(e),this.set('value'),this.set('id'),this.set('placeholder'),this.set('isReadOnly',!1);const t=this.bindTemplate;this.template=new o.a({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:t.to('id'),placeholder:t.to('placeholder'),readonly:t.to('isReadOnly')}}),this.on('change:value',(e,t,a)=>{this.element.value=a||''})}select(){this.element.select()}focus(){this.element.focus()}}t.a=i},function(e,t){'use strict';t.a=function({view:e}){e.listenTo(e.element,'submit',(t,a)=>{a.preventDefault(),e.fire('submit')},{useCapture:!0})}},function(e,t,a){'use strict';function n(e){return Object(c.a)(e)?e:Object(d.a)(e)?e.commonAncestorContainer:'function'==typeof e?n(e()):null}function o(e,t){return e.top-t.height-f.arrowVerticalOffset}function i(e){return e.bottom+f.arrowVerticalOffset}var r=a(7),s=a(6),l=a(503),d=a(155),c=a(257),m=a(261),u=a(60);const p=Object(m.a)('px'),g=u.a.document.body;class f extends r.a{constructor(e){super(e);const t=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_nw'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.template=new s.a({tag:'div',attributes:{class:['ck-balloon-panel',t.to('position',(e)=>`ck-balloon-panel_${e}`),t.if('isVisible','ck-balloon-panel_visible'),t.if('withArrow','ck-balloon-panel_with-arrow'),t.to('className')],style:{top:t.to('top',p),left:t.to('left',p)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=f.defaultPositions,a=Object.assign({},{element:this.element,positions:[t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouthWest,t.northArrowSouthEast],limiter:g,fitInViewport:!0},e),{top:n,left:o,name:i}=Object(l.a)(a);Object.assign(this,{top:n,left:o,position:i})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=n(e.target),a=e.limiter?n(e.limiter):g;this.listenTo(u.a.document,'scroll',(n,o)=>{const i=o.target,r=t&&i.contains(t),s=a&&i.contains(a);(r||s||!t||!a)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(u.a.window,'resize',()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(u.a.document,'scroll'),this.stopListening(u.a.window,'resize')}}t.a=f,f.arrowHorizontalOffset=30,f.arrowVerticalOffset=15,f.defaultPositions={northArrowSouth:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_s'}),northArrowSouthEast:(e,t)=>({top:o(e,t),left:e.left+e.width/2-t.width+f.arrowHorizontalOffset,name:'arrow_se'}),northArrowSouthWest:(e,t)=>({top:o(e,t),left:e.left+e.width/2-f.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouth:(e,t)=>({top:o(e,t),left:e.left-t.width/2,name:'arrow_s'}),northWestArrowSouthWest:(e,t)=>({top:o(e,t),left:e.left-f.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouthEast:(e,t)=>({top:o(e,t),left:e.left-t.width+f.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouth:(e,t)=>({top:o(e,t),left:e.right-t.width/2,name:'arrow_s'}),northEastArrowSouthEast:(e,t)=>({top:o(e,t),left:e.right-t.width+f.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouthWest:(e,t)=>({top:o(e,t),left:e.right-f.arrowHorizontalOffset,name:'arrow_sw'}),southArrowNorth:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_n'}),southArrowNorthEast:(e,t)=>({top:i(e,t),left:e.left+e.width/2-t.width+f.arrowHorizontalOffset,name:'arrow_ne'}),southArrowNorthWest:(e,t)=>({top:i(e,t),left:e.left+e.width/2-f.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorth:(e,t)=>({top:i(e,t),left:e.left-t.width/2,name:'arrow_n'}),southWestArrowNorthWest:(e,t)=>({top:i(e,t),left:e.left-f.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorthEast:(e,t)=>({top:i(e,t),left:e.left-t.width+f.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorth:(e,t)=>({top:i(e,t),left:e.right-t.width/2,name:'arrow_n'}),southEastArrowNorthEast:(e,t)=>({top:i(e,t),left:e.right-t.width+f.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorthWest:(e,t)=>({top:i(e,t),left:e.right-f.arrowHorizontalOffset,name:'arrow_nw'})}},function(e,t,a){'use strict';function n(e){const t=e.editing.view,a=o.a.defaultPositions;return{target:t.domConverter.viewToDom(t.selection.getSelectedElement()),positions:[a.northArrowSouth,a.southArrowNorth]}}t.b=function(e){const t=e.plugins.get('ContextualBalloon');if(Object(i.b)(e.editing.view.selection)){const a=n(e);t.updatePosition(a)}},t.a=n;var o=a(272),i=a(36)},function(e,t,a){'use strict';var n=a(2),o=a(510),i=a(515);class r extends n.a{static get pluginName(){return'ImageUpload'}static get requires(){return[o.a,i.a]}}t.a=r},function(e,t,a){'use strict';var n=a(2),i=a(76),r=a(511),s=a(512),l=a(59),d=a(276);class c extends n.a{static get requires(){return[i.a,s.a]}init(){const e=this.editor,t=e.document,a=t.schema,n=e.plugins.get(i.a);a.allow({name:'image',attributes:['uploadId'],inside:'$root'}),a.allow({name:'image',attributes:['uploadStatus'],inside:'$root'}),a.requireAttributes('image',['uploadId']),e.commands.add('imageUpload',new r.a(e)),e.editing.view.on('clipboardInput',(a,n)=>{let o=new l.a(n.targetRanges.map((t)=>e.editing.mapper.toModelRange(t)));for(const i of n.dataTransfer.files){const n=Object(d.a)(o);Object(d.b)(i)&&(e.execute('imageUpload',{file:i,insertAt:n}),a.stop()),o=t.selection}}),e.editing.view.on('dragover',(e,t)=>{t.preventDefault()}),t.on('change',(e,t,a)=>{if('insert'===t||'reinsert'===t||'remove'===t)for(const e of a.range)if('elementStart'===e.type&&'image'===e.item.name){const a=e.item,o=a.getAttribute('uploadId');if(o){const e=n.loaders.get(o);e&&('insert'===t&&'idle'==e.status&&this.load(e,a),'remove'===t&&e.abort())}}})}load(e,a){function n(){t.enqueueChanges(()=>{t.batch('transparent').removeAttribute(a,'uploadId'),t.batch('transparent').removeAttribute(a,'uploadStatus')}),d.destroyLoader(e)}const r=this.editor,l=r.locale.t,t=r.document,d=r.plugins.get(i.a),c=r.plugins.get(s.a);t.enqueueChanges(()=>{t.batch('transparent').setAttribute(a,'uploadStatus','reading')}),e.read().then((n)=>{const o=r.editing.mapper.toViewElement(a),i=o.getChild(0),s=e.upload();return i.setAttribute('src',n),r.editing.view.render(),t.enqueueChanges(()=>{t.batch('transparent').setAttribute(a,'uploadStatus','uploading')}),s}).then((e)=>{t.enqueueChanges(()=>{t.batch('transparent').setAttribute(a,'uploadStatus','complete'),t.batch('transparent').setAttribute(a,'src',e.default);let n=0;const i=Object.keys(e).filter((e)=>{const t=parseInt(e,10);if(!isNaN(t))return n=o(n,t),!0}).map((t)=>`${e[t]} ${t}w`).join(', ');''!=i&&t.batch('transparent').setAttribute(a,'srcset',{data:i,width:n})}),n()}).catch((o)=>{'error'==e.status&&c.showWarning(o,{title:l('Upload failed'),namespace:'upload'}),n(),t.enqueueChanges(()=>{t.batch('transparent').remove(a)})})}}t.a=c},function(e,t,a){'use strict';t.b=function(e){const t=/^image\/(jpeg|png|gif|bmp)$/;return t.test(e.type)},t.a=function(e){const t=e.getSelectedElement();if(t)return n.a.createAfter(t);const a=e.getSelectedBlocks().next().value;if(a){if(a.isEmpty)return n.a.createAt(a);const t=n.a.createAfter(a);return e.focus.isTouching(t)?t:n.a.createBefore(a)}return e.focus};var n=a(1)},function(e,t,a){'use strict';var n=a(92);class o extends n.a{}t.a=o},function(e,t,a){'use strict';function n(e,t,a){let n=e.textNode||(a?e.nodeBefore:e.nodeAfter),o=null;for(;n&&n.getAttribute('linkHref')==t;)o=n,n=a?n.previousSibling:n.nextSibling;return o?i.a.createAt(o,a?'before':'after'):e}t.a=function(e,t){return new o.a(n(e,t,!0),n(e,t,!1))};var o=a(3),i=a(1)},function(e,t,a){'use strict';Object.defineProperty(t,'__esModule',{value:!0});var n=a(280),o=a(445),i=a(470),r=a(473),s=a(476),l=a(479),d=a(482),c=a(488),m=a(519),u=a(266),p=a(532),g=a(540),f=a(548),h=a(549),b=a(558),_=a(115),k=a(274);class y extends n.a{}t['default']=y,y.build={plugins:[o.a,i.a,r.a,s.a,l.a,d.a,c.a,m.a,u.a,p.a,g.a,f.a,h.a,b.a,_.a,k.a],config:{toolbar:{items:['headings','bold','italic','link','bulletedList','numberedList','blockQuote','undo','redo']},image:{toolbar:['imageStyleFull','imageStyleSide','|','imageTextAlternative']}}}},function(e,t,a){'use strict';var n=a(281),o=a(260),i=a(428),r=a(432),s=a(441),l=a(442),d=a.n(l);class c extends n.a{constructor(e,t){super(e,t),this.document.createRoot(),this.data.processor=new o.a,this.ui=new i.a(this,new r.a(this.locale)),this._elementReplacer=new s.a}destroy(){return this.updateEditorElement(),this._elementReplacer.restore(),this.ui.destroy(),super.destroy()}static create(e,t){return new Promise((a)=>{const n=new this(e,t);a(n.initPlugins().then(()=>n._elementReplacer.replace(e,n.ui.view.element)).then(()=>{n.ui.init(),n.fire('uiReady')}).then(()=>n.editing.view.attachDomRoot(n.ui.view.editableElement)).then(()=>n.loadDataFromEditorElement()).then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}t.a=c},function(e,t,a){'use strict';var n=a(282),o=a(408),i=a(409),r=a(65),s=a(425),l=a(426);class d extends n.a{constructor(e,t){super(t),this.element=e,this.editing=new i.a(this.document),this.editing.view.bind('isReadOnly').to(this),this.keystrokes=new o.a(this),this.keystrokes.listenTo(this.editing.view),this._attachToForm()}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(e){this.data.set(e)}getData(){return this.data.get()}updateEditorElement(){Object(l.a)(this.element,this.getData())}loadDataFromEditorElement(){this.setData(Object(s.a)(this.element))}_attachToForm(){const e=this.element;if(e&&'textarea'===e.tagName.toLowerCase()&&e.form){let t;const a=e.form,n=()=>this.updateEditorElement();Object(r.a)(a.submit)&&(t=a.submit,a.submit=()=>{n(),t.apply(a)}),a.addEventListener('submit',n),this.on('destroy',()=>{a.removeEventListener('submit',n),t&&(a.submit=t)})}}static create(e,t){return new Promise((a)=>{const n=new this(e,t);a(n.initPlugins().then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}t.a=d},function(e,t,a){'use strict';var n=a(283),o=a(284),i=a(285),r=a(286),s=a(288),l=a(358),d=a(12),c=a(4);class m{constructor(e){const t=this.constructor.build&&this.constructor.build.plugins;this.config=new n.a(e,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',t),this.plugins=new o.a(this,t),this.commands=new i.a,this.locale=new r.a(this.config.get('lang')),this.t=this.locale.t,this.document=new l.a,this.data=new s.a(this.document),this.set('isReadOnly',!1)}initPlugins(){function e(e,t){return e.reduce((e,a)=>a[t]?e.then(a[t].bind(a)):e,Promise.resolve())}const t=this,a=this.config;return function(){const e=a.get('plugins')||[],n=a.get('removePlugins')||[];return t.plugins.load(e,n)}().then((t)=>e(t,'init').then(()=>e(t,'afterInit'))).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),this.commands.destroy(),this.plugins.destroy().then(()=>{this.document.destroy(),this.data.destroy()})}execute(...e){this.commands.execute(...e)}static create(e){return new Promise((t)=>{const a=new this(e);t(a.initPlugins().then(()=>{a.fire('dataReady'),a.fire('ready')}).then(()=>a))})}}t.a=m,Object(c.a)(m,d.a)},function(e,t,a){'use strict';var n=a(77);t.a=class{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,a,o=!1){if(Object(n.a)(t))return void this._setObjectToTarget(e,t,o);const i=t.split('.');t=i.pop();for(const r of i)Object(n.a)(e[r])||(e[r]={}),e=e[r];return Object(n.a)(a)?(Object(n.a)(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,a,o)):void(o&&'undefined'!=typeof e[t]||(e[t]=a))}_getFromSource(e,t){const a=t.split('.');t=a.pop();for(const o of a){if(!Object(n.a)(e[o])){e=null;break}e=e[o]}return e?e[t]:void 0}_setObjectToTarget(e,t,a){Object.keys(t).forEach((n)=>{this._setToTarget(e,n,t[n],a)})}}},function(e,t,a){'use strict';var n=a(0),o=a(16);class i{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const a of t)this._availablePlugins.set(a,a),a.pluginName&&this._availablePlugins.set(a.pluginName,a)}*[Symbol.iterator](){for(const e of this._plugins)'function'==typeof e[0]&&(yield e)}get(e){return this._plugins.get(e)}load(e,t=[]){function a(e){return p.includes(e)||l.get(e)||c.has(e)?void 0:i(e).catch((t)=>{throw o.a.error('plugincollection-load: It was not possible to load the plugin.',{plugin:e}),t})}function i(e){return new Promise((o)=>{c.add(e),e.requires&&e.requires.forEach((o)=>{const i=r(o);if(t.includes(i))throw new n.b('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:i,requiredBy:e});a(i)});const i=new e(d);l._add(e,i),m.push(i),o()})}function r(e){return'function'==typeof e?e:l._availablePlugins.get(e)}function s(e){return e.map((e)=>r(e)).filter((e)=>!!e)}const l=this,d=this._editor,c=new Set,m=[],u=s(e),p=s(t),g=function(e){const t=[];for(const a of e)r(a)||t.push(a);return t.length?t:null}(e);if(g){const e='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return o.a.error(e,{plugins:g}),Promise.reject(new n.b(e,{plugins:g}))}return Promise.all(u.map(a)).then(()=>m)}destroy(){const e=Array.from(this).map(([,e])=>e).filter((e)=>'function'==typeof e.destroy).map((e)=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const a=e.pluginName;a&&(this._plugins.has(a)?o.a.warn('plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',{pluginName:a,plugin1:this._plugins.get(a).constructor,plugin2:e}):this._plugins.set(a,t))}}t.a=i},function(e,t,a){'use strict';var n=a(0);class o{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const a=this.get(e);if(!a)throw new n.b('commandcollection-command-not-found: Command does not exist.',{commandName:e});a.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}t.a=o},function(e,t,a){'use strict';var n=a(287);t.a=class{constructor(e){this.lang=e||'en',this.t=(...e)=>this._t(...e)}_t(e,t){let a=Object(n.a)(this.lang,e);return t&&(a=a.replace(/%(\d+)/g,(e,a)=>athis.decorate(e))}get(e='main'){return this.stringify(this.model.getRoot(e))}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){const t=m.a.createIn(e),a=new c.a;return this.mapper.bindElements(e,a),this.modelToView.convertInsertion(t),this.mapper.clearBindings(),a}set(e,t='main'){const a=this.model.getRoot(t);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(m.a.createIn(a)).insert(u.a.createAt(a,0),this.parse(e))})}parse(e,t='$root'){const a=this.processor.toView(e);return this.toModel(a,t)}toModel(e,t='$root'){return this.viewToModel.convert(e,{context:[t]})}destroy(){}insertContent(e,t,a){Object(g.a)(this,e,t,a)}deleteContent(e,t,a){Object(f.a)(e,t,a)}modifySelection(e,t){Object(h.a)(this,e,t)}getSelectedContent(e){return Object(b.a)(e)}hasContent(e){if(e instanceof p.a&&(e=m.a.createIn(e)),e.isCollapsed)return!1;for(const t of e.getItems())if(t.is('textProxy')||this.model.schema.objects.has(t.name))return!0;return!1}}t.a=_,Object(n.a)(_,o.a)},function(e,t,a){'use strict';var n=a(290);t.a=class{constructor(e,t){this.source=e,this.name=t,this.path=[],this.stop=Object(n.a)(),this.off=Object(n.a)()}}},function(e,t){'use strict';t.a=function(){return function e(){e.called=!0}}},function(e,t){'use strict';const a={get(e){return'number'==typeof e?e:this[e]||this.normal},highest:1e5,high:1e3,normal:0,low:-1e3,lowest:-1e5};t.a=a},function(e,t,a){'use strict';var n=a(64),o=a(117),i=a(293),r=a(80),s=a(82),l=a(296),d=Object.prototype,c=d.propertyIsEnumerable,m=!c.call({valueOf:1},'valueOf'),u=Object(i.a)(function(e,t){if(m||Object(s.a)(t)||Object(r.a)(t))return void Object(o.a)(t,Object(l.a)(t),e);for(var a in t)Object(n.a)(e,a,t[a])});t.a=u},function(e,t,a){'use strict';var n=a(79),o=a(9);t.a=function(e){return Object(o.a)(function(t,a){var o=-1,i=a.length,r=1i?void 0:r,i=1),t=Object(t);++oe?-1:1;return t*1.7976931348623157e308}return e===e?e:0}},function(e,t,a){'use strict';var n=a(297),o=a(161),i=a(37),r=a(82),s=Object.prototype,l=s.hasOwnProperty;t.a=function(e){for(var t=-1,a=Object(r.a)(e),s=Object(n.a)(e),d=s.length,c=Object(o.a)(e),m=c||[],u=m.length;++ta)return!1;var o=t.length-1;return a==o?t.pop():i.call(t,a,1),!0}},function(e,t,a){'use strict';var n=a(86);t.a=function(e){var t=this.__data__,a=Object(n.a)(t,e);return 0>a?void 0:t[a][1]}},function(e,t,a){'use strict';var n=a(86);t.a=function(e){return-1o?a.push([e,t]):a[o][1]=t,this}},function(e,t,a){'use strict';var n=a(85);t.a=function(){this.__data__=new n.a}},function(e,t){'use strict';t.a=function(e){return this.__data__['delete'](e)}},function(e,t){'use strict';t.a=function(e){return this.__data__.get(e)}},function(e,t){'use strict';t.a=function(e){return this.__data__.has(e)}},function(e,t,a){'use strict';var n=a(85),o=a(123);t.a=function(e,t){var a=this.__data__;return a instanceof n.a&&a.__data__.length==200&&(a=this.__data__=new o.a(a.__data__)),a.set(e,t),this}},function(e,t,a){'use strict';var n=a(313),o=a(85),i=a(168);t.a=function(){this.__data__={hash:new n.a,map:new(i.a||o.a),string:new n.a}}},function(e,t,a){'use strict';function n(e){var t=-1,a=e?e.length:0;for(this.clear();++tt||t>e.data.length)throw new n.b('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>a||t+a>e.data.length)throw new n.b('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+a),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(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let a=e.includeSelf?this.textNode:this.parent;null!==a;)t[e.parentFirst?'push':'unshift'](a),a=a.parent;return t}}t.a=o},function(e,t,a){'use strict';var n=a(67);t.a=class{constructor(){this._consumable=new Map,this._textProxyRegistry=new Map}add(e,t){e instanceof n.a&&(e=this._getSymbolForTextProxy(e)),this._consumable.has(e)||this._consumable.set(e,new Map),this._consumable.get(e).set(t,!0)}consume(e,t){return e instanceof n.a&&(e=this._getSymbolForTextProxy(e)),!!this.test(e,t)&&(this._consumable.get(e).set(t,!1),!0)}test(e,t){e instanceof n.a&&(e=this._getSymbolForTextProxy(e));const a=this._consumable.get(e);if(a===void 0)return null;const o=a.get(t);return void 0===o?null:o}revert(e,t){e instanceof n.a&&(e=this._getSymbolForTextProxy(e));const a=this.test(e,t);return!1===a?(this._consumable.get(e).set(t,!0),!0):!0!==a&&null}_getSymbolForTextProxy(e){let t=null;const a=this._textProxyRegistry.get(e.startOffset);if(a){const n=a.get(e.endOffset);n&&(t=n.get(e.parent))}return t||(t=this._addSymbolForTextProxy(e.startOffset,e.endOffset,e.parent)),t}_addSymbolForTextProxy(e,t,a){const n=Symbol('textProxySymbol');let o,i;return o=this._textProxyRegistry.get(e),o||(o=new Map,this._textProxyRegistry.set(e,o)),i=o.get(t),i||(i=new Map,o.set(t,i)),i.set(a,n),n}}},function(e,t){'use strict';const a=navigator.userAgent.toLowerCase(),n={mac:function(e){return-1this._convertItem(e,t,a)).filter((e)=>e instanceof l.a||e instanceof d.a).reduce((e,t)=>e.concat(t.is('documentFragment')?Array.from(t.getChildren()):t),[]);return new d.a(o)}}t.a=f,Object(u.a)(f,m.c)},function(e,t,a){'use strict';var n=a(15),o=a(0);class i{constructor(){this._consumables=new Map}add(e,t){let a;return e.is('text')||e.is('documentFragment')?void this._consumables.set(e,!0):void(this._consumables.has(e)?a=this._consumables.get(e):(a=new r,this._consumables.set(e,a)),a.add(t))}test(e,t){const a=this._consumables.get(e);return void 0===a?null:e.is('text')||e.is('documentFragment')?a:a.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const a=this._consumables.get(e);a!==void 0&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!0):a.revert(t))}static consumablesFromElement(e){const t={name:!0,attribute:[],class:[],style:[]},a=e.getAttributeKeys();for(const n of a)'style'!=n&&'class'!=n&&t.attribute.push(n);const n=e.getClassNames();for(const a of n)t.class.push(a);const o=e.getStyleNames();for(const a of o)t.style.push(a);return t}static createFrom(e,t){if(t||(t=new i),e.is('text'))return t.add(e),t;e.is('element')&&t.add(e,i.consumablesFromElement(e)),e.is('documentFragment')&&t.add(e);for(const a of e.getChildren())t=i.createFrom(a,t);return t}}t.a=i;class r{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const a=this._test(t,e[t]);if(!0!==a)return a}return!0}consume(e){for(const t in e.name&&(this._canConsumeName=!1),this._consumables)t in e&&this._consume(t,e[t])}revert(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const a=Object(n.a)(t)?t:[t],i=this._consumables[e];for(const n of a){if('attribute'===e&&('class'===n||'style'===n))throw new o.b('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');i.set(n,!0)}}_test(e,t){const a=Object(n.a)(t)?t:[t],o=this._consumables[e];for(const n of a)if('attribute'===e&&('class'===n||'style'===n)){const e=this._test(n,[...this._consumables[n].keys()]);if(!0!==e)return e}else{const e=o.get(n);if(e===void 0)return null;if(!e)return!1}return!0}_consume(e,t){const a=Object(n.a)(t)?t:[t],o=this._consumables[e];for(const n of a)'attribute'===e&&('class'===n||'style'===n)?this._consume(n,[...this._consumables[n].keys()]):o.set(n,!1)}_revert(e,t){const a=Object(n.a)(t)?t:[t],o=this._consumables[e];for(const n of a)if('attribute'===e&&('class'===n||'style'===n))this._revert(n,[...this._consumables[n].keys()]);else{const e=o.get(n);!1===e&&o.set(n,!0)}}}},function(e,t,a){'use strict';t.b=function(){return(e,t,a,o)=>{if(!t.output&&a.consume(t.input,{name:!0})){const e=o.convertChildren(t.input,a,t);t.output=new n.a(Object(i.c)(e))}}},t.a=function(){return(e,t,a,n)=>{const i={name:'$text',inside:t.context};n.schema.check(i)&&a.consume(t.input)&&(t.output=new o.a(t.input.data))}};var n=a(39),o=a(26),i=a(23)},function(e,t,a){'use strict';function n(e){return e.is('text')?'$text':e.name}t.a=function(e,t,a,n){n||(n=e.model.batch()),a.isCollapsed||e.deleteContent(a,n);const o=new d(e,n,a.anchor);let i;i=t.is('documentFragment')?t.getChildren():[t],o.handleNodes(i,{isFirst:!0,isLast:!0});const r=o.getSelectionRange();r?a.setRanges([r]):l.a.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')};var o=a(1),i=a(178),r=a(5),s=a(3),l=a(16);class d{constructor(e,t,a){this.dataController=e,this.batch=t,this.position=a,this.canMergeWith=new Set([this.position.parent]),this.schema=e.model.schema}handleNodes(e,t){e=Array.from(e);for(let a=0;a!0);if(e.schema.check({name:'$text',inside:t.nextPosition}))return t.nextPosition}}function o(e,t){const a=e.position.textNode;if(a){const n=a.data;for(let o=e.position.offset-a.startOffset;Object(d.b)(n,o)||'character'==t&&Object(d.a)(n,o);)e.next(),o=e.position.offset-a.startOffset}return e.position}function i(e,t){const a=e.root,n=r.a.createAt(a,t?'end':0);return t?new l.a(e,n):new l.a(n,e)}t.a=function(e,t,a={}){const o=e.model.schema,r='backward'!=a.direction,l=a.unit?a.unit:'character',d=t.focus,c=new s.a({boundaries:i(d,r),singleCharacters:!0,direction:r?'forward':'backward'}),m={walker:c,schema:o,isForward:r,unit:l};for(let o;o=c.next();){if(o.done)return;const e=n(m,o.value);if(e)return void t.moveFocusTo(e)}};var r=a(1),s=a(54),l=a(3),d=a(179)},function(e,t,a){'use strict';function n(e){const t=[];Array.from(e.getItems({direction:'backward'})).map((e)=>i.a.createOn(e)).filter((t)=>{const a=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return a}).forEach((e)=>{t.push(e.start.parent),Object(l.d)(e)}),t.forEach((e)=>{for(let t=e;t.parent&&t.isEmpty;){const e=i.a.createOn(t);t=t.parent,Object(l.d)(e)}})}t.a=function(e){const t=new o.a,a=e.getFirstRange();if(!a||a.isCollapsed)return t;const l=a.start.root,d=a.start.getCommonPath(a.end),c=l.getNodeByPath(d);let m=a.start.parent==a.end.parent?a:i.a.createFromParentsAndOffsets(c,a.start.path[d.length],c,a.end.path[d.length]+1);const u=m.end.offset-m.start.offset;for(const a of m.getItems({shallow:!0}))a.is('textProxy')?t.appendChildren(new s.a(a.data,a.getAttributes())):t.appendChildren(a.clone(!0));if(m!=a){const e=a._getTransformedByMove(m.start,r.a.createAt(t,0),u)[0],o=new i.a(r.a.createAt(t),e.start),s=new i.a(e.end,r.a.createAt(t,'end'));n(s),n(o)}return t};var o=a(39),i=a(3),r=a(1),s=a(26),l=a(23)},function(e,t,a){'use strict';function n(e){const t=e.textNode;if(t){const a=t.data,n=e.offset-t.startOffset;return!Object(w.b)(a,n)&&!Object(w.a)(a,n)}return!0}function*o(e,t){for(let a=!1;!a;){if(a=!0,e){const t=e.next();t.done||(a=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(a=!1,yield{walker:t,value:e.value})}}}var i=a(359),r=a(369),s=a(3),l=a(1),d=a(403),c=a(20),m=a(404),u=a(250),p=a(406),g=a(54),f=a(407),h=a(182),b=a(69),_=a(8),k=a(0),y=a(4),w=a(179);const v='$graveyard';class x{constructor(){this.version=0,this.schema=new p.a,this.history=new m.a(this),this.markers=new f.a,this.selection=new u.a(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(const e of this.selection.getRanges())if(!this._validateSelectionRange(e))throw new k.b('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:e})}),this.createRoot('$root',v)}get graveyard(){return this.getRoot(v)}applyOperation(e){if(e.baseVersion!==this.version)throw new k.b('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:e});const t=e._execute();this.version++,this.history.addDelta(e.delta),this.fire('change',e.type,t,e.delta.batch,e.delta.type)}batch(e){return new c.a(this,e)}createRoot(e='$root',t='main'){if(this.roots.has(t))throw new k.b('model-document-createRoot-name-exists: Root with specified name already exists.',{name:t});const a=new d.a(this,e,t);return this.roots.set(t,a),a}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges(e){if(this._pendingChanges.push(e),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot(e='main'){if(!this.roots.has(e))throw new k.b('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:e});return this.roots.get(e)}hasRoot(e){return this.roots.has(e)}getRootNames(){return Array.from(this.roots.keys()).filter((e)=>e!=v)}getNearestSelectionRange(e,t='both'){if(this.schema.check({name:'$text',inside:e}))return new s.a(e);let a,n;('both'==t||'backward'==t)&&(a=new g.a({startPosition:e,direction:'backward'})),('both'==t||'forward'==t)&&(n=new g.a({startPosition:e}));for(const i of o(a,n)){const e=i.walker==a?'elementEnd':'elementStart',t=i.value;if(t.type==e&&this.schema.objects.has(t.item.name))return s.a.createOn(t.item);if(this.schema.check({name:'$text',inside:t.nextPosition}))return new s.a(t.nextPosition)}return null}transformDeltas(e,t,a=!1){return h.a.transformDeltaSets(e,t,a?this:null)}toJSON(){const e=Object(b.a)(this);return e.selection='[engine.model.DocumentSelection]',e}_getDefaultRoot(){for(const e of this.roots.values())if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=new l.a(e,[0]),a=this.getNearestSelectionRange(t);return a||new s.a(t)}_validateSelectionRange(e){return n(e.start)&&n(e.end)}}t.a=x,Object(y.a)(x,_.c)},function(e,t,a){'use strict';var n=a(129),o=a(133),i=a(101),r=a(100),s=a(99),l=a(134),d=a(102),c=a(103),m=a(181),u=a(104)},function(e,t,a){'use strict';var n=a(95),o=a(48),i=a(130),r=a(29),s=a(72),l=a(40),d=a(98),c=a(41),m=a(131),u=a(132);const p={};p[n.a.className]=n.a,p[o.a.className]=o.a,p[i.a.className]=i.a,p[r.a.className]=r.a,p[s.a.className]=s.a,p[l.a.className]=l.a,p[d.a.className]=d.a,p[c.a.className]=c.a,p[m.a.className]=m.a,p[u.a.className]=u.a;t.a=class{static fromJSON(e,t){return p[e.__className].fromJSON(e,t)}}},function(e,t,a){'use strict';var n=a(96);t.a=function(e,t){return Object(n.a)(e,t)}},function(e,t,a){'use strict';var n=a(122),o=a(180),i=a(366),r=a(367),s=a(124),l=a(15),d=a(78),c=a(368),m='[object Arguments]',u='[object Array]',p='[object Object]',g=Object.prototype,f=g.hasOwnProperty;t.a=function(e,t,a,g,h,b){var _=Object(l.a)(e),k=Object(l.a)(t),y=u,w=u;_||(y=Object(s.a)(e),y=y==m?p:y),k||(w=Object(s.a)(t),w=w==m?p:w);var v=y==p&&!Object(d.a)(e),x=w==p&&!Object(d.a)(t),A=y==w;if(A&&!v)return b||(b=new n.a),_||Object(c.a)(e)?Object(o.a)(e,t,a,g,h,b):Object(i.a)(e,t,y,a,g,h,b);if(!(h&2)){var C=v&&f.call(e,'__wrapped__'),T=x&&f.call(t,'__wrapped__');if(C||T){var P=C?e.value():e,E=T?t.value():t;return b||(b=new n.a),a(P,E,g,h,b)}}return!!A&&(b||(b=new n.a),Object(r.a)(e,t,a,g,h,b))}},function(e,t){'use strict';t.a=function(e){return this.__data__.set(e,'__lodash_hash_undefined__'),this}},function(e,t){'use strict';t.a=function(e){return this.__data__.has(e)}},function(e,t){'use strict';t.a=function(e,t){for(var a=-1,n=e.length;++a{const n=P(e,t,a);return e.range.containsPosition(t.position)&&n.push(o(t,e)),n}),T(g.a,k.a,(e,t,a)=>{if(!t.position)return P(e,t,a);const n=a.undoMode,o=new l.a(t.position.root,t.position.path.slice(0,-1)),i=P(e,t,a);if(n||!(t._cloneOperation instanceof m.a))return i;for(const n of e.operations)if(n.range.containsPosition(o)||n.range.start.isEqual(o)){const e=new g.a,a=o.getShiftedBy(1),r=l.a.createFromPosition(a);r.path.push(0);const d=t._cloneOperation.nodes.getNode(0).getAttribute(n.key);e.addOperation(new c.a(new s.a(a,r),n.key,d===void 0?null:d,n.newValue,0)),i.push(e);break}return i}),T(f.a,b.a,(e,t,a)=>{if(!t.position)return P(e,t,a);const n=a.undoMode;return!n&&e.position.isEqual(t.position)?[t.getReversed(),e.clone()]:P(e,t,a)}),T(h.a,k.a,n),T(h.a,b.a,n),T(h.a,w.a,n),T(h.a,v.a,n),T(h.a,_.a,n),T(h.a,x.a,n),T(_.a,b.a,(e,t,a)=>{const n=a.undoMode;if(n||!t.position)return P(e,t,a);const o=e.sourcePosition.root==t.position.root&&'same'===Object(C.a)(e.sourcePosition.getParentPath(),t.position.getParentPath()),i=e.sourcePosition.offset<=t.position.offset&&e.sourcePosition.offset+e.howMany>t.position.offset;return o&&i?[t.getReversed(),e.clone()]:P(e,t,a)}),T(b.a,f.a,(e,t,a)=>{if(!e.position)return P(e,t,a);const n=a.undoMode;return!n&&e.position.isEqual(t.position)?[i()]:P(e,t,a)}),T(b.a,_.a,(e,t,a)=>{const n=a.undoMode;if(n||!e.position)return P(e,t,a);const o=e.position.root==t.sourcePosition.root&&'same'===Object(C.a)(e.position.getParentPath(),t.sourcePosition.getParentPath()),r=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return o&&r?[i()]:P(e,t,a)}),T(k.a,k.a,(e,t,a)=>{const n=a.undoMode;if(n)return P(e,t,a);if(!e.position||!t.position)return P(e,t,a);const o=e.position.getParentPath(),i=t.position.getParentPath();if(e.position.root==t.position.root&&'same'==Object(C.a)(o,i))if(e=e.clone(),e.position.offsett._cloneOperation.sourcePosition.offset&&e._cloneOperation.sourcePosition.offset--;const a=s.a.createFromPositionAndShift(e.position,e._moveOperation.howMany),n=s.a.createFromPositionAndShift(t.position,t._moveOperation.howMany),o=a.getDifference(n);let i=0;for(const e of o)i+=e.end.offset-e.start.offset;return 0==i?(e.operations.pop(),e.addOperation(new d.a(e.operations[0].baseVersion+1))):e.operations[1].howMany=i,[e]}else{const n=Object.assign({},a);return n.isStrong=!0,n.insertBefore=!0,P(e,t,n)}return P(e,t,a)}),T(k.a,v.a,(e,t,a)=>e.position?e.position.root==t.position.root&&'same'===Object(C.a)(t.position.path,e.position.getParentPath())?[i()]:P(e,t,a):P(e,t,a)),T(k.a,w.a,(e,t,a)=>{if(!e.position)return P(e,t,a);const n=e.position.root==t.range.start.root,o=n&&'same'===Object(C.a)(e.position.getParentPath(),t.range.start.getParentPath()),r=t.range.start.offset=e.position.offset;if(o&&r)return[i()];if(n&&'same'===Object(C.a)(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){const a=e.clone(),n=l.a.createFromPosition(t.range.start);n.path.push(t.howMany-1);const o=n.getShiftedBy(1);a._cloneOperation.position=o;const i=l.a.createFromPosition(n);i.path.push(e.position.offset),a._moveOperation.sourcePosition=i;const r=l.a.createFromPosition(o);return r.path.push(0),a._moveOperation.targetPosition=r,[a]}return P(e,t,a)}),T(k.a,g.a,(e,t,a)=>{if(!e.position)return P(e,t,a);e=e.clone();const n=a.undoMode,o=new l.a(e.position.root,e.position.path.slice(0,-1));if(n||!(e._cloneOperation instanceof m.a))return[e];for(const n of t.operations)if(n.range.containsPosition(o)||n.range.start.isEqual(o)){null===n.newValue?e._cloneOperation.nodes.getNode(0).removeAttribute(n.key):e._cloneOperation.nodes.getNode(0).setAttribute(n.key,n.newValue);break}return[e]}),T(v.a,k.a,(e,t,a)=>t.position?e.position.root==t.position.root&&'same'===Object(C.a)(e.position.path,t.position.getParentPath())?[t.getReversed(),e.clone()]:P(e,t,a):P(e,t,a)),T(y.a,g.a,(e,t)=>{const a=[e.clone()];return t.range.containsPosition(e.position)&&a.push(o(e,t)),a}),T(w.a,k.a,(e,t,a)=>{if(!t.position)return P(e,t,a);const n=e.range.start.root==t.position.root,o=n&&'same'===Object(C.a)(e.range.start.getParentPath(),t.position.getParentPath()),i=e.range.start.offset=t.position.offset;if(o&&i)return[t.getReversed(),e.clone()];if(n&&'same'===Object(C.a)(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){const t=e.clone();return t._insertOperation.position.offset++,t._moveOperation.howMany++,t._moveOperation.targetPosition.path[t._moveOperation.targetPosition.path.length-2]++,[t]}return P(e,t,a)}),T(x.a,k.a,(e,t,a)=>{const n=a.undoMode,o=P(e,t,a);if(n||!(t._cloneOperation instanceof m.a))return o;const i=t._cloneOperation.position.getShiftedBy(-1);if(i&&e.operations[0].position.isEqual(i)){const t=e.clone();t.operations[0].position=i.getShiftedBy(1),o.push(t)}return o}),T(k.a,x.a,(e,t,a)=>{e=e.clone();const n=a.undoMode;if(n||!(e._cloneOperation instanceof m.a))return[e];const o=e._cloneOperation.position.getShiftedBy(-1);if(o&&!n&&t.operations[0].position.isEqual(o)){const a=t.clone();return a.operations[0].position=o.getShiftedBy(1),a.operations[0].oldName=e._cloneOperation.nodes.getNode(0).name,[e,a]}return[e]}),T(A.a,k.a,(e,t,a)=>{const n=P(e,t,a),o=t._cloneOperation.position||t._cloneOperation.targetPosition;if(!o)return P(e,t,a);const i=a.undoMode;if(i)return n;for(const i of n)if(i instanceof A.a){const e=i._moveOperation,t=e.sourcePosition.getShiftedBy(e.howMany);t.isEqual(o)&&(e.howMany+=1)}return n}),T(k.a,A.a,(e,t,a)=>{const n=a.undoMode;if(n)return P(e,t,a);const o=e._cloneOperation.position||e._cloneOperation.targetPosition;if(!o)return P(e,t,a);t=t.clone();const i=t._moveOperation,r=i.sourcePosition.getShiftedBy(i.howMany);return r.isEqual(o)&&(i.howMany+=1),P(e,t,a)})},function(e,t,a){'use strict';function n(e){return[e.clone()]}function o(e,t){for(let a=0;anew c.a(t,e.key,e.oldValue,e.newValue,e.baseVersion))},AttributeOperation(e,t,a){if(e.key===t.key){const n=e.range.getDifference(t.range).map((t)=>new c.a(t,e.key,e.oldValue,e.newValue,e.baseVersion)),o=e.range.getIntersection(t.range);return o&&(a.isStrong?n.push(new c.a(o,t.key,t.newValue,e.newValue,e.baseVersion)):0===n.length&&n.push(new _.a(0))),n}return[e.clone()]},RootAttributeOperation:n,RenameOperation:n,MarkerOperation:n,MoveOperation(e,t){const a=k.a.createFromPositionAndShift(t.sourcePosition,t.howMany);let n=[];const o=r(e.range.getDifference(a)),i=e.range.getIntersection(a);return null!==o&&(o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany),n=o._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,!0,!1).reverse()),null!==i&&(i.start=i.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),i.end=i.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.push(i)),n.map((t)=>new c.a(t,e.key,e.oldValue,e.newValue,e.baseVersion))}},RootAttributeOperation:{InsertOperation:n,AttributeOperation:n,RootAttributeOperation(e,t,a){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||a.isStrong)&&e.newValue!==t.newValue?[e.clone()]:[new _.a(e.baseVersion)]},RenameOperation:n,MarkerOperation:n,MoveOperation:n},RenameOperation:{InsertOperation(e,t){const a=e.clone();return a.position=a.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[a]},AttributeOperation:n,RootAttributeOperation:n,RenameOperation(e,t,a){const n=e.clone();if(e.position.isEqual(t.position))if(a.isStrong)n.oldName=t.newName;else return[new _.a(e.baseVersion)];return[n]},MarkerOperation:n,MoveOperation(e,t){const a=e.clone(),n=a.position.isEqual(t.sourcePosition);return a.position=a.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,n),[a]}},MarkerOperation:{InsertOperation(e,t){const a=e.clone();return a.oldRange&&(a.oldRange=a.oldRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),a.newRange&&(a.newRange=a.newRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),[a]},AttributeOperation:n,RootAttributeOperation:n,RenameOperation:n,MarkerOperation(e,t,a){const n=e.clone();if(e.name==t.name)if(a.isStrong)n.oldRange=t.newRange;else return[new _.a(e.baseVersion)];return[n]},MoveOperation(e,t){const a=e.clone();if(a.oldRange){const e=a.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);a.oldRange=k.a.createFromRanges(e)}if(a.newRange){const e=a.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);a.newRange=k.a.createFromRanges(e)}return[a]}},MoveOperation:{InsertOperation(e,t,a){let n=k.a.createFromPositionAndShift(e.sourcePosition,e.howMany);n=n._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,e.isSticky&&!a.forceNotSticky)[0];const o=void 0===a.insertBefore?!a.isStrong:a.insertBefore,i=new e.constructor(n.start,n.end.offset-n.start.offset,e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,o),e.baseVersion);return i.isSticky=e.isSticky,[i]},AttributeOperation:n,RootAttributeOperation:n,RenameOperation:n,MarkerOperation:n,MoveOperation(e,t,a){const n=k.a.createFromPositionAndShift(e.sourcePosition,e.howMany),o=k.a.createFromPositionAndShift(t.sourcePosition,t.howMany);let r=a.isStrong;const l=e.isSticky&&!a.forceNotSticky,d=void 0===a.insertBefore?!r:a.insertBefore,c=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,d,t.isSticky&&!a.forceNotSticky);if(i(e,t)&&i(t,e))return[t.getReversed()];const m=n.containsPosition(t.targetPosition)||n.start.isEqual(t.targetPosition)&&l||n.end.isEqual(t.targetPosition)&&l;if(m&&n.containsRange(o,!0))return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!l),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,l),s([n],c,e);const u=o.containsPosition(e.targetPosition)||o.start.isEqual(e.targetPosition)&&t.isSticky&&!a.forceNotSticky||o.end.isEqual(e.targetPosition)&&t.isSticky&&!a.forceNotSticky;if(u&&o.containsRange(n,!0))return n.start=n.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),n.end=n.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),s([n],c,e);const p=Object(y.a)(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if('prefix'==p||'extension'==p)return n.start=n.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!l),n.end=n.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,l),s([n],c,e);a.forceWeakRemove||(e instanceof f.a&&!(t instanceof f.a)?r=!0:!(e instanceof f.a)&&t instanceof f.a&&(r=!1));const g=[],h=n.getDifference(o);for(const n of h){n.start=n.start._getTransformedByDeletion(t.sourcePosition,t.howMany),n.end=n.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const e='same'==Object(y.a)(n.start.getParentPath(),t.getMovedRangeStart().getParentPath()),a=n._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,e,l);g.push(...a)}const b=n.getIntersection(o);return null!==b&&r&&!m&&(b.start=b.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),b.end=b.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===g.length?g.push(b):1==g.length?o.start.isBefore(n.start)||o.start.isEqual(n.start)?g.unshift(b):g.push(b):g.splice(1,0,b)),0===g.length?[new _.a(e.baseVersion)]:s(g,c,e)}}}},function(e,t,a){'use strict';var n=a(183),o=a(184),i=a(185),r=a(186),s=a(188),l=a(193),d=a(141),c=a(142),m=a(194),u=a(195),p=a(196),g=a(197),f=a(199),h=a(200),b=a(201),_=a(202),k=a(203),y=a(204),w=a(143),v=a(205),x=a(206),A=a(207),C=a(208),T=a(209),P=a(210),E=a(18),S=a(211),O=a(212),V=a(213),R=a(146),F=a(214),I=a(215),N=a(216),B=a(218),M=a(219),D=a(220),L=a(221),j=a(222),z=a(223),q=a(224),H=a(225),W=a(226),$=a(227),U=a(229),K=a(230),Q=a(231),J=a(232),Y=a(233),G=a(234),X=a(235),Z=a(236),ee=a(237),te=a(238),ae=a(239),ne=a(240),oe=a(108),ie=a(149),re=a(241),se=a(242),le=a(243),de=a(244),ce=a(245),me=a(246),ue=a(248),pe=a(249),ge=a(401);a.d(t,'a',function(){return ge.a})},function(e,t,a){'use strict';var n=a(119),o=a(15);t.a=function(e){return Object(o.a)(e)||Object(n.a)(e)}},function(e,t,a){'use strict';var n=a(374),o=a(375),i=a(190);t.a=function(e){var t=Object(o.a)(e);return 1==t.length&&t[0][2]?Object(i.a)(t[0][0],t[0][1]):function(a){return a===e||Object(n.a)(a,e,t)}}},function(e,t,a){'use strict';var n=a(122),o=a(96);t.a=function(e,t,a,i){var r=a.length,s=r,l=!i;if(null==e)return!s;for(e=Object(e);r--;){var d=a[r];if(l&&d[2]?d[1]!==e[d[0]]:!(d[0]in e))return!1}for(;++ra&&(a=-a>r?0:r+a),i=void 0===i||i>r?r:Object(n.a)(i),0>i&&(i+=r),i=a>i?0:Object(o.a)(i);a=t?e:t)),e}},function(e,t,a){'use strict';var o=a(37);t.a=function(e,t){var a=e.length;if(a)return t+=0>t?a:0,Object(o.a)(t,a)?e[t]:void 0}},function(e,t){'use strict';t.a=function(e,t,a,n){for(var o=a-1,i=e.length;++ot||r&&s&&d&&!l&&!c||o&&s&&d||!a&&d||!i)return 1;if(!o&&!r&&!c&&e=a)break;yield t}}}getDelta(e){const t=this._historyPoints.get(e);return t===void 0?null:this._deltas[t]}setDeltaAsUndone(e,t){this._undoPairs.set(t,e),this._undoneDeltas.add(e)}isUndoingDelta(e){return this._undoPairs.has(e)}isUndoneDelta(e){return this._undoneDeltas.has(e)}getUndoneDelta(e){return this._undoPairs.get(e)}_getIndex(e){const t=this._historyPoints.get(e);if(t===void 0){const t=this._deltas[this._deltas.length-1],a=t.baseVersion+t.operations.length;if(0>e||e>=a)return-1;throw new o.b('model-history-wrong-version: Given base version points to the middle of a delta.')}return t}}},function(e,t){'use strict';t.a=function(e,t){if(e.size!=t.size)return!1;for(const a of e.entries()){const e=JSON.stringify(a[1]),n=JSON.stringify(t.get(a[0]));if(e!==n)return!1}return!0}},function(e,t,a){'use strict';function n(e,t,a){for(let n=a.length-1,o=t.length-1;0<=n&&0<=o;){const i=t[o];if(!e.hasItem(i))return!1;const r=e._extensionChains.get(i);if(r.includes(a[n]))n--,o--;else return!1}return!0}var o=a(1),i=a(5),r=a(3),s=a(250),l=a(69),d=a(15),c=a(120),m=a(0);class u{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.limits.add('$root'),this.registerItem('$clipboardHolder','$root'),this.allow({name:'$inline',inside:'$clipboardHolder'})}allow(e){this._getItem(e.name).allow(u._normalizeQueryPath(e.inside),e.attributes)}disallow(e){this._getItem(e.name).disallow(u._normalizeQueryPath(e.inside),e.attributes)}requireAttributes(e,t){this._getItem(e).requireAttributes(t)}check(e){if(!this.hasItem(e.name))return!1;Object(d.a)(e.attributes)?0===e.attributes.length&&e.attributes.push(void 0):e.attributes=[e.attributes];const t=u._normalizeQueryPath(e.inside),a=this._extensionChains.get(e.name).map((e)=>this._getItem(e));if(!this._getItem(e.name)._checkRequiredAttributes(e.attributes))return!1;for(const n of e.attributes)for(const e of a)if(e._hasMatchingPath('disallow',t,n))return!1;for(const n of e.attributes){if(n&&s.a._isStoreAttributeKey(n))continue;let e=!1;for(const o of a)if(o._hasMatchingPath('allow',t,n)){e=!0;break}if(!e)return!1}return!0}hasItem(e){return this._items.has(e)}registerItem(e,t){if(this.hasItem(e))throw new m.b('model-schema-item-exists: Item with specified name already exists in schema.');if(!!t&&!this.hasItem(t))throw new m.b('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(e,new p(this));const a=this.hasItem(t)?this._extensionChains.get(t).concat(e):[e];this._extensionChains.set(e,a)}itemExtends(e,t){if(!this.hasItem(e)||!this.hasItem(t))throw new m.b('model-schema-no-item: Item with specified name does not exist in schema.');const a=this._extensionChains.get(e);return a.some((e)=>e==t)}checkAttributeInSelection(e,t){if(e.isCollapsed)return this.check({name:'$text',inside:e.getFirstPosition(),attributes:t});else{const a=e.getRanges();for(const e of a)for(const a of e){const e=a.item.name||'$text',n=Array.from(a.item.getAttributeKeys()).concat(t);if(this.check({name:e,inside:a.previousPosition,attributes:n}))return!0}}return!1}getValidRanges(e,t){const a=[];for(const n of e){let e=n.start,i=n.start;const s=n.end;for(const s of n.getWalker()){const n=s.item.name||'$text',l=o.a.createBefore(s.item);this.check({name:n,inside:l,attributes:t})||(!i.isEqual(e)&&a.push(new r.a(i,e)),i=s.nextPosition),e=s.nextPosition}i&&!i.isEqual(s)&&a.push(new r.a(i,s))}return a}getLimitElement(e){let t=Array.from(e.getRanges()).reduce((e,t)=>e?e.getCommonAncestor(t.getCommonAncestor()):t.getCommonAncestor(),null);for(;!this.limits.has(t.name)&&t.parent;)t=t.parent;return t}removeDisallowedAttributes(e,t,a){for(const n of e){const e=n.is('text')?'$text':n.name,o=Array.from(n.getAttributeKeys()),i=u._normalizeQueryPath(t);if(!this.check({name:e,attributes:o,inside:i}))for(const t of n.getAttributeKeys())this.check({name:e,attributes:t,inside:i})||(a?a.removeAttribute(n,t):n.removeAttribute(t));n.is('element')&&this.removeDisallowedAttributes(n.getChildren(),i.concat(n.name),a)}}_getItem(e){if(!this.hasItem(e))throw new m.b('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(e)}static _normalizeQueryPath(e){let t=[];if(Object(d.a)(e))for(const a of e)a instanceof i.a?t.push(a.name):Object(c.a)(a)&&t.push(a);else if(e instanceof o.a){for(let a=e.parent;null!==a;)t.push(a.name),a=a.parent;t.reverse()}else Object(c.a)(e)&&(t=e.split(' '));return t}}t.a=u;class p{constructor(e){this._schema=e,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(e,t){this._addPath('_allowed',e,t)}disallow(e,t){this._addPath('_disallowed',e,t)}requireAttributes(e){this._requiredAttributes.push(e)}toJSON(){const e=Object(l.a)(this);return e._schema='[model.Schema]',e}_addPath(e,t,a){t=t.slice(),Object(d.a)(a)||(a=[a]);for(const n of a)this[e].push({path:t,attribute:n})}_getPaths(e,t){const a='allow'===e?this._allowed:this._disallowed,n=[];for(const o of a)o.attribute===t&&n.push(o.path);return n}_checkRequiredAttributes(e){let t=!0;for(const a of this._requiredAttributes){t=!0;for(const n of a)if(-1==e.indexOf(n)){t=!1;break}if(t)break}return t}_hasMatchingPath(e,t,a){const o=this._getPaths(e,a);for(const i of o)if(n(this._schema,t,i))return!0;return!1}}},function(e,t,a){'use strict';var n=a(151),o=a(1),i=a(3),r=a(8),s=a(0),l=a(4);class d{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}set(e,t){const a=e instanceof c?e.name:e,o=this._markers.get(a);if(o){const e=o.getRange();if(e.isEqual(t))return o;this.remove(a)}const i=n.a.createFromRange(t),r=new c(a,i);return this._markers.set(a,r),this.fire('add:'+a,r),r}remove(e){const t=e instanceof c?e.name:e,a=this._markers.get(t);return!!a&&(this._markers.delete(t),this.fire('remove:'+t,a),this._destroyMarker(a),!0)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+':')&&(yield t)}_destroyMarker(e){e.stopListening(),e._liveRange.detach(),e._liveRange=null}}t.a=d,Object(l.a)(d,r.c);class c{constructor(e,t){this.name=e,this._liveRange=t,this._liveRange.delegate('change:range').to(this),this._liveRange.delegate('change:content').to(this)}getStart(){if(!this._liveRange)throw new s.b('marker-destroyed: Cannot use a destroyed marker instance.');return o.a.createFromPosition(this._liveRange.start)}getEnd(){if(!this._liveRange)throw new s.b('marker-destroyed: Cannot use a destroyed marker instance.');return o.a.createFromPosition(this._liveRange.end)}getRange(){if(!this._liveRange)throw new s.b('marker-destroyed: Cannot use a destroyed marker instance.');return i.a.createFromRange(this._liveRange)}}Object(l.a)(c,r.c)},function(e,t,a){'use strict';var n=a(50);class o extends n.a{constructor(e){super(),this.editor=e}set(e,t,a={}){if('string'==typeof t){const e=t;t=(t,a)=>{this.editor.execute(e),a()}}super.set(e,t,a)}}t.a=o},function(e,t,a){'use strict';var n=a(410),o=a(163),i=a(176),r=a(71),s=a(424),l=a(259),d=a(12),c=a(4);class m{constructor(e){this.model=e,this.view=new n.a,this.mapper=new o.a,this.modelToView=new i.a(this.model,{mapper:this.mapper,viewSelection:this.view.selection}),this.listenTo(this.model,'change',(e,t,a)=>{this.modelToView.convertChange(t,a)},{priority:'low'}),this.listenTo(this.model,'changesDone',()=>{const e=this.model.selection;this.modelToView.convertSelection(e),this.view.render()},{priority:'low'}),this.listenTo(this.model.markers,'add',(e,t)=>{this.modelToView.convertMarker('addMarker',t.name,t.getRange())}),this.listenTo(this.model.markers,'remove',(e,t)=>{this.modelToView.convertMarker('removeMarker',t.name,t.getRange())}),this.listenTo(this.view,'selectionChange',Object(s.a)(this.model,this.mapper)),this.modelToView.on('insert:$text',Object(r.f)(),{priority:'lowest'}),this.modelToView.on('remove',Object(r.h)(),{priority:'low'}),this.modelToView.on('selection',Object(l.a)(),{priority:'low'}),this.modelToView.on('selection',Object(l.b)(),{priority:'low'}),this.modelToView.on('selection',Object(l.d)(),{priority:'low'}),this.modelToView.on('selection',Object(l.c)(),{priority:'low'})}createRoot(e,t='main'){const a=this.view.createRoot(e,t),n=this.model.getRoot(t);return this.mapper.bindElements(n,a),a}destroy(){this.view.destroy(),this.stopListening()}}t.a=m,Object(c.a)(m,d.a)},function(e,t,a){'use strict';var n=a(111),o=a(411),i=a(153),r=a(253),s=a(74),l=a(94),d=a(16),c=a(254),m=a(417),u=a(419),p=a(420),g=a(421),f=a(4),h=a(12),b=a(422);class _{constructor(){this.domRoots=new Map,this.selection=new n.a,this.domConverter=new i.a,this.roots=new Map,this.set('isReadOnly',!1),this.set('isFocused',!1),this.renderer=new o.a(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this),this._observers=new Map,this.addObserver(c.a),this.addObserver(m.a),this.addObserver(u.a),this.addObserver(p.a),this.addObserver(g.a),Object(s.f)(this),Object(l.b)(this),this.decorate('render')}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[a,n]of this.domRoots)t.observe(n,a);return t.enable(),t}getObserver(e){return this._observers.get(e)}createRoot(e,t='main'){const a='string'==typeof e?e:e.tagName,n=new r.a(a.toLowerCase(),t);return n.document=this,this.roots.set(t,n),n.on('change:children',(e,t)=>this.renderer.markToSync('children',t)),n.on('change:attributes',(e,t)=>this.renderer.markToSync('attributes',t)),n.on('change:text',(e,t)=>this.renderer.markToSync('text',t)),this.domConverter.isElement(e)&&this.attachDomRoot(e,t),n}attachDomRoot(e,t='main'){const a=this.getRoot(t);this.domRoots.set(t,e),this.domConverter.bindElements(e,a),this.renderer.markToSync('children',a),this.renderer.domDocuments.add(e.ownerDocument);for(const a of this._observers.values())a.observe(e,t)}getRoot(e='main'){return this.roots.get(e)}getDomRoot(e='main'){return this.domRoots.get(e)}render(){this.disableObservers(),this.renderer.render(),this.enableObservers()}focus(){if(!this.isFocused){const e=this.selection.editableElement;e?(this.domConverter.focus(e),this.render()):d.a.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}scrollToTheSelection(){const e=this.selection.getFirstRange();e&&Object(b.a)({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}destroy(){for(const e of this._observers.values())e.destroy()}}t.a=_,Object(f.a)(_,h.a)},function(e,t,a){'use strict';var n=a(35),o=a(22),i=a(74),r=a(4),s=a(251),l=a(412),d=a(413),c=a(16),m=a(12),u=a(0);class p{constructor(e,t){this.domDocuments=new Set,this.domConverter=e,this.markedAttributes=new Set,this.markedChildren=new Set,this.markedTexts=new Set,this.selection=t,this._inlineFiller=null,this.isFocused=!1,this._fakeSelectionContainer=null}markToSync(e,t){if('text'===e)this.domConverter.mapViewToDom(t.parent)&&this.markedTexts.add(t);else{if(!this.domConverter.mapViewToDom(t))return;if('attributes'===e)this.markedAttributes.add(t);else if('children'===e)this.markedChildren.add(t);else throw new u.b('view-renderer-unknown-type: Unknown type passed to Renderer.markToSync.')}}render(){let e;this._inlineFiller&&!this._isSelectionInInlineFiller()&&this._removeInlineFiller(),this._inlineFiller?e=this._getInlineFillerPosition():this._needsInlineFillerAtSelection()&&(e=this.selection.getFirstPosition(),this.markedChildren.add(e.parent));for(const t of this.markedTexts)!this.markedChildren.has(t.parent)&&this.domConverter.mapViewToDom(t.parent)&&this._updateText(t,{inlineFillerPosition:e});for(const e of this.markedAttributes)this._updateAttrs(e);for(const t of this.markedChildren)this._updateChildren(t,{inlineFillerPosition:e});if(e){const t=this.domConverter.viewPositionToDom(e),a=t.parent.ownerDocument;this._inlineFiller=Object(i.i)(t.parent)?t.parent:this._addInlineFiller(a,t.parent,t.offset)}else this._inlineFiller=null;this._updateSelection(),this._updateFocus(),this.markedTexts.clear(),this.markedAttributes.clear(),this.markedChildren.clear()}_addInlineFiller(e,t,a){const n=t instanceof Array?t:t.childNodes,o=n[a];if(this.domConverter.isText(o))return o.data=i.b+o.data,o;else{const o=e.createTextNode(i.b);return Array.isArray(t)?n.splice(a,0,o):Object(l.a)(t,a,o),o}}_getInlineFillerPosition(){const e=this.selection.getFirstPosition();return e.parent.is('text')?o.a.createBefore(this.selection.getFirstPosition().parent):e}_isSelectionInInlineFiller(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=this.domConverter.viewPositionToDom(e);return t&&this.domConverter.isText(t.parent)&&Object(i.i)(t.parent)}_removeInlineFiller(){const e=this._inlineFiller;if(!Object(i.i)(e))throw new u.b('view-renderer-filler-was-lost: The inline filler node was lost.');Object(i.h)(e)?e.parentNode.removeChild(e):e.data=e.data.substr(i.c),this._inlineFiller=null}_needsInlineFillerAtSelection(){if(1!=this.selection.rangeCount||!this.selection.isCollapsed)return!1;const e=this.selection.getFirstPosition(),t=e.parent,a=e.offset;if(!this.domConverter.mapViewToDom(t.root))return!1;if(!t.is('element'))return!1;if(a===t.getFillerOffset())return!1;const o=e.nodeBefore,i=e.nodeAfter;return o instanceof n.a||i instanceof n.a?!1:!0}_updateText(e,t){const a=this.domConverter.findCorrespondingDomText(e),n=this.domConverter.viewToDom(e,a.ownerDocument),o=a.data;let r=n.data;const s=t.inlineFillerPosition;s&&s.parent==e.parent&&s.offset==e.index&&(r=i.b+r),o!=r&&(a.data=r)}_updateAttrs(e){const t=this.domConverter.mapViewToDom(e),a=Array.from(t.attributes).map((e)=>e.name),n=e.getAttributeKeys();for(const a of n)t.setAttribute(a,e.getAttribute(a));for(const n of a)e.hasAttribute(n)||t.removeAttribute(n)}_updateChildren(e,t){function a(e,t){if(e===t)return!0;return n.isText(e)&&n.isText(t)?e.data===t.data:Object(i.g)(e,n.blockFiller)&&Object(i.g)(t,n.blockFiller)}const n=this.domConverter,o=n.mapViewToDom(e);if(o){const r=o.ownerDocument,c=t.inlineFillerPosition,m=o.childNodes,u=Array.from(n.viewChildrenToDom(e,r,{bind:!0}));c&&c.parent==e&&this._addInlineFiller(r,u,c.offset);const p=Object(s.a)(m,u,a);let g=0;const i=new Set;for(const e of p)'insert'===e?(Object(l.a)(o,g,u[g]),g++):'delete'===e?(i.add(m[g]),Object(d.a)(m[g])):g++;for(const e of i)e.parentNode||this.domConverter.unbindDomElement(e)}}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=t.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(t.createTextNode('\xA0'))),this._fakeSelectionContainer.parentElement||e.appendChild(this._fakeSelectionContainer);const a=this.selection.fakeSelectionLabel||'\xA0';this._fakeSelectionContainer.firstChild.data=a;const n=t.getSelection();n.removeAllRanges();const o=t.createRange();o.selectNodeContents(this._fakeSelectionContainer),n.addRange(o),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){const e=this.domConverter.viewPositionToDom(this.selection.anchor),a=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(e.parent,e.offset),t.extend(a.parent,a.offset)}}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);if(t&&this.selection.isEqual(t))return!1;if(!this.selection.isCollapsed&&this.selection.isSimilar(t)){const e={oldSelection:t,currentSelection:this.selection};return c.a.warn('renderer-skipped-selection-rendering: The selection was not rendered due to its similarity to the current one.',e),!1}return!0}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const t=e.activeElement,a=this.domConverter.mapDomToView(t);t&&a&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}t.a=p,Object(r.a)(p,m.a)},function(e,t){'use strict';t.a=function(e,t,a){e.insertBefore(a,e.childNodes[t]||null)}},function(e,t){'use strict';t.a=function(e){const t=e.parentNode;t&&t.removeChild(e)}},function(e,t){'use strict';t.a=function(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}},function(e,t,a){'use strict';t.a=function(e,t){const a=Object(n.a)(e),o=Object(n.a)(t);let r=0;for(;a[r]==o[r]&&a[r];)r++;return 0==r?null:a[r-1]};var n=a(252)},function(e,t,a){'use strict';var n=a(96);t.a=function(e,t,a){a='function'==typeof a?a:void 0;var o=a?a(e,t):void 0;return o===void 0?Object(n.a)(e,t,a):!!o}},function(e,t,a){'use strict';var n=a(61),o=a(254),i=a(16),r=a(255);class s extends n.a{constructor(e){super(e),this.mutationObserver=e.getObserver(o.a),this.document=e,this.selection=e.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Object(r.a)((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),a=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(a)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void i.a.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(a))this.document.render();else{const e={oldSelection:this.selection,newSelection:a,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}t.a=s},function(e,t){'use strict';var a=Date.now;t.a=a},function(e,t,a){'use strict';var n=a(75);class o extends n.a{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0,e.on('focus',()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),0)}),e.on('blur',(t,a)=>{const n=e.selection.editableElement;(null===n||n===a.target)&&(e.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}t.a=o},function(e,t,a){'use strict';var n=a(75),o=a(28);class i extends n.a{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return Object(o.a)(this)}})}}t.a=i},function(e,t,a){'use strict';function n(e){return e==r.c.arrowright||e==r.c.arrowleft||e==r.c.arrowup||e==r.c.arrowdown}var o=a(61),i=a(111),r=a(28),s=a(255);class l extends o.a{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Object(s.a)((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,a)=>{const o=e.selection;o.isFake&&n(a.keyCode)&&this.isEnabled&&(a.preventDefault(),this._handleSelectionMove(a.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,a=i.a.createFromSelection(t);a.setFake(!1),(e==r.c.arrowleft||e==r.c.arrowup)&&a.collapseToStart(),(e==r.c.arrowright||e==r.c.arrowdown)&&a.collapseToEnd();const n={oldSelection:t,newSelection:a,domSelection:null};this.document.fire('selectionChange',n),this._fireSelectionChangeDoneDebounced(n)}}t.a=l},function(e,t,a){'use strict';function n({target:e,viewportOffset:t=0}){const a=c(e);for(let n=a,r=null;n;){let s;s=n==a?m(e):m(r),i(s,()=>u(e,n));const l=u(e,n);o(n,l,t),n.parent==n?n=null:(r=n.frameElement,n=n.parent)}}function o(e,t,a){const n=t.clone().moveBy(0,a),o=t.clone().moveBy(0,-a),i=new g.a(e).excludeScrollbarsAndBorders();if(![o,n].every((e)=>i.contains(e))){let{scrollX:c,scrollY:m}=e;s(o,i)?m-=i.top-t.top+a:r(n,i)&&(m+=t.bottom-i.bottom+a),l(t,i)?c-=i.left-t.left+a:d(t,i)&&(c+=t.right-i.right+a),e.scrollTo(c,m)}}function i(e,t){const a=c(e);for(let n,o;e!=a.document.body;)o=t(),n=new g.a(e).excludeScrollbarsAndBorders(),n.contains(o)||(s(o,n)?e.scrollTop-=n.top-o.top:r(o,n)&&(e.scrollTop+=o.bottom-n.bottom),l(o,n)?e.scrollLeft-=n.left-o.left:d(o,n)&&(e.scrollLeft+=o.right-n.right)),e=e.parentNode}function r(e,t){return e.bottom>t.bottom}function s(e,t){return e.topt.right}function c(e){return Object(p.a)(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function m(e){if(Object(p.a)(e)){let t=e.commonAncestorContainer;return t.nodeType==Node.TEXT_NODE&&(t=t.parentNode),t}return e.parentNode}function u(e,t){const a=c(e),n=new g.a(e);if(a===t)return n;for(let o=a;o!=t;){const e=o.frameElement,t=new g.a(e).excludeScrollbarsAndBorders();n.moveBy(t.left,t.top),o=o.parent}return n}t.a=n;var p=a(155),g=a(256);Object.assign({},{scrollViewportToShowTarget:n,scrollAncestorsToShowTarget:function(e){const t=m(e);i(t,()=>new g.a(e))}})},function(e,t){'use strict';t.a=function(e){return'[object Window]'==Object.prototype.toString.apply(e)}},function(e,t,a){'use strict';t.a=function(e,t){return(a,o)=>{const i=o.newSelection,r=new n.a,s=[];for(const e of i.getRanges())s.push(t.toModelRange(e));r.setRanges(s,i.isBackward),r.isEqual(e.selection)||e.enqueueChanges(()=>{e.selection.setTo(r)})}};var n=a(59)},function(e,t){'use strict';t.a=function(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}},function(e,t){'use strict';t.a=function(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}},function(e,t){'use strict';t.a=class{getHtml(e){const t=document.implementation.createHTMLDocument(''),a=t.createElement('div');return a.appendChild(e),a.innerHTML}}},function(e,t,a){'use strict';var n=a(429),o=a(62),i=a(430),r=a(431);t.a=class{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new n.a(e),this.focusTracker=new o.a,this._toolbarConfig=Object(r.a)(e.config.get('toolbar')),t.set('width',e.config.get('ui.width')),t.set('height',e.config.get('ui.height')),t.stickyPanel.bind('isActive').to(this.focusTracker,'isFocused'),t.stickyPanel.limiterElement=t.element,this._toolbarConfig&&this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset);const a=e.editing.createRoot('div');t.editable.bind('isReadOnly').to(a),t.editable.bind('isFocused').to(e.editing.view),t.editable.name=a.rootName,this.focusTracker.add(t.editableElement)}init(){const e=this.editor;this.view.init(),this._toolbarConfig&&this.view.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),Object(i.a)({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:this.view.toolbar})}destroy(){this.view.destroy()}}},function(e,t,a){'use strict';var n=a(0);t.a=class{constructor(e){this.editor=e,this._components=new Map}*names(){yield*this._components.keys()}add(e,t){if(this.has(e))throw new n.b('componentfactory-item-exists: The item already exists in the component factory.',{name:e});this._components.set(e,t)}create(e){if(!this.has(e))throw new n.b('componentfactory-item-missing: The required component is not registered in the factory.',{name:e});return this._components.get(e)(this.editor.locale)}has(e){return this._components.has(e)}}},function(e,t){'use strict';t.a=function({origin:e,originKeystrokeHandler:t,originFocusTracker:a,toolbar:n,beforeFocus:o,afterBlur:i}){a.add(n.element),t.set('Alt+F10',(e,t)=>{a.isFocused&&!n.focusTracker.isFocused&&(o&&o(),n.focus(),t())}),n.keystrokes.set('Esc',(t,a)=>{n.focusTracker.isFocused&&(e.focus(),i&&i(),a())})}},function(e,t){'use strict';t.a=function(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}},function(e,t,a){'use strict';var n=a(433),o=a(436),i=a(438),r=a(262),s=a(6);class l extends n.a{constructor(e){super(e),this.stickyPanel=new i.a(e),this.toolbar=new r.a(e),s.a.extend(this.toolbar.template,{attributes:{class:'ck-editor-toolbar'}}),this.stickyPanel.content.add(this.toolbar),this.editable=new o.a(e),this.top.add(this.stickyPanel),this.main.add(this.editable)}get editableElement(){return this.editable.element}}t.a=l},function(e,t,a){'use strict';var n=a(434),o=a(52),i=a(6);class r extends n.a{constructor(e){super(e);const a=this.t,t=Object(o.a)();this.set('width',null),this.set('height',null),this.top=this.createCollection(),this.main=this.createCollection(),this.template=new i.a({tag:'div',attributes:{class:['ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:e.lang,"aria-labelledby":`cke-editor__aria-label_${t}`},children:[{tag:'span',attributes:{id:`cke-editor__aria-label_${t}`,class:'cke-voice-label'},children:[a('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}]})}}t.a=r},function(e,t,a){'use strict';var n=a(7),o=a(6);class i extends n.a{constructor(e){super(e),this.body=this.createCollection()}init(){this._renderBodyCollection(),super.init()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const e=this._bodyCollectionContainer=new o.a({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(e)}}t.a=i},function(e,t,a){'use strict';var n=a(165);t.a=function(e,t){return Object(n.a)(e,!0,!0,t)}},function(e,t,a){'use strict';var n=a(437),o=a(6);class i extends n.a{constructor(e,a){super(e,a);const n=this.bindTemplate,i=this.t;this.set('name',null);o.a.extend(this.template,{attributes:{role:'textbox',"aria-label":n.to('name',(e)=>i('Rich Text Editor, %0',[e])),class:'ck-editor__editable_inline'}})}}t.a=i},function(e,t,a){'use strict';var n=a(7),o=a(6);class i extends n.a{constructor(e,t){super(e);const a=this.bindTemplate;t&&(this.element=this.editableElement=t),this.template=new o.a({tag:'div',attributes:{class:[a.to('isFocused',(e)=>e?'ck-focused':'ck-blurred'),'ck-editor__editable','ck-rounded-corners'],contenteditable:a.to('isReadOnly',(e)=>!e)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=t}init(){this.externalElement?this.template.apply(this.externalElement):this.editableElement=this.element,super.init()}destroy(){this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}t.a=i},function(e,t,a){'use strict';var n=a(60),o=a(7),i=a(6),r=a(261);const s=Object(r.a)('px');class l extends o.a{constructor(e){super(e);const t=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterBottomOffset',50),this.set('viewportTopOffset',0),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),this.set('_hasViewportTopOffset',!1),this.content=this.createCollection(),this.template=new i.a({tag:'div',attributes:{class:['ck-sticky-panel',t.if('isSticky','ck-sticky-panel_sticky'),t.if('_isStickyToTheLimiter','ck-sticky-panel_sticky_bottom-limit')],style:{width:t.to('isSticky',(e)=>e?s(this._elementPlaceholder.getBoundingClientRect().width):null),top:t.to('_hasViewportTopOffset',(e)=>e?s(this.viewportTopOffset):null),bottom:t.to('_isStickyToTheLimiter',(e)=>e?s(this.limiterBottomOffset):null),marginLeft:t.to('_marginLeft')}},children:this.content}),this._elementPlaceholder=new i.a({tag:'div',attributes:{class:['ck-sticky-panel__placeholder'],style:{display:t.to('isSticky',(e)=>e?'block':'none'),height:t.to('isSticky',(e)=>e?s(this._panelRect.height):null)}}}).render()}init(){super.init(),this.element.parentNode.insertBefore(this._elementPlaceholder,this.element),this._checkIfShouldBeSticky(),this.listenTo(n.a.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}destroy(){super.destroy(),this._elementPlaceholder.remove()}_checkIfShouldBeSticky(){const e=this._limiterRect=this.limiterElement.getBoundingClientRect(),t=this._panelRect=this.element.getBoundingClientRect();this.isSticky=this.isActive&&e.top{t.target===e.element&&t.preventDefault()})}},function(e,t){'use strict';t.a=class{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display='none',t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display='',t&&t.remove()}),this._replacedElements=[]}}},function(e,t,a){var n=a(443);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.ck-hidden{display:none!important}.ck-reset,.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{box-sizing:border-box;width:auto;height:auto;position:static}svg.ck-icon{min-width:20px;min-height:20px;font-size:1em;vertical-align:middle}svg.ck-icon,svg.ck-icon *{color:inherit;cursor:inherit}svg.ck-icon *{fill:currentColor}.ck-tooltip,.ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:999}.ck-tooltip__text{display:inline-block}.ck-tooltip__text:after{content:"";width:0;height:0}.ck-button,a.ck-button{display:inline-block;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.ck-button .ck-tooltip,a.ck-button .ck-tooltip{display:block}.ck-button:hover .ck-tooltip,a.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck-button .ck-button__label,.ck-button:focus:not(:hover) .ck-tooltip,a.ck-button .ck-button__label,a.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck-toolbar__separator{display:inline-block}.ck-toolbar__newline{display:block;clear:left}.ck-dropdown{display:inline-block;position:relative}.ck-dropdown:after{content:"";width:0;height:0;pointer-events:none;z-index:1;position:absolute;top:50%;transform:translateY(-50%)}.ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:999;position:absolute;left:0;transform:translateY(100%)}.ck-dropdown__panel-visible{display:inline-block}.ck-label,.ck-list__item{display:block}.cke-voice-label{display:none}.ck-balloon-panel{display:none;position:absolute;z-index:999}.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:1}.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:2}.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{z-index:1}.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{z-index:2}.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{z-index:1}.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{z-index:2}.ck-balloon-panel_visible{display:block}.ck-editor .ck-sticky-panel.ck-sticky-panel_sticky{z-index:999;position:fixed;top:0}.ck-editor .ck-sticky-panel.ck-sticky-panel_sticky.ck-sticky-panel_sticky_bottom-limit{top:auto;position:absolute}.ck-reset,.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{border-collapse:collapse;font:normal normal normal 12px/1.67 Helvetica,Arial,Tahoma,Verdana,Sans-Serif;color:#333;text-align:left;white-space:nowrap;cursor:auto;float:none}.ck-reset_all .ck-rtl *{text-align:right}.ck-reset_all iframe{vertical-align:inherit}.ck-reset_all textarea{white-space:pre-wrap}.ck-reset_all input[type=password],.ck-reset_all input[type=text],.ck-reset_all textarea{cursor:text}.ck-reset_all input[type=password][disabled],.ck-reset_all input[type=text][disabled],.ck-reset_all textarea[disabled]{cursor:default}.ck-reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.ck-reset_all button::-moz-focus-inner{padding:0;border:0}svg.ck-icon{width:1.67em;height:1.67em}.ck-tooltip{left:50%}.ck-tooltip__text{font-size:.9em;line-height:1.5;color:#fff;padding:.4em .64em;background:#333;position:relative;left:-50%}.ck-rounded-corners .ck-tooltip__text,.ck-tooltip__text.ck-rounded-corners{border-radius:2px}.ck-tooltip__text:after{border-style:solid;left:50%}.ck-tooltip.ck-tooltip_s{bottom:-5px;transform:translateY(100%)}.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:-5px;transform:translateX(-50%);border-color:transparent transparent #333;border-width:0 5px 5px}.ck-tooltip.ck-tooltip_n{top:-5px;transform:translateY(-100%)}.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:-5px;transform:translateX(-50%);border-color:#333 transparent transparent;border-width:5px 5px 0}.ck-tooltip,.ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}.ck-button,a.ck-button{background:#fff;border:1px solid #bfbfbf;white-space:nowrap;cursor:default;vertical-align:middle;padding:.4em;font-size:inherit}.ck-button:not(.ck-disabled):focus,.ck-button:not(.ck-disabled):hover,a.ck-button:not(.ck-disabled):focus,a.ck-button:not(.ck-disabled):hover{background:#e6e6e6;border-color:#acacac}.ck-button:not(.ck-disabled):active,a.ck-button:not(.ck-disabled):active{background:#d9d9d9;border-color:#a3a3a3;box-shadow:inset 0 2px 2px #bfbfbf}.ck-button.ck-disabled,a.ck-button.ck-disabled{background:#fff;border-color:#c6c6c6}.ck-button.ck-rounded-corners,.ck-rounded-corners .ck-button,.ck-rounded-corners a.ck-button,a.ck-button.ck-rounded-corners{border-radius:2px}.ck-button:focus,a.ck-button:focus{outline:none;border:1px solid #48a3f5;box-shadow:0 0 3px 2px #78bbf8}.ck-button .ck-icon,a.ck-button .ck-icon{float:left}.ck-button.ck-disabled .ck-button__label,.ck-button.ck-disabled .ck-icon,a.ck-button.ck-disabled .ck-button__label,a.ck-button.ck-disabled .ck-icon{opacity:.5}.ck-button.ck-button_with-text,a.ck-button.ck-button_with-text{padding:.4em .8em}.ck-button.ck-button_with-text .ck-icon,a.ck-button.ck-button_with-text .ck-icon{margin-left:-.4em;margin-right:.4em}.ck-button.ck-button_with-text .ck-button__label,a.ck-button.ck-button_with-text .ck-button__label{display:block}.ck-button.ck-on,a.ck-button.ck-on{background:#f7f7f7;border-color:#b9b9b9}.ck-button.ck-on:not(.ck-disabled):focus,.ck-button.ck-on:not(.ck-disabled):hover,a.ck-button.ck-on:not(.ck-disabled):focus,a.ck-button.ck-on:not(.ck-disabled):hover{background:#dedede;border-color:#a7a7a7}.ck-button.ck-on:not(.ck-disabled):active,a.ck-button.ck-on:not(.ck-disabled):active{background:#d2d2d2;border-color:#9d9d9d;box-shadow:inset 0 2px 2px #b9b9b9}.ck-button.ck-on.ck-disabled,a.ck-button.ck-on.ck-disabled{background:#f8f8f8;border-color:silver}.ck-button-action,a.ck-button-action{background:#61b145;border-color:#4e8e37;text-shadow:0 -1px #4e8e37;color:#fff}.ck-button-action:not(.ck-disabled):focus,.ck-button-action:not(.ck-disabled):hover,a.ck-button-action:not(.ck-disabled):focus,a.ck-button-action:not(.ck-disabled):hover{background:#579f3e;border-color:#467f32}.ck-button-action:not(.ck-disabled):active,a.ck-button-action:not(.ck-disabled):active{background:#52963b;border-color:#42782f;box-shadow:inset 0 2px 2px #498534}.ck-button-action.ck-disabled,a.ck-button-action.ck-disabled{background:#6fbc54;border-color:#5aa440}.ck-button-action:active,.ck-button-action:focus,.ck-button-action:hover,a.ck-button-action:active,a.ck-button-action:focus,a.ck-button-action:hover{text-shadow:0 -1px #3a6a29}.ck-button-bold,a.ck-button-bold{font-weight:700}.ck-button .ck-icon use,.ck-button .ck-icon use *,a.ck-button .ck-icon use,a.ck-button .ck-icon use *{color:inherit}.ck-button .ck-button__label,a.ck-button .ck-button__label{font-size:inherit;float:left;height:1.67em;line-height:inherit;font-weight:inherit;color:inherit;cursor:inherit}.ck-toolbar{padding:.4em;border:1px solid #bfbfbf;white-space:normal;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.ck-toolbar_floating{white-space:nowrap}.ck-rounded-corners .ck-toolbar,.ck-toolbar.ck-rounded-corners{border-radius:2px}.ck-toolbar__separator{width:1px;height:2.28em;vertical-align:middle;background:#bfbfbf}.ck-toolbar__newline{height:.4em}.ck-toolbar>*{margin-right:.4em}.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck-toolbar{border:0}.ck-dropdown{font-size:inherit}.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-disabled .ck-button__label{opacity:.5}.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck-dropdown__panel{background:#fff;border:1px solid #bfbfbf;bottom:1px;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;overflow:hidden;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 #78bbf8;position:relative;z-index:1;outline: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 rgba(0,0,0,.1);background:#fff;border:1px solid #bfbfbf;padding:.4em .64em;min-width:21em}.ck-input-text.ck-rounded-corners,.ck-rounded-corners .ck-input-text{border-radius:2px}.ck-input-text:focus{outline:none;border:1px solid #48a3f5;box-shadow:0 0 3px 2px #78bbf8,inset 2px 2px 3px rgba(0,0,0,.1)}.ck-input-text[readonly]{border:1px solid #c6c6c6;background:#f2f2f2;color:#5c5c5c}.ck-editor__editable.ck-focused{outline:none;border:1px solid #48a3f5;box-shadow:inset 2px 2px 3px rgba(0,0,0,.1)}.ck-editor__editable_inline{overflow:auto;padding:0 .8em;border:1px solid transparent}.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:#acacac}.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:#999}.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):active{background:#b9b9b9;border-color:#8f8f8f;box-shadow:inset 0 2px 2px #a1a1a1}.ck-editor-toolbar .ck-button.ck-on.ck-disabled{background:#f7f7f7;border-color:#bfbfbf}.ck-editor-toolbar .ck-button.ck-dropdown__button{border-width:1px}.ck-editor-toolbar .ck-button.ck-dropdown__button:not(:hover):not(:focus):not(.ck-on){background:#fff}.ck-toolbar-container .ck-editor-toolbar{background:#f7f7f7}.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_n:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_ne:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_nw:after{border-bottom-color:#f7f7f7}.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_s:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_se:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_sw:after{border-top-color:#f7f7f7}.ck-balloon-panel{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);min-height:15px;background:#fff;border:1px solid #bfbfbf}.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 #bfbfbf}.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:#bfbfbf 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_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne: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_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:20px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:20px;bottom:-15px}.ck-editor .ck-sticky-panel.ck-sticky-panel_sticky{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}.ck-editor{position:relative}.ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:999;background:#f7f7f7;border-bottom-width:0}.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners,.ck-rounded-corners .ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:2px;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck-editor__top .ck-sticky-panel_sticky .ck-toolbar{border-bottom-width:1px}.ck-editor__top .ck-sticky-panel_sticky .ck-toolbar.ck-rounded-corners,.ck-rounded-corners .ck-editor__top .ck-sticky-panel_sticky .ck-toolbar{border-radius:2px;border-radius:0}.ck-editor__editable{border:1px solid #bfbfbf}.ck-editor__editable.ck-rounded-corners,.ck-rounded-corners .ck-editor__editable{border-radius:2px;border-top-left-radius:0;border-top-right-radius:0}',''])},function(e){e.exports=function(e){var t='undefined'!=typeof window&&window.location;if(!t)throw new Error('fixUrls requires window.location');if(!e||'string'!=typeof e)return e;var a=t.protocol+'//'+t.host,n=a+t.pathname.replace(/\/[^\/]*$/,'/'),o=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(o))return e;var i;return i=0===o.indexOf('//')?o:0===o.indexOf('/')?a+o:n+o.replace(/^\.\//,''),'url('+JSON.stringify(i)+')'});return o}},function(e,t,a){'use strict';var n=a(2),o=a(446),i=a(452),r=a(455),s=a(462);class l extends n.a{static get requires(){return[o.a,i.a,r.a,s.a]}}t.a=l},function(e,t,a){'use strict';var n=a(2),o=a(447),i=a(449),r=a(450),s=a(451),l=a(260);class d extends n.a{static get pluginName(){return'Clipboard'}init(){function e(e,o){const i=o.dataTransfer,r=t.data.toView(t.data.getSelectedContent(a.selection));o.preventDefault(),n.fire('clipboardOutput',{dataTransfer:i,content:r,method:e.name})}const t=this.editor,a=t.document,n=t.editing.view;this._htmlDataProcessor=new l.a,n.addObserver(o.a),this.listenTo(n,'clipboardInput',(e,a)=>{if(t.isReadOnly)return;const o=a.dataTransfer;let s='';o.getData('text/html')?s=Object(r.a)(o.getData('text/html')):o.getData('text/plain')&&(s=Object(i.a)(o.getData('text/plain'))),s=this._htmlDataProcessor.toView(s),this.fire('inputTransformation',{content:s}),n.scrollToTheSelection()},{priority:'low'}),this.listenTo(this,'inputTransformation',(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,n=e.toModel(t.content,'$clipboardHolder');if(0==n.childCount)return;a.enqueueChanges(()=>{e.insertContent(n,a.selection)})}},{priority:'low'}),this.listenTo(n,'copy',e,{priority:'low'}),this.listenTo(n,'cut',(a,n)=>{t.isReadOnly?n.preventDefault():e(a,n)},{priority:'low'}),this.listenTo(n,'clipboardOutput',(e,n)=>{n.content.isEmpty||(n.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(n.content)),n.dataTransfer.setData('text/plain',Object(s.a)(n.content))),'cut'==n.method&&a.enqueueChanges(()=>{t.data.deleteContent(a.selection,a.batch())})},{priority:'low'})}}t.a=d},function(e,t,a){'use strict';function n(e,t){const a=t.target.ownerDocument,n=t.clientX,o=t.clientY;let i;return a.caretRangeFromPoint&&a.caretRangeFromPoint(n,o)?i=a.caretRangeFromPoint(n,o):t.rangeParent&&(i=a.createRange(),i.setStart(t.rangeParent,t.rangeOffset),i.collapse(!0)),i?e.domConverter.domRangeToView(i):e.selection.getFirstRange()}var o=a(75),i=a(448);class r extends o.a{constructor(e){function t(t,a){a.preventDefault();const n=a.dropRange?[a.dropRange]:Array.from(e.selection.getRanges());e.fire('clipboardInput',{dataTransfer:a.dataTransfer,targetRanges:n})}super(e),this.domEventType=['paste','copy','cut','drop','dragover'],this.listenTo(e,'paste',t,{priority:'low'}),this.listenTo(e,'drop',t,{priority:'low'})}onDomEvent(e){const t={dataTransfer:new i.a(e.clipboardData?e.clipboardData:e.dataTransfer)};'drop'==e.type&&(t.dropRange=n(this.document,e)),this.fire(e.type,e,t)}}t.a=r},function(e,t){'use strict';function a(e){const t=e.files?Array.from(e.files):[],a=e.items?Array.from(e.items):[];return t.length?t:a.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}class n{constructor(e){this.files=a(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}t.a=n},function(e,t){'use strict';t.a=function(e){return e=e.replace(//g,'>').replace(/\n\n/g,'

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

')&&(e=`

${e}

`),e}},function(e,t){'use strict';t.a=function(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?' ':t)}},function(e,t){'use strict';function a(e){let t='';if(e.is('text')||e.is('textProxy'))t=e.data;else if(e.is('img')&&e.hasAttribute('alt'))t=e.getAttribute('alt');else{let o=null;for(const i of e.getChildren()){const e=a(i);o&&(o.is('containerElement')||i.is('containerElement'))&&(n.includes(o.name)||n.includes(i.name)?t+='\n':t+='\n\n'),t+=e,o=i}}return t}t.a=a;const n=['figcaption','li']},function(e,t,a){'use strict';var n=a(2),o=a(453),i=a(454);class r extends n.a{static get pluginName(){return'Enter'}init(){const e=this.editor,t=e.editing.view;t.addObserver(i.a),e.commands.add('enter',new o.a(e)),this.listenTo(t,'enter',(a,n)=>{e.execute('enter'),n.preventDefault(),t.scrollToTheSelection()},{priority:'low'})}}t.a=r},function(e,t,a){'use strict';function n(e,t,a,n){const i=a.isCollapsed,r=a.getFirstRange(),s=r.start.parent,l=r.end.parent;if(n.limits.has(s.name)||n.limits.has(l.name))return void(i||s!=l||e.deleteContent(a,t));if(i)o(t,a,r.start);else{const n=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(a,t,{leaveUnmerged:n}),n&&(s==l?o(t,a,a.focus):a.setCollapsedAt(l))}}function o(e,t,a){const n=a.parent,o=new n.constructor(n.name,n.getAttributes());a.isAtEnd?e.insert(r.a.createAfter(a.parent),o):a.isAtStart?e.insert(r.a.createBefore(a.parent),o):e.split(a),t.setCollapsedAt(a.parent.nextSibling)}var i=a(11),r=a(1);class s extends i.a{execute(){const e=this.editor.document,t=e.batch();e.enqueueChanges(()=>{n(this.editor.data,t,e.selection,e.schema),this.fire('afterExecute',{batch:t})})}}t.a=s},function(e,t,a){'use strict';var n=a(61),o=a(154),i=a(28);class r extends n.a{constructor(e){super(e),e.on('keydown',(t,a)=>{this.isEnabled&&a.keyCode==i.c.enter&&e.fire('enter',new o.a(e,a.domEvent))})}observe(){}}t.a=r},function(e,t,a){'use strict';var n=a(2),o=a(456),i=a(459);class r extends n.a{static get requires(){return[o.a,i.a]}static get pluginName(){return'Typing'}}t.a=r},function(e,t,a){'use strict';function n(e){return!!e.ctrlKey||w.includes(e.keyCode)}function o(e,t){return e instanceof p.a&&t instanceof p.a?e.data===t.data:e===t}function i(e){if(1==e.newChildren.length-e.oldChildren.length){const t=Object(g.a)(e.oldChildren,e.newChildren,o),a=Object(f.a)(t,e.newChildren);if(!(1e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));return t?t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e)=>e.is('containerElement')||e.is('rootElement')):void 0}function s(e){if(0==e.length)return!1;for(const t of e)if('children'===t.type&&!i(t))return!0;return!1}function l(e){return e.every((e)=>e.is('text'))}function d(e){let t=null,a=null;for(let n=0;n{this._handleKeydown(t,a)},{priority:'lowest'}),this.listenTo(t,'mutations',(e,t,a)=>{this._handleMutations(t,a)})}_handleKeydown(e,t){const a=this.editor.document,o=t.buffer;!t.isEnabled||n(e)||a.selection.isCollapsed||(o.lock(),a.enqueueChanges(()=>{this.editor.data.deleteContent(a.selection,o.batch)}),o.unlock())}_handleMutations(e,t){new y(this.editor).handle(e,t)}}t.a=k;class y{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(s(e))this._handleContainerChildrenMutations(e,t);else for(const a of e)this._handleTextMutation(a,t),this._handleTextNodeInsertion(a)}_handleContainerChildrenMutations(e,t){const a=r(e);if(!a)return;const n=this.editor.editing.view.domConverter,o=n.mapViewToDom(a);if(!o)return;const i=new b.a,s=this.editor.data.toModel(i.domToView(o)).getChild(0),c=this.editor.editing.mapper.toModelElement(a),u=Array.from(s.getChildren()),p=Array.from(c.getChildren());if(!l(u)||!l(p))return;const f=u.map((e)=>e.data).join('').replace(/\u00A0/g,' '),h=p.map((e)=>e.data).join('');if(h===f)return;const _=Object(g.a)(h,f),{firstChangeAt:k,insertions:y,deletions:w}=d(_);let v=null;t&&(v=this.editing.mapper.toModelRange(t.getFirstRange()));const x=f.substr(k,y),A=m.a.createFromParentsAndOffsets(c,k,c,k+w);this.editor.execute('input',{text:x,range:A,resultRange:v})}_handleTextMutation(e,t){if('text'!=e.type)return;const a=e.newText.replace(/\u00A0/g,' '),n=e.oldText.replace(/\u00A0/g,' '),o=Object(g.a)(n,a),{firstChangeAt:i,insertions:r,deletions:s}=d(o);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const c=new u.a(e.node,i),p=this.editing.mapper.toModelPosition(c),f=m.a.createFromPositionAndShift(p,s),h=a.substr(i,r);this.editor.execute('input',{text:h,range:f,resultRange:l})}_handleTextNodeInsertion(e){if('children'==e.type){const t=i(e),a=new u.a(e.node,t.index),n=this.editing.mapper.toModelPosition(a),o=t.values[0].data;this.editor.execute('input',{text:o.replace(/\u00A0/g,' '),range:new m.a(n)})}}}const w=[Object(h.a)('arrowUp'),Object(h.a)('arrowRight'),Object(h.a)('arrowDown'),Object(h.a)('arrowLeft'),9,16,17,18,20,27,33,34,35,36,229];for(let n=112;135>=n;n++)w.push(n)},function(e,t){'use strict';t.a=function(e,t){function a(){r&&(o.push(r),r=null)}function n(e){return r&&r.type==e}const o=[];let i=0,r;return e.forEach((e)=>{'equal'==e?(a(),i++):'insert'==e?(n('insert')?r.values.push(t[i]):(a(),r={type:'insert',index:i,values:[t[i]]}),i++):n('delete')?r.howMany++:(a(),r={type:'delete',index:i,howMany:1})}),a(),o}},function(e,t,a){'use strict';var n=a(11),o=a(263);class i extends n.a{constructor(e,t){super(e),this._buffer=new o.a(e.document,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.document,a=e.text||'',n=a.length,o=e.range||t.selection.getFirstRange(),i=e.resultRange;t.enqueueChanges(()=>{const e=o.isCollapsed;this._buffer.lock(),e||this._buffer.batch.remove(o),a&&this._buffer.batch.weakInsert(o.start,a),i?this.editor.data.model.selection.setRanges([i]):e&&this.editor.data.model.selection.setCollapsedAt(o.start.getShiftedBy(n)),this._buffer.unlock(),this._buffer.input(n)})}}t.a=i},function(e,t,a){'use strict';var n=a(2),o=a(460),i=a(461);class r extends n.a{static get pluginName(){return'Delete'}init(){const e=this.editor,t=e.editing.view;t.addObserver(i.a),e.commands.add('forwardDelete',new o.a(e,'forward')),e.commands.add('delete',new o.a(e,'backward')),this.listenTo(t,'delete',(a,n)=>{e.execute('forward'==n.direction?'forwardDelete':'delete',{unit:n.unit,sequence:n.sequence}),n.preventDefault(),t.scrollToTheSelection()})}}t.a=r},function(e,t,a){'use strict';var n=a(11),o=a(59),i=a(5),r=a(1),s=a(3),l=a(263),d=a(152);class c extends n.a{constructor(e,t){super(e),this.direction=t,this._buffer=new l.a(e.document,e.config.get('typing.undoStep'))}execute(e={}){const t=this.editor.document,a=this.editor.data;t.enqueueChanges(()=>{this._buffer.lock();const n=o.a.createFromSelection(t.selection),i=n.isCollapsed;if(n.isCollapsed&&a.modifySelection(n,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph();if(n.isCollapsed)return;let r=0;n.getFirstRange().getMinimalFlatRanges().forEach((e)=>{r+=Object(d.a)(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),a.deleteContent(n,this._buffer.batch,{doNotResetEntireContent:i}),this._buffer.input(r),t.selection.setRanges(n.getRanges(),n.isBackward),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(1{(a.keyCode==i.c.delete||a.keyCode==i.c.backspace)&&(t=0)}),e.on('keydown',(a,n)=>{const r={};if(n.keyCode==i.c.delete)r.direction='forward',r.unit='character';else if(n.keyCode==i.c.backspace)r.direction='backward',r.unit='codePoint';else return;r.unit=n.altKey?'word':r.unit,r.sequence=++t,e.fire('delete',new o.a(e,n.domEvent,r))})}observe(){}}t.a=r},function(e,t,a){'use strict';var n=a(2),o=a(463),i=a(21),r=a(468),s=a.n(r),l=a(469),d=a.n(l);class c extends n.a{static get requires(){return[o.a]}static get pluginName(){return'Undo'}init(){const e=this.editor,a=e.t;this._addButton('undo',a('Undo'),'CTRL+Z',s.a),this._addButton('redo',a('Redo'),'CTRL+Y',d.a),e.keystrokes.set('CTRL+Z','undo'),e.keystrokes.set('CTRL+Y','redo'),e.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(e,t,a,n){const o=this.editor,r=o.commands.get(e);o.ui.componentFactory.add(e,(s)=>{const l=new i.a(s);return l.set({label:t,icon:n,keystroke:a,tooltip:!0}),l.bind('isEnabled').to(r,'isEnabled'),this.listenTo(l,'execute',()=>o.execute(e)),l})}}t.a=c},function(e,t,a){'use strict';var n=a(2),o=a(464),i=a(465);class r extends n.a{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){this._undoCommand=new o.a(this.editor),this._redoCommand=new i.a(this.editor),this.editor.commands.add('undo',this._undoCommand),this.editor.commands.add('redo',this._redoCommand),this.listenTo(this.editor.document,'change',(e,t,a,n)=>{this._batchRegistry.has(n)||'transparent'==n.type||(this._redoCommand._createdBatches.has(n)?this._undoCommand.addBatch(n):!this._undoCommand._createdBatches.has(n)&&(this._undoCommand.addBatch(n),this._redoCommand.clearStack()),this._batchRegistry.add(n))},{priority:'highest'}),this.listenTo(this._undoCommand,'revert',(e,t,a)=>{this._redoCommand.addBatch(a)})}}t.a=r},function(e,t,a){'use strict';var n=a(264);class o extends n.a{execute(e=null){const t=e?this._stack.findIndex((t)=>t.batch==e):this._stack.length-1,a=this._stack.splice(t,1)[0];this.editor.document.enqueueChanges(()=>{const e=this._undo(a.batch),t=this.editor.document.history.getDeltas(a.batch.baseVersion);this._restoreSelection(a.selection.ranges,a.selection.isBackward,t),this.fire('revert',a.batch,e)}),this.refresh()}}t.a=o},function(e,t,a){'use strict';var n=a(264);class o extends n.a{execute(){const e=this._stack.pop();this.editor.document.enqueueChanges(()=>{const t=e.batch.deltas[e.batch.deltas.length-1],a=t.baseVersion+t.operations.length,n=this.editor.document.history.getDeltas(a);this._restoreSelection(e.selection.ranges,e.selection.isBackward,n),this._undo(e.batch)}),this.refresh()}}t.a=o},function(e,t,a){'use strict';var n=a(7),o=a(6);class i extends n.a{constructor(){super();const e=this.bindTemplate;this.set('content'),this.set('viewBox','0 0 20 20'),this.template=new o.a({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:e.to('viewBox')}}),this.on('change:content',(e,t,a)=>{for(const n=new DOMParser().parseFromString(a.trim(),'image/svg+xml').firstChild;0'ck-tooltip_'+e),t.if('text','ck-hidden',(e)=>!e.trim())]},children:[{tag:'span',attributes:{class:['ck-tooltip__text']},children:[{text:t.to('text')}]}]})}}t.a=i},function(e){e.exports=''},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(2),o=a(76),i=a(472);class r extends n.a{static get requires(){return[o.a]}static get pluginName(){return'CKFinderUploadAdapter'}init(){const e=this.editor.config.get('ckfinder.uploadUrl');e&&(this.editor.plugins.get(o.a).createAdapter=(t)=>new s(t,e,this.editor.t))}}t.a=r;class s{constructor(e,a,n){this.loader=e,this.url=a,this.t=n}upload(){return new Promise((e,t)=>{this._initRequest(),this._initListeners(e,t),this._sendRequest()})}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open('POST',this.url,!0),e.responseType='json'}_initListeners(e,a){const n=this.xhr,o=this.loader,i=this.t,t=i('Cannot upload file:')+` ${o.file.name}.`;n.addEventListener('error',()=>a(t)),n.addEventListener('abort',()=>a()),n.addEventListener('load',()=>{const o=n.response;return o&&o.uploaded?void e({default:o.url}):a(o&&o.error&&o.error.message?o.error.message:t)}),n.upload&&n.upload.addEventListener('progress',(e)=>{e.lengthComputable&&(o.uploadTotal=e.total,o.uploaded=e.loaded)})}_sendRequest(){const e=new FormData;e.append('upload',this.loader.file),e.append('ckCsrfToken',Object(i.a)()),this.xhr.send(e)}}},function(e,t,a){'use strict';var n=a(12),o=a(4);class i{constructor(){const e=new window.FileReader;this._reader=e,this.set('loaded',0),e.onprogress=(e)=>{this.loaded=e.loaded}}get error(){return this._reader.error}read(e){const t=this._reader;return this.total=e.size,new Promise((a,n)=>{t.onload=()=>{a(t.result)},t.onerror=()=>{n('error')},t.onabort=()=>{n('aborted')},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}t.a=i,Object(o.a)(i,n.a)},function(e,t){'use strict';function a(e){e=e.toLowerCase();const t=document.cookie.split(';');for(const a of t){const t=a.split('='),n=decodeURIComponent(t[0].trim().toLowerCase());if(n===e)return decodeURIComponent(t[1])}return null}function n(e,t){document.cookie=encodeURIComponent(e)+'='+encodeURIComponent(t)+';path=/'}function o(e){let t='';const a=new Uint8Array(e);window.crypto.getRandomValues(a);for(let n=0;ne.match(/^heading[1-6]$/)).forEach((e)=>{const t=e[7],a=new RegExp(`^(#{${t}})\\s$`);new n.a(this.editor,a,(t)=>{const{batch:a}=t;this.editor.execute(e,{batch:a})})})}_addBlockQuoteAutoformats(){this.editor.commands.get('blockQuote')&&new n.a(this.editor,/^>\s$/,'blockQuote')}}t.a=r},function(e,t,a){'use strict';var n=a(3),o=a(67);t.a=class{constructor(e,t,a){let i;if('function'==typeof a)i=a;else{i=(t)=>{const{batch:n}=t;e.execute(a,{batch:n})}}e.document.on('change',(a,r,s,l)=>{if('transparent'==l.type)return;if('insert'!=r)return;const d=s.range.getItems().next().value;if(!(d instanceof o.a))return;const c=d.textNode,m=c.data;if('paragraph'!==c.parent.name||!m)return;const u=t.exec(m);u&&e.document.enqueueChanges(()=>{const t=e.document.batch(),a=n.a.createFromParentsAndOffsets(c.parent,0,c.parent,u[0].length);t.remove(a),i({fixBatch:t,match:u})})})}}},function(e,t,a){'use strict';function n(e){return Array.from(e.getChildren()).reduce((e,t)=>e+t.data,'')}var o=a(151);t.a=class{constructor(e,t,a){let i,r,s,l;t instanceof RegExp?i=t:s=t,'string'==typeof a?r=a:l=a,s=s||((e)=>{let t;const a=[],n=[];for(;null!==(t=i.exec(e))&&!(t&&4>t.length);){let{index:e,1:o,2:i,3:r}=t;e+=t[0].length-(o+i+r).length;const s=[e,e+o.length],l=[e+o.length+i.length,e+o.length+i.length+r.length];a.push(s),a.push(l),n.push([e+o.length,e+o.length+i.length])}return{remove:a,format:n}}),l=l||((e,t)=>{for(const a of t)e.setAttribute(a,r,!0)}),e.document.on('change',(t,a,i,d)=>{if('transparent'==d.type)return;if('insert'!==a)return;const c=e.document.selection;if(!c.isCollapsed||!c.focus||!c.focus.parent)return;const m=c.focus.parent,u=n(m).slice(0,c.focus.offset),p=s(u),g=[];p.format.forEach((e)=>{void 0===e[0]||void 0===e[1]||g.push(o.a.createFromParentsAndOffsets(m,e[0],m,e[1]))});const f=[];p.remove.slice().reverse().forEach((e)=>{void 0===e[0]||void 0===e[1]||f.push(o.a.createFromParentsAndOffsets(m,e[0],m,e[1]))});g.length&&f.length&&e.document.enqueueChanges(()=>{const t=e.document.batch(),a=e.document.schema.getValidRanges(g,r);l(t,a);for(const e of f)t.remove(e)})})}}},function(e,t,a){'use strict';var n=a(2),o=a(477),i=a(21),r=a(478),s=a.n(r);class l extends n.a{static get requires(){return[o.a]}static get pluginName(){return'Bold'}init(){const e=this.editor,a=e.t,t=e.commands.get('bold'),n='CTRL+B';e.ui.componentFactory.add('bold',(o)=>{const r=new i.a(o);return r.set({label:a('Bold'),icon:s.a,keystroke:n,tooltip:!0}),r.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('bold')),r}),e.keystrokes.set(n,'bold')}}t.a=l},function(e,t,a){'use strict';var n=a(2),o=a(51),i=a(43),r=a(265);const s='bold';class l extends n.a{init(){const e=this.editor,t=e.data,a=e.editing;e.document.schema.allow({name:'$inline',attributes:s,inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:s,inside:'$clipboardHolder'}),Object(o.a)().for(t.modelToView,a.modelToView).fromAttribute(s).toElement('strong'),Object(i.a)().for(t.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{"font-weight":'bold'}).toAttribute(s,!0),e.commands.add(s,new r.a(e,s))}}t.a=l},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(2),o=a(480),i=a(21),r=a(481),s=a.n(r);class l extends n.a{static get requires(){return[o.a]}static get pluginName(){return'Italic'}init(){const e=this.editor,a=e.t,t=e.commands.get('italic'),n='CTRL+I';e.ui.componentFactory.add('italic',(o)=>{const r=new i.a(o);return r.set({label:a('Italic'),icon:s.a,keystroke:n,tooltip:!0}),r.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('italic')),r}),e.keystrokes.set(n,'italic')}}t.a=l},function(e,t,a){'use strict';var n=a(2),o=a(51),i=a(43),r=a(265);const s='italic';class l extends n.a{init(){const e=this.editor,t=e.data,a=e.editing;e.document.schema.allow({name:'$inline',attributes:s,inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:s,inside:'$clipboardHolder'}),Object(o.a)().for(t.modelToView,a.modelToView).fromAttribute(s).toElement('i'),Object(i.a)().for(t.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{"font-style":'italic'}).toAttribute(s,!0),e.commands.add(s,new r.a(e,s))}}t.a=l},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(2),o=a(483),i=a(21),r=a(485),s=a.n(r),l=a(486),d=a.n(l);class c extends n.a{static get requires(){return[o.a]}static get pluginName(){return'BlockQuote'}init(){const e=this.editor,a=e.t,t=e.commands.get('blockQuote');e.ui.componentFactory.add('blockQuote',(n)=>{const o=new i.a(n);return o.set({label:a('Block quote'),icon:s.a,tooltip:!0}),o.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(o,'execute',()=>e.execute('blockQuote')),o})}afterInit(){const e=this.editor,t=e.commands.get('blockQuote');this.listenTo(this.editor.editing.view,'enter',(e,a)=>{const n=this.editor.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&o.isEmpty&&t.value&&(this.editor.execute('blockQuote'),this.editor.editing.view.scrollToTheSelection(),a.preventDefault(),e.stop())})}}t.a=c},function(e,t,a){'use strict';var n=a(2),o=a(484),i=a(43),r=a(51);class s extends n.a{init(){const e=this.editor,t=e.document.schema;e.commands.add('blockQuote',new o.a(e)),t.registerItem('blockQuote'),t.allow({name:'blockQuote',inside:'$root'}),t.allow({name:'$block',inside:'blockQuote'}),Object(i.a)().for(e.data.viewToModel).fromElement('blockquote').toElement('blockQuote'),Object(r.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']})}}t.a=s},function(e,t,a){'use strict';function n(e){return'blockQuote'==e.parent.name?e.parent:null}function o(e){let t=0,a;const n=[];for(;t{if(this.value)this._removeQuote(o,r.filter(n));else{const e=r.filter((e)=>n(e)||i(a,e));this._applyQuote(o,e)}})}_getValue(){const e=Object(c.a)(this.editor.document.selection.getSelectedBlocks());return!!(e&&n(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.document.selection,t=this.editor.document.schema,a=Object(c.a)(e.getSelectedBlocks());return!!a&&i(t,a)}_removeQuote(e,t){o(t).reverse().forEach((t)=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const a=s.a.createBefore(t.start.parent);return void e.move(t,a)}t.end.isAtEnd||e.split(t.end);const a=s.a.createAfter(t.end.parent);e.move(t,a)})}_applyQuote(e,t){const a=[];o(t).reverse().forEach((t)=>{let o=n(t.start);o||(o=new l.a('blockQuote'),e.wrap(t,o)),a.push(o)}),a.reverse().reduce((t,a)=>t.nextSibling==a?(e.merge(s.a.createAfter(t)),t):a)}}t.a=m},function(e){e.exports=''},function(e,t,a){var n=a(487);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'blockquote{border-left:5px solid #ccc;padding-left:20px;margin-left:0;font-style:italic;overflow:hidden}',''])},function(e,t,a){'use strict';var n=a(2),o=a(489),i=a(266),r=a(274);class s extends n.a{static get requires(){return[o.a,i.a,r.a]}static get pluginName(){return'EasyImage'}}t.a=s},function(e,t,a){'use strict';var n=a(2),o=a(76),i=a(490);class r extends n.a{static get requires(){return[o.a]}init(){const e=this.editor,t=e.config;t.define('cloudServices.uploadUrl','https://files.cke-cs.com/upload/');const a=t.get('cloudServices.token'),n=t.get('cloudServices.uploadUrl');a&&n&&(this._uploadGateway=new r._UploadGateway(a,n),e.plugins.get(o.a).createAdapter=(e)=>new s(this._uploadGateway,e))}}t.a=r;class s{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.fileUploader=this.uploadGateway.upload(this.loader.file),this.fileUploader.on('progress',(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()}abort(){this.fileUploader.abort()}}r._UploadGateway=i.a},function(e,t,a){'use strict';var n=a(491);t.a=class{constructor(e,t){if(!e)throw new Error('Token must be provided');if(!t)throw new Error('Api address must be provided');this._token=e,this._apiAddress=t}upload(e){return new n.a(e,this._token,this._apiAddress)}}},function(e,t,a){'use strict';function n(e,t=512){try{const a=e.match(s)[1],n=atob(e.replace(s,'')),o=[];for(let e=0;ee(a)),this}onError(e){return this.once('error',(t,a)=>e(a)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open('POST',this._apiAddress),e.setRequestHeader('Authorization',this._token),e.responseType='json',this.xhr=e}_attachXHRListeners(){function e(e){return()=>t.fire('error',e)}const t=this,a=this.xhr;a.addEventListener('error',e('Network Error')),a.addEventListener('abort',e('Abort')),a.upload&&a.upload.addEventListener('progress',(e)=>{e.lengthComputable&&this.fire('progress',{total:e.total,uploaded:e.loaded})}),a.addEventListener('load',()=>{const e=a.status,t=a.response;if(200>e||299{t.addEventListener('load',()=>{const e=t.status,o=t.response;return 200>e||299n('Network Error')),t.addEventListener('abort',()=>n('Abort')),t.send(e)})}}Object(i.a)(l,r.c),t.a=l},function(e,t,a){'use strict';function n(){return(e,t,a,n)=>{const o=e.name.split(':'),i=o[0]+':'+o[1],r=t.item;if(a.consume(r,i)){const e=n.mapper.toViewElement(r),a=e.getChild(0),i=o[0];'removeAttribute'==i?a.removeAttribute(t.attributeKey):a.setAttribute(t.attributeKey,t.attributeNewValue)}}}function o(e,t,a){t=t.slice();for(const n={name:e.name,attributes:e.attributes,inside:t};t.length&&!a.check(n);){const e=t.pop(),n='string'==typeof e?e:e.name;if(a.limits.has(n))return null}return t.length?t:null}t.e=function(){return(e,t,a,n)=>{if(a.test(t.input,{name:!0,class:'image'})&&n.schema.check({name:'image',inside:t.context,attributes:'src'})){const e=Array.from(t.input.getChildren()).find((e)=>e.is('img'));if(e&&e.hasAttribute('src')&&a.test(e,{name:!0})){const o=n.convertItem(e,a,t);t.context.push(o);const r=n.convertChildren(t.input,a,t);t.context.pop(),s.a.insert(i.a.createAt(o),r),t.output=o}}}},t.b=function(e,t,a=n){for(const n of e)n.on(`addAttribute:${t}:image`,a()),n.on(`changeAttribute:${t}:image`,a()),n.on(`removeAttribute:${t}:image`,a())},t.d=function(){return(e,t,a,n)=>{const o=e.name.split(':'),i=o[0]+':'+o[1],r=t.item;if(a.consume(r,i)){const e=n.mapper.toViewElement(r),a=e.getChild(0),i=o[0];if('removeAttribute'==i){const e=t.attributeOldValue;e.data&&(a.removeAttribute('srcset'),a.removeAttribute('sizes'),e.width&&a.removeAttribute('width'))}else{const e=t.attributeNewValue;e.data&&(a.setAttribute('srcset',e.data),a.setAttribute('sizes','100vw'),e.width&&a.setAttribute('width',e.width))}}}},t.a=function(e,t,a,n){const i=t.input;if(a.test(i,{name:!0,attribute:['src']})){const e=o({name:'image',attributes:['src']},t.context,n.schema);if(e){const o=Object.assign({},t);o.context=e,t.output=n.convertItem(i,a,o),l.add(t.output)}}},t.c=function(e,t){if(t.output&&t.output.is('element')){const e=[];for(let a=t.output.childCount-1;0<=a;a--){const n=t.output.getChild(a);if(l.has(n)){const o=t.output.childCount-a-1;let i=null;0t.priority)return!0;return!(e.priorityi(t.class)}function i(e){return Array.isArray(e)?e.sort().join(','):e}var r=a(8),s=a(4);class l{constructor(){this._stack=[]}add(e){const t=this._stack,a=t[0];this._insertDescriptor(e);const o=t[0];a===o||n(a,o)||this.fire('change:top',{oldDescriptor:a,newDescriptor:o})}remove(e){const t=this._stack,a=t[0];this._removeDescriptor(e);const o=t[0];a===o||n(a,o)||this.fire('change:top',{oldDescriptor:a,newDescriptor:o})}_insertDescriptor(e){const t=this._stack,a=t.findIndex((t)=>t.id===e.id);if(!n(e,t[a])){-1t.id===e.id);-1{t&&t.hasClass(g.a)&&t.removeClass(g.a);const i=o.viewSelection,r=i.getSelectedElement();r&&Object(g.c)(r)&&(i.setFake(!0,{label:Object(g.b)(r)}),r.addClass(g.a),t=r)},{priority:'low'}),e.addObserver(l.a),this.listenTo(e,'mousedown',(...e)=>this._onMousedown(...e)),this.listenTo(e,'keydown',(...e)=>this._onKeydown(...e),{priority:'high'})}_onMousedown(e,t){const a=this.editor,n=a.editing.view;let o=t.target;if(r(o))return;if(!Object(g.c)(o)&&(o=o.findAncestor(g.c),!o))return;t.preventDefault(),n.isFocused||n.focus();const i=a.editing.mapper.toModelElement(o);a.document.enqueueChanges(()=>{this._setSelectionOverElement(i)})}_onKeydown(e,t){const a=t.keyCode,r=a==f.c.delete||a==f.c.arrowdown||a==f.c.arrowright;let s=!1;o(a)?s=this._handleDelete(r):n(a)?s=this._handleArrowKeys(r):i(t)&&(s=this._selectAllNestedEditableContent()),s&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.document,a=t.selection;if(!a.isCollapsed)return;const n=this._getObjectElementNextToSelection(e);if(n)return t.enqueueChanges(()=>{const e=t.batch();for(let t=a.anchor.parent;t.isEmpty;){const a=t;t=a.parent,e.remove(a)}this._setSelectionOverElement(n)}),!0}_handleArrowKeys(e){const t=this.editor.document,a=t.schema,n=t.selection,o=n.getSelectedElement();if(o&&a.objects.has(o.name)){const a=e?n.getLastPosition():n.getFirstPosition(),o=t.getNearestSelectionRange(a,e?'forward':'backward');return o&&t.enqueueChanges(()=>{n.setRanges([o])}),!0}if(!n.isCollapsed)return;const i=this._getObjectElementNextToSelection(e);if(i instanceof m.a&&t.schema.objects.has(i.name))return t.enqueueChanges(()=>{this._setSelectionOverElement(i)}),!0}_selectAllNestedEditableContent(){const e=this.editor.document,t=e.selection,a=e.schema,n=a.getLimitElement(t);return t.getFirstRange().root!=n&&(e.enqueueChanges(()=>{t.setIn(n)}),!0)}_setSelectionOverElement(e){this.editor.document.selection.setRanges([d.a.createOn(e)])}_getObjectElementNextToSelection(e){const t=this.editor.document,a=t.schema,n=t.selection,o=this.editor.data,i=c.a.createFromSelection(n);o.modifySelection(i,{direction:e?'forward':'backward'});const r=e?i.focus.nodeBefore:i.focus.nodeAfter;return r instanceof m.a&&a.objects.has(r.name)?r:null}}t.a=k},function(e,t,a){'use strict';var n=a(75);class o extends n.a{constructor(e){super(e),this.domEventType='mousedown'}onDomEvent(e){this.fire(e.type,e)}}t.a=o},function(e,t,a){var n=a(497);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.ck-widget{margin:.8em 0;padding:0}.ck-widget.ck-widget_selected,.ck-widget.ck-widget_selected:hover{outline:3px solid #48a3f5}.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{border:1px solid transparent}.ck-widget .ck-editable.ck-editable_focused,.ck-widget .ck-editable:focus{outline:none;border:1px solid #48a3f5;box-shadow:inset 2px 2px 3px rgba(0,0,0,.1);background-color:#fff}',''])},function(e,t,a){'use strict';var n=a(2),o=a(21),i=a(499),r=a(268),s=a(501),l=a(157),d=a(505),c=a.n(d),m=a(273),u=a(36),p=a(506),g=a.n(p);class f extends n.a{static get requires(){return[i.a,l.a]}static get pluginName(){return'ImageTextAlternative'}init(){this._createButton(),this._createForm()}_createButton(){const e=this.editor,a=e.commands.get('imageTextAlternative'),n=e.t;e.ui.componentFactory.add('imageTextAlternative',(e)=>{const t=new o.a(e);return t.set({label:n('Change image text alternative'),icon:c.a,tooltip:!0}),t.bind('isEnabled').to(a,'isEnabled'),this.listenTo(t,'execute',()=>this._showForm()),t})}_createForm(){const e=this.editor,t=e.editing.view;this._balloon=this.editor.plugins.get('ContextualBalloon'),this._form=new s.a(e.locale),this.listenTo(this._form,'submit',()=>{e.execute('imageTextAlternative',{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,'cancel',()=>{this._hideForm(!0)}),this._form.keystrokes.set('Esc',(e,t)=>{this._hideForm(!0),t()}),this.listenTo(t,'render',()=>{Object(u.b)(t.selection)?this._isVisible&&Object(m.b)(e):this._hideForm(!0)},{priority:'low'}),Object(r.a)({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._form.element],callback:()=>this._hideForm()})}_showForm(){if(!this._isVisible){const e=this.editor,t=e.commands.get('imageTextAlternative'),a=this._form.labeledInput;this._balloon.hasView(this._form)||this._balloon.add({view:this._form,position:Object(m.a)(e)}),a.value=a.inputView.element.value=t.value||'',this._form.labeledInput.select()}}_hideForm(e){this._isVisible&&(this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView==this._form}}t.a=f},function(e,t,a){'use strict';var n=a(500),o=a(2);class i extends o.a{init(){this.editor.commands.add('imageTextAlternative',new n.a(this.editor))}}t.a=i},function(e,t,a){'use strict';var n=a(11),o=a(36);class i extends n.a{refresh(){const e=this.editor.document.selection.getSelectedElement();this.isEnabled=Object(o.a)(e),this.value=Object(o.a)(e)&&e.hasAttribute('alt')&&e.getAttribute('alt')}execute(e){const t=this.editor.document,a=t.selection.getSelectedElement();t.enqueueChanges(()=>{const n=e.batch||t.batch();n.setAttribute(a,'alt',e.newValue)})}}t.a=i},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(112),r=a(21),s=a(269),l=a(270),d=a(271),c=a(50),m=a(62),u=a(114);class p extends n.a{constructor(e){super(e);const a=this.locale.t;this.focusTracker=new m.a,this.keystrokes=new c.a,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(a('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(a('Cancel'),'cancel'),this._focusables=new i.a,this._focusCycler=new u.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),o.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new o.a({tag:'form',attributes:{class:['cke-text-alternative-form'],tabindex:'-1'},children:[this.labeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]}),Object(d.a)({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}init(){super.init(),this.keystrokes.listenTo(this.element)}_createButton(e,t){const a=new r.a(this.locale);return a.label=e,a.withText=!0,t&&a.delegate('execute').to(this,t),a}_createLabeledInputView(){const e=this.locale.t,t=new s.a(this.locale,l.a);return t.label=e('Text alternative'),t}}t.a=p},function(e,t,a){'use strict';var n=a(7),o=a(6);class i extends n.a{constructor(e){super(e),this.set('text'),this.set('for');const t=this.bindTemplate;this.template=new o.a({tag:'label',attributes:{class:['ck-label'],for:t.to('for')},children:[{text:t.to('text')}]})}}t.a=i},function(e,t,a){'use strict';function n(e,t,a){const{left:n,top:o,name:i}=e(t,a);return[i,a.clone().moveTo(n,o)]}function o(e,t,a,o,i){let r=0,s=0,l,d;const c=a.getArea();return e.some((e)=>{function m(){s=f,r=g,l=p,d=u}const[u,p]=n(e,t,a);let g,f;if(o)if(i){const e=o.getIntersection(i);g=e?e.getIntersectionArea(p):0}else g=o.getIntersectionArea(p);return i&&(f=i.getIntersectionArea(p)),i&&!o?f>s&&m():!i&&o?g>r&&m():f>s&&g>=r?m():f>=s&&g>r&&m(),g===c}),l?[d,l]:null}function i({left:e,top:t}){const{scrollX:a,scrollY:n}=r.a.window;return{left:e+a,top:t+n}}t.a=function({element:e,target:t,positions:a,limiter:m,fitInViewport:u}){Object(c.a)(t)&&(t=t()),Object(c.a)(m)&&(m=m());const p=Object(l.a)(e.parentElement),g=new s.a(e),f=new s.a(t);let h,b;if(!m&&!u)[b,h]=n(a[0],f,g);else{const e=m&&new s.a(m).getVisible(),t=u&&new s.a(r.a.window);[b,h]=o(a,f,g,e,t)||n(a[0],f,g)}let{left:_,top:k}=i(h);if(p){const e=i(new s.a(p)),t=Object(d.a)(p);_-=e.left,k-=e.top,_+=p.scrollLeft,k+=p.scrollTop,_-=t.left,k-=t.top}return{left:_,top:k,name:b}};var r=a(60),s=a(256),l=a(504),d=a(258),c=a(65)},function(e,t,a){'use strict';t.a=function(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=n.a.window.getComputedStyle(e).position)return e;e=e.parentElement}return null};var n=a(60)},function(e){e.exports=''},function(e,t,a){var n=a(507);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.cke-text-alternative-form{padding:1.2em;overflow:hidden}.cke-text-alternative-form:focus{outline:none}.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(e,t,a){var n=a(509);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.ck-editor__editable .image{text-align:center;clear:both}.ck-editor__editable .image.image-style-align-center,.ck-editor__editable .image.image-style-align-left,.ck-editor__editable .image.image-style-align-right,.ck-editor__editable .image.image-style-side{max-width:50%}.ck-editor__editable .image.image-style-side{float:right;margin-left:2em}.ck-editor__editable .image.image-style-align-left{float:left;margin-right:2em}.ck-editor__editable .image.image-style-align-center{margin-left:auto;margin-right:auto}.ck-editor__editable .image.image-style-align-right{float:right;margin-left:2em}.ck-editor__editable .image>img{display:block;margin:0 auto;max-width:100%}',''])},function(e,t,a){'use strict';var n=a(2),o=a(275),i=a(513),r=a(514),s=a.n(r),l=a(276);class d extends n.a{static get requires(){return[o.a]}init(){const e=this.editor,a=e.t;e.ui.componentFactory.add('insertImage',(t)=>{const n=new i.a(t),o=e.commands.get('imageUpload');return n.set({label:a('Insert image'),icon:s.a,tooltip:!0,acceptedType:'image/*',allowMultipleFiles:!0}),n.bind('isEnabled').to(o),n.on('done',(t,a)=>{for(const n of Array.from(a)){const t=Object(l.a)(e.document.selection);Object(l.b)(n)&&e.execute('imageUpload',{file:n,insertAt:t})}}),n})}}t.a=d},function(e,t,a){'use strict';var n=a(5),o=a(3),i=a(59),r=a(76),s=a(11);class l extends s.a{execute(e){const t=this.editor,a=t.document,s=e.batch||a.batch(),l=e.file,d=a.selection,c=t.plugins.get(r.a);a.enqueueChanges(()=>{const r=c.createLoader(l);if(!r)return;const m=new n.a('image',{uploadId:r.id});let u;u=e.insertAt?new i.a([new o.a(e.insertAt)]):a.selection,t.data.insertContent(m,u,s),m.parent&&d.setRanges([o.a.createOn(m)])})}}t.a=l},function(e,t,a){'use strict';var n=a(2);class o extends n.a{static get pluginName(){return'Notification'}init(){this.on('show:warning',(e,t)=>{window.alert(t.message)},{priority:'lowest'})}showSuccess(e,t={}){this._showNotification({message:e,type:'success',namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:'info',namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:'warning',namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:'');this.fire(t,{message:e.message,type:e.type,title:e.title||''})}}t.a=o},function(e,t,a){'use strict';var n=a(21),o=a(7),i=a(6);class r extends n.a{constructor(e){super(e),this.fileInputView=new s(e),this.fileInputView.bind('acceptedType').to(this,'acceptedType'),this.set('allowMultipleFiles',!1),this.fileInputView.bind('allowMultipleFiles').to(this,'allowMultipleFiles'),this.fileInputView.delegate('done').to(this),this.on('execute',()=>{this.fileInputView.open()}),document.body.appendChild(this.fileInputView.element)}destroy(){document.body.removeChild(this.fileInputView.element),super.destroy()}}t.a=r;class s extends o.a{constructor(e){super(e),this.set('acceptedType'),this.set('allowMultipleFiles',!1);const t=this.bindTemplate;this.template=new i.a({tag:'input',attributes:{class:['ck-hidden'],type:'file',tabindex:'-1',accept:t.to('acceptedType'),multiple:t.to('allowMultipleFiles')},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire('done',this.element.files),this.element.value=''})}})}open(){this.element.click()}}},function(e){e.exports=''},function(e,t,a){'use strict';function n(){const e=new c.a('div',{class:'ck-progress-bar'});return e.setCustomProperty(f,!0),e}function o(e){for(const t of e.getChildren())if(t.getCustomProperty(f))return t}var i=a(2),r=a(71),s=a(76),l=a(516),d=a.n(l),c=a(94),m=a(275),u=a(517),p=a.n(u);class g extends i.a{static get requires(){return[m.a]}constructor(e){super(e),this.placeholder='data:image/svg+xml;utf8,'+encodeURIComponent(d.a)}init(){const e=this.editor;e.editing.modelToView.on('addAttribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e)),e.editing.modelToView.on('changeAttribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,a){const i=this.editor,l=t.item,d=l.getAttribute('uploadId');if(a.consume(t.item,Object(r.b)(e.name))&&d){const e=i.plugins.get(s.a),a=this.placeholder,r=t.attributeNewValue,c=i.editing.mapper.toViewElement(l);if('reading'==r){c.addClass('ck-appear','ck-infinite-progress','ck-image-upload-placeholder');const e=c.getChild(0);return void e.setAttribute('src',a)}if('uploading'==r){const t=e.loaders.get(d);if(t){const e=n();c.removeClass('ck-infinite-progress','ck-image-upload-placeholder'),c.appendChildren(e),t.on('change:uploadedPercent',(t,a,n)=>{e.setStyle('width',n+'%'),i.editing.view.render()})}return}const m=o(c);m?m.remove():c.removeClass('ck-infinite-progress'),c.removeClass('ck-appear','ck-image-upload-placeholder')}}}t.a=g;const f=Symbol('progress-bar')},function(e){e.exports='Uploading image\u2026\n'},function(e,t,a){var n=a(518);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'figure.image{position:relative;overflow:hidden}figure.image.ck-appear{animation:fadeIn .7s}figure.image.ck-infinite-progress:before{content:"";width:30px;height:2px;position:absolute;top:0;right:0;background:rgba(0,0,0,.1);animation-name:readingProgressAnimation;animation-duration:1.5s;animation-iteration-count:infinite;transition-timing-function:linear}figure.image.ck-image-upload-placeholder>img{width:100%}figure.image .ck-progress-bar{height:2px;width:0;position:absolute;top:0;left:0;background:#6ab5f9;transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes readingProgressAnimation{0%{width:30px;right:0}50%{width:45px}to{right:100%}}',''])},function(e,t,a){'use strict';function n(e,t){return Array.prototype.concat(...e.map((e)=>[e,t]))}var o=a(115),i=a(521),r=a(2),s=a(523),l=a(524),d=a(113),c=a(6),m=a(530),u=a.n(m);class p extends r.a{static get requires(){return[o.a,i.a]}static get pluginName(){return'Heading'}init(){const e=this.editor,a=new d.a,o=this._getLocalizedOptions(),i=[],r=e.t,t=r('Choose heading'),m=r('Heading');for(const t of o){const n=e.commands.get(t.modelElement),o=new s.a({commandName:t.modelElement,label:t.title,class:t.class});o.bind('isActive').to(n,'value'),a.add(o),i.push(n)}const u=new s.a({withText:!0,items:a,tooltip:m});u.bind('isEnabled').to(...n(i,'isEnabled'),(...e)=>e.some((e)=>e)),u.bind('label').to(...n(i,'value'),(...e)=>{const a=e.findIndex((e)=>e);return o[a]?o[a].title:t}),e.ui.componentFactory.add('headings',(t)=>{const a=Object(l.a)(u,t);return c.a.extend(a.template,{attributes:{class:['ck-heading-dropdown']}}),this.listenTo(a,'execute',(t)=>{e.execute(t.source.commandName),e.editing.view.focus()}),a})}_getLocalizedOptions(){const e=this.editor,a=e.t,t={Paragraph:a('Paragraph'),"Heading 1":a('Heading 1'),"Heading 2":a('Heading 2'),"Heading 3":a('Heading 3')};return e.config.get('heading.options').map((e)=>{const a=t[e.title];return a&&a!=e.title&&(e=Object.assign({},e,{title:a})),e})}}t.a=p},function(e,t,a){'use strict';function n(e,t){return t.check({name:'paragraph',inside:i.a.createBefore(e)})}var o=a(11),i=a(1),r=a(63);class s extends o.a{refresh(){const e=this.editor.document,t=Object(r.a)(e.selection.getSelectedBlocks());this.value=!!t&&t.is('paragraph'),this.isEnabled=!!t&&n(t,e.schema)}execute(e={}){const t=this.editor.document;t.enqueueChanges(()=>{const a=e.batch||t.batch(),o=(e.selection||t.selection).getSelectedBlocks();for(const e of o)!e.is('paragraph')&&n(e,t.schema)&&a.rename(e,'paragraph')})}}t.a=s},function(e,t,a){'use strict';var n=a(2),o=a(51),i=a(43),r=a(115),s=a(522);const l='paragraph';class d extends n.a{constructor(e){super(e),e.config.define('heading',{options:[{modelElement:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'},{modelElement:'heading1',viewElement:'h2',title:'Heading 1',class:'ck-heading_heading1'},{modelElement:'heading2',viewElement:'h3',title:'Heading 2',class:'ck-heading_heading2'},{modelElement:'heading3',viewElement:'h4',title:'Heading 3',class:'ck-heading_heading3'}]})}static get requires(){return[r.a]}init(){const e=this.editor,t=e.data,a=e.editing,n=e.config.get('heading.options');for(const r of n)r.modelElement!==l&&(e.document.schema.registerItem(r.modelElement,'$block'),Object(o.a)().for(t.modelToView,a.modelToView).fromElement(r.modelElement).toElement(r.viewElement),Object(i.a)().for(t.viewToModel).fromElement(r.viewElement).toElement(r.modelElement),e.commands.add(r.modelElement,new s.a(e,r.modelElement)))}afterInit(){const e=this.editor,t=e.commands.get('enter'),a=e.config.get('heading.options');t&&this.listenTo(t,'afterExecute',(t,n)=>{const o=e.document.selection.getFirstPosition().parent,i=n.batch,r=a.some((e)=>o.is(e.modelElement));r&&!o.is(l)&&0===o.childCount&&i.rename(o,l)})}}t.a=d},function(e,t,a){'use strict';function n(e,t,a){return a.check({name:t,inside:i.a.createBefore(e)})}var o=a(11),i=a(1),r=a(63);class s extends o.a{constructor(e,t){super(e),this.modelElement=t}refresh(){const e=Object(r.a)(this.editor.document.selection.getSelectedBlocks());this.value=!!e&&e.is(this.modelElement),this.isEnabled=!!e&&n(e,this.modelElement,this.editor.document.schema)}execute(e={}){const t=this.editor,a=t.document;a.enqueueChanges(()=>{const t=e.batch||a.batch(),o=Array.from(a.selection.getSelectedBlocks()).filter((e)=>n(e,this.modelElement,a.schema));for(const e of o)e.is(this.modelElement)||t.rename(e,this.modelElement)})}}t.a=s},function(e,t,a){'use strict';var n=a(45),o=a(4),i=a(12);class r{constructor(e,t){t&&Object(n.a)(this,t),e&&this.set(e)}}t.a=r,Object(o.a)(r,i.a)},function(e,t,a){'use strict';function n(e){e.listenTo(document,'click',(t,{target:a})=>{e.element==a||e.element.contains(a)||(e.isOpen=!1)})}t.a=function(e,t){const a=Object(r.a)(e,t),s=a.listView=new o.a(t);return s.items.bindTo(e.items).using((e)=>{const a=new i.a(t);return a.bind(...Object.keys(e)).to(e),a}),s.items.delegate('execute').to(a),a.panelView.children.add(s),a.on('change:isOpen',(e,t,o)=>{o?n(a):a.stopListening(document)}),a.on('execute',()=>{a.isOpen=!1}),a.keystrokes.set('arrowdown',(e,t)=>{a.isOpen&&(s.focus(),t())}),a.keystrokes.set('arrowup',(e,t)=>{a.isOpen&&(s.focusLast(),t())}),a};var o=a(525),i=a(526),r=a(527)},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(62),r=a(114),s=a(50);class l extends n.a{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new i.a,this.keystrokes=new s.a,this._focusCycler=new r.a({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'arrowup',focusNext:'arrowdown'}}),this.template=new o.a({tag:'ul',attributes:{class:['ck-reset','ck-list']},children:this.items}),this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)})}init(){this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}t.a=l},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(50);class r extends n.a{constructor(){super(),this.set('tabindex',-1),this.keystrokes=new i.a;const e=this.bindTemplate;this.template=new o.a({tag:'li',attributes:{class:['ck-list__item',e.to('class'),e.if('isActive','ck-list__item_active')],style:e.to('style'),tabindex:e.to('tabindex')},children:[{text:e.to('label')}],on:{click:e.to('execute')}})}init(){const e=(e,t)=>{this.fire('execute'),t()};this.keystrokes.listenTo(this.element),this.keystrokes.set('Enter',e),this.keystrokes.set('Space',e)}focus(){this.element.focus()}}t.a=r},function(e,t,a){'use strict';t.a=function(e,t){const a=new n.a(t);a.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(e);const r=new i.a(t);return new o.a(t,a,r)};var n=a(21),o=a(528),i=a(529)},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(62),r=a(50);class s extends n.a{constructor(e,t,a){super(e),o.a.extend(t.template,{attributes:{class:['ck-dropdown__button']}}),this.buttonView=t,this.panelView=a,this.set('isOpen',!1),this.focusTracker=new i.a,this.keystrokes=new r.a,this.template=new o.a({tag:'div',attributes:{class:['ck-dropdown']},children:[t,a]}),this.listenTo(t,'execute',()=>{this.isOpen=!this.isOpen}),a.bind('isVisible').to(this,'isOpen')}init(){this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set('arrowdown',(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set('arrowright',(e,t)=>{this.isOpen&&t()}),this.keystrokes.set('arrowleft',e),this.keystrokes.set('esc',e),super.init()}focus(){this.buttonView.focus()}}t.a=s},function(e,t,a){'use strict';var n=a(7),o=a(6);class i extends n.a{constructor(e){super(e);const t=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.template=new o.a({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',t.if('isVisible','ck-dropdown__panel-visible')]},children:this.children,on:{selectstart:t.to((e)=>e.preventDefault())}})}}t.a=i},function(e,t,a){var n=a(531);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.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(e,t,a){'use strict';var n=a(2),o=a(533),i=a(538),r=a.n(i);class s extends n.a{static get requires(){return[o.a]}static get pluginName(){return'ImageCaption'}}t.a=s},function(e,t,a){'use strict';function n(e,t,a,n){if('insert'===t){const e=new l.a({boundaries:a.range,ignoreElementEnd:!0});for(const t of e){const e=t.item;'elementStart'==t.type&&Object(h.a)(e)&&!Object(b.b)(e)&&n.document.enqueueChanges(()=>{Object(b.b)(e)||n.insert(p.a.createAt(e,'end'),new d.a('caption'))})}}}function o(e,t=!0){return(a,n,o,r)=>{const s=n.item;if((s.childCount||t)&&Object(h.a)(s.parent)){if(!o.consume(n.item,'insert'))return;const t=r.mapper.toViewElement(n.range.start.parent),a=e instanceof m.a?e.clone(!0):e();s.childCount||a.addClass('ck-hidden'),i(a,n.item,t,r.mapper)}}}function i(e,t,a,n){const o=g.a.createAt(a,'end');u.a.insert(o,e),n.bindElements(t,e)}function r(e){const t=e.getAncestors({includeSelf:!0}),a=t.find((e)=>'caption'==e.name);return a&&a.parent&&'image'==a.parent.name?a:null}var s=a(2),l=a(54),d=a(5),c=a(47),m=a(27),u=a(93),p=a(1),g=a(22),f=a(43),h=a(36),b=a(534);class _ extends s.a{init(){const e=this.editor,a=e.document,i=e.editing.view,r=a.schema,s=e.data,l=e.editing,d=e.t;this._createCaption=Object(b.a)(i,d('Enter image caption')),r.registerItem('caption','$block'),r.allow({name:'$inline',inside:'caption'}),r.allow({name:'caption',inside:'image'}),r.limits.add('caption'),a.on('change',n),Object(f.a)().for(s.viewToModel).from(b.c).toElement('caption'),s.modelToView.on('insert:caption',o(new c.a('figcaption'),!1)),l.modelToView.on('insert:caption',o(this._createCaption)),l.modelToView.on('insert',(e,t)=>this._fixCaptionVisibility(t.item),{priority:'high'}),l.modelToView.on('remove',(e,t)=>this._fixCaptionVisibility(t.sourcePosition.parent),{priority:'high'}),this.listenTo(i,'render',()=>this._updateCaptionVisibility(),{priority:'high'})}_updateCaptionVisibility(){const e=this.editor.editing.mapper;let t;this._lastSelectedCaption&&!this._lastSelectedCaption.childCount&&this._lastSelectedCaption.addClass('ck-hidden');const a=this.editor.document.selection,n=a.getSelectedElement();if(n&&n.is('image')){const a=Object(b.b)(n);t=e.toViewElement(a)}const o=a.getFirstPosition(),i=r(o.parent);i&&(t=e.toViewElement(i)),t&&(t.removeClass('ck-hidden'),this._lastSelectedCaption=t)}_fixCaptionVisibility(e){const t=r(e),a=this.editor.editing.mapper;if(t){const e=a.toViewElement(t);e&&(t.childCount?e.removeClass('ck-hidden'):e.addClass('ck-hidden'))}}}t.a=_},function(e,t,a){'use strict';t.a=function(e,t){return()=>{const a=new o.a('figcaption');return a.document=e,a.setCustomProperty(s,!0),Object(i.a)(a,t),Object(r.e)(a)}},t.b=function(e){for(const t of e.getChildren())if(t instanceof n.a&&'caption'==t.name)return t;return null},t.c=function(e){const t=e.parent;return'figcaption'==e.name&&t&&'figure'==t.name&&t.hasClass('image')?{name:!0}:null};var n=a(5),o=a(91),i=a(535),r=a(156);const s=Symbol('imageCaption')},function(e,t,a){'use strict';function n(e){const t=e.document;e.removeClass('ck-placeholder'),e.removeAttribute('data-placeholder'),u.has(t)&&u.get(t).delete(e)}function o(e){const t=u.get(e);for(const[a,n]of t)i(a,n)}function i(e,t){const a=e.document;if(a){const n=a.selection,o=n.anchor;if(t&&!t())return void e.removeClass('ck-placeholder');const i=!Array.from(e.getChildren()).some((e)=>!e.is('uiElement'));return!a.isFocused&&i?void e.addClass('ck-placeholder'):void(i&&o&&o.parent!==e?e.addClass('ck-placeholder'):e.removeClass('ck-placeholder'))}}t.a=function(e,t,a){const r=e.document;if(!r)throw new l.b('view-placeholder-element-is-detached: Provided element is not placed in document.');n(e),u.has(r)||(u.set(r,new Map),m.listenTo(r,'render',()=>o(r),{priority:'high'})),e.setAttribute('data-placeholder',t),u.get(r).set(e,a),i(e,a)};var r=a(45),s=a(8),l=a(0),d=a(536),c=a.n(d);const m={};Object(r.a)(m,s.c);const u=new WeakMap},function(e,t,a){var n=a(537);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.ck-placeholder:before{content:attr(data-placeholder);cursor:text;color:#c2c2c2;pointer-events:none}',''])},function(e,t,a){var n=a(539);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.ck-editor__editable .image>figcaption{color:#333;background-color:#f7f7f7;padding:.8em;font-size:.75em;outline-offset:-1px}',''])},function(e,t,a){'use strict';var n=a(2),o=a(541),i=a(21);class r extends n.a{static get requires(){return[o.a]}static get pluginName(){return'ImageStyle'}init(){const e=this.editor,t=e.plugins.get(o.a).imageStyles;for(const e of t)this._createButton(e)}_createButton(e){const t=this.editor,a=t.commands.get(e.name);t.ui.componentFactory.add(e.name,(n)=>{const o=new i.a(n);return o.set({label:e.title,icon:e.icon,tooltip:!0}),o.bind('isEnabled').to(a,'isEnabled'),o.bind('isOn').to(a,'value'),this.listenTo(o,'execute',()=>t.execute(e.name)),o})}}t.a=r},function(e,t,a){'use strict';function n(e){const t=b.defaultStyles,a=b.defaultIcons;if('string'==typeof e)t[e]?e=Object.assign({},t[e]):(l.a.warn('image-style-not-found: There is no such image style of given name.',{name:e}),e={name:e});else if(t[e.name]){const a=t[e.name],n=Object.assign({},e);for(const t in a)e.hasOwnProperty(t)||(n[t]=a[t]);e=n}return'string'==typeof e.icon&&a[e.icon]&&(e.icon=a[e.icon]),e}var o=a(2),i=a(542),r=a(267),s=a(543),l=a(16),d=a(544),c=a.n(d),m=a(545),u=a.n(m),p=a(546),g=a.n(p),f=a(547),h=a.n(f);class b extends o.a{static get requires(){return[r.a]}static get pluginName(){return'ImageStyleEngine'}init(){const e=this.editor,t=e.document,a=t.schema,n=e.data,o=e.editing;e.config.define('image.styles',['imageStyleFull','imageStyleSide']);const r=this.imageStyles;a.allow({name:'image',attributes:'imageStyle',inside:'$root'});const l=Object(s.a)(r);o.modelToView.on('addAttribute:imageStyle:image',l),n.modelToView.on('addAttribute:imageStyle:image',l),o.modelToView.on('changeAttribute:imageStyle:image',l),n.modelToView.on('changeAttribute:imageStyle:image',l),o.modelToView.on('removeAttribute:imageStyle:image',l),n.modelToView.on('removeAttribute:imageStyle:image',l),n.viewToModel.on('element:figure',Object(s.b)(r),{priority:'low'});for(const t of r)e.commands.add(t.name,new i.a(e,t))}get imageStyles(){if(this._cachedImageStyles)return this._cachedImageStyles;const e=[],t=this.editor,a=this.localizedDefaultStylesTitles,o=t.config.get('image.styles');for(let t of o)t=n(t),a[t.title]&&(t.title=a[t.title]),e.push(t);return this._cachedImageStyles=e}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e('Full size image'),"Side image":e('Side image'),"Left aligned image":e('Left aligned image'),"Centered image":e('Centered image'),"Right aligned image":e('Right aligned image')}}}t.a=b,b.defaultStyles={imageStyleFull:{name:'imageStyleFull',title:'Full size image',icon:c.a,isDefault:!0},imageStyleSide:{name:'imageStyleSide',title:'Side image',icon:h.a,className:'image-style-side'},imageStyleAlignLeft:{name:'imageStyleAlignLeft',title:'Left aligned image',icon:u.a,className:'image-style-align-left'},imageStyleAlignCenter:{name:'imageStyleAlignCenter',title:'Centered image',icon:g.a,className:'image-style-align-center'},imageStyleAlignRight:{name:'imageStyleAlignRight',title:'Right aligned image',icon:h.a,className:'image-style-align-right'}},b.defaultIcons={full:c.a,left:u.a,right:h.a,center:g.a}},function(e,t,a){'use strict';var n=a(11),o=a(36);class i extends n.a{constructor(e,t){super(e),this.style=t}refresh(){const e=this.editor.document.selection.getSelectedElement();this.isEnabled=Object(o.a)(e),this.value=!!e&&(this.style.isDefault?!e.hasAttribute('imageStyle'):e.getAttribute('imageStyle')==this.style.name)}execute(e={}){if(this.value)return;const t=this.editor.document,a=t.selection.getSelectedElement();t.enqueueChanges(()=>{const n=e.batch||t.batch();n.setAttribute(a,'imageStyle',this.style.name)})}}t.a=i},function(e,t,a){'use strict';function n(e,t,a,n){const o=t.input,i=t.output;if(a.test(o,{class:e.className})&&Object(s.a)(i)){const r=[...i.getAttributeKeys(),'imageStyle'];n.schema.check({name:'image',inside:t.context,attributes:r})&&(a.consume(o,{class:e.className}),i.setAttribute('imageStyle',e.name))}}function o(e,t){for(const a of t)if(a.name===e)return a}function i(e,t,a){return t&&('changeAttribute'==e||'removeAttribute'==e)&&(a.removeClass(t.className),!0)}function r(e,t,a){return t&&('addAttribute'==e||'changeAttribute'==e)&&(a.addClass(t.className),!0)}t.a=function(e){return(t,a,n,s)=>{const l=t.name.split(':')[0],d=l+':imageStyle';if(n.test(a.item,d)){const t=o(a.attributeNewValue,e),c=o(a.attributeOldValue,e),m=s.mapper.toViewElement(a.item),u=i(l,c,m),p=r(l,t,m);(u||p)&&n.consume(a.item,d)}}},t.b=function(e){const t=e.filter((e)=>!e.isDefault);return(e,a,o,i)=>{for(const r of t)n(r,a,o,i)}};var s=a(36)},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e,t,a){'use strict';var n=a(6),o=a(2),i=a(262),r=a(157),s=a(36),l=a(273);class d extends o.a{static get requires(){return[r.a]}static get pluginName(){return'ImageToolbar'}afterInit(){const e=this.editor,t=e.config.get('image.toolbar');t&&t.length&&(this._balloon=this.editor.plugins.get('ContextualBalloon'),this._toolbar=new i.a,n.a.extend(this._toolbar.template,{attributes:{class:'ck-editor-toolbar'}}),this._toolbar.fillFromConfig(t,e.ui.componentFactory),this.listenTo(e.editing.view,'render',()=>{this._checkIsVisible()},{priority:'low'}),this.listenTo(e.ui.focusTracker,'change:isFocused',()=>{this._checkIsVisible()},{priority:'low'}))}_checkIsVisible(){const e=this.editor;e.ui.focusTracker.isFocused?Object(s.b)(e.editing.view.selection)?this._showToolbar():this._hideToolbar():this._hideToolbar()}_showToolbar(){const e=this.editor;this._isVisible?Object(l.b)(e):!this._balloon.hasView(this._toolbar)&&this._balloon.add({view:this._toolbar,position:Object(l.a)(e),balloonClassName:'ck-toolbar-container ck-editor-toolbar-container'})}_hideToolbar(){this._isVisible&&this._balloon.remove(this._toolbar)}get _isVisible(){return this._balloon.visibleView==this._toolbar}}t.a=d},function(e,t,a){'use strict';function n(e){return e.getAncestors().find((e)=>e instanceof l.a)}var o=a(2),i=a(550),r=a(38),s=a(551),l=a(277),d=a(157),c=a(268),m=a(21),u=a(554),p=a(555),g=a.n(p),f=a(556),h=a.n(f);const b='Ctrl+K';class _ extends o.a{static get requires(){return[s.a,d.a]}static get pluginName(){return'Link'}init(){const e=this.editor;e.editing.view.addObserver(i.a),this.formView=this._createForm(),this._balloon=e.plugins.get(d.a),this._createToolbarLinkButton(),this._attachActions()}_createForm(){const e=this.editor,t=new u.a(e.locale),a=e.commands.get('link'),n=e.commands.get('unlink');return t.urlInputView.bind('value').to(a,'value'),t.urlInputView.bind('isReadOnly').to(a,'isEnabled',(e)=>!e),t.saveButtonView.bind('isEnabled').to(a),t.unlinkButtonView.bind('isEnabled').to(n),this.listenTo(t,'submit',()=>{e.execute('link',t.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(t,'unlink',()=>{e.execute('unlink'),this._hidePanel(!0)}),this.listenTo(t,'cancel',()=>this._hidePanel(!0)),t.keystrokes.set('Esc',(e,t)=>{this._hidePanel(!0),t()}),t}_createToolbarLinkButton(){const e=this.editor,a=e.commands.get('link'),n=e.t;e.keystrokes.set(b,(e,t)=>{t(),a.isEnabled&&this._showPanel(!0)}),e.ui.componentFactory.add('link',(e)=>{const t=new m.a(e);return t.isEnabled=!0,t.label=n('Link'),t.icon=g.a,t.keystroke=b,t.tooltip=!0,t.bind('isEnabled').to(a,'isEnabled'),this.listenTo(t,'execute',()=>this._showPanel(!0)),t})}_attachActions(){const e=this.editor.editing.view;this.listenTo(e,'click',()=>{const e=this._getSelectedLinkElement();e&&this._showPanel()}),this.editor.keystrokes.set('Tab',(e,t)=>{this._balloon.visibleView!==this.formView||this.formView.focusTracker.isFocused||(this.formView.focus(),t())},{priority:'high'}),this.editor.keystrokes.set('Esc',(e,t)=>{this._balloon.visibleView===this.formView&&(this._hidePanel(),t())}),Object(c.a)({emitter:this.formView,activator:()=>this._balloon.hasView(this.formView),contextElements:[this._balloon.view.element],callback:()=>this._hidePanel()})}_showPanel(e){const t=this.editor,a=t.commands.get('link'),n=t.commands.get('unlink'),o=t.editing,i=o.view,r=i.selection.isCollapsed,s=this._getSelectedLinkElement();this.formView.unlinkButtonView.isVisible=n.isEnabled,this.formView.urlInputView.inputView.element.value=a.value||'',this.listenTo(i,'render',()=>{const e=this._getSelectedLinkElement(),t=i.selection.isCollapsed;r&&!t||s!==e?this._hidePanel(!0):this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.hasView(this.formView)?e&&this._balloon.visibleView===this.formView&&this.formView.urlInputView.select():(this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),e&&this.formView.urlInputView.select())}_hidePanel(e){this.stopListening(this.editor.editing.view,'render');this._balloon.hasView(this.formView)&&(e&&this.editor.editing.view.focus(),this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.formView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=this._getSelectedLinkElement(),a=t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(e.selection.getFirstRange());return{target:a}}_getSelectedLinkElement(){const e=this.editor.editing.view.selection;if(e.isCollapsed)return n(e.getFirstPosition());else{const t=e.getFirstRange().getTrimmed(),a=n(t.start),o=n(t.end);return a&&a==o?r.a.createIn(a).getTrimmed().isEqual(t)?a:null:null}}}t.a=_},function(e,t,a){'use strict';var n=a(75);class o extends n.a{constructor(e){super(e),this.domEventType='click'}onDomEvent(e){this.fire(e.type,e)}}t.a=o},function(e,t,a){'use strict';var n=a(2),o=a(51),i=a(43),r=a(277),s=a(552),l=a(553);class d extends n.a{init(){const e=this.editor,t=e.data,a=e.editing;e.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$clipboardHolder'}),Object(o.a)().for(t.modelToView,a.modelToView).fromAttribute('linkHref').toElement((e)=>{const t=new r.a('a',{href:e});return t.priority=5,t}),Object(i.a)().for(t.viewToModel).from({name:'a',attribute:{href:/.?/}}).toAttribute((e)=>({key:'linkHref',value:e.getAttribute('href')})),e.commands.add('link',new s.a(e)),e.commands.add('unlink',new l.a(e))}}t.a=d},function(e,t,a){'use strict';var n=a(11),o=a(26),i=a(3),r=a(278);class s extends n.a{refresh(){const e=this.editor.document;this.value=e.selection.getAttribute('linkHref'),this.isEnabled=e.schema.checkAttributeInSelection(e.selection,'linkHref')}execute(e){const t=this.editor.document,a=t.selection;t.enqueueChanges(()=>{const n=t.batch();if(a.isCollapsed){const t=a.getFirstPosition();if(a.hasAttribute('linkHref')){const t=Object(r.a)(a.getFirstPosition(),a.getAttribute('linkHref'));n.setAttribute(t,'linkHref',e),a.setRanges([t])}else{const r=new o.a(e,{linkHref:e});n.insert(t,r),a.setRanges([i.a.createOn(r)])}}else{const o=t.schema.getValidRanges(a.getRanges(),'linkHref');for(const t of o)n.setAttribute(t,'linkHref',e)}})}}t.a=s},function(e,t,a){'use strict';var n=a(11),o=a(278);class i extends n.a{refresh(){this.isEnabled=this.editor.document.selection.hasAttribute('linkHref')}execute(){const e=this.editor.document,t=e.selection;e.enqueueChanges(()=>{const a=t.isCollapsed?[Object(o.a)(t.getFirstPosition(),t.getAttribute('linkHref'))]:t.getRanges(),n=e.batch();for(const e of a)n.removeAttribute(e,'linkHref')})}}t.a=i},function(e,t,a){'use strict';var n=a(7),o=a(6),i=a(112),r=a(21),s=a(269),l=a(270),d=a(271),c=a(62),m=a(114),u=a(50);class p extends n.a{constructor(e){super(e);const a=e.t;this.focusTracker=new c.a,this.keystrokes=new u.a,this.urlInputView=this._createUrlInput(),this.saveButtonView=this._createButton(a('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(a('Cancel'),'cancel'),this.unlinkButtonView=this._createButton(a('Unlink'),'unlink'),this._focusables=new i.a,this._focusCycler=new m.a({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),o.a.extend(this.saveButtonView.template,{attributes:{class:['ck-button-action']}}),this.template=new o.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]}]}),Object(d.a)({view:this});const t=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];t.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}init(){return this.keystrokes.listenTo(this.element),super.init()}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new s.a(this.locale,l.a);return t.label=e('Link URL'),t.inputView.placeholder='https://example.com',t}_createButton(e,t){const a=new r.a(this.locale);return a.label=e,a.withText=!0,t&&a.delegate('execute').to(this,t),a}}t.a=p},function(e){e.exports=''},function(e,t,a){var n=a(557);'string'==typeof n&&(n=[[e.i,n,'']]);var o={},i;o.transform=i;a(32)(n,o);n.locals&&(e.exports=n.locals),!1},function(e,t,a){t=e.exports=a(31)(void 0),t.push([e.i,'.ck-link-form{padding:1.2em;overflow:hidden}.ck-link-form:focus{outline:none}.ck-link-form .ck-input-text{width:100%}.ck-link-form .ck-label{margin-bottom:.2em}.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:last-child{float:left;margin-right:2.56em}',''])},function(e,t,a){'use strict';var n=a(559),o=a(564),i=a.n(o),r=a(565),s=a.n(r),l=a(2),d=a(21);class c extends l.a{static get requires(){return[n.a]}static get pluginName(){return'List'}init(){const e=this.editor.t;this._addButton('numberedList',e('Numbered List'),i.a),this._addButton('bulletedList',e('Bulleted List'),s.a),this.listenTo(this.editor.editing.view,'enter',(e,t)=>{const a=this.editor.document,n=a.selection.getLastPosition().parent;a.selection.isCollapsed&&'listItem'==n.name&&n.isEmpty&&(this.editor.execute('outdentList'),t.preventDefault(),e.stop())});const t=(e)=>(t,a)=>{const n=this.editor.commands.get(e);n.isEnabled&&(this.editor.execute(e),a())};this.editor.keystrokes.set('Tab',t('indentList')),this.editor.keystrokes.set('Shift+Tab',t('outdentList'))}_addButton(e,t,a){const n=this.editor,o=n.commands.get(e);n.ui.componentFactory.add(e,(i)=>{const r=new d.a(i);return r.set({label:t,icon:a,tooltip:!0}),r.bind('isOn','isEnabled').to(o,'value','isEnabled'),this.listenTo(r,'execute',()=>n.execute(e)),r})}}t.a=c},function(e,t,a){'use strict';function n(e){let t=1;for(const a of e.getChildren())if('ul'==a.name||'ol'==a.name)for(const e of a.getChildren())t+=n(e);return t}var o=a(560),i=a(561),r=a(2),s=a(115),l=a(562);class d extends r.a{static get requires(){return[s.a]}init(){const e=this.editor,t=e.document.schema;t.registerItem('listItem','$block'),t.allow({name:'listItem',inside:'$root',attributes:['type','indent']}),t.requireAttributes('listItem',['type','indent']);const a=e.data,r=e.editing;this.editor.document.on('change',Object(l.c)(this.editor.document),{priority:'high'}),this.editor.document.on('change',(e,t,a)=>{if('move'==t)for(const e of a.range.getItems())e.is('listItem')&&r.mapper.unbindModelElement(e)},{priority:'high'}),r.mapper.registerViewToModelLength('li',n),a.mapper.registerViewToModelLength('li',n),r.mapper.on('modelToViewPosition',l.e),r.mapper.on('viewToModelPosition',l.m),a.mapper.on('modelToViewPosition',l.e),r.modelToView.on('insert',l.k,{priority:'high'}),r.modelToView.on('insert:listItem',l.h),a.modelToView.on('insert',l.k,{priority:'high'}),a.modelToView.on('insert:listItem',l.h),r.modelToView.on('changeAttribute:type:listItem',l.g),a.modelToView.on('changeAttribute:type:listItem',l.g),r.modelToView.on('remove:listItem',l.j),r.modelToView.on('remove',l.i,{priority:'low'}),a.modelToView.on('remove:listItem',l.j),a.modelToView.on('remove',l.i,{priority:'low'}),r.modelToView.on('changeAttribute:indent:listItem',l.f),a.modelToView.on('changeAttribute:indent:listItem',l.f),a.viewToModel.on('element:ul',l.a,{priority:'high'}),a.viewToModel.on('element:ol',l.a,{priority:'high'}),a.viewToModel.on('element:li',l.b,{priority:'high'}),a.viewToModel.on('element:li',l.l),a.on('insertContent',l.d,{priority:'high'}),e.commands.add('numberedList',new o.a(e,'numbered')),e.commands.add('bulletedList',new o.a(e,'bulleted')),e.commands.add('indentList',new i.a(e,'forward')),e.commands.add('outdentList',new i.a(e,'backward'))}}t.a=d},function(t,a,n){'use strict';function o(e,t,a){const n=t?e[0]:e[e.length-1];if(n.is('listItem'))for(let o=n[t?'previousSibling':'nextSibling'],i=n.getAttribute('indent');o&&o.is('listItem')&&o.getAttribute('indent')>=a;)i>o.getAttribute('indent')&&(i=o.getAttribute('indent')),o.getAttribute('indent')==i&&e[t?'unshift':'push'](o),o=o[t?'previousSibling':'nextSibling']}function i(e,t){return t.check({name:'listItem',attributes:['type','indent'],inside:s.a.createBefore(e)})}var r=n(11),s=n(1),l=n(63);class d extends r.a{constructor(e,t){super(e),this.type='bulleted'==t?'bulleted':'numbered'}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(t={}){const a=this.editor.document,n=Array.from(a.selection.getSelectedBlocks()).filter((e)=>i(e,a.schema)),r=!0===this.value;a.enqueueChanges(()=>{const i=t.batch||a.batch();if(r){let t=n[n.length-1].nextSibling,a=e,o=[];for(;t&&'listItem'==t.name&&0!==t.getAttribute('indent');){const e=t.getAttribute('indent');e=e.getAttribute('indent');){if(a.getAttribute('indent')==e.getAttribute('indent'))return a;a=a[t?'nextSibling':'previousSibling']}return null}var i=a(11),r=a(63);class s extends i.a{constructor(e,t){super(e),this._indentBy='forward'==t?1:-1}refresh(){this.isEnabled=this._checkEnabled()}execute(){const e=this.editor.document,t=e.batch();let a=Array.from(e.selection.getSelectedBlocks());e.enqueueChanges(()=>{const e=a[a.length-1];for(let t=e.nextSibling;t&&'listItem'==t.name&&t.getAttribute('indent')>e.getAttribute('indent');)a.push(t),t=t.nextSibling;0>this._indentBy&&(a=a.reverse());for(const e of a){const a=e.getAttribute('indent')+this._indentBy;0>a?t.rename(e,'paragraph'):t.setAttribute(e,'indent',a)}0>this._indentBy&&(a=a.reverse());for(const e of a)n(e,t)})}_checkEnabled(){const e=Object(r.a)(this.editor.document.selection.getSelectedBlocks());if(!e||!e.is('listItem'))return!1;if(0=t;){if(n.getAttribute('indent')==t)return n.getAttribute('type')==a;n=n.previousSibling}return!1}return!0}}t.a=s},function(e,t,a){'use strict';function n(e,t,a){let n=e.nodeAfter;n&&'listItem'==n.name&&t.enqueueChanges(()=>{const e=n.previousSibling,t=e&&e.is('listItem')?e.getAttribute('indent')+1:0;let o=n.getAttribute('indent')-t;const i=[];for(;n&&'listItem'==n.name&&n.getAttribute('indent')>t;){o>n.getAttribute('indent')&&(o=n.getAttribute('indent'));const e=n.getAttribute('indent')-o;i.push({item:n,indent:e}),n=n.nextSibling}if(0{const e=c(o,!t);if(e&&e!=o)for(const a=e.getAttribute('indent'),i=e.getAttribute('type');o&&o.is('listItem')&&o.getAttribute('indent')>=a;)o.getAttribute('type')!=i&&o.getAttribute('indent')==a&&n.setAttribute(o,'type',i),o=o[t?'previousSibling':'nextSibling']})}function i(e,t){const a='numbered'==e.getAttribute('type')?'ol':'ul',n=new u.a,o=new b.a(a,null);return o.appendChildren(n),t.bindElements(e,n),n}function r(e,t){const a=t.getNext?'nextSibling':'previousSibling',n=t.getNext?'nodeAfter':'nodeBefore',o=!!t.checkAllSiblings,i=!!t.sameIndent,r=!!t.biggerIndent,s=!!t.smallerIndent,l=!!t.isMapped,d=e instanceof g.a?e.getAttribute('indent'):t.indent;for(let c=e instanceof g.a?e[a]:e[n];c&&'listItem'==c.name;){const e=c.getAttribute('indent');if(i&&d==e||r&&de){if(!l||t.mapper.toViewElement(c))return c;c=c[a];continue}if(!o)return null;c=c[a]}return null}function s(e,t){return e&&t&&('ul'==e.name||'ol'==e.name)&&e.name==t.name?w.a.mergeContainers(_.a.createAfter(e)):null}function l(e,t,a,n){const o=t.parent;let i=r(e,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0}),l;if(i&&i.getAttribute('indent')==e.getAttribute('indent')){const e=a.toViewElement(i);l=w.a.breakContainer(_.a.createAfter(e))}else i=e.previousSibling,l=i&&'listItem'==i.name?i.getAttribute('indent')=a;)e=e[n],e.getAttribute('indent')==a&&(o=e);return o}function m(e){return e.getLastMatchingPosition((e)=>e.item.is('uiElement'))}t.h=function(e,t,a,n){if(a.test(t.item,'insert')&&a.test(t.item,'addAttribute:type')&&a.test(t.item,'addAttribute:indent')){a.consume(t.item,'insert'),a.consume(t.item,'addAttribute:type'),a.consume(t.item,'addAttribute:indent');const e=t.item,o=i(e,n.mapper),r=n.mapper.toViewPosition(f.a.createBefore(e));l(e,o,n.mapper,r)}},t.g=function(e,t,a,n){if(!a.consume(t.item,'changeAttribute:type'))return;const o=n.mapper.toViewElement(t.item);w.a.breakContainer(_.a.createBefore(o)),w.a.breakContainer(_.a.createAfter(o));let i=o.parent;const r='numbered'==t.attributeNewValue?'ol':'ul';i=w.a.rename(i,r),s(i,i.nextSibling),s(i.previousSibling,i)},t.j=function(e,t,a,n){if(!a.consume(t.item,'remove'))return;let o=n.mapper.toViewPosition(t.sourcePosition);o=o.getLastMatchingPosition((e)=>!e.item.is('li'));const i=o.nodeAfter;w.a.breakContainer(_.a.createBefore(i)),w.a.breakContainer(_.a.createAfter(i));const r=i.parent,l=r.previousSibling,c=k.a.createOn(r);w.a.remove(c),l&&l.nextSibling&&s(l,l.nextSibling),d(t.item.getAttribute('indent')+1,t.sourcePosition,c.start,i,n.mapper),'$graveyard'==t.item.root.rootName&&n.mapper.unbindModelElement(t.item)},t.f=function(e,t,a,n){if(!a.consume(t.item,'changeAttribute:indent'))return;const o=n.mapper.toViewElement(t.item);w.a.breakContainer(_.a.createBefore(o)),w.a.breakContainer(_.a.createAfter(o));const i=o.parent,r=i.previousSibling,c=k.a.createOn(i);w.a.remove(c);let m;r&&r.nextSibling&&(m=s(r,r.nextSibling)),m||(m=c.start),d(t.attributeOldValue+1,t.range.start,c.start,o,n.mapper),l(t.item,o,n.mapper,m)},t.k=function(e,t,a,n){if('listItem'!=t.item.name){let e=n.mapper.toViewPosition(t.range.start);const a=[];for(;('ul'==e.parent.name||'ol'==e.parent.name)&&(e=w.a.breakContainer(e),'li'==e.parent.name);){const t=e,n=_.a.createAt(e.parent,'end');if(!t.isEqual(n)){const e=w.a.remove(new k.a(t,n));a.push(e)}e=_.a.createAfter(e.parent)}if(0e.is('ul')||e.is('ol')),o=new y.a({startPosition:_.a.createAt(e,0)});for(const e of o)if('elementStart'==e.type&&e.item.is('li')){t.viewPosition=e.previousPosition;break}else if('elementEnd'==e.type&&e.item==n){t.viewPosition=e.nextPosition;break}}},t.m=function(e,t){const a=t.viewPosition,n=a.parent,o=t.mapper;if('ul'==n.name||'ol'==n.name){if(!a.isAtEnd){const e=o.toModelElement(a.nodeAfter);t.modelPosition=f.a.createBefore(e)}else{const e=o.toModelElement(a.nodeBefore),n=o.getModelLength(a.nodeBefore);t.modelPosition=f.a.createBefore(e).getShiftedBy(n)}e.stop()}else if('li'==n.name&&a.nodeBefore&&('ul'==a.nodeBefore.name||'ol'==a.nodeBefore.name)){const i=o.toModelElement(n);let r=1,s=a.nodeBefore;for(;s&&(s.is('ul')||s.is('ol'));)r+=o.getModelLength(s),s=s.previousSibling;t.modelPosition=f.a.createBefore(i).getShiftedBy(r),e.stop()}},t.c=function(e){return(t,a,i,r)=>{if('transparent'!=r.type)if('remove'==a){const t=i.range.end.offset-i.range.start.offset,a=i.sourcePosition._getTransformedByInsertion(i.range.start,t,!0);n(a,e,r),o(a,!1,e,r)}else if('move'==a){const t=i.range.end.offset-i.range.start.offset,a=i.sourcePosition._getTransformedByInsertion(i.range.start,t,!0);n(a,e,r),o(a,!1,e,r),n(i.range.start,e,r),o(i.range.start,!1,e,r),n(i.range.end,e,r),o(i.range.end,!0,e,r)}else if('rename'==a&&'listItem'==i.oldName&&'listItem'!=i.newName){const t=i.element;e.enqueueChanges(()=>{r.removeAttribute(t,'indent').removeAttribute(t,'type')});const a=f.a.createAfter(i.element);n(a,e,r)}else'insert'==a&&(n(i.range.start,e,r),o(i.range.start,!1,e,r),n(i.range.end,e,r),o(i.range.end,!0,e,r))}},t.d=function(e,[t,a]){let n=t.is('documentFragment')?t.getChild(0):t;if(n&&n.is('listItem')){const e=a.getFirstPosition();let t=null;if(e.parent.is('listItem')?t=e.parent:e.nodeBefore&&e.nodeBefore.is('listItem')&&(t=e.nodeBefore),t){const e=t.getAttribute('indent');if(0'},function(e){e.exports=''}])['default']}); +(function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports.ClassicEditor=t():e.ClassicEditor=t()})(this,function(){return function(e){function t(o){if(n[o])return n[o].exports;var i=n[o]={i:o,l:!1,exports:{}};return e[o].call(i.exports,i,i.exports,t),i.l=!0,i.exports}var n={};return t.m=e,t.c=n,t.d=function(e,n,o){t.o(e,n)||Object.defineProperty(e,n,{configurable:!1,enumerable:!0,get:o})},t.n=function(e){var n=e&&e.__esModule?function(){return e['default']}:function(){return e};return t.d(n,'a',n),n},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p='',t(t.s=4)}([function(e){function t(e,t){var o=e[1]||'',i=e[3];if(!i)return o;if(t&&'function'==typeof btoa){var r=n(i),a=i.sources.map(function(e){return'/*# sourceURL='+i.sourceRoot+e+' */'});return[o].concat(a).concat([r]).join('\n')}return[o].join('\n')}function n(e){var t=btoa(unescape(encodeURIComponent(JSON.stringify(e))));return'/*# '+('sourceMappingURL=data:application/json;charset=utf-8;base64,'+t)+' */'}e.exports=function(e){var n=[];return n.toString=function(){return this.map(function(n){var o=t(n,e);return n[2]?'@media '+n[2]+'{'+o+'}':o}).join('')},n.i=function(e,t){'string'==typeof e&&(e=[[null,e,'']]);for(var o={},r=0,i;r{Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t)).forEach((n)=>{if(!(n in e.prototype)){const o=Object.getOwnPropertyDescriptor(t,n);o.enumerable=!1,Object.defineProperty(e.prototype,n,o)}})})}function s(){let e='e';for(let t=0;8>t;t++)e+=ra(65536*(1+Math.random())).toString(16).substring(1);return e}function l(e,t){return e[Ea]&&e[Ea][t]?e[Ea][t].emitter:null}function d(e,t){e[Sa]||(e[Sa]=t||s())}function c(e){return e[Sa]}function m(e){return e._events||Object.defineProperty(e,'_events',{value:{}}),e._events}function u(){return{callbacks:[],childEvents:[]}}function p(e,t){const n=m(e);if(n[t])return;let o=t,i=null;const r=[];for(;''!==o&&!n[o];)n[o]=u(),r.push(n[o]),i&&n[o].childEvents.push(i),i=o,o=o.substr(0,o.lastIndexOf(':'));if(''!==o){for(const e of r)e.callbacks=n[o].callbacks.slice();n[o].childEvents.push(i)}}function g(e,t){const n=m(e)[t];if(!n)return[];let o=[n.callbacks];for(let r=0;r{if(e.attrs.length&&e.attrs.length!==o)throw new _a('observable-bind-to-attrs-length: The number of attributes must match.');e.attrs.length||(e.attrs=this._bindAttrs)}),this._to=t.to,t.callback&&(this._bindings.get(n[0]).callback=t.callback),C(this._observable,this._to),x(this),this._bindAttrs.forEach((e)=>{A(this._observable,e)})}function w(e){return e.every((e)=>'string'==typeof e)}function y(...e){if(!e.length)throw new _a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.');const t={to:[]};let n;return'function'==typeof e[e.length-1]&&(t.callback=e.pop()),e.forEach((e)=>{if('string'==typeof e)n.attrs.push(e);else if('object'==typeof e)n={observable:e,attrs:[]},t.to.push(n);else throw new _a('observable-bind-to-parse-error: Invalid argument syntax in `to()`.')}),t}function v(e,t,n,o){const i=e[qs],r=i.get(n),a=r||{};a[o]||(a[o]=new Set),a[o].add(t),r||i.set(n,a)}function x(e){let t;e._bindings.forEach((n,o)=>{e._to.forEach((i)=>{t=i.attrs[n.callback?0:e._bindAttrs.indexOf(o)],n.to.push([i.observable,t]),v(e._observable,n,i.observable,t)})})}function A(e,t){const n=e[Hs],o=n.get(t);let i;o.callback?i=o.callback.apply(e,o.to.map((e)=>e[0][e[1]])):(i=o.to[0],i=i[0][i[1]]),e.hasOwnProperty(t)?e[t]=i:e.set(t,i)}function C(e,t){t.forEach((t)=>{const n=e[qs];let o;n.get(t.observable)||e.listenTo(t.observable,'change',(i,r)=>{o=n.get(t.observable)[r],o&&o.forEach((t)=>{A(e,t.attr)})})})}function T(e){const t=new Map;for(const n in e)t.set(n,e[n]);return t}function P(e){return fa(e)?T(e):new Map(e)}function E(e){return!!(e&&e[Symbol.iterator])}function S(e){return'string'==typeof e?[new Ks(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Ks(e):e))}function V(e,t,n,o,i){return{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:i}}}function O(e,t){const n=oa(e.length,t.length);for(let o=0;oe.add(t))}function $(e){return'string'==typeof e?[new $d(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new $d(e):e))}function K(){for(const e of this.getChildren())if(!e.is('uiElement'))return null;return this.childCount}function Q(e){return e.item.is('attributeElement')||e.item.is('uiElement')}function J(e){return'string'==typeof e?[new Ks(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new Ks(e):e))}function G(e,t,n){const o=t.getRange(),i=Array.from(e.getAncestors());i.shift(),i.reverse();const r=i.some((e)=>{if(o.containsItem(e)){const t=n.toViewElement(e);return!!t.getCustomProperty('addHighlight')}});return!r}function Y(){if(X(this))return null;let e=this.parent;for(;e&&e.is('attributeElement');){if(1!e.is('uiElement')).length}function Z(){return null}function ee(e){let t;if('string'!=typeof e)t=e.keyCode+(e.altKey?uc.alt:0)+(e.ctrlKey?uc.ctrl:0)+(e.shiftKey?uc.shift:0);else if(t=uc[e.toLowerCase()],!t)throw new _a('keyboard-unknown-key: Unknown key name.',{key:e});return t}function te(e){return'string'==typeof e&&(e=oe(e)),e.map((e)=>'string'==typeof e?ee(e):e).reduce((e,t)=>t+e,0)}function ne(e){const t=oe(e);return mc.mac&&'ctrl'==t[0].toLowerCase()?'\u2318'+(t[1]||''):e}function oe(e){return e.split(/\s*\+\s*/)}function ie(e){e.on('keydown',(t,n)=>ae(t,n,e.domConverter))}function re(){return null}function ae(e,t,n){if(t.keyCode==uc.arrowright){const e=t.domTarget.ownerDocument.defaultView.getSelection(),o=1==e.rangeCount&&e.getRangeAt(0).collapsed;if(o||t.shiftKey){const t=e.focusNode,i=e.focusOffset,r=n.domPositionToView(t,i);if(null===r)return;let a=!1;const s=r.getLastMatchingPosition((e)=>(e.item.is('uiElement')&&(a=!0),e.item.is('uiElement')||e.item.is('attributeElement')));if(a){const t=n.viewPositionToDom(s);o?e.collapse(t.parent,t.offset):e.extend(t.parent,t.offset)}}}}function se(e){return'string'==typeof e?[new $d(e)]:(E(e)||(e=[e]),Array.from(e).map((e)=>'string'==typeof e?new $d(e):e))}function le(e){const t=e.offset,n=e.parent;if(n.is('text'))return e;if(n.is('attributeElement')&&0===n.childCount){const e=n.parent,t=n.index;return n.remove(),le(new ec(e,t))}const o=n.getChild(t-1),i=n.getChild(t);if(!o||!i)return e;if(o.is('text')&&i.is('text'))return ye(o,i);if(o.is('attributeElement')&&i.is('attributeElement')&&o.isSimilar(i)){const e=o.childCount;return o.appendChildren(i.getChildren()),i.remove(),le(new ec(o,e))}return e}function de(e,t){t=E(t)?[...t]:[t],Ce(t);const n=pe(e);if(!n)throw new _a('view-writer-invalid-position-container');const o=fe(e,!0),i=n.insertChildren(o.offset,t),r=o.getShiftedBy(i),a=le(o);if(0===i)return new tc(a,a);else{a.isEqual(o)||r.offset--;const e=le(r);return new tc(a,e)}}function ce(e){if(Pe(e),e.isCollapsed)return new gc;const{start:t,end:n}=ge(e,!0),o=t.parent,i=n.offset-t.offset,r=o.removeChildren(t.offset,i),a=le(t);return e.start=a,e.end=ec.createFromPosition(a),new gc(r)}function me(e,t){let n;if(t.isAfter(e.end)){t=fe(t,!0);const o=t.parent,i=o.childCount;e=ge(e,!0),n=ce(e),t.offset+=o.childCount-i}else n=ce(e);return de(t,n)}function ue(e,t){if(!(t instanceof sc))throw new _a('view-writer-wrap-invalid-attribute');if(Pe(e),e.isCollapsed)return e;if(e.end.isEqual(e.start.getShiftedBy(1))){const n=e.start.nodeAfter;if(n instanceof sc&&ve(t,n))return e}if(Ae(e)&&ve(t,e.start.parent)){const t=e.start.parent.parent,n=e.start.parent.index;return tc.createFromParentsAndOffsets(t,n,t,n+1)}const{start:n,end:o}=ge(e,!0),i=n.parent,r=he(i,n.offset,o.offset,t),a=be(i,r.start.offset,r.end.offset,t),s=le(a.start);s.isEqual(a.start)||a.end.offset--;const l=le(a.end);return new tc(s,l)}function pe(e){let t=e.parent;for(;!Te(t);){if(!t)return;t=t.parent}return t}function ge(e,t=!1){const n=e.start,o=e.end;if(Pe(e),e.isCollapsed){const n=fe(e.start,t);return new tc(n,n)}const i=fe(o,t),r=i.parent.childCount,a=fe(n,t);return i.offset+=i.parent.childCount-r,new tc(a,i)}function fe(e,t=!1){const n=e.offset,o=e.parent;if(e.parent.is('emptyElement'))throw new _a('view-writer-cannot-break-empty-element');if(e.parent.is('uiElement'))throw new _a('view-writer-cannot-break-ui-element');if(!t&&o.is('text')&&Te(o.parent))return ec.createFromPosition(e);if(Te(o))return ec.createFromPosition(e);if(o.is('text'))return fe(we(e),t);const i=o.childCount;if(n==i){const e=new ec(o.parent,o.index+1);return fe(e,t)}if(0===n){const e=new ec(o.parent,o.index);return fe(e,t)}else{const e=o.index+1,i=o.clone();o.parent.insertChildren(e,i);const r=o.childCount-n,a=o.removeChildren(n,r);i.appendChildren(a);const s=new ec(o.parent,e);return fe(s,t)}}function he(e,t,n,o){let r=t;const i=[];for(;rt.priority)&&e.getIdentity()t instanceof e))throw new _a('view-writer-insert-invalid-node');t.is('text')||Ce(t.getChildren())}}function Te(e){return e&&(e.is('containerElement')||e.is('documentFragment'))}function Pe(e){const t=pe(e.start),n=pe(e.end);if(!t||!n||t!==n)throw new _a('view-writer-invalid-range-container')}function Ee(e){return(t,n,o,i)=>{const r=e instanceof Qd?e.clone(!0):e(n,o,i);if(r&&o.consume(n.item,'insert')){const e=i.mapper.toViewPosition(n.range.start);i.mapper.bindElements(n.item,r),fc.insert(e,r)}}}function Se(){return(e,t,n,o)=>{if(n.consume(t.item,'insert')){const e=o.mapper.toViewPosition(t.range.start),n=new $d(t.item.data);fc.insert(e,n)}}}function Ve(e){return(t,n,o,i)=>{let r,a;if(e instanceof Qd?(r=e.clone(!0),a=e.clone(!0)):(n.isOpening=!0,r=e(n,o,i),n.isOpening=!1,a=e(n,o,i)),r&&a){const e=n.markerRange,s=t.name;if(!e.isCollapsed||o.consume(e,s)){for(const t of e)if(!o.consume(t.item,s))return;const t=i.mapper;fc.insert(t.toViewPosition(e.start),r),e.isCollapsed||fc.insert(t.toViewPosition(e.end),a)}}}}function Oe(e){return e=e||((e,t)=>({value:e,key:t})),(t,n,o,i)=>{if(o.consume(n.item,Le(t.name))){const{key:t,value:r}=e(n.attributeNewValue,n.attributeKey,n,o,i);i.mapper.toViewElement(n.item).setAttribute(t,r)}}}function Re(e){return e=e||((e,t)=>({key:t})),(t,n,o,i)=>{if(o.consume(n.item,Le(t.name))){const{key:t}=e(n.attributeOldValue,n.attributeKey,n,o,i);i.mapper.toViewElement(n.item).removeAttribute(t)}}}function Fe(e){return(t,n,o,i)=>{const r=e instanceof Qd?e.clone(!0):e(n.attributeNewValue,n,o,i);if(!r)return;if(!o.consume(n.item,Le(t.name)))return;let a=i.mapper.toViewRange(n.range);if(null!==n.attributeOldValue&&!(e instanceof Qd)){const t=e(n.attributeOldValue,n,o,i);a=fc.unwrap(a,t)}fc.wrap(a,r)}}function Ie(e){return(t,n,o,i)=>{const r=e instanceof Qd?e.clone(!0):e(n.attributeOldValue,n,o,i);if(r&&o.consume(n.item,Le(t.name))){const e=i.mapper.toViewRange(n.range);fc.unwrap(e,r)}}}function Ne(){return(e,t,n,o)=>{if(!n.consume(t.item,'remove'))return;let i=o.mapper.toViewPosition(t.sourcePosition),r;if(t.item.is('element'))i=i.getLastMatchingPosition((e)=>!e.item.is('containerElement')),i.parent.is('text')&&i.isAtEnd&&(i=ec.createAfter(i.parent)),r=tc.createOn(i.nodeAfter);else{const e=je(i,t.item.offsetSize);r=new tc(i,e)}fc.remove(r.getTrimmed()),'$graveyard'==t.item.root.rootName&&o.mapper.unbindModelElement(t.item)}}function Be(e){return(t,n,o,i)=>{const r='function'==typeof e?e(n,o,i):e,a=n.item;if(r&&!n.markerRange.isCollapsed&&a.is('textProxy')&&o.consume(a,t.name)){r.id||(r.id=n.markerName);const e=ze(r),o=i.mapper.toViewRange(n.range);'addMarker'==t.name.split(':')[0]?fc.wrap(o,e):fc.unwrap(o,e)}}}function Me(e){return(t,n,o,i)=>{const r='function'==typeof e?e(n,o,i):e,a=n.item;if(r&&!n.markerRange.isCollapsed&&a.is('element')&&o.test(n.item,t.name)){r.priority||(r.priority=10),r.id||(r.id=n.markerName);const e=i.mapper.toViewElement(a),s='addMarker'==t.name.split(':')[0],l=s?'addHighlight':'removeHighlight';if(e&&e.getCustomProperty(l)){o.consume(n.item,t.name);for(const e of el.createIn(a))o.consume(e.item,t.name);e.getCustomProperty(l)(e,s?r:r.id)}}}}function De(e){return(t,n,o,i)=>{let r,a;if(e instanceof Qd?(r=e.clone(!0),a=e.clone(!0)):(n.isOpening=!0,r=e(n,o,i),n.isOpening=!1,a=e(n,o,i)),r&&a){const e=n.markerRange,s=t.name;if(!e.isCollapsed||o.consume(e,s)){for(const t of e)if(!o.consume(t.item,s))return;const t=i.mapper.toViewRange(e);fc.clear(t.getEnlarged(),a),r.isSimilar(a)||fc.clear(t.getEnlarged(),r)}}}}function Le(e){const t=e.split(':');return t[0]+':'+t[1]}function je(e,t){const n=new Gd({startPosition:e,singleCharacters:!0});let o=0;for(const i of n)if('text'==i.type&&(o++,o==t))return n.position}function ze(e){const t=new bc('span',e.attributes);if(e.class){const n=Array.isArray(e.class)?e.class:[e.class];t.addClass(...n)}return e.priority&&(t.priority=e.priority),t.setCustomProperty('highlightDescriptorId',e.id),t}function qe(e,t){t=We(t);const n=t.reduce((e,t)=>e+t.offsetSize,0),o=e.parent;$e(e);const i=e.index;return o.insertChildren(i,t),Ue(o,i+t.length),Ue(o,i),new el(e,e.getShiftedBy(n))}function He(e){if(!e.isFlat)throw new _a('model-writer-remove-range-not-flat: Trying to remove a range which starts and ends in different element.');const t=e.start.parent;$e(e.start),$e(e.end);const n=t.removeChildren(e.start.index,e.end.index-e.start.index);return Ue(t,e.start.index),n}function We(e){const t=[];e instanceof Array||(e=[e]);for(let n=0;n{if(!t.output&&n.consume(t.input,{name:!0})){const e=o.convertChildren(t.input,n,t);t.output=new ic(We(e))}}}function Ge(){return(e,t,n,o)=>{const i={name:'$text',inside:t.context};o.schema.check(i)&&n.consume(t.input)&&(t.output=new Ks(t.input.data))}}function Ye(){const e=new Set(['insert','move','remove','reinsert']);this.listenTo(this.root.document,'change',(t,n,o)=>{e.has(n)&&Xe.call(this,n,o.range,o.sourcePosition)},{priority:'high'})}function Xe(e,t,n){const o=t.end.offset-t.start.offset;let i;switch(e){case'insert':const r='sticksToNext'==this.stickiness;i=this._getTransformedByInsertion(t.start,o,r);break;case'move':case'remove':case'reinsert':const a=el.createFromPositionAndShift(n,o),s=a.containsPosition(this)||a.start.isEqual(this)&&'sticksToNext'==this.stickiness||a.end.isEqual(this)&&'sticksToPrevious'==this.stickiness;if(s)i=this._getCombined(n,t.start);else{const e='sticksToNext'==this.stickiness;i=this._getTransformedByMove(n,t.start,o,e)}}if(!this.isEqual(i)){const e=Zs.createFromPosition(this);this.path=i.path,this.root=i.root,this.fire('change',e)}}function Ze(e,t,n,o){o||(o=e.model.batch()),n.isCollapsed||e.deleteContent(n,o);const i=new xc(e,o,n.anchor);let r;r=t.is('documentFragment')?t.getChildren():[t],i.handleNodes(r,{isFirst:!0,isLast:!0});const a=i.getSelectionRange();a?n.setRanges([a]):wa.warn('insertcontent-no-range: Cannot determine a proper selection range after insertion.')}function et(e){return e.is('text')?'$text':e.name}function tt(e,t,n={}){if(!e.isCollapsed){const o=t.document.schema;if(!n.doNotResetEntireContent&<(o,e))return void st(t,e);const i=e.getFirstRange(),r=i.start,a=vc.createFromPosition(i.end);i.start.isTouching(i.end)||t.remove(i),n.leaveUnmerged||(nt(t,r,a),o.removeDisallowedAttributes(r.parent.getChildren(),r,t)),e.setCollapsedAt(r),it(o,r)&&at(t,r,e),a.detach()}}function nt(e,t,n){const o=t.parent,i=n.parent;if(o!=i&&o.parent&&i.parent&&rt(t,n)){for(t=Zs.createAfter(o),n=Zs.createBefore(i),n.isEqual(t)||e.move(i,t),e.merge(t);n.parent.isEmpty;){const t=n.parent;n=Zs.createBefore(t),e.remove(t)}nt(e,t,n)}}function it(e,t){const n=e.check({name:'$text',inside:t}),o=e.check({name:'paragraph',inside:t});return!n&&o}function rt(e,t){const n=e.root.document.schema,o=new el(e,t);for(const i of o.getWalker())if(n.objects.has(i.item.name)||n.limits.has(i.item.name))return!1;return!0}function at(e,t,n){const o=new Gs('paragraph');e.insert(t,o),n.setCollapsedAt(o)}function st(e,t){const n=e.document.schema.getLimitElement(t);e.remove(el.createIn(n)),at(e,Zs.createAt(n),t)}function lt(e,t){const n=e.getLimitElement(t);if(!t.containsEntireContent(n))return!1;const o=t.getFirstRange();return o.start.parent!=o.end.parent&&e.check({name:'paragraph',inside:n.name})}function dt(e){return!!e&&1==e.length&&/[\u0300-\u036f\u1ab0-\u1aff\u1dc0-\u1dff\u20d0-\u20ff\ufe20-\ufe2f]/.test(e)}function ct(e){return!!e&&1==e.length&&/[\ud800-\udbff]/.test(e)}function mt(e){return!!e&&1==e.length&&/[\udc00-\udfff]/.test(e)}function ut(e,t){return ct(e.charAt(t-1))&&mt(e.charAt(t))}function pt(e,t){return dt(e.charAt(t))}function gt(e,t,n={}){const o=e.model.schema,i='backward'!=n.direction,r=n.unit?n.unit:'character',a=t.focus,s=new Ys({boundaries:bt(a,i),singleCharacters:!0,direction:i?'forward':'backward'}),l={walker:s,schema:o,isForward:i,unit:r};for(let o;o=s.next();){if(o.done)return;const e=ft(l,o.value);if(e)return void t.moveFocusTo(e)}}function ft(e,t){if('text'==t.type)return ht(e.walker,e.unit);if(t.type==(e.isForward?'elementStart':'elementEnd')){if(e.schema.objects.has(t.item.name))return Zs.createAt(t.item,e.isForward?'after':'before');if(e.schema.check({name:'$text',inside:t.nextPosition}))return t.nextPosition}else{if(e.schema.limits.has(t.item.name))return void e.walker.skip(()=>!0);if(e.schema.check({name:'$text',inside:t.nextPosition}))return t.nextPosition}}function ht(e,t){const n=e.position.textNode;if(n){const o=n.data;for(let i=e.position.offset-n.startOffset;ut(o,i)||'character'==t&&pt(o,i);)e.next(),i=e.position.offset-n.startOffset}return e.position}function bt(e,t){const n=e.root,o=Zs.createAt(n,t?'end':0);return t?new el(e,o):new el(o,e)}function _t(e){const t=new ic,n=e.getFirstRange();if(!n||n.isCollapsed)return t;const o=n.start.root,i=n.start.getCommonPath(n.end),r=o.getNodeByPath(i);let a=n.start.parent==n.end.parent?n:el.createFromParentsAndOffsets(r,n.start.path[i.length],r,n.end.path[i.length]+1);const s=a.end.offset-a.start.offset;for(const n of a.getItems({shallow:!0}))n.is('textProxy')?t.appendChildren(new Ks(n.data,n.getAttributes())):t.appendChildren(n.clone(!0));if(a!=n){const e=n._getTransformedByMove(a.start,Zs.createAt(t,0),s)[0],o=new el(Zs.createAt(t),e.start),i=new el(e.end,Zs.createAt(t,'end'));kt(i),kt(o)}return t}function kt(e){const t=[];Array.from(e.getItems({direction:'backward'})).map((e)=>el.createOn(e)).filter((t)=>{const n=(t.start.isAfter(e.start)||t.start.isEqual(e.start))&&(t.end.isBefore(e.end)||t.end.isEqual(e.end));return n}).forEach((e)=>{t.push(e.start.parent),He(e)}),t.forEach((e)=>{for(let t=e;t.parent&&t.isEmpty;){const e=el.createOn(t);t=t.parent,He(e)}})}function wt(e){var t=-1,n=e?e.length:0;for(this.__data__=new Tl;++te+t.operations.length,0)}function Lt(e,t){const n=e[e.length-1];let o=n.operations.length+n.baseVersion;const r=new im;for(let n=0;n{e.has(n)&&Zt.call(this,n,r,i,o.range,o.sourcePosition)},{priority:'high'})}function Zt(e,t,n,o,i){const r=o.end.offset-o.start.offset;let a=o.start;('move'==e||'remove'==e||'reinsert'==e)&&(a=a._getTransformedByInsertion(i,r));const s=this._getTransformedByDocumentChange(e,t,a,r,i);('move'==e||'remove'==e||'reinsert'==e)&&3==s.length&&(s[2]=o);const l=el.createFromRanges(s),d=!l.isEqual(this),c=this.containsPosition(a),m=i&&(this.containsPosition(i)||this.start.isEqual(i));if(d){const t=el.createFromRange(this);this.start=l.start,this.end=l.end,this.fire('change:range',t,{type:e,batch:n,range:o,sourcePosition:i})}else(c||m)&&this.fire('change:content',el.createFromRange(this),{type:e,batch:n,range:o,sourcePosition:i})}function en(e,t){if(e.size!=t.size)return!1;for(const n of e.entries()){const e=JSON.stringify(n[1]),o=JSON.stringify(t.get(n[0]));if(e!==o)return!1}return!0}function tn(e,t){return!t.has(e)&&(t.add(e),e.document.schema.itemExtends(e.name,'$block')&&e.parent)}function nn(e,t){const n=e.parent.getAncestors({parentFirst:!0,includeSelf:!0}),o=n.find((e)=>tn(e,t));return n.forEach((e)=>t.add(e)),o}function on(e){return e instanceof Qs||e instanceof Ks?e.getAttributes():null}function rn(e,t,n){if(!t||'transparent'==t.type)return;const o=e.range&&e.range.start.parent;!o||o.isEmpty||n.enqueueChanges(()=>{const e=Array.from(o.getAttributeKeys()).filter((e)=>e.startsWith(_p));for(const n of e)t.removeAttribute(o,n)})}function an(e,t,n){for(let o=n.length-1,i=t.length-1;0<=o&&0<=i;){const r=t[i];if(!e.hasItem(r))return!1;const a=e._extensionChains.get(r);if(a.includes(n[o]))o--,i--;else return!1}return!0}function sn(e){const t=e.textNode;if(t){const n=t.data,o=e.offset-t.startOffset;return!ut(n,o)&&!pt(n,o)}return!0}function*ln(e,t){for(let n=!1;!n;){if(n=!0,e){const t=e.next();t.done||(n=!1,yield{walker:e,value:t.value})}if(t){const e=t.next();e.done||(n=!1,yield{walker:t,value:e.value})}}}function dn(e){return!!(e&&pl(e.addEventListener))}function cn(e){return e['data-ck-expando']||(e['data-ck-expando']=s())}function mn(e){let t=0;for(const n of e)t++;return t}function un(e){return e instanceof Text&&e.data.substr(0,Bp)===Mp}function pn(e){return e.data.length==Bp&&un(e)}function gn(e){return un(e)?e.data.slice(Bp):e.data}function fn(e,t){let n=Dp.get(t);return n||(n=t(window.document),Dp.set(t,n)),e.isEqualNode(n)}function hn(e){e.on('keydown',bn)}function bn(e,t){if(t.keyCode==uc.arrowleft){const e=t.domTarget.ownerDocument.defaultView.getSelection();if(1==e.rangeCount&&e.getRangeAt(0).collapsed){const t=e.getRangeAt(0).startContainer,n=e.getRangeAt(0).startOffset;un(t)&&n<=Bp&&e.collapse(t,0)}}}function _n(e,t,o){function i(n){const i=(c[n-1]===void 0?-1:c[n-1])+1,m=c[n+1]===void 0?-1:c[n+1],u=i>m?-1:1;d[n+u]&&(d[n]=d[n+u].slice(0)),d[n]||(d[n]=[]),d[n].push(i>m?r:a);let p=ia(i,m),g=p-n;for(;gn;u--)c[u]=i(u);c[n]=i(n),m++}while(c[n]!==l);return d[n].slice(1)}function kn(e,t,n){e.insertBefore(n,e.childNodes[t]||null)}function wn(e){const t=e.parentNode;t&&t.removeChild(e)}function yn(e){if('false'==e.getAttribute('contenteditable'))return!1;const t=e.findAncestor((e)=>e.hasAttribute('contenteditable'));return!t||'true'==t.getAttribute('contenteditable')}function vn(e){let t=0;for(;e.previousSibling;)e=e.previousSibling,t++;return t}function xn(e){const t=[];for(;e&&e.nodeType!=Node.DOCUMENT_NODE;)t.unshift(e),e=e.parentNode;return t}function An(e,t){const n=xn(e),o=xn(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}function Cn(e,t,n){let o=xn(e);return n&&(o=o.slice(o.indexOf(n)+1)),o.some((e)=>e.tagName&&t.includes(e.tagName.toLowerCase()))}function Tn(e,t){for(;e&&e!=jp.document;)t(e),e=e.parentNode}function Pn(e){return e==uc.arrowright||e==uc.arrowleft||e==uc.arrowup||e==uc.arrowdown}function En(e){return'[object Range]'==Object.prototype.toString.apply(e)}function Sn(e){return'[object Window]'==Object.prototype.toString.apply(e)}function Vn(e){const t=e.ownerDocument.defaultView.getComputedStyle(e);return{top:parseInt(t.borderTopWidth,10),right:parseInt(t.borderRightWidth,10),bottom:parseInt(t.borderBottomWidth,10),left:parseInt(t.borderLeftWidth,10)}}function On(e,t){for(const n of ig)e[n]=t[n]}function Rn(e){return!!ng(e)&&e===e.ownerDocument.body}function Fn({target:e,viewportOffset:t=0}){const n=jn(e);for(let o=n,i=null;o;){let r;r=o==n?zn(e):zn(i),Nn(r,()=>qn(e,o));const a=qn(e,o);In(o,a,t),o.parent==o?o=null:(i=o.frameElement,o=o.parent)}}function In(e,t,n){const o=t.clone().moveBy(0,n),i=t.clone().moveBy(0,-n),r=new og(e).excludeScrollbarsAndBorders();if(![i,o].every((e)=>r.contains(e))){let{scrollX:a,scrollY:s}=e;Mn(i,r)?s-=r.top-t.top+n:Bn(o,r)&&(s+=t.bottom-r.bottom+n),Dn(t,r)?a-=r.left-t.left+n:Ln(t,r)&&(a+=t.right-r.right+n),e.scrollTo(a,s)}}function Nn(e,t){const n=jn(e);for(let o,i;e!=n.document.body;)i=t(),o=new og(e).excludeScrollbarsAndBorders(),o.contains(i)||(Mn(i,o)?e.scrollTop-=o.top-i.top:Bn(i,o)&&(e.scrollTop+=i.bottom-o.bottom),Dn(i,o)?e.scrollLeft-=o.left-i.left:Ln(i,o)&&(e.scrollLeft+=i.right-o.right)),e=e.parentNode}function Bn(e,t){return e.bottom>t.bottom}function Mn(e,t){return e.topt.right}function jn(e){return En(e)?e.startContainer.ownerDocument.defaultView:e.ownerDocument.defaultView}function zn(e){if(En(e)){let t=e.commonAncestorContainer;return t.nodeType==Node.TEXT_NODE&&(t=t.parentNode),t}return e.parentNode}function qn(e,t){const n=jn(e),o=new og(e);if(n===t)return o;for(let i=n;i!=t;){const e=i.frameElement,t=new og(e).excludeScrollbarsAndBorders();o.moveBy(t.left,t.top),i=i.parent}return o}function Hn(e,t){return(n,o)=>{const i=o.newSelection,r=new bp,a=[];for(const e of i.getRanges())a.push(t.toModelRange(e));r.setRanges(a,i.isBackward),r.isEqual(e.selection)||e.enqueueChanges(()=>{e.selection.setTo(r)})}}function Wn(){return(e,t,n,o)=>{const i=t.selection;if(!i.isCollapsed&&n.consume(i,'selection')){o.viewSelection.removeAllRanges();for(const e of i.getRanges()){const t=o.mapper.toViewRange(e);o.viewSelection.addRange(t,i.isBackward)}}}}function Un(){return(e,t,n,o)=>{const i=t.selection;if(i.isCollapsed&&n.consume(i,'selection')){const e=i.getFirstPosition(),t=o.mapper.toViewPosition(e),n=fc.breakAttributes(t);o.viewSelection.removeAllRanges(),o.viewSelection.addRange(new tc(n,n))}}}function $n(e){return(t,n,o,i)=>{const r=e instanceof Qd?e.clone(!0):e(n.value,n,n.selection,o,i);if(r){const e='selectionAttribute:'+n.key;Qn(n.selection,i.viewSelection,r,o,e)}}}function Kn(e){return(t,n,o,i)=>{const r='function'==typeof e?e(n,o,i):e;if(r){r.id||(r.id=n.markerName);const e=ze(r),t='selectionMarker:'+n.markerName;Qn(n.selection,i.viewSelection,e,o,t)}}}function Qn(e,t,n,o,i){if(!e.isCollapsed)return;if(!o.consume(e,i))return;let r=t.getFirstPosition();Jn(r.parent)&&(r=r.getLastMatchingPosition((e)=>e.item.is('uiElement'))),r=fc.wrapPosition(r,n),t.removeAllRanges(),t.addRange(new tc(r,r))}function Jn(e){if(!e.is('element'))return!1;for(const t of e.getChildren())if(!t.is('uiElement'))return!1;return!0}function Gn(){return(e,t,n,o)=>{for(const i of o.viewSelection.getRanges())i.isCollapsed&&i.end.parent.document&&fc.mergeAttributes(i.start);o.viewSelection.removeAllRanges()}}function Yn(){return(e,t,n,o)=>o.viewSelection.setFake(!1)}function Xn(e){return e instanceof HTMLTextAreaElement?e.value:e.innerHTML}function Zn(e,t){e instanceof HTMLTextAreaElement&&(e.value=t),e.innerHTML=t}function eo(e){return(e+'').toLowerCase()}function to({origin:e,originKeystrokeHandler:t,originFocusTracker:n,toolbar:o,beforeFocus:i,afterBlur:r}){n.add(o.element),t.set('Alt+F10',(e,t)=>{n.isFocused&&!o.focusTracker.isFocused&&(i&&i(),o.focus(),t())}),o.keystrokes.set('Esc',(t,n)=>{o.focusTracker.isFocused&&(e.focus(),r&&r(),n())})}function no(e){return Array.isArray(e)?{items:e}:e?Object.assign({items:[]},e):{items:[]}}function oo(e){return e.every((e)=>'string'==typeof e)}function io(e){return!!e&&((e.value&&(e=e.value),Array.isArray(e))?e.some(io):!!(e instanceof bg))}function ro(e,t){return e.map((e)=>e instanceof bg?e.getValue(t):e)}function ao(e,t,{node:n}){let o=ro(e,n);o=1==e.length&&e[0]instanceof kg?o[0]:o.reduce(_o,''),yo(o)?t.remove():t.set(o)}function so(e){return{set(t){e.textContent=t},remove(){e.textContent=''}}}function lo(e,t,n){return{set(o){e.setAttributeNS(n,t,o)},remove(){e.removeAttributeNS(n,t)}}}function co(e,t){return{set(n){e.style[t]=n},remove(){e.style[t]=null}}}function mo(e){const t=fg(e,(e)=>{if(e&&(e instanceof bg||xo(e)||vo(e)||Ao(e)))return e});return t}function uo(e){if('string'==typeof e?e=fo(e):e.text&&ho(e),e.on&&(e.eventListeners=go(e.on),delete e.on),!e.text){e.attributes&&po(e.attributes);const t=[];if(e.children)if(Ao(e.children))t.push(e.children);else for(const n of e.children)xo(n)||vo(n)||dn(n)?t.push(n):t.push(new hg(n));e.children=t}return e}function po(e){for(const t in e)e[t].value&&(e[t].value=[].concat(e[t].value)),bo(e,t)}function go(e){for(const t in e)bo(e,t);return e}function fo(e){return{text:[e]}}function ho(e){Array.isArray(e.text)||(e.text=[e.text])}function bo(e,t){Array.isArray(e[t])||(e[t]=[e[t]])}function _o(e,t){return yo(t)?e:yo(e)?t:`${e} ${t}`}function ko(e,t){for(const n in t)e[n]?e[n].push(...t[n]):e[n]=t[n]}function wo(e,t){if(t.attributes&&(!e.attributes&&(e.attributes={}),ko(e.attributes,t.attributes)),t.eventListeners&&(!e.eventListeners&&(e.eventListeners={}),ko(e.eventListeners,t.eventListeners)),t.text&&e.text.push(...t.text),t.children&&t.children.length){if(e.children.length!=t.children.length)throw new _a('ui-template-extend-children-mismatch: The number of children in extended definition does not match.');let n=0;for(const o of t.children)wo(e.children[n++],o)}}function yo(e){return!e&&0!==e}function vo(e){return e instanceof wg}function xo(e){return e instanceof hg}function Ao(e){return e instanceof gg}function Co(){return{children:[],bindings:[],attributes:{}}}function To(e){return'class'==e||'style'==e}function Po(e){return(t)=>t+e}function Eo(e){return!!(e.focus&&'none'!=jp.window.getComputedStyle(e.element).display)}function So(e){return e.bindTemplate.to((t)=>{t.target===e.element&&t.preventDefault()})}function Vo(e){const t=e.files?Array.from(e.files):[],n=e.items?Array.from(e.items):[];return t.length?t:n.filter((e)=>'file'===e.kind).map((e)=>e.getAsFile())}function Oo(e,t){const n=t.target.ownerDocument,o=t.clientX,i=t.clientY;let r;return n.caretRangeFromPoint&&n.caretRangeFromPoint(o,i)?r=n.caretRangeFromPoint(o,i):t.rangeParent&&(r=n.createRange(),r.setStart(t.rangeParent,t.rangeOffset),r.collapse(!0)),r?e.domConverter.domRangeToView(r):e.selection.getFirstRange()}function Ro(e){return e=e.replace(//g,'>').replace(/\n\n/g,'

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

')&&(e=`

${e}

`),e}function Fo(e){return e.replace(/(\s+)<\/span>/g,(e,t)=>1==t.length?' ':t)}function Io(e){let t='';if(e.is('text')||e.is('textProxy'))t=e.data;else if(e.is('img')&&e.hasAttribute('alt'))t=e.getAttribute('alt');else{let n=null;for(const o of e.getChildren()){const e=Io(o);n&&(n.is('containerElement')||o.is('containerElement'))&&(Dg.includes(n.name)||Dg.includes(o.name)?t+='\n':t+='\n\n'),t+=e,n=o}}return t}function No(e,t,n,o){const i=n.isCollapsed,r=n.getFirstRange(),a=r.start.parent,s=r.end.parent;if(o.limits.has(a.name)||o.limits.has(s.name))return void(i||a!=s||e.deleteContent(n,t));if(i)Bo(t,n,r.start);else{const o=!(r.start.isAtStart&&r.end.isAtEnd);e.deleteContent(n,t,{leaveUnmerged:o}),o&&(a==s?Bo(t,n,n.focus):n.setCollapsedAt(s))}}function Bo(e,t,n){const o=n.parent,i=new o.constructor(o.name,o.getAttributes());n.isAtEnd?e.insert(Zs.createAfter(n.parent),i):n.isAtStart?e.insert(Zs.createBefore(n.parent),i):e.split(n),t.setCollapsedAt(n.parent.nextSibling)}function Mo(e,t){function n(){a&&(i.push(a),a=null)}function o(e){return a&&a.type==e}const i=[];let r=0,a;return e.forEach((e)=>{'equal'==e?(n(),r++):'insert'==e?(o('insert')?a.values.push(t[r]):(n(),a={type:'insert',index:r,values:[t[r]]}),r++):o('delete')?a.howMany++:(n(),a={type:'delete',index:r,howMany:1})}),n(),i}function Do(e){return!!e.ctrlKey||Qg.includes(e.keyCode)}function Lo(e,t){return e instanceof $d&&t instanceof $d?e.data===t.data:e===t}function jo(e){if(1==e.newChildren.length-e.oldChildren.length){const t=_n(e.oldChildren,e.newChildren,Lo),n=Mo(t,e.newChildren);if(!(1e.node).reduce((e,t)=>e.getCommonAncestor(t,{includeSelf:!0}));return t?t.getAncestors({includeSelf:!0,parentFirst:!0}).find((e)=>e.is('containerElement')||e.is('rootElement')):void 0}function qo(e){if(0==e.length)return!1;for(const t of e)if('children'===t.type&&!jo(t))return!0;return!1}function Ho(e){return e.every((e)=>e.is('text'))}function Wo(e){let t=null,n=null;for(let o=0;oe.start.isBefore(t.start)?-1:1);for(let o=1;oe+t.data,'')}function Xo(){return new Af}function Zo(e,t,n,o){if(E(e)){for(const i of e)Zo(i,t,n,o);return}const i=Array.from(e.getAttributeKeys());i.push(t.key);const r={name:e.name||'$text',attributes:i,inside:n.context};o.schema.check(r)&&e.setAttribute(t.key,t.value)}function ei(){return new Cf}function ti(e){const t=e.next();return t.done?null:t.value}function ni(e){return'blockQuote'==e.parent.name?e.parent:null}function oi(e){let t=0,n;const o=[];for(;t{if(n.test(t.input,{name:!0,class:'image'})&&o.schema.check({name:'image',inside:t.context,attributes:'src'})){const e=Array.from(t.input.getChildren()).find((e)=>e.is('img'));if(e&&e.hasAttribute('src')&&n.test(e,{name:!0})){const i=o.convertItem(e,n,t);t.context.push(i);const r=o.convertChildren(t.input,n,t);t.context.pop(),wc.insert(Zs.createAt(i),r),t.output=i}}}}function li(e,t,n=ci){for(const o of e)o.on(`addAttribute:${t}:image`,n()),o.on(`changeAttribute:${t}:image`,n()),o.on(`removeAttribute:${t}:image`,n())}function di(){return(e,t,n,o)=>{const i=e.name.split(':'),r=i[0]+':'+i[1],a=t.item;if(n.consume(a,r)){const e=o.mapper.toViewElement(a),n=e.getChild(0),r=i[0];if('removeAttribute'==r){const e=t.attributeOldValue;e.data&&(n.removeAttribute('srcset'),n.removeAttribute('sizes'),e.width&&n.removeAttribute('width'))}else{const e=t.attributeNewValue;e.data&&(n.setAttribute('srcset',e.data),n.setAttribute('sizes','100vw'),e.width&&n.setAttribute('width',e.width))}}}}function ci(){return(e,t,n,o)=>{const i=e.name.split(':'),r=i[0]+':'+i[1],a=t.item;if(n.consume(a,r)){const e=o.mapper.toViewElement(a),n=e.getChild(0),r=i[0];'removeAttribute'==r?n.removeAttribute(t.attributeKey):n.setAttribute(t.attributeKey,t.attributeNewValue)}}}function mi(e,t,n,o){const i=t.input;if(n.test(i,{name:!0,attribute:['src']})){const e=ui({name:'image',attributes:['src']},t.context,o.schema);if(e){const r=Object.assign({},t);r.context=e,t.output=o.convertItem(i,n,r),Yf.add(t.output)}}}function ui(e,t,n){t=t.slice();for(const o={name:e.name,attributes:e.attributes,inside:t};t.length&&!n.check(o);){const e=t.pop(),o='string'==typeof e?e:e.name;if(n.limits.has(o))return null}return t.length?t:null}function pi(e,t){if(t.output&&t.output.is('element')){const e=[];for(let n=t.output.childCount-1;0<=n;n--){const o=t.output.getChild(n);if(Yf.has(o)){const i=t.output.childCount-n-1;let r=null;0t.priority)return!0;return!(e.priorityhi(t.class)}function hi(e){return Array.isArray(e)?e.sort().join(','):e}function bi(e){return!!e.getCustomProperty(Zf)}function _i(e,t={}){function n(e){return Array.isArray(e)?e:[e]}return e.setAttribute('contenteditable','false'),e.getFillerOffset=xi,e.addClass(th),e.setCustomProperty(Zf,!0),t.label&&wi(e,t.label),ki(e,(e,t)=>e.addClass(...n(t.class)),(e,t)=>e.removeClass(...n(t.class))),e}function ki(e,t,n){const o=new Xf;o.on('change:top',(o,i)=>{i.oldDescriptor&&n(e,i.oldDescriptor),i.newDescriptor&&t(e,i.newDescriptor)}),e.setCustomProperty('addHighlight',(e,t)=>o.add(t)),e.setCustomProperty('removeHighlight',(e,t)=>o.remove(t))}function wi(e,t){e.setCustomProperty(eh,t)}function yi(e){const t=e.getCustomProperty(eh);return t?'function'==typeof t?t():t:''}function vi(e){return e.addClass('ck-editable'),e.setAttribute('contenteditable',e.isReadOnly?'false':'true'),e.on('change:isReadOnly',(t,n,o)=>{e.setAttribute('contenteditable',o?'false':'true')}),e.on('change:isFocused',(t,n,o)=>{o?e.addClass('ck-editable_focused'):e.removeClass('ck-editable_focused')}),e}function xi(){return null}function Ai(e,t){return e.setCustomProperty(oh,!0),_i(e,{label:function(){const n=e.getChild(0),o=n.getAttribute('alt');return o?`${o} ${t}`:t}})}function Ci(e){return!!e.getCustomProperty(oh)&&bi(e)}function Ti(e){const t=e.getSelectedElement();return!!(t&&Ci(t))}function Pi(e){return e instanceof Gs&&'image'==e.name}function Ei(){return new Yd('figure',{class:'image'},new lc('img'))}function Si(e){return e==uc.arrowright||e==uc.arrowleft||e==uc.arrowup||e==uc.arrowdown}function Vi(e){return e==uc.delete||e==uc.backspace}function Oi(e){return ee(e)==lh}function Ri(e){for(;e;){if(e instanceof Zd&&!(e instanceof Hp))return!0;e=e.parent}return!1}function Fi({emitter:e,activator:t,callback:n,contextElements:o}){e.listenTo(document,'mousedown',(e,{target:i})=>{if(t()){for(const e of o)if(e.contains(i))return;n()}})}function Ii({view:e}){e.listenTo(e.element,'submit',(t,n)=>{n.preventDefault(),e.fire('submit')},{useCapture:!0})}function Ni(e){for(;e&&'html'!=e.tagName.toLowerCase();){if('static'!=jp.window.getComputedStyle(e).position)return e;e=e.parentElement}return null}function Bi({element:e,target:t,positions:n,limiter:o,fitInViewport:i}){qa(t)&&(t=t()),qa(o)&&(o=o());const r=Ni(e.parentElement),a=new og(e),s=new og(t);let l,d;if(!o&&!i)[d,l]=Mi(n[0],s,a);else{const e=o&&new og(o).getVisible(),t=i&&new og(jp.window);[d,l]=Di(n,s,a,e,t)||Mi(n[0],s,a)}let{left:c,top:m}=Li(l);if(r){const e=Li(new og(r)),t=Vn(r);c-=e.left,m-=e.top,c+=r.scrollLeft,m+=r.scrollTop,c-=t.left,m-=t.top}return{left:c,top:m,name:d}}function Mi(e,t,n){const{left:o,top:i,name:r}=e(t,n);return[r,n.clone().moveTo(o,i)]}function Di(e,t,n,o,i){let r=0,a=0,s,l;const d=n.getArea();return e.some((e)=>{function c(){a=g,r=p,s=u,l=m}const[m,u]=Mi(e,t,n);let p,g;if(o)if(i){const e=o.getIntersection(i);p=e?e.getIntersectionArea(u):0}else p=o.getIntersectionArea(u);return i&&(g=i.getIntersectionArea(u)),i&&!o?g>a&&c():!i&&o?p>r&&c():g>a&&p>=r?c():g>=a&&p>r&&c(),p===d}),s?[l,s]:null}function Li({left:e,top:t}){const{scrollX:n,scrollY:o}=jp.window;return{left:e+n,top:t+o}}function ji(e){return ng(e)?e:En(e)?e.commonAncestorContainer:'function'==typeof e?ji(e()):null}function zi(e,t){return e.top-t.height-_h.arrowVerticalOffset}function qi(e){return e.bottom+_h.arrowVerticalOffset}function Hi(e){const t=e.plugins.get('ContextualBalloon');if(Ti(e.editing.view.selection)){const n=Wi(e);t.updatePosition(n)}}function Wi(e){const t=e.editing.view,n=_h.defaultPositions;return{target:t.domConverter.viewToDom(t.selection.getSelectedElement()),positions:[n.northArrowSouth,n.southArrowNorth]}}function Ui(e){const t=/^image\/(jpeg|png|gif|bmp)$/;return t.test(e.type)}function $i(e){const t=e.getSelectedElement();if(t)return Zs.createAfter(t);const n=e.getSelectedBlocks().next().value;if(n){if(n.isEmpty)return Zs.createAt(n);const t=Zs.createAfter(n);return e.focus.isTouching(t)?t:Zs.createBefore(n)}return e.focus}function Ki(e){return Array.from(e.types).includes('text/html')&&''!==e.getData('text/html')}function Qi(){const e=new pc('div',{class:'ck-progress-bar'});return e.setCustomProperty(zh,!0),e}function Ji(e){for(const t of e.getChildren())if(t.getCustomProperty(zh))return t}function Gi(e,t){return t.check({name:'paragraph',inside:Zs.createBefore(e)})}function Yi(e,t,n,o){if(n.test(t.input,{name:t.input.name})&&Zi(t.input,t.context,o.schema,!1)){t.context.push('paragraph');const e=o.convertItem(t.input,n,t);t.context.pop(),t.output=e}}function Xi(e,t,n,o){if(!t.output)return;const r=Uh.paragraphLikeElements.has(t.input.name)&&!t.output.is('element'),i=t.input.is('documentFragment')||t.input.is('element')&&t.output.is('element')||r;if(!i)return;const a=t.output.is('element');a&&t.context.push(t.output);let s=null;for(let a=0;a{$h.delete(e),t.insert(Zs.createAt(e),new Gs('paragraph'))})}}function nr(e,t,n){return n.check({name:t,inside:Zs.createBefore(e)})}function or(e,t){const n=new af(t);n.bind('label','isOn','isEnabled','withText','keystroke','tooltip').to(e);const o=new eb(t);return new Zh(t,n,o)}function ir(e,t){const n=or(e,t),o=n.listView=new Yh(t);return o.items.bindTo(e.items).using((e)=>{const n=new Xh(t);return n.bind(...Object.keys(e)).to(e),n}),o.items.delegate('execute').to(n),n.panelView.children.add(o),n.on('change:isOpen',(e,t,o)=>{o?rr(n):n.stopListening(document)}),n.on('execute',()=>{n.isOpen=!1}),n.keystrokes.set('arrowdown',(e,t)=>{n.isOpen&&(o.focus(),t())}),n.keystrokes.set('arrowup',(e,t)=>{n.isOpen&&(o.focusLast(),t())}),n}function rr(e){e.listenTo(document,'click',(t,{target:n})=>{e.element==n||e.element.contains(n)||(e.isOpen=!1)})}function ar(e,t){return Array.prototype.concat(...e.map((e)=>[e,t]))}function sr(e,t,n){const o=e.document;if(!o)throw new _a('view-placeholder-element-is-detached: Provided element is not placed in document.');lr(e),sb.has(o)||(sb.set(o,new Map),ab.listenTo(o,'render',()=>dr(o),{priority:'high'})),e.setAttribute('data-placeholder',t),sb.get(o).set(e,n),cr(e,n)}function lr(e){const t=e.document;e.removeClass('ck-placeholder'),e.removeAttribute('data-placeholder'),sb.has(t)&&sb.get(t).delete(e)}function dr(e){const t=sb.get(e);for(const[n,o]of t)cr(n,o)}function cr(e,t){const n=e.document;if(n){const o=n.selection,i=o.anchor;if(t&&!t())return void e.removeClass('ck-placeholder');const r=!Array.from(e.getChildren()).some((e)=>!e.is('uiElement'));return!n.isFocused&&r?void e.addClass('ck-placeholder'):void(r&&i&&i.parent!==e?e.addClass('ck-placeholder'):e.removeClass('ck-placeholder'))}}function mr(e,t){return()=>{const n=new Zd('figcaption');return n.document=e,n.setCustomProperty(lb,!0),sr(n,t),vi(n)}}function ur(e){for(const t of e.getChildren())if(t instanceof Gs&&'caption'==t.name)return t;return null}function pr(e){const t=e.parent;return'figcaption'==e.name&&t&&'figure'==t.name&&t.hasClass('image')?{name:!0}:null}function gr(e,t,n,o){if('insert'===t){const e=new Ys({boundaries:n.range,ignoreElementEnd:!0});for(const t of e){const e=t.item;'elementStart'==t.type&&Pi(e)&&!ur(e)&&o.document.enqueueChanges(()=>{ur(e)||o.insert(Zs.createAt(e,'end'),new Gs('caption'))})}}}function fr(e,t=!0){return(n,o,i,r)=>{const a=o.item;if((a.childCount||t)&&Pi(a.parent)){if(!i.consume(o.item,'insert'))return;const t=r.mapper.toViewElement(o.range.start.parent),n=e instanceof Qd?e.clone(!0):e();a.childCount||n.addClass('ck-hidden'),hr(n,o.item,t,r.mapper)}}}function hr(e,t,n,o){const i=ec.createAt(n,'end');fc.insert(i,e),o.bindElements(t,e)}function br(e){const t=e.getAncestors({includeSelf:!0}),n=t.find((e)=>'caption'==e.name);return n&&n.parent&&'image'==n.parent.name?n:null}function _r(e){return(t,n,o,i)=>{const r=t.name.split(':')[0],a=r+':imageStyle';if(o.test(n.item,a)){const t=yr(n.attributeNewValue,e),s=yr(n.attributeOldValue,e),l=i.mapper.toViewElement(n.item),d=vr(r,s,l),c=xr(r,t,l);(d||c)&&o.consume(n.item,a)}}}function kr(e){const t=e.filter((e)=>!e.isDefault);return(e,n,o,i)=>{for(const r of t)wr(r,n,o,i)}}function wr(e,t,n,o){const i=t.input,r=t.output;if(n.test(i,{class:e.className})&&Pi(r)){const a=[...r.getAttributeKeys(),'imageStyle'];o.schema.check({name:'image',inside:t.context,attributes:a})&&(n.consume(i,{class:e.className}),r.setAttribute('imageStyle',e.name))}}function yr(e,t){for(const n of t)if(n.name===e)return n}function vr(e,t,n){return t&&('changeAttribute'==e||'removeAttribute'==e)&&(n.removeClass(t.className),!0)}function xr(e,t,n){return t&&('addAttribute'==e||'changeAttribute'==e)&&(n.addClass(t.className),!0)}function Ar(e){const t=vb.defaultStyles,n=vb.defaultIcons;if('string'==typeof e)t[e]?e=Object.assign({},t[e]):(wa.warn('image-style-not-found: There is no such image style of given name.',{name:e}),e={name:e});else if(t[e.name]){const n=t[e.name],o=Object.assign({},e);for(const t in n)e.hasOwnProperty(t)||(o[t]=n[t]);e=o}return'string'==typeof e.icon&&n[e.icon]&&(e.icon=n[e.icon]),e}function Cr(e,t){return new el(Tr(e,t,!0),Tr(e,t,!1))}function Tr(e,t,n){let o=e.textNode||(n?e.nodeBefore:e.nodeAfter),i=null;for(;o&&o.getAttribute('linkHref')==t;)i=o,o=n?o.previousSibling:o.nextSibling;return i?Zs.createAt(i,n?'before':'after'):e}function Pr(e){return e.getAncestors().find((e)=>e instanceof Tb)}function Er(e,t,n){const o=t?e[0]:e[e.length-1];if(o.is('listItem'))for(let i=o[t?'previousSibling':'nextSibling'],r=o.getAttribute('indent');i&&i.is('listItem')&&i.getAttribute('indent')>=n;)r>i.getAttribute('indent')&&(r=i.getAttribute('indent')),i.getAttribute('indent')==r&&e[t?'unshift':'push'](i),i=i[t?'previousSibling':'nextSibling']}function Sr(e,t){return t.check({name:'listItem',attributes:['type','indent'],inside:Zs.createBefore(e)})}function Vr(e,t){const n=Or(e,!1);if(n)return void t.setAttribute(e,'type',n.getAttribute('type'));const o=Or(e,!0);o&&t.setAttribute(e,'type',o.getAttribute('type'))}function Or(e,t){for(let n=e[t?'nextSibling':'previousSibling'];n&&n.is('listItem')&&n.getAttribute('indent')>=e.getAttribute('indent');){if(n.getAttribute('indent')==e.getAttribute('indent'))return n;n=n[t?'nextSibling':'previousSibling']}return null}function Rr(){const e=!this.isEmpty&&('ul'==this.getChild(0).name||'ol'==this.getChild(0).name);return this.isEmpty||e?0:null}function Fr(e,t,n,o){if(n.test(t.item,'insert')&&n.test(t.item,'addAttribute:type')&&n.test(t.item,'addAttribute:indent')){n.consume(t.item,'insert'),n.consume(t.item,'addAttribute:type'),n.consume(t.item,'addAttribute:indent');const e=t.item,i=Qr(e,o.mapper),r=o.mapper.toViewPosition(Zs.createBefore(e));Yr(e,i,o.mapper,r)}}function Ir(e,t,n,o){if(!n.consume(t.item,'changeAttribute:type'))return;const i=o.mapper.toViewElement(t.item);fc.breakContainer(ec.createBefore(i)),fc.breakContainer(ec.createAfter(i));let r=i.parent;const a='numbered'==t.attributeNewValue?'ol':'ul';r=fc.rename(r,a),Gr(r,r.nextSibling),Gr(r.previousSibling,r)}function Nr(e,t,n,o){if(!n.consume(t.item,'remove'))return;let i=o.mapper.toViewPosition(t.sourcePosition);i=i.getLastMatchingPosition((e)=>!e.item.is('li'));const r=i.nodeAfter;fc.breakContainer(ec.createBefore(r)),fc.breakContainer(ec.createAfter(r));const a=r.parent,s=a.previousSibling,l=tc.createOn(a);fc.remove(l),s&&s.nextSibling&&Gr(s,s.nextSibling),Xr(t.item.getAttribute('indent')+1,t.sourcePosition,l.start,r,o.mapper),'$graveyard'==t.item.root.rootName&&o.mapper.unbindModelElement(t.item)}function Br(e,t,n,o){if(!n.consume(t.item,'changeAttribute:indent'))return;const i=o.mapper.toViewElement(t.item);fc.breakContainer(ec.createBefore(i)),fc.breakContainer(ec.createAfter(i));const r=i.parent,a=r.previousSibling,s=tc.createOn(r);fc.remove(s);let l;a&&a.nextSibling&&(l=Gr(a,a.nextSibling)),l||(l=s.start),Xr(t.attributeOldValue+1,t.range.start,s.start,i,o.mapper),Yr(t.item,i,o.mapper,l)}function Mr(e,t,n,o){if('listItem'!=t.item.name){let e=o.mapper.toViewPosition(t.range.start);const n=[];for(;('ul'==e.parent.name||'ol'==e.parent.name)&&(e=fc.breakContainer(e),'li'==e.parent.name);){const t=e,o=ec.createAt(e.parent,'end');if(!t.isEqual(o)){const e=fc.remove(new tc(t,o));n.push(e)}e=ec.createAfter(e.parent)}if(0e.is('ul')||e.is('ol')),i=new Gd({startPosition:ec.createAt(e,0)});for(const e of i)if('elementStart'==e.type&&e.item.is('li')){t.viewPosition=e.previousPosition;break}else if('elementEnd'==e.type&&e.item==o){t.viewPosition=e.nextPosition;break}}}function Hr(e,t){const n=t.viewPosition,o=n.parent,i=t.mapper;if('ul'==o.name||'ol'==o.name){if(!n.isAtEnd){const e=i.toModelElement(n.nodeAfter);t.modelPosition=Zs.createBefore(e)}else{const e=i.toModelElement(n.nodeBefore),o=i.getModelLength(n.nodeBefore);t.modelPosition=Zs.createBefore(e).getShiftedBy(o)}e.stop()}else if('li'==o.name&&n.nodeBefore&&('ul'==n.nodeBefore.name||'ol'==n.nodeBefore.name)){const r=i.toModelElement(o);let a=1,s=n.nodeBefore;for(;s&&(s.is('ul')||s.is('ol'));)a+=i.getModelLength(s),s=s.previousSibling;t.modelPosition=Zs.createBefore(r).getShiftedBy(a),e.stop()}}function Wr(e){return(t,n,o,i)=>{if('transparent'!=i.type)if('remove'==n){const t=o.range.end.offset-o.range.start.offset,n=o.sourcePosition._getTransformedByInsertion(o.range.start,t,!0);Ur(n,e,i),$r(n,!1,e,i)}else if('move'==n){const t=o.range.end.offset-o.range.start.offset,n=o.sourcePosition._getTransformedByInsertion(o.range.start,t,!0);Ur(n,e,i),$r(n,!1,e,i),Ur(o.range.start,e,i),$r(o.range.start,!1,e,i),Ur(o.range.end,e,i),$r(o.range.end,!0,e,i)}else if('rename'==n&&'listItem'==o.oldName&&'listItem'!=o.newName){const t=o.element;e.enqueueChanges(()=>{i.removeAttribute(t,'indent').removeAttribute(t,'type')});const n=Zs.createAfter(o.element);Ur(n,e,i)}else'insert'==n&&(Ur(o.range.start,e,i),$r(o.range.start,!1,e,i),Ur(o.range.end,e,i),$r(o.range.end,!0,e,i))}}function Ur(e,t,n){let o=e.nodeAfter;o&&'listItem'==o.name&&t.enqueueChanges(()=>{const e=o.previousSibling,t=e&&e.is('listItem')?e.getAttribute('indent')+1:0;let i=o.getAttribute('indent')-t;const r=[];for(;o&&'listItem'==o.name&&o.getAttribute('indent')>t;){i>o.getAttribute('indent')&&(i=o.getAttribute('indent'));const e=o.getAttribute('indent')-i;r.push({item:o,indent:e}),o=o.nextSibling}if(0{const e=Zr(i,!t);if(e&&e!=i)for(const n=e.getAttribute('indent'),r=e.getAttribute('type');i&&i.is('listItem')&&i.getAttribute('indent')>=n;)i.getAttribute('type')!=r&&i.getAttribute('indent')==n&&o.setAttribute(i,'type',r),i=i[t?'previousSibling':'nextSibling']})}function Kr(e,[t,n]){let o=t.is('documentFragment')?t.getChild(0):t;if(o&&o.is('listItem')){const e=n.getFirstPosition();let t=null;if(e.parent.is('listItem')?t=e.parent:e.nodeBefore&&e.nodeBefore.is('listItem')&&(t=e.nodeBefore),t){const e=t.getAttribute('indent');if(0e){if(!l||t.mapper.toViewElement(c))return c;c=c[n];continue}if(!i)return null;c=c[n]}return null}function Gr(e,t){return e&&t&&('ul'==e.name||'ol'==e.name)&&e.name==t.name?fc.mergeContainers(ec.createAfter(e)):null}function Yr(e,t,n,o){const i=t.parent;let r=Jr(e,{sameIndent:!0,smallerIndent:!0,checkAllSiblings:!0}),a;if(r&&r.getAttribute('indent')==e.getAttribute('indent')){const e=n.toViewElement(r);a=fc.breakContainer(ec.createAfter(e))}else r=e.previousSibling,a=r&&'listItem'==r.name?r.getAttribute('indent')=n;)e=e[o],e.getAttribute('indent')==n&&(i=e);return i}function ea(e){return e.getLastMatchingPosition((e)=>e.item.is('uiElement'))}function ta(e){let t=1;for(const n of e.getChildren())if('ul'==n.name||'ol'==n.name)for(const e of n.getChildren())t+=ta(e);return t}var na=Number.POSITIVE_INFINITY,oa=Math.min,ia=Math.max,ra=Math.floor;Object.defineProperty(t,'__esModule',{value:!0});var aa=Object.getPrototypeOf,sa=function(e){return aa(Object(e))},la=function(e){var t=!1;if(null!=e&&'function'!=typeof e.toString)try{t=!!(e+'')}catch(t){}return t},da=function(e){return!!e&&'object'==typeof e},ca=Object.prototype,ma=Function.prototype.toString,ua=ca.hasOwnProperty,pa=ma.call(Object),ga=ca.toString,fa=function(e){if(!da(e)||ga.call(e)!='[object Object]'||la(e))return!1;var t=sa(e);if(null===t)return!0;var n=ua.call(t,'constructor')&&t.constructor;return'function'==typeof n&&n instanceof n&&ma.call(n)==pa};class ha{constructor(e,t){this._config={},t&&this.define(t),e&&this._setObjectToTarget(this._config,e)}set(e,t){this._setToTarget(this._config,e,t)}define(e,t){this._setToTarget(this._config,e,t,!0)}get(e){return this._getFromSource(this._config,e)}_setToTarget(e,t,n,o=!1){if(fa(t))return void this._setObjectToTarget(e,t,o);const i=t.split('.');t=i.pop();for(const r of i)fa(e[r])||(e[r]={}),e=e[r];return fa(n)?(fa(e[t])||(e[t]={}),e=e[t],void this._setObjectToTarget(e,n,o)):void(o&&'undefined'!=typeof e[t]||(e[t]=n))}_getFromSource(e,t){const n=t.split('.');t=n.pop();for(const o of n){if(!fa(e[o])){e=null;break}e=e[o]}return e?e[t]:void 0}_setObjectToTarget(e,t,n){Object.keys(t).forEach((o)=>{this._setToTarget(e,o,t[o],n)})}}const ba='https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/framework/guides/support/error-codes.html';class _a extends Error{constructor(e,t){e=o(e),t&&(e+=' '+JSON.stringify(t)),super(e),this.name='CKEditorError',this.data=t}static isCKEditorError(e){return e instanceof _a}}const ka={error(e,t){console.error(o(e),t)},warn(e,t){console.warn(o(e),t)}};var wa=ka;class ya{constructor(e,t=[]){this._editor=e,this._availablePlugins=new Map,this._plugins=new Map;for(const n of t)this._availablePlugins.set(n,n),n.pluginName&&this._availablePlugins.set(n.pluginName,n)}*[Symbol.iterator](){for(const e of this._plugins)'function'==typeof e[0]&&(yield e)}get(e){return this._plugins.get(e)}load(e,t=[]){function n(e){return m.includes(e)||a.get(e)||l.has(e)?void 0:o(e).catch((t)=>{throw wa.error('plugincollection-load: It was not possible to load the plugin.',{plugin:e}),t})}function o(e){return new Promise((o)=>{l.add(e),e.requires&&e.requires.forEach((o)=>{const r=i(o);if(t.includes(r))throw new _a('plugincollection-required: Cannot load a plugin because one of its dependencies is listed inthe `removePlugins` option.',{plugin:r,requiredBy:e});n(r)});const r=new e(s);a._add(e,r),d.push(r),o()})}function i(e){return'function'==typeof e?e:a._availablePlugins.get(e)}function r(e){return e.map((e)=>i(e)).filter((e)=>!!e)}const a=this,s=this._editor,l=new Set,d=[],c=r(e),m=r(t),u=function(e){const t=[];for(const n of e)i(n)||t.push(n);return t.length?t:null}(e);if(u){const e='plugincollection-plugin-not-found: Some plugins are not available and could not be loaded.';return wa.error(e,{plugins:u}),Promise.reject(new _a(e,{plugins:u}))}return Promise.all(c.map(n)).then(()=>d)}destroy(){const e=Array.from(this).map(([,e])=>e).filter((e)=>'function'==typeof e.destroy).map((e)=>e.destroy());return Promise.all(e)}_add(e,t){this._plugins.set(e,t);const n=e.pluginName;n&&(this._plugins.has(n)?wa.warn('plugincollection-plugin-name-conflict: Two plugins with the same name were loaded.',{pluginName:n,plugin1:this._plugins.get(n).constructor,plugin2:e}):this._plugins.set(n,t))}}class va{constructor(){this._commands=new Map}add(e,t){this._commands.set(e,t)}get(e){return this._commands.get(e)}execute(e,...t){const n=this.get(e);if(!n)throw new _a('commandcollection-command-not-found: Command does not exist.',{commandName:e});n.execute(...t)}*names(){yield*this._commands.keys()}*commands(){yield*this._commands.values()}[Symbol.iterator](){return this._commands[Symbol.iterator]()}destroy(){for(const e of this.commands())e.destroy()}}let xa={};class Aa{constructor(e){this.lang=e||'en',this.t=(...e)=>this._t(...e)}_t(e,t){let n=i(this.lang,e);return t&&(n=n.replace(/%(\d+)/g,(e,n)=>n{this._delegations||(this._delegations=new Map);for(const o of e){const e=this._delegations.get(o);e?e.set(t,n):this._delegations.set(o,new Map([[t,n]]))}}}},stopDelegating(e,t){if(this._delegations)if(!e)this._delegations.clear();else if(!t)this._delegations.delete(e);else{const n=this._delegations.get(e);n&&n.delete(t)}}};var Oa=Va,Ra=function(e,t){return e===t||e!==e&&t!==t},Fa=Object.prototype,Ia=Fa.hasOwnProperty,Na=function(e,t,n){var o=e[t];Ia.call(e,t)&&Ra(o,n)&&(n!==void 0||t in e)||(e[t]=n)},Ba=function(e,t,n,o){n||(n={});for(var i=-1,r=t.length;++ie?-1:1;return t*1.7976931348623157e308}return e===e?e:0},ss=function(e){var t=as(e),n=t%1;return t===t?n?t-n:t:0},ls=ia,ds=function(e,t){if('function'!=typeof e)throw new TypeError('Expected a function');return t=ls(void 0===t?e.length-1:ss(t),0),function(){for(var n=arguments,o=-1,i=ls(n.length-t,0),r=Array(i);++oi?void 0:r,i=1),t=Object(t);++o{this.set(t,e[t])},this);_(this);const n=this[zs];if(e in this&&!n.has(e))throw new _a('observable-set-cannot-override: Cannot override an existing property.');Object.defineProperty(this,e,{enumerable:!0,configurable:!0,get(){return n.get(e)},set(t){const o=n.get(e);o===t&&n.has(e)||(n.set(e,t),this.fire('change:'+e,e,t,o))}}),this[e]=t},bind(...e){if(!e.length||!w(e))throw new _a('observable-bind-wrong-attrs: All attributes must be strings.');if(new Set(e).size!==e.length)throw new _a('observable-bind-duplicate-attrs: Attributes must be unique.');_(this);const t=this[Hs];e.forEach((e)=>{if(t.has(e))throw new _a('observable-bind-rebind: Cannot bind the same attribute more that once.')});const n=new Map;return e.forEach((e)=>{const o={attr:e,to:[]};t.set(e,o),n.set(e,o)}),{to:k,_observable:this,_bindAttrs:e,_to:[],_bindings:n}},unbind(...e){if(!(zs in this))return;const t=this[Hs],n=this[qs];if(e.length){if(!w(e))throw new _a('observable-unbind-wrong-attrs: Attributes must be strings.');e.forEach((e)=>{const o=t.get(e);let i,r,a,s;o.to.forEach((e)=>{i=e[0],r=e[1],a=n.get(i),s=a[r],s.delete(o),s.size||delete a[r],Object.keys(a).length||(n.delete(i),this.stopListening(i,'change'))}),t.delete(e)})}else n.forEach((e,t)=>{this.stopListening(t,'change')}),n.clear(),t.clear()},decorate(e){const t=this[e];if(!t)throw new _a('observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',{object:this,methodName:e});this.on(e,(e,n)=>{e.return=t.apply(this,n)}),this[e]=function(...t){return this.fire(e,t)}}};var Us=Ws;js(Ws,Oa);class $s{constructor(e){this.parent=null,this._attrs=P(e)}get index(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildIndex(this)))throw new _a('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get startOffset(){let e;if(!this.parent)return null;if(null===(e=this.parent.getChildStartOffset(this)))throw new _a('model-node-not-found-in-parent: The node\'s parent does not contain this node.');return e}get offsetSize(){return 1}get endOffset(){return this.parent?this.startOffset+this.offsetSize:null}get nextSibling(){const e=this.index;return null!==e&&this.parent.getChild(e+1)||null}get previousSibling(){const e=this.index;return null!==e&&this.parent.getChild(e-1)||null}get root(){let e=this;for(;e.parent;)e=e.parent;return e}get document(){return this.root==this?null:this.root.document||null}clone(){return new $s(this._attrs)}getPath(){const e=[];for(let t=this;t.parent;)e.unshift(t.startOffset),t=t.parent;return e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this:this.parent;n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}getCommonAncestor(e,t={}){const n=this.getAncestors(t),o=e.getAncestors(t);let r=0;for(;n[r]==o[r]&&n[r];)r++;return 0==r?null:n[r-1]}remove(){this.parent.removeChildren(this.index)}hasAttribute(e){return this._attrs.has(e)}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}setAttribute(e,t){this._attrs.set(e,t)}setAttributesTo(e){this._attrs=P(e)}removeAttribute(e){return this._attrs.delete(e)}clearAttributes(){this._attrs.clear()}toJSON(){const e={};return this._attrs.size&&(e.attributes=[...this._attrs]),e}}class Ks extends $s{constructor(e,t){super(t),this.data=e||''}get offsetSize(){return this.data.length}is(e){return'text'==e}clone(){return new Ks(this.data,this.getAttributes())}toJSON(){const e=super.toJSON();return e.data=this.data,e}static fromJSON(e){return new Ks(e.data,e.attributes)}}class Qs{constructor(e,t,n){if(this.textNode=e,0>t||t>e.offsetSize)throw new _a('model-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.offsetSize)throw new _a('model-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),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(e){return'textProxy'==e}getPath(){const e=this.textNode.getPath();return 0e+t.offsetSize,0)}getNode(e){return this._nodes[e]||null}getNodeIndex(e){const t=this._nodes.indexOf(e);return-1==t?null:t}getNodeStartOffset(e){const t=this.getNodeIndex(e);return null===t?null:this._nodes.slice(0,t).reduce((e,t)=>e+t.offsetSize,0)}indexToOffset(e){if(e==this._nodes.length)return this.maxOffset;const t=this._nodes[e];if(!t)throw new _a('model-nodelist-index-out-of-bounds: Given index cannot be found in the node list.');return this.getNodeStartOffset(t)}offsetToIndex(e){let t=0;for(const n of this._nodes){if(e>=t&&ee.toJSON())}}class Gs extends $s{constructor(e,t,n){super(t),this.name=e,this._children=new Js,n&&this.insertChildren(0,n)}get childCount(){return this._children.length}get maxOffset(){return this._children.maxOffset}get isEmpty(){return 0===this.childCount}is(e,t=null){return t?'element'==e&&t==this.name:'element'==e||e==this.name}getChild(e){return this._children.getNode(e)}getChildren(){return this._children[Symbol.iterator]()}getChildIndex(e){return this._children.getNodeIndex(e)}getChildStartOffset(e){return this._children.getNodeStartOffset(e)}clone(e=!1){const t=e?Array.from(this._children).map((e)=>e.clone(!0)):null;return new Gs(this.name,this.getAttributes(),t)}offsetToIndex(e){return this._children.offsetToIndex(e)}appendChildren(e){this.insertChildren(this.childCount,e)}insertChildren(e,t){t=S(t);for(const n of t)null!==n.parent&&n.remove(),n.parent=this;this._children.insertNodes(e,t)}removeChildren(e,t=1){const n=this._children.removeNodes(e,t);for(const o of n)o.parent=null;return n}getNodeByPath(e){let t=this;for(const n of e)t=t.getChild(t.offsetToIndex(n));return t}toJSON(){const e=super.toJSON();if(e.name=this.name,0e&&(e=this.boundaries.start.offset),i=t.offset-e}const r=t.offset-o.startOffset,a=new Qs(o,r-i,i);return t.offset-=i,this.position=t,V('text',a,e,t,i)}return t.path.pop(),this.position=t,this._visitedParent=n.parent,V('elementStart',n,e,t,1)}}var Xs=function(e){var t=e?e.length:0;return t?e[t-1]:void 0};class Zs{constructor(e,t){if(!e.is('element')&&!e.is('documentFragment'))throw new _a('model-position-root-invalid: Position root invalid.');if(!(t instanceof Array)||0===t.length)throw new _a('model-position-path-incorrect: Position path must be an array with at least one item.',{path:t});t=e.getPath().concat(t),e=e.root,this.root=e,this.path=t}get offset(){return Xs(this.path)}set offset(e){this.path[this.path.length-1]=e}get parent(){let e=this.root;for(let t=0;tn?0:n,t}isAfter(e){return'after'==this.compareWith(e)}isBefore(e){return'before'==this.compareWith(e)}isEqual(e){return'same'==this.compareWith(e)}isTouching(e){let t=null,n=null;const o=this.compareWith(e);switch(o){case'same':return!0;case'before':t=Zs.createFromPosition(this),n=Zs.createFromPosition(e);break;case'after':t=Zs.createFromPosition(e),n=Zs.createFromPosition(this);break;default:return!1;}for(let o=t.parent;t.path.length+n.path.length;){if(t.isEqual(n))return!0;if(t.path.length>n.path.length){if(t.offset!==o.maxOffset)return!1;t.path=t.path.slice(0,-1),o=o.parent,t.offset++}else{if(0!==n.offset)return!1;n.path=n.path.slice(0,-1)}}}_getTransformedByDeletion(e,t){const n=Zs.createFromPosition(this);if(this.root!=e.root)return n;if('same'==O(e.getParentPath(),this.getParentPath())){if(e.offsetthis.offset)return null;n.offset-=t}}else if('prefix'==O(e.getParentPath(),this.getParentPath())){const o=e.path.length-1;if(e.offset<=this.path[o]){if(e.offset+t>this.path[o])return null;n.path[o]-=t}}return n}_getTransformedByInsertion(e,t,n){const o=Zs.createFromPosition(this);if(this.root!=e.root)return o;if('same'==O(e.getParentPath(),this.getParentPath()))(e.offsett+1;){const t=o.maxOffset-n.offset;0!=t&&e.push(new el(n,n.getShiftedBy(t))),n.path=n.path.slice(0,-1),n.offset++,o=o.parent}for(;n.path.length<=this.end.path.length;){const t=this.end.path[n.path.length-1],o=t-n.offset;0!=o&&e.push(new el(n,n.getShiftedBy(o))),n.offset=t,n.path.push(0)}return e}getWalker(e={}){return e.boundaries=this,new Ys(e)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Ys(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new Ys(e);yield t.position;for(const n of t)yield n.nextPosition}getTransformedByDelta(e){const t=[el.createFromRange(this)],n=new Set(['insert','move','remove','reinsert']);for(const o of e.operations)if(n.has(o.type))for(let n=0;ne.start.isAfter(t.start)?1:-1);const n=e.indexOf(t),o=new this(t.start,t.end);for(let t=n-1;0<=t&&e[t].end.isEqual(o.start);t++)o.start=Zs.createFromPosition(e[t].start);for(let t=n+1;tn)return!1;var o=t.length-1;return n==o?t.pop():ol.call(t,n,1),!0},R.prototype.get=function(e){var t=this.__data__,n=tl(t,e);return 0>n?void 0:t[n][1]},R.prototype.has=function(e){return-1o?n.push([e,t]):n[o][1]=t,this};var il=R,rl=Function.prototype.toString,al=function(e){if(null!=e){try{return rl.call(e)}catch(t){}try{return e+''}catch(t){}}return''},sl=/[\\^$.*+?()[\]{}|]/g,ll=/^\[object .+?Constructor\]$/,dl=Object.prototype,cl=Function.prototype.toString,ml=dl.hasOwnProperty,ul=RegExp('^'+cl.call(ml).replace(sl,'\\$&').replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,'$1.*?')+'$'),pl=function(e){if(!La(e))return!1;var t=qa(e)||la(e)?ul:ll;return t.test(al(e))},gl=function(e,t){var n=e[t];return pl(n)?n:void 0},fl=gl(Object,'create'),hl=fl,bl=Object.prototype,_l=bl.hasOwnProperty,kl=Object.prototype,wl=kl.hasOwnProperty;F.prototype.clear=function(){this.__data__=hl?hl(null):{}},F.prototype['delete']=function(e){return this.has(e)&&delete this.__data__[e]},F.prototype.get=function(e){var t=this.__data__;if(hl){var n=t[e];return n==='__lodash_hash_undefined__'?void 0:n}return _l.call(t,e)?t[e]:void 0},F.prototype.has=function(e){var t=this.__data__;return hl?t[e]!==void 0:wl.call(t,e)},F.prototype.set=function(e,t){var n=this.__data__;return n[e]=hl&&void 0===t?'__lodash_hash_undefined__':t,this};var yl=F,vl=gl(us.a,'Map'),xl=vl,Al=function(e){var t=typeof e;return'string'==t||'number'==t||'symbol'==t||'boolean'==t?'__proto__'!==e:null===e},Cl=function(e,t){var n=e.__data__;return Al(t)?n['string'==typeof t?'string':'hash']:n.map};I.prototype.clear=function(){this.__data__={hash:new yl,map:new(xl||il),string:new yl}},I.prototype['delete']=function(e){return Cl(this,e)['delete'](e)},I.prototype.get=function(e){return Cl(this,e).get(e)},I.prototype.has=function(e){return Cl(this,e).has(e)},I.prototype.set=function(e,t){return Cl(this,e).set(e,t),this};var Tl=I;N.prototype.clear=function(){this.__data__=new il},N.prototype['delete']=function(e){return this.__data__['delete'](e)},N.prototype.get=function(e){return this.__data__.get(e)},N.prototype.has=function(e){return this.__data__.has(e)},N.prototype.set=function(e,t){var n=this.__data__;return n instanceof il&&n.__data__.length==200&&(n=this.__data__=new Tl(n.__data__)),n.set(e,t),this};var Pl=N,El=function(e,t){for(var n=-1,o=e.length;++nthis._classes.add(e))}removeClass(...e){this._fireChange('attributes',this),e.forEach((e)=>this._classes.delete(e))}hasClass(...e){for(const t of e)if(!this._classes.has(t))return!1;return!0}getClassNames(){return this._classes.keys()}setStyle(e,t){if(this._fireChange('attributes',this),fa(e)){const t=Object.keys(e);for(const n of t)this._styles.set(n,e[n])}else this._styles.set(e,t)}getStyle(e){return this._styles.get(e)}getStyleNames(){return this._styles.keys()}hasStyle(...e){for(const t of e)if(!this._styles.has(t))return!1;return!0}removeStyle(...e){this._fireChange('attributes',this),e.forEach((e)=>this._styles.delete(e))}findAncestor(...e){const t=new Kd(...e);for(let n=this.parent;n;){if(t.match(n))return n;n=n.parent}return null}setCustomProperty(e,t){this._customProperties.set(e,t)}getCustomProperty(e){return this._customProperties.get(e)}removeCustomProperty(e){return this._customProperties.delete(e)}*getCustomProperties(){yield*this._customProperties.entries()}getIdentity(){const e=Array.from(this._classes).sort().join(','),t=Array.from(this._styles).map((e)=>`${e[0]}:${e[1]}`).sort().join(';'),n=Array.from(this._attrs).map((e)=>`${e[0]}="${e[1]}"`).sort().join(' ');return this.name+(''==e?'':` class="${e}"`)+(''==t?'':` style="${t}"`)+(''==n?'':` ${n}`)}}class Jd{constructor(e,t,n){if(this.textNode=e,0>t||t>e.data.length)throw new _a('view-textproxy-wrong-offsetintext: Given offsetInText value is incorrect.');if(0>n||t+n>e.data.length)throw new _a('view-textproxy-wrong-length: Given length value is incorrect.');this.data=e.data.substring(t,t+n),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(e){return'textProxy'==e}getAncestors(e={includeSelf:!1,parentFirst:!1}){const t=[];for(let n=e.includeSelf?this.textNode:this.parent;null!==n;)t[e.parentFirst?'push':'unshift'](n),n=n.parent;return t}}class Gd{constructor(e={}){if(!e.boundaries&&!e.startPosition)throw new _a('view-tree-walker-no-start-position: Neither boundaries nor starting position have been defined.');if(e.direction&&'forward'!=e.direction&&'backward'!=e.direction)throw new _a('view-tree-walker-unknown-direction: Only `backward` and `forward` direction allowed.',{direction:e.direction});this.boundaries=e.boundaries||null,this.position=e.startPosition?ec.createFromPosition(e.startPosition):ec.createFromPosition(e.boundaries['backward'==e.direction?'end':'start']),this.direction=e.direction||'forward',this.singleCharacters=!!e.singleCharacters,this.shallow=!!e.shallow,this.ignoreElementEnd=!!e.ignoreElementEnd,this._boundaryStartParent=this.boundaries?this.boundaries.start.parent:null,this._boundaryEndParent=this.boundaries?this.boundaries.end.parent:null}[Symbol.iterator](){return this}skip(e){let t,n,o;do o=this.position,({done:t,value:n}=this.next());while(!t&&e(n));t||(this.position=o)}next(){return'forward'==this.direction?this._next():this._previous()}_next(){let e=ec.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&e.offset===n.childCount)return{done:!0};if(n===this._boundaryEndParent&&e.offset==this.boundaries.end.offset)return{done:!0};let o;if(n instanceof $d){if(e.isAtEnd)return this.position=ec.createAfter(n),this._next();o=n.data[e.offset]}else o=n.getChild(e.offset);if(o instanceof Qd)return this.shallow?e.offset++:e=new ec(o,0),this.position=e,this._formatReturnValue('elementStart',o,t,e,1);if(!(o instanceof $d)){if('string'==typeof o){let o;if(this.singleCharacters)o=1;else{const t=n===this._boundaryEndParent?this.boundaries.end.offset:n.data.length;o=t-e.offset}const i=new Jd(n,e.offset,o);return e.offset+=o,this.position=e,this._formatReturnValue('text',i,t,e,o)}return e=ec.createAfter(n),this.position=e,this.ignoreElementEnd?this._next():this._formatReturnValue('elementEnd',n,t,e)}if(this.singleCharacters)return e=new ec(o,0),this.position=e,this._next();else{let n=o.data.length,i=o;return o==this._boundaryEndParent?(n=this.boundaries.end.offset,i=new Jd(o,0,n),e=ec.createAfter(i)):e.offset++,this.position=e,this._formatReturnValue('text',i,t,e,n)}}_previous(){let e=ec.createFromPosition(this.position);const t=this.position,n=e.parent;if(null===n.parent&&0===e.offset)return{done:!0};if(n==this._boundaryStartParent&&e.offset==this.boundaries.start.offset)return{done:!0};let o;if(n instanceof $d){if(e.isAtStart)return this.position=ec.createBefore(n),this._previous();o=n.data[e.offset-1]}else o=n.getChild(e.offset-1);if(o instanceof Qd)return this.shallow?(e.offset--,this.position=e,this._formatReturnValue('elementStart',o,t,e,1)):(e=new ec(o,o.childCount),this.position=e,this.ignoreElementEnd?this._previous():this._formatReturnValue('elementEnd',o,t,e));if(!(o instanceof $d)){if('string'==typeof o){let o;if(!this.singleCharacters){const t=n===this._boundaryStartParent?this.boundaries.start.offset:0;o=e.offset-t}else o=1;e.offset-=o;const i=new Jd(n,e.offset,o);return this.position=e,this._formatReturnValue('text',i,t,e,o)}return e=ec.createBefore(n),this.position=e,this._formatReturnValue('elementStart',n,t,e,1)}if(this.singleCharacters)return e=new ec(o,o.data.length),this.position=e,this._previous();else{let n=o.data.length,i=o;if(o==this._boundaryStartParent){const t=this.boundaries.start.offset;i=new Jd(o,t,o.data.length-t),n=i.data.length,e=ec.createBefore(i)}else e.offset--;return this.position=e,this._formatReturnValue('text',i,t,e,n)}}_formatReturnValue(e,t,n,o,i){return t instanceof Jd&&(t.offsetInText+t.data.length==t.textNode.data.length&&('forward'!=this.direction||this.boundaries&&this.boundaries.end.isEqual(this.position)?n=ec.createAfter(t.textNode):(o=ec.createAfter(t.textNode),this.position=o)),0===t.offsetInText&&('backward'!=this.direction||this.boundaries&&this.boundaries.start.isEqual(this.position)?n=ec.createBefore(t.textNode):(o=ec.createBefore(t.textNode),this.position=o))),{done:!1,value:{type:e,item:t,previousPosition:n,nextPosition:o,length:i}}}}class Yd extends Qd{constructor(e,t,n){super(e,t,n),this.getFillerOffset=K}is(e,t=null){return t?'containerElement'==e&&t==this.name||super.is(e,t):'containerElement'==e||super.is(e)}}const Xd=Symbol('document');class Zd extends Yd{constructor(e,t,n){super(e,t,n),this.set('isReadOnly',!1),this.set('isFocused',!1)}get document(){return this.getCustomProperty(Xd)}set document(e){if(this.getCustomProperty(Xd))throw new _a('view-editableelement-document-already-set: View document is already set.');this.setCustomProperty(Xd,e),this.bind('isReadOnly').to(e),this.bind('isFocused').to(e,'isFocused',(t)=>t&&e.selection.editableElement==this),this.listenTo(e,'render',()=>{this.isFocused=e.isFocused&&e.selection.editableElement==this},{priority:'high'})}}a(Zd,Us);class ec{constructor(e,t){this.parent=e,this.offset=t}get nodeAfter(){return this.parent.is('text')?null:this.parent.getChild(this.offset)||null}get nodeBefore(){return this.parent.is('text')?null:this.parent.getChild(this.offset-1)||null}get isAtStart(){return 0===this.offset}get isAtEnd(){const e=this.parent.is('text')?this.parent.data.length:this.parent.childCount;return this.offset===e}get root(){return this.parent.root}get editableElement(){let e=this.parent;for(;!(e instanceof Zd);)if(e.parent)e=e.parent;else return null;return e}getShiftedBy(e){const t=ec.createFromPosition(this),n=t.offset+e;return t.offset=0>n?0:n,t}getLastMatchingPosition(e,t={}){t.startPosition=this;const n=new Gd(t);return n.skip(e),n.position}getAncestors(){return this.parent.is('documentFragment')?[this.parent]:this.parent.getAncestors({includeSelf:!0})}getCommonAncestor(e){const t=this.getAncestors(),n=e.getAncestors();let o=0;for(;t[o]==n[o]&&t[o];)o++;return 0==o?null:t[o-1]}isEqual(e){return this.parent==e.parent&&this.offset==e.offset}isBefore(e){return'before'==this.compareWith(e)}isAfter(e){return'after'==this.compareWith(e)}compareWith(e){if(this.isEqual(e))return'same';if(this.parent===e.parent)return 0>this.offset-e.offset?'before':'after';const t=this.getAncestors(),n=e.getAncestors(),o=O(t,n);let i;switch(o){case 0:return'different';case'prefix':i=t.length-1;break;case'extension':i=n.length-1;break;default:i=o-1;}const r=t[i],a=t[i+1],s=n[i+1];if(r===this.parent){const e=this.offset-s.index;return 0>=e?'before':'after'}if(r===e.parent){const t=a.index-e.offset;return 0>t?'before':'after'}const l=a.index-s.index;return 0>l?'before':'after'}static createAt(e,t){if(e instanceof ec)return this.createFromPosition(e);else{const n=e;if('end'==t)t=n.is('text')?n.data.length:n.childCount;else{if('before'==t)return this.createBefore(n);if('after'==t)return this.createAfter(n);t||(t=0)}return new ec(n,t)}}static createAfter(e){if(e.is('textProxy'))return new ec(e.textNode,e.offsetInText+e.data.length);if(!e.parent)throw new _a('view-position-after-root: You can not make position after root.',{root:e});return new ec(e.parent,e.index+1)}static createBefore(e){if(e.is('textProxy'))return new ec(e.textNode,e.offsetInText);if(!e.parent)throw new _a('view-position-before-root: You can not make position before root.',{root:e});return new ec(e.parent,e.index)}static createFromPosition(e){return new this(e.parent,e.offset)}}class tc{constructor(e,t=null){this.start=ec.createFromPosition(e),this.end=t?ec.createFromPosition(t):ec.createFromPosition(e)}*[Symbol.iterator](){yield*new Gd({boundaries:this,ignoreElementEnd:!0})}get isCollapsed(){return this.start.isEqual(this.end)}get isFlat(){return this.start.parent===this.end.parent}get root(){return this.start.root}getEnlarged(){let e=this.start.getLastMatchingPosition(Q,{direction:'backward'}),t=this.end.getLastMatchingPosition(Q);return e.parent.is('text')&&e.isAtStart&&(e=ec.createBefore(e.parent)),t.parent.is('text')&&t.isAtEnd&&(t=ec.createAfter(t.parent)),new tc(e,t)}getTrimmed(){let e=this.start.getLastMatchingPosition(Q);if(e.isAfter(this.end)||e.isEqual(this.end))return new tc(e,e);let t=this.end.getLastMatchingPosition(Q,{direction:'backward'});const n=e.nodeAfter,o=t.nodeBefore;return n&&n.is('text')&&(e=new ec(n,0)),o&&o.is('text')&&(t=new ec(o,o.data.length)),new tc(e,t)}isEqual(e){return this==e||this.start.isEqual(e.start)&&this.end.isEqual(e.end)}containsPosition(e){return e.isAfter(this.start)&&e.isBefore(this.end)}containsRange(e,t=!1){e.isCollapsed&&(t=!1);const n=this.containsPosition(e.start)||t&&this.start.isEqual(e.start),o=this.containsPosition(e.end)||t&&this.end.isEqual(e.end);return n&&o}getDifference(e){const t=[];return this.isIntersecting(e)?(this.containsPosition(e.start)&&t.push(new tc(this.start,e.start)),this.containsPosition(e.end)&&t.push(new tc(e.end,this.end))):t.push(tc.createFromRange(this)),t}getIntersection(e){if(this.isIntersecting(e)){let t=this.start,n=this.end;return this.containsPosition(e.start)&&(t=e.start),this.containsPosition(e.end)&&(n=e.end),new tc(t,n)}return null}getWalker(e={}){return e.boundaries=this,new Gd(e)}getCommonAncestor(){return this.start.getCommonAncestor(this.end)}*getItems(e={}){e.boundaries=this,e.ignoreElementEnd=!0;const t=new Gd(e);for(const n of t)yield n.item}*getPositions(e={}){e.boundaries=this;const t=new Gd(e);yield t.position;for(const n of t)yield n.nextPosition}isIntersecting(e){return this.start.isBefore(e.end)&&this.end.isAfter(e.start)}static createFromParentsAndOffsets(e,t,n,o){return new this(new ec(e,t),new ec(n,o))}static createFromRange(e){return new this(e.start,e.end)}static createFromPositionAndShift(e,t){const n=e,o=e.getShiftedBy(t);return 0{if(!t.viewPosition){const e=this._modelToViewMapping.get(t.modelPosition.parent);t.viewPosition=this._findPositionIn(e,t.modelPosition.offset)}},{priority:'low'}),this.on('viewToModelPosition',(e,t)=>{if(t.modelPosition)return;let n=t.viewPosition.parent,o=this._viewToModelMapping.get(n);for(;!o;)n=n.parent,o=this._viewToModelMapping.get(n);const i=this._toModelOffset(t.viewPosition.parent,t.viewPosition.offset,n);t.modelPosition=Zs.createFromParentAndOffset(o,i)},{priority:'low'})}bindElements(e,t){this._modelToViewMapping.set(e,t),this._viewToModelMapping.set(t,e)}unbindViewElement(e){const t=this.toModelElement(e);this._unbindElements(t,e)}unbindModelElement(e){const t=this.toViewElement(e);this._unbindElements(e,t)}clearBindings(){this._modelToViewMapping=new WeakMap,this._viewToModelMapping=new WeakMap}toModelElement(e){return this._viewToModelMapping.get(e)}toViewElement(e){return this._modelToViewMapping.get(e)}toModelRange(e){return new el(this.toModelPosition(e.start),this.toModelPosition(e.end))}toViewRange(e){return new tc(this.toViewPosition(e.start),this.toViewPosition(e.end))}toModelPosition(e){const t={viewPosition:e,mapper:this};return this.fire('viewToModelPosition',t),t.modelPosition}toViewPosition(e){const t={modelPosition:e,mapper:this};return this.fire('modelToViewPosition',t),t.viewPosition}registerViewToModelLength(e,t){this._viewToModelLengthCallbacks.set(e,t)}_toModelOffset(e,t,n){if(n!=e){const o=this._toModelOffset(e.parent,e.index,n),i=this._toModelOffset(e,t,e);return o+i}if(e.is('text'))return t;let o=0;for(let r=0;r=t;t++){const n=String.fromCharCode(t);e[n.toLowerCase()]=t}for(let t=48;57>=t;t++)e[t-48]=t;for(let t=112;123>=t;t++)e['f'+(t-111)]=t;return e}();class pc extends Qd{constructor(e,t,n){super(e,t,n),this.getFillerOffset=re}is(e,t=null){return t?'uiElement'==e&&t==this.name||super.is(e,t):'uiElement'==e||super.is(e)}insertChildren(e,t){if(t&&(t instanceof Ud||0e.is('element')&&t.isSimilar(e));e&&(i=tc.createIn(e))}i&&(i.end.isAfter(e.end)&&(i.end=e.end),i.start.isBefore(e.start)&&(i.start=e.start),ce(i))}},move:me,wrap:ue,wrapPosition:function(e,t){if(!(t instanceof sc))throw new _a('view-writer-wrap-invalid-attribute');if(t.isSimilar(e.parent))return ke(ec.createFromPosition(e));e.parent.is('text')&&(e=we(e));const n=new sc;n.priority=na,n.isSimilar=()=>!1,e.parent.insertChildren(e.offset,n);const o=new tc(e,e.getShiftedBy(1));ue(o,t);const i=new ec(n.parent,n.index);n.remove();const r=i.nodeBefore,a=i.nodeAfter;return r instanceof $d&&a instanceof $d?ye(r,a):ke(i)},unwrap:function(e,t){if(!(t instanceof sc))throw new _a('view-writer-unwrap-invalid-attribute');if(Pe(e),e.isCollapsed)return e;if(e.end.isEqual(e.start.getShiftedBy(1))){const n=e.start.nodeAfter;if(!t.isSimilar(n)&&n instanceof sc&&xe(t,n))return e}const{start:n,end:o}=ge(e,!0),i=n.parent,r=he(i,n.offset,o.offset,t),a=le(r.start);a.isEqual(r.start)||r.end.offset--;const s=le(r.end);return new tc(a,s)},rename:function(e,t){const n=new Yd(t,e.getAttributes());return de(ec.createAfter(e),n),me(tc.createIn(e),ec.createAt(n)),ce(tc.createOn(e)),n}};const hc=[$d,sc,Yd,lc,pc];class bc extends sc{isSimilar(e){return!!e.is('attributeElement')&&this.getCustomProperty('highlightDescriptorId')===e.getCustomProperty('highlightDescriptorId')}}class _c{constructor(){this._consumables=new Map}add(e,t){let n;return e.is('text')||e.is('documentFragment')?void this._consumables.set(e,!0):void(this._consumables.has(e)?n=this._consumables.get(e):(n=new kc,this._consumables.set(e,n)),n.add(t))}test(e,t){const n=this._consumables.get(e);return void 0===n?null:e.is('text')||e.is('documentFragment')?n:n.test(t)}consume(e,t){return!!this.test(e,t)&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!1):this._consumables.get(e).consume(t),!0)}revert(e,t){const n=this._consumables.get(e);n!==void 0&&(e.is('text')||e.is('documentFragment')?this._consumables.set(e,!0):n.revert(t))}static consumablesFromElement(e){const t={name:!0,attribute:[],class:[],style:[]},n=e.getAttributeKeys();for(const o of n)'style'!=o&&'class'!=o&&t.attribute.push(o);const o=e.getClassNames();for(const n of o)t.class.push(n);const i=e.getStyleNames();for(const n of i)t.style.push(n);return t}static createFrom(e,t){if(t||(t=new _c),e.is('text'))return t.add(e),t;e.is('element')&&t.add(e,_c.consumablesFromElement(e)),e.is('documentFragment')&&t.add(e);for(const n of e.getChildren())t=_c.createFrom(n,t);return t}}class kc{constructor(){this._canConsumeName=null,this._consumables={attribute:new Map,style:new Map,class:new Map}}add(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._add(t,e[t])}test(e){if(e.name&&!this._canConsumeName)return this._canConsumeName;for(const t in this._consumables)if(t in e){const n=this._test(t,e[t]);if(!0!==n)return n}return!0}consume(e){for(const t in e.name&&(this._canConsumeName=!1),this._consumables)t in e&&this._consume(t,e[t])}revert(e){for(const t in e.name&&(this._canConsumeName=!0),this._consumables)t in e&&this._revert(t,e[t])}_add(e,t){const n=Es(t)?t:[t],o=this._consumables[e];for(const i of n){if('attribute'===e&&('class'===i||'style'===i))throw new _a('viewconsumable-invalid-attribute: Classes and styles should be handled separately.');o.set(i,!0)}}_test(e,t){const n=Es(t)?t:[t],o=this._consumables[e];for(const i of n)if('attribute'===e&&('class'===i||'style'===i)){const e=this._test(i,[...this._consumables[i].keys()]);if(!0!==e)return e}else{const e=o.get(i);if(e===void 0)return null;if(!e)return!1}return!0}_consume(e,t){const n=Es(t)?t:[t],o=this._consumables[e];for(const i of n)'attribute'===e&&('class'===i||'style'===i)?this._consume(i,[...this._consumables[i].keys()]):o.set(i,!1)}_revert(e,t){const n=Es(t)?t:[t],o=this._consumables[e];for(const i of n)if('attribute'===e&&('class'===i||'style'===i))this._revert(i,[...this._consumables[i].keys()]);else{const e=o.get(i);!1===e&&o.set(i,!0)}}}var wc={insert:qe,remove:He,move:function(e,t){if(!e.isFlat)throw new _a('model-writer-move-range-not-flat: Trying to move a range which starts and ends in different element.');const n=this.remove(e);return t=t._getTransformedByDeletion(e.start,e.end.offset-e.start.offset),this.insert(t,n)},setAttribute:function(e,t,n){$e(e.start),$e(e.end);for(const o of e.getItems()){const e=o.is('textProxy')?o.textNode:o;null===n?e.removeAttribute(t):e.setAttribute(t,n),Ue(e.parent,e.index)}Ue(e.end.parent,e.end.index)},removeAttribute:function(e,t){this.setAttribute(e,t,null)},normalizeNodes:We};class yc{constructor(e={}){this.conversionApi=js({},e),this.conversionApi.convertItem=this._convertItem.bind(this),this.conversionApi.convertChildren=this._convertChildren.bind(this)}convert(e,t={}){this.fire('viewCleanup',e);const n=_c.createFrom(e);let o=this._convertItem(e,n,t);return o?(o.is('documentFragment')||(o=new ic([o])),o.markers=Qe(o),o):new ic}_convertItem(e,t,n={}){const o=js({},n,{input:e,output:null});return e.is('element')?this.fire('element:'+e.name,o,t,this.conversionApi):e.is('text')?this.fire('text',o,t,this.conversionApi):this.fire('documentFragment',o,t,this.conversionApi),o.output&&!(o.output instanceof $s||o.output instanceof ic)?(wa.warn('view-conversion-dispatcher-incorrect-result: Incorrect conversion result was dropped.',[e,o.output]),null):o.output}_convertChildren(e,t,n={}){const o=Array.from(e.getChildren()),i=o.map((e)=>this._convertItem(e,t,n)).filter((e)=>e instanceof $s||e instanceof ic).reduce((e,t)=>e.concat(t.is('documentFragment')?Array.from(t.getChildren()):t),[]);return new ic(i)}}a(yc,Oa);class vc extends Zs{constructor(e,t,n){if(super(e,t),!this.root.is('rootElement'))throw new _a('model-liveposition-root-not-rootelement: LivePosition\'s root has to be an instance of RootElement.');this.stickiness=n||'sticksToNext',Ye.call(this)}detach(){this.stopListening()}}a(vc,Oa);class xc{constructor(e,t,n){this.dataController=e,this.batch=t,this.position=n,this.canMergeWith=new Set([this.position.parent]),this.schema=e.model.schema}handleNodes(e,t){e=Array.from(e);for(let n=0;nthis.decorate(e))}get(e='main'){return this.stringify(this.model.getRoot(e))}stringify(e){const t=this.toView(e);return this.processor.toData(t)}toView(e){const t=el.createIn(e),n=new gc;return this.mapper.bindElements(e,n),this.modelToView.convertInsertion(t),this.mapper.clearBindings(),n}set(e,t='main'){const n=this.model.getRoot(t);this.model.enqueueChanges(()=>{this.model.selection.removeAllRanges(),this.model.selection.clearAttributes(),this.model.batch('transparent').remove(el.createIn(n)).insert(Zs.createAt(n,0),this.parse(e))})}parse(e,t='$root'){const n=this.processor.toView(e);return this.toModel(n,t)}toModel(e,t='$root'){return this.viewToModel.convert(e,{context:[t]})}destroy(){}insertContent(e,t,n){Ze(this,e,t,n)}deleteContent(e,t,n){tt(e,t,n)}modifySelection(e,t){gt(this,e,t)}getSelectedContent(e){return _t(e)}hasContent(e){if(e instanceof Gs&&(e=el.createIn(e)),e.isCollapsed)return!1;for(const t of e.getItems())if(t.is('textProxy')||this.model.schema.objects.has(t.name))return!0;return!1}}a(Ac,Us);class Cc{constructor(e){this.baseVersion=e}toJSON(){const e=Wd(this,!0);return e.__className=this.constructor.className,delete e.delta,e}static get className(){return'engine.model.operation.Operation'}static fromJSON(e){return new this(e.baseVersion)}}wt.prototype.add=wt.prototype.push=function(e){return this.__data__.set(e,'__lodash_hash_undefined__'),this},wt.prototype.has=function(e){return this.__data__.has(e)};var Tc=wt,Pc=function(e,t){for(var n=-1,o=e.length;++ns))return!1;var d=r.get(e);if(d)return d==t;var c=-1,m=!0,u=i&1?new Tc:void 0;for(r.set(e,t);++ce.maxOffset)throw new _a('move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.');else if(e===t&&n=n&&this.targetPosition.path[e]e.clone(!0)));return new Jc(this.position,e,this.baseVersion)}getReversed(){const e=this.position.root.document.graveyard,t=new Zs(e,[0]);return new Qc(this.position,this.nodes.maxOffset,t,this.baseVersion+1)}_execute(){const e=this.nodes;this.nodes=new Js([...e].map((e)=>e.clone(!0)));const t=qe(this.position,e);return{range:t}}static get className(){return'engine.model.operation.InsertOperation'}static fromJSON(e,t){const n=[];for(const o of e.nodes)o.name?n.push(Gs.fromJSON(o)):n.push(Ks.fromJSON(o));return new Jc(Zs.fromJSON(e.position,t),n,e.baseVersion)}}class Gc extends Cc{constructor(e,t,n,o,i){super(i),this.name=e,this.oldRange=t?el.createFromRange(t):null,this.newRange=n?el.createFromRange(n):null,this._markers=o}get type(){return'marker'}clone(){return new Gc(this.name,this.oldRange,this.newRange,this._markers,this.baseVersion)}getReversed(){return new Gc(this.name,this.newRange,this.oldRange,this._markers,this.baseVersion+1)}_execute(){const e=this.newRange?'set':'remove';return this._markers[e](this.name,this.newRange),{name:this.name,type:e}}toJSON(){const e=super.toJSON();return delete e._markers,e}static get className(){return'engine.model.operation.MarkerOperation'}static fromJSON(e,t){return new Gc(e.name,e.oldRange?el.fromJSON(e.oldRange,t):null,e.newRange?el.fromJSON(e.newRange,t):null,t.markers,e.baseVersion)}}class Yc extends Cc{get type(){return'noop'}clone(){return new Yc(this.baseVersion)}getReversed(){return new Yc(this.baseVersion+1)}_execute(){return{}}static get className(){return'engine.model.operation.NoOperation'}}class Xc extends Cc{constructor(e,t,n,o){super(o),this.position=e,this.oldName=t,this.newName=n}get type(){return'rename'}clone(){return new Xc(Zs.createFromPosition(this.position),this.oldName,this.newName,this.baseVersion)}getReversed(){return new Xc(Zs.createFromPosition(this.position),this.newName,this.oldName,this.baseVersion+1)}_execute(){const e=this.position.nodeAfter;if(!(e instanceof Gs))throw new _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 _a('rename-operation-wrong-name: Element to change has different name than operation\'s old name.');return e.name!=this.newName&&(e.name=this.newName),{element:e,oldName:this.oldName}}static get className(){return'engine.model.operation.RenameOperation'}static fromJSON(e,t){return new Xc(Zs.fromJSON(e.position,t),e.oldName,e.newName,e.baseVersion)}}class Zc extends Cc{constructor(e,t,n,o,i){super(i),this.root=e,this.key=t,this.oldValue=n,this.newValue=o}get type(){return null===this.oldValue?'addRootAttribute':null===this.newValue?'removeRootAttribute':'changeRootAttribute'}clone(){return new Zc(this.root,this.key,this.oldValue,this.newValue,this.baseVersion)}getReversed(){return new Zc(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 _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 _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(e,t){if(!t.hasRoot(e.root))throw new _a('rootattribute-operation-fromjson-no-root: Cannot create RootAttributeOperation. Root with specified name does not exist.',{rootName:e});return new Zc(t.getRoot(e.root),e.key,e.oldValue,e.newValue,e.baseVersion)}}const em={};em[Uc.className]=Uc,em[Jc.className]=Jc,em[Gc.className]=Gc,em[$c.className]=$c,em[Yc.className]=Yc,em[Cc.className]=Cc,em[Kc.className]=Kc,em[Qc.className]=Qc,em[Xc.className]=Xc,em[Zc.className]=Zc;class tm{static fromJSON(e,t){return em[e.__className].fromJSON(e,t)}}const nm=new Map;class om{static fromJSON(e,t){if(!nm.has(e.__className))throw new _a('delta-fromjson-no-deserializer: This delta has no defined deserializer',{name:e.__className});const n=nm.get(e.__className),o=new n;for(const n of e.operations)o.addOperation(tm.fromJSON(n,t));for(const n in e)'__className'!=n&&void 0===o[n]&&(o[n]=e[n]);return o}static register(e){nm.set(e.className,e)}}class im{constructor(){this.batch=null,this.operations=[]}get baseVersion(){return 0new Uc(t,e.key,e.oldValue,e.newValue,e.baseVersion))},AttributeOperation(e,t,n){if(e.key===t.key){const o=e.range.getDifference(t.range).map((t)=>new Uc(t,e.key,e.oldValue,e.newValue,e.baseVersion)),i=e.range.getIntersection(t.range);return i&&(n.isStrong?o.push(new Uc(i,t.key,t.newValue,e.newValue,e.baseVersion)):0===o.length&&o.push(new Yc(0))),o}return[e.clone()]},RootAttributeOperation:St,RenameOperation:St,MarkerOperation:St,MoveOperation(e,t){const n=el.createFromPositionAndShift(t.sourcePosition,t.howMany);let o=[];const i=Rt(e.range.getDifference(n)),r=e.range.getIntersection(n);return null!==i&&(i.start=i.start._getTransformedByDeletion(t.sourcePosition,t.howMany),i.end=i.end._getTransformedByDeletion(t.sourcePosition,t.howMany),o=i._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,!0,!1).reverse()),null!==r&&(r.start=r.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),r.end=r.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.push(r)),o.map((t)=>new Uc(t,e.key,e.oldValue,e.newValue,e.baseVersion))}},RootAttributeOperation:{InsertOperation:St,AttributeOperation:St,RootAttributeOperation(e,t,n){return e.root!==t.root||e.key!==t.key||(e.newValue===t.newValue||n.isStrong)&&e.newValue!==t.newValue?[e.clone()]:[new Yc(e.baseVersion)]},RenameOperation:St,MarkerOperation:St,MoveOperation:St},RenameOperation:{InsertOperation(e,t){const n=e.clone();return n.position=n.position._getTransformedByInsertion(t.position,t.nodes.maxOffset,!0),[n]},AttributeOperation:St,RootAttributeOperation:St,RenameOperation(e,t,n){const o=e.clone();if(e.position.isEqual(t.position))if(n.isStrong)o.oldName=t.newName;else return[new Yc(e.baseVersion)];return[o]},MarkerOperation:St,MoveOperation(e,t){const n=e.clone(),o=n.position.isEqual(t.sourcePosition);return n.position=n.position._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!0,o),[n]}},MarkerOperation:{InsertOperation(e,t){const n=e.clone();return n.oldRange&&(n.oldRange=n.oldRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),n.newRange&&(n.newRange=n.newRange._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,!1)[0]),[n]},AttributeOperation:St,RootAttributeOperation:St,RenameOperation:St,MarkerOperation(e,t,n){const o=e.clone();if(e.name==t.name)if(n.isStrong)o.oldRange=t.newRange;else return[new Yc(e.baseVersion)];return[o]},MoveOperation(e,t){const n=e.clone();if(n.oldRange){const e=n.oldRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.oldRange=el.createFromRanges(e)}if(n.newRange){const e=n.newRange._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany);n.newRange=el.createFromRanges(e)}return[n]}},MoveOperation:{InsertOperation(e,t,n){let o=el.createFromPositionAndShift(e.sourcePosition,e.howMany);const i=e.isSticky&&!n.forceNotSticky;o=o._getTransformedByInsertion(t.position,t.nodes.maxOffset,!1,i)[0];const r=void 0===n.insertBefore?!n.isStrong:n.insertBefore,a=new e.constructor(o.start,o.end.offset-o.start.offset,e.targetPosition._getTransformedByInsertion(t.position,t.nodes.maxOffset,r),e.baseVersion);return a.isSticky=e.isSticky,[a]},AttributeOperation:St,RootAttributeOperation:St,RenameOperation:St,MarkerOperation:St,MoveOperation(e,t,n){const o=el.createFromPositionAndShift(e.sourcePosition,e.howMany),i=el.createFromPositionAndShift(t.sourcePosition,t.howMany);let r=n.isStrong;const a=e.isSticky&&!n.forceNotSticky,s=void 0===n.insertBefore?!r:n.insertBefore,l=e.targetPosition._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,s,t.isSticky&&!n.forceNotSticky);if(Ot(e,t)&&Ot(t,e))return[t.getReversed()];const d=o.containsPosition(t.targetPosition)||o.start.isEqual(t.targetPosition)&&a||o.end.isEqual(t.targetPosition)&&a;if(d&&o.containsRange(i,!0))return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),Ft([o],l,e);const c=i.containsPosition(e.targetPosition)||i.start.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky||i.end.isEqual(e.targetPosition)&&t.isSticky&&!n.forceNotSticky;if(c&&i.containsRange(o,!0))return o.start=o.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),o.end=o.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),Ft([o],l,e);const m=O(e.sourcePosition.getParentPath(),t.sourcePosition.getParentPath());if('prefix'==m||'extension'==m)return o.start=o.start._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,!a),o.end=o.end._getTransformedByMove(t.sourcePosition,t.targetPosition,t.howMany,a),Ft([o],l,e);n.forceWeakRemove||(e instanceof Qc&&!(t instanceof Qc)?r=!0:!(e instanceof Qc)&&t instanceof Qc&&(r=!1));const u=[],p=o.getDifference(i);for(const o of p){o.start=o.start._getTransformedByDeletion(t.sourcePosition,t.howMany),o.end=o.end._getTransformedByDeletion(t.sourcePosition,t.howMany);const e='same'==O(o.start.getParentPath(),t.getMovedRangeStart().getParentPath()),n=o._getTransformedByInsertion(t.getMovedRangeStart(),t.howMany,e,a);u.push(...n)}const g=o.getIntersection(i);return null!==g&&r&&!d&&(g.start=g.start._getCombined(t.sourcePosition,t.getMovedRangeStart()),g.end=g.end._getCombined(t.sourcePosition,t.getMovedRangeStart()),0===u.length?u.push(g):1==u.length?i.start.isBefore(o.start)||i.start.isEqual(o.start)?u.unshift(g):u.push(g):u.splice(1,0,g)),0===u.length?[new Yc(e.baseVersion)]:Ft(u,l,e)}}};var ot=function(e,t,n){var o=-1,i=e.length;0>t&&(t=-t>i?0:i+t),n=n>i?i:n,0>n&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var r=Array(i);++o=200&&(r=Em,a=!1,t=new Tc(t));outer:for(;++it?0:t,o)):[]},mu=function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:ss(t),t=o-t,ot(e,0,0>t?0:t)):[]},uu=function(e,t,n,o){for(var i=e.length,r=o?i:-1;(o?r--:++r=t?e:t)),e},gu=function(e){return e?pu(ss(e),0,4294967295):0},fu=function(e,t,n,o){var i=e.length;for(n=ss(n),0>n&&(n=-n>i?0:i+n),o=void 0===o||o>i?i:ss(o),0>o&&(o+=i),o=n>o?0:gu(o);nt?n:0,$a(t,n)?e[t]:void 0},Tu=function(e,t,n,o){for(var i=n-1,r=e.length;++it||r&&a&&l&&!s&&!d||o&&a&&l||!n&&l||!i)return 1;if(!o&&!r&&!d&&e>>1){for(;o>>1,a=e[r];null!==a&&!Ya(a)&&(n?a<=t:a=200){var d=t?null:Wu(e);if(d)return Cd(d);a=!1,i=Em,l=new Tc}else l=t?[]:s;outer:for(;++ot)return[];for(var i=0,r=0,a=Array(km(o/t));in&&(n=ia(o+n,0)),xm(e,t,n)):-1},initial:function(e){return mu(e,1)},intersection:wu,intersectionBy:yu,intersectionWith:vu,join:function(e,t){return e?Au.call(e,t):''},last:Xs,lastIndexOf:function(e,t,n){var o=e?e.length:0;if(!o)return-1;var i=o;if(void 0!==n&&(i=ss(n),i=(0>i?ia(o+i,0):oa(i,o-1))+1),t!==t)return vm(e,i,!0);for(;i--;)if(e[i]===t)return i;return-1},nth:function(e,t){return e&&e.length?Cu(e,ss(t)):void 0},pull:Ou,pullAll:Vu,pullAllBy:function(e,t,n){return e&&e.length&&t&&t.length?Su(e,t,su(n)):e},pullAllWith:function(e,t,n){return e&&e.length&&t&&t.length?Su(e,t,void 0,n):e},pullAt:Du,remove:function(e,t){var n=[];if(!(e&&e.length))return n;var o=-1,i=[],r=e.length;for(t=su(t,3);++ot?0:t)):[]},takeRight:function(e,t,n){var o=e?e.length:0;return o?(t=n||void 0===t?1:ss(t),t=o-t,ot(e,0>t?0:t,o)):[]},takeRightWhile:function(e,t){return e&&e.length?uu(e,su(t,3),!1,!0):[]},takeWhile:function(e,t){return e&&e.length?uu(e,su(t,3)):[]},union:$u,unionBy:Ku,unionWith:Qu,uniq:function(e){return e&&e.length?Uu(e):[]},uniqBy:function(e,t){return e&&e.length?Uu(e,su(t)):[]},uniqWith:function(e,t){return e&&e.length?Uu(e,void 0,t):[]},unzip:Gu,unzipWith:Yu,without:Xu,xor:ep,xorBy:tp,xorWith:np,zip:op,zipObject:function(e,t){return ip(e||[],t||[],Na)},zipObjectDeep:function(e,t){return ip(e||[],t||[],rp)},zipWith:ap};const lp=new Map,dp={transform(e,t,n){const o=dp.getTransformationCase(e,t)||dp.defaultTransform,i=o(e,t,Object.assign({},n)),r=sp.last(t.operations).baseVersion;return Mt(r,i)},defaultTransform(e,t,n){const o=[];let i=t.operations,r=[];for(const a of e.operations){const e=[a];for(const t of i)for(let o=0;o{const o=pp(e,t,n);return e.range.containsPosition(t.position)&&o.push(Gt(t,e)),o}),up(am,mm,(e,t,n)=>{if(!t.position)return pp(e,t,n);const o=n.undoMode,i=new Zs(t.position.root,t.position.path.slice(0,-1)),r=pp(e,t,n);if(o||!(t._cloneOperation instanceof Jc))return r;for(const o of e.operations)if(o.range.containsPosition(i)||o.range.start.isEqual(i)){const e=new am,n=i.getShiftedBy(1),a=Zs.createFromPosition(n);a.path.push(0);const s=t._cloneOperation.nodes.getNode(0).getAttribute(o.key);e.addOperation(new Uc(new el(n,a),o.key,s===void 0?null:s,o.newValue,0)),r.push(e);break}return r}),up(cm,um,(e,t,n)=>{if(!t.position)return pp(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[t.getReversed(),e.clone()]:pp(e,t,n)}),up(mp,mm,Jt),up(mp,um,Jt),up(mp,gm,Jt),up(mp,fm,Jt),up(mp,lm,Jt),up(mp,pm,Jt),up(lm,um,(e,t,n)=>{const o=n.undoMode;if(o||!t.position)return pp(e,t,n);const i=e.sourcePosition.root==t.position.root&&'same'===O(e.sourcePosition.getParentPath(),t.position.getParentPath()),r=e.sourcePosition.offset<=t.position.offset&&e.sourcePosition.offset+e.howMany>t.position.offset;return i&&r?[t.getReversed(),e.clone()]:pp(e,t,n)}),up(um,cm,(e,t,n)=>{if(!e.position)return pp(e,t,n);const o=n.undoMode;return!o&&e.position.isEqual(t.position)?[Yt()]:pp(e,t,n)}),up(um,lm,(e,t,n)=>{const o=n.undoMode;if(o||!e.position)return pp(e,t,n);const i=e.position.root==t.sourcePosition.root&&'same'===O(e.position.getParentPath(),t.sourcePosition.getParentPath()),r=t.sourcePosition.offset<=e.position.offset&&t.sourcePosition.offset+t.howMany>e.position.offset;return i&&r?[Yt()]:pp(e,t,n)}),up(mm,mm,(e,t,n)=>{const o=n.undoMode;if(o)return pp(e,t,n);if(!e.position||!t.position)return pp(e,t,n);const i=e.position.getParentPath(),r=t.position.getParentPath();if(e.position.root==t.position.root&&'same'==O(i,r))if(e=e.clone(),e.position.offsett._cloneOperation.sourcePosition.offset&&e._cloneOperation.sourcePosition.offset--;const n=el.createFromPositionAndShift(e.position,e._moveOperation.howMany),o=el.createFromPositionAndShift(t.position,t._moveOperation.howMany),i=n.getDifference(o);let r=0;for(const e of i)r+=e.end.offset-e.start.offset;return 0==r?(e.operations.pop(),e.addOperation(new Yc(e.operations[0].baseVersion+1))):e.operations[1].howMany=r,[e]}else{const o=Object.assign({},n);return o.isStrong=!0,o.insertBefore=!0,pp(e,t,o)}return pp(e,t,n)}),up(mm,fm,(e,t,n)=>e.position?e.position.root==t.position.root&&'same'===O(t.position.path,e.position.getParentPath())?[Yt()]:pp(e,t,n):pp(e,t,n)),up(mm,gm,(e,t,n)=>{if(!e.position)return pp(e,t,n);const o=e.position.root==t.range.start.root,i=o&&'same'===O(e.position.getParentPath(),t.range.start.getParentPath()),r=t.range.start.offset=e.position.offset;if(i&&r)return[Yt()];if(o&&'same'===O(e.position.getParentPath(),t.range.end.getShiftedBy(-1).path)){const n=e.clone(),o=Zs.createFromPosition(t.range.start);o.path.push(t.howMany-1);const i=o.getShiftedBy(1);n._cloneOperation.position=i;const r=Zs.createFromPosition(o);r.path.push(e.position.offset),n._moveOperation.sourcePosition=r;const a=Zs.createFromPosition(i);return a.path.push(0),n._moveOperation.targetPosition=a,[n]}return pp(e,t,n)}),up(mm,am,(e,t,n)=>{if(!e.position)return pp(e,t,n);e=e.clone();const o=n.undoMode,i=new Zs(e.position.root,e.position.path.slice(0,-1));if(o||!(e._cloneOperation instanceof Jc))return[e];for(const o of t.operations)if(o.range.containsPosition(i)||o.range.start.isEqual(i)){null===o.newValue?e._cloneOperation.nodes.getNode(0).removeAttribute(o.key):e._cloneOperation.nodes.getNode(0).setAttribute(o.key,o.newValue);break}return[e]}),up(fm,mm,(e,t,n)=>t.position?e.position.root==t.position.root&&'same'===O(e.position.path,t.position.getParentPath())?[t.getReversed(),e.clone()]:pp(e,t,n):pp(e,t,n)),up(hm,am,(e,t)=>{const n=[e.clone()];return t.range.containsPosition(e.position)&&n.push(Gt(e,t)),n}),up(gm,mm,(e,t,n)=>{if(!t.position)return pp(e,t,n);const o=e.range.start.root==t.position.root,i=o&&'same'===O(e.range.start.getParentPath(),t.position.getParentPath()),r=e.range.start.offset=t.position.offset;if(i&&r)return[t.getReversed(),e.clone()];if(o&&'same'===O(t.position.getParentPath(),e.range.end.getShiftedBy(-1).path)){const t=e.clone();return t._insertOperation.position.offset++,t._moveOperation.howMany++,t._moveOperation.targetPosition.path[t._moveOperation.targetPosition.path.length-2]++,[t]}return pp(e,t,n)}),up(pm,mm,(e,t,n)=>{const o=n.undoMode,i=pp(e,t,n);if(o||!(t._cloneOperation instanceof Jc))return i;const r=t._cloneOperation.position.getShiftedBy(-1);if(r&&e.operations[0].position.isEqual(r)){const t=e.clone();t.operations[0].position=r.getShiftedBy(1),i.push(t)}return i}),up(mm,pm,(e,t,n)=>{e=e.clone();const o=n.undoMode;if(o||!(e._cloneOperation instanceof Jc))return[e];const i=e._cloneOperation.position.getShiftedBy(-1);if(i&&!o&&t.operations[0].position.isEqual(i)){const n=t.clone();return n.operations[0].position=i.getShiftedBy(1),n.operations[0].oldName=e._cloneOperation.nodes.getNode(0).name,[e,n]}return[e]}),up(dm,mm,(e,t,n)=>{const o=pp(e,t,n),i=t._cloneOperation.position||t._cloneOperation.targetPosition;if(!i)return pp(e,t,n);const r=n.undoMode;if(r)return o;for(const r of o)if(r instanceof dm){const e=r._moveOperation,t=e.sourcePosition.getShiftedBy(e.howMany);t.isEqual(i)&&(e.howMany+=1)}return o}),up(mm,dm,(e,t,n)=>{const o=n.undoMode;if(o)return pp(e,t,n);const i=e._cloneOperation.position||e._cloneOperation.targetPosition;if(!i)return pp(e,t,n);t=t.clone();const r=t._moveOperation,a=r.sourcePosition.getShiftedBy(r.howMany);return a.isEqual(i)&&(r.howMany+=1),pp(e,t,n)});class gp extends Gs{constructor(e,t,n='main'){super(t),this._doc=e,this.rootName=n}get document(){return this._doc}is(e,t){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}toJSON(){return this.rootName}}class fp{constructor(){this._deltas=[],this._historyPoints=new Map,this._undoPairs=new Map,this._undoneDeltas=new Set}addDelta(e){if(0=t)break;yield e}}}getDelta(e){const t=this._historyPoints.get(e);return t===void 0?null:this._deltas[t]}setDeltaAsUndone(e,t){this._undoPairs.set(t,e),this._undoneDeltas.add(e)}isUndoingDelta(e){return this._undoPairs.has(e)}isUndoneDelta(e){return this._undoneDeltas.has(e)}getUndoneDelta(e){return this._undoPairs.get(e)}_getIndex(e){const t=this._historyPoints.get(e);if(t===void 0){const t=this._deltas[this._deltas.length-1],n=t.baseVersion+t.operations.length;if(0>e||e>=n)return-1;throw new _a('model-history-wrong-version: Given base version points to the middle of a delta.')}return t}}class hp extends el{constructor(e,t){super(e,t),Xt.call(this)}detach(){this.stopListening()}}a(hp,Oa);class bp{constructor(e,t){this._lastRangeBackward=!1,this._ranges=[],this._attrs=new Map,e&&this.setRanges(e,t)}get anchor(){if(0{if(!(e instanceof el))throw new _a('model-selection-added-not-range: Trying to add an object that is not an instance of Range.');return this._ranges.every((t)=>!t.isEqual(e))});if(e.length!==this._ranges.length||n){this._removeAllRanges();for(const t of e)this._pushRange(t);this._lastRangeBackward=!!t,this.fire('change:range',{directChange:!0})}}setTo(e){e instanceof bp?this.setRanges(e.getRanges(),e.isBackward):e instanceof el?this.setRanges([e]):E(e)?this.setRanges(e):this.setRanges([new el(e)])}setIn(e){this.setRanges([el.createIn(e)])}setOn(e){this.setRanges([el.createOn(e)])}setCollapsedAt(e,t){const n=Zs.createAt(e,t),o=new el(n,n);this.setRanges([o])}collapseToStart(){const e=this.getFirstPosition();null!==e&&this.setRanges([new el(e,e)])}collapseToEnd(){const e=this.getLastPosition();null!==e&&this.setRanges([new el(e,e)])}moveFocusTo(e,t){if(null===this.anchor)throw new _a('model-selection-moveFocusTo-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=Zs.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.length&&this._popRange(),'before'==n.compareWith(e)?this.addRange(new el(n,e),!0):this.addRange(new el(e,n))}}getAttribute(e){return this._attrs.get(e)}getAttributes(){return this._attrs.entries()}getAttributeKeys(){return this._attrs.keys()}hasAttribute(e){return this._attrs.has(e)}clearAttributes(){if(0{kp.has(t)&&this._updateAttributes(!1),rn(n,o,this._document)})}get isCollapsed(){const e=this._ranges.length;return 0===e?this._document._getDefaultRange().isCollapsed:super.isCollapsed}get anchor(){return super.anchor||this._document._getDefaultRange().start}get focus(){return super.focus||this._document._getDefaultRange().end}get rangeCount(){return this._ranges.length?this._ranges.length:1}get hasOwnRange(){return 0{t.root==this._document.graveyard&&this._fixGraveyardSelection(t,o.sourcePosition),this.fire('change:range',{directChange:!1})}),t}_updateAttributes(e){const t=P(this._getSurroundingAttributes()),n=P(this.getAttributes());if(e)this._attributePriority=new Map,this._attrs=new Map;else for(const[e,t]of this._attributePriority)'low'==t&&(this._attrs.delete(e),this._attributePriority.delete(e));this._setAttributesTo(t,!1);const o=[];for(const[t,i]of this.getAttributes())n.has(t)&&n.get(t)===i||o.push(t);for(const[t]of n)this.hasAttribute(t)||o.push(t);0this._getItem(e));if(!this._getItem(e.name)._checkRequiredAttributes(e.attributes))return!1;for(const o of e.attributes)for(const e of n)if(e._hasMatchingPath('disallow',t,o))return!1;for(const o of e.attributes){if(o&&wp._isStoreAttributeKey(o))continue;let e=!1;for(const i of n)if(i._hasMatchingPath('allow',t,o)){e=!0;break}if(!e)return!1}return!0}hasItem(e){return this._items.has(e)}registerItem(e,t){if(this.hasItem(e))throw new _a('model-schema-item-exists: Item with specified name already exists in schema.');if(!!t&&!this.hasItem(t))throw new _a('model-schema-no-item: Item with specified name does not exist in schema.');this._items.set(e,new vp(this));const n=this.hasItem(t)?this._extensionChains.get(t).concat(e):[e];this._extensionChains.set(e,n)}itemExtends(e,t){if(!this.hasItem(e)||!this.hasItem(t))throw new _a('model-schema-no-item: Item with specified name does not exist in schema.');const n=this._extensionChains.get(e);return n.some((e)=>e==t)}checkAttributeInSelection(e,t){if(e.isCollapsed)return this.check({name:'$text',inside:e.getFirstPosition(),attributes:t});else{const n=e.getRanges();for(const e of n)for(const n of e){const e=n.item.name||'$text',o=Array.from(n.item.getAttributeKeys()).concat(t);if(this.check({name:e,inside:n.previousPosition,attributes:o}))return!0}}return!1}getValidRanges(e,t){const n=[];for(const o of e){let e=o.start,i=o.start;const r=o.end;for(const r of o.getWalker()){const o=r.item.name||'$text',a=Zs.createBefore(r.item);this.check({name:o,inside:a,attributes:t})||(!i.isEqual(e)&&n.push(new el(i,e)),i=r.nextPosition),e=r.nextPosition}i&&!i.isEqual(r)&&n.push(new el(i,r))}return n}getLimitElement(e){let t=Array.from(e.getRanges()).reduce((e,t)=>e?e.getCommonAncestor(t.getCommonAncestor()):t.getCommonAncestor(),null);for(;!this.limits.has(t.name)&&t.parent;)t=t.parent;return t}removeDisallowedAttributes(e,t,n){for(const o of e){const e=o.is('text')?'$text':o.name,i=Array.from(o.getAttributeKeys()),r=yp._normalizeQueryPath(t);if(!this.check({name:e,attributes:i,inside:r}))for(const t of o.getAttributeKeys())this.check({name:e,attributes:t,inside:r})||(n?n.removeAttribute(o,t):o.removeAttribute(t));o.is('element')&&this.removeDisallowedAttributes(o.getChildren(),r.concat(o.name),n)}}_getItem(e){if(!this.hasItem(e))throw new _a('model-schema-no-item: Item with specified name does not exist in schema.');return this._items.get(e)}static _normalizeQueryPath(e){let t=[];if(Es(e))for(const n of e)n instanceof Gs?t.push(n.name):Os(n)&&t.push(n);else if(e instanceof Zs){for(let n=e.parent;null!==n;)t.push(n.name),n=n.parent;t.reverse()}else Os(e)&&(t=e.split(' '));return t}}class vp{constructor(e){this._schema=e,this._allowed=[],this._disallowed=[],this._requiredAttributes=[]}allow(e,t){this._addPath('_allowed',e,t)}disallow(e,t){this._addPath('_disallowed',e,t)}requireAttributes(e){this._requiredAttributes.push(e)}toJSON(){const e=Wd(this);return e._schema='[model.Schema]',e}_addPath(e,t,n){t=t.slice(),Es(n)||(n=[n]);for(const o of n)this[e].push({path:t,attribute:o})}_getPaths(e,t){const n='allow'===e?this._allowed:this._disallowed,o=[];for(const i of n)i.attribute===t&&o.push(i.path);return o}_checkRequiredAttributes(e){let t=!0;for(const n of this._requiredAttributes){t=!0;for(const o of n)if(-1==e.indexOf(o)){t=!1;break}if(t)break}return t}_hasMatchingPath(e,t,n){const o=this._getPaths(e,n);for(const i of o)if(an(this._schema,t,i))return!0;return!1}}class xp{constructor(){this._markers=new Map}[Symbol.iterator](){return this._markers.values()}has(e){return this._markers.has(e)}get(e){return this._markers.get(e)||null}set(e,t){const n=e instanceof Ap?e.name:e,o=this._markers.get(n);if(o){const e=o.getRange();if(e.isEqual(t))return o;this.remove(n)}const i=hp.createFromRange(t),r=new Ap(n,i);return this._markers.set(n,r),this.fire('add:'+n,r),r}remove(e){const t=e instanceof Ap?e.name:e,n=this._markers.get(t);return!!n&&(this._markers.delete(t),this.fire('remove:'+t,n),this._destroyMarker(n),!0)}*getMarkersAtPosition(e){for(const t of this)t.getRange().containsPosition(e)&&(yield t)}destroy(){for(const e of this._markers.values())this._destroyMarker(e);this._markers=null,this.stopListening()}*getMarkersGroup(e){for(const t of this._markers.values())t.name.startsWith(e+':')&&(yield t)}_destroyMarker(e){e.stopListening(),e._liveRange.detach(),e._liveRange=null}}a(xp,Oa);class Ap{constructor(e,t){this.name=e,this._liveRange=t,this._liveRange.delegate('change:range').to(this),this._liveRange.delegate('change:content').to(this)}getStart(){if(!this._liveRange)throw new _a('marker-destroyed: Cannot use a destroyed marker instance.');return Zs.createFromPosition(this._liveRange.start)}getEnd(){if(!this._liveRange)throw new _a('marker-destroyed: Cannot use a destroyed marker instance.');return Zs.createFromPosition(this._liveRange.end)}getRange(){if(!this._liveRange)throw new _a('marker-destroyed: Cannot use a destroyed marker instance.');return el.createFromRange(this._liveRange)}}a(Ap,Oa);const Cp='$graveyard';class Tp{constructor(){this.version=0,this.schema=new yp,this.history=new fp(this),this.markers=new xp,this.selection=new wp(this),this._pendingChanges=[],this.roots=new Map,this.selection.on('change:range',()=>{for(const e of this.selection.getRanges())if(!this._validateSelectionRange(e))throw new _a('document-selection-wrong-position: Range from document selection starts or ends at incorrect position.',{range:e})}),this.createRoot('$root',Cp)}get graveyard(){return this.getRoot(Cp)}applyOperation(e){if(e.baseVersion!==this.version)throw new _a('model-document-applyOperation-wrong-version: Only operations with matching versions can be applied.',{operation:e});const t=e._execute();this.version++,this.history.addDelta(e.delta),this.fire('change',e.type,t,e.delta.batch,e.delta.type)}batch(e){return new rm(this,e)}createRoot(e='$root',t='main'){if(this.roots.has(t))throw new _a('model-document-createRoot-name-exists: Root with specified name already exists.',{name:t});const n=new gp(this,e,t);return this.roots.set(t,n),n}destroy(){this.selection.destroy(),this.stopListening()}enqueueChanges(e){if(this._pendingChanges.push(e),1==this._pendingChanges.length){for(;this._pendingChanges.length;)this._pendingChanges[0](),this._pendingChanges.shift();this.fire('changesDone')}}getRoot(e='main'){if(!this.roots.has(e))throw new _a('model-document-getRoot-root-not-exist: Root with specified name does not exist.',{name:e});return this.roots.get(e)}hasRoot(e){return this.roots.has(e)}getRootNames(){return Array.from(this.roots.keys()).filter((e)=>e!=Cp)}getNearestSelectionRange(e,t='both'){if(this.schema.check({name:'$text',inside:e}))return new el(e);let n,o;('both'==t||'backward'==t)&&(n=new Ys({startPosition:e,direction:'backward'})),('both'==t||'forward'==t)&&(o=new Ys({startPosition:e}));for(const i of ln(n,o)){const e=i.walker==n?'elementEnd':'elementStart',t=i.value;if(t.type==e&&this.schema.objects.has(t.item.name))return el.createOn(t.item);if(this.schema.check({name:'$text',inside:t.nextPosition}))return new el(t.nextPosition)}return null}transformDeltas(e,t,n=!1){return cp.transformDeltaSets(e,t,n?this:null)}toJSON(){const e=Wd(this);return e.selection='[engine.model.DocumentSelection]',e}_getDefaultRoot(){for(const e of this.roots.values())if(e!==this.graveyard)return e;return this.graveyard}_getDefaultRange(){const e=this._getDefaultRoot(),t=new Zs(e,[0]),n=this.getNearestSelectionRange(t);return n||new el(t)}_validateSelectionRange(e){return sn(e.start)&&sn(e.end)}}a(Tp,Oa);class Pp{constructor(e){const t=this.constructor.build&&this.constructor.build.plugins;this.config=new ha(e,this.constructor.build&&this.constructor.build.config),this.config.define('plugins',t),this.plugins=new ya(this,t),this.commands=new va,this.locale=new Aa(this.config.get('lang')),this.t=this.locale.t,this.document=new Tp,this.data=new Ac(this.document),this.set('isReadOnly',!1)}initPlugins(){function e(e,t){return e.reduce((e,n)=>n[t]?e.then(n[t].bind(n)):e,Promise.resolve())}const t=this,n=this.config;return function(){const e=n.get('plugins')||[],o=n.get('removePlugins')||[];return t.plugins.load(e,o)}().then((t)=>e(t,'init').then(()=>e(t,'afterInit'))).then(()=>this.fire('pluginsReady'))}destroy(){return this.fire('destroy'),this.stopListening(),this.commands.destroy(),this.plugins.destroy().then(()=>{this.document.destroy(),this.data.destroy()})}execute(...e){this.commands.execute(...e)}static create(e){return new Promise((t)=>{const n=new this(e);t(n.initPlugins().then(()=>{n.fire('dataReady'),n.fire('ready')}).then(()=>n))})}}a(Pp,Us);const Ep=js({},Oa,{listenTo(...e){const t=e[0];dn(t)&&(e[0]=this._getProxyEmitter(t)||new Vp(t)),Oa.listenTo.apply(this,e)},stopListening(...e){const t=e[0];if(dn(t)){const n=this._getProxyEmitter(t);if(!n)return;e[0]=n}Oa.stopListening.apply(this,e)},_getProxyEmitter(e){return l(this,cn(e))}});var Sp=Ep;class Vp{constructor(e){d(this,cn(e)),this._domNode=e}}js(Vp.prototype,Oa,{on(e,t,n={}){if(Oa.on.call(this,e,t,n),!(this._domListeners&&this._domListeners[e])){const t=this._createDomListener(e,!!n.useCapture);this._domNode.addEventListener(e,t,!!n.useCapture),this._domListeners||(this._domListeners={}),this._domListeners[e]=t}},off(e,t){Oa.off.call(this,e,t);let n;!this._domListeners[e]||(n=this._events[e])&&n.callbacks.length||this._domListeners[e].removeListener()},_createDomListener(e,t){const n=(t)=>{this.fire(e,t)};return n.removeListener=()=>{this._domNode.removeEventListener(e,n,t),delete this._domListeners[e]},n}});class Op{constructor(){this._listener=Object.create(Sp)}listenTo(e){this._listener.listenTo(e,'keydown',(e,t)=>{this._listener.fire('_keydown:'+ee(t),t)})}set(e,t,n={}){const o=te(e),i=n.priority;this._listener.listenTo(this._listener,'_keydown:'+o,(e,n)=>{t(n,()=>{n.preventDefault(),n.stopPropagation(),e.stop()}),e.return=!0},{priority:i})}press(e){return!!this._listener.fire('_keydown:'+ee(e),e)}destroy(){this._listener.stopListening()}}class Rp extends Op{constructor(e){super(),this.editor=e}set(e,t,n={}){if('string'==typeof t){const e=t;t=(t,n)=>{this.editor.execute(e),n()}}super.set(e,t,n)}}class Fp{constructor(e,t){this._ranges=[],this._lastRangeBackward=!1,this._isFake=!1,this._fakeSelectionLabel='',e&&this.setRanges(e,t)}setFake(e=!0,t={}){this._isFake=e,this._fakeSelectionLabel=e?t.label||'':'',this.fire('change')}get isFake(){return this._isFake}get fakeSelectionLabel(){return this._fakeSelectionLabel}get anchor(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.end:e.start;return ec.createFromPosition(t)}get focus(){if(!this._ranges.length)return null;const e=this._ranges[this._ranges.length-1],t=this._lastRangeBackward?e.start:e.end;return ec.createFromPosition(t)}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(e,t){if(!(e instanceof tc))throw new _a('view-selection-invalid-range: Invalid Range.');this._pushRange(e),this._lastRangeBackward=!!t,this.fire('change')}*getRanges(){for(const e of this._ranges)yield tc.createFromRange(e)}getFirstRange(){let e=null;for(const t of this._ranges)(!e||t.start.isBefore(e.start))&&(e=t);return e?tc.createFromRange(e):null}getLastRange(){let e=null;for(const t of this._ranges)(!e||t.end.isAfter(e.end))&&(e=t);return e?tc.createFromRange(e):null}getFirstPosition(){const e=this.getFirstRange();return e?ec.createFromPosition(e.start):null}getLastPosition(){const e=this.getLastRange();return e?ec.createFromPosition(e.end):null}isEqual(e){if(this.isFake!=e.isFake)return!1;if(this.isFake&&this.fakeSelectionLabel!=e.fakeSelectionLabel)return!1;if(this.rangeCount!=e.rangeCount)return!1;if(0===this.rangeCount)return!0;if(!this.anchor.isEqual(e.anchor)||!this.focus.isEqual(e.focus))return!1;for(const t of this._ranges){let n=!1;for(const o of e._ranges)if(t.isEqual(o)){n=!0;break}if(!n)return!1}return!0}isSimilar(e){if(this.isBackward!=e.isBackward)return!1;const t=mn(this.getRanges()),n=mn(e.getRanges());if(t!=n)return!1;if(0==t)return!0;for(let t of this.getRanges()){t=t.getTrimmed();let n=!1;for(let o of e.getRanges())if(o=o.getTrimmed(),t.start.isEqual(o.start)&&t.end.isEqual(o.end)){n=!0;break}if(!n)return!1}return!0}removeAllRanges(){this._ranges.length&&(this._ranges=[],this.fire('change'))}setRanges(e,t){this._ranges=[];for(const n of e){if(!(n instanceof tc))throw new _a('view-selection-invalid-range: Invalid Range.');this._pushRange(n)}this._lastRangeBackward=!!t,this.fire('change')}setTo(e){e instanceof Fp?(this._isFake=e._isFake,this._fakeSelectionLabel=e._fakeSelectionLabel,this.setRanges(e.getRanges(),e.isBackward)):e instanceof tc?this.setRanges([e]):E(e)?this.setRanges(e):this.setRanges([new tc(e)])}setIn(e){this.setRanges([tc.createIn(e)])}setOn(e){this.setRanges([tc.createOn(e)])}setCollapsedAt(e,t){const n=ec.createAt(e,t),o=new tc(n,n);this.setRanges([o])}collapseToStart(){const e=this.getFirstPosition();null!==e&&this.setRanges([new tc(e,e)])}collapseToEnd(){const e=this.getLastPosition();null!==e&&this.setRanges([new tc(e,e)])}moveFocusTo(e,t){if(null===this.anchor)throw new _a('view-selection-moveFocusTo-no-ranges: Cannot set selection focus if there are no ranges in selection.');const n=ec.createAt(e,t);if('same'!=n.compareWith(this.focus)){const e=this.anchor;this._ranges.pop(),'before'==n.compareWith(e)?this.addRange(new tc(n,e),!0):this.addRange(new tc(e,n))}}getSelectedElement(){if(1!==this.rangeCount)return null;const e=this.getFirstRange(),t=e.start.nodeAfter,n=e.end.nodeBefore;return t instanceof Qd&&t==n?t:null}static createFromSelection(e){const t=new Fp;return t.setTo(e),t}_pushRange(e){for(const t of this._ranges)if(e.isIntersecting(t))throw new _a('view-selection-range-intersects: Trying to add a range that intersects with another range from selection.',{addedRange:e,intersectingRange:t});this._ranges.push(tc.createFromRange(e))}}a(Fp,Oa);const Ip=(e)=>{const t=e.createElement('br');return t.dataset.ckeFiller=!0,t},Np=(e)=>e.createTextNode('\xA0'),Bp=7;let Mp='';for(let o=0;oe.name),o=e.getAttributeKeys();for(const n of o)t.setAttribute(n,e.getAttribute(n));for(const o of n)e.hasAttribute(o)||t.removeAttribute(o)}_updateChildren(e,t){function n(e,t){if(e===t)return!0;return o.isText(e)&&o.isText(t)?e.data===t.data:fn(e,o.blockFiller)&&fn(t,o.blockFiller)}const o=this.domConverter,r=o.mapViewToDom(e);if(r){const a=r.ownerDocument,s=t.inlineFillerPosition,l=r.childNodes,d=Array.from(o.viewChildrenToDom(e,a,{bind:!0}));s&&s.parent==e&&this._addInlineFiller(a,d,s.offset);const c=_n(l,d,n);let m=0;const i=new Set;for(const e of c)'insert'===e?(kn(r,m,d[m]),m++):'delete'===e?(i.add(l[m]),wn(l[m])):m++;for(const e of i)e.parentNode||this.domConverter.unbindDomElement(e)}}_updateSelection(){if(0===this.selection.rangeCount)return this._removeDomSelection(),void this._removeFakeSelection();const e=this.domConverter.mapViewToDom(this.selection.editableElement);this.isFocused&&e&&(this.selection.isFake?this._updateFakeSelection(e):(this._removeFakeSelection(),this._updateDomSelection(e)))}_updateFakeSelection(e){const t=e.ownerDocument;this._fakeSelectionContainer||(this._fakeSelectionContainer=t.createElement('div'),this._fakeSelectionContainer.style.position='fixed',this._fakeSelectionContainer.style.top=0,this._fakeSelectionContainer.style.left='-9999px',this._fakeSelectionContainer.appendChild(t.createTextNode('\xA0'))),this._fakeSelectionContainer.parentElement||e.appendChild(this._fakeSelectionContainer);const n=this.selection.fakeSelectionLabel||'\xA0';this._fakeSelectionContainer.firstChild.data=n;const o=t.getSelection();o.removeAllRanges();const i=t.createRange();i.selectNodeContents(this._fakeSelectionContainer),o.addRange(i),this.domConverter.bindFakeSelection(this._fakeSelectionContainer,this.selection)}_updateDomSelection(e){const t=e.ownerDocument.defaultView.getSelection();if(this._domSelectionNeedsUpdate(t)){const e=this.domConverter.viewPositionToDom(this.selection.anchor),n=this.domConverter.viewPositionToDom(this.selection.focus);t.collapse(e.parent,e.offset),t.extend(n.parent,n.offset)}}_domSelectionNeedsUpdate(e){if(!this.domConverter.isDomSelectionCorrect(e))return!0;const t=e&&this.domConverter.domSelectionToView(e);return t&&this.selection.isEqual(t)?!1:!this.selection.isCollapsed&&this.selection.isSimilar(t)?!1:!0}_removeDomSelection(){for(const e of this.domDocuments){const t=e.getSelection();if(t.rangeCount){const t=e.activeElement,n=this.domConverter.mapDomToView(t);t&&n&&e.getSelection().removeAllRanges()}}}_removeFakeSelection(){const e=this._fakeSelectionContainer;e&&e.remove()}_updateFocus(){if(this.isFocused){const e=this.selection.editableElement;e&&this.domConverter.focus(e)}}}a(Lp,Us);var jp={window,document};class zp{constructor(e={}){this.blockFiller=e.blockFiller||Ip,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(e,t){this._fakeSelectionMapping.set(e,Fp.createFromSelection(t))}fakeSelectionToView(e){return this._fakeSelectionMapping.get(e)}bindElements(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}unbindDomElement(e){const t=this._domToViewMapping.get(e);if(t){this._domToViewMapping.delete(e),this._viewToDomMapping.delete(t);for(const t of Array.from(e.childNodes))this.unbindDomElement(t)}}bindDocumentFragments(e,t){this._domToViewMapping.set(e,t),this._viewToDomMapping.set(t,e)}viewToDom(e,t,n={}){if(e.is('text')){const n=this._processDataFromViewText(e);return t.createTextNode(n)}else{if(this.mapViewToDom(e))return this.mapViewToDom(e);let o;if(e.is('documentFragment'))o=t.createDocumentFragment(),n.bind&&this.bindDocumentFragments(o,e);else{if(e.is('uiElement'))return o=e.render(t),n.bind&&this.bindElements(o,e),o;o=t.createElement(e.name),n.bind&&this.bindElements(o,e);for(const t of e.getAttributeKeys())o.setAttribute(t,e.getAttribute(t))}if(n.withChildren||void 0===n.withChildren)for(const i of this.viewChildrenToDom(e,t,n))o.appendChild(i);return o}}*viewChildrenToDom(e,t,n={}){const o=e.getFillerOffset&&e.getFillerOffset();let i=0;for(const r of e.getChildren())o===i&&(yield this.blockFiller(t)),yield this.viewToDom(r,t,n),i++;o===i&&(yield this.blockFiller(t))}viewRangeToDom(e){const t=this.viewPositionToDom(e.start),n=this.viewPositionToDom(e.end),o=document.createRange();return o.setStart(t.parent,t.offset),o.setEnd(n.parent,n.offset),o}viewPositionToDom(e){const t=e.parent;if(t.is('text')){const n=this.findCorrespondingDomText(t);if(!n)return null;let o=e.offset;return un(n)&&(o+=Bp),{parent:n,offset:o}}else{let n,o,i;if(0===e.offset){if(n=this.mapViewToDom(t),!n)return null;i=n.childNodes[0]}else{const t=e.nodeBefore;if(o=t.is('text')?this.findCorrespondingDomText(t):this.mapViewToDom(e.nodeBefore),!o)return null;n=o.parentNode,i=o.nextSibling}if(this.isText(i)&&un(i))return{parent:i,offset:Bp};const r=o?vn(o)+1:0;return{parent:n,offset:r}}}domToView(e,t={}){if(fn(e,this.blockFiller))return null;const n=this.getParentUIElement(e,this._domToViewMapping);if(n)return n;if(this.isText(e)){if(pn(e))return null;else{const t=this._processDataFromDomText(e);return''===t?null:new $d(t)}}else if(this.isComment(e))return null;else{if(this.mapDomToView(e))return this.mapDomToView(e);let n;if(this.isDocumentFragment(e))n=new gc,t.bind&&this.bindDocumentFragments(e,n);else{const o=t.keepOriginalCase?e.tagName:e.tagName.toLowerCase();n=new Qd(o),t.bind&&this.bindElements(e,n);const r=e.attributes;for(let e=r.length-1;0<=e;e--)n.setAttribute(r[e].name,r[e].value)}if(t.withChildren||void 0===t.withChildren)for(const o of this.domChildrenToView(e,t))n.appendChildren(o);return n}}*domChildrenToView(e,t={}){for(let n=0;no?0:o),new ec(n,o)):null}if(0===t){const t=this.mapDomToView(e);if(t)return new ec(t,0)}else{const n=e.childNodes[t-1],o=this.isText(n)?this.findCorrespondingViewText(n):this.mapDomToView(n);if(o&&o.parent)return new ec(o.parent,o.index+1)}return null}mapDomToView(e){return this.getParentUIElement(e)||this._domToViewMapping.get(e)}findCorrespondingViewText(e){if(pn(e))return null;const t=this.getParentUIElement(e);if(t)return t;const n=e.previousSibling;if(n){if(!this.isElement(n))return null;const e=this.mapDomToView(n);if(e){const t=e.nextSibling;return t instanceof $d?e.nextSibling:null}}else{const t=this.mapDomToView(e.parentNode);if(t){const e=t.getChild(0);return e instanceof $d?e:null}}return null}mapViewToDom(e){return this._viewToDomMapping.get(e)}findCorrespondingDomText(e){const t=e.previousSibling;return t&&this.mapViewToDom(t)?this.mapViewToDom(t).nextSibling:!t&&e.parent&&this.mapViewToDom(e.parent)?this.mapViewToDom(e.parent).childNodes[0]:null}focus(e){const t=this.mapViewToDom(e);if(t&&t.ownerDocument.activeElement!==t){const{scrollX:e,scrollY:n}=jp.window,o=[];Tn(t,(e)=>{const{scrollLeft:t,scrollTop:n}=e;o.push([t,n])}),t.focus(),Tn(t,(e)=>{const[t,n]=o.shift();e.scrollLeft=t,e.scrollTop=n}),jp.window.scrollTo(e,n)}}isText(e){return e&&e.nodeType==Node.TEXT_NODE}isElement(e){return e&&e.nodeType==Node.ELEMENT_NODE}isDocumentFragment(e){return e&&e.nodeType==Node.DOCUMENT_FRAGMENT_NODE}isComment(e){return e&&e.nodeType==Node.COMMENT_NODE}isDomSelectionBackward(e){if(e.isCollapsed)return!1;const t=document.createRange();t.setStart(e.anchorNode,e.anchorOffset),t.setEnd(e.focusNode,e.focusOffset);const n=t.collapsed;return t.detach(),n}getParentUIElement(e){const t=xn(e);for(t.pop();t.length;){const e=t.pop(),n=this._domToViewMapping.get(e);if(n&&n.is('uiElement'))return n}return null}isDomSelectionCorrect(e){return this._isDomSelectionPositionCorrect(e.anchorNode,e.anchorOffset)&&this._isDomSelectionPositionCorrect(e.focusNode,e.focusOffset)}_isDomSelectionPositionCorrect(e,t){if(this.isText(e)&&un(e)&&tthis.preElements.includes(e.name)))return t;if(' '==t.charAt(0)){const n=this._getTouchingViewTextNode(e,!1),o=n&&this._nodeEndsWithSpace(n);(o||!n)&&(t='\xA0'+t.substr(1))}if(' '==t.charAt(t.length-1)){const n=this._getTouchingViewTextNode(e,!0);n||(t=t.substr(0,t.length-1)+'\xA0')}return t.replace(/ {2}/g,' \xA0')}_nodeEndsWithSpace(e){if(e.getAncestors().some((e)=>this.preElements.includes(e.name)))return!1;const t=this._processDataFromViewText(e);return' '==t.charAt(t.length-1)}_processDataFromDomText(e){let t=gn(e);if(Cn(e,this.preElements))return t;t=t.replace(/[ \n\t\r]{1,}/g,' ');const n=this._getTouchingDomTextNode(e,!1),o=this._getTouchingDomTextNode(e,!0);return(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^ /,'')),o||(t=t.replace(/ $/,'')),t=t.replace(/ \u00A0/g,' '),(!n||/[^\S\u00A0]/.test(n.data.charAt(n.data.length-1)))&&(t=t.replace(/^\u00A0/,' ')),o&&'\xA0'!=o.data.charAt(0)||(t=t.replace(/\u00A0( *)$/,' $1')),t}_getTouchingViewTextNode(e,t){const n=new Gd({startPosition:t?ec.createAfter(e):ec.createBefore(e),direction:t?'forward':'backward'});for(const o of n){if(o.item.is('containerElement'))return null;if(o.item.is('text'))return o.item}return null}_getTouchingDomTextNode(e,t){if(!e.parentNode)return null;const n=t?'nextNode':'previousNode',o=e.ownerDocument,i=o.createTreeWalker(o.childNodes[0],NodeFilter.SHOW_TEXT);i.currentNode=e;const r=i[n]();if(null!==r){const t=An(e,r);if(t&&!Cn(e,this.blockElements,t)&&!Cn(r,this.blockElements,t))return r}return null}}const qp=Symbol('rootName');class Hp extends Zd{constructor(e){super(e),this.rootName='main'}is(e,t=null){return t?'rootElement'==e&&t==this.name||super.is(e,t):'rootElement'==e||super.is(e)}get rootName(){return this.getCustomProperty(qp)}set rootName(e){this.setCustomProperty(qp,e)}}class Wp{constructor(e){this.document=e,this.isEnabled=!1}enable(){this.isEnabled=!0}disable(){this.isEnabled=!1}destroy(){this.disable(),this.stopListening()}}a(Wp,Sp);var Up=function(e,t,n){n='function'==typeof n?n:void 0;var o=n?n(e,t):void 0;return o===void 0?Hc(e,t,n):!!o};class $p extends Wp{constructor(e){super(e),this._config={childList:!0,characterData:!0,characterDataOldValue:!0,subtree:!0},this.domConverter=e.domConverter,this.renderer=e.renderer,this._domElements=[],this._mutationObserver=new window.MutationObserver(this._onMutations.bind(this))}flush(){this._onMutations(this._mutationObserver.takeRecords())}observe(e){this._domElements.push(e),this.isEnabled&&this._mutationObserver.observe(e,this._config)}enable(){super.enable();for(const e of this._domElements)this._mutationObserver.observe(e,this._config)}disable(){super.disable(),this._mutationObserver.disconnect()}destroy(){super.destroy(),this._mutationObserver.disconnect()}_onMutations(e){function t(e,t){if(!Array.isArray(e))return e===t||e.is('text')&&t.is('text')&&e.data===t.data}if(0===e.length)return;const n=this.domConverter,o=new Map,i=new Set;for(const t of e)if('childList'===t.type){const e=n.mapDomToView(t.target);if(e&&e.is('uiElement'))continue;e&&!this._isBogusBrMutation(t)&&i.add(e)}for(const t of e){const e=n.mapDomToView(t.target);if(!(e&&e.is('uiElement'))&&'characterData'===t.type){const e=n.findCorrespondingViewText(t.target);e&&!i.has(e.parent)?o.set(e,{type:'text',oldText:e.data,newText:gn(t.target),node:e}):!e&&un(t.target)&&i.add(n.mapDomToView(t.target.parentNode))}}const r=[];for(const t of o.values())this.renderer.markToSync('text',t.node),r.push(t);for(const o of i){const e=n.mapViewToDom(o),i=Array.from(o.getChildren()),a=Array.from(n.domChildrenToView(e));Up(i,a,t)||(this.renderer.markToSync('children',o),r.push({type:'children',oldChildren:i,newChildren:a,node:o}))}const a=e[0].target.ownerDocument.getSelection();let s=null;if(a&&a.anchorNode){const e=n.domPositionToView(a.anchorNode,a.anchorOffset),t=n.domPositionToView(a.focusNode,a.focusOffset);e&&t&&(s=new Fp,s.setCollapsedAt(e),s.moveFocusTo(t))}this.document.fire('mutations',r,s),this.document.render()}_isBogusBrMutation(e){let t=null;return null===e.nextSibling&&0===e.removedNodes.length&&1==e.addedNodes.length&&(t=this.domConverter.domToView(e.addedNodes[0],{withChildren:!1})),t&&t.is('element','br')}}var Kp=Date.now,Qp=Kp,Jp=function(e,t,n){function o(t){var n=f,o=h;return f=h=void 0,m=t,_=e.apply(o,n),_}function i(e){return m=e,k=setTimeout(s,t),u?o(e):_}function r(e){var n=e-c,o=e-m,i=t-n;return p?oa(i,b-o):i}function a(e){var n=e-c,o=e-m;return!c||n>=t||0>n||p&&o>=b}function s(){var e=Qp();return a(e)?l(e):void(k=setTimeout(s,r(e)))}function l(e){return(clearTimeout(k),k=void 0,g&&f)?o(e):(f=h=void 0,_)}function d(){var e=Qp(),n=a(e);if(f=arguments,h=this,c=e,n){if(void 0===k)return i(c);if(p)return clearTimeout(k),k=setTimeout(s,t),o(c)}return void 0===k&&(k=setTimeout(s,t)),_}var c=0,m=0,u=!1,p=!1,g=!0,f,h,b,_,k;if('function'!=typeof e)throw new TypeError('Expected a function');return t=is(t)||0,La(n)&&(u=!!n.leading,p='maxWait'in n,b=p?ia(is(n.maxWait)||0,t):b,g='trailing'in n?!!n.trailing:g),d.cancel=function(){void 0!==k&&clearTimeout(k),c=m=0,f=h=k=void 0},d.flush=function(){return void 0===k?_:l(Qp())},d};class Gp extends Wp{constructor(e){super(e),this.mutationObserver=e.getObserver($p),this.document=e,this.selection=e.selection,this.domConverter=e.domConverter,this._documents=new WeakSet,this._fireSelectionChangeDoneDebounced=Jp((e)=>this.document.fire('selectionChangeDone',e),200),this._clearInfiniteLoopInterval=setInterval(()=>this._clearInfiniteLoop(),1e3),this._loopbackCounter=0}observe(e){const t=e.ownerDocument;this._documents.has(t)||(this.listenTo(t,'selectionchange',()=>{this._handleSelectionChange(t)}),this._documents.add(t))}destroy(){super.destroy(),clearInterval(this._clearInfiniteLoopInterval),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionChange(e){if(this.isEnabled&&(this.document.isFocused||this.document.isReadOnly)){this.mutationObserver.flush();const t=e.defaultView.getSelection(),n=this.domConverter.domSelectionToView(t);if(!(this.selection.isEqual(n)&&this.domConverter.isDomSelectionCorrect(t))){if(60<++this._loopbackCounter)return void wa.warn('selectionchange-infinite-loop: Selection change observer detected an infinite rendering loop.');if(this.selection.isSimilar(n))this.document.render();else{const e={oldSelection:this.selection,newSelection:n,domSelection:t};this.document.fire('selectionChange',e),this._fireSelectionChangeDoneDebounced(e)}}}}_clearInfiniteLoop(){this._loopbackCounter=0}}class Yp{constructor(e,t,n){this.document=e,this.domEvent=t,this.domTarget=t.target,js(this,n)}get target(){return this.document.domConverter.mapDomToView(this.domTarget)}preventDefault(){this.domEvent.preventDefault()}stopPropagation(){this.domEvent.stopPropagation()}}class Xp extends Wp{constructor(e){super(e),this.useCapture=!1}observe(e){const t='string'==typeof this.domEventType?[this.domEventType]:this.domEventType;t.forEach((t)=>{this.listenTo(e,t,(e,t)=>{this.isEnabled&&this.onDomEvent(t)},{useCapture:this.useCapture})})}fire(e,t,n){this.isEnabled&&this.document.fire(e,new Yp(this.document,t,n))}}class Zp extends Xp{constructor(e){super(e),this.domEventType=['focus','blur'],this.useCapture=!0,e.on('focus',()=>{e.isFocused=!0,this._renderTimeoutId=setTimeout(()=>e.render(),0)}),e.on('blur',(t,n)=>{const o=e.selection.editableElement;(null===o||o===n.target)&&(e.isFocused=!1,e.render())})}onDomEvent(e){this.fire(e.type,e)}destroy(){this._renderTimeoutId&&clearTimeout(this._renderTimeoutId),super.destroy()}}class eg extends Xp{constructor(e){super(e),this.domEventType=['keydown','keyup']}onDomEvent(e){this.fire(e.type,e,{keyCode:e.keyCode,altKey:e.altKey,ctrlKey:e.ctrlKey||e.metaKey,shiftKey:e.shiftKey,get keystroke(){return ee(this)}})}}class tg extends Wp{constructor(e){super(e),this._fireSelectionChangeDoneDebounced=Jp((e)=>this.document.fire('selectionChangeDone',e),200)}observe(){const e=this.document;e.on('keydown',(t,n)=>{const o=e.selection;o.isFake&&Pn(n.keyCode)&&this.isEnabled&&(n.preventDefault(),this._handleSelectionMove(n.keyCode))},{priority:'lowest'})}destroy(){super.destroy(),this._fireSelectionChangeDoneDebounced.cancel()}_handleSelectionMove(e){const t=this.document.selection,n=Fp.createFromSelection(t);n.setFake(!1),(e==uc.arrowleft||e==uc.arrowup)&&n.collapseToStart(),(e==uc.arrowright||e==uc.arrowdown)&&n.collapseToEnd();const o={oldSelection:t,newSelection:n,domSelection:null};this.document.fire('selectionChange',o),this._fireSelectionChangeDoneDebounced(o)}}var ng=function(e){return!!e&&1===e.nodeType&&da(e)&&!fa(e)};class og{constructor(e){const t=En(e);if(Object.defineProperty(this,'_source',{value:e._source||e,writable:!0,enumerable:!1}),ng(e)||t){const n=t?e.startContainer:e;n.ownerDocument&&n.ownerDocument.body.contains(n)||wa.warn('rect-source-not-in-dom: The source of this rect does not belong to any rendered DOM tree.',{source:e}),t?On(this,og.getDomRangeRects(e)[0]):On(this,e.getBoundingClientRect())}else if(Sn(e)){const{innerWidth:t,innerHeight:n}=e;On(this,{top:0,right:t,bottom:n,left:0,width:t,height:n})}else On(this,e)}clone(){return new og(this)}moveTo(e,t){return this.top=t,this.right=e+this.width,this.bottom=t+this.height,this.left=e,this}moveBy(e,t){return this.top+=t,this.right+=e,this.left+=e,this.bottom+=t,this}getIntersection(e){const t={top:ia(this.top,e.top),right:oa(this.right,e.right),bottom:oa(this.bottom,e.bottom),left:ia(this.left,e.left)};return t.width=t.right-t.left,t.height=t.bottom-t.top,0>t.width||0>t.height?null:new og(t)}getIntersectionArea(e){const t=this.getIntersection(e);return t?t.getArea():0}getArea(){return this.width*this.height}getVisible(){const e=this._source;let t=this.clone();if(!Rn(e))for(let n=e.parentNode||e.commonAncestorContainer;n&&!Rn(n);){const e=new og(n),o=t.getIntersection(e);if(o)o.getArea()new og(e))}});class rg{constructor(){this.domRoots=new Map,this.selection=new Fp,this.domConverter=new zp,this.roots=new Map,this.set('isReadOnly',!1),this.set('isFocused',!1),this.renderer=new Lp(this.domConverter,this.selection),this.renderer.bind('isFocused').to(this),this._observers=new Map,this.addObserver($p),this.addObserver(Gp),this.addObserver(Zp),this.addObserver(eg),this.addObserver(tg),hn(this),ie(this),this.decorate('render')}addObserver(e){let t=this._observers.get(e);if(t)return t;t=new e(this),this._observers.set(e,t);for(const[n,o]of this.domRoots)t.observe(o,n);return t.enable(),t}getObserver(e){return this._observers.get(e)}createRoot(e,t='main'){const n='string'==typeof e?e:e.tagName,o=new Hp(n.toLowerCase(),t);return o.document=this,this.roots.set(t,o),o.on('change:children',(e,t)=>this.renderer.markToSync('children',t)),o.on('change:attributes',(e,t)=>this.renderer.markToSync('attributes',t)),o.on('change:text',(e,t)=>this.renderer.markToSync('text',t)),this.domConverter.isElement(e)&&this.attachDomRoot(e,t),o}attachDomRoot(e,t='main'){const n=this.getRoot(t);this.domRoots.set(t,e),this.domConverter.bindElements(e,n),this.renderer.markToSync('children',n),this.renderer.domDocuments.add(e.ownerDocument);for(const n of this._observers.values())n.observe(e,t)}getRoot(e='main'){return this.roots.get(e)}getDomRoot(e='main'){return this.domRoots.get(e)}render(){this.disableObservers(),this.renderer.render(),this.enableObservers()}focus(){if(!this.isFocused){const e=this.selection.editableElement;e?(this.domConverter.focus(e),this.render()):wa.warn('view-focus-no-selection: There is no selection in any editable to focus.')}}scrollToTheSelection(){const e=this.selection.getFirstRange();e&&Fn({target:this.domConverter.viewRangeToDom(e),viewportOffset:20})}disableObservers(){for(const e of this._observers.values())e.disable()}enableObservers(){for(const e of this._observers.values())e.enable()}destroy(){for(const e of this._observers.values())e.destroy()}}a(rg,Us);class ag{constructor(e){this.model=e,this.view=new rg,this.mapper=new nc,this.modelToView=new rc(this.model,{mapper:this.mapper,viewSelection:this.view.selection}),this.listenTo(this.model,'change',(e,t,n)=>{this.modelToView.convertChange(t,n)},{priority:'low'}),this.listenTo(this.model,'changesDone',()=>{const e=this.model.selection;this.modelToView.convertSelection(e),this.view.render()},{priority:'low'}),this.listenTo(this.model.markers,'add',(e,t)=>{this.modelToView.convertMarker('addMarker',t.name,t.getRange())}),this.listenTo(this.model.markers,'remove',(e,t)=>{this.modelToView.convertMarker('removeMarker',t.name,t.getRange())}),this.listenTo(this.view,'selectionChange',Hn(this.model,this.mapper)),this.modelToView.on('insert:$text',Se(),{priority:'lowest'}),this.modelToView.on('remove',Ne(),{priority:'low'}),this.modelToView.on('selection',Gn(),{priority:'low'}),this.modelToView.on('selection',Yn(),{priority:'low'}),this.modelToView.on('selection',Wn(),{priority:'low'}),this.modelToView.on('selection',Un(),{priority:'low'})}createRoot(e,t='main'){const n=this.view.createRoot(e,t),o=this.model.getRoot(t);return this.mapper.bindElements(o,n),n}destroy(){this.view.destroy(),this.stopListening()}}a(ag,Us);class sg extends Pp{constructor(e,t){super(t),this.element=e,this.editing=new ag(this.document),this.editing.view.bind('isReadOnly').to(this),this.keystrokes=new Rp(this),this.keystrokes.listenTo(this.editing.view),this._attachToForm()}destroy(){return Promise.resolve().then(()=>this.keystrokes.destroy()).then(()=>this.editing.destroy()).then(super.destroy())}setData(e){this.data.set(e)}getData(){return this.data.get()}updateEditorElement(){Zn(this.element,this.getData())}loadDataFromEditorElement(){this.setData(Xn(this.element))}_attachToForm(){const e=this.element;if(e&&'textarea'===e.tagName.toLowerCase()&&e.form){let t;const n=e.form,o=()=>this.updateEditorElement();qa(n.submit)&&(t=n.submit,n.submit=()=>{o(),t.apply(n)}),n.addEventListener('submit',o),this.on('destroy',()=>{n.removeEventListener('submit',o),t&&(n.submit=t)})}}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}class lg{getHtml(e){const t=document.implementation.createHTMLDocument(''),n=t.createElement('div');return n.appendChild(e),n.innerHTML}}class dg{constructor(){this._domParser=new DOMParser,this._domConverter=new zp({blockFiller:Np}),this._htmlWriter=new lg}toData(e){const t=this._domConverter.viewToDom(e,document);return this._htmlWriter.getHtml(t)}toView(e){const t=this._toDom(e);return this._domConverter.domToView(t)}_toDom(e){const t=this._domParser.parseFromString(e,'text/html'),n=t.createDocumentFragment(),o=t.body.childNodes;for(;0this._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(){clearTimeout(this._nextEventLoopTimeout),this._nextEventLoopTimeout=setTimeout(()=>{this.focusedElement=null,this.isFocused=!1},0)}}a(mg,Sp),a(mg,Us);class ug{constructor(e,t){this.editor=e,this.view=t,this.componentFactory=new cg(e),this.focusTracker=new mg,this._toolbarConfig=no(e.config.get('toolbar'))}init(){const e=this.editor,t=this.view;t.render(),t.stickyPanel.bind('isActive').to(this.focusTracker,'isFocused'),t.stickyPanel.limiterElement=t.element,this._toolbarConfig.viewportTopOffset&&(t.stickyPanel.viewportTopOffset=this._toolbarConfig.viewportTopOffset);const n=e.editing.createRoot('div');t.editable.bind('isReadOnly').to(n),t.editable.bind('isFocused').to(e.editing.view),t.editable.name=n.rootName,this.focusTracker.add(this.view.editableElement),this.view.toolbar.fillFromConfig(this._toolbarConfig.items,this.componentFactory),to({origin:e.editing.view,originFocusTracker:this.focusTracker,originKeystrokeHandler:e.keystrokes,toolbar:this.view.toolbar})}destroy(){this.view.destroy()}}class pg{constructor(e={}){this._items=[],this._itemMap=new Map,this._idProperty=e.idProperty||'id',this._bindToExternalToInternalMap=new WeakMap,this._bindToInternalToExternalMap=new WeakMap}get length(){return this._items.length}get first(){return this._items[0]||null}get last(){return this._items[this.length-1]||null}add(e,t){let n;const o=this._idProperty;if(o in e){if(n=e[o],'string'!=typeof n)throw new _a('collection-add-invalid-id');if(this.get(n))throw new _a('collection-add-item-already-exists')}else e[o]=n=s();if(void 0===t)t=this._items.length;else if(t>this._items.length||0>t)throw new _a('collection-add-item-invalid-index');return this._items.splice(t,0,e),this._itemMap.set(n,e),this.fire('add',e,t),this}get(e){let t;if('string'==typeof e)t=this._itemMap.get(e);else if('number'==typeof e)t=this._items[e];else throw new _a('collection-get-invalid-arg: Index or id must be given.');return t||null}getIndex(e){let t;return t='string'==typeof e?this._itemMap.get(e):e,this._items.indexOf(t)}remove(e){let t=!1,n,o,i;const r=this._idProperty;if('string'==typeof e?(o=e,i=this._itemMap.get(o),t=!i,i&&(n=this._items.indexOf(i))):'number'==typeof e?(n=e,i=this._items[n],t=!i,i&&(o=i[r])):(i=e,o=i[r],n=this._items.indexOf(i),t=-1==n||!this._itemMap.get(o)),t)throw new _a('collection-remove-404: Item not found.');this._items.splice(n,1),this._itemMap.delete(o);const a=this._bindToInternalToExternalMap.get(i);return this._bindToInternalToExternalMap.delete(i),this._bindToExternalToInternalMap.delete(a),this.fire('remove',i),i}map(e,t){return this._items.map(e,t)}find(e,t){return this._items.find(e,t)}filter(e,t){return this._items.filter(e,t)}clear(){for(this._bindToCollection&&(this.stopListening(this._bindToCollection),this._bindToCollection=null);this.length;)this.remove(0)}bindTo(e){if(this._bindToCollection)throw new _a('collection-bind-to-rebind: The collection cannot be bound more than once.');return this._bindToCollection=e,{as:(e)=>{this._setUpBindToBinding((t)=>new e(t))},using:(e)=>{'function'==typeof e?this._setUpBindToBinding((t)=>e(t)):this._setUpBindToBinding((t)=>t[e])}}}_setUpBindToBinding(e){const t=this._bindToCollection,n=(n,o,i)=>{const r=t._bindToCollection==this,a=t._bindToInternalToExternalMap.get(o);if(r&&a)this._bindToExternalToInternalMap.set(o,a),this._bindToInternalToExternalMap.set(a,o);else{const t=e(o);this._bindToExternalToInternalMap.set(o,t),this._bindToInternalToExternalMap.set(t,o),this.add(t,i)}};for(const o of t)n(null,o);this.listenTo(t,'add',n),this.listenTo(t,'remove',(e,t)=>{const n=this._bindToExternalToInternalMap.get(t);n&&this.remove(n)})}[Symbol.iterator](){return this._items[Symbol.iterator]()}}a(pg,Oa);class gg extends pg{constructor(e){super({idProperty:'viewUid'}),this.on('add',(e,t,n)=>{t.isRendered||t.render(),t.element&&this._parentElement&&this._parentElement.insertBefore(t.element,this._parentElement.children[n])}),this.on('remove',(e,t)=>{t.element&&this._parentElement&&t.element.remove()}),this.locale=e,this._parentElement=null}destroy(){this.map((e)=>e.destroy())}setParent(e){this._parentElement=e}delegate(...e){if(!e.length||!oo(e))throw new _a('ui-viewcollection-delegate-wrong-events: All event names must be strings.');return{to:(t)=>{for(const n of this)for(const o of e)n.delegate(o).to(t);this.on('add',(n,o)=>{for(const i of e)o.delegate(i).to(t)}),this.on('remove',(n,o)=>{for(const i of e)o.stopDelegating(i,t)})}}}}a(pg,Us);var fg=function(e,t){return Hd(e,!0,!0,t)};class hg{constructor(e){Object.assign(this,uo(mo(e))),this._isRendered=!1,this._revertData=null}render(){const e=this._renderNode({intoFragment:!0});return this._isRendered=!0,e}apply(e){return this._revertData=Co(),this._renderNode({node:e,isApplying:!0,revertData:this._revertData}),e}revert(e){if(!this._revertData)throw new _a('ui-template-revert-not-applied: Attempting to revert a template which has not been applied yet.');this._revertTemplateFromNode(e,this._revertData)}*getViews(){function*e(t){if(t.children)for(const n of t.children)vo(n)?yield n:xo(n)&&(yield*e(n))}yield*e(this)}static bind(e,t){return{to(n,o){return new _g({eventNameOrFunction:n,attribute:n,observable:e,emitter:t,callback:o})},if(n,o,i){return new kg({observable:e,emitter:t,attribute:n,valueIfTrue:o,callback:i})}}}static extend(e,t){e._isRendered&&wa.warn('template-extend-render: Attempting to extend a template which has already been rendered.'),wo(e,uo(mo(t)))}_renderNode(e){let t;if(t=e.node?this.tag&&this.text:this.tag?this.text:!this.text,t)throw new _a('ui-template-wrong-syntax: Node definition must have either "tag" or "text" when rendering a new Node.');return this.text?this._renderText(e):this._renderElement(e)}_renderElement(e){let t=e.node;return t||(t=e.node=document.createElementNS(this.ns||'http://www.w3.org/1999/xhtml',this.tag)),this._renderAttributes(e),this._renderElementChildren(e),this._setUpListeners(e),t}_renderText(e){let t=e.node;return t?e.revertData.text=t.textContent:t=e.node=document.createTextNode(''),io(this.text)?this._bindToObservable({schema:this.text,updater:so(t),data:e}):t.textContent=this.text.join(''),t}_renderAttributes(e){let t,n,o,i;if(this.attributes){const r=e.node,a=e.revertData;for(t in this.attributes)if(o=r.getAttribute(t),n=this.attributes[t],a&&(a.attributes[t]=o),i=La(n[0])&&n[0].ns?n[0].ns:null,io(n)){const s=i?n[0].value:n;a&&To(t)&&s.unshift(o),this._bindToObservable({schema:s,updater:lo(r,t,i),data:e})}else'style'==t&&'string'!=typeof n[0]?this._renderStyleAttribute(n[0],e):(a&&o&&To(t)&&n.unshift(o),n=n.map((e)=>e?e.value||e:e).reduce((e,t)=>e.concat(t),[]).reduce(_o,''),yo(n)||r.setAttributeNS(i,t,n))}}_renderStyleAttribute(e,t){const n=t.node;for(const o in e){const i=e[o];io(i)?this._bindToObservable({schema:[i],updater:co(n,o),data:t}):n.style[o]=i}}_renderElementChildren(e){const t=e.node,n=e.intoFragment?document.createDocumentFragment():t,o=e.isApplying;let i=0;for(const r of this.children)if(Ao(r)){if(!o){r.setParent(t);for(const e of r)n.appendChild(e.element)}}else if(vo(r))o||(!r.isRendered&&r.render(),n.appendChild(r.element));else if(dn(r))n.appendChild(r);else if(o){const t=e.revertData,o=Co();t.children.push(o),r._renderNode({node:n.childNodes[i++],isApplying:!0,revertData:o})}else n.appendChild(r.render());e.intoFragment&&t.appendChild(n)}_setUpListeners(e){if(this.eventListeners)for(const t in this.eventListeners){const n=this.eventListeners[t].map((n)=>{const[o,i]=t.split('@');return n.activateDomEventListener(o,i,e)});e.revertData&&e.revertData.bindings.push(n)}}_bindToObservable({schema:e,updater:t,data:n}){const o=n.revertData;ao(e,t,n);const i=e.filter((e)=>!yo(e)).filter((e)=>e.observable).map((o)=>o.activateAttributeListener(e,t,n));o&&o.bindings.push(i)}_revertTemplateFromNode(e,t){for(const n of t.bindings)for(const e of n)e();if(t.text)return void(e.textContent=t.text);for(const n in t.attributes){const o=t.attributes[n];null===o?e.removeAttribute(n):e.setAttribute(n,o)}for(let n=0;nao(e,t,n);return this.emitter.listenTo(this.observable,'change:'+this.attribute,o),()=>{this.emitter.stopListening(this.observable,'change:'+this.attribute,o)}}}class _g extends bg{activateDomEventListener(e,t,n){const o=(e,n)=>{(!t||n.target.matches(t))&&('function'==typeof this.eventNameOrFunction?this.eventNameOrFunction(n):this.observable.fire(this.eventNameOrFunction,n))};return this.emitter.listenTo(n.node,e,o),()=>{this.emitter.stopListening(n.node,e,o)}}}class kg extends bg{getValue(e){const t=super.getValue(e);return!yo(t)&&(this.valueIfTrue||!0)}}class wg{constructor(e){this.element=null,this.isRendered=!1,this.locale=e,this.t=e&&e.t,this._viewCollections=new pg,this._unboundChildren=this.createCollection(),this._viewCollections.on('add',(t,n)=>{n.locale=e})}get bindTemplate(){return this._bindTemplate?this._bindTemplate:this._bindTemplate=hg.bind(this,this)}createCollection(){const e=new gg;return this._viewCollections.add(e),e}registerChildren(e){E(e)||(e=[e]);for(const t of e)this._unboundChildren.add(t)}deregisterChildren(e){E(e)||(e=[e]);for(const t of e)this._unboundChildren.remove(t)}setTemplate(e){this.template=new hg(e)}extendTemplate(e){hg.extend(this.template,e)}render(){if(this.isRendered)throw new _a('ui-view-render-already-rendered: This View has already been rendered.');this.template&&(this.element=this.template.render(),this.registerChildren(this.template.getViews())),this.isRendered=!0}destroy(){this.stopListening(),this._viewCollections.map((e)=>e.destroy())}}a(wg,Sp),a(wg,Us);class yg extends wg{constructor(e){super(e),this.body=this.createCollection()}render(){super.render(),this._renderBodyCollection()}destroy(){return this._bodyCollectionContainer.remove(),super.destroy()}_renderBodyCollection(){const e=this._bodyCollectionContainer=new hg({tag:'div',attributes:{class:['ck-body','ck-rounded-corners','ck-reset_all']},children:this.body}).render();document.body.appendChild(e)}}class vg extends yg{constructor(e){super(e);const n=this.t,t=s();this.top=this.createCollection(),this.main=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck-reset','ck-editor','ck-rounded-corners'],role:'application',dir:'ltr',lang:e.lang,"aria-labelledby":`cke-editor__aria-label_${t}`},children:[{tag:'span',attributes:{id:`cke-editor__aria-label_${t}`,class:'cke-voice-label'},children:[n('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}]})}}class xg extends wg{constructor(e,t){super(e);const n=this.bindTemplate;t&&(this.element=this.editableElement=t),this.setTemplate({tag:'div',attributes:{class:[n.to('isFocused',(e)=>e?'ck-focused':'ck-blurred'),'ck-editor__editable','ck-rounded-corners'],contenteditable:n.to('isReadOnly',(e)=>!e)}}),this.set('isReadOnly',!1),this.set('isFocused',!1),this.externalElement=t}render(){super.render(),this.externalElement?this.template.apply(this.element=this.externalElement):this.editableElement=this.element}destroy(){this.externalElement&&this.template.revert(this.externalElement),super.destroy()}}class Ag extends xg{constructor(e,n){super(e,n);const o=this.bindTemplate,i=this.t;this.set('name',null);this.extendTemplate({attributes:{role:'textbox',"aria-label":o.to('name',(e)=>i('Rich Text Editor, %0',[e])),class:'ck-editor__editable_inline'}})}}const Cg=Po('px');class Tg extends wg{constructor(e){super(e);const t=this.bindTemplate;this.set('isActive',!1),this.set('isSticky',!1),this.set('limiterElement',null),this.set('limiterBottomOffset',50),this.set('viewportTopOffset',0),this.set('_marginLeft',null),this.set('_isStickyToTheLimiter',!1),this.set('_hasViewportTopOffset',!1),this.content=this.createCollection(),this._contentPanelPlaceholder=new hg({tag:'div',attributes:{class:['ck-sticky-panel__placeholder'],style:{display:t.to('isSticky',(e)=>e?'block':'none'),height:t.to('isSticky',(e)=>e?Cg(this._panelRect.height):null)}}}).render(),this._contentPanel=new hg({tag:'div',attributes:{class:['ck-sticky-panel__content',t.if('isSticky','ck-sticky-panel__content_sticky'),t.if('_isStickyToTheLimiter','ck-sticky-panel__content_sticky_bottom-limit')],style:{width:t.to('isSticky',(e)=>e?Cg(this._contentPanelPlaceholder.getBoundingClientRect().width):null),top:t.to('_hasViewportTopOffset',(e)=>e?Cg(this.viewportTopOffset):null),bottom:t.to('_isStickyToTheLimiter',(e)=>e?Cg(this.limiterBottomOffset):null),marginLeft:t.to('_marginLeft')}},children:this.content}).render(),this.setTemplate({tag:'div',attributes:{class:['ck-sticky-panel']},children:[this._contentPanelPlaceholder,this._contentPanel]})}render(){super.render(),this._checkIfShouldBeSticky(),this.listenTo(jp.window,'scroll',()=>{this._checkIfShouldBeSticky()}),this.listenTo(this,'change:isActive',()=>{this._checkIfShouldBeSticky()})}_checkIfShouldBeSticky(){const e=this._panelRect=this._contentPanel.getBoundingClientRect();let t;this.limiterElement?(t=this._limiterRect=this.limiterElement.getBoundingClientRect(),this.isSticky=this.isActive&&t.top{this[t](),n()})}}get first(){return this.focusables.find(Eo)||null}get last(){return this.focusables.filter(Eo).slice(-1)[0]||null}get next(){return this._getFocusableItem(1)}get previous(){return this._getFocusableItem(-1)}get current(){let e=null;return null===this.focusTracker.focusedElement?null:(this.focusables.find((t,n)=>{const o=t.element===this.focusTracker.focusedElement;return o&&(e=n),o}),e)}focusFirst(){this._focus(this.first)}focusLast(){this._focus(this.last)}focusNext(){this._focus(this.next)}focusPrevious(){this._focus(this.previous)}_focus(e){e&&e.focus()}_getFocusableItem(e){const t=this.current,n=this.focusables.length;if(!n)return null;if(null===t)return this[1===e?'first':'last'];let o=(t+n+e)%n;do{const t=this.focusables.get(o);if(Eo(t))return t;o=(o+n+e)%n}while(o!==t);return null}}class Eg extends wg{constructor(e){super(e),this.setTemplate({tag:'span',attributes:{class:['ck-toolbar__separator']}})}}class Sg extends wg{constructor(e){super(e),this.items=this.createCollection(),this.focusTracker=new mg,this.keystrokes=new Op,this._focusCycler=new Pg({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:['arrowleft','arrowup'],focusNext:['arrowright','arrowdown']}}),this.setTemplate({tag:'div',attributes:{class:['ck-toolbar']},children:this.items,on:{mousedown:So(this)}})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}fillFromConfig(e,t){e.map((e)=>{'|'==e?this.items.add(new Eg):t.has(e)?this.items.add(t.create(e)):wa.warn('toolbarview-item-unavailable: The requested toolbar item is unavailable.',{name:e})})}}class Vg extends vg{constructor(e){super(e),this.stickyPanel=new Tg(e),this.toolbar=new Sg(e),this.toolbar.extendTemplate({attributes:{class:'ck-editor-toolbar'}}),this.editable=new Ag(e)}render(){super.render(),this.stickyPanel.content.add(this.toolbar),this.top.add(this.stickyPanel),this.main.add(this.editable)}get editableElement(){return this.editable.element}}class Og{constructor(){this._replacedElements=[]}replace(e,t){this._replacedElements.push({element:e,newElement:t}),e.style.display='none',t&&e.parentNode.insertBefore(t,e.nextSibling)}restore(){this._replacedElements.forEach(({element:e,newElement:t})=>{e.style.display='',t&&t.remove()}),this._replacedElements=[]}}var Rg=n(9),Fg=n.n(Rg);class Ig extends sg{constructor(e,t){super(e,t),this.document.createRoot(),this.data.processor=new dg,this.ui=new ug(this,new Vg(this.locale)),this._elementReplacer=new Og}destroy(){return this.updateEditorElement(),this._elementReplacer.restore(),this.ui.destroy(),super.destroy()}static create(e,t){return new Promise((n)=>{const o=new this(e,t);n(o.initPlugins().then(()=>o.ui.init()).then(()=>{o._elementReplacer.replace(e,o.ui.view.element),o.fire('uiReady')}).then(()=>o.editing.view.attachDomRoot(o.ui.view.editableElement)).then(()=>o.loadDataFromEditorElement()).then(()=>{o.fire('dataReady'),o.fire('ready')}).then(()=>o))})}}class Ng{constructor(e){this.editor=e}destroy(){this.stopListening()}}a(Ng,Us);class Bg{constructor(e){this.files=Vo(e),this._native=e}get types(){return this._native.types}getData(e){return this._native.getData(e)}setData(e,t){this._native.setData(e,t)}}class Mg extends Xp{constructor(e){function t(t,n){n.preventDefault();const o=n.dropRange?[n.dropRange]:Array.from(e.selection.getRanges());e.fire('clipboardInput',{dataTransfer:n.dataTransfer,targetRanges:o})}super(e),this.domEventType=['paste','copy','cut','drop','dragover'],this.listenTo(e,'paste',t,{priority:'low'}),this.listenTo(e,'drop',t,{priority:'low'})}onDomEvent(e){const t={dataTransfer:new Bg(e.clipboardData?e.clipboardData:e.dataTransfer)};'drop'==e.type&&(t.dropRange=Oo(this.document,e)),this.fire(e.type,e,t)}}const Dg=['figcaption','li'];class Lg extends Ng{static get pluginName(){return'Clipboard'}init(){function e(e,i){const r=i.dataTransfer,a=t.data.toView(t.data.getSelectedContent(n.selection));i.preventDefault(),o.fire('clipboardOutput',{dataTransfer:r,content:a,method:e.name})}const t=this.editor,n=t.document,o=t.editing.view;this._htmlDataProcessor=new dg,o.addObserver(Mg),this.listenTo(o,'clipboardInput',(e,n)=>{if(t.isReadOnly)return;const i=n.dataTransfer;let r='';i.getData('text/html')?r=Fo(i.getData('text/html')):i.getData('text/plain')&&(r=Ro(i.getData('text/plain'))),r=this._htmlDataProcessor.toView(r),this.fire('inputTransformation',{content:r}),o.scrollToTheSelection()},{priority:'low'}),this.listenTo(this,'inputTransformation',(e,t)=>{if(!t.content.isEmpty){const e=this.editor.data,o=e.toModel(t.content,'$clipboardHolder');if(0==o.childCount)return;n.enqueueChanges(()=>{e.insertContent(o,n.selection)})}},{priority:'low'}),this.listenTo(o,'copy',e,{priority:'low'}),this.listenTo(o,'cut',(n,o)=>{t.isReadOnly?o.preventDefault():e(n,o)},{priority:'low'}),this.listenTo(o,'clipboardOutput',(e,o)=>{o.content.isEmpty||(o.dataTransfer.setData('text/html',this._htmlDataProcessor.toData(o.content)),o.dataTransfer.setData('text/plain',Io(o.content))),'cut'==o.method&&n.enqueueChanges(()=>{t.data.deleteContent(n.selection,n.batch())})},{priority:'low'})}}class jg{constructor(e){function t(){this.isEnabled=!1}this.editor=e,this.set('value',void 0),this.set('isEnabled',!1),this.decorate('execute'),this.listenTo(this.editor.document,'changesDone',()=>{this.refresh()}),this.on('execute',(e)=>{this.isEnabled||e.stop()},{priority:'high'}),this.listenTo(e,'change:isReadOnly',(e,n,o)=>{o?(this.on('change:isEnabled',t,{priority:'lowest'}),this.isEnabled=!1):(this.off('change:isEnabled',t),this.refresh())})}refresh(){this.isEnabled=!0}execute(){}destroy(){this.stopListening()}}a(jg,Us);class zg extends jg{execute(){const e=this.editor.document,t=e.batch();e.enqueueChanges(()=>{No(this.editor.data,t,e.selection,e.schema),this.fire('afterExecute',{batch:t})})}}class qg extends Wp{constructor(e){super(e),e.on('keydown',(t,n)=>{this.isEnabled&&n.keyCode==uc.enter&&e.fire('enter',new Yp(e,n.domEvent))})}observe(){}}class Hg extends Ng{static get pluginName(){return'Enter'}init(){const e=this.editor,t=e.editing.view;t.addObserver(qg),e.commands.add('enter',new zg(e)),this.listenTo(t,'enter',(n,o)=>{e.execute('enter'),o.preventDefault(),t.scrollToTheSelection()},{priority:'low'})}}class Wg{constructor(e,t=20){this.document=e,this.size=0,this.limit=t,this.isLocked=!1,this._changeCallback=(e,t,n,o)=>{this._onBatch(o)},this._selectionChangeCallback=()=>{this._reset()},e.on('change',this._changeCallback),e.selection.on('change:range',this._selectionChangeCallback),e.selection.on('change:attribute',this._selectionChangeCallback)}get batch(){return this._batch||(this._batch=this.document.batch()),this._batch}input(e){this.size+=e,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(e){'transparent'!=e.type&&e!==this._batch&&1>=mn(e.getOperations())&&this._reset(!0)}_reset(e){(!this.isLocked||e)&&(this._batch=null,this.size=0)}}class Ug extends jg{constructor(e,t){super(e),this._buffer=new Wg(e.document,t)}get buffer(){return this._buffer}destroy(){super.destroy(),this._buffer.destroy()}execute(e={}){const t=this.editor.document,n=e.text||'',o=n.length,i=e.range||t.selection.getFirstRange(),r=e.resultRange;t.enqueueChanges(()=>{const e=i.isCollapsed;this._buffer.lock(),e||this._buffer.batch.remove(i),n&&this._buffer.batch.weakInsert(i.start,n),r?this.editor.data.model.selection.setRanges([r]):e&&this.editor.data.model.selection.setCollapsedAt(i.start.getShiftedBy(o)),this._buffer.unlock(),this._buffer.input(o)})}}class $g extends Ng{static get pluginName(){return'Input'}init(){const e=this.editor,t=e.editing.view,n=new Ug(e,e.config.get('typing.undoStep')||20);e.commands.add('input',n),this.listenTo(t,'keydown',(e,t)=>{this._handleKeydown(t,n)},{priority:'lowest'}),this.listenTo(t,'mutations',(e,t,n)=>{this._handleMutations(t,n)})}_handleKeydown(e,t){const n=this.editor.document,o=t.buffer;!t.isEnabled||Do(e)||n.selection.isCollapsed||(o.lock(),n.enqueueChanges(()=>{this.editor.data.deleteContent(n.selection,o.batch)}),o.unlock())}_handleMutations(e,t){new Kg(this.editor).handle(e,t)}}class Kg{constructor(e){this.editor=e,this.editing=this.editor.editing}handle(e,t){if(qo(e))this._handleContainerChildrenMutations(e,t);else for(const n of e)this._handleTextMutation(n,t),this._handleTextNodeInsertion(n)}_handleContainerChildrenMutations(e,t){const n=zo(e);if(!n)return;const o=this.editor.editing.view.domConverter,i=o.mapViewToDom(n);if(!i)return;const r=new zp,a=this.editor.data.toModel(r.domToView(i)).getChild(0),s=this.editor.editing.mapper.toModelElement(n),l=Array.from(a.getChildren()),d=Array.from(s.getChildren());if(!Ho(l)||!Ho(d))return;const c=l.map((e)=>e.data).join('').replace(/\u00A0/g,' '),m=d.map((e)=>e.data).join('');if(m===c)return;const u=_n(m,c),{firstChangeAt:p,insertions:g,deletions:f}=Wo(u);let h=null;t&&(h=this.editing.mapper.toModelRange(t.getFirstRange()));const b=c.substr(p,g),_=el.createFromParentsAndOffsets(s,p,s,p+f);this.editor.execute('input',{text:b,range:_,resultRange:h})}_handleTextMutation(e,t){if('text'!=e.type)return;const n=e.newText.replace(/\u00A0/g,' '),o=e.oldText.replace(/\u00A0/g,' '),i=_n(o,n),{firstChangeAt:r,insertions:a,deletions:s}=Wo(i);let l=null;t&&(l=this.editing.mapper.toModelRange(t.getFirstRange()));const d=new ec(e.node,r),c=this.editing.mapper.toModelPosition(d),m=el.createFromPositionAndShift(c,s),u=n.substr(r,a);this.editor.execute('input',{text:u,range:m,resultRange:l})}_handleTextNodeInsertion(e){if('children'==e.type){const t=jo(e),n=new ec(e.node,t.index),o=this.editing.mapper.toModelPosition(n),i=t.values[0].data;this.editor.execute('input',{text:i.replace(/\u00A0/g,' '),range:new el(o)})}}}const Qg=[ee('arrowUp'),ee('arrowRight'),ee('arrowDown'),ee('arrowLeft'),9,16,17,18,20,27,33,34,35,36,229];for(let o=112;135>=o;o++)Qg.push(o);class Jg extends jg{constructor(e,t){super(e),this.direction=t,this._buffer=new Wg(e.document,e.config.get('typing.undoStep'))}execute(e={}){const t=this.editor.document,n=this.editor.data;t.enqueueChanges(()=>{this._buffer.lock();const o=bp.createFromSelection(t.selection),i=o.isCollapsed;if(o.isCollapsed&&n.modifySelection(o,{direction:this.direction,unit:e.unit}),this._shouldEntireContentBeReplacedWithParagraph(e.sequence||1))return void this._replaceEntireContentWithParagraph();if(o.isCollapsed)return;let r=0;o.getFirstRange().getMinimalFlatRanges().forEach((e)=>{r+=mn(e.getWalker({singleCharacters:!0,ignoreElementEnd:!0,shallow:!0}))}),n.deleteContent(o,this._buffer.batch,{doNotResetEntireContent:i}),this._buffer.input(r),t.selection.setRanges(o.getRanges(),o.isBackward),this._buffer.unlock()})}_shouldEntireContentBeReplacedWithParagraph(e){if(1{(n.keyCode==uc.delete||n.keyCode==uc.backspace)&&(t=0)}),e.on('keydown',(n,o)=>{const i={};if(o.keyCode==uc.delete)i.direction='forward',i.unit='character';else if(o.keyCode==uc.backspace)i.direction='backward',i.unit='codePoint';else return;i.unit=o.altKey?'word':i.unit,i.sequence=++t,e.fire('delete',new Yp(e,o.domEvent,i))})}observe(){}}class Yg extends Ng{static get pluginName(){return'Delete'}init(){const e=this.editor,t=e.editing.view;t.addObserver(Gg),e.commands.add('forwardDelete',new Jg(e,'forward')),e.commands.add('delete',new Jg(e,'backward')),this.listenTo(t,'delete',(n,o)=>{e.execute('forward'==o.direction?'forwardDelete':'delete',{unit:o.unit,sequence:o.sequence}),o.preventDefault(),t.scrollToTheSelection()})}}class Xg extends Ng{static get requires(){return[$g,Yg]}static get pluginName(){return'Typing'}}class Zg extends jg{constructor(e){super(e),this._stack=[],this._createdBatches=new WeakSet,this.refresh()}refresh(){this.isEnabled=0e.start.root!=o.graveyard);t&&i.push(t)}i.length&&o.selection.setRanges(i,t)}_undo(e){const t=this.editor.document,n=t.batch();this._createdBatches.add(n);const o=e.deltas.slice();o.reverse();for(const i of o){const e=i.baseVersion+i.operations.length,o=Array.from(t.history.getDeltas(e)),r=t.transformDeltas([i.getReversed()],o,!0),a=r.deltasA;for(const e of a){e.baseVersion=t.version,n.addDelta(e);for(const n of e.operations)t.applyOperation(n);t.history.setDeltaAsUndone(i,e)}}return n}}class ef extends Zg{execute(e=null){const t=e?this._stack.findIndex((t)=>t.batch==e):this._stack.length-1,n=this._stack.splice(t,1)[0];this.editor.document.enqueueChanges(()=>{const e=this._undo(n.batch),t=this.editor.document.history.getDeltas(n.batch.baseVersion);this._restoreSelection(n.selection.ranges,n.selection.isBackward,t),this.fire('revert',n.batch,e)}),this.refresh()}}class tf extends Zg{execute(){const e=this._stack.pop();this.editor.document.enqueueChanges(()=>{const t=e.batch.deltas[e.batch.deltas.length-1],n=t.baseVersion+t.operations.length,o=this.editor.document.history.getDeltas(n);this._restoreSelection(e.selection.ranges,e.selection.isBackward,o),this._undo(e.batch)}),this.refresh()}}class nf extends Ng{constructor(e){super(e),this._batchRegistry=new WeakSet}init(){this._undoCommand=new ef(this.editor),this._redoCommand=new tf(this.editor),this.editor.commands.add('undo',this._undoCommand),this.editor.commands.add('redo',this._redoCommand),this.listenTo(this.editor.document,'change',(e,t,n,o)=>{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',(e,t,n)=>{this._redoCommand.addBatch(n)})}}class of extends wg{constructor(){super();const e=this.bindTemplate;this.set('content',''),this.set('viewBox','0 0 20 20'),this.setTemplate({tag:'svg',ns:'http://www.w3.org/2000/svg',attributes:{class:'ck-icon',viewBox:e.to('viewBox')}})}render(){super.render(),this._updateXMLContent(),this.on('change:content',()=>this._updateXMLContent())}_updateXMLContent(){if(this.content){const e=new DOMParser().parseFromString(this.content.trim(),'image/svg+xml').firstChild;for(this.element.innerHTML='';0'ck-tooltip_'+e),t.if('text','ck-hidden',(e)=>!e.trim())]},children:[{tag:'span',attributes:{class:['ck-tooltip__text']},children:[{text:t.to('text')}]}]})}}class af extends wg{constructor(e){super(e);const t=this.bindTemplate;this.set('label'),this.set('keystroke'),this.set('tooltip'),this.set('tooltipPosition','s'),this.set('type','button'),this.set('isOn',!1),this.set('isEnabled',!0),this.set('isVisible',!0),this.set('withText',!1),this.set('icon'),this.set('tabindex',-1),this.children=this.createCollection(),this.tooltipView=this._createTooltipView(),this.labelView=this._createLabelView(),this.bind('_tooltipString').to(this,'tooltip',this,'label',this,'keystroke',this._getTooltipString.bind(this)),this.setTemplate({tag:'button',attributes:{class:['ck-button',t.to('isEnabled',(e)=>e?'ck-enabled':'ck-disabled'),t.if('isVisible','ck-hidden',(e)=>!e),t.to('isOn',(e)=>e?'ck-on':'ck-off'),t.if('withText','ck-button_with-text')],type:t.to('type',(e)=>e?e:'button'),tabindex:t.to('tabindex')},children:this.children,on:{mousedown:t.to((e)=>{e.preventDefault()}),click:t.to((e)=>{this.isEnabled?this.fire('execute'):e.preventDefault()})}})}render(){if(super.render(),this.icon){const e=this.iconView=new of;e.bind('content').to(this,'icon'),this.children.add(e)}this.children.add(this.tooltipView),this.children.add(this.labelView)}focus(){this.element.focus()}_createTooltipView(){const e=new rf;return e.bind('text').to(this,'_tooltipString'),e.bind('position').to(this,'tooltipPosition'),e}_createLabelView(){const e=new wg;return e.setTemplate({tag:'span',attributes:{class:['ck-button__label']},children:[{text:this.bindTemplate.to('label')}]}),e}_getTooltipString(e,t,n){return e?'string'==typeof e?e:(n&&(n=ne(n)),e instanceof Function?e(t,n):`${t}${n?` (${n})`:''}`):''}}var sf=n(12),lf=n.n(sf),df=n(13),cf=n.n(df);class mf extends Ng{static get requires(){return[nf]}static get pluginName(){return'Undo'}init(){const e=this.editor,n=e.t;this._addButton('undo',n('Undo'),'CTRL+Z',lf.a),this._addButton('redo',n('Redo'),'CTRL+Y',cf.a),e.keystrokes.set('CTRL+Z','undo'),e.keystrokes.set('CTRL+Y','redo'),e.keystrokes.set('CTRL+SHIFT+Z','redo')}_addButton(e,t,n,o){const i=this.editor,r=i.commands.get(e);i.ui.componentFactory.add(e,(a)=>{const s=new af(a);return s.set({label:t,icon:o,keystroke:n,tooltip:!0}),s.bind('isEnabled').to(r,'isEnabled'),this.listenTo(s,'execute',()=>i.execute(e)),s})}}class uf extends Ng{static get requires(){return[Lg,Hg,Xg,mf]}}class pf{constructor(){const e=new window.FileReader;this._reader=e,this.set('loaded',0),e.onprogress=(e)=>{this.loaded=e.loaded}}get error(){return this._reader.error}read(e){const t=this._reader;return this.total=e.size,new Promise((n,o)=>{t.onload=()=>{n(t.result)},t.onerror=()=>{o('error')},t.onabort=()=>{o('aborted')},this._reader.readAsDataURL(e)})}abort(){this._reader.abort()}}a(pf,Us);class gf extends Ng{static get pluginName(){return'FileRepository'}init(){this.loaders=new pg,this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0)}getLoader(e){for(const t of this.loaders)if(t.file==e)return t;return null}createLoader(e){if(!this.createAdapter)return wa.error('filerepository-no-adapter: Upload adapter is not defined.'),null;const t=new ff(e);return t._adapter=this.createAdapter(t),this.loaders.add(t),t.on('change:uploaded',()=>{let e=0;for(const t of this.loaders)e+=t.uploaded;this.uploaded=e}),t.on('change:uploadTotal',()=>{let e=0;for(const t of this.loaders)t.uploadTotal&&(e+=t.uploadTotal);this.uploadTotal=e}),t}destroyLoader(e){const t=e instanceof ff?e:this.getLoader(e);t._destroy(),this.loaders.remove(t)}}a(gf,Us);class ff{constructor(e,t){this.id=s(),this.file=e,this._adapter=t,this._reader=new pf,this.set('status','idle'),this.set('uploaded',0),this.set('uploadTotal',null),this.bind('uploadedPercent').to(this,'uploaded',this,'uploadTotal',(e,t)=>t?100*(e/t):0),this.set('uploadResponse',null)}read(){if('idle'!=this.status)throw new _a('filerepository-read-wrong-status: You cannot call read if the status is different than idle.');return this.status='reading',this._reader.read(this.file).then((e)=>(this.status='idle',e)).catch((e)=>{if('aborted'===e)throw this.status='aborted','aborted';throw this.status='error',this._reader.error})}upload(){if('idle'!=this.status)throw new _a('filerepository-upload-wrong-status: You cannot call upload if the status is different than idle.');return this.status='uploading',this._adapter.upload().then((e)=>(this.uploadResponse=e,this.status='idle',e)).catch((e)=>{if('aborted'===this.status)throw'aborted';throw this.status='error',e})}abort(){const e=this.status;this.status='aborted','reading'==e&&this._reader.abort(),'uploading'==e&&this._adapter.abort&&this._adapter.abort(),this._destroy()}_destroy(){this._reader=void 0,this._adapter=void 0,this.data=void 0,this.uploadResponse=void 0,this.file=void 0}}a(ff,Us);const hf='ckCsrfToken',bf=40,_f='abcdefghijklmnopqrstuvwxyz0123456789';class kf extends Ng{static get requires(){return[gf]}static get pluginName(){return'CKFinderUploadAdapter'}init(){const e=this.editor.config.get('ckfinder.uploadUrl');e&&(this.editor.plugins.get(gf).createAdapter=(t)=>new wf(t,e,this.editor.t))}}class wf{constructor(e,n,o){this.loader=e,this.url=n,this.t=o}upload(){return new Promise((e,t)=>{this._initRequest(),this._initListeners(e,t),this._sendRequest()})}abort(){this.xhr&&this.xhr.abort()}_initRequest(){const e=this.xhr=new XMLHttpRequest;e.open('POST',this.url,!0),e.responseType='json'}_initListeners(e,n){const o=this.xhr,i=this.loader,r=this.t,t=r('Cannot upload file:')+` ${i.file.name}.`;o.addEventListener('error',()=>n(t)),o.addEventListener('abort',()=>n()),o.addEventListener('load',()=>{const i=o.response;return i&&i.uploaded?void e({default:i.url}):n(i&&i.error&&i.error.message?i.error.message:t)}),o.upload&&o.upload.addEventListener('progress',(e)=>{e.lengthComputable&&(i.uploadTotal=e.total,i.uploaded=e.loaded)})}_sendRequest(){const e=new FormData;e.append('upload',this.loader.file),e.append('ckCsrfToken',Ko()),this.xhr.send(e)}}class yf{constructor(e,t,n){let o;if('function'==typeof n)o=n;else{o=(t)=>{const{batch:o}=t;e.execute(n,{batch:o})}}e.document.on('change',(n,i,r,a)=>{if('transparent'==a.type)return;if('insert'!=i)return;const s=r.range.getItems().next().value;if(!(s instanceof Qs))return;const l=s.textNode,d=l.data;if('paragraph'!==l.parent.name||!d)return;const c=t.exec(d);c&&e.document.enqueueChanges(()=>{const t=e.document.batch(),n=el.createFromParentsAndOffsets(l.parent,0,l.parent,c[0].length);t.remove(n),o({fixBatch:t,match:c})})})}}class vf{constructor(e,t,n){let o,i,r,a;t instanceof RegExp?o=t:r=t,'string'==typeof n?i=n:a=n,r=r||((e)=>{let t;const n=[],i=[];for(;null!==(t=o.exec(e))&&!(t&&4>t.length);){let{index:e,1:o,2:r,3:a}=t;e+=t[0].length-(o+r+a).length;const s=[e,e+o.length],l=[e+o.length+r.length,e+o.length+r.length+a.length];n.push(s),n.push(l),i.push([e+o.length,e+o.length+r.length])}return{remove:n,format:i}}),a=a||((e,t)=>{for(const n of t)e.setAttribute(n,i,!0)}),e.document.on('change',(t,n,o,s)=>{if('transparent'==s.type)return;if('insert'!==n)return;const l=e.document.selection;if(!l.isCollapsed||!l.focus||!l.focus.parent)return;const d=l.focus.parent,c=Yo(d).slice(0,l.focus.offset),m=r(c),u=[];m.format.forEach((e)=>{void 0===e[0]||void 0===e[1]||u.push(hp.createFromParentsAndOffsets(d,e[0],d,e[1]))});const p=[];m.remove.slice().reverse().forEach((e)=>{void 0===e[0]||void 0===e[1]||p.push(hp.createFromParentsAndOffsets(d,e[0],d,e[1]))});u.length&&p.length&&e.document.enqueueChanges(()=>{const t=e.document.batch(),n=e.document.schema.getValidRanges(u,i);a(t,n),u.forEach((e)=>e.detach());for(const e of p)t.remove(e),e.detach()})})}}class xf extends Ng{static get pluginName(){return'Autoformat'}afterInit(){this._addListAutoformats(),this._addBasicStylesAutoformats(),this._addHeadingAutoformats(),this._addBlockQuoteAutoformats()}_addListAutoformats(){const e=this.editor.commands;e.get('bulletedList')&&new yf(this.editor,/^[*-]\s$/,'bulletedList'),e.get('numberedList')&&new yf(this.editor,/^\d+[.|)]?\s$/,'numberedList')}_addBasicStylesAutoformats(){const e=this.editor.commands;e.get('bold')&&(new vf(this.editor,/(\*\*)([^*]+)(\*\*)$/g,'bold'),new vf(this.editor,/(__)([^_]+)(__)$/g,'bold')),e.get('italic')&&(new vf(this.editor,/(?:^|[^*])(\*)([^*_]+)(\*)$/g,'italic'),new vf(this.editor,/(?:^|[^_])(_)([^_]+)(_)$/g,'italic')),e.get('code')&&new vf(this.editor,/(`)([^`]+)(`)$/g,'code')}_addHeadingAutoformats(){Array.from(this.editor.commands.names()).filter((e)=>e.match(/^heading[1-6]$/)).forEach((e)=>{const t=e[7],n=new RegExp(`^(#{${t}})\\s$`);new yf(this.editor,n,(t)=>{const{batch:n}=t;this.editor.execute(e,{batch:n})})})}_addBlockQuoteAutoformats(){this.editor.commands.get('blockQuote')&&new yf(this.editor,/^>\s$/,'blockQuote')}}class Af{constructor(){this._dispatchers=[],this._from=null}for(...e){return this._dispatchers=e,this}fromElement(e){return this._from={type:'element',name:e,priority:null},this}fromAttribute(e){return this._from={type:'attribute',key:e,priority:null},this}fromMarker(e){return this._from={type:'marker',name:e,priority:null},this}withPriority(e){return this._from.priority=e,this}toElement(e){const t=null===this._from.priority?'normal':this._from.priority;for(const n of this._dispatchers)if('element'==this._from.type)e='string'==typeof e?new Yd(e):e,n.on('insert:'+this._from.name,Ee(e),{priority:t});else if('attribute'==this._from.type)e='string'==typeof e?new sc(e):e,n.on('addAttribute:'+this._from.key,Fe(e),{priority:t}),n.on('changeAttribute:'+this._from.key,Fe(e),{priority:t}),n.on('removeAttribute:'+this._from.key,Ie(e),{priority:t}),n.on('selectionAttribute:'+this._from.key,$n(e),{priority:t});else{const t=null===this._from.priority?'normal':this._from.priority;e='string'==typeof e?new pc(e):e,n.on('addMarker:'+this._from.name,Ve(e),{priority:t}),n.on('removeMarker:'+this._from.name,De(e),{priority:t})}}toHighlight(e){const t=null===this._from.priority?'normal':this._from.priority;if('marker'!=this._from.type)throw new _a('build-model-converter-non-marker-to-highlight: Conversion to a highlight is supported only from model markers.');for(const n of this._dispatchers)n.on('addMarker:'+this._from.name,Be(e),{priority:t}),n.on('addMarker:'+this._from.name,Me(e),{priority:t}),n.on('removeMarker:'+this._from.name,Be(e),{priority:t}),n.on('removeMarker:'+this._from.name,Me(e),{priority:t}),n.on('selectionMarker:'+this._from.name,Kn(e),{priority:t})}toAttribute(e,t){if('attribute'!=this._from.type)throw new _a('build-model-converter-non-attribute-to-attribute: To-attribute conversion is supported only from model attributes.');let n=e?'string'==typeof e?t?function(){return{key:e,value:t}}:function(t){return{key:e,value:t}}:e:void 0;for(const o of this._dispatchers){const e={priority:this._from.priority||'normal'};o.on('addAttribute:'+this._from.key,Oe(n),e),o.on('changeAttribute:'+this._from.key,Oe(n),e),o.on('removeAttribute:'+this._from.key,Re(n),e)}}}class Cf{constructor(){this._dispatchers=[],this._from=[]}for(...e){return this._dispatchers=e,this}fromElement(e){return this.from({name:e})}fromAttribute(e,t=/.*/){const n={};'style'===e||'class'===e?n[e]=t:(n.attribute={},n.attribute[e]=t);const o=new Kd(n);return this._from.push({matcher:o,consume:!1,priority:null,attributeKey:e}),this}from(e){return e instanceof Kd||(e=new Kd(e)),this._from.push({matcher:e,consume:!1,priority:null}),this}consuming(e){const t=this._from[this._from.length-1];return t.consume=e,this}withPriority(e){const t=this._from[this._from.length-1];return t.priority=e,this}toElement(e){this._setCallback(function(t){return(n,o,i,r)=>{const a=t.matcher.matchAll(o.input);if(a)for(const n of a){const a=e instanceof Function?e(o.input):new Gs(e);if(!a)continue;const s=Array.from(a.getAttributeKeys());if(!r.schema.check({name:a.name,attributes:s,inside:o.context}))continue;if(!i.consume(o.input,t.consume||n.match))continue;o.context.push(a);const l=r.convertChildren(o.input,i,o),d=Zs.createAt(a,'end');wc.insert(d,l),o.context.pop(),o.output=a;break}}},'normal')}toAttribute(e,t){this._setCallback(function(n){return(o,i,r,a)=>{const s=n.matcher.matchAll(i.input);if(s)for(const o of s){if(!r.consume(i.input,n.consume||o.match))continue;i.output||(i.output=a.convertChildren(i.input,r,i));let s;if(!(e instanceof Function))s={key:e,value:t?t:i.input.getAttribute(n.attributeKey)};else if(s=e(i.input),!s)return;Zo(i.output,s,i,a);break}}},'low')}toMarker(e){this._setCallback(function(t){return(n,o,i)=>{const r=t.matcher.matchAll(o.input);if(!r)return;let a;if(a=e instanceof Function?e(o.input):new Gs('$marker',{"data-name":o.input.getAttribute('data-name')}),'$marker'!=a.name||'string'!=typeof a.getAttribute('data-name'))throw new _a('build-view-converter-invalid-marker: Invalid model element to mark marker range.');for(const e of r)if(i.consume(o.input,t.consume||e.match)){o.output=a;break}}},'normal')}_setCallback(e,t){for(const n of this._from){const o=n.matcher.getElementName(),i=o?'element:'+o:'element',r=e(n),a=null===n.priority?t:n.priority;for(const e of this._dispatchers)e.on(i,r,{priority:a})}}}class Tf extends jg{constructor(e,t){super(e),this.attributeKey=t}refresh(){const e=this.editor.document;this.value=e.selection.hasAttribute(this.attributeKey),this.isEnabled=e.schema.checkAttributeInSelection(e.selection,this.attributeKey)}execute(e={}){const t=this.editor.document,n=t.selection,o=e.forceValue===void 0?!this.value:e.forceValue;t.enqueueChanges(()=>{if(n.isCollapsed)o?n.setAttribute(this.attributeKey,!0):n.removeAttribute(this.attributeKey);else{const i=t.schema.getValidRanges(n.getRanges(),this.attributeKey),r=e.batch||t.batch();for(const e of i)o?r.setAttribute(e,this.attributeKey,o):r.removeAttribute(e,this.attributeKey)}})}}const Pf='bold';class Ef extends Ng{init(){const e=this.editor,t=e.data,n=e.editing;e.document.schema.allow({name:'$inline',attributes:Pf,inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:Pf,inside:'$clipboardHolder'}),Xo().for(t.modelToView,n.modelToView).fromAttribute(Pf).toElement('strong'),ei().for(t.viewToModel).fromElement('strong').fromElement('b').fromAttribute('style',{"font-weight":'bold'}).toAttribute(Pf,!0),e.commands.add(Pf,new Tf(e,Pf))}}var Sf=n(14),Vf=n.n(Sf);class Of extends Ng{static get requires(){return[Ef]}static get pluginName(){return'Bold'}init(){const e=this.editor,n=e.t,t=e.commands.get('bold'),o='CTRL+B';e.ui.componentFactory.add('bold',(i)=>{const r=new af(i);return r.set({label:n('Bold'),icon:Vf.a,keystroke:o,tooltip:!0}),r.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('bold')),r}),e.keystrokes.set(o,'bold')}}const Rf='italic';class Ff extends Ng{init(){const e=this.editor,t=e.data,n=e.editing;e.document.schema.allow({name:'$inline',attributes:Rf,inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:Rf,inside:'$clipboardHolder'}),Xo().for(t.modelToView,n.modelToView).fromAttribute(Rf).toElement('i'),ei().for(t.viewToModel).fromElement('em').fromElement('i').fromAttribute('style',{"font-style":'italic'}).toAttribute(Rf,!0),e.commands.add(Rf,new Tf(e,Rf))}}var If=n(15),Nf=n.n(If);class Bf extends Ng{static get requires(){return[Ff]}static get pluginName(){return'Italic'}init(){const e=this.editor,n=e.t,t=e.commands.get('italic'),o='CTRL+I';e.ui.componentFactory.add('italic',(i)=>{const r=new af(i);return r.set({label:n('Italic'),icon:Nf.a,keystroke:o,tooltip:!0}),r.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(r,'execute',()=>e.execute('italic')),r}),e.keystrokes.set(o,'italic')}}class Mf extends jg{refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.document,n=t.schema,o=e.batch||t.batch(),i=Array.from(t.selection.getSelectedBlocks());t.enqueueChanges(()=>{if(this.value)this._removeQuote(o,i.filter(ni));else{const e=i.filter((e)=>ni(e)||ii(n,e));this._applyQuote(o,e)}})}_getValue(){const e=ti(this.editor.document.selection.getSelectedBlocks());return!!(e&&ni(e))}_checkEnabled(){if(this.value)return!0;const e=this.editor.document.selection,t=this.editor.document.schema,n=ti(e.getSelectedBlocks());return!!n&&ii(t,n)}_removeQuote(e,t){oi(t).reverse().forEach((t)=>{if(t.start.isAtStart&&t.end.isAtEnd)return void e.unwrap(t.start.parent);if(t.start.isAtStart){const n=Zs.createBefore(t.start.parent);return void e.move(t,n)}t.end.isAtEnd||e.split(t.end);const n=Zs.createAfter(t.end.parent);e.move(t,n)})}_applyQuote(e,t){const n=[];oi(t).reverse().forEach((t)=>{let o=ni(t.start);o||(o=new Gs('blockQuote'),e.wrap(t,o)),n.push(o)}),n.reverse().reduce((t,n)=>t.nextSibling==n?(e.merge(Zs.createAfter(t)),t):n)}}class Df extends Ng{init(){const e=this.editor,t=e.document.schema;e.commands.add('blockQuote',new Mf(e)),t.registerItem('blockQuote'),t.allow({name:'blockQuote',inside:'$root'}),t.allow({name:'$block',inside:'blockQuote'}),ei().for(e.data.viewToModel).fromElement('blockquote').toElement('blockQuote'),Xo().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']})}}var Lf=n(16),jf=n.n(Lf),zf=n(17),qf=n.n(zf);class Hf extends Ng{static get requires(){return[Df]}static get pluginName(){return'BlockQuote'}init(){const e=this.editor,n=e.t,t=e.commands.get('blockQuote');e.ui.componentFactory.add('blockQuote',(o)=>{const i=new af(o);return i.set({label:n('Block quote'),icon:jf.a,tooltip:!0}),i.bind('isOn','isEnabled').to(t,'value','isEnabled'),this.listenTo(i,'execute',()=>e.execute('blockQuote')),i})}afterInit(){const e=this.editor,t=e.commands.get('blockQuote');this.listenTo(this.editor.editing.view,'enter',(e,n)=>{const o=this.editor.document,i=o.selection.getLastPosition().parent;o.selection.isCollapsed&&i.isEmpty&&t.value&&(this.editor.execute('blockQuote'),this.editor.editing.view.scrollToTheSelection(),n.preventDefault(),e.stop())})}}const Wf=/^data:(\S*?);base64,/;class Uf{constructor(e,t,n){if(!e)throw new Error('File must be provided');if(!t)throw new Error('Token must be provided');if(!n)throw new Error('Api address must be provided');this.file=ai(e)?ri(e):e,this._token=t,this._apiAddress=n}onProgress(e){return this.on('progress',(t,n)=>e(n)),this}onError(e){return this.once('error',(t,n)=>e(n)),this}abort(){this.xhr.abort()}send(){return this._prepareRequest(),this._attachXHRListeners(),this._sendRequest()}_prepareRequest(){const e=new XMLHttpRequest;e.open('POST',this._apiAddress),e.setRequestHeader('Authorization',this._token.value),e.responseType='json',this.xhr=e}_attachXHRListeners(){function e(e){return()=>t.fire('error',e)}const t=this,n=this.xhr;n.addEventListener('error',e('Network Error')),n.addEventListener('abort',e('Abort')),n.upload&&n.upload.addEventListener('progress',(e)=>{e.lengthComputable&&this.fire('progress',{total:e.total,uploaded:e.loaded})}),n.addEventListener('load',()=>{const e=n.status,t=n.response;if(200>e||299{t.addEventListener('load',()=>{const e=t.status,i=t.response;return 200>e||299o('Network Error')),t.addEventListener('abort',()=>o('Abort')),t.send(e)})}}a(Uf,Oa);const $f={refreshInterval:3.6e6,autoRefresh:!0};class Kf{constructor(e,t=$f){if(!e)throw new Error('`tokenUrl` must be provided');this.set('value',t.initValue),this._tokenUrl=e,this._options=Object.assign({},$f,t)}init(){return new Promise((e,t)=>(this._options.autoRefresh&&this._startRefreshing(),this.value?void e(this):void this._refreshToken().then(e).catch(t)))}_refreshToken(){return new Promise((e,t)=>{const n=new XMLHttpRequest;n.open('GET',this._tokenUrl),n.addEventListener('load',()=>{const o=n.status,i=n.response;return 200>o||299t('Network Error')),n.addEventListener('abort',()=>t('Abort')),n.send()})}_startRefreshing(){this._refreshInterval=setInterval(this._refreshToken.bind(this),this._options.refreshInterval)}_stopRefreshing(){clearInterval(this._refreshInterval)}static create(e,t=$f){const n=new Kf(e,t);return n.init()}}a(Kf,Us);class Qf extends Ng{init(){const e=this.editor,t=e.config,n=t.get('cloudServices')||{};for(const e in n)this[e]=n[e];return(this.uploadUrl||(this.uploadUrl='https://files.cke-cs.com/upload/'),!this.tokenUrl)?void(this.token=null):(this.token=new Qf.Token(this.tokenUrl),this.token.init())}}Qf.Token=Kf;class Jf extends Ng{static get requires(){return[gf,Qf]}init(){const e=this.editor,t=e.plugins.get(Qf),n=t.token,o=t.uploadUrl;n&&(this._uploadGateway=new Jf._UploadGateway(n,o),e.plugins.get(gf).createAdapter=(e)=>new Gf(this._uploadGateway,e))}}class Gf{constructor(e,t){this.uploadGateway=e,this.loader=t}upload(){return this.fileUploader=this.uploadGateway.upload(this.loader.file),this.fileUploader.on('progress',(e,t)=>{this.loader.uploadTotal=t.total,this.loader.uploaded=t.uploaded}),this.fileUploader.send()}abort(){this.fileUploader.abort()}}Jf._UploadGateway=class{constructor(e,t){if(!e)throw new Error('Token must be provided');if(!t)throw new Error('Api address must be provided');this._token=e,this._apiAddress=t}upload(e){return new Uf(e,this._token,this._apiAddress)}};const Yf=new WeakSet;class Xf{constructor(){this._stack=[]}add(e){const t=this._stack,n=t[0];this._insertDescriptor(e);const o=t[0];n===o||gi(n,o)||this.fire('change:top',{oldDescriptor:n,newDescriptor:o})}remove(e){const t=this._stack,n=t[0];this._removeDescriptor(e);const o=t[0];n===o||gi(n,o)||this.fire('change:top',{oldDescriptor:n,newDescriptor:o})}_insertDescriptor(e){const t=this._stack,n=t.findIndex((t)=>t.id===e.id);if(!gi(e,t[n])){-1t.id===e);-1Ei()),Xo().for(r.modelToView).fromElement('image').toElement(()=>Ai(Ei(),a('image widget'))),li([r.modelToView,i.modelToView],'src'),li([r.modelToView,i.modelToView],'alt'),li([r.modelToView,i.modelToView],'srcset',di),ei().for(i.viewToModel).from({name:'img',attribute:{src:/./}}).toElement((e)=>new Gs('image',{src:e.getAttribute('src')})),i.viewToModel.on('element:img',mi,{priority:'low'}),i.viewToModel.on('element',pi,{priority:'low'}),ei().for(i.viewToModel).from({name:'img',attribute:{alt:/./}}).consuming({attribute:['alt']}).toAttribute((e)=>({key:'alt',value:e.getAttribute('alt')})),ei().for(i.viewToModel).from({name:'img',attribute:{srcset:/./}}).consuming({attribute:['srcset']}).toAttribute((e)=>{const t={data:e.getAttribute('srcset')};return e.hasAttribute('width')&&(t.width=e.getAttribute('width')),{key:'srcset',value:t}}),i.viewToModel.on('element:figure',si())}}class rh extends Xp{constructor(e){super(e),this.domEventType='mousedown'}onDomEvent(e){this.fire(e.type,e)}}var ah=n(19),sh=n.n(ah);const lh=te('Ctrl+A');class dh extends Ng{static get pluginName(){return'Widget'}init(){const e=this.editor.editing.view;this._previouslySelected=new Set,this.editor.editing.modelToView.on('selection',(e,t,n,o)=>{this._clearPreviouslySelectedWidgets();const i=o.viewSelection,r=i.getSelectedElement();for(const a of i.getRanges())for(const e of a){const t=e.item;t.is('element')&&bi(t)&&(t.addClass(nh),this._previouslySelected.add(t),t==r&&i.setFake(!0,{label:yi(r)}))}},{priority:'low'}),e.addObserver(rh),this.listenTo(e,'mousedown',(...e)=>this._onMousedown(...e)),this.listenTo(e,'keydown',(...e)=>this._onKeydown(...e),{priority:'high'})}_onMousedown(e,t){const n=this.editor,o=n.editing.view;let i=t.target;if(Ri(i))return;if(!bi(i)&&(i=i.findAncestor(bi),!i))return;t.preventDefault(),o.isFocused||o.focus();const r=n.editing.mapper.toModelElement(i);n.document.enqueueChanges(()=>{this._setSelectionOverElement(r)})}_onKeydown(e,t){const n=t.keyCode,o=n==uc.delete||n==uc.arrowdown||n==uc.arrowright;let i=!1;Vi(n)?i=this._handleDelete(o):Si(n)?i=this._handleArrowKeys(o):Oi(t)&&(i=this._selectAllNestedEditableContent()||this._selectAllContent()),i&&(t.preventDefault(),e.stop())}_handleDelete(e){if(this.editor.isReadOnly)return;const t=this.editor.document,n=t.selection;if(!n.isCollapsed)return;const o=this._getObjectElementNextToSelection(e);if(o)return t.enqueueChanges(()=>{const e=t.batch();for(let t=n.anchor.parent;t.isEmpty;){const n=t;t=n.parent,e.remove(n)}this._setSelectionOverElement(o)}),!0}_handleArrowKeys(e){const t=this.editor.document,n=t.schema,o=t.selection,i=o.getSelectedElement();if(i&&n.objects.has(i.name)){const n=e?o.getLastPosition():o.getFirstPosition(),i=t.getNearestSelectionRange(n,e?'forward':'backward');return i&&t.enqueueChanges(()=>{o.setRanges([i])}),!0}if(!o.isCollapsed)return;const r=this._getObjectElementNextToSelection(e);if(r instanceof Gs&&t.schema.objects.has(r.name))return t.enqueueChanges(()=>{this._setSelectionOverElement(r)}),!0}_selectAllNestedEditableContent(){const e=this.editor.document,t=e.selection,n=e.schema,o=n.getLimitElement(t);return t.getFirstRange().root!=o&&(e.enqueueChanges(()=>{t.setIn(o)}),!0)}_selectAllContent(){const e=this.editor.document,t=e.selection,n=this.editor.editing,o=n.view,i=o.selection,r=i.getSelectedElement();if(r&&bi(r)){const o=n.mapper.toModelElement(r.parent);return e.enqueueChanges(()=>{t.setRanges([el.createIn(o)])}),!0}return!1}_setSelectionOverElement(e){this.editor.document.selection.setRanges([el.createOn(e)])}_getObjectElementNextToSelection(e){const t=this.editor.document,n=t.schema,o=t.selection,i=this.editor.data,r=bp.createFromSelection(o);i.modifySelection(r,{direction:e?'forward':'backward'});const a=e?r.focus.nodeBefore:r.focus.nodeAfter;return a instanceof Gs&&n.objects.has(a.name)?a:null}_clearPreviouslySelectedWidgets(){for(const e of this._previouslySelected)e.removeClass(nh);this._previouslySelected.clear()}}class ch extends jg{refresh(){const e=this.editor.document.selection.getSelectedElement();this.isEnabled=Pi(e),this.value=Pi(e)&&e.hasAttribute('alt')&&e.getAttribute('alt')}execute(e){const t=this.editor.document,n=t.selection.getSelectedElement();t.enqueueChanges(()=>{const o=e.batch||t.batch();o.setAttribute(n,'alt',e.newValue)})}}class mh extends Ng{init(){this.editor.commands.add('imageTextAlternative',new ch(this.editor))}}class uh extends wg{constructor(e){super(e),this.set('text'),this.set('for');const t=this.bindTemplate;this.setTemplate({tag:'label',attributes:{class:['ck-label'],for:t.to('for')},children:[{text:t.to('text')}]})}}class ph extends wg{constructor(e,t){super(e);const n=`ck-input-${s()}`;this.set('label'),this.set('value'),this.set('isReadOnly',!1),this.labelView=this._createLabelView(n),this.inputView=this._createInputView(t,n);const o=this.bindTemplate;this.setTemplate({tag:'div',attributes:{class:[o.if('isReadOnly','ck-disabled')]},children:[this.labelView,this.inputView]})}_createLabelView(e){const t=new uh(this.locale);return t.for=e,t.bind('text').to(this,'label'),t}_createInputView(e,t){const n=new e(this.locale);return n.id=t,n.bind('value').to(this),n.bind('isReadOnly').to(this),n}select(){this.inputView.select()}focus(){this.inputView.focus()}}class gh extends wg{constructor(e){super(e),this.set('value'),this.set('id'),this.set('placeholder'),this.set('isReadOnly',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{type:'text',class:['ck-input','ck-input-text'],id:t.to('id'),placeholder:t.to('placeholder'),readonly:t.to('isReadOnly'),value:t.to('value')}})}select(){this.element.select()}focus(){this.element.focus()}}class fh extends wg{constructor(e){super(e);const n=this.locale.t;this.focusTracker=new mg,this.keystrokes=new Op,this.labeledInput=this._createLabeledInputView(),this.saveButtonView=this._createButton(n('Save')),this.saveButtonView.type='submit',this.cancelButtonView=this._createButton(n('Cancel'),'cancel'),this._focusables=new gg,this._focusCycler=new Pg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.saveButtonView.extendTemplate({attributes:{class:['ck-button-action']}}),this.setTemplate({tag:'form',attributes:{class:['cke-text-alternative-form'],tabindex:'-1'},children:[this.labeledInput,{tag:'div',attributes:{class:['cke-text-alternative-form__actions']},children:[this.saveButtonView,this.cancelButtonView]}]})}render(){super.render(),this.keystrokes.listenTo(this.element),Ii({view:this}),[this.labeledInput,this.saveButtonView,this.cancelButtonView].forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)})}_createButton(e,t){const n=new af(this.locale);return n.label=e,n.withText=!0,t&&n.delegate('execute').to(this,t),n}_createLabeledInputView(){const e=this.locale.t,t=new ph(this.locale,gh);return t.label=e('Text alternative'),t}}const hh=Po('px'),bh=jp.document.body;class _h extends wg{constructor(e){super(e);const t=this.bindTemplate;this.set('top',0),this.set('left',0),this.set('position','arrow_nw'),this.set('isVisible',!1),this.set('withArrow',!0),this.set('className'),this.content=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck-balloon-panel',t.to('position',(e)=>`ck-balloon-panel_${e}`),t.if('isVisible','ck-balloon-panel_visible'),t.if('withArrow','ck-balloon-panel_with-arrow'),t.to('className')],style:{top:t.to('top',hh),left:t.to('left',hh)}},children:this.content})}show(){this.isVisible=!0}hide(){this.isVisible=!1}attachTo(e){this.show();const t=_h.defaultPositions,n=Object.assign({},{element:this.element,positions:[t.southArrowNorthWest,t.southArrowNorthEast,t.northArrowSouthWest,t.northArrowSouthEast],limiter:bh,fitInViewport:!0},e),{top:o,left:i,name:r}=Bi(n);Object.assign(this,{top:o,left:i,position:r})}pin(e){this.unpin(),this._pinWhenIsVisibleCallback=()=>{this.isVisible?this._startPinning(e):this._stopPinning()},this._startPinning(e),this.listenTo(this,'change:isVisible',this._pinWhenIsVisibleCallback)}unpin(){this._pinWhenIsVisibleCallback&&(this._stopPinning(),this.stopListening(this,'change:isVisible',this._pinWhenIsVisibleCallback),this._pinWhenIsVisibleCallback=null,this.hide())}_startPinning(e){this.attachTo(e);const t=ji(e.target),n=e.limiter?ji(e.limiter):bh;this.listenTo(jp.document,'scroll',(o,i)=>{const r=i.target,a=t&&r.contains(t),s=n&&r.contains(n);(a||s||!t||!n)&&this.attachTo(e)},{useCapture:!0}),this.listenTo(jp.window,'resize',()=>{this.attachTo(e)})}_stopPinning(){this.stopListening(jp.document,'scroll'),this.stopListening(jp.window,'resize')}}_h.arrowHorizontalOffset=30,_h.arrowVerticalOffset=15,_h.defaultPositions={northArrowSouth:(e,t)=>({top:zi(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_s'}),northArrowSouthEast:(e,t)=>({top:zi(e,t),left:e.left+e.width/2-t.width+_h.arrowHorizontalOffset,name:'arrow_se'}),northArrowSouthWest:(e,t)=>({top:zi(e,t),left:e.left+e.width/2-_h.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouth:(e,t)=>({top:zi(e,t),left:e.left-t.width/2,name:'arrow_s'}),northWestArrowSouthWest:(e,t)=>({top:zi(e,t),left:e.left-_h.arrowHorizontalOffset,name:'arrow_sw'}),northWestArrowSouthEast:(e,t)=>({top:zi(e,t),left:e.left-t.width+_h.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouth:(e,t)=>({top:zi(e,t),left:e.right-t.width/2,name:'arrow_s'}),northEastArrowSouthEast:(e,t)=>({top:zi(e,t),left:e.right-t.width+_h.arrowHorizontalOffset,name:'arrow_se'}),northEastArrowSouthWest:(e,t)=>({top:zi(e,t),left:e.right-_h.arrowHorizontalOffset,name:'arrow_sw'}),southArrowNorth:(e,t)=>({top:qi(e,t),left:e.left+e.width/2-t.width/2,name:'arrow_n'}),southArrowNorthEast:(e,t)=>({top:qi(e,t),left:e.left+e.width/2-t.width+_h.arrowHorizontalOffset,name:'arrow_ne'}),southArrowNorthWest:(e,t)=>({top:qi(e,t),left:e.left+e.width/2-_h.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorth:(e,t)=>({top:qi(e,t),left:e.left-t.width/2,name:'arrow_n'}),southWestArrowNorthWest:(e,t)=>({top:qi(e,t),left:e.left-_h.arrowHorizontalOffset,name:'arrow_nw'}),southWestArrowNorthEast:(e,t)=>({top:qi(e,t),left:e.left-t.width+_h.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorth:(e,t)=>({top:qi(e,t),left:e.right-t.width/2,name:'arrow_n'}),southEastArrowNorthEast:(e,t)=>({top:qi(e,t),left:e.right-t.width+_h.arrowHorizontalOffset,name:'arrow_ne'}),southEastArrowNorthWest:(e,t)=>({top:qi(e,t),left:e.right-_h.arrowHorizontalOffset,name:'arrow_nw'})};class kh extends Ng{static get pluginName(){return'ContextualBalloon'}init(){this.view=new _h,this.positionLimiter=()=>{const e=this.editor.editing.view,t=e.selection.editableElement;return t?e.domConverter.mapViewToDom(t.root):null},this._stack=new Map,this.editor.ui.view.body.add(this.view),this.editor.ui.focusTracker.add(this.view.element)}get visibleView(){const e=this._stack.get(this.view.content.get(0));return e?e.view:null}hasView(e){return this._stack.has(e)}add(e){if(this.hasView(e.view))throw new _a('contextualballoon-add-view-exist: Cannot add configuration of the same view twice.');this.visibleView&&this.view.content.remove(this.visibleView),this._stack.set(e.view,e),this._show(e)}remove(e){if(!this.hasView(e))throw new _a('contextualballoon-remove-view-not-exist: Cannot remove configuration of not existing view.');if(this.visibleView===e){this.view.content.remove(e),this._stack.delete(e);const t=Array.from(this._stack.values()).pop();t?this._show(t):this.view.hide()}else this._stack.delete(e)}updatePosition(e){e&&(this._stack.get(this.visibleView).position=e),this.view.pin(this._getBalloonPosition())}_show({view:e,balloonClassName:t=''}){this.view.className=t,this.view.content.add(e),this.view.pin(this._getBalloonPosition())}_getBalloonPosition(){let e=ti(this._stack.values()).position;return e&&!e.limiter&&(e=Object.assign({},e,{limiter:this.positionLimiter})),e}}var wh=n(21),yh=n.n(wh),vh=n(22),xh=n.n(vh);class Ah extends Ng{static get requires(){return[mh,kh]}static get pluginName(){return'ImageTextAlternative'}init(){this._createButton(),this._createForm()}_createButton(){const e=this.editor,n=e.commands.get('imageTextAlternative'),o=e.t;e.ui.componentFactory.add('imageTextAlternative',(e)=>{const t=new af(e);return t.set({label:o('Change image text alternative'),icon:yh.a,tooltip:!0}),t.bind('isEnabled').to(n,'isEnabled'),this.listenTo(t,'execute',()=>this._showForm()),t})}_createForm(){const e=this.editor,t=e.editing.view;this._balloon=this.editor.plugins.get('ContextualBalloon'),this._form=new fh(e.locale),this._form.render(),this.listenTo(this._form,'submit',()=>{e.execute('imageTextAlternative',{newValue:this._form.labeledInput.inputView.element.value}),this._hideForm(!0)}),this.listenTo(this._form,'cancel',()=>{this._hideForm(!0)}),this._form.keystrokes.set('Esc',(e,t)=>{this._hideForm(!0),t()}),this.listenTo(t,'render',()=>{Ti(t.selection)?this._isVisible&&Hi(e):this._hideForm(!0)},{priority:'low'}),Fi({emitter:this._form,activator:()=>this._isVisible,contextElements:[this._form.element],callback:()=>this._hideForm()})}_showForm(){if(!this._isVisible){const e=this.editor,t=e.commands.get('imageTextAlternative'),n=this._form.labeledInput;this._balloon.hasView(this._form)||this._balloon.add({view:this._form,position:Wi(e)}),n.value=n.inputView.element.value=t.value||'',this._form.labeledInput.select()}}_hideForm(e){this._isVisible&&(this._balloon.remove(this._form),e&&this.editor.editing.view.focus())}get _isVisible(){return this._balloon.visibleView==this._form}}var Ch=n(24),Th=n.n(Ch);class Ph extends Ng{static get requires(){return[ih,dh,Ah]}static get pluginName(){return'Image'}init(){const e=this.editor,t=e.plugins.get('ContextualToolbar');t&&this.listenTo(t,'show',(t)=>{Ti(e.editing.view.selection)&&t.stop()},{priority:'high'})}}class Eh extends jg{execute(e){const t=this.editor,n=t.document,o=e.batch||n.batch(),i=e.file,r=n.selection,a=t.plugins.get(gf);n.enqueueChanges(()=>{const s=a.createLoader(i);if(!s)return;const l=new Gs('image',{uploadId:s.id});let d;d=e.insertAt?new bp([new el(e.insertAt)]):n.selection,t.data.insertContent(l,d,o),l.parent&&r.setRanges([el.createOn(l)])})}}class Sh extends Ng{static get pluginName(){return'Notification'}init(){this.on('show:warning',(e,t)=>{window.alert(t.message)},{priority:'lowest'})}showSuccess(e,t={}){this._showNotification({message:e,type:'success',namespace:t.namespace,title:t.title})}showInfo(e,t={}){this._showNotification({message:e,type:'info',namespace:t.namespace,title:t.title})}showWarning(e,t={}){this._showNotification({message:e,type:'warning',namespace:t.namespace,title:t.title})}_showNotification(e){const t=`show:${e.type}`+(e.namespace?`:${e.namespace}`:'');this.fire(t,{message:e.message,type:e.type,title:e.title||''})}}class Vh extends Ng{static get requires(){return[gf,Sh]}init(){const e=this.editor,t=e.document,n=t.schema,o=e.plugins.get(gf);n.allow({name:'image',attributes:['uploadId'],inside:'$root'}),n.allow({name:'image',attributes:['uploadStatus'],inside:'$root'}),n.requireAttributes('image',['uploadId']),e.commands.add('imageUpload',new Eh(e)),e.editing.view.on('clipboardInput',(n,o)=>{if(Ki(o.dataTransfer))return;let i=new bp(o.targetRanges.map((t)=>e.editing.mapper.toModelRange(t)));for(const r of o.dataTransfer.files){const o=$i(i);Ui(r)&&(e.execute('imageUpload',{file:r,insertAt:o}),n.stop()),i=t.selection}}),e.editing.view.on('dragover',(e,t)=>{t.preventDefault()}),t.on('change',(e,t,n)=>{if('insert'===t||'reinsert'===t||'remove'===t)for(const e of n.range)if('elementStart'===e.type&&'image'===e.item.name){const n=e.item,i=n.getAttribute('uploadId');if(i){const e=o.loaders.get(i);e&&('insert'===t&&'idle'==e.status&&this.load(e,n),'remove'===t&&e.abort())}}})}load(e,n){function o(){t.enqueueChanges(()=>{t.batch('transparent').removeAttribute(n,'uploadId'),t.batch('transparent').removeAttribute(n,'uploadStatus')}),a.destroyLoader(e)}const i=this.editor,r=i.locale.t,t=i.document,a=i.plugins.get(gf),s=i.plugins.get(Sh);t.enqueueChanges(()=>{t.batch('transparent').setAttribute(n,'uploadStatus','reading')}),e.read().then((o)=>{const r=i.editing.mapper.toViewElement(n),a=r.getChild(0),s=e.upload();return a.setAttribute('src',o),i.editing.view.render(),t.enqueueChanges(()=>{t.batch('transparent').setAttribute(n,'uploadStatus','uploading')}),s}).then((e)=>{t.enqueueChanges(()=>{t.batch('transparent').setAttribute(n,'uploadStatus','complete'),t.batch('transparent').setAttribute(n,'src',e.default);let o=0;const i=Object.keys(e).filter((e)=>{const t=parseInt(e,10);if(!isNaN(t))return o=ia(o,t),!0}).map((t)=>`${e[t]} ${t}w`).join(', ');''!=i&&t.batch('transparent').setAttribute(n,'srcset',{data:i,width:o})}),o()}).catch((i)=>{'error'==e.status&&s.showWarning(i,{title:r('Upload failed'),namespace:'upload'}),o(),t.enqueueChanges(()=>{t.batch('transparent').remove(n)})})}}class Oh extends wg{constructor(e){super(e),this.buttonView=new af(e),this._fileInputView=new Rh(e),this._fileInputView.bind('acceptedType').to(this),this._fileInputView.bind('allowMultipleFiles').to(this),this._fileInputView.delegate('done').to(this),this.setTemplate({tag:'span',attributes:{class:'ck-file-dialog-button'},children:[this.buttonView,this._fileInputView]}),this.buttonView.on('execute',()=>{this._fileInputView.open()})}focus(){this.buttonView.focus()}}class Rh extends wg{constructor(e){super(e),this.set('acceptedType'),this.set('allowMultipleFiles',!1);const t=this.bindTemplate;this.setTemplate({tag:'input',attributes:{class:['ck-hidden'],type:'file',tabindex:'-1',accept:t.to('acceptedType'),multiple:t.to('allowMultipleFiles')},on:{change:t.to(()=>{this.element&&this.element.files&&this.element.files.length&&this.fire('done',this.element.files),this.element.value=''})}})}open(){this.element.click()}}var Fh=n(26),Ih=n.n(Fh);class Nh extends Ng{static get requires(){return[Vh]}init(){const e=this.editor,n=e.t;e.ui.componentFactory.add('insertImage',(t)=>{const o=new Oh(t),i=e.commands.get('imageUpload');return o.set({acceptedType:'image/*',allowMultipleFiles:!0}),o.buttonView.set({label:n('Insert image'),icon:Ih.a,tooltip:!0}),o.bind('isEnabled').to(i),o.on('done',(t,n)=>{for(const o of Array.from(n)){const t=$i(e.document.selection);Ui(o)&&e.execute('imageUpload',{file:o,insertAt:t})}}),o})}}var Bh=n(27),Mh=n.n(Bh),Dh=n(28),Lh=n.n(Dh);class jh extends Ng{static get requires(){return[Vh]}constructor(e){super(e),this.placeholder='data:image/svg+xml;utf8,'+encodeURIComponent(Mh.a)}init(){const e=this.editor;e.editing.modelToView.on('addAttribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e)),e.editing.modelToView.on('changeAttribute:uploadStatus:image',(...e)=>this.uploadStatusChange(...e))}uploadStatusChange(e,t,n){const o=this.editor,i=t.item,r=i.getAttribute('uploadId');if(n.consume(t.item,Le(e.name))&&r){const e=o.plugins.get(gf),n=this.placeholder,a=t.attributeNewValue,s=o.editing.mapper.toViewElement(i);if('reading'==a){s.addClass('ck-appear','ck-infinite-progress','ck-image-upload-placeholder');const e=s.getChild(0);return void e.setAttribute('src',n)}if('uploading'==a){const t=e.loaders.get(r);if(t){const e=Qi();s.removeClass('ck-infinite-progress','ck-image-upload-placeholder'),s.appendChildren(e),t.on('change:uploadedPercent',(t,n,i)=>{e.setStyle('width',i+'%'),o.editing.view.render()})}return}const l=Ji(s);l?l.remove():s.removeClass('ck-infinite-progress'),s.removeClass('ck-appear','ck-image-upload-placeholder')}}}const zh=Symbol('progress-bar');class qh extends Ng{static get pluginName(){return'ImageUpload'}static get requires(){return[Nh,jh]}}class Hh extends Ng{static get requires(){return[Jf,Ph,qh]}static get pluginName(){return'EasyImage'}}class Wh extends jg{refresh(){const e=this.editor.document,t=ti(e.selection.getSelectedBlocks());this.value=!!t&&t.is('paragraph'),this.isEnabled=!!t&&Gi(t,e.schema)}execute(e={}){const t=this.editor.document;t.enqueueChanges(()=>{const n=e.batch||t.batch(),o=(e.selection||t.selection).getSelectedBlocks();for(const e of o)!e.is('paragraph')&&Gi(e,t.schema)&&n.rename(e,'paragraph')})}}class Uh extends Ng{static get pluginName(){return'Paragraph'}init(){const e=this.editor,t=e.document,n=e.data,o=e.editing;e.commands.add('paragraph',new Wh(e)),t.schema.registerItem('paragraph','$block'),Xo().for(n.modelToView,o.modelToView).fromElement('paragraph').toElement('p'),ei().for(n.viewToModel).fromElement('p').toElement('paragraph'),n.viewToModel.on('element',Yi,{priority:'low'}),n.viewToModel.on('text',Yi,{priority:'lowest'}),n.viewToModel.on('element',Xi,{priority:'lowest'}),n.viewToModel.on('documentFragment',Xi,{priority:'lowest'}),t.on('change',(e,n,o,i)=>{'transparent'==i.type||er(t,i)}),t.on('changesDone',tr,{priority:'lowest'}),e.on('dataReady',()=>{er(t,t.batch('transparent')),tr()},{priority:'lowest'})}}Uh.paragraphLikeElements=new Set(['blockquote','dd','div','dt','h1','h2','h3','h4','h5','h6','li','p','td']);const $h=new Map;class Kh extends jg{constructor(e,t){super(e),this.modelElement=t}refresh(){const e=ti(this.editor.document.selection.getSelectedBlocks());this.value=!!e&&e.is(this.modelElement),this.isEnabled=!!e&&nr(e,this.modelElement,this.editor.document.schema)}execute(e={}){const t=this.editor,n=t.document;n.enqueueChanges(()=>{const t=e.batch||n.batch(),o=Array.from(n.selection.getSelectedBlocks()).filter((e)=>nr(e,this.modelElement,n.schema));for(const e of o)e.is(this.modelElement)||t.rename(e,this.modelElement)})}}const Qh='paragraph';class Jh extends Ng{constructor(e){super(e),e.config.define('heading',{options:[{modelElement:'paragraph',title:'Paragraph',class:'ck-heading_paragraph'},{modelElement:'heading1',viewElement:'h2',title:'Heading 1',class:'ck-heading_heading1'},{modelElement:'heading2',viewElement:'h3',title:'Heading 2',class:'ck-heading_heading2'},{modelElement:'heading3',viewElement:'h4',title:'Heading 3',class:'ck-heading_heading3'}]})}static get requires(){return[Uh]}init(){const e=this.editor,t=e.data,n=e.editing,o=e.config.get('heading.options');for(const i of o)i.modelElement!==Qh&&(e.document.schema.registerItem(i.modelElement,'$block'),Xo().for(t.modelToView,n.modelToView).fromElement(i.modelElement).toElement(i.viewElement),ei().for(t.viewToModel).fromElement(i.viewElement).toElement(i.modelElement),e.commands.add(i.modelElement,new Kh(e,i.modelElement)))}afterInit(){const e=this.editor,t=e.commands.get('enter'),n=e.config.get('heading.options');t&&this.listenTo(t,'afterExecute',(t,o)=>{const i=e.document.selection.getFirstPosition().parent,r=o.batch,a=n.some((e)=>i.is(e.modelElement));a&&!i.is(Qh)&&0===i.childCount&&r.rename(i,Qh)})}}class Gh{constructor(e,t){t&&js(this,t),e&&this.set(e)}}a(Gh,Us);class Yh extends wg{constructor(){super(),this.items=this.createCollection(),this.focusTracker=new mg,this.keystrokes=new Op,this._focusCycler=new Pg({focusables:this.items,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'arrowup',focusNext:'arrowdown'}}),this.setTemplate({tag:'ul',attributes:{class:['ck-reset','ck-list']},children:this.items})}render(){super.render();for(const e of this.items)this.focusTracker.add(e.element);this.items.on('add',(e,t)=>{this.focusTracker.add(t.element)}),this.items.on('remove',(e,t)=>{this.focusTracker.remove(t.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}focusLast(){this._focusCycler.focusLast()}}class Xh extends wg{constructor(){super(),this.set('tabindex',-1),this.keystrokes=new Op;const e=this.bindTemplate;this.setTemplate({tag:'li',attributes:{class:['ck-list__item',e.to('class'),e.if('isActive','ck-list__item_active')],style:e.to('style'),tabindex:e.to('tabindex')},children:[{text:e.to('label')}],on:{click:e.to('execute')}})}render(){super.render();const e=(e,t)=>{this.fire('execute'),t()};this.keystrokes.listenTo(this.element),this.keystrokes.set('Enter',e),this.keystrokes.set('Space',e)}focus(){this.element.focus()}}class Zh extends wg{constructor(e,t,n){super(e),t.extendTemplate({attributes:{class:['ck-dropdown__button']}}),this.buttonView=t,this.panelView=n,this.set('isOpen',!1),this.focusTracker=new mg,this.keystrokes=new Op,this.setTemplate({tag:'div',attributes:{class:['ck-dropdown']},children:[t,n]})}render(){super.render(),this.listenTo(this.buttonView,'execute',()=>{this.isOpen=!this.isOpen}),this.panelView.bind('isVisible').to(this,'isOpen'),this.keystrokes.listenTo(this.element),this.focusTracker.add(this.element);const e=(e,t)=>{this.isOpen&&(this.buttonView.focus(),this.isOpen=!1,t())};this.keystrokes.set('arrowdown',(e,t)=>{this.buttonView.isEnabled&&!this.isOpen&&(this.isOpen=!0,t())}),this.keystrokes.set('arrowright',(e,t)=>{this.isOpen&&t()}),this.keystrokes.set('arrowleft',e),this.keystrokes.set('esc',e)}focus(){this.buttonView.focus()}}class eb extends wg{constructor(e){super(e);const t=this.bindTemplate;this.set('isVisible',!1),this.children=this.createCollection(),this.setTemplate({tag:'div',attributes:{class:['ck-reset','ck-dropdown__panel',t.if('isVisible','ck-dropdown__panel-visible')]},children:this.children,on:{selectstart:t.to((e)=>e.preventDefault())}})}}var tb=n(30),nb=n.n(tb);class ob extends Ng{static get requires(){return[Uh,Jh]}static get pluginName(){return'Heading'}init(){const e=this.editor,n=new pg,o=this._getLocalizedOptions(),i=[],r=e.t,t=r('Choose heading'),a=r('Heading');for(const t of o){const o=e.commands.get(t.modelElement),r=new Gh({commandName:t.modelElement,label:t.title,class:t.class});r.bind('isActive').to(o,'value'),n.add(r),i.push(o)}const s=new Gh({withText:!0,items:n,tooltip:a});s.bind('isEnabled').to(...ar(i,'isEnabled'),(...e)=>e.some((e)=>e)),s.bind('label').to(...ar(i,'value'),(...e)=>{const n=e.findIndex((e)=>e);return o[n]?o[n].title:t}),e.ui.componentFactory.add('headings',(t)=>{const n=ir(s,t);return n.extendTemplate({attributes:{class:['ck-heading-dropdown']}}),this.listenTo(n,'execute',(t)=>{e.execute(t.source.commandName),e.editing.view.focus()}),n})}_getLocalizedOptions(){const e=this.editor,n=e.t,t={Paragraph:n('Paragraph'),"Heading 1":n('Heading 1'),"Heading 2":n('Heading 2'),"Heading 3":n('Heading 3')};return e.config.get('heading.options').map((e)=>{const n=t[e.title];return n&&n!=e.title&&(e=Object.assign({},e,{title:n})),e})}}var ib=n(32),rb=n.n(ib);const ab={};js(ab,Oa);const sb=new WeakMap,lb=Symbol('imageCaption');class db extends Ng{init(){const e=this.editor,n=e.document,o=e.editing.view,i=n.schema,r=e.data,a=e.editing,s=e.t;this._createCaption=mr(o,s('Enter image caption')),i.registerItem('caption','$block'),i.allow({name:'$inline',inside:'caption'}),i.allow({name:'caption',inside:'image'}),i.limits.add('caption'),n.on('change',gr),ei().for(r.viewToModel).from(pr).toElement('caption'),r.modelToView.on('insert:caption',fr(new Yd('figcaption'),!1)),a.modelToView.on('insert:caption',fr(this._createCaption)),a.modelToView.on('insert',(e,t)=>this._fixCaptionVisibility(t.item),{priority:'high'}),a.modelToView.on('remove',(e,t)=>this._fixCaptionVisibility(t.sourcePosition.parent),{priority:'high'}),this.listenTo(o,'render',()=>this._updateCaptionVisibility(),{priority:'high'})}_updateCaptionVisibility(){const e=this.editor.editing.mapper;let t;this._lastSelectedCaption&&!this._lastSelectedCaption.childCount&&this._lastSelectedCaption.addClass('ck-hidden');const n=this.editor.document.selection,o=n.getSelectedElement();if(o&&o.is('image')){const n=ur(o);t=e.toViewElement(n)}const i=n.getFirstPosition(),r=br(i.parent);r&&(t=e.toViewElement(r)),t&&(t.removeClass('ck-hidden'),this._lastSelectedCaption=t)}_fixCaptionVisibility(e){const t=br(e),n=this.editor.editing.mapper;if(t){const e=n.toViewElement(t);e&&(t.childCount?e.removeClass('ck-hidden'):e.addClass('ck-hidden'))}}}var cb=n(34),mb=n.n(cb);class ub extends Ng{static get requires(){return[db]}static get pluginName(){return'ImageCaption'}}class pb extends jg{constructor(e,t){super(e),this.style=t}refresh(){const e=this.editor.document.selection.getSelectedElement();this.isEnabled=Pi(e),this.value=!!e&&(this.style.isDefault?!e.hasAttribute('imageStyle'):e.getAttribute('imageStyle')==this.style.name)}execute(e={}){if(this.value)return;const t=this.editor.document,n=t.selection.getSelectedElement();t.enqueueChanges(()=>{const o=e.batch||t.batch();this.style.isDefault?o.removeAttribute(n,'imageStyle'):o.setAttribute(n,'imageStyle',this.style.name)})}}var gb=n(36),fb=n.n(gb),hb=n(37),bb=n.n(hb),_b=n(38),kb=n.n(_b),wb=n(39),yb=n.n(wb);class vb extends Ng{static get requires(){return[ih]}static get pluginName(){return'ImageStyleEngine'}init(){const e=this.editor,t=e.document,n=t.schema,o=e.data,i=e.editing;e.config.define('image.styles',['imageStyleFull','imageStyleSide']);const r=this.imageStyles;n.allow({name:'image',attributes:'imageStyle',inside:'$root'});const a=_r(r);i.modelToView.on('addAttribute:imageStyle:image',a),o.modelToView.on('addAttribute:imageStyle:image',a),i.modelToView.on('changeAttribute:imageStyle:image',a),o.modelToView.on('changeAttribute:imageStyle:image',a),i.modelToView.on('removeAttribute:imageStyle:image',a),o.modelToView.on('removeAttribute:imageStyle:image',a),o.viewToModel.on('element:figure',kr(r),{priority:'low'});for(const t of r)e.commands.add(t.name,new pb(e,t))}get imageStyles(){if(this._cachedImageStyles)return this._cachedImageStyles;const e=[],t=this.editor,n=this.localizedDefaultStylesTitles,o=t.config.get('image.styles');for(let t of o)t=Ar(t),n[t.title]&&(t.title=n[t.title]),e.push(t);return this._cachedImageStyles=e}get localizedDefaultStylesTitles(){const e=this.editor.t;return{"Full size image":e('Full size image'),"Side image":e('Side image'),"Left aligned image":e('Left aligned image'),"Centered image":e('Centered image'),"Right aligned image":e('Right aligned image')}}}vb.defaultStyles={imageStyleFull:{name:'imageStyleFull',title:'Full size image',icon:fb.a,isDefault:!0},imageStyleSide:{name:'imageStyleSide',title:'Side image',icon:yb.a,className:'image-style-side'},imageStyleAlignLeft:{name:'imageStyleAlignLeft',title:'Left aligned image',icon:bb.a,className:'image-style-align-left'},imageStyleAlignCenter:{name:'imageStyleAlignCenter',title:'Centered image',icon:kb.a,className:'image-style-align-center'},imageStyleAlignRight:{name:'imageStyleAlignRight',title:'Right aligned image',icon:yb.a,className:'image-style-align-right'}},vb.defaultIcons={full:fb.a,left:bb.a,right:yb.a,center:kb.a};class xb extends Ng{static get requires(){return[vb]}static get pluginName(){return'ImageStyle'}init(){const e=this.editor,t=e.plugins.get(vb).imageStyles;for(const e of t)this._createButton(e)}_createButton(e){const t=this.editor,n=t.commands.get(e.name);t.ui.componentFactory.add(e.name,(o)=>{const i=new af(o);return i.set({label:e.title,icon:e.icon,tooltip:!0}),i.bind('isEnabled').to(n,'isEnabled'),i.bind('isOn').to(n,'value'),this.listenTo(i,'execute',()=>t.execute(e.name)),i})}}class Ab extends Ng{static get requires(){return[kh]}static get pluginName(){return'ImageToolbar'}afterInit(){const e=this.editor,t=e.config.get('image.toolbar');t&&t.length&&(this._balloon=this.editor.plugins.get('ContextualBalloon'),this._toolbar=new Sg,this._toolbar.extendTemplate({attributes:{class:'ck-editor-toolbar'}}),this._toolbar.fillFromConfig(t,e.ui.componentFactory),this.listenTo(e.editing.view,'render',()=>{this._checkIsVisible()},{priority:'low'}),this.listenTo(e.ui.focusTracker,'change:isFocused',()=>{this._checkIsVisible()},{priority:'low'}))}_checkIsVisible(){const e=this.editor;e.ui.focusTracker.isFocused?Ti(e.editing.view.selection)?this._showToolbar():this._hideToolbar():this._hideToolbar()}_showToolbar(){const e=this.editor;this._isVisible?Hi(e):!this._balloon.hasView(this._toolbar)&&this._balloon.add({view:this._toolbar,position:Wi(e),balloonClassName:'ck-toolbar-container ck-editor-toolbar-container'})}_hideToolbar(){this._isVisible&&this._balloon.remove(this._toolbar)}get _isVisible(){return this._balloon.visibleView==this._toolbar}}class Cb extends Xp{constructor(e){super(e),this.domEventType='click'}onDomEvent(e){this.fire(e.type,e)}}class Tb extends sc{}class Pb extends jg{refresh(){const e=this.editor.document;this.value=e.selection.getAttribute('linkHref'),this.isEnabled=e.schema.checkAttributeInSelection(e.selection,'linkHref')}execute(e){const t=this.editor.document,n=t.selection;t.enqueueChanges(()=>{const o=t.batch();if(n.isCollapsed){const t=n.getFirstPosition();if(n.hasAttribute('linkHref')){const t=Cr(n.getFirstPosition(),n.getAttribute('linkHref'));o.setAttribute(t,'linkHref',e),n.setRanges([t])}else{const i=new Ks(e,{linkHref:e});o.insert(t,i),n.setRanges([el.createOn(i)])}}else{const i=t.schema.getValidRanges(n.getRanges(),'linkHref');for(const t of i)o.setAttribute(t,'linkHref',e)}})}}class Eb extends jg{refresh(){this.isEnabled=this.editor.document.selection.hasAttribute('linkHref')}execute(){const e=this.editor.document,t=e.selection;e.enqueueChanges(()=>{const n=t.isCollapsed?[Cr(t.getFirstPosition(),t.getAttribute('linkHref'))]:t.getRanges(),o=e.batch();for(const e of n)o.removeAttribute(e,'linkHref')})}}class Sb extends Ng{init(){const e=this.editor,t=e.data,n=e.editing;e.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$block'}),e.document.schema.allow({name:'$inline',attributes:'linkHref',inside:'$clipboardHolder'}),Xo().for(t.modelToView,n.modelToView).fromAttribute('linkHref').toElement((e)=>{const t=new Tb('a',{href:e});return t.priority=5,t}),ei().for(t.viewToModel).from({name:'a',attribute:{href:/.?/}}).toAttribute((e)=>({key:'linkHref',value:e.getAttribute('href')})),e.commands.add('link',new Pb(e)),e.commands.add('unlink',new Eb(e))}}class Vb extends wg{constructor(e){super(e);const n=e.t;this.focusTracker=new mg,this.keystrokes=new Op,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 gg,this._focusCycler=new Pg({focusables:this._focusables,focusTracker:this.focusTracker,keystrokeHandler:this.keystrokes,actions:{focusPrevious:'shift + tab',focusNext:'tab'}}),this.saveButtonView.extendTemplate({attributes:{class:['ck-button-action']}}),this.setTemplate({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]}]})}render(){super.render(),Ii({view:this});const e=[this.urlInputView,this.saveButtonView,this.cancelButtonView,this.unlinkButtonView];e.forEach((e)=>{this._focusables.add(e),this.focusTracker.add(e.element)}),this.keystrokes.listenTo(this.element)}focus(){this._focusCycler.focusFirst()}_createUrlInput(){const e=this.locale.t,t=new ph(this.locale,gh);return t.label=e('Link URL'),t.inputView.placeholder='https://example.com',t}_createButton(e,t){const n=new af(this.locale);return n.label=e,n.withText=!0,t&&n.delegate('execute').to(this,t),n}}var Ob=n(40),Rb=n.n(Ob),Fb=n(41),Ib=n.n(Fb);const Nb='Ctrl+K';class Bb extends Ng{static get requires(){return[Sb,kh]}static get pluginName(){return'Link'}init(){const e=this.editor;e.editing.view.addObserver(Cb),this.formView=this._createForm(),this._balloon=e.plugins.get(kh),this._createToolbarLinkButton(),this._attachActions()}_createForm(){const e=this.editor,t=new Vb(e.locale),n=e.commands.get('link'),o=e.commands.get('unlink');return t.urlInputView.bind('value').to(n,'value'),t.urlInputView.bind('isReadOnly').to(n,'isEnabled',(e)=>!e),t.saveButtonView.bind('isEnabled').to(n),t.unlinkButtonView.bind('isEnabled').to(o),this.listenTo(t,'submit',()=>{e.execute('link',t.urlInputView.inputView.element.value),this._hidePanel(!0)}),this.listenTo(t,'unlink',()=>{e.execute('unlink'),this._hidePanel(!0)}),this.listenTo(t,'cancel',()=>this._hidePanel(!0)),t.keystrokes.set('Esc',(e,t)=>{this._hidePanel(!0),t()}),t}_createToolbarLinkButton(){const e=this.editor,n=e.commands.get('link'),o=e.t;e.keystrokes.set(Nb,(e,t)=>{t(),n.isEnabled&&this._showPanel(!0)}),e.ui.componentFactory.add('link',(e)=>{const t=new af(e);return t.isEnabled=!0,t.label=o('Link'),t.icon=Rb.a,t.keystroke=Nb,t.tooltip=!0,t.bind('isEnabled').to(n,'isEnabled'),this.listenTo(t,'execute',()=>this._showPanel(!0)),t})}_attachActions(){const e=this.editor.editing.view;this.listenTo(e,'click',()=>{const e=this._getSelectedLinkElement();e&&this._showPanel()}),this.editor.keystrokes.set('Tab',(e,t)=>{this._balloon.visibleView!==this.formView||this.formView.focusTracker.isFocused||(this.formView.focus(),t())},{priority:'high'}),this.editor.keystrokes.set('Esc',(e,t)=>{this._balloon.visibleView===this.formView&&(this._hidePanel(),t())}),Fi({emitter:this.formView,activator:()=>this._balloon.hasView(this.formView),contextElements:[this._balloon.view.element],callback:()=>this._hidePanel()})}_showPanel(e){const t=this.editor,n=t.commands.get('link'),o=t.commands.get('unlink'),i=t.editing,r=i.view,a=r.selection.isCollapsed,s=this._getSelectedLinkElement();this.listenTo(r,'render',()=>{const e=this._getSelectedLinkElement(),t=r.selection.isCollapsed;a&&!t||s!==e?this._hidePanel(!0):this._balloon.updatePosition(this._getBalloonPositionData())}),this._balloon.hasView(this.formView)?e&&this._balloon.visibleView===this.formView&&this.formView.urlInputView.select():(this._balloon.add({view:this.formView,position:this._getBalloonPositionData()}),e&&this.formView.urlInputView.select()),this.formView.unlinkButtonView.isVisible=o.isEnabled,this.formView.urlInputView.inputView.element.value=n.value||''}_hidePanel(e){this.stopListening(this.editor.editing.view,'render');this._balloon.hasView(this.formView)&&(e&&this.editor.editing.view.focus(),this.stopListening(this.editor.editing.view,'render'),this._balloon.remove(this.formView))}_getBalloonPositionData(){const e=this.editor.editing.view,t=this._getSelectedLinkElement(),n=t?e.domConverter.mapViewToDom(t):e.domConverter.viewRangeToDom(e.selection.getFirstRange());return{target:n}}_getSelectedLinkElement(){const e=this.editor.editing.view.selection;if(e.isCollapsed)return Pr(e.getFirstPosition());else{const t=e.getFirstRange().getTrimmed(),n=Pr(t.start),o=Pr(t.end);return n&&n==o?tc.createIn(n).getTrimmed().isEqual(t)?n:null:null}}}class Mb extends jg{constructor(e,t){super(e),this.type='bulleted'==t?'bulleted':'numbered'}refresh(){this.value=this._getValue(),this.isEnabled=this._checkEnabled()}execute(e={}){const t=this.editor.document,n=Array.from(t.selection.getSelectedBlocks()).filter((e)=>Sr(e,t.schema)),o=!0===this.value;t.enqueueChanges(()=>{const i=e.batch||t.batch();if(o){let e=n[n.length-1].nextSibling,t=na,o=[];for(;e&&'listItem'==e.name&&0!==e.getAttribute('indent');){const n=e.getAttribute('indent');n{const e=n[n.length-1];for(let t=e.nextSibling;t&&'listItem'==t.name&&t.getAttribute('indent')>e.getAttribute('indent');)n.push(t),t=t.nextSibling;0>this._indentBy&&(n=n.reverse());for(const e of n){const n=e.getAttribute('indent')+this._indentBy;0>n?t.rename(e,'paragraph'):t.setAttribute(e,'indent',n)}0>this._indentBy&&(n=n.reverse());for(const e of n)Vr(e,t)})}_checkEnabled(){const e=ti(this.editor.document.selection.getSelectedBlocks());if(!e||!e.is('listItem'))return!1;if(0=t;){if(o.getAttribute('indent')==t)return o.getAttribute('type')==n;o=o.previousSibling}return!1}return!0}}class Lb extends Yd{constructor(e,t){super('li',e,t),this.getFillerOffset=Rr}}class jb extends Ng{static get requires(){return[Uh]}init(){const e=this.editor,t=e.document.schema;t.registerItem('listItem','$block'),t.allow({name:'listItem',inside:'$root',attributes:['type','indent']}),t.requireAttributes('listItem',['type','indent']);const n=e.data,o=e.editing;this.editor.document.on('change',Wr(this.editor.document),{priority:'high'}),this.editor.document.on('change',(e,t,n)=>{if('move'==t)for(const e of n.range.getItems())e.is('listItem')&&o.mapper.unbindModelElement(e)},{priority:'high'}),o.mapper.registerViewToModelLength('li',ta),n.mapper.registerViewToModelLength('li',ta),o.mapper.on('modelToViewPosition',qr),o.mapper.on('viewToModelPosition',Hr),n.mapper.on('modelToViewPosition',qr),o.modelToView.on('insert',Mr,{priority:'high'}),o.modelToView.on('insert:listItem',Fr),n.modelToView.on('insert',Mr,{priority:'high'}),n.modelToView.on('insert:listItem',Fr),o.modelToView.on('changeAttribute:type:listItem',Ir),n.modelToView.on('changeAttribute:type:listItem',Ir),o.modelToView.on('remove:listItem',Nr),o.modelToView.on('remove',Dr,{priority:'low'}),n.modelToView.on('remove:listItem',Nr),n.modelToView.on('remove',Dr,{priority:'low'}),o.modelToView.on('changeAttribute:indent:listItem',Br),n.modelToView.on('changeAttribute:indent:listItem',Br),n.viewToModel.on('element:ul',jr,{priority:'high'}),n.viewToModel.on('element:ol',jr,{priority:'high'}),n.viewToModel.on('element:li',zr,{priority:'high'}),n.viewToModel.on('element:li',Lr),n.on('insertContent',Kr,{priority:'high'}),e.commands.add('numberedList',new Mb(e,'numbered')),e.commands.add('bulletedList',new Mb(e,'bulleted')),e.commands.add('indentList',new Db(e,'forward')),e.commands.add('outdentList',new Db(e,'backward'))}}var zb=n(43),qb=n.n(zb),Hb=n(44),Wb=n.n(Hb);class Ub extends Ng{static get requires(){return[jb]}static get pluginName(){return'List'}init(){const e=this.editor.t;this._addButton('numberedList',e('Numbered List'),qb.a),this._addButton('bulletedList',e('Bulleted List'),Wb.a),this.listenTo(this.editor.editing.view,'enter',(e,t)=>{const n=this.editor.document,o=n.selection.getLastPosition().parent;n.selection.isCollapsed&&'listItem'==o.name&&o.isEmpty&&(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}),this.listenTo(this.editor.editing.view,'delete',(e,t)=>{if('backward'===t.direction){const n=this.editor.document.selection;if(n.isCollapsed){const o=n.getFirstPosition();if(o.isAtStart){const n=o.parent;if('listItem'===n.name){const o=n.previousSibling&&'listItem'===n.previousSibling.name;o||(this.editor.execute('outdentList'),t.preventDefault(),e.stop())}}}}},{priority:'high'});const t=(e)=>(t,n)=>{const o=this.editor.commands.get(e);o.isEnabled&&(this.editor.execute(e),n())};this.editor.keystrokes.set('Tab',t('indentList')),this.editor.keystrokes.set('Shift+Tab',t('outdentList'))}_addButton(e,t,n){const o=this.editor,i=o.commands.get(e);o.ui.componentFactory.add(e,(r)=>{const a=new af(r);return a.set({label:t,icon:n,tooltip:!0}),a.bind('isOn','isEnabled').to(i,'value','isEnabled'),this.listenTo(a,'execute',()=>o.execute(e)),a})}}class $b extends Ig{}t['default']=$b,$b.build={plugins:[uf,kf,xf,Of,Bf,Hf,Hh,ob,Ph,ub,xb,Ab,Bb,Ub,Uh,qh],config:{toolbar:{items:['headings','bold','italic','link','bulletedList','numberedList','blockQuote','undo','redo']},image:{toolbar:['imageStyleFull','imageStyleSide','|','imageTextAlternative']}}}},function(e){var t=function(){return this}();try{t=t||Function('return this')()||(1,eval)('this')}catch(n){'object'==typeof window&&(t=window)}e.exports=t},function(e,t){'use strict';t.a=function(e){return e&&e.Object===Object?e:null}},function(e,t,n){'use strict';(function(e){var o=n(8),i=n(2),r={function:!0,object:!0},a=r[typeof exports]&&exports&&!exports.nodeType?exports:void 0,s=r[typeof e]&&e&&!e.nodeType?e:void 0,l=s&&s.exports===a?a:void 0,d=l?i.a.Buffer:void 0,c=d?function(e){return e instanceof d}:Object(o.a)(!1);t.a=c}).call(t,n(3)(e))},function(e,t){'use strict';t.a=function(e){return function(){return e}}},function(e,t,n){var o=n(10);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.ck-hidden{display:none!important}.ck-reset,.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{box-sizing:border-box;width:auto;height:auto;position:static}svg.ck-icon{min-width:20px;min-height:20px;font-size:1em;vertical-align:middle}svg.ck-icon,svg.ck-icon *{color:inherit;cursor:inherit}svg.ck-icon *{fill:currentColor}.ck-tooltip,.ck-tooltip__text:after{position:absolute;pointer-events:none;-webkit-backface-visibility:hidden}.ck-tooltip{visibility:hidden;opacity:0;display:none;z-index:999}.ck-tooltip__text{display:inline-block}.ck-tooltip__text:after{content:"";width:0;height:0}.ck-button,a.ck-button{display:inline-block;position:relative;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.ck-button .ck-tooltip,a.ck-button .ck-tooltip{display:block}.ck-button:hover .ck-tooltip,a.ck-button:hover .ck-tooltip{visibility:visible;opacity:1}.ck-button .ck-button__label,.ck-button:focus:not(:hover) .ck-tooltip,a.ck-button .ck-button__label,a.ck-button:focus:not(:hover) .ck-tooltip{display:none}.ck-toolbar__separator{display:inline-block}.ck-toolbar__newline{display:block;clear:left}.ck-dropdown{display:inline-block;position:relative}.ck-dropdown:after{content:"";width:0;height:0;pointer-events:none;z-index:1;position:absolute;top:50%;transform:translateY(-50%)}.ck-dropdown__panel{-webkit-backface-visibility:hidden;display:none;z-index:999;position:absolute;left:0;transform:translateY(100%)}.ck-dropdown__panel-visible{display:inline-block}.ck-label,.ck-list__item{display:block}.cke-voice-label{display:none}.ck-balloon-panel{display:none;position:absolute;z-index:999}.ck-balloon-panel.ck-balloon-panel_with-arrow:after,.ck-balloon-panel.ck-balloon-panel_with-arrow:before{content:"";position:absolute}.ck-balloon-panel.ck-balloon-panel_with-arrow:before{z-index:1}.ck-balloon-panel.ck-balloon-panel_with-arrow:after{z-index:2}.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{z-index:1}.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{z-index:2}.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{z-index:1}.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{z-index:2}.ck-balloon-panel_visible{display:block}.ck-editor .ck-sticky-panel .ck-sticky-panel__content_sticky{z-index:999;position:fixed;top:0}.ck-editor .ck-sticky-panel .ck-sticky-panel__content_sticky_bottom-limit{top:auto;position:absolute}.ck-reset,.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{margin:0;padding:0;border:0;background:transparent;text-decoration:none;vertical-align:middle;transition:none;word-wrap:break-word}.ck-reset_all,.ck-reset_all *,.ck-reset_all a,.ck-reset_all textarea{border-collapse:collapse;font:normal normal normal 12px/1.67 Helvetica,Arial,Tahoma,Verdana,Sans-Serif;color:#333;text-align:left;white-space:nowrap;cursor:auto;float:none}.ck-reset_all .ck-rtl *{text-align:right}.ck-reset_all iframe{vertical-align:inherit}.ck-reset_all textarea{white-space:pre-wrap}.ck-reset_all input[type=password],.ck-reset_all input[type=text],.ck-reset_all textarea{cursor:text}.ck-reset_all input[type=password][disabled],.ck-reset_all input[type=text][disabled],.ck-reset_all textarea[disabled]{cursor:default}.ck-reset_all fieldset{padding:10px;border:2px groove #e0dfe3}.ck-reset_all button::-moz-focus-inner{padding:0;border:0}svg.ck-icon{width:1.67em;height:1.67em}.ck-tooltip{left:50%}.ck-tooltip__text{font-size:.9em;line-height:1.5;color:#fff;padding:.4em .64em;background:#333;position:relative;left:-50%}.ck-rounded-corners .ck-tooltip__text,.ck-tooltip__text.ck-rounded-corners{border-radius:2px}.ck-tooltip__text:after{border-style:solid;left:50%}.ck-tooltip.ck-tooltip_s{bottom:-5px;transform:translateY(100%)}.ck-tooltip.ck-tooltip_s .ck-tooltip__text:after{top:-5px;transform:translateX(-50%);border-color:transparent transparent #333;border-width:0 5px 5px}.ck-tooltip.ck-tooltip_n{top:-5px;transform:translateY(-100%)}.ck-tooltip.ck-tooltip_n .ck-tooltip__text:after{bottom:-5px;transform:translateX(-50%);border-color:#333 transparent transparent;border-width:5px 5px 0}.ck-tooltip,.ck-tooltip__text:after{transition:opacity .2s ease-in-out .2s}.ck-button,a.ck-button{background:#fff;border:1px solid #bfbfbf;white-space:nowrap;cursor:default;vertical-align:middle;padding:.4em;font-size:inherit}.ck-button:not(.ck-disabled):focus,.ck-button:not(.ck-disabled):hover,a.ck-button:not(.ck-disabled):focus,a.ck-button:not(.ck-disabled):hover{background:#e6e6e6;border-color:#acacac}.ck-button:not(.ck-disabled):active,a.ck-button:not(.ck-disabled):active{background:#d9d9d9;border-color:#a3a3a3;box-shadow:inset 0 2px 2px #bfbfbf}.ck-button.ck-disabled,a.ck-button.ck-disabled{background:#fff;border-color:#c6c6c6}.ck-button.ck-rounded-corners,.ck-rounded-corners .ck-button,.ck-rounded-corners a.ck-button,a.ck-button.ck-rounded-corners{border-radius:2px}.ck-button:focus,a.ck-button:focus{outline:none;border:1px solid #48a3f5;box-shadow:0 0 3px 2px #78bbf8}.ck-button .ck-icon,a.ck-button .ck-icon{float:left}.ck-button.ck-disabled .ck-button__label,.ck-button.ck-disabled .ck-icon,a.ck-button.ck-disabled .ck-button__label,a.ck-button.ck-disabled .ck-icon{opacity:.5}.ck-button.ck-button_with-text,a.ck-button.ck-button_with-text{padding:.4em .8em}.ck-button.ck-button_with-text .ck-icon,a.ck-button.ck-button_with-text .ck-icon{margin-left:-.4em;margin-right:.4em}.ck-button.ck-button_with-text .ck-button__label,a.ck-button.ck-button_with-text .ck-button__label{display:block}.ck-button.ck-on,a.ck-button.ck-on{background:#f7f7f7;border-color:#b9b9b9}.ck-button.ck-on:not(.ck-disabled):focus,.ck-button.ck-on:not(.ck-disabled):hover,a.ck-button.ck-on:not(.ck-disabled):focus,a.ck-button.ck-on:not(.ck-disabled):hover{background:#dedede;border-color:#a7a7a7}.ck-button.ck-on:not(.ck-disabled):active,a.ck-button.ck-on:not(.ck-disabled):active{background:#d2d2d2;border-color:#9d9d9d;box-shadow:inset 0 2px 2px #b9b9b9}.ck-button.ck-on.ck-disabled,a.ck-button.ck-on.ck-disabled{background:#f8f8f8;border-color:silver}.ck-button-action,a.ck-button-action{background:#61b145;border-color:#4e8e37;text-shadow:0 -1px #4e8e37;color:#fff}.ck-button-action:not(.ck-disabled):focus,.ck-button-action:not(.ck-disabled):hover,a.ck-button-action:not(.ck-disabled):focus,a.ck-button-action:not(.ck-disabled):hover{background:#579f3e;border-color:#467f32}.ck-button-action:not(.ck-disabled):active,a.ck-button-action:not(.ck-disabled):active{background:#52963b;border-color:#42782f;box-shadow:inset 0 2px 2px #498534}.ck-button-action.ck-disabled,a.ck-button-action.ck-disabled{background:#6fbc54;border-color:#5aa440}.ck-button-action:active,.ck-button-action:focus,.ck-button-action:hover,a.ck-button-action:active,a.ck-button-action:focus,a.ck-button-action:hover{text-shadow:0 -1px #3a6a29}.ck-button-bold,a.ck-button-bold{font-weight:700}.ck-button .ck-icon use,.ck-button .ck-icon use *,a.ck-button .ck-icon use,a.ck-button .ck-icon use *{color:inherit}.ck-button .ck-button__label,a.ck-button .ck-button__label{font-size:inherit;float:left;height:1.67em;line-height:inherit;font-weight:inherit;color:inherit;cursor:inherit}.ck-toolbar{padding:.4em;border:1px solid #bfbfbf;white-space:normal;-moz-user-select:none;-webkit-user-select:none;-ms-user-select:none}.ck-toolbar_floating{white-space:nowrap}.ck-rounded-corners .ck-toolbar,.ck-toolbar.ck-rounded-corners{border-radius:2px}.ck-toolbar__separator{width:1px;height:2.28em;vertical-align:middle;background:#bfbfbf}.ck-toolbar__newline{height:.4em}.ck-toolbar>*{margin-right:.4em}.ck-toolbar>:last-child{margin-right:0}.ck-toolbar-container .ck-toolbar{border:0}.ck-dropdown{font-size:inherit}.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-disabled .ck-button__label{opacity:.5}.ck-dropdown .ck-button.ck-dropdown__button .ck-button__label{width:7em;overflow:hidden;text-overflow:ellipsis}.ck-dropdown__panel{background:#fff;border:1px solid #bfbfbf;bottom:1px;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;overflow:hidden;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 #78bbf8;position:relative;z-index:1;outline: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 rgba(0,0,0,.1);background:#fff;border:1px solid #bfbfbf;padding:.4em .64em;min-width:21em}.ck-input-text.ck-rounded-corners,.ck-rounded-corners .ck-input-text{border-radius:2px}.ck-input-text:focus{outline:none;border:1px solid #48a3f5;box-shadow:0 0 3px 2px #78bbf8,inset 2px 2px 3px rgba(0,0,0,.1)}.ck-input-text[readonly]{border:1px solid #c6c6c6;background:#f2f2f2;color:#5c5c5c}.ck-editor__editable.ck-focused{outline:none;border:1px solid #48a3f5;box-shadow:inset 2px 2px 3px rgba(0,0,0,.1)}.ck-editor__editable_inline{overflow:auto;padding:0 .8em;border:1px solid transparent}.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:#acacac}.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:#999}.ck-editor-toolbar .ck-button.ck-on:not(.ck-disabled):active{background:#b9b9b9;border-color:#8f8f8f;box-shadow:inset 0 2px 2px #a1a1a1}.ck-editor-toolbar .ck-button.ck-on.ck-disabled{background:#f7f7f7;border-color:#bfbfbf}.ck-editor-toolbar .ck-button.ck-dropdown__button{border-width:1px}.ck-editor-toolbar .ck-button.ck-dropdown__button:not(:hover):not(:focus):not(.ck-on){background:#fff}.ck-toolbar-container .ck-editor-toolbar{background:#f7f7f7}.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_n:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_ne:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_nw:after{border-bottom-color:#f7f7f7}.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_s:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_se:after,.ck-toolbar-container.ck-editor-toolbar-container.ck-balloon-panel_arrow_sw:after{border-top-color:#f7f7f7}.ck-balloon-panel{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);min-height:15px;background:#fff;border:1px solid #bfbfbf}.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 #bfbfbf}.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:#bfbfbf 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_nw:after,.ck-balloon-panel.ck-balloon-panel_arrow_nw:before{left:20px;top:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_ne:after,.ck-balloon-panel.ck-balloon-panel_arrow_ne: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_sw:after,.ck-balloon-panel.ck-balloon-panel_arrow_sw:before{left:20px;bottom:-15px}.ck-balloon-panel.ck-balloon-panel_arrow_se:after,.ck-balloon-panel.ck-balloon-panel_arrow_se:before{right:20px;bottom:-15px}.ck-editor .ck-sticky-panel .ck-sticky-panel__content_sticky{box-shadow:0 1px 2px 0 rgba(0,0,0,.2);border-width:0 1px 1px;border-top-left-radius:0;border-top-right-radius:0}.ck-editor{position:relative}.ck-editor__top .ck-sticky-panel .ck-toolbar{z-index:999;background:#f7f7f7;border-bottom-width:0}.ck-editor__top .ck-sticky-panel .ck-toolbar.ck-rounded-corners,.ck-rounded-corners .ck-editor__top .ck-sticky-panel .ck-toolbar{border-radius:2px;border-bottom-left-radius:0;border-bottom-right-radius:0}.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-bottom-width:1px}.ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar.ck-rounded-corners,.ck-rounded-corners .ck-editor__top .ck-sticky-panel .ck-sticky-panel__content_sticky .ck-toolbar{border-radius:2px;border-radius:0}.ck-editor__editable{border:1px solid #bfbfbf}.ck-editor__editable.ck-rounded-corners,.ck-rounded-corners .ck-editor__editable{border-radius:2px;border-top-left-radius:0;border-top-right-radius:0}',''])},function(e){e.exports=function(e){var t='undefined'!=typeof window&&window.location;if(!t)throw new Error('fixUrls requires window.location');if(!e||'string'!=typeof e)return e;var n=t.protocol+'//'+t.host,o=n+t.pathname.replace(/\/[^\/]*$/,'/'),i=e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});if(/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/)/i.test(i))return e;var r;return r=0===i.indexOf('//')?i:0===i.indexOf('/')?n+i:o+i.replace(/^\.\//,''),'url('+JSON.stringify(r)+')'});return i}},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e,t,n){var o=n(18);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'blockquote{border-left:5px solid #ccc;padding-left:20px;margin-left:0;font-style:italic;overflow:hidden}',''])},function(e,t,n){var o=n(20);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.ck-widget{margin:.8em 0;padding:0}.ck-widget.ck-widget_selected,.ck-widget.ck-widget_selected:hover{outline:3px solid #48a3f5}.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{border:1px solid transparent}.ck-widget .ck-editable.ck-editable_focused,.ck-widget .ck-editable:focus{outline:none;border:1px solid #48a3f5;box-shadow:inset 2px 2px 3px rgba(0,0,0,.1);background-color:#fff}',''])},function(e){e.exports=''},function(e,t,n){var o=n(23);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.cke-text-alternative-form{padding:1.2em;overflow:hidden}.cke-text-alternative-form:focus{outline:none}.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(e,t,n){var o=n(25);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.ck-editor__editable .image{text-align:center;clear:both}.ck-editor__editable .image.image-style-align-center,.ck-editor__editable .image.image-style-align-left,.ck-editor__editable .image.image-style-align-right,.ck-editor__editable .image.image-style-side{max-width:50%}.ck-editor__editable .image.image-style-side{float:right;margin-left:2em}.ck-editor__editable .image.image-style-align-left{float:left;margin-right:2em}.ck-editor__editable .image.image-style-align-center{margin-left:auto;margin-right:auto}.ck-editor__editable .image.image-style-align-right{float:right;margin-left:2em}.ck-editor__editable .image>img{display:block;margin:0 auto;max-width:100%}',''])},function(e){e.exports=''},function(e){e.exports='Uploading image\u2026\n'},function(e,t,n){var o=n(29);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'figure.image{position:relative;overflow:hidden}figure.image.ck-appear{animation:fadeIn .7s}figure.image.ck-infinite-progress:before{content:"";width:30px;height:2px;position:absolute;top:0;right:0;background:rgba(0,0,0,.1);animation-name:readingProgressAnimation;animation-duration:1.5s;animation-iteration-count:infinite;transition-timing-function:linear}figure.image.ck-image-upload-placeholder>img{width:100%}figure.image .ck-progress-bar{height:2px;width:0;position:absolute;top:0;left:0;background:#6ab5f9;transition:width .1s}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}@keyframes readingProgressAnimation{0%{width:30px;right:0}50%{width:45px}to{right:100%}}',''])},function(e,t,n){var o=n(31);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.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(e,t,n){var o=n(33);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.ck-placeholder:before{content:attr(data-placeholder);cursor:text;color:#c2c2c2;pointer-events:none}',''])},function(e,t,n){var o=n(35);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.ck-editor__editable .image>figcaption{color:#333;background-color:#f7f7f7;padding:.8em;font-size:.75em;outline-offset:-1px}',''])},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e){e.exports=''},function(e,t,n){var o=n(42);'string'==typeof o&&(o=[[e.i,o,'']]);var i={},r;i.transform=r;n(1)(o,i);o.locals&&(e.exports=o.locals),!1},function(e,t,n){t=e.exports=n(0)(void 0),t.push([e.i,'.ck-link-form{padding:1.2em;overflow:hidden}.ck-link-form:focus{outline:none}.ck-link-form .ck-input-text{width:100%}.ck-link-form .ck-label{margin-bottom:.2em}.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:last-child{float:left;margin-right:2.56em}',''])},function(e){e.exports=''},function(e){e.exports=''}])['default']}); //# sourceMappingURL=ckeditor.js.map \ No newline at end of file diff --git a/build/ckeditor.js.map b/build/ckeditor.js.map index 03d24c2c88..101b2e559a 100644 --- a/build/ckeditor.js.map +++ b/build/ckeditor.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///webpack/universalModuleDefinition","webpack:///../ckeditor5-engine/src/view/writer.js","webpack:///../ckeditor5-utils/src/lib/lodash/rest.js","webpack:///webpack/bootstrap 49a568eb53341071c0d6","webpack:///../ckeditor5-utils/src/ckeditorerror.js","webpack:///../ckeditor5-engine/src/model/position.js","webpack:///../ckeditor5-core/src/plugin.js","webpack:///../ckeditor5-engine/src/model/range.js","webpack:///../ckeditor5-utils/src/mix.js","webpack:///../ckeditor5-engine/src/model/element.js","webpack:///../ckeditor5-ui/src/template.js","webpack:///../ckeditor5-ui/src/view.js","webpack:///../ckeditor5-utils/src/emittermixin.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIteratee.js","webpack:///../ckeditor5-core/src/command.js","webpack:///../ckeditor5-utils/src/observablemixin.js","webpack:///../ckeditor5-utils/src/lib/lodash/toInteger.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArray.js","webpack:///../ckeditor5-utils/src/log.js","webpack:///../ckeditor5-utils/src/lib/lodash/isObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/last.js","webpack:///../ckeditor5-engine/src/model/delta/deltafactory.js","webpack:///../ckeditor5-engine/src/model/batch.js","webpack:///../ckeditor5-ui/src/button/buttonview.js","webpack:///../ckeditor5-engine/src/view/position.js","webpack:///../ckeditor5-engine/src/model/writer.js","webpack:///../ckeditor5-engine/src/model/delta/delta.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseFlatten.js","webpack:///../ckeditor5-engine/src/model/text.js","webpack:///../ckeditor5-engine/src/view/element.js","webpack:///../ckeditor5-utils/src/keyboard.js","webpack:///../ckeditor5-engine/src/model/operation/moveoperation.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayMap.js","webpack:////workspace/ckeditor5/node_modules/css-loader/lib/css-base.js","webpack:////workspace/ckeditor5/node_modules/style-loader/lib/addStyles.js","webpack:///../ckeditor5-utils/src/lib/lodash/_root.js","webpack:///../ckeditor5-utils/src/isiterable.js","webpack:///../ckeditor5-engine/src/view/text.js","webpack:///../ckeditor5-image/src/image/utils.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isIndex.js","webpack:///../ckeditor5-engine/src/view/range.js","webpack:///../ckeditor5-engine/src/model/documentfragment.js","webpack:///../ckeditor5-engine/src/model/operation/operation.js","webpack:///../ckeditor5-engine/src/model/operation/removeoperation.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSlice.js","webpack:///../ckeditor5-engine/src/conversion/buildviewconverter.js","webpack:///../ckeditor5-utils/src/lib/lodash/isObjectLike.js","webpack:///../ckeditor5-utils/src/lib/lodash/extend.js","webpack:///../ckeditor5-utils/src/lib/lodash/isSymbol.js","webpack:///../ckeditor5-engine/src/view/containerelement.js","webpack:///../ckeditor5-engine/src/model/operation/insertoperation.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseUniq.js","webpack:///../ckeditor5-utils/src/keystrokehandler.js","webpack:///../ckeditor5-engine/src/conversion/buildmodelconverter.js","webpack:///../ckeditor5-utils/src/uid.js","webpack:///../ckeditor5-utils/src/lib/lodash/eq.js","webpack:///../ckeditor5-engine/src/model/treewalker.js","webpack:///../ckeditor5-utils/src/comparearrays.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getNative.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isKey.js","webpack:///../ckeditor5-utils/src/lib/lodash/_toKey.js","webpack:///../ckeditor5-engine/src/model/selection.js","webpack:///../ckeditor5-utils/src/dom/global.js","webpack:///../ckeditor5-engine/src/view/observer/observer.js","webpack:///../ckeditor5-utils/src/focustracker.js","webpack:///../ckeditor5-utils/src/first.js","webpack:///../ckeditor5-utils/src/lib/lodash/_assignValue.js","webpack:///../ckeditor5-utils/src/lib/lodash/isFunction.js","webpack:///../ckeditor5-engine/src/model/node.js","webpack:///../ckeditor5-engine/src/model/textproxy.js","webpack:///../ckeditor5-engine/src/view/treewalker.js","webpack:///../ckeditor5-utils/src/lib/lodash/clone.js","webpack:///../ckeditor5-utils/src/lib/lodash/keys.js","webpack:///../ckeditor5-engine/src/conversion/model-to-view-converters.js","webpack:///../ckeditor5-engine/src/model/operation/nooperation.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseDifference.js","webpack:///../ckeditor5-engine/src/view/filler.js","webpack:///../ckeditor5-engine/src/view/observer/domeventobserver.js","webpack:///../ckeditor5-upload/src/filerepository.js","webpack:///../ckeditor5-utils/src/lib/lodash/isPlainObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isHostObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isIterateeCall.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArrayLike.js","webpack:///../ckeditor5-utils/src/lib/lodash/isLength.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isPrototype.js","webpack:///../ckeditor5-engine/src/model/nodelist.js","webpack:///../ckeditor5-engine/src/view/node.js","webpack:///../ckeditor5-utils/src/lib/lodash/_ListCache.js","webpack:///../ckeditor5-utils/src/lib/lodash/_assocIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/_nativeCreate.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getMapData.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayPush.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setToArray.js","webpack:///../ckeditor5-engine/src/view/editableelement.js","webpack:///../ckeditor5-engine/src/view/attributeelement.js","webpack:///../ckeditor5-engine/src/view/uielement.js","webpack:///../ckeditor5-engine/src/model/operation/attributeoperation.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIsEqual.js","webpack:///../ckeditor5-utils/src/lib/lodash/_SetCache.js","webpack:///../ckeditor5-engine/src/model/operation/reinsertoperation.js","webpack:///../ckeditor5-engine/src/model/delta/removedelta.js","webpack:///../ckeditor5-engine/src/model/delta/movedelta.js","webpack:///../ckeditor5-engine/src/model/delta/mergedelta.js","webpack:///../ckeditor5-engine/src/model/delta/splitdelta.js","webpack:///../ckeditor5-engine/src/model/delta/unwrapdelta.js","webpack:///../ckeditor5-engine/src/model/delta/wrapdelta.js","webpack:///../ckeditor5-utils/src/lib/lodash/_castPath.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseWhile.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSortedIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/unzip.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayFilter.js","webpack:///../ckeditor5-utils/src/dom/emittermixin.js","webpack:///../ckeditor5-engine/src/view/selection.js","webpack:///../ckeditor5-ui/src/viewcollection.js","webpack:///../ckeditor5-utils/src/collection.js","webpack:///../ckeditor5-ui/src/focuscycler.js","webpack:///../ckeditor5-paragraph/src/paragraph.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getPrototype.js","webpack:///../ckeditor5-utils/src/lib/lodash/_copyObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseProperty.js","webpack:///../ckeditor5-utils/src/lib/lodash/isArguments.js","webpack:///../ckeditor5-utils/src/lib/lodash/isString.js","webpack:///../ckeditor5-utils/src/tomap.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Stack.js","webpack:///../ckeditor5-utils/src/lib/lodash/_MapCache.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getTag.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneArrayBuffer.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapToArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Symbol.js","webpack:///../ckeditor5-engine/src/view/documentfragment.js","webpack:///../ckeditor5-engine/src/model/delta/attributedelta.js","webpack:///../ckeditor5-engine/src/model/operation/markeroperation.js","webpack:///../ckeditor5-engine/src/model/operation/renameoperation.js","webpack:///../ckeditor5-engine/src/model/operation/rootattributeoperation.js","webpack:///../ckeditor5-engine/src/model/delta/insertdelta.js","webpack:///../ckeditor5-engine/src/model/delta/renamedelta.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayIncludes.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayIncludesWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseUnary.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cacheHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseGet.js","webpack:///../ckeditor5-utils/src/lib/lodash/drop.js","webpack:///../ckeditor5-utils/src/lib/lodash/dropRight.js","webpack:///../ckeditor5-utils/src/lib/lodash/head.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIntersection.js","webpack:///../ckeditor5-utils/src/lib/lodash/_castArrayLikeObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/pullAll.js","webpack:///../ckeditor5-utils/src/lib/lodash/_basePullAll.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSortedIndexBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/unzipWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseXor.js","webpack:///../ckeditor5-engine/src/model/liverange.js","webpack:///../ckeditor5-utils/src/count.js","webpack:///../ckeditor5-engine/src/view/domconverter.js","webpack:///../ckeditor5-engine/src/view/observer/domeventdata.js","webpack:///../ckeditor5-utils/src/dom/isrange.js","webpack:///../ckeditor5-widget/src/utils.js","webpack:///../ckeditor5-ui/src/panel/balloon/contextualballoon.js","webpack:///../ckeditor5-utils/src/lib/lodash/_apply.js","webpack:///../ckeditor5-utils/src/lib/lodash/toNumber.js","webpack:///(webpack)/buildin/harmony-module.js","webpack:///../ckeditor5-utils/src/lib/lodash/_indexKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseTimes.js","webpack:///../ckeditor5-engine/src/conversion/mapper.js","webpack:///../ckeditor5-utils/src/objecttomap.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseClone.js","webpack:///../ckeditor5-utils/src/lib/lodash/isNative.js","webpack:///../ckeditor5-utils/src/lib/lodash/_toSource.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Map.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_copyArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getSymbols.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Set.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Uint8Array.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayReduce.js","webpack:///../ckeditor5-engine/src/view/matcher.js","webpack:///../ckeditor5-engine/src/conversion/modelconversiondispatcher.js","webpack:///../ckeditor5-engine/src/view/emptyelement.js","webpack:///../ckeditor5-engine/src/model/liveposition.js","webpack:///../ckeditor5-utils/src/unicode.js","webpack:///../ckeditor5-utils/src/lib/lodash/_equalArrays.js","webpack:///../ckeditor5-engine/src/model/delta/weakinsertdelta.js","webpack:///../ckeditor5-engine/src/model/delta/transform.js","webpack:///../ckeditor5-utils/src/lib/lodash/chunk.js","webpack:///../ckeditor5-utils/src/lib/lodash/compact.js","webpack:///../ckeditor5-utils/src/lib/lodash/concat.js","webpack:///../ckeditor5-utils/src/lib/lodash/difference.js","webpack:///../ckeditor5-utils/src/lib/lodash/_indexOfNaN.js","webpack:///../ckeditor5-utils/src/lib/lodash/differenceBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isStrictComparable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_matchesStrictComparable.js","webpack:///../ckeditor5-utils/src/lib/lodash/get.js","webpack:///../ckeditor5-utils/src/lib/lodash/identity.js","webpack:///../ckeditor5-utils/src/lib/lodash/differenceWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/dropRightWhile.js","webpack:///../ckeditor5-utils/src/lib/lodash/dropWhile.js","webpack:///../ckeditor5-utils/src/lib/lodash/fill.js","webpack:///../ckeditor5-utils/src/lib/lodash/findIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseFindIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/findLastIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/first.js","webpack:///../ckeditor5-utils/src/lib/lodash/flatten.js","webpack:///../ckeditor5-utils/src/lib/lodash/flattenDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/flattenDepth.js","webpack:///../ckeditor5-utils/src/lib/lodash/fromPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/indexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/initial.js","webpack:///../ckeditor5-utils/src/lib/lodash/intersection.js","webpack:///../ckeditor5-utils/src/lib/lodash/intersectionBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/intersectionWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/join.js","webpack:///../ckeditor5-utils/src/lib/lodash/lastIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/nth.js","webpack:///../ckeditor5-utils/src/lib/lodash/pull.js","webpack:///../ckeditor5-utils/src/lib/lodash/pullAllBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/pullAllWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/pullAt.js","webpack:///../ckeditor5-utils/src/lib/lodash/_basePullAt.js","webpack:///../ckeditor5-utils/src/lib/lodash/remove.js","webpack:///../ckeditor5-utils/src/lib/lodash/reverse.js","webpack:///../ckeditor5-utils/src/lib/lodash/slice.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedIndexBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedLastIndex.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedLastIndexBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedLastIndexOf.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedUniq.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSortedUniq.js","webpack:///../ckeditor5-utils/src/lib/lodash/sortedUniqBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/tail.js","webpack:///../ckeditor5-utils/src/lib/lodash/take.js","webpack:///../ckeditor5-utils/src/lib/lodash/takeRight.js","webpack:///../ckeditor5-utils/src/lib/lodash/takeRightWhile.js","webpack:///../ckeditor5-utils/src/lib/lodash/takeWhile.js","webpack:///../ckeditor5-utils/src/lib/lodash/union.js","webpack:///../ckeditor5-utils/src/lib/lodash/unionBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/unionWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/uniq.js","webpack:///../ckeditor5-utils/src/lib/lodash/uniqBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/uniqWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/without.js","webpack:///../ckeditor5-utils/src/lib/lodash/xor.js","webpack:///../ckeditor5-utils/src/lib/lodash/xorBy.js","webpack:///../ckeditor5-utils/src/lib/lodash/xorWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/zip.js","webpack:///../ckeditor5-utils/src/lib/lodash/zipObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseZipObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/zipObjectDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/zipWith.js","webpack:///../ckeditor5-engine/src/model/documentselection.js","webpack:///../ckeditor5-utils/src/diff.js","webpack:///../ckeditor5-utils/src/dom/getancestors.js","webpack:///../ckeditor5-engine/src/view/rooteditableelement.js","webpack:///../ckeditor5-engine/src/view/observer/mutationobserver.js","webpack:///../ckeditor5-utils/src/lib/lodash/debounce.js","webpack:///../ckeditor5-utils/src/dom/rect.js","webpack:///../ckeditor5-utils/src/lib/lodash/isElement.js","webpack:///../ckeditor5-utils/src/dom/getborderwidths.js","webpack:///../ckeditor5-engine/src/conversion/model-selection-to-view-converters.js","webpack:///../ckeditor5-engine/src/dataprocessor/htmldataprocessor.js","webpack:///../ckeditor5-utils/src/dom/tounit.js","webpack:///../ckeditor5-ui/src/toolbar/toolbarview.js","webpack:///../ckeditor5-typing/src/changebuffer.js","webpack:///../ckeditor5-undo/src/basecommand.js","webpack:///../ckeditor5-basic-styles/src/attributecommand.js","webpack:///../ckeditor5-image/src/image.js","webpack:///../ckeditor5-image/src/image/imageengine.js","webpack:///../ckeditor5-ui/src/bindings/clickoutsidehandler.js","webpack:///../ckeditor5-ui/src/labeledinput/labeledinputview.js","webpack:///../ckeditor5-ui/src/inputtext/inputtextview.js","webpack:///../ckeditor5-ui/src/bindings/submithandler.js","webpack:///../ckeditor5-ui/src/panel/balloon/balloonpanelview.js","webpack:///../ckeditor5-image/src/image/ui/utils.js","webpack:///../ckeditor5-upload/src/imageupload.js","webpack:///../ckeditor5-upload/src/imageuploadengine.js","webpack:///../ckeditor5-upload/src/utils.js","webpack:///../ckeditor5-link/src/linkelement.js","webpack:///../ckeditor5-link/src/findlinkrange.js","webpack:///./src/ckeditor.js","webpack:///../ckeditor5-editor-classic/src/classiceditor.js","webpack:///../ckeditor5-core/src/editor/standardeditor.js","webpack:///../ckeditor5-core/src/editor/editor.js","webpack:///../ckeditor5-utils/src/config.js","webpack:///../ckeditor5-core/src/plugincollection.js","webpack:///../ckeditor5-core/src/commandcollection.js","webpack:///../ckeditor5-utils/src/locale.js","webpack:///../ckeditor5-utils/src/translation-service.js","webpack:///../ckeditor5-engine/src/controller/datacontroller.js","webpack:///../ckeditor5-utils/src/eventinfo.js","webpack:///../ckeditor5-utils/src/spy.js","webpack:///../ckeditor5-utils/src/priorities.js","webpack:///../ckeditor5-utils/src/lib/lodash/assignIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_createAssigner.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getLength.js","webpack:///../ckeditor5-utils/src/lib/lodash/toFinite.js","webpack:///../ckeditor5-utils/src/lib/lodash/keysIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseKeysIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Reflect.js","webpack:///(webpack)/buildin/global.js","webpack:///../ckeditor5-utils/src/lib/lodash/_checkGlobal.js","webpack:///../ckeditor5-utils/src/lib/lodash/_iteratorToArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_listCacheClear.js","webpack:///../ckeditor5-utils/src/lib/lodash/_listCacheDelete.js","webpack:///../ckeditor5-utils/src/lib/lodash/_listCacheGet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_listCacheHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_listCacheSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_stackClear.js","webpack:///../ckeditor5-utils/src/lib/lodash/_stackDelete.js","webpack:///../ckeditor5-utils/src/lib/lodash/_stackGet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_stackHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_stackSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapCacheClear.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Hash.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hashClear.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hashDelete.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hashGet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hashHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hashSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapCacheDelete.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isKeyable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapCacheGet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapCacheHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_mapCacheSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arrayEach.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseAssign.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneBuffer.js","webpack:///../ckeditor5-utils/src/lib/lodash/_copySymbols.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getAllKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseGetAllKeys.js","webpack:///../ckeditor5-utils/src/lib/lodash/_DataView.js","webpack:///../ckeditor5-utils/src/lib/lodash/_Promise.js","webpack:///../ckeditor5-utils/src/lib/lodash/_WeakMap.js","webpack:///../ckeditor5-utils/src/lib/lodash/_initCloneArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_initCloneByTag.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneDataView.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneMap.js","webpack:///../ckeditor5-utils/src/lib/lodash/_addMapEntry.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneRegExp.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/_addSetEntry.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneSymbol.js","webpack:///../ckeditor5-utils/src/lib/lodash/_cloneTypedArray.js","webpack:///../ckeditor5-utils/src/lib/lodash/_initCloneObject.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseCreate.js","webpack:///../ckeditor5-utils/src/lib/lodash/isBuffer.js","webpack:///../ckeditor5-utils/src/lib/lodash/constant.js","webpack:///../ckeditor5-engine/src/view/textproxy.js","webpack:///../ckeditor5-engine/src/conversion/modelconsumable.js","webpack:///../ckeditor5-utils/src/env.js","webpack:///../ckeditor5-engine/src/conversion/viewconversiondispatcher.js","webpack:///../ckeditor5-engine/src/conversion/viewconsumable.js","webpack:///../ckeditor5-engine/src/conversion/view-to-model-converters.js","webpack:///../ckeditor5-engine/src/controller/insertcontent.js","webpack:///../ckeditor5-engine/src/controller/deletecontent.js","webpack:///../ckeditor5-engine/src/controller/modifyselection.js","webpack:///../ckeditor5-engine/src/controller/getselectedcontent.js","webpack:///../ckeditor5-engine/src/model/document.js","webpack:///../ckeditor5-engine/src/model/delta/basic-deltas.js","webpack:///../ckeditor5-engine/src/model/operation/operationfactory.js","webpack:///../ckeditor5-utils/src/lib/lodash/isEqual.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIsEqualDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setCacheAdd.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setCacheHas.js","webpack:///../ckeditor5-utils/src/lib/lodash/_arraySome.js","webpack:///../ckeditor5-utils/src/lib/lodash/_equalByTag.js","webpack:///../ckeditor5-utils/src/lib/lodash/_equalObjects.js","webpack:///../ckeditor5-utils/src/lib/lodash/isTypedArray.js","webpack:///../ckeditor5-engine/src/model/delta/basic-transformations.js","webpack:///../ckeditor5-engine/src/model/operation/transform.js","webpack:///../ckeditor5-utils/src/lib/lodash/array.js","webpack:///../ckeditor5-utils/src/lib/lodash/_isFlattenable.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseMatches.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIsMatch.js","webpack:///../ckeditor5-utils/src/lib/lodash/_getMatchData.js","webpack:///../ckeditor5-utils/src/lib/lodash/toPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/_createToPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseToPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/_setToPairs.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseMatchesProperty.js","webpack:///../ckeditor5-utils/src/lib/lodash/_stringToPath.js","webpack:///../ckeditor5-utils/src/lib/lodash/memoize.js","webpack:///../ckeditor5-utils/src/lib/lodash/toString.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseToString.js","webpack:///../ckeditor5-utils/src/lib/lodash/hasIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseHasIn.js","webpack:///../ckeditor5-utils/src/lib/lodash/_hasPath.js","webpack:///../ckeditor5-utils/src/lib/lodash/property.js","webpack:///../ckeditor5-utils/src/lib/lodash/_basePropertyDeep.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseFill.js","webpack:///../ckeditor5-utils/src/lib/lodash/toLength.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseClamp.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseNth.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseIndexOfWith.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseAt.js","webpack:///../ckeditor5-utils/src/lib/lodash/_parent.js","webpack:///../ckeditor5-utils/src/lib/lodash/_compareAscending.js","webpack:///../ckeditor5-utils/src/lib/lodash/_createSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/noop.js","webpack:///../ckeditor5-utils/src/lib/lodash/_baseSet.js","webpack:///../ckeditor5-utils/src/lib/lodash/array.default.js","webpack:///../ckeditor5-engine/src/model/delta/markerdelta.js","webpack:///../ckeditor5-engine/src/model/rootelement.js","webpack:///../ckeditor5-engine/src/model/history.js","webpack:///../ckeditor5-utils/src/mapsequal.js","webpack:///../ckeditor5-engine/src/model/schema.js","webpack:///../ckeditor5-engine/src/model/markercollection.js","webpack:///../ckeditor5-core/src/editingkeystrokehandler.js","webpack:///../ckeditor5-engine/src/controller/editingcontroller.js","webpack:///../ckeditor5-engine/src/view/document.js","webpack:///../ckeditor5-engine/src/view/renderer.js","webpack:///../ckeditor5-utils/src/dom/insertat.js","webpack:///../ckeditor5-utils/src/dom/remove.js","webpack:///../ckeditor5-utils/src/dom/indexof.js","webpack:///../ckeditor5-utils/src/dom/getcommonancestor.js","webpack:///../ckeditor5-utils/src/lib/lodash/isEqualWith.js","webpack:///../ckeditor5-engine/src/view/observer/selectionobserver.js","webpack:///../ckeditor5-utils/src/lib/lodash/now.js","webpack:///../ckeditor5-engine/src/view/observer/focusobserver.js","webpack:///../ckeditor5-engine/src/view/observer/keyobserver.js","webpack:///../ckeditor5-engine/src/view/observer/fakeselectionobserver.js","webpack:///../ckeditor5-utils/src/dom/scroll.js","webpack:///../ckeditor5-utils/src/dom/iswindow.js","webpack:///../ckeditor5-engine/src/conversion/view-selection-to-model-converters.js","webpack:///../ckeditor5-utils/src/dom/getdatafromelement.js","webpack:///../ckeditor5-utils/src/dom/setdatainelement.js","webpack:///../ckeditor5-engine/src/dataprocessor/basichtmlwriter.js","webpack:///../ckeditor5-editor-classic/src/classiceditorui.js","webpack:///../ckeditor5-ui/src/componentfactory.js","webpack:///../ckeditor5-ui/src/toolbar/enabletoolbarkeyboardfocus.js","webpack:///../ckeditor5-ui/src/toolbar/normalizetoolbarconfig.js","webpack:///../ckeditor5-editor-classic/src/classiceditoruiview.js","webpack:///../ckeditor5-ui/src/editorui/boxed/boxededitoruiview.js","webpack:///../ckeditor5-ui/src/editorui/editoruiview.js","webpack:///../ckeditor5-utils/src/lib/lodash/cloneDeepWith.js","webpack:///../ckeditor5-ui/src/editableui/inline/inlineeditableuiview.js","webpack:///../ckeditor5-ui/src/editableui/editableuiview.js","webpack:///../ckeditor5-ui/src/panel/sticky/stickypanelview.js","webpack:///../ckeditor5-ui/src/toolbar/toolbarseparatorview.js","webpack:///../ckeditor5-ui/src/bindings/preventdefault.js","webpack:///../ckeditor5-utils/src/elementreplacer.js","webpack:///../ckeditor5-editor-classic/theme/theme.scss?651f","webpack:///../ckeditor5-editor-classic/theme/theme.scss","webpack:////workspace/ckeditor5/node_modules/style-loader/lib/urls.js","webpack:///../ckeditor5-essentials/src/essentials.js","webpack:///../ckeditor5-clipboard/src/clipboard.js","webpack:///../ckeditor5-clipboard/src/clipboardobserver.js","webpack:///../ckeditor5-clipboard/src/datatransfer.js","webpack:///../ckeditor5-clipboard/src/utils/plaintexttohtml.js","webpack:///../ckeditor5-clipboard/src/utils/normalizeclipboarddata.js","webpack:///../ckeditor5-clipboard/src/utils/viewtoplaintext.js","webpack:///../ckeditor5-enter/src/enter.js","webpack:///../ckeditor5-enter/src/entercommand.js","webpack:///../ckeditor5-enter/src/enterobserver.js","webpack:///../ckeditor5-typing/src/typing.js","webpack:///../ckeditor5-typing/src/input.js","webpack:///../ckeditor5-utils/src/difftochanges.js","webpack:///../ckeditor5-typing/src/inputcommand.js","webpack:///../ckeditor5-typing/src/delete.js","webpack:///../ckeditor5-typing/src/deletecommand.js","webpack:///../ckeditor5-typing/src/deleteobserver.js","webpack:///../ckeditor5-undo/src/undo.js","webpack:///../ckeditor5-undo/src/undoengine.js","webpack:///../ckeditor5-undo/src/undocommand.js","webpack:///../ckeditor5-undo/src/redocommand.js","webpack:///../ckeditor5-ui/src/icon/iconview.js","webpack:///../ckeditor5-ui/src/tooltip/tooltipview.js","webpack:///../ckeditor5-undo/theme/icons/undo.svg","webpack:///../ckeditor5-undo/theme/icons/redo.svg","webpack:///../ckeditor5-adapter-ckfinder/src/uploadadapter.js","webpack:///../ckeditor5-upload/src/filereader.js","webpack:///../ckeditor5-adapter-ckfinder/src/utils.js","webpack:///../ckeditor5-autoformat/src/autoformat.js","webpack:///../ckeditor5-autoformat/src/blockautoformatengine.js","webpack:///../ckeditor5-autoformat/src/inlineautoformatengine.js","webpack:///../ckeditor5-basic-styles/src/bold.js","webpack:///../ckeditor5-basic-styles/src/boldengine.js","webpack:///../ckeditor5-basic-styles/theme/icons/bold.svg","webpack:///../ckeditor5-basic-styles/src/italic.js","webpack:///../ckeditor5-basic-styles/src/italicengine.js","webpack:///../ckeditor5-basic-styles/theme/icons/italic.svg","webpack:///../ckeditor5-block-quote/src/blockquote.js","webpack:///../ckeditor5-block-quote/src/blockquoteengine.js","webpack:///../ckeditor5-block-quote/src/blockquotecommand.js","webpack:///../ckeditor5-core/theme/icons/quote.svg","webpack:///../ckeditor5-block-quote/theme/theme.scss?df4a","webpack:///../ckeditor5-block-quote/theme/theme.scss","webpack:///../ckeditor5-easy-image/src/easyimage.js","webpack:///../ckeditor5-easy-image/src/cloudservicesuploadadapter.js","webpack:////workspace/ckeditor5/node_modules/@ckeditor/ckeditor-cloudservices-core/src/uploadgateway/uploadgateway.js","webpack:////workspace/ckeditor5/node_modules/@ckeditor/ckeditor-cloudservices-core/src/uploadgateway/fileuploader.js","webpack:///../ckeditor5-image/src/image/converters.js","webpack:///../ckeditor5-widget/src/highlightstack.js","webpack:///../ckeditor5-widget/src/widget.js","webpack:///../ckeditor5-engine/src/view/observer/mouseobserver.js","webpack:///../ckeditor5-widget/theme/theme.scss?451e","webpack:///../ckeditor5-widget/theme/theme.scss","webpack:///../ckeditor5-image/src/imagetextalternative.js","webpack:///../ckeditor5-image/src/imagetextalternative/imagetextalternativeengine.js","webpack:///../ckeditor5-image/src/imagetextalternative/imagetextalternativecommand.js","webpack:///../ckeditor5-image/src/imagetextalternative/ui/textalternativeformview.js","webpack:///../ckeditor5-ui/src/label/labelview.js","webpack:///../ckeditor5-utils/src/dom/position.js","webpack:///../ckeditor5-utils/src/dom/getpositionedancestor.js","webpack:///../ckeditor5-core/theme/icons/low-vision.svg","webpack:///../ckeditor5-image/theme/imagetextalternative/theme.scss?8aba","webpack:///../ckeditor5-image/theme/imagetextalternative/theme.scss","webpack:///../ckeditor5-image/theme/theme.scss?490e","webpack:///../ckeditor5-image/theme/theme.scss","webpack:///../ckeditor5-upload/src/imageuploadbutton.js","webpack:///../ckeditor5-upload/src/imageuploadcommand.js","webpack:///../ckeditor5-ui/src/notification/notification.js","webpack:///../ckeditor5-upload/src/ui/filedialogbuttonview.js","webpack:///../ckeditor5-core/theme/icons/image.svg","webpack:///../ckeditor5-upload/src/imageuploadprogress.js","webpack:///../ckeditor5-upload/theme/icons/image_placeholder.svg","webpack:///../ckeditor5-upload/theme/imageuploadprogress.scss?ba59","webpack:///../ckeditor5-upload/theme/imageuploadprogress.scss","webpack:///../ckeditor5-heading/src/heading.js","webpack:///../ckeditor5-paragraph/src/paragraphcommand.js","webpack:///../ckeditor5-heading/src/headingengine.js","webpack:///../ckeditor5-heading/src/headingcommand.js","webpack:///../ckeditor5-ui/src/model.js","webpack:///../ckeditor5-ui/src/dropdown/list/createlistdropdown.js","webpack:///../ckeditor5-ui/src/list/listview.js","webpack:///../ckeditor5-ui/src/list/listitemview.js","webpack:///../ckeditor5-ui/src/dropdown/createdropdown.js","webpack:///../ckeditor5-ui/src/dropdown/dropdownview.js","webpack:///../ckeditor5-ui/src/dropdown/dropdownpanelview.js","webpack:///../ckeditor5-heading/theme/theme.scss?f3a2","webpack:///../ckeditor5-heading/theme/theme.scss","webpack:///../ckeditor5-image/src/imagecaption.js","webpack:///../ckeditor5-image/src/imagecaption/imagecaptionengine.js","webpack:///../ckeditor5-image/src/imagecaption/utils.js","webpack:///../ckeditor5-engine/src/view/placeholder.js","webpack:///../ckeditor5-engine/theme/placeholder.scss?9710","webpack:///../ckeditor5-engine/theme/placeholder.scss","webpack:///../ckeditor5-image/theme/imagecaption/theme.scss?3012","webpack:///../ckeditor5-image/theme/imagecaption/theme.scss","webpack:///../ckeditor5-image/src/imagestyle.js","webpack:///../ckeditor5-image/src/imagestyle/imagestyleengine.js","webpack:///../ckeditor5-image/src/imagestyle/imagestylecommand.js","webpack:///../ckeditor5-image/src/imagestyle/converters.js","webpack:///../ckeditor5-core/theme/icons/object-full-width.svg","webpack:///../ckeditor5-core/theme/icons/object-left.svg","webpack:///../ckeditor5-core/theme/icons/object-center.svg","webpack:///../ckeditor5-core/theme/icons/object-right.svg","webpack:///../ckeditor5-image/src/imagetoolbar.js","webpack:///../ckeditor5-link/src/link.js","webpack:///../ckeditor5-engine/src/view/observer/clickobserver.js","webpack:///../ckeditor5-link/src/linkengine.js","webpack:///../ckeditor5-link/src/linkcommand.js","webpack:///../ckeditor5-link/src/unlinkcommand.js","webpack:///../ckeditor5-link/src/ui/linkformview.js","webpack:///../ckeditor5-link/theme/icons/link.svg","webpack:///../ckeditor5-link/theme/theme.scss?9387","webpack:///../ckeditor5-link/theme/theme.scss","webpack:///../ckeditor5-list/src/list.js","webpack:///../ckeditor5-list/src/listengine.js","webpack:///../ckeditor5-list/src/listcommand.js","webpack:///../ckeditor5-list/src/indentcommand.js","webpack:///../ckeditor5-list/src/converters.js","webpack:///../ckeditor5-list/src/viewlistitemelement.js","webpack:///../ckeditor5-list/theme/icons/numberedlist.svg","webpack:///../ckeditor5-list/theme/icons/bulletedlist.svg"],"names":[],"mappings":";;;;AAAA,cACA,2BACA,uCACA,sCACA,IACA,aACA,+CAEA,oBACA,GAAC,gCC6hBD,sCCrgBA,eFvBA,kBGTA,cAMA,IACA,iBAGA,mBACA,CACA,IACA,KAIA,2CAGA,aAGA,OACA,OAIA,IAzBA,eA4BA,MAGA,uBACA,GACA,kCACA,CACA,gBACA,cAGA,OAGA,iBACA,YACA,qBAA2B,UAA0B,UACrD,YAAiC,CAAe,QAChD,EAEA,aADA,QAIA,mBAAsD,wCAA+D,SAGrH,MAGA,8BC7DA,aA6EA,aACA,iBAMA,wBAAiC,gBAAuB,QACxD,QA1EA,MACA,KACA,GAWA,sGACA,qBAaA,iBACA,GAGA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ACrC,SAEA,iBAAuB,MAAmB,WAC1C,SAEA,gDACA,wBAEA,EACA,CAEA,CACA,QAQA,oBACA,0CACA,IAaA,2CACA,IACA,wBACG,0CACH,WAGA,gCACA,GACA,iBACA,gEACA,MAWA,mCAEA,sBACA,iBAIA,qDAKA,oBAWA,kBACA,yDACA,iCACA,eACA,WACA,oBAEA,iBAEA,2CAEA,0CACA,WAMA,CACA,qDACA,+BACA,mBACA,YACA,oBAOA,8CAEA,iBAGA,uCACA,WAEA,aACA,4BACA,CAqCA,0CACA,YAKA,0BACA,YACA,SACA,QACA,gFAGG,mBACH,2BAEA,yBACA,SAEA,sCACA,8CAEA,kCACA,GACA,CAYA,6BACA,qBACA,oBAEA,0CACA,SAEA,IAEA,qBAEA,wBACA,uBAEA,kBAEA,mBAEA,cACA,iBACA,wCAEG,gCAEH,gBACA,WACA,eAIA,2CAGA,+BAaA,4CAPA,uBACA,6BACA,8BAIA,YAWA,uCACA,MACA,SAEA,4CACA,UAWA,4CACA,WACA,UACA,mCAEA,+BAQA,0BACA,2BACA,IASA,mBACA,iDACA,UAQA,mBACA,8DACA,WAUA,8BACA,aACA,oBAEA,4BACA,WAiBA,2BACA,IAOA,2BACG,sFACH,0CAMA,cAGA,UACA,mCAIA,aAKA,gCAIA,iBAA6B,EAAQ,yBAErC,OADA,wCAUA,mBAA6B,MAAmB,6BAEhD,KADA,sCAQA,KACA,QASA,qBACA,wDACA,OACA,uBC30BA,aA+BA,IACA,gBACA,gBACA,6CACA,uCACA,aAIA,2BACA,gCAEA,sCACA,eACA,EACA,kCCqQA,aAEA,OACA,uBAGA,iBACA,YAIA,WACA,YACA,2BAEA,oCAlUA,QAmBA,IACA,mBASA,mBACA,CAOA,cAQA,yBAGA,4BAEA,IAQA,iBACA,uBACA,MAQA,gBACA,uBACA,SAQA,cACA,OACA,oBAqBA,aAEA,gCAIA,2BAFA,IAUA,YACA,uBACA,UAOA,cACA,8BACA,WAQA,iBACA,uBACA,eAUA,uBACA,uBACA,qBASA,YACA,4DAEA,iCACA,kBAmBA,iBACA,uBACA,gBAOA,kBACA,0BACA,aASA,oBACA,GAEA,cAEA,QACA,mBAGA,kBAGA,oBACA,gBAUA,sBACA,wBAEA,0BACA,iBAGA,KACA,QAaA,iBACA,OAEA,cACA,uBAGA,kBACA,QAOA,SACA,eAEA,wBAEA,6BACA,GAEA,gCACA,4BAEA,SAEA,CACA,QASA,mBACA,OAEA,mBACA,CAEA,sBACA,WAEA,cAGA,wBAGA,YAEA,uBACA,aACA,EAKY,oCCwnBZ,aAYA,gBACA,YAGA,aACA,cACE,WAKF,gBAQY,CACZ,eACA,cAEA,KACA,iBAMA,cAOgG,CAChG,eAAiD,CAAO,QACxD,OAMA,wBACA,iBAEA,cAGA,IACA,OAEA,WAEA,MAOa,CACb,aACA,OACA,OACA,GACA,aAEA,UACA,eACA,EAEA,EASa,CACb,iBACA,OACA,OACA,GACA,qBAEA,UACA,GACA,sBAEA,EAQa,CACb,eACA,OACA,OACA,GACA,UAEA,UACA,YACA,IAEA,EAKa,CACb,aACA,4BAYA,oCACA,MAEA,QAEA,GACA,QAWmD,CACnD,aACA,IACA,qBACE,OACF,MAGA,OACA,0BAGA,aAGA,YACA,GACA,gBAGA,uBAEA,UACA,gBACA,kBAEA,gCACA,eACA,OAEA,aAMA,YACA,UAEA,CACA,QAsBkB,CAClB,aACA,UACA,aACA,kCAGA,QAEA,MAmBoB,CACpB,aACA,UACA,QAGA,OACA,QAWmD,CACnD,aACA,OACA,MAEA,IAgBiD,CACjD,aACA,iBACA,kBAEA,MAiBkB,CAClB,eACA,eACA,cAEA,MAOa,CACb,eACA,OAEE,QAGF,OAAY,IAAU,KAEtB,EAea,CACb,eACA,UACA,QACA,kBAEA,WAGA,IAMiD,CACjD,eACA,MACA,gBACA,eAGA,gCAGA,eACA,oBACA,mBAGA,wCAGA,mBACA,uBAGA,oCACA,kCAMA,gBACA,KAIA,6GAEA,mBACA,0BAEA,OACA,CAMa,CACb,aACA,WACA,KAKa,CACb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A,cACA,oEAEA,uBACA,UAQA,WACA,oBACA,IAQA,sBACA,YAEA,0BACA,YACA,WAEA,kBAIA,MACA,QAQA,gBACA,8BAEA,UACA,SAGA,oBADA,KAmBA,2BAA4C,KAC5C,iBAEA,gBACA,iBAEA,UACA,QAOA,eACA,uBACA,0BAEA,iCAAqC,CAErC,gBASA,qBACA,cACA,mBAEA,qBAEA,mBACA,MAGA,yBACA,EAQA,WACA,8CACA,MAYA,YACA,OACA,6BAYA,WACA,OACA,4BASA,eACA,SACA,iBAIA,0BACA,8CAIA,qBACA,mBAGA,wBAEA,aAEA,GACA,cAEA,SAEA,gBACA,oBACA,EAEA,UACA,uBACA,EAEA,MACA,YAIA,WACA,WACA,SAGA,sBACA,uBAEA,2BACA,OAAG,iBACH,mBAEA,2BACA,OAEA,mBAGA,0BACA,OAoBA,qBACA,IACA,2BACG,0BACH,MAEA,QACA,wCACI,mBACJ,wBACI,mBACJ,uBAEA,qBAGA,SACA,WACA,CAQA,sBAEA,SACA,2DAGA,cAOA,uFAAgG,CAGhG,uCACA,EAQA,uBAEA,SACA,uCAGA,oBAOA,yFAAkG,CAGlG,iCACA,MAQA,6BACA,4BACA,OACA,EAOA,oCChWA,eACA,GAGA,4CACA,OAGA,OACA,eAIA,eAGA,4BACA,QAEA,mBACA,gBAQA,CACA,aACA,OAMA,gBAIA,iIAGA,WACA,WAGA,gEAIA,OAGA,mBADA,QASA,CAuEA,aACA,MAEA,kBACA,WAIA,eAAiB,MAAkB,OACnC,OACA,qCACG,6BACH,mCACG,4DACH,mBACA,QAEG,2BACH,aAMA,gBAAiB,MAAuB,WACxC,SACA,WAEA,uCAEA,gDACA,kBAEA,IAEA,CACA,QAYA,CACA,eACA,sBACA,OAGA,wDAEA,iCAGA,sCAGA,sBACA,IACA,CASA,CACA,aACA,WACA,aAEA,YACA,oBACA,gBAEA,yBAEA,wCACA,8CAEA,oCACA,MACA,CAUA,CACA,eACA,WACA,oBAEA,iCACA,4BACA,IAGA,WACA,MAEA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0CACA,6BAUA,oCACA,IAQA,iBACA,uBACA,MAQA,cACA,OACA,0BAWA,aAEA,gCAIA,2BAFA,IAWA,YACA,MAEA,MACA,yBACA,uBAKA,sDAIA,UAYA,+BAXA,iCAGA,0CAKA,0CAEA,iBAWA,kBACA,iCACA,aAQA,YACA,aACA,YAQA,iBACA,uBACA,UAOA,cACA,8BACA,WAOA,oBACA,CACA,4BAGA,SACA,2BAKA,oCACA,OAEA,OAUA,iBACA,mBAEA,UACA,uDAGA,WACA,sDAEA,UAQA,gBACA,IACA,iBACA,8CAMA,0BACA,wBACA,OAEA,yBACA,WAAuB,IAAc,KAGrC,IACA,QAEA,CACA,MAEA,oBACA,MAQA,gBACA,OACA,WAGA,qBACA,WAGA,gCACA,MASA,kBACA,+BAEA,MACA,kBACG,YACH,kBAEA,uBAEA,QAWA,oBACA,6BACA,YAEA,IAEA,cAEA,QACA,mBAGA,kBAEA,6BACA,KACA,IAGA,IACA,QASA,mBACA,sCAGA,MACA,cACA,sCASA,YACA,cACA,oCASA,wBACA,SAUA,sBACA,6BAEA,aAAsB,OAAqB,IAC3C,6BAGA,2BACA,WAUA,aACA,MACA,gBAIA,YACA,SAIA,yBACA,KAIA,8EACA,oCACA,KAIA,+BACA,qCACA,WAKA,6BACA,wBACA,OAKA,+BACA,wCACA,WAIA,SACA,QAWA,eACA,+BACA,mCACA,OAWA,kBACA,+BACA,mCACA,UAWA,eACA,UACA,0BACA,OAIA,SACA,QAOA,gBACA,sBACA,MAeA,cACA,kCAEA,qBACA,gBAEA,iBACA,2BAEA,KACA,mBAEA,QASA,YACA,qBACA,MAOA,gBACA,qBACA,MAWA,eACA,UACA,yBACA,OAIA,SACA,QAWA,kBACA,+BACA,kCACA,UAWA,mBACA,iBACA,qBAEA,UACA,MACA,SAGA,aACA,MAEA,OACA,KASA,uBACA,wBACA,QAQA,qBACA,+BACA,MAQA,wBACA,+BACA,SAQA,uBACA,8BACA,SAyBA,cACA,+CACA,yCAAyD,OAAY,QAAS,gBAC9E,wCAA4D,OAAa,SAAS,iBAElF,iBACA,eAAqC,YACrC,eAAoC,YACpC,eAAiC,KACjC,GAQA,EAMkB,oCCjrBlB,aACA,IAEA,MACA,uBAaA,wBACA,qBACA,uBAGA,iBAhBA,eAOA,2DAAwE,CAGxE,QAOA,QAmBA,CAyEA,aACA,gBACA,WA8BA,WAxGA,WACA,OACA,uBAGA,MACA,8BACA,0BACA,EAQA,MACA,WACA,SAEA,gBACA,KACA,2CAKA,eA3GA,OAyBA,KACA,QAmFA,UACA,SACA,WACA,WACA,cACA,aACA,aACA,SACA,SACA,SACA,OACA,OAIA,OAGA,YACA,cACA,YAIA,mBAAqB,GAAY,UACjC,gBAEA,oBACA,gBAGA,WAAqB,GAAY,MACjC,QAIA,gBAAsB,IAAa,OACnC,aAGA,QACA,SA5HA,GAUA,yECpCA,QAqBA,IACA,mBAWA,qBACA,CAOA,iCAOA,2BAOA,kCAUA,2BACA,WAKA,WACA,OACA,MAOA,QACA,wFACA,aAGA,uBADA,UAiBA,qBACA,+EACA,QAOA,cACA,iFAEA,0FACA,GAGA,uBADA,UAMA,WACA,6BACA,6BACA,6BACA,6BAKA,cAMA,YACA,KAEG,4GAMH,mBACA,KAEG,iHAMH,iBACA,KAEG,wJACH,qGACA,yCAEA,wEAMA,iBACA,KAGA,sGAGA,wFAEA,sBACA,qBACA,eAEA,QAKA,uBACA,OACA,sCASA,qBACA,wBACA,mCAEA,6CAEA,aAKA,SAJA,aAGA,cAEA,uBCzMA,iBACA,aACA,YACA,MACA,SAEA,SACA,cAEA,UACA,QAEA,cChBA,CA6CA,eACA,aACA,OACA,MACA,GAGA,uCACA,OACA,gCACA,uCACA,KAEA,wCACA,KAEA,gBACA,KAEA,CACA,aAEA,6CACA,8BAEA,kEACA,MAtEA,qBACA,IAGA,MAsCA,4BArCA,4BACA,OACA,gBACA,kBAAmC,MAInC,KAAG,QACH,GAGA,mBACA,CACA,gCACA,aACA,QAAgB,WAAiB,OACjC,cACA,GACA,qBAEA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AGA,8BAIA,gCAGA,QAwBA,mBACA,2BAGA,YACA,aAEA,mCAGA,aAGA,+BAGA,WAGA,KACA,UAGA,OACA,KAWA,WAAwB,KACxB,qBAEA,QACA,OAQA,oBACA,0CACA,IAgBA,WAAyB,KACzB,cACA,OAEA,+BAEA,iBACA,gBAEA,IAeA,eAA6B,KAC7B,cAEA,gBAEA,gBAEA,kBACA,gBAEA,YAQA,kBACA,uDACA,MAWA,4CACA,WACA,SACA,aAEA,UAQA,0BACA,2BACA,IAUA,uCACA,MACA,SAEA,4CACA,UASA,mBACA,iDACA,WAQA,mBACA,4DACA,EAUA,8BACA,aACA,oBAEA,4BACA,WACA,EAEA,oCCrJA,aAEA,OACA,uBAGA,iBACA,YAIA,WACA,YACA,2BAEA,mCArUA,QAqBA,IACA,OAOA,eAQA,iBAQA,uBAGA,4BAEA,IAOA,oBACA,aACA,aAQA,iBACA,uBACA,MAQA,gBACA,uBACA,SAQA,cACA,OACA,oBAQA,WACA,OACA,KAQA,aACA,OACA,KAUA,MACA,OACA,qBAQA,YACA,uBACA,UAOA,cACA,8BACA,WAQA,iBACA,uBACA,eAUA,uBACA,uBACA,qBAOA,UACA,CACA,QAaA,iBACA,OAEA,cACA,uBAGA,kBACA,QAqBA,iBACA,uBACA,gBAOA,kBACA,0BACA,aASA,oBACA,GAEA,cAEA,QACA,mBAGA,kBAGA,oBACA,gBAUA,sBACA,wBAEA,0BACA,iBAGA,KACA,QAQA,SACA,MAEA,0BACA,mBAGA,UACA,QASA,mBACA,MAEA,eACA,UAEA,gBAGA,wBAIA,mBACA,SACA,EAKY,uBCrTZ,qBAeA,IACA,OAKA,eASA,MA8CA,aAQA,SACA,qBAEA,SAMA,sCAHA,mBAEA,OAQA,uBACA,OACA,kCASA,mBACA,mBACA,YACA,8CClHA,QAcA,IACA,mBAIA,WACA,OACA,QAOA,cACA,iFAEA,kFACA,EAKA,uBACA,OACA,wCACA,uBChCA,iBACA,eACA,QACA,MAEA,OACA,eAEA,OACA,QACA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uBACA,sBACA,UAEA,wCCzBA,QASA,WACA,+BACA,QAEA,iBACA,0BANA,GAOA,MAEA,gCCwvBA,eACA,UAIA,WAIA,yDACA,OAGA,CACA,eACA,+BAAkD,gBAClD,+BAIA,QAGA,wBADA,qEAlyBA,SAuBA,IACA,OAQA,iBAOA,MAQA,2BAQA,0BAGA,aAEA,cAcA,aACA,0BACA,0CAEA,0CACA,KAEA,OACA,KAWA,YACA,0BACA,0CAEA,4CACA,GAEA,OACA,KASA,kBACA,sBAEA,eACA,wBAIA,WAOA,iBACA,qBACA,MAQA,iBACA,+BACA,kBASA,WACA,uBACA,WACG,YACH,oBAGA,kEACA,OAGA,qCACA,IAEA,uBACA,wBACA,CACA,KACA,KAGA,IACA,GAEA,QAEA,CACA,QAOA,aACA,qBACA,kBAEA,kBAYA,gBACA,OAEA,yBACA,gCACA,UAIA,qCACA,IAYA,eACA,OAEA,yBACA,6BACA,QAIA,qCACA,IAWA,mBACA,cAEA,yDACA,IAWA,kBACA,cAEA,sDACA,IAkBA,iBACA,MACA,uCAEA,4BAA8B,CAC9B,iBAOA,kBACA,CACA,6BACA,4CAA+B,CAE/B,kBAaA,kBACA,SAGA,4BACA,kBACA,oBAGA,wHACA,QAEA,WAGA,8BAIA,gBAEA,4BACA,aAGA,uCAEA,4BAA8B,CAC9B,kBAUA,SACA,CACA,8CACG,wBACH,oBACG,YAEH,aAGA,gCAEA,SAOA,SACA,qBACA,aAOA,SACA,qBACA,aAYA,oBACA,aACA,mBAEA,yBACA,IASA,kBACA,cAEA,mBACA,6BAEA,WASA,gBACA,cAEA,kBACA,6BAEA,WAYA,iBACA,IAMA,4BACA,KAIA,sHAEA,iBAIA,gDAEA,oBACA,aAGA,YACA,4CAEA,+BAEA,WAQA,gBACA,oBACA,MAUA,gBACA,oBACA,SAOA,mBACA,oBACA,MAQA,gBACA,oBACA,MAUA,kBACA,uBACA,gCACA,oBAEA,qCAAmC,iBACnC,iBACA,CAWA,mBACA,MACA,8BAEA,uCAAmC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EA,kDACA,IAQA,sBACA,cAEA,kDACA,IASA,WACA,OAEA,YACA,YAGA,OACA,QASA,eAEA,mBACA,KAIA,yBACA,IAOA,QACA,mBACA,OAkBA,UACA,MACA,gBAEA,OACA,oBACA,iBAGA,OACA,QAWA,gBAA0B,gBAAyC,gBACnE,MACA,wCAGA,iCACA,kBAGA,OACA,QAYA,qBAAsC,KACtC,cACA,oBAEA,sBAEA,mBACA,MAGA,yBACA,EAKA,SACA,iCACA,MAQA,gBACA,oBACA,MAQA,gBACA,oBACA,MAUA,gBACA,oBACA,SAOA,mBACA,oBACA,MAQA,kBACA,aACA,QAOA,mBACA,oBACA,OAQA,mBACA,oBACA,SAKA,kBACA,aACA,OAOA,SACA,MAEA,MAKA,mBAJA,6BAGA,UAsBA,EAQA,uBC1ZA,qBAuCA,GACA,OAWA,mBAOA,SAEA,oBAMA,yBAGA,4FAMA,yBASA,+FAQA,UACA,cASA,kBACA,yCACA,gDASA,iBACA,kBACA,MASA,gBACA,gCACA,qCAaA,gBACA,wCACA,UAQA,aACA,sBACA,MAQA,WACA,sBACA,IASA,eACA,sBACA,QAUA,MACA,OACA,cAQA,UACA,uBAEA,UAKA,MAJA,kCAGA,eAYA,gBAA0B,gBAAyC,gBACnE,MACA,wCAGA,iCACA,kBAGA,OACA,QAQA,gBACA,sBACA,eAQA,gBACA,sBACA,eAUA,gBACA,sBACA,eAOA,mBACA,sBACA,kBACA,uECvQA,QAiBA,GACA,OAmBA,aAA0B,KAC1B,sBAMA,4BAGA,2IACA,iCACA,KACA,uFAAK,aAeL,0CASA,qBACA,uCAEA,iFASA,sCASA,oCASA,kCAUA,kCAQA,wFAQA,wEACA,IAKA,oBACA,OACA,KAcA,QACA,SAEA,EACA,UAEA,UAAM,QAAc,cACjB,kBAGH,eAEA,WAQA,OACA,OACA,+BAEA,aAEA,WAUA,QACA,mCACA,uBACA,aAGA,wCACA,iBAAW,CAIX,uEACA,aAAW,CAIX,YAGA,uBACA,MAEA,iCAEA,oBAGA,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A,kBACA,OAEA,iBACA,UACA,cAEA,cACA,eAEA,WACA,eAGA,UAIA,gBACA,gBAKA,0BAKA,uBACA,wBACA,QAIA,iBAEA,qCAEA,YACA,2CAEA,SACA,CAiCA,MACA,WACA,sBAA+D,SAE/D,oBACA,yBAIA,aAAS,OAAa,iCAEtB,mDACA,kBACA,CAkCA,MACA,WACA,sBAA+D,CAE/D,oBACA,yBAIA,aAAS,CAAM,+BAEf,mDACA,mBACA,CA4BA,MACA,WACA,kBACA,qBACA,OACA,cAEA,4BACA,GAGA,gCACA,OAGA,oCAKA,0DACA,aACA,+BACA,WAEA,KACA,SACA,CAuBA,MACA,WACA,kBACA,qBACA,OACA,cAEA,yBAIA,2BAIA,uCAEA,WACA,YACA,CAQA,MACA,UACA,kBACA,sBACA,UAQA,uCACA,gBAEA,eAOA,uDAEA,4CACA,8BAGA,0BACG,eAGH,oBACA,iBACA,SAGA,cAeA,cACA,kEAEA,KACA,CASA,MACA,WACA,kBACA,SACA,qBAGA,eAEA,4CAIA,4BAIA,SACA,YAGA,oBACA,8BAEA,OACA,sCAEA,cAEA,YACA,CAiBA,MACA,WACA,kBACA,SACA,qBAGA,eAEA,4CAIA,4BAIA,SACA,sBAGA,MACA,YAGA,6BACA,mBACA,qDAEA,+CAEA,oBAGA,yBACA,+BAGA,QACA,yBACA,EACA,CASA,MACA,WACA,kBACA,OAEA,iBACA,UACA,cAEA,cACA,eAEA,WACA,eAGA,UAIA,gBACA,gBAGA,0BAKA,uBACA,wBACA,QAIA,wBAGA,2BAGA,mBACA,0BAEA,kBACA,CAOA,sEAljBA,QAgDA,GAikBA,mBACA,aACA,cACA,2FAIA,wBA+BA,oBCvpBA,qBAoBA,IACA,mBACA,WACA,OACA,MAOA,QACA,mBACA,YAOA,cACA,+BACA,EAKA,WACA,CACA,QAKA,uBACA,OACA,oCACA,yFCjDA,SAaA,iBACA,QACA,IACA,IACA,SACA,OACA,SAEA,UACA,GAGA,oCAGA,eACA,IAEA,QACA,QApBA,QAqBA,IACA,UAEA,SACA,kBACA,OACA,SAEA,uBACA,WACA,QACA,KACA,QACA,iBAGA,SACA,OACA,KACA,aAEA,OACA,CACA,QAEA,gCCmBA,aACA,yCACA,QAUA,CA0DA,eACA,6BACA,+CAEA,6DACA,yBACA,iCAEA,kBACA,mBAEA,EACA,CACA,4CAtEA,WACA,0BACA,IAWA,MACA,WACA,OACA,aAEA,WAEA,IAEA,MAaA,aACA,SAGA,6BACA,YAGA,YACA,cAOA,EArJA,IAsJA,WACA,MACA,YAEA,UA9GA,IAcA,SAbA,yBACA,MAGA,iBADA,cACA,EAaA,0BAJA,QAKA,UAIA,MACA,SAEA,UAAgB,EAA0B,IAC1C,OAaA,SAqCA,WAWA,+CCpIA,QAmCA,KACA,mBAqBA,eACA,CAQA,cACA,aAKA,WACA,qEAEA,4BACA,0BACA,MACA,gBAEA,aAAI,EAAG,iBACP,YACA,EAWA,YACA,MACA,6CAEA,cACA,4FClGA,SAmCA,IACA,mBAIA,wBACA,OACA,gBAKA,OAMA,iBAqBA,yBAaA,0BASA,yEACA,mBAEA,EAUA,aACA,qBACA,aACA,QAIA,eACA,KAUA,gBACA,UA+BA,+BAEA,6DAGA,aACA,SA2BA,uBAzBA,8BAEA,kCACA,OAEA,sBACA,aAGA,cACA,UAEA,iCACA,OAEA,sBACA,UACA,mBAIA,kBACA,aAEA,IASA,iBACA,+BAEA,eAEA,wBACA,SACA,QAEA,cAKA,KACA,OAOA,iBAOA,gBAQA,YAQA,YAQA,2BA2BA,uBASA,4BASA,0BASA,yEACA,mBAUA,6BACA,KAuBA,OACA,IACA,kCAGA,mHAEA,iCACA,WACA,kBAIA,sBACA,IACA,gCACA,UAGA,4BACA,qBACA,KACA,EAsBA,SACA,IACA,kCAGA,uHAEA,0BACA,cACA,WACA,6BAIA,sBACA,IACA,6BAGA,UAEA,kBADA,SAEA,EAKA,QACA,cACA,mBAEA,UACA,2BAGA,sCACA,qBAGA,aACA,UAOA,WACA,MACA,oBACA,qBACA,iBACA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A,OACA,CACA,CACA,MAhEA,WACA,+BACA,cAIa,yBApGb,QAiBA,IACA,mBAUA,mBACA,CAQA,kBACA,iBAKA,aAEA,8CAIA,8BAFA,KASA,oBACA,0BAMA,sCAEA,2EASA,UACA,8BAEA,0BACA,yCAGA,iBACA,QACA,EAUA,kEC7FA,QAqBA,KACA,mBAmBA,uBACA,CAQA,wBAQA,wBAQA,+BAQA,gCACA,MAKA,WACA,OACA,sBACG,eACH,qBAEA,kBAEA,iBAOA,QACA,mEACA,YAOA,cACA,+EACA,EAKA,WAEA,sCACA,qEASA,mBAGA,8HAAM,gCAIN,8EAQA,cACA,KACA,qFAAM,iBAGN,KAGA,uCAEA,qDAGA,UAAU,oEACV,SAKA,uBACA,OACA,2CASA,qBACA,oEACA,YACA,sCCxJA,qBACA,SAGA,mDACA,gBAGA,yBADA,MAGA,0BAXA,wCCNA,aACA,QACA,eAEA,uBACA,KACA,gBAEA,KAEA,2BAXA,KAYA,qCACA,gBAEA,gDC1BA,QAiBA,IACA,mBAMA,eACA,aACA,cAKA,gBACA,MACA,gBAKA,WACA,OACA,UAOA,cACA,iFAEA,kFACA,EAKA,uBACA,OACA,0CACA,sCC5BA,iBACA,SACA,QAEA,+BACA,eAEA,uCACA,WACA,2BACA,iBAQA,0CAjDA,OAqBA,GACA,mBAIA,uBACA,OACA,gCACA,QAqBA,gCACA,qBAEA,kCAEA,mBACA,4CAEA,OACA,iCAGA,SACA,KAAC,GAED,8CCuBA,qBACA,kCACA,WACA,2BACA,iBASA,gDArGA,OAsBA,GACA,mBAIA,WACA,OACA,MAOA,cACA,wDACA,IASA,qBACA,+DACA,IASA,qBACA,+DACA,IASA,qBACA,4BACA,IAKA,yBACA,CACA,QAKA,uBACA,OACA,8BACA,QAgBA,gCACA,SACA,cAEA,6BACA,OAMA,qBAGA,+FACA,SACA,mCAGA,WACA,KAAC,GAED,6GC5HA,QAwBA,GACA,mBAIA,WACA,OACA,OAQA,eACA,mEACA,IAYA,uBACA,4BACA,IAKA,yBACA,OACA,IAKA,uBACA,OACA,+BACA,EAWA,MACA,+BACA,SACA,WAEA,sBACA,eAEA,2BAMA,oBAGA,kGAMA,oBAGA,uHACA,uCAEA,gBAEA,SAEA,0BAGA,WACA,cACA,8BAEA,wCACA,eAEA,0CACA,kBACA,8BAEA,kBACA,IAAC,GAED,4GCnIA,OAwBA,KACA,mBAIA,WACA,OACA,OAOA,eACA,+DACA,IAiBA,sBACA,4BACA,IASA,qBACA,gFACA,IAKA,yBACA,OACA,IAKA,uBACA,OACA,+BACA,EAWA,MACA,+BACA,SACA,WAEA,sBAEA,aAMA,qBAGA,6EAEA,sBACA,SAEA,+BAGA,WACA,8BAEA,6BAEA,qBACA,uCACA,iBAEA,kBAEA,cACA,8BAEA,kBACA,IAAC,GAED,sGCzIA,QAuBA,GACA,mBAIA,WACA,OACA,QAOA,eACA,+DACA,IAQA,qBACA,4BACA,IAKA,yBACA,OACA,IAKA,uBACA,OACA,gCACA,EASA,MACA,gCACA,IAMA,8BAGA,4FACA,WAEA,oDAEA,QAEA,SACA,cACA,8BAGA,WACA,cACA,8BAIA,wCACA,eAEA,4DACA,kBACA,8BAEA,kBACA,IAAC,GAED,oHChHA,QAyBA,GACA,mBAIA,WACA,OACA,MAOA,YACA,cAEA,mFACA,IAOA,cACA,cAEA,2CACA,CAUA,uBACA,4BACA,IAQA,qBACA,4BACA,IAKA,yBACA,OACA,IAKA,uBACA,OACA,8BACA,EAUA,MACA,gCACA,OAMA,qBAGA,uFAEA,WAMA,6BAGA,uEAMA,8BAGA,gGACA,WAEA,kDACA,WACA,8BAEA,0DACA,QACA,OACA,2BAEA,uBAEA,kBACA,8BAEA,kBACA,IAAC,GAED,8DC/IA,SACA,WACA,gCACA,OAEA,wCCFA,QACA,iBACA,aACA,cAEA,SACA,UAEA,kBACA,2BACA,2BACA,MAEA,0DCpBA,QAeA,eACA,OACA,QAEA,0CAlBA,aAaA,EAMA,WACA,aACA,IAEA,uBACA,iBACA,SAEA,EAEA,GACA,CACA,QACA,wBACA,MAEA,2ECdA,QACA,WACA,WACA,QAEA,eACA,oCACA,WACA,QAGA,aAFA,YAGA,4BACA,6BACA,QACA,EAEA,iBCpCA,iBACA,aACA,YACA,MACA,SACA,EAEA,YACA,OACA,KACA,aAEA,OACA,CACA,QAEA,gCCuPA,aACA,2DACA,OAMoB,CACpB,aACA,yBACA,iBAMA,wBAhSA,QAmCA,KACA,eAAkC,YAkBlC,eACA,WAIA,GACA,sCAIA,6BACA,OAmBA,qBACA,WAGA,WACA,cAGA,uBACA,GAGA,SACA,IAGA,yBACA,OASA,qBACA,yBACA,KAGA,IA+BA,MACA,OAKA,eAEA,kBAGA,WACA,UACA,EAEA,4BA0BA,QAAkC,KAElC,gBAIA,uCAIA,yDAGA,mDAEA,iBACA,qBAKA,uBACA,mBAYA,YAEA,cAEA,eAMA,4DACA,8BAEA,gBAeA,yBACA,cACA,MACA,SAKA,EAMA,4BALA,eACA,uCACA,gBAEA,GAQmB,uFC9QnB,SAiCA,IACA,OAQA,iBAOA,MAQA,gBAQA,2BAQA,oCAGA,WAEA,cAeA,cAAoC,KACpC,MACA,iDAEA,aACA,SAQA,aACA,aACA,OAQA,yBACA,aACA,mBAWA,aACA,kBACA,aAEA,+CACA,qCAEA,iBACA,qBAQA,YACA,kBACA,aAEA,+CACA,uCAEA,eACA,qBAQA,kBACA,6CACA,WAOA,iBACA,qBACA,MAOA,iBACA,+BACA,kBAQA,sBACA,aACA,mBAGA,gBACA,IAkBA,cACA,kBACA,oBAGA,qDACA,uCACA,aACA,SAOA,aACA,qBACA,kBAEA,kBAUA,gBACA,OAEA,yBACA,gCACA,UAIA,qCACA,IASA,eACA,OAEA,yBACA,6BACA,QAIA,qCACA,IASA,mBACA,cAEA,yDACA,IASA,kBACA,cAEA,sDACA,IASA,WACA,mBACA,OAGA,oDACA,mBAGA,+BACA,WACG,YACH,oBAGA,kEACA,OAGA,qCACA,IAEA,uBACA,wBACA,CACA,KACA,KAGA,IACA,GAEA,QAEA,C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CACG,eACH,0BAOA,6BAGA,oEACA,IASA,YACA,IAEA,YACA,iCAKA,qBACA,UASA,UACA,IAEA,UADA,eAGA,YA6BA,GA5BA,oBACA,oBACA,SAGA,qBAEG,aACH,oBACA,WACA,YAGA,SAGA,QACA,MACA,mBACA,mCAGA,wBASA,+DACA,iBAEA,oDACA,OAMA,yCALA,4CAEA,oBAEA,aAYA,SACA,oBACA,QAWA,UACA,oBACA,SAWA,YACA,oBACA,WAMA,QACA,UACA,4CACA,0CAGA,WACA,oBAEA,EAiFA,UACA,SAMA,gCAGA,yFAEA,oBAOA,SACA,+BACA,SAUA,aACA,CACA,mDAEA,oCAEA,KAEA,EAQA,uBACA,cAKA,6BACA,8BACA,sCAMA,UACA,uCACA,2CACI,aACJ,SAEA,uCACA,2CAEA,cACA,QACA,CAGA,WACA,UAIA,wBAGA,yCACA,2CAGA,eAEA,SACA,EAKA,oBACA,2BACA,WAeA,QAEA,oCC3fA,aA+RA,aACA,mBACA,gEA3OA,IACA,OAUA,eACA,kBA2CA,qBACA,0CACA,SAEA,WACA,uBAGA,cACA,wCACA,CACA,UACA,GAEA,EAEA,CASA,YACA,iCACA,IASA,WACA,gDACA,IASA,WACA,+BACA,EASA,eACA,gCACA,EASA,cACA,OAGA,WACA,yCAGA,kCACA,uCAGA,eAIA,WADA,MAIA,KAKA,aACA,kBACA,MAKA,YACA,kBACA,KAKA,YACA,kBACA,KAKA,gBACA,kBACA,SAQA,UAEA,MAEA,OAWA,qBAEA,cACA,0BAEA,UACA,SAKA,SACA,mCAIA,eAEA,WACA,yBAGA,UACA,KAIA,YACA,QAAG,OAEH,aACA,KACA,EAMa,oCC3Ib,mBAEA,mBAAqC,cAKrC,8BAKA,2BACA,qCACA,qBAEA,QACA,SAMA,CACA,mBAEA,OACA,OAGA,uEAYA,WACA,aACA,wDAGA,iBACA,GAIA,2BAGA,+BAIA,cAMA,eAAiB,aAA4B,eAC7C,kBAEA,4BAGA,aASA,eARA,uCAKA,YAIA,WAIA,qB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,8CAQA,4CAQA,UACA,UAKA,WACA,OACA,QAOA,QACA,uEACA,YAOA,cACA,mFACA,EAKA,WACA,6BAEA,gDAEA,UAAU,gBACV,OAKA,SACA,eAEA,SAGA,gBADA,UAMA,uBACA,OACA,wCASA,qBACA,OACA,SACA,2CACA,2CACA,OACA,UAEA,YACA,6DCjIA,OAoBA,GACA,mBASA,qBACA,CAOA,cAOA,gBAOA,eACA,SAKA,WACA,OACA,QAOA,QACA,mFACA,YAOA,cACA,+FACA,EAKA,WAEA,uBAEA,2BAMA,eACA,KAEG,oIAMH,iBACA,KAKA,qHAEA,sBAGA,SAAU,wBACV,QAKA,uBACA,OACA,wCASA,qBACA,+DACA,YACA,8CCrIA,QAuBA,GACA,mBAWA,uBACA,CAQA,cAQA,YAQA,WAQA,gBACA,UAEA,WACA,OACA,sBACG,mBACH,qBAEA,sBAEA,qBAOA,QACA,kEACA,YAOA,cACA,8EACA,EAEA,WACA,kEASA,kBAGA,kIAAK,yBAIL,iFAQA,cACA,KACA,yFAAK,yBAIL,YACA,qDAKA,0CAHA,UAGU,kEACV,SAKA,uBACA,OACA,+CASA,qBACA,iBAOA,eACA,KACA,2HAAK,CAIL,0EACA,YACA,sGCzKA,OAyBA,GACA,mBAIA,WACA,OACA,QAQA,eACA,6DACA,IAQA,YACA,0DACA,IASA,uBACA,4BACA,IAKA,yBACA,OACA,IAKA,uBACA,OACA,gCACA,EAYA,MACA,kCACA,gBAGA,WACA,mBAGA,cACA,kCAEA,iBACA,cACA,8BAGA,8BACA,gCAEA,wBACA,WACA,aACA,wBAGA,wBACA,cAGA,OACA,KAAC,GAED,8CC7EA,iBACA,GACA,2BACA,iBASA,iDA1DA,OAsBA,GACA,mBAIA,WACA,OACA,QAKA,yBACA,CACA,QAKA,uBACA,OACA,gCACA,QAeA,kCACA,kBAMA,oBAGA,8GACA,WAEA,uEACA,kBAEA,UACA,IAAC,GAED,sDCpEA,SACA,aACA,oBACA,oBAEA,wCCLA,SACA,eACA,IACA,oBAEA,sBACA,MAEA,OACA,UACA,SAGA,gBACA,CAEA,iBClBA,iBACA,eACA,YACA,MAEA,OACA,cACA,MAGA,SACA,QAEA,iBCfA,iBACA,WACA,mBACA,OACA,KACA,CAEA,iBCNA,iBACA,aACA,UACA,MAEA,yDCDA,QACA,aACA,+BAEA,kBACA,MAEA,gBACA,uBAEA,iBACA,aAEA,gDCGA,QACA,eACA,kBAIA,qCACA,0BACA,UAEA,gDCVA,QACA,eACA,kBAIA,qCACA,UACA,wBACA,QAEA,iBCrBA,iBACA,WACA,sBACA,SAEA,mFCHA,SACA,eACA,iBACA,WACA,WACA,OACA,MACA,WACA,SAEA,UACA,OACA,KACA,8BAEA,gBACA,+BACA,uBAEA,YACA,KAEA,UACA,MAEA,GACA,8BACA,OACA,SAEA,uBACA,EACA,UACA,WACA,SACA,KACA,SACA,OACA,QACA,UACA,aAEA,kBAEA,MAEA,MAEA,UACA,OACA,CACA,CACA,QAEA,wCCjEA,QACA,WACA,eACA,YAEA,wCCQA,SACA,aACA,0BACA,cAEA,WAEA,kECtBA,aAGA,cAYA,WACA,iBACA,aACA,OACA,MACA,OAGA,mCAEA,UACA,iBACA,IACA,SAEA,QACA,kBACA,kBAEA,cAGA,GACA,QAEA,wCC3CA,QAoBA,iBACA,GAEA,eACA,eACA,IACA,QACA,kBACA,UAEA,gBACA,eACA,OACA,QACA,aACA,WACA,eAEA,QACA,WAEA,kBAEA,kBAEA,oBACK,IAGL,eAGA,UAEA,EAEA,GACA,OACA,KAzDA,WAkBA,EAyCA,yDCvCA,SACA,aACA,WACA,QAEA,sBACA,cAGA,oCACA,eACA,gBACA,EAEA,wDCzBA,QACA,eACA,YACA,MAEA,OACA,aACA,SACA,mBACA,sBAEA,aAEA,+BACA,cAEA,gCCwFA,YAEA,YAEA,iDACA,mBACA,SACA,sBACA,GACA,oCAEA,eACA,EAAG,UAEH,QAaA,CACA,qBACA,8BACA,eAEA,+BAIA,qBAGA,8CAMA,oFAGA,gBAGA,kBAEA,iCA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A,mBAGA,sBAGA,mDAKA,aAGA,mBAEA,MAEA,kBAEA,SAQA,kBAEA,uCAGA,+BACA,sBAWA,OAAS,2BAA8B,IACvC,WAEA,8BACA,0BACA,sBASA,sBACA,yCAGA,SAQA,aANA,mBAA+B,YAC/B,cAIA,oBAEA,uBChOA,iBACA,eACA,SAEA,sBACA,yBACA,0BACA,+BAEA,MACA,UAEA,wDChBA,QAGA,IAGA,eAGA,uBAGA,eAGA,gBAwBA,aACA,WACA,IACA,mBAEA,mBACA,QAEA,2BACA,gCACA,+BACA,IACA,IACA,kCAEA,iBACA,YACA,oBACA,yBACA,eACA,EAEA,eClEA,qBACA,uBACA,cAEA,yBACA,8CACA,CACA,4BACA,UACA,CAEA,iCACA,CACA,4BACA,UACA,CAEA,sCACA,CAEA,kCACA,CACA,CACA,kFCVA,SACA,WACA,WACA,4BACA,iDACA,uBAEA,QACA,IAEA,iBCfA,iBACA,aACA,YACA,IAEA,SACA,YAEA,KACA,QAEA,8ECnBA,OAiCA,GACA,OAIA,cAOA,6BAQA,qCASA,6CAGA,0CACA,OAIA,mEAEA,8DACA,QAAG,EAAG,UAGN,6CACA,MACA,cAGA,4BACA,kCAEA,YACA,QACA,kCAGA,wEAEA,8BACA,8BAAG,EAAG,UACN,OAWA,kBACA,0BACA,kCACA,QAOA,qBACA,cAEA,uBACA,oBAOA,sBACA,cAEA,sBACA,oBAKA,gBACA,6BACA,qCACA,QAUA,kBACA,iCACA,MAQA,iBACA,iCACA,MAQA,gBACA,qEACA,KAQA,eACA,mEACA,KASA,mBACA,SACA,CACA,sBAGA,uBAEA,2BACA,aASA,kBACA,SACA,CACA,uBAGA,uBAEA,2BACA,YA+BA,+BACA,kCACA,QAoBA,sBACA,SAEA,wCACA,gBAEA,4BACA,IAKA,SACA,QAIA,eAEA,YAAkB,EAAgB,IAClC,6BAGA,aACA,QASA,qBACA,0BACA,mCACA,SAwBA,kBACA,iDACA,gDAEA,YACA,KAAG,6BACH,aACG,WACH,sBACG,eACH,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A,iCClMA,aACA,+FACA,OAUA,CACA,aACA,2CACA,OAUA,CACA,aACA,2CACA,OAQA,CArDA,IAsDA,aACA,8BACA,UAQA,EAhDA,IAiDA,aACA,YACA,0DC/DA,SAiBA,qBACA,OACA,EAHA,MAIA,WAEA,qBACA,KAGA,iBACA,OACA,WAEA,aACA,EACA,SA/BA,KAiCA,kBAGA,gBACA,OACA,OAEA,KACA,WACA,EACA,eAEA,6BACA,CACA,KAEA,SACA,KACA,KAEA,CACA,qCACA,OACA,gBACA,uBAEA,MAAW,GACX,CACA,KACA,KACK,UACL,EACA,OACA,cACA,CACA,KACA,KACA,CACA,CAEA,SADA,cAGA,iEChFA,QAoBA,IACA,mBAIA,uBACA,OACA,oCACA,EAqBA,MACA,sCACA,SACA,WAEA,qBAEA,iBACA,kDAGA,mDACA,kBACA,8BAEA,kBACA,IAAC,GAED,8CC4PA,eACA,UACA,yBACA,yBAIA,IACA,QAEA,CACA,aACA,iBACA,sBACE,OACF,EAGA,CACA,eACA,oBACA,+BAEA,uBAEA,eAAiB,EAAa,IAC9B,2BAGA,QACA,OAIA,CACA,iBACA,CACA,SACA,SACA,OACA,MAiCA,CACA,iBAEA,yBAEA,+CAEA,4BAEA,kCAEA,WAEA,OAEA,eAEA,eACA,CAWA,CACA,eACA,yBACA,oBAEA,+CACA,iBAeA,CACA,eACA,oBACA,0BAIA,2BACA,gBAGA,CACA,iBACA,eAEA,+BAGA,8BACA,oCAGA,mCACA,kBACA,4CACA,aAEA,CAEA,KACA,KAKA,CACA,KAEA,KAEA,sBACA,QAGA,CACA,eACA,WACA,mBAEA,iDAEA,mCAIA,6BACA,MASA,CACA,iBACA,UACA,sBACA,wBAEA,sCAEA,qBAEA,mBACA,+BAEA,QAOA,CACA,eACA,IACA,QACA,KAEA,EACA,cACA,SAGA,cACA,sBAIA,QAEA,iBACA,QAEA,QAIA,OACA,kBAIA,QACA,aACA,SAKA,cACA,uBACA,qBAEA,oBAGA,QACA,cACA,SAKA,+BAEA,MACA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ACA,aACA,iBAEA,gBACA,OACA,QACA,MAEA,QACA,QACA,CAEA,gFCSA,8BACA,cACA,sBACA,UAEA,iBACA,qDAEA,WAEA,+CChCA,QACA,WACA,uBACA,OAEA,iBCNA,iBACA,aACA,mBACA,OAGA,UACA,2BACA,WACA,CAEA,wCCOA,SACA,eACA,6BACA,gBACA,eAEA,iBCjBA,iBACA,WACA,CACA,QAEA,wECOA,8BACA,cACA,sBACA,UAEA,iBACA,sCAEA,oBAEA,uDCCA,SACA,aACA,aACA,mCAEA,YAEA,gDCPA,SACA,aACA,aACA,mCAEA,SAEA,iDCdA,QACA,iBACA,kBAIA,0CACA,gBACA,EAEA,YACA,iBAEA,iDCPA,QACA,aACA,aACA,mCACA,KACA,CAEA,iBCnCA,iBACA,eACA,aACA,cAEA,QACA,YACA,UAGA,gBACA,CAEA,iDCeA,QACA,aACA,aACA,mCACA,QACA,CAEA,4EC5CkB,yCCelB,QACA,WACA,kBACA,yBACA,KAEA,wCClBA,QAgBA,WACA,kBACA,kBACA,SAJA,KAMA,gDCFA,QACA,aACA,kBAIA,kCACA,eACA,aAEA,iBClBA,iBACA,WACA,YACA,eACA,EAEA,YACA,OACA,eACA,EACA,CACA,QAEA,iDCCA,QACA,eACA,kBAEA,qBAGA,QACA,cAEA,WACA,cALA,CAOA,wCC1BA,SACA,WACA,sBACA,EAEA,kECEA,4BACA,qBACA,+BACA,UAEA,UAEA,yFCCA,4BACA,cACA,wBAEA,uBACA,QAEA,WAEA,yBACA,wBAEA,WAEA,iFCjBA,4BACA,cACA,wBAEA,uBACA,QAEA,WAEA,yBACA,UAEA,mBAEA,wBCzCA,aACA,YAGA,cAgBA,SACA,aACA,sBACA,EAEA,iDCEA,QACA,eACA,kBACA,KACA,UAEA,KACA,QACA,sBACA,UACA,CACA,UACA,SACA,IAEA,GACA,oBAEA,kBACA,QACA,SAGA,gBACA,CAEA,iDC9BA,QACA,aACA,yCACA,eAEA,iDCFA,iBAEA,yDCFA,SACA,eACA,0BACA,8BAEA,UAEA,wCCTA,SACA,eACA,0BACA,cAEA,oBAEA,2FCCA,8BACA,iBAEA,oBACA,WAEA,UAKA,8CAJA,yBACA,IAAG,QAEH,OAGA,yFCrCA,YAGA,cAUA,WACA,aACA,sBACA,MAEA,OACA,OACA,oBACA,IACA,eACA,mBAEA,6BACA,cACA,iBAEA,UACA,qCAEA,SAEA,sBAEA,QACA,CACA,CACA,QAEA,gDClBA,SACA,aACA,IACA,gBACA,QAEA,gBACA,EACA,SAEA,2BACA,UACA,OACA,KACA,aACA,UAEA,QACA,CAEA,cADA,WAGA,iBCrDA,aACA,YAGA,cAwBA,YACA,WACA,YACA,SAEA,wDCdA,QACA,eACA,kBAIA,0CACA,eACA,EAGA,yBACA,8BAEA,gBACA,eAEA,wCCfA,SACA,aACA,eACA,SAEA,gDCEA,SACA,eACA,+BACA,QAEA,iDCfA,QACA,aACA,kBACA,OACA,cACA,8BACA,QAEA,QACA,QACA,CAEA,wCCXA,SACA,aACA,eACA,YAEA,gDCDA,SACA,eACA,+BACA,WAEA,iDCVA,QACA,aACA,kBACA,OACA,2BACA,iBACA,QAEA,QACA,QACA,CAEA,wCCdA,SACA,WACA,aACA,cAEA,UAEA,wCCbA,QACA,aACA,YACA,MACA,SACA,EAEA,YACA,OACA,SAEA,gCACA,IACA,kBACA,GACA,CACA,CACA,QAEA,gDCXA,SACA,aACA,aACA,4BAEA,WAEA,wCCVA,SACA,WACA,sBACA,EAEA,gDCOA,QACA,eACA,aAGA,iCACA,4BACA,QAEA,gDCTA,QACA,eACA,kBAIA,qCACA,UACA,sBACA,UAEA,gDCAA,SACA,aACA,aACA,mCAEA,YAEA,gDCPA,SACA,aACA,aACA,mCAEA,MAEA,gECxBA,4BACA,oCACA,QAEA,uFCKA,4BACA,cACA,sBACA,UAEA,qDACA,QAEA,+ECZA,4BACA,cACA,sBACA,UAEA,sCACA,iBAEA,+CChBA,QACA,WACA,aACA,cAEA,UAEA,gDCDA,QACA,aACA,aACA,4BAEA,WAEA,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,4BAGA,cAiGA,iBApCA,CACA,YAEA,oBACA,MACA,QAEA,IA8BA,gBA7BA,8BACA,OAEA,GA6BA,gCCqMA,eACA,UACA,aAEA,IAMa,CACb,aACA,gBAIA,6BACA,wCA/YA,SAmBA,IACA,OA4BA,eACA,gBASA,gDAEA,SACA,WACA,YAGA,kCACA,aAEA,uDAaA,iBACA,KACA,4FAAM,CAKN,0CAEA,aAEA,wBAAG,wBACH,MAAU,cAEV,wBACA,KACA,EACA,QACA,cACA,EACA,QAEA,UACA,QA4CA,OAOA,QACA,cACA,KASA,YACA,aACA,wBACA,yBACA,YAEA,OACA,IASA,YACA,aACA,YACA,cACA,aAEA,UACA,IAQA,mBACA,SACA,kBACA,0BACA,8BACA,2BAGA,gCACA,yBAEA,eACA,WAEA,KAEA,QAQA,uBACA,cAGA,8BAEA,UAEA,CAOA,UACA,wBACA,MAYA,aACA,cACA,mBAGA,YACA,+BAGA,kCACA,SACA,aAEA,mBACA,mBAEA,YAIA,gBAGA,UACA,UAGA,CACA,QAUA,WACA,UACA,qBACA,KAIA,SACA,QAQA,YACA,cAEA,iCACA,WAUA,8BACA,cACA,cAEA,YACA,kDACA,uDACG,iBACH,0BAEA,2BACA,+BAEA,kCACA,IAGA,aACA,cAEA,cACA,eAEA,UACA,IAQA,2BACA,MAEA,qBAEA,uBACA,gBACA,eAMA,cACA,gCACA,mCACA,aAEA,IACA,OAEA,CACA,QACA,QAEA,KAMwD,kGCzWxD,QACA,WACA,oDACA,OAEA,iBCzBA,aAeA,IACA,WAEA,qCAEA,0BACA,+BACA,sCACA,wCACA,oCAEA,oCCoKA,qBACA,OACA,YAGA,aACA,aAGA,eAMA,uBACA,qDAIA,qBAEA,oBACA,gCACA,WAEA,aACA,UACA,WAGA,0BACA,uBACA,aAIA,SACA,QAyBA,KAlOA,UACA,kBACA,WAEA,gBAIA,yBAIA,8BAEA,+CACA,kBACA,4CACA,WACA,EACA,CAyBA,MACA,UACA,kBACA,WAEA,eAIA,yBAIA,wBAC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BACA,UAEA,WAAG,EAAG,CAGN,sDACA,MACA,WACA,EAOA,eACA,iCACA,wCACA,SACA,EAOa,MAiCb,wBAkBA,GACA,sBA4KA,GACA,mBAGA,yBACA,KACA,qCACA,OAGA,wCACA,KACA,uCACA,2BAGA,yCACA,KACA,+BACA,2BAKA,yCACA,KACA,2BACA,OAGA,4CACA,KACA,qBACA,2BAGA,6CACA,KACA,6BACA,2BAKA,yCACA,KACA,4BACA,OAGA,4CACA,KACA,8BACA,2BAGA,6CACA,KACA,sBACA,2BAKA,qCACA,KACA,qCACA,OAGA,wCACA,KACA,uCACA,2BAGA,yCACA,KACA,+BACA,2BAKA,yCACA,KACA,2BACA,OAGA,4CACA,KACA,qBACA,2BAGA,6CACA,KACA,6BACA,2BAKA,yCACA,KACA,4BACA,OAGA,4CACA,KACA,8BACA,2BAGA,6CACA,KACA,sBACA,2BASa,4CClqBb,aACA,mBACA,WAEA,uBACA,6CACA,gCACA,GACA,kBAGA,sBA7BA,WACA,uBAEA,8DACA,SAEA,OACA,iBACA,CASA,gBApCA,SAkBA,iDClBA,SAoBA,KACA,mBAIA,wBACA,OACA,aAKA,sBACA,YACA,IACA,+ECnCA,QAoBA,KACA,mBAIA,sBACA,OACA,CACA,IAEA,IAIA,OACA,cACA,WACA,aACA,uBAEA,aACA,MACA,QACA,+BAEA,kBACA,MACA,QACA,mCAEA,8BAEA,sDAEA,mDACA,wDACA,sDACA,gBACA,eACA,kCACA,CACA,OAEA,eAIA,YACA,SACA,CAEA,uCACA,GACA,gBACA,0BAIA,kCACA,8BACA,wDACA,WACA,sBACA,iBACA,mBAEA,yBACA,uBAEA,UACA,gBAGA,QACA,CAGA,CACA,EASA,UACA,aAyDA,sBACA,0CACA,qDACA,eACA,KACA,gBACA,cA9DA,kBACA,MACA,yBACA,qBACA,0BACA,sDACA,UACA,sBACA,0BACA,8BACA,OACA,SAMA,sBALA,wBACA,8BACA,sDACA,YACA,IACS,aACT,sBACA,sDACA,0DAEA,eACA,iBACA,oBACA,oBACA,QACA,SAGA,SAFA,SAGA,YAAe,OAAe,KAC9B,UACA,MACA,sDACA,CACA,OAGA,SACA,GACA,GAAS,cAET,CACA,mCACA,SACA,2BAGA,WAEA,yBACA,wBACA,SACA,EACA,EAQA,0CC3JA,WACA,SAEA,8CACA,KAgBA,EArCA,IAsCA,WACA,WAEA,qBACA,gBAGA,oDAEA,WAGA,MACA,mBAGA,wBAGA,8BAKA,oBACA,eAEA,UACA,eAlDA,oBChBA,qBAiBA,IACA,mBACA,sCCYA,iBAGA,qCAEA,aAEA,4BACA,gBACA,4BAGA,+CACA,eAxBA,aACA,0BACA,UAQmD,UA9BnD,OAmBA,iOCnBA,SAqBA,KAEA,oCAEA,QACA,SACA,CACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IACA,IAEA,YACA,SACA,CAYA,0GACA,CAQA,oJCnEA,kBAwCA,KACA,mBAYA,iBACA,CAEA,yBACA,oCACA,uCAQA,kCACA,IASA,UACA,aACA,4CACA,kBAEA,gBACA,SA0CA,mBACA,yBACA,YAEA,WACA,IACA,8DACA,mBACA,MACA,cACA,UACA,mDACA,6BACA,sCACA,QACA,oBACA,QACA,QAEA,OACA,EACA,iFCjJA,SAsBA,KACA,mBAQA,iBACA,CAQA,cAGA,oCACA,kDAQA,8BAaA,4CAEA,WACA,eAKA,UACA,gBACA,mCACA,iCACA,sBACA,UAOA,WACA,WACA,MAKA,UACA,kBACA,KAKA,sBACA,+BACA,UAKA,4BACA,+BACA,SAQA,gBACA,cAGA,2DACA,IACA,aACA,gBAIA,oCACA,cAEA,oBACA,CACA,MACA,QAIA,sBAIA,kCACA,uBAGA,kBAEA,SACA,EACA,CAWA,mBACA,yBACA,YAEA,WACA,IACA,uBACA,QACA,oBACA,QACA,QAEA,OACA,EACA,oGC9KA,QAyBA,GACA,OAMA,eACA,wDAQA,6EAEA,2BAQA,kCAQA,yBAMA,yCAQA,4BAmBA,mBAQA,4BAWA,mBAc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A,iBACA,OAEA,QAEA,UACA,CACA,QACA,EAEA,wCCvBA,mBAEA,sDCZA,SAyBA,MACA,WACA,IACA,kBAEA,cACA,sBACA,cACA,QACA,yBACA,gBACA,CAEA,kECnCA,aAGA,cAwBA,mBACA,WACA,YACA,WACA,iBACA,YACA,gBACA,UAEA,UAEA,cACA,OACA,MALA,yBAMA,qCACA,cAEA,OACA,CACA,QAEA,gCCpCA,aACA,aAEA,aACA,aACA,UAEA,QACA,QAGA,kBAzBA,cAGA,oBACA,qBASA,2BAY4D,iBAC5D,0BACA,oBACA,KAGA,+CChCA,UAEA,2BCLA,GAGA,aACA,OACA,KAAC,IAED,GAEA,0CACA,OAAC,SAED,CACA,4BACA,OAI4C,CAE5C,2BCdA,iBACA,WACA,+BACA,IAEA,iBCLA,iBACA,WACA,QAGA,MAFA,gBAGA,eAEA,OACA,QAEA,iBCXA,iBACA,UACA,MACA,WAEA,wCCRA,YAGA,cAUA,WACA,WACA,YACA,kBAEA,aACA,IAEA,wBACA,EAMA,MALA,QAEA,iBAEA,KAGA,wCCvBA,QACA,WACA,YACA,kBAEA,iCACA,EAEA,wCCRA,QACA,WACA,QACA,8BAEA,wCCJA,QACA,aACA,YACA,kBAEA,gBACA,YAEA,YAEA,KACA,IAEA,wCChBA,QACA,UACA,kBACA,IAEA,iBCLA,iBACA,WACA,sBACA,YAEA,iBCLA,iBACA,WACA,sBACA,MAEA,iBCLA,iBACA,WACA,sBACA,MAEA,gDCTA,SAYA,aACA,YACA,6CACA,QAJA,gCAMA,aACA,SACA,IAEA,yDCfA,SACA,UACA,eACA,SACA,kBACA,eAEA,KAEA,gCCNA,aACA,QACA,eAEA,WACA,eACA,OACA,qBACA,GACA,CAEA,6CAZA,KAaA,sBACA,0BACA,oBACA,oBACA,gBAEA,gDCvBA,QACA,UACA,+BACA,QAEA,iBCJA,iBACA,WACA,iCACA,WAEA,wCCXA,aAMA,cAUA,mBACA,WACA,YACA,gBACA,OACA,WACA,KAnBA,oCAoBA,oBACA,WAEA,wCC1BA,aAGA,cAUA,mBACA,WACA,YACA,oCACA,SAEA,wCCnBA,QAYA,aACA,YACA,0BACA,WAJA,8BAKA,IAEA,wCCXA,QACA,WACA,4BACA,YAEA,iBCTA,iBACA,WACA,OACA,sDACA,aACA,gBACA,QAEA,wCCJA,QACA,WACA,4BACA,MAEA,wCCLA,QACA,WACA,4BACA,MAEA,wCCJA,QACA,aACA,4BACA,SACA,IAEA,iBCTA,iBACA,aACA,YACA,MAEA,OACA,gBAIA,aACA,QAEA,iDCVA,QACA,aACA,gCACA,UAEA,iBChBA,aACA,aASA,SACA,WACA,UACA,UAEA,iBCRA,iBACA,aACA,CACA,cAEA,kCACA,QAEA,SADA,SAGA,iDCPA,SACA,aACA,6BACA,UAEA,0DCLA,QACA,WACA,0BACA,IAEA,gDCFA,QACA,eACA,OACA,2CACA,KAEA,gDCfA,sBAEA,gECFA,sBAEA,+DCFA,sBAEA,gCCNA,aACA,aAGA,cAQA,mBACA,WACA,SACA,WAGA,eAKA,0CAJA,qBACA,gBAEA,QAGA,8FChBA,SAkCA,iBACA,SAGA,uBA5BA,8BAgCA,YAzCA,wBACA,sBA2CA,QAlCA,2BAuCA,cAtCA,6BACA,6BACA,0BACA,2BACA,2BACA,2BACA,kCACA,4BAcA,8BAoBA,cAlDA,sBAsDA,gBArDA,uBAGA,kBAqDA,aAvDA,yBA0DA,YAzDA,sBA4DA,gBAzDA,yBA2DA,cAEA,wCCtEA,SACA,aACA,iCACA,iDACA,WAEA,0DCHA,SACA,eACA,qCACA,uCACA,YAEA,iBCXA,iBACA,aAEA,CAEA,oBADA,KAGA,iBCdA,aACA,MAQA,WACA,WACA,oCACA,SAEA,qBADA,WAGA,0DCJA,QACA,eACA,qCACA,uCACA,YAEA,iBCXA,iBACA,aACA,CAEA,SADA,QAGA,wCCVA,eACA,uBAQA,mBACA,WACA,mBACA,WAEA,wCCRA,SACA,aACA,iCACA,iDACA,OAEA,0DCLA,QACA,WACA,gDACA,8BAEA,QAE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A,qBAQA,oCACA,8GAA8E,CAG9E,SAGA,mBACA,UAQA,gBACA,aACA,UAUA,kBACA,yBAOA,iBACA,KACA,sGAAK,CAGL,wBAEA,gBAEA,kCAEA,yDACA,KAQA,SACA,gBACA,OAWA,+BACA,eAQA,gBACA,KACA,kFAAK,CAIL,yBACA,UAGA,kBADA,UAMA,UACA,gBACA,eACA,eAaA,kBACA,yBAEA,uCACA,2BACA,6BACA,0BAGA,kBACA,cACA,CAQA,kBACA,gBAOA,gBACA,KACA,kFAAK,CAIL,2BACA,MAQA,WACA,mBACA,MAOA,eACA,kDACA,KAqBA,qCAEA,sBAA2B,cAC3B,qBAGA,cAEA,cACA,2BAAqC,2BAGrC,0BACA,0BAAoC,CAGpC,yCACA,kCACA,mBAEA,mDACA,4BAGA,2BAA4B,uBAC5B,gCAEA,aAEA,OACA,KAkBA,0BACA,0CACA,KAOA,SACA,qBAGA,MAGA,mBADA,oCAUA,kBACA,2BACA,qBACA,UAIA,qBACA,SASA,mBACA,cAGA,uBACA,mBAGA,yCACA,OAUA,2BACA,wBACA,IA8CA,QAEA,cAGA,kHCrdA,SAyBA,4GCzBA,SAkBA,KAEA,WACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,qBACA,iBAMA,IAYA,IAXA,KAQA,qBACA,yBACA,aACA,yCClBA,QACA,aACA,eACA,SAEA,qGCzBA,OAIA,uBACA,mBAGA,2BAGA,cAgBA,mBACA,qBACA,cACA,iBACA,QACA,IAGA,iBACA,UAGA,uBACA,UAEA,8BACA,wBACA,UAEA,WACA,mBACA,gBACA,eACA,yBAEA,2BAjDA,GAkDA,mBACA,6BAEA,uBACA,WACA,gBAEA,0BACA,MACA,YACA,CAIA,sBACA,aACA,kBAEA,iBChFA,iBAYA,WACA,sBACA,MAHA,6BAIA,IAEA,iBCVA,iBACA,WACA,sBACA,MAEA,iBCJA,iBACA,aACA,YACA,MAEA,OACA,YACA,UAGA,SACA,QAEA,4ECfA,cAmBA,uBAmB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SAEA,aACA,IAIA,UACA,KACA,WAEA,kBACA,8BA9CA,CAiDA,CAtCA,QAwCA,QACA,uBAdA,QAEK,QAaL,CACA,QAEA,iDCpDA,SACA,WACA,kBACA,YAEA,OACA,8BAEA,IACA,QAEA,iDCOA,kBAEA,4ECvBA,SAUA,WACA,mBACA,cACA,cACA,IAbA,sBAeA,QACA,GARA,sBAUA,sBACA,KACA,CAEA,wCCnBA,QACA,aACA,iCACA,UACA,KACA,EAEA,iBCXA,iBACA,WACA,QACA,YAEA,MAIA,4BAHA,QACA,KACA,IAGA,4FCRA,QAWA,aACA,+BACA,2BAEA,sBACA,cACA,6BACA,aACA,iCAlBA,CAmBA,CAVA,EAWA,CAEA,iDC5BA,OAGA,wEASA,oCACA,IACA,MAIA,iDAHA,4BACA,KACA,IAGA,uCCyBA,eACA,6BACA,8BAEA,8BACA,OACA,gCACA,OAEA,WACA,gBAEA,qBACA,QAEA,iBADA,UAEA,EAEA,4BADA,MAGA,SAlEA,OA6CA,sBAsBA,QAEA,gDClDA,SACA,WACA,0BACA,OAEA,iDCvBA,cAIA,uBASA,oBACA,WAEA,IACA,mBAEA,mBACA,2BAEA,WACA,0BApBA,GAqBA,MAEA,iDCFA,SACA,aACA,iCACA,IAEA,iBC1BA,iBACA,aACA,YACA,UAEA,mGCKA,QACA,eACA,+BAEA,mBAEA,MAEA,OAHA,SAIA,mBACA,sBACA,QAEA,QACA,IACA,CACA,KAEA,0BACA,oCACA,mDACA,QAEA,kECdA,QACA,WACA,0DACA,OAEA,wCCvBA,SACA,WACA,mBACA,eACA,SACA,CAEA,gDCHA,SACA,iBACA,SAEA,oBACA,QACA,eAEA,gCACA,QACA,MAEA,qBACA,QACA,OAEA,OACA,QAEA,iDC3BA,QA6BA,WACA,uCAFA,YAGA,CAEA,iBC7BA,iBACA,eACA,CASA,MARA,SACA,eAEA,UACA,eAGA,YAGA,wCCZA,QACA,aACA,SACA,OAGA,qBACA,mBACA,WAEA,iBCVA,iBACA,iBACA,aACA,MAEA,OACA,YACA,QAGA,gBACA,CAEA,wCCbA,SACA,aACA,YACA,MAEA,SAEA,SACA,YAJA,6BAMA,MACA,QAEA,iDCZA,QACA,aACA,qDACA,GAEA,wCCNA,QACA,aACA,UACA,OACA,aACA,WACA,eAEA,UACA,aACA,WACA,eAEA,uBACA,kBACA,IACA,SACA,OACA,SAEA,kBACA,kBACA,IACA,SACA,OACA,UAEA,CACA,OACA,EAEA,0DCnCA,+CASA,aACA,WACA,OAEA,2BCJA,iBACA,UAEA,CAEA,iFCHA,QACA,iBACA,+BAEA,mBACA,MACA,OAGA,oBACA,mBACA,wBACA,IACA,aANA,EAOA,OACA,SACA,gBACA,eACA,wBAGA,YACA,QACA,WACA,GACA,IACA,CACA,QAEA,qnBCmBA,SAGA,8DACA,2EACA,+DACA,oEACA,8EACA,sDACA,gEACA,kFACA,qFACA,kEACA,8DACA,2DACA,qEACA,oCCuCA,mBACA,WACA,WAEA,kCAEA,WACA,cACA,kBACA,kDAhIA,SAqBA,GACA,mBAIA,WACA,OACA,QAQA,yBACA,CACA,QAKA,uBACA,OACA,gCACA,EAmBA,MACA,qCACA,gCACA,6BAEA,cAMA,iBAGA,0GAKA,gBAMA,qBAHA,QAIA,IAQA,GACA,sCACA,gCAEA,+BAMA,qBAGA,oHAEA,6BAEA,MACA,IAAC,GAaD,iCClIA,qBAcA,GACA,mBASA,0BACA,CAQA,cAQA,YACA,UAUA,eACA,aACA,IAKA,QAEA,gDAIA,gCAFA,KASA,SACA,aACA,QACA,yBC3EA,qBAaA,GAiLA,IAhLA,KAIA,cAOA,MASA,kCAYA,wBAQA,2BACA,IAOA,YACA,mEACA,sBAEA,YACA,uCACA,cACA,CAWA,oBAEA,IAKA,oCAGA,iBAKA,iCACA,sBAEA,UACA,eAGA,MACA,OACA,EAQA,YACA,6BAEA,mCACA,UASA,sBACA,iBACA,4BACA,MAQA,kBACA,wBACA,MAQA,iBACA,2BACA,MASA,kBACA,wBACA,MAQA,aACA,6BAGA,qBACA,0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A,SACA,SAAG,aACH,oBAGA,MACA,QACA,EAQA,MACA,OAMA,eAOA,MAQA,eAQA,iBAQA,oBACA,sBAQA,WACA,eACA,eAQA,cACA,eACA,kBASA,qBACA,0BACA,OAOA,SACA,qBAGA,MAGA,iBADA,kBAWA,gBACA,KAEA,eACA,YAGA,cACA,qBAAyB,QAEzB,aAUA,eACA,wCACA,YAEA,cACA,UACA,wBAIA,MACA,QAUA,4BACA,IAEA,8CACA,CAEA,cACA,4BACA,CACA,KACA,KAGA,CACA,KAEA,KAEA,CACA,QAWA,wBACA,cAEA,wBACA,kBACA,aAIA,SACA,QAmC0B,uEC/sB1B,OAyBA,GACA,OAIA,cAOA,kBACA,IAOA,oBACA,sBACA,QAQA,OACA,sBACA,MASA,OACA,8BACA,IAgBA,SACA,0BACA,uBAEA,YACA,WAEA,gBACA,WAGA,cACA,SAEA,aACA,qBAEA,WAIA,qBAHA,mBAEA,aASA,UACA,0BACA,uBAGA,iCACA,oBAEA,oBAMA,qBAQA,yBACA,eACA,mBACA,sBAGA,QAKA,UACA,8BACA,cAGA,gCAEA,UACA,eAeA,oBACA,8BACA,6BACA,OAGA,QAQA,kBACA,GACA,6BACA,sBACA,IAeA,QAEA,cA6BA,KACA,OAOA,iBAOA,MAQA,YAGA,yDACA,oDACA,KAOA,WACA,UACA,yBAGA,2GACA,MAOA,SACA,UACA,yBAGA,2GACA,IAcA,WACA,UACA,yBAGA,6FACA,WA6BA,EAEA,cAMA,sBCxVA,qBAuBA,IACA,mBAMA,eACA,CAQA,aACA,QAmBA,SAAuC,KACvC,uBACA,MAEA,cACA,aACA,WACA,GACA,CAEA,OACA,UACA,mGCvEA,QAiCA,GACA,OAMA,eAOA,MAQA,qBAQA,oBAiBA,yCACA,aACA,+BAIA,uDACA,kBACA,kBAAG,EAAG,UAGN,mDACA,oBAEA,2BACA,8BACA,QAAG,EAAG,UAGN,sDACA,qDACA,WAEA,oDACA,wDACA,WAGA,yEAGA,0DAAsD,UACtD,sDAA4C,UA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AGA,WAGA,IAEA,IACA,mBC/DA,aA6BA,IACA,WACA,cACA,WACA,CAKA,yBAMA,CAEA,aAPA,CAIA,4EC3CA,SAoBA,GACA,mBAMA,eACA,CASA,6BAQA,wBAEA,yCACA,YACA,OAKA,yDAQA,0BAEA,0BACA,gCACA,SAKA,sBACA,sBACA,OACA,uDC1EA,QAeA,GACA,mBAMA,eACA,CACA,sBACA,WAOA,wBAOA,wBAQA,oBAQA,kCACA,yCACA,KACA,iBACA,CAKA,yDACA,kBACA,aACA,uBAA6D,2BAE7D,aACA,CACA,KACA,kBACA,IAAsD,2BACtD,SAEA,4BACA,GAEA,sBACA,KACA,iBACA,OACA,mCAEA,8BAEA,KACA,KACA,iBACA,OACA,uBAEA,8BAIA,QACA,8CClGA,OAkBA,GACA,mBAMA,eACA,CASA,wBAQA,kBAKA,OACA,MACA,8BACA,MAKA,UACA,sCAEA,eACA,SAOA,wBACA,+CACA,KACA,iBACA,CAMA,qEACG,OAEH,uBACA,cACA,8CCrDA,SACA,aACA,eACA,eAEA,wCClCA,SAaA,GACA,mBASA,iBACA,CACA,wBACA,oBAOA,kBACA,+BAIA,YACA,MACA,4BACA,OANA,8BAEA,YAOA,+BACA,8CC7CA,OAgBA,GACA,mBAQA,iBACA,CAEA,sBAGA,mCAGA,yCACA,KACA,iBACA,OACA,sCACA,cACA,sBAEA,6DAUA,gBAQA,0BAQA,qBAQA,iBAMA,OACA,MACA,yCAEA,2CAGA,cACA,MAKA,UACA,MACA,2CAGA,uBACA,SACA,6DCtGA,OAYA,KAEA,oBAIA,MACA,mBAIA,eACA,CAEA,sBASA,sBASA,wBAaA,yCAYA,qCAgBA,iCAUA,0BAWA,eAYA,qCAQA,8CAiBA,yCACA,KAEA,iBACA,OACA,CAEA,kCACA,uDAEA,8CACA,uBACA,iEAGA,uCACA,iCAGA,0CACA,mCAGA,sBAIA,+BAUA,2CACA,KACA,iBACA,CAGA,6CACA,wCACA,+BACA,iCAIG,UACH,QAKA,OACA,OAEA,0E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ACA,aACA,OACA,MAnDA,YACA,EAEA,EAsCA,sBArCA,CACA,YAEA,IACG,KACH,eACA,wBAEA,OAEA,MACA,MACA,SACA,gBAIA,QAEA,OACA,YAEA,WAEA,MACA,MACA,SACA,gBAIA,GAEA,GAEA,6CCzEA,QAgBA,KACA,mBAQA,iBACA,CASA,gCACA,WAOA,aACA,aACA,OAKA,UACA,OAEA,uBACA,SAgBA,SAAsB,KACtB,qBACA,mBACA,OACA,8BACA,oBAEA,iCACA,WAEA,yBAGA,6BAIA,6CAIA,sDAGA,gEAGA,8BAEA,sBACA,QACA,EACA,qDCtGA,SAiBA,KACA,mBAIA,wBACA,OACA,QAEA,OACA,cACA,mBAEA,mBAEA,8CACA,8CAEA,6CACA,2DAA8E,wBAC9E,aACA,mBACA,sBACA,EACA,mFCzCA,SAsBA,KACA,mBAQA,iBACA,CASA,cASA,yDACA,mBAYA,SAAsB,KACtB,qBACA,uBAEA,0BACA,cAEA,yCAOA,eAGA,iBACA,iCAAgD,iCAIhD,oEACA,GAMA,iBAJA,0CAKA,YAGA,aAEA,wDACA,WACA,iBAAuB,yCAEvB,aAEA,wCAAiE,CACjE,yCAEA,+CAEA,yBACA,QACA,EAoBA,+CAEA,IACA,IAGA,6BACA,aACA,qBAIA,sCAEA,4BACA,GAGA,4BAAgC,2BAChC,OAGA,4BAKA,aAKA,0BAOA,qCACA,qBACA,aACA,qBACA,6BAEA,2CACA,2CAEA,iBACA,iBACA,sDCrLA,SAiBA,IACA,mBACA,eACA,CAEA,eAEA,sBACA,wCACA,eAEA,EAEA,yBACA,MAEA,wBACA,mBACA,iBACI,mCACJ,sBACA,kBAEA,gBAGA,iCACA,gBAEA,gCACA,YACA,EAKA,WACA,EAcA,6ECpEA,kBAkGA,KACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,MAIA,OACA,cACA,WACA,8CACA,+CACA,6BACA,kCACA,wCACA,OAUA,oBACA,cACA,oBACA,wCACA,YACA,QASA,aARA,CACA,QACA,OACA,YAEA,sCACA,6CACA,aAEA,EACA,qDCrJA,SAoBA,KACA,mBAIA,eACA,CAwBA,gCACA,QAKA,OAEA,gCACA,uCAGA,6CACA,mDAEA,qEAEA,6BAGA,0DAEA,yBACK,+CAGL,2BACA,8BAKA,kCACA,OAAG,EAAG,UAEN,8DACA,mBACA,WACA,EACA,yBCzFA,qBAmBA,KACA,mBAUA,gBAEA,qEAEA,4BAIA,2CACA,sBAEA,wDACA,mEAEA,mCACA,QAEA,QACA,SACA,EAMA,uBCvDA,qBAoBA,KACA,mBASA,UACA,qBAIA,8CACA,8CACA,gCACA,sCAEA,mEACA,2BACA,MAEA,QACA,SACA,8CC9CA,OAkBA,GACA,mBAIA,cACA,CAEA,qBAQA,sBAUA,8BAEA,mCACA,KACA,SACA,wCACA,OACA,uBAMA,gDACA,gBACA,sCACA,iBAEA,WACA,6DAEA,GACA,EACA,8CCnEA,OAgBA,GACA,mBAIA,eACA,CAQA,yBAqBA,wBAEA,kBAEA,mCACA,KACA,kBACA,OACA,CACA,kCACA,iDAGA,mBACA,CACA,KAEA,kBACA,CAKA,qCACA,CACA,WAMA,aACA,qBCnFA,U,yPCAA,U,0RCAA,QA8BA,KACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,uBAIA,OACA,gCAKA,gGACA,GACA,EAMA,MACA,OAQA,mBAMA,MAMA,cAMA,WACA,GAOA,SACA,2BACA,MACA,oBACA,yBACA,cACA,EAOA,QACA,MACA,cAEA,OAMA,eACA,qBACA,mCACA,uBACA,MAQA,oBACA,cACA,WACA,cACA,6BAA4D,eAC5D,mCACA,qCACA,mCACA,WACA,qBACA,gBAEqB,WACrB,4CADA,UAIA,KACA,kDACA,GACA,mCACA,mBAEA,OAEA,EAMA,eAEA,YACA,wCACA,oCAEA,iBACA,OA4BA,yCCpMA,QAgBA,GACA,OACA,cACA,oBAQA,gBASA,4BAEA,qBACA,eACA,MACA,CAOA,YACA,qBACA,KASA,QACA,cACA,4BAEA,wBACA,cACA,KACA,OAEA,gBAC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AIA,eACA,gCACA,OAEA,IAEA,QAGA,8CACA,2BAIA,eACA,gCACA,OAEA,IAEA,eAIA,sCAEA,oBAEA,4BAGA,oBAGA,gBACA,UAEA,SACA,EACA,EACA,yDC5MA,iBAiBA,KACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,MAIA,OACA,cACA,WACA,mBACA,UAEA,+CACA,YACA,QAUA,aATA,SACA,eACA,EACA,YAEA,qDAEA,qDACA,UAGA,sBACA,OACA,6DCxDA,QAYA,KAEA,QASA,OACA,mBAIA,OACA,cACA,WACA,SAGA,gCAAiC,oCAEjC,mCAAiC,oCAGjC,uDACA,aACA,2BAGA,8BACA,yBACA,sBACA,mBACA,gCAGA,sCACA,UACA,qBCrDA,U,8qCCAA,iBAiBA,KACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,QAIA,OACA,cACA,WACA,mBACA,YAEA,iDACA,YACA,QAUA,aATA,SACA,iBACA,EACA,YAEA,qDAEA,qDACA,YAGA,sBACA,SACA,6DCxDA,QAYA,KAEA,QASA,SACA,mBAIA,OACA,cACA,WACA,SAGA,gCAAiC,oCAEjC,mCAAiC,oCAGjC,uDACA,aACA,2BAGA,yBACA,yBACA,kBACA,mBACA,iCAGA,sCACA,UACA,qBCrDA,U,iuBCAA,kBAoBA,KACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,YAIA,OACA,cACA,WACA,mBACA,0DACA,YACA,QAUA,aATA,SACA,sBACA,EAGA,qDAEA,qDACA,gBAEA,EAIA,YACA,cACA,wBAMA,oEACA,qBACA,yCACA,6CACA,4BACA,uCACA,yBACA,mBAEA,OACA,EACA,8DC7EA,QAsBA,IACA,mBAIA,OACA,cACA,oBAEA,sCAEA,wBACA,sBAAiB,0BACjB,kBAAiB,sBAEjB,wCACA,yBACA,wBAEA,6DACA,yBACA,wBACA,aAKA,YACA,8BAIA,iBACA,qBACA,MACA,kBACA,aAGA,8BACA,sCC6HA,aACA,4CACA,IASa,CACb,aACA,OAEA,EADA,OAGA,uBACA,SACA,WAGA,aAGA,sBACA,sCACA,mBAGA,MACA,GAEA,CACA,QAEA,CACA,eACA,iBACA,MACA,wBAEA,4BACA,QACA,6BACA,2BAGA,qBACA,oCA5OA,OAoBA,IACA,mBAYA,UACA,iBACA,gCACA,eAYA,SAAsB,KACtB,qBACA,aACA,oBACA,iCAEA,0CACA,SACA,4BACI,eACJ,kBAGA,WAGA,aACA,gBACA,CACA,EAQA,YACA,oDAGA,iCACA,KAQA,gBACA,SACA,MAGA,sCACA,iCAEA,uBAMA,gCACA,MAaA,kBAEA,6BACA,6BACA,QAMA,6BAJA,6BAKA,kCAEA,QAGA,cADA,SAKA,OACA,mBAKA,mCAEA,UACA,SACA,EASA,iBACA,MAGA,kCACA,WAGA,qBAEA,gBAGA,aACA,OAMA,sBACA,SACA,4BAOA,qBACA,qBCzLA,U,g+BCEA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAAkI,2GAElI,2DCPA,SA2BA,KACA,mBAIA,sBACA,OACA,CACA,IACA,IAEA,IAKA,wBACA,OACA,WACA,qDC9CA,QAsBA,KACA,mBAIA,sBACA,QACA,IAKA,OACA,cACA,WAEA,0CAEA,kDACA,+BAEA,2BAIA,iCAEA,qDACA,gBAEA,kBACA,EAIA,MACA,OACA,iBACA,MAEA,qBACA,QAEA,SACA,gEAEA,6CACA,2BACA,6BACA,QAEA,qBACA,MAEA,QACA,mBACA,OAIA,EACA,iBA2CA,qBC9HA,qBAWA,KA2DA,IA1DA,KAOA,iBACA,IACA,mBAGA,6BACA,mBASA,qCAQA,cACA,aAwBA,UACA,mCACA,YACA,iCCkJA,mBACA,IACA,oBACA,sBAEA,KAEA,eAAuB,MAA4B,YACnD,mBACA,eAEA,kBAAmB,MAAkB,OACrC,WAGA,wBACA,eAEA,mBAAgC,CAChC,QAAE,SACF,iBACA,2CACA,CAQA,CACA,aACA,IACA,mBAGA,mBACA,uBACA,OAEA,SAhQA,OAUA,G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WAIA,aAIA,aAGA,WACA,mCAEA,OACA,CAGA,GACA,qBAEA,0BAjUA,QA0BA,IAgIA,WASA,uCCjCA,eACA,sDACA,MAMa,CACb,eACA,iBACA,SACE,8BAKF,0BACA,MAMa,CACb,aACA,uCACA,MAWA,SAxKA,OAoBA,GACA,OAIA,cACA,MACA,SAQA,OACA,cAGA,WACA,QACA,+BAGA,UACA,+BACA,CACA,gBAGA,iBAQA,UACA,cAEA,WACA,QACA,+BAGA,UACA,+BACA,CACA,gBAGA,iBASA,qBACA,cACA,mCAGA,YAKA,QACA,gBAKA,SAEA,eACA,SAGA,eACA,KAQA,qBACA,cACA,mCAGA,KACA,gBAEA,EACA,QAEA,cAMqB,mCC4KrB,aACA,eACA,mBACA,kBACA,gBACA,SAKa,CACb,aACA,8BACA,SAKa,CACb,aACA,eACA,UAKa,CACb,aACA,SACA,oCACA,MAGA,aACA,MAEA,CACA,iFAlVA,iBAmBA,KAEA,oBAUA,UACA,mBAIA,wBACA,OACA,QAKA,OACA,6BAEA,QAIA,6DAEA,eACA,oBAGA,eAGA,kBAEA,+BAIA,uBAAiC,cACjC,qBACA,KACA,IAAG,EAAG,UAGN,sBACA,2DAGA,+DAAsF,UACtF,QASA,kBACA,cACA,mBACA,aAGA,UACA,KAIA,kBACA,2BAEA,KACA,IAIA,SAGA,mBACA,aAIA,iCAEA,gDACA,MACA,2BACA,EASA,gBACA,WACA,kDACA,cAIA,MACA,YACG,iBACH,YACG,oBACH,cAIA,yCACA,mBAEA,OASA,iBAEA,gBACA,WAGA,2BACA,aAGA,gBACA,YAGA,oBAEA,oCACA,KAiBA,4BAhBA,WACA,2BAGA,kBACA,MACA,SAEA,SACA,SAEA,MACA,2BAEA,KAUA,oBACA,qBACA,aACA,WACA,cAGA,iDACA,iCACA,8DAGA,YAMA,+BALA,aACA,IAGA,KAKA,OACA,YAGA,oBAEA,gFACA,MAMA,4BALA,MACA,2BAEA,KAYA,kCACA,qBACA,aACA,cACA,WAEA,4CAIA,+BACA,GACA,QAGA,MAQA,4BACA,+CACA,aAWA,oCACA,qBACA,aACA,WACA,wBAIA,WACA,2CAA0C,uBAC1C,kDAEA,mDAIA,QACA,IACA,EAKa,uBC5Sb,qBAmBA,IACA,mBACA,eACA,CAEA,2BACA,WAEA,cACA,aACA,OACA,EAaA,sBCzCA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAAggB,yeAEhgB,yHCPA,iBA0BA,KACA,mBAIA,sBACA,OACA,CACA,IAEA,IAIA,wBACA,OACA,sBAIA,OACA,MACA,qBACA,aAOA,gBACA,cACA,wBACA,4BACA,wDACA,YACA,QAQA,aAPA,SACA,wCACA,EAEA,sCACA,gDACA,cAEA,EAOA,cACA,cACA,mBAOA,2CAMA,0CACA,8CACA,kCAAoD,oDACpD,aACA,aACA,yCACA,MACA,aAEA,0CACA,MACA,cACA,GAEA,gCACA,eACA,gBAEA,mBAEA,aAHa,aAGJ,EAAG,UAEZ,oBACA,cACA,yBACA,uCACA,2BAEA,aAMA,YACA,UAGA,yBACA,wBACA,qCACA,wCACA,0BACA,WACA,sBAQA,qDACA,2BACA,SAOA,aACA,MAGA,uCAEA,mCAEA,QAQA,iBACA,wCACA,KACA,8CC7KA,SAiBA,GACA,mBAIA,OACA,8DACA,QACA,8CCzBA,QAgBA,IACA,mBAYA,UACA,wCAEA,2CAEA,kDACA,uBAIA,MAWA,WACA,qBACA,uBAEA,0CACA,oBAEA,iCACA,SACA,EACA,gHC5DA,QAqBA,KACA,mBAIA,eACA,CACA,6BAOA,uBAOA,wBAMA,4BAMA,mEACA,kCAMA,8DAQA,8BAQA,+BACA,iBACA,8BACA,mCACA,mBAEA,eAEA,wBAGA,iDAAuD,YAAc,CACrE,oDACA,KACA,kBACA,CAEA,6CAEA,eACA,MACA,aACA,KACA,iBAAiC,CACjC,uDACA,MACA,oBAKA,kCAAuB,MACvB,OACA,MACA,kBACA,oBACA,+BAEA,kBAEA,+BACA,QACA,EAIA,OACA,OACA,qCACA,QASA,mBACA,sBACA,QAMA,SALA,UAEA,wCAEA,SAQA,0BACA,qBACA,wBACA,KAEA,iBADA,qBAEA,8CC5JA,OAgBA,GACA,mBAIA,eACA,CAQA,kBAQA,iBAEA,oBAEA,mCACA,KACA,mBACA,CAGA,4BAEA,iBACA,CACA,WAIA,WACA,sCCgGA,iBACA,MAAQ,cAAkB,QAE1B,0BACA,YAYmB,CACnB,qBACA,OACA,IACA,EACA,EAGA,YAEA,6BACA,aA+CA,CACA,IACA,IACA,IACA,GAIA,YAtDA,YACA,GAEA,EACA,UAEA,WAKA,yBAEA,uBAEA,CACA,UAKA,sCAIA,2BACA,GACA,KAIA,IACA,MACA,KAKA,SACA,KACI,UACJ,KAIA,IAUA,KAEA,WACA,IAOoB,CACpB,WAAsC,QAAY,OAClD,MAAQ,WAAmB,eAE3B,aACA,MACA,QAEA,IAkDA,KAjOA,SAAqC,0CAAqD,iBAG1F,QACA,YAKA,YACA,YAGA,2BACA,oBACA,aAEA,WACA,GAGA,SACA,aACE,YACF,uBACA,8BAEA,QACA,MAGA,kBACA,OAEA,IAAM,QAAY,OAElB,UACA,cACA,kBAMA,aACA,UAOA,SACA,gBAOA,eACA,UACA,GAEA,OAAS,cACT,OAQmB,oCAxJnB,SA8EA,kCC9EA,IAiBA,WACA,0CACA,IACA,kDAGA,aACA,aAEA,OACA,eAXA,iBChBA,U,qnECEA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAAkd,2bAEld,qBCLA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAAqrB,8pBAErrB,6ECPA,SAoBA,KACA,mBAIA,sBACA,QACA,IAIA,OACA,cACA,WAEA,+CACA,YACA,yBACA,eAoBA,aAnBA,SACA,uBACA,EACA,wBACA,UAEA,4CACA,yBACA,8BACA,gCACA,kBACA,iCACA,CACA,OAGA,YACA,CACA,IAEA,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AaA,4BCzBA,cAIA,YACA,YAAqrB,4pBAErrB,mCCyHA,eACA,6CAIA,OAkEA,6DAvMA,gBAsBA,KACA,mBAIA,sBACA,OACA,CACA,IAEA,IAIA,wBACA,OACA,SAIA,OACA,cACA,YACA,YACA,uBACA,SACA,MACA,sBACA,4BACA,0BACA,wBACA,eACA,qBACA,cAEA,gCAEA,WACA,SACA,OAEA,iBACA,CACA,YACA,QAEA,gCACA,UACA,4BACA,yBACA,UACA,iBACA,qBAEA,yBACA,OAEA,6CACA,gBACA,UAOA,6BAPgD,YAAc,CAE9D,gEACA,oBACA,4BACA,OACA,IAEA,EAYA,uBACA,cACA,WACA,IACA,aACA,2BACA,2BACA,2BAEA,8DACA,aACA,OAKA,eAHA,iBAAyC,YAAW,CAEpD,YAEA,EACA,EAQa,oCCxDb,eACA,gBACA,MACA,uBAEA,kCA5EA,OAiBA,IACA,mBAYA,UACA,qBACA,mCAEA,0CACA,uCACA,OAaA,SAAsB,KACtB,qBAEA,8BACA,oBACA,qCAEA,6BACA,kCACA,oBAGA,YACA,EACA,EAOa,mECtEb,SAaA,KAEA,QAOA,YACA,mBAIA,eACA,CAEA,mCACA,SACA,CAAK,kDACL,wBAAK,kEACL,uBAAK,kEACL,uBAAK,kEAGL,yBAKA,sBACA,QACA,IAKA,OACA,cACA,WACA,SACA,uBAEA,4BAEA,UAEA,iEAGA,4CACA,2BACA,0BAGA,iCACA,2BACA,yBAGA,wDAGA,eAKA,YAGA,cACA,wBACA,wBAGA,4DACA,iDACA,WACA,2BAEA,4BACA,oBAEA,WAEA,EACA,sCCRA,iBACA,gBACA,CACA,kBAEA,kCAjGA,OAiBA,IACA,mBAOA,iBACA,CAiBA,cACA,cAKA,UACA,oDAEA,+CACA,6EACA,OAWA,SAAsB,KACtB,cACA,WAEA,8BACA,oBACA,iCACA,4BACA,6BAGA,kBACA,kBACA,+BAGA,aACA,EACA,EAQa,oDC3Fb,OAiBA,IACA,OAOA,iBAGA,gBAKA,gBAEA,MACA,Q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EA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAA6T,sSAE7T,kDCPA,kBAiBA,KACA,mBAIA,sBACA,QACA,IAKA,wBACA,OACA,cACA,sCC2GA,mBACA,IAGA,8BACA,cACA,MAEA,uCACA,WACA,qDACA,uCAGA,QACA,gDAEA,WAEA,EACA,EAMY,CACZ,kBACA,kBACA,WAEA,WAGA,sCACA,sBACA,UAEA,oDACA,uCAEA,MACA,uBAEA,4BACA,OACA,CACA,CAOkD,CAClD,mBACA,wBACA,WACA,cACA,iBAMA,CACA,aACA,wBAAyC,CACzC,+BACA,uCAGA,yBACA,I,8EApNA,QA6BA,KACA,mBAIA,OACA,cACA,WACA,qBACA,SACA,WACA,SACA,YAcA,sCAEA,iDACA,kBACA,MACA,iBAEA,oBACA,MACA,iBAEA,uBAEA,gBAEA,iEAEA,uDAEA,4DAEA,qFAAgG,UAEhG,8FAAiH,UAEjH,sEAAsF,UACtF,QAOA,2BACA,6BACA,UAEA,yDACA,+CAGA,0CACA,cACA,yCACA,gBACA,YACA,gBAEA,WACA,yBAEA,gBAGA,oCACA,kBAEA,uBAQA,yBACA,SACA,2BACA,YACA,WAEA,uBACA,yBAEA,wBAGA,aACA,CACA,EAIA,wCCnHA,aACA,WACA,iBACA,uBACA,aACA,+BAEA,iBACA,OACA,CAiBA,MACA,WACA,kBACA,mCACA,kBAIA,eACA,KASA,MACA,WACA,WAGA,mEACA,SAAU,CAGV,SACA,6BA7EA,SAY2B,KAE3B,eAQA,8CC4CA,aACA,WAEA,uBACA,oCAEA,sBACA,iBAEA,SAKgD,CAChD,aACA,WAEA,gBACA,UAEA,MAMoB,CACpB,eACA,WAGA,SAIA,gBACA,cAGA,cACA,IAOA,0BALA,uEAQA,uBACA,6BAMA,+BACA,sBAEA,gCAEA,wBApGA,eACA,WAEA,YAMA,iBAIA,qFAGA,OACA,oBACA,qCAAmF,UAKnF,yBAGA,+BAGA,SACA,MAMA,yBAjEA,gBAYA,KAEA,WACA,cAEA,KACA,WAUA,yBC1BA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAA8H,uGAE9H,qBCLA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAAsJ,+HAEtJ,kDCPA,SAmBA,IACA,mBAIA,sBACA,QACA,IAKA,wBACA,OACA,YAKA,OACA,cACA,4BAEA,qBACA,aAEA,gBAQA,iBACA,cACA,0BAEA,4CACA,YAEA,QAYA,aAXA,SACA,aACA,KAGA,sCACA,iCAEA,mDAEA,QAEA,EACA,EA0EA,oCC0DA,aACA,WACA,kBAEA,gBAGA,mBACA,cAAoC,UAGpC,qFAA4F,CAE5F,WAAqB,CAKrB,2BACA,aACA,eACA,sBACA,UACA,yBAGA,MACA,GAGA,CAIA,mCAHA,mBAEA,QAyBA,gGAxQA,kBAwBA,KACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,kBAIA,OACA,cACA,WACA,aACA,WACA,SAEA,wBAKA,iEAGA,oBACA,MACA,mBACA,oBAGA,yBACA,yBACA,oDACA,oDACA,uDACA,uDACA,uDAEA,uFAAkF,UAElF,iBACA,iCAEA,UASA,kBAEA,SACA,+BAEA,wBACA,aACA,cACA,4CACA,uBACA,UAGA,SACA,qBAGA,UAEA,oBACA,oBAiBA,mCACA,qBACA,QACA,qBACA,kCACA,qCACA,yCACA,0CAEA,uBACA,EAiBA,MACA,gBAEA,gBACA,MACA,uBACA,yBACA,EAGA,6BACA,MACA,uBACA,oBACA,YAGA,wCACA,MACA,4BACA,4BACA,YAGA,gDACA,MACA,8BACA,wBACA,YAGA,iDACA,MACA,6BACA,6BACA,YAUA,4BACA,eACA,QACA,SACA,UACA,WAOa,yCC7Mb,QAgBA,IACA,mBAOA,iBACA,CAiBA,cACA,OAKA,UACA,wCAEA,2CAIG,oCACH,0BAEA,uDAEA,KAUA,SAAsB,KACtB,SACA,MAGA,2BACA,uBAEA,0CACA,oBAEA,iDACA,KACA,EACA,sCClBA,mBACA,WACA,UAIA,mBAA4C,SAK5C,oBAKA,0CAEA,6BAAoC,+BAKpC,6BAAyC,SACzC,0CACA,OAMY,CACZ,eACA,UACA,aACA,SAGA,QAQqB,CACrB,iBACA,kCACA,wCAMA,cAQqB,CACrB,iBACA,+BACA,qCAMA,mBAxHA,WACA,kBACA,2BACA,OAEA,0BAKA,qBACA,2BACA,gDAEA,QACA,WAGA,UACA,mBAEA,QACA,CAOA,EA/CA,IAgDA,WAEA,0BAEA,4BACA,UACA,QAEA,UACA,CAQkB,UAhDlB,iBCjBA,U,0JCAA,U,oMCAA,U,uQCAA,U,kRCAA,QAgBA,KAYA,mBAIA,sBACA,QACA,IAKA,wBACA,OACA,cAKA,YACA,cACA,sBAGA,sBAUA,+CASA,sCAGA,uCACA,YACA,OAKA,2DAGA,4DACA,MACA,iBAAG,EAAG,UAGN,+DACA,MACA,iBAAG,EAAG,UACN,QAQA,kBACA,cAEA,yBACA,qCAGA,gBAEA,oBAGA,oBANA,cAaA,eACA,cAEA,YACA,kBAEA,oCACA,6BACA,WACA,yBACA,QAIA,iBAzGA,oDAgHA,eACA,MAIA,sCACA,SASA,iBACA,wCACA,QACA,EAwBA,oCCmIA,aACA,+CACA,K,+FA1TA,kBAiBA,KACA,QAQA,SACA,mBAIA,sBACA,OACA,CACA,IAEA,IAIA,wBACA,OACA,MAIA,OACA,cACA,kCAMA,wBAOA,0CAEA,UAEA,gCACA,gBAOA,cACA,cACA,mBACA,yBACA,yBACA,UAuBA,yCArBA,iEACA,uCACA,2CAEA,mCACA,mDACA,YACA,cAEA,gCACA,WACA,eACA,cAEA,qCAEA,8CACA,MACA,eACA,GACA,IAQA,2BACA,cACA,wBACA,YAEA,4BAEA,CACA,MACA,gBAEA,cACA,yCACA,YACA,QAUA,SATA,uBACA,iBACA,IACA,cAEA,oCAEA,gDACA,iBAEA,EAOA,iBACA,6BAGA,iCACA,cAGA,kCAEA,YAEA,2CACA,uEACA,0BACA,QAEA,IAAS,EAIT,UAGA,iDACA,kCACA,gBACA,aAEA,IAEA,eACA,cACA,kDACA,8CACA,2BAEA,cAOA,cACA,cACA,wBACA,yBACA,cACA,YACA,mBACA,mBAEA,qEAOA,sEACA,gCACA,cACA,wCACA,eAMA,IACA,WAQA,iDAEA,0BACA,8BAEA,8CACA,qCAGA,4BACA,WACA,uBAGA,0DAGA,SASA,cACA,6CACA,qCAIA,wCAEA,oDACA,oCACA,UAWA,0BACA,6BACA,YACA,4BACA,iBACA,0DACA,uBAAgB,CAChB,SAYA,0BACA,kCACA,eACA,uBACS,wBAGT,2BACA,mBACA,aACA,eACA,kCAMA,aAEA,KALA,IAMA,CACA,EAKsD,uBCvTtD,qBAmBA,IACA,mBACA,eACA,CAEA,2BACA,OAEA,cACA,aACA,OACA,EAcA,4EC5CA,SAsBA,KACA,mBAIA,OACA,cACA,WACA,SAGA,gCAAiC,6CAEjC,mCAAiC,6CAGjC,uDACA,2BACA,2BACA,qBAA+C,CAG/C,SAGA,kBADA,GAIA,uBAEA,kBAAW,oBAAwB,MACnC,0BACA,KACA,gCAIA,oCACA,oCACA,QACA,8DC9DA,OAkBA,KACA,mBAYA,UACA,qBAEA,6CACA,0EACA,WAkBA,WACA,qBACA,aAEA,+BAEA,WAGA,yBACA,WAGA,iDAEA,yDAEA,8BAGA,0BACA,IAEA,KACA,mBAAmC,CAEnC,eAGA,6BACA,aACA,CAAI,KAGJ,+CAEA,qBACA,yBAEA,aACA,CACA,EACA,8CChGA,QAgBA,KACA,mBAIA,UACA,4DACA,WAUA,UACA,qBACA,aAEA,+BAEA,WACA,6EAGA,gBAGA,iBACA,4BAEA,WACA,EACA,gHCnDA,SAuBA,IACA,mBAIA,eACA,CACA,mBAOA,uBAOA,wBAMA,4BAMA,2DACA,kCAMA,8DAMA,+DAQA,8BAQA,+BACA,iBACA,8BACA,mCACA,mBAEA,eAEA,wBAGA,iDAAuD,YAAc,CACrE,oDACA,KACA,kBACA,CAEA,gCAEA,eACA,MACA,aACA,KACA,iBAAiC,CACjC,0CACA,MACA,oBACA,sBAKA,kCAAuB,MACvB,eACA,MACA,kBACA,oBACA,sBAEA,iCAEA,kBAEA,+BACA,QACA,EAIA,OAEA,sCACA,eACA,MAIA,QACA,mBACA,YAOA,kBACA,qBACA,wBACA,KAGA,iBAFA,oCACA,uBAUA,mBACA,sBACA,QAMA,SALA,UAEA,wCAEA,SAEC,EAeD,mBC9LA,U,6rBCEA,CACA,QACA,oCACA,MACA,SAEA,EACA,EAEA,cACA,gCAaA,4BCzBA,cAIA,YACA,YAAwa,iZAExa,wFCPA,OAmBA,IACA,mBAIA,sBACA,QACA,IAIA,wBACA,OACA,MAIA,OAEA,qBACA,sDACA,uDAGA,yDACA,qBACA,yCACA,sDACA,8BACA,iBACA,mBAEA,OACA,WACA,YACA,8BACA,SACA,wBACA,WAEA,IAEA,qCACA,wDACA,eASA,kBACA,cACA,oBACA,wCACA,YACA,QAUA,aATA,CACA,QACA,OAGA,qDAEA,6CACA,aAEA,EACA,sCCoCA,aACA,OAEA,mBACA,+BACA,8BACA,iBAKA,KACA,0CAzIA,SAoCA,KACA,mBAIA,sBACA,QACA,IAKA,OACA,cAMA,oBACA,iCACA,kBACA,MACA,kBACA,QAEA,mDAGA,wCACA,SAEA,2EAAoF,UAIpF,mDACA,IACA,iCACA,gBACA,sBAIA,qBAAG,EAAG,UAEN,4CACA,2CAEA,0CACA,uCACA,uCAEA,mCAA6D,UAC7D,4CACA,mCAA0D,UAC1D,4CAIA,sDACA,sDAEA,wCACA,mCAA0D,UAC1D,2CACA,mCAAuD,UAEvD,2DACA,wDAEA,uCAAiD,UACjD,2CAAiD,UACjD,2CAAqD,UACrD,uCAGA,8BAAoD,UAGpD,iDACA,qDAGA,mDACA,mDACA,YACA,sCCgJA,iBAEA,2BAEA,WACA,4CAcA,gCAIA,8CACA,+BACA,6BAIA,0BAEA,4BAGA,mCAGA,cAOa,CACb,eACA,gBACA,MACA,WACA,wCAEA,kCA9TA,OAiBA,IACA,mB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ACA,IACA,iBACA,iBAEA,WAEA,KAEA,QAEA,IACA,SAGA,QACA,IAEA,OACA,KAGA,CACA,eACA,sDACA,6BAGA,gBACA,IAKA,CACA,mBACA,WAGA,iBAKgD,gCAEhD,sBAFA,2DAKA,WACA,0CACA,eAEA,UAEA,qBAMA,2DAEA,0CAIA,uCACA,UAQA,yCAIA,mBAGA,SAOA,oBAEA,IAAG,wCAGH,gBACA,WAGA,wCAGA,4CAEA,UACA,YACA,0CACA,qBAEA,2BACA,WACA,SAGA,OACA,iBACA,kBAGA,CACA,qBAKA,aACA,CACA,cACA,iBACA,oBAIA,wCAEA,QAEA,MAiBA,GACE,iBAkBF,4BACA,aACA,cAAE,KAmBF,wBACA,WACA,iBAEA,GAIA,yBACA,iCACA,uCAEA,UACA,iBAGA,mBAEA,CACA,eACA,wBACA,gCAEA,iBAEA,uDACA,gBAEA,oBACA,eAIA,KACA,QAMA,CACA,aACA,iDACA,kBA3/BA,iBACA,kBACA,yBACA,oCAKA,yCACA,2BACA,sCAEA,iCACA,aAGA,sCAEA,yBACA,UAaA,MACA,iBACA,sBACA,wBAGA,wCAIA,6BACA,wCAIA,wBACA,oDACA,WAGA,kBACA,iBACA,kBAUA,MACA,iBACA,sBACA,UAGA,uCACA,4DAEA,iBAIA,iCACA,wCAGA,0BACA,WACA,sBACA,gBAEA,eACA,mBAIA,4EAIA,QACA,kEAEA,KAUA,MACA,iBACA,sBACA,0BAGA,wCAIA,6BACA,wCAGA,0BACA,WACA,sBACA,gBAGA,aAEA,QACA,sBAIA,sBAIA,yDAGA,qBACA,SA0BA,MACA,iBACA,4BACA,uCAEA,YAgDA,iCACA,6BAEA,kBAMA,4BACA,6BAGA,wBACA,uBACA,aACA,OAEA,qBAIA,sBACA,WAAmB,MAAkB,WACrC,WACA,0BACA,aAGA,QACA,eAIA,kBACA,aAEA,QACA,CAGA,kBACA,UACA,CACA,CAwBA,MACA,iBACA,2BACA,mCACA,oBACA,eAKA,UACA,MACA,CAcA,MACA,iBACA,sBAAuC,CAAa,UAEpD,iBAGA,uCACA,4BAGA,qEACA,0BAGA,oBAGA,UAGA,oBACA,OAKA,uDAEA,WAIA,iCACA,2CAIA,0CAEA,SAEA,GACA,mBAEA,QACA,QACA,CAWA,MACA,eACA,mBAAoC,CAAa,UAEjD,4BAEA,wBACA,aACA,SAGA,QACA,CASA,MACA,eACA,mBAAoC,CAAa,UACjD,IACA,uBAGA,2BAEA,kBACA,MAEA,cACA,6BACA,SAGA,cAGA,0CAIA,+DACA,sCAEI,wBAEJ,SAGA,MAEA,IACA,CAUA,MACA,aACA,yBAEA,kCACA,kBACA,+DACA,iBACA,8BAGA,cACA,mDACA,kBAEA,iBACA,KAAI,yCACJ,kBAEA,aACA,KAEA,CACA,CAUA,MACA,aACA,WACA,iBACA,WAEA,qCAEA,eAGA,4BAEA,+BACA,eAAG,KAKH,4BACA,iCAGA,gDACA,eAEA,GACA,MAAE,wFAGF,WAIA,wBACA,MAEA,qCACA,aAEA,sBAGA,oDAEA,kBACA,MACA,CAkBA,MACA,WACA,kBACA,IAIA,qCACA,0CACA,6DAIA,YAEA,SACA,WAAG,mBACH,0CACA,6DAIA,YAEA,SAIA,sBAEA,qBAIA,wBAEA,mBACA,WAAG,mEACH,WAGA,6BACA,iDACA,OAEA,6BAIA,SACA,QAAG,KAGH,wBAEA,qBAIA,wBAEA,mBAEA,YACA,CAGA,MA8FA,iBAMA,2CAEA,4BAEA,WACA,yBAEA,oBACA,gBACG,qCACH,kBAIA,cAIA,wBAGA,aAEA,iBACA,oDAEA,iBAGA,WACA,CACA,CAIA,yEAtwBA,QAiCA,qBCjCA,aAuCA,YACA,sDAEA,sDACA,aA1BA,IACA,mBAQA,iBACA,OAKA,eACA,iBACA,EAIyB,mBCtCzB,U,ixBCAA,U","file":"ckeditor.js","sourcesContent":["(function webpackUniversalModuleDefinition(root, factory) {\n\tif(typeof exports === 'object' && typeof module === 'object')\n\t\tmodule.exports = factory();\n\telse if(typeof define === 'function' && define.amd)\n\t\tdefine([], factory);\n\telse if(typeof exports === 'object')\n\t\texports[\"ClassicEditor\"] = factory();\n\telse\n\t\troot[\"ClassicEditor\"] = factory();\n})(this, function() {\nreturn \n\n\n// WEBPACK FOOTER //\n// webpack/universalModuleDefinition","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module module:engine/view/writer\n */\n\nimport Position from './position';\nimport ContainerElement from './containerelement';\nimport AttributeElement from './attributeelement';\nimport EmptyElement from './emptyelement';\nimport UIElement from './uielement';\nimport Text from './text';\nimport Range from './range';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport DocumentFragment from './documentfragment';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\n\n/**\n * Contains functions used for composing view tree.\n *\n * @namespace writer\n */\n\nconst writer = {\n\tbreakAttributes,\n\tbreakContainer,\n\tmergeAttributes,\n\tmergeContainers,\n\tinsert,\n\tremove,\n\tclear,\n\tmove,\n\twrap,\n\twrapPosition,\n\tunwrap,\n\trename\n};\n\nexport default writer;\n\n/**\n * Breaks attribute nodes at provided position or at boundaries of provided range. It breaks attribute elements inside\n * up to a container element.\n *\n * In following examples `

` is a container, `` and `` are attribute nodes:\n *\n *\t\t

foobar{}

->

foobar[]

\n *\t\t

foo{}bar

->

foo{}bar

\n *\t\t

foob{}ar

->

foob[]ar

\n *\t\t

fo{oba}r

->

foobar

\n *\n * **Note:** {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n *\n * **Note:** Difference between {@link module:engine/view/writer~writer.breakAttributes breakAttributes} and\n * {@link module:engine/view/writer~writer.breakContainer breakContainer} is that `breakAttributes` breaks all\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that are ancestors of given `position`, up to the first\n * encountered {@link module:engine/view/containerelement~ContainerElement container element}. `breakContainer` assumes that given\n * `position`\n * is directly in container element and breaks that container element.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container`\n * when {@link module:engine/view/range~Range#start start}\n * and {@link module:engine/view/range~Range#end end} positions of a passed range are not placed inside same parent container.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element`\n * when trying to break attributes\n * inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element`\n * when trying to break attributes\n * inside {@link module:engine/view/uielement~UIElement UIElement}.\n *\n * @see module:engine/view/attributeelement~AttributeElement\n * @see module:engine/view/containerelement~ContainerElement\n * @see module:engine/view/writer~writer.breakContainer\n * @function module:engine/view/writer~writer.breakAttributes\n * @param {module:engine/view/position~Position|module:engine/view/range~Range} positionOrRange Position where to break attribute elements.\n * @returns {module:engine/view/position~Position|module:engine/view/range~Range} New position or range, after breaking the attribute\n * elements.\n */\nexport function breakAttributes( positionOrRange ) {\n\tif ( positionOrRange instanceof Position ) {\n\t\treturn _breakAttributes( positionOrRange );\n\t} else {\n\t\treturn _breakAttributesRange( positionOrRange );\n\t}\n}\n\n/**\n * Breaks {@link module:engine/view/containerelement~ContainerElement container view element} into two, at the given position. Position\n * has to be directly inside container element and cannot be in root. Does not break if position is at the beginning\n * or at the end of it's parent element.\n *\n *\t\t

foo^bar

->

foo

bar

\n *\t\t

foo

^

bar

->

foo

bar

\n *\t\t

^foobar

-> ^

foobar

\n *\t\t

foobar^

->

foobar

^\n *\n * **Note:** Difference between {@link module:engine/view/writer~writer.breakAttributes breakAttributes} and\n * {@link module:engine/view/writer~writer.breakContainer breakContainer} is that `breakAttributes` breaks all\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} that are ancestors of given `position`, up to the first\n * encountered {@link module:engine/view/containerelement~ContainerElement container element}. `breakContainer` assumes that given\n * `position`\n * is directly in container element and breaks that container element.\n *\n * @see module:engine/view/attributeelement~AttributeElement\n * @see module:engine/view/containerelement~ContainerElement\n * @see module:engine/view/writer~writer.breakAttributes\n * @function module:engine/view/writer~writer.breakContainer\n * @param {module:engine/view/position~Position} position Position where to break element.\n * @returns {module:engine/view/position~Position} Position between broken elements. If element has not been broken, the returned position\n * is placed either before it or after it.\n */\nexport function breakContainer( position ) {\n\tconst element = position.parent;\n\n\tif ( !( element.is( 'containerElement' ) ) ) {\n\t\t/**\n\t\t * Trying to break an element which is not a container element.\n\t\t *\n\t\t * @error view-writer-break-non-container-element\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-break-non-container-element: Trying to break an element which is not a container element.' );\n\t}\n\n\tif ( !element.parent ) {\n\t\t/**\n\t\t * Trying to break root element.\n\t\t *\n\t\t * @error view-writer-break-root\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-break-root: Trying to break root element.' );\n\t}\n\n\tif ( position.isAtStart ) {\n\t\treturn Position.createBefore( element );\n\t} else if ( !position.isAtEnd ) {\n\t\tconst newElement = element.clone( false );\n\n\t\tinsert( Position.createAfter( element ), newElement );\n\n\t\tconst sourceRange = new Range( position, Position.createAt( element, 'end' ) );\n\t\tconst targetPosition = new Position( newElement, 0 );\n\n\t\tmove( sourceRange, targetPosition );\n\t}\n\n\treturn Position.createAfter( element );\n}\n\n/**\n * Merges {@link module:engine/view/attributeelement~AttributeElement attribute elements}. It also merges text nodes if needed.\n * Only {@link module:engine/view/attributeelement~AttributeElement#isSimilar similar} attribute elements can be merged.\n *\n * In following examples `

` is a container and `` is an attribute element:\n *\n *\t\t

foo[]bar

->

foo{}bar

\n *\t\t

foo[]bar

->

foo{}bar

\n *\t\t

a[]b

->

a[]b

\n *\n * It will also take care about empty attributes when merging:\n *\n *\t\t

[]

->

[]

\n *\t\t

foo[]bar

->

foo{}bar

\n *\n * **Note:** Difference between {@link module:engine/view/writer~writer.mergeAttributes mergeAttributes} and\n * {@link module:engine/view/writer~writer.mergeContainers mergeContainers} is that `mergeAttributes` merges two\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} or {@link module:engine/view/text~Text text nodes}\n * while `mergeContainer` merges two {@link module:engine/view/containerelement~ContainerElement container elements}.\n *\n * @see module:engine/view/attributeelement~AttributeElement\n * @see module:engine/view/containerelement~ContainerElement\n * @see module:engine/view/writer~writer.mergeContainers\n * @function module:engine/view/writer~writer.mergeAttributes\n * @param {module:engine/view/position~Position} position Merge position.\n * @returns {module:engine/view/position~Position} Position after merge.\n */\nexport function mergeAttributes( position ) {\n\tconst positionOffset = position.offset;\n\tconst positionParent = position.parent;\n\n\t// When inside text node - nothing to merge.\n\tif ( positionParent.is( 'text' ) ) {\n\t\treturn position;\n\t}\n\n\t// When inside empty attribute - remove it.\n\tif ( positionParent.is( 'attributeElement' ) && positionParent.childCount === 0 ) {\n\t\tconst parent = positionParent.parent;\n\t\tconst offset = positionParent.index;\n\t\tpositionParent.remove();\n\n\t\treturn mergeAttributes( new Position( parent, offset ) );\n\t}\n\n\tconst nodeBefore = positionParent.getChild( positionOffset - 1 );\n\tconst nodeAfter = positionParent.getChild( positionOffset );\n\n\t// Position should be placed between two nodes.\n\tif ( !nodeBefore || !nodeAfter ) {\n\t\treturn position;\n\t}\n\n\t// When position is between two text nodes.\n\tif ( nodeBefore.is( 'text' ) && nodeAfter.is( 'text' ) ) {\n\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t}\n\t// When selection is between two same attribute elements.\n\telse if ( nodeBefore.is( 'attributeElement' ) && nodeAfter.is( 'attributeElement' ) && nodeBefore.isSimilar( nodeAfter ) ) {\n\t\t// Move all children nodes from node placed after selection and remove that node.\n\t\tconst count = nodeBefore.childCount;\n\t\tnodeBefore.appendChildren( nodeAfter.getChildren() );\n\t\tnodeAfter.remove();\n\n\t\t// New position is located inside the first node, before new nodes.\n\t\t// Call this method recursively to merge again if needed.\n\t\treturn mergeAttributes( new Position( nodeBefore, count ) );\n\t}\n\n\treturn position;\n}\n\n/**\n * Merges two {@link module:engine/view/containerelement~ContainerElement container elements} that are before and after given position.\n * Precisely, the element after the position is removed and it's contents are moved to element before the position.\n *\n *\t\t

foo

^

bar

->

foo^bar

\n *\t\t
foo
^

bar

->
foo^bar
\n *\n * **Note:** Difference between {@link module:engine/view/writer~writer.mergeAttributes mergeAttributes} and\n * {@link module:engine/view/writer~writer.mergeContainers mergeContainers} is that `mergeAttributes` merges two\n * {@link module:engine/view/attributeelement~AttributeElement attribute elements} or {@link module:engine/view/text~Text text nodes}\n * while `mergeContainer` merges two {@link module:engine/view/containerelement~ContainerElement container elements}.\n *\n * @see module:engine/view/attributeelement~AttributeElement\n * @see module:engine/view/containerelement~ContainerElement\n * @see module:engine/view/writer~writer.mergeAttributes\n * @function module:engine/view/writer~writer.mergeContainers\n * @param {module:engine/view/position~Position} position Merge position.\n * @returns {module:engine/view/position~Position} Position after merge.\n */\nexport function mergeContainers( position ) {\n\tconst prev = position.nodeBefore;\n\tconst next = position.nodeAfter;\n\n\tif ( !prev || !next || !prev.is( 'containerElement' ) || !next.is( 'containerElement' ) ) {\n\t\t/**\n\t\t * Element before and after given position cannot be merged.\n\t\t *\n\t\t * @error view-writer-merge-containers-invalid-position\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-merge-containers-invalid-position: ' +\n\t\t\t'Element before and after given position cannot be merged.' );\n\t}\n\n\tconst lastChild = prev.getChild( prev.childCount - 1 );\n\tconst newPosition = lastChild instanceof Text ? Position.createAt( lastChild, 'end' ) : Position.createAt( prev, 'end' );\n\n\tmove( Range.createIn( next ), Position.createAt( prev, 'end' ) );\n\tremove( Range.createOn( next ) );\n\n\treturn newPosition;\n}\n\n/**\n * Insert node or nodes at specified position. Takes care about breaking attributes before insertion\n * and merging them afterwards.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n * contains instances that are not {@link module:engine/view/text~Text Texts},\n * {@link module:engine/view/attributeelement~AttributeElement AttributeElements},\n * {@link module:engine/view/containerelement~ContainerElement ContainerElements},\n * {@link module:engine/view/emptyelement~EmptyElement EmptyElements} or\n * {@link module:engine/view/uielement~UIElement UIElements}.\n *\n * @function insert\n * @param {module:engine/view/position~Position} position Insertion position.\n * @param {module:engine/view/text~Text|module:engine/view/attributeelement~AttributeElement|\n * module:engine/view/containerelement~ContainerElement|module:engine/view/emptyelement~EmptyElement|\n * module:engine/view/uielement~UIElement|Iterable.} nodes Node or nodes to insert.\n * @returns {module:engine/view/range~Range} Range around inserted nodes.\n */\nexport function insert( position, nodes ) {\n\tnodes = isIterable( nodes ) ? [ ...nodes ] : [ nodes ];\n\n\t// Check if nodes to insert are instances of AttributeElements, ContainerElements, EmptyElements, UIElements or Text.\n\tvalidateNodesToInsert( nodes );\n\n\tconst container = getParentContainer( position );\n\n\tif ( !container ) {\n\t\t/**\n\t\t * Position's parent container cannot be found.\n\t\t *\n\t\t * @error view-writer-invalid-position-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-position-container' );\n\t}\n\n\tconst insertionPosition = _breakAttributes( position, true );\n\n\tconst length = container.insertChildren( insertionPosition.offset, nodes );\n\tconst endPosition = insertionPosition.getShiftedBy( length );\n\tconst start = mergeAttributes( insertionPosition );\n\n\t// When no nodes were inserted - return collapsed range.\n\tif ( length === 0 ) {\n\t\treturn new Range( start, start );\n\t} else {\n\t\t// If start position was merged - move end position.\n\t\tif ( !start.isEqual( insertionPosition ) ) {\n\t\t\tendPosition.offset--;\n\t\t}\n\n\t\tconst end = mergeAttributes( endPosition );\n\n\t\treturn new Range( start, end );\n\t}\n}\n\n/**\n * Removes provided range from the container.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n * same parent container.\n *\n * @function module:engine/view/writer~writer.remove\n * @param {module:engine/view/range~Range} range Range to remove from container. After removing, it will be updated\n * to a collapsed range showing the new position.\n * @returns {module:engine/view/documentfragment~DocumentFragment} Document fragment containing removed nodes.\n */\nexport function remove( range ) {\n\tvalidateRangeContainer( range );\n\n\t// If range is collapsed - nothing to remove.\n\tif ( range.isCollapsed ) {\n\t\treturn new DocumentFragment();\n\t}\n\n\t// Break attributes at range start and end.\n\tconst { start: breakStart, end: breakEnd } = _breakAttributesRange( range, true );\n\tconst parentContainer = breakStart.parent;\n\n\tconst count = breakEnd.offset - breakStart.offset;\n\n\t// Remove nodes in range.\n\tconst removed = parentContainer.removeChildren( breakStart.offset, count );\n\n\t// Merge after removing.\n\tconst mergePosition = mergeAttributes( breakStart );\n\trange.start = mergePosition;\n\trange.end = Position.createFromPosition( mergePosition );\n\n\t// Return removed nodes.\n\treturn new DocumentFragment( removed );\n}\n\n/**\n * Removes matching elements from given range.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n * same parent container.\n *\n * @function module:engine/view/writer~writer.clear\n * @param {module:engine/view/range~Range} range Range to clear.\n * @param {module:engine/view/element~Element} element Element to remove.\n */\nexport function clear( range, element ) {\n\tvalidateRangeContainer( range );\n\n\t// Create walker on given range.\n\t// We walk backward because when we remove element during walk it modifies range end position.\n\tconst walker = range.getWalker( {\n\t\tdirection: 'backward',\n\t\tignoreElementEnd: true\n\t} );\n\n\t// Let's walk.\n\tfor ( const current of walker ) {\n\t\tconst item = current.item;\n\t\tlet rangeToRemove;\n\n\t\t// When current item matches to the given element.\n\t\tif ( item.is( 'element' ) && element.isSimilar( item ) ) {\n\t\t\t// Create range on this element.\n\t\t\trangeToRemove = Range.createOn( item );\n\t\t// When range starts inside Text or TextProxy element.\n\t\t} else if ( !current.nextPosition.isAfter( range.start ) && ( item.is( 'text' ) || item.is( 'textProxy' ) ) ) {\n\t\t\t// We need to check if parent of this text matches to given element.\n\t\t\tconst parentElement = item.getAncestors().find( ancestor => {\n\t\t\t\treturn ancestor.is( 'element' ) && element.isSimilar( ancestor );\n\t\t\t} );\n\n\t\t\t// If it is then create range inside this element.\n\t\t\tif ( parentElement ) {\n\t\t\t\trangeToRemove = Range.createIn( parentElement );\n\t\t\t}\n\t\t}\n\n\t\t// If we have found element to remove.\n\t\tif ( rangeToRemove ) {\n\t\t\t// We need to check if element range stick out of the given range and truncate if it is.\n\t\t\tif ( rangeToRemove.end.isAfter( range.end ) ) {\n\t\t\t\trangeToRemove.end = range.end;\n\t\t\t}\n\n\t\t\tif ( rangeToRemove.start.isBefore( range.start ) ) {\n\t\t\t\trangeToRemove.start = range.start;\n\t\t\t}\n\n\t\t\t// At the end we remove range with found element.\n\t\t\tremove( rangeToRemove );\n\t\t}\n\t}\n}\n\n/**\n * Moves nodes from provided range to target position.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n * same parent container.\n *\n * @function module:engine/view/writer~writer.move\n * @param {module:engine/view/range~Range} sourceRange Range containing nodes to move.\n * @param {module:engine/view/position~Position} targetPosition Position to insert.\n * @returns {module:engine/view/range~Range} Range in target container. Inserted nodes are placed between\n * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions.\n */\nexport function move( sourceRange, targetPosition ) {\n\tlet nodes;\n\n\tif ( targetPosition.isAfter( sourceRange.end ) ) {\n\t\ttargetPosition = _breakAttributes( targetPosition, true );\n\n\t\tconst parent = targetPosition.parent;\n\t\tconst countBefore = parent.childCount;\n\n\t\tsourceRange = _breakAttributesRange( sourceRange, true );\n\n\t\tnodes = remove( sourceRange );\n\n\t\ttargetPosition.offset += ( parent.childCount - countBefore );\n\t} else {\n\t\tnodes = remove( sourceRange );\n\t}\n\n\treturn insert( targetPosition, nodes );\n}\n\n/**\n * Wraps elements within range with provided {@link module:engine/view/attributeelement~AttributeElement AttributeElement}.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-invalid-range-container`\n * when {@link module:engine/view/range~Range#start}\n * and {@link module:engine/view/range~Range#end} positions are not placed inside same parent container.\n * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n * an instance of {module:engine/view/attributeelement~AttributeElement AttributeElement}.\n *\n * @function module:engine/view/writer~writer.wrap\n * @param {module:engine/view/range~Range} range Range to wrap.\n * @param {module:engine/view/attributeelement~AttributeElement} attribute Attribute element to use as wrapper.\n */\nexport function wrap( range, attribute ) {\n\tif ( !( attribute instanceof AttributeElement ) ) {\n\t\tthrow new CKEditorError( 'view-writer-wrap-invalid-attribute' );\n\t}\n\n\tvalidateRangeContainer( range );\n\n\t// If range is collapsed - nothing to wrap.\n\tif ( range.isCollapsed ) {\n\t\treturn range;\n\t}\n\n\t// Range around one element.\n\tif ( range.end.isEqual( range.start.getShiftedBy( 1 ) ) ) {\n\t\tconst node = range.start.nodeAfter;\n\n\t\tif ( node instanceof AttributeElement && wrapAttributeElement( attribute, node ) ) {\n\t\t\treturn range;\n\t\t}\n\t}\n\n\t// Range is inside single attribute and spans on all children.\n\tif ( rangeSpansOnAllChildren( range ) && wrapAttributeElement( attribute, range.start.parent ) ) {\n\t\tconst parent = range.start.parent.parent;\n\t\tconst index = range.start.parent.index;\n\n\t\treturn Range.createFromParentsAndOffsets( parent, index, parent, index + 1 );\n\t}\n\n\t// Break attributes at range start and end.\n\tconst { start: breakStart, end: breakEnd } = _breakAttributesRange( range, true );\n\tconst parentContainer = breakStart.parent;\n\n\t// Unwrap children located between break points.\n\tconst unwrappedRange = unwrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t// Wrap all children with attribute.\n\tconst newRange = wrapChildren( parentContainer, unwrappedRange.start.offset, unwrappedRange.end.offset, attribute );\n\n\t// Merge attributes at the both ends and return a new range.\n\tconst start = mergeAttributes( newRange.start );\n\n\t// If start position was merged - move end position back.\n\tif ( !start.isEqual( newRange.start ) ) {\n\t\tnewRange.end.offset--;\n\t}\n\tconst end = mergeAttributes( newRange.end );\n\n\treturn new Range( start, end );\n}\n\n/**\n * Wraps position with provided attribute. Returns new position after wrapping. This method will also merge newly\n * added attribute with its siblings whenever possible.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError} `view-writer-wrap-invalid-attribute` when passed attribute element is not\n * an instance of {module:engine/view/attributeelement~AttributeElement AttributeElement}.\n *\n * @param {module:engine/view/position~Position} position\n * @param {module:engine/view/attributeelement~AttributeElement} attribute\n * @returns {module:engine/view/position~Position} New position after wrapping.\n */\nexport function wrapPosition( position, attribute ) {\n\tif ( !( attribute instanceof AttributeElement ) ) {\n\t\tthrow new CKEditorError( 'view-writer-wrap-invalid-attribute' );\n\t}\n\n\t// Return same position when trying to wrap with attribute similar to position parent.\n\tif ( attribute.isSimilar( position.parent ) ) {\n\t\treturn movePositionToTextNode( Position.createFromPosition( position ) );\n\t}\n\n\t// When position is inside text node - break it and place new position between two text nodes.\n\tif ( position.parent.is( 'text' ) ) {\n\t\tposition = breakTextNode( position );\n\t}\n\n\t// Create fake element that will represent position, and will not be merged with other attributes.\n\tconst fakePosition = new AttributeElement();\n\tfakePosition.priority = Number.POSITIVE_INFINITY;\n\tfakePosition.isSimilar = () => false;\n\n\t// Insert fake element in position location.\n\tposition.parent.insertChildren( position.offset, fakePosition );\n\n\t// Range around inserted fake attribute element.\n\tconst wrapRange = new Range( position, position.getShiftedBy( 1 ) );\n\n\t// Wrap fake element with attribute (it will also merge if possible).\n\twrap( wrapRange, attribute );\n\n\t// Remove fake element and place new position there.\n\tconst newPosition = new Position( fakePosition.parent, fakePosition.index );\n\tfakePosition.remove();\n\n\t// If position is placed between text nodes - merge them and return position inside.\n\tconst nodeBefore = newPosition.nodeBefore;\n\tconst nodeAfter = newPosition.nodeAfter;\n\n\tif ( nodeBefore instanceof Text && nodeAfter instanceof Text ) {\n\t\treturn mergeTextNodes( nodeBefore, nodeAfter );\n\t}\n\n\t// If position is next to text node - move position inside.\n\treturn movePositionToTextNode( newPosition );\n}\n\n/**\n * Unwraps nodes within provided range from attribute element.\n *\n * Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when\n * {@link module:engine/view/range~Range#start start} and {@link module:engine/view/range~Range#end end} positions are not placed inside\n * same parent container.\n *\n * @param {module:engine/view/range~Range} range\n * @param {module:engine/view/attributeelement~AttributeElement} element\n */\nexport function unwrap( range, attribute ) {\n\tif ( !( attribute instanceof AttributeElement ) ) {\n\t\t/**\n\t\t * Attribute element need to be instance of attribute element.\n\t\t *\n\t\t * @error view-writer-unwrap-invalid-attribute\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-unwrap-invalid-attribute' );\n\t}\n\n\tvalidateRangeContainer( range );\n\n\t// If range is collapsed - nothing to unwrap.\n\tif ( range.isCollapsed ) {\n\t\treturn range;\n\t}\n\n\t// Range around one element - check if AttributeElement can be unwrapped partially when it's not similar.\n\t// For example:\n\t// unwrap with:\t

result: \n\tif ( range.end.isEqual( range.start.getShiftedBy( 1 ) ) ) {\n\t\tconst node = range.start.nodeAfter;\n\n\t\t// Unwrap single attribute element.\n\t\tif ( !attribute.isSimilar( node ) && node instanceof AttributeElement && unwrapAttributeElement( attribute, node ) ) {\n\t\t\treturn range;\n\t\t}\n\t}\n\n\t// Break attributes at range start and end.\n\tconst { start: breakStart, end: breakEnd } = _breakAttributesRange( range, true );\n\tconst parentContainer = breakStart.parent;\n\n\t// Unwrap children located between break points.\n\tconst newRange = unwrapChildren( parentContainer, breakStart.offset, breakEnd.offset, attribute );\n\n\t// Merge attributes at the both ends and return a new range.\n\tconst start = mergeAttributes( newRange.start );\n\n\t// If start position was merged - move end position back.\n\tif ( !start.isEqual( newRange.start ) ) {\n\t\tnewRange.end.offset--;\n\t}\n\tconst end = mergeAttributes( newRange.end );\n\n\treturn new Range( start, end );\n}\n\n/**\n * Renames element by creating a copy of renamed element but with changed name and then moving contents of the\n * old element to the new one. Keep in mind that this will invalidate all {@link module:engine/view/position~Position positions} which\n * has renamed element as {@link module:engine/view/position~Position#parent a parent}.\n *\n * New element has to be created because `Element#tagName` property in DOM is readonly.\n *\n * Since this function creates a new element and removes the given one, the new element is returned to keep reference.\n *\n * @param {module:engine/view/containerelement~ContainerElement} viewElement Element to be renamed.\n * @param {String} newName New name for element.\n */\nexport function rename( viewElement, newName ) {\n\tconst newElement = new ContainerElement( newName, viewElement.getAttributes() );\n\n\tinsert( Position.createAfter( viewElement ), newElement );\n\tmove( Range.createIn( viewElement ), Position.createAt( newElement ) );\n\tremove( Range.createOn( viewElement ) );\n\n\treturn newElement;\n}\n\n/**\n * Attribute element need to be instance of attribute element.\n *\n * @error view-writer-wrap-invalid-attribute\n */\n\n// Returns first parent container of specified {@link module:engine/view/position~Position Position}.\n// Position's parent node is checked as first, then next parents are checked.\n// Note that {@link module:engine/view/documentfragment~DocumentFragment DocumentFragment} is treated like a container.\n//\n// @param {module:engine/view/position~Position} position Position used as a start point to locate parent container.\n// @returns {module:engine/view/containerelement~ContainerElement|module:engine/view/documentfragment~DocumentFragment|undefined}\n// Parent container element or `undefined` if container is not found.\nfunction getParentContainer( position ) {\n\tlet parent = position.parent;\n\n\twhile ( !isContainerOrFragment( parent ) ) {\n\t\tif ( !parent ) {\n\t\t\treturn undefined;\n\t\t}\n\t\tparent = parent.parent;\n\t}\n\n\treturn parent;\n}\n\n// Function used by both public breakAttributes (without splitting text nodes) and by other methods (with\n// splitting text nodes).\n//\n// @param {module:engine/view/range~Range} range Range which `start` and `end` positions will be used to break attributes.\n// @param {Boolean} [forceSplitText = false] If set to `true`, will break text nodes even if they are directly in\n// container element. This behavior will result in incorrect view state, but is needed by other view writing methods\n// which then fixes view state. Defaults to `false`.\n// @returns {module:engine/view/range~Range} New range with located at break positions.\nfunction _breakAttributesRange( range, forceSplitText = false ) {\n\tconst rangeStart = range.start;\n\tconst rangeEnd = range.end;\n\n\tvalidateRangeContainer( range );\n\n\t// Break at the collapsed position. Return new collapsed range.\n\tif ( range.isCollapsed ) {\n\t\tconst position = _breakAttributes( range.start, forceSplitText );\n\n\t\treturn new Range( position, position );\n\t}\n\n\tconst breakEnd = _breakAttributes( rangeEnd, forceSplitText );\n\tconst count = breakEnd.parent.childCount;\n\tconst breakStart = _breakAttributes( rangeStart, forceSplitText );\n\n\t// Calculate new break end offset.\n\tbreakEnd.offset += breakEnd.parent.childCount - count;\n\n\treturn new Range( breakStart, breakEnd );\n}\n\n// Function used by public breakAttributes (without splitting text nodes) and by other methods (with\n// splitting text nodes).\n//\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-empty-element` when break position\n// is placed inside {@link module:engine/view/emptyelement~EmptyElement EmptyElement}.\n//\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-cannot-break-ui-element` when break position\n// is placed inside {@link module:engine/view/uielement~UIElement UIElement}.\n//\n// @param {module:engine/view/position~Position} position Position where to break attributes.\n// @param {Boolean} [forceSplitText = false] If set to `true`, will break text nodes even if they are directly in\n// container element. This behavior will result in incorrect view state, but is needed by other view writing methods\n// which then fixes view state. Defaults to `false`.\n// @returns {module:engine/view/position~Position} New position after breaking the attributes.\nfunction _breakAttributes( position, forceSplitText = false ) {\n\tconst positionOffset = position.offset;\n\tconst positionParent = position.parent;\n\n\t// If position is placed inside EmptyElement - throw an exception as we cannot break inside.\n\tif ( position.parent.is( 'emptyElement' ) ) {\n\t\t/**\n\t\t * Cannot break inside EmptyElement instance.\n\t\t *\n\t\t * @error view-writer-cannot-break-empty-element\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-cannot-break-empty-element' );\n\t}\n\n\t// If position is placed inside UIElement - throw an exception as we cannot break inside.\n\tif ( position.parent.is( 'uiElement' ) ) {\n\t\t/**\n\t\t * Cannot break inside UIElement instance.\n\t\t *\n\t\t * @error view-writer-cannot-break-ui-element\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-cannot-break-ui-element' );\n\t}\n\n\t// There are no attributes to break and text nodes breaking is not forced.\n\tif ( !forceSplitText && positionParent.is( 'text' ) && isContainerOrFragment( positionParent.parent ) ) {\n\t\treturn Position.createFromPosition( position );\n\t}\n\n\t// Position's parent is container, so no attributes to break.\n\tif ( isContainerOrFragment( positionParent ) ) {\n\t\treturn Position.createFromPosition( position );\n\t}\n\n\t// Break text and start again in new position.\n\tif ( positionParent.is( 'text' ) ) {\n\t\treturn _breakAttributes( breakTextNode( position ), forceSplitText );\n\t}\n\n\tconst length = positionParent.childCount;\n\n\t//

foobar{}

\n\t//

foobar[]

\n\t//

foobar[]

\n\tif ( positionOffset == length ) {\n\t\tconst newPosition = new Position( positionParent.parent, positionParent.index + 1 );\n\n\t\treturn _breakAttributes( newPosition, forceSplitText );\n\t} else\n\t//

foo{}bar

\n\t//

foo[]bar

\n\t//

foo{}bar

\n\tif ( positionOffset === 0 ) {\n\t\tconst newPosition = new Position( positionParent.parent, positionParent.index );\n\n\t\treturn _breakAttributes( newPosition, forceSplitText );\n\t}\n\t//

foob{}ar

\n\t//

foob[]ar

\n\t//

foob[]ar

\n\t//

foob[]ar

\n\telse {\n\t\tconst offsetAfter = positionParent.index + 1;\n\n\t\t// Break element.\n\t\tconst clonedNode = positionParent.clone();\n\n\t\t// Insert cloned node to position's parent node.\n\t\tpositionParent.parent.insertChildren( offsetAfter, clonedNode );\n\n\t\t// Get nodes to move.\n\t\tconst count = positionParent.childCount - positionOffset;\n\t\tconst nodesToMove = positionParent.removeChildren( positionOffset, count );\n\n\t\t// Move nodes to cloned node.\n\t\tclonedNode.appendChildren( nodesToMove );\n\n\t\t// Create new position to work on.\n\t\tconst newPosition = new Position( positionParent.parent, offsetAfter );\n\n\t\treturn _breakAttributes( newPosition, forceSplitText );\n\t}\n}\n\n// Unwraps children from provided `attribute`. Only children contained in `parent` element between\n// `startOffset` and `endOffset` will be unwrapped.\n//\n// @param {module:engine/view/element~Element} parent\n// @param {Number} startOffset\n// @param {Number} endOffset\n// @param {module:engine/view/element~Element} attribute\nfunction unwrapChildren( parent, startOffset, endOffset, attribute ) {\n\tlet i = startOffset;\n\tconst unwrapPositions = [];\n\n\t// Iterate over each element between provided offsets inside parent.\n\twhile ( i < endOffset ) {\n\t\tconst child = parent.getChild( i );\n\n\t\t// If attributes are the similar, then unwrap.\n\t\tif ( child.isSimilar( attribute ) ) {\n\t\t\tconst unwrapped = child.getChildren();\n\t\t\tconst count = child.childCount;\n\n\t\t\t// Replace wrapper element with its children\n\t\t\tchild.remove();\n\t\t\tparent.insertChildren( i, unwrapped );\n\n\t\t\t// Save start and end position of moved items.\n\t\t\tunwrapPositions.push(\n\t\t\t\tnew Position( parent, i ),\n\t\t\t\tnew Position( parent, i + count )\n\t\t\t);\n\n\t\t\t// Skip elements that were unwrapped. Assuming that there won't be another element to unwrap in child\n\t\t\t// elements.\n\t\t\ti += count;\n\t\t\tendOffset += count - 1;\n\t\t} else {\n\t\t\t// If other nested attribute is found start unwrapping there.\n\t\t\tif ( child.is( 'attributeElement' ) ) {\n\t\t\t\tunwrapChildren( child, 0, child.childCount, attribute );\n\t\t\t}\n\n\t\t\ti++;\n\t\t}\n\t}\n\n\t// Merge at each unwrap.\n\tlet offsetChange = 0;\n\n\tfor ( const position of unwrapPositions ) {\n\t\tposition.offset -= offsetChange;\n\n\t\t// Do not merge with elements outside selected children.\n\t\tif ( position.offset == startOffset || position.offset == endOffset ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst newPosition = mergeAttributes( position );\n\n\t\t// If nodes were merged - other merge offsets will change.\n\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\toffsetChange++;\n\t\t\tendOffset--;\n\t\t}\n\t}\n\n\treturn Range.createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n}\n\n// Wraps children with provided `attribute`. Only children contained in `parent` element between\n// `startOffset` and `endOffset` will be wrapped.\n//\n// @param {module:engine/view/element~Element} parent\n// @param {Number} startOffset\n// @param {Number} endOffset\n// @param {module:engine/view/element~Element} attribute\nfunction wrapChildren( parent, startOffset, endOffset, attribute ) {\n\tlet i = startOffset;\n\tconst wrapPositions = [];\n\n\twhile ( i < endOffset ) {\n\t\tconst child = parent.getChild( i );\n\t\tconst isText = child.is( 'text' );\n\t\tconst isAttribute = child.is( 'attributeElement' );\n\t\tconst isEmpty = child.is( 'emptyElement' );\n\t\tconst isUI = child.is( 'uiElement' );\n\n\t\t// Wrap text, empty elements, ui elements or attributes with higher or equal priority.\n\t\tif ( isText || isEmpty || isUI || ( isAttribute && shouldABeOutsideB( attribute, child ) ) ) {\n\t\t\t// Clone attribute.\n\t\t\tconst newAttribute = attribute.clone();\n\n\t\t\t// Wrap current node with new attribute;\n\t\t\tchild.remove();\n\t\t\tnewAttribute.appendChildren( child );\n\t\t\tparent.insertChildren( i, newAttribute );\n\n\t\t\twrapPositions.push(\tnew Position( parent, i ) );\n\t\t}\n\t\t// If other nested attribute is found start wrapping there.\n\t\telse if ( isAttribute ) {\n\t\t\twrapChildren( child, 0, child.childCount, attribute );\n\t\t}\n\n\t\ti++;\n\t}\n\n\t// Merge at each wrap.\n\tlet offsetChange = 0;\n\n\tfor ( const position of wrapPositions ) {\n\t\tposition.offset -= offsetChange;\n\n\t\t// Do not merge with elements outside selected children.\n\t\tif ( position.offset == startOffset ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\tconst newPosition = mergeAttributes( position );\n\n\t\t// If nodes were merged - other merge offsets will change.\n\t\tif ( !newPosition.isEqual( position ) ) {\n\t\t\toffsetChange++;\n\t\t\tendOffset--;\n\t\t}\n\t}\n\n\treturn Range.createFromParentsAndOffsets( parent, startOffset, parent, endOffset );\n}\n\n// Checks if first {@link module:engine/view/attributeelement~AttributeElement AttributeElement} provided to the function\n// can be wrapped otuside second element. It is done by comparing elements'\n// {@link module:engine/view/attributeelement~AttributeElement#priority priorities}, if both have same priority\n// {@link module:engine/view/element~Element#getIdentity identities} are compared.\n//\n// @param {module:engine/view/attributeelement~AttributeElement} a\n// @param {module:engine/view/attributeelement~AttributeElement} b\n// @returns {Boolean}\nfunction shouldABeOutsideB( a, b ) {\n\tif ( a.priority < b.priority ) {\n\t\treturn true;\n\t} else if ( a.priority > b.priority ) {\n\t\treturn false;\n\t}\n\n\t// When priorities are equal and names are different - use identities.\n\treturn a.getIdentity() < b.getIdentity();\n}\n\n// Returns new position that is moved to near text node. Returns same position if there is no text node before of after\n// specified position.\n//\n//\t\t

foo[]

->

foo{}

\n//\t\t

[]foo

->

{}foo

\n//\n// @param {module:engine/view/position~Position} position\n// @returns {module:engine/view/position~Position} Position located inside text node or same position if there is no text nodes\n// before or after position location.\nfunction movePositionToTextNode( position ) {\n\tconst nodeBefore = position.nodeBefore;\n\n\tif ( nodeBefore && nodeBefore.is( 'text' ) ) {\n\t\treturn new Position( nodeBefore, nodeBefore.data.length );\n\t}\n\n\tconst nodeAfter = position.nodeAfter;\n\n\tif ( nodeAfter && nodeAfter.is( 'text' ) ) {\n\t\treturn new Position( nodeAfter, 0 );\n\t}\n\n\treturn position;\n}\n\n// Breaks text node into two text nodes when possible.\n//\n//\t\t

foo{}bar

->

foo[]bar

\n//\t\t

{}foobar

->

[]foobar

\n//\t\t

foobar{}

->

foobar[]

\n//\n// @param {module:engine/view/position~Position} position Position that need to be placed inside text node.\n// @returns {module:engine/view/position~Position} New position after breaking text node.\nfunction breakTextNode( position ) {\n\tif ( position.offset == position.parent.data.length ) {\n\t\treturn new Position( position.parent.parent, position.parent.index + 1 );\n\t}\n\n\tif ( position.offset === 0 ) {\n\t\treturn new Position( position.parent.parent, position.parent.index );\n\t}\n\n\t// Get part of the text that need to be moved.\n\tconst textToMove = position.parent.data.slice( position.offset );\n\n\t// Leave rest of the text in position's parent.\n\tposition.parent.data = position.parent.data.slice( 0, position.offset );\n\n\t// Insert new text node after position's parent text node.\n\tposition.parent.parent.insertChildren( position.parent.index + 1, new Text( textToMove ) );\n\n\t// Return new position between two newly created text nodes.\n\treturn new Position( position.parent.parent, position.parent.index + 1 );\n}\n\n// Merges two text nodes into first node. Removes second node and returns merge position.\n//\n// @param {module:engine/view/text~Text} t1 First text node to merge. Data from second text node will be moved at the end of\n// this text node.\n// @param {module:engine/view/text~Text} t2 Second text node to merge. This node will be removed after merging.\n// @returns {module:engine/view/position~Position} Position after merging text nodes.\nfunction mergeTextNodes( t1, t2 ) {\n\t// Merge text data into first text node and remove second one.\n\tconst nodeBeforeLength = t1.data.length;\n\tt1.data += t2.data;\n\tt2.remove();\n\n\treturn new Position( t1, nodeBeforeLength );\n}\n\n// Wraps one {@link module:engine/view/attributeelement~AttributeElement AttributeElement} into another by merging them if possible.\n// When merging is possible - all attributes, styles and classes are moved from wrapper element to element being\n// wrapped.\n//\n// @param {module:engine/view/attributeelement~AttributeElement} wrapper Wrapper AttributeElement.\n// @param {module:engine/view/attributeelement~AttributeElement} toWrap AttributeElement to wrap using wrapper element.\n// @returns {Boolean} Returns `true` if elements are merged.\nfunction wrapAttributeElement( wrapper, toWrap ) {\n\t// Can't merge if name or priority differs.\n\tif ( wrapper.name !== toWrap.name || wrapper.priority !== toWrap.priority ) {\n\t\treturn false;\n\t}\n\n\t// Check if attributes can be merged.\n\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t// Classes and styles should be checked separately.\n\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If some attributes are different we cannot wrap.\n\t\tif ( toWrap.hasAttribute( key ) && toWrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Check if styles can be merged.\n\tfor ( const key of wrapper.getStyleNames() ) {\n\t\tif ( toWrap.hasStyle( key ) && toWrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Move all attributes/classes/styles from wrapper to wrapped AttributeElement.\n\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t// Classes and styles should be checked separately.\n\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// Move only these attributes that are not present - other are similar.\n\t\tif ( !toWrap.hasAttribute( key ) ) {\n\t\t\ttoWrap.setAttribute( key, wrapper.getAttribute( key ) );\n\t\t}\n\t}\n\n\tfor ( const key of wrapper.getStyleNames() ) {\n\t\tif ( !toWrap.hasStyle( key ) ) {\n\t\t\ttoWrap.setStyle( key, wrapper.getStyle( key ) );\n\t\t}\n\t}\n\n\tfor ( const key of wrapper.getClassNames() ) {\n\t\tif ( !toWrap.hasClass( key ) ) {\n\t\t\ttoWrap.addClass( key );\n\t\t}\n\t}\n\n\treturn true;\n}\n\n// Unwraps {@link module:engine/view/attributeelement~AttributeElement AttributeElement} from another by removing corresponding attributes,\n// classes and styles. All attributes, classes and styles from wrapper should be present inside element being unwrapped.\n//\n// @param {module:engine/view/attributeelement~AttributeElement} wrapper Wrapper AttributeElement.\n// @param {module:engine/view/attributeelement~AttributeElement} toUnwrap AttributeElement to unwrap using wrapper element.\n// @returns {Boolean} Returns `true` if elements are unwrapped.\nfunction unwrapAttributeElement( wrapper, toUnwrap ) {\n\t// Can't unwrap if name or priority differs.\n\tif ( wrapper.name !== toUnwrap.name || wrapper.priority !== toUnwrap.priority ) {\n\t\treturn false;\n\t}\n\n\t// Check if AttributeElement has all wrapper attributes.\n\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t// Classes and styles should be checked separately.\n\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\t// If some attributes are missing or different we cannot unwrap.\n\t\tif ( !toUnwrap.hasAttribute( key ) || toUnwrap.getAttribute( key ) !== wrapper.getAttribute( key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Check if AttributeElement has all wrapper classes.\n\tif ( !toUnwrap.hasClass( ...wrapper.getClassNames() ) ) {\n\t\treturn false;\n\t}\n\n\t// Check if AttributeElement has all wrapper styles.\n\tfor ( const key of wrapper.getStyleNames() ) {\n\t\t// If some styles are missing or different we cannot unwrap.\n\t\tif ( !toUnwrap.hasStyle( key ) || toUnwrap.getStyle( key ) !== wrapper.getStyle( key ) ) {\n\t\t\treturn false;\n\t\t}\n\t}\n\n\t// Remove all wrapper's attributes from unwrapped element.\n\tfor ( const key of wrapper.getAttributeKeys() ) {\n\t\t// Classes and styles should be checked separately.\n\t\tif ( key === 'class' || key === 'style' ) {\n\t\t\tcontinue;\n\t\t}\n\n\t\ttoUnwrap.removeAttribute( key );\n\t}\n\n\t// Remove all wrapper's classes from unwrapped element.\n\ttoUnwrap.removeClass( ...wrapper.getClassNames() );\n\n\t// Remove all wrapper's styles from unwrapped element.\n\ttoUnwrap.removeStyle( ...wrapper.getStyleNames() );\n\n\treturn true;\n}\n\n// Returns `true` if range is located in same {@link module:engine/view/attributeelement~AttributeElement AttributeElement}\n// (`start` and `end` positions are located inside same {@link module:engine/view/attributeelement~AttributeElement AttributeElement}),\n// starts on 0 offset and ends after last child node.\n//\n// @param {module:engine/view/range~Range} Range\n// @returns {Boolean}\nfunction rangeSpansOnAllChildren( range ) {\n\treturn range.start.parent == range.end.parent && range.start.parent.is( 'attributeElement' ) &&\n\t\trange.start.offset === 0 && range.end.offset === range.start.parent.childCount;\n}\n\n// Checks if provided nodes are valid to insert. Checks if each node is an instance of\n// {@link module:engine/view/text~Text Text} or {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n// {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n// {@link module:engine/view/emptyelement~EmptyElement EmptyElement} or\n// {@link module:engine/view/uielement~UIElement UIElement}.\n//\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-insert-invalid-node` when nodes to insert\n// contains instances that are not {@link module:engine/view/text~Text Texts},\n// {@link module:engine/view/emptyelement~EmptyElement EmptyElements},\n// {@link module:engine/view/uielement~UIElement UIElements},\n// {@link module:engine/view/attributeelement~AttributeElement AttributeElements} or\n// {@link module:engine/view/containerelement~ContainerElement ContainerElements}.\n//\n// @param Iterable. nodes\nfunction validateNodesToInsert( nodes ) {\n\tfor ( const node of nodes ) {\n\t\tif ( !validNodesToInsert.some( ( validNode => node instanceof validNode ) ) ) { // eslint-disable-line no-use-before-define\n\t\t\t/**\n\t\t\t * Inserted nodes should be valid to insert. of {@link module:engine/view/attributeelement~AttributeElement AttributeElement},\n\t\t\t * {@link module:engine/view/containerelement~ContainerElement ContainerElement},\n\t\t\t * {@link module:engine/view/emptyelement~EmptyElement EmptyElement},\n\t\t\t * {@link module:engine/view/uielement~UIElement UIElement}, {@link module:engine/view/text~Text Text}.\n\t\t\t *\n\t\t\t * @error view-writer-insert-invalid-node\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-writer-insert-invalid-node' );\n\t\t}\n\n\t\tif ( !node.is( 'text' ) ) {\n\t\t\tvalidateNodesToInsert( node.getChildren() );\n\t\t}\n\t}\n}\n\nconst validNodesToInsert = [ Text, AttributeElement, ContainerElement, EmptyElement, UIElement ];\n\n// Checks if node is ContainerElement or DocumentFragment, because in most cases they should be treated the same way.\n//\n// @param {module:engine/view/node~Node} node\n// @returns {Boolean} Returns `true` if node is instance of ContainerElement or DocumentFragment.\nfunction isContainerOrFragment( node ) {\n\treturn node && ( node.is( 'containerElement' ) || node.is( 'documentFragment' ) );\n}\n\n// Checks if {@link module:engine/view/range~Range#start range start} and {@link module:engine/view/range~Range#end range end} are placed\n// inside same {@link module:engine/view/containerelement~ContainerElement container element}.\n// Throws {@link module:utils/ckeditorerror~CKEditorError CKEditorError} `view-writer-invalid-range-container` when validation fails.\n//\n// @param {module:engine/view/range~Range} range\nfunction validateRangeContainer( range ) {\n\tconst startContainer = getParentContainer( range.start );\n\tconst endContainer = getParentContainer( range.end );\n\n\tif ( !startContainer || !endContainer || startContainer !== endContainer ) {\n\t\t/**\n\t\t * Range container is invalid. This can happen if {@link module:engine/view/range~Range#start range start} and\n\t\t * {@link module:engine/view/range~Range#end range end} positions are not placed inside same container or\n\t\t * parent container for these positions cannot be found.\n\t\t *\n\t\t * @error view-writer-invalid-range-container\n\t\t */\n\t\tthrow new CKEditorError( 'view-writer-invalid-range-container' );\n\t}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/writer.js\n// module id = 93\n// module chunks = 0","import apply from './_apply';\nimport toInteger from './toInteger';\n\n/** Used as the `TypeError` message for \"Functions\" methods. */\nvar FUNC_ERROR_TEXT = 'Expected a function';\n\n/* Built-in method references for those with the same name as other `lodash` methods. */\nvar nativeMax = Math.max;\n\n/**\n * Creates a function that invokes `func` with the `this` binding of the\n * created function and arguments from `start` and beyond provided as\n * an array.\n *\n * **Note:** This method is based on the\n * [rest parameter](https://mdn.io/rest_parameters).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Function\n * @param {Function} func The function to apply a rest parameter to.\n * @param {number} [start=func.length-1] The start position of the rest parameter.\n * @returns {Function} Returns the new function.\n * @example\n *\n * var say = _.rest(function(what, names) {\n * return what + ' ' + _.initial(names).join(', ') +\n * (_.size(names) > 1 ? ', & ' : '') + _.last(names);\n * });\n *\n * say('hello', 'fred', 'barney', 'pebbles');\n * // => 'hello fred, barney, & pebbles'\n */\nfunction rest(func, start) {\n if (typeof func != 'function') {\n throw new TypeError(FUNC_ERROR_TEXT);\n }\n start = nativeMax(start === undefined ? (func.length - 1) : toInteger(start), 0);\n return function() {\n var args = arguments,\n index = -1,\n length = nativeMax(args.length - start, 0),\n array = Array(length);\n\n while (++index < length) {\n array[index] = args[start + index];\n }\n switch (start) {\n case 0: return func.call(this, array);\n case 1: return func.call(this, args[0], array);\n case 2: return func.call(this, args[0], args[1], array);\n }\n var otherArgs = Array(start + 1);\n index = -1;\n while (++index < start) {\n otherArgs[index] = args[index];\n }\n otherArgs[start] = array;\n return apply(func, this, otherArgs);\n };\n}\n\nexport default rest;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/rest.js\n// module id = 9\n// module chunks = 0"," \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, {\n \t\t\t\tconfigurable: false,\n \t\t\t\tenumerable: true,\n \t\t\t\tget: getter\n \t\t\t});\n \t\t}\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 279);\n\n\n\n// WEBPACK FOOTER //\n// webpack/bootstrap 49a568eb53341071c0d6","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module utils/ckeditorerror\n */\n\n/**\n * URL to the documentation with error codes.\n */\nexport const DOCUMENTATION_URL =\n\t'https://ckeditor5.github.io/docs/nightly/ckeditor5/latest/framework/guides/support/error-codes.html';\n\n/**\n * The CKEditor error class.\n *\n * All errors will be shortened during the minification process in order to reduce the code size.\n * Therefore, all error messages should be documented in the same way as those in {@link module:utils/log}.\n *\n * Read more in the {@link module:utils/log} module.\n *\n * @extends Error\n */\nexport default class CKEditorError extends Error {\n\t/**\n\t * Creates an instance of the CKEditorError class.\n\t *\n\t * Read more about error logging in the {@link module:utils/log} module.\n\t *\n\t * @param {String} message The error message in an `error-name: Error message.` format.\n\t * During the minification process the \"Error message\" part will be removed to limit the code size\n\t * and a link to this error documentation will be added to the `message`.\n\t * @param {Object} [data] Additional data describing the error. A stringified version of this object\n\t * will be appended to the error message, so the data are quickly visible in the console. The original\n\t * data object will also be later available under the {@link #data} property.\n\t */\n\tconstructor( message, data ) {\n\t\tmessage = attachLinkToDocumentation( message );\n\n\t\tif ( data ) {\n\t\t\tmessage += ' ' + JSON.stringify( data );\n\t\t}\n\n\t\tsuper( message );\n\n\t\t/**\n\t\t * @member {String}\n\t\t */\n\t\tthis.name = 'CKEditorError';\n\n\t\t/**\n\t\t * The additional error data passed to the constructor.\n\t\t *\n\t\t * @member {Object}\n\t\t */\n\t\tthis.data = data;\n\t}\n\n\t/**\n\t * Checks if error is an instance of CKEditorError class.\n\t *\n\t * @param {Object} error Object to check.\n\t * @returns {Boolean}\n\t */\n\tstatic isCKEditorError( error ) {\n\t\treturn error instanceof CKEditorError;\n\t}\n}\n\n/**\n * Attaches link to the documentation at the end of the error message.\n *\n * @param {String} message Message to be logged.\n * @returns {String}\n */\nexport function attachLinkToDocumentation( message ) {\n\tconst matchedErrorName = message.match( /^([^:]+):/ );\n\n\tif ( !matchedErrorName ) {\n\t\treturn message;\n\t}\n\n\treturn message + ` Read more: ${ DOCUMENTATION_URL }#${ matchedErrorName[ 1 ] }.\\n`;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/ckeditorerror.js\n// module id = 0\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/position\n */\n\nimport TreeWalker from './treewalker';\nimport last from '@ckeditor/ckeditor5-utils/src/lib/lodash/last';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport Text from './text';\n\n/**\n * Represents a position in the model tree.\n *\n * **Note:** Position is based on offsets, not indexes. This means that position in element containing two text nodes\n * with data `foo` and `bar`, position between them has offset `3`, not `1`.\n * See {@link module:engine/model/position~Position#path} for more.\n *\n * Since position in a model is represented by a {@link module:engine/model/position~Position#root position root} and\n * {@link module:engine/model/position~Position#path position path} it is possible to create positions placed in non-existing elements.\n * This requirement is important for {@link module:engine/model/operation/transform~transform operational transformation}.\n *\n * Also, {@link module:engine/model/operation/operation~Operation operations}\n * kept in {@link module:engine/model/document~Document#history document history}\n * are storing positions (and ranges) which were correct when those operations were applied, but may not be correct\n * after document got changed.\n *\n * When changes are applied to model, it may also happen that {@link module:engine/model/position~Position#parent position parent}\n * will change even if position path has not changed. Keep in mind, that if a position leads to non-existing element,\n * {@link module:engine/model/position~Position#parent} and some other properties and methods will throw errors.\n *\n * In most cases, position with wrong path is caused by an error in code, but it is sometimes needed, as described above.\n */\nexport default class Position {\n\t/**\n\t * Creates a position.\n\t *\n\t * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} root Root of the position.\n\t * @param {Array.} path Position path. See {@link module:engine/model/position~Position#path}.\n\t */\n\tconstructor( root, path ) {\n\t\tif ( !root.is( 'element' ) && !root.is( 'documentFragment' ) ) {\n\t\t\t/**\n\t\t\t * Position root is invalid.\n\t\t\t *\n\t\t\t * Positions can only be anchored in elements or document fragments.\n\t\t\t *\n\t\t\t * @error model-position-root-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-position-root-invalid: Position root invalid.' );\n\t\t}\n\n\t\tif ( !( path instanceof Array ) || path.length === 0 ) {\n\t\t\t/**\n\t\t\t * Position path must be an array with at least one item.\n\t\t\t *\n\t\t\t * @error model-position-path-incorrect\n\t\t\t * @param path\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-position-path-incorrect: Position path must be an array with at least one item.', { path } );\n\t\t}\n\n\t\t// Normalize the root and path (if element was passed).\n\t\tpath = root.getPath().concat( path );\n\t\troot = root.root;\n\n\t\t/**\n\t\t * Root of the position path.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t\t * module:engine/model/position~Position#root\n\t\t */\n\t\tthis.root = root;\n\n\t\t/**\n\t\t * Position of the node in the tree. **Path contains offsets, not indexes.**\n\t\t *\n\t\t * Position can be placed before, after or in a {@link module:engine/model/node~Node node} if that node has\n\t\t * {@link module:engine/model/node~Node#offsetSize} greater than `1`. Items in position path are\n\t\t * {@link module:engine/model/node~Node#startOffset starting offsets} of position ancestors, starting from direct root children,\n\t\t * down to the position offset in it's parent.\n\t\t *\n\t\t *\t\t ROOT\n\t\t *\t\t |- P before: [ 0 ] after: [ 1 ]\n\t\t *\t\t |- UL before: [ 1 ] after: [ 2 ]\n\t\t *\t\t |- LI before: [ 1, 0 ] after: [ 1, 1 ]\n\t\t *\t\t | |- foo before: [ 1, 0, 0 ] after: [ 1, 0, 3 ]\n\t\t *\t\t |- LI before: [ 1, 1 ] after: [ 1, 2 ]\n\t\t *\t\t |- bar before: [ 1, 1, 0 ] after: [ 1, 1, 3 ]\n\t\t *\n\t\t * `foo` and `bar` are representing {@link module:engine/model/text~Text text nodes}. Since text nodes has offset size\n\t\t * greater than `1` you can place position offset between their start and end:\n\t\t *\n\t\t *\t\t ROOT\n\t\t *\t\t |- P\n\t\t *\t\t |- UL\n\t\t *\t\t |- LI\n\t\t *\t\t | |- f^o|o ^ has path: [ 1, 0, 1 ] | has path: [ 1, 0, 2 ]\n\t\t *\t\t |- LI\n\t\t *\t\t |- b^a|r ^ has path: [ 1, 1, 1 ] | has path: [ 1, 1, 2 ]\n\t\t *\n\t\t * @member {Array.} module:engine/model/position~Position#path\n\t\t */\n\t\tthis.path = path;\n\t}\n\n\t/**\n\t * Offset at which this position is located in its {@link module:engine/model/position~Position#parent parent}. It is equal\n\t * to the last item in position {@link module:engine/model/position~Position#path path}.\n\t *\n\t * @type {Number}\n\t */\n\tget offset() {\n\t\treturn last( this.path );\n\t}\n\n\t/**\n\t * @param {Number} newOffset\n\t */\n\tset offset( newOffset ) {\n\t\tthis.path[ this.path.length - 1 ] = newOffset;\n\t}\n\n\t/**\n\t * Parent element of this position.\n\t *\n\t * Keep in mind that `parent` value is calculated when the property is accessed.\n\t * If {@link module:engine/model/position~Position#path position path}\n\t * leads to a non-existing element, `parent` property will throw error.\n\t *\n\t * Also it is a good idea to cache `parent` property if it is used frequently in an algorithm (i.e. in a long loop).\n\t *\n\t * @readonly\n\t * @type {module:engine/model/element~Element}\n\t */\n\tget parent() {\n\t\tlet parent = this.root;\n\n\t\tfor ( let i = 0; i < this.path.length - 1; i++ ) {\n\t\t\tparent = parent.getChild( parent.offsetToIndex( this.path[ i ] ) );\n\t\t}\n\n\t\treturn parent;\n\t}\n\n\t/**\n\t * Position {@link module:engine/model/position~Position#offset offset} converted to an index in position's parent node. It is\n\t * equal to the {@link module:engine/model/node~Node#index index} of a node after this position. If position is placed\n\t * in text node, position index is equal to the index of that text node.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget index() {\n\t\treturn this.parent.offsetToIndex( this.offset );\n\t}\n\n\t/**\n\t * Returns {@link module:engine/model/text~Text text node} instance in which this position is placed or `null` if this\n\t * position is not in a text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/text~Text|null}\n\t */\n\tget textNode() {\n\t\tconst node = this.parent.getChild( this.index );\n\n\t\treturn ( node instanceof Text && node.startOffset < this.offset ) ? node : null;\n\t}\n\n\t/**\n\t * Node directly after this position or `null` if this position is in text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/model/node~Node|null}\n\t */\n\tget nodeAfter() {\n\t\treturn this.textNode === null ? this.parent.getChild( this.index ) : null;\n\t}\n\n\t/**\n\t * Node directly before this position or `null` if this position is in text node.\n\t *\n\t * @readonly\n\t * @type {Node}\n\t */\n\tget nodeBefore() {\n\t\treturn this.textNode === null ? this.parent.getChild( this.index - 1 ) : null;\n\t}\n\n\t/**\n\t * Is `true` if position is at the beginning of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtStart() {\n\t\treturn this.offset === 0;\n\t}\n\n\t/**\n\t * Is `true` if position is at the end of its {@link module:engine/model/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtEnd() {\n\t\treturn this.offset == this.parent.maxOffset;\n\t}\n\n\t/**\n\t * Checks whether this position is before or after given position.\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {module:engine/model/position~PositionRelation}\n\t */\n\tcompareWith( otherPosition ) {\n\t\tif ( this.root != otherPosition.root ) {\n\t\t\treturn 'different';\n\t\t}\n\n\t\tconst result = compareArrays( this.path, otherPosition.path );\n\n\t\tswitch ( result ) {\n\t\t\tcase 'same':\n\t\t\t\treturn 'same';\n\n\t\t\tcase 'prefix':\n\t\t\t\treturn 'before';\n\n\t\t\tcase 'extension':\n\t\t\t\treturn 'after';\n\n\t\t\tdefault:\n\t\t\t\tif ( this.path[ result ] < otherPosition.path[ result ] ) {\n\t\t\t\t\treturn 'before';\n\t\t\t\t} else {\n\t\t\t\t\treturn 'after';\n\t\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/model/treewalker~TreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text' );\n\t * \t\t// []foo -> foo[]\n\t *\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } );\n\t * \t\t// foo[] -> []foo\n\t *\n\t * \t\tgetLastMatchingPosition( value => false );\n\t * \t\t// Do not move the position.\n\t *\n\t * @param {Function} skip Callback function. Gets {@link module:engine/model/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t *\n\t * @returns {module:engine/model/position~Position} The position after the last item which matches the `skip` callback test.\n\t */\n\tgetLastMatchingPosition( skip, options = {} ) {\n\t\toptions.startPosition = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\t\ttreeWalker.skip( skip );\n\n\t\treturn treeWalker.position;\n\t}\n\n\t/**\n\t * Returns a path to this position's parent. Parent path is equal to position {@link module:engine/model/position~Position#path path}\n\t * but without the last item.\n\t *\n\t * This method returns the parent path even if the parent does not exists.\n\t *\n\t * @returns {Array.} Path to the parent.\n\t */\n\tgetParentPath() {\n\t\treturn this.path.slice( 0, -1 );\n\t}\n\n\t/**\n\t * Returns ancestors array of this position, that is this position's parent and its ancestors.\n\t *\n\t * @returns {Array.} Array with ancestors.\n\t */\n\tgetAncestors() {\n\t\tif ( this.parent.is( 'documentFragment' ) ) {\n\t\t\treturn [ this.parent ];\n\t\t} else {\n\t\t\treturn this.parent.getAncestors( { includeSelf: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns the slice of two position {@link #path paths} which is identical. The {@link #root roots}\n\t * of these two paths must be identical.\n\t *\n\t * @param {module:engine/model/position~Position} position The second position.\n\t * @returns {Array.} The common path.\n\t */\n\tgetCommonPath( position ) {\n\t\tif ( this.root != position.root ) {\n\t\t\treturn [];\n\t\t}\n\n\t\t// We find on which tree-level start and end have the lowest common ancestor\n\t\tconst cmp = compareArrays( this.path, position.path );\n\t\t// If comparison returned string it means that arrays are same.\n\t\tconst diffAt = ( typeof cmp == 'string' ) ? Math.min( this.path.length, position.path.length ) : cmp;\n\n\t\treturn this.path.slice( 0, diffAt );\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both positions. The {@link #root roots} of these two positions must be identical.\n\t *\n\t * @param {module:engine/model/position~Position} position The second position.\n\t * @returns {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor( position ) {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Returns a new instance of `Position`, that has same {@link #parent parent} but it's offset\n\t * is shifted by `shift` value (can be a negative value).\n\t *\n\t * @param {Number} shift Offset shift. Can be a negative value.\n\t * @returns {module:engine/model/position~Position} Shifted position.\n\t */\n\tgetShiftedBy( shift ) {\n\t\tconst shifted = Position.createFromPosition( this );\n\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\treturn shifted;\n\t}\n\n\t/**\n\t * Checks whether this position is after given position.\n\t *\n\t * @see module:engine/model/position~Position#isBefore\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if this position is after given position.\n\t */\n\tisAfter( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'after';\n\t}\n\n\t/**\n\t * Checks whether this position is before given position.\n\t *\n\t * **Note:** watch out when using negation of the value returned by this method, because the negation will also\n\t * be `true` if positions are in different roots and you might not expect this. You should probably use\n\t * `a.isAfter( b ) || a.isEqual( b )` or `!a.isBefore( p ) && a.root == b.root` in most scenarios. If your\n\t * condition uses multiple `isAfter` and `isBefore` checks, build them so they do not use negated values, i.e.:\n\t *\n\t *\t\tif ( a.isBefore( b ) && c.isAfter( d ) ) {\n\t *\t\t\t// do A.\n\t *\t\t} else {\n\t *\t\t\t// do B.\n\t *\t\t}\n\t *\n\t * or, if you have only one if-branch:\n\t *\n\t *\t\tif ( !( a.isBefore( b ) && c.isAfter( d ) ) {\n\t *\t\t\t// do B.\n\t *\t\t}\n\t *\n\t * rather than:\n\t *\n\t *\t\tif ( !a.isBefore( b ) || && !c.isAfter( d ) ) {\n\t *\t\t\t// do B.\n\t *\t\t} else {\n\t *\t\t\t// do A.\n\t *\t\t}\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if this position is before given position.\n\t */\n\tisBefore( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'before';\n\t}\n\n\t/**\n\t * Checks whether this position is equal to given position.\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if positions are same.\n\t */\n\tisEqual( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'same';\n\t}\n\n\t/**\n\t * Checks whether this position is touching given position. Positions touch when there are no text nodes\n\t * or empty nodes in a range between them. Technically, those positions are not equal but in many cases\n\t * they are very similar or even indistinguishable.\n\t *\n\t * **Note:** this method traverses model document so it can be only used when range is up-to-date with model document.\n\t *\n\t * @param {module:engine/model/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if positions touch.\n\t */\n\tisTouching( otherPosition ) {\n\t\tlet left = null;\n\t\tlet right = null;\n\t\tconst compare = this.compareWith( otherPosition );\n\n\t\tswitch ( compare ) {\n\t\t\tcase 'same':\n\t\t\t\treturn true;\n\n\t\t\tcase 'before':\n\t\t\t\tleft = Position.createFromPosition( this );\n\t\t\t\tright = Position.createFromPosition( otherPosition );\n\t\t\t\tbreak;\n\n\t\t\tcase 'after':\n\t\t\t\tleft = Position.createFromPosition( otherPosition );\n\t\t\t\tright = Position.createFromPosition( this );\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\treturn false;\n\t\t}\n\n\t\t// Cached for optimization purposes.\n\t\tlet leftParent = left.parent;\n\n\t\twhile ( left.path.length + right.path.length ) {\n\t\t\tif ( left.isEqual( right ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\tif ( left.path.length > right.path.length ) {\n\t\t\t\tif ( left.offset !== leftParent.maxOffset ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tleft.path = left.path.slice( 0, -1 );\n\t\t\t\tleftParent = leftParent.parent;\n\t\t\t\tleft.offset++;\n\t\t\t} else {\n\t\t\t\tif ( right.offset !== 0 ) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\tright.path = right.path.slice( 0, -1 );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by removing `howMany` nodes starting from `deletePosition`.\n\t * It may happen that this position is in a removed node. If that is the case, `null` is returned instead.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} deletePosition Position before the first removed node.\n\t * @param {Number} howMany How many nodes are removed.\n\t * @returns {module:engine/model/position~Position|null} Transformed position or `null`.\n\t */\n\t_getTransformedByDeletion( deletePosition, howMany ) {\n\t\tconst transformed = Position.createFromPosition( this );\n\n\t\t// This position can't be affected if deletion was in a different root.\n\t\tif ( this.root != deletePosition.root ) {\n\t\t\treturn transformed;\n\t\t}\n\n\t\tif ( compareArrays( deletePosition.getParentPath(), this.getParentPath() ) == 'same' ) {\n\t\t\t// If nodes are removed from the node that is pointed by this position...\n\t\t\tif ( deletePosition.offset < this.offset ) {\n\t\t\t\t// And are removed from before an offset of that position...\n\t\t\t\tif ( deletePosition.offset + howMany > this.offset ) {\n\t\t\t\t\t// Position is in removed range, it's no longer in the tree.\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Decrement the offset accordingly.\n\t\t\t\t\ttransformed.offset -= howMany;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if ( compareArrays( deletePosition.getParentPath(), this.getParentPath() ) == 'prefix' ) {\n\t\t\t// If nodes are removed from a node that is on a path to this position...\n\t\t\tconst i = deletePosition.path.length - 1;\n\n\t\t\tif ( deletePosition.offset <= this.path[ i ] ) {\n\t\t\t\t// And are removed from before next node of that path...\n\t\t\t\tif ( deletePosition.offset + howMany > this.path[ i ] ) {\n\t\t\t\t\t// If the next node of that path is removed return null\n\t\t\t\t\t// because the node containing this position got removed.\n\t\t\t\t\treturn null;\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, decrement index on that path.\n\t\t\t\t\ttransformed.path[ i ] -= howMany;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by inserting `howMany` nodes at `insertPosition`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} insertPosition Position where nodes are inserted.\n\t * @param {Number} howMany How many nodes are inserted.\n\t * @param {Boolean} insertBefore Flag indicating whether nodes are inserted before or after `insertPosition`.\n\t * This is important only when `insertPosition` and this position are same. If that is the case and the flag is\n\t * set to `true`, this position will get transformed. If the flag is set to `false`, it won't.\n\t * @returns {module:engine/model/position~Position} Transformed position.\n\t */\n\t_getTransformedByInsertion( insertPosition, howMany, insertBefore ) {\n\t\tconst transformed = Position.createFromPosition( this );\n\n\t\t// This position can't be affected if insertion was in a different root.\n\t\tif ( this.root != insertPosition.root ) {\n\t\t\treturn transformed;\n\t\t}\n\n\t\tif ( compareArrays( insertPosition.getParentPath(), this.getParentPath() ) == 'same' ) {\n\t\t\t// If nodes are inserted in the node that is pointed by this position...\n\t\t\tif ( insertPosition.offset < this.offset || ( insertPosition.offset == this.offset && insertBefore ) ) {\n\t\t\t\t// And are inserted before an offset of that position...\n\t\t\t\t// \"Push\" this positions offset.\n\t\t\t\ttransformed.offset += howMany;\n\t\t\t}\n\t\t} else if ( compareArrays( insertPosition.getParentPath(), this.getParentPath() ) == 'prefix' ) {\n\t\t\t// If nodes are inserted in a node that is on a path to this position...\n\t\t\tconst i = insertPosition.path.length - 1;\n\n\t\t\tif ( insertPosition.offset <= this.path[ i ] ) {\n\t\t\t\t// And are inserted before next node of that path...\n\t\t\t\t// \"Push\" the index on that path.\n\t\t\t\ttransformed.path[ i ] += howMany;\n\t\t\t}\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a copy of this position that is updated by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} sourcePosition Position before the first element to move.\n\t * @param {module:engine/model/position~Position} targetPosition Position where moved elements will be inserted.\n\t * @param {Number} howMany How many consecutive nodes to move, starting from `sourcePosition`.\n\t * @param {Boolean} insertBefore Flag indicating whether moved nodes are pasted before or after `insertPosition`.\n\t * This is important only when `targetPosition` and this position are same. If that is the case and the flag is\n\t * set to `true`, this position will get transformed by range insertion. If the flag is set to `false`, it won't.\n\t * @param {Boolean} [sticky] Flag indicating whether this position \"sticks\" to range, that is if it should be moved\n\t * with the moved range if it is equal to one of range's boundaries.\n\t * @returns {module:engine/model/position~Position} Transformed position.\n\t */\n\t_getTransformedByMove( sourcePosition, targetPosition, howMany, insertBefore, sticky ) {\n\t\t// Moving a range removes nodes from their original position. We acknowledge this by proper transformation.\n\t\tlet transformed = this._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\t// Then we update target position, as it could be affected by nodes removal too.\n\t\ttargetPosition = targetPosition._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tif ( transformed === null || ( sticky && transformed.isEqual( sourcePosition ) ) ) {\n\t\t\t// This position is inside moved range (or sticks to it).\n\t\t\t// In this case, we calculate a combination of this position, move source position and target position.\n\t\t\ttransformed = this._getCombined( sourcePosition, targetPosition );\n\t\t} else {\n\t\t\t// This position is not inside a removed range.\n\t\t\t// In next step, we simply reflect inserting `howMany` nodes, which might further affect the position.\n\t\t\ttransformed = transformed._getTransformedByInsertion( targetPosition, howMany, insertBefore );\n\t\t}\n\n\t\treturn transformed;\n\t}\n\n\t/**\n\t * Returns a new position that is a combination of this position and given positions.\n\t *\n\t * The combined position is a copy of this position transformed by moving a range starting at `source` position\n\t * to the `target` position. It is expected that this position is inside the moved range.\n\t *\n\t * Example:\n\t *\n\t *\t\tlet original = new Position( root, [ 2, 3, 1 ] );\n\t *\t\tlet source = new Position( root, [ 2, 2 ] );\n\t *\t\tlet target = new Position( otherRoot, [ 1, 1, 3 ] );\n\t *\t\toriginal._getCombined( source, target ); // path is [ 1, 1, 4, 1 ], root is `otherRoot`\n\t *\n\t * Explanation:\n\t *\n\t * We have a position `[ 2, 3, 1 ]` and move some nodes from `[ 2, 2 ]` to `[ 1, 1, 3 ]`. The original position\n\t * was inside moved nodes and now should point to the new place. The moved nodes will be after\n\t * positions `[ 1, 1, 3 ]`, `[ 1, 1, 4 ]`, `[ 1, 1, 5 ]`. Since our position was in the second moved node,\n\t * the transformed position will be in a sub-tree of a node at `[ 1, 1, 4 ]`. Looking at original path, we\n\t * took care of `[ 2, 3 ]` part of it. Now we have to add the rest of the original path to the transformed path.\n\t * Finally, the transformed position will point to `[ 1, 1, 4, 1 ]`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} source Beginning of the moved range.\n\t * @param {module:engine/model/position~Position} target Position where the range is moved.\n\t * @returns {module:engine/model/position~Position} Combined position.\n\t */\n\t_getCombined( source, target ) {\n\t\tconst i = source.path.length - 1;\n\n\t\t// The first part of a path to combined position is a path to the place where nodes were moved.\n\t\tconst combined = Position.createFromPosition( target );\n\n\t\t// Then we have to update the rest of the path.\n\n\t\t// Fix the offset because this position might be after `from` position and we have to reflect that.\n\t\tcombined.offset = combined.offset + this.path[ i ] - source.offset;\n\n\t\t// Then, add the rest of the path.\n\t\t// If this position is at the same level as `from` position nothing will get added.\n\t\tcombined.path = combined.path.concat( this.path.slice( i + 1 ) );\n\n\t\treturn combined;\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/model/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/model/item~Item model item} and `'before'` or `'after'` (sets position before or after given model item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link module:engine/model/position~Position.createBefore},\n\t * * {@link module:engine/model/position~Position.createAfter},\n\t * * {@link module:engine/model/position~Position.createFromParentAndOffset},\n\t * * {@link module:engine/model/position~Position.createFromPosition}.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t */\n\tstatic createAt( itemOrPosition, offset ) {\n\t\tif ( itemOrPosition instanceof Position ) {\n\t\t\treturn this.createFromPosition( itemOrPosition );\n\t\t} else {\n\t\t\tconst node = itemOrPosition;\n\n\t\t\tif ( offset == 'end' ) {\n\t\t\t\toffset = node.maxOffset;\n\t\t\t} else if ( offset == 'before' ) {\n\t\t\t\treturn this.createBefore( node );\n\t\t\t} else if ( offset == 'after' ) {\n\t\t\t\treturn this.createAfter( node );\n\t\t\t} else if ( !offset ) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\treturn this.createFromParentAndOffset( node, offset );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new position, after given {@link module:engine/model/item~Item model item}.\n\t *\n\t * @param {module:engine/model/item~Item} item Item after which the position should be placed.\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tstatic createAfter( item ) {\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You can not make a position after a root element.\n\t\t\t *\n\t\t\t * @error model-position-after-root\n\t\t\t * @param {module:engine/model/item~Item} root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-position-after-root: You cannot make a position after root.', { root: item } );\n\t\t}\n\n\t\treturn this.createFromParentAndOffset( item.parent, item.endOffset );\n\t}\n\n\t/**\n\t * Creates a new position, before the given {@link module:engine/model/item~Item model item}.\n\t *\n\t * @param {module:engine/model/item~Item} item Item before which the position should be placed.\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tstatic createBefore( item ) {\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You can not make a position before a root element.\n\t\t\t *\n\t\t\t * @error model-position-before-root\n\t\t\t * @param {module:engine/model/item~Item} root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-position-before-root: You cannot make a position before root.', { root: item } );\n\t\t}\n\n\t\treturn this.createFromParentAndOffset( item.parent, item.startOffset );\n\t}\n\n\t/**\n\t * Creates a new position from the parent element and an offset in that element.\n\t *\n\t * @param {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment} parent Position's parent.\n\t * @param {Number} offset Position's offset.\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tstatic createFromParentAndOffset( parent, offset ) {\n\t\tif ( !parent.is( 'element' ) && !parent.is( 'documentFragment' ) ) {\n\t\t\t/**\n\t\t\t * Position parent have to be a model element or model document fragment.\n\t\t\t *\n\t\t\t * @error model-position-parent-incorrect\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'model-position-parent-incorrect: Position parent have to be a element or document fragment.' );\n\t\t}\n\n\t\tconst path = parent.getPath();\n\n\t\tpath.push( offset );\n\n\t\treturn new this( parent.root, path );\n\t}\n\n\t/**\n\t * Creates a new position, which is equal to passed position.\n\t *\n\t * @param {module:engine/model/position~Position} position Position to be cloned.\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tstatic createFromPosition( position ) {\n\t\treturn new this( position.root, position.path.slice() );\n\t}\n\n\t/**\n\t * Creates a `Position` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param {Object} json Plain object to be converted to `Position`.\n\t * @returns {module:engine/model/position~Position} `Position` instance created using given plain object.\n\t */\n\tstatic fromJSON( json, doc ) {\n\t\tif ( json.root === '$graveyard' ) {\n\t\t\treturn new Position( doc.graveyard, json.path );\n\t\t}\n\n\t\tif ( !doc.hasRoot( json.root ) ) {\n\t\t\t/**\n\t\t\t * Cannot create position for document. Root with specified name does not exist.\n\t\t\t *\n\t\t\t * @error model-position-fromjson-no-root\n\t\t\t * @param {String} rootName\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'model-position-fromjson-no-root: Cannot create position for document. Root with specified name does not exist.',\n\t\t\t\t{ rootName: json.root }\n\t\t\t);\n\t\t}\n\n\t\treturn new Position( doc.getRoot( json.root ), json.path );\n\t}\n}\n\n/**\n * A flag indicating whether this position is `'before'` or `'after'` or `'same'` as given position.\n * If positions are in different roots `'different'` flag is returned.\n *\n * @typedef {String} module:engine/model/position~PositionRelation\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/position.js\n// module id = 1\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module core/plugin\n */\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * The base class for CKEditor plugin classes.\n *\n * @implements module:core/plugin~PluginInterface\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class Plugin {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( editor ) {\n\t\t/**\n\t\t * The editor instance.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:core/editor/editor~Editor} #editor\n\t\t */\n\t\tthis.editor = editor;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n}\n\nmix( Plugin, ObservableMixin );\n\n/**\n * The base interface for CKEditor plugins.\n *\n * In its minimal form it can be a simple function (it will be used as a constructor) which accepts\n * {@link module:core/editor/editor~Editor the editor} as a parm.\n * It can also implement a few methods which, when present, will be used to properly initialize and destroy the plugin.\n *\n *\t\t// A simple plugin which enables a data processor.\n *\t\tfunction MyPlugin( editor ) {\n *\t\t\teditor.data.processor = new MyDataProcessor();\n *\t\t}\n *\n * In most cases, however, you'll want to inherit from the {@link module:core/plugin~Plugin} class which implements the\n * {@link module:utils/observablemixin~ObservableMixin} and is, therefore, more convenient:\n *\n *\t\tclass MyPlugin extends Plugin {\n *\t\t\tinit() {\n *\t\t\t\t// `listenTo()` and `editor` are available thanks to `Plugin`.\n *\t\t\t\t// By using `listenTo()` you'll ensure that the listener will be removed when\n *\t\t\t\t// the plugin is destroyed.\n *\t\t\t\tthis.listenTo( this.editor, 'dataReady', () => {\n *\t\t\t\t\t// Do something when data is ready.\n *\t\t\t\t} );\n *\t\t\t}\n *\t\t}\n *\n * @interface PluginInterface\n */\n\n/**\n * Creates a new plugin instance. This is the first step of a plugin initialization.\n * See also {@link #init} and {@link #afterInit}.\n *\n * A plugin is always instantiated after its {@link module:core/plugin~PluginInterface.requires dependencies} and the\n * {@link #init} and {@link #afterInit} methods are called in the same order.\n *\n * Usually, you'll want to put your plugin's initialization code in the {@link #init} method.\n * The constructor can be understood as \"before init\" and used in special cases, just like\n * {@link #afterInit} servers for the special \"after init\" scenarios (e.g. code which depends on other\n * plugins, but which doesn't {@link module:core/plugin~PluginInterface.requires explicitly require} them).\n *\n * @method #constructor\n * @param {module:core/editor/editor~Editor} editor\n */\n\n/**\n * An array of plugins required by this plugin.\n *\n * To keep a plugin class definition tight it's recommended to define this property as a static getter:\n *\n *\t\timport Image from './image.js';\n *\n *\t\texport default class ImageCaption {\n *\t\t\tstatic get requires() {\n *\t\t\t\treturn [ Image ];\n *\t\t\t}\n *\t\t}\n *\n * @static\n * @readonly\n * @member {Array.|undefined} module:core/plugin~PluginInterface.requires\n */\n\n/**\n * Optional name of the plugin. If set, the plugin will be available in\n * {@link module:core/plugincollection~PluginCollection#get} by its\n * name and its constructor. If not, then only by its constructor.\n *\n * The name should reflect the constructor name.\n *\n * To keep a plugin class definition tight it's recommended to define this property as a static getter:\n *\n *\t\texport default class ImageCaption {\n *\t\t\tstatic get pluginName() {\n *\t\t\t\treturn 'ImageCaption';\n *\t\t\t}\n *\t\t}\n *\n * Note: The native `Function.name` property could not be used to keep the plugin name because\n * it will be mangled during code minification.\n *\n * Naming a plugin is necessary to enable removing it through the\n * {@link module:core/editor/editorconfig~EditorConfig#removePlugins `config.removePlugins`} option.\n *\n * @static\n * @readonly\n * @member {String|undefined} module:core/plugin~PluginInterface.pluginName\n */\n\n/**\n * The second stage (after plugin {@link #constructor}) of plugin initialization.\n * Unlike the plugin constructor this method can be asynchronous.\n *\n * A plugin's `init()` method is called after its {@link module:core/plugin~PluginInterface.requires dependencies} are initialized,\n * so in the same order as constructors of these plugins.\n *\n * **Note:** This method is optional. A plugin instance does not need to have to have it defined.\n *\n * @method #init\n * @returns {null|Promise}\n */\n\n/**\n * The third (and last) stage of plugin initialization. See also {@link #constructor} and {@link #init}.\n *\n * **Note:** This method is optional. A plugin instance does not need to have to have it defined.\n *\n * @method #afterInit\n * @returns {null|Promise}\n */\n\n/**\n * Destroys the plugin.\n *\n * **Note:** This method is optional. A plugin instance does not need to have to have it defined.\n *\n * @method #destroy\n * @returns {null|Promise}\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-core/src/plugin.js\n// module id = 2\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/range\n */\n\nimport Position from './position';\nimport TreeWalker from './treewalker';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Range class. Range is iterable.\n */\nexport default class Range {\n\t/**\n\t * Creates a range spanning from `start` position to `end` position.\n\t *\n\t * **Note:** Constructor creates it's own {@link module:engine/model/position~Position Position} instances basing on passed values.\n\t *\n\t * @param {module:engine/model/position~Position} start Start position.\n\t * @param {module:engine/model/position~Position} [end] End position. If not set, range will be collapsed at `start` position.\n\t */\n\tconstructor( start, end = null ) {\n\t\t/**\n\t\t * Start position.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position}\n\t\t */\n\t\tthis.start = Position.createFromPosition( start );\n\n\t\t/**\n\t\t * End position.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/position~Position}\n\t\t */\n\t\tthis.end = end ? Position.createFromPosition( end ) : Position.createFromPosition( start );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n\t * them together with additional information like length or {@link module:engine/model/position~Position positions},\n\t * grouped as {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t * It iterates over all {@link module:engine/model/textproxy~TextProxy text contents} that are inside the range\n\t * and all the {@link module:engine/model/element~Element}s that are entered into when iterating over this range.\n\t *\n\t * This iterator uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range\n\t * and `ignoreElementEnd` option set to `true`.\n\t *\n\t * @returns {Iterable.}\n\t */\n\t* [ Symbol.iterator ]() {\n\t\tyield* new TreeWalker( { boundaries: this, ignoreElementEnd: true } );\n\t}\n\n\t/**\n\t * Returns whether the range is collapsed, that is if {@link #start} and\n\t * {@link #end} positions are equal.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isCollapsed() {\n\t\treturn this.start.isEqual( this.end );\n\t}\n\n\t/**\n\t * Returns whether this range is flat, that is if {@link #start} position and\n\t * {@link #end} position are in the same {@link module:engine/model/position~Position#parent}.\n\t *\n\t * @type {Boolean}\n\t */\n\tget isFlat() {\n\t\treturn this.start.parent === this.end.parent;\n\t}\n\n\t/**\n\t * Range root element.\n\t *\n\t * @type {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.start.root;\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link module:engine/model/position~Position position}.\n\t *\n\t * @param {module:engine/model/position~Position} position Position to check.\n\t * @returns {Boolean} `true` if given {@link module:engine/model/position~Position position} is contained\n\t * in this range,`false` otherwise.\n\t */\n\tcontainsPosition( position ) {\n\t\treturn position.isAfter( this.start ) && position.isBefore( this.end );\n\t}\n\n\t/**\n\t * Checks whether this range contains given {@link ~Range range}.\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to check.\n\t * @param {Boolean} [loose=false] Whether the check is loose or strict. If the check is strict (`false`), compared range cannot\n\t * start or end at the same position as this range boundaries. If the check is loose (`true`), compared range can start, end or\n\t * even be equal to this range. Note that collapsed ranges are always compared in strict mode.\n\t * @returns {Boolean} `true` if given {@link ~Range range} boundaries are contained by this range, `false` otherwise.\n\t */\n\tcontainsRange( otherRange, loose = false ) {\n\t\tif ( otherRange.isCollapsed ) {\n\t\t\tloose = false;\n\t\t}\n\n\t\tconst containsStart = this.containsPosition( otherRange.start ) || ( loose && this.start.isEqual( otherRange.start ) );\n\t\tconst containsEnd = this.containsPosition( otherRange.end ) || ( loose && this.end.isEqual( otherRange.end ) );\n\n\t\treturn containsStart && containsEnd;\n\t}\n\n\t/**\n\t * Checks whether given {@link module:engine/model/item~Item} is inside this range.\n\t *\n\t * @param {module:engine/model/item~Item} item Model item to check.\n\t */\n\tcontainsItem( item ) {\n\t\tconst pos = Position.createBefore( item );\n\n\t\treturn this.containsPosition( pos ) || this.start.isEqual( pos );\n\t}\n\n\t/**\n\t * Two ranges are equal if their {@link #start} and {@link #end} positions are equal.\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} `true` if ranges are equal, `false` otherwise.\n\t */\n\tisEqual( otherRange ) {\n\t\treturn this.start.isEqual( otherRange.start ) && this.end.isEqual( otherRange.end );\n\t}\n\n\t/**\n\t * Checks and returns whether this range intersects with given range.\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to compare with.\n\t * @returns {Boolean} `true` if ranges intersect, `false` otherwise.\n\t */\n\tisIntersecting( otherRange ) {\n\t\treturn this.start.isBefore( otherRange.end ) && this.end.isAfter( otherRange.start );\n\t}\n\n\t/**\n\t * Computes which part(s) of this {@link ~Range range} is not a part of given {@link ~Range range}.\n\t * Returned array contains zero, one or two {@link ~Range ranges}.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = new Range( new Position( root, [ 2, 7 ] ), new Position( root, [ 4, 0, 1 ] ) );\n\t *\t\tlet otherRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 5 ] ) );\n\t *\t\tlet transformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has no ranges because `otherRange` contains `range`\n\t *\n\t *\t\totherRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 3 ] ) );\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has one range: from [ 3 ] to [ 4, 0, 1 ]\n\t *\n\t *\t\totherRange = new Range( new Position( root, [ 3 ] ), new Position( root, [ 4 ] ) );\n\t *\t\ttransformed = range.getDifference( otherRange );\n\t *\t\t// transformed array has two ranges: from [ 2, 7 ] to [ 3 ] and from [ 4 ] to [ 4, 0, 1 ]\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to differentiate against.\n\t * @returns {Array.} The difference between ranges.\n\t */\n\tgetDifference( otherRange ) {\n\t\tconst ranges = [];\n\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect.\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the start to the middle of this range.\n\t\t\t\tranges.push( new Range( this.start, otherRange.start ) );\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// add shrunken range - from the middle of this range to the end.\n\t\t\t\tranges.push( new Range( otherRange.end, this.end ) );\n\t\t\t}\n\t\t} else {\n\t\t\t// Ranges do not intersect, return the original range.\n\t\t\tranges.push( Range.createFromRange( this ) );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an intersection of this {@link ~Range range} and given {@link ~Range range}.\n\t * Intersection is a common part of both of those ranges. If ranges has no common part, returns `null`.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = new Range( new Position( root, [ 2, 7 ] ), new Position( root, [ 4, 0, 1 ] ) );\n\t *\t\tlet otherRange = new Range( new Position( root, [ 1 ] ), new Position( root, [ 2 ] ) );\n\t *\t\tlet transformed = range.getIntersection( otherRange ); // null - ranges have no common part\n\t *\n\t *\t\totherRange = new Range( new Position( root, [ 3 ] ), new Position( root, [ 5 ] ) );\n\t *\t\ttransformed = range.getIntersection( otherRange ); // range from [ 3 ] to [ 4, 0, 1 ]\n\t *\n\t * @param {module:engine/model/range~Range} otherRange Range to check for intersection.\n\t * @returns {module:engine/model/range~Range|null} A common part of given ranges or `null` if ranges have no common part.\n\t */\n\tgetIntersection( otherRange ) {\n\t\tif ( this.isIntersecting( otherRange ) ) {\n\t\t\t// Ranges intersect, so a common range will be returned.\n\t\t\t// At most, it will be same as this range.\n\t\t\tlet commonRangeStart = this.start;\n\t\t\tlet commonRangeEnd = this.end;\n\n\t\t\tif ( this.containsPosition( otherRange.start ) ) {\n\t\t\t\t// Given range start is inside this range. This means thaNt we have to\n\t\t\t\t// shrink common range to the given range start.\n\t\t\t\tcommonRangeStart = otherRange.start;\n\t\t\t}\n\n\t\t\tif ( this.containsPosition( otherRange.end ) ) {\n\t\t\t\t// Given range end is inside this range. This means that we have to\n\t\t\t\t// shrink common range to the given range end.\n\t\t\t\tcommonRangeEnd = otherRange.end;\n\t\t\t}\n\n\t\t\treturn new Range( commonRangeStart, commonRangeEnd );\n\t\t}\n\n\t\t// Ranges do not intersect, so they do not have common part.\n\t\treturn null;\n\t}\n\n\t/**\n\t * Computes and returns the smallest set of {@link #isFlat flat} ranges, that covers this range in whole.\n\t *\n\t * See an example of a model structure (`[` and `]` are range boundaries):\n\t *\n\t *\t\troot root\n\t *\t\t |- element DIV DIV P2 P3 DIV\n\t *\t\t | |- element H H P1 f o o b a r H P4\n\t *\t\t | | |- \"fir[st\" fir[st lorem se]cond ipsum\n\t *\t\t | |- element P1\n\t *\t\t | | |- \"lorem\" ||\n\t *\t\t |- element P2 ||\n\t *\t\t | |- \"foo\" VV\n\t *\t\t |- element P3\n\t *\t\t | |- \"bar\" root\n\t *\t\t |- element DIV DIV [P2 P3] DIV\n\t *\t\t | |- element H H [P1] f o o b a r H P4\n\t *\t\t | | |- \"se]cond\" fir[st] lorem [se]cond ipsum\n\t *\t\t | |- element P4\n\t *\t\t | | |- \"ipsum\"\n\t *\n\t * As it can be seen, letters contained in the range are: `stloremfoobarse`, spread across different parents.\n\t * We are looking for minimal set of flat ranges that contains the same nodes.\n\t *\n\t * Minimal flat ranges for above range `( [ 0, 0, 3 ], [ 3, 0, 2 ] )` will be:\n\t *\n\t *\t\t( [ 0, 0, 3 ], [ 0, 0, 5 ] ) = \"st\"\n\t *\t\t( [ 0, 1 ], [ 0, 2 ] ) = element P1 (\"lorem\")\n\t *\t\t( [ 1 ], [ 3 ] ) = element P2, element P3 (\"foobar\")\n\t *\t\t( [ 3, 0, 0 ], [ 3, 0, 2 ] ) = \"se\"\n\t *\n\t * **Note:** if an {@link module:engine/model/element~Element element} is not wholly contained in this range, it won't be returned\n\t * in any of the returned flat ranges. See in the example how `H` elements at the beginning and at the end of the range\n\t * were omitted. Only their parts that were wholly in the range were returned.\n\t *\n\t * **Note:** this method is not returning flat ranges that contain no nodes.\n\t *\n\t * @returns {Array.} Array of flat ranges covering this range.\n\t */\n\tgetMinimalFlatRanges() {\n\t\tconst ranges = [];\n\t\tconst diffAt = this.start.getCommonPath( this.end ).length;\n\n\t\tconst pos = Position.createFromPosition( this.start );\n\t\tlet posParent = pos.parent;\n\n\t\t// Go up.\n\t\twhile ( pos.path.length > diffAt + 1 ) {\n\t\t\tconst howMany = posParent.maxOffset - pos.offset;\n\n\t\t\tif ( howMany !== 0 ) {\n\t\t\t\tranges.push( new Range( pos, pos.getShiftedBy( howMany ) ) );\n\t\t\t}\n\n\t\t\tpos.path = pos.path.slice( 0, -1 );\n\t\t\tpos.offset++;\n\t\t\tposParent = posParent.parent;\n\t\t}\n\n\t\t// Go down.\n\t\twhile ( pos.path.length <= this.end.path.length ) {\n\t\t\tconst offset = this.end.path[ pos.path.length - 1 ];\n\t\t\tconst howMany = offset - pos.offset;\n\n\t\t\tif ( howMany !== 0 ) {\n\t\t\t\tranges.push( new Range( pos, pos.getShiftedBy( howMany ) ) );\n\t\t\t}\n\n\t\t\tpos.offset = offset;\n\t\t\tpos.path.push( 0 );\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Creates a {@link module:engine/model/treewalker~TreeWalker TreeWalker} instance with this range as a boundary.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t * @param {module:engine/model/position~Position} [options.startPosition]\n\t * @param {Boolean} [options.singleCharacters=false]\n\t * @param {Boolean} [options.shallow=false]\n\t * @param {Boolean} [options.ignoreElementEnd=false]\n\t */\n\tgetWalker( options = {} ) {\n\t\toptions.boundaries = this;\n\n\t\treturn new TreeWalker( options );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/item~Item items} that are in this range and returns\n\t * them.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range and `ignoreElementEnd` option\n\t * set to `true`. However it returns only {@link module:engine/model/item~Item model items},\n\t * not {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @method getItems\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t * @returns {Iterable.}\n\t */\n\t* getItems( options = {} ) {\n\t\toptions.boundaries = this;\n\t\toptions.ignoreElementEnd = true;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.item;\n\t\t}\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all {@link module:engine/model/position~Position positions} that are boundaries or\n\t * contained in this range.\n\t *\n\t * This method uses {@link module:engine/model/treewalker~TreeWalker} with `boundaries` set to this range. However it returns only\n\t * {@link module:engine/model/position~Position positions}, not {@link module:engine/model/treewalker~TreeWalkerValue}.\n\t *\n\t * You may specify additional options for the tree walker. See {@link module:engine/model/treewalker~TreeWalker} for\n\t * a full list of available options.\n\t *\n\t * @param {Object} options Object with configuration options. See {@link module:engine/model/treewalker~TreeWalker}.\n\t * @returns {Iterable.}\n\t */\n\t* getPositions( options = {} ) {\n\t\toptions.boundaries = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\n\t\tyield treeWalker.position;\n\n\t\tfor ( const value of treeWalker ) {\n\t\t\tyield value.nextPosition;\n\t\t}\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by given `delta`.\n\t *\n\t * **Note:** transformation may break one range into multiple ranges (e.g. when a part of the range is\n\t * moved to a different part of document tree). For this reason, an array is returned by this method and it\n\t * may contain one or more `Range` instances.\n\t *\n\t * @param {module:engine/model/delta/delta~Delta} delta Delta to transform range by.\n\t * @returns {Array.} Range which is the result of transformation.\n\t */\n\tgetTransformedByDelta( delta ) {\n\t\tconst ranges = [ Range.createFromRange( this ) ];\n\n\t\t// Operation types that a range can be transformed by.\n\t\tconst supportedTypes = new Set( [ 'insert', 'move', 'remove', 'reinsert' ] );\n\n\t\tfor ( const operation of delta.operations ) {\n\t\t\tif ( supportedTypes.has( operation.type ) ) {\n\t\t\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\t\t\tconst result = ranges[ i ]._getTransformedByDocumentChange(\n\t\t\t\t\t\toperation.type,\n\t\t\t\t\t\tdelta.type,\n\t\t\t\t\t\toperation.targetPosition || operation.position,\n\t\t\t\t\t\toperation.howMany || operation.nodes.maxOffset,\n\t\t\t\t\t\toperation.sourcePosition\n\t\t\t\t\t);\n\n\t\t\t\t\tranges.splice( i, 1, ...result );\n\n\t\t\t\t\ti += result.length - 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by multiple `deltas`.\n\t *\n\t * **Note:** transformation may break one range into multiple ranges (e.g. when a part of the range is\n\t * moved to a different part of document tree). For this reason, an array is returned by this method and it\n\t * may contain one or more `Range` instances.\n\t *\n\t * @param {Iterable.} deltas Deltas to transform the range by.\n\t * @returns {Array.} Range which is the result of transformation.\n\t */\n\tgetTransformedByDeltas( deltas ) {\n\t\tconst ranges = [ Range.createFromRange( this ) ];\n\n\t\tfor ( const delta of deltas ) {\n\t\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\t\tconst result = ranges[ i ].getTransformedByDelta( delta );\n\n\t\t\t\tranges.splice( i, 1, ...result );\n\t\t\t\ti += result.length - 1;\n\t\t\t}\n\t\t}\n\n\t\t// It may happen that a range is split into two, and then the part of second \"piece\" is moved into first\n\t\t// \"piece\". In this case we will have incorrect third range, which should not be included in the result --\n\t\t// because it is already included in the first \"piece\". In this loop we are looking for all such ranges that\n\t\t// are inside other ranges and we simply remove them.\n\t\tfor ( let i = 0; i < ranges.length; i++ ) {\n\t\t\tconst range = ranges[ i ];\n\n\t\t\tfor ( let j = i + 1; j < ranges.length; j++ ) {\n\t\t\t\tconst next = ranges[ j ];\n\n\t\t\t\tif ( range.containsRange( next ) || next.containsRange( range ) || range.isEqual( next ) ) {\n\t\t\t\t\tranges.splice( j, 1 );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn ranges;\n\t}\n\n\t/**\n\t * Returns an {@link module:engine/model/element~Element} or {@link module:engine/model/documentfragment~DocumentFragment}\n\t * which is a common ancestor of the range's both ends (in which the entire range is contained).\n\t *\n\t * @returns {module:engine/model/element~Element|module:engine/model/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor() {\n\t\treturn this.start.getCommonAncestor( this.end );\n\t}\n\n\t/**\n\t * Returns a range that is a result of transforming this range by a change in the model document.\n\t *\n\t * @protected\n\t * @param {'insert'|'move'|'remove'|'reinsert'} type Change type.\n\t * @param {String} deltaType Type of delta that introduced the change.\n\t * @param {module:engine/model/position~Position} targetPosition Position before the first changed node.\n\t * @param {Number} howMany How many nodes has been changed.\n\t * @param {module:engine/model/position~Position} sourcePosition Source position of changes.\n\t * @returns {Array.}\n\t */\n\t_getTransformedByDocumentChange( type, deltaType, targetPosition, howMany, sourcePosition ) {\n\t\tif ( type == 'insert' ) {\n\t\t\treturn this._getTransformedByInsertion( targetPosition, howMany, false, false );\n\t\t} else {\n\t\t\tconst sourceRange = Range.createFromPositionAndShift( sourcePosition, howMany );\n\n\t\t\t// Edge case for merge delta.\n\t\t\tif (\n\t\t\t\tdeltaType == 'merge' &&\n\t\t\t\tthis.isCollapsed &&\n\t\t\t\t( this.start.isEqual( sourceRange.start ) || this.start.isEqual( sourceRange.end ) )\n\t\t\t) {\n\t\t\t\t// Collapsed range is in merged element, at the beginning or at the end of it.\n\t\t\t\t// Without fix, the range would end up in the graveyard, together with removed element.\n\t\t\t\t//

foo

[]bar

->

foobar

[]

->

foobar

->

foo[]bar

\n\t\t\t\t//

foo

bar[]

->

foobar

[]

->

foobar

->

foobar[]

\n\t\t\t\t//\n\t\t\t\t// In most cases, `sourceRange.start.offset` for merge delta's move operation would be 0,\n\t\t\t\t// so this formula might look overcomplicated.\n\t\t\t\t// However in some scenarios, after operational transformation, move operation might not\n\t\t\t\t// in fact start from 0 and we need to properly count new offset.\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-engine/pull/1133#issuecomment-329080668.\n\t\t\t\tconst offset = this.start.offset - sourceRange.start.offset;\n\n\t\t\t\treturn [ new Range( targetPosition.getShiftedBy( offset ) ) ];\n\t\t\t}\n\t\t\t//\n\t\t\t// Edge case for split delta.\n\t\t\t//\n\t\t\tif ( deltaType == 'split' && this.isCollapsed && this.end.isEqual( sourceRange.end ) ) {\n\t\t\t\t// Collapsed range is at the end of split element.\n\t\t\t\t// Without fix, the range would end up at the end of split (old) element instead of at the end of new element.\n\t\t\t\t// That would happen because this range is not technically inside moved range. Last step below shows the fix.\n\t\t\t\t//

foobar[]

->

foobar[]

->

foo[]

bar

->

foo

bar[]

\n\t\t\t\treturn [ new Range( targetPosition.getShiftedBy( howMany ) ) ];\n\t\t\t}\n\t\t\t//\n\t\t\t// Other edge cases:\n\t\t\t//\n\t\t\t// In all examples `[]` is `this` and `{}` is `sourceRange`, while `^` is move target position.\n\t\t\t//\n\t\t\t// Example:\n\t\t\t//

xx

^{

a[b

}

c]d

-->

xx

a[b

c]d

\n\t\t\t// ^

xx

{

a[b

}

c]d

-->

a[b

xx

c]d

// Note

xx

inclusion.\n\t\t\t// {

a[b

}
^

c]d

-->

a[b

c]d

\n\t\t\tif (\n\t\t\t\t( sourceRange.containsPosition( this.start ) || sourceRange.start.isEqual( this.start ) ) &&\n\t\t\t\tthis.containsPosition( sourceRange.end ) &&\n\t\t\t\tthis.end.isAfter( targetPosition )\n\t\t\t) {\n\t\t\t\tconst start = this.start._getCombined(\n\t\t\t\t\tsourcePosition,\n\t\t\t\t\ttargetPosition._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t\t);\n\t\t\t\tconst end = this.end._getTransformedByMove( sourcePosition, targetPosition, howMany, false, false );\n\n\t\t\t\treturn [ new Range( start, end ) ];\n\t\t\t}\n\n\t\t\t// Example:\n\t\t\t//

c[d

{

a]b

}
^

xx

-->

c[d

a]b

xx

\n\t\t\t//

c[d

{

a]b

}

xx

^ -->

c[d

xx

a]b

// Note

xx

inclusion.\n\t\t\t//

c[d

^{

a]b

}
-->

c[d

a]b

\n\t\t\tif (\n\t\t\t\t( sourceRange.containsPosition( this.end ) || sourceRange.end.isEqual( this.end ) ) &&\n\t\t\t\tthis.containsPosition( sourceRange.start ) &&\n\t\t\t\tthis.start.isBefore( targetPosition )\n\t\t\t) {\n\t\t\t\tconst start = this.start._getTransformedByMove(\n\t\t\t\t\tsourcePosition,\n\t\t\t\t\ttargetPosition,\n\t\t\t\t\thowMany,\n\t\t\t\t\ttrue,\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t\tconst end = this.end._getCombined(\n\t\t\t\t\tsourcePosition,\n\t\t\t\t\ttargetPosition._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t\t);\n\n\t\t\t\treturn [ new Range( start, end ) ];\n\t\t\t}\n\n\t\t\treturn this._getTransformedByMove( sourcePosition, targetPosition, howMany );\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array containing one or two {@link ~Range ranges} that are a result of transforming this\n\t * {@link ~Range range} by inserting `howMany` nodes at `insertPosition`. Two {@link ~Range ranges} are\n\t * returned if the insertion was inside this {@link ~Range range} and `spread` is set to `true`.\n\t *\n\t * Examples:\n\t *\n\t *\t\tlet range = new Range( new Position( root, [ 2, 7 ] ), new Position( root, [ 4, 0, 1 ] ) );\n\t *\t\tlet transformed = range._getTransformedByInsertion( new Position( root, [ 1 ] ), 2 );\n\t *\t\t// transformed array has one range from [ 4, 7 ] to [ 6, 0, 1 ]\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 4, 0, 0 ] ), 4 );\n\t *\t\t// transformed array has one range from [ 2, 7 ] to [ 4, 0, 5 ]\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 3, 2 ] ), 4 );\n\t *\t\t// transformed array has one range, which is equal to original range\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 3, 2 ] ), 4, true );\n\t *\t\t// transformed array has two ranges: from [ 2, 7 ] to [ 3, 2 ] and from [ 3, 6 ] to [ 4, 0, 1 ]\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 4, 0, 1 ] ), 4, false, false );\n\t *\t\t// transformed array has one range which is equal to original range because insertion is after the range boundary\n\t *\n\t *\t\ttransformed = range._getTransformedByInsertion( new Position( root, [ 4, 0, 1 ] ), 4, false, true );\n\t *\t\t// transformed array has one range: from [ 2, 7 ] to [ 4, 0, 5 ] because range was expanded\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} insertPosition Position where nodes are inserted.\n\t * @param {Number} howMany How many nodes are inserted.\n\t * @param {Boolean} [spread] Flag indicating whether this {~Range range} should be spread if insertion\n\t * was inside the range. Defaults to `false`.\n\t * @param {Boolean} [isSticky] Flag indicating whether insertion should expand a range if it is in a place of\n\t * range boundary. Defaults to `false`.\n\t * @returns {Array.} Result of the transformation.\n\t */\n\t_getTransformedByInsertion( insertPosition, howMany, spread = false, isSticky = false ) {\n\t\tif ( spread && this.containsPosition( insertPosition ) ) {\n\t\t\t// Range has to be spread. The first part is from original start to the spread point.\n\t\t\t// The other part is from spread point to the original end, but transformed by\n\t\t\t// insertion to reflect insertion changes.\n\n\t\t\treturn [\n\t\t\t\tnew Range( this.start, insertPosition ),\n\t\t\t\tnew Range(\n\t\t\t\t\tinsertPosition._getTransformedByInsertion( insertPosition, howMany, true ),\n\t\t\t\t\tthis.end._getTransformedByInsertion( insertPosition, howMany, this.isCollapsed )\n\t\t\t\t)\n\t\t\t];\n\t\t} else {\n\t\t\tconst range = Range.createFromRange( this );\n\n\t\t\tconst insertBeforeStart = range.isCollapsed ? true : !isSticky;\n\t\t\tconst insertBeforeEnd = range.isCollapsed ? true : isSticky;\n\n\t\t\trange.start = range.start._getTransformedByInsertion( insertPosition, howMany, insertBeforeStart );\n\t\t\trange.end = range.end._getTransformedByInsertion( insertPosition, howMany, insertBeforeEnd );\n\n\t\t\treturn [ range ];\n\t\t}\n\t}\n\n\t/**\n\t * Returns an array containing {@link ~Range ranges} that are a result of transforming this\n\t * {@link ~Range range} by moving `howMany` nodes from `sourcePosition` to `targetPosition`.\n\t *\n\t * @protected\n\t * @param {module:engine/model/position~Position} sourcePosition Position from which nodes are moved.\n\t * @param {module:engine/model/position~Position} targetPosition Position to where nodes are moved.\n\t * @param {Number} howMany How many nodes are moved.\n\t * @returns {Array.} Result of the transformation.\n\t */\n\t_getTransformedByMove( sourcePosition, targetPosition, howMany ) {\n\t\tif ( this.isCollapsed ) {\n\t\t\tconst newPos = this.start._getTransformedByMove( sourcePosition, targetPosition, howMany, true, false );\n\n\t\t\treturn [ new Range( newPos ) ];\n\t\t}\n\n\t\tlet result;\n\n\t\tconst moveRange = new Range( sourcePosition, sourcePosition.getShiftedBy( howMany ) );\n\n\t\tconst differenceSet = this.getDifference( moveRange );\n\t\tlet difference = null;\n\n\t\tconst common = this.getIntersection( moveRange );\n\n\t\tif ( differenceSet.length == 1 ) {\n\t\t\t// `moveRange` and this range may intersect.\n\t\t\tdifference = new Range(\n\t\t\t\tdifferenceSet[ 0 ].start._getTransformedByDeletion( sourcePosition, howMany ),\n\t\t\t\tdifferenceSet[ 0 ].end._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t);\n\t\t} else if ( differenceSet.length == 2 ) {\n\t\t\t// `moveRange` is inside this range.\n\t\t\tdifference = new Range(\n\t\t\t\tthis.start,\n\t\t\t\tthis.end._getTransformedByDeletion( sourcePosition, howMany )\n\t\t\t);\n\t\t} // else, `moveRange` contains this range.\n\n\t\tconst insertPosition = targetPosition._getTransformedByDeletion( sourcePosition, howMany );\n\n\t\tif ( difference ) {\n\t\t\tresult = difference._getTransformedByInsertion( insertPosition, howMany, common !== null );\n\t\t} else {\n\t\t\tresult = [];\n\t\t}\n\n\t\tif ( common ) {\n\t\t\tresult.push( new Range(\n\t\t\t\tcommon.start._getCombined( moveRange.start, insertPosition ),\n\t\t\t\tcommon.end._getCombined( moveRange.start, insertPosition )\n\t\t\t) );\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates a new range, spreading from specified {@link module:engine/model/position~Position position} to a position moved by\n\t * given `shift`. If `shift` is a negative value, shifted position is treated as the beginning of the range.\n\t *\n\t * @param {module:engine/model/position~Position} position Beginning of the range.\n\t * @param {Number} shift How long the range should be.\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic createFromPositionAndShift( position, shift ) {\n\t\tconst start = position;\n\t\tconst end = position.getShiftedBy( shift );\n\n\t\treturn shift > 0 ? new this( start, end ) : new this( end, start );\n\t}\n\n\t/**\n\t * Creates a range from given parents and offsets.\n\t *\n\t * @param {module:engine/model/element~Element} startElement Start position parent element.\n\t * @param {Number} startOffset Start position offset.\n\t * @param {module:engine/model/element~Element} endElement End position parent element.\n\t * @param {Number} endOffset End position offset.\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic createFromParentsAndOffsets( startElement, startOffset, endElement, endOffset ) {\n\t\treturn new this(\n\t\t\tPosition.createFromParentAndOffset( startElement, startOffset ),\n\t\t\tPosition.createFromParentAndOffset( endElement, endOffset )\n\t\t);\n\t}\n\n\t/**\n\t * Creates a new instance of `Range` which is equal to passed range.\n\t *\n\t * @param {module:engine/model/range~Range} range Range to clone.\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic createFromRange( range ) {\n\t\treturn new this( range.start, range.end );\n\t}\n\n\t/**\n\t * Creates a range inside an {@link module:engine/model/element~Element element} which starts before the first child of\n\t * that element and ends after the last child of that element.\n\t *\n\t * @param {module:engine/model/element~Element} element Element which is a parent for the range.\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic createIn( element ) {\n\t\treturn this.createFromParentsAndOffsets( element, 0, element, element.maxOffset );\n\t}\n\n\t/**\n\t * Creates a range that starts before given {@link module:engine/model/item~Item model item} and ends after it.\n\t *\n\t * @param {module:engine/model/item~Item} item\n\t * @returns {module:engine/model/range~Range}\n\t */\n\tstatic createOn( item ) {\n\t\treturn this.createFromPositionAndShift( Position.createBefore( item ), item.offsetSize );\n\t}\n\n\t/**\n\t * Creates a collapsed range at given {@link module:engine/model/position~Position position}\n\t * or on the given {@link module:engine/model/item~Item item}.\n\t *\n\t * @param {module:engine/model/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/model/item~Item model item}.\n\t */\n\tstatic createCollapsedAt( itemOrPosition, offset ) {\n\t\tconst start = Position.createAt( itemOrPosition, offset );\n\t\tconst end = Position.createFromPosition( start );\n\n\t\treturn new Range( start, end );\n\t}\n\n\t/**\n\t * Combines all ranges from the passed array into a one range. At least one range has to be passed.\n\t * Passed ranges must not have common parts.\n\t *\n\t * The first range from the array is a reference range. If other ranges start or end on the exactly same position where\n\t * the reference range, they get combined into one range.\n\t *\n\t *\t\t[ ][] [ ][ ][ ][ ][] [ ] // Passed ranges, shown sorted\n\t *\t\t[ ] // The result of the function if the first range was a reference range.\n\t *\t [ ] // The result of the function if the third-to-seventh range was a reference range.\n\t *\t [ ] // The result of the function if the last range was a reference range.\n\t *\n\t * @param {Array.} ranges Ranges to combine.\n\t * @returns {module:engine/model/range~Range} Combined range.\n\t */\n\tstatic createFromRanges( ranges ) {\n\t\tif ( ranges.length === 0 ) {\n\t\t\t/**\n\t\t\t * At least one range has to be passed to\n\t\t\t * {@link module:engine/model/range~Range.createFromRanges `Range.createFromRanges()`}.\n\t\t\t *\n\t\t\t * @error range-create-from-ranges-empty-array\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'range-create-from-ranges-empty-array: At least one range has to be passed.' );\n\t\t} else if ( ranges.length == 1 ) {\n\t\t\treturn this.createFromRange( ranges[ 0 ] );\n\t\t}\n\n\t\t// 1. Set the first range in `ranges` array as a reference range.\n\t\t// If we are going to return just a one range, one of the ranges need to be the reference one.\n\t\t// Other ranges will be stuck to that range, if possible.\n\t\tconst ref = ranges[ 0 ];\n\n\t\t// 2. Sort all the ranges so it's easier to process them.\n\t\tranges.sort( ( a, b ) => {\n\t\t\treturn a.start.isAfter( b.start ) ? 1 : -1;\n\t\t} );\n\n\t\t// 3. Check at which index the reference range is now.\n\t\tconst refIndex = ranges.indexOf( ref );\n\n\t\t// 4. At this moment we don't need the original range.\n\t\t// We are going to modify the result and we need to return a new instance of Range.\n\t\t// We have to create a copy of the reference range.\n\t\tconst result = new this( ref.start, ref.end );\n\n\t\t// 5. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\tfor ( let i = refIndex - 1; i >= 0; i++ ) {\n\t\t\tif ( ranges[ i ].end.isEqual( result.start ) ) {\n\t\t\t\tresult.start = Position.createFromPosition( ranges[ i ].start );\n\t\t\t} else {\n\t\t\t\t// If ranges are not starting/ending at the same position there is no point in looking further.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\t// 6. Ranges should be checked and glued starting from the range that is closest to the reference range.\n\t\t// Since ranges are sorted, start with the range with index that is closest to reference range index.\n\t\tfor ( let i = refIndex + 1; i < ranges.length; i++ ) {\n\t\t\tif ( ranges[ i ].start.isEqual( result.end ) ) {\n\t\t\t\tresult.end = Position.createFromPosition( ranges[ i ].end );\n\t\t\t} else {\n\t\t\t\t// If ranges are not starting/ending at the same position there is no point in looking further.\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\n\t\treturn result;\n\t}\n\n\t/**\n\t * Creates a `Range` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param {Object} json Plain object to be converted to `Range`.\n\t * @param {module:engine/model/document~Document} doc Document object that will be range owner.\n\t * @returns {module:engine/model/element~Element} `Range` instance created using given plain object.\n\t */\n\tstatic fromJSON( json, doc ) {\n\t\treturn new this( Position.fromJSON( json.start, doc ), Position.fromJSON( json.end, doc ) );\n\t}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/range.js\n// module id = 3\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module utils/mix\n */\n\n/**\n * Copies enumerable properties and symbols from the objects given as 2nd+ parameters to the\n * prototype of first object (a constructor).\n *\n *\t\tclass Editor {\n *\t\t\t...\n *\t\t}\n *\n *\t\tconst SomeMixin = {\n *\t\t\ta() {\n *\t\t\t\treturn 'a';\n *\t\t\t}\n *\t\t};\n *\n *\t\tmix( Editor, SomeMixin, ... );\n *\n *\t\tnew Editor().a(); // -> 'a'\n *\n * Note: Properties which already exist in the base class will not be overriden.\n *\n * @param {Function} [baseClass] Class which prototype will be extended.\n * @param {Object} [...mixins] Objects from which to get properties.\n */\nexport default function mix( baseClass, ...mixins ) {\n\tmixins.forEach( mixin => {\n\t\tObject.getOwnPropertyNames( mixin ).concat( Object.getOwnPropertySymbols( mixin ) )\n\t\t\t.forEach( key => {\n\t\t\t\tif ( key in baseClass.prototype ) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tconst sourceDescriptor = Object.getOwnPropertyDescriptor( mixin, key );\n\t\t\t\tsourceDescriptor.enumerable = false;\n\n\t\t\t\tObject.defineProperty( baseClass.prototype, key, sourceDescriptor );\n\t\t\t} );\n\t} );\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/mix.js\n// module id = 4\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/element\n */\n\nimport Node from './node';\nimport NodeList from './nodelist';\nimport Text from './text';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\n\n/**\n * Model element. Type of {@link module:engine/model/node~Node node} that has a {@link module:engine/model/element~Element#name name} and\n * {@link module:engine/model/element~Element#getChildren child nodes}.\n *\n * **Important**: see {@link module:engine/model/node~Node} to read about restrictions using `Element` and `Node` API.\n */\nexport default class Element extends Node {\n\t/**\n\t * Creates a model element.\n\t *\n\t * @param {String} name Element's name.\n\t * @param {Object} [attrs] Element's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t * @param {module:engine/model/node~Node|Iterable.} [children]\n\t * One or more nodes to be inserted as children of created element.\n\t */\n\tconstructor( name, attrs, children ) {\n\t\tsuper( attrs );\n\n\t\t/**\n\t\t * Element name.\n\t\t *\n\t\t * @member {String} module:engine/model/element~Element#name\n\t\t */\n\t\tthis.name = name;\n\n\t\t/**\n\t\t * List of children nodes.\n\t\t *\n\t\t * @private\n\t\t * @member {module:engine/model/nodelist~NodeList} module:engine/model/element~Element#_children\n\t\t */\n\t\tthis._children = new NodeList();\n\n\t\tif ( children ) {\n\t\t\tthis.insertChildren( 0, children );\n\t\t}\n\t}\n\n\t/**\n\t * Number of this element's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Sum of {module:engine/model/node~Node#offsetSize offset sizes} of all of this element's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget maxOffset() {\n\t\treturn this._children.maxOffset;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\treturn this.childCount === 0;\n\t}\n\n\t/**\n\t * Checks whether given model tree object is of given type.\n\t *\n\t *\t\tobj.name; // 'listItem'\n\t *\t\tobj instanceof Element; // true\n\t *\n\t *\t\tobj.is( 'element' ); // true\n\t *\t\tobj.is( 'listItem' ); // true\n\t *\t\tobj.is( 'element', 'listItem' ); // true\n\t *\t\tobj.is( 'text' ); // false\n\t *\t\tobj.is( 'element', 'image' ); // false\n\t *\n\t * Read more in {@link module:engine/model/node~Node#is}.\n\t *\n\t * @param {String} type Type to check when `name` parameter is present.\n\t * Otherwise, it acts like the `name` parameter.\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type == 'element' || type == this.name;\n\t\t} else {\n\t\t\treturn type == 'element' && name == this.name;\n\t\t}\n\t}\n\n\t/**\n\t * Gets the child at the given index.\n\t *\n\t * @param {Number} index Index of child.\n\t * @returns {module:engine/model/node~Node} Child node.\n\t */\n\tgetChild( index ) {\n\t\treturn this._children.getNode( index );\n\t}\n\n\t/**\n\t * Returns an iterator that iterates over all of this element's children.\n\t *\n\t * @returns {Iterable.}\n\t */\n\tgetChildren() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an index of the given child node. Returns `null` if given node is not a child of this element.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number} Child node's index in this element.\n\t */\n\tgetChildIndex( node ) {\n\t\treturn this._children.getNodeIndex( node );\n\t}\n\n\t/**\n\t * Returns the starting offset of given child. Starting offset is equal to the sum of\n\t * {module:engine/model/node~Node#offsetSize offset sizes} of all node's siblings that are before it. Returns `null` if\n\t * given node is not a child of this element.\n\t *\n\t * @param {module:engine/model/node~Node} node Child node to look for.\n\t * @returns {Number} Child node's starting offset.\n\t */\n\tgetChildStartOffset( node ) {\n\t\treturn this._children.getNodeStartOffset( node );\n\t}\n\n\t/**\n\t * Creates a copy of this element and returns it. Created element has the same name and attributes as the original element.\n\t * If clone is deep, the original element's children are also cloned. If not, then empty element is removed.\n\t *\n\t * @param {Boolean} [deep=false] If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any child.\n\t */\n\tclone( deep = false ) {\n\t\tconst children = deep ? Array.from( this._children ).map( node => node.clone( true ) ) : null;\n\n\t\treturn new Element( this.name, this.getAttributes(), children );\n\t}\n\n\t/**\n\t * Returns index of a node that occupies given offset. If given offset is too low, returns `0`. If given offset is\n\t * too high, returns {@link module:engine/model/element~Element#getChildIndex index after last child}.\n\t *\n\t *\t\tconst textNode = new Text( 'foo' );\n\t *\t\tconst pElement = new Element( 'p' );\n\t *\t\tconst divElement = new Element( [ textNode, pElement ] );\n\t *\t\tdivElement.offsetToIndex( -1 ); // Returns 0, because offset is too low.\n\t *\t\tdivElement.offsetToIndex( 0 ); // Returns 0, because offset 0 is taken by `textNode` which is at index 0.\n\t *\t\tdivElement.offsetToIndex( 1 ); // Returns 0, because `textNode` has `offsetSize` equal to 3, so it occupies offset 1 too.\n\t *\t\tdivElement.offsetToIndex( 2 ); // Returns 0.\n\t *\t\tdivElement.offsetToIndex( 3 ); // Returns 1.\n\t *\t\tdivElement.offsetToIndex( 4 ); // Returns 2. There are no nodes at offset 4, so last available index is returned.\n\t *\n\t * @param {Number} offset Offset to look for.\n\t * @returns {Number}\n\t */\n\toffsetToIndex( offset ) {\n\t\treturn this._children.offsetToIndex( offset );\n\t}\n\n\t/**\n\t * {@link module:engine/model/element~Element#insertChildren Inserts} one or more nodes at the end of this element.\n\t *\n\t * @param {module:engine/model/node~Node|Iterable.} nodes Nodes to be inserted.\n\t */\n\tappendChildren( nodes ) {\n\t\tthis.insertChildren( this.childCount, nodes );\n\t}\n\n\t/**\n\t * Inserts one or more nodes at the given index and sets {@link module:engine/model/node~Node#parent parent} of these nodes\n\t * to this element.\n\t *\n\t * @param {Number} index Index at which nodes should be inserted.\n\t * @param {module:engine/model/node~Node|Iterable.} nodes Nodes to be inserted.\n\t */\n\tinsertChildren( index, nodes ) {\n\t\tnodes = normalize( nodes );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode.remove();\n\t\t\t}\n\n\t\t\tnode.parent = this;\n\t\t}\n\n\t\tthis._children.insertNodes( index, nodes );\n\t}\n\n\t/**\n\t * Removes one or more nodes starting at the given index and sets\n\t * {@link module:engine/model/node~Node#parent parent} of these nodes to `null`.\n\t *\n\t * @param {Number} index Index of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @returns {Array.} Array containing removed nodes.\n\t */\n\tremoveChildren( index, howMany = 1 ) {\n\t\tconst nodes = this._children.removeNodes( index, howMany );\n\n\t\tfor ( const node of nodes ) {\n\t\t\tnode.parent = null;\n\t\t}\n\n\t\treturn nodes;\n\t}\n\n\t/**\n\t * Returns a descendant node by its path relative to this element.\n\t *\n\t *\t\t// ac\n\t *\t\tthis.getNodeByPath( [ 0 ] ); // -> \"a\"\n\t *\t\tthis.getNodeByPath( [ 1 ] ); // -> \n\t *\t\tthis.getNodeByPath( [ 1, 0 ] ); // -> \"c\"\n\t *\n\t * @param {Array.} relativePath Path of the node to find, relative to this element.\n\t * @returns {module:engine/model/node~Node}\n\t */\n\tgetNodeByPath( relativePath ) {\n\t\tlet node = this; // eslint-disable-line consistent-this\n\n\t\tfor ( const index of relativePath ) {\n\t\t\tnode = node.getChild( node.offsetToIndex( index ) );\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Converts `Element` instance to plain object and returns it. Takes care of converting all of this element's children.\n\t *\n\t * @returns {Object} `Element` instance converted to plain object.\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.name = this.name;\n\n\t\tif ( this._children.length > 0 ) {\n\t\t\tjson.children = [];\n\n\t\t\tfor ( const node of this._children ) {\n\t\t\t\tjson.children.push( node.toJSON() );\n\t\t\t}\n\t\t}\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates an `Element` instance from given plain object (i.e. parsed JSON string).\n\t * Converts `Element` children to proper nodes.\n\t *\n\t * @param {Object} json Plain object to be converted to `Element`.\n\t * @returns {module:engine/model/element~Element} `Element` instance created using given plain object.\n\t */\n\tstatic fromJSON( json ) {\n\t\tlet children = null;\n\n\t\tif ( json.children ) {\n\t\t\tchildren = [];\n\n\t\t\tfor ( const child of json.children ) {\n\t\t\t\tif ( child.name ) {\n\t\t\t\t\t// If child has name property, it is an Element.\n\t\t\t\t\tchildren.push( Element.fromJSON( child ) );\n\t\t\t\t} else {\n\t\t\t\t\t// Otherwise, it is a Text node.\n\t\t\t\t\tchildren.push( Text.fromJSON( child ) );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn new Element( json.name, json.attributes, children );\n\t}\n}\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/model/node~Node|Iterable.}\n// @return {Iterable.}\nfunction normalize( nodes ) {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new Text( nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\treturn typeof node == 'string' ? new Text( node ) : node;\n\t\t} );\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/element.js\n// module id = 5\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module ui/template\n */\n\n/* global document */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport EmitterMixin from '@ckeditor/ckeditor5-utils/src/emittermixin';\nimport View from './view';\nimport ViewCollection from './viewcollection';\nimport cloneDeepWith from '@ckeditor/ckeditor5-utils/src/lib/lodash/cloneDeepWith';\nimport isObject from '@ckeditor/ckeditor5-utils/src/lib/lodash/isObject';\nimport log from '@ckeditor/ckeditor5-utils/src/log';\n\nconst xhtmlNs = 'http://www.w3.org/1999/xhtml';\n\n/**\n * A basic Template class. It renders a DOM HTML element or text from a\n * {@link module:ui/template~TemplateDefinition definition} and supports element attributes, children,\n * bindings to {@link module:utils/observablemixin~Observable observables} and DOM event propagation.\n *\n * A simple template can look like this:\n *\n *\t\tconst bind = Template.bind( observable, emitter );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\tclass: 'foo',\n *\t\t\t\tstyle: {\n *\t\t\t\t\tbackgroundColor: 'yellow'\n *\t\t\t\t}\n *\t\t\t},\n *\t\t\ton: {\n *\t\t\t\tclick: bind.to( 'clicked' )\n *\t\t\t}\n *\t\t\tchildren: [\n *\t\t\t\t'A paragraph.'\n *\t\t\t]\n *\t\t} ).render();\n *\n * and it will render the following HTML element:\n *\n *\t\t

A paragraph.

\n *\n * Additionally, the `observable` will always fire `clicked` upon clicking `

` in DOM.\n *\n * See {@link module:ui/template~TemplateDefinition} to know more about templates and complex\n * template definitions.\n *\n* @mixes module:utils/emittermixin~EmitterMixin\n */\nexport default class Template {\n\t/**\n\t * Creates an instance of the {@link ~Template} class.\n\t *\n\t * @param {module:ui/template~TemplateDefinition} def The definition of the template.\n\t */\n\tconstructor( def ) {\n\t\tObject.assign( this, normalize( clone( def ) ) );\n\n\t\t/**\n\t\t * Indicates whether this particular Template instance has been\n\t\t * {@link #render rendered}.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {Boolean}\n\t\t */\n\t\tthis._isRendered = false;\n\n\t\t/**\n\t\t * The tag (`tagName`) of this template, e.g. `div`. It also indicates that the template\n\t\t * renders to an HTML element.\n\t\t *\n\t\t * @member {String} #tag\n\t\t */\n\n\t\t/**\n\t\t * Text of the template. It also indicates that the template renders to a DOM text node.\n\t\t *\n\t\t * @member {Array.} #text\n\t\t */\n\n\t\t/**\n\t\t * Attributes of the template, e.g. `{ id: [ 'ck-id' ] }`, corresponding with\n\t\t * attributes of an HTML element.\n\t\t *\n\t\t * **Note**: This property only makes sense when {@link #tag} is defined.\n\t\t *\n\t\t * @member {Object} #attributes\n\t\t */\n\n\t\t/**\n\t\t * Children of the template, subā€“templates. Each one is an independent\n\t\t * instance of {@link ~Template}.\n\t\t *\n\t\t * **Note**: This property only makes sense when {@link #tag} is defined.\n\t\t *\n\t\t * @member {module:utils/collection~Collection.} #children\n\t\t */\n\n\t\t/**\n\t\t * DOM event listeners of the template.\n\t\t *\n\t\t * @member {Object} #eventListeners\n\t\t */\n\n\t\t/**\n\t\t * Data used by the {@link #revert} method to restore a node to its original state.\n\t\t *\n\t\t * See: {@link #apply}.\n\t\t *\n\t\t * @readonly\n\t\t * @protected\n\t\t * @member {module:ui/template~RenderData}\n\t\t */\n\t\tthis._revertData = null;\n\t}\n\n\t/**\n\t * Renders a DOM Node (an HTML element or text) out of the template.\n\t *\n\t *\t\tconst domNode = new Template( { ... } ).render();\n\t *\n\t * See: {@link #apply}.\n\t *\n\t * @returns {HTMLElement|Text}\n\t */\n\trender() {\n\t\tconst node = this._renderNode( {\n\t\t\tintoFragment: true\n\t\t} );\n\n\t\tthis._isRendered = true;\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Applies the template to an existing DOM Node, either HTML element or text.\n\t *\n\t * **Note:** No new DOM nodes will be created. Applying extends\n\t * {@link module:ui/template~TemplateDefinition attributes} and\n\t * {@link module:ui/template~TemplateDefinition event listeners} only.\n\t *\n\t * **Note:** Existing `class` and `style` attributes are extended when a template\n\t * is applied to an HTML element, while other attributes and `textContent` are overridden.\n\t *\n\t * **Note:** The process of applying a template can be easily reverted using\n\t * {@link module:ui/template~Template#revert} method.\n\t *\n\t *\t\tconst element = document.createElement( 'div' );\n\t *\t\tconst bind = Template.bind( observable, emitter );\n\t *\n\t *\t\tnew Template( {\n\t *\t\t\tattrs: {\n\t *\t\t\t\tid: 'first-div',\n\t *\t\t\t\tclass: bind.to( 'divClass' )\n\t *\t\t\t},\n\t *\t\t\ton: {\n\t *\t\t\t\tclick: bind( 'elementClicked' ) // Will be fired by the observable.\n\t *\t\t\t}\n\t *\t\t\tchildren: [\n\t *\t\t\t\t'Div text.'\n\t *\t\t\t]\n\t *\t\t} ).apply( element );\n\t *\n\t *\t\telement.outerHTML == \"

Div text.
\"\n\t *\n\t * @see module:ui/template~Template#render\n\t * @see module:ui/template~Template#revert\n\t * @param {Node} node Root node for the template to apply.\n\t */\n\tapply( node ) {\n\t\tthis._revertData = getEmptyRevertData();\n\n\t\tthis._renderNode( {\n\t\t\tnode,\n\t\t\tisApplying: true,\n\t\t\trevertData: this._revertData\n\t\t} );\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Reverts a template {@link module:ui/template~Template#apply applied} to a DOM node.\n\t *\n\t * @param {Node} node Root node for the template to revert. In most of the cases, it is the\n\t * same node used by {@link module:ui/template~Template#apply}.\n\t */\n\trevert( node ) {\n\t\tif ( !this._revertData ) {\n\t\t\t/**\n\t\t\t * Attempting reverting a template which has not been applied yet.\n\t\t\t *\n\t\t\t * @error ui-template-revert-not-applied\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'ui-template-revert-not-applied: Attempting reverting a template which has not been applied yet.' );\n\t\t}\n\n\t\tthis._revertTemplateFromNode( node, this._revertData );\n\t}\n\n\t/**\n\t * An entry point to the interface which binds DOM nodes to\n\t * {@link module:utils/observablemixin~Observable observables}.\n\t * There are two types of bindings:\n\t *\n\t * * HTML element attributes or text `textContent` synchronized with attributes of an\n\t * {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}\n\t * and {@link module:ui/template~BindChain#if}.\n\t *\n\t *\t\tconst bind = Template.bind( observable, emitter );\n\t *\n\t *\t\tnew Template( {\n\t *\t\t\tattrs: {\n\t *\t\t\t\t// Binds element's \"class\" attribute to observable#classAttribute.\n\t *\t\t\t\tclass: bind.to( 'classAttribute' )\n\t *\t\t\t}\n\t *\t\t} ).render();\n\t *\n\t * * DOM events fired on HTML element propagated through\n\t * {@link module:utils/observablemixin~Observable}. Learn more about {@link module:ui/template~BindChain#to}.\n\t *\n\t *\t\tconst bind = Template.bind( observable, emitter );\n\t *\n\t *\t\tnew Template( {\n\t *\t\t\ton: {\n\t *\t\t\t\t// Will be fired by the observable.\n\t *\t\t\t\tclick: bind( 'elementClicked' )\n\t *\t\t\t}\n\t *\t\t} ).render();\n\t *\n\t * Also see {@link module:ui/view~View#bindTemplate}.\n\t *\n\t * @param {module:utils/observablemixin~Observable} observable An observable which provides boundable attributes.\n\t * @param {module:utils/emittermixin~Emitter} emitter An emitter that listens to observable attribute\n\t * changes or DOM Events (depending on the kind of the binding). Usually, a {@link module:ui/view~View} instance.\n\t * @returns {module:ui/template~BindChain}\n\t */\n\tstatic bind( observable, emitter ) {\n\t\treturn {\n\t\t\tto( eventNameOrFunctionOrAttribute, callback ) {\n\t\t\t\treturn new TemplateToBinding( {\n\t\t\t\t\teventNameOrFunction: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tattribute: eventNameOrFunctionOrAttribute,\n\t\t\t\t\tobservable, emitter, callback\n\t\t\t\t} );\n\t\t\t},\n\n\t\t\tif( attribute, valueIfTrue, callback ) {\n\t\t\t\treturn new TemplateIfBinding( {\n\t\t\t\t\tobservable, emitter, attribute, valueIfTrue, callback\n\t\t\t\t} );\n\t\t\t}\n\t\t};\n\t}\n\n\t/**\n\t * Extends an existing {@link module:ui/template~Template} instance with some additional content\n\t * from another {@link module:ui/template~TemplateDefinition}.\n\t *\n\t *\t\tconst bind = Template.bind( observable, emitter );\n\t *\n\t *\t\tconst template = new Template( {\n\t *\t\t\ttag: 'p',\n\t *\t\t\tattributes: {\n\t *\t\t\t\tclass: 'a',\n\t *\t\t\t\tdata-x: bind.to( 'foo' )\n\t *\t\t\t},\n\t *\t\t\tchildren: [\n\t *\t\t\t\t{\n\t *\t\t\t\t\ttag: 'span',\n\t *\t\t\t\t\tattributes: {\n\t *\t\t\t\t\t\tclass: 'b'\n\t *\t\t\t\t\t},\n\t *\t\t\t\t\tchildren: [\n\t *\t\t\t\t\t\t'Span'\n\t *\t\t\t\t\t]\n\t *\t\t\t\t}\n\t *\t\t\t]\n\t *\t\t } );\n\t *\n\t *\t\t// Instance-level extension.\n\t *\t\tTemplate.extend( template, {\n\t *\t\t\tattributes: {\n\t *\t\t\t\tclass: 'b',\n\t *\t\t\t\tdata-x: bind.to( 'bar' )\n\t *\t\t\t},\n\t *\t\t\tchildren: [\n\t *\t\t\t\t{\n\t *\t\t\t\t\tattributes: {\n\t *\t\t\t\t\t\tclass: 'c'\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\t\t\t]\n\t *\t\t} );\n\t *\n\t *\t\t// Child extension.\n\t *\t\tTemplate.extend( template.children.get( 0 ), {\n\t *\t\t\tattributes: {\n\t *\t\t\t\tclass: 'd'\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t * the `outerHTML` of `template.render()` is:\n\t *\n\t *\t\t

\n\t *\t\t\tSpan\n\t *\t\t

\n\t *\n\t * @param {module:ui/template~Template} template An existing template instance to be extended.\n\t * @param {module:ui/template~TemplateDefinition} def Additional definition to be applied to a template.\n\t */\n\tstatic extend( template, def ) {\n\t\tif ( template._isRendered ) {\n\t\t\t/**\n\t\t\t * Extending a template after rendering may not work as expected. To make sure\n\t\t\t * the {@link module:ui/template~Template.extend extending} works for an element,\n\t\t\t * make sure it happens before {@link #render} is called.\n\t\t\t *\n\t\t\t * @error template-extend-render\n\t\t\t */\n\t\t\tlog.warn( 'template-extend-render: Attempting to extend a template which has already been rendered.' );\n\t\t}\n\n\t\textendTemplate( template, normalize( clone( def ) ) );\n\t}\n\n\t/**\n\t * Renders a DOM Node (either an HTML element or text) out of the template.\n\t *\n\t * @protected\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_renderNode( data ) {\n\t\tlet isInvalid;\n\n\t\tif ( data.node ) {\n\t\t\t// When applying, a definition cannot have \"tag\" and \"text\" at the same time.\n\t\t\tisInvalid = this.tag && this.text;\n\t\t} else {\n\t\t\t// When rendering, a definition must have either \"tag\" or \"text\": XOR( this.tag, this.text ).\n\t\t\tisInvalid = this.tag ? this.text : !this.text;\n\t\t}\n\n\t\tif ( isInvalid ) {\n\t\t\t/**\n\t\t\t * Node definition cannot have \"tag\" and \"text\" properties at the same time.\n\t\t\t * Node definition must have either \"tag\" or \"text\" when rendering new Node.\n\t\t\t *\n\t\t\t * @error ui-template-wrong-syntax\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'ui-template-wrong-syntax: Node definition must have either \"tag\" or \"text\" when rendering new Node.'\n\t\t\t);\n\t\t}\n\n\t\tif ( this.text ) {\n\t\t\treturn this._renderText( data );\n\t\t} else {\n\t\t\treturn this._renderElement( data );\n\t\t}\n\t}\n\n\t/**\n\t * Renders an HTML element out of the template.\n\t *\n\t * @protected\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_renderElement( data ) {\n\t\tlet node = data.node;\n\n\t\tif ( !node ) {\n\t\t\tnode = data.node = document.createElementNS( this.ns || xhtmlNs, this.tag );\n\t\t}\n\n\t\tthis._renderAttributes( data );\n\t\tthis._renderElementChildren( data );\n\t\tthis._setUpListeners( data );\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Renders a text node out of {@link module:ui/template~Template#text}.\n\t *\n\t * @protected\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_renderText( data ) {\n\t\tlet node = data.node;\n\n\t\t// Save the original textContent to revert it in #revert().\n\t\tif ( node ) {\n\t\t\tdata.revertData.text = node.textContent;\n\t\t} else {\n\t\t\tnode = data.node = document.createTextNode( '' );\n\t\t}\n\n\t\t// Check if this Text Node is bound to Observable. Cases:\n\t\t//\n\t\t//\t\ttext: [ Template.bind( ... ).to( ... ) ]\n\t\t//\n\t\t//\t\ttext: [\n\t\t//\t\t\t'foo',\n\t\t//\t\t\tTemplate.bind( ... ).to( ... ),\n\t\t//\t\t\t...\n\t\t//\t\t]\n\t\t//\n\t\tif ( hasTemplateBinding( this.text ) ) {\n\t\t\tthis._bindToObservable( {\n\t\t\t\tschema: this.text,\n\t\t\t\tupdater: getTextUpdater( node ),\n\t\t\t\tdata\n\t\t\t} );\n\t\t}\n\t\t// Simply set text. Cases:\n\t\t//\n\t\t//\t\ttext: [ 'all', 'are', 'static' ]\n\t\t//\n\t\t//\t\ttext: [ 'foo' ]\n\t\t//\n\t\telse {\n\t\t\tnode.textContent = this.text.join( '' );\n\t\t}\n\n\t\treturn node;\n\t}\n\n\t/**\n\t * Renders an HTML element attributes out of {@link module:ui/template~Template#attributes}.\n\t *\n\t * @protected\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_renderAttributes( data ) {\n\t\tlet attrName, attrValue, domAttrValue, attrNs;\n\n\t\tif ( !this.attributes ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst node = data.node;\n\t\tconst revertData = data.revertData;\n\n\t\tfor ( attrName in this.attributes ) {\n\t\t\t// Current attribute value in DOM.\n\t\t\tdomAttrValue = node.getAttribute( attrName );\n\n\t\t\t// The value to be set.\n\t\t\tattrValue = this.attributes[ attrName ];\n\n\t\t\t// Save revert data.\n\t\t\tif ( revertData ) {\n\t\t\t\trevertData.attributes[ attrName ] = domAttrValue;\n\t\t\t}\n\n\t\t\t// Detect custom namespace:\n\t\t\t//\n\t\t\t//\t\tclass: {\n\t\t\t//\t\t\tns: 'abc',\n\t\t\t//\t\t\tvalue: Template.bind( ... ).to( ... )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\tattrNs = ( isObject( attrValue[ 0 ] ) && attrValue[ 0 ].ns ) ? attrValue[ 0 ].ns : null;\n\n\t\t\t// Activate binding if one is found. Cases:\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\tTemplate.bind( ... ).to( ... )\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\t'bar',\n\t\t\t//\t\t\tTemplate.bind( ... ).to( ... ),\n\t\t\t//\t\t\t'baz'\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\t//\t\tclass: {\n\t\t\t//\t\t\tns: 'abc',\n\t\t\t//\t\t\tvalue: Template.bind( ... ).to( ... )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\tif ( hasTemplateBinding( attrValue ) ) {\n\t\t\t\t// Normalize attributes with additional data like namespace:\n\t\t\t\t//\n\t\t\t\t//\t\tclass: {\n\t\t\t\t//\t\t\tns: 'abc',\n\t\t\t\t//\t\t\tvalue: [ ... ]\n\t\t\t\t//\t\t}\n\t\t\t\t//\n\t\t\t\tconst valueToBind = attrNs ? attrValue[ 0 ].value : attrValue;\n\n\t\t\t\t// Extend the original value of attributes like \"style\" and \"class\",\n\t\t\t\t// don't override them.\n\t\t\t\tif ( revertData && shouldExtend( attrName ) ) {\n\t\t\t\t\tvalueToBind.unshift( domAttrValue );\n\t\t\t\t}\n\n\t\t\t\tthis._bindToObservable( {\n\t\t\t\t\tschema: valueToBind,\n\t\t\t\t\tupdater: getAttributeUpdater( node, attrName, attrNs ),\n\t\t\t\t\tdata\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Style attribute could be an Object so it needs to be parsed in a specific way.\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\twidth: '100px',\n\t\t\t//\t\t\theight: Template.bind( ... ).to( ... )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\telse if ( attrName == 'style' && typeof attrValue[ 0 ] !== 'string' ) {\n\t\t\t\tthis._renderStyleAttribute( attrValue[ 0 ], data );\n\t\t\t}\n\n\t\t\t// Otherwise simply set the static attribute:\n\t\t\t//\n\t\t\t//\t\tclass: [ 'foo' ]\n\t\t\t//\n\t\t\t//\t\tclass: [ 'all', 'are', 'static' ]\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\t{\n\t\t\t//\t\t\t\tns: 'abc',\n\t\t\t//\t\t\t\tvalue: [ 'foo' ]\n\t\t\t//\t\t\t}\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\telse {\n\t\t\t\t// Extend the original value of attributes like \"style\" and \"class\",\n\t\t\t\t// don't override them.\n\t\t\t\tif ( revertData && domAttrValue && shouldExtend( attrName ) ) {\n\t\t\t\t\tattrValue.unshift( domAttrValue );\n\t\t\t\t}\n\n\t\t\t\tattrValue = attrValue\n\t\t\t\t\t// Retrieve \"values\" from:\n\t\t\t\t\t//\n\t\t\t\t\t//\t\tclass: [\n\t\t\t\t\t//\t\t\t{\n\t\t\t\t\t//\t\t\t\tns: 'abc',\n\t\t\t\t\t//\t\t\t\tvalue: [ ... ]\n\t\t\t\t\t//\t\t\t}\n\t\t\t\t\t//\t\t]\n\t\t\t\t\t//\n\t\t\t\t\t.map( val => val ? ( val.value || val ) : val )\n\t\t\t\t\t// Flatten the array.\n\t\t\t\t\t.reduce( ( prev, next ) => prev.concat( next ), [] )\n\t\t\t\t\t// Convert into string.\n\t\t\t\t\t.reduce( arrayValueReducer, '' );\n\n\t\t\t\tif ( !isFalsy( attrValue ) ) {\n\t\t\t\t\tnode.setAttributeNS( attrNs, attrName, attrValue );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Renders the `style` attribute of an HTML element based on\n\t * {@link module:ui/template~Template#attributes}.\n\t *\n\t * Style attribute is an {Object} with static values:\n\t *\n\t *\t\tattributes: {\n\t *\t\t\tstyle: {\n\t *\t\t\t\tcolor: 'red'\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t * or values bound to {@link module:ui/model~Model} properties:\n\t *\n\t *\t\tattributes: {\n\t *\t\t\tstyle: {\n\t *\t\t\t\tcolor: bind.to( ... )\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t * Note: `style` attribute is rendered without setting the namespace. It does not seem to be\n\t * needed.\n\t *\n\t * @private\n\t * @param {Object} styles Styles located in `attributes.style` of {@link module:ui/template~TemplateDefinition}.\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_renderStyleAttribute( styles, data ) {\n\t\tconst node = data.node;\n\n\t\tfor ( const styleName in styles ) {\n\t\t\tconst styleValue = styles[ styleName ];\n\n\t\t\t// Cases:\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\tcolor: bind.to( 'attribute' )\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\tif ( hasTemplateBinding( styleValue ) ) {\n\t\t\t\tthis._bindToObservable( {\n\t\t\t\t\tschema: [ styleValue ],\n\t\t\t\t\tupdater: getStyleUpdater( node, styleName ),\n\t\t\t\t\tdata\n\t\t\t\t} );\n\t\t\t}\n\n\t\t\t// Cases:\n\t\t\t//\n\t\t\t//\t\tstyle: {\n\t\t\t//\t\t\tcolor: 'red'\n\t\t\t//\t\t}\n\t\t\t//\n\t\t\telse {\n\t\t\t\tnode.style[ styleName ] = styleValue;\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * Recursively renders HTML element's children from {@link module:ui/template~Template#children}.\n\t *\n\t * @protected\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_renderElementChildren( data ) {\n\t\tconst node = data.node;\n\t\tconst container = data.intoFragment ? document.createDocumentFragment() : node;\n\t\tconst isApplying = data.isApplying;\n\t\tlet childIndex = 0;\n\n\t\tfor ( const child of this.children ) {\n\t\t\tif ( isViewCollection( child ) ) {\n\t\t\t\tif ( !isApplying ) {\n\t\t\t\t\tchild.setParent( node );\n\n\t\t\t\t\tfor ( const view of child ) {\n\t\t\t\t\t\tcontainer.appendChild( view.element );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if ( isView( child ) ) {\n\t\t\t\tif ( !isApplying ) {\n\t\t\t\t\tcontainer.appendChild( child.element );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( isApplying ) {\n\t\t\t\t\tconst revertData = data.revertData;\n\t\t\t\t\tconst childRevertData = getEmptyRevertData();\n\n\t\t\t\t\trevertData.children.push( childRevertData );\n\n\t\t\t\t\tchild._renderNode( {\n\t\t\t\t\t\tnode: container.childNodes[ childIndex++ ],\n\t\t\t\t\t\tisApplying: true,\n\t\t\t\t\t\trevertData: childRevertData\n\t\t\t\t\t} );\n\t\t\t\t} else {\n\t\t\t\t\tcontainer.appendChild( child.render() );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( data.intoFragment ) {\n\t\t\tnode.appendChild( container );\n\t\t}\n\t}\n\n\t/**\n\t * Activates `on` event listeners from the {@link module:ui/template~TemplateDefinition}\n\t * on an HTML element.\n\t *\n\t * @protected\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t */\n\t_setUpListeners( data ) {\n\t\tif ( !this.eventListeners ) {\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const key in this.eventListeners ) {\n\t\t\tconst revertBindings = this.eventListeners[ key ].map( schemaItem => {\n\t\t\t\tconst [ domEvtName, domSelector ] = key.split( '@' );\n\n\t\t\t\treturn schemaItem.activateDomEventListener( domEvtName, domSelector, data );\n\t\t\t} );\n\n\t\t\tif ( data.revertData ) {\n\t\t\t\tdata.revertData.bindings.push( revertBindings );\n\t\t\t}\n\t\t}\n\t}\n\n\t/**\n\t * For a given {@link module:ui/template~TemplateValueSchema} containing {@link module:ui/template~TemplateBinding}\n\t * activates the binding and sets its initial value.\n\t *\n\t * Note: {@link module:ui/template~TemplateValueSchema} can be for an HTML element attributes or\n\t * text node `textContent`.\n\t *\n\t * @protected\n\t * @param {Object} options Binding options.\n\t * @param {module:ui/template~TemplateValueSchema} options.schema\n\t * @param {Function} options.updater A function which updates DOM (like attribute or text).\n\t * @param {module:ui/template~RenderData} options.data Rendering data.\n\t */\n\t_bindToObservable( { schema, updater, data } ) {\n\t\tconst revertData = data.revertData;\n\n\t\t// Set initial values.\n\t\tsyncValueSchemaValue( schema, updater, data );\n\n\t\tconst revertBindings = schema\n\t\t\t// Filter \"falsy\" (false, undefined, null, '') value schema components out.\n\t\t\t.filter( item => !isFalsy( item ) )\n\t\t\t// Filter inactive bindings from schema, like static strings ('foo'), numbers (42), etc.\n\t\t\t.filter( item => item.observable )\n\t\t\t// Once only the actual binding are left, let the emitter listen to observable change:attribute event.\n\t\t\t// TODO: Reduce the number of listeners attached as many bindings may listen\n\t\t\t// to the same observable attribute.\n\t\t\t.map( templateBinding => templateBinding.activateAttributeListener( schema, updater, data ) );\n\n\t\tif ( revertData ) {\n\t\t\trevertData.bindings.push( revertBindings );\n\t\t}\n\t}\n\n\t/**\n\t * Reverts {@link module:ui/template~RenderData#revertData template data} from a node to\n\t * return it to the the original state.\n\t *\n\t * @protected\n\t * @param {HTMLElement|Text} node A node to be reverted.\n\t * @param {module:ui/template~RenderData#revertData} revertData Stores information about\n\t * what changes have been made by {@link #apply} to the node.\n\t */\n\t_revertTemplateFromNode( node, revertData ) {\n\t\tfor ( const binding of revertData.bindings ) {\n\t\t\t// Each binding may consist of several observable+observable#attribute.\n\t\t\t// like the following has 2:\n\t\t\t//\n\t\t\t//\t\tclass: [\n\t\t\t//\t\t\t'x',\n\t\t\t//\t\t\tbind.to( 'foo' ),\n\t\t\t//\t\t\t'y',\n\t\t\t//\t\t\tbind.to( 'bar' )\n\t\t\t//\t\t]\n\t\t\t//\n\t\t\tfor ( const revertBinding of binding ) {\n\t\t\t\trevertBinding();\n\t\t\t}\n\t\t}\n\n\t\tif ( revertData.text ) {\n\t\t\tnode.textContent = revertData.text;\n\n\t\t\treturn;\n\t\t}\n\n\t\tfor ( const attrName in revertData.attributes ) {\n\t\t\tconst attrValue = revertData.attributes[ attrName ];\n\n\t\t\t// When the attribute has **not** been set before #apply().\n\t\t\tif ( attrValue === null ) {\n\t\t\t\tnode.removeAttribute( attrName );\n\t\t\t} else {\n\t\t\t\tnode.setAttribute( attrName, attrValue );\n\t\t\t}\n\t\t}\n\n\t\tfor ( let i = 0; i < revertData.children.length; ++i ) {\n\t\t\tthis._revertTemplateFromNode( node.childNodes[ i ], revertData.children[ i ] );\n\t\t}\n\t}\n}\n\nmix( Template, EmitterMixin );\n\n/**\n * Describes a binding created by {@link module:ui/template~Template.bind} interface.\n *\n * @protected\n */\nexport class TemplateBinding {\n\t/**\n\t * Creates an instance of the {@link module:ui/template~TemplateBinding} class.\n\t *\n\t * @param {module:ui/template~TemplateDefinition} def The definition of the binding.\n\t */\n\tconstructor( def ) {\n\t\tObject.assign( this, def );\n\n\t\t/**\n\t\t * An observable instance of the binding. It either:\n\t\t *\n\t\t * * provides the attribute with the value\n\t\t * * or passes the event when a corresponding DOM event is fired.\n\t\t *\n\t\t * @member {module:utils/observablemixin~ObservableMixin} module:ui/template~TemplateBinding#observable\n\t\t */\n\n\t\t/**\n\t\t * An {@link module:utils/emittermixin~Emitter} used by the binding to:\n\t\t *\n\t\t * * listen to the attribute change in the {@link module:ui/template~TemplateBinding#observable},\n\t\t * * or listen to the event in the DOM.\n\t\t *\n\t\t * @member {module:utils/emittermixin~EmitterMixin} module:ui/template~TemplateBinding#emitter\n\t\t */\n\n\t\t/**\n\t\t * The name of the {@link module:ui/template~TemplateBinding#observable observed attribute}.\n\t\t *\n\t\t * @member {String} module:ui/template~TemplateBinding#attribute\n\t\t */\n\n\t\t/**\n\t\t * A custom function to process the value of the {@link module:ui/template~TemplateBinding#attribute}.\n\t\t *\n\t\t * @member {Function} [module:ui/template~TemplateBinding#callback]\n\t\t */\n\t}\n\n\t/**\n\t * Returns the value of the binding. It is the value of the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}. The value may be processed by the\n\t * {@link module:ui/template~TemplateBinding#callback}, if such has been passed to the binding.\n\t *\n\t * @param {Node} [node] A native DOM node, passed to the custom {@link module:ui/template~TemplateBinding#callback}.\n\t * @returns {*} The value of {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}.\n\t */\n\tgetValue( node ) {\n\t\tconst value = this.observable[ this.attribute ];\n\n\t\treturn this.callback ? this.callback( value, node ) : value;\n\t}\n\n\t/**\n\t * Activates the listener which waits for changes of the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable}, then updates the DOM with the aggregated\n\t * value of {@link module:ui/template~TemplateValueSchema}.\n\t *\n\t * @param {module:ui/template~TemplateValueSchema} schema A full schema to generate an attribute or text in DOM.\n\t * @param {Function} updater A DOM updater function used to update native DOM attribute or text.\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t * @returns {Function} A function to sever the listener binding.\n\t */\n\tactivateAttributeListener( schema, updater, data ) {\n\t\tconst callback = () => syncValueSchemaValue( schema, updater, data );\n\n\t\tthis.emitter.listenTo( this.observable, 'change:' + this.attribute, callback );\n\n\t\t// Allows revert of the listener.\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening( this.observable, 'change:' + this.attribute, callback );\n\t\t};\n\t}\n}\n\n/**\n * Describes either:\n *\n * * a binding to an {@link module:utils/observablemixin~Observable},\n * * or a native DOM event binding.\n *\n * It is created by the {@link module:ui/template~BindChain#to} method.\n *\n * @protected\n */\nexport class TemplateToBinding extends TemplateBinding {\n\t/**\n\t * Activates the listener for the native DOM event, which when fired, is propagated by\n\t * the {@link module:ui/template~TemplateBinding#emitter}.\n\t *\n\t * @param {String} domEvtName A name of the native DOM event.\n\t * @param {String} domSelector A selector in DOM to filter delegated events.\n\t * @param {module:ui/template~RenderData} data Rendering data.\n\t * @returns {Function} A function to sever the listener binding.\n\t */\n\tactivateDomEventListener( domEvtName, domSelector, data ) {\n\t\tconst callback = ( evt, domEvt ) => {\n\t\t\tif ( !domSelector || domEvt.target.matches( domSelector ) ) {\n\t\t\t\tif ( typeof this.eventNameOrFunction == 'function' ) {\n\t\t\t\t\tthis.eventNameOrFunction( domEvt );\n\t\t\t\t} else {\n\t\t\t\t\tthis.observable.fire( this.eventNameOrFunction, domEvt );\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tthis.emitter.listenTo( data.node, domEvtName, callback );\n\n\t\t// Allows revert of the listener.\n\t\treturn () => {\n\t\t\tthis.emitter.stopListening( data.node, domEvtName, callback );\n\t\t};\n\t}\n}\n\n/**\n * Describes a binding to {@link module:utils/observablemixin~ObservableMixin} created by {@link module:ui/template~BindChain#if}\n * method.\n *\n * @protected\n */\nexport class TemplateIfBinding extends TemplateBinding {\n\t/**\n\t * @inheritDoc\n\t */\n\tgetValue( node ) {\n\t\tconst value = super.getValue( node );\n\n\t\treturn isFalsy( value ) ? false : ( this.valueIfTrue || true );\n\t}\n\n\t/**\n\t * The value of the DOM attribute/text to be set if the {@link module:ui/template~TemplateBinding#attribute} in\n\t * {@link module:ui/template~TemplateBinding#observable} is `true`.\n\t *\n\t * @member {String} [module:ui/template~TemplateIfBinding#valueIfTrue]\n\t */\n}\n\n// Checks whether given {@link module:ui/template~TemplateValueSchema} contains a\n// {@link module:ui/template~TemplateBinding}.\n//\n// @param {module:ui/template~TemplateValueSchema} schema\n// @returns {Boolean}\nfunction hasTemplateBinding( schema ) {\n\tif ( !schema ) {\n\t\treturn false;\n\t}\n\n\t// Normalize attributes with additional data like namespace:\n\t//\n\t//\t\tclass: {\n\t//\t\t\tns: 'abc',\n\t//\t\t\tvalue: [ ... ]\n\t//\t\t}\n\t//\n\tif ( schema.value ) {\n\t\tschema = schema.value;\n\t}\n\n\tif ( Array.isArray( schema ) ) {\n\t\treturn schema.some( hasTemplateBinding );\n\t} else if ( schema instanceof TemplateBinding ) {\n\t\treturn true;\n\t}\n\n\treturn false;\n}\n\n// Assembles the value using {@link module:ui/template~TemplateValueSchema} and stores it in a form of\n// an Array. Each entry of an Array corresponds to one of {@link module:ui/template~TemplateValueSchema}\n// items.\n//\n// @param {module:ui/template~TemplateValueSchema} schema\n// @param {Node} node DOM Node updated when {@link module:utils/observablemixin~ObservableMixin} changes.\n// @return {Array}\nfunction getValueSchemaValue( schema, node ) {\n\treturn schema.map( schemaItem => {\n\t\t// Process {@link module:ui/template~TemplateBinding} bindings.\n\t\tif ( schemaItem instanceof TemplateBinding ) {\n\t\t\treturn schemaItem.getValue( node );\n\t\t}\n\n\t\t// All static values like strings, numbers, and \"falsy\" values (false, null, undefined, '', etc.) just pass.\n\t\treturn schemaItem;\n\t} );\n}\n\n// A function executed each time bound Observable attribute changes, which updates DOM with a value\n// constructed from {@link module:ui/template~TemplateValueSchema}.\n//\n// @param {module:ui/template~TemplateValueSchema} schema\n// @param {Function} updater A function which updates DOM (like attribute or text).\n// @param {Node} node DOM Node updated when {@link module:utils/observablemixin~ObservableMixin} changes.\nfunction syncValueSchemaValue( schema, updater, { node } ) {\n\tlet value = getValueSchemaValue( schema, node );\n\n\t// Check if schema is a single Template.bind.if, like:\n\t//\n\t//\t\tclass: Template.bind.if( 'foo' )\n\t//\n\tif ( schema.length == 1 && schema[ 0 ] instanceof TemplateIfBinding ) {\n\t\tvalue = value[ 0 ];\n\t} else {\n\t\tvalue = value.reduce( arrayValueReducer, '' );\n\t}\n\n\tif ( isFalsy( value ) ) {\n\t\tupdater.remove();\n\t} else {\n\t\tupdater.set( value );\n\t}\n}\n\n// Returns an object consisting of `set` and `remove` functions, which\n// can be used in the context of DOM Node to set or reset `textContent`.\n// @see module:ui/view~View#_bindToObservable\n//\n// @param {Node} node DOM Node to be modified.\n// @returns {Object}\nfunction getTextUpdater( node ) {\n\treturn {\n\t\tset( value ) {\n\t\t\tnode.textContent = value;\n\t\t},\n\n\t\tremove() {\n\t\t\tnode.textContent = '';\n\t\t}\n\t};\n}\n\n// Returns an object consisting of `set` and `remove` functions, which\n// can be used in the context of DOM Node to set or reset an attribute.\n// @see module:ui/view~View#_bindToObservable\n//\n// @param {Node} node DOM Node to be modified.\n// @param {String} attrName Name of the attribute to be modified.\n// @param {String} [ns=null] Namespace to use.\n// @returns {Object}\nfunction getAttributeUpdater( el, attrName, ns ) {\n\treturn {\n\t\tset( value ) {\n\t\t\tel.setAttributeNS( ns, attrName, value );\n\t\t},\n\n\t\tremove() {\n\t\t\tel.removeAttributeNS( ns, attrName );\n\t\t}\n\t};\n}\n\n// Returns an object consisting of `set` and `remove` functions, which\n// can be used in the context of CSSStyleDeclaration to set or remove a style.\n// @see module:ui/view~View#_bindToObservable\n//\n// @param {Node} node DOM Node to be modified.\n// @param {String} styleName Name of the style to be modified.\n// @returns {Object}\nfunction getStyleUpdater( el, styleName ) {\n\treturn {\n\t\tset( value ) {\n\t\t\tel.style[ styleName ] = value;\n\t\t},\n\n\t\tremove() {\n\t\t\tel.style[ styleName ] = null;\n\t\t}\n\t};\n}\n\n// Clones definition of the template.\n//\n// @param {module:ui/template~TemplateDefinition} def\n// @returns {module:ui/template~TemplateDefinition}\nfunction clone( def ) {\n\tconst clone = cloneDeepWith( def, value => {\n\t\t// Don't clone the `Template.bind`* bindings because of the references to Observable\n\t\t// and DomEmitterMixin instances inside, which would also be traversed and cloned by greedy\n\t\t// cloneDeepWith algorithm. There's no point in cloning Observable/DomEmitterMixins\n\t\t// along with the definition.\n\t\t//\n\t\t// Don't clone Template instances if provided as a child. They're simply #render()ed\n\t\t// and nothing should interfere.\n\t\t//\n\t\t// Also don't clone View instances if provided as a child of the Template. The template\n\t\t// instance will be extracted from the View during the normalization and there's no need\n\t\t// to clone it.\n\t\tif ( value && ( value instanceof TemplateBinding || isTemplate( value ) || isView( value ) || isViewCollection( value ) ) ) {\n\t\t\treturn value;\n\t\t}\n\t} );\n\n\treturn clone;\n}\n\n// Normalizes given {@link module:ui/template~TemplateDefinition}.\n//\n// See:\n// * {@link normalizeAttributes}\n// * {@link normalizeListeners}\n// * {@link normalizePlainTextDefinition}\n// * {@link normalizeTextDefinition}\n//\n// @param {module:ui/template~TemplateDefinition} def\n// @returns {module:ui/template~TemplateDefinition} Normalized definition.\nfunction normalize( def ) {\n\tif ( typeof def == 'string' ) {\n\t\tdef = normalizePlainTextDefinition( def );\n\t} else if ( def.text ) {\n\t\tnormalizeTextDefinition( def );\n\t}\n\n\tif ( def.on ) {\n\t\tdef.eventListeners = normalizeListeners( def.on );\n\n\t\t// Template mixes EmitterMixin, so delete #on to avoid collision.\n\t\tdelete def.on;\n\t}\n\n\tif ( !def.text ) {\n\t\tif ( def.attributes ) {\n\t\t\tnormalizeAttributes( def.attributes );\n\t\t}\n\n\t\tconst children = new ViewCollection();\n\n\t\tif ( def.children ) {\n\t\t\tif ( isViewCollection( def.children ) ) {\n\t\t\t\tchildren.add( def.children );\n\t\t\t} else {\n\t\t\t\tfor ( const child of def.children ) {\n\t\t\t\t\tif ( isTemplate( child ) || isView( child ) ) {\n\t\t\t\t\t\tchildren.add( child );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchildren.add( new Template( child ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tdef.children = children;\n\t}\n\n\treturn def;\n}\n\n// Normalizes \"attributes\" section of {@link module:ui/template~TemplateDefinition}.\n//\n//\t\tattributes: {\n//\t\t\ta: 'bar',\n//\t\t\tb: {@link module:ui/template~TemplateBinding},\n//\t\t\tc: {\n//\t\t\t\tvalue: 'bar'\n//\t\t\t}\n//\t\t}\n//\n// becomes\n//\n//\t\tattributes: {\n//\t\t\ta: [ 'bar' ],\n//\t\t\tb: [ {@link module:ui/template~TemplateBinding} ],\n//\t\t\tc: {\n//\t\t\t\tvalue: [ 'bar' ]\n//\t\t\t}\n//\t\t}\n//\n// @param {Object} attrs\nfunction normalizeAttributes( attrs ) {\n\tfor ( const a in attrs ) {\n\t\tif ( attrs[ a ].value ) {\n\t\t\tattrs[ a ].value = [].concat( attrs[ a ].value );\n\t\t}\n\n\t\tarrayify( attrs, a );\n\t}\n}\n\n// Normalizes \"on\" section of {@link module:ui/template~TemplateDefinition}.\n//\n//\t\ton: {\n//\t\t\ta: 'bar',\n//\t\t\tb: {@link module:ui/template~TemplateBinding},\n//\t\t\tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n//\t\t}\n//\n// becomes\n//\n//\t\ton: {\n//\t\t\ta: [ 'bar' ],\n//\t\t\tb: [ {@link module:ui/template~TemplateBinding} ],\n//\t\t\tc: [ {@link module:ui/template~TemplateBinding}, () => { ... } ]\n//\t\t}\n//\n// @param {Object} listeners\n// @returns {Object} Object containing normalized listeners.\nfunction normalizeListeners( listeners ) {\n\tfor ( const l in listeners ) {\n\t\tarrayify( listeners, l );\n\t}\n\n\treturn listeners;\n}\n\n// Normalizes \"string\" {@link module:ui/template~TemplateDefinition}.\n//\n//\t\t\"foo\"\n//\n// becomes\n//\n//\t\t{ text: [ 'foo' ] },\n//\n// @param {String} def\n// @returns {module:ui/template~TemplateDefinition} Normalized template definition.\nfunction normalizePlainTextDefinition( def ) {\n\treturn {\n\t\ttext: [ def ]\n\t};\n}\n\n// Normalizes text {@link module:ui/template~TemplateDefinition}.\n//\n//\t\tchildren: [\n//\t\t\t{ text: 'def' },\n//\t\t\t{ text: {@link module:ui/template~TemplateBinding} }\n//\t\t]\n//\n// becomes\n//\n//\t\tchildren: [\n//\t\t\t{ text: [ 'def' ] },\n//\t\t\t{ text: [ {@link module:ui/template~TemplateBinding} ] }\n//\t\t]\n//\n// @param {module:ui/template~TemplateDefinition} def\nfunction normalizeTextDefinition( def ) {\n\tif ( !Array.isArray( def.text ) ) {\n\t\tdef.text = [ def.text ];\n\t}\n}\n\n// Wraps an entry in Object in an Array, if not already one.\n//\n//\t\t{\n//\t\t\tx: 'y',\n//\t\t\ta: [ 'b' ]\n//\t\t}\n//\n// becomes\n//\n//\t\t{\n//\t\t\tx: [ 'y' ],\n//\t\t\ta: [ 'b' ]\n//\t\t}\n//\n// @param {Object} obj\n// @param {String} key\nfunction arrayify( obj, key ) {\n\tif ( !Array.isArray( obj[ key ] ) ) {\n\t\tobj[ key ] = [ obj[ key ] ];\n\t}\n}\n\n// A helper which concatenates the value avoiding unwanted\n// leading white spaces.\n//\n// @param {String} prev\n// @param {String} cur\n// @returns {String}\nfunction arrayValueReducer( prev, cur ) {\n\tif ( isFalsy( cur ) ) {\n\t\treturn prev;\n\t} else if ( isFalsy( prev ) ) {\n\t\treturn cur;\n\t} else {\n\t\treturn `${ prev } ${ cur }`;\n\t}\n}\n\n// Extends one object defined in the following format:\n//\n//\t\t{\n//\t\t\tkey1: [Array1],\n//\t\t\tkey2: [Array2],\n//\t\t\t...\n//\t\t\tkeyN: [ArrayN]\n//\t\t}\n//\n// with another object of the same data format.\n//\n// @param {Object} obj Base object.\n// @param {Object} ext Object extending base.\n// @returns {String}\nfunction extendObjectValueArray( obj, ext ) {\n\tfor ( const a in ext ) {\n\t\tif ( obj[ a ] ) {\n\t\t\tobj[ a ].push( ...ext[ a ] );\n\t\t} else {\n\t\t\tobj[ a ] = ext[ a ];\n\t\t}\n\t}\n}\n\n// A helper for {@link module:ui/template~Template#extend}. Recursively extends {@link module:ui/template~Template} instance\n// with content from {module:ui/template~TemplateDefinition}. See {@link module:ui/template~Template#extend} to learn more.\n//\n// @param {module:ui/template~Template} def A template instance to be extended.\n// @param {module:ui/template~TemplateDefinition} def A definition which is to extend the template instance.\nfunction extendTemplate( template, def ) {\n\tif ( def.attributes ) {\n\t\tif ( !template.attributes ) {\n\t\t\ttemplate.attributes = {};\n\t\t}\n\n\t\textendObjectValueArray( template.attributes, def.attributes );\n\t}\n\n\tif ( def.eventListeners ) {\n\t\tif ( !template.eventListeners ) {\n\t\t\ttemplate.eventListeners = {};\n\t\t}\n\n\t\textendObjectValueArray( template.eventListeners, def.eventListeners );\n\t}\n\n\tif ( def.text ) {\n\t\ttemplate.text.push( ...def.text );\n\t}\n\n\tif ( def.children && def.children.length ) {\n\t\tif ( template.children.length != def.children.length ) {\n\t\t\t/**\n\t\t\t * The number of children in extended definition does not match.\n\t\t\t *\n\t\t\t * @error ui-template-extend-children-mismatch\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'ui-template-extend-children-mismatch: The number of children in extended definition does not match.'\n\t\t\t);\n\t\t}\n\n\t\tlet childIndex = 0;\n\n\t\tfor ( const childDef of def.children ) {\n\t\t\textendTemplate( template.children.get( childIndex++ ), childDef );\n\t\t}\n\t}\n}\n\n// Checks if value is \"falsy\".\n// Note: 0 (Number) is not \"falsy\" in this context.\n//\n// @private\n// @param {*} value Value to be checked.\nfunction isFalsy( value ) {\n\treturn !value && value !== 0;\n}\n\n// Checks if the item is an instance of {@link module:ui/view~View}\n//\n// @private\n// @param {*} value Value to be checked.\nfunction isView( item ) {\n\treturn item instanceof View;\n}\n\n// Checks if the item is an instance of {@link module:ui/template~Template}\n//\n// @private\n// @param {*} value Value to be checked.\nfunction isTemplate( item ) {\n\treturn item instanceof Template;\n}\n\n// Checks if the item is an instance of {@link module:ui/viewcollection~ViewCollection}\n//\n// @private\n// @param {*} value Value to be checked.\nfunction isViewCollection( item ) {\n\treturn item instanceof ViewCollection;\n}\n\n// Creates an empty skeleton for {@link module:ui/template~Template#revert}\n// data.\n//\n// @private\nfunction getEmptyRevertData() {\n\treturn {\n\t\tchildren: [],\n\t\tbindings: [],\n\t\tattributes: {}\n\t};\n}\n\n// Checks whether an attribute should be extended when\n// {@link module:ui/template~Template#apply} is called.\n//\n// @private\n// @param {String} attrName Attribute name to check.\nfunction shouldExtend( attrName ) {\n\treturn attrName == 'class' || attrName == 'style';\n}\n\n/**\n * A definition of the {@link module:ui/template~Template}. It describes what kind of\n * node a template will render (HTML element or text), attributes of an element, DOM event\n * listeners and children.\n *\n * Also see:\n * * {@link module:ui/template~TemplateValueSchema} to learn about HTML element attributes,\n * * {@link module:ui/template~TemplateListenerSchema} to learn about DOM event listeners.\n *\n * A sample definition on an HTML element can look like this:\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tchildren: [\n *\t\t\t\t{\n *\t\t\t\t\ttag: 'span',\n *\t\t\t\t\tattributes: { ... },\n *\t\t\t\t\tchildren: [ ... ],\n *\t\t\t\t},\n *\t\t\t\t{\n *\t\t\t\t\ttext: 'staticā€“text'\n *\t\t\t\t},\n *\t\t\t\t'also-staticā€“text',\n *\t\t\t],\n *\t\t\tattributes: {\n *\t\t\t\tclass: {@link module:ui/template~TemplateValueSchema},\n *\t\t\t\tid: {@link module:ui/template~TemplateValueSchema},\n *\t\t\t\tstyle: {@link module:ui/template~TemplateValueSchema}\n *\n *\t\t\t\t// ...\n *\t\t\t},\n *\t\t\ton: {\n *\t\t\t\t'click': {@link module:ui/template~TemplateListenerSchema}\n *\n *\t\t\t\t// Document.querySelector format is also accepted.\n *\t\t\t\t'keyup@a.some-class': {@link module:ui/template~TemplateListenerSchema}\n *\n *\t\t\t\t// ...\n *\t\t\t}\n *\t\t} );\n *\n * A {@link module:ui/view~View} or another {@link module:ui/template~Template} can also become a child\n * of a template. In case of a view {@link module:ui/view~View#element} is used:\n *\n *\t\tconst view = new SomeView();\n *\t\tconst childTemplate = new Template( { ... } );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\n *\t\t\tchildren: [\n *\t\t\t\t// view#element will be added as a child of this

.\n *\t\t\t\tview,\n *\n * \t\t\t\t// The output of childTemplate.render() will be added here.\n *\t\t\t\tchildTemplate\n *\t\t\t]\n *\t\t} );\n *\n * An entire {@link module:ui/viewcollection~ViewCollection} can be used as a child in the definition:\n *\n *\t\tconst collection = new ViewCollection();\n *\t\tcollection.add( someView );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\n *\t\t\tchildren: collection\n *\t\t} );\n *\n * @typedef module:ui/template~TemplateDefinition\n * @type Object\n *\n * @property {String} tag See template {@link module:ui/template~Template#tag} property.\n *\n * @property {Array.} [children]\n * See template {@link module:ui/template~Template#children} property.\n *\n * @property {Object.} [attributes]\n * See template {@link module:ui/template~Template#attributes} property.\n *\n * @property {String|module:ui/template~TemplateValueSchema|Array.} [text]\n * See template {@link module:ui/template~Template#text} property.\n *\n * @property {Object.} [on]\n * See template {@link module:ui/template~Template#eventListeners} property.\n */\n\n/**\n * Describes a value of an HTML element attribute or `textContent`. It allows combining multiple\n * data sources like static values and {@link module:utils/observablemixin~Observable} attributes.\n *\n * Also see:\n * * {@link module:ui/template~TemplateDefinition} to learn where to use it,\n * * {@link module:ui/template~Template.bind} to learn how to configure\n * {@link module:utils/observablemixin~Observable} attribute bindings,\n * * {@link module:ui/template~Template#render} to learn how to render a template,\n * * {@link module:ui/template~BindChain#to `to()`} and {@link module:ui/template~BindChain#if `if()`}\n * methods to learn more about bindings.\n *\n * Attribute values can be described in many different ways:\n *\n *\t\t// Bind helper will create bindings to attributes of the observable.\n *\t\tconst bind = Template.bind( observable, emitter );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\t// A plain string schema.\n *\t\t\t\t'class': 'static-text',\n *\n *\t\t\t\t// An object schema, binds to the \"foo\" attribute of the\n *\t\t\t\t// observable and follows its value.\n *\t\t\t\t'class': bind.to( 'foo' ),\n *\n *\t\t\t\t// An array schema, combines the above.\n *\t\t\t\t'class': [\n *\t\t\t\t\t'static-text',\n *\t\t\t\t\tbind.to( 'bar', () => { ... } ),\n *\n * \t\t\t\t\t// Bindings can also be conditional.\n *\t\t\t\t\tbind.if( 'baz', 'class-when-baz-is-true' )\n *\t\t\t\t],\n *\n *\t\t\t\t// An array schema, with a custom namespace, e.g. useful for creating SVGs.\n *\t\t\t\t'class': {\n *\t\t\t\t\tns: 'http://ns.url',\n *\t\t\t\t\tvalue: [\n *\t\t\t\t\t\tbind.if( 'baz', 'value-when-true' ),\n *\t\t\t\t\t\t'static-text'\n *\t\t\t\t\t]\n *\t\t\t\t},\n *\n *\t\t\t\t// An object schema, specific for styles.\n *\t\t\t\tstyle: {\n *\t\t\t\t\tcolor: 'red',\n *\t\t\t\t\tbackgroundColor: bind.to( 'qux', () => { ... } )\n *\t\t\t\t}\n *\t\t\t}\n *\t\t} );\n *\n * Text nodes can also be have complex values:\n *\n *\t\tconst bind = Template.bind( observable, emitter );\n *\n *\t\t// Will render a \"foo\" text node.\n *\t\tnew Template( {\n *\t\t\ttext: 'foo'\n *\t\t} );\n *\n *\t\t// Will render a \"static text: {observable.foo}\" text node.\n *\t\t// The text of the node will be updated as the \"foo\" attribute changes.\n *\t\tnew Template( {\n *\t\t\ttext: [\n *\t\t\t\t'static text: ',\n *\t\t\t\tbind.to( 'foo', () => { ... } )\n *\t\t\t]\n *\t\t} );\n *\n * @typedef module:ui/template~TemplateValueSchema\n * @type {Object|String|Array}\n */\n\n/**\n * Describes an event listener attached to an HTML element. Such listener can propagate DOM events\n * through an {@link module:utils/observablemixin~Observable} instance, execute custom callbacks\n * or both, if necessary.\n *\n * Also see:\n * * {@link module:ui/template~TemplateDefinition} to learn more about template definitions,\n * * {@link module:ui/template~BindChain#to `to()`} method, to learn more about bindings.\n *\n * Check out different ways of attaching event listeners below:\n *\n *\t\t// Bind helper will propagate events through the observable.\n *\t\tconst bind = Template.bind( observable, emitter );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\ton: {\n *\t\t\t\t// An object schema. The observable will fire 'clicked' event upon DOM 'click'.\n *\t\t\t\tclick: bind.to( 'clicked' )\n *\n *\t\t\t\t// An object schema. It will work for \"click\" event on \"a.foo\" children only.\n *\t\t\t\t'click@a.foo': bind.to( 'clicked' )\n *\n *\t\t\t\t// An array schema, makes the observable propagate multiple events.\n *\t\t\t\tclick: [\n *\t\t\t\t\tbind.to( 'clicked' ),\n *\t\t\t\t\tbind.to( 'executed' )\n *\t\t\t\t],\n *\n *\t\t\t\t// An array schema with a custom callback.\n *\t\t\t\t'click@a.foo': {\n *\t\t\t\t\tbind.to( 'clicked' ),\n *\t\t\t\t\tbind.to( evt => {\n *\t\t\t\t\t\tconsole.log( `${ evt.target } has been clicked!` );\n *\t\t\t\t\t} }\n *\t\t\t\t}\n *\t\t\t}\n *\t\t} );\n *\n * @typedef module:ui/template~TemplateListenerSchema\n * @type {Object|String|Array}\n */\n\n/**\n * The return value of {@link ~Template.bind `Template.bind()`}. It provides `to()` and `if()`\n * methods to create {@link module:utils/observablemixin~Observable observable} attribute and event bindings.\n *\n * @interface module:ui/template~BindChain\n */\n\n/**\n * Binds an {@link module:utils/observablemixin~Observable observable} to either:\n *\n * * an HTML element attribute or a text node `textContent` so remains in sync with the observable\n * attribute as it changes,\n * * or an HTML element DOM event, so the DOM events are propagated through an observable.\n *\n * Some common useā€“cases of `to()` bindings are presented below:\n *\n *\t\tconst bind = Template.bind( observable, emitter );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'p',\n *\t\t\tattributes: {\n *\t\t\t\t// class=\"...\" attribute gets bound to `observable#a`\n *\t\t\t\tclass: bind.to( 'a' )\n *\t\t\t},\n *\t\t\tchildren: [\n *\t\t\t\t//

...

gets bound to observable#b; always `toUpperCase()`.\n *\t\t\t\t{\n *\t\t\t\t\ttext: bind.to( 'b', ( value, node ) => value.toUpperCase() )\n *\t\t\t\t}\n *\t\t\t],\n *\t\t\ton: {\n *\t\t\t\tclick: [\n *\t\t\t\t\t// an observable will fire \"clicked\" upon \"click\" in DOM.\n *\t\t\t\t\tbind.to( 'clicked' ),\n *\n *\t\t\t\t\t// A custom callback will be executed upon \"click\" in DOM.\n *\t\t\t\t\tbind.to( () => {\n *\t\t\t\t\t\t...\n *\t\t\t\t\t} )\n *\t\t\t\t]\n *\t\t\t}\n *\t\t} ).render();\n *\n * Learn more about using `to()` in the {@link module:ui/template~TemplateValueSchema} and\n * {@link module:ui/template~TemplateListenerSchema}.\n *\n * @method #to\n * @param {String|Function} eventNameOrFunctionOrAttribute An attribute name of\n * {@link module:utils/observablemixin~Observable} or a DOM event name or an event callback.\n * @param {Function} [callback] Allows processing of the value. Accepts `Node` and `value` as arguments.\n * @return {module:ui/template~TemplateBinding}\n */\n\n/**\n * Binds an {@link module:utils/observablemixin~Observable observable} to an HTML element attribute or a text\n * node `textContent` so remains in sync with the observable attribute as it changes.\n *\n * Unlike {@link module:ui/template~BindChain#to}, it controls the presence of the attribute/`textContent`\n * depending on the \"falseness\" of an {@link module:utils/observablemixin~Observable} attribute.\n *\n *\t\tconst bind = Template.bind( observable, emitter );\n *\n *\t\tnew Template( {\n *\t\t\ttag: 'input',\n *\t\t\tattributes: {\n *\t\t\t\t// when `observable#a` is not undefined/null/false/''\n *\t\t\t\t// when `observable#a` is undefined/null/false\n *\t\t\t\tchecked: bind.if( 'a' )\n *\t\t\t},\n *\t\t\tchildren: [\n *\t\t\t\t{\n *\t\t\t\t\t// \"b-is-not-set\" when `observable#b` is undefined/null/false/''\n *\t\t\t\t\t// when `observable#b` is not \"falsy\"\n *\t\t\t\t\ttext: bind.if( 'b', 'b-is-not-set', ( value, node ) => !value )\n *\t\t\t\t}\n *\t\t\t]\n *\t\t} ).render();\n *\n * Learn more about using `if()` in the {@link module:ui/template~TemplateValueSchema}.\n *\n * @method #if\n * @param {String} attribute An attribute name of {@link module:utils/observablemixin~Observable} used in the binding.\n * @param {String} [valueIfTrue] Value set when {@link module:utils/observablemixin~Observable} attribute is not\n * undefined/null/false/'' (empty string).\n * @param {Function} [callback] Allows processing of the value. Accepts `Node` and `value` as arguments.\n * @return {module:ui/template~TemplateBinding}\n */\n\n/**\n * The {@link module:ui/template~Template#_renderNode} configuration.\n *\n * @private\n * @interface module:ui/template~RenderData\n */\n\n/**\n * Tells {@link module:ui/template~Template#_renderNode} to render\n * children into `DocumentFragment` first and then append the fragment\n * to the parent element. It's a speed optimization.\n *\n * @member {Boolean} #intoFragment\n */\n\n/**\n * A node which is being rendered.\n *\n * @member {HTMLElement|Text} #node\n */\n\n/**\n * Indicates whether the {@module:ui/template~RenderNodeOptions#node} has\n * been provided by {@module:ui/template~Template#apply}.\n *\n * @member {Boolean} #isApplying\n */\n\n/**\n * An object storing the data that helps {@module:ui/template~Template#revert}\n * bringing back an element to its initial state, i.e. before\n * {@module:ui/template~Template#apply} was called.\n *\n * @member {Object} #revertData\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-ui/src/template.js\n// module id = 6\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module ui/view\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport ViewCollection from './viewcollection';\nimport Template from './template';\nimport DomEmitterMixin from '@ckeditor/ckeditor5-utils/src/dom/emittermixin';\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport Collection from '@ckeditor/ckeditor5-utils/src/collection';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\n\n/**\n * The basic view class, which represents an HTML element created out of a\n * {@link module:ui/view~View#template}. Views are building blocks of the user interface and handle\n * interaction\n *\n * Views {@link module:ui/view~View#addChildren aggregate} children in\n * {@link module:ui/view~View#createCollection collections} and manage the life cycle of DOM\n * listeners e.g. by handling initialization and destruction.\n *\n * See the {@link module:ui/template~TemplateDefinition} syntax to learn more about shaping view\n * elements, attributes and listeners.\n *\n *\t\tclass SampleView extends View {\n *\t\t\tconstructor( locale ) {\n *\t\t\t\tsuper( locale );\n *\n *\t\t\t\tconst bind = this.bindTemplate;\n *\n *\t\t\t\t// Views define their interface (state) using observable attributes.\n *\t\t\t\tthis.set( 'elementClass', 'bar' );\n *\n *\t\t\t\tthis.template = new Template( {\n *\t\t\t\t\ttag: 'p',\n *\n *\t\t\t\t\t// The element of the view can be defined with its children.\n *\t\t\t\t\tchildren: [\n *\t\t\t\t\t\t'Hello',\n *\t\t\t\t\t\t{\n *\t\t\t\t\t\t\ttag: 'b',\n *\t\t\t\t\t\t\tchildren: [ 'world!' ]\n *\t\t\t\t\t\t}\n *\t\t\t\t\t],\n *\t\t\t\t\tattributes: {\n *\t\t\t\t\t\tclass: [\n *\t\t\t\t\t\t\t'foo',\n *\n *\t\t\t\t\t\t\t// Observable attributes control the state of the view in DOM.\n *\t\t\t\t\t\t\tbind.to( 'elementClass' )\n *\t\t\t\t\t\t]\n *\t\t\t\t\t},\n *\t\t\t\t\ton: {\n *\t\t\t\t\t\t// Views listen to DOM events and propagate them.\n *\t\t\t\t\t\tclick: bind.to( 'clicked' )\n *\t\t\t\t\t}\n *\t\t\t\t} );\n *\t\t\t}\n *\t\t}\n *\n *\t\tconst view = new SampleView( locale );\n *\n *\t\t// Each view must be first initialized.\n *\t\tview.init();\n *\n *\t\t// Append

Helloworld

to the \n *\t\tdocument.body.appendChild( view.element );\n *\n *\t\t// Change the class attribute to

Helloworld

\n *\t\tview.elementClass = 'baz';\n *\n *\t\t// Respond to the \"click\" event in DOM by executing a custom action.\n *\t\tview.on( 'clicked', () => {\n *\t\t\tconsole.log( 'The view has been clicked!' );\n *\t\t} );\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class View {\n\t/**\n\t * Creates an instance of the {@link module:ui/view~View} class.\n\t *\n\t * Also see {@link #init}.\n\t *\n\t * @param {module:utils/locale~Locale} [locale] The localization services instance.\n\t */\n\tconstructor( locale ) {\n\t\t/**\n\t\t * A set of tools to localize the user interface.\n\t\t *\n\t\t * Also see {@link module:core/editor/editor~Editor#locale}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:utils/locale~Locale}\n\t\t */\n\t\tthis.locale = locale;\n\n\t\t/**\n\t\t * Shorthand for {@link module:utils/locale~Locale#t}.\n\t\t *\n\t\t * Note: If {@link #locale} instance hasn't been passed to the view this method may not\n\t\t * be available.\n\t\t *\n\t\t * @see module:utils/locale~Locale#t\n\t\t * @method\n\t\t */\n\t\tthis.t = locale && locale.t;\n\n\t\t/**\n\t\t * A flag set `true` after {@link #init initialization}. Because the process can be\n\t\t * asynchronous, this {@link module:utils/observablemixin~Observable observable} flag allows\n\t\t * deferring certain actions until it is finished.\n\t\t *\n\t\t * @readonly\n\t\t * @observable\n\t\t * @member {Boolean} #ready\n\t\t */\n\t\tthis.set( 'ready', false );\n\n\t\t/**\n\t\t * Collections registered with {@link #createCollection}.\n\t\t *\n\t\t * @protected\n\t\t * @member {Set.}\n\t\t */\n\t\tthis._viewCollections = new Collection();\n\n\t\t/**\n\t\t * A collection of view instances, which have been added directly\n\t\t * into the {@link module:ui/template~Template#children}.\n\t\t *\n\t\t * @protected\n\t\t * @member {module:ui/viewcollection~ViewCollection}\n\t\t */\n\t\tthis._unboundChildren = this.createCollection();\n\n\t\t// Pass parent locale to its children.\n\t\tthis._viewCollections.on( 'add', ( evt, collection ) => {\n\t\t\tcollection.locale = locale;\n\t\t} );\n\n\t\t/**\n\t\t * Template of this view. It provides the {@link #element} representing\n\t\t * the view in DOM.\n\t\t *\n\t\t * @member {module:ui/template~Template} #template\n\t\t */\n\n\t\t/**\n\t\t * An internal, cached element of this view. See {@link #element}.\n\t\t *\n\t\t * @private\n\t\t * @member {HTMLElement} #_element\n\t\t */\n\n\t\t/**\n\t\t * Cached {@link @link module:ui/template~BindChain bind chain} object created by the\n\t\t * {@link #template}. See {@link #bindTemplate}.\n\t\t *\n\t\t * @private\n\t\t * @member {Object} #_bindTemplate\n\t\t */\n\t}\n\n\t/**\n\t * An HTML element of this view. The element is rendered on first reference\n\t * by the {@link #template}:\n\t *\n\t *\t\tclass SampleView extends View {\n\t *\t\t\tconstructor() {\n\t *\t\t\t\tsuper();\n\t *\n\t *\t\t\t\t// A template instance the #element will be created from.\n\t *\t\t\t\tthis.template = new Template( {\n\t *\t\t\t\t\ttag: 'p'\n\t *\n\t *\t\t\t\t\t// ...\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst view = new SampleView();\n\t *\t\tview.init();\n\t *\n\t *\t\t// Renders the #template and appends the output to .\n\t *\t\tdocument.body.appendChild( view.element );\n\t *\n\t * The element of the view can also be assigned directly:\n\t *\n\t *\t\tview.element = document.querySelector( '#my-container' );\n\t *\n\t * @type {HTMLElement}\n\t */\n\tget element() {\n\t\tif ( this._element ) {\n\t\t\treturn this._element;\n\t\t}\n\n\t\t// No template means no element (a virtual view).\n\t\tif ( !this.template ) {\n\t\t\treturn null;\n\t\t}\n\n\t\tthis._addTemplateChildren();\n\n\t\treturn ( this._element = this.template.render() );\n\t}\n\n\tset element( el ) {\n\t\tthis._element = el;\n\t}\n\n\t/**\n\t * Shorthand for {@link module:ui/template~Template.bind}, a binding\n\t * {@link module:ui/template~BindChain interface} preā€“configured for the view instance.\n\t *\n\t * It provides {@link module:ui/template~BindChain#to `to()`} and\n\t * {@link module:ui/template~BindChain#if `if()`} methods that initialize bindings with\n\t * observable attributes and attach DOM listeners.\n\t *\n\t *\t\tclass SampleView extends View {\n\t *\t\t\tconstructor( locale ) {\n\t *\t\t\t\tsuper( locale );\n\t *\n\t *\t\t\t\tconst bind = this.bindTemplate;\n\t *\n\t *\t\t\t\t// These {@link module:utils/observablemixin~Observable observable} attributes will control\n\t *\t\t\t\t// the state of the view in DOM.\n\t *\t\t\t\tthis.set( {\n\t *\t\t\t\t\telementClass: 'foo',\n\t *\t\t\t\t \tisEnabled: true\n\t *\t\t\t\t } );\n\t *\n\t *\t\t\t\tthis.template = new Template( {\n\t *\t\t\t\t\ttag: 'p',\n\t *\n\t *\t\t\t\t\tattributes: {\n\t *\t\t\t\t\t\t// The class HTML attribute will follow elementClass\n\t *\t\t\t\t\t\t// and isEnabled view attributes.\n\t *\t\t\t\t\t\tclass: [\n\t *\t\t\t\t\t\t\tbind.to( 'elementClass' )\n\t *\t\t\t\t\t\t\tbind.if( 'isEnabled', 'present-when-enabled' )\n\t *\t\t\t\t\t\t]\n\t *\t\t\t\t\t},\n\t *\n\t *\t\t\t\t\ton: {\n\t *\t\t\t\t\t\t// The view will fire the \"clicked\" event upon clicking

in DOM.\n\t *\t\t\t\t\t\tclick: bind.to( 'clicked' )\n\t *\t\t\t\t\t}\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t * @method #bindTemplate\n\t */\n\tget bindTemplate() {\n\t\tif ( this._bindTemplate ) {\n\t\t\treturn this._bindTemplate;\n\t\t}\n\n\t\treturn ( this._bindTemplate = Template.bind( this, this ) );\n\t}\n\n\t/**\n\t * Creates a new collection of views, which can be used as\n\t * {@link module:ui/template~Template#children} of this view.\n\t *\n\t *\t\tclass SampleView extends View {\n\t *\t\t\tconstructor( locale ) {\n\t *\t\t\t\tsuper( locale );\n\t *\n\t *\t\t\t\tthis.items = this.createCollection();\n \t *\n\t *\t\t\t\tthis.template = new Template( {\n\t *\t\t\t\t\ttag: 'p',\n\t *\n\t *\t\t\t\t\t// `items` collection will render here.\n\t *\t\t\t\t\tchildren: this.items\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst view = new SampleView( locale );\n\t *\t\tconst child = new ChildView( locale );\n\t *\n\t *\t\tview.init();\n\t *\n\t *\t\t// It will append

to the .\n\t *\t\tdocument.body.appendChild( view.element );\n\t *\n\t *\t\t// From now on the child is nested under its parent, which is also reflected in DOM.\n\t *\t\t//

\n\t *\t\tview.items.add( child );\n\t *\n\t * @returns {module:ui/viewcollection~ViewCollection} A new collection of view instances.\n\t */\n\tcreateCollection() {\n\t\tconst collection = new ViewCollection();\n\n\t\tthis._viewCollections.add( collection );\n\n\t\treturn collection;\n\t}\n\n\t/**\n\t * Registers a new child view under the view instance. Once registered, a child\n\t * view is managed by its parent, including {@link #init initization}\n\t * and {@link #destroy destruction}.\n\t *\n\t * To revert this, use {@link #removeChildren}.\n\t *\n\t *\t\tclass SampleView extends View {\n\t *\t\t\tconstructor( locale ) {\n\t *\t\t\t\tsuper( locale );\n\t *\n\t *\t\t\t\tthis.childA = new SomeChildView( locale );\n\t *\t\t\t\tthis.childB = new SomeChildView( locale );\n\t *\n\t *\t\t\t\tthis.template = new Template( { tag: 'p' } );\n\t *\n\t *\t\t\t\t// Register the children.\n\t *\t\t\t\tthis.addChildren( [ this.childA, this.childB ] );\n\t *\t\t\t}\n\t *\n\t *\t\t\tinit() {\n\t *\t\t\t\tthis.element.appendChild( this.childA.element );\n\t *\t\t\t\tthis.element.appendChild( this.childB.element );\n\t *\n\t *\t\t\t\treturn super.init();\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst view = new SampleView( locale );\n\t *\n\t *\t\tview.init();\n\t *\n\t *\t\t// Will append

.\n\t *\t\tdocument.body.appendChild( view.element );\n\t *\n\t * **Note**: There's no need to add child views if they're already referenced in the\n\t * {@link #template}:\n\t *\n\t *\t\tclass SampleView extends View {\n\t *\t\t\tconstructor( locale ) {\n\t *\t\t\t\tsuper( locale );\n\t *\n\t *\t\t\t\tthis.childA = new SomeChildView( locale );\n\t *\t\t\t\tthis.childB = new SomeChildView( locale );\n\t *\n\t *\t\t\t\tthis.template = new Template( {\n\t *\t\t\t\t\ttag: 'p',\n\t *\n \t *\t\t\t\t\t// These children will be added automatically. There's no\n \t *\t\t\t\t\t// need to call {@link #addChildren} for any of them.\n\t *\t\t\t\t\tchildren: [ this.childA, this.childB ]\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\n\t *\t\t\t// ...\n\t *\t\t}\n\t *\n\t * @param {module:ui/view~View|Iterable.} children Children views to be registered.\n\t */\n\taddChildren( children ) {\n\t\tif ( !isIterable( children ) ) {\n\t\t\tchildren = [ children ];\n\t\t}\n\n\t\tchildren.map( c => this._unboundChildren.add( c ) );\n\t}\n\n\t/**\n\t * The opposite of {@link #addChildren}. Removes a child view from this view instance.\n\t * Once removed, the child is no longer managed by its parent, e.g. it can safely\n\t * become a child of another parent view.\n\t *\n\t * @see #addChildren\n\t * @param {module:ui/view~View|Iterable.} children Child views to be removed.\n\t */\n\tremoveChildren( children ) {\n\t\tif ( !isIterable( children ) ) {\n\t\t\tchildren = [ children ];\n\t\t}\n\n\t\tchildren.map( c => this._unboundChildren.remove( c ) );\n\t}\n\n\t/**\n\t * Initializes the view and its children added by {@link #addChildren} and residing in collections\n\t * created by the {@link #createCollection} method.\n\t *\n\t * In general, `init()` is the right place to keep the code which refers to the {@link #element}\n\t * and should be executed at the very beginning of the view's life cycle. It is possible to\n\t * {@link module:ui/template~Template.extend} the {@link #template} before the first reference of\n\t * the {@link #element}. To allow an early customization of the view (e.g. by its parent),\n\t * such references should be done in `init()`.\n\t *\n\t *\t\tclass SampleView extends View {\n\t *\t\t\tconstructor() {\n\t *\t\t\t\tthis.template = new Template( {\n\t *\t\t\t\t\t// ...\n\t *\t\t\t\t} );\n\t *\t\t\t},\n\t *\n\t *\t\t\tinit() {\n\t *\t\t\t\tsuper.init();\n\t *\n\t *\t\t\t\tfunction scroll() {\n\t *\t\t\t\t\t// A reference to #element would render the #template and make it non-extendable.\n\t *\t\t\t\t\tif ( window.scrollY > 0 ) {\n\t *\t\t\t\t\t\tthis.element.scrollLeft = 100;\n\t *\t\t\t\t\t} else {\n\t *\t\t\t\t\t\tthis.element.scrollLeft = 0;\n\t *\t\t\t\t\t}\n\t *\t\t\t\t}\n\t *\n\t *\t\t\t\tthis.listenTo( window, 'scroll', () => {\n\t *\t\t\t\t\tscroll();\n\t *\t\t\t\t} );\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst view = new SampleView();\n\t *\n\t *\t\tTemplate.extend( view.template, {\n\t *\t\t\tattributes: {\n\t *\t\t\t\tclass: [\n\t *\t\t\t\t\t'additional-class'\n\t *\t\t\t\t]\n\t *\t\t\t}\n\t *\t\t} );\n\t *\n\t *\t\t// Late initialization allows customization of the view.\n\t *\t\tview.init();\n\t *\n\t * Once initialized, the view becomes {@link #ready}.\n\t */\n\tinit() {\n\t\tif ( this.ready ) {\n\t\t\t/**\n\t\t\t * This View has already been initialized.\n\t\t\t *\n\t\t\t * @error ui-view-init-reinit\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'ui-view-init-reinit: This View has already been initialized.' );\n\t\t}\n\n\t\t// Initialize collections in #_viewCollections.\n\t\tthis._viewCollections.map( c => c.init() );\n\n\t\t// Spread the word that this view is ready!\n\t\tthis.ready = true;\n\t}\n\n\t/**\n\t * Recursively destroys the view instance and child views added by {@link #addChildren} and\n\t * residing in collections created by the {@link #createCollection}.\n\t *\n\t * Destruction disables all event listeners:\n\t * * created on the view, e.g. `view.on( 'event', () => {} )`,\n\t * * defined in the {@link #template} for DOM events.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\n\t\tthis._viewCollections.map( c => c.destroy() );\n\t}\n\n\t/**\n\t * Recursively traverses {@link #template} in search of {@link module:ui/view~View}\n\t * instances and automatically registers them using {@link #addChildren} method.\n\t *\n\t * @protected\n\t */\n\t_addTemplateChildren() {\n\t\tconst search = def => {\n\t\t\tif ( def.children ) {\n\t\t\t\tfor ( const defOrView of def.children ) {\n\t\t\t\t\tif ( defOrView instanceof View ) {\n\t\t\t\t\t\tthis.addChildren( defOrView );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsearch( defOrView );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\n\t\tsearch( this.template );\n\t}\n}\n\nmix( View, DomEmitterMixin );\nmix( View, ObservableMixin );\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-ui/src/view.js\n// module id = 7\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module utils/emittermixin\n */\n\nimport EventInfo from './eventinfo';\nimport uid from './uid';\nimport priorities from './priorities';\n\nconst _listeningTo = Symbol( 'listeningTo' );\nconst _emitterId = Symbol( 'emitterId' );\n\n/**\n * Mixin that injects the events API into its host.\n *\n * @mixin EmitterMixin\n * @implements module:utils/emittermixin~Emitter\n */\nconst EmitterMixin = {\n\t/**\n\t * Registers a callback function to be executed when an event is fired.\n\t *\n\t * Events can be grouped in namespaces using `:`.\n\t * When namespaced event is fired, it additionaly fires all callbacks for that namespace.\n\t *\n\t *\t\tmyEmitter.on( 'myGroup', genericCallback );\n\t *\t\tmyEmitter.on( 'myGroup:myEvent', specificCallback );\n\t *\n\t *\t\t// genericCallback is fired.\n\t *\t\tmyEmitter.fire( 'myGroup' );\n\t *\t\t// both genericCallback and specificCallback are fired.\n\t *\t\tmyEmitter.fire( 'myGroup:myEvent' );\n\t *\t\t// genericCallback is fired even though there are no callbacks for \"foo\".\n\t *\t\tmyEmitter.fire( 'myGroup:foo' );\n\t *\n\t * An event callback can {@link module:utils/eventinfo~EventInfo#stop stop the event} and\n\t * set the {@link module:utils/eventinfo~EventInfo#return return value} of the {@link #fire} method.\n\t *\n\t * @method #on\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.\n\t */\n\ton( event, callback, options = {} ) {\n\t\tcreateEventNamespace( this, event );\n\t\tconst lists = getCallbacksListsForNamespace( this, event );\n\t\tconst priority = priorities.get( options.priority );\n\n\t\tcallback = {\n\t\t\tcallback,\n\t\t\tcontext: options.context || this,\n\t\t\tpriority\n\t\t};\n\n\t\t// Add the callback to all callbacks list.\n\t\tfor ( const callbacks of lists ) {\n\t\t\t// Add the callback to the list in the right priority position.\n\t\t\tlet added = false;\n\n\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\tif ( callbacks[ i ].priority < priority ) {\n\t\t\t\t\tcallbacks.splice( i, 0, callback );\n\t\t\t\t\tadded = true;\n\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Add at the end, if right place was not found.\n\t\t\tif ( !added ) {\n\t\t\t\tcallbacks.push( callback );\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Registers a callback function to be executed on the next time the event is fired only. This is similar to\n\t * calling {@link #on} followed by {@link #off} in the callback.\n\t *\n\t * @method #once\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.\n\t */\n\tonce( event, callback, options ) {\n\t\tconst onceCallback = function( event, ...args ) {\n\t\t\t// Go off() at the first call.\n\t\t\tevent.off();\n\n\t\t\t// Go with the original callback.\n\t\t\tcallback.call( this, event, ...args );\n\t\t};\n\n\t\t// Make a similar on() call, simply replacing the callback.\n\t\tthis.on( event, onceCallback, options );\n\t},\n\n\t/**\n\t * Stops executing the callback on the given event.\n\t *\n\t * @method #off\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to stop being called.\n\t * @param {Object} [context] The context object to be removed, pared with the given callback. To handle cases where\n\t * the same callback is used several times with different contexts.\n\t */\n\toff( event, callback, context ) {\n\t\tconst lists = getCallbacksListsForNamespace( this, event );\n\n\t\tfor ( const callbacks of lists ) {\n\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\tif ( callbacks[ i ].callback == callback ) {\n\t\t\t\t\tif ( !context || context == callbacks[ i ].context ) {\n\t\t\t\t\t\t// Remove the callback from the list (fixing the next index).\n\t\t\t\t\t\tcallbacks.splice( i, 1 );\n\t\t\t\t\t\ti--;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t},\n\n\t/**\n\t * Registers a callback function to be executed when an event is fired in a specific (emitter) object.\n\t *\n\t * @method #listenTo\n\t * @param {module:utils/emittermixin~Emitter} emitter The object that fires the event.\n\t * @param {String} event The name of the event.\n\t * @param {Function} callback The function to be called on event.\n\t * @param {Object} [options={}] Additional options.\n\t * @param {module:utils/priorities~PriorityString|Number} [options.priority='normal'] The priority of this event callback. The higher\n\t * the priority value the sooner the callback will be fired. Events having the same priority are called in the\n\t * order they were added.\n\t * @param {Object} [options.context] The object that represents `this` in the callback. Defaults to the object firing the event.\n\t */\n\tlistenTo( emitter, event, callback, options ) {\n\t\tlet emitterInfo, eventCallbacks;\n\n\t\t// _listeningTo contains a list of emitters that this object is listening to.\n\t\t// This list has the following format:\n\t\t//\n\t\t// _listeningTo: {\n\t\t// emitterId: {\n\t\t// emitter: emitter,\n\t\t// callbacks: {\n\t\t// event1: [ callback1, callback2, ... ]\n\t\t// ....\n\t\t// }\n\t\t// },\n\t\t// ...\n\t\t// }\n\n\t\tif ( !this[ _listeningTo ] ) {\n\t\t\tthis[ _listeningTo ] = {};\n\t\t}\n\n\t\tconst emitters = this[ _listeningTo ];\n\n\t\tif ( !_getEmitterId( emitter ) ) {\n\t\t\t_setEmitterId( emitter );\n\t\t}\n\n\t\tconst emitterId = _getEmitterId( emitter );\n\n\t\tif ( !( emitterInfo = emitters[ emitterId ] ) ) {\n\t\t\temitterInfo = emitters[ emitterId ] = {\n\t\t\t\temitter,\n\t\t\t\tcallbacks: {}\n\t\t\t};\n\t\t}\n\n\t\tif ( !( eventCallbacks = emitterInfo.callbacks[ event ] ) ) {\n\t\t\teventCallbacks = emitterInfo.callbacks[ event ] = [];\n\t\t}\n\n\t\teventCallbacks.push( callback );\n\n\t\t// Finally register the callback to the event.\n\t\temitter.on( event, callback, options );\n\t},\n\n\t/**\n\t * Stops listening for events. It can be used at different levels:\n\t *\n\t * * To stop listening to a specific callback.\n\t * * To stop listening to a specific event.\n\t * * To stop listening to all events fired by a specific object.\n\t * * To stop listening to all events fired by all object.\n\t *\n\t * @method #stopListening\n\t * @param {module:utils/emittermixin~Emitter} [emitter] The object to stop listening to. If omitted, stops it for all objects.\n\t * @param {String} [event] (Requires the `emitter`) The name of the event to stop listening to. If omitted, stops it\n\t * for all events from `emitter`.\n\t * @param {Function} [callback] (Requires the `event`) The function to be removed from the call list for the given\n\t * `event`.\n\t */\n\tstopListening( emitter, event, callback ) {\n\t\tconst emitters = this[ _listeningTo ];\n\t\tlet emitterId = emitter && _getEmitterId( emitter );\n\t\tconst emitterInfo = emitters && emitterId && emitters[ emitterId ];\n\t\tconst eventCallbacks = emitterInfo && event && emitterInfo.callbacks[ event ];\n\n\t\t// Stop if nothing has been listened.\n\t\tif ( !emitters || ( emitter && !emitterInfo ) || ( event && !eventCallbacks ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t// All params provided. off() that single callback.\n\t\tif ( callback ) {\n\t\t\temitter.off( event, callback );\n\t\t}\n\t\t// Only `emitter` and `event` provided. off() all callbacks for that event.\n\t\telse if ( eventCallbacks ) {\n\t\t\twhile ( ( callback = eventCallbacks.pop() ) ) {\n\t\t\t\temitter.off( event, callback );\n\t\t\t}\n\t\t\tdelete emitterInfo.callbacks[ event ];\n\t\t}\n\t\t// Only `emitter` provided. off() all events for that emitter.\n\t\telse if ( emitterInfo ) {\n\t\t\tfor ( event in emitterInfo.callbacks ) {\n\t\t\t\tthis.stopListening( emitter, event );\n\t\t\t}\n\t\t\tdelete emitters[ emitterId ];\n\t\t}\n\t\t// No params provided. off() all emitters.\n\t\telse {\n\t\t\tfor ( emitterId in emitters ) {\n\t\t\t\tthis.stopListening( emitters[ emitterId ].emitter );\n\t\t\t}\n\t\t\tdelete this[ _listeningTo ];\n\t\t}\n\t},\n\n\t/**\n\t * Fires an event, executing all callbacks registered for it.\n\t *\n\t * The first parameter passed to callbacks is an {@link module:utils/eventinfo~EventInfo} object,\n\t * followed by the optional `args` provided in the `fire()` method call.\n\t *\n\t * @method #fire\n\t * @param {String|module:utils/eventinfo~EventInfo} eventOrInfo The name of the event or `EventInfo` object if event is delegated.\n\t * @param {...*} [args] Additional arguments to be passed to the callbacks.\n\t * @returns {*} By default the method returns `undefined`. However, the return value can be changed by listeners\n\t * through modification of the {@link module:utils/eventinfo~EventInfo#return}'s value (the event info\n\t * is the first param of every callback).\n\t */\n\tfire( eventOrInfo, ...args ) {\n\t\tconst eventInfo = eventOrInfo instanceof EventInfo ? eventOrInfo : new EventInfo( this, eventOrInfo );\n\t\tconst event = eventInfo.name;\n\t\tlet callbacks = getCallbacksForEvent( this, event );\n\n\t\t// Record that the event passed this emitter on its path.\n\t\teventInfo.path.push( this );\n\n\t\t// Handle event listener callbacks first.\n\t\tif ( callbacks ) {\n\t\t\t// Arguments passed to each callback.\n\t\t\tconst callbackArgs = [ eventInfo, ...args ];\n\n\t\t\t// Copying callbacks array is the easiest and most secure way of preventing infinite loops, when event callbacks\n\t\t\t// are added while processing other callbacks. Previous solution involved adding counters (unique ids) but\n\t\t\t// failed if callbacks were added to the queue before currently processed callback.\n\t\t\t// If this proves to be too inefficient, another method is to change `.on()` so callbacks are stored if same\n\t\t\t// event is currently processed. Then, `.fire()` at the end, would have to add all stored events.\n\t\t\tcallbacks = Array.from( callbacks );\n\n\t\t\tfor ( let i = 0; i < callbacks.length; i++ ) {\n\t\t\t\tcallbacks[ i ].callback.apply( callbacks[ i ].context, callbackArgs );\n\n\t\t\t\t// Remove the callback from future requests if off() has been called.\n\t\t\t\tif ( eventInfo.off.called ) {\n\t\t\t\t\t// Remove the called mark for the next calls.\n\t\t\t\t\tdelete eventInfo.off.called;\n\n\t\t\t\t\tthis.off( event, callbacks[ i ].callback, callbacks[ i ].context );\n\t\t\t\t}\n\n\t\t\t\t// Do not execute next callbacks if stop() was called.\n\t\t\t\tif ( eventInfo.stop.called ) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Delegate event to other emitters if needed.\n\t\tif ( this._delegations ) {\n\t\t\tconst destinations = this._delegations.get( event );\n\t\t\tconst passAllDestinations = this._delegations.get( '*' );\n\n\t\t\tif ( destinations ) {\n\t\t\t\tfireDelegatedEvents( destinations, eventInfo, args );\n\t\t\t}\n\n\t\t\tif ( passAllDestinations ) {\n\t\t\t\tfireDelegatedEvents( passAllDestinations, eventInfo, args );\n\t\t\t}\n\t\t}\n\n\t\treturn eventInfo.return;\n\t},\n\n\t/**\n\t * Delegates selected events to another {@link module:utils/emittermixin~Emitter}. For instance:\n\t *\n\t *\t\temitterA.delegate( 'eventX' ).to( emitterB );\n\t *\t\temitterA.delegate( 'eventX', 'eventY' ).to( emitterC );\n\t *\n\t * then `eventX` is delegated (fired by) `emitterB` and `emitterC` along with `data`:\n\t *\n\t *\t\temitterA.fire( 'eventX', data );\n\t *\n\t * and `eventY` is delegated (fired by) `emitterC` along with `data`:\n\t *\n\t *\t\temitterA.fire( 'eventY', data );\n\t *\n\t * @method #delegate\n\t * @param {...String} events Event names that will be delegated to another emitter.\n\t * @returns {module:utils/emittermixin~EmitterMixinDelegateChain}\n\t */\n\tdelegate( ...events ) {\n\t\treturn {\n\t\t\tto: ( emitter, nameOrFunction ) => {\n\t\t\t\tif ( !this._delegations ) {\n\t\t\t\t\tthis._delegations = new Map();\n\t\t\t\t}\n\n\t\t\t\tfor ( const eventName of events ) {\n\t\t\t\t\tconst destinations = this._delegations.get( eventName );\n\n\t\t\t\t\tif ( !destinations ) {\n\t\t\t\t\t\tthis._delegations.set( eventName, new Map( [ [ emitter, nameOrFunction ] ] ) );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdestinations.set( emitter, nameOrFunction );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t};\n\t},\n\n\t/**\n\t * Stops delegating events. It can be used at different levels:\n\t *\n\t * * To stop delegating all events.\n\t * * To stop delegating a specific event to all emitters.\n\t * * To stop delegating a specific event to a specific emitter.\n\t *\n\t * @method #stopDelegating\n\t * @param {String} [event] The name of the event to stop delegating. If omitted, stops it all delegations.\n\t * @param {module:utils/emittermixin~Emitter} [emitter] (requires `event`) The object to stop delegating a particular event to.\n\t * If omitted, stops delegation of `event` to all emitters.\n\t */\n\tstopDelegating( event, emitter ) {\n\t\tif ( !this._delegations ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( !event ) {\n\t\t\tthis._delegations.clear();\n\t\t} else if ( !emitter ) {\n\t\t\tthis._delegations.delete( event );\n\t\t} else {\n\t\t\tconst destinations = this._delegations.get( event );\n\n\t\t\tif ( destinations ) {\n\t\t\t\tdestinations.delete( emitter );\n\t\t\t}\n\t\t}\n\t}\n};\n\nexport default EmitterMixin;\n\n/**\n * Checks if `listeningEmitter` listens to an emitter with given `listenedToEmitterId` and if so, returns that emitter.\n * If not, returns `null`.\n *\n * @protected\n * @param {module:utils/emittermixin~EmitterMixin} listeningEmitter Emitter that listens.\n * @param {String} listenedToEmitterId Unique emitter id of emitter listened to.\n * @returns {module:utils/emittermixin~EmitterMixin|null}\n */\nexport function _getEmitterListenedTo( listeningEmitter, listenedToEmitterId ) {\n\tif ( listeningEmitter[ _listeningTo ] && listeningEmitter[ _listeningTo ][ listenedToEmitterId ] ) {\n\t\treturn listeningEmitter[ _listeningTo ][ listenedToEmitterId ].emitter;\n\t}\n\n\treturn null;\n}\n\n/**\n * Sets emitter's unique id.\n *\n * **Note:** `_emitterId` can be set only once.\n *\n * @protected\n * @param {module:utils/emittermixin~EmitterMixin} emitter Emitter for which id will be set.\n * @param {String} [id] Unique id to set. If not passed, random unique id will be set.\n */\nexport function _setEmitterId( emitter, id ) {\n\tif ( !emitter[ _emitterId ] ) {\n\t\temitter[ _emitterId ] = id || uid();\n\t}\n}\n\n/**\n * Returns emitter's unique id.\n *\n * @protected\n * @param {module:utils/emittermixin~EmitterMixin} emitter Emitter which id will be returned.\n */\nexport function _getEmitterId( emitter ) {\n\treturn emitter[ _emitterId ];\n}\n\n// Gets the internal `_events` property of the given object.\n// `_events` property store all lists with callbacks for registered event names.\n// If there were no events registered on the object, empty `_events` object is created.\nfunction getEvents( source ) {\n\tif ( !source._events ) {\n\t\tObject.defineProperty( source, '_events', {\n\t\t\tvalue: {}\n\t\t} );\n\t}\n\n\treturn source._events;\n}\n\n// Creates event node for generic-specific events relation architecture.\nfunction makeEventNode() {\n\treturn {\n\t\tcallbacks: [],\n\t\tchildEvents: []\n\t};\n}\n\n// Creates an architecture for generic-specific events relation.\n// If needed, creates all events for given eventName, i.e. if the first registered event\n// is foo:bar:abc, it will create foo:bar:abc, foo:bar and foo event and tie them together.\n// It also copies callbacks from more generic events to more specific events when\n// specific events are created.\nfunction createEventNamespace( source, eventName ) {\n\tconst events = getEvents( source );\n\n\t// First, check if the event we want to add to the structure already exists.\n\tif ( events[ eventName ] ) {\n\t\t// If it exists, we don't have to do anything.\n\t\treturn;\n\t}\n\n\t// In other case, we have to create the structure for the event.\n\t// Note, that we might need to create intermediate events too.\n\t// I.e. if foo:bar:abc is being registered and we only have foo in the structure,\n\t// we need to also register foo:bar.\n\n\t// Currently processed event name.\n\tlet name = eventName;\n\t// Name of the event that is a child event for currently processed event.\n\tlet childEventName = null;\n\n\t// Array containing all newly created specific events.\n\tconst newEventNodes = [];\n\n\t// While loop can't check for ':' index because we have to handle generic events too.\n\t// In each loop, we truncate event name, going from the most specific name to the generic one.\n\t// I.e. foo:bar:abc -> foo:bar -> foo.\n\twhile ( name !== '' ) {\n\t\tif ( events[ name ] ) {\n\t\t\t// If the currently processed event name is already registered, we can be sure\n\t\t\t// that it already has all the structure created, so we can break the loop here\n\t\t\t// as no more events need to be registered.\n\t\t\tbreak;\n\t\t}\n\n\t\t// If this event is not yet registered, create a new object for it.\n\t\tevents[ name ] = makeEventNode();\n\t\t// Add it to the array with newly created events.\n\t\tnewEventNodes.push( events[ name ] );\n\n\t\t// Add previously processed event name as a child of this event.\n\t\tif ( childEventName ) {\n\t\t\tevents[ name ].childEvents.push( childEventName );\n\t\t}\n\n\t\tchildEventName = name;\n\t\t// If `.lastIndexOf()` returns -1, `.substr()` will return '' which will break the loop.\n\t\tname = name.substr( 0, name.lastIndexOf( ':' ) );\n\t}\n\n\tif ( name !== '' ) {\n\t\t// If name is not empty, we found an already registered event that was a parent of the\n\t\t// event we wanted to register.\n\n\t\t// Copy that event's callbacks to newly registered events.\n\t\tfor ( const node of newEventNodes ) {\n\t\t\tnode.callbacks = events[ name ].callbacks.slice();\n\t\t}\n\n\t\t// Add last newly created event to the already registered event.\n\t\tevents[ name ].childEvents.push( childEventName );\n\t}\n}\n\n// Gets an array containing callbacks list for a given event and it's more specific events.\n// I.e. if given event is foo:bar and there is also foo:bar:abc event registered, this will\n// return callback list of foo:bar and foo:bar:abc (but not foo).\n// Returns empty array if given event has not been yet registered.\nfunction getCallbacksListsForNamespace( source, eventName ) {\n\tconst eventNode = getEvents( source )[ eventName ];\n\n\tif ( !eventNode ) {\n\t\treturn [];\n\t}\n\n\tlet callbacksLists = [ eventNode.callbacks ];\n\n\tfor ( let i = 0; i < eventNode.childEvents.length; i++ ) {\n\t\tconst childCallbacksLists = getCallbacksListsForNamespace( source, eventNode.childEvents[ i ] );\n\n\t\tcallbacksLists = callbacksLists.concat( childCallbacksLists );\n\t}\n\n\treturn callbacksLists;\n}\n\n// Get the list of callbacks for a given event, but only if there any callbacks have been registered.\n// If there are no callbacks registered for given event, it checks if this is a specific event and looks\n// for callbacks for it's more generic version.\nfunction getCallbacksForEvent( source, eventName ) {\n\tlet event;\n\n\tif ( !source._events || !( event = source._events[ eventName ] ) || !event.callbacks.length ) {\n\t\t// There are no callbacks registered for specified eventName.\n\t\t// But this could be a specific-type event that is in a namespace.\n\t\tif ( eventName.indexOf( ':' ) > -1 ) {\n\t\t\t// If the eventName is specific, try to find callback lists for more generic event.\n\t\t\treturn getCallbacksForEvent( source, eventName.substr( 0, eventName.lastIndexOf( ':' ) ) );\n\t\t} else {\n\t\t\t// If this is a top-level generic event, return null;\n\t\t\treturn null;\n\t\t}\n\t}\n\n\treturn event.callbacks;\n}\n\n// Fires delegated events for given map of destinations.\n//\n// @private\n// * @param {Map.} destinations A map containing `[ {@link utils.Emitter}, \"event name\" ]` pair destinations.\n// * @param {utils.EventInfo} eventInfo The original event info object.\n// * @param {Array.<*>} fireArgs Arguments the original event was fired with.\nfunction fireDelegatedEvents( destinations, eventInfo, fireArgs ) {\n\tfor ( let [ emitter, name ] of destinations ) {\n\t\tif ( !name ) {\n\t\t\tname = eventInfo.name;\n\t\t} else if ( typeof name == 'function' ) {\n\t\t\tname = name( eventInfo.name );\n\t\t}\n\n\t\tconst delegatedInfo = new EventInfo( eventInfo.source, name );\n\n\t\tdelegatedInfo.path = [ ...eventInfo.path ];\n\n\t\temitter.fire( delegatedInfo, ...fireArgs );\n\t}\n}\n\n/**\n * Interface representing classes which mix in {@link module:utils/emittermixin~EmitterMixin}.\n *\n * @interface Emitter\n */\n\n/**\n * The return value of {@link ~EmitterMixin#delegate}.\n *\n * @interface module:utils/emittermixin~EmitterMixinDelegateChain\n */\n\n/**\n * Selects destination for {@link module:utils/emittermixin~EmitterMixin#delegate} events.\n *\n * @method #to\n * @param {module:utils/emittermixin~Emitter} emitter An `EmitterMixin` instance which is the destination for delegated events.\n * @param {String|Function} nameOrFunction A custom event name or function which converts the original name string.\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/emittermixin.js\n// module id = 8\n// module chunks = 0","import baseMatches from './_baseMatches';\nimport baseMatchesProperty from './_baseMatchesProperty';\nimport identity from './identity';\nimport isArray from './isArray';\nimport property from './property';\n\n/**\n * The base implementation of `_.iteratee`.\n *\n * @private\n * @param {*} [value=_.identity] The value to convert to an iteratee.\n * @returns {Function} Returns the iteratee.\n */\nfunction baseIteratee(value) {\n // Don't store the `typeof` result in a variable to avoid a JIT bug in Safari 9.\n // See https://bugs.webkit.org/show_bug.cgi?id=156034 for more details.\n if (typeof value == 'function') {\n return value;\n }\n if (value == null) {\n return identity;\n }\n if (typeof value == 'object') {\n return isArray(value)\n ? baseMatchesProperty(value[0], value[1])\n : baseMatches(value);\n }\n return property(value);\n}\n\nexport default baseIteratee;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_baseIteratee.js\n// module id = 10\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module core/command\n */\n\nimport ObservableMixin from '@ckeditor/ckeditor5-utils/src/observablemixin';\nimport mix from '@ckeditor/ckeditor5-utils/src/mix';\n\n/**\n * The base class for CKEditor commands.\n *\n * Commands are the main way to manipulate editor contents and state. They are mostly used by UI elements (or by other\n * commands) to make changes in the model. Commands are available in every part of code that has access to\n * the {@link module:core/editor/editor~Editor editor} instance.\n *\n * Instances of registered commands can be retrieved from {@link module:core/editor/editor~Editor#commands}.\n * The easiest way to execute a command is through {@link module:core/editor/editor~Editor#execute}.\n *\n * By default commands are disabled when the editor is in {@link module:core/editor/editor~Editor#isReadOnly read-only} mode.\n *\n * @mixes module:utils/observablemixin~ObservableMixin\n */\nexport default class Command {\n\t/**\n\t * Creates a new `Command` instance.\n\t *\n\t * @param {module:core/editor/editor~Editor} editor Editor on which this command will be used.\n\t */\n\tconstructor( editor ) {\n\t\t/**\n\t\t * The editor on which this command will be used.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:core/editor/editor~Editor}\n\t\t */\n\t\tthis.editor = editor;\n\n\t\t/**\n\t\t * The value of a command. Concrete command class should define what it represents.\n\t\t *\n\t\t * For example, the `bold` command's value is whether the selection starts in a bolded text.\n\t\t * And the value of the `link` command may be an object with links details.\n\t\t *\n\t\t * It's possible for a command to have no value (e.g. for stateless actions such as `uploadImage`).\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member #value\n\t\t */\n\t\tthis.set( 'value', undefined );\n\n\t\t/**\n\t\t * Flag indicating whether a command is enabled or disabled.\n\t\t * A disabled command should do nothing when executed.\n\t\t *\n\t\t * @observable\n\t\t * @readonly\n\t\t * @member {Boolean} #isEnabled\n\t\t */\n\t\tthis.set( 'isEnabled', false );\n\n\t\tthis.decorate( 'execute' );\n\n\t\t// By default every command is refreshed when changes are applied to the model.\n\t\tthis.listenTo( this.editor.document, 'changesDone', () => {\n\t\t\tthis.refresh();\n\t\t} );\n\n\t\tthis.on( 'execute', evt => {\n\t\t\tif ( !this.isEnabled ) {\n\t\t\t\tevt.stop();\n\t\t\t}\n\t\t}, { priority: 'high' } );\n\n\t\t// By default commands are disabled when the editor is in read-only mode.\n\t\tthis.listenTo( editor, 'change:isReadOnly', ( evt, name, value ) => {\n\t\t\tif ( value ) {\n\t\t\t\t// See a ticket about overriding observable properties\n\t\t\t\t// https://github.com/ckeditor/ckeditor5-utils/issues/171.\n\t\t\t\tthis.on( 'change:isEnabled', forceDisable, { priority: 'lowest' } );\n\t\t\t\tthis.isEnabled = false;\n\t\t\t} else {\n\t\t\t\tthis.off( 'change:isEnabled', forceDisable );\n\t\t\t\tthis.refresh();\n\t\t\t}\n\t\t} );\n\n\t\tfunction forceDisable() {\n\t\t\tthis.isEnabled = false;\n\t\t}\n\t}\n\n\t/**\n\t * Refreshes the command. The command should update its {@link #isEnabled} and {@link #value} property\n\t * in this method.\n\t *\n\t * This method is automatically called when\n\t * {@link module:engine/model/document~Document#event:changesDone any changes are applied to the model}.\n\t */\n\trefresh() {\n\t\tthis.isEnabled = true;\n\t}\n\n\t/**\n\t * Executes the command.\n\t *\n\t * A command may accept parameters. They will be passed from {@link module:core/editor/editor~Editor#execute}\n\t * to the command.\n\t *\n\t * The `execute()` method will automatically abort when the command is disabled ({@link #isEnabled} is `false`).\n\t * This behavior is implemented by a high priority listener to the {@link #event:execute} event.\n\t *\n\t * @fires execute\n\t */\n\texecute() {}\n\n\t/**\n\t * Destroys the command.\n\t */\n\tdestroy() {\n\t\tthis.stopListening();\n\t}\n\n\t/**\n\t * Event fired by the {@link #execute} method. The command action is a listener to this event so it's\n\t * possible to change/cancel the behavior of the command by listening to this event.\n\t *\n\t * See {@link module:utils/observablemixin~ObservableMixin.decorate} for more information and samples.\n\t *\n\t * **Note:** This event is fired even if command is disabled. However, it is automatically blocked\n\t * by a high priority listener in order to prevent command execution.\n\t *\n\t * @event execute\n\t */\n}\n\nmix( Command, ObservableMixin );\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-core/src/command.js\n// module id = 11\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module utils/observablemixin\n */\n\nimport EmitterMixin from './emittermixin';\nimport CKEditorError from './ckeditorerror';\nimport extend from './lib/lodash/extend';\nimport isObject from './lib/lodash/isObject';\n\nconst attributesSymbol = Symbol( 'attributes' );\nconst boundObservablesSymbol = Symbol( 'boundObservables' );\nconst boundAttributesSymbol = Symbol( 'boundAttributes' );\n\n/**\n * Mixin that injects the \"observable attributes\" and data binding functionality.\n * Used mainly in the {@link module:ui/model~Model} class.\n *\n * @mixin ObservableMixin\n * @mixes module:utils/emittermixin~EmitterMixin\n * @implements module:utils/observablemixin~Observable\n */\nconst ObservableMixin = {\n\t/**\n\t * Creates and sets the value of an observable attribute of this object. Such an attribute becomes a part\n\t * of the state and is be observable.\n\t *\n\t * It accepts also a single object literal containing key/value pairs with attributes to be set.\n\t *\n\t * This method throws the observable-set-cannot-override error if the observable instance already\n\t * have a property with a given attribute name. This prevents from mistakenly overriding existing\n\t * properties and methods, but means that `foo.set( 'bar', 1 )` may be slightly slower than `foo.bar = 1`.\n\t *\n\t * @method #set\n\t * @param {String} name The attributes name.\n\t * @param {*} value The attributes value.\n\t */\n\tset( name, value ) {\n\t\t// If the first parameter is an Object, iterate over its properties.\n\t\tif ( isObject( name ) ) {\n\t\t\tObject.keys( name ).forEach( attr => {\n\t\t\t\tthis.set( attr, name[ attr ] );\n\t\t\t}, this );\n\n\t\t\treturn;\n\t\t}\n\n\t\tinitObservable( this );\n\n\t\tconst attributes = this[ attributesSymbol ];\n\n\t\tif ( ( name in this ) && !attributes.has( name ) ) {\n\t\t\t/**\n\t\t\t * Cannot override an existing property.\n\t\t\t *\n\t\t\t * This error is thrown when trying to {@link ~Observable#set set} an attribute with\n\t\t\t * a name of an already existing property. For example:\n\t\t\t *\n\t\t\t *\t\tlet observable = new Model();\n\t\t\t *\t\tobservable.property = 1;\n\t\t\t *\t\tobservable.set( 'property', 2 );\t\t// throws\n\t\t\t *\n\t\t\t *\t\tobservable.set( 'attr', 1 );\n\t\t\t *\t\tobservable.set( 'attr', 2 );\t\t\t// ok, because this is an existing attribute.\n\t\t\t *\n\t\t\t * @error observable-set-cannot-override\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-set-cannot-override: Cannot override an existing property.' );\n\t\t}\n\n\t\tObject.defineProperty( this, name, {\n\t\t\tenumerable: true,\n\t\t\tconfigurable: true,\n\n\t\t\tget() {\n\t\t\t\treturn attributes.get( name );\n\t\t\t},\n\n\t\t\tset( value ) {\n\t\t\t\tconst oldValue = attributes.get( name );\n\n\t\t\t\t// Allow undefined as an initial value like A.define( 'x', undefined ) (#132).\n\t\t\t\t// Note: When attributes map has no such own property, then its value is undefined.\n\t\t\t\tif ( oldValue !== value || !attributes.has( name ) ) {\n\t\t\t\t\tattributes.set( name, value );\n\t\t\t\t\tthis.fire( 'change:' + name, name, value, oldValue );\n\t\t\t\t}\n\t\t\t}\n\t\t} );\n\n\t\tthis[ name ] = value;\n\t},\n\n\t/**\n\t * Binds observable attributes to another objects implementing {@link ~ObservableMixin}\n\t * interface (like {@link module:ui/model~Model}).\n\t *\n\t * Once bound, the observable will immediately share the current state of attributes\n\t * of the observable it is bound to and react to the changes to these attributes\n\t * in the future.\n\t *\n\t * **Note**: To release the binding use {@link module:utils/observablemixin~ObservableMixin#unbind}.\n\t *\n\t *\t\tA.bind( 'a' ).to( B );\n\t *\t\tA.bind( 'a' ).to( B, 'b' );\n\t *\t\tA.bind( 'a', 'b' ).to( B, 'c', 'd' );\n\t *\t\tA.bind( 'a' ).to( B, 'b', C, 'd', ( b, d ) => b + d );\n\t *\n\t * @method #bind\n\t * @param {...String} bindAttrs Observable attributes that will be bound to another observable(s).\n\t * @returns {module:utils/observablemixin~BindChain}\n\t */\n\tbind( ...bindAttrs ) {\n\t\tif ( !bindAttrs.length || !isStringArray( bindAttrs ) ) {\n\t\t\t/**\n\t\t\t * All attributes must be strings.\n\t\t\t *\n\t\t\t * @error observable-bind-wrong-attrs\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-wrong-attrs: All attributes must be strings.' );\n\t\t}\n\n\t\tif ( ( new Set( bindAttrs ) ).size !== bindAttrs.length ) {\n\t\t\t/**\n\t\t\t * Attributes must be unique.\n\t\t\t *\n\t\t\t * @error observable-bind-duplicate-attrs\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-duplicate-attrs: Attributes must be unique.' );\n\t\t}\n\n\t\tinitObservable( this );\n\n\t\tconst boundAttributes = this[ boundAttributesSymbol ];\n\n\t\tbindAttrs.forEach( attrName => {\n\t\t\tif ( boundAttributes.has( attrName ) ) {\n\t\t\t\t/**\n\t\t\t\t * Cannot bind the same attribute more that once.\n\t\t\t\t *\n\t\t\t\t * @error observable-bind-rebind\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-bind-rebind: Cannot bind the same attribute more that once.' );\n\t\t\t}\n\t\t} );\n\n\t\tconst bindings = new Map();\n\n\t\t/**\n\t\t * @typedef Binding\n\t\t * @type Object\n\t\t * @property {Array} attr Attribute which is bound.\n\t\t * @property {Array} to Array of observableā€“attribute components of the binding (`{ observable: ..., attr: .. }`).\n\t\t * @property {Array} callback A function which processes `to` components.\n\t\t */\n\t\tbindAttrs.forEach( a => {\n\t\t\tconst binding = { attr: a, to: [] };\n\n\t\t\tboundAttributes.set( a, binding );\n\t\t\tbindings.set( a, binding );\n\t\t} );\n\n\t\t/**\n\t\t * @typedef BindChain\n\t\t * @type Object\n\t\t * @property {Function} to See {@link ~ObservableMixin#_bindTo}.\n\t\t * @property {module:utils/observablemixin~Observable} _observable The observable which initializes the binding.\n\t\t * @property {Array} _bindAttrs Array of `_observable` attributes to be bound.\n\t\t * @property {Array} _to Array of `to()` observableā€“attributes (`{ observable: toObservable, attrs: ...toAttrs }`).\n\t\t * @property {Map} _bindings Stores bindings to be kept in\n\t\t * {@link ~ObservableMixin#_boundAttributes}/{@link ~ObservableMixin#_boundObservables}\n\t\t * initiated in this binding chain.\n\t\t */\n\t\treturn {\n\t\t\tto: bindTo,\n\n\t\t\t_observable: this,\n\t\t\t_bindAttrs: bindAttrs,\n\t\t\t_to: [],\n\t\t\t_bindings: bindings\n\t\t};\n\t},\n\n\t/**\n\t * Removes the binding created with {@link ~ObservableMixin#bind}.\n\t *\n\t *\t\tA.unbind( 'a' );\n\t *\t\tA.unbind();\n\t *\n\t * @method #unbind\n\t * @param {...String} [unbindAttrs] Observable attributes to be unbound. All the bindings will\n\t * be released if no attributes provided.\n\t */\n\tunbind( ...unbindAttrs ) {\n\t\t// Nothing to do here if not inited yet.\n\t\tif ( !( attributesSymbol in this ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tconst boundAttributes = this[ boundAttributesSymbol ];\n\t\tconst boundObservables = this[ boundObservablesSymbol ];\n\n\t\tif ( unbindAttrs.length ) {\n\t\t\tif ( !isStringArray( unbindAttrs ) ) {\n\t\t\t\t/**\n\t\t\t\t * Attributes must be strings.\n\t\t\t\t *\n\t\t\t\t * @error observable-unbind-wrong-attrs\n\t\t\t\t */\n\t\t\t\tthrow new CKEditorError( 'observable-unbind-wrong-attrs: Attributes must be strings.' );\n\t\t\t}\n\n\t\t\tunbindAttrs.forEach( attrName => {\n\t\t\t\tconst binding = boundAttributes.get( attrName );\n\t\t\t\tlet toObservable, toAttr, toAttrs, toAttrBindings;\n\n\t\t\t\tbinding.to.forEach( to => {\n\t\t\t\t\t// TODO: ES6 destructuring.\n\t\t\t\t\ttoObservable = to[ 0 ];\n\t\t\t\t\ttoAttr = to[ 1 ];\n\t\t\t\t\ttoAttrs = boundObservables.get( toObservable );\n\t\t\t\t\ttoAttrBindings = toAttrs[ toAttr ];\n\n\t\t\t\t\ttoAttrBindings.delete( binding );\n\n\t\t\t\t\tif ( !toAttrBindings.size ) {\n\t\t\t\t\t\tdelete toAttrs[ toAttr ];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( !Object.keys( toAttrs ).length ) {\n\t\t\t\t\t\tboundObservables.delete( toObservable );\n\t\t\t\t\t\tthis.stopListening( toObservable, 'change' );\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t\t\tboundAttributes.delete( attrName );\n\t\t\t} );\n\t\t} else {\n\t\t\tboundObservables.forEach( ( bindings, boundObservable ) => {\n\t\t\t\tthis.stopListening( boundObservable, 'change' );\n\t\t\t} );\n\n\t\t\tboundObservables.clear();\n\t\t\tboundAttributes.clear();\n\t\t}\n\t},\n\n\t/**\n\t * Turns the given methods of this object into event-based ones. This means that the new method will fire an event\n\t * (named after the method) and the original action will be plugged as a listener to that event.\n\t *\n\t * This is a very simplified method decoration. Itself it doesn't change the behavior of a method (expect adding the event),\n\t * but it allows to modify it later on by listening to the method's event.\n\t *\n\t * For example, in order to cancel the method execution one can stop the event:\n\t *\n\t *\t\tclass Foo {\n\t *\t\t\tconstructor() {\n\t *\t\t\t\tthis.decorate( 'method' );\n\t *\t\t\t}\n\t *\n\t *\t\t\tmethod() {\n\t *\t\t\t\tconsole.log( 'called!' );\n\t *\t\t\t}\n\t *\t\t}\n\t *\n\t *\t\tconst foo = new Foo();\n\t *\t\tfoo.on( 'method', ( evt ) => {\n\t *\t\t\tevt.stop();\n\t *\t\t}, { priority: 'high' } );\n\t *\n\t *\t\tfoo.method(); // Nothing is logged.\n\t *\n\t *\n\t * Note: we used a high priority listener here to execute this callback before the one which\n\t * calls the orignal method (which used the default priority).\n\t *\n\t * It's also possible to change the return value:\n\t *\n\t *\t\tfoo.on( 'method', ( evt ) => {\n\t *\t\t\tevt.return = 'Foo!';\n\t *\t\t} );\n\t *\n\t *\t\tfoo.method(); // -> 'Foo'\n\t *\n\t * Finally, it's possible to access and modify the parameters:\n\t *\n\t *\t\tmethod( a, b ) {\n\t *\t\t\tconsole.log( `${ a }, ${ b }` );\n\t *\t\t}\n\t *\n\t *\t\t// ...\n\t *\n\t *\t\tfoo.on( 'method', ( evt, args ) => {\n\t *\t\t\targs[ 0 ] = 3;\n\t *\n\t *\t\t\tconsole.log( args[ 1 ] ); // -> 2\n\t *\t\t}, { priority: 'high' } );\n\t *\n\t *\t\tfoo.method( 1, 2 ); // -> '3, 2'\n\t *\n\t * @method #decorate\n\t * @param {String} methodName Name of the method to decorate.\n\t */\n\tdecorate( methodName ) {\n\t\tconst originalMethod = this[ methodName ];\n\n\t\tif ( !originalMethod ) {\n\t\t\t/**\n\t\t\t * Cannot decorate an undefined method.\n\t\t\t *\n\t\t\t * @error observablemixin-cannot-decorate-undefined\n\t\t\t * @param {Object} object The object which method should be decorated.\n\t\t\t * @param {String} methodName Name of the method which does not exist.\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'observablemixin-cannot-decorate-undefined: Cannot decorate an undefined method.',\n\t\t\t\t{ object: this, methodName }\n\t\t\t);\n\t\t}\n\n\t\tthis.on( methodName, ( evt, args ) => {\n\t\t\tevt.return = originalMethod.apply( this, args );\n\t\t} );\n\n\t\tthis[ methodName ] = function( ...args ) {\n\t\t\treturn this.fire( methodName, args );\n\t\t};\n\t}\n\n\t/**\n\t * @private\n\t * @member ~ObservableMixin#_boundAttributes\n\t */\n\n\t/**\n\t * @private\n\t * @member ~ObservableMixin#_boundObservables\n\t */\n\n\t/**\n\t * @private\n\t * @member ~ObservableMixin#_bindTo\n\t */\n};\n\nexport default ObservableMixin;\n\n// Init symbol properties needed to for the observable mechanism to work.\n//\n// @private\n// @param {module:utils/observablemixin~ObservableMixin} observable\nfunction initObservable( observable ) {\n\t// Do nothing if already inited.\n\tif ( attributesSymbol in observable ) {\n\t\treturn;\n\t}\n\n\t// The internal hash containing the observable's state.\n\t//\n\t// @private\n\t// @type {Map}\n\tObject.defineProperty( observable, attributesSymbol, {\n\t\tvalue: new Map()\n\t} );\n\n\t// Map containing bindings to external observables. It shares the binding objects\n\t// (`{ observable: A, attr: 'a', to: ... }`) with {@link module:utils/observablemixin~ObservableMixin#_boundAttributes} and\n\t// it is used to observe external observables to update own attributes accordingly.\n\t// See {@link module:utils/observablemixin~ObservableMixin#bind}.\n\t//\n\t//\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n\t//\t\tconsole.log( A._boundObservables );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\tB: {\n\t//\t\t\t\t\tx: Set( [\n\t//\t\t\t\t\t\t{ observable: A, attr: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\t\t\t{ observable: A, attr: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\ty: Set( [\n\t//\t\t\t\t\t\t{ observable: A, attr: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t}\n\t//\t\t\t} )\n\t//\n\t//\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n\t//\t\tconsole.log( A._boundObservables );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\tB: {\n\t//\t\t\t\t\tx: Set( [\n\t//\t\t\t\t\t\t{ observable: A, attr: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\t\t\t{ observable: A, attr: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\ty: Set( [\n\t//\t\t\t\t\t\t{ observable: A, attr: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\t\t] ),\n\t//\t\t\t\t\tz: Set( [\n\t//\t\t\t\t\t\t{ observable: A, attr: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t},\n\t//\t\t\t\tC: {\n\t//\t\t\t\t\tw: Set( [\n\t//\t\t\t\t\t\t{ observable: A, attr: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t\t\t] )\n\t//\t\t\t\t}\n\t//\t\t\t} )\n\t//\n\t// @private\n\t// @type {Map}\n\tObject.defineProperty( observable, boundObservablesSymbol, {\n\t\tvalue: new Map()\n\t} );\n\n\t// Object that stores which attributes of this observable are bound and how. It shares\n\t// the binding objects (`{ observable: A, attr: 'a', to: ... }`) with {@link utils.ObservableMixin#_boundObservables}.\n\t// This data structure is a reverse of {@link utils.ObservableMixin#_boundObservables} and it is helpful for\n\t// {@link utils.ObservableMixin#unbind}.\n\t//\n\t// See {@link utils.ObservableMixin#bind}.\n\t//\n\t//\t\tA.bind( 'a', 'b', 'c' ).to( B, 'x', 'y', 'x' );\n\t//\t\tconsole.log( A._boundAttributes );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\ta: { observable: A, attr: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\tb: { observable: A, attr: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\tc: { observable: A, attr: 'c', to: [ [ B, 'x' ] ] }\n\t//\t\t\t} )\n\t//\n\t//\t\tA.bind( 'd' ).to( B, 'z' ).to( C, 'w' ).as( callback );\n\t//\t\tconsole.log( A._boundAttributes );\n\t//\n\t//\t\t\tMap( {\n\t//\t\t\t\ta: { observable: A, attr: 'a', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\tb: { observable: A, attr: 'b', to: [ [ B, 'y' ] ] },\n\t//\t\t\t\tc: { observable: A, attr: 'c', to: [ [ B, 'x' ] ] },\n\t//\t\t\t\td: { observable: A, attr: 'd', to: [ [ B, 'z' ], [ C, 'w' ] ], callback: callback }\n\t//\t\t\t} )\n\t//\n\t// @private\n\t// @type {Map}\n\tObject.defineProperty( observable, boundAttributesSymbol, {\n\t\tvalue: new Map()\n\t} );\n}\n\n// A chaining for {@link module:utils/observablemixin~ObservableMixin#bind} providing `.to()` interface.\n//\n// @private\n// @param {...[Observable|String|Function]} args Arguments of the `.to( args )` binding.\nfunction bindTo( ...args ) {\n\tconst parsedArgs = parseBindToArgs( ...args );\n\tconst bindingsKeys = Array.from( this._bindings.keys() );\n\tconst numberOfBindings = bindingsKeys.length;\n\n\t// Eliminate A.bind( 'x' ).to( B, C )\n\tif ( !parsedArgs.callback && parsedArgs.to.length > 1 ) {\n\t\t/**\n\t\t * Binding multiple observables only possible with callback.\n\t\t *\n\t\t * @error observable-bind-no-callback\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-no-callback: Binding multiple observables only possible with callback.' );\n\t}\n\n\t// Eliminate A.bind( 'x', 'y' ).to( B, callback )\n\tif ( numberOfBindings > 1 && parsedArgs.callback ) {\n\t\t/**\n\t\t * Cannot bind multiple attributes and use a callback in one binding.\n\t\t *\n\t\t * @error observable-bind-to-extra-callback\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-extra-callback: Cannot bind multiple attributes and use a callback in one binding.' );\n\t}\n\n\tparsedArgs.to.forEach( to => {\n\t\t// Eliminate A.bind( 'x', 'y' ).to( B, 'a' )\n\t\tif ( to.attrs.length && to.attrs.length !== numberOfBindings ) {\n\t\t\t/**\n\t\t\t * The number of attributes must match.\n\t\t\t *\n\t\t\t * @error observable-bind-to-attrs-length\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'observable-bind-to-attrs-length: The number of attributes must match.' );\n\t\t}\n\n\t\t// When no to.attrs specified, observing source attributes instead i.e.\n\t\t// A.bind( 'x', 'y' ).to( B ) -> Observe B.x and B.y\n\t\tif ( !to.attrs.length ) {\n\t\t\tto.attrs = this._bindAttrs;\n\t\t}\n\t} );\n\n\tthis._to = parsedArgs.to;\n\n\t// Fill {@link BindChain#_bindings} with callback. When the callback is set there's only one binding.\n\tif ( parsedArgs.callback ) {\n\t\tthis._bindings.get( bindingsKeys[ 0 ] ).callback = parsedArgs.callback;\n\t}\n\n\tattachBindToListeners( this._observable, this._to );\n\n\t// Update observable._boundAttributes and observable._boundObservables.\n\tupdateBindToBound( this );\n\n\t// Set initial values of bound attributes.\n\tthis._bindAttrs.forEach( attrName => {\n\t\tupdateBoundObservableAttr( this._observable, attrName );\n\t} );\n}\n\n// Check if all entries of the array are of `String` type.\n//\n// @private\n// @param {Array} arr An array to be checked.\n// @returns {Boolean}\nfunction isStringArray( arr ) {\n\treturn arr.every( a => typeof a == 'string' );\n}\n\n// Parses and validates {@link Observable#bind}`.to( args )` arguments and returns\n// an object with a parsed structure. For example\n//\n//\t\tA.bind( 'x' ).to( B, 'a', C, 'b', call );\n//\n// becomes\n//\n//\t\t{\n//\t\t\tto: [\n//\t\t\t\t{ observable: B, attrs: [ 'a' ] },\n//\t\t\t\t{ observable: C, attrs: [ 'b' ] },\n//\t\t\t],\n//\t\t\tcallback: call\n// \t\t}\n//\n// @private\n// @param {...*} args Arguments of {@link Observable#bind}`.to( args )`.\n// @returns {Object}\nfunction parseBindToArgs( ...args ) {\n\t// Eliminate A.bind( 'x' ).to()\n\tif ( !args.length ) {\n\t\t/**\n\t\t * Invalid argument syntax in `to()`.\n\t\t *\n\t\t * @error observable-bind-to-parse-error\n\t\t */\n\t\tthrow new CKEditorError( 'observable-bind-to-parse-error: Invalid argument syntax in `to()`.' );\n\t}\n\n\tconst parsed = { to: [] };\n\tlet lastObservable;\n\n\tif ( typeof args[ args.length - 1 ] == 'function' ) {\n\t\tparsed.callback = args.pop();\n\t}\n\n\targs.forEach( a => {\n\t\tif ( typeof a == 'string' ) {\n\t\t\tlastObservable.attrs.push( a );\n\t\t} else if ( typeof a == 'object' ) {\n\t\t\tlastObservable = { observable: a, attrs: [] };\n\t\t\tparsed.to.push( lastObservable );\n\t\t} else {\n\t\t\tthrow new CKEditorError( 'observable-bind-to-parse-error: Invalid argument syntax in `to()`.' );\n\t\t}\n\t} );\n\n\treturn parsed;\n}\n\n// Synchronizes {@link module:utils/observablemixin#_boundObservables} with {@link Binding}.\n//\n// @private\n// @param {Binding} binding A binding to store in {@link Observable#_boundObservables}.\n// @param {Observable} toObservable A observable, which is a new component of `binding`.\n// @param {String} toAttrName A name of `toObservable`'s attribute, a new component of the `binding`.\nfunction updateBoundObservables( observable, binding, toObservable, toAttrName ) {\n\tconst boundObservables = observable[ boundObservablesSymbol ];\n\tconst bindingsToObservable = boundObservables.get( toObservable );\n\tconst bindings = bindingsToObservable || {};\n\n\tif ( !bindings[ toAttrName ] ) {\n\t\tbindings[ toAttrName ] = new Set();\n\t}\n\n\t// Pass the binding to a corresponding Set in `observable._boundObservables`.\n\tbindings[ toAttrName ].add( binding );\n\n\tif ( !bindingsToObservable ) {\n\t\tboundObservables.set( toObservable, bindings );\n\t}\n}\n\n// Synchronizes {@link Observable#_boundAttributes} and {@link Observable#_boundObservables}\n// with {@link BindChain}.\n//\n// Assuming the following binding being created\n//\n// \t\tA.bind( 'a', 'b' ).to( B, 'x', 'y' );\n//\n// the following bindings were initialized by {@link Observable#bind} in {@link BindChain#_bindings}:\n//\n// \t\t{\n// \t\t\ta: { observable: A, attr: 'a', to: [] },\n// \t\t\tb: { observable: A, attr: 'b', to: [] },\n// \t\t}\n//\n// Iterate over all bindings in this chain and fill their `to` properties with\n// corresponding to( ... ) arguments (components of the binding), so\n//\n// \t\t{\n// \t\t\ta: { observable: A, attr: 'a', to: [ B, 'x' ] },\n// \t\t\tb: { observable: A, attr: 'b', to: [ B, 'y' ] },\n// \t\t}\n//\n// Then update the structure of {@link Observable#_boundObservables} with updated\n// binding, so it becomes:\n//\n// \t\tMap( {\n// \t\t\tB: {\n// \t\t\t\tx: Set( [\n// \t\t\t\t\t{ observable: A, attr: 'a', to: [ [ B, 'x' ] ] }\n// \t\t\t\t] ),\n// \t\t\t\ty: Set( [\n// \t\t\t\t\t{ observable: A, attr: 'b', to: [ [ B, 'y' ] ] },\n// \t\t\t\t] )\n//\t\t\t}\n// \t\t} )\n//\n// @private\n// @param {BindChain} chain The binding initialized by {@link Observable#bind}.\nfunction updateBindToBound( chain ) {\n\tlet toAttr;\n\n\tchain._bindings.forEach( ( binding, attrName ) => {\n\t\t// Note: For a binding without a callback, this will run only once\n\t\t// like in A.bind( 'x', 'y' ).to( B, 'a', 'b' )\n\t\t// TODO: ES6 destructuring.\n\t\tchain._to.forEach( to => {\n\t\t\ttoAttr = to.attrs[ binding.callback ? 0 : chain._bindAttrs.indexOf( attrName ) ];\n\n\t\t\tbinding.to.push( [ to.observable, toAttr ] );\n\t\t\tupdateBoundObservables( chain._observable, binding, to.observable, toAttr );\n\t\t} );\n\t} );\n}\n\n// Updates an attribute of a {@link Observable} with a value\n// determined by an entry in {@link Observable#_boundAttributes}.\n//\n// @private\n// @param {Observable} observable A observable which attribute is to be updated.\n// @param {String} attrName An attribute to be updated.\nfunction updateBoundObservableAttr( observable, attrName ) {\n\tconst boundAttributes = observable[ boundAttributesSymbol ];\n\tconst binding = boundAttributes.get( attrName );\n\tlet attrValue;\n\n\t// When a binding with callback is created like\n\t//\n\t// \t\tA.bind( 'a' ).to( B, 'b', C, 'c', callback );\n\t//\n\t// collect B.b and C.c, then pass them to callback to set A.a.\n\tif ( binding.callback ) {\n\t\tattrValue = binding.callback.apply( observable, binding.to.map( to => to[ 0 ][ to[ 1 ] ] ) );\n\t} else {\n\t\tattrValue = binding.to[ 0 ];\n\t\tattrValue = attrValue[ 0 ][ attrValue[ 1 ] ];\n\t}\n\n\tif ( observable.hasOwnProperty( attrName ) ) {\n\t\tobservable[ attrName ] = attrValue;\n\t} else {\n\t\tobservable.set( attrName, attrValue );\n\t}\n}\n\n// Starts listening to changes in {@link BindChain._to} observables to update\n// {@link BindChain._observable} {@link BindChain._bindAttrs}. Also sets the\n// initial state of {@link BindChain._observable}.\n//\n// @private\n// @param {BindChain} chain The chain initialized by {@link Observable#bind}.\nfunction attachBindToListeners( observable, toBindings ) {\n\ttoBindings.forEach( to => {\n\t\tconst boundObservables = observable[ boundObservablesSymbol ];\n\t\tlet bindings;\n\n\t\t// If there's already a chain between the observables (`observable` listens to\n\t\t// `to.observable`), there's no need to create another `change` event listener.\n\t\tif ( !boundObservables.get( to.observable ) ) {\n\t\t\tobservable.listenTo( to.observable, 'change', ( evt, attrName ) => {\n\t\t\t\tbindings = boundObservables.get( to.observable )[ attrName ];\n\n\t\t\t\t// Note: to.observable will fire for any attribute change, react\n\t\t\t\t// to changes of attributes which are bound only.\n\t\t\t\tif ( bindings ) {\n\t\t\t\t\tbindings.forEach( binding => {\n\t\t\t\t\t\tupdateBoundObservableAttr( observable, binding.attr );\n\t\t\t\t\t} );\n\t\t\t\t}\n\t\t\t} );\n\t\t}\n\t} );\n}\n\nextend( ObservableMixin, EmitterMixin );\n\n/**\n * Fired when an attribute changed value.\n *\n *\t\tobservable.set( 'prop', 1 );\n *\n *\t\tobservable.on( 'change:prop', ( evt, propertyName, newValue, oldValue ) => {\n *\t\t\tconsole.log( `${ propertyName } has changed from ${ oldValue } to ${ newValue }` );\n *\t\t} )\n *\n *\t\tobservable.prop = 2; // -> 'prop has changed from 1 to 2'\n *\n * @event module:utils/observablemixin~ObservableMixin#change:{attribute}\n * @param {String} name The attribute name.\n * @param {*} value The new attribute value.\n * @param {*} oldValue The previous attribute value.\n */\n\n/**\n * Interface representing classes which mix in {@link module:utils/observablemixin~ObservableMixin}.\n *\n * @interface Observable\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/observablemixin.js\n// module id = 12\n// module chunks = 0","import toFinite from './toFinite';\n\n/**\n * Converts `value` to an integer.\n *\n * **Note:** This function is loosely based on\n * [`ToInteger`](http://www.ecma-international.org/ecma-262/6.0/#sec-tointeger).\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to convert.\n * @returns {number} Returns the converted integer.\n * @example\n *\n * _.toInteger(3.2);\n * // => 3\n *\n * _.toInteger(Number.MIN_VALUE);\n * // => 0\n *\n * _.toInteger(Infinity);\n * // => 1.7976931348623157e+308\n *\n * _.toInteger('3.2');\n * // => 3\n */\nfunction toInteger(value) {\n var result = toFinite(value),\n remainder = result % 1;\n\n return result === result ? (remainder ? result - remainder : result) : 0;\n}\n\nexport default toInteger;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/toInteger.js\n// module id = 13\n// module chunks = 0","import isArrayLike from './isArrayLike';\nimport isObjectLike from './isObjectLike';\n\n/**\n * This method is like `_.isArrayLike` except that it also checks if `value`\n * is an object.\n *\n * @static\n * @memberOf _\n * @since 4.0.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an array-like object,\n * else `false`.\n * @example\n *\n * _.isArrayLikeObject([1, 2, 3]);\n * // => true\n *\n * _.isArrayLikeObject(document.body.children);\n * // => true\n *\n * _.isArrayLikeObject('abc');\n * // => false\n *\n * _.isArrayLikeObject(_.noop);\n * // => false\n */\nfunction isArrayLikeObject(value) {\n return isObjectLike(value) && isArrayLike(value);\n}\n\nexport default isArrayLikeObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isArrayLikeObject.js\n// module id = 14\n// module chunks = 0","/**\n * Checks if `value` is classified as an `Array` object.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @type {Function}\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is correctly classified,\n * else `false`.\n * @example\n *\n * _.isArray([1, 2, 3]);\n * // => true\n *\n * _.isArray(document.body.children);\n * // => false\n *\n * _.isArray('abc');\n * // => false\n *\n * _.isArray(_.noop);\n * // => false\n */\nvar isArray = Array.isArray;\n\nexport default isArray;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isArray.js\n// module id = 15\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/* global console */\n\n/**\n * @module utils/log\n */\n\nimport { attachLinkToDocumentation } from './ckeditorerror';\n\n/**\n * The logging module.\n *\n * This object features two functions that should be used across CKEditor code base to log errors and warnings.\n * Despite being an overridable interface for native `console.*` this module serves also the goal to limit the\n * code size of a minified CKEditor package. During minification process the messages will be shortened and\n * links to their documentation will be logged to the console.\n *\n * All errors and warning should be documented in the following way:\n *\n *\t\t/**\n *\t\t * Error thrown when a plugin cannot be loaded due to JavaScript errors, lack of plugins with a given name, etc.\n *\t\t *\n *\t\t * @error plugin-load\n *\t\t * @param pluginName The name of the plugin that could not be loaded.\n *\t\t * @param moduleName The name of the module which tried to load this plugin.\n *\t\t * /\n *\t\tlog.error( 'plugin-load: It was not possible to load the \"{$pluginName}\" plugin in module \"{$moduleName}', {\n *\t\t\tpluginName: 'foo',\n *\t\t\tmoduleName: 'bar'\n *\t\t} );\n *\n * ### Warning vs Error vs Throw\n *\n * * Whenever a potentially incorrect situation occurs, which does not directly lead to an incorrect behavior,\n * log a warning.\n * * Whenever an incorrect situation occurs, but the app may continue working (although perhaps incorrectly),\n * log an error.\n * * Whenever it's really bad and it does not make sense to continue working, throw a {@link module:utils/ckeditorerror~CKEditorError}.\n *\n * @namespace\n */\nconst log = {\n\t/**\n\t * Logs an error to the console.\n\t *\n\t * Read more about error logging in the {@link module:utils/log} module.\n\t *\n\t * @param {String} message The error message in an `error-name: Error message.` format.\n\t * During the minification process the \"Error message\" part will be removed to limit the code size\n\t * and a link to this error documentation will be logged to the console.\n\t * @param {Object} [data] Additional data describing the error.\n\t */\n\terror( message, data ) {\n\t\tconsole.error( attachLinkToDocumentation( message ), data );\n\t},\n\n\t/**\n\t * Logs a warning to the console.\n\t *\n\t * Read more about error logging in the {@link module:utils/log} module.\n\t *\n\t * @param {String} message The warning message in a `warning-name: Warning message.` format.\n\t * During the minification process the \"Warning message\" part will be removed to limit the code size\n\t * and a link to this error documentation will be logged to the console.\n\t * @param {Object} [data] Additional data describing the warning.\n\t */\n\twarn( message, data ) {\n\t\tconsole.warn( attachLinkToDocumentation( message ), data );\n\t}\n};\n\nexport default log;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/log.js\n// module id = 16\n// module chunks = 0","/**\n * Checks if `value` is the\n * [language type](http://www.ecma-international.org/ecma-262/6.0/#sec-ecmascript-language-types)\n * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Lang\n * @param {*} value The value to check.\n * @returns {boolean} Returns `true` if `value` is an object, else `false`.\n * @example\n *\n * _.isObject({});\n * // => true\n *\n * _.isObject([1, 2, 3]);\n * // => true\n *\n * _.isObject(_.noop);\n * // => true\n *\n * _.isObject(null);\n * // => false\n */\nfunction isObject(value) {\n var type = typeof value;\n return !!value && (type == 'object' || type == 'function');\n}\n\nexport default isObject;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/isObject.js\n// module id = 17\n// module chunks = 0","/**\n * Gets the last element of `array`.\n *\n * @static\n * @memberOf _\n * @since 0.1.0\n * @category Array\n * @param {Array} array The array to query.\n * @returns {*} Returns the last element of `array`.\n * @example\n *\n * _.last([1, 2, 3]);\n * // => 3\n */\nfunction last(array) {\n var length = array ? array.length : 0;\n return length ? array[length - 1] : undefined;\n}\n\nexport default last;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/last.js\n// module id = 18\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/delta/deltafactory\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\nimport OperationFactory from '../operation/operationfactory';\n\nconst deserializers = new Map();\n\n/**\n * A factory class for creating operations.\n *\n * Delta is a single, from the user action point of view, change in the editable document, like insert, split or\n * rename element. Delta is composed of operations, which are unit changes needed to be done to execute user action.\n *\n * Multiple deltas are grouped into a single {@link module:engine/model/batch~Batch}.\n */\nexport default class DeltaFactory {\n\t/**\n\t * Creates InsertDelta from deserialized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json\n\t * @param {module:engine/model/document~Document} doc Document on which this delta will be applied.\n\t * @returns {module:engine/model/delta/insertdelta~InsertDelta}\n\t */\n\tstatic fromJSON( json, doc ) {\n\t\tif ( !deserializers.has( json.__className ) ) {\n\t\t\t/**\n\t\t\t * This delta has no defined deserializer.\n\t\t\t *\n\t\t\t * @error delta-fromjson-no-deserializer\n\t\t\t * @param {String} name\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'delta-fromjson-no-deserializer: This delta has no defined deserializer',\n\t\t\t\t{ name: json.__className }\n\t\t\t);\n\t\t}\n\n\t\tconst Delta = deserializers.get( json.__className );\n\n\t\tconst delta = new Delta();\n\n\t\tfor ( const operation of json.operations ) {\n\t\t\tdelta.addOperation( OperationFactory.fromJSON( operation, doc ) );\n\t\t}\n\n\t\t// Rewrite all other properties.\n\t\tfor ( const prop in json ) {\n\t\t\tif ( prop != '__className' && delta[ prop ] === undefined ) {\n\t\t\t\tdelta[ prop ] = json[ prop ];\n\t\t\t}\n\t\t}\n\n\t\treturn delta;\n\t}\n\n\t/**\n\t * Registers a class for delta factory.\n\t *\n\t * @param {Function} Delta A delta class to register.\n\t */\n\tstatic register( Delta ) {\n\t\tdeserializers.set( Delta.className, Delta );\n\t}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/delta/deltafactory.js\n// module id = 19\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/batch\n */\n\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * `Batch` instance groups document changes ({@link module:engine/model/delta/delta~Delta deltas}). All deltas grouped in a single `Batch`\n * can be reverted together, so you can think about `Batch` as of a single undo step. If you want to extend given undo step you\n * can call another method on the same `Batch` object. If you want to create a separate undo step you can create a new `Batch`.\n *\n * For example to create two separate undo steps you can call:\n *\n *\t\tdoc.batch().insert( firstPosition, 'foo' );\n *\t\tdoc.batch().insert( secondPosition, 'bar' );\n *\n * To create a single undo step:\n *\n *\t\tconst batch = doc.batch();\n *\t\tbatch.insert( firstPosition, 'foo' );\n *\t\tbatch.insert( secondPosition, 'bar' );\n *\n * Note that all document modification methods (insert, remove, split, etc.) are chainable so you can shorten code to:\n *\n *\t\tdoc.batch().insert( firstPosition, 'foo' ).insert( secondPosition, 'bar' );\n */\nexport default class Batch {\n\t/**\n\t * Creates `Batch` instance. Not recommended to use directly, use {@link module:engine/model/document~Document#batch} instead.\n\t *\n\t * @param {module:engine/model/document~Document} document Document which this Batch changes.\n\t * @param {'transparent'|'default'} [type='default'] Type of the batch.\n\t */\n\tconstructor( document, type = 'default' ) {\n\t\t/**\n\t\t * Document which this batch changes.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/document~Document} module:engine/model/batch~Batch#document\n\t\t */\n\t\tthis.document = document;\n\n\t\t/**\n\t\t * Array of deltas which compose this batch.\n\t\t *\n\t\t * @readonly\n\t\t * @member {Array.} module:engine/model/batch~Batch#deltas\n\t\t */\n\t\tthis.deltas = [];\n\n\t\t/**\n\t\t * Type of the batch.\n\t\t *\n\t\t * Can be one of the following values:\n\t\t * * `'default'` - all \"normal\" batches, most commonly used type.\n\t\t * * `'transparent'` - batch that should be ignored by other features, i.e. initial batch or collaborative editing changes.\n\t\t *\n\t\t * @readonly\n\t\t * @member {'transparent'|'default'} module:engine/model/batch~Batch#type\n\t\t */\n\t\tthis.type = type;\n\t}\n\n\t/**\n\t * Returns this batch base version, which is equal to the base version of first delta in the batch.\n\t * If there are no deltas in the batch, it returns `null`.\n\t *\n\t * @readonly\n\t * @type {Number|null}\n\t */\n\tget baseVersion() {\n\t\treturn this.deltas.length > 0 ? this.deltas[ 0 ].baseVersion : null;\n\t}\n\n\t/**\n\t * Adds delta to the batch instance. All modification methods (insert, remove, split, etc.) use this method\n\t * to add created deltas.\n\t *\n\t * @param {module:engine/model/delta/delta~Delta} delta Delta to add.\n\t * @return {module:engine/model/delta/delta~Delta} Added delta.\n\t */\n\taddDelta( delta ) {\n\t\tdelta.batch = this;\n\t\tthis.deltas.push( delta );\n\n\t\treturn delta;\n\t}\n\n\t/**\n\t * Gets an iterable collection of operations.\n\t *\n\t * @returns {Iterable.}\n\t */\n\t* getOperations() {\n\t\tfor ( const delta of this.deltas ) {\n\t\t\tyield* delta.operations;\n\t\t}\n\t}\n}\n\n/**\n * Function to register batch methods. To make code scalable `Batch` do not have modification\n * methods built in. They can be registered using this method.\n *\n * This method checks if there is no naming collision and throws `batch-register-taken` if the method name\n * is already taken.\n *\n * Besides that no magic happens here, the method is added to the `Batch` class prototype.\n *\n * For example:\n *\n *\t\tBatch.register( 'insert', function( position, nodes ) {\n *\t\t\t// You can use a class inheriting from `Delta` if that class should handle OT in a special way.\n *\t\t\tconst delta = new Delta();\n *\n *\t\t\t// Add delta to the Batch instance. It is important to add a delta to the batch before applying any operation.\n *\t\t\tthis.addDelta( delta );\n *\n *\t\t\t// Create operations which should be components of this delta.\n *\t\t\tconst operation = new InsertOperation( position, nodes, this.document.version );\n *\n *\t\t\t// Add operation to the delta. It is important to add operation before applying it.\n *\t\t\tdelta.addOperation( operation );\n *\n *\t\t\t// Remember to apply every operation, no magic, you need to do it manually.\n *\t\t\tthis.document.applyOperation( operation );\n *\n *\t\t\t// Make this method chainable.\n *\t\t\treturn this;\n *\t\t} );\n *\n * @method module:engine/model/batch~Batch.register\n * @param {String} name Method name.\n * @param {Function} creator Method body.\n */\nexport function register( name, creator ) {\n\tif ( Batch.prototype[ name ] ) {\n\t\t/**\n\t\t * This batch method name is already taken.\n\t\t *\n\t\t * @error batch-register-taken\n\t\t * @param {String} name\n\t\t */\n\t\tthrow new CKEditorError(\n\t\t\t'model-batch-register-taken: This batch method name is already taken.',\n\t\t\t{ name } );\n\t}\n\n\tBatch.prototype[ name ] = creator;\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/batch.js\n// module id = 20\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module ui/button/buttonview\n */\n\nimport View from '../view';\nimport Template from '../template';\nimport IconView from '../icon/iconview';\nimport TooltipView from '../tooltip/tooltipview';\n\nimport { getEnvKeystrokeText } from '@ckeditor/ckeditor5-utils/src/keyboard';\n\n/**\n * The button view class.\n *\n *\t\tconst view = new ButtonView();\n *\n *\t\tview.set( {\n *\t\t\tlabel: 'A button',\n *\t\t\tkeystroke: 'Ctrl+B',\n *\t\t\ttooltip: true,\n *\t\t\twithText: true\n *\t\t} );\n *\n *\t\tview.init();\n *\n *\t\tdocument.body.append( view.element );\n *\n * @extends module:ui/view~View\n */\nexport default class ButtonView extends View {\n\t/**\n\t * @inheritDoc\n\t */\n\tconstructor( locale ) {\n\t\tsuper( locale );\n\n\t\t/**\n\t\t * The label of the button view visible to the user when {@link #withText} is `true`.\n\t\t * It can also be used to create a {@link #tooltip}.\n\t\t *\n\t\t * @observable\n\t\t * @member {String} #label\n\t\t */\n\t\tthis.set( 'label' );\n\n\t\t/**\n\t\t * (Optional) The keystroke associated with the button, i.e. CTRL+B,\n\t\t * in the string format compatible with {@link module:utils/keyboard}.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #keystroke\n\t\t */\n\t\tthis.set( 'keystroke' );\n\n\t\t/**\n\t\t * (Optional) Tooltip of the button, i.e. displayed when hovering the button with the mouse cursor.\n\t\t *\n\t\t * * If defined as a `Boolean` (e.g. `true`), then combination of `label` and `keystroke` will be set as a tooltip.\n\t\t * * If defined as a `String`, tooltip will equal the exact text of that `String`.\n\t\t * * If defined as a `Function`, `label` and `keystroke` will be passed to that function, which is to return\n\t\t * a string with the tooltip text.\n\t\t *\n\t\t *\t\tconst view = new ButtonView( locale );\n\t\t *\t\tview.tooltip = ( label, keystroke ) => `A tooltip for ${ label } and ${ keystroke }.`\n\t\t *\n\t\t * @observable\n\t\t * @default false\n\t\t * @member {Boolean|String|Function} #tooltip\n\t\t */\n\t\tthis.set( 'tooltip' );\n\n\t\t/**\n\t\t * (Optional) The position of the tooltip. See {@link module:ui/tooltip/tooltipview~TooltipView#position}\n\t\t * to learn more about the available position values.\n\t\t *\n\t\t * **Note:** It makes sense only when the {@link #tooltip `tooltip` attribute} is defined.\n\t\t *\n\t\t * @observable\n\t\t * @default 's'\n\t\t * @member {'s'|'n'} #position\n\t\t */\n\t\tthis.set( 'tooltipPosition', 's' );\n\n\t\t/**\n\t\t * The HTML type of the button. Default `button`.\n\t\t *\n\t\t * @observable\n\t\t * @member {'button'|'submit'|'reset'|'menu'} #type\n\t\t */\n\t\tthis.set( 'type', 'button' );\n\n\t\t/**\n\t\t * Controls whether the button view is \"on\". It makes sense when a feature it represents\n\t\t * is currently active, e.g. a bold button is \"on\" when the selection is in the bold text.\n\t\t *\n\t\t * To disable the button, use {@link #isEnabled} instead.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #isOn\n\t\t */\n\t\tthis.set( 'isOn', false );\n\n\t\t/**\n\t\t * Controls whether the button view is enabled, i.e. it can be clicked and execute an action.\n\t\t *\n\t\t * To change the \"on\" state of the button, use {@link #isOn} instead.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #isEnabled\n\t\t */\n\t\tthis.set( 'isEnabled', true );\n\n\t\t/**\n\t\t * Controls whether the button view is visible. Visible by default, buttons are hidden\n\t\t * using a CSS class.\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #isVisible\n\t\t */\n\t\tthis.set( 'isVisible', true );\n\n\t\t/**\n\t\t * (Optional) Controls whether the label of the button is hidden (e.g. an iconā€“only button).\n\t\t *\n\t\t * @observable\n\t\t * @member {Boolean} #withText\n\t\t */\n\t\tthis.set( 'withText', false );\n\n\t\t/**\n\t\t * (Optional) An XML {@link module:ui/icon/iconview~IconView#content content} of the icon.\n\t\t * When defined, an {@link #iconView} will be added to the button.\n\t\t *\n\t\t * @observable\n\t\t * @member {String} #icon\n\t\t */\n\t\tthis.set( 'icon' );\n\n\t\t/**\n\t\t * (Optional) Controls the `tabindex` HTML attribute of the button. By default, the button is focusable\n\t\t * but does not included in the Tab order.\n\t\t *\n\t\t * @observable\n\t\t * @default -1\n\t\t * @member {String} #tabindex\n\t\t */\n\t\tthis.set( 'tabindex', -1 );\n\n\t\t/**\n\t\t * Tooltip of the button bound to the template.\n\t\t *\n\t\t * @see #tooltip\n\t\t * @see #_getTooltipString\n\t\t * @private\n\t\t * @observable\n\t\t * @member {Boolean} #_tooltipString\n\t\t */\n\t\tthis.bind( '_tooltipString' ).to(\n\t\t\tthis, 'tooltip',\n\t\t\tthis, 'label',\n\t\t\tthis, 'keystroke',\n\t\t\tthis._getTooltipString.bind( this )\n\t\t);\n\n\t\t/**\n\t\t * Tooltip of the button view. It is configurable using the {@link #tooltip tooltip attribute}.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/tooltip/tooltipview~TooltipView} #tooltipView\n\t\t */\n\t\tthis.tooltipView = this._createTooltipView();\n\n\t\t/**\n\t\t * (Optional) The icon view of the button. Only present when the {@link #icon icon attribute} is defined.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:ui/icon/iconview~IconView} #iconView\n\t\t */\n\n\t\tconst bind = this.bindTemplate;\n\n\t\tthis.template = new Template( {\n\t\t\ttag: 'button',\n\n\t\t\tattributes: {\n\t\t\t\tclass: [\n\t\t\t\t\t'ck-button',\n\t\t\t\t\tbind.to( 'isEnabled', value => value ? 'ck-enabled' : 'ck-disabled' ),\n\t\t\t\t\tbind.if( 'isVisible', 'ck-hidden', value => !value ),\n\t\t\t\t\tbind.to( 'isOn', value => value ? 'ck-on' : 'ck-off' ),\n\t\t\t\t\tbind.if( 'withText', 'ck-button_with-text' )\n\t\t\t\t],\n\t\t\t\ttype: bind.to( 'type', value => value ? value : 'button' ),\n\t\t\t\ttabindex: bind.to( 'tabindex' )\n\t\t\t},\n\n\t\t\tchildren: [\n\t\t\t\t{\n\t\t\t\t\ttag: 'span',\n\n\t\t\t\t\tattributes: {\n\t\t\t\t\t\tclass: [ 'ck-button__label' ]\n\t\t\t\t\t},\n\n\t\t\t\t\tchildren: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttext: bind.to( 'label' )\n\t\t\t\t\t\t}\n\t\t\t\t\t]\n\t\t\t\t},\n\t\t\t\tthis.tooltipView\n\t\t\t],\n\n\t\t\ton: {\n\t\t\t\tmousedown: bind.to( evt => {\n\t\t\t\t\tevt.preventDefault();\n\t\t\t\t} ),\n\n\t\t\t\tclick: bind.to( evt => {\n\t\t\t\t\t// We can't make the button disabled using the disabled attribute, because it won't be focusable.\n\t\t\t\t\t// Though, shouldn't this condition be moved to the button controller?\n\t\t\t\t\tif ( this.isEnabled ) {\n\t\t\t\t\t\tthis.fire( 'execute' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Prevent the default when button is disabled, to block e.g.\n\t\t\t\t\t\t// automatic form submitting. See ckeditor/ckeditor5-link#74.\n\t\t\t\t\t\tevt.preventDefault();\n\t\t\t\t\t}\n\t\t\t\t} )\n\t\t\t}\n\t\t} );\n\n\t\t/**\n\t\t * Fired when the button view is clicked. It won't be fired when the button {@link #isEnabled}\n\t\t * is `false`.\n\t\t *\n\t\t * @event execute\n\t\t */\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tinit() {\n\t\tif ( this.icon ) {\n\t\t\tconst iconView = this.iconView = new IconView();\n\n\t\t\ticonView.bind( 'content' ).to( this, 'icon' );\n\t\t\tthis.element.insertBefore( iconView.element, this.element.firstChild );\n\n\t\t\t// Make sure the icon will be destroyed along with the button.\n\t\t\tthis.addChildren( iconView );\n\t\t}\n\n\t\tsuper.init();\n\t}\n\n\t/**\n\t * Focuses the {@link #element} of the button.\n\t */\n\tfocus() {\n\t\tthis.element.focus();\n\t}\n\n\t/**\n\t * Creates a {@link module:ui/tooltip/tooltipview~TooltipView} instance and binds it with button\n\t * attributes.\n\t *\n\t * @private\n\t * @returns {module:ui/tooltip/tooltipview~TooltipView}\n\t */\n\t_createTooltipView() {\n\t\tconst tooltipView = new TooltipView();\n\n\t\ttooltipView.bind( 'text' ).to( this, '_tooltipString' );\n\t\ttooltipView.bind( 'position' ).to( this, 'tooltipPosition' );\n\n\t\treturn tooltipView;\n\t}\n\n\t/**\n\t * Gets the text for the {@link #tooltipView} from the combination of\n\t * {@link #tooltip}, {@link #label} and {@link #keystroke} attributes.\n\t *\n\t * @private\n\t * @see #tooltip\n\t * @see #_tooltipString\n\t * @param {Boolean|String|Function} tooltip Button tooltip.\n\t * @param {String} label Button label.\n\t * @param {String} keystroke Button keystroke.\n\t * @returns {String}\n\t */\n\t_getTooltipString( tooltip, label, keystroke ) {\n\t\tif ( tooltip ) {\n\t\t\tif ( typeof tooltip == 'string' ) {\n\t\t\t\treturn tooltip;\n\t\t\t} else {\n\t\t\t\tif ( keystroke ) {\n\t\t\t\t\tkeystroke = getEnvKeystrokeText( keystroke );\n\t\t\t\t}\n\n\t\t\t\tif ( tooltip instanceof Function ) {\n\t\t\t\t\treturn tooltip( label, keystroke );\n\t\t\t\t} else {\n\t\t\t\t\treturn `${ label }${ keystroke ? ` (${ keystroke })` : '' }`;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn '';\n\t}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-ui/src/button/buttonview.js\n// module id = 21\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/view/position\n */\n\nimport TreeWalker from './treewalker';\n\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport EditableElement from './editableelement';\n\n/**\n * Position in the tree. Position is always located before or after a node.\n */\nexport default class Position {\n\t/**\n\t * Creates a position.\n\t *\n\t * @param {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment} parent Position parent.\n\t * @param {Number} offset Position offset.\n\t */\n\tconstructor( parent, offset ) {\n\t\t/**\n\t\t * Position parent.\n\t\t *\n\t\t * @member {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t\t * module:engine/view/position~Position#parent\n\t\t */\n\t\tthis.parent = parent;\n\n\t\t/**\n\t\t * Position offset.\n\t\t *\n\t\t * @member {Number} module:engine/view/position~Position#offset\n\t\t */\n\t\tthis.offset = offset;\n\t}\n\n\t/**\n\t * Node directly after the position. Equals `null` when there is no node after position or position is located\n\t * inside text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|null}\n\t */\n\tget nodeAfter() {\n\t\tif ( this.parent.is( 'text' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.parent.getChild( this.offset ) || null;\n\t}\n\n\t/**\n\t * Node directly before the position. Equals `null` when there is no node before position or position is located\n\t * inside text node.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|null}\n\t */\n\tget nodeBefore() {\n\t\tif ( this.parent.is( 'text' ) ) {\n\t\t\treturn null;\n\t\t}\n\n\t\treturn this.parent.getChild( this.offset - 1 ) || null;\n\t}\n\n\t/**\n\t * Is `true` if position is at the beginning of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtStart() {\n\t\treturn this.offset === 0;\n\t}\n\n\t/**\n\t * Is `true` if position is at the end of its {@link module:engine/view/position~Position#parent parent}, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isAtEnd() {\n\t\tconst endOffset = this.parent.is( 'text' ) ? this.parent.data.length : this.parent.childCount;\n\n\t\treturn this.offset === endOffset;\n\t}\n\n\t/**\n\t * Position's root, that is the root of the position's parent element.\n\t *\n\t * @readonly\n\t * @type {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment}\n\t */\n\tget root() {\n\t\treturn this.parent.root;\n\t}\n\n\t/**\n\t * {@link module:engine/view/editableelement~EditableElement EditableElement} instance that contains this position, or `null` if\n\t * position is not inside an editable element.\n\t *\n\t * @type {module:engine/view/editableelement~EditableElement|null}\n\t */\n\tget editableElement() {\n\t\tlet editable = this.parent;\n\n\t\twhile ( !( editable instanceof EditableElement ) ) {\n\t\t\tif ( editable.parent ) {\n\t\t\t\teditable = editable.parent;\n\t\t\t} else {\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\treturn editable;\n\t}\n\n\t/**\n\t * Returns a new instance of Position with offset incremented by `shift` value.\n\t *\n\t * @param {Number} shift How position offset should get changed. Accepts negative values.\n\t * @returns {module:engine/view/position~Position} Shifted position.\n\t */\n\tgetShiftedBy( shift ) {\n\t\tconst shifted = Position.createFromPosition( this );\n\n\t\tconst offset = shifted.offset + shift;\n\t\tshifted.offset = offset < 0 ? 0 : offset;\n\n\t\treturn shifted;\n\t}\n\n\t/**\n\t * Gets the farthest position which matches the callback using\n\t * {@link module:engine/view/treewalker~TreeWalker TreeWalker}.\n\t *\n\t * For example:\n\t *\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text' ); //

{}foo

->

foo[]

\n\t * \t\tgetLastMatchingPosition( value => value.type == 'text', { direction: 'backward' } ); //

foo[]

->

{}foo

\n\t * \t\tgetLastMatchingPosition( value => false ); // Do not move the position.\n\t *\n\t * @param {Function} skip Callback function. Gets {@link module:engine/view/treewalker~TreeWalkerValue} and should\n\t * return `true` if the value should be skipped or `false` if not.\n\t * @param {Object} options Object with configuration options. See {@link module:engine/view/treewalker~TreeWalker}.\n\t *\n\t * @returns {module:engine/view/position~Position} The position after the last item which matches the `skip` callback test.\n\t */\n\tgetLastMatchingPosition( skip, options = {} ) {\n\t\toptions.startPosition = this;\n\n\t\tconst treeWalker = new TreeWalker( options );\n\t\ttreeWalker.skip( skip );\n\n\t\treturn treeWalker.position;\n\t}\n\n\t/**\n\t * Returns ancestors array of this position, that is this position's parent and it's ancestors.\n\t *\n\t * @returns {Array} Array with ancestors.\n\t */\n\tgetAncestors() {\n\t\tif ( this.parent.is( 'documentFragment' ) ) {\n\t\t\treturn [ this.parent ];\n\t\t} else {\n\t\t\treturn this.parent.getAncestors( { includeSelf: true } );\n\t\t}\n\t}\n\n\t/**\n\t * Returns a {@link module:engine/view/node~Node} or {@link module:engine/view/documentfragment~DocumentFragment}\n\t * which is a common ancestor of both positions.\n\t *\n\t * @param {module:engine/view/position~Position} position\n\t * @returns {module:engine/view/node~Node|module:engine/view/documentfragment~DocumentFragment|null}\n\t */\n\tgetCommonAncestor( position ) {\n\t\tconst ancestorsA = this.getAncestors();\n\t\tconst ancestorsB = position.getAncestors();\n\n\t\tlet i = 0;\n\n\t\twhile ( ancestorsA[ i ] == ancestorsB[ i ] && ancestorsA[ i ] ) {\n\t\t\ti++;\n\t\t}\n\n\t\treturn i === 0 ? null : ancestorsA[ i - 1 ];\n\t}\n\n\t/**\n\t * Checks whether this position equals given position.\n\t *\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} True if positions are same.\n\t */\n\tisEqual( otherPosition ) {\n\t\treturn ( this.parent == otherPosition.parent && this.offset == otherPosition.offset );\n\t}\n\n\t/**\n\t * Checks whether this position is located before given position. When method returns `false` it does not mean that\n\t * this position is after give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~Position#isAfter\n\t * @see module:engine/view/position~Position#compareWith\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} Returns `true` if this position is before given position.\n\t */\n\tisBefore( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'before';\n\t}\n\n\t/**\n\t * Checks whether this position is located after given position. When method returns `false` it does not mean that\n\t * this position is before give one. Two positions may be located inside separate roots and in that situation this\n\t * method will still return `false`.\n\t *\n\t * @see module:engine/view/position~Position#isBefore\n\t * @see module:engine/view/position~Position#compareWith\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {Boolean} Returns `true` if this position is after given position.\n\t */\n\tisAfter( otherPosition ) {\n\t\treturn this.compareWith( otherPosition ) == 'after';\n\t}\n\n\t/**\n\t * Checks whether this position is before, after or in same position that other position. Two positions may be also\n\t * different when they are located in separate roots.\n\t *\n\t * @param {module:engine/view/position~Position} otherPosition Position to compare with.\n\t * @returns {module:engine/view/position~PositionRelation}\n\t */\n\tcompareWith( otherPosition ) {\n\t\tif ( this.isEqual( otherPosition ) ) {\n\t\t\treturn 'same';\n\t\t}\n\n\t\t// If positions have same parent.\n\t\tif ( this.parent === otherPosition.parent ) {\n\t\t\treturn this.offset - otherPosition.offset < 0 ? 'before' : 'after';\n\t\t}\n\n\t\t// Get path from root to position's parent element.\n\t\tconst path = this.getAncestors();\n\t\tconst otherPath = otherPosition.getAncestors();\n\n\t\t// Compare both path arrays to find common ancestor.\n\t\tconst result = compareArrays( path, otherPath );\n\n\t\tlet commonAncestorIndex;\n\n\t\tswitch ( result ) {\n\t\t\tcase 0:\n\t\t\t\t// No common ancestors found.\n\t\t\t\treturn 'different';\n\n\t\t\tcase 'prefix':\n\t\t\t\tcommonAncestorIndex = path.length - 1;\n\t\t\t\tbreak;\n\n\t\t\tcase 'extension':\n\t\t\t\tcommonAncestorIndex = otherPath.length - 1;\n\t\t\t\tbreak;\n\n\t\t\tdefault:\n\t\t\t\tcommonAncestorIndex = result - 1;\n\t\t}\n\n\t\t// Common ancestor of two positions.\n\t\tconst commonAncestor = path[ commonAncestorIndex ];\n\t\tconst nextAncestor1 = path[ commonAncestorIndex + 1 ];\n\t\tconst nextAncestor2 = otherPath[ commonAncestorIndex + 1 ];\n\n\t\t// Check if common ancestor is not one of the parents.\n\t\tif ( commonAncestor === this.parent ) {\n\t\t\tconst index = this.offset - nextAncestor2.index;\n\n\t\t\treturn index <= 0 ? 'before' : 'after';\n\t\t} else if ( commonAncestor === otherPosition.parent ) {\n\t\t\tconst index = nextAncestor1.index - otherPosition.offset;\n\n\t\t\treturn index < 0 ? 'before' : 'after';\n\t\t}\n\n\t\tconst index = nextAncestor1.index - nextAncestor2.index;\n\n\t\t// Compare indexes of next ancestors inside common one.\n\t\treturn index < 0 ? 'before' : 'after';\n\t}\n\n\t/**\n\t * Creates position at the given location. The location can be specified as:\n\t *\n\t * * a {@link module:engine/view/position~Position position},\n\t * * parent element and offset (offset defaults to `0`),\n\t * * parent element and `'end'` (sets position at the end of that element),\n\t * * {@link module:engine/view/item~Item view item} and `'before'` or `'after'` (sets position before or after given view item).\n\t *\n\t * This method is a shortcut to other constructors such as:\n\t *\n\t * * {@link module:engine/view/position~Position.createBefore},\n\t * * {@link module:engine/view/position~Position.createAfter},\n\t * * {@link module:engine/view/position~Position.createFromPosition}.\n\t *\n\t * @param {module:engine/view/item~Item|module:engine/model/position~Position} itemOrPosition\n\t * @param {Number|'end'|'before'|'after'} [offset=0] Offset or one of the flags. Used only when\n\t * first parameter is a {@link module:engine/view/item~Item view item}.\n\t */\n\tstatic createAt( itemOrPosition, offset ) {\n\t\tif ( itemOrPosition instanceof Position ) {\n\t\t\treturn this.createFromPosition( itemOrPosition );\n\t\t} else {\n\t\t\tconst node = itemOrPosition;\n\n\t\t\tif ( offset == 'end' ) {\n\t\t\t\toffset = node.is( 'text' ) ? node.data.length : node.childCount;\n\t\t\t} else if ( offset == 'before' ) {\n\t\t\t\treturn this.createBefore( node );\n\t\t\t} else if ( offset == 'after' ) {\n\t\t\t\treturn this.createAfter( node );\n\t\t\t} else if ( !offset ) {\n\t\t\t\toffset = 0;\n\t\t\t}\n\n\t\t\treturn new Position( node, offset );\n\t\t}\n\t}\n\n\t/**\n\t * Creates a new position after given view item.\n\t *\n\t * @param {module:engine/view/item~Item} item View item after which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tstatic createAfter( item ) {\n\t\t// TextProxy is not a instance of Node so we need do handle it in specific way.\n\t\tif ( item.is( 'textProxy' ) ) {\n\t\t\treturn new Position( item.textNode, item.offsetInText + item.data.length );\n\t\t}\n\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You can not make a position after a root.\n\t\t\t *\n\t\t\t * @error view-position-after-root\n\t\t\t * @param {module:engine/view/node~Node} root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-position-after-root: You can not make position after root.', { root: item } );\n\t\t}\n\n\t\treturn new Position( item.parent, item.index + 1 );\n\t}\n\n\t/**\n\t * Creates a new position before given view item.\n\t *\n\t * @param {module:engine/view/item~Item} item View item before which the position should be located.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tstatic createBefore( item ) {\n\t\t// TextProxy is not a instance of Node so we need do handle it in specific way.\n\t\tif ( item.is( 'textProxy' ) ) {\n\t\t\treturn new Position( item.textNode, item.offsetInText );\n\t\t}\n\n\t\tif ( !item.parent ) {\n\t\t\t/**\n\t\t\t * You cannot make a position before a root.\n\t\t\t *\n\t\t\t * @error view-position-before-root\n\t\t\t * @param {module:engine/view/node~Node} root\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'view-position-before-root: You can not make position before root.', { root: item } );\n\t\t}\n\n\t\treturn new Position( item.parent, item.index );\n\t}\n\n\t/**\n\t * Creates and returns a new instance of `Position`, which is equal to the passed position.\n\t *\n\t * @param {module:engine/view/position~Position} position Position to be cloned.\n\t * @returns {module:engine/view/position~Position}\n\t */\n\tstatic createFromPosition( position ) {\n\t\treturn new this( position.parent, position.offset );\n\t}\n}\n\n/**\n * A flag indicating whether this position is `'before'` or `'after'` or `'same'` as given position.\n * If positions are in different roots `'different'` flag is returned.\n *\n * @typedef {String} module:engine/view/position~PositionRelation\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/position.js\n// module id = 22\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/writer\n */\n\nimport Node from './node';\nimport Text from './text';\nimport TextProxy from './textproxy';\nimport Range from './range';\nimport DocumentFragment from './documentfragment';\nimport NodeList from './nodelist';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\n\n/**\n * Contains functions used for composing model tree, grouped together under \"model writer\" name. Those functions\n * are built on top of {@link module:engine/model/node~Node node}, and it's child classes', APIs.\n *\n * Model writer API has multiple advantages and it is highly recommended to use it when changing model tree and nodes:\n * * model writer API {@link module:engine/model/writer~writer.normalizeNodes normalizes inserted nodes}, which means that you can insert\n * not only {@link module:engine/model/node~Node nodes}, but also `String`s, {@link module:engine/model/textproxy~TextProxy text proxies}\n * and\n * {@link module:engine/model/documentfragment~DocumentFragment document fragments},\n * * model writer API operates on {@link module:engine/model/position~Position positions}, which means that you have\n * better control over manipulating model tree as positions operate on offsets rather than indexes,\n * * model writer API automatically merges {@link module:engine/model/text~Text text nodes} with same attributes, which means\n * lower memory usage and better efficiency.\n *\n * @namespace writer\n */\nconst writer = {\n\tinsert,\n\tremove,\n\tmove,\n\tsetAttribute,\n\tremoveAttribute,\n\tnormalizeNodes\n};\n\nexport default writer;\n\n/**\n * Inserts given nodes at given position.\n *\n * @function module:engine/model/writer~writer.insert\n * @param {module:engine/model/position~Position} position Position at which nodes should be inserted.\n * @param {module:engine/model/node~NodeSet} nodes Nodes to insert.\n * @returns {module:engine/model/range~Range} Range spanning over inserted elements.\n */\nexport function insert( position, nodes ) {\n\tnodes = normalizeNodes( nodes );\n\n\t// We have to count offset before inserting nodes because they can get merged and we would get wrong offsets.\n\tconst offset = nodes.reduce( ( sum, node ) => sum + node.offsetSize, 0 );\n\tconst parent = position.parent;\n\n\t// Insertion might be in a text node, we should split it if that's the case.\n\t_splitNodeAtPosition( position );\n\tconst index = position.index;\n\n\t// Insert nodes at given index. After splitting we have a proper index and insertion is between nodes,\n\t// using basic `Element` API.\n\tparent.insertChildren( index, nodes );\n\n\t// Merge text nodes, if possible. Merging is needed only at points where inserted nodes \"touch\" \"old\" nodes.\n\t_mergeNodesAtIndex( parent, index + nodes.length );\n\t_mergeNodesAtIndex( parent, index );\n\n\treturn new Range( position, position.getShiftedBy( offset ) );\n}\n\n/**\n * Removed nodes in given range. Only {@link module:engine/model/range~Range#isFlat flat} ranges are accepted.\n *\n * @function module:engine/model/writer~writer.remove\n * @param {module:engine/model/range~Range} range Range containing nodes to remove.\n * @returns {Array.}\n */\nexport function remove( range ) {\n\tif ( !range.isFlat ) {\n\t\t/**\n\t\t * Trying to remove a range which starts and ends in different element.\n\t\t *\n\t\t * @error model-writer-remove-range-not-flat\n\t\t */\n\t\tthrow new CKEditorError( 'model-writer-remove-range-not-flat: ' +\n\t\t\t'Trying to remove a range which starts and ends in different element.' );\n\t}\n\n\tconst parent = range.start.parent;\n\n\t// Range may be inside text nodes, we have to split them if that's the case.\n\t_splitNodeAtPosition( range.start );\n\t_splitNodeAtPosition( range.end );\n\n\t// Remove the text nodes using basic `Element` API.\n\tconst removed = parent.removeChildren( range.start.index, range.end.index - range.start.index );\n\n\t// Merge text nodes, if possible. After some nodes were removed, node before and after removed range will be\n\t// touching at the position equal to the removed range beginning. We check merging possibility there.\n\t_mergeNodesAtIndex( parent, range.start.index );\n\n\treturn removed;\n}\n\n/**\n * Moves nodes in given range to given target position. Only {@link module:engine/model/range~Range#isFlat flat} ranges are accepted.\n *\n * @param {module:engine/model/range~Range} sourceRange Range containing nodes to move.\n * @param {module:engine/model/position~Position} targetPosition Position to which nodes should be moved.\n * @returns {module:engine/model/range~Range} Range containing moved nodes.\n */\nexport function move( sourceRange, targetPosition ) {\n\tif ( !sourceRange.isFlat ) {\n\t\t/**\n\t\t * Trying to move a range which starts and ends in different element.\n\t\t *\n\t\t * @error model-writer-move-range-not-flat\n\t\t */\n\t\tthrow new CKEditorError( 'model-writer-move-range-not-flat: ' +\n\t\t\t'Trying to move a range which starts and ends in different element.' );\n\t}\n\n\tconst nodes = this.remove( sourceRange );\n\n\t// We have to fix `targetPosition` because model changed after nodes from `sourceRange` got removed and\n\t// that change might have an impact on `targetPosition`.\n\ttargetPosition = targetPosition._getTransformedByDeletion( sourceRange.start, sourceRange.end.offset - sourceRange.start.offset );\n\n\treturn this.insert( targetPosition, nodes );\n}\n\n/**\n * Sets given attribute on nodes in given range.\n *\n * @param {module:engine/model/range~Range} range Range containing nodes that should have the attribute set.\n * @param {String} key Key of attribute to set.\n * @param {*} value Attribute value.\n */\nexport function setAttribute( range, key, value ) {\n\t// Range might start or end in text nodes, so we have to split them.\n\t_splitNodeAtPosition( range.start );\n\t_splitNodeAtPosition( range.end );\n\n\t// Iterate over all items in the range.\n\tfor ( const item of range.getItems() ) {\n\t\t// Iterator will return `TextProxy` instances but we know that those text proxies will\n\t\t// always represent full text nodes (this is guaranteed thanks to splitting we did before).\n\t\t// So, we can operate on those text proxies' text nodes.\n\t\tconst node = item.is( 'textProxy' ) ? item.textNode : item;\n\n\t\tif ( value !== null ) {\n\t\t\tnode.setAttribute( key, value );\n\t\t} else {\n\t\t\tnode.removeAttribute( key );\n\t\t}\n\n\t\t// After attributes changing it may happen that some text nodes can be merged. Try to merge with previous node.\n\t\t_mergeNodesAtIndex( node.parent, node.index );\n\t}\n\n\t// Try to merge last changed node with it's previous sibling (not covered by the loop above).\n\t_mergeNodesAtIndex( range.end.parent, range.end.index );\n}\n\n/**\n * Removes given attribute from nodes in given range.\n *\n * @param {module:engine/model/range~Range} range Range containing nodes that should have the attribute removed.\n * @param {String} key Key of attribute to remove.\n */\nexport function removeAttribute( range, key ) {\n\tthis.setAttribute( range, key, null );\n}\n\n/**\n * Normalizes given object or an array of objects to an array of {@link module:engine/model/node~Node nodes}. See\n * {@link module:engine/model/node~NodeSet NodeSet} for details on how normalization is performed.\n *\n * @param {module:engine/model/node~NodeSet} nodes Objects to normalize.\n * @returns {Array.} Normalized nodes.\n */\nexport function normalizeNodes( nodes ) {\n\tconst normalized = [];\n\n\tif ( !( nodes instanceof Array ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Convert instances of classes other than Node.\n\tfor ( let i = 0; i < nodes.length; i++ ) {\n\t\tif ( typeof nodes[ i ] == 'string' ) {\n\t\t\tnormalized.push( new Text( nodes[ i ] ) );\n\t\t} else if ( nodes[ i ] instanceof TextProxy ) {\n\t\t\tnormalized.push( new Text( nodes[ i ].data, nodes[ i ].getAttributes() ) );\n\t\t} else if ( nodes[ i ] instanceof DocumentFragment || nodes[ i ] instanceof NodeList ) {\n\t\t\tfor ( const child of nodes[ i ] ) {\n\t\t\t\tnormalized.push( child );\n\t\t\t}\n\t\t} else if ( nodes[ i ] instanceof Node ) {\n\t\t\tnormalized.push( nodes[ i ] );\n\t\t}\n\t\t// Skip unrecognized type.\n\t}\n\n\t// Merge text nodes.\n\tfor ( let i = 1; i < normalized.length; i++ ) {\n\t\tconst node = normalized[ i ];\n\t\tconst prev = normalized[ i - 1 ];\n\n\t\tif ( node instanceof Text && prev instanceof Text && _haveSameAttributes( node, prev ) ) {\n\t\t\t// Doing this instead changing prev.data because .data is readonly.\n\t\t\tnormalized.splice( i - 1, 2, new Text( prev.data + node.data, prev.getAttributes() ) );\n\t\t\ti--;\n\t\t}\n\t}\n\n\treturn normalized;\n}\n\n/**\n * Checks if nodes before and after given index in given element are {@link module:engine/model/text~Text text nodes} and\n * merges them into one node if they have same attributes.\n *\n * Merging is done by removing two text nodes and inserting a new text node containing data from both merged text nodes.\n *\n * @ignore\n * @private\n * @param {module:engine/model/element~Element} element Parent element of nodes to merge.\n * @param {Number} index Index between nodes to merge.\n */\nfunction _mergeNodesAtIndex( element, index ) {\n\tconst nodeBefore = element.getChild( index - 1 );\n\tconst nodeAfter = element.getChild( index );\n\n\t// Check if both of those nodes are text objects with same attributes.\n\tif ( nodeBefore && nodeAfter && nodeBefore.is( 'text' ) && nodeAfter.is( 'text' ) && _haveSameAttributes( nodeBefore, nodeAfter ) ) {\n\t\t// Append text of text node after index to the before one.\n\t\tconst mergedNode = new Text( nodeBefore.data + nodeAfter.data, nodeBefore.getAttributes() );\n\n\t\t// Remove separate text nodes.\n\t\telement.removeChildren( index - 1, 2 );\n\n\t\t// Insert merged text node.\n\t\telement.insertChildren( index - 1, mergedNode );\n\t}\n}\n\n/**\n * Checks if given position is in a text node, and if so, splits the text node in two text nodes, each of them\n * containing a part of original text node.\n *\n * @ignore\n * @private\n * @param {module:engine/model/position~Position} position Position at which node should be split.\n */\nfunction _splitNodeAtPosition( position ) {\n\tconst textNode = position.textNode;\n\tconst element = position.parent;\n\n\tif ( textNode ) {\n\t\tconst offsetDiff = position.offset - textNode.startOffset;\n\t\tconst index = textNode.index;\n\n\t\telement.removeChildren( index, 1 );\n\n\t\tconst firstPart = new Text( textNode.data.substr( 0, offsetDiff ), textNode.getAttributes() );\n\t\tconst secondPart = new Text( textNode.data.substr( offsetDiff ), textNode.getAttributes() );\n\n\t\telement.insertChildren( index, [ firstPart, secondPart ] );\n\t}\n}\n\n/**\n * Checks whether two given nodes have same attributes.\n *\n * @ignore\n * @private\n * @param {module:engine/model/node~Node} nodeA Node to check.\n * @param {module:engine/model/node~Node} nodeB Node to check.\n * @returns {Boolean} `true` if nodes have same attributes, `false` otherwise.\n */\nfunction _haveSameAttributes( nodeA, nodeB ) {\n\tconst iteratorA = nodeA.getAttributes();\n\tconst iteratorB = nodeB.getAttributes();\n\n\tfor ( const attr of iteratorA ) {\n\t\tif ( attr[ 1 ] !== nodeB.getAttribute( attr[ 0 ] ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\titeratorB.next();\n\t}\n\n\treturn iteratorB.next().done;\n}\n\n/**\n * Value that can be normalized to an array of {@link module:engine/model/node~Node nodes}.\n *\n * Non-arrays are normalized as follows:\n * * {@link module:engine/model/node~Node Node} is left as is,\n * * {@link module:engine/model/textproxy~TextProxy TextProxy} and `String` are normalized to {@link module:engine/model/text~Text Text},\n * * {@link module:engine/model/nodelist~NodeList NodeList} is normalized to an array containing all nodes that are in that node list,\n * * {@link module:engine/model/documentfragment~DocumentFragment DocumentFragment} is normalized to an array containing all of it's\n * * children.\n *\n * Arrays are processed item by item like non-array values and flattened to one array. Normalization always results in\n * a flat array of {@link module:engine/model/node~Node nodes}. Consecutive text nodes (or items normalized to text nodes) will be\n * merged if they have same attributes.\n *\n * @typedef {module:engine/model/node~Node|module:engine/model/textproxy~TextProxy|String|\n * module:engine/model/nodelist~NodeList|module:engine/model/documentfragment~DocumentFragment|Iterable}\n * module:engine/model/node~NodeSet\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/writer.js\n// module id = 23\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/delta/delta\n */\n\nimport clone from '@ckeditor/ckeditor5-utils/src/lib/lodash/clone';\nimport DeltaFactory from './deltafactory';\n\n/**\n * Base class for all deltas.\n *\n * Delta is a single, from the user action point of view, change in the editable document, like insert, split or\n * rename element. Delta is composed of operations, which are unit changes needed to be done to execute user action.\n *\n * Multiple deltas are grouped into a single {@link module:engine/model/batch~Batch}.\n */\nexport default class Delta {\n\t/**\n\t * Creates a delta instance.\n\t */\n\tconstructor() {\n\t\t/**\n\t\t * {@link module:engine/model/batch~Batch} which delta is a part of. This property is null by default and set by the\n\t\t * {@link module:engine/model/batch~Batch#addDelta} method.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/batch~Batch} module:engine/model/delta/delta~Delta#batch\n\t\t */\n\t\tthis.batch = null;\n\n\t\t/**\n\t\t * Array of operations which compose delta.\n\t\t *\n\t\t * @readonly\n\t\t * @member {module:engine/model/operation/operation~Operation[]} module:engine/model/delta/delta~Delta#operations\n\t\t */\n\t\tthis.operations = [];\n\t}\n\n\t/**\n\t * Returns delta base version which is equal to the base version of the first operation in delta. If there\n\t * are no operations in delta, returns `null`.\n\t *\n\t * @see module:engine/model/document~Document\n\t * @type {Number|null}\n\t */\n\tget baseVersion() {\n\t\tif ( this.operations.length > 0 ) {\n\t\t\treturn this.operations[ 0 ].baseVersion;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * @param {Number} baseVersion\n\t */\n\tset baseVersion( baseVersion ) {\n\t\tfor ( const operation of this.operations ) {\n\t\t\toperation.baseVersion = baseVersion++;\n\t\t}\n\t}\n\n\t/**\n\t * A class that will be used when creating reversed delta.\n\t *\n\t * @private\n\t * @type {Function}\n\t */\n\tget _reverseDeltaClass() {\n\t\treturn Delta;\n\t}\n\n\t/**\n\t * Delta type.\n\t *\n\t * @readonly\n\t * @member {String} #type\n\t */\n\n\t/**\n\t * Add operation to the delta.\n\t *\n\t * @param {module:engine/model/operation/operation~Operation} operation Operation instance.\n\t */\n\taddOperation( operation ) {\n\t\toperation.delta = this;\n\t\tthis.operations.push( operation );\n\n\t\treturn operation;\n\t}\n\n\t/**\n\t * Creates and returns a delta that has the same parameters as this delta.\n\t *\n\t * @returns {module:engine/model/delta/delta~Delta} Clone of this delta.\n\t */\n\tclone() {\n\t\tconst delta = new this.constructor();\n\n\t\tfor ( const op of this.operations ) {\n\t\t\tdelta.addOperation( op.clone() );\n\t\t}\n\n\t\treturn delta;\n\t}\n\n\t/**\n\t * Creates and returns a reverse delta. Reverse delta when executed right after the original delta will bring back\n\t * tree model state to the point before the original delta execution. In other words, it reverses changes done\n\t * by the original delta.\n\t *\n\t * Keep in mind that tree model state may change since executing the original delta, so reverse delta may be \"outdated\".\n\t * In that case you will need to {@link module:engine/model/delta/transform~transform} it by all deltas that were executed after\n\t * the original delta.\n\t *\n\t * @returns {module:engine/model/delta/delta~Delta} Reversed delta.\n\t */\n\tgetReversed() {\n\t\tconst delta = new this._reverseDeltaClass();\n\n\t\tfor ( const op of this.operations ) {\n\t\t\tdelta.addOperation( op.getReversed() );\n\t\t}\n\n\t\tdelta.operations.reverse();\n\n\t\tfor ( let i = 0; i < delta.operations.length; i++ ) {\n\t\t\tdelta.operations[ i ].baseVersion = this.operations[ this.operations.length - 1 ].baseVersion + i + 1;\n\t\t}\n\n\t\treturn delta;\n\t}\n\n\t/**\n\t * Custom toJSON method to make deltas serializable.\n\t *\n\t * @returns {Object} Clone of this delta with added class name.\n\t */\n\ttoJSON() {\n\t\tconst json = clone( this );\n\n\t\tjson.__className = this.constructor.className;\n\n\t\t// Remove parent batch to avoid circular dependencies.\n\t\tdelete json.batch;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Delta class name. Used by {@link #toJSON} method for serialization and\n\t * {@link module:engine/model/delta/deltafactory~DeltaFactory.fromJSON} during deserialization.\n\t *\n\t * @type {String}\n\t * @readonly\n\t */\n\tstatic get className() {\n\t\treturn 'engine.model.delta.Delta';\n\t}\n}\n\nDeltaFactory.register( Delta );\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/delta/delta.js\n// module id = 24\n// module chunks = 0","import arrayPush from './_arrayPush';\nimport isFlattenable from './_isFlattenable';\n\n/**\n * The base implementation of `_.flatten` with support for restricting flattening.\n *\n * @private\n * @param {Array} array The array to flatten.\n * @param {number} depth The maximum recursion depth.\n * @param {boolean} [predicate=isFlattenable] The function invoked per iteration.\n * @param {boolean} [isStrict] Restrict to values that pass `predicate` checks.\n * @param {Array} [result=[]] The initial result value.\n * @returns {Array} Returns the new flattened array.\n */\nfunction baseFlatten(array, depth, predicate, isStrict, result) {\n var index = -1,\n length = array.length;\n\n predicate || (predicate = isFlattenable);\n result || (result = []);\n\n while (++index < length) {\n var value = array[index];\n if (depth > 0 && predicate(value)) {\n if (depth > 1) {\n // Recursively flatten arrays (susceptible to call stack limits).\n baseFlatten(value, depth - 1, predicate, isStrict, result);\n } else {\n arrayPush(result, value);\n }\n } else if (!isStrict) {\n result[result.length] = value;\n }\n }\n return result;\n}\n\nexport default baseFlatten;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_baseFlatten.js\n// module id = 25\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/text\n */\n\nimport Node from './node';\n\n/**\n * Model text node. Type of {@link module:engine/model/node~Node node} that contains {@link module:engine/model/text~Text#data text data}.\n *\n * **Important:** see {@link module:engine/model/node~Node} to read about restrictions using `Text` and `Node` API.\n *\n * **Note:** keep in mind that `Text` instances might indirectly got removed from model tree when model is changed.\n * This happens when {@link module:engine/model/writer~writer model writer} is used to change model and the text node is merged with\n * another text node. Then, both text nodes are removed and a new text node is inserted into the model. Because of\n * this behavior, keeping references to `Text` is not recommended. Instead, consider creating\n * {@link module:engine/model/liveposition~LivePosition live position} placed before the text node.\n */\nexport default class Text extends Node {\n\t/**\n\t * Creates a text node.\n\t *\n\t * @param {String} data Node's text.\n\t * @param {Object} [attrs] Node's attributes. See {@link module:utils/tomap~toMap} for a list of accepted values.\n\t */\n\tconstructor( data, attrs ) {\n\t\tsuper( attrs );\n\n\t\t/**\n\t\t * Text data contained in this text node.\n\t\t *\n\t\t * @type {String}\n\t\t */\n\t\tthis.data = data || '';\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget offsetSize() {\n\t\treturn this.data.length;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tis( type ) {\n\t\treturn type == 'text';\n\t}\n\n\t/**\n\t * Creates a copy of this text node and returns it. Created text node has same text data and attributes as original text node.\n\t */\n\tclone() {\n\t\treturn new Text( this.data, this.getAttributes() );\n\t}\n\n\t/**\n\t * Converts `Text` instance to plain object and returns it.\n\t *\n\t * @returns {Object} `Text` instance converted to plain object.\n\t */\n\ttoJSON() {\n\t\tconst json = super.toJSON();\n\n\t\tjson.data = this.data;\n\n\t\treturn json;\n\t}\n\n\t/**\n\t * Creates a `Text` instance from given plain object (i.e. parsed JSON string).\n\t *\n\t * @param {Object} json Plain object to be converted to `Text`.\n\t * @returns {module:engine/model/text~Text} `Text` instance created using given plain object.\n\t */\n\tstatic fromJSON( json ) {\n\t\treturn new Text( json.data, json.attributes );\n\t}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/text.js\n// module id = 26\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/view/element\n */\n\nimport Node from './node';\nimport Text from './text';\nimport objectToMap from '@ckeditor/ckeditor5-utils/src/objecttomap';\nimport isIterable from '@ckeditor/ckeditor5-utils/src/isiterable';\nimport isPlainObject from '@ckeditor/ckeditor5-utils/src/lib/lodash/isPlainObject';\nimport Matcher from './matcher';\n\n/**\n * View element.\n *\n * Editing engine does not define fixed HTML DTD. This is why the type of the {@link module:engine/view/element~Element} need to\n * be defined by the feature developer. Creating an element you should use {@link module:engine/view/containerelement~ContainerElement}\n * class, {@link module:engine/view/attributeelement~AttributeElement} class or {@link module:engine/view/emptyelement~EmptyElement} class.\n *\n * Note that for view elements which are not created from model, like elements from mutations, paste or\n * {@link module:engine/controller/datacontroller~DataController#set data.set} it is not possible to define the type of the element, so\n * these will be instances of the {@link module:engine/view/element~Element}.\n *\n * @extends module:engine/view/node~Node\n */\nexport default class Element extends Node {\n\t/**\n\t * Creates a view element.\n\t *\n\t * Attributes can be passed in various formats:\n\t *\n\t *\t\tnew Element( 'div', { 'class': 'editor', 'contentEditable': 'true' } ); // object\n\t *\t\tnew Element( 'div', [ [ 'class', 'editor' ], [ 'contentEditable', 'true' ] ] ); // map-like iterator\n\t *\t\tnew Element( 'div', mapOfAttributes ); // map\n\t *\n\t * @param {String} name Node name.\n\t * @param {Object|Iterable} [attrs] Collection of attributes.\n\t * @param {module:engine/view/node~Node|Iterable.} [children]\n\t * List of nodes to be inserted into created element.\n\t */\n\tconstructor( name, attrs, children ) {\n\t\tsuper();\n\n\t\t/**\n\t\t * Name of the element.\n\t\t *\n\t\t * @readonly\n\t\t * @member {String}\n\t\t */\n\t\tthis.name = name;\n\n\t\t/**\n\t\t * Map of attributes, where attributes names are keys and attributes values are values.\n\t\t *\n\t\t * @protected\n\t\t * @member {Map} #_attrs\n\t\t */\n\t\tif ( isPlainObject( attrs ) ) {\n\t\t\tthis._attrs = objectToMap( attrs );\n\t\t} else {\n\t\t\tthis._attrs = new Map( attrs );\n\t\t}\n\n\t\t/**\n\t\t * Array of child nodes.\n\t\t *\n\t\t * @protected\n\t\t * @member {Array.}\n\t\t */\n\t\tthis._children = [];\n\n\t\tif ( children ) {\n\t\t\tthis.insertChildren( 0, children );\n\t\t}\n\n\t\t/**\n\t\t * Set of classes associated with element instance.\n\t\t *\n\t\t * @protected\n\t\t * @member {Set}\n\t\t */\n\t\tthis._classes = new Set();\n\n\t\tif ( this._attrs.has( 'class' ) ) {\n\t\t\t// Remove class attribute and handle it by class set.\n\t\t\tconst classString = this._attrs.get( 'class' );\n\t\t\tparseClasses( this._classes, classString );\n\t\t\tthis._attrs.delete( 'class' );\n\t\t}\n\n\t\t/**\n\t\t * Map of styles.\n\t\t *\n\t\t * @protected\n\t\t * @member {Set} module:engine/view/element~Element#_styles\n\t\t */\n\t\tthis._styles = new Map();\n\n\t\tif ( this._attrs.has( 'style' ) ) {\n\t\t\t// Remove style attribute and handle it by styles map.\n\t\t\tparseInlineStyles( this._styles, this._attrs.get( 'style' ) );\n\t\t\tthis._attrs.delete( 'style' );\n\t\t}\n\n\t\t/**\n\t\t * Map of custom properties.\n\t\t * Custom properties can be added to element instance, will be cloned but not rendered into DOM.\n\t\t *\n\t\t * @protected\n\t\t * @memeber {Map}\n\t\t */\n\t\tthis._customProperties = new Map();\n\t}\n\n\t/**\n\t * Number of element's children.\n\t *\n\t * @readonly\n\t * @type {Number}\n\t */\n\tget childCount() {\n\t\treturn this._children.length;\n\t}\n\n\t/**\n\t * Is `true` if there are no nodes inside this element, `false` otherwise.\n\t *\n\t * @readonly\n\t * @type {Boolean}\n\t */\n\tget isEmpty() {\n\t\treturn this._children.length === 0;\n\t}\n\n\t/**\n\t * Checks whether given view tree object is of given type.\n\t *\n\t * Read more in {@link module:engine/view/node~Node#is}.\n\t *\n\t * @param {String} type\n\t * @param {String} [name] Element name.\n\t * @returns {Boolean}\n\t */\n\tis( type, name = null ) {\n\t\tif ( !name ) {\n\t\t\treturn type == 'element' || type == this.name;\n\t\t} else {\n\t\t\treturn type == 'element' && name == this.name;\n\t\t}\n\t}\n\n\t/**\n\t * Clones provided element.\n\t *\n\t * @param {Boolean} [deep=false] If set to `true` clones element and all its children recursively. When set to `false`,\n\t * element will be cloned without any children.\n\t * @returns {module:engine/view/element~Element} Clone of this element.\n\t */\n\tclone( deep = false ) {\n\t\tconst childrenClone = [];\n\n\t\tif ( deep ) {\n\t\t\tfor ( const child of this.getChildren() ) {\n\t\t\t\tchildrenClone.push( child.clone( deep ) );\n\t\t\t}\n\t\t}\n\n\t\t// ContainerElement and AttributeElement should be also cloned properly.\n\t\tconst cloned = new this.constructor( this.name, this._attrs, childrenClone );\n\n\t\t// Classes and styles are cloned separately - this solution is faster than adding them back to attributes and\n\t\t// parse once again in constructor.\n\t\tcloned._classes = new Set( this._classes );\n\t\tcloned._styles = new Map( this._styles );\n\n\t\t// Clone custom properties.\n\t\tcloned._customProperties = new Map( this._customProperties );\n\n\t\t// Clone filler offset method.\n\t\t// We can't define this method in a prototype because it's behavior which\n\t\t// is changed by e.g. toWidget() function from ckeditor5-widget. Perhaps this should be one of custom props.\n\t\tcloned.getFillerOffset = this.getFillerOffset;\n\n\t\treturn cloned;\n\t}\n\n\t/**\n\t * {@link module:engine/view/element~Element#insertChildren Insert} a child node or a list of child nodes at the end of this node\n\t * and sets the parent of these nodes to this element.\n\t *\n\t * @fires module:engine/view/node~Node#change\n\t * @param {module:engine/view/node~Node|Iterable.} nodes Node or the list of nodes to be inserted.\n\t * @returns {Number} Number of appended nodes.\n\t */\n\tappendChildren( nodes ) {\n\t\treturn this.insertChildren( this.childCount, nodes );\n\t}\n\n\t/**\n\t * Gets child at the given index.\n\t *\n\t * @param {Number} index Index of child.\n\t * @returns {module:engine/view/node~Node} Child node.\n\t */\n\tgetChild( index ) {\n\t\treturn this._children[ index ];\n\t}\n\n\t/**\n\t * Gets index of the given child node. Returns `-1` if child node is not found.\n\t *\n\t * @param {module:engine/view/node~Node} node Child node.\n\t * @returns {Number} Index of the child node.\n\t */\n\tgetChildIndex( node ) {\n\t\treturn this._children.indexOf( node );\n\t}\n\n\t/**\n\t * Gets child nodes iterator.\n\t *\n\t * @returns {Iterable.} Child nodes iterator.\n\t */\n\tgetChildren() {\n\t\treturn this._children[ Symbol.iterator ]();\n\t}\n\n\t/**\n\t * Returns an iterator that contains the keys for attributes. Order of inserting attributes is not preserved.\n\t *\n\t * @returns {Iterator.} Keys for attributes.\n\t */\n\t* getAttributeKeys() {\n\t\tif ( this._classes.size > 0 ) {\n\t\t\tyield 'class';\n\t\t}\n\n\t\tif ( this._styles.size > 0 ) {\n\t\t\tyield 'style';\n\t\t}\n\n\t\t// This is not an optimal solution because of https://github.com/ckeditor/ckeditor5-engine/issues/454.\n\t\t// It can be simplified to `yield* this._attrs.keys();`.\n\t\tfor ( const key of this._attrs.keys() ) {\n\t\t\tyield key;\n\t\t}\n\t}\n\n\t/**\n\t * Returns iterator that iterates over this element's attributes.\n\t *\n\t * Attributes are returned as arrays containing two items. First one is attribute key and second is attribute value.\n\t * This format is accepted by native `Map` object and also can be passed in `Node` constructor.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\t* getAttributes() {\n\t\tyield* this._attrs.entries();\n\n\t\tif ( this._classes.size > 0 ) {\n\t\t\tyield [ 'class', this.getAttribute( 'class' ) ];\n\t\t}\n\n\t\tif ( this._styles.size > 0 ) {\n\t\t\tyield [ 'style', this.getAttribute( 'style' ) ];\n\t\t}\n\t}\n\n\t/**\n\t * Gets attribute by key. If attribute is not present - returns undefined.\n\t *\n\t * @param {String} key Attribute key.\n\t * @returns {String|undefined} Attribute value.\n\t */\n\tgetAttribute( key ) {\n\t\tif ( key == 'class' ) {\n\t\t\tif ( this._classes.size > 0 ) {\n\t\t\t\treturn [ ...this._classes ].join( ' ' );\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\tif ( key == 'style' ) {\n\t\t\tif ( this._styles.size > 0 ) {\n\t\t\t\tlet styleString = '';\n\n\t\t\t\tfor ( const [ property, value ] of this._styles ) {\n\t\t\t\t\tstyleString += `${ property }:${ value };`;\n\t\t\t\t}\n\n\t\t\t\treturn styleString;\n\t\t\t}\n\n\t\t\treturn undefined;\n\t\t}\n\n\t\treturn this._attrs.get( key );\n\t}\n\n\t/**\n\t * Returns a boolean indicating whether an attribute with the specified key exists in the element.\n\t *\n\t * @param {String} key Attribute key.\n\t * @returns {Boolean} `true` if attribute with the specified key exists in the element, false otherwise.\n\t */\n\thasAttribute( key ) {\n\t\tif ( key == 'class' ) {\n\t\t\treturn this._classes.size > 0;\n\t\t}\n\n\t\tif ( key == 'style' ) {\n\t\t\treturn this._styles.size > 0;\n\t\t}\n\n\t\treturn this._attrs.has( key );\n\t}\n\n\t/**\n\t * Adds or overwrite attribute with a specified key and value.\n\t *\n\t * @param {String} key Attribute key.\n\t * @param {String} value Attribute value.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\tsetAttribute( key, value ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tif ( key == 'class' ) {\n\t\t\tparseClasses( this._classes, value );\n\t\t} else if ( key == 'style' ) {\n\t\t\tparseInlineStyles( this._styles, value );\n\t\t} else {\n\t\t\tthis._attrs.set( key, value );\n\t\t}\n\t}\n\n\t/**\n\t * Inserts a child node or a list of child nodes on the given index and sets the parent of these nodes to\n\t * this element.\n\t *\n\t * @param {Number} index Position where nodes should be inserted.\n\t * @param {module:engine/view/node~Node|Iterable.} nodes Node or the list of nodes to be inserted.\n\t * @fires module:engine/view/node~Node#change\n\t * @returns {Number} Number of inserted nodes.\n\t */\n\tinsertChildren( index, nodes ) {\n\t\tthis._fireChange( 'children', this );\n\t\tlet count = 0;\n\n\t\tnodes = normalize( nodes );\n\n\t\tfor ( const node of nodes ) {\n\t\t\t// If node that is being added to this element is already inside another element, first remove it from the old parent.\n\t\t\tif ( node.parent !== null ) {\n\t\t\t\tnode.remove();\n\t\t\t}\n\n\t\t\tnode.parent = this;\n\n\t\t\tthis._children.splice( index, 0, node );\n\t\t\tindex++;\n\t\t\tcount++;\n\t\t}\n\n\t\treturn count;\n\t}\n\n\t/**\n\t * Removes attribute from the element.\n\t *\n\t * @param {String} key Attribute key.\n\t * @returns {Boolean} Returns true if an attribute existed and has been removed.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\tremoveAttribute( key ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\t// Remove class attribute.\n\t\tif ( key == 'class' ) {\n\t\t\tif ( this._classes.size > 0 ) {\n\t\t\t\tthis._classes.clear();\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Remove style attribute.\n\t\tif ( key == 'style' ) {\n\t\t\tif ( this._styles.size > 0 ) {\n\t\t\t\tthis._styles.clear();\n\n\t\t\t\treturn true;\n\t\t\t}\n\n\t\t\treturn false;\n\t\t}\n\n\t\t// Remove other attributes.\n\t\treturn this._attrs.delete( key );\n\t}\n\n\t/**\n\t * Removes number of child nodes starting at the given index and set the parent of these nodes to `null`.\n\t *\n\t * @param {Number} index Number of the first node to remove.\n\t * @param {Number} [howMany=1] Number of nodes to remove.\n\t * @returns {Array.} The array of removed nodes.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\tremoveChildren( index, howMany = 1 ) {\n\t\tthis._fireChange( 'children', this );\n\n\t\tfor ( let i = index; i < index + howMany; i++ ) {\n\t\t\tthis._children[ i ].parent = null;\n\t\t}\n\n\t\treturn this._children.splice( index, howMany );\n\t}\n\n\t/**\n\t * Checks if this element is similar to other element.\n\t * Both elements should have the same name and attributes to be considered as similar. Two similar elements\n\t * can contain different set of children nodes.\n\t *\n\t * @param {module:engine/view/element~Element} otherElement\n\t * @returns {Boolean}\n\t */\n\tisSimilar( otherElement ) {\n\t\tif ( !( otherElement instanceof Element ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If exactly the same Element is provided - return true immediately.\n\t\tif ( this === otherElement ) {\n\t\t\treturn true;\n\t\t}\n\n\t\t// Check element name.\n\t\tif ( this.name != otherElement.name ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check number of attributes, classes and styles.\n\t\tif ( this._attrs.size !== otherElement._attrs.size || this._classes.size !== otherElement._classes.size ||\n\t\t\tthis._styles.size !== otherElement._styles.size ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// Check if attributes are the same.\n\t\tfor ( const [ key, value ] of this._attrs ) {\n\t\t\tif ( !otherElement._attrs.has( key ) || otherElement._attrs.get( key ) !== value ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if classes are the same.\n\t\tfor ( const className of this._classes ) {\n\t\t\tif ( !otherElement._classes.has( className ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\t// Check if styles are the same.\n\t\tfor ( const [ property, value ] of this._styles ) {\n\t\t\tif ( !otherElement._styles.has( property ) || otherElement._styles.get( property ) !== value ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Adds specified class.\n\t *\n\t *\t\telement.addClass( 'foo' ); // Adds 'foo' class.\n\t *\t\telement.addClass( 'foo', 'bar' ); // Adds 'foo' and 'bar' classes.\n\t *\n\t * @param {...String} className\n\t * @fires module:engine/view/node~Node#change\n\t */\n\taddClass( ...className ) {\n\t\tthis._fireChange( 'attributes', this );\n\t\tclassName.forEach( name => this._classes.add( name ) );\n\t}\n\n\t/**\n\t * Removes specified class.\n\t *\n \t *\t\telement.removeClass( 'foo' ); // Removes 'foo' class.\n\t *\t\telement.removeClass( 'foo', 'bar' ); // Removes both 'foo' and 'bar' classes.\n\t *\n\t * @param {...String} className\n\t * @fires module:engine/view/node~Node#change\n\t */\n\tremoveClass( ...className ) {\n\t\tthis._fireChange( 'attributes', this );\n\t\tclassName.forEach( name => this._classes.delete( name ) );\n\t}\n\n\t/**\n\t * Returns true if class is present.\n\t * If more then one class is provided - returns true only when all classes are present.\n\t *\n\t *\t\telement.hasClass( 'foo' ); // Returns true if 'foo' class is present.\n\t *\t\telement.hasClass( 'foo', 'bar' ); // Returns true if 'foo' and 'bar' classes are both present.\n\t *\n\t * @param {...String} className\n\t */\n\thasClass( ...className ) {\n\t\tfor ( const name of className ) {\n\t\t\tif ( !this._classes.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Returns iterator that contains all class names.\n\t *\n\t * @returns {Iterator.}\n\t */\n\tgetClassNames() {\n\t\treturn this._classes.keys();\n\t}\n\n\t/**\n\t * Adds style to the element.\n\t *\n\t *\t\telement.setStyle( 'color', 'red' );\n\t *\t\telement.setStyle( {\n\t *\t\t\tcolor: 'red',\n\t *\t\t\tposition: 'fixed'\n\t *\t\t} );\n\t *\n\t * @param {String|Object} property Property name or object with key - value pairs.\n\t * @param {String} [value] Value to set. This parameter is ignored if object is provided as the first parameter.\n\t * @fires module:engine/view/node~Node#change\n\t */\n\tsetStyle( property, value ) {\n\t\tthis._fireChange( 'attributes', this );\n\n\t\tif ( isPlainObject( property ) ) {\n\t\t\tconst keys = Object.keys( property );\n\n\t\t\tfor ( const key of keys ) {\n\t\t\t\tthis._styles.set( key, property[ key ] );\n\t\t\t}\n\t\t} else {\n\t\t\tthis._styles.set( property, value );\n\t\t}\n\t}\n\n\t/**\n\t * Returns style value for given property.\n\t * Undefined is returned if style does not exist.\n\t *\n\t * @param {String} property\n\t * @returns {String|undefined}\n\t */\n\tgetStyle( property ) {\n\t\treturn this._styles.get( property );\n\t}\n\n\t/**\n\t * Returns iterator that contains all style names.\n\t *\n\t * @returns {Iterator.}\n\t */\n\tgetStyleNames() {\n\t\treturn this._styles.keys();\n\t}\n\n\t/**\n\t * Returns true if style keys are present.\n\t * If more then one style property is provided - returns true only when all properties are present.\n\t *\n\t *\t\telement.hasStyle( 'color' ); // Returns true if 'border-top' style is present.\n\t *\t\telement.hasStyle( 'color', 'border-top' ); // Returns true if 'color' and 'border-top' styles are both present.\n\t *\n\t * @param {...String} property\n\t */\n\thasStyle( ...property ) {\n\t\tfor ( const name of property ) {\n\t\t\tif ( !this._styles.has( name ) ) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}\n\n\t/**\n\t * Removes specified style.\n\t *\n\t *\t\telement.removeStyle( 'color' ); // Removes 'color' style.\n\t *\t\telement.removeStyle( 'color', 'border-top' ); // Removes both 'color' and 'border-top' styles.\n\t *\n\t * @param {...String} property\n\t * @fires module:engine/view/node~Node#change\n\t */\n\tremoveStyle( ...property ) {\n\t\tthis._fireChange( 'attributes', this );\n\t\tproperty.forEach( name => this._styles.delete( name ) );\n\t}\n\n\t/**\n\t * Returns ancestor element that match specified pattern.\n\t * Provided patterns should be compatible with {@link module:engine/view/matcher~Matcher Matcher} as it is used internally.\n\t *\n\t * @see module:engine/view/matcher~Matcher\n\t * @param {Object|String|RegExp|Function} patterns Patterns used to match correct ancestor.\n\t * See {@link module:engine/view/matcher~Matcher}.\n\t * @returns {module:engine/view/element~Element|null} Found element or `null` if no matching ancestor was found.\n\t */\n\tfindAncestor( ...patterns ) {\n\t\tconst matcher = new Matcher( ...patterns );\n\t\tlet parent = this.parent;\n\n\t\twhile ( parent ) {\n\t\t\tif ( matcher.match( parent ) ) {\n\t\t\t\treturn parent;\n\t\t\t}\n\n\t\t\tparent = parent.parent;\n\t\t}\n\n\t\treturn null;\n\t}\n\n\t/**\n\t * Sets a custom property. Unlike attributes, custom properties are not rendered to the DOM,\n\t * so they can be used to add special data to elements.\n\t *\n\t * @param {String|Symbol} key\n\t * @param {*} value\n\t */\n\tsetCustomProperty( key, value ) {\n\t\tthis._customProperties.set( key, value );\n\t}\n\n\t/**\n\t * Returns the custom property value for the given key.\n\t *\n\t * @param {String|Symbol} key\n\t * @returns {*}\n\t */\n\tgetCustomProperty( key ) {\n\t\treturn this._customProperties.get( key );\n\t}\n\n\t/**\n\t * Removes the custom property stored under the given key.\n\t *\n\t * @param {String|Symbol} key\n\t * @returns {Boolean} Returns true if property was removed.\n\t */\n\tremoveCustomProperty( key ) {\n\t\treturn this._customProperties.delete( key );\n\t}\n\n\t/**\n\t * Returns an iterator which iterates over this element's custom properties.\n\t * Iterator provides [key, value] pair for each stored property.\n\t *\n\t * @returns {Iterable.<*>}\n\t */\n\t* getCustomProperties() {\n\t\tyield* this._customProperties.entries();\n\t}\n\n\t/**\n\t * Returns identity string based on element's name, styles, classes and other attributes.\n\t * Two elements that {@link #isSimilar are similar} will have same identity string.\n\t * It has the following format:\n\t *\n\t *\t\t'name class=\"class1,class2\" style=\"style1:value1;style2:value2\" attr1=\"val1\" attr2=\"val2\"'\n \t *\n\t * For example:\n\t *\n\t *\t\tconst element = new ViewElement( 'foo' );\n\t *\t\telement.setAttribute( 'banana', '10' );\n\t *\t\telement.setAttribute( 'apple', '20' );\n\t *\t\telement.setStyle( 'color', 'red' );\n\t *\t\telement.setStyle( 'border-color', 'white' );\n\t *\t\telement.addClass( 'baz' );\n\t *\n\t *\t\t// returns 'foo class=\"baz\" style=\"border-color:white;color:red\" apple=\"20\" banana=\"10\"'\n\t *\t\telement.getIdentity();\n\t *\n\t * NOTE: Classes, styles and other attributes are sorted alphabetically.\n\t *\n\t * @returns {String}\n\t */\n\tgetIdentity() {\n\t\tconst classes = Array.from( this._classes ).sort().join( ',' );\n\t\tconst styles = Array.from( this._styles ).map( i => `${ i[ 0 ] }:${ i[ 1 ] }` ).sort().join( ';' );\n\t\tconst attributes = Array.from( this._attrs ).map( i => `${ i[ 0 ] }=\"${ i[ 1 ] }\"` ).sort().join( ' ' );\n\n\t\treturn this.name +\n\t\t\t( classes == '' ? '' : ` class=\"${ classes }\"` ) +\n\t\t\t( styles == '' ? '' : ` style=\"${ styles }\"` ) +\n\t\t\t( attributes == '' ? '' : ` ${ attributes }` );\n\t}\n\n\t/**\n\t * Returns block {@link module:engine/view/filler filler} offset or `null` if block filler is not needed.\n\t *\n\t * @abstract\n\t * @method module:engine/view/element~Element#getFillerOffset\n\t */\n}\n\n// Parses inline styles and puts property - value pairs into styles map.\n// Styles map is cleared before insertion.\n//\n// @param {Map.} stylesMap Map to insert parsed properties and values.\n// @param {String} stylesString Styles to parse.\nfunction parseInlineStyles( stylesMap, stylesString ) {\n\t// `null` if no quote was found in input string or last found quote was a closing quote. See below.\n\tlet quoteType = null;\n\tlet propertyNameStart = 0;\n\tlet propertyValueStart = 0;\n\tlet propertyName = null;\n\n\tstylesMap.clear();\n\n\t// Do not set anything if input string is empty.\n\tif ( stylesString === '' ) {\n\t\treturn;\n\t}\n\n\t// Fix inline styles that do not end with `;` so they are compatible with algorithm below.\n\tif ( stylesString.charAt( stylesString.length - 1 ) != ';' ) {\n\t\tstylesString = stylesString + ';';\n\t}\n\n\t// Seek the whole string for \"special characters\".\n\tfor ( let i = 0; i < stylesString.length; i++ ) {\n\t\tconst char = stylesString.charAt( i );\n\n\t\tif ( quoteType === null ) {\n\t\t\t// No quote found yet or last found quote was a closing quote.\n\t\t\tswitch ( char ) {\n\t\t\t\tcase ':':\n\t\t\t\t\t// Most of time colon means that property name just ended.\n\t\t\t\t\t// Sometimes however `:` is found inside property value (for example in background image url).\n\t\t\t\t\tif ( !propertyName ) {\n\t\t\t\t\t\t// Treat this as end of property only if property name is not already saved.\n\t\t\t\t\t\t// Save property name.\n\t\t\t\t\t\tpropertyName = stylesString.substr( propertyNameStart, i - propertyNameStart );\n\t\t\t\t\t\t// Save this point as the start of property value.\n\t\t\t\t\t\tpropertyValueStart = i + 1;\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase '\"':\n\t\t\t\tcase '\\'':\n\t\t\t\t\t// Opening quote found (this is an opening quote, because `quoteType` is `null`).\n\t\t\t\t\tquoteType = char;\n\n\t\t\t\t\tbreak;\n\n\t\t\t\t// eslint-disable-next-line no-case-declarations\n\t\t\t\tcase ';':\n\t\t\t\t\t// Property value just ended.\n\t\t\t\t\t// Use previously stored property value start to obtain property value.\n\t\t\t\t\tconst propertyValue = stylesString.substr( propertyValueStart, i - propertyValueStart );\n\n\t\t\t\t\tif ( propertyName ) {\n\t\t\t\t\t\t// Save parsed part.\n\t\t\t\t\t\tstylesMap.set( propertyName.trim(), propertyValue.trim() );\n\t\t\t\t\t}\n\n\t\t\t\t\tpropertyName = null;\n\n\t\t\t\t\t// Save this point as property name start. Property name starts immediately after previous property value ends.\n\t\t\t\t\tpropertyNameStart = i + 1;\n\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t} else if ( char === quoteType ) {\n\t\t\t// If a quote char is found and it is a closing quote, mark this fact by `null`-ing `quoteType`.\n\t\t\tquoteType = null;\n\t\t}\n\t}\n}\n\n// Parses class attribute and puts all classes into classes set.\n// Classes set s cleared before insertion.\n//\n// @param {Set.} classesSet Set to insert parsed classes.\n// @param {String} classesString String with classes to parse.\nfunction parseClasses( classesSet, classesString ) {\n\tconst classArray = classesString.split( /\\s+/ );\n\tclassesSet.clear();\n\tclassArray.forEach( name => classesSet.add( name ) );\n}\n\n// Converts strings to Text and non-iterables to arrays.\n//\n// @param {String|module:engine/view/node~Node|Iterable.}\n// @return {Iterable.}\nfunction normalize( nodes ) {\n\t// Separate condition because string is iterable.\n\tif ( typeof nodes == 'string' ) {\n\t\treturn [ new Text( nodes ) ];\n\t}\n\n\tif ( !isIterable( nodes ) ) {\n\t\tnodes = [ nodes ];\n\t}\n\n\t// Array.from to enable .map() on non-arrays.\n\treturn Array.from( nodes )\n\t\t.map( node => {\n\t\t\treturn typeof node == 'string' ? new Text( node ) : node;\n\t\t} );\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/view/element.js\n// module id = 27\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * Set of utils related to keyboard support.\n *\n * @module utils/keyboard\n */\n\nimport CKEditorError from './ckeditorerror';\nimport env from './env';\n\n/**\n * Object with `keyName => keyCode` pairs for a set of known keys.\n *\n * Contains:\n *\n * * `a-z`,\n * * `0-9`,\n * * `f1-f12`,\n * * `arrow(left|up|right|bottom)`,\n * * `backspace`, `delete`, `enter`, `esc`, `tab`,\n * * `ctrl`, `cmd`, `shift`, `alt`.\n */\nexport const keyCodes = generateKnownKeyCodes();\n\n/**\n * Converts a key name or a {@link module:utils/keyboard~KeystrokeInfo keystroke info} into a key code.\n *\n * Note: Key names are matched with {@link module:utils/keyboard~keyCodes} in a case-insensitive way.\n *\n * @param {String|module:utils/keyboard~KeystrokeInfo} Key name (see {@link module:utils/keyboard~keyCodes})\n * or a keystroke data object.\n * @returns {Number} Key or keystroke code.\n */\nexport function getCode( key ) {\n\tlet keyCode;\n\n\tif ( typeof key == 'string' ) {\n\t\tkeyCode = keyCodes[ key.toLowerCase() ];\n\n\t\tif ( !keyCode ) {\n\t\t\t/**\n\t\t\t * Unknown key name. Only key names contained by the {@link module:utils/keyboard~keyCodes} can be used.\n\t\t\t *\n\t\t\t * @errror keyboard-unknown-key\n\t\t\t * @param {String} key\n\t\t\t */\n\t\t\tthrow new CKEditorError( 'keyboard-unknown-key: Unknown key name.', { key } );\n\t\t}\n\t} else {\n\t\tkeyCode = key.keyCode +\n\t\t\t( key.altKey ? keyCodes.alt : 0 ) +\n\t\t\t( key.ctrlKey ? keyCodes.ctrl : 0 ) +\n\t\t\t( key.shiftKey ? keyCodes.shift : 0 );\n\t}\n\n\treturn keyCode;\n}\n\n/**\n * Parses keystroke and returns a keystroke code that will match the code returned by\n * link {@link module:utils/keyboard.getCode} for a corresponding {@link module:utils/keyboard~KeystrokeInfo keystroke info}.\n *\n * The keystroke can be passed in two formats:\n *\n * * as a single string ā€“ e.g. `ctrl + A`,\n * * as an array of {@link module:utils/keyboard~keyCodes known key names} and key codes ā€“ e.g.:\n * * `[ 'ctrl', 32 ]` (ctrl + space),\n * * `[ 'ctrl', 'a' ]` (ctrl + A).\n *\n * Note: Key names are matched with {@link module:utils/keyboard~keyCodes} in a case-insensitive way.\n *\n * Note: Only keystrokes with a single non-modifier key are supported (e.g. `ctrl+A` is OK, but `ctrl+A+B` is not).\n *\n * @param {String|Array.} keystroke Keystroke definition.\n * @returns {Number} Keystroke code.\n */\nexport function parseKeystroke( keystroke ) {\n\tif ( typeof keystroke == 'string' ) {\n\t\tkeystroke = splitKeystrokeText( keystroke );\n\t}\n\n\treturn keystroke\n\t\t.map( key => ( typeof key == 'string' ) ? getCode( key ) : key )\n\t\t.reduce( ( key, sum ) => sum + key, 0 );\n}\n\n/**\n * It translates any keystroke string text like `\"CTRL+A\"` to an\n * environmentā€“specific keystroke, i.e. `\"āŒ˜A\"` on Mac OSX.\n *\n * @param {String} keystroke Keystroke text.\n * @returns {String} Keystroke text specific for the environment.\n */\nexport function getEnvKeystrokeText( keystroke ) {\n\tconst split = splitKeystrokeText( keystroke );\n\n\tif ( env.mac ) {\n\t\tif ( split[ 0 ].toLowerCase() == 'ctrl' ) {\n\t\t\treturn 'āŒ˜' + ( split[ 1 ] || '' );\n\t\t}\n\t}\n\n\treturn keystroke;\n}\n\nfunction generateKnownKeyCodes() {\n\tconst keyCodes = {\n\t\tarrowleft: 37,\n\t\tarrowup: 38,\n\t\tarrowright: 39,\n\t\tarrowdown: 40,\n\t\tbackspace: 8,\n\t\tdelete: 46,\n\t\tenter: 13,\n\t\tspace: 32,\n\t\tesc: 27,\n\t\ttab: 9,\n\n\t\t// The idea about these numbers is that they do not collide with any real key codes, so we can use them\n\t\t// like bit masks.\n\t\tctrl: 0x110000,\n\t\t// Has the same code as ctrl, because their behaviour should be unified across the editor.\n\t\t// See http://ckeditor.github.io/editor-recommendations/general-policies#ctrl-vs-cmd\n\t\tcmd: 0x110000,\n\t\tshift: 0x220000,\n\t\talt: 0x440000\n\t};\n\n\t// a-z\n\tfor ( let code = 65; code <= 90; code++ ) {\n\t\tconst letter = String.fromCharCode( code );\n\n\t\tkeyCodes[ letter.toLowerCase() ] = code;\n\t}\n\n\t// 0-9\n\tfor ( let code = 48; code <= 57; code++ ) {\n\t\tkeyCodes[ code - 48 ] = code;\n\t}\n\n\t// F1-F12\n\tfor ( let code = 112; code <= 123; code++ ) {\n\t\tkeyCodes[ 'f' + ( code - 111 ) ] = code;\n\t}\n\n\treturn keyCodes;\n}\n\nfunction splitKeystrokeText( keystroke ) {\n\treturn keystroke.split( /\\s*\\+\\s*/ );\n}\n\n/**\n * Information about a keystroke.\n *\n * @interface module:utils/keyboard~KeystrokeInfo\n */\n\n/**\n * The [key code](https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/keyCode).\n *\n * @member {Number} module:utils/keyboard~KeystrokeInfo#keyCode\n */\n\n/**\n * Whether the Alt modifier was pressed.\n *\n * @member {Bolean} module:utils/keyboard~KeystrokeInfo#altKey\n */\n\n/**\n * Whether the Ctrl or Cmd modifier was pressed.\n *\n * @member {Bolean} module:utils/keyboard~KeystrokeInfo#ctrlKey\n */\n\n/**\n * Whether the Shift modifier was pressed.\n *\n * @member {Bolean} module:utils/keyboard~KeystrokeInfo#shiftKey\n */\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/keyboard.js\n// module id = 28\n// module chunks = 0","/**\n * @license Copyright (c) 2003-2017, CKSource - Frederico Knabben. All rights reserved.\n * For licensing, see LICENSE.md.\n */\n\n/**\n * @module engine/model/operation/moveoperation\n */\n\nimport Operation from './operation';\nimport Position from '../position';\nimport Range from '../range';\nimport CKEditorError from '@ckeditor/ckeditor5-utils/src/ckeditorerror';\nimport compareArrays from '@ckeditor/ckeditor5-utils/src/comparearrays';\nimport writer from './../writer';\n\n/**\n * Operation to move a range of {@link module:engine/model/item~Item model items}\n * to given {@link module:engine/model/position~Position target position}.\n *\n * @extends module:engine/model/operation/operation~Operation\n */\nexport default class MoveOperation extends Operation {\n\t/**\n\t * Creates a move operation.\n\t *\n\t * @param {module:engine/model/position~Position} sourcePosition\n\t * Position before the first {@link module:engine/model/item~Item model item} to move.\n\t * @param {Number} howMany Offset size of moved range. Moved range will start from `sourcePosition` and end at\n\t * `sourcePosition` with offset shifted by `howMany`.\n\t * @param {module:engine/model/position~Position} targetPosition Position at which moved nodes will be inserted.\n\t * @param {Number} baseVersion {@link module:engine/model/document~Document#version} on which operation can be applied.\n\t */\n\tconstructor( sourcePosition, howMany, targetPosition, baseVersion ) {\n\t\tsuper( baseVersion );\n\n\t\t/**\n\t\t * Position before the first {@link module:engine/model/item~Item model item} to move.\n\t\t *\n\t\t * @member {module:engine/model/position~Position} module:engine/model/operation/moveoperation~MoveOperation#sourcePosition\n\t\t */\n\t\tthis.sourcePosition = Position.createFromPosition( sourcePosition );\n\n\t\t/**\n\t\t * Offset size of moved range.\n\t\t *\n\t\t * @member {Number} module:engine/model/operation/moveoperation~MoveOperation#howMany\n\t\t */\n\t\tthis.howMany = howMany;\n\n\t\t/**\n\t\t * Position at which moved nodes will be inserted.\n\t\t *\n\t\t * @member {module:engine/model/position~Position} module:engine/model/operation/moveoperation~MoveOperation#targetPosition\n\t\t */\n\t\tthis.targetPosition = Position.createFromPosition( targetPosition );\n\n\t\t/**\n\t\t * Defines whether `MoveOperation` is sticky. If `MoveOperation` is sticky, during\n\t\t * {@link module:engine/model/operation/transform~transform operational transformation} if there will be an operation that\n\t\t * inserts some nodes at the position equal to the boundary of this `MoveOperation`, that operation will\n\t\t * get their insertion path updated to the position where this `MoveOperation` moves the range.\n\t\t *\n\t\t * @member {Boolean} module:engine/model/operation/moveoperation~MoveOperation#isSticky\n\t\t */\n\t\tthis.isSticky = false;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tget type() {\n\t\treturn 'move';\n\t}\n\n\t/**\n\t * Creates and returns an operation that has the same parameters as this operation.\n\t *\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation} Clone of this operation.\n\t */\n\tclone() {\n\t\tconst op = new this.constructor( this.sourcePosition, this.howMany, this.targetPosition, this.baseVersion );\n\t\top.isSticky = this.isSticky;\n\n\t\treturn op;\n\t}\n\n\t/**\n\t * Returns the start position of the moved range after it got moved. This may be different than\n\t * {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition} in some cases, i.e. when a range is moved\n\t * inside the same parent but {@link module:engine/model/operation/moveoperation~MoveOperation#targetPosition targetPosition}\n\t * is after {@link module:engine/model/operation/moveoperation~MoveOperation#sourcePosition sourcePosition}.\n\t *\n\t *\t\t vv vv\n\t *\t\tabcdefg ===> adefbcg\n\t *\t\t ^ ^\n\t *\t\t targetPos\tmovedRangeStart\n\t *\t\t offset 6\toffset 4\n\t *\n\t * @returns {module:engine/model/position~Position}\n\t */\n\tgetMovedRangeStart() {\n\t\treturn this.targetPosition._getTransformedByDeletion( this.sourcePosition, this.howMany );\n\t}\n\n\t/**\n\t * See {@link module:engine/model/operation/operation~Operation#getReversed `Operation#getReversed()`}.\n\t *\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n\t */\n\tgetReversed() {\n\t\tconst newTargetPosition = this.sourcePosition._getTransformedByInsertion( this.targetPosition, this.howMany );\n\n\t\tconst op = new this.constructor( this.getMovedRangeStart(), this.howMany, newTargetPosition, this.baseVersion + 1 );\n\t\top.isSticky = this.isSticky;\n\n\t\treturn op;\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\t_execute() {\n\t\tconst sourceElement = this.sourcePosition.parent;\n\t\tconst targetElement = this.targetPosition.parent;\n\t\tconst sourceOffset = this.sourcePosition.offset;\n\t\tconst targetOffset = this.targetPosition.offset;\n\n\t\t// Validate whether move operation has correct parameters.\n\t\t// Validation is pretty complex but move operation is one of the core ways to manipulate the document state.\n\t\t// We expect that many errors might be connected with one of scenarios described below.\n\t\tif ( !sourceElement || !targetElement ) {\n\t\t\t/**\n\t\t\t * Source position or target position is invalid.\n\t\t\t *\n\t\t\t * @error move-operation-position-invalid\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-position-invalid: Source position or target position is invalid.'\n\t\t\t);\n\t\t} else if ( sourceOffset + this.howMany > sourceElement.maxOffset ) {\n\t\t\t/**\n\t\t\t * The nodes which should be moved do not exist.\n\t\t\t *\n\t\t\t * @error move-operation-nodes-do-not-exist\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-nodes-do-not-exist: The nodes which should be moved do not exist.'\n\t\t\t);\n\t\t} else if ( sourceElement === targetElement && sourceOffset < targetOffset && targetOffset < sourceOffset + this.howMany ) {\n\t\t\t/**\n\t\t\t * Trying to move a range of nodes into the middle of that range.\n\t\t\t *\n\t\t\t * @error move-operation-range-into-itself\n\t\t\t */\n\t\t\tthrow new CKEditorError(\n\t\t\t\t'move-operation-range-into-itself: Trying to move a range of nodes to the inside of that range.'\n\t\t\t);\n\t\t} else if ( this.sourcePosition.root == this.targetPosition.root ) {\n\t\t\tif ( compareArrays( this.sourcePosition.getParentPath(), this.targetPosition.getParentPath() ) == 'prefix' ) {\n\t\t\t\tconst i = this.sourcePosition.path.length - 1;\n\n\t\t\t\tif ( this.targetPosition.path[ i ] >= sourceOffset && this.targetPosition.path[ i ] < sourceOffset + this.howMany ) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Trying to move a range of nodes into one of nodes from that range.\n\t\t\t\t\t *\n\t\t\t\t\t * @error move-operation-node-into-itself\n\t\t\t\t\t */\n\t\t\t\t\tthrow new CKEditorError(\n\t\t\t\t\t\t'move-operation-node-into-itself: Trying to move a range of nodes into one of nodes from that range.'\n\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tconst range = writer.move( Range.createFromPositionAndShift( this.sourcePosition, this.howMany ), this.targetPosition );\n\n\t\treturn {\n\t\t\tsourcePosition: this.sourcePosition,\n\t\t\trange\n\t\t};\n\t}\n\n\t/**\n\t * @inheritDoc\n\t */\n\tstatic get className() {\n\t\treturn 'engine.model.operation.MoveOperation';\n\t}\n\n\t/**\n\t * Creates `MoveOperation` object from deserilized object, i.e. from parsed JSON string.\n\t *\n\t * @param {Object} json Deserialized JSON object.\n\t * @param {module:engine/model/document~Document} document Document on which this operation will be applied.\n\t * @returns {module:engine/model/operation/moveoperation~MoveOperation}\n\t */\n\tstatic fromJSON( json, document ) {\n\t\tconst sourcePosition = Position.fromJSON( json.sourcePosition, document );\n\t\tconst targetPosition = Position.fromJSON( json.targetPosition, document );\n\n\t\tconst move = new this( sourcePosition, json.howMany, targetPosition, json.baseVersion );\n\n\t\tif ( json.isSticky ) {\n\t\t\tmove.isSticky = true;\n\t\t}\n\n\t\treturn move;\n\t}\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-engine/src/model/operation/moveoperation.js\n// module id = 29\n// module chunks = 0","/**\n * A specialized version of `_.map` for arrays without support for iteratee\n * shorthands.\n *\n * @private\n * @param {Array} array The array to iterate over.\n * @param {Function} iteratee The function invoked per iteration.\n * @returns {Array} Returns the new mapped array.\n */\nfunction arrayMap(array, iteratee) {\n var index = -1,\n length = array.length,\n result = Array(length);\n\n while (++index < length) {\n result[index] = iteratee(array[index], index, array);\n }\n return result;\n}\n\nexport default arrayMap;\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// ../ckeditor5-utils/src/lib/lodash/_arrayMap.js\n// module id = 30\n// module chunks = 0","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n// css base code, injected by the css-loader\nmodule.exports = function(useSourceMap) {\n\tvar list = [];\n\n\t// return the list of modules as css string\n\tlist.toString = function toString() {\n\t\treturn this.map(function (item) {\n\t\t\tvar content = cssWithMappingToString(item, useSourceMap);\n\t\t\tif(item[2]) {\n\t\t\t\treturn \"@media \" + item[2] + \"{\" + content + \"}\";\n\t\t\t} else {\n\t\t\t\treturn content;\n\t\t\t}\n\t\t}).join(\"\");\n\t};\n\n\t// import a list of modules into the list\n\tlist.i = function(modules, mediaQuery) {\n\t\tif(typeof modules === \"string\")\n\t\t\tmodules = [[null, modules, \"\"]];\n\t\tvar alreadyImportedModules = {};\n\t\tfor(var i = 0; i < this.length; i++) {\n\t\t\tvar id = this[i][0];\n\t\t\tif(typeof id === \"number\")\n\t\t\t\talreadyImportedModules[id] = true;\n\t\t}\n\t\tfor(i = 0; i < modules.length; i++) {\n\t\t\tvar item = modules[i];\n\t\t\t// skip already imported module\n\t\t\t// this implementation is not 100% perfect for weird media query combinations\n\t\t\t// when a module is imported multiple times with different media queries.\n\t\t\t// I hope this will never occur (Hey this way we have smaller bundles)\n\t\t\tif(typeof item[0] !== \"number\" || !alreadyImportedModules[item[0]]) {\n\t\t\t\tif(mediaQuery && !item[2]) {\n\t\t\t\t\titem[2] = mediaQuery;\n\t\t\t\t} else if(mediaQuery) {\n\t\t\t\t\titem[2] = \"(\" + item[2] + \") and (\" + mediaQuery + \")\";\n\t\t\t\t}\n\t\t\t\tlist.push(item);\n\t\t\t}\n\t\t}\n\t};\n\treturn list;\n};\n\nfunction cssWithMappingToString(item, useSourceMap) {\n\tvar content = item[1] || '';\n\tvar cssMapping = item[3];\n\tif (!cssMapping) {\n\t\treturn content;\n\t}\n\n\tif (useSourceMap && typeof btoa === 'function') {\n\t\tvar sourceMapping = toComment(cssMapping);\n\t\tvar sourceURLs = cssMapping.sources.map(function (source) {\n\t\t\treturn '/*# sourceURL=' + cssMapping.sourceRoot + source + ' */'\n\t\t});\n\n\t\treturn [content].concat(sourceURLs).concat([sourceMapping]).join('\\n');\n\t}\n\n\treturn [content].join('\\n');\n}\n\n// Adapted from convert-source-map (MIT)\nfunction toComment(sourceMap) {\n\t// eslint-disable-next-line no-undef\n\tvar base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap))));\n\tvar data = 'sourceMappingURL=data:application/json;charset=utf-8;base64,' + base64;\n\n\treturn '/*# ' + data + ' */';\n}\n\n\n\n//////////////////\n// WEBPACK FOOTER\n// /workspace/ckeditor5/node_modules/css-loader/lib/css-base.js\n// module id = 31\n// module chunks = 0","/*\n\tMIT License http://www.opensource.org/licenses/mit-license.php\n\tAuthor Tobias Koppers @sokra\n*/\n\nvar stylesInDom = {};\n\nvar\tmemoize = function (fn) {\n\tvar memo;\n\n\treturn function () {\n\t\tif (typeof memo === \"undefined\") memo = fn.apply(this, arguments);\n\t\treturn memo;\n\t};\n};\n\nvar isOldIE = memoize(function () {\n\t// Test for IE <= 9 as proposed by Browserhacks\n\t// @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805\n\t// Tests for existence of standard globals is to allow style-loader\n\t// to operate correctly into non-standard environments\n\t// @see https://github.com/webpack-contrib/style-loader/issues/177\n\treturn window && document && document.all && !window.atob;\n});\n\nvar getElement = (function (fn) {\n\tvar memo = {};\n\n\treturn function(selector) {\n\t\tif (typeof memo[selector] === \"undefined\") {\n\t\t\tmemo[selector] = fn.call(this, selector);\n\t\t}\n\n\t\treturn memo[selector]\n\t};\n})(function (target) {\n\treturn document.querySelector(target)\n});\n\nvar singleton = null;\nvar\tsingletonCounter = 0;\nvar\tstylesInsertedAtTop = [];\n\nvar\tfixUrls = require(\"./urls\");\n\nmodule.exports = function(list, options) {\n\tif (typeof DEBUG !== \"undefined\" && DEBUG) {\n\t\tif (typeof document !== \"object\") throw new Error(\"The style-loader cannot be used in a non-browser environment\");\n\t}\n\n\toptions = options || {};\n\n\toptions.attrs = typeof options.attrs === \"object\" ? options.attrs : {};\n\n\t// Force single-tag solution on IE6-9, which has a hard limit on the # of